From 83a85b54e03f7d603940cecc7306a8cc8aeed4b8 Mon Sep 17 00:00:00 2001 From: Simon van Lierde <90462640+simonvanlierde@users.noreply.github.com> Date: Sun, 15 Nov 2026 18:54:58 +0100 Subject: [PATCH 1/3] feat(r9cam): accept EdDSA device tokens Device assertions were ES256 only (ASSERTION_ALGORITHMS = ("ES256",)), so a camera could not move to an Ed25519 key. The backend now accepts ES256 and EdDSA, and each camera may sign only with the algorithm its registered key implies: EC P-256 for ES256, OKP Ed25519 for EdDSA. The stored JWK already records the key type, so no migration is needed. Pairing an Ed25519 camera also needs r9cam-models 0.7.0, whose DevicePublicKeyJWK accepts OKP keys; the relock follows once it is on PyPI. Not tested: the database integration tests (pairing and relay flows) did not run locally. Fixes #501 Signed-off-by: Simon van Lierde <90462640+simonvanlierde@users.noreply.github.com> --- CHANGELOG.md | 3 ++ app/src/types/openapi.json | 2 +- .../app/api/plugins/r9cam/device_assertion.py | 12 +++-- .../api/plugins/r9cam/routers/camera_crud.py | 2 +- .../routers/camera_interaction/images.py | 4 +- .../app/api/plugins/r9cam/schemas/__init__.py | 2 +- backend/tests/fixtures/device_assertion.py | 21 ++++++-- .../plugins/r9cam/test_device_assertion.py | 50 ++++++++++++++++++- docs/public/api/schemas/openapi.device.json | 6 +-- docs/public/api/schemas/openapi.public.json | 2 +- docs/src/content/docs/operations/security.mdx | 2 +- 11 files changed, 87 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2420b4a71..ce0279af1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,9 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Added +- r9cam cameras can sign their device tokens with EdDSA (Ed25519) as well as ES256. Each camera + may use only the algorithm of the key it paired with. Pairing an Ed25519 camera also needs + r9cam-models 0.7.0. ([#501](https://github.com/CMLPlatform/r9lab/issues/501)) - An accessibility statement at `/accessibility` on the website, backed by a WCAG 2.2 self-assessment of the website, the documentation site and the web app at `/accessibility-assessment`. diff --git a/app/src/types/openapi.json b/app/src/types/openapi.json index c6c85f894..feca720d2 100644 --- a/app/src/types/openapi.json +++ b/app/src/types/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"R9lab \u2013 Data Collection API","description":"Data collection app for the R9lab project at the Institute of Environmental Sciences (CML), Leiden University.\n\n**Licensing.** This API specification is licensed Apache-2.0 so that anyone may write clients, importers, or integrations against it without inheriting the platform's copyleft. The R9lab platform software itself remains AGPL-3.0-or-later, and curated dataset releases are licensed CC BY 4.0.","license":{"name":"Apache-2.0","identifier":"Apache-2.0"},"version":"1.0.0","x-api-version":"1.0.0","x-api-major":"v1","x-deprecation-policy":"Breaking changes are documented in release notes."},"paths":{"/v1/admin/cache/clear/{namespace}":{"post":{"tags":["admin"],"summary":"Clear cache by namespace","description":"Clear cached responses for a specific namespace.","operationId":"clear_cache_by_namespace_v1_admin_cache_clear__namespace__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CacheNamespace","description":"Cache namespace to clear"},"description":"Cache namespace to clear"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Clear Cache By Namespace V1 Admin Cache Clear Namespace Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/categories":{"post":{"tags":["admin","categories"],"summary":"Create a new category","description":"Create a category.\n\n``taxonomy_id`` is required for root categories and is inherited from the\nparent when ``supercategory_id`` is supplied.","operationId":"create_category_v1_admin_categories_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/categories/{category_id}":{"patch":{"tags":["admin","categories"],"summary":"Update category","description":"Update an existing category.","operationId":"update_category_v1_admin_categories__category_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","categories"],"summary":"Delete category","description":"Delete a category by ID, including its subcategories.","operationId":"delete_category_v1_admin_categories__category_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/taxonomies":{"post":{"tags":["admin","taxonomies"],"summary":"Create a new taxonomy","description":"Create a new taxonomy, optionally with categories.","operationId":"create_taxonomy_endpoint_v1_admin_taxonomies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyCreateWithCategories"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/taxonomies/{taxonomy_id}":{"patch":{"tags":["admin","taxonomies"],"summary":"Update taxonomy","description":"Update an existing taxonomy.","operationId":"update_taxonomy_v1_admin_taxonomies__taxonomy_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","taxonomies"],"summary":"Delete taxonomy, including categories","description":"Delete a taxonomy by ID, including its categories.","operationId":"delete_taxonomy_v1_admin_taxonomies__taxonomy_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials":{"post":{"tags":["admin","materials"],"summary":"Create material","description":"Create a material.","operationId":"create_material_v1_admin_materials_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialCreateWithCategories"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/materials/{material_id}":{"patch":{"tags":["admin","materials"],"summary":"Update material","description":"Update a material.","operationId":"update_material_v1_admin_materials__material_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","materials"],"summary":"Delete material","description":"Delete a material.","operationId":"delete_material_v1_admin_materials__material_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/categories":{"post":{"tags":["admin","materials"],"summary":"Add multiple categories to the material","description":"Add multiple categories to a material.","operationId":"add_categories_to_material_v1_admin_materials__material_id__categories_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to assign to the material","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Add Categories To Material V1 Admin Materials Material Id Categories Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","materials"],"summary":"Remove multiple categories from the material","description":"Remove multiple categories from a material.","operationId":"remove_categories_from_material_v1_admin_materials__material_id__categories_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to remove from the material","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/files":{"post":{"tags":["admin","materials"],"summary":"Add File to Material","description":"Upload a new file for the material.","operationId":"upload_material_file_v1_admin_materials__material_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_material_file_v1_admin_materials__material_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/files/{file_id}":{"delete":{"tags":["admin","materials"],"summary":"Remove File from Material","description":"Remove a file from the material.","operationId":"delete_material_file_v1_admin_materials__material_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/images":{"post":{"tags":["admin","materials"],"summary":"Add Image to Material","description":"Upload a new image for the material.","operationId":"upload_material_image_v1_admin_materials__material_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_material_image_v1_admin_materials__material_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/images/{image_id}":{"delete":{"tags":["admin","materials"],"summary":"Remove Image from Material","description":"Remove an image from the material.","operationId":"delete_material_image_v1_admin_materials__material_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types":{"post":{"tags":["admin","product-types"],"summary":"Create product type","description":"Create a product type.","operationId":"create_product_type_v1_admin_product_types_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeCreateWithCategories"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}":{"patch":{"tags":["admin","product-types"],"summary":"Update product type","description":"Update a product type.","operationId":"update_product_type_v1_admin_product_types__product_type_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","product-types"],"summary":"Delete product type","description":"Delete a product type.","operationId":"delete_product_type_v1_admin_product_types__product_type_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/categories":{"post":{"tags":["admin","product-types"],"summary":"Add multiple categories to the product type","description":"Add multiple categories to a product type.","operationId":"add_categories_to_product_type_v1_admin_product_types__product_type_id__categories_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to assign to the product type","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Add Categories To Product Type V1 Admin Product Types Product Type Id Categories Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","product-types"],"summary":"Remove multiple categories from the product type","description":"Remove multiple categories from a product type.","operationId":"remove_categories_from_product_type_v1_admin_product_types__product_type_id__categories_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to remove from the product type","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/files":{"post":{"tags":["admin","product-types"],"summary":"Add File to Product Type","description":"Upload a new file for the product type.","operationId":"upload_product_type_file_v1_admin_product_types__product_type_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_type_file_v1_admin_product_types__product_type_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/files/{file_id}":{"delete":{"tags":["admin","product-types"],"summary":"Remove File from Product Type","description":"Remove a file from the product type.","operationId":"delete_product_type_file_v1_admin_product_types__product_type_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/images":{"post":{"tags":["admin","product-types"],"summary":"Add Image to Product Type","description":"Upload a new image for the product type.","operationId":"upload_product_type_image_v1_admin_product_types__product_type_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_type_image_v1_admin_product_types__product_type_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/images/{image_id}":{"delete":{"tags":["admin","product-types"],"summary":"Remove Image from Product Type","description":"Remove an image from the product type.","operationId":"delete_product_type_image_v1_admin_product_types__product_type_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/categories":{"get":{"tags":["categories"],"summary":"Get all categories with optional filtering and all relationships","description":"Get all categories with all relationships loaded.","operationId":"get_categories_v1_categories_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"taxonomy_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name"}},{"name":"taxonomy_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name[Ilike]"}},{"name":"taxonomy_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version"}},{"name":"taxonomy_version[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version[Ilike]"}},{"name":"taxonomy_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description"}},{"name":"taxonomy_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description[Ilike]"}},{"name":"taxonomy_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source"}},{"name":"taxonomy_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","+taxonomy_name","name","external_id","taxonomy_name","-name","-external_id","-taxonomy_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRelationshipsAndFlatSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/tree":{"get":{"tags":["categories"],"summary":"Get categories tree","description":"Get a page of top-level categories, each with its subcategories in a tree structure.","operationId":"get_categories_tree_v1_categories_tree_get","parameters":[{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"taxonomy_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name"}},{"name":"taxonomy_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name[Ilike]"}},{"name":"taxonomy_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version"}},{"name":"taxonomy_version[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version[Ilike]"}},{"name":"taxonomy_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description"}},{"name":"taxonomy_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description[Ilike]"}},{"name":"taxonomy_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source"}},{"name":"taxonomy_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","+taxonomy_name","name","external_id","taxonomy_name","-name","-external_id","-taxonomy_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRecursiveSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/{category_id}":{"get":{"tags":["categories"],"summary":"Get Category","description":"Get category by ID with all relationships.","operationId":"get_category_v1_categories__category_id__get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryReadWithRelationshipsAndFlatSubCategories"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/{category_id}/subcategories":{"get":{"tags":["categories"],"summary":"Get category subcategories with optional filtering and all relationships","description":"Get paginated subcategories of a category with all relationships loaded.","operationId":"get_subcategories_v1_categories__category_id__subcategories_get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Category ID","title":"Category Id"},"description":"Category ID"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRelationshipsAndFlatSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/{category_id}/subcategories/tree":{"get":{"tags":["categories"],"summary":"Get category subtree","description":"Get a page of a category's subcategories in a tree structure, up to a specified depth.","operationId":"get_category_subtree_v1_categories__category_id__subcategories_tree_get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}},{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRecursiveSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies":{"get":{"tags":["taxonomies"],"summary":"Get Taxonomies","description":"Get all taxonomies with optional filtering.","operationId":"get_taxonomies_v1_taxonomies_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},{"name":"version[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+version","+source","name","version","source","-name","-version","-source"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TaxonomyRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies/{taxonomy_id}":{"get":{"tags":["taxonomies"],"summary":"Get Taxonomy","description":"Get taxonomy by ID.","operationId":"get_taxonomy_v1_taxonomies__taxonomy_id__get","parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies/{taxonomy_id}/categories/tree":{"get":{"tags":["taxonomies"],"summary":"Get the category tree of a taxonomy","description":"Get paginated top-level categories of a taxonomy with their recursive subcategory trees.","operationId":"get_taxonomy_category_tree_v1_taxonomies__taxonomy_id__categories_tree_get","parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}},{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRecursiveSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies/{taxonomy_id}/categories":{"get":{"tags":["taxonomies"],"summary":"View categories of taxonomy","description":"Get taxonomy categories with optional filtering.","operationId":"get_taxonomy_categories_v1_taxonomies__taxonomy_id__categories_get","parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials":{"get":{"tags":["materials"],"summary":"Get all materials with all relationships","description":"Get all materials with all relationships loaded.","operationId":"get_materials_v1_materials_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"density_kg_m3","in":"query","required":false,"schema":{"type":"number","title":"Density Kg M3"}},{"name":"density_kg_m3[ge]","in":"query","required":false,"schema":{"type":"number","title":"Density Kg M3[Ge]"}},{"name":"density_kg_m3[le]","in":"query","required":false,"schema":{"type":"number","title":"Density Kg M3[Le]"}},{"name":"is_crm","in":"query","required":false,"schema":{"type":"boolean","title":"Is Crm"}},{"name":"is_crm[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Crm[Eq]"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source[Ilike]"}},{"name":"category_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name"}},{"name":"category_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name[Ilike]"}},{"name":"category_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description"}},{"name":"category_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description[Ilike]"}},{"name":"category_external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id"}},{"name":"category_external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+density_kg_m3","+source","name","density_kg_m3","source","-name","-density_kg_m3","-source"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MaterialReadWithRelationships_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}":{"get":{"tags":["materials"],"summary":"Get Material","description":"Get material by ID with all relationships loaded.","operationId":"get_material_v1_materials__material_id__get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialReadWithRelationships"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}/categories":{"get":{"tags":["materials"],"summary":"View categories of material","description":"Get categories linked to a material.","operationId":"get_material_categories_v1_materials__material_id__categories_get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Get Material Categories V1 Materials Material Id Categories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}/files":{"get":{"tags":["materials"],"summary":"Get Material Files","description":"Get all files associated with a material.","operationId":"get_material_files_v1_materials__material_id__files_get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileReadWithinParent"},"title":"Response Get Material Files V1 Materials Material Id Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}/images":{"get":{"tags":["materials"],"summary":"Get Material Images","description":"Get all images associated with a material.","operationId":"get_material_images_v1_materials__material_id__images_get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImageReadWithinParent"},"title":"Response Get Material Images V1 Materials Material Id Images Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types":{"get":{"tags":["product-types"],"summary":"Get all product types with all relationships","description":"Get a list of all product types with all relationships loaded.","operationId":"get_product_types_v1_product_types_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Name[In]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"category_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name"}},{"name":"category_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name[Ilike]"}},{"name":"category_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description"}},{"name":"category_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description[Ilike]"}},{"name":"category_external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id"}},{"name":"category_external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","name","-name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ProductTypeReadWithRelationships_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}":{"get":{"tags":["product-types"],"summary":"Get product type by ID with all relationships","description":"Get a single product type by ID with all relationships loaded.","operationId":"get_product_type_v1_product_types__product_type_id__get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeReadWithRelationships"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}/categories":{"get":{"tags":["product-types"],"summary":"View categories of product type","description":"Get categories linked to a product type.","operationId":"get_product_type_categories_v1_product_types__product_type_id__categories_get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Type Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Get Product Type Categories V1 Product Types Product Type Id Categories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}/files":{"get":{"tags":["product-types"],"summary":"Get Product Type Files","description":"Get all files associated with a product type.","operationId":"get_product_type_files_v1_product_types__product_type_id__files_get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileReadWithinParent"},"title":"Response Get Product Type Files V1 Product Types Product Type Id Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}/images":{"get":{"tags":["product-types"],"summary":"Get Product Type Images","description":"Get all images associated with a product type.","operationId":"get_product_type_images_v1_product_types__product_type_id__images_get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImageReadWithinParent"},"title":"Response Get Product Type Images V1 Product Types Product Type Id Images Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/units":{"get":{"tags":["units"],"summary":"Get Units","description":"Get a list of available units.","operationId":"get_units_v1_units_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get Units V1 Units Get"}}}}},"x-audience":["public","app"]}},"/v1/users/{user_id}/products":{"get":{"tags":["products"],"summary":"Get base products collected by a user","description":"Get base products collected by a specific user.","operationId":"get_user_products_v1_users__user_id__products_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ProductRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products":{"get":{"tags":["products"],"summary":"Get all base products","description":"Get all base products. Components live under ``/products/{id}/components``.","operationId":"get_products_v1_products_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Use 'me' for the current user's products, or a username for that user's public products","title":"Owner"},"description":"Use 'me' for the current user's products, or a username for that user's public products"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ProductRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Create a new product, optionally with components","description":"Create a new product.\n\nAn optional ``Idempotency-Key`` header makes a retried request safe: replaying the same\nkey returns the original response instead of creating a second product. The key is bound to\nthis user and this request body; reusing it with a different body is a 422.","operationId":"create_product_v1_products_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreateWithComponents","description":"Product to create"},"examples":{"basic":{"value":{"name":"Office Chair","description":"Complete chair assembly","brand":"Brand 1","model":"Model 1","product_type_id":1,"weight_g":20000,"height_cm":150,"width_cm":70,"depth_cm":50,"circularity_properties":{"recyclability":"Metal frame and plastic shell can be separated with basic tools.","disassemblability":"Most fasteners are visible and non-destructive to remove."},"videos":[{"url":"https://www.youtube.com/watch?v=123456789","description":"Disassembly video"}],"bill_of_materials":[{"quantity":0.3,"unit":"g","material_id":1},{"quantity":0.1,"unit":"g","material_id":2}]},"summary":"Basic product without components"},"with_components":{"value":{"name":"Office Chair","description":"Complete chair assembly","brand":"Brand 1","model":"Model 1","product_type_id":1,"weight_g":20000,"height_cm":150,"width_cm":70,"depth_cm":50,"circularity_properties":{"recyclability":"Metal frame and plastic shell can be separated with basic tools.","disassemblability":"Most fasteners are visible and non-destructive to remove."},"videos":[{"url":"https://www.youtube.com/watch?v=123456789","description":"Disassembly video"}],"bill_of_materials":[{"quantity":0.3,"unit":"g","material_id":1},{"quantity":0.1,"unit":"g","material_id":2}],"components":[{"name":"Office Chair Seat","description":"Seat assembly","brand":"Brand 2","model":"Model 2","amount_in_parent":1,"product_type_id":2,"weight_g":5000,"height_cm":50,"width_cm":40,"depth_cm":30,"components":[{"name":"Seat Cushion","description":"Seat cushion assembly","amount_in_parent":1,"weight_g":2000,"height_cm":10,"width_cm":40,"depth_cm":30,"product_type_id":3,"bill_of_materials":[{"quantity":1.5,"unit":"g","material_id":1},{"quantity":0.5,"unit":"g","material_id":2}]}]}]},"summary":"Product with components"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRead"}}}},"409":{"description":"A request with this Idempotency-Key is already being processed."},"503":{"description":"The idempotency store is unreachable; retry later."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/export":{"get":{"tags":["products"],"summary":"Export base products matching the list filters, with their components","description":"Export every base product the product list would match, each with its whole component tree.\n\nTakes the same filters, search and sorting as ``GET /products``. CSV has one row per\nproduct or component, linked by ``parent_id``; JSON nests components as the detail read\ndoes. At most 100 base products, 5,000 components and 10 component levels: narrow the filters,\nor use the dataset release for bulk data.","operationId":"export_products_v1_products_export_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["csv","json"],"type":"string","description":"File format: 'csv' or 'json'","default":"csv","title":"Format"},"description":"File format: 'csv' or 'json'"},{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Use 'me' for the current user's products, or a username for that user's public products","title":"Owner"},"description":"Use 'me' for the current user's products, or a username for that user's public products"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductExportRead"},"title":"Response Export Products V1 Products Export Get"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"More than 100 base products match, or the export is too large (components nested more than 10 levels deep, or more than 5,000 components)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/facets":{"get":{"tags":["products"],"summary":"Get derived product facets","description":"Return derived filter values and counts for product browsing.","operationId":"get_product_facets_v1_products_facets_get","parameters":[{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["brand","model"],"type":"string"}},{"type":"null"}],"description":"Product fields to facet. Repeat the parameter for multiple fields.","title":"Fields"},"description":"Product fields to facet. Repeat the parameter for multiple fields."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductFacetValue"}},"title":"Response Get Product Facets V1 Products Facets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}":{"get":{"tags":["products"],"summary":"Get base product by ID","description":"Get a base product by ID. For components, use ``/components/{component_id}``.","operationId":"get_product_v1_products__product_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReadWithRelationshipsAndFlatComponents"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["products"],"summary":"Update base product","description":"Update an existing base product. Use ``PATCH /components/{id}`` for components.","operationId":"update_product_v1_products__product_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"if-match","in":"header","required":true,"schema":{"type":"string","description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412.","title":"If-Match"},"description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRead"}}}},"412":{"description":"The record changed since the `version` sent in `If-Match`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Delete base product","description":"Delete a base product, cascading to its components. Use ``DELETE /components/{id}`` for a component.","operationId":"delete_product_v1_products__product_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/export":{"get":{"tags":["products"],"summary":"Export one base product with its components","description":"Export one base product and its whole component tree, in the same formats as ``/products/export``.","operationId":"export_product_v1_products__product_id__export_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"format","in":"query","required":false,"schema":{"enum":["csv","json"],"type":"string","description":"File format: 'csv' or 'json'","default":"csv","title":"Format"},"description":"File format: 'csv' or 'json'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductExportRead"},"title":"Response Export Product V1 Products Product Id Export Get"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"The export is too large (components nested more than 10 levels deep, or more than 5,000 components)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/components/tree":{"get":{"tags":["products"],"summary":"Get product component subtree","description":"Get a product's component subtree as a bounded hierarchical view.\n\nA tree with more components than the cap, across all levels, is a 400. Page through\n``/components`` level by level, or use the export, for bigger products.","operationId":"get_product_subtree_v1_products__product_id__components_tree_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"},"title":"Response Get Product Subtree V1 Products Product Id Components Tree Get"}}}},"400":{"description":"More than 1,000 components at the requested depth"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/components":{"get":{"tags":["products"],"summary":"Get product components","description":"Get a page of a product's direct components.","operationId":"get_product_components_v1_products__product_id__components_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ComponentRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Create a new component under a base product","description":"Create a new component under the given base product.\n\nAn optional ``Idempotency-Key`` header makes a retried request safe: replaying the same\nkey returns the original response instead of creating a second component. The key is bound to\nthis user, this parent, and this request body; reusing it with a different body is a 422.","operationId":"add_component_to_product_v1_products__product_id__components_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"examples":{"simple":{"value":{"name":"Seat Assembly","description":"Chair seat component","amount_in_parent":1,"bill_of_materials":[{"material_id":1,"quantity":0.5,"unit":"g"}]},"summary":"Basic component","description":"Create a component without subcomponents"},"nested":{"value":{"name":"Seat Assembly","description":"Chair seat with cushion","amount_in_parent":1,"components":[{"name":"Cushion","description":"Foam cushion","amount_in_parent":1,"bill_of_materials":[{"material_id":2,"quantity":0.3,"unit":"g"}]}]},"summary":"Component with subcomponents","description":"Create a component with nested subcomponents"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"}}}},"409":{"description":"A request with this Idempotency-Key is already being processed."},"503":{"description":"The idempotency store is unreachable; retry later."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/suggestions/brands":{"get":{"tags":["products"],"summary":"Get product brand suggestions","description":"Get a paginated, searchable list of unique product brands derived from product data.","operationId":"get_brand_suggestions_v1_products_suggestions_brands_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Search brand (case-insensitive)","title":"Search"},"description":"Search brand (case-insensitive)"},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"Sort order: 'asc' or 'desc'","default":"asc","title":"Order"},"description":"Sort order: 'asc' or 'desc'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_str_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/suggestions/models":{"get":{"tags":["products"],"summary":"Get product model suggestions","description":"Get a paginated, searchable list of unique product model names derived from product data.","operationId":"get_model_suggestions_v1_products_suggestions_models_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Search model name (case-insensitive)","title":"Search"},"description":"Search model name (case-insensitive)"},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"Sort order: 'asc' or 'desc'","default":"asc","title":"Order"},"description":"Sort order: 'asc' or 'desc'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_str_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/files":{"get":{"tags":["products"],"summary":"List files attached to a base product","description":"List all files attached to a base product.","operationId":"get_product_files_v1_products__product_id__files_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_FileReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Upload a file to a base product","description":"Upload a new file for a base product.\n\nRestricted to lab accounts: research-file formats are a lab capability, so the\ndependency rejects before the multipart body is read.","operationId":"upload_product_file_v1_products__product_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_file_v1_products__product_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/files/{file_id}":{"get":{"tags":["products"],"summary":"Get a specific base-product file","description":"Get a specific file attached to a base product.","operationId":"get_product_file_v1_products__product_id__files__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove a file from a base product","description":"Remove a file from a base product.","operationId":"delete_product_file_v1_products__product_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/images":{"get":{"tags":["products"],"summary":"List images attached to a base product","description":"List all images attached to a base product.","operationId":"get_product_images_v1_products__product_id__images_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ImageReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Upload an image to a base product","description":"Upload a new image for a base product.","operationId":"upload_product_image_v1_products__product_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_image_v1_products__product_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/images/{image_id}":{"get":{"tags":["products"],"summary":"Get a specific base-product image","description":"Get a specific image attached to a base product.","operationId":"get_product_image_v1_products__product_id__images__image_id__get","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove an image from a base product","description":"Remove an image from a base product.","operationId":"delete_product_image_v1_products__product_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}":{"get":{"tags":["components"],"summary":"Get component by ID","description":"Fetch a component by its stable id.","operationId":"get_component_v1_components__component_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRelationshipsAndFlatComponents"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["components"],"summary":"Update component","description":"Update a component. Response is the lean :class:`ComponentRead` shape (no relationships).","operationId":"update_component_v1_components__component_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"if-match","in":"header","required":true,"schema":{"type":"string","description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412.","title":"If-Match"},"description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentRead"}}}},"412":{"description":"The record changed since the `version` sent in `If-Match`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Delete component","description":"Delete a component (cascades to its sub-components).","operationId":"delete_component_v1_components__component_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/components":{"post":{"tags":["components"],"summary":"Create a nested component","description":"Create a new component below an existing component.\n\nAn optional ``Idempotency-Key`` header makes a retried request safe: replaying the same\nkey returns the original response instead of creating a second component. The key is bound to\nthis user, this parent, and this request body; reusing it with a different body is a 422.","operationId":"add_component_to_component_v1_components__component_id__components_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"examples":{"simple":{"value":{"name":"Seat Assembly","description":"Chair seat component","amount_in_parent":1,"bill_of_materials":[{"material_id":1,"quantity":0.5,"unit":"g"}]},"summary":"Basic component","description":"Create a component without subcomponents"},"nested":{"value":{"name":"Seat Assembly","description":"Chair seat with cushion","amount_in_parent":1,"components":[{"name":"Cushion","description":"Foam cushion","amount_in_parent":1,"bill_of_materials":[{"material_id":2,"quantity":0.3,"unit":"g"}]}]},"summary":"Component with subcomponents","description":"Create a component with nested subcomponents"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"}}}},"409":{"description":"A request with this Idempotency-Key is already being processed."},"503":{"description":"The idempotency store is unreachable; retry later."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/files":{"get":{"tags":["components"],"summary":"List files attached to a component","description":"List all files attached to a component.","operationId":"get_component_files_v1_components__component_id__files_get","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_FileReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Upload a file to a component","description":"Upload a new file for a component.\n\nRestricted to lab accounts, like the product-level route.","operationId":"upload_component_file_v1_components__component_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_component_file_v1_components__component_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/files/{file_id}":{"get":{"tags":["components"],"summary":"Get a specific component file","description":"Get a specific file attached to a component.","operationId":"get_component_file_v1_components__component_id__files__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove a file from a component","description":"Remove a file from a component.","operationId":"delete_component_file_v1_components__component_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/images":{"get":{"tags":["components"],"summary":"List images attached to a component","description":"List all images attached to a component.","operationId":"get_component_images_v1_components__component_id__images_get","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ImageReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Upload an image to a component","description":"Upload a new image for a component.","operationId":"upload_component_image_v1_components__component_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_component_image_v1_components__component_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/images/{image_id}":{"get":{"tags":["components"],"summary":"Get a specific component image","description":"Get a specific image attached to a component.","operationId":"get_component_image_v1_components__component_id__images__image_id__get","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove an image from a component","description":"Remove an image from a component.","operationId":"delete_component_image_v1_components__component_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/materials":{"get":{"tags":["components"],"summary":"Get component bill of materials","description":"Get bill of materials for a component.","operationId":"get_component_bill_of_materials_v1_components__component_id__materials_get","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"quantity","in":"query","required":false,"schema":{"type":"number","title":"Quantity"}},{"name":"quantity[ge]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Ge]"}},{"name":"quantity[le]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Le]"}},{"name":"unit","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},{"name":"unit[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit[Ilike]"}},{"name":"material_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name"}},{"name":"material_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name[Ilike]"}},{"name":"material_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description"}},{"name":"material_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description[Ilike]"}},{"name":"material_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source"}},{"name":"material_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source[Ilike]"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Get Component Bill Of Materials V1 Components Component Id Materials Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Add multiple materials to component bill of materials","description":"Add multiple materials to a component's bill of materials.","operationId":"add_materials_to_component_v1_components__component_id__materials_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"description":"List of materials-component links to add to the component","title":"Materials"},"examples":{"multiple_materials":{"value":[{"material_id":1,"quantity":5,"unit":"g"},{"material_id":2,"quantity":10,"unit":"g"}],"summary":"Add multiple materials"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Add Materials To Component V1 Components Component Id Materials Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove multiple materials from component bill of materials","description":"Remove multiple materials from a component's bill of materials.","operationId":"remove_materials_from_component_bulk_v1_components__component_id__materials_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer","exclusiveMinimum":0},"description":"Material IDs to remove from the component","title":"Material Ids"},"examples":{"multiple_material_ids":{"value":[1,2,3],"summary":"Remove multiple material links"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/materials/{material_id}":{"get":{"tags":["components"],"summary":"Get material in component bill of materials","description":"Get a material in a component's bill of materials.","operationId":"get_material_in_component_bill_of_materials_v1_components__component_id__materials__material_id__get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Add single material to component bill of materials","description":"Add a single material to a component's bill of materials.","operationId":"add_material_to_component_v1_components__component_id__materials__material_id__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to add to the component","title":"Material Id"},"description":"ID of material to add to the component","examples":{"material_id":{"value":1,"summary":"Existing material ID"}}},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProductAndMaterial","description":"Material-component link details"},"examples":{"single_material":{"value":{"quantity":5,"unit":"g"},"summary":"Link details for one material"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["components"],"summary":"Update material in component bill of materials","description":"Update material in bill of materials for a component.","operationId":"update_component_bill_of_materials_v1_components__component_id__materials__material_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove single material from component bill of materials","description":"Remove a single material from a component's bill of materials.","operationId":"remove_material_from_component_v1_components__component_id__materials__material_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to remove from the component","title":"Material Id"},"description":"ID of material to remove from the component"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/videos":{"get":{"tags":["products"],"summary":"Get all videos for a base product","description":"Get all videos associated with a base product.\n\nVideos live only on base products (dismantling captures whole products,\nnot components). Component ids are rejected.","operationId":"get_product_videos_v1_products__product_id__videos_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},{"name":"url[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+url","+created_at","url","created_at","-url","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VideoReadWithinProduct"},"title":"Response Get Product Videos V1 Products Product Id Videos Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Create a new video for a base product","description":"Create a new video associated with a base product.","operationId":"create_product_video_v1_products__product_id__videos_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoCreateWithinProduct"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/videos/{video_id}":{"get":{"tags":["products"],"summary":"Get video by ID","description":"Get a video associated with a base product.","operationId":"get_product_video_v1_products__product_id__videos__video_id__get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Video Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["products"],"summary":"Update video by ID","description":"Update a video associated with a base product.","operationId":"update_product_video_v1_products__product_id__videos__video_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Video Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoUpdateWithinProduct"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Delete video by ID","description":"Delete a video associated with a base product.","operationId":"delete_product_video_v1_products__product_id__videos__video_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Video Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/materials":{"get":{"tags":["products"],"summary":"Get product bill of materials","description":"Get bill of materials for a base product.","operationId":"get_product_bill_of_materials_v1_products__product_id__materials_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"quantity","in":"query","required":false,"schema":{"type":"number","title":"Quantity"}},{"name":"quantity[ge]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Ge]"}},{"name":"quantity[le]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Le]"}},{"name":"unit","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},{"name":"unit[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit[Ilike]"}},{"name":"material_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name"}},{"name":"material_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name[Ilike]"}},{"name":"material_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description"}},{"name":"material_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description[Ilike]"}},{"name":"material_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source"}},{"name":"material_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source[Ilike]"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Get Product Bill Of Materials V1 Products Product Id Materials Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Add multiple materials to product bill of materials","description":"Add multiple materials to a base product's bill of materials.","operationId":"add_materials_to_product_v1_products__product_id__materials_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"description":"List of materials-product links to add to the product","title":"Materials"},"examples":{"multiple_materials":{"value":[{"material_id":1,"quantity":5,"unit":"g"},{"material_id":2,"quantity":10,"unit":"g"}],"summary":"Add multiple materials"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Add Materials To Product V1 Products Product Id Materials Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove multiple materials from product bill of materials","description":"Remove multiple materials from a base product's bill of materials.","operationId":"remove_materials_from_product_bulk_v1_products__product_id__materials_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer","exclusiveMinimum":0},"description":"Material IDs to remove from the product","title":"Material Ids"},"examples":{"multiple_material_ids":{"value":[1,2,3],"summary":"Remove multiple material links"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/materials/{material_id}":{"get":{"tags":["products"],"summary":"Get material in product bill of materials","description":"Get a material in a base product's bill of materials.","operationId":"get_material_in_product_bill_of_materials_v1_products__product_id__materials__material_id__get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Add single material to product bill of materials","description":"Add a single material to a base product's bill of materials.","operationId":"add_material_to_product_v1_products__product_id__materials__material_id__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to add to the product","title":"Material Id"},"description":"ID of material to add to the product","examples":{"material_id":{"value":1,"summary":"Existing material ID"}}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProductAndMaterial","description":"Material-product link details"},"examples":{"single_material":{"value":{"quantity":5,"unit":"g"},"summary":"Link details for one material"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["products"],"summary":"Update material in product bill of materials","description":"Update material in bill of materials for a base product.","operationId":"update_product_bill_of_materials_v1_products__product_id__materials__material_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove single material from product bill of materials","description":"Remove a single material from a base product's bill of materials.","operationId":"remove_material_from_product_v1_products__product_id__materials__material_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to remove from the product","title":"Material Id"},"description":"ID of material to remove from the product"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/bearer/login":{"post":{"tags":["auth"],"summary":"Login with email and password for bearer-token clients","description":"Authenticate a bearer client and return access and refresh tokens in JSON.","operationId":"auth_bearer_login_v1_auth_bearer_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_auth_bearer_login_v1_auth_bearer_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenResponse"},{"$ref":"#/components/schemas/MfaPendingResponse"}],"title":"Response Auth Bearer Login V1 Auth Bearer Login Post"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"429":{"description":"Too many attempts for this address or account. See the Retry-After header."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/session/login":{"post":{"tags":["auth"],"summary":"Login with email and password for browser sessions","description":"Authenticate a browser client and return MFA challenge only when MFA is enabled.","operationId":"auth_session_login_v1_auth_session_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_auth_session_login_v1_auth_session_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MfaPendingResponse"},{"type":"null"}],"title":"Response Auth Session Login V1 Auth Session Login Post"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"429":{"description":"Too many attempts for this address or account. See the Retry-After header."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/register":{"post":{"tags":["auth"],"summary":"Register a new user","description":"Register a new user, returning the same response whether or not the email is taken.","operationId":"register_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegister"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/bearer/refresh":{"post":{"tags":["auth"],"summary":"Refresh tokens for bearer-token clients","description":"Refresh access token using refresh token for bearer auth.\n\nValidates refresh token and issues new access token.","operationId":"auth_bearer_refresh_v1_auth_bearer_refresh_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/session/refresh":{"post":{"tags":["auth"],"summary":"Refresh tokens for browser sessions","description":"Refresh access token using refresh token from cookie.\n\nValidates refresh token cookie and issues new access token cookie.","operationId":"auth_session_refresh_v1_auth_session_refresh_post","parameters":[{"name":"__Host-r9lab-refresh","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":" Host-R9Lab-Refresh"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/bearer/logout":{"post":{"tags":["auth"],"summary":"Log out a bearer-token client","description":"Logout a bearer client and revoke its supplied refresh token.","operationId":"auth_bearer_logout_v1_auth_bearer_logout_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/session/logout":{"post":{"tags":["auth"],"summary":"Log out a browser session","description":"Logout a browser session, revoke refresh state, and clear browser storage.","operationId":"auth_session_logout_v1_auth_session_logout_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"__Host-r9lab-refresh","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":" Host-R9Lab-Refresh"}},{"name":"__Host-r9lab-auth","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":" Host-R9Lab-Auth"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/sessions/revoke-all":{"post":{"tags":["auth"],"summary":"Revoke every session of the current user","description":"Revoke all refresh tokens for the current user and clear browser session state.","operationId":"auth_sessions_revoke_all_v1_auth_sessions_revoke_all_post","responses":{"204":{"description":"Successful Response"}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/totp/setup":{"post":{"tags":["auth"],"summary":"Start Totp Setup","description":"Start authenticated TOTP enrollment for an account that opted into MFA.","operationId":"start_totp_setup_v1_auth_mfa_totp_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpSetupResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/totp/confirm":{"post":{"tags":["auth"],"summary":"Confirm Totp Setup","description":"Confirm TOTP enrollment, return one-time recovery codes, and replace the session.\n\nEnrolment signs out every other session. A client that authenticated with a bearer\ntoken gets new tokens in ``tokens``; a browser session gets new cookies.","operationId":"confirm_totp_setup_v1_auth_mfa_totp_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpConfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/totp/disable":{"post":{"tags":["auth"],"summary":"Disable Totp","description":"Turn off TOTP MFA after confirming the password and a current or recovery code.\n\nAccounts without a usable password (signed up with Google or GitHub) send only the code.","operationId":"disable_totp_v1_auth_mfa_totp_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpDisableRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"400":{"description":"The password or the code is missing."},"401":{"description":"MFA is not on for this account."},"403":{"description":"The password or the code is wrong."},"429":{"description":"Too many guesses for this account. See the Retry-After header."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/recovery-codes/regenerate":{"post":{"tags":["auth"],"summary":"Regenerate Recovery Codes","description":"Reissue recovery codes after confirming a current TOTP code.","operationId":"regenerate_recovery_codes_v1_auth_mfa_recovery_codes_regenerate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaRecoveryCodesRegenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaRecoveryCodesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/oauth/claim":{"post":{"tags":["auth"],"summary":"Claim Oauth Mfa Handoff","description":"Claim a one-time OAuth MFA handoff and return pending MFA state.","operationId":"claim_oauth_mfa_handoff_v1_auth_mfa_oauth_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaOAuthClaimRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaPendingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/mfa/challenge":{"post":{"tags":["auth"],"summary":"Complete Mfa Challenge","description":"Complete login for a user with TOTP already enabled.","operationId":"complete_mfa_challenge_v1_auth_mfa_challenge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaChallengeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenResponse"},{"type":"null"}],"title":"Response Complete Mfa Challenge V1 Auth Mfa Challenge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/request-verify-token":{"post":{"tags":["auth"],"summary":"Verify:Request-Token","operationId":"verify_request_token_v1_auth_request_verify_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_verify_request_token_v1_auth_request_verify_token_post"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/verify":{"post":{"tags":["auth"],"summary":"Verify:Verify","operationId":"verify_verify_v1_auth_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_verify_verify_v1_auth_verify_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"VERIFY_USER_BAD_TOKEN":{"summary":"Bad token, not existing user or not the e-mail currently set for the user.","value":{"detail":"VERIFY_USER_BAD_TOKEN"}},"VERIFY_USER_ALREADY_VERIFIED":{"summary":"The user is already verified.","value":{"detail":"VERIFY_USER_ALREADY_VERIFIED"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Reset:Forgot Password","description":"Start a forgot-password request without revealing whether the account exists.","operationId":"reset_forgot_password_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_reset_forgot_password_v1_auth_forgot_password_post"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset:Reset Password","description":"Reset a password while preserving FastAPI-Users' public error contract.","operationId":"reset_reset_password_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_reset_reset_password_v1_auth_reset_password_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"RESET_PASSWORD_BAD_TOKEN":{"summary":"Bad or expired token.","value":{"detail":"RESET_PASSWORD_BAD_TOKEN"}},"RESET_PASSWORD_INVALID_PASSWORD":{"summary":"Password validation failed.","value":{"detail":{"code":"RESET_PASSWORD_INVALID_PASSWORD","reason":"Password should be at least 3 characters"}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/validate-email":{"post":{"tags":["auth"],"summary":"Validate Email","description":"Validate email address for registration.\n\nTakes the email in a POST body (not a query param) so it doesn't land in\nproxy/uvicorn access logs, matching the pairing endpoints' approach.","operationId":"validate_email_v1_auth_validate_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailValidationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"null"}]},"type":"object","title":"Response Validate Email V1 Auth Validate Email Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/github/token/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Bearer.Authorize","operationId":"oauth_github_bearer_authorize_v1_oauth_github_token_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/github/token/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Bearer.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_github_bearer_callback_v1_oauth_github_token_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/github/session/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Cookie.Authorize","operationId":"oauth_github_cookie_authorize_v1_oauth_github_session_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/github/session/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Cookie.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_github_cookie_callback_v1_oauth_github_session_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/github/associate/authorize":{"post":{"tags":["oauth"],"summary":"Oauth-Associate:Github.Authorize","operationId":"oauth_associate_github_authorize_v1_oauth_github_associate_authorize_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/oauth/github/associate/callback":{"get":{"tags":["oauth"],"summary":"Oauth-Associate:Github.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_associate_github_callback_v1_oauth_github_associate_callback_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google/token/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Bearer.Authorize","operationId":"oauth_google_bearer_authorize_v1_oauth_google_token_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/google/token/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Bearer.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_google_bearer_callback_v1_oauth_google_token_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google/session/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Cookie.Authorize","operationId":"oauth_google_cookie_authorize_v1_oauth_google_session_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/google/session/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Cookie.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_google_cookie_callback_v1_oauth_google_session_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google/associate/authorize":{"post":{"tags":["oauth"],"summary":"Oauth-Associate:Google.Authorize","operationId":"oauth_associate_google_authorize_v1_oauth_google_associate_authorize_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/oauth/google/associate/callback":{"get":{"tags":["oauth"],"summary":"Oauth-Associate:Google.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_associate_google_callback_v1_oauth_google_associate_callback_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google-youtube/associate/authorize":{"post":{"tags":["oauth"],"summary":"Oauth-Associate:Google-Youtube.Authorize","operationId":"oauth_associate_google_youtube_authorize_v1_oauth_google_youtube_associate_authorize_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/oauth/google-youtube/associate/callback":{"get":{"tags":["oauth"],"summary":"Oauth-Associate:Google-Youtube.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_associate_google_youtube_callback_v1_oauth_google_youtube_associate_callback_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/{provider}/associate":{"delete":{"tags":["oauth"],"summary":"Remove Oauth Association","description":"Remove a linked OAuth account (password and MFA step-up where the account has them).","operationId":"remove_oauth_association_v1_oauth__provider__associate_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/users/me":{"get":{"tags":["users"],"summary":"Users:Current User","operationId":"users_current_user_v1_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"401":{"description":"Missing token or inactive user."}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]},"delete":{"tags":["users"],"summary":"Delete your own account","description":"Delete the signed-in account, keeping its products under the anonymous system account.\n\nPersonal data is erased; contributed products and media stay on the platform without\nthe owner's name. Requires the current password, the same step-up as an email or\npassword change, and a current MFA code when the account has MFA enabled. An account\nwith neither must have signed in within the last few minutes. The former address gets\na notification email.","operationId":"delete_own_account_v1_users_me_delete","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"204":{"description":"Successful Response"},"400":{"description":"The current password or MFA code is missing."},"403":{"description":"The current password or MFA code is invalid, or the account needs a fresh sign-in."},"409":{"description":"This account cannot be deleted (the last active superuser)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]},"patch":{"tags":["users"],"summary":"Users:Patch Current User","operationId":"users_patch_current_user_v1_users_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"401":{"description":"Missing token or inactive user."},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"UPDATE_USER_EMAIL_ALREADY_EXISTS":{"summary":"A user with this email already exists.","value":{"detail":"UPDATE_USER_EMAIL_ALREADY_EXISTS"}},"UPDATE_USER_INVALID_PASSWORD":{"summary":"Password validation failed.","value":{"detail":{"code":"UPDATE_USER_INVALID_PASSWORD","reason":"Password should beat least 3 characters"}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/users/me/accept-terms":{"post":{"tags":["users"],"summary":"Accept the current contributor terms","description":"Record that this account accepted the contributor terms.\n\nThe route takes no body: the server stamps ``CURRENT_TERMS_VERSION``, so a client\ncannot claim a grant under terms it was never shown. An acceptance already past the\ncurrent version is kept.\n\nWrites through the user database: the account was loaded by the auth session, not\n``AsyncSessionDep``, so committing on the latter would persist nothing.","operationId":"accept_terms_v1_users_me_accept_terms_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/admin/users":{"get":{"tags":["admin"],"summary":"View all users","description":"Get a list of all users with optional filtering.","operationId":"get_users_v1_admin_users_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},{"name":"email[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email[Ilike]"}},{"name":"username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"}},{"name":"username[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username[Ilike]"}},{"name":"is_active","in":"query","required":false,"schema":{"type":"boolean","title":"Is Active"}},{"name":"is_active[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Active[Eq]"}},{"name":"is_superuser","in":"query","required":false,"schema":{"type":"boolean","title":"Is Superuser"}},{"name":"is_superuser[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Superuser[Eq]"}},{"name":"is_verified","in":"query","required":false,"schema":{"type":"boolean","title":"Is Verified"}},{"name":"is_verified[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Verified[Eq]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+email","+username","email","username","-email","-username"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"List of users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_UserRead_"},"examples":{"basic":{"value":[{"id":"12345678-cc4e-405c-8553-7806424de2a1","username":"alice","email":"alice@example.com","is_active":true,"is_superuser":false,"is_verified":true}],"summary":"Users without relationships"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/users/{user_id}":{"get":{"tags":["admin"],"summary":"View a single user by ID","description":"Get a user by ID.","operationId":"get_user_v1_admin_users__user_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"patch":{"tags":["admin"],"summary":"Update a user by ID","description":"Update a user by ID without requiring the target account's password.\n\n`safe=False` lets an administrator change fields the self-service route\nreauthenticates for; UserManager skips the current-password gate on this path.","operationId":"update_user_v1_admin_users__user_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin"],"summary":"Delete a user by ID","description":"Delete a user by ID, anonymizing or deleting the content they own.","operationId":"delete_user_v1_admin_users__user_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"},{"name":"content","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ErasureContent","description":"What to do with the research data this user contributed: `anonymize` reassigns their products to the anonymous system account, `delete` removes the products and their media. Personal data is erased either way.","default":"anonymize"},"description":"What to do with the research data this user contributed: `anonymize` reassigns their products to the anonymous system account, `delete` removes the products and their media. Personal data is erased either way."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/users/{user_id}/mfa/reset":{"post":{"tags":["admin"],"summary":"Reset a user's MFA enrollment","description":"Reset TOTP MFA after an administrator performs identity-proofed recovery.","operationId":"reset_user_mfa_v1_admin_users__user_id__mfa_reset_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/users/{user_id}/role":{"put":{"tags":["admin"],"summary":"Set a user's contributor tier","description":"Set a user's role.\n\nA dedicated route rather than a field on `UserUpdate`: fastapi-users' safe\nupdate path excludes a fixed set of privileged fields, so anything new added\nto that schema would flow straight through self-service `PATCH /users/me`.\nKeeping role off the schema entirely makes that escalation unrepresentable.\n\nWrites through the user database rather than `AsyncSessionDep`: the target\nuser is loaded by the auth session, which is a separate dependency, so a\ncommit on the common session would persist nothing.","operationId":"set_user_role_v1_admin_users__user_id__role_put","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/profiles/{username}":{"get":{"tags":["profiles"],"summary":"Get public profile of a user","description":"Get public profile statistics for a specified user by username.\n\nReturns 404 if the user is not found or if the profile is marked as private (and you are not the user).\nRecomputes stats on the fly when no snapshot exists yet, without persisting the result.","operationId":"get_public_profile_v1_profiles__username__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProfileView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras":{"get":{"tags":["r9cam-management"],"summary":"Get Raspberry Pi cameras of the current user","description":"Get all Raspberry Pi cameras of the current user.","operationId":"get_user_cameras_v1_plugins_r9cam_cameras_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"include_status","in":"query","required":false,"schema":{"type":"boolean","description":"Include camera online status","default":false,"title":"Include Status"},"description":"Include camera online status","examples":{"disabled":{"value":false,"summary":"Return camera metadata only"},"enabled":{"value":true,"summary":"Include current online status"}}},{"name":"include_telemetry","in":"query","required":false,"schema":{"type":"boolean","description":"Include the last-known telemetry snapshot from the Redis cache. Implies ``include_status=true``. No relay round-trips; cameras without cached telemetry come back with ``telemetry: null``.","default":false,"title":"Include Telemetry"},"description":"Include the last-known telemetry snapshot from the Redis cache. Implies ``include_status=true``. No relay round-trips; cameras without cached telemetry come back with ``telemetry: null``."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+created_at","name","created_at","-name","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CameraRead"}},{"type":"array","items":{"$ref":"#/components/schemas/CameraReadWithStatus"}}],"title":"Response Get User Cameras V1 Plugins R9Cam Cameras Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["r9cam-management"],"summary":"Register new Raspberry Pi camera","description":"Register a new Raspberry Pi camera.\n\nThe normal user flow is /plugins/r9cam/pairing/claim. This endpoint is\nkept as a structured API surface for tests/admin automation and still\nrequires a public device key.","operationId":"register_user_camera_v1_plugins_r9cam_cameras_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}":{"get":{"tags":["r9cam-management"],"summary":"Get Raspberry Pi camera by ID","description":"Get single Raspberry Pi camera by ID, if owned by the current user.","operationId":"get_user_camera_v1_plugins_r9cam_cameras__camera_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}},{"name":"include_status","in":"query","required":false,"schema":{"type":"boolean","description":"Include camera online status","default":false,"title":"Include Status"},"description":"Include camera online status","examples":{"disabled":{"value":false,"summary":"Return camera metadata only"},"enabled":{"value":true,"summary":"Include current online status"}}},{"name":"include_telemetry","in":"query","required":false,"schema":{"type":"boolean","description":"Include last-known telemetry from the Redis cache. Implies ``include_status=true``.","default":false,"title":"Include Telemetry"},"description":"Include last-known telemetry from the Redis cache. Implies ``include_status=true``."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CameraRead"},{"$ref":"#/components/schemas/CameraReadWithStatus"}],"title":"Response Get User Camera V1 Plugins R9Cam Cameras Camera Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["r9cam-management"],"summary":"Update Raspberry Pi camera","description":"Update Raspberry Pi camera.","operationId":"update_user_camera_v1_plugins_r9cam_cameras__camera_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["r9cam-management"],"summary":"Delete Raspberry Pi camera","description":"Delete Raspberry Pi camera.","operationId":"delete_user_camera_v1_plugins_r9cam_cameras__camera_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/preview-thumbnail":{"get":{"tags":["r9cam-management"],"summary":"Get a camera's cached preview thumbnail","description":"Serve the owner's cached preview thumbnail.\n\nOwner-checked (``UserOwnedCameraDep`` 404s for non-owners) and served off the\nprivate preview directory rather than the public ``/uploads/images`` mount, so\na camera id alone no longer grants a stranger a recent frame. Cached only\nprivately and revalidated, never long-lived immutable like the public mount.","operationId":"get_camera_preview_thumbnail_v1_plugins_r9cam_cameras__camera_id__preview_thumbnail_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response"},"404":{"description":"No cached preview thumbnail available for this camera."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/status":{"get":{"tags":["r9cam-management"],"summary":"Get Raspberry Pi camera online status","description":"Get Raspberry Pi camera online status.","operationId":"get_user_camera_status_v1_plugins_r9cam_cameras__camera_id__status_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/local-access":{"get":{"tags":["r9cam-management"],"summary":"Get local direct-connection info for a camera","description":"Relays GET /system/local-access to the Pi via the WebSocket connection. Returns the local API key and candidate IP addresses so the frontend can auto-configure Ethernet/USB-C direct access without manual key copying. Returns 503 when the camera is offline.","operationId":"get_camera_local_access_v1_plugins_r9cam_cameras__camera_id__local_access_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalAccessInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/captures":{"post":{"tags":["r9cam-interaction"],"summary":"Capture a still image with a remote Raspberry Pi Camera","description":"Capture a still image with a remote Raspberry Pi Camera and store it in the file storage. Send optional parent type and ID in the request body to associate the image with another object.","operationId":"capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/recording-stream":{"get":{"tags":["r9cam-interaction"],"summary":"Get the active YouTube recording stream status","description":"Fetch the current remote camera stream status from the Raspberry Pi camera plugin.","operationId":"get_camera_stream_status_v1_plugins_r9cam_cameras__camera_id__recording_stream_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["r9cam-interaction"],"summary":"Start recording to YouTube","description":"Start a YouTube recording stream.","operationId":"start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["r9cam-interaction"],"summary":"Stop recording to YouTube","description":"Stop the active YouTube recording and return its video record.","operationId":"stop_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/recording-stream/monitor":{"get":{"tags":["r9cam-interaction"],"summary":"Get YouTube livestream monitor stream","description":"Get the YouTube monitor stream for the active backend-owned recording session.","operationId":"get_recording_monitor_stream_v1_plugins_r9cam_cameras__camera_id__recording_stream_monitor_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeMonitorStreamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/telemetry":{"get":{"tags":["r9cam-interaction"],"summary":"Get a camera's latest telemetry snapshot","description":"Return the most recent telemetry snapshot for the camera. Backed by a Redis cache with a 120s TTL so mosaic polling does not fan out one relay round-trip per camera on every refresh. Pass ``force_refresh=true`` to bypass the cache and re-fetch from the Pi.","operationId":"get_camera_telemetry_v1_plugins_r9cam_cameras__camera_id__telemetry_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}},{"name":"force_refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetrySnapshot"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/hls/{hls_path}":{"get":{"tags":["r9cam-interaction"],"summary":"Proxy LL-HLS playlists and segments from the camera's MediaMTX","description":"Forward an LL-HLS request to the camera over its WebSocket relay. Playlist requests return ``application/vnd.apple.mpegurl`` text; segment/part requests return binary ``video/mp4`` or ``video/iso.segment``. The frontend simply points ``hls.js`` / ``expo-video`` at this URL and the player walks the manifest on its own.","operationId":"proxy_hls_v1_plugins_r9cam_cameras__camera_id__hls__hls_path__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}},{"name":"hls_path","in":"path","required":true,"schema":{"type":"string","title":"Hls Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/device/cameras/{camera_id}/self":{"delete":{"tags":["r9cam-device"],"summary":"Pi-initiated self-unpair","description":"Called by the Pi when the user triggers unpair from the local /setup page. Authenticates via the device's ES256 assertion. Deletes the camera from the database so the backend no longer shows it as offline.","operationId":"self_unpair_camera_v1_plugins_r9cam_device_cameras__camera_id__self_delete","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/device/cameras/{camera_id}/image-upload":{"post":{"tags":["r9cam-device"],"summary":"Internal: receive an image pushed directly from a paired Raspberry Pi","description":"Called by the Pi after a successful capture. Authenticated with a short-lived ES256 device assertion (same credential used by the WebSocket relay). The Pi provides the JPEG body plus two JSON blobs: `capture_metadata` (libcamera metadata) and `upload_metadata` (opaque dict forwarded by whichever caller triggered the capture, typically `{product_id, description}`). The backend stores the image via the normal image storage service and returns a tiny ack envelope the Pi consumes.","operationId":"receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceImageUploadAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/device/cameras/{camera_id}/preview-thumbnail-upload":{"post":{"tags":["r9cam-device"],"summary":"Internal: receive a cached preview thumbnail pushed directly from a paired Raspberry Pi","description":"Called by the Pi's background thumbnail worker. Authenticated with the same short-lived ES256 device assertion used by the WebSocket relay. Stores a deterministic per-camera JPEG cache file for camera-card previews without creating an Image database row.","operationId":"receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePreviewThumbnailAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/pairing/claim":{"post":{"tags":["RPi Camera Pairing"],"summary":"Claim a pairing code and create a camera (called by user)","description":"Claim a pairing code and create a WebSocket-relayed camera.\n\nThe pending record is consumed atomically (GETDEL) so two concurrent claims\nof the same code cannot both succeed: only the winner observes the pending\nrecord and goes on to create the camera. The loser sees a missing key and\ngets the same invalid-code error as an unknown code.","operationId":"claim_pairing_code_v1_plugins_r9cam_pairing_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingClaimRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/plugins/r9cam/pairing/register":{"post":{"tags":["RPi Camera Pairing"],"summary":"Register a pairing code (called by RPi)","description":"Register a short-lived pairing code and the camera's public device key.","operationId":"register_pairing_code_v1_plugins_r9cam_pairing_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingRegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/pairing/poll":{"post":{"tags":["RPi Camera Pairing"],"summary":"Poll pairing status (called by RPi)","description":"Poll for pairing completion. Returns non-secret relay metadata once claimed.\n\nTakes the code and fingerprint in a POST body (not query params) so the\nclaim credential never reaches proxy/uvicorn access logs.","operationId":"poll_pairing_status_v1_plugins_r9cam_pairing_poll_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingPollRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingPollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/admin/plugins/r9cam/cameras":{"get":{"tags":["admin"],"summary":"Get all Raspberry Pi cameras","description":"Get all Raspberry Pi cameras.","operationId":"get_all_cameras_v1_admin_plugins_r9cam_cameras_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"owner_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"}},{"name":"owner_email[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email[Ilike]"}},{"name":"owner_username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"}},{"name":"owner_username[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+created_at","+owner_email","+owner_username","name","created_at","owner_email","owner_username","-name","-created_at","-owner_email","-owner_username"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CameraRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/plugins/r9cam/cameras/{camera_id}":{"get":{"tags":["admin"],"summary":"Get Raspberry Pi camera by ID","description":"Get single Raspberry Pi camera by ID.","operationId":"get_camera_v1_admin_plugins_r9cam_cameras__camera_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin"],"summary":"Delete Raspberry Pi camera","description":"Delete Raspberry Pi camera.","operationId":"delete_camera_v1_admin_plugins_r9cam_cameras__camera_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/plugins/r9cam/cameras/{camera_id}/status":{"get":{"tags":["admin"],"summary":"Get Raspberry Pi camera online status","description":"Get Raspberry Pi camera online status.","operationId":"get_camera_status_v1_admin_plugins_r9cam_cameras__camera_id__status_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/stats/totals":{"get":{"tags":["stats"],"summary":"Get Stats Totals","description":"System-wide all-time aggregate statistics.","operationId":"get_stats_totals_v1_stats_totals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotalsResponse"}}}}},"x-audience":["public","app"]}},"/v1/stats/categories":{"get":{"tags":["stats"],"summary":"Get Stats Categories","description":"Product categories ordered by count, capped at limit (max 100).\n\n`scope` selects what is counted: `products` (top-level products only, the\ndefault), `components` (categorised by the component's own type), or `all`.","operationId":"get_stats_categories_v1_stats_categories_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"scope","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CategoryScope","default":"products"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/stats/series":{"get":{"tags":["stats"],"summary":"Get Stats Series","description":"Time-bucketed activity series. Granularity: day | week | month | year.","operationId":"get_stats_series_v1_stats_series_get","parameters":[{"name":"granularity","in":"query","required":false,"schema":{"enum":["day","week","month","year"],"type":"string","default":"month","title":"Granularity"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}}},"components":{"schemas":{"Body_auth_bearer_login_v1_auth_bearer_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_auth_bearer_login_v1_auth_bearer_login_post"},"Body_auth_session_login_v1_auth_session_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_auth_session_login_v1_auth_session_login_post"},"Body_capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post":{"properties":{"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id","description":"ID of product to associate the image with"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Custom description for the image"}},"type":"object","required":["product_id"],"title":"Body_capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post"},"Body_receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Captured JPEG"},"capture_metadata":{"type":"string","title":"Capture Metadata","description":"libcamera capture metadata as a JSON string"},"upload_metadata":{"type":"string","title":"Upload Metadata","description":"Parent association metadata as a JSON string"}},"type":"object","required":["file","capture_metadata","upload_metadata"],"title":"Body_receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post"},"Body_receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Cached preview JPEG thumbnail"}},"type":"object","required":["file"],"title":"Body_receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post"},"Body_reset_forgot_password_v1_auth_forgot_password_post":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"Body_reset_forgot_password_v1_auth_forgot_password_post"},"Body_reset_reset_password_v1_auth_reset_password_post":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","title":"Password"}},"type":"object","required":["token","password"],"title":"Body_reset_reset_password_v1_auth_reset_password_post"},"Body_start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post":{"properties":{"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id","description":"ID of product to associate the video with"},"title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Title","description":"Custom video title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Custom description for the video"},"privacy_status":{"$ref":"#/components/schemas/YouTubePrivacyStatus","description":"Privacy status for the YouTube video","default":"private"}},"type":"object","required":["product_id"],"title":"Body_start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post"},"Body_upload_component_file_v1_components__component_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_component_file_v1_components__component_id__files_post"},"Body_upload_component_image_v1_components__component_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_component_image_v1_components__component_id__images_post"},"Body_upload_material_file_v1_admin_materials__material_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_material_file_v1_admin_materials__material_id__files_post"},"Body_upload_material_image_v1_admin_materials__material_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_material_image_v1_admin_materials__material_id__images_post"},"Body_upload_product_file_v1_products__product_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_product_file_v1_products__product_id__files_post"},"Body_upload_product_image_v1_products__product_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_product_image_v1_products__product_id__images_post"},"Body_upload_product_type_file_v1_admin_product_types__product_type_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_product_type_file_v1_admin_product_types__product_type_id__files_post"},"Body_upload_product_type_image_v1_admin_product_types__product_type_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_product_type_image_v1_admin_product_types__product_type_id__images_post"},"Body_verify_request_token_v1_auth_request_verify_token_post":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"Body_verify_request_token_v1_auth_request_verify_token_post"},"Body_verify_verify_v1_auth_verify_post":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"Body_verify_verify_v1_auth_verify_post"},"CacheNamespace":{"type":"string","enum":["reference-data","stats"],"title":"CacheNamespace","description":"Cache namespace identifiers for different application areas."},"CameraConnectionStatus":{"type":"string","enum":["online","offline","unauthorized","forbidden","error"],"title":"CameraConnectionStatus","description":"Camera connection status."},"CameraCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"relay_public_key_jwk":{"$ref":"#/components/schemas/RelayPublicKeyJWK"},"relay_key_id":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]+$","title":"Relay Key Id"}},"additionalProperties":false,"type":"object","required":["name","relay_public_key_jwk","relay_key_id"],"title":"CameraCreate","description":"Schema for creating a WebSocket-relayed camera.","examples":[{"description":"Ceiling-mounted camera above the teardown bench","name":"Workbench Camera","relay_key_id":"cam-key-1","relay_public_key_jwk":{"crv":"P-256","kid":"cam-key-1","kty":"EC","x":"axfR8uEsQkf4vOblY6RA8ncDfYEt6zOg9KE5RdiYwpY","y":"T-NC4v4af5uO5-tKfA-eFivOM1drMV7Oy7ZAaDe_UfU"}}]},"CameraCredentialStatus":{"type":"string","enum":["active","revoked"],"title":"CameraCredentialStatus","description":"Status of the camera's relay device credential."},"CameraMode":{"type":"string","enum":["photo","video"],"title":"CameraMode","description":"Camera use mode. Contains camera configuration for each mode."},"CameraProperties":{"properties":{"Model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"unit_cell_size":{"anyOf":[{"prefixItems":[{"type":"integer","exclusiveMinimum":0.0},{"type":"integer","exclusiveMinimum":0.0}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Unit Cell Size","description":"Sensor unit cell size in nanometers"},"pixel_array_size":{"anyOf":[{"prefixItems":[{"type":"integer","exclusiveMinimum":0.0},{"type":"integer","exclusiveMinimum":0.0}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Pixel Array Size"},"sensor_sensitivity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sensor Sensitivity"}},"type":"object","title":"CameraProperties","description":"Static camera properties from libcamera.\n\nFor more info, see https://github.com/raspberrypi/libcamera/blob/main/src/libcamera/property_ids_core.yaml."},"CameraRead":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"owner_id":{"type":"string","format":"uuid4","title":"Owner Id"},"relay_key_id":{"type":"string","title":"Relay Key Id"},"relay_credential_status":{"$ref":"#/components/schemas/CameraCredentialStatus"}},"type":"object","required":["name","id","owner_id","relay_key_id","relay_credential_status"],"title":"CameraRead","description":"Basic Camera Read schema.","examples":[{"created_at":"2026-04-28T10:00:00Z","description":"Ceiling-mounted camera above the teardown bench","id":"12345678-cc4e-405c-8553-7806424de2a1","name":"Workbench Camera","owner_id":"87654321-cc4e-405c-8553-7806424de2a1","relay_credential_status":"active","relay_key_id":"cam-key-1","updated_at":"2026-04-28T10:00:00Z"}]},"CameraReadWithStatus":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"owner_id":{"type":"string","format":"uuid4","title":"Owner Id"},"relay_key_id":{"type":"string","title":"Relay Key Id"},"relay_credential_status":{"$ref":"#/components/schemas/CameraCredentialStatus"},"status":{"$ref":"#/components/schemas/CameraStatus"},"telemetry":{"anyOf":[{"$ref":"#/components/schemas/TelemetrySnapshot"},{"type":"null"}]},"preview_thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Thumbnail Url"}},"type":"object","required":["name","id","owner_id","relay_key_id","relay_credential_status","status"],"title":"CameraReadWithStatus","description":"Schema for camera read with online status.","examples":[{"created_at":"2026-04-28T10:00:00Z","description":"Ceiling-mounted camera above the teardown bench","id":"12345678-cc4e-405c-8553-7806424de2a1","name":"Workbench Camera","owner_id":"87654321-cc4e-405c-8553-7806424de2a1","relay_credential_status":"active","relay_key_id":"cam-key-1","updated_at":"2026-04-28T10:00:00Z"}]},"CameraStatus":{"properties":{"connection":{"$ref":"#/components/schemas/CameraConnectionStatus"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"details":{"anyOf":[{"$ref":"#/components/schemas/CameraStatusView"},{"type":"null"}]}},"type":"object","required":["connection"],"title":"CameraStatus","description":"Camera connection status and details."},"CameraStatusView":{"properties":{"current_mode":{"anyOf":[{"$ref":"#/components/schemas/CameraMode"},{"type":"null"}]},"stream":{"anyOf":[{"$ref":"#/components/schemas/StreamView"},{"type":"null"}]}},"type":"object","title":"CameraStatusView","description":"API response model for camera status."},"CameraUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"relay_public_key_jwk":{"anyOf":[{"$ref":"#/components/schemas/RelayPublicKeyJWK"},{"type":"null"}]},"relay_key_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]+$"},{"type":"null"}],"title":"Relay Key Id"},"relay_credential_status":{"anyOf":[{"$ref":"#/components/schemas/CameraCredentialStatus"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"CameraUpdate","description":"Schema for updating a camera.","examples":[{"description":"Camera assigned to the repairability bench"}]},"CaptureMetadata":{"properties":{"exposure_time":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Exposure Time","description":"Exposure time in microseconds"},"frame_duration":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Frame Duration","description":"Frame duration in microseconds"},"color_temperature":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Color Temperature","description":"Color temperature in K"},"analogue_gain":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Analogue Gain"},"digital_gain":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Digital Gain"},"lux":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Lux","description":"Illuminance in lux"},"sensor_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sensor Temperature","description":"Sensor temperature in \u00b0C"}},"type":"object","title":"CaptureMetadata","description":"Dynamic capture metadata from libcamera.\n\nFor more info, see https://github.com/raspberrypi/libcamera/blob/main/src/libcamera/control_ids_core.yaml."},"CategoriesResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"limit":{"type":"integer","title":"Limit"},"scope":{"$ref":"#/components/schemas/CategoryScope"},"categories":{"items":{"$ref":"#/components/schemas/CategoryStat"},"type":"array","title":"Categories"}},"type":"object","required":["generated_at","limit","scope","categories"],"title":"CategoriesResponse","description":"Response payload for the top-categories endpoint."},"CategoryCreate":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"taxonomy_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Taxonomy Id"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryCreate"},"type":"array","title":"Subcategories","description":"List of subcategories to create under this category"}},"additionalProperties":false,"type":"object","required":["name"],"title":"CategoryCreate","description":"Schema for creating a category, optionally with nested subcategories.\n\n- ``taxonomy_id`` is required for root categories and ignored when\n ``supercategory_id`` is provided (the parent's taxonomy is inherited).\n- ``supercategory_id`` is optional; when set the new category becomes a\n nested category under that parent."},"CategoryRead":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"taxonomy_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Taxonomy Id","description":"ID of the taxonomy"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"}},"type":"object","required":["name","id","taxonomy_id"],"title":"CategoryRead","description":"Schema for reading flat category information.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","supercategory_id":1,"taxonomy_id":1}]},"CategoryReadAsSubCategory":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","id"],"title":"CategoryReadAsSubCategory","description":"Schema for reading subcategory information.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals"}]},"CategoryReadAsSubCategoryWithRecursiveSubCategories":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryReadAsSubCategoryWithRecursiveSubCategories"},"type":"array","title":"Subcategories","description":"List of subcategories"}},"type":"object","required":["name","id"],"title":"CategoryReadAsSubCategoryWithRecursiveSubCategories","description":"Schema for reading category information with recursive subcategories.","examples":[{"description":"All kinds of metals","id":1,"name":"Metals","subcategories":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","subcategories":[{"description":"Steel alloys","id":3,"name":"Steel"}]}]}]},"CategoryReadWithRecursiveSubCategories":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"taxonomy_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Taxonomy Id","description":"ID of the taxonomy"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryReadAsSubCategoryWithRecursiveSubCategories"},"type":"array","title":"Subcategories","description":"List of subcategories"}},"type":"object","required":["name","id","taxonomy_id"],"title":"CategoryReadWithRecursiveSubCategories","description":"Schema for reading base category information with recursive subcategories.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","supercategory_id":1,"taxonomy_id":1}]},"CategoryReadWithRelationshipsAndFlatSubCategories":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"taxonomy_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Taxonomy Id","description":"ID of the taxonomy"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"},"materials":{"items":{"$ref":"#/components/schemas/MaterialRead"},"type":"array","title":"Materials","description":"List of materials linked to the category"},"product_types":{"items":{"$ref":"#/components/schemas/ProductTypeRead"},"type":"array","title":"Product Types","description":"List of product types linked to the category"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryReadAsSubCategory"},"type":"array","title":"Subcategories","description":"List of subcategories"}},"type":"object","required":["name","id","taxonomy_id"],"title":"CategoryReadWithRelationshipsAndFlatSubCategories","description":"Schema for reading category information with flat (one level deep) subcategories.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","supercategory_id":1,"taxonomy_id":1}]},"CategoryScope":{"type":"string","enum":["products","components","all"],"title":"CategoryScope","description":"Which population a category breakdown counts.\n\nA product's category is its own ``product_type``, and every product carries\none -- including components. A laptop torn down into a PCB and a screw\ncontributes one product to \"Laptop\" and one component each to \"PCB\" and\n\"Screw\"; it contributes nothing to \"Laptop\" from its components. So the\npopulation being categorised has to be chosen explicitly:\n\n- ``PRODUCTS``: top-level products only (``parent_id IS NULL``) -- the\n things that were torn down.\n- ``COMPONENTS``: components only (``parent_id IS NOT NULL``) -- the parts\n extracted from them, categorised by the part's own type.\n- ``ALL``: both, categorised the same way."},"CategoryStat":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["name","count"],"title":"CategoryStat","description":"Count of products in a single category, within the requested scope."},"CategoryUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"}},"additionalProperties":false,"type":"object","title":"CategoryUpdate","description":"Schema for the partial update of a category.\n\nUpdating the parent_id or taxonomy_id is not allowed, as it greatly increases the risk\nfor self-referential loops and other inconsistencies.","examples":[{"description":"All kinds of metals","name":"Metals"}]},"CircularityPropertiesFields":{"properties":{"recyclability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Recyclability"},"disassemblability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Disassemblability"},"remanufacturability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Remanufacturability"}},"additionalProperties":false,"type":"object","title":"CircularityPropertiesFields","description":"Circularity note fields read from a product JSON object."},"CircularityPropertiesInputFields":{"properties":{"recyclability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Recyclability"},"disassemblability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Disassemblability"},"remanufacturability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Remanufacturability"}},"additionalProperties":false,"type":"object","title":"CircularityPropertiesInputFields","description":"Write-side circularity note fields with user-text validation."},"ComponentCreateWithComponents":{"properties":{"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesInputFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"type":"array","maxItems":100,"title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"amount_in_parent":{"type":"integer","maximum":1000.0,"exclusiveMinimum":0.0,"title":"Amount In Parent","description":"Quantity within parent product. Required for component products."},"components":{"items":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"type":"array","maxItems":100,"title":"Components","description":"Set of component products"}},"additionalProperties":false,"type":"object","required":["name","amount_in_parent"],"title":"ComponentCreateWithComponents","description":"Schema for creating a component with optional sub-components.\n\nThis schema is used for recursive creation of components with sub-components.\n\nOwner ID and parent ID are inferred from the parent product within the CRUD layer."},"ComponentExportRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"components":{"items":{"$ref":"#/components/schemas/ComponentExportRead"},"type":"array","title":"Components","description":"List of sub-components"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentExportRead","description":"Component in a product export: the detail read plus every sub-component."},"ComponentRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentRead","description":"Read schema for components (nested inside a base product tree)."},"ComponentReadWithRecursiveComponents":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"components":{"items":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"},"type":"array","title":"Components","description":"List of component products"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentReadWithRecursiveComponents","description":"Component read schema with recursive sub-components."},"ComponentReadWithRelationshipsAndFlatComponents":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"components":{"items":{"$ref":"#/components/schemas/ComponentRead"},"type":"array","title":"Components","description":"List of sub-components"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentReadWithRelationshipsAndFlatComponents","description":"Component detail schema with one level of child components."},"DeviceImageUploadAck":{"properties":{"image_id":{"type":"string","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9._~-]+$","title":"Image Id","description":"Stored backend image ID."},"image_url":{"type":"string","maxLength":2048,"minLength":1,"pattern":"^(https?://[^\\s]+|/([^\\s/][^\\s]*)?)$","title":"Image Url","description":"Backend-hosted URL for the stored image"}},"additionalProperties":false,"type":"object","required":["image_id","image_url"],"title":"DeviceImageUploadAck","description":"Backend -> Pi acknowledgement of a direct image upload."},"DevicePreviewThumbnailAck":{"properties":{"preview_thumbnail_url":{"type":"string","maxLength":2048,"minLength":1,"pattern":"^(https?://[^\\s]+|/([^\\s/][^\\s]*)?)$","title":"Preview Thumbnail Url","description":"Backend-hosted URL for the cached preview thumbnail"}},"additionalProperties":false,"type":"object","required":["preview_thumbnail_url"],"title":"DevicePreviewThumbnailAck","description":"Backend -> Pi acknowledgement of a cached preview-thumbnail upload."},"DevicePublicKeyJWK":{"properties":{"kty":{"type":"string","pattern":"^EC$","title":"Kty"},"crv":{"type":"string","pattern":"^P-256$","title":"Crv"},"x":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"X"},"y":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"Y"},"use":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Use"},"kid":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Kid"}},"additionalProperties":false,"type":"object","required":["kty","crv","x","y"],"title":"DevicePublicKeyJWK","description":"Public P-256 JWK registered by the Pi during pairing."},"EmailValidationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"EmailValidationRequest","description":"Body for the pre-registration email validation check."},"ErasureContent":{"type":"string","enum":["anonymize","delete"]},"ErrorModel":{"properties":{"detail":{"anyOf":[{"type":"string"},{"additionalProperties":{"type":"string"},"type":"object"}],"title":"Detail"}},"type":"object","required":["detail"],"title":"ErrorModel"},"FileRead":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id","description":"ID of the parent object"},"parent_type":{"$ref":"#/components/schemas/MediaParentType","description":"Type of the parent object, e.g. product, product_type, material"}},"type":"object","required":["id","filename","parent_id","parent_type"],"title":"FileRead","description":"Schema for reading file information.","examples":[{"description":"Assembly manual PDF","file_url":"/uploads/files/manuals/manual.pdf","filename":"manual.pdf","id":"12345678-cc4e-405c-8553-7806424de2a1"}]},"FileReadWithinParent":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"}},"type":"object","required":["id","filename"],"title":"FileReadWithinParent","description":"Schema for reading file information within a parent object.","examples":[{"description":"Assembly manual PDF","file_url":"/uploads/files/manuals/manual.pdf","filename":"manual.pdf","id":"12345678-cc4e-405c-8553-7806424de2a1"}]},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HttpUrlToDB":{"type":"string","maxLength":250,"minLength":1,"format":"uri"},"ImageRead":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Image Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"width_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width Px","description":"Pixel width of the stored image, after any EXIF rotation. Null for images uploaded before dimensions were recorded whose file could not be measured since, which includes every remotely stored (S3) one. With `height_px` this gives the aspect ratio every entry in `thumbnail_urls` shares, so a client can reserve layout space before the image loads and derive each derivative's height from its width."},"height_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height Px","description":"Pixel height of the stored image, after rotation."},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"parent_type":{"$ref":"#/components/schemas/MediaParentType","description":"Type of the parent object, e.g. product, product_type, material"}},"type":"object","required":["id","filename","parent_id","parent_type"],"title":"ImageRead","description":"Schema for reading image information.","examples":[{"description":"Front view of the product","filename":"front-view.webp","id":"12345678-cc4e-405c-8553-7806424de2a1","image_metadata":{"camera_make":"Raspberry Pi","orientation":"landscape"},"image_url":"/uploads/images/products/front-view.webp","thumbnail_url":"/uploads/images/products/front-view_thumb_200.webp"}]},"ImageReadWithinParent":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Image Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"width_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width Px","description":"Pixel width of the stored image, after any EXIF rotation. Null for images uploaded before dimensions were recorded whose file could not be measured since, which includes every remotely stored (S3) one. With `height_px` this gives the aspect ratio every entry in `thumbnail_urls` shares, so a client can reserve layout space before the image loads and derive each derivative's height from its width."},"height_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height Px","description":"Pixel height of the stored image, after rotation."},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."}},"type":"object","required":["id","filename"],"title":"ImageReadWithinParent","description":"Schema for reading image information within a parent object.","examples":[{"description":"Front view of the product","filename":"front-view.webp","id":"12345678-cc4e-405c-8553-7806424de2a1","image_metadata":{"camera_make":"Raspberry Pi","orientation":"landscape"},"image_url":"/uploads/images/products/front-view.webp","thumbnail_url":"/uploads/images/products/front-view_thumb_200.webp"}]},"Links":{"properties":{"first":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First","examples":["/api/v1/users?limit=1&offset1"]},"last":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last","examples":["/api/v1/users?limit=1&offset1"]},"self":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Self","examples":["/api/v1/users?limit=1&offset1"]},"next":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next","examples":["/api/v1/users?limit=1&offset1"]},"prev":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev","examples":["/api/v1/users?limit=1&offset1"]}},"type":"object","title":"Links"},"LocalAccessInfo":{"properties":{"local_api_key":{"type":"string","maxLength":256,"minLength":8,"title":"Local Api Key"},"candidate_urls":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","maxItems":16,"minItems":1,"title":"Candidate Urls"},"mdns_name":{"anyOf":[{"type":"string","maxLength":253,"pattern":"^[A-Za-z0-9.-]+$"},{"type":"null"}],"title":"Mdns Name"}},"additionalProperties":false,"type":"object","required":["local_api_key","candidate_urls"],"title":"LocalAccessInfo","description":"Plugin -> backend -> frontend local direct-connection bootstrap payload."},"MaterialCreateWithCategories":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3"},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm"},"category_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Category Ids","description":"List of category IDs"}},"additionalProperties":false,"type":"object","required":["name"],"title":"MaterialCreateWithCategories","description":"Schema for creating a material with links to existing categories."},"MaterialProductLinkCreateWithinProduct":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"},"material_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Material Id","description":"ID of the material in the product"}},"additionalProperties":false,"type":"object","required":["quantity","material_id"],"title":"MaterialProductLinkCreateWithinProduct","description":"Schema for creating material-product links from the product side."},"MaterialProductLinkCreateWithinProductAndMaterial":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"}},"additionalProperties":false,"type":"object","required":["quantity"],"title":"MaterialProductLinkCreateWithinProductAndMaterial","description":"Schema for creating material-product links with an external material ID."},"MaterialProductLinkReadWithinMaterial":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id"},"product":{"$ref":"#/components/schemas/ProductSummary"}},"type":"object","required":["quantity","product_id","product"],"title":"MaterialProductLinkReadWithinMaterial","description":"Schema for reading material-product links from the material side."},"MaterialProductLinkReadWithinProduct":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"material_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Material Id"},"material":{"$ref":"#/components/schemas/MaterialRead"}},"type":"object","required":["quantity","material_id","material"],"title":"MaterialProductLinkReadWithinProduct","description":"Schema for reading material-product links from the product side."},"MaterialProductLinkUpdate":{"properties":{"quantity":{"anyOf":[{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Quantity"},"unit":{"anyOf":[{"$ref":"#/components/schemas/Unit"},{"type":"null"}],"default":"kg"}},"additionalProperties":false,"type":"object","title":"MaterialProductLinkUpdate","description":"Schema for updating material-product links."},"MaterialRead":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Material"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Material"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source","description":"Source of the material data, e.g. URL, IRI or citation key"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3","description":"Volumetric density (kg/m^3)"},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm","description":"Is this material a Critical Raw Material (CRM)?"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","id"],"title":"MaterialRead","description":"Schema for reading material information."},"MaterialReadWithRelationships":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Material"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Material"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source","description":"Source of the material data, e.g. URL, IRI or citation key"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3","description":"Volumetric density (kg/m^3)"},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm","description":"Is this material a Critical Raw Material (CRM)?"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"categories":{"items":{"$ref":"#/components/schemas/CategoryRead"},"type":"array","title":"Categories","description":"List of categories linked to the material"},"product_links":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinMaterial"},"type":"array","title":"Product Links","description":"List of products that have this material"},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"List of images for the material"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"List of files for the material"}},"type":"object","required":["name","id"],"title":"MaterialReadWithRelationships","description":"Schema for reading material information with all relationships."},"MaterialUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"source":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Source","description":"Source of the material data, e.g. URL, IRI or citation key"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3","description":"Volumetric density (kg/m\u00b3) "},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm","description":"Is this material a Critical Raw Material (CRM)?"}},"additionalProperties":false,"type":"object","title":"MaterialUpdate","description":"Schema for a partial update of a material."},"MediaParentType":{"type":"string","enum":["product","product_type","material"],"title":"MediaParentType","description":"Parent entity types that can own files and images."},"MfaChallengeRequest":{"properties":{"mfa_token":{"type":"string","format":"password","title":"Mfa Token","writeOnly":true},"code":{"type":"string","maxLength":20,"minLength":6,"title":"Code"}},"additionalProperties":false,"type":"object","required":["mfa_token","code"],"title":"MfaChallengeRequest","description":"Request to complete MFA with either a TOTP code or a recovery code."},"MfaOAuthClaimRequest":{"properties":{"mfa_handoff":{"type":"string","format":"password","title":"Mfa Handoff","writeOnly":true}},"additionalProperties":false,"type":"object","required":["mfa_handoff"],"title":"MfaOAuthClaimRequest","description":"Request to claim an OAuth MFA handoff."},"MfaPendingResponse":{"properties":{"mfa_required":{"type":"boolean","title":"Mfa Required","default":true},"mfa_token":{"type":"string","title":"Mfa Token","description":"Short-lived token for completing an MFA challenge"}},"type":"object","required":["mfa_token"],"title":"MfaPendingResponse","description":"Response returned after the first authentication factor succeeds."},"MfaRecoveryCodesRegenerateRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"title":"Code"}},"additionalProperties":false,"type":"object","required":["code"],"title":"MfaRecoveryCodesRegenerateRequest","description":"Request to reissue recovery codes, confirmed with a current TOTP code."},"MfaRecoveryCodesResponse":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes"}},"type":"object","required":["recovery_codes"],"title":"MfaRecoveryCodesResponse","description":"One-time delivery of freshly generated recovery codes."},"MfaTotpConfirmRequest":{"properties":{"setup_token":{"type":"string","format":"password","title":"Setup Token","writeOnly":true},"code":{"type":"string","maxLength":6,"minLength":6,"title":"Code"},"password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Password","description":"Current account password, to reauthenticate the change. Required unless the account has no usable password (OAuth-only)."}},"additionalProperties":false,"type":"object","required":["setup_token","code"],"title":"MfaTotpConfirmRequest","description":"Request to confirm authenticated TOTP setup."},"MfaTotpConfirmResponse":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes"},"tokens":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenResponse"},{"type":"null"}],"description":"New bearer tokens; null for browser sessions, which get new cookies instead"}},"type":"object","required":["recovery_codes"],"title":"MfaTotpConfirmResponse","description":"Recovery codes plus the session that replaces the ones enrolment revoked."},"MfaTotpDisableRequest":{"properties":{"code":{"type":"string","maxLength":20,"minLength":6,"title":"Code"},"password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Password","description":"Current account password, to reauthenticate the change. Required unless the account has no usable password (OAuth-only)."}},"additionalProperties":false,"type":"object","required":["code"],"title":"MfaTotpDisableRequest","description":"Request to turn off TOTP MFA, confirmed with the password and a current or recovery code."},"MfaTotpSetupResponse":{"properties":{"setup_token":{"type":"string","title":"Setup Token"},"secret":{"type":"string","title":"Secret"},"otpauth_uri":{"type":"string","title":"Otpauth Uri"}},"type":"object","required":["setup_token","secret","otpauth_uri"],"title":"MfaTotpSetupResponse","description":"TOTP setup material for authenticator apps."},"OAuth2AuthorizeResponse":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"OAuth2AuthorizeResponse","description":"Response model for OAuth2 authorization endpoint."},"OAuthAccountRead":{"properties":{"oauth_name":{"type":"string","title":"Oauth Name"},"account_id":{"type":"string","title":"Account Id"},"account_email":{"type":"string","title":"Account Email"}},"type":"object","required":["oauth_name","account_id","account_email"],"title":"OAuthAccountRead","description":"Read schema for OAuth accounts."},"Page_CameraRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CameraRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CameraRead]"},"Page_CategoryReadWithRecursiveSubCategories_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CategoryReadWithRecursiveSubCategories"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CategoryReadWithRecursiveSubCategories]"},"Page_CategoryReadWithRelationshipsAndFlatSubCategories_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CategoryReadWithRelationshipsAndFlatSubCategories"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CategoryReadWithRelationshipsAndFlatSubCategories]"},"Page_CategoryRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CategoryRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CategoryRead]"},"Page_MaterialReadWithRelationships_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MaterialReadWithRelationships"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[MaterialReadWithRelationships]"},"Page_ProductTypeReadWithRelationships_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductTypeReadWithRelationships"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[ProductTypeReadWithRelationships]"},"Page_TaxonomyRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaxonomyRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[TaxonomyRead]"},"Page_TypeVar_Customized_ComponentRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ComponentRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[ComponentRead]"},"Page_TypeVar_Customized_FileReadWithinParent_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FileReadWithinParent"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[FileReadWithinParent]"},"Page_TypeVar_Customized_ImageReadWithinParent_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ImageReadWithinParent"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[ImageReadWithinParent]"},"Page_TypeVar_Customized_ProductRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[ProductRead]"},"Page_TypeVar_Customized_str_":{"properties":{"items":{"items":{"type":"string"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[str]"},"Page_UserRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[UserRead]"},"PairingClaimRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"Pairing code displayed on the RPi's setup page."},"camera_name":{"type":"string","maxLength":100,"minLength":2,"title":"Camera Name","description":"Name for the new camera."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"type":"object","required":["code","camera_name"],"title":"PairingClaimRequest","description":"User -> backend: claim a pairing code and create a camera."},"PairingPollRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"Pairing code generated by the Pi."},"fingerprint":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]{8,64}$","title":"Fingerprint","description":"Random device fingerprint nonce chosen at registration."}},"type":"object","required":["code","fingerprint"],"title":"PairingPollRequest","description":"Pi -> backend: poll pairing status.\n\nSent as a POST body (not query params) so the pairing code and device\nfingerprint never land in reverse-proxy or uvicorn access logs."},"PairingPollResponse":{"properties":{"status":{"type":"string","enum":["waiting","paired"],"title":"Status"},"camera_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9._~-]+$"},{"type":"null"}],"title":"Camera Id"},"ws_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Ws Url"},"auth_scheme":{"anyOf":[{"$ref":"#/components/schemas/RelayAuthScheme"},{"type":"null"}]},"key_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9._~-]+$"},{"type":"null"}],"title":"Key Id"}},"additionalProperties":false,"type":"object","required":["status"],"title":"PairingPollResponse","description":"Backend -> Pi current pairing state."},"PairingRegisterRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"6-character uppercase pairing code generated by the Pi."},"rpi_fingerprint":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]{8,64}$","title":"Rpi Fingerprint","description":"Random nonce generated by the Pi. Required to retrieve credentials later."},"public_key_jwk":{"$ref":"#/components/schemas/DevicePublicKeyJWK","description":"Public P-256 JWK generated by the Pi."},"key_id":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]+$","title":"Key Id"}},"additionalProperties":false,"type":"object","required":["code","rpi_fingerprint","public_key_jwk","key_id"],"title":"PairingRegisterRequest","description":"Pi -> backend pairing registration payload."},"PairingRegisterResponse":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"6-character uppercase pairing code generated by the Pi."},"expires_in":{"type":"integer","maximum":600.0,"exclusiveMinimum":0.0,"title":"Expires In","description":"Seconds until the pairing code expires."}},"additionalProperties":false,"type":"object","required":["code","expires_in"],"title":"PairingRegisterResponse","description":"Backend -> Pi acknowledgement of a pairing registration."},"ProductCreateWithComponents":{"properties":{"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesInputFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"type":"array","maxItems":100,"title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"videos":{"items":{"$ref":"#/components/schemas/VideoCreateWithinProduct"},"type":"array","maxItems":5,"title":"Videos","description":"Disassembly videos"},"components":{"items":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"type":"array","maxItems":100,"title":"Components","description":"Set of component products"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ProductCreateWithComponents","description":"Schema for creating a base product with optional components.","examples":[{"bill_of_materials":[{"material_id":1,"quantity":0.3,"unit":"g"},{"material_id":2,"quantity":0.1,"unit":"g"}],"brand":"Brand 1","circularity_properties":{"disassemblability":"Most fasteners are visible and non-destructive to remove.","recyclability":"Metal frame and plastic shell can be separated with basic tools."},"depth_cm":50,"description":"Complete chair assembly","height_cm":150,"model":"Model 1","name":"Office Chair","product_type_id":1,"videos":[{"description":"Disassembly video","url":"https://www.youtube.com/watch?v=123456789"}],"weight_g":20000,"width_cm":70}]},"ProductExportRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"videos":{"items":{"$ref":"#/components/schemas/VideoReadWithinProduct"},"type":"array","title":"Videos","description":"Disassembly videos"},"components":{"items":{"$ref":"#/components/schemas/ComponentExportRead"},"type":"array","title":"Components","description":"List of component products"}},"type":"object","required":["name","id"],"title":"ProductExportRead","description":"Base product in a product export: the detail read plus its whole component tree."},"ProductFacetValue":{"properties":{"value":{"type":"string","title":"Value"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["value","count"],"title":"ProductFacetValue","description":"One derived product facet option and its result count."},"ProductRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"}},"type":"object","required":["name","id"],"title":"ProductRead","description":"Read schema for base products (top of a product tree)."},"ProductReadWithRelationshipsAndFlatComponents":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"videos":{"items":{"$ref":"#/components/schemas/VideoReadWithinProduct"},"type":"array","title":"Videos","description":"Disassembly videos"},"components":{"items":{"$ref":"#/components/schemas/ComponentRead"},"type":"array","title":"Components","description":"List of component products"}},"type":"object","required":["name","id"],"title":"ProductReadWithRelationshipsAndFlatComponents","description":"Base-product detail schema with one level of child components."},"ProductSummary":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"ProductSummary","description":"Minimal product summary for embedding in unrelated contexts (e.g. material links).\n\nDeliberately narrower than ``ProductRead``: no owner, physical/circularity\nproperties, or other detail-view fields since no consumer needs them here.\nExtend with more fields only when an actual caller needs them."},"ProductTypeCreateWithCategories":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"category_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Category Ids"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ProductTypeCreateWithCategories","description":"Schema for creating a product type with links to existing categories."},"ProductTypeRead":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Product Type."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Product Type."},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","id"],"title":"ProductTypeRead","description":"Schema for reading flat product type information."},"ProductTypeReadWithRelationships":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Product Type."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Product Type."},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"categories":{"items":{"$ref":"#/components/schemas/CategoryRead"},"type":"array","title":"Categories"},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files"}},"type":"object","required":["name","id"],"title":"ProductTypeReadWithRelationships","description":"Schema for reading product type information with all relationships."},"ProductTypeUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"additionalProperties":false,"type":"object","title":"ProductTypeUpdate","description":"Schema for a partial update of a product type."},"ProductUpdate":{"properties":{"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesInputFields"},{"type":"null"}]},"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"amount_in_parent":{"anyOf":[{"type":"integer","maximum":1000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount In Parent","description":"Quantity within parent product. Required for component products."},"weight_g":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Depth Cm"}},"additionalProperties":false,"type":"object","title":"ProductUpdate","description":"Schema for updating product information including physical and circularity properties."},"ProfileVisibility":{"type":"string","enum":["public","community","private"],"title":"ProfileVisibility","description":"Discrete values stored on ``User.preferences[\"profile_visibility\"]``."},"PublicProfileView":{"properties":{"username":{"type":"string","pattern":"^[a-z0-9_]+$","title":"Username"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"product_count":{"type":"integer","title":"Product Count","description":"Number of products registered.","default":0},"total_weight_kg":{"type":"number","title":"Total Weight Kg","description":"Aggregate weight of products in kg.","default":0.0},"image_count":{"type":"integer","title":"Image Count","description":"Total images uploaded.","default":0},"top_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Category","description":"Most common product type."}},"type":"object","required":["username","created_at"],"title":"PublicProfileView","description":"Detailed public profile view with aggregated stats."},"RefreshTokenRequest":{"properties":{"refresh_token":{"type":"string","format":"password","title":"Refresh Token","description":"Refresh token obtained from login","writeOnly":true}},"additionalProperties":false,"type":"object","required":["refresh_token"],"title":"RefreshTokenRequest","description":"Request schema for refreshing access token.","examples":[{"refresh_token":"refresh-token-from-login"}]},"RefreshTokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token","description":"New JWT access token"},"refresh_token":{"type":"string","title":"Refresh Token","description":"Rotated refresh token"},"token_type":{"type":"string","title":"Token Type","description":"Token type (always 'bearer')","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","description":"Access token expiration time in seconds"}},"type":"object","required":["access_token","refresh_token","expires_in"],"title":"RefreshTokenResponse","description":"Response for token refresh.","examples":[{"access_token":"new-jwt-access-token","expires_in":3600,"refresh_token":"rotated-refresh-token","token_type":"bearer"}]},"RegistrationResponse":{"properties":{"detail":{"type":"string","title":"Detail","default":"If the email address is available, a verification link has been sent. Please check your inbox."}},"type":"object","title":"RegistrationResponse","description":"Uniform registration acknowledgement.\n\nDeliberately reveals nothing about whether the email already exists; the same\nbody is returned whether a new account was created or the address was already\ntaken, so registration cannot be used to enumerate accounts."},"RelayAuthScheme":{"type":"string","enum":["device_assertion"],"title":"RelayAuthScheme","description":"Authentication schemes understood by the device seam."},"RelayPublicKeyJWK":{"properties":{"kty":{"type":"string","pattern":"^EC$","title":"Kty"},"crv":{"type":"string","pattern":"^P-256$","title":"Crv"},"x":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"X"},"y":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"Y"},"use":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Use"},"kid":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Kid"}},"additionalProperties":false,"type":"object","required":["kty","crv","x","y"],"title":"RelayPublicKeyJWK","description":"Public P-256 JWK registered by an RPi camera."},"SeriesPoint":{"properties":{"period":{"type":"string","title":"Period"},"teardowns":{"type":"integer","title":"Teardowns"},"parts":{"type":"integer","title":"Parts"},"mass_kg":{"type":"number","title":"Mass Kg"},"images":{"type":"integer","title":"Images"},"users_new":{"type":"integer","title":"Users New"},"users_active":{"type":"integer","title":"Users Active"}},"type":"object","required":["period","teardowns","parts","mass_kg","images","users_new","users_active"],"title":"SeriesPoint","description":"Aggregated metrics for one period of a time series."},"SeriesResponse":{"properties":{"granularity":{"type":"string","title":"Granularity"},"start":{"type":"string","format":"date","title":"Start"},"end":{"type":"string","format":"date","title":"End"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"series":{"items":{"$ref":"#/components/schemas/SeriesPoint"},"type":"array","title":"Series"}},"type":"object","required":["granularity","start","end","generated_at","series"],"title":"SeriesResponse","description":"Response payload for the time-series endpoint."},"StepUpRequest":{"properties":{"current_password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Current Password","description":"Current account password, to reauthenticate the change. Required unless the account has no usable password (OAuth-only)."},"mfa_code":{"anyOf":[{"type":"string","maxLength":20,"minLength":6},{"type":"null"}],"title":"Mfa Code","description":"Current authenticator code or a recovery code. Required when the account has MFA enabled."}},"additionalProperties":false,"type":"object","title":"StepUpRequest","description":"Optional step-up body for a sensitive account change (social login link or unlink, account deletion).\n\nOptional because an OAuth-only account has no usable password to re-assert, and an\naccount without MFA has no code; the server decides which the account needs."},"StreamMetadata":{"properties":{"camera_properties":{"$ref":"#/components/schemas/CameraProperties"},"capture_metadata":{"$ref":"#/components/schemas/CaptureMetadata"},"fps":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Fps","description":"Frames per second calculated from frame duration.","readOnly":true}},"type":"object","required":["camera_properties","capture_metadata","fps"],"title":"StreamMetadata","description":"Metadata specific to video streams."},"StreamMode":{"type":"string","enum":["youtube"],"title":"StreamMode","description":"Active stream provider/mode."},"StreamView":{"properties":{"mode":{"$ref":"#/components/schemas/StreamMode"},"provider":{"type":"string","title":"Provider","description":"Stream provider identifier"},"url":{"type":"string","minLength":1,"format":"uri","title":"Url"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"metadata":{"$ref":"#/components/schemas/StreamMetadata"}},"type":"object","required":["mode","provider","url","started_at","metadata"],"title":"StreamView","description":"Provider-neutral public model for active stream information."},"TaxonomyCreateWithCategories":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"version":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"domains":{"items":{"$ref":"#/components/schemas/TaxonomyDomain"},"type":"array","uniqueItems":true,"title":"Domains","default":[]},"source":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Source"},"categories":{"items":{"$ref":"#/components/schemas/CategoryCreate"},"type":"array","title":"Categories","description":"Categories to create in this taxonomy"}},"additionalProperties":false,"type":"object","required":["name"],"title":"TaxonomyCreateWithCategories","description":"Schema for creating a new taxonomy, optionally with new categories."},"TaxonomyDomain":{"type":"string","enum":["materials","products","other"],"title":"TaxonomyDomain","description":"Enumeration of taxonomy domains."},"TaxonomyRead":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"version":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"domains":{"items":{"$ref":"#/components/schemas/TaxonomyDomain"},"type":"array","uniqueItems":true,"title":"Domains","description":"Domains of the taxonomy, e.g. {materials, products, other}"},"source":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Source","description":"Source of the taxonomy data, e.g. URL, IRI or citation key"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","version","domains","id"],"title":"TaxonomyRead","description":"Schema for reading minimal taxonomy information.","examples":[{"description":"Taxonomy for materials","domains":["materials"],"name":"Materials Taxonomy","source":"DOI:10.2345/12345"}]},"TaxonomyUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":50,"minLength":2},{"type":"null"}],"title":"Name"},"version":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"domains":{"anyOf":[{"items":{"$ref":"#/components/schemas/TaxonomyDomain"},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Domains","description":"Domains of the taxonomy, e.g. {materials, products, other}"},"source":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Source","description":"Source of the taxonomy data"}},"additionalProperties":false,"type":"object","title":"TaxonomyUpdate","description":"Schema for the partial update of a taxonomy."},"TelemetrySnapshot":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When this snapshot was collected."},"cpu_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Temp C","description":"CPU die temperature in Celsius; None if the sysfs reading is unavailable."},"cpu_percent":{"type":"number","title":"Cpu Percent","description":"CPU utilisation as a percentage (0-100)."},"mem_percent":{"type":"number","title":"Mem Percent","description":"Memory utilisation as a percentage (0-100)."},"disk_percent":{"type":"number","title":"Disk Percent","description":"Disk utilisation on the images volume as a percentage (0-100)."},"preview_fps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Preview Fps","description":"Observed preview encoder frame rate, or None if no preview pipeline is active."},"preview_sessions":{"type":"integer","title":"Preview Sessions","description":"Number of active LL-HLS preview subscribers on the local MediaMTX instance.","default":0},"thermal_state":{"$ref":"#/components/schemas/ThermalState","description":"Thermal governor classification for this snapshot."},"current_preview_size":{"anyOf":[{"prefixItems":[{"type":"integer"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Current Preview Size","description":"Current lores-stream size (width, height); None when no preview pipeline is configured."}},"type":"object","required":["timestamp","cpu_percent","mem_percent","disk_percent","thermal_state"],"title":"TelemetrySnapshot","description":"Point-in-time device health sample emitted by the Pi plugin."},"ThemeMode":{"type":"string","enum":["light","dark","auto"],"title":"ThemeMode","description":"Supported app theme modes."},"ThermalState":{"type":"string","enum":["normal","warm","throttle","critical"],"title":"ThermalState","description":"Coarse thermal classification used by the thermal governor."},"Totals":{"properties":{"teardowns":{"type":"integer","title":"Teardowns"},"parts":{"type":"integer","title":"Parts"},"mass_kg":{"type":"number","title":"Mass Kg"},"images":{"type":"integer","title":"Images"},"users":{"type":"integer","title":"Users"}},"type":"object","required":["teardowns","parts","mass_kg","images","users"],"title":"Totals","description":"System-wide cumulative counts across all data."},"TotalsResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"totals":{"$ref":"#/components/schemas/Totals"}},"type":"object","required":["generated_at","totals"],"title":"TotalsResponse","description":"Response payload for the totals endpoint."},"Unit":{"type":"string","enum":["kg","g","m","cm"],"title":"Unit","description":"Allowed units in the data collection."},"UserPreferences":{"properties":{"email_updates_enabled":{"type":"boolean","title":"Email Updates Enabled","default":false},"profile_visibility":{"$ref":"#/components/schemas/ProfileVisibility","default":"public"},"theme_mode":{"$ref":"#/components/schemas/ThemeMode","default":"auto"},"products_welcome_dismissed":{"type":"boolean","title":"Products Welcome Dismissed","default":false},"rpi_camera_enabled":{"type":"boolean","title":"Rpi Camera Enabled","default":false},"youtube_streaming_enabled":{"type":"boolean","title":"Youtube Streaming Enabled","default":false}},"additionalProperties":false,"type":"object","title":"UserPreferences","description":"Typed user preferences persisted as JSONB."},"UserPreferencesUpdate":{"properties":{"email_updates_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Updates Enabled"},"profile_visibility":{"anyOf":[{"$ref":"#/components/schemas/ProfileVisibility"},{"type":"null"}]},"theme_mode":{"anyOf":[{"$ref":"#/components/schemas/ThemeMode"},{"type":"null"}]},"products_welcome_dismissed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Products Welcome Dismissed"},"rpi_camera_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rpi Camera Enabled"},"youtube_streaming_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Youtube Streaming Enabled"}},"additionalProperties":false,"type":"object","title":"UserPreferencesUpdate","description":"Patch model for user preferences updates."},"UserRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_superuser":{"type":"boolean","title":"Is Superuser","default":false},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"oauth_accounts":{"items":{"$ref":"#/components/schemas/OAuthAccountRead"},"type":"array","title":"Oauth Accounts","description":"List of linked OAuth accounts."},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","description":"Whether TOTP MFA is enabled for this account.","default":false},"has_usable_password":{"type":"boolean","title":"Has Usable Password","description":"Whether the account has a user-set password (false for OAuth-only accounts). Clients use it to decide whether unlinking a social login needs a password.","default":true},"preferences":{"$ref":"#/components/schemas/UserPreferences","description":"User preferences."},"terms_accepted_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Terms Accepted Version","description":"Version of the contributor terms this account accepted at signup, or null if it predates acceptance tracking. Recorded by the server; not client-settable."},"terms_accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Terms Accepted At","description":"When the contributor terms were accepted. Recorded by the server; not client-settable."},"terms_acceptance_required":{"type":"boolean","title":"Terms Acceptance Required","description":"Whether this account should be prompted to accept the contributor terms. True when it has never accepted, or accepted a version older than the one that grants the publication licence a dataset release needs.","default":false},"role":{"$ref":"#/components/schemas/UserRole","description":"Contributor tier. `lab` accounts may upload non-image research files and carry a larger upload quota. Set by an administrator; not client-settable.","default":"contributor"},"upload_quota_files":{"type":"integer","title":"Upload Quota Files","description":"Maximum number of files and images this account's role allows.","default":0},"upload_quota_bytes":{"type":"integer","title":"Upload Quota Bytes","description":"Maximum total upload size this account's role allows.","default":0},"image_upload_max_bytes":{"type":"integer","title":"Image Upload Max Bytes","description":"Largest single image this account may upload.","default":0},"image_upload_max_pixels":{"type":"integer","title":"Image Upload Max Pixels","description":"Most pixels (width x height) in a single image this account may upload.","default":0},"upload_file_count":{"type":"integer","title":"Upload File Count","description":"Files and images this account currently has stored.","default":0},"upload_total_bytes":{"type":"integer","title":"Upload Total Bytes","description":"Total bytes this account currently has stored.","default":0}},"type":"object","required":["id","email"],"title":"UserRead","description":"Read schema for users.","examples":[{"email":"user@example.com","id":"1fa85f64-5717-4562-b3fc-2c963f66afa6","is_active":true,"is_superuser":false,"is_verified":true,"username":"username"}]},"UserRegister":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":12,"format":"password","title":"Password"},"username":{"type":"string","maxLength":50,"minLength":2,"title":"Username"}},"additionalProperties":false,"type":"object","required":["email","password","username"],"title":"UserRegister","description":"Registration schema for password sign-up.","examples":[{"email":"user@example.com","password":"fake_password","username":"username"}]},"UserRole":{"type":"string","enum":["contributor","lab"],"title":"UserRole","description":"Ordered contributor tiers. Compare with :func:`role_rank`, not ``<``."},"UserRoleUpdate":{"properties":{"role":{"$ref":"#/components/schemas/UserRole","description":"The contributor tier to assign."}},"additionalProperties":false,"type":"object","required":["role"],"title":"UserRoleUpdate","description":"Administrator request to set one account's contributor tier."},"UserUpdate":{"properties":{"password":{"anyOf":[{"type":"string","minLength":12},{"type":"null"}],"format":"password","title":"Password"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"username":{"anyOf":[{"type":"string","maxLength":50,"minLength":2},{"type":"null"}],"title":"Username"},"current_password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"format":"password","title":"Current Password","description":"Current password required when changing email or password."},"mfa_code":{"anyOf":[{"type":"string","maxLength":20,"minLength":6},{"type":"null"}],"title":"Mfa Code","description":"Current authenticator code or a recovery code. Required to change email or password when the account has MFA enabled."},"preferences":{"anyOf":[{"$ref":"#/components/schemas/UserPreferencesUpdate"},{"type":"null"}],"description":"User preferences (partial merge)."}},"additionalProperties":false,"type":"object","title":"UserUpdate","description":"Update schema for users.","examples":[{"email":"user@example.com","password":"newpassword","username":"username"}]},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VideoCreateWithinProduct":{"properties":{"url":{"$ref":"#/components/schemas/HttpUrlToDB"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata"}},"additionalProperties":false,"type":"object","required":["url"],"title":"VideoCreateWithinProduct","description":"Schema for creating a video.","examples":[{"description":"Recorded teardown of the product","title":"Full disassembly","url":"https://www.youtube.com/watch?v=abcdefghijk","video_metadata":{"duration_seconds":420,"source":"youtube"}}]},"VideoRead":{"properties":{"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id"}},"type":"object","required":["url","id","product_id"],"title":"VideoRead","description":"Schema for reading video information."},"VideoReadWithinProduct":{"properties":{"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["url","id"],"title":"VideoReadWithinProduct","description":"Schema for reading video information within a product.","examples":[{"description":"Recorded teardown of the product","id":1,"title":"Full disassembly","url":"https://www.youtube.com/watch?v=abcdefghijk","video_metadata":{"duration_seconds":420,"source":"youtube"}}]},"VideoUpdateWithinProduct":{"properties":{"url":{"anyOf":[{"$ref":"#/components/schemas/HttpUrlToDB"},{"type":"null"}],"description":"URL linking to the video"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title","description":"Title of the video"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the video"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata","description":"Video metadata as a JSON dict"}},"additionalProperties":false,"type":"object","title":"VideoUpdateWithinProduct","description":"Schema for updating a video within a product.","examples":[{"description":"Shortened version for publication","title":"Updated disassembly title","video_metadata":{"edited":true}}]},"YouTubeMonitorStreamResponse":{"properties":{"enableMonitorStream":{"type":"boolean","title":"Enablemonitorstream"},"broadcastStreamDelayMs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Broadcaststreamdelayms"},"embedHtml":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedhtml"}},"type":"object","required":["enableMonitorStream"],"title":"YouTubeMonitorStreamResponse","description":"Subset of monitor stream fields used by the app."},"YouTubePrivacyStatus":{"type":"string","enum":["public","private","unlisted"],"title":"YouTubePrivacyStatus","description":"Enumeration of YouTube privacy statuses."}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/v1/auth/bearer/login"}}},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"__Host-r9lab-auth"}}},"x-tagGroups":[{"name":"Auth","tags":["auth","users"]},{"name":"Reference Data","tags":["categories","taxonomies","materials","product-types"]},{"name":"Data Collection","tags":["products"]},{"name":"Plugins","tags":["r9cam-management","r9cam-interaction"]},{"name":"Admin","tags":["admin"]}]} +{"openapi":"3.1.0","info":{"title":"R9lab \u2013 Data Collection API","description":"Data collection app for the R9lab project at the Institute of Environmental Sciences (CML), Leiden University.\n\n**Licensing.** This API specification is licensed Apache-2.0 so that anyone may write clients, importers, or integrations against it without inheriting the platform's copyleft. The R9lab platform software itself remains AGPL-3.0-or-later, and curated dataset releases are licensed CC BY 4.0.","license":{"name":"Apache-2.0","identifier":"Apache-2.0"},"version":"1.0.0","x-api-version":"1.0.0","x-api-major":"v1","x-deprecation-policy":"Breaking changes are documented in release notes."},"paths":{"/v1/admin/cache/clear/{namespace}":{"post":{"tags":["admin"],"summary":"Clear cache by namespace","description":"Clear cached responses for a specific namespace.","operationId":"clear_cache_by_namespace_v1_admin_cache_clear__namespace__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CacheNamespace","description":"Cache namespace to clear"},"description":"Cache namespace to clear"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Clear Cache By Namespace V1 Admin Cache Clear Namespace Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/categories":{"post":{"tags":["admin","categories"],"summary":"Create a new category","description":"Create a category.\n\n``taxonomy_id`` is required for root categories and is inherited from the\nparent when ``supercategory_id`` is supplied.","operationId":"create_category_v1_admin_categories_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/categories/{category_id}":{"patch":{"tags":["admin","categories"],"summary":"Update category","description":"Update an existing category.","operationId":"update_category_v1_admin_categories__category_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","categories"],"summary":"Delete category","description":"Delete a category by ID, including its subcategories.","operationId":"delete_category_v1_admin_categories__category_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/taxonomies":{"post":{"tags":["admin","taxonomies"],"summary":"Create a new taxonomy","description":"Create a new taxonomy, optionally with categories.","operationId":"create_taxonomy_endpoint_v1_admin_taxonomies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyCreateWithCategories"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/taxonomies/{taxonomy_id}":{"patch":{"tags":["admin","taxonomies"],"summary":"Update taxonomy","description":"Update an existing taxonomy.","operationId":"update_taxonomy_v1_admin_taxonomies__taxonomy_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","taxonomies"],"summary":"Delete taxonomy, including categories","description":"Delete a taxonomy by ID, including its categories.","operationId":"delete_taxonomy_v1_admin_taxonomies__taxonomy_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials":{"post":{"tags":["admin","materials"],"summary":"Create material","description":"Create a material.","operationId":"create_material_v1_admin_materials_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialCreateWithCategories"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/materials/{material_id}":{"patch":{"tags":["admin","materials"],"summary":"Update material","description":"Update a material.","operationId":"update_material_v1_admin_materials__material_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","materials"],"summary":"Delete material","description":"Delete a material.","operationId":"delete_material_v1_admin_materials__material_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/categories":{"post":{"tags":["admin","materials"],"summary":"Add multiple categories to the material","description":"Add multiple categories to a material.","operationId":"add_categories_to_material_v1_admin_materials__material_id__categories_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to assign to the material","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Add Categories To Material V1 Admin Materials Material Id Categories Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","materials"],"summary":"Remove multiple categories from the material","description":"Remove multiple categories from a material.","operationId":"remove_categories_from_material_v1_admin_materials__material_id__categories_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to remove from the material","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/files":{"post":{"tags":["admin","materials"],"summary":"Add File to Material","description":"Upload a new file for the material.","operationId":"upload_material_file_v1_admin_materials__material_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_material_file_v1_admin_materials__material_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/files/{file_id}":{"delete":{"tags":["admin","materials"],"summary":"Remove File from Material","description":"Remove a file from the material.","operationId":"delete_material_file_v1_admin_materials__material_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/images":{"post":{"tags":["admin","materials"],"summary":"Add Image to Material","description":"Upload a new image for the material.","operationId":"upload_material_image_v1_admin_materials__material_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_material_image_v1_admin_materials__material_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/images/{image_id}":{"delete":{"tags":["admin","materials"],"summary":"Remove Image from Material","description":"Remove an image from the material.","operationId":"delete_material_image_v1_admin_materials__material_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types":{"post":{"tags":["admin","product-types"],"summary":"Create product type","description":"Create a product type.","operationId":"create_product_type_v1_admin_product_types_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeCreateWithCategories"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}":{"patch":{"tags":["admin","product-types"],"summary":"Update product type","description":"Update a product type.","operationId":"update_product_type_v1_admin_product_types__product_type_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","product-types"],"summary":"Delete product type","description":"Delete a product type.","operationId":"delete_product_type_v1_admin_product_types__product_type_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/categories":{"post":{"tags":["admin","product-types"],"summary":"Add multiple categories to the product type","description":"Add multiple categories to a product type.","operationId":"add_categories_to_product_type_v1_admin_product_types__product_type_id__categories_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to assign to the product type","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Add Categories To Product Type V1 Admin Product Types Product Type Id Categories Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","product-types"],"summary":"Remove multiple categories from the product type","description":"Remove multiple categories from a product type.","operationId":"remove_categories_from_product_type_v1_admin_product_types__product_type_id__categories_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to remove from the product type","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/files":{"post":{"tags":["admin","product-types"],"summary":"Add File to Product Type","description":"Upload a new file for the product type.","operationId":"upload_product_type_file_v1_admin_product_types__product_type_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_type_file_v1_admin_product_types__product_type_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/files/{file_id}":{"delete":{"tags":["admin","product-types"],"summary":"Remove File from Product Type","description":"Remove a file from the product type.","operationId":"delete_product_type_file_v1_admin_product_types__product_type_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/images":{"post":{"tags":["admin","product-types"],"summary":"Add Image to Product Type","description":"Upload a new image for the product type.","operationId":"upload_product_type_image_v1_admin_product_types__product_type_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_type_image_v1_admin_product_types__product_type_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/images/{image_id}":{"delete":{"tags":["admin","product-types"],"summary":"Remove Image from Product Type","description":"Remove an image from the product type.","operationId":"delete_product_type_image_v1_admin_product_types__product_type_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/categories":{"get":{"tags":["categories"],"summary":"Get all categories with optional filtering and all relationships","description":"Get all categories with all relationships loaded.","operationId":"get_categories_v1_categories_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"taxonomy_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name"}},{"name":"taxonomy_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name[Ilike]"}},{"name":"taxonomy_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version"}},{"name":"taxonomy_version[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version[Ilike]"}},{"name":"taxonomy_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description"}},{"name":"taxonomy_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description[Ilike]"}},{"name":"taxonomy_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source"}},{"name":"taxonomy_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","+taxonomy_name","name","external_id","taxonomy_name","-name","-external_id","-taxonomy_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRelationshipsAndFlatSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/tree":{"get":{"tags":["categories"],"summary":"Get categories tree","description":"Get a page of top-level categories, each with its subcategories in a tree structure.","operationId":"get_categories_tree_v1_categories_tree_get","parameters":[{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"taxonomy_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name"}},{"name":"taxonomy_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name[Ilike]"}},{"name":"taxonomy_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version"}},{"name":"taxonomy_version[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version[Ilike]"}},{"name":"taxonomy_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description"}},{"name":"taxonomy_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description[Ilike]"}},{"name":"taxonomy_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source"}},{"name":"taxonomy_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","+taxonomy_name","name","external_id","taxonomy_name","-name","-external_id","-taxonomy_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRecursiveSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/{category_id}":{"get":{"tags":["categories"],"summary":"Get Category","description":"Get category by ID with all relationships.","operationId":"get_category_v1_categories__category_id__get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryReadWithRelationshipsAndFlatSubCategories"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/{category_id}/subcategories":{"get":{"tags":["categories"],"summary":"Get category subcategories with optional filtering and all relationships","description":"Get paginated subcategories of a category with all relationships loaded.","operationId":"get_subcategories_v1_categories__category_id__subcategories_get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Category ID","title":"Category Id"},"description":"Category ID"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRelationshipsAndFlatSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/{category_id}/subcategories/tree":{"get":{"tags":["categories"],"summary":"Get category subtree","description":"Get a page of a category's subcategories in a tree structure, up to a specified depth.","operationId":"get_category_subtree_v1_categories__category_id__subcategories_tree_get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}},{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRecursiveSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies":{"get":{"tags":["taxonomies"],"summary":"Get Taxonomies","description":"Get all taxonomies with optional filtering.","operationId":"get_taxonomies_v1_taxonomies_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},{"name":"version[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+version","+source","name","version","source","-name","-version","-source"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TaxonomyRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies/{taxonomy_id}":{"get":{"tags":["taxonomies"],"summary":"Get Taxonomy","description":"Get taxonomy by ID.","operationId":"get_taxonomy_v1_taxonomies__taxonomy_id__get","parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies/{taxonomy_id}/categories/tree":{"get":{"tags":["taxonomies"],"summary":"Get the category tree of a taxonomy","description":"Get paginated top-level categories of a taxonomy with their recursive subcategory trees.","operationId":"get_taxonomy_category_tree_v1_taxonomies__taxonomy_id__categories_tree_get","parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}},{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRecursiveSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies/{taxonomy_id}/categories":{"get":{"tags":["taxonomies"],"summary":"View categories of taxonomy","description":"Get taxonomy categories with optional filtering.","operationId":"get_taxonomy_categories_v1_taxonomies__taxonomy_id__categories_get","parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials":{"get":{"tags":["materials"],"summary":"Get all materials with all relationships","description":"Get all materials with all relationships loaded.","operationId":"get_materials_v1_materials_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"density_kg_m3","in":"query","required":false,"schema":{"type":"number","title":"Density Kg M3"}},{"name":"density_kg_m3[ge]","in":"query","required":false,"schema":{"type":"number","title":"Density Kg M3[Ge]"}},{"name":"density_kg_m3[le]","in":"query","required":false,"schema":{"type":"number","title":"Density Kg M3[Le]"}},{"name":"is_crm","in":"query","required":false,"schema":{"type":"boolean","title":"Is Crm"}},{"name":"is_crm[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Crm[Eq]"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source[Ilike]"}},{"name":"category_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name"}},{"name":"category_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name[Ilike]"}},{"name":"category_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description"}},{"name":"category_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description[Ilike]"}},{"name":"category_external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id"}},{"name":"category_external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+density_kg_m3","+source","name","density_kg_m3","source","-name","-density_kg_m3","-source"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MaterialReadWithRelationships_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}":{"get":{"tags":["materials"],"summary":"Get Material","description":"Get material by ID with all relationships loaded.","operationId":"get_material_v1_materials__material_id__get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialReadWithRelationships"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}/categories":{"get":{"tags":["materials"],"summary":"View categories of material","description":"Get categories linked to a material.","operationId":"get_material_categories_v1_materials__material_id__categories_get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Get Material Categories V1 Materials Material Id Categories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}/files":{"get":{"tags":["materials"],"summary":"Get Material Files","description":"Get all files associated with a material.","operationId":"get_material_files_v1_materials__material_id__files_get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileReadWithinParent"},"title":"Response Get Material Files V1 Materials Material Id Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}/images":{"get":{"tags":["materials"],"summary":"Get Material Images","description":"Get all images associated with a material.","operationId":"get_material_images_v1_materials__material_id__images_get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImageReadWithinParent"},"title":"Response Get Material Images V1 Materials Material Id Images Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types":{"get":{"tags":["product-types"],"summary":"Get all product types with all relationships","description":"Get a list of all product types with all relationships loaded.","operationId":"get_product_types_v1_product_types_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Name[In]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"category_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name"}},{"name":"category_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name[Ilike]"}},{"name":"category_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description"}},{"name":"category_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description[Ilike]"}},{"name":"category_external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id"}},{"name":"category_external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","name","-name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ProductTypeReadWithRelationships_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}":{"get":{"tags":["product-types"],"summary":"Get product type by ID with all relationships","description":"Get a single product type by ID with all relationships loaded.","operationId":"get_product_type_v1_product_types__product_type_id__get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeReadWithRelationships"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}/categories":{"get":{"tags":["product-types"],"summary":"View categories of product type","description":"Get categories linked to a product type.","operationId":"get_product_type_categories_v1_product_types__product_type_id__categories_get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Type Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Get Product Type Categories V1 Product Types Product Type Id Categories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}/files":{"get":{"tags":["product-types"],"summary":"Get Product Type Files","description":"Get all files associated with a product type.","operationId":"get_product_type_files_v1_product_types__product_type_id__files_get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileReadWithinParent"},"title":"Response Get Product Type Files V1 Product Types Product Type Id Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}/images":{"get":{"tags":["product-types"],"summary":"Get Product Type Images","description":"Get all images associated with a product type.","operationId":"get_product_type_images_v1_product_types__product_type_id__images_get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImageReadWithinParent"},"title":"Response Get Product Type Images V1 Product Types Product Type Id Images Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/units":{"get":{"tags":["units"],"summary":"Get Units","description":"Get a list of available units.","operationId":"get_units_v1_units_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get Units V1 Units Get"}}}}},"x-audience":["public","app"]}},"/v1/users/{user_id}/products":{"get":{"tags":["products"],"summary":"Get base products collected by a user","description":"Get base products collected by a specific user.","operationId":"get_user_products_v1_users__user_id__products_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ProductRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products":{"get":{"tags":["products"],"summary":"Get all base products","description":"Get all base products. Components live under ``/products/{id}/components``.","operationId":"get_products_v1_products_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Use 'me' for the current user's products, or a username for that user's public products","title":"Owner"},"description":"Use 'me' for the current user's products, or a username for that user's public products"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ProductRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Create a new product, optionally with components","description":"Create a new product.\n\nAn optional ``Idempotency-Key`` header makes a retried request safe: replaying the same\nkey returns the original response instead of creating a second product. The key is bound to\nthis user and this request body; reusing it with a different body is a 422.","operationId":"create_product_v1_products_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreateWithComponents","description":"Product to create"},"examples":{"basic":{"value":{"name":"Office Chair","description":"Complete chair assembly","brand":"Brand 1","model":"Model 1","product_type_id":1,"weight_g":20000,"height_cm":150,"width_cm":70,"depth_cm":50,"circularity_properties":{"recyclability":"Metal frame and plastic shell can be separated with basic tools.","disassemblability":"Most fasteners are visible and non-destructive to remove."},"videos":[{"url":"https://www.youtube.com/watch?v=123456789","description":"Disassembly video"}],"bill_of_materials":[{"quantity":0.3,"unit":"g","material_id":1},{"quantity":0.1,"unit":"g","material_id":2}]},"summary":"Basic product without components"},"with_components":{"value":{"name":"Office Chair","description":"Complete chair assembly","brand":"Brand 1","model":"Model 1","product_type_id":1,"weight_g":20000,"height_cm":150,"width_cm":70,"depth_cm":50,"circularity_properties":{"recyclability":"Metal frame and plastic shell can be separated with basic tools.","disassemblability":"Most fasteners are visible and non-destructive to remove."},"videos":[{"url":"https://www.youtube.com/watch?v=123456789","description":"Disassembly video"}],"bill_of_materials":[{"quantity":0.3,"unit":"g","material_id":1},{"quantity":0.1,"unit":"g","material_id":2}],"components":[{"name":"Office Chair Seat","description":"Seat assembly","brand":"Brand 2","model":"Model 2","amount_in_parent":1,"product_type_id":2,"weight_g":5000,"height_cm":50,"width_cm":40,"depth_cm":30,"components":[{"name":"Seat Cushion","description":"Seat cushion assembly","amount_in_parent":1,"weight_g":2000,"height_cm":10,"width_cm":40,"depth_cm":30,"product_type_id":3,"bill_of_materials":[{"quantity":1.5,"unit":"g","material_id":1},{"quantity":0.5,"unit":"g","material_id":2}]}]}]},"summary":"Product with components"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRead"}}}},"409":{"description":"A request with this Idempotency-Key is already being processed."},"503":{"description":"The idempotency store is unreachable; retry later."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/export":{"get":{"tags":["products"],"summary":"Export base products matching the list filters, with their components","description":"Export every base product the product list would match, each with its whole component tree.\n\nTakes the same filters, search and sorting as ``GET /products``. CSV has one row per\nproduct or component, linked by ``parent_id``; JSON nests components as the detail read\ndoes. At most 100 base products, 5,000 components and 10 component levels: narrow the filters,\nor use the dataset release for bulk data.","operationId":"export_products_v1_products_export_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["csv","json"],"type":"string","description":"File format: 'csv' or 'json'","default":"csv","title":"Format"},"description":"File format: 'csv' or 'json'"},{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Use 'me' for the current user's products, or a username for that user's public products","title":"Owner"},"description":"Use 'me' for the current user's products, or a username for that user's public products"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductExportRead"},"title":"Response Export Products V1 Products Export Get"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"More than 100 base products match, or the export is too large (components nested more than 10 levels deep, or more than 5,000 components)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/facets":{"get":{"tags":["products"],"summary":"Get derived product facets","description":"Return derived filter values and counts for product browsing.","operationId":"get_product_facets_v1_products_facets_get","parameters":[{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["brand","model"],"type":"string"}},{"type":"null"}],"description":"Product fields to facet. Repeat the parameter for multiple fields.","title":"Fields"},"description":"Product fields to facet. Repeat the parameter for multiple fields."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductFacetValue"}},"title":"Response Get Product Facets V1 Products Facets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}":{"get":{"tags":["products"],"summary":"Get base product by ID","description":"Get a base product by ID. For components, use ``/components/{component_id}``.","operationId":"get_product_v1_products__product_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReadWithRelationshipsAndFlatComponents"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["products"],"summary":"Update base product","description":"Update an existing base product. Use ``PATCH /components/{id}`` for components.","operationId":"update_product_v1_products__product_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"if-match","in":"header","required":true,"schema":{"type":"string","description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412.","title":"If-Match"},"description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRead"}}}},"412":{"description":"The record changed since the `version` sent in `If-Match`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Delete base product","description":"Delete a base product, cascading to its components. Use ``DELETE /components/{id}`` for a component.","operationId":"delete_product_v1_products__product_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/export":{"get":{"tags":["products"],"summary":"Export one base product with its components","description":"Export one base product and its whole component tree, in the same formats as ``/products/export``.","operationId":"export_product_v1_products__product_id__export_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"format","in":"query","required":false,"schema":{"enum":["csv","json"],"type":"string","description":"File format: 'csv' or 'json'","default":"csv","title":"Format"},"description":"File format: 'csv' or 'json'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductExportRead"},"title":"Response Export Product V1 Products Product Id Export Get"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"The export is too large (components nested more than 10 levels deep, or more than 5,000 components)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/components/tree":{"get":{"tags":["products"],"summary":"Get product component subtree","description":"Get a product's component subtree as a bounded hierarchical view.\n\nA tree with more components than the cap, across all levels, is a 400. Page through\n``/components`` level by level, or use the export, for bigger products.","operationId":"get_product_subtree_v1_products__product_id__components_tree_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"},"title":"Response Get Product Subtree V1 Products Product Id Components Tree Get"}}}},"400":{"description":"More than 1,000 components at the requested depth"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/components":{"get":{"tags":["products"],"summary":"Get product components","description":"Get a page of a product's direct components.","operationId":"get_product_components_v1_products__product_id__components_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ComponentRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Create a new component under a base product","description":"Create a new component under the given base product.\n\nAn optional ``Idempotency-Key`` header makes a retried request safe: replaying the same\nkey returns the original response instead of creating a second component. The key is bound to\nthis user, this parent, and this request body; reusing it with a different body is a 422.","operationId":"add_component_to_product_v1_products__product_id__components_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"examples":{"simple":{"value":{"name":"Seat Assembly","description":"Chair seat component","amount_in_parent":1,"bill_of_materials":[{"material_id":1,"quantity":0.5,"unit":"g"}]},"summary":"Basic component","description":"Create a component without subcomponents"},"nested":{"value":{"name":"Seat Assembly","description":"Chair seat with cushion","amount_in_parent":1,"components":[{"name":"Cushion","description":"Foam cushion","amount_in_parent":1,"bill_of_materials":[{"material_id":2,"quantity":0.3,"unit":"g"}]}]},"summary":"Component with subcomponents","description":"Create a component with nested subcomponents"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"}}}},"409":{"description":"A request with this Idempotency-Key is already being processed."},"503":{"description":"The idempotency store is unreachable; retry later."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/suggestions/brands":{"get":{"tags":["products"],"summary":"Get product brand suggestions","description":"Get a paginated, searchable list of unique product brands derived from product data.","operationId":"get_brand_suggestions_v1_products_suggestions_brands_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Search brand (case-insensitive)","title":"Search"},"description":"Search brand (case-insensitive)"},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"Sort order: 'asc' or 'desc'","default":"asc","title":"Order"},"description":"Sort order: 'asc' or 'desc'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_str_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/suggestions/models":{"get":{"tags":["products"],"summary":"Get product model suggestions","description":"Get a paginated, searchable list of unique product model names derived from product data.","operationId":"get_model_suggestions_v1_products_suggestions_models_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Search model name (case-insensitive)","title":"Search"},"description":"Search model name (case-insensitive)"},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"Sort order: 'asc' or 'desc'","default":"asc","title":"Order"},"description":"Sort order: 'asc' or 'desc'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_str_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/files":{"get":{"tags":["products"],"summary":"List files attached to a base product","description":"List all files attached to a base product.","operationId":"get_product_files_v1_products__product_id__files_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_FileReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Upload a file to a base product","description":"Upload a new file for a base product.\n\nRestricted to lab accounts: research-file formats are a lab capability, so the\ndependency rejects before the multipart body is read.","operationId":"upload_product_file_v1_products__product_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_file_v1_products__product_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/files/{file_id}":{"get":{"tags":["products"],"summary":"Get a specific base-product file","description":"Get a specific file attached to a base product.","operationId":"get_product_file_v1_products__product_id__files__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove a file from a base product","description":"Remove a file from a base product.","operationId":"delete_product_file_v1_products__product_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/images":{"get":{"tags":["products"],"summary":"List images attached to a base product","description":"List all images attached to a base product.","operationId":"get_product_images_v1_products__product_id__images_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ImageReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Upload an image to a base product","description":"Upload a new image for a base product.","operationId":"upload_product_image_v1_products__product_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_image_v1_products__product_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/images/{image_id}":{"get":{"tags":["products"],"summary":"Get a specific base-product image","description":"Get a specific image attached to a base product.","operationId":"get_product_image_v1_products__product_id__images__image_id__get","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove an image from a base product","description":"Remove an image from a base product.","operationId":"delete_product_image_v1_products__product_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}":{"get":{"tags":["components"],"summary":"Get component by ID","description":"Fetch a component by its stable id.","operationId":"get_component_v1_components__component_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRelationshipsAndFlatComponents"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["components"],"summary":"Update component","description":"Update a component. Response is the lean :class:`ComponentRead` shape (no relationships).","operationId":"update_component_v1_components__component_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"if-match","in":"header","required":true,"schema":{"type":"string","description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412.","title":"If-Match"},"description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentRead"}}}},"412":{"description":"The record changed since the `version` sent in `If-Match`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Delete component","description":"Delete a component (cascades to its sub-components).","operationId":"delete_component_v1_components__component_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/components":{"post":{"tags":["components"],"summary":"Create a nested component","description":"Create a new component below an existing component.\n\nAn optional ``Idempotency-Key`` header makes a retried request safe: replaying the same\nkey returns the original response instead of creating a second component. The key is bound to\nthis user, this parent, and this request body; reusing it with a different body is a 422.","operationId":"add_component_to_component_v1_components__component_id__components_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"examples":{"simple":{"value":{"name":"Seat Assembly","description":"Chair seat component","amount_in_parent":1,"bill_of_materials":[{"material_id":1,"quantity":0.5,"unit":"g"}]},"summary":"Basic component","description":"Create a component without subcomponents"},"nested":{"value":{"name":"Seat Assembly","description":"Chair seat with cushion","amount_in_parent":1,"components":[{"name":"Cushion","description":"Foam cushion","amount_in_parent":1,"bill_of_materials":[{"material_id":2,"quantity":0.3,"unit":"g"}]}]},"summary":"Component with subcomponents","description":"Create a component with nested subcomponents"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"}}}},"409":{"description":"A request with this Idempotency-Key is already being processed."},"503":{"description":"The idempotency store is unreachable; retry later."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/files":{"get":{"tags":["components"],"summary":"List files attached to a component","description":"List all files attached to a component.","operationId":"get_component_files_v1_components__component_id__files_get","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_FileReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Upload a file to a component","description":"Upload a new file for a component.\n\nRestricted to lab accounts, like the product-level route.","operationId":"upload_component_file_v1_components__component_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_component_file_v1_components__component_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/files/{file_id}":{"get":{"tags":["components"],"summary":"Get a specific component file","description":"Get a specific file attached to a component.","operationId":"get_component_file_v1_components__component_id__files__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove a file from a component","description":"Remove a file from a component.","operationId":"delete_component_file_v1_components__component_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/images":{"get":{"tags":["components"],"summary":"List images attached to a component","description":"List all images attached to a component.","operationId":"get_component_images_v1_components__component_id__images_get","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ImageReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Upload an image to a component","description":"Upload a new image for a component.","operationId":"upload_component_image_v1_components__component_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_component_image_v1_components__component_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/images/{image_id}":{"get":{"tags":["components"],"summary":"Get a specific component image","description":"Get a specific image attached to a component.","operationId":"get_component_image_v1_components__component_id__images__image_id__get","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove an image from a component","description":"Remove an image from a component.","operationId":"delete_component_image_v1_components__component_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/materials":{"get":{"tags":["components"],"summary":"Get component bill of materials","description":"Get bill of materials for a component.","operationId":"get_component_bill_of_materials_v1_components__component_id__materials_get","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"quantity","in":"query","required":false,"schema":{"type":"number","title":"Quantity"}},{"name":"quantity[ge]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Ge]"}},{"name":"quantity[le]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Le]"}},{"name":"unit","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},{"name":"unit[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit[Ilike]"}},{"name":"material_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name"}},{"name":"material_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name[Ilike]"}},{"name":"material_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description"}},{"name":"material_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description[Ilike]"}},{"name":"material_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source"}},{"name":"material_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source[Ilike]"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Get Component Bill Of Materials V1 Components Component Id Materials Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Add multiple materials to component bill of materials","description":"Add multiple materials to a component's bill of materials.","operationId":"add_materials_to_component_v1_components__component_id__materials_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"description":"List of materials-component links to add to the component","title":"Materials"},"examples":{"multiple_materials":{"value":[{"material_id":1,"quantity":5,"unit":"g"},{"material_id":2,"quantity":10,"unit":"g"}],"summary":"Add multiple materials"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Add Materials To Component V1 Components Component Id Materials Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove multiple materials from component bill of materials","description":"Remove multiple materials from a component's bill of materials.","operationId":"remove_materials_from_component_bulk_v1_components__component_id__materials_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer","exclusiveMinimum":0},"description":"Material IDs to remove from the component","title":"Material Ids"},"examples":{"multiple_material_ids":{"value":[1,2,3],"summary":"Remove multiple material links"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/materials/{material_id}":{"get":{"tags":["components"],"summary":"Get material in component bill of materials","description":"Get a material in a component's bill of materials.","operationId":"get_material_in_component_bill_of_materials_v1_components__component_id__materials__material_id__get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Add single material to component bill of materials","description":"Add a single material to a component's bill of materials.","operationId":"add_material_to_component_v1_components__component_id__materials__material_id__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to add to the component","title":"Material Id"},"description":"ID of material to add to the component","examples":{"material_id":{"value":1,"summary":"Existing material ID"}}},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProductAndMaterial","description":"Material-component link details"},"examples":{"single_material":{"value":{"quantity":5,"unit":"g"},"summary":"Link details for one material"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["components"],"summary":"Update material in component bill of materials","description":"Update material in bill of materials for a component.","operationId":"update_component_bill_of_materials_v1_components__component_id__materials__material_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove single material from component bill of materials","description":"Remove a single material from a component's bill of materials.","operationId":"remove_material_from_component_v1_components__component_id__materials__material_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to remove from the component","title":"Material Id"},"description":"ID of material to remove from the component"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/videos":{"get":{"tags":["products"],"summary":"Get all videos for a base product","description":"Get all videos associated with a base product.\n\nVideos live only on base products (dismantling captures whole products,\nnot components). Component ids are rejected.","operationId":"get_product_videos_v1_products__product_id__videos_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},{"name":"url[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+url","+created_at","url","created_at","-url","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VideoReadWithinProduct"},"title":"Response Get Product Videos V1 Products Product Id Videos Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Create a new video for a base product","description":"Create a new video associated with a base product.","operationId":"create_product_video_v1_products__product_id__videos_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoCreateWithinProduct"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/videos/{video_id}":{"get":{"tags":["products"],"summary":"Get video by ID","description":"Get a video associated with a base product.","operationId":"get_product_video_v1_products__product_id__videos__video_id__get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Video Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["products"],"summary":"Update video by ID","description":"Update a video associated with a base product.","operationId":"update_product_video_v1_products__product_id__videos__video_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Video Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoUpdateWithinProduct"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Delete video by ID","description":"Delete a video associated with a base product.","operationId":"delete_product_video_v1_products__product_id__videos__video_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Video Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/materials":{"get":{"tags":["products"],"summary":"Get product bill of materials","description":"Get bill of materials for a base product.","operationId":"get_product_bill_of_materials_v1_products__product_id__materials_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"quantity","in":"query","required":false,"schema":{"type":"number","title":"Quantity"}},{"name":"quantity[ge]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Ge]"}},{"name":"quantity[le]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Le]"}},{"name":"unit","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},{"name":"unit[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit[Ilike]"}},{"name":"material_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name"}},{"name":"material_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name[Ilike]"}},{"name":"material_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description"}},{"name":"material_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description[Ilike]"}},{"name":"material_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source"}},{"name":"material_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source[Ilike]"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Get Product Bill Of Materials V1 Products Product Id Materials Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Add multiple materials to product bill of materials","description":"Add multiple materials to a base product's bill of materials.","operationId":"add_materials_to_product_v1_products__product_id__materials_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"description":"List of materials-product links to add to the product","title":"Materials"},"examples":{"multiple_materials":{"value":[{"material_id":1,"quantity":5,"unit":"g"},{"material_id":2,"quantity":10,"unit":"g"}],"summary":"Add multiple materials"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Add Materials To Product V1 Products Product Id Materials Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove multiple materials from product bill of materials","description":"Remove multiple materials from a base product's bill of materials.","operationId":"remove_materials_from_product_bulk_v1_products__product_id__materials_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer","exclusiveMinimum":0},"description":"Material IDs to remove from the product","title":"Material Ids"},"examples":{"multiple_material_ids":{"value":[1,2,3],"summary":"Remove multiple material links"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/materials/{material_id}":{"get":{"tags":["products"],"summary":"Get material in product bill of materials","description":"Get a material in a base product's bill of materials.","operationId":"get_material_in_product_bill_of_materials_v1_products__product_id__materials__material_id__get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Add single material to product bill of materials","description":"Add a single material to a base product's bill of materials.","operationId":"add_material_to_product_v1_products__product_id__materials__material_id__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to add to the product","title":"Material Id"},"description":"ID of material to add to the product","examples":{"material_id":{"value":1,"summary":"Existing material ID"}}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProductAndMaterial","description":"Material-product link details"},"examples":{"single_material":{"value":{"quantity":5,"unit":"g"},"summary":"Link details for one material"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["products"],"summary":"Update material in product bill of materials","description":"Update material in bill of materials for a base product.","operationId":"update_product_bill_of_materials_v1_products__product_id__materials__material_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove single material from product bill of materials","description":"Remove a single material from a base product's bill of materials.","operationId":"remove_material_from_product_v1_products__product_id__materials__material_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to remove from the product","title":"Material Id"},"description":"ID of material to remove from the product"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/bearer/login":{"post":{"tags":["auth"],"summary":"Login with email and password for bearer-token clients","description":"Authenticate a bearer client and return access and refresh tokens in JSON.","operationId":"auth_bearer_login_v1_auth_bearer_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_auth_bearer_login_v1_auth_bearer_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenResponse"},{"$ref":"#/components/schemas/MfaPendingResponse"}],"title":"Response Auth Bearer Login V1 Auth Bearer Login Post"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"429":{"description":"Too many attempts for this address or account. See the Retry-After header."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/session/login":{"post":{"tags":["auth"],"summary":"Login with email and password for browser sessions","description":"Authenticate a browser client and return MFA challenge only when MFA is enabled.","operationId":"auth_session_login_v1_auth_session_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_auth_session_login_v1_auth_session_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MfaPendingResponse"},{"type":"null"}],"title":"Response Auth Session Login V1 Auth Session Login Post"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"429":{"description":"Too many attempts for this address or account. See the Retry-After header."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/register":{"post":{"tags":["auth"],"summary":"Register a new user","description":"Register a new user, returning the same response whether or not the email is taken.","operationId":"register_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegister"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/bearer/refresh":{"post":{"tags":["auth"],"summary":"Refresh tokens for bearer-token clients","description":"Refresh access token using refresh token for bearer auth.\n\nValidates refresh token and issues new access token.","operationId":"auth_bearer_refresh_v1_auth_bearer_refresh_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/session/refresh":{"post":{"tags":["auth"],"summary":"Refresh tokens for browser sessions","description":"Refresh access token using refresh token from cookie.\n\nValidates refresh token cookie and issues new access token cookie.","operationId":"auth_session_refresh_v1_auth_session_refresh_post","parameters":[{"name":"__Host-r9lab-refresh","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":" Host-R9Lab-Refresh"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/bearer/logout":{"post":{"tags":["auth"],"summary":"Log out a bearer-token client","description":"Logout a bearer client and revoke its supplied refresh token.","operationId":"auth_bearer_logout_v1_auth_bearer_logout_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/session/logout":{"post":{"tags":["auth"],"summary":"Log out a browser session","description":"Logout a browser session, revoke refresh state, and clear browser storage.","operationId":"auth_session_logout_v1_auth_session_logout_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"__Host-r9lab-refresh","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":" Host-R9Lab-Refresh"}},{"name":"__Host-r9lab-auth","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":" Host-R9Lab-Auth"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/sessions/revoke-all":{"post":{"tags":["auth"],"summary":"Revoke every session of the current user","description":"Revoke all refresh tokens for the current user and clear browser session state.","operationId":"auth_sessions_revoke_all_v1_auth_sessions_revoke_all_post","responses":{"204":{"description":"Successful Response"}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/totp/setup":{"post":{"tags":["auth"],"summary":"Start Totp Setup","description":"Start authenticated TOTP enrollment for an account that opted into MFA.","operationId":"start_totp_setup_v1_auth_mfa_totp_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpSetupResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/totp/confirm":{"post":{"tags":["auth"],"summary":"Confirm Totp Setup","description":"Confirm TOTP enrollment, return one-time recovery codes, and replace the session.\n\nEnrolment signs out every other session. A client that authenticated with a bearer\ntoken gets new tokens in ``tokens``; a browser session gets new cookies.","operationId":"confirm_totp_setup_v1_auth_mfa_totp_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpConfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/totp/disable":{"post":{"tags":["auth"],"summary":"Disable Totp","description":"Turn off TOTP MFA after confirming the password and a current or recovery code.\n\nAccounts without a usable password (signed up with Google or GitHub) send only the code.","operationId":"disable_totp_v1_auth_mfa_totp_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpDisableRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"400":{"description":"The password or the code is missing."},"401":{"description":"MFA is not on for this account."},"403":{"description":"The password or the code is wrong."},"429":{"description":"Too many guesses for this account. See the Retry-After header."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/recovery-codes/regenerate":{"post":{"tags":["auth"],"summary":"Regenerate Recovery Codes","description":"Reissue recovery codes after confirming a current TOTP code.","operationId":"regenerate_recovery_codes_v1_auth_mfa_recovery_codes_regenerate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaRecoveryCodesRegenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaRecoveryCodesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/oauth/claim":{"post":{"tags":["auth"],"summary":"Claim Oauth Mfa Handoff","description":"Claim a one-time OAuth MFA handoff and return pending MFA state.","operationId":"claim_oauth_mfa_handoff_v1_auth_mfa_oauth_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaOAuthClaimRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaPendingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/mfa/challenge":{"post":{"tags":["auth"],"summary":"Complete Mfa Challenge","description":"Complete login for a user with TOTP already enabled.","operationId":"complete_mfa_challenge_v1_auth_mfa_challenge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaChallengeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenResponse"},{"type":"null"}],"title":"Response Complete Mfa Challenge V1 Auth Mfa Challenge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/request-verify-token":{"post":{"tags":["auth"],"summary":"Verify:Request-Token","operationId":"verify_request_token_v1_auth_request_verify_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_verify_request_token_v1_auth_request_verify_token_post"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/verify":{"post":{"tags":["auth"],"summary":"Verify:Verify","operationId":"verify_verify_v1_auth_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_verify_verify_v1_auth_verify_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"VERIFY_USER_BAD_TOKEN":{"summary":"Bad token, not existing user or not the e-mail currently set for the user.","value":{"detail":"VERIFY_USER_BAD_TOKEN"}},"VERIFY_USER_ALREADY_VERIFIED":{"summary":"The user is already verified.","value":{"detail":"VERIFY_USER_ALREADY_VERIFIED"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Reset:Forgot Password","description":"Start a forgot-password request without revealing whether the account exists.","operationId":"reset_forgot_password_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_reset_forgot_password_v1_auth_forgot_password_post"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset:Reset Password","description":"Reset a password while preserving FastAPI-Users' public error contract.","operationId":"reset_reset_password_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_reset_reset_password_v1_auth_reset_password_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"RESET_PASSWORD_BAD_TOKEN":{"summary":"Bad or expired token.","value":{"detail":"RESET_PASSWORD_BAD_TOKEN"}},"RESET_PASSWORD_INVALID_PASSWORD":{"summary":"Password validation failed.","value":{"detail":{"code":"RESET_PASSWORD_INVALID_PASSWORD","reason":"Password should be at least 3 characters"}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/validate-email":{"post":{"tags":["auth"],"summary":"Validate Email","description":"Validate email address for registration.\n\nTakes the email in a POST body (not a query param) so it doesn't land in\nproxy/uvicorn access logs, matching the pairing endpoints' approach.","operationId":"validate_email_v1_auth_validate_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailValidationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"null"}]},"type":"object","title":"Response Validate Email V1 Auth Validate Email Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/github/token/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Bearer.Authorize","operationId":"oauth_github_bearer_authorize_v1_oauth_github_token_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/github/token/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Bearer.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_github_bearer_callback_v1_oauth_github_token_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/github/session/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Cookie.Authorize","operationId":"oauth_github_cookie_authorize_v1_oauth_github_session_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/github/session/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Cookie.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_github_cookie_callback_v1_oauth_github_session_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/github/associate/authorize":{"post":{"tags":["oauth"],"summary":"Oauth-Associate:Github.Authorize","operationId":"oauth_associate_github_authorize_v1_oauth_github_associate_authorize_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/oauth/github/associate/callback":{"get":{"tags":["oauth"],"summary":"Oauth-Associate:Github.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_associate_github_callback_v1_oauth_github_associate_callback_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google/token/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Bearer.Authorize","operationId":"oauth_google_bearer_authorize_v1_oauth_google_token_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/google/token/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Bearer.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_google_bearer_callback_v1_oauth_google_token_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google/session/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Cookie.Authorize","operationId":"oauth_google_cookie_authorize_v1_oauth_google_session_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/google/session/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Cookie.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_google_cookie_callback_v1_oauth_google_session_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google/associate/authorize":{"post":{"tags":["oauth"],"summary":"Oauth-Associate:Google.Authorize","operationId":"oauth_associate_google_authorize_v1_oauth_google_associate_authorize_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/oauth/google/associate/callback":{"get":{"tags":["oauth"],"summary":"Oauth-Associate:Google.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_associate_google_callback_v1_oauth_google_associate_callback_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google-youtube/associate/authorize":{"post":{"tags":["oauth"],"summary":"Oauth-Associate:Google-Youtube.Authorize","operationId":"oauth_associate_google_youtube_authorize_v1_oauth_google_youtube_associate_authorize_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/oauth/google-youtube/associate/callback":{"get":{"tags":["oauth"],"summary":"Oauth-Associate:Google-Youtube.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_associate_google_youtube_callback_v1_oauth_google_youtube_associate_callback_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/{provider}/associate":{"delete":{"tags":["oauth"],"summary":"Remove Oauth Association","description":"Remove a linked OAuth account (password and MFA step-up where the account has them).","operationId":"remove_oauth_association_v1_oauth__provider__associate_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/users/me":{"get":{"tags":["users"],"summary":"Users:Current User","operationId":"users_current_user_v1_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"401":{"description":"Missing token or inactive user."}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]},"delete":{"tags":["users"],"summary":"Delete your own account","description":"Delete the signed-in account, keeping its products under the anonymous system account.\n\nPersonal data is erased; contributed products and media stay on the platform without\nthe owner's name. Requires the current password, the same step-up as an email or\npassword change, and a current MFA code when the account has MFA enabled. An account\nwith neither must have signed in within the last few minutes. The former address gets\na notification email.","operationId":"delete_own_account_v1_users_me_delete","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"204":{"description":"Successful Response"},"400":{"description":"The current password or MFA code is missing."},"403":{"description":"The current password or MFA code is invalid, or the account needs a fresh sign-in."},"409":{"description":"This account cannot be deleted (the last active superuser)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]},"patch":{"tags":["users"],"summary":"Users:Patch Current User","operationId":"users_patch_current_user_v1_users_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"401":{"description":"Missing token or inactive user."},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"UPDATE_USER_EMAIL_ALREADY_EXISTS":{"summary":"A user with this email already exists.","value":{"detail":"UPDATE_USER_EMAIL_ALREADY_EXISTS"}},"UPDATE_USER_INVALID_PASSWORD":{"summary":"Password validation failed.","value":{"detail":{"code":"UPDATE_USER_INVALID_PASSWORD","reason":"Password should beat least 3 characters"}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/users/me/accept-terms":{"post":{"tags":["users"],"summary":"Accept the current contributor terms","description":"Record that this account accepted the contributor terms.\n\nThe route takes no body: the server stamps ``CURRENT_TERMS_VERSION``, so a client\ncannot claim a grant under terms it was never shown. An acceptance already past the\ncurrent version is kept.\n\nWrites through the user database: the account was loaded by the auth session, not\n``AsyncSessionDep``, so committing on the latter would persist nothing.","operationId":"accept_terms_v1_users_me_accept_terms_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/admin/users":{"get":{"tags":["admin"],"summary":"View all users","description":"Get a list of all users with optional filtering.","operationId":"get_users_v1_admin_users_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},{"name":"email[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email[Ilike]"}},{"name":"username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"}},{"name":"username[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username[Ilike]"}},{"name":"is_active","in":"query","required":false,"schema":{"type":"boolean","title":"Is Active"}},{"name":"is_active[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Active[Eq]"}},{"name":"is_superuser","in":"query","required":false,"schema":{"type":"boolean","title":"Is Superuser"}},{"name":"is_superuser[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Superuser[Eq]"}},{"name":"is_verified","in":"query","required":false,"schema":{"type":"boolean","title":"Is Verified"}},{"name":"is_verified[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Verified[Eq]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+email","+username","email","username","-email","-username"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"List of users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_UserRead_"},"examples":{"basic":{"value":[{"id":"12345678-cc4e-405c-8553-7806424de2a1","username":"alice","email":"alice@example.com","is_active":true,"is_superuser":false,"is_verified":true}],"summary":"Users without relationships"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/users/{user_id}":{"get":{"tags":["admin"],"summary":"View a single user by ID","description":"Get a user by ID.","operationId":"get_user_v1_admin_users__user_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"patch":{"tags":["admin"],"summary":"Update a user by ID","description":"Update a user by ID without requiring the target account's password.\n\n`safe=False` lets an administrator change fields the self-service route\nreauthenticates for; UserManager skips the current-password gate on this path.","operationId":"update_user_v1_admin_users__user_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin"],"summary":"Delete a user by ID","description":"Delete a user by ID, anonymizing or deleting the content they own.","operationId":"delete_user_v1_admin_users__user_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"},{"name":"content","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ErasureContent","description":"What to do with the research data this user contributed: `anonymize` reassigns their products to the anonymous system account, `delete` removes the products and their media. Personal data is erased either way.","default":"anonymize"},"description":"What to do with the research data this user contributed: `anonymize` reassigns their products to the anonymous system account, `delete` removes the products and their media. Personal data is erased either way."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/users/{user_id}/mfa/reset":{"post":{"tags":["admin"],"summary":"Reset a user's MFA enrollment","description":"Reset TOTP MFA after an administrator performs identity-proofed recovery.","operationId":"reset_user_mfa_v1_admin_users__user_id__mfa_reset_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/users/{user_id}/role":{"put":{"tags":["admin"],"summary":"Set a user's contributor tier","description":"Set a user's role.\n\nA dedicated route rather than a field on `UserUpdate`: fastapi-users' safe\nupdate path excludes a fixed set of privileged fields, so anything new added\nto that schema would flow straight through self-service `PATCH /users/me`.\nKeeping role off the schema entirely makes that escalation unrepresentable.\n\nWrites through the user database rather than `AsyncSessionDep`: the target\nuser is loaded by the auth session, which is a separate dependency, so a\ncommit on the common session would persist nothing.","operationId":"set_user_role_v1_admin_users__user_id__role_put","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/profiles/{username}":{"get":{"tags":["profiles"],"summary":"Get public profile of a user","description":"Get public profile statistics for a specified user by username.\n\nReturns 404 if the user is not found or if the profile is marked as private (and you are not the user).\nRecomputes stats on the fly when no snapshot exists yet, without persisting the result.","operationId":"get_public_profile_v1_profiles__username__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProfileView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras":{"get":{"tags":["r9cam-management"],"summary":"Get Raspberry Pi cameras of the current user","description":"Get all Raspberry Pi cameras of the current user.","operationId":"get_user_cameras_v1_plugins_r9cam_cameras_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"include_status","in":"query","required":false,"schema":{"type":"boolean","description":"Include camera online status","default":false,"title":"Include Status"},"description":"Include camera online status","examples":{"disabled":{"value":false,"summary":"Return camera metadata only"},"enabled":{"value":true,"summary":"Include current online status"}}},{"name":"include_telemetry","in":"query","required":false,"schema":{"type":"boolean","description":"Include the last-known telemetry snapshot from the Redis cache. Implies ``include_status=true``. No relay round-trips; cameras without cached telemetry come back with ``telemetry: null``.","default":false,"title":"Include Telemetry"},"description":"Include the last-known telemetry snapshot from the Redis cache. Implies ``include_status=true``. No relay round-trips; cameras without cached telemetry come back with ``telemetry: null``."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+created_at","name","created_at","-name","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CameraRead"}},{"type":"array","items":{"$ref":"#/components/schemas/CameraReadWithStatus"}}],"title":"Response Get User Cameras V1 Plugins R9Cam Cameras Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["r9cam-management"],"summary":"Register new Raspberry Pi camera","description":"Register a new Raspberry Pi camera.\n\nThe normal user flow is /plugins/r9cam/pairing/claim. This endpoint is\nkept as a structured API surface for tests/admin automation and still\nrequires a public device key.","operationId":"register_user_camera_v1_plugins_r9cam_cameras_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}":{"get":{"tags":["r9cam-management"],"summary":"Get Raspberry Pi camera by ID","description":"Get single Raspberry Pi camera by ID, if owned by the current user.","operationId":"get_user_camera_v1_plugins_r9cam_cameras__camera_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}},{"name":"include_status","in":"query","required":false,"schema":{"type":"boolean","description":"Include camera online status","default":false,"title":"Include Status"},"description":"Include camera online status","examples":{"disabled":{"value":false,"summary":"Return camera metadata only"},"enabled":{"value":true,"summary":"Include current online status"}}},{"name":"include_telemetry","in":"query","required":false,"schema":{"type":"boolean","description":"Include last-known telemetry from the Redis cache. Implies ``include_status=true``.","default":false,"title":"Include Telemetry"},"description":"Include last-known telemetry from the Redis cache. Implies ``include_status=true``."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CameraRead"},{"$ref":"#/components/schemas/CameraReadWithStatus"}],"title":"Response Get User Camera V1 Plugins R9Cam Cameras Camera Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["r9cam-management"],"summary":"Update Raspberry Pi camera","description":"Update Raspberry Pi camera.","operationId":"update_user_camera_v1_plugins_r9cam_cameras__camera_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["r9cam-management"],"summary":"Delete Raspberry Pi camera","description":"Delete Raspberry Pi camera.","operationId":"delete_user_camera_v1_plugins_r9cam_cameras__camera_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/preview-thumbnail":{"get":{"tags":["r9cam-management"],"summary":"Get a camera's cached preview thumbnail","description":"Serve the owner's cached preview thumbnail.\n\nOwner-checked (``UserOwnedCameraDep`` 404s for non-owners) and served off the\nprivate preview directory rather than the public ``/uploads/images`` mount, so\na camera id alone no longer grants a stranger a recent frame. Cached only\nprivately and revalidated, never long-lived immutable like the public mount.","operationId":"get_camera_preview_thumbnail_v1_plugins_r9cam_cameras__camera_id__preview_thumbnail_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response"},"404":{"description":"No cached preview thumbnail available for this camera."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/status":{"get":{"tags":["r9cam-management"],"summary":"Get Raspberry Pi camera online status","description":"Get Raspberry Pi camera online status.","operationId":"get_user_camera_status_v1_plugins_r9cam_cameras__camera_id__status_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/local-access":{"get":{"tags":["r9cam-management"],"summary":"Get local direct-connection info for a camera","description":"Relays GET /system/local-access to the Pi via the WebSocket connection. Returns the local API key and candidate IP addresses so the frontend can auto-configure Ethernet/USB-C direct access without manual key copying. Returns 503 when the camera is offline.","operationId":"get_camera_local_access_v1_plugins_r9cam_cameras__camera_id__local_access_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalAccessInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/captures":{"post":{"tags":["r9cam-interaction"],"summary":"Capture a still image with a remote Raspberry Pi Camera","description":"Capture a still image with a remote Raspberry Pi Camera and store it in the file storage. Send optional parent type and ID in the request body to associate the image with another object.","operationId":"capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/recording-stream":{"get":{"tags":["r9cam-interaction"],"summary":"Get the active YouTube recording stream status","description":"Fetch the current remote camera stream status from the Raspberry Pi camera plugin.","operationId":"get_camera_stream_status_v1_plugins_r9cam_cameras__camera_id__recording_stream_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["r9cam-interaction"],"summary":"Start recording to YouTube","description":"Start a YouTube recording stream.","operationId":"start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["r9cam-interaction"],"summary":"Stop recording to YouTube","description":"Stop the active YouTube recording and return its video record.","operationId":"stop_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/recording-stream/monitor":{"get":{"tags":["r9cam-interaction"],"summary":"Get YouTube livestream monitor stream","description":"Get the YouTube monitor stream for the active backend-owned recording session.","operationId":"get_recording_monitor_stream_v1_plugins_r9cam_cameras__camera_id__recording_stream_monitor_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeMonitorStreamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/telemetry":{"get":{"tags":["r9cam-interaction"],"summary":"Get a camera's latest telemetry snapshot","description":"Return the most recent telemetry snapshot for the camera. Backed by a Redis cache with a 120s TTL so mosaic polling does not fan out one relay round-trip per camera on every refresh. Pass ``force_refresh=true`` to bypass the cache and re-fetch from the Pi.","operationId":"get_camera_telemetry_v1_plugins_r9cam_cameras__camera_id__telemetry_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}},{"name":"force_refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetrySnapshot"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/hls/{hls_path}":{"get":{"tags":["r9cam-interaction"],"summary":"Proxy LL-HLS playlists and segments from the camera's MediaMTX","description":"Forward an LL-HLS request to the camera over its WebSocket relay. Playlist requests return ``application/vnd.apple.mpegurl`` text; segment/part requests return binary ``video/mp4`` or ``video/iso.segment``. The frontend simply points ``hls.js`` / ``expo-video`` at this URL and the player walks the manifest on its own.","operationId":"proxy_hls_v1_plugins_r9cam_cameras__camera_id__hls__hls_path__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}},{"name":"hls_path","in":"path","required":true,"schema":{"type":"string","title":"Hls Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/device/cameras/{camera_id}/self":{"delete":{"tags":["r9cam-device"],"summary":"Pi-initiated self-unpair","description":"Called by the Pi when the user triggers unpair from the local /setup page. Authenticates via the device's assertion. Deletes the camera from the database so the backend no longer shows it as offline.","operationId":"self_unpair_camera_v1_plugins_r9cam_device_cameras__camera_id__self_delete","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/device/cameras/{camera_id}/image-upload":{"post":{"tags":["r9cam-device"],"summary":"Internal: receive an image pushed directly from a paired Raspberry Pi","description":"Called by the Pi after a successful capture. Authenticated with a short-lived device assertion (same credential used by the WebSocket relay). The Pi provides the JPEG body plus two JSON blobs: `capture_metadata` (libcamera metadata) and `upload_metadata` (opaque dict forwarded by whichever caller triggered the capture, typically `{product_id, description}`). The backend stores the image via the normal image storage service and returns a tiny ack envelope the Pi consumes.","operationId":"receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceImageUploadAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/device/cameras/{camera_id}/preview-thumbnail-upload":{"post":{"tags":["r9cam-device"],"summary":"Internal: receive a cached preview thumbnail pushed directly from a paired Raspberry Pi","description":"Called by the Pi's background thumbnail worker. Authenticated with the same short-lived device assertion used by the WebSocket relay. Stores a deterministic per-camera JPEG cache file for camera-card previews without creating an Image database row.","operationId":"receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePreviewThumbnailAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/pairing/claim":{"post":{"tags":["RPi Camera Pairing"],"summary":"Claim a pairing code and create a camera (called by user)","description":"Claim a pairing code and create a WebSocket-relayed camera.\n\nThe pending record is consumed atomically (GETDEL) so two concurrent claims\nof the same code cannot both succeed: only the winner observes the pending\nrecord and goes on to create the camera. The loser sees a missing key and\ngets the same invalid-code error as an unknown code.","operationId":"claim_pairing_code_v1_plugins_r9cam_pairing_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingClaimRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/plugins/r9cam/pairing/register":{"post":{"tags":["RPi Camera Pairing"],"summary":"Register a pairing code (called by RPi)","description":"Register a short-lived pairing code and the camera's public device key.","operationId":"register_pairing_code_v1_plugins_r9cam_pairing_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingRegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/pairing/poll":{"post":{"tags":["RPi Camera Pairing"],"summary":"Poll pairing status (called by RPi)","description":"Poll for pairing completion. Returns non-secret relay metadata once claimed.\n\nTakes the code and fingerprint in a POST body (not query params) so the\nclaim credential never reaches proxy/uvicorn access logs.","operationId":"poll_pairing_status_v1_plugins_r9cam_pairing_poll_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingPollRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingPollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/admin/plugins/r9cam/cameras":{"get":{"tags":["admin"],"summary":"Get all Raspberry Pi cameras","description":"Get all Raspberry Pi cameras.","operationId":"get_all_cameras_v1_admin_plugins_r9cam_cameras_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"owner_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"}},{"name":"owner_email[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email[Ilike]"}},{"name":"owner_username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"}},{"name":"owner_username[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+created_at","+owner_email","+owner_username","name","created_at","owner_email","owner_username","-name","-created_at","-owner_email","-owner_username"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CameraRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/plugins/r9cam/cameras/{camera_id}":{"get":{"tags":["admin"],"summary":"Get Raspberry Pi camera by ID","description":"Get single Raspberry Pi camera by ID.","operationId":"get_camera_v1_admin_plugins_r9cam_cameras__camera_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin"],"summary":"Delete Raspberry Pi camera","description":"Delete Raspberry Pi camera.","operationId":"delete_camera_v1_admin_plugins_r9cam_cameras__camera_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/plugins/r9cam/cameras/{camera_id}/status":{"get":{"tags":["admin"],"summary":"Get Raspberry Pi camera online status","description":"Get Raspberry Pi camera online status.","operationId":"get_camera_status_v1_admin_plugins_r9cam_cameras__camera_id__status_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/stats/totals":{"get":{"tags":["stats"],"summary":"Get Stats Totals","description":"System-wide all-time aggregate statistics.","operationId":"get_stats_totals_v1_stats_totals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotalsResponse"}}}}},"x-audience":["public","app"]}},"/v1/stats/categories":{"get":{"tags":["stats"],"summary":"Get Stats Categories","description":"Product categories ordered by count, capped at limit (max 100).\n\n`scope` selects what is counted: `products` (top-level products only, the\ndefault), `components` (categorised by the component's own type), or `all`.","operationId":"get_stats_categories_v1_stats_categories_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"scope","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CategoryScope","default":"products"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/stats/series":{"get":{"tags":["stats"],"summary":"Get Stats Series","description":"Time-bucketed activity series. Granularity: day | week | month | year.","operationId":"get_stats_series_v1_stats_series_get","parameters":[{"name":"granularity","in":"query","required":false,"schema":{"enum":["day","week","month","year"],"type":"string","default":"month","title":"Granularity"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}}},"components":{"schemas":{"Body_auth_bearer_login_v1_auth_bearer_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_auth_bearer_login_v1_auth_bearer_login_post"},"Body_auth_session_login_v1_auth_session_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_auth_session_login_v1_auth_session_login_post"},"Body_capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post":{"properties":{"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id","description":"ID of product to associate the image with"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Custom description for the image"}},"type":"object","required":["product_id"],"title":"Body_capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post"},"Body_receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Captured JPEG"},"capture_metadata":{"type":"string","title":"Capture Metadata","description":"libcamera capture metadata as a JSON string"},"upload_metadata":{"type":"string","title":"Upload Metadata","description":"Parent association metadata as a JSON string"}},"type":"object","required":["file","capture_metadata","upload_metadata"],"title":"Body_receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post"},"Body_receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Cached preview JPEG thumbnail"}},"type":"object","required":["file"],"title":"Body_receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post"},"Body_reset_forgot_password_v1_auth_forgot_password_post":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"Body_reset_forgot_password_v1_auth_forgot_password_post"},"Body_reset_reset_password_v1_auth_reset_password_post":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","title":"Password"}},"type":"object","required":["token","password"],"title":"Body_reset_reset_password_v1_auth_reset_password_post"},"Body_start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post":{"properties":{"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id","description":"ID of product to associate the video with"},"title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Title","description":"Custom video title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Custom description for the video"},"privacy_status":{"$ref":"#/components/schemas/YouTubePrivacyStatus","description":"Privacy status for the YouTube video","default":"private"}},"type":"object","required":["product_id"],"title":"Body_start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post"},"Body_upload_component_file_v1_components__component_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_component_file_v1_components__component_id__files_post"},"Body_upload_component_image_v1_components__component_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_component_image_v1_components__component_id__images_post"},"Body_upload_material_file_v1_admin_materials__material_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_material_file_v1_admin_materials__material_id__files_post"},"Body_upload_material_image_v1_admin_materials__material_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_material_image_v1_admin_materials__material_id__images_post"},"Body_upload_product_file_v1_products__product_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_product_file_v1_products__product_id__files_post"},"Body_upload_product_image_v1_products__product_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_product_image_v1_products__product_id__images_post"},"Body_upload_product_type_file_v1_admin_product_types__product_type_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_product_type_file_v1_admin_product_types__product_type_id__files_post"},"Body_upload_product_type_image_v1_admin_product_types__product_type_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_product_type_image_v1_admin_product_types__product_type_id__images_post"},"Body_verify_request_token_v1_auth_request_verify_token_post":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"Body_verify_request_token_v1_auth_request_verify_token_post"},"Body_verify_verify_v1_auth_verify_post":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"Body_verify_verify_v1_auth_verify_post"},"CacheNamespace":{"type":"string","enum":["reference-data","stats"],"title":"CacheNamespace","description":"Cache namespace identifiers for different application areas."},"CameraConnectionStatus":{"type":"string","enum":["online","offline","unauthorized","forbidden","error"],"title":"CameraConnectionStatus","description":"Camera connection status."},"CameraCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"relay_public_key_jwk":{"$ref":"#/components/schemas/RelayPublicKeyJWK"},"relay_key_id":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]+$","title":"Relay Key Id"}},"additionalProperties":false,"type":"object","required":["name","relay_public_key_jwk","relay_key_id"],"title":"CameraCreate","description":"Schema for creating a WebSocket-relayed camera.","examples":[{"description":"Ceiling-mounted camera above the teardown bench","name":"Workbench Camera","relay_key_id":"cam-key-1","relay_public_key_jwk":{"crv":"P-256","kid":"cam-key-1","kty":"EC","x":"axfR8uEsQkf4vOblY6RA8ncDfYEt6zOg9KE5RdiYwpY","y":"T-NC4v4af5uO5-tKfA-eFivOM1drMV7Oy7ZAaDe_UfU"}}]},"CameraCredentialStatus":{"type":"string","enum":["active","revoked"],"title":"CameraCredentialStatus","description":"Status of the camera's relay device credential."},"CameraMode":{"type":"string","enum":["photo","video"],"title":"CameraMode","description":"Camera use mode. Contains camera configuration for each mode."},"CameraProperties":{"properties":{"Model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"unit_cell_size":{"anyOf":[{"prefixItems":[{"type":"integer","exclusiveMinimum":0.0},{"type":"integer","exclusiveMinimum":0.0}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Unit Cell Size","description":"Sensor unit cell size in nanometers"},"pixel_array_size":{"anyOf":[{"prefixItems":[{"type":"integer","exclusiveMinimum":0.0},{"type":"integer","exclusiveMinimum":0.0}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Pixel Array Size"},"sensor_sensitivity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sensor Sensitivity"}},"type":"object","title":"CameraProperties","description":"Static camera properties from libcamera.\n\nFor more info, see https://github.com/raspberrypi/libcamera/blob/main/src/libcamera/property_ids_core.yaml."},"CameraRead":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"owner_id":{"type":"string","format":"uuid4","title":"Owner Id"},"relay_key_id":{"type":"string","title":"Relay Key Id"},"relay_credential_status":{"$ref":"#/components/schemas/CameraCredentialStatus"}},"type":"object","required":["name","id","owner_id","relay_key_id","relay_credential_status"],"title":"CameraRead","description":"Basic Camera Read schema.","examples":[{"created_at":"2026-04-28T10:00:00Z","description":"Ceiling-mounted camera above the teardown bench","id":"12345678-cc4e-405c-8553-7806424de2a1","name":"Workbench Camera","owner_id":"87654321-cc4e-405c-8553-7806424de2a1","relay_credential_status":"active","relay_key_id":"cam-key-1","updated_at":"2026-04-28T10:00:00Z"}]},"CameraReadWithStatus":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"owner_id":{"type":"string","format":"uuid4","title":"Owner Id"},"relay_key_id":{"type":"string","title":"Relay Key Id"},"relay_credential_status":{"$ref":"#/components/schemas/CameraCredentialStatus"},"status":{"$ref":"#/components/schemas/CameraStatus"},"telemetry":{"anyOf":[{"$ref":"#/components/schemas/TelemetrySnapshot"},{"type":"null"}]},"preview_thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Thumbnail Url"}},"type":"object","required":["name","id","owner_id","relay_key_id","relay_credential_status","status"],"title":"CameraReadWithStatus","description":"Schema for camera read with online status.","examples":[{"created_at":"2026-04-28T10:00:00Z","description":"Ceiling-mounted camera above the teardown bench","id":"12345678-cc4e-405c-8553-7806424de2a1","name":"Workbench Camera","owner_id":"87654321-cc4e-405c-8553-7806424de2a1","relay_credential_status":"active","relay_key_id":"cam-key-1","updated_at":"2026-04-28T10:00:00Z"}]},"CameraStatus":{"properties":{"connection":{"$ref":"#/components/schemas/CameraConnectionStatus"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"details":{"anyOf":[{"$ref":"#/components/schemas/CameraStatusView"},{"type":"null"}]}},"type":"object","required":["connection"],"title":"CameraStatus","description":"Camera connection status and details."},"CameraStatusView":{"properties":{"current_mode":{"anyOf":[{"$ref":"#/components/schemas/CameraMode"},{"type":"null"}]},"stream":{"anyOf":[{"$ref":"#/components/schemas/StreamView"},{"type":"null"}]}},"type":"object","title":"CameraStatusView","description":"API response model for camera status."},"CameraUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"relay_public_key_jwk":{"anyOf":[{"$ref":"#/components/schemas/RelayPublicKeyJWK"},{"type":"null"}]},"relay_key_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]+$"},{"type":"null"}],"title":"Relay Key Id"},"relay_credential_status":{"anyOf":[{"$ref":"#/components/schemas/CameraCredentialStatus"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"CameraUpdate","description":"Schema for updating a camera.","examples":[{"description":"Camera assigned to the repairability bench"}]},"CaptureMetadata":{"properties":{"exposure_time":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Exposure Time","description":"Exposure time in microseconds"},"frame_duration":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Frame Duration","description":"Frame duration in microseconds"},"color_temperature":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Color Temperature","description":"Color temperature in K"},"analogue_gain":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Analogue Gain"},"digital_gain":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Digital Gain"},"lux":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Lux","description":"Illuminance in lux"},"sensor_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sensor Temperature","description":"Sensor temperature in \u00b0C"}},"type":"object","title":"CaptureMetadata","description":"Dynamic capture metadata from libcamera.\n\nFor more info, see https://github.com/raspberrypi/libcamera/blob/main/src/libcamera/control_ids_core.yaml."},"CategoriesResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"limit":{"type":"integer","title":"Limit"},"scope":{"$ref":"#/components/schemas/CategoryScope"},"categories":{"items":{"$ref":"#/components/schemas/CategoryStat"},"type":"array","title":"Categories"}},"type":"object","required":["generated_at","limit","scope","categories"],"title":"CategoriesResponse","description":"Response payload for the top-categories endpoint."},"CategoryCreate":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"taxonomy_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Taxonomy Id"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryCreate"},"type":"array","title":"Subcategories","description":"List of subcategories to create under this category"}},"additionalProperties":false,"type":"object","required":["name"],"title":"CategoryCreate","description":"Schema for creating a category, optionally with nested subcategories.\n\n- ``taxonomy_id`` is required for root categories and ignored when\n ``supercategory_id`` is provided (the parent's taxonomy is inherited).\n- ``supercategory_id`` is optional; when set the new category becomes a\n nested category under that parent."},"CategoryRead":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"taxonomy_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Taxonomy Id","description":"ID of the taxonomy"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"}},"type":"object","required":["name","id","taxonomy_id"],"title":"CategoryRead","description":"Schema for reading flat category information.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","supercategory_id":1,"taxonomy_id":1}]},"CategoryReadAsSubCategory":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","id"],"title":"CategoryReadAsSubCategory","description":"Schema for reading subcategory information.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals"}]},"CategoryReadAsSubCategoryWithRecursiveSubCategories":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryReadAsSubCategoryWithRecursiveSubCategories"},"type":"array","title":"Subcategories","description":"List of subcategories"}},"type":"object","required":["name","id"],"title":"CategoryReadAsSubCategoryWithRecursiveSubCategories","description":"Schema for reading category information with recursive subcategories.","examples":[{"description":"All kinds of metals","id":1,"name":"Metals","subcategories":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","subcategories":[{"description":"Steel alloys","id":3,"name":"Steel"}]}]}]},"CategoryReadWithRecursiveSubCategories":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"taxonomy_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Taxonomy Id","description":"ID of the taxonomy"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryReadAsSubCategoryWithRecursiveSubCategories"},"type":"array","title":"Subcategories","description":"List of subcategories"}},"type":"object","required":["name","id","taxonomy_id"],"title":"CategoryReadWithRecursiveSubCategories","description":"Schema for reading base category information with recursive subcategories.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","supercategory_id":1,"taxonomy_id":1}]},"CategoryReadWithRelationshipsAndFlatSubCategories":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"taxonomy_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Taxonomy Id","description":"ID of the taxonomy"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"},"materials":{"items":{"$ref":"#/components/schemas/MaterialRead"},"type":"array","title":"Materials","description":"List of materials linked to the category"},"product_types":{"items":{"$ref":"#/components/schemas/ProductTypeRead"},"type":"array","title":"Product Types","description":"List of product types linked to the category"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryReadAsSubCategory"},"type":"array","title":"Subcategories","description":"List of subcategories"}},"type":"object","required":["name","id","taxonomy_id"],"title":"CategoryReadWithRelationshipsAndFlatSubCategories","description":"Schema for reading category information with flat (one level deep) subcategories.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","supercategory_id":1,"taxonomy_id":1}]},"CategoryScope":{"type":"string","enum":["products","components","all"],"title":"CategoryScope","description":"Which population a category breakdown counts.\n\nA product's category is its own ``product_type``, and every product carries\none -- including components. A laptop torn down into a PCB and a screw\ncontributes one product to \"Laptop\" and one component each to \"PCB\" and\n\"Screw\"; it contributes nothing to \"Laptop\" from its components. So the\npopulation being categorised has to be chosen explicitly:\n\n- ``PRODUCTS``: top-level products only (``parent_id IS NULL``) -- the\n things that were torn down.\n- ``COMPONENTS``: components only (``parent_id IS NOT NULL``) -- the parts\n extracted from them, categorised by the part's own type.\n- ``ALL``: both, categorised the same way."},"CategoryStat":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["name","count"],"title":"CategoryStat","description":"Count of products in a single category, within the requested scope."},"CategoryUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"}},"additionalProperties":false,"type":"object","title":"CategoryUpdate","description":"Schema for the partial update of a category.\n\nUpdating the parent_id or taxonomy_id is not allowed, as it greatly increases the risk\nfor self-referential loops and other inconsistencies.","examples":[{"description":"All kinds of metals","name":"Metals"}]},"CircularityPropertiesFields":{"properties":{"recyclability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Recyclability"},"disassemblability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Disassemblability"},"remanufacturability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Remanufacturability"}},"additionalProperties":false,"type":"object","title":"CircularityPropertiesFields","description":"Circularity note fields read from a product JSON object."},"CircularityPropertiesInputFields":{"properties":{"recyclability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Recyclability"},"disassemblability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Disassemblability"},"remanufacturability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Remanufacturability"}},"additionalProperties":false,"type":"object","title":"CircularityPropertiesInputFields","description":"Write-side circularity note fields with user-text validation."},"ComponentCreateWithComponents":{"properties":{"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesInputFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"type":"array","maxItems":100,"title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"amount_in_parent":{"type":"integer","maximum":1000.0,"exclusiveMinimum":0.0,"title":"Amount In Parent","description":"Quantity within parent product. Required for component products."},"components":{"items":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"type":"array","maxItems":100,"title":"Components","description":"Set of component products"}},"additionalProperties":false,"type":"object","required":["name","amount_in_parent"],"title":"ComponentCreateWithComponents","description":"Schema for creating a component with optional sub-components.\n\nThis schema is used for recursive creation of components with sub-components.\n\nOwner ID and parent ID are inferred from the parent product within the CRUD layer."},"ComponentExportRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"components":{"items":{"$ref":"#/components/schemas/ComponentExportRead"},"type":"array","title":"Components","description":"List of sub-components"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentExportRead","description":"Component in a product export: the detail read plus every sub-component."},"ComponentRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentRead","description":"Read schema for components (nested inside a base product tree)."},"ComponentReadWithRecursiveComponents":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"components":{"items":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"},"type":"array","title":"Components","description":"List of component products"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentReadWithRecursiveComponents","description":"Component read schema with recursive sub-components."},"ComponentReadWithRelationshipsAndFlatComponents":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"components":{"items":{"$ref":"#/components/schemas/ComponentRead"},"type":"array","title":"Components","description":"List of sub-components"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentReadWithRelationshipsAndFlatComponents","description":"Component detail schema with one level of child components."},"DeviceImageUploadAck":{"properties":{"image_id":{"type":"string","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9._~-]+$","title":"Image Id","description":"Stored backend image ID."},"image_url":{"type":"string","maxLength":2048,"minLength":1,"pattern":"^(https?://[^\\s]+|/([^\\s/][^\\s]*)?)$","title":"Image Url","description":"Backend-hosted URL for the stored image"}},"additionalProperties":false,"type":"object","required":["image_id","image_url"],"title":"DeviceImageUploadAck","description":"Backend -> Pi acknowledgement of a direct image upload."},"DevicePreviewThumbnailAck":{"properties":{"preview_thumbnail_url":{"type":"string","maxLength":2048,"minLength":1,"pattern":"^(https?://[^\\s]+|/([^\\s/][^\\s]*)?)$","title":"Preview Thumbnail Url","description":"Backend-hosted URL for the cached preview thumbnail"}},"additionalProperties":false,"type":"object","required":["preview_thumbnail_url"],"title":"DevicePreviewThumbnailAck","description":"Backend -> Pi acknowledgement of a cached preview-thumbnail upload."},"DevicePublicKeyJWK":{"properties":{"kty":{"type":"string","pattern":"^EC$","title":"Kty"},"crv":{"type":"string","pattern":"^P-256$","title":"Crv"},"x":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"X"},"y":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"Y"},"use":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Use"},"kid":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Kid"}},"additionalProperties":false,"type":"object","required":["kty","crv","x","y"],"title":"DevicePublicKeyJWK","description":"Public P-256 JWK registered by the Pi during pairing."},"EmailValidationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"EmailValidationRequest","description":"Body for the pre-registration email validation check."},"ErasureContent":{"type":"string","enum":["anonymize","delete"]},"ErrorModel":{"properties":{"detail":{"anyOf":[{"type":"string"},{"additionalProperties":{"type":"string"},"type":"object"}],"title":"Detail"}},"type":"object","required":["detail"],"title":"ErrorModel"},"FileRead":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id","description":"ID of the parent object"},"parent_type":{"$ref":"#/components/schemas/MediaParentType","description":"Type of the parent object, e.g. product, product_type, material"}},"type":"object","required":["id","filename","parent_id","parent_type"],"title":"FileRead","description":"Schema for reading file information.","examples":[{"description":"Assembly manual PDF","file_url":"/uploads/files/manuals/manual.pdf","filename":"manual.pdf","id":"12345678-cc4e-405c-8553-7806424de2a1"}]},"FileReadWithinParent":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"}},"type":"object","required":["id","filename"],"title":"FileReadWithinParent","description":"Schema for reading file information within a parent object.","examples":[{"description":"Assembly manual PDF","file_url":"/uploads/files/manuals/manual.pdf","filename":"manual.pdf","id":"12345678-cc4e-405c-8553-7806424de2a1"}]},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HttpUrlToDB":{"type":"string","maxLength":250,"minLength":1,"format":"uri"},"ImageRead":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Image Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"width_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width Px","description":"Pixel width of the stored image, after any EXIF rotation. Null for images uploaded before dimensions were recorded whose file could not be measured since, which includes every remotely stored (S3) one. With `height_px` this gives the aspect ratio every entry in `thumbnail_urls` shares, so a client can reserve layout space before the image loads and derive each derivative's height from its width."},"height_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height Px","description":"Pixel height of the stored image, after rotation."},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"parent_type":{"$ref":"#/components/schemas/MediaParentType","description":"Type of the parent object, e.g. product, product_type, material"}},"type":"object","required":["id","filename","parent_id","parent_type"],"title":"ImageRead","description":"Schema for reading image information.","examples":[{"description":"Front view of the product","filename":"front-view.webp","id":"12345678-cc4e-405c-8553-7806424de2a1","image_metadata":{"camera_make":"Raspberry Pi","orientation":"landscape"},"image_url":"/uploads/images/products/front-view.webp","thumbnail_url":"/uploads/images/products/front-view_thumb_200.webp"}]},"ImageReadWithinParent":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Image Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"width_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width Px","description":"Pixel width of the stored image, after any EXIF rotation. Null for images uploaded before dimensions were recorded whose file could not be measured since, which includes every remotely stored (S3) one. With `height_px` this gives the aspect ratio every entry in `thumbnail_urls` shares, so a client can reserve layout space before the image loads and derive each derivative's height from its width."},"height_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height Px","description":"Pixel height of the stored image, after rotation."},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."}},"type":"object","required":["id","filename"],"title":"ImageReadWithinParent","description":"Schema for reading image information within a parent object.","examples":[{"description":"Front view of the product","filename":"front-view.webp","id":"12345678-cc4e-405c-8553-7806424de2a1","image_metadata":{"camera_make":"Raspberry Pi","orientation":"landscape"},"image_url":"/uploads/images/products/front-view.webp","thumbnail_url":"/uploads/images/products/front-view_thumb_200.webp"}]},"Links":{"properties":{"first":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First","examples":["/api/v1/users?limit=1&offset1"]},"last":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last","examples":["/api/v1/users?limit=1&offset1"]},"self":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Self","examples":["/api/v1/users?limit=1&offset1"]},"next":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next","examples":["/api/v1/users?limit=1&offset1"]},"prev":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev","examples":["/api/v1/users?limit=1&offset1"]}},"type":"object","title":"Links"},"LocalAccessInfo":{"properties":{"local_api_key":{"type":"string","maxLength":256,"minLength":8,"title":"Local Api Key"},"candidate_urls":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","maxItems":16,"minItems":1,"title":"Candidate Urls"},"mdns_name":{"anyOf":[{"type":"string","maxLength":253,"pattern":"^[A-Za-z0-9.-]+$"},{"type":"null"}],"title":"Mdns Name"}},"additionalProperties":false,"type":"object","required":["local_api_key","candidate_urls"],"title":"LocalAccessInfo","description":"Plugin -> backend -> frontend local direct-connection bootstrap payload."},"MaterialCreateWithCategories":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3"},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm"},"category_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Category Ids","description":"List of category IDs"}},"additionalProperties":false,"type":"object","required":["name"],"title":"MaterialCreateWithCategories","description":"Schema for creating a material with links to existing categories."},"MaterialProductLinkCreateWithinProduct":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"},"material_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Material Id","description":"ID of the material in the product"}},"additionalProperties":false,"type":"object","required":["quantity","material_id"],"title":"MaterialProductLinkCreateWithinProduct","description":"Schema for creating material-product links from the product side."},"MaterialProductLinkCreateWithinProductAndMaterial":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"}},"additionalProperties":false,"type":"object","required":["quantity"],"title":"MaterialProductLinkCreateWithinProductAndMaterial","description":"Schema for creating material-product links with an external material ID."},"MaterialProductLinkReadWithinMaterial":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id"},"product":{"$ref":"#/components/schemas/ProductSummary"}},"type":"object","required":["quantity","product_id","product"],"title":"MaterialProductLinkReadWithinMaterial","description":"Schema for reading material-product links from the material side."},"MaterialProductLinkReadWithinProduct":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"material_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Material Id"},"material":{"$ref":"#/components/schemas/MaterialRead"}},"type":"object","required":["quantity","material_id","material"],"title":"MaterialProductLinkReadWithinProduct","description":"Schema for reading material-product links from the product side."},"MaterialProductLinkUpdate":{"properties":{"quantity":{"anyOf":[{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Quantity"},"unit":{"anyOf":[{"$ref":"#/components/schemas/Unit"},{"type":"null"}],"default":"kg"}},"additionalProperties":false,"type":"object","title":"MaterialProductLinkUpdate","description":"Schema for updating material-product links."},"MaterialRead":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Material"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Material"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source","description":"Source of the material data, e.g. URL, IRI or citation key"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3","description":"Volumetric density (kg/m^3)"},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm","description":"Is this material a Critical Raw Material (CRM)?"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","id"],"title":"MaterialRead","description":"Schema for reading material information."},"MaterialReadWithRelationships":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Material"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Material"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source","description":"Source of the material data, e.g. URL, IRI or citation key"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3","description":"Volumetric density (kg/m^3)"},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm","description":"Is this material a Critical Raw Material (CRM)?"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"categories":{"items":{"$ref":"#/components/schemas/CategoryRead"},"type":"array","title":"Categories","description":"List of categories linked to the material"},"product_links":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinMaterial"},"type":"array","title":"Product Links","description":"List of products that have this material"},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"List of images for the material"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"List of files for the material"}},"type":"object","required":["name","id"],"title":"MaterialReadWithRelationships","description":"Schema for reading material information with all relationships."},"MaterialUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"source":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Source","description":"Source of the material data, e.g. URL, IRI or citation key"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3","description":"Volumetric density (kg/m\u00b3) "},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm","description":"Is this material a Critical Raw Material (CRM)?"}},"additionalProperties":false,"type":"object","title":"MaterialUpdate","description":"Schema for a partial update of a material."},"MediaParentType":{"type":"string","enum":["product","product_type","material"],"title":"MediaParentType","description":"Parent entity types that can own files and images."},"MfaChallengeRequest":{"properties":{"mfa_token":{"type":"string","format":"password","title":"Mfa Token","writeOnly":true},"code":{"type":"string","maxLength":20,"minLength":6,"title":"Code"}},"additionalProperties":false,"type":"object","required":["mfa_token","code"],"title":"MfaChallengeRequest","description":"Request to complete MFA with either a TOTP code or a recovery code."},"MfaOAuthClaimRequest":{"properties":{"mfa_handoff":{"type":"string","format":"password","title":"Mfa Handoff","writeOnly":true}},"additionalProperties":false,"type":"object","required":["mfa_handoff"],"title":"MfaOAuthClaimRequest","description":"Request to claim an OAuth MFA handoff."},"MfaPendingResponse":{"properties":{"mfa_required":{"type":"boolean","title":"Mfa Required","default":true},"mfa_token":{"type":"string","title":"Mfa Token","description":"Short-lived token for completing an MFA challenge"}},"type":"object","required":["mfa_token"],"title":"MfaPendingResponse","description":"Response returned after the first authentication factor succeeds."},"MfaRecoveryCodesRegenerateRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"title":"Code"}},"additionalProperties":false,"type":"object","required":["code"],"title":"MfaRecoveryCodesRegenerateRequest","description":"Request to reissue recovery codes, confirmed with a current TOTP code."},"MfaRecoveryCodesResponse":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes"}},"type":"object","required":["recovery_codes"],"title":"MfaRecoveryCodesResponse","description":"One-time delivery of freshly generated recovery codes."},"MfaTotpConfirmRequest":{"properties":{"setup_token":{"type":"string","format":"password","title":"Setup Token","writeOnly":true},"code":{"type":"string","maxLength":6,"minLength":6,"title":"Code"},"password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Password","description":"Current account password, to reauthenticate the change. Required unless the account has no usable password (OAuth-only)."}},"additionalProperties":false,"type":"object","required":["setup_token","code"],"title":"MfaTotpConfirmRequest","description":"Request to confirm authenticated TOTP setup."},"MfaTotpConfirmResponse":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes"},"tokens":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenResponse"},{"type":"null"}],"description":"New bearer tokens; null for browser sessions, which get new cookies instead"}},"type":"object","required":["recovery_codes"],"title":"MfaTotpConfirmResponse","description":"Recovery codes plus the session that replaces the ones enrolment revoked."},"MfaTotpDisableRequest":{"properties":{"code":{"type":"string","maxLength":20,"minLength":6,"title":"Code"},"password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Password","description":"Current account password, to reauthenticate the change. Required unless the account has no usable password (OAuth-only)."}},"additionalProperties":false,"type":"object","required":["code"],"title":"MfaTotpDisableRequest","description":"Request to turn off TOTP MFA, confirmed with the password and a current or recovery code."},"MfaTotpSetupResponse":{"properties":{"setup_token":{"type":"string","title":"Setup Token"},"secret":{"type":"string","title":"Secret"},"otpauth_uri":{"type":"string","title":"Otpauth Uri"}},"type":"object","required":["setup_token","secret","otpauth_uri"],"title":"MfaTotpSetupResponse","description":"TOTP setup material for authenticator apps."},"OAuth2AuthorizeResponse":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"OAuth2AuthorizeResponse","description":"Response model for OAuth2 authorization endpoint."},"OAuthAccountRead":{"properties":{"oauth_name":{"type":"string","title":"Oauth Name"},"account_id":{"type":"string","title":"Account Id"},"account_email":{"type":"string","title":"Account Email"}},"type":"object","required":["oauth_name","account_id","account_email"],"title":"OAuthAccountRead","description":"Read schema for OAuth accounts."},"Page_CameraRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CameraRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CameraRead]"},"Page_CategoryReadWithRecursiveSubCategories_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CategoryReadWithRecursiveSubCategories"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CategoryReadWithRecursiveSubCategories]"},"Page_CategoryReadWithRelationshipsAndFlatSubCategories_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CategoryReadWithRelationshipsAndFlatSubCategories"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CategoryReadWithRelationshipsAndFlatSubCategories]"},"Page_CategoryRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CategoryRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CategoryRead]"},"Page_MaterialReadWithRelationships_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MaterialReadWithRelationships"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[MaterialReadWithRelationships]"},"Page_ProductTypeReadWithRelationships_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductTypeReadWithRelationships"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[ProductTypeReadWithRelationships]"},"Page_TaxonomyRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaxonomyRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[TaxonomyRead]"},"Page_TypeVar_Customized_ComponentRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ComponentRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[ComponentRead]"},"Page_TypeVar_Customized_FileReadWithinParent_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FileReadWithinParent"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[FileReadWithinParent]"},"Page_TypeVar_Customized_ImageReadWithinParent_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ImageReadWithinParent"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[ImageReadWithinParent]"},"Page_TypeVar_Customized_ProductRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[ProductRead]"},"Page_TypeVar_Customized_str_":{"properties":{"items":{"items":{"type":"string"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[str]"},"Page_UserRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[UserRead]"},"PairingClaimRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"Pairing code displayed on the RPi's setup page."},"camera_name":{"type":"string","maxLength":100,"minLength":2,"title":"Camera Name","description":"Name for the new camera."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"type":"object","required":["code","camera_name"],"title":"PairingClaimRequest","description":"User -> backend: claim a pairing code and create a camera."},"PairingPollRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"Pairing code generated by the Pi."},"fingerprint":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]{8,64}$","title":"Fingerprint","description":"Random device fingerprint nonce chosen at registration."}},"type":"object","required":["code","fingerprint"],"title":"PairingPollRequest","description":"Pi -> backend: poll pairing status.\n\nSent as a POST body (not query params) so the pairing code and device\nfingerprint never land in reverse-proxy or uvicorn access logs."},"PairingPollResponse":{"properties":{"status":{"type":"string","enum":["waiting","paired"],"title":"Status"},"camera_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9._~-]+$"},{"type":"null"}],"title":"Camera Id"},"ws_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Ws Url"},"auth_scheme":{"anyOf":[{"$ref":"#/components/schemas/RelayAuthScheme"},{"type":"null"}]},"key_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9._~-]+$"},{"type":"null"}],"title":"Key Id"}},"additionalProperties":false,"type":"object","required":["status"],"title":"PairingPollResponse","description":"Backend -> Pi current pairing state."},"PairingRegisterRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"6-character uppercase pairing code generated by the Pi."},"rpi_fingerprint":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]{8,64}$","title":"Rpi Fingerprint","description":"Random nonce generated by the Pi. Required to retrieve credentials later."},"public_key_jwk":{"$ref":"#/components/schemas/DevicePublicKeyJWK","description":"Public P-256 JWK generated by the Pi."},"key_id":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]+$","title":"Key Id"}},"additionalProperties":false,"type":"object","required":["code","rpi_fingerprint","public_key_jwk","key_id"],"title":"PairingRegisterRequest","description":"Pi -> backend pairing registration payload."},"PairingRegisterResponse":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"6-character uppercase pairing code generated by the Pi."},"expires_in":{"type":"integer","maximum":600.0,"exclusiveMinimum":0.0,"title":"Expires In","description":"Seconds until the pairing code expires."}},"additionalProperties":false,"type":"object","required":["code","expires_in"],"title":"PairingRegisterResponse","description":"Backend -> Pi acknowledgement of a pairing registration."},"ProductCreateWithComponents":{"properties":{"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesInputFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"type":"array","maxItems":100,"title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"videos":{"items":{"$ref":"#/components/schemas/VideoCreateWithinProduct"},"type":"array","maxItems":5,"title":"Videos","description":"Disassembly videos"},"components":{"items":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"type":"array","maxItems":100,"title":"Components","description":"Set of component products"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ProductCreateWithComponents","description":"Schema for creating a base product with optional components.","examples":[{"bill_of_materials":[{"material_id":1,"quantity":0.3,"unit":"g"},{"material_id":2,"quantity":0.1,"unit":"g"}],"brand":"Brand 1","circularity_properties":{"disassemblability":"Most fasteners are visible and non-destructive to remove.","recyclability":"Metal frame and plastic shell can be separated with basic tools."},"depth_cm":50,"description":"Complete chair assembly","height_cm":150,"model":"Model 1","name":"Office Chair","product_type_id":1,"videos":[{"description":"Disassembly video","url":"https://www.youtube.com/watch?v=123456789"}],"weight_g":20000,"width_cm":70}]},"ProductExportRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"videos":{"items":{"$ref":"#/components/schemas/VideoReadWithinProduct"},"type":"array","title":"Videos","description":"Disassembly videos"},"components":{"items":{"$ref":"#/components/schemas/ComponentExportRead"},"type":"array","title":"Components","description":"List of component products"}},"type":"object","required":["name","id"],"title":"ProductExportRead","description":"Base product in a product export: the detail read plus its whole component tree."},"ProductFacetValue":{"properties":{"value":{"type":"string","title":"Value"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["value","count"],"title":"ProductFacetValue","description":"One derived product facet option and its result count."},"ProductRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"}},"type":"object","required":["name","id"],"title":"ProductRead","description":"Read schema for base products (top of a product tree)."},"ProductReadWithRelationshipsAndFlatComponents":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"videos":{"items":{"$ref":"#/components/schemas/VideoReadWithinProduct"},"type":"array","title":"Videos","description":"Disassembly videos"},"components":{"items":{"$ref":"#/components/schemas/ComponentRead"},"type":"array","title":"Components","description":"List of component products"}},"type":"object","required":["name","id"],"title":"ProductReadWithRelationshipsAndFlatComponents","description":"Base-product detail schema with one level of child components."},"ProductSummary":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"ProductSummary","description":"Minimal product summary for embedding in unrelated contexts (e.g. material links).\n\nDeliberately narrower than ``ProductRead``: no owner, physical/circularity\nproperties, or other detail-view fields since no consumer needs them here.\nExtend with more fields only when an actual caller needs them."},"ProductTypeCreateWithCategories":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"category_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Category Ids"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ProductTypeCreateWithCategories","description":"Schema for creating a product type with links to existing categories."},"ProductTypeRead":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Product Type."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Product Type."},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","id"],"title":"ProductTypeRead","description":"Schema for reading flat product type information."},"ProductTypeReadWithRelationships":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Product Type."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Product Type."},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"categories":{"items":{"$ref":"#/components/schemas/CategoryRead"},"type":"array","title":"Categories"},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files"}},"type":"object","required":["name","id"],"title":"ProductTypeReadWithRelationships","description":"Schema for reading product type information with all relationships."},"ProductTypeUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"additionalProperties":false,"type":"object","title":"ProductTypeUpdate","description":"Schema for a partial update of a product type."},"ProductUpdate":{"properties":{"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesInputFields"},{"type":"null"}]},"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"amount_in_parent":{"anyOf":[{"type":"integer","maximum":1000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount In Parent","description":"Quantity within parent product. Required for component products."},"weight_g":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Depth Cm"}},"additionalProperties":false,"type":"object","title":"ProductUpdate","description":"Schema for updating product information including physical and circularity properties."},"ProfileVisibility":{"type":"string","enum":["public","community","private"],"title":"ProfileVisibility","description":"Discrete values stored on ``User.preferences[\"profile_visibility\"]``."},"PublicProfileView":{"properties":{"username":{"type":"string","pattern":"^[a-z0-9_]+$","title":"Username"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"product_count":{"type":"integer","title":"Product Count","description":"Number of products registered.","default":0},"total_weight_kg":{"type":"number","title":"Total Weight Kg","description":"Aggregate weight of products in kg.","default":0.0},"image_count":{"type":"integer","title":"Image Count","description":"Total images uploaded.","default":0},"top_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Category","description":"Most common product type."}},"type":"object","required":["username","created_at"],"title":"PublicProfileView","description":"Detailed public profile view with aggregated stats."},"RefreshTokenRequest":{"properties":{"refresh_token":{"type":"string","format":"password","title":"Refresh Token","description":"Refresh token obtained from login","writeOnly":true}},"additionalProperties":false,"type":"object","required":["refresh_token"],"title":"RefreshTokenRequest","description":"Request schema for refreshing access token.","examples":[{"refresh_token":"refresh-token-from-login"}]},"RefreshTokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token","description":"New JWT access token"},"refresh_token":{"type":"string","title":"Refresh Token","description":"Rotated refresh token"},"token_type":{"type":"string","title":"Token Type","description":"Token type (always 'bearer')","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","description":"Access token expiration time in seconds"}},"type":"object","required":["access_token","refresh_token","expires_in"],"title":"RefreshTokenResponse","description":"Response for token refresh.","examples":[{"access_token":"new-jwt-access-token","expires_in":3600,"refresh_token":"rotated-refresh-token","token_type":"bearer"}]},"RegistrationResponse":{"properties":{"detail":{"type":"string","title":"Detail","default":"If the email address is available, a verification link has been sent. Please check your inbox."}},"type":"object","title":"RegistrationResponse","description":"Uniform registration acknowledgement.\n\nDeliberately reveals nothing about whether the email already exists; the same\nbody is returned whether a new account was created or the address was already\ntaken, so registration cannot be used to enumerate accounts."},"RelayAuthScheme":{"type":"string","enum":["device_assertion"],"title":"RelayAuthScheme","description":"Authentication schemes understood by the device seam."},"RelayPublicKeyJWK":{"properties":{"kty":{"type":"string","pattern":"^EC$","title":"Kty"},"crv":{"type":"string","pattern":"^P-256$","title":"Crv"},"x":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"X"},"y":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"Y"},"use":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Use"},"kid":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Kid"}},"additionalProperties":false,"type":"object","required":["kty","crv","x","y"],"title":"RelayPublicKeyJWK","description":"Public JWK registered by an RPi camera: P-256 for ES256 or Ed25519 for EdDSA."},"SeriesPoint":{"properties":{"period":{"type":"string","title":"Period"},"teardowns":{"type":"integer","title":"Teardowns"},"parts":{"type":"integer","title":"Parts"},"mass_kg":{"type":"number","title":"Mass Kg"},"images":{"type":"integer","title":"Images"},"users_new":{"type":"integer","title":"Users New"},"users_active":{"type":"integer","title":"Users Active"}},"type":"object","required":["period","teardowns","parts","mass_kg","images","users_new","users_active"],"title":"SeriesPoint","description":"Aggregated metrics for one period of a time series."},"SeriesResponse":{"properties":{"granularity":{"type":"string","title":"Granularity"},"start":{"type":"string","format":"date","title":"Start"},"end":{"type":"string","format":"date","title":"End"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"series":{"items":{"$ref":"#/components/schemas/SeriesPoint"},"type":"array","title":"Series"}},"type":"object","required":["granularity","start","end","generated_at","series"],"title":"SeriesResponse","description":"Response payload for the time-series endpoint."},"StepUpRequest":{"properties":{"current_password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Current Password","description":"Current account password, to reauthenticate the change. Required unless the account has no usable password (OAuth-only)."},"mfa_code":{"anyOf":[{"type":"string","maxLength":20,"minLength":6},{"type":"null"}],"title":"Mfa Code","description":"Current authenticator code or a recovery code. Required when the account has MFA enabled."}},"additionalProperties":false,"type":"object","title":"StepUpRequest","description":"Optional step-up body for a sensitive account change (social login link or unlink, account deletion).\n\nOptional because an OAuth-only account has no usable password to re-assert, and an\naccount without MFA has no code; the server decides which the account needs."},"StreamMetadata":{"properties":{"camera_properties":{"$ref":"#/components/schemas/CameraProperties"},"capture_metadata":{"$ref":"#/components/schemas/CaptureMetadata"},"fps":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Fps","description":"Frames per second calculated from frame duration.","readOnly":true}},"type":"object","required":["camera_properties","capture_metadata","fps"],"title":"StreamMetadata","description":"Metadata specific to video streams."},"StreamMode":{"type":"string","enum":["youtube"],"title":"StreamMode","description":"Active stream provider/mode."},"StreamView":{"properties":{"mode":{"$ref":"#/components/schemas/StreamMode"},"provider":{"type":"string","title":"Provider","description":"Stream provider identifier"},"url":{"type":"string","minLength":1,"format":"uri","title":"Url"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"metadata":{"$ref":"#/components/schemas/StreamMetadata"}},"type":"object","required":["mode","provider","url","started_at","metadata"],"title":"StreamView","description":"Provider-neutral public model for active stream information."},"TaxonomyCreateWithCategories":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"version":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"domains":{"items":{"$ref":"#/components/schemas/TaxonomyDomain"},"type":"array","uniqueItems":true,"title":"Domains","default":[]},"source":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Source"},"categories":{"items":{"$ref":"#/components/schemas/CategoryCreate"},"type":"array","title":"Categories","description":"Categories to create in this taxonomy"}},"additionalProperties":false,"type":"object","required":["name"],"title":"TaxonomyCreateWithCategories","description":"Schema for creating a new taxonomy, optionally with new categories."},"TaxonomyDomain":{"type":"string","enum":["materials","products","other"],"title":"TaxonomyDomain","description":"Enumeration of taxonomy domains."},"TaxonomyRead":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"version":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"domains":{"items":{"$ref":"#/components/schemas/TaxonomyDomain"},"type":"array","uniqueItems":true,"title":"Domains","description":"Domains of the taxonomy, e.g. {materials, products, other}"},"source":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Source","description":"Source of the taxonomy data, e.g. URL, IRI or citation key"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","version","domains","id"],"title":"TaxonomyRead","description":"Schema for reading minimal taxonomy information.","examples":[{"description":"Taxonomy for materials","domains":["materials"],"name":"Materials Taxonomy","source":"DOI:10.2345/12345"}]},"TaxonomyUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":50,"minLength":2},{"type":"null"}],"title":"Name"},"version":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"domains":{"anyOf":[{"items":{"$ref":"#/components/schemas/TaxonomyDomain"},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Domains","description":"Domains of the taxonomy, e.g. {materials, products, other}"},"source":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Source","description":"Source of the taxonomy data"}},"additionalProperties":false,"type":"object","title":"TaxonomyUpdate","description":"Schema for the partial update of a taxonomy."},"TelemetrySnapshot":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When this snapshot was collected."},"cpu_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Temp C","description":"CPU die temperature in Celsius; None if the sysfs reading is unavailable."},"cpu_percent":{"type":"number","title":"Cpu Percent","description":"CPU utilisation as a percentage (0-100)."},"mem_percent":{"type":"number","title":"Mem Percent","description":"Memory utilisation as a percentage (0-100)."},"disk_percent":{"type":"number","title":"Disk Percent","description":"Disk utilisation on the images volume as a percentage (0-100)."},"preview_fps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Preview Fps","description":"Observed preview encoder frame rate, or None if no preview pipeline is active."},"preview_sessions":{"type":"integer","title":"Preview Sessions","description":"Number of active LL-HLS preview subscribers on the local MediaMTX instance.","default":0},"thermal_state":{"$ref":"#/components/schemas/ThermalState","description":"Thermal governor classification for this snapshot."},"current_preview_size":{"anyOf":[{"prefixItems":[{"type":"integer"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Current Preview Size","description":"Current lores-stream size (width, height); None when no preview pipeline is configured."}},"type":"object","required":["timestamp","cpu_percent","mem_percent","disk_percent","thermal_state"],"title":"TelemetrySnapshot","description":"Point-in-time device health sample emitted by the Pi plugin."},"ThemeMode":{"type":"string","enum":["light","dark","auto"],"title":"ThemeMode","description":"Supported app theme modes."},"ThermalState":{"type":"string","enum":["normal","warm","throttle","critical"],"title":"ThermalState","description":"Coarse thermal classification used by the thermal governor."},"Totals":{"properties":{"teardowns":{"type":"integer","title":"Teardowns"},"parts":{"type":"integer","title":"Parts"},"mass_kg":{"type":"number","title":"Mass Kg"},"images":{"type":"integer","title":"Images"},"users":{"type":"integer","title":"Users"}},"type":"object","required":["teardowns","parts","mass_kg","images","users"],"title":"Totals","description":"System-wide cumulative counts across all data."},"TotalsResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"totals":{"$ref":"#/components/schemas/Totals"}},"type":"object","required":["generated_at","totals"],"title":"TotalsResponse","description":"Response payload for the totals endpoint."},"Unit":{"type":"string","enum":["kg","g","m","cm"],"title":"Unit","description":"Allowed units in the data collection."},"UserPreferences":{"properties":{"email_updates_enabled":{"type":"boolean","title":"Email Updates Enabled","default":false},"profile_visibility":{"$ref":"#/components/schemas/ProfileVisibility","default":"public"},"theme_mode":{"$ref":"#/components/schemas/ThemeMode","default":"auto"},"products_welcome_dismissed":{"type":"boolean","title":"Products Welcome Dismissed","default":false},"rpi_camera_enabled":{"type":"boolean","title":"Rpi Camera Enabled","default":false},"youtube_streaming_enabled":{"type":"boolean","title":"Youtube Streaming Enabled","default":false}},"additionalProperties":false,"type":"object","title":"UserPreferences","description":"Typed user preferences persisted as JSONB."},"UserPreferencesUpdate":{"properties":{"email_updates_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Updates Enabled"},"profile_visibility":{"anyOf":[{"$ref":"#/components/schemas/ProfileVisibility"},{"type":"null"}]},"theme_mode":{"anyOf":[{"$ref":"#/components/schemas/ThemeMode"},{"type":"null"}]},"products_welcome_dismissed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Products Welcome Dismissed"},"rpi_camera_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rpi Camera Enabled"},"youtube_streaming_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Youtube Streaming Enabled"}},"additionalProperties":false,"type":"object","title":"UserPreferencesUpdate","description":"Patch model for user preferences updates."},"UserRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_superuser":{"type":"boolean","title":"Is Superuser","default":false},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"oauth_accounts":{"items":{"$ref":"#/components/schemas/OAuthAccountRead"},"type":"array","title":"Oauth Accounts","description":"List of linked OAuth accounts."},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","description":"Whether TOTP MFA is enabled for this account.","default":false},"has_usable_password":{"type":"boolean","title":"Has Usable Password","description":"Whether the account has a user-set password (false for OAuth-only accounts). Clients use it to decide whether unlinking a social login needs a password.","default":true},"preferences":{"$ref":"#/components/schemas/UserPreferences","description":"User preferences."},"terms_accepted_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Terms Accepted Version","description":"Version of the contributor terms this account accepted at signup, or null if it predates acceptance tracking. Recorded by the server; not client-settable."},"terms_accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Terms Accepted At","description":"When the contributor terms were accepted. Recorded by the server; not client-settable."},"terms_acceptance_required":{"type":"boolean","title":"Terms Acceptance Required","description":"Whether this account should be prompted to accept the contributor terms. True when it has never accepted, or accepted a version older than the one that grants the publication licence a dataset release needs.","default":false},"role":{"$ref":"#/components/schemas/UserRole","description":"Contributor tier. `lab` accounts may upload non-image research files and carry a larger upload quota. Set by an administrator; not client-settable.","default":"contributor"},"upload_quota_files":{"type":"integer","title":"Upload Quota Files","description":"Maximum number of files and images this account's role allows.","default":0},"upload_quota_bytes":{"type":"integer","title":"Upload Quota Bytes","description":"Maximum total upload size this account's role allows.","default":0},"image_upload_max_bytes":{"type":"integer","title":"Image Upload Max Bytes","description":"Largest single image this account may upload.","default":0},"image_upload_max_pixels":{"type":"integer","title":"Image Upload Max Pixels","description":"Most pixels (width x height) in a single image this account may upload.","default":0},"upload_file_count":{"type":"integer","title":"Upload File Count","description":"Files and images this account currently has stored.","default":0},"upload_total_bytes":{"type":"integer","title":"Upload Total Bytes","description":"Total bytes this account currently has stored.","default":0}},"type":"object","required":["id","email"],"title":"UserRead","description":"Read schema for users.","examples":[{"email":"user@example.com","id":"1fa85f64-5717-4562-b3fc-2c963f66afa6","is_active":true,"is_superuser":false,"is_verified":true,"username":"username"}]},"UserRegister":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":12,"format":"password","title":"Password"},"username":{"type":"string","maxLength":50,"minLength":2,"title":"Username"}},"additionalProperties":false,"type":"object","required":["email","password","username"],"title":"UserRegister","description":"Registration schema for password sign-up.","examples":[{"email":"user@example.com","password":"fake_password","username":"username"}]},"UserRole":{"type":"string","enum":["contributor","lab"],"title":"UserRole","description":"Ordered contributor tiers. Compare with :func:`role_rank`, not ``<``."},"UserRoleUpdate":{"properties":{"role":{"$ref":"#/components/schemas/UserRole","description":"The contributor tier to assign."}},"additionalProperties":false,"type":"object","required":["role"],"title":"UserRoleUpdate","description":"Administrator request to set one account's contributor tier."},"UserUpdate":{"properties":{"password":{"anyOf":[{"type":"string","minLength":12},{"type":"null"}],"format":"password","title":"Password"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"username":{"anyOf":[{"type":"string","maxLength":50,"minLength":2},{"type":"null"}],"title":"Username"},"current_password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"format":"password","title":"Current Password","description":"Current password required when changing email or password."},"mfa_code":{"anyOf":[{"type":"string","maxLength":20,"minLength":6},{"type":"null"}],"title":"Mfa Code","description":"Current authenticator code or a recovery code. Required to change email or password when the account has MFA enabled."},"preferences":{"anyOf":[{"$ref":"#/components/schemas/UserPreferencesUpdate"},{"type":"null"}],"description":"User preferences (partial merge)."}},"additionalProperties":false,"type":"object","title":"UserUpdate","description":"Update schema for users.","examples":[{"email":"user@example.com","password":"newpassword","username":"username"}]},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VideoCreateWithinProduct":{"properties":{"url":{"$ref":"#/components/schemas/HttpUrlToDB"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata"}},"additionalProperties":false,"type":"object","required":["url"],"title":"VideoCreateWithinProduct","description":"Schema for creating a video.","examples":[{"description":"Recorded teardown of the product","title":"Full disassembly","url":"https://www.youtube.com/watch?v=abcdefghijk","video_metadata":{"duration_seconds":420,"source":"youtube"}}]},"VideoRead":{"properties":{"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id"}},"type":"object","required":["url","id","product_id"],"title":"VideoRead","description":"Schema for reading video information."},"VideoReadWithinProduct":{"properties":{"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["url","id"],"title":"VideoReadWithinProduct","description":"Schema for reading video information within a product.","examples":[{"description":"Recorded teardown of the product","id":1,"title":"Full disassembly","url":"https://www.youtube.com/watch?v=abcdefghijk","video_metadata":{"duration_seconds":420,"source":"youtube"}}]},"VideoUpdateWithinProduct":{"properties":{"url":{"anyOf":[{"$ref":"#/components/schemas/HttpUrlToDB"},{"type":"null"}],"description":"URL linking to the video"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title","description":"Title of the video"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the video"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata","description":"Video metadata as a JSON dict"}},"additionalProperties":false,"type":"object","title":"VideoUpdateWithinProduct","description":"Schema for updating a video within a product.","examples":[{"description":"Shortened version for publication","title":"Updated disassembly title","video_metadata":{"edited":true}}]},"YouTubeMonitorStreamResponse":{"properties":{"enableMonitorStream":{"type":"boolean","title":"Enablemonitorstream"},"broadcastStreamDelayMs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Broadcaststreamdelayms"},"embedHtml":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedhtml"}},"type":"object","required":["enableMonitorStream"],"title":"YouTubeMonitorStreamResponse","description":"Subset of monitor stream fields used by the app."},"YouTubePrivacyStatus":{"type":"string","enum":["public","private","unlisted"],"title":"YouTubePrivacyStatus","description":"Enumeration of YouTube privacy statuses."}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/v1/auth/bearer/login"}}},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"__Host-r9lab-auth"}}},"x-tagGroups":[{"name":"Auth","tags":["auth","users"]},{"name":"Reference Data","tags":["categories","taxonomies","materials","product-types"]},{"name":"Data Collection","tags":["products"]},{"name":"Plugins","tags":["r9cam-management","r9cam-interaction"]},{"name":"Admin","tags":["admin"]}]} diff --git a/backend/app/api/plugins/r9cam/device_assertion.py b/backend/app/api/plugins/r9cam/device_assertion.py index 5b103e161..5c4554119 100644 --- a/backend/app/api/plugins/r9cam/device_assertion.py +++ b/backend/app/api/plugins/r9cam/device_assertion.py @@ -1,6 +1,6 @@ """Shared device-assertion verification used by the WebSocket relay and HTTP endpoints. -Both transports accept the same ES256 JWT minted by the Pi (``build_device_assertion`` +Both transports accept the same ES256 or EdDSA JWT minted by the Pi (``build_device_assertion`` in ``r9cam/app/relay/device_jwt.py``): the audience is shared, the replay-protection namespace in Redis is shared, and the verification logic is therefore identical. Keeping it in one place prevents drift between the two @@ -34,7 +34,10 @@ # backend and the Pis can be upgraded in either order. # TODO(drop-by 2027-01-31): drop together with the /v1/plugins/rpi-cam/ prefix LEGACY_ASSERTION_AUDIENCE = "relab-rpi-cam-relay" -ASSERTION_ALGORITHMS = ("ES256",) +ASSERTION_ALGORITHMS = ("ES256", "EdDSA") +# The key type registered at pairing fixes the one algorithm a camera may sign with, so a +# token cannot pick a different algorithm than its key was made for. +_ALGORITHM_BY_KEY_TYPE = {"EC": "ES256", "OKP": "EdDSA"} REPLAY_KEY_PREFIX = "r9cam:relay_assertion_jti:" MAX_ASSERTION_TTL_SECONDS = 5 * 60 @@ -60,7 +63,8 @@ async def verify_device_assertion(assertion: str, camera: Camera, redis: Redis) enforced via a one-shot Redis ``SET NX`` keyed by ``{camera.id}:{jti}``. """ header = jwt.get_unverified_header(assertion) - if header.get("alg") not in ASSERTION_ALGORITHMS: + algorithm = _ALGORITHM_BY_KEY_TYPE.get(camera.relay_public_key_jwk.get("kty")) + if algorithm is None or header.get("alg") != algorithm: msg = "Unsupported assertion algorithm" raise InvalidTokenError(msg) if header.get("kid") != camera.relay_key_id: @@ -71,7 +75,7 @@ async def verify_device_assertion(assertion: str, camera: Camera, redis: Redis) payload = jwt.decode( assertion, key=public_key, - algorithms=list(ASSERTION_ALGORITHMS), + algorithms=[algorithm], audience=[ASSERTION_AUDIENCE, LEGACY_ASSERTION_AUDIENCE], options={"require": ["exp", "iat", "iss", "nbf", "jti", "sub"]}, ) diff --git a/backend/app/api/plugins/r9cam/routers/camera_crud.py b/backend/app/api/plugins/r9cam/routers/camera_crud.py index 19815735f..4aaf41634 100644 --- a/backend/app/api/plugins/r9cam/routers/camera_crud.py +++ b/backend/app/api/plugins/r9cam/routers/camera_crud.py @@ -212,7 +212,7 @@ async def delete_user_camera( status_code=204, description=( "Called by the Pi when the user triggers unpair from the local /setup page. " - "Authenticates via the device's ES256 assertion. Deletes the camera from the " + "Authenticates via the device's assertion. Deletes the camera from the " "database so the backend no longer shows it as offline." ), ) diff --git a/backend/app/api/plugins/r9cam/routers/camera_interaction/images.py b/backend/app/api/plugins/r9cam/routers/camera_interaction/images.py index ece6cfa23..d4571d411 100644 --- a/backend/app/api/plugins/r9cam/routers/camera_interaction/images.py +++ b/backend/app/api/plugins/r9cam/routers/camera_interaction/images.py @@ -125,7 +125,7 @@ async def capture_image( response_model=DeviceImageUploadAck, summary="Internal: receive an image pushed directly from a paired Raspberry Pi", description=( - "Called by the Pi after a successful capture. Authenticated with a short-lived ES256 " + "Called by the Pi after a successful capture. Authenticated with a short-lived " "device assertion (same credential used by the WebSocket relay). The Pi provides the " "JPEG body plus two JSON blobs: `capture_metadata` (libcamera metadata) and " "`upload_metadata` (opaque dict forwarded by whichever caller triggered the capture, " @@ -211,7 +211,7 @@ async def receive_camera_upload( summary="Internal: receive a cached preview thumbnail pushed directly from a paired Raspberry Pi", description=( "Called by the Pi's background thumbnail worker. Authenticated with the same short-lived " - "ES256 device assertion used by the WebSocket relay. Stores a deterministic per-camera JPEG " + "device assertion used by the WebSocket relay. Stores a deterministic per-camera JPEG " "cache file for camera-card previews without creating an Image database row." ), status_code=201, diff --git a/backend/app/api/plugins/r9cam/schemas/__init__.py b/backend/app/api/plugins/r9cam/schemas/__init__.py index c947f2b29..864376b14 100644 --- a/backend/app/api/plugins/r9cam/schemas/__init__.py +++ b/backend/app/api/plugins/r9cam/schemas/__init__.py @@ -53,7 +53,7 @@ class CameraFilterWithOwner(CameraFilter): class RelayPublicKeyJWK(DevicePublicKeyJWK): - """Public P-256 JWK registered by an RPi camera.""" + """Public JWK registered by an RPi camera: P-256 for ES256 or Ed25519 for EdDSA.""" class CameraCreate(BaseCreateSchema, CameraBase): diff --git a/backend/tests/fixtures/device_assertion.py b/backend/tests/fixtures/device_assertion.py index 2d96867de..7ad3fc904 100644 --- a/backend/tests/fixtures/device_assertion.py +++ b/backend/tests/fixtures/device_assertion.py @@ -6,7 +6,8 @@ from typing import TYPE_CHECKING import jwt -from cryptography.hazmat.primitives.asymmetric import ec +from cryptography.hazmat.primitives import serialization +from cryptography.hazmat.primitives.asymmetric import ec, ed25519 from app.api.plugins.r9cam.device_assertion import ASSERTION_AUDIENCE @@ -14,6 +15,14 @@ from uuid import UUID +def make_eddsa_keypair() -> tuple[ed25519.Ed25519PrivateKey, dict]: + """Generate an Ed25519 key pair and return (private_key, public_jwk), as r9cam's EdDSA pairing sends it.""" + private_key = ed25519.Ed25519PrivateKey.generate() + raw = private_key.public_key().public_bytes(serialization.Encoding.Raw, serialization.PublicFormat.Raw) + x = base64.urlsafe_b64encode(raw).rstrip(b"=").decode() + return private_key, {"kty": "OKP", "crv": "Ed25519", "x": x, "alg": "EdDSA"} + + def make_keypair() -> tuple[ec.EllipticCurvePrivateKey, dict]: """Generate an EC P-256 key pair and return (private_key, public_jwk).""" private_key = ec.generate_private_key(ec.SECP256R1()) @@ -26,7 +35,7 @@ def _b64(n: int) -> str: def sign_assertion( - private_key: ec.EllipticCurvePrivateKey, + private_key: ec.EllipticCurvePrivateKey | ed25519.Ed25519PrivateKey, camera_id: UUID | str, key_id: str, *, @@ -38,7 +47,10 @@ def sign_assertion( omit_claims: set[str] | None = None, headers: dict[str, object] | None = None, ) -> str: - """Sign a device assertion for ``camera_id``; ``jti=""`` is kept as given.""" + """Sign a device assertion for ``camera_id``; ``jti=""`` is kept as given. + + The algorithm follows the key type: ES256 for P-256, EdDSA for Ed25519. + """ now = int(time.time()) payload = { "iss": iss or f"camera:{camera_id}", @@ -51,4 +63,5 @@ def sign_assertion( } for claim in omit_claims or set(): payload.pop(claim, None) - return jwt.encode(payload, private_key, algorithm="ES256", headers=headers or {"kid": key_id}) + algorithm = "EdDSA" if isinstance(private_key, ed25519.Ed25519PrivateKey) else "ES256" + return jwt.encode(payload, private_key, algorithm=algorithm, headers=headers or {"kid": key_id}) diff --git a/backend/tests/unit/plugins/r9cam/test_device_assertion.py b/backend/tests/unit/plugins/r9cam/test_device_assertion.py index be6ce9562..3ada3b5e7 100644 --- a/backend/tests/unit/plugins/r9cam/test_device_assertion.py +++ b/backend/tests/unit/plugins/r9cam/test_device_assertion.py @@ -18,7 +18,7 @@ from app.api.common.routers.exceptions import _response_parts from app.api.plugins.r9cam import device_assertion as da from app.core.runtime import RequiredServiceUnavailableError -from tests.fixtures.device_assertion import make_keypair, sign_assertion +from tests.fixtures.device_assertion import make_eddsa_keypair, make_keypair, sign_assertion if TYPE_CHECKING: from cryptography.hazmat.primitives.asymmetric import ec @@ -249,3 +249,51 @@ async def test_inactive_owner_camera_is_rejected(*, is_active: bool, is_verified ): await da._authenticated_camera(request, camera.id, session) assert exc_info.value.status_code == status.HTTP_401_UNAUTHORIZED + + +# ── verify_device_assertion: algorithm per key type ────────────────────────── + + +def _camera_with_jwk(jwk: dict) -> MagicMock: + camera = MagicMock() + camera.id = uuid4() + camera.relay_key_id = "kid-1" + camera.relay_public_key_jwk = jwk + return camera + + +async def test_eddsa_assertion_from_an_ed25519_camera_is_accepted() -> None: + """A camera paired with an Ed25519 key authenticates with EdDSA tokens.""" + private_key, jwk = make_eddsa_keypair() + camera = _camera_with_jwk(jwk) + redis = AsyncMock() + redis.set.return_value = True + + payload = await da.verify_device_assertion(sign_assertion(private_key, camera.id, "kid-1"), camera, redis) + + assert payload["sub"] == f"camera:{camera.id}" + + +async def test_token_algorithm_must_match_the_registered_key_type() -> None: + """An Ed25519 camera's key cannot be used for an ES256 token, and the reverse.""" + eddsa_key, eddsa_jwk = make_eddsa_keypair() + ec_key, ec_jwk = make_keypair() + redis = AsyncMock() + redis.set.return_value = True + + for key, jwk in ((ec_key, eddsa_jwk), (eddsa_key, ec_jwk)): + camera = _camera_with_jwk(jwk) + token = sign_assertion(key, camera.id, "kid-1") + with pytest.raises(jwt.InvalidTokenError, match="Unsupported assertion algorithm"): + await da.verify_device_assertion(token, camera, redis) + + +async def test_unknown_key_type_is_rejected() -> None: + """A stored JWK of a key type with no allowed algorithm never authenticates.""" + private_key, jwk = make_keypair() + camera = _camera_with_jwk({**jwk, "kty": "RSA"}) + redis = AsyncMock() + redis.set.return_value = True + + with pytest.raises(jwt.InvalidTokenError, match="Unsupported assertion algorithm"): + await da.verify_device_assertion(sign_assertion(private_key, camera.id, "kid-1"), camera, redis) diff --git a/docs/public/api/schemas/openapi.device.json b/docs/public/api/schemas/openapi.device.json index 7dcaa30b6..aebb94c06 100644 --- a/docs/public/api/schemas/openapi.device.json +++ b/docs/public/api/schemas/openapi.device.json @@ -397,7 +397,7 @@ "paths": { "/v1/plugins/r9cam/device/cameras/{camera_id}/image-upload": { "post": { - "description": "Called by the Pi after a successful capture. Authenticated with a short-lived ES256 device assertion (same credential used by the WebSocket relay). The Pi provides the JPEG body plus two JSON blobs: `capture_metadata` (libcamera metadata) and `upload_metadata` (opaque dict forwarded by whichever caller triggered the capture, typically `{product_id, description}`). The backend stores the image via the normal image storage service and returns a tiny ack envelope the Pi consumes.", + "description": "Called by the Pi after a successful capture. Authenticated with a short-lived device assertion (same credential used by the WebSocket relay). The Pi provides the JPEG body plus two JSON blobs: `capture_metadata` (libcamera metadata) and `upload_metadata` (opaque dict forwarded by whichever caller triggered the capture, typically `{product_id, description}`). The backend stores the image via the normal image storage service and returns a tiny ack envelope the Pi consumes.", "operationId": "receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post", "parameters": [ { @@ -454,7 +454,7 @@ }, "/v1/plugins/r9cam/device/cameras/{camera_id}/preview-thumbnail-upload": { "post": { - "description": "Called by the Pi's background thumbnail worker. Authenticated with the same short-lived ES256 device assertion used by the WebSocket relay. Stores a deterministic per-camera JPEG cache file for camera-card previews without creating an Image database row.", + "description": "Called by the Pi's background thumbnail worker. Authenticated with the same short-lived device assertion used by the WebSocket relay. Stores a deterministic per-camera JPEG cache file for camera-card previews without creating an Image database row.", "operationId": "receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post", "parameters": [ { @@ -511,7 +511,7 @@ }, "/v1/plugins/r9cam/device/cameras/{camera_id}/self": { "delete": { - "description": "Called by the Pi when the user triggers unpair from the local /setup page. Authenticates via the device's ES256 assertion. Deletes the camera from the database so the backend no longer shows it as offline.", + "description": "Called by the Pi when the user triggers unpair from the local /setup page. Authenticates via the device's assertion. Deletes the camera from the database so the backend no longer shows it as offline.", "operationId": "self_unpair_camera_v1_plugins_r9cam_device_cameras__camera_id__self_delete", "parameters": [ { diff --git a/docs/public/api/schemas/openapi.public.json b/docs/public/api/schemas/openapi.public.json index 32475cd62..a102d8469 100644 --- a/docs/public/api/schemas/openapi.public.json +++ b/docs/public/api/schemas/openapi.public.json @@ -5546,7 +5546,7 @@ }, "RelayPublicKeyJWK": { "additionalProperties": false, - "description": "Public P-256 JWK registered by an RPi camera.", + "description": "Public JWK registered by an RPi camera: P-256 for ES256 or Ed25519 for EdDSA.", "properties": { "crv": { "pattern": "^P-256$", diff --git a/docs/src/content/docs/operations/security.mdx b/docs/src/content/docs/operations/security.mdx index cd20d2ffb..eefb71810 100644 --- a/docs/src/content/docs/operations/security.mdx +++ b/docs/src/content/docs/operations/security.mdx @@ -170,7 +170,7 @@ who exposes the data services against the [deployment guide](/operations/deploym | API to the browser | Strict Content-Security-Policy, HSTS, `nosniff`, and `no-store` on viewer-dependent responses (`backend/app/core/middleware/response_policy.py`); `script-src 'self'` on the app and sites; see [Browser runtime policy](#browser-runtime-policy) | | API to data services | PostgreSQL and Redis on the internal `data` network only, least-privilege database roles, no host ports in prod or staging (`compose.deploy.yaml`); see [Network boundaries](#network-boundaries) | | API to outside providers | One shared client with an egress allowlist, verified TLS, no redirects, and bounded timeouts (`backend/app/core/clients/http.py`); provider tokens stored with AES-256-GCM (`backend/app/core/crypto/storage.py`) | -| RPi cameras to API | Short-lived ES256 device assertions checked on every call (`backend/app/api/plugins/r9cam/device_assertion.py`), rate limits, and the relay's method and path allowlist from `r9cam_models` | +| RPi cameras to API | Short-lived ES256 or EdDSA device assertions checked on every call (`backend/app/api/plugins/r9cam/device_assertion.py`), rate limits, and the relay's method and path allowlist from `r9cam_models` | | Contributors to release | Pull requests with required CI and a DCO sign-off, digest-pinned actions and base images, Trivy before push, and signed provenance and SBOM attestations on every image (`.github/workflows/`); see [Supply chain](#supply-chain) | ### Secure design principles From d67d62daaf6fec03a4029ae676ef83cafa00820b Mon Sep 17 00:00:00 2001 From: Simon van Lierde <90462640+simonvanlierde@users.noreply.github.com> Date: Sun, 15 Nov 2026 19:05:16 +0100 Subject: [PATCH 2/3] build(deps): relock r9cam-models 0.7.0 for Ed25519 pairing r9cam-models 0.7.0 lets DevicePublicKeyJWK carry an Ed25519 (OKP) key, which r9cam 0.8 pairs with by default. Under 0.6 pairing such a Pi failed with a ValidationError on PairingRegisterRequest. - The OpenAPI exports and the generated frontend API types pick up the wider JWK schema; `y` is optional now, and no frontend code reads the JWK. - A pairing test registers an Ed25519 key. Signed-off-by: Simon van Lierde <90462640+simonvanlierde@users.noreply.github.com> --- CHANGELOG.md | 4 +- app/src/types/api.generated.ts | 37 +++++-- app/src/types/openapi.json | 2 +- backend/pyproject.toml | 2 +- .../unit/plugins/r9cam/test_pairing_router.py | 22 ++++ backend/uv.lock | 8 +- docs/public/api/schemas/openapi.device.json | 45 +++++--- docs/public/api/schemas/openapi.public.json | 101 ++++++++++++++++-- 8 files changed, 183 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce0279af1..9c9798f0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,8 +34,8 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Added - r9cam cameras can sign their device tokens with EdDSA (Ed25519) as well as ES256. Each camera - may use only the algorithm of the key it paired with. Pairing an Ed25519 camera also needs - r9cam-models 0.7.0. ([#501](https://github.com/CMLPlatform/r9lab/issues/501)) + may use only the algorithm of the key it paired with. The backend now uses r9cam-models + 0.7.0, which accepts Ed25519 public keys at pairing. ([#501](https://github.com/CMLPlatform/r9lab/issues/501)) - An accessibility statement at `/accessibility` on the website, backed by a WCAG 2.2 self-assessment of the website, the documentation site and the web app at `/accessibility-assessment`. diff --git a/app/src/types/api.generated.ts b/app/src/types/api.generated.ts index 410afb561..48b5d2fbf 100644 --- a/app/src/types/api.generated.ts +++ b/app/src/types/api.generated.ts @@ -2551,7 +2551,7 @@ export interface paths { post?: never; /** * Pi-initiated self-unpair - * @description Called by the Pi when the user triggers unpair from the local /setup page. Authenticates via the device's ES256 assertion. Deletes the camera from the database so the backend no longer shows it as offline. + * @description Called by the Pi when the user triggers unpair from the local /setup page. Authenticates via the device's assertion. Deletes the camera from the database so the backend no longer shows it as offline. */ delete: operations['self_unpair_camera_v1_plugins_r9cam_device_cameras__camera_id__self_delete']; options?: never; @@ -2570,7 +2570,7 @@ export interface paths { put?: never; /** * Internal: receive an image pushed directly from a paired Raspberry Pi - * @description Called by the Pi after a successful capture. Authenticated with a short-lived ES256 device assertion (same credential used by the WebSocket relay). The Pi provides the JPEG body plus two JSON blobs: `capture_metadata` (libcamera metadata) and `upload_metadata` (opaque dict forwarded by whichever caller triggered the capture, typically `{product_id, description}`). The backend stores the image via the normal image storage service and returns a tiny ack envelope the Pi consumes. + * @description Called by the Pi after a successful capture. Authenticated with a short-lived device assertion (same credential used by the WebSocket relay). The Pi provides the JPEG body plus two JSON blobs: `capture_metadata` (libcamera metadata) and `upload_metadata` (opaque dict forwarded by whichever caller triggered the capture, typically `{product_id, description}`). The backend stores the image via the normal image storage service and returns a tiny ack envelope the Pi consumes. */ post: operations['receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post']; delete?: never; @@ -2590,7 +2590,7 @@ export interface paths { put?: never; /** * Internal: receive a cached preview thumbnail pushed directly from a paired Raspberry Pi - * @description Called by the Pi's background thumbnail worker. Authenticated with the same short-lived ES256 device assertion used by the WebSocket relay. Stores a deterministic per-camera JPEG cache file for camera-card previews without creating an Image database row. + * @description Called by the Pi's background thumbnail worker. Authenticated with the same short-lived device assertion used by the WebSocket relay. Stores a deterministic per-camera JPEG cache file for camera-card previews without creating an Image database row. */ post: operations['receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post']; delete?: never; @@ -3253,6 +3253,21 @@ export interface components { * @description Sensor temperature in °C */ sensor_temperature?: number | null; + /** + * Lens Position + * @description Lens focus position in dioptres + */ + lens_position?: number | null; + /** + * Color Gains + * @description Red and blue white-balance gains + */ + color_gains?: [number, number] | null; + /** + * Scaler Crop + * @description Sensor area read for the image as x, y, width, height in sensor pixels + */ + scaler_crop?: [number, number, number, number] | null; }; /** * CategoriesResponse @@ -3935,7 +3950,9 @@ export interface components { }; /** * DevicePublicKeyJWK - * @description Public P-256 JWK registered by the Pi during pairing. + * @description Public JWK registered by the Pi during pairing: EC P-256 (ES256) or OKP Ed25519 (EdDSA). + * + * ``alg`` is optional, as in RFC 7517: ``kty`` and ``crv`` already fix the algorithm. */ DevicePublicKeyJWK: { /** Kty */ @@ -3945,7 +3962,9 @@ export interface components { /** X */ x: string; /** Y */ - y: string; + y?: string | null; + /** Alg */ + alg?: ('ES256' | 'EdDSA') | null; /** Use */ use?: string | null; /** Kid */ @@ -4799,7 +4818,7 @@ export interface components { * @description Random nonce generated by the Pi. Required to retrieve credentials later. */ rpi_fingerprint: string; - /** @description Public P-256 JWK generated by the Pi. */ + /** @description Public JWK (P-256 or Ed25519) generated by the Pi. */ public_key_jwk: components['schemas']['DevicePublicKeyJWK']; /** Key Id */ key_id: string; @@ -5344,7 +5363,7 @@ export interface components { RelayAuthScheme: 'device_assertion'; /** * RelayPublicKeyJWK - * @description Public P-256 JWK registered by an RPi camera. + * @description Public JWK registered by an RPi camera: P-256 for ES256 or Ed25519 for EdDSA. */ RelayPublicKeyJWK: { /** Kty */ @@ -5354,7 +5373,9 @@ export interface components { /** X */ x: string; /** Y */ - y: string; + y?: string | null; + /** Alg */ + alg?: ('ES256' | 'EdDSA') | null; /** Use */ use?: string | null; /** Kid */ diff --git a/app/src/types/openapi.json b/app/src/types/openapi.json index feca720d2..feac32496 100644 --- a/app/src/types/openapi.json +++ b/app/src/types/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"R9lab \u2013 Data Collection API","description":"Data collection app for the R9lab project at the Institute of Environmental Sciences (CML), Leiden University.\n\n**Licensing.** This API specification is licensed Apache-2.0 so that anyone may write clients, importers, or integrations against it without inheriting the platform's copyleft. The R9lab platform software itself remains AGPL-3.0-or-later, and curated dataset releases are licensed CC BY 4.0.","license":{"name":"Apache-2.0","identifier":"Apache-2.0"},"version":"1.0.0","x-api-version":"1.0.0","x-api-major":"v1","x-deprecation-policy":"Breaking changes are documented in release notes."},"paths":{"/v1/admin/cache/clear/{namespace}":{"post":{"tags":["admin"],"summary":"Clear cache by namespace","description":"Clear cached responses for a specific namespace.","operationId":"clear_cache_by_namespace_v1_admin_cache_clear__namespace__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CacheNamespace","description":"Cache namespace to clear"},"description":"Cache namespace to clear"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Clear Cache By Namespace V1 Admin Cache Clear Namespace Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/categories":{"post":{"tags":["admin","categories"],"summary":"Create a new category","description":"Create a category.\n\n``taxonomy_id`` is required for root categories and is inherited from the\nparent when ``supercategory_id`` is supplied.","operationId":"create_category_v1_admin_categories_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/categories/{category_id}":{"patch":{"tags":["admin","categories"],"summary":"Update category","description":"Update an existing category.","operationId":"update_category_v1_admin_categories__category_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","categories"],"summary":"Delete category","description":"Delete a category by ID, including its subcategories.","operationId":"delete_category_v1_admin_categories__category_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/taxonomies":{"post":{"tags":["admin","taxonomies"],"summary":"Create a new taxonomy","description":"Create a new taxonomy, optionally with categories.","operationId":"create_taxonomy_endpoint_v1_admin_taxonomies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyCreateWithCategories"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/taxonomies/{taxonomy_id}":{"patch":{"tags":["admin","taxonomies"],"summary":"Update taxonomy","description":"Update an existing taxonomy.","operationId":"update_taxonomy_v1_admin_taxonomies__taxonomy_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","taxonomies"],"summary":"Delete taxonomy, including categories","description":"Delete a taxonomy by ID, including its categories.","operationId":"delete_taxonomy_v1_admin_taxonomies__taxonomy_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials":{"post":{"tags":["admin","materials"],"summary":"Create material","description":"Create a material.","operationId":"create_material_v1_admin_materials_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialCreateWithCategories"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/materials/{material_id}":{"patch":{"tags":["admin","materials"],"summary":"Update material","description":"Update a material.","operationId":"update_material_v1_admin_materials__material_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","materials"],"summary":"Delete material","description":"Delete a material.","operationId":"delete_material_v1_admin_materials__material_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/categories":{"post":{"tags":["admin","materials"],"summary":"Add multiple categories to the material","description":"Add multiple categories to a material.","operationId":"add_categories_to_material_v1_admin_materials__material_id__categories_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to assign to the material","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Add Categories To Material V1 Admin Materials Material Id Categories Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","materials"],"summary":"Remove multiple categories from the material","description":"Remove multiple categories from a material.","operationId":"remove_categories_from_material_v1_admin_materials__material_id__categories_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to remove from the material","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/files":{"post":{"tags":["admin","materials"],"summary":"Add File to Material","description":"Upload a new file for the material.","operationId":"upload_material_file_v1_admin_materials__material_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_material_file_v1_admin_materials__material_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/files/{file_id}":{"delete":{"tags":["admin","materials"],"summary":"Remove File from Material","description":"Remove a file from the material.","operationId":"delete_material_file_v1_admin_materials__material_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/images":{"post":{"tags":["admin","materials"],"summary":"Add Image to Material","description":"Upload a new image for the material.","operationId":"upload_material_image_v1_admin_materials__material_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_material_image_v1_admin_materials__material_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/images/{image_id}":{"delete":{"tags":["admin","materials"],"summary":"Remove Image from Material","description":"Remove an image from the material.","operationId":"delete_material_image_v1_admin_materials__material_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types":{"post":{"tags":["admin","product-types"],"summary":"Create product type","description":"Create a product type.","operationId":"create_product_type_v1_admin_product_types_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeCreateWithCategories"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}":{"patch":{"tags":["admin","product-types"],"summary":"Update product type","description":"Update a product type.","operationId":"update_product_type_v1_admin_product_types__product_type_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","product-types"],"summary":"Delete product type","description":"Delete a product type.","operationId":"delete_product_type_v1_admin_product_types__product_type_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/categories":{"post":{"tags":["admin","product-types"],"summary":"Add multiple categories to the product type","description":"Add multiple categories to a product type.","operationId":"add_categories_to_product_type_v1_admin_product_types__product_type_id__categories_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to assign to the product type","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Add Categories To Product Type V1 Admin Product Types Product Type Id Categories Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","product-types"],"summary":"Remove multiple categories from the product type","description":"Remove multiple categories from a product type.","operationId":"remove_categories_from_product_type_v1_admin_product_types__product_type_id__categories_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to remove from the product type","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/files":{"post":{"tags":["admin","product-types"],"summary":"Add File to Product Type","description":"Upload a new file for the product type.","operationId":"upload_product_type_file_v1_admin_product_types__product_type_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_type_file_v1_admin_product_types__product_type_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/files/{file_id}":{"delete":{"tags":["admin","product-types"],"summary":"Remove File from Product Type","description":"Remove a file from the product type.","operationId":"delete_product_type_file_v1_admin_product_types__product_type_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/images":{"post":{"tags":["admin","product-types"],"summary":"Add Image to Product Type","description":"Upload a new image for the product type.","operationId":"upload_product_type_image_v1_admin_product_types__product_type_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_type_image_v1_admin_product_types__product_type_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/images/{image_id}":{"delete":{"tags":["admin","product-types"],"summary":"Remove Image from Product Type","description":"Remove an image from the product type.","operationId":"delete_product_type_image_v1_admin_product_types__product_type_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/categories":{"get":{"tags":["categories"],"summary":"Get all categories with optional filtering and all relationships","description":"Get all categories with all relationships loaded.","operationId":"get_categories_v1_categories_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"taxonomy_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name"}},{"name":"taxonomy_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name[Ilike]"}},{"name":"taxonomy_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version"}},{"name":"taxonomy_version[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version[Ilike]"}},{"name":"taxonomy_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description"}},{"name":"taxonomy_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description[Ilike]"}},{"name":"taxonomy_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source"}},{"name":"taxonomy_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","+taxonomy_name","name","external_id","taxonomy_name","-name","-external_id","-taxonomy_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRelationshipsAndFlatSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/tree":{"get":{"tags":["categories"],"summary":"Get categories tree","description":"Get a page of top-level categories, each with its subcategories in a tree structure.","operationId":"get_categories_tree_v1_categories_tree_get","parameters":[{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"taxonomy_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name"}},{"name":"taxonomy_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name[Ilike]"}},{"name":"taxonomy_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version"}},{"name":"taxonomy_version[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version[Ilike]"}},{"name":"taxonomy_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description"}},{"name":"taxonomy_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description[Ilike]"}},{"name":"taxonomy_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source"}},{"name":"taxonomy_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","+taxonomy_name","name","external_id","taxonomy_name","-name","-external_id","-taxonomy_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRecursiveSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/{category_id}":{"get":{"tags":["categories"],"summary":"Get Category","description":"Get category by ID with all relationships.","operationId":"get_category_v1_categories__category_id__get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryReadWithRelationshipsAndFlatSubCategories"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/{category_id}/subcategories":{"get":{"tags":["categories"],"summary":"Get category subcategories with optional filtering and all relationships","description":"Get paginated subcategories of a category with all relationships loaded.","operationId":"get_subcategories_v1_categories__category_id__subcategories_get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Category ID","title":"Category Id"},"description":"Category ID"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRelationshipsAndFlatSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/{category_id}/subcategories/tree":{"get":{"tags":["categories"],"summary":"Get category subtree","description":"Get a page of a category's subcategories in a tree structure, up to a specified depth.","operationId":"get_category_subtree_v1_categories__category_id__subcategories_tree_get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}},{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRecursiveSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies":{"get":{"tags":["taxonomies"],"summary":"Get Taxonomies","description":"Get all taxonomies with optional filtering.","operationId":"get_taxonomies_v1_taxonomies_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},{"name":"version[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+version","+source","name","version","source","-name","-version","-source"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TaxonomyRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies/{taxonomy_id}":{"get":{"tags":["taxonomies"],"summary":"Get Taxonomy","description":"Get taxonomy by ID.","operationId":"get_taxonomy_v1_taxonomies__taxonomy_id__get","parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies/{taxonomy_id}/categories/tree":{"get":{"tags":["taxonomies"],"summary":"Get the category tree of a taxonomy","description":"Get paginated top-level categories of a taxonomy with their recursive subcategory trees.","operationId":"get_taxonomy_category_tree_v1_taxonomies__taxonomy_id__categories_tree_get","parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}},{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRecursiveSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies/{taxonomy_id}/categories":{"get":{"tags":["taxonomies"],"summary":"View categories of taxonomy","description":"Get taxonomy categories with optional filtering.","operationId":"get_taxonomy_categories_v1_taxonomies__taxonomy_id__categories_get","parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials":{"get":{"tags":["materials"],"summary":"Get all materials with all relationships","description":"Get all materials with all relationships loaded.","operationId":"get_materials_v1_materials_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"density_kg_m3","in":"query","required":false,"schema":{"type":"number","title":"Density Kg M3"}},{"name":"density_kg_m3[ge]","in":"query","required":false,"schema":{"type":"number","title":"Density Kg M3[Ge]"}},{"name":"density_kg_m3[le]","in":"query","required":false,"schema":{"type":"number","title":"Density Kg M3[Le]"}},{"name":"is_crm","in":"query","required":false,"schema":{"type":"boolean","title":"Is Crm"}},{"name":"is_crm[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Crm[Eq]"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source[Ilike]"}},{"name":"category_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name"}},{"name":"category_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name[Ilike]"}},{"name":"category_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description"}},{"name":"category_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description[Ilike]"}},{"name":"category_external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id"}},{"name":"category_external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+density_kg_m3","+source","name","density_kg_m3","source","-name","-density_kg_m3","-source"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MaterialReadWithRelationships_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}":{"get":{"tags":["materials"],"summary":"Get Material","description":"Get material by ID with all relationships loaded.","operationId":"get_material_v1_materials__material_id__get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialReadWithRelationships"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}/categories":{"get":{"tags":["materials"],"summary":"View categories of material","description":"Get categories linked to a material.","operationId":"get_material_categories_v1_materials__material_id__categories_get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Get Material Categories V1 Materials Material Id Categories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}/files":{"get":{"tags":["materials"],"summary":"Get Material Files","description":"Get all files associated with a material.","operationId":"get_material_files_v1_materials__material_id__files_get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileReadWithinParent"},"title":"Response Get Material Files V1 Materials Material Id Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}/images":{"get":{"tags":["materials"],"summary":"Get Material Images","description":"Get all images associated with a material.","operationId":"get_material_images_v1_materials__material_id__images_get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImageReadWithinParent"},"title":"Response Get Material Images V1 Materials Material Id Images Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types":{"get":{"tags":["product-types"],"summary":"Get all product types with all relationships","description":"Get a list of all product types with all relationships loaded.","operationId":"get_product_types_v1_product_types_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Name[In]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"category_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name"}},{"name":"category_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name[Ilike]"}},{"name":"category_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description"}},{"name":"category_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description[Ilike]"}},{"name":"category_external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id"}},{"name":"category_external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","name","-name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ProductTypeReadWithRelationships_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}":{"get":{"tags":["product-types"],"summary":"Get product type by ID with all relationships","description":"Get a single product type by ID with all relationships loaded.","operationId":"get_product_type_v1_product_types__product_type_id__get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeReadWithRelationships"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}/categories":{"get":{"tags":["product-types"],"summary":"View categories of product type","description":"Get categories linked to a product type.","operationId":"get_product_type_categories_v1_product_types__product_type_id__categories_get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Type Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Get Product Type Categories V1 Product Types Product Type Id Categories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}/files":{"get":{"tags":["product-types"],"summary":"Get Product Type Files","description":"Get all files associated with a product type.","operationId":"get_product_type_files_v1_product_types__product_type_id__files_get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileReadWithinParent"},"title":"Response Get Product Type Files V1 Product Types Product Type Id Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}/images":{"get":{"tags":["product-types"],"summary":"Get Product Type Images","description":"Get all images associated with a product type.","operationId":"get_product_type_images_v1_product_types__product_type_id__images_get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImageReadWithinParent"},"title":"Response Get Product Type Images V1 Product Types Product Type Id Images Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/units":{"get":{"tags":["units"],"summary":"Get Units","description":"Get a list of available units.","operationId":"get_units_v1_units_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get Units V1 Units Get"}}}}},"x-audience":["public","app"]}},"/v1/users/{user_id}/products":{"get":{"tags":["products"],"summary":"Get base products collected by a user","description":"Get base products collected by a specific user.","operationId":"get_user_products_v1_users__user_id__products_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ProductRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products":{"get":{"tags":["products"],"summary":"Get all base products","description":"Get all base products. Components live under ``/products/{id}/components``.","operationId":"get_products_v1_products_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Use 'me' for the current user's products, or a username for that user's public products","title":"Owner"},"description":"Use 'me' for the current user's products, or a username for that user's public products"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ProductRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Create a new product, optionally with components","description":"Create a new product.\n\nAn optional ``Idempotency-Key`` header makes a retried request safe: replaying the same\nkey returns the original response instead of creating a second product. The key is bound to\nthis user and this request body; reusing it with a different body is a 422.","operationId":"create_product_v1_products_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreateWithComponents","description":"Product to create"},"examples":{"basic":{"value":{"name":"Office Chair","description":"Complete chair assembly","brand":"Brand 1","model":"Model 1","product_type_id":1,"weight_g":20000,"height_cm":150,"width_cm":70,"depth_cm":50,"circularity_properties":{"recyclability":"Metal frame and plastic shell can be separated with basic tools.","disassemblability":"Most fasteners are visible and non-destructive to remove."},"videos":[{"url":"https://www.youtube.com/watch?v=123456789","description":"Disassembly video"}],"bill_of_materials":[{"quantity":0.3,"unit":"g","material_id":1},{"quantity":0.1,"unit":"g","material_id":2}]},"summary":"Basic product without components"},"with_components":{"value":{"name":"Office Chair","description":"Complete chair assembly","brand":"Brand 1","model":"Model 1","product_type_id":1,"weight_g":20000,"height_cm":150,"width_cm":70,"depth_cm":50,"circularity_properties":{"recyclability":"Metal frame and plastic shell can be separated with basic tools.","disassemblability":"Most fasteners are visible and non-destructive to remove."},"videos":[{"url":"https://www.youtube.com/watch?v=123456789","description":"Disassembly video"}],"bill_of_materials":[{"quantity":0.3,"unit":"g","material_id":1},{"quantity":0.1,"unit":"g","material_id":2}],"components":[{"name":"Office Chair Seat","description":"Seat assembly","brand":"Brand 2","model":"Model 2","amount_in_parent":1,"product_type_id":2,"weight_g":5000,"height_cm":50,"width_cm":40,"depth_cm":30,"components":[{"name":"Seat Cushion","description":"Seat cushion assembly","amount_in_parent":1,"weight_g":2000,"height_cm":10,"width_cm":40,"depth_cm":30,"product_type_id":3,"bill_of_materials":[{"quantity":1.5,"unit":"g","material_id":1},{"quantity":0.5,"unit":"g","material_id":2}]}]}]},"summary":"Product with components"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRead"}}}},"409":{"description":"A request with this Idempotency-Key is already being processed."},"503":{"description":"The idempotency store is unreachable; retry later."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/export":{"get":{"tags":["products"],"summary":"Export base products matching the list filters, with their components","description":"Export every base product the product list would match, each with its whole component tree.\n\nTakes the same filters, search and sorting as ``GET /products``. CSV has one row per\nproduct or component, linked by ``parent_id``; JSON nests components as the detail read\ndoes. At most 100 base products, 5,000 components and 10 component levels: narrow the filters,\nor use the dataset release for bulk data.","operationId":"export_products_v1_products_export_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["csv","json"],"type":"string","description":"File format: 'csv' or 'json'","default":"csv","title":"Format"},"description":"File format: 'csv' or 'json'"},{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Use 'me' for the current user's products, or a username for that user's public products","title":"Owner"},"description":"Use 'me' for the current user's products, or a username for that user's public products"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductExportRead"},"title":"Response Export Products V1 Products Export Get"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"More than 100 base products match, or the export is too large (components nested more than 10 levels deep, or more than 5,000 components)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/facets":{"get":{"tags":["products"],"summary":"Get derived product facets","description":"Return derived filter values and counts for product browsing.","operationId":"get_product_facets_v1_products_facets_get","parameters":[{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["brand","model"],"type":"string"}},{"type":"null"}],"description":"Product fields to facet. Repeat the parameter for multiple fields.","title":"Fields"},"description":"Product fields to facet. Repeat the parameter for multiple fields."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductFacetValue"}},"title":"Response Get Product Facets V1 Products Facets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}":{"get":{"tags":["products"],"summary":"Get base product by ID","description":"Get a base product by ID. For components, use ``/components/{component_id}``.","operationId":"get_product_v1_products__product_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReadWithRelationshipsAndFlatComponents"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["products"],"summary":"Update base product","description":"Update an existing base product. Use ``PATCH /components/{id}`` for components.","operationId":"update_product_v1_products__product_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"if-match","in":"header","required":true,"schema":{"type":"string","description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412.","title":"If-Match"},"description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRead"}}}},"412":{"description":"The record changed since the `version` sent in `If-Match`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Delete base product","description":"Delete a base product, cascading to its components. Use ``DELETE /components/{id}`` for a component.","operationId":"delete_product_v1_products__product_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/export":{"get":{"tags":["products"],"summary":"Export one base product with its components","description":"Export one base product and its whole component tree, in the same formats as ``/products/export``.","operationId":"export_product_v1_products__product_id__export_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"format","in":"query","required":false,"schema":{"enum":["csv","json"],"type":"string","description":"File format: 'csv' or 'json'","default":"csv","title":"Format"},"description":"File format: 'csv' or 'json'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductExportRead"},"title":"Response Export Product V1 Products Product Id Export Get"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"The export is too large (components nested more than 10 levels deep, or more than 5,000 components)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/components/tree":{"get":{"tags":["products"],"summary":"Get product component subtree","description":"Get a product's component subtree as a bounded hierarchical view.\n\nA tree with more components than the cap, across all levels, is a 400. Page through\n``/components`` level by level, or use the export, for bigger products.","operationId":"get_product_subtree_v1_products__product_id__components_tree_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"},"title":"Response Get Product Subtree V1 Products Product Id Components Tree Get"}}}},"400":{"description":"More than 1,000 components at the requested depth"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/components":{"get":{"tags":["products"],"summary":"Get product components","description":"Get a page of a product's direct components.","operationId":"get_product_components_v1_products__product_id__components_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ComponentRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Create a new component under a base product","description":"Create a new component under the given base product.\n\nAn optional ``Idempotency-Key`` header makes a retried request safe: replaying the same\nkey returns the original response instead of creating a second component. The key is bound to\nthis user, this parent, and this request body; reusing it with a different body is a 422.","operationId":"add_component_to_product_v1_products__product_id__components_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"examples":{"simple":{"value":{"name":"Seat Assembly","description":"Chair seat component","amount_in_parent":1,"bill_of_materials":[{"material_id":1,"quantity":0.5,"unit":"g"}]},"summary":"Basic component","description":"Create a component without subcomponents"},"nested":{"value":{"name":"Seat Assembly","description":"Chair seat with cushion","amount_in_parent":1,"components":[{"name":"Cushion","description":"Foam cushion","amount_in_parent":1,"bill_of_materials":[{"material_id":2,"quantity":0.3,"unit":"g"}]}]},"summary":"Component with subcomponents","description":"Create a component with nested subcomponents"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"}}}},"409":{"description":"A request with this Idempotency-Key is already being processed."},"503":{"description":"The idempotency store is unreachable; retry later."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/suggestions/brands":{"get":{"tags":["products"],"summary":"Get product brand suggestions","description":"Get a paginated, searchable list of unique product brands derived from product data.","operationId":"get_brand_suggestions_v1_products_suggestions_brands_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Search brand (case-insensitive)","title":"Search"},"description":"Search brand (case-insensitive)"},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"Sort order: 'asc' or 'desc'","default":"asc","title":"Order"},"description":"Sort order: 'asc' or 'desc'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_str_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/suggestions/models":{"get":{"tags":["products"],"summary":"Get product model suggestions","description":"Get a paginated, searchable list of unique product model names derived from product data.","operationId":"get_model_suggestions_v1_products_suggestions_models_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Search model name (case-insensitive)","title":"Search"},"description":"Search model name (case-insensitive)"},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"Sort order: 'asc' or 'desc'","default":"asc","title":"Order"},"description":"Sort order: 'asc' or 'desc'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_str_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/files":{"get":{"tags":["products"],"summary":"List files attached to a base product","description":"List all files attached to a base product.","operationId":"get_product_files_v1_products__product_id__files_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_FileReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Upload a file to a base product","description":"Upload a new file for a base product.\n\nRestricted to lab accounts: research-file formats are a lab capability, so the\ndependency rejects before the multipart body is read.","operationId":"upload_product_file_v1_products__product_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_file_v1_products__product_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/files/{file_id}":{"get":{"tags":["products"],"summary":"Get a specific base-product file","description":"Get a specific file attached to a base product.","operationId":"get_product_file_v1_products__product_id__files__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove a file from a base product","description":"Remove a file from a base product.","operationId":"delete_product_file_v1_products__product_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/images":{"get":{"tags":["products"],"summary":"List images attached to a base product","description":"List all images attached to a base product.","operationId":"get_product_images_v1_products__product_id__images_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ImageReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Upload an image to a base product","description":"Upload a new image for a base product.","operationId":"upload_product_image_v1_products__product_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_image_v1_products__product_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/images/{image_id}":{"get":{"tags":["products"],"summary":"Get a specific base-product image","description":"Get a specific image attached to a base product.","operationId":"get_product_image_v1_products__product_id__images__image_id__get","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove an image from a base product","description":"Remove an image from a base product.","operationId":"delete_product_image_v1_products__product_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}":{"get":{"tags":["components"],"summary":"Get component by ID","description":"Fetch a component by its stable id.","operationId":"get_component_v1_components__component_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRelationshipsAndFlatComponents"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["components"],"summary":"Update component","description":"Update a component. Response is the lean :class:`ComponentRead` shape (no relationships).","operationId":"update_component_v1_components__component_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"if-match","in":"header","required":true,"schema":{"type":"string","description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412.","title":"If-Match"},"description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentRead"}}}},"412":{"description":"The record changed since the `version` sent in `If-Match`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Delete component","description":"Delete a component (cascades to its sub-components).","operationId":"delete_component_v1_components__component_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/components":{"post":{"tags":["components"],"summary":"Create a nested component","description":"Create a new component below an existing component.\n\nAn optional ``Idempotency-Key`` header makes a retried request safe: replaying the same\nkey returns the original response instead of creating a second component. The key is bound to\nthis user, this parent, and this request body; reusing it with a different body is a 422.","operationId":"add_component_to_component_v1_components__component_id__components_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"examples":{"simple":{"value":{"name":"Seat Assembly","description":"Chair seat component","amount_in_parent":1,"bill_of_materials":[{"material_id":1,"quantity":0.5,"unit":"g"}]},"summary":"Basic component","description":"Create a component without subcomponents"},"nested":{"value":{"name":"Seat Assembly","description":"Chair seat with cushion","amount_in_parent":1,"components":[{"name":"Cushion","description":"Foam cushion","amount_in_parent":1,"bill_of_materials":[{"material_id":2,"quantity":0.3,"unit":"g"}]}]},"summary":"Component with subcomponents","description":"Create a component with nested subcomponents"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"}}}},"409":{"description":"A request with this Idempotency-Key is already being processed."},"503":{"description":"The idempotency store is unreachable; retry later."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/files":{"get":{"tags":["components"],"summary":"List files attached to a component","description":"List all files attached to a component.","operationId":"get_component_files_v1_components__component_id__files_get","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_FileReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Upload a file to a component","description":"Upload a new file for a component.\n\nRestricted to lab accounts, like the product-level route.","operationId":"upload_component_file_v1_components__component_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_component_file_v1_components__component_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/files/{file_id}":{"get":{"tags":["components"],"summary":"Get a specific component file","description":"Get a specific file attached to a component.","operationId":"get_component_file_v1_components__component_id__files__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove a file from a component","description":"Remove a file from a component.","operationId":"delete_component_file_v1_components__component_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/images":{"get":{"tags":["components"],"summary":"List images attached to a component","description":"List all images attached to a component.","operationId":"get_component_images_v1_components__component_id__images_get","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ImageReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Upload an image to a component","description":"Upload a new image for a component.","operationId":"upload_component_image_v1_components__component_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_component_image_v1_components__component_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/images/{image_id}":{"get":{"tags":["components"],"summary":"Get a specific component image","description":"Get a specific image attached to a component.","operationId":"get_component_image_v1_components__component_id__images__image_id__get","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove an image from a component","description":"Remove an image from a component.","operationId":"delete_component_image_v1_components__component_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/materials":{"get":{"tags":["components"],"summary":"Get component bill of materials","description":"Get bill of materials for a component.","operationId":"get_component_bill_of_materials_v1_components__component_id__materials_get","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"quantity","in":"query","required":false,"schema":{"type":"number","title":"Quantity"}},{"name":"quantity[ge]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Ge]"}},{"name":"quantity[le]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Le]"}},{"name":"unit","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},{"name":"unit[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit[Ilike]"}},{"name":"material_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name"}},{"name":"material_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name[Ilike]"}},{"name":"material_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description"}},{"name":"material_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description[Ilike]"}},{"name":"material_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source"}},{"name":"material_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source[Ilike]"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Get Component Bill Of Materials V1 Components Component Id Materials Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Add multiple materials to component bill of materials","description":"Add multiple materials to a component's bill of materials.","operationId":"add_materials_to_component_v1_components__component_id__materials_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"description":"List of materials-component links to add to the component","title":"Materials"},"examples":{"multiple_materials":{"value":[{"material_id":1,"quantity":5,"unit":"g"},{"material_id":2,"quantity":10,"unit":"g"}],"summary":"Add multiple materials"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Add Materials To Component V1 Components Component Id Materials Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove multiple materials from component bill of materials","description":"Remove multiple materials from a component's bill of materials.","operationId":"remove_materials_from_component_bulk_v1_components__component_id__materials_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer","exclusiveMinimum":0},"description":"Material IDs to remove from the component","title":"Material Ids"},"examples":{"multiple_material_ids":{"value":[1,2,3],"summary":"Remove multiple material links"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/materials/{material_id}":{"get":{"tags":["components"],"summary":"Get material in component bill of materials","description":"Get a material in a component's bill of materials.","operationId":"get_material_in_component_bill_of_materials_v1_components__component_id__materials__material_id__get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Add single material to component bill of materials","description":"Add a single material to a component's bill of materials.","operationId":"add_material_to_component_v1_components__component_id__materials__material_id__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to add to the component","title":"Material Id"},"description":"ID of material to add to the component","examples":{"material_id":{"value":1,"summary":"Existing material ID"}}},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProductAndMaterial","description":"Material-component link details"},"examples":{"single_material":{"value":{"quantity":5,"unit":"g"},"summary":"Link details for one material"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["components"],"summary":"Update material in component bill of materials","description":"Update material in bill of materials for a component.","operationId":"update_component_bill_of_materials_v1_components__component_id__materials__material_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove single material from component bill of materials","description":"Remove a single material from a component's bill of materials.","operationId":"remove_material_from_component_v1_components__component_id__materials__material_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to remove from the component","title":"Material Id"},"description":"ID of material to remove from the component"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/videos":{"get":{"tags":["products"],"summary":"Get all videos for a base product","description":"Get all videos associated with a base product.\n\nVideos live only on base products (dismantling captures whole products,\nnot components). Component ids are rejected.","operationId":"get_product_videos_v1_products__product_id__videos_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},{"name":"url[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+url","+created_at","url","created_at","-url","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VideoReadWithinProduct"},"title":"Response Get Product Videos V1 Products Product Id Videos Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Create a new video for a base product","description":"Create a new video associated with a base product.","operationId":"create_product_video_v1_products__product_id__videos_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoCreateWithinProduct"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/videos/{video_id}":{"get":{"tags":["products"],"summary":"Get video by ID","description":"Get a video associated with a base product.","operationId":"get_product_video_v1_products__product_id__videos__video_id__get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Video Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["products"],"summary":"Update video by ID","description":"Update a video associated with a base product.","operationId":"update_product_video_v1_products__product_id__videos__video_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Video Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoUpdateWithinProduct"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Delete video by ID","description":"Delete a video associated with a base product.","operationId":"delete_product_video_v1_products__product_id__videos__video_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Video Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/materials":{"get":{"tags":["products"],"summary":"Get product bill of materials","description":"Get bill of materials for a base product.","operationId":"get_product_bill_of_materials_v1_products__product_id__materials_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"quantity","in":"query","required":false,"schema":{"type":"number","title":"Quantity"}},{"name":"quantity[ge]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Ge]"}},{"name":"quantity[le]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Le]"}},{"name":"unit","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},{"name":"unit[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit[Ilike]"}},{"name":"material_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name"}},{"name":"material_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name[Ilike]"}},{"name":"material_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description"}},{"name":"material_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description[Ilike]"}},{"name":"material_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source"}},{"name":"material_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source[Ilike]"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Get Product Bill Of Materials V1 Products Product Id Materials Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Add multiple materials to product bill of materials","description":"Add multiple materials to a base product's bill of materials.","operationId":"add_materials_to_product_v1_products__product_id__materials_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"description":"List of materials-product links to add to the product","title":"Materials"},"examples":{"multiple_materials":{"value":[{"material_id":1,"quantity":5,"unit":"g"},{"material_id":2,"quantity":10,"unit":"g"}],"summary":"Add multiple materials"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Add Materials To Product V1 Products Product Id Materials Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove multiple materials from product bill of materials","description":"Remove multiple materials from a base product's bill of materials.","operationId":"remove_materials_from_product_bulk_v1_products__product_id__materials_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer","exclusiveMinimum":0},"description":"Material IDs to remove from the product","title":"Material Ids"},"examples":{"multiple_material_ids":{"value":[1,2,3],"summary":"Remove multiple material links"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/materials/{material_id}":{"get":{"tags":["products"],"summary":"Get material in product bill of materials","description":"Get a material in a base product's bill of materials.","operationId":"get_material_in_product_bill_of_materials_v1_products__product_id__materials__material_id__get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Add single material to product bill of materials","description":"Add a single material to a base product's bill of materials.","operationId":"add_material_to_product_v1_products__product_id__materials__material_id__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to add to the product","title":"Material Id"},"description":"ID of material to add to the product","examples":{"material_id":{"value":1,"summary":"Existing material ID"}}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProductAndMaterial","description":"Material-product link details"},"examples":{"single_material":{"value":{"quantity":5,"unit":"g"},"summary":"Link details for one material"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["products"],"summary":"Update material in product bill of materials","description":"Update material in bill of materials for a base product.","operationId":"update_product_bill_of_materials_v1_products__product_id__materials__material_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove single material from product bill of materials","description":"Remove a single material from a base product's bill of materials.","operationId":"remove_material_from_product_v1_products__product_id__materials__material_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to remove from the product","title":"Material Id"},"description":"ID of material to remove from the product"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/bearer/login":{"post":{"tags":["auth"],"summary":"Login with email and password for bearer-token clients","description":"Authenticate a bearer client and return access and refresh tokens in JSON.","operationId":"auth_bearer_login_v1_auth_bearer_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_auth_bearer_login_v1_auth_bearer_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenResponse"},{"$ref":"#/components/schemas/MfaPendingResponse"}],"title":"Response Auth Bearer Login V1 Auth Bearer Login Post"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"429":{"description":"Too many attempts for this address or account. See the Retry-After header."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/session/login":{"post":{"tags":["auth"],"summary":"Login with email and password for browser sessions","description":"Authenticate a browser client and return MFA challenge only when MFA is enabled.","operationId":"auth_session_login_v1_auth_session_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_auth_session_login_v1_auth_session_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MfaPendingResponse"},{"type":"null"}],"title":"Response Auth Session Login V1 Auth Session Login Post"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"429":{"description":"Too many attempts for this address or account. See the Retry-After header."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/register":{"post":{"tags":["auth"],"summary":"Register a new user","description":"Register a new user, returning the same response whether or not the email is taken.","operationId":"register_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegister"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/bearer/refresh":{"post":{"tags":["auth"],"summary":"Refresh tokens for bearer-token clients","description":"Refresh access token using refresh token for bearer auth.\n\nValidates refresh token and issues new access token.","operationId":"auth_bearer_refresh_v1_auth_bearer_refresh_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/session/refresh":{"post":{"tags":["auth"],"summary":"Refresh tokens for browser sessions","description":"Refresh access token using refresh token from cookie.\n\nValidates refresh token cookie and issues new access token cookie.","operationId":"auth_session_refresh_v1_auth_session_refresh_post","parameters":[{"name":"__Host-r9lab-refresh","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":" Host-R9Lab-Refresh"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/bearer/logout":{"post":{"tags":["auth"],"summary":"Log out a bearer-token client","description":"Logout a bearer client and revoke its supplied refresh token.","operationId":"auth_bearer_logout_v1_auth_bearer_logout_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/session/logout":{"post":{"tags":["auth"],"summary":"Log out a browser session","description":"Logout a browser session, revoke refresh state, and clear browser storage.","operationId":"auth_session_logout_v1_auth_session_logout_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"__Host-r9lab-refresh","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":" Host-R9Lab-Refresh"}},{"name":"__Host-r9lab-auth","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":" Host-R9Lab-Auth"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/sessions/revoke-all":{"post":{"tags":["auth"],"summary":"Revoke every session of the current user","description":"Revoke all refresh tokens for the current user and clear browser session state.","operationId":"auth_sessions_revoke_all_v1_auth_sessions_revoke_all_post","responses":{"204":{"description":"Successful Response"}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/totp/setup":{"post":{"tags":["auth"],"summary":"Start Totp Setup","description":"Start authenticated TOTP enrollment for an account that opted into MFA.","operationId":"start_totp_setup_v1_auth_mfa_totp_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpSetupResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/totp/confirm":{"post":{"tags":["auth"],"summary":"Confirm Totp Setup","description":"Confirm TOTP enrollment, return one-time recovery codes, and replace the session.\n\nEnrolment signs out every other session. A client that authenticated with a bearer\ntoken gets new tokens in ``tokens``; a browser session gets new cookies.","operationId":"confirm_totp_setup_v1_auth_mfa_totp_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpConfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/totp/disable":{"post":{"tags":["auth"],"summary":"Disable Totp","description":"Turn off TOTP MFA after confirming the password and a current or recovery code.\n\nAccounts without a usable password (signed up with Google or GitHub) send only the code.","operationId":"disable_totp_v1_auth_mfa_totp_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpDisableRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"400":{"description":"The password or the code is missing."},"401":{"description":"MFA is not on for this account."},"403":{"description":"The password or the code is wrong."},"429":{"description":"Too many guesses for this account. See the Retry-After header."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/recovery-codes/regenerate":{"post":{"tags":["auth"],"summary":"Regenerate Recovery Codes","description":"Reissue recovery codes after confirming a current TOTP code.","operationId":"regenerate_recovery_codes_v1_auth_mfa_recovery_codes_regenerate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaRecoveryCodesRegenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaRecoveryCodesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/oauth/claim":{"post":{"tags":["auth"],"summary":"Claim Oauth Mfa Handoff","description":"Claim a one-time OAuth MFA handoff and return pending MFA state.","operationId":"claim_oauth_mfa_handoff_v1_auth_mfa_oauth_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaOAuthClaimRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaPendingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/mfa/challenge":{"post":{"tags":["auth"],"summary":"Complete Mfa Challenge","description":"Complete login for a user with TOTP already enabled.","operationId":"complete_mfa_challenge_v1_auth_mfa_challenge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaChallengeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenResponse"},{"type":"null"}],"title":"Response Complete Mfa Challenge V1 Auth Mfa Challenge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/request-verify-token":{"post":{"tags":["auth"],"summary":"Verify:Request-Token","operationId":"verify_request_token_v1_auth_request_verify_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_verify_request_token_v1_auth_request_verify_token_post"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/verify":{"post":{"tags":["auth"],"summary":"Verify:Verify","operationId":"verify_verify_v1_auth_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_verify_verify_v1_auth_verify_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"VERIFY_USER_BAD_TOKEN":{"summary":"Bad token, not existing user or not the e-mail currently set for the user.","value":{"detail":"VERIFY_USER_BAD_TOKEN"}},"VERIFY_USER_ALREADY_VERIFIED":{"summary":"The user is already verified.","value":{"detail":"VERIFY_USER_ALREADY_VERIFIED"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Reset:Forgot Password","description":"Start a forgot-password request without revealing whether the account exists.","operationId":"reset_forgot_password_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_reset_forgot_password_v1_auth_forgot_password_post"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset:Reset Password","description":"Reset a password while preserving FastAPI-Users' public error contract.","operationId":"reset_reset_password_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_reset_reset_password_v1_auth_reset_password_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"RESET_PASSWORD_BAD_TOKEN":{"summary":"Bad or expired token.","value":{"detail":"RESET_PASSWORD_BAD_TOKEN"}},"RESET_PASSWORD_INVALID_PASSWORD":{"summary":"Password validation failed.","value":{"detail":{"code":"RESET_PASSWORD_INVALID_PASSWORD","reason":"Password should be at least 3 characters"}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/validate-email":{"post":{"tags":["auth"],"summary":"Validate Email","description":"Validate email address for registration.\n\nTakes the email in a POST body (not a query param) so it doesn't land in\nproxy/uvicorn access logs, matching the pairing endpoints' approach.","operationId":"validate_email_v1_auth_validate_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailValidationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"null"}]},"type":"object","title":"Response Validate Email V1 Auth Validate Email Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/github/token/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Bearer.Authorize","operationId":"oauth_github_bearer_authorize_v1_oauth_github_token_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/github/token/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Bearer.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_github_bearer_callback_v1_oauth_github_token_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/github/session/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Cookie.Authorize","operationId":"oauth_github_cookie_authorize_v1_oauth_github_session_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/github/session/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Cookie.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_github_cookie_callback_v1_oauth_github_session_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/github/associate/authorize":{"post":{"tags":["oauth"],"summary":"Oauth-Associate:Github.Authorize","operationId":"oauth_associate_github_authorize_v1_oauth_github_associate_authorize_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/oauth/github/associate/callback":{"get":{"tags":["oauth"],"summary":"Oauth-Associate:Github.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_associate_github_callback_v1_oauth_github_associate_callback_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google/token/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Bearer.Authorize","operationId":"oauth_google_bearer_authorize_v1_oauth_google_token_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/google/token/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Bearer.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_google_bearer_callback_v1_oauth_google_token_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google/session/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Cookie.Authorize","operationId":"oauth_google_cookie_authorize_v1_oauth_google_session_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/google/session/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Cookie.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_google_cookie_callback_v1_oauth_google_session_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google/associate/authorize":{"post":{"tags":["oauth"],"summary":"Oauth-Associate:Google.Authorize","operationId":"oauth_associate_google_authorize_v1_oauth_google_associate_authorize_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/oauth/google/associate/callback":{"get":{"tags":["oauth"],"summary":"Oauth-Associate:Google.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_associate_google_callback_v1_oauth_google_associate_callback_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google-youtube/associate/authorize":{"post":{"tags":["oauth"],"summary":"Oauth-Associate:Google-Youtube.Authorize","operationId":"oauth_associate_google_youtube_authorize_v1_oauth_google_youtube_associate_authorize_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/oauth/google-youtube/associate/callback":{"get":{"tags":["oauth"],"summary":"Oauth-Associate:Google-Youtube.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_associate_google_youtube_callback_v1_oauth_google_youtube_associate_callback_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/{provider}/associate":{"delete":{"tags":["oauth"],"summary":"Remove Oauth Association","description":"Remove a linked OAuth account (password and MFA step-up where the account has them).","operationId":"remove_oauth_association_v1_oauth__provider__associate_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/users/me":{"get":{"tags":["users"],"summary":"Users:Current User","operationId":"users_current_user_v1_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"401":{"description":"Missing token or inactive user."}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]},"delete":{"tags":["users"],"summary":"Delete your own account","description":"Delete the signed-in account, keeping its products under the anonymous system account.\n\nPersonal data is erased; contributed products and media stay on the platform without\nthe owner's name. Requires the current password, the same step-up as an email or\npassword change, and a current MFA code when the account has MFA enabled. An account\nwith neither must have signed in within the last few minutes. The former address gets\na notification email.","operationId":"delete_own_account_v1_users_me_delete","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"204":{"description":"Successful Response"},"400":{"description":"The current password or MFA code is missing."},"403":{"description":"The current password or MFA code is invalid, or the account needs a fresh sign-in."},"409":{"description":"This account cannot be deleted (the last active superuser)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]},"patch":{"tags":["users"],"summary":"Users:Patch Current User","operationId":"users_patch_current_user_v1_users_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"401":{"description":"Missing token or inactive user."},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"UPDATE_USER_EMAIL_ALREADY_EXISTS":{"summary":"A user with this email already exists.","value":{"detail":"UPDATE_USER_EMAIL_ALREADY_EXISTS"}},"UPDATE_USER_INVALID_PASSWORD":{"summary":"Password validation failed.","value":{"detail":{"code":"UPDATE_USER_INVALID_PASSWORD","reason":"Password should beat least 3 characters"}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/users/me/accept-terms":{"post":{"tags":["users"],"summary":"Accept the current contributor terms","description":"Record that this account accepted the contributor terms.\n\nThe route takes no body: the server stamps ``CURRENT_TERMS_VERSION``, so a client\ncannot claim a grant under terms it was never shown. An acceptance already past the\ncurrent version is kept.\n\nWrites through the user database: the account was loaded by the auth session, not\n``AsyncSessionDep``, so committing on the latter would persist nothing.","operationId":"accept_terms_v1_users_me_accept_terms_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/admin/users":{"get":{"tags":["admin"],"summary":"View all users","description":"Get a list of all users with optional filtering.","operationId":"get_users_v1_admin_users_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},{"name":"email[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email[Ilike]"}},{"name":"username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"}},{"name":"username[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username[Ilike]"}},{"name":"is_active","in":"query","required":false,"schema":{"type":"boolean","title":"Is Active"}},{"name":"is_active[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Active[Eq]"}},{"name":"is_superuser","in":"query","required":false,"schema":{"type":"boolean","title":"Is Superuser"}},{"name":"is_superuser[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Superuser[Eq]"}},{"name":"is_verified","in":"query","required":false,"schema":{"type":"boolean","title":"Is Verified"}},{"name":"is_verified[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Verified[Eq]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+email","+username","email","username","-email","-username"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"List of users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_UserRead_"},"examples":{"basic":{"value":[{"id":"12345678-cc4e-405c-8553-7806424de2a1","username":"alice","email":"alice@example.com","is_active":true,"is_superuser":false,"is_verified":true}],"summary":"Users without relationships"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/users/{user_id}":{"get":{"tags":["admin"],"summary":"View a single user by ID","description":"Get a user by ID.","operationId":"get_user_v1_admin_users__user_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"patch":{"tags":["admin"],"summary":"Update a user by ID","description":"Update a user by ID without requiring the target account's password.\n\n`safe=False` lets an administrator change fields the self-service route\nreauthenticates for; UserManager skips the current-password gate on this path.","operationId":"update_user_v1_admin_users__user_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin"],"summary":"Delete a user by ID","description":"Delete a user by ID, anonymizing or deleting the content they own.","operationId":"delete_user_v1_admin_users__user_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"},{"name":"content","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ErasureContent","description":"What to do with the research data this user contributed: `anonymize` reassigns their products to the anonymous system account, `delete` removes the products and their media. Personal data is erased either way.","default":"anonymize"},"description":"What to do with the research data this user contributed: `anonymize` reassigns their products to the anonymous system account, `delete` removes the products and their media. Personal data is erased either way."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/users/{user_id}/mfa/reset":{"post":{"tags":["admin"],"summary":"Reset a user's MFA enrollment","description":"Reset TOTP MFA after an administrator performs identity-proofed recovery.","operationId":"reset_user_mfa_v1_admin_users__user_id__mfa_reset_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/users/{user_id}/role":{"put":{"tags":["admin"],"summary":"Set a user's contributor tier","description":"Set a user's role.\n\nA dedicated route rather than a field on `UserUpdate`: fastapi-users' safe\nupdate path excludes a fixed set of privileged fields, so anything new added\nto that schema would flow straight through self-service `PATCH /users/me`.\nKeeping role off the schema entirely makes that escalation unrepresentable.\n\nWrites through the user database rather than `AsyncSessionDep`: the target\nuser is loaded by the auth session, which is a separate dependency, so a\ncommit on the common session would persist nothing.","operationId":"set_user_role_v1_admin_users__user_id__role_put","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/profiles/{username}":{"get":{"tags":["profiles"],"summary":"Get public profile of a user","description":"Get public profile statistics for a specified user by username.\n\nReturns 404 if the user is not found or if the profile is marked as private (and you are not the user).\nRecomputes stats on the fly when no snapshot exists yet, without persisting the result.","operationId":"get_public_profile_v1_profiles__username__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProfileView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras":{"get":{"tags":["r9cam-management"],"summary":"Get Raspberry Pi cameras of the current user","description":"Get all Raspberry Pi cameras of the current user.","operationId":"get_user_cameras_v1_plugins_r9cam_cameras_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"include_status","in":"query","required":false,"schema":{"type":"boolean","description":"Include camera online status","default":false,"title":"Include Status"},"description":"Include camera online status","examples":{"disabled":{"value":false,"summary":"Return camera metadata only"},"enabled":{"value":true,"summary":"Include current online status"}}},{"name":"include_telemetry","in":"query","required":false,"schema":{"type":"boolean","description":"Include the last-known telemetry snapshot from the Redis cache. Implies ``include_status=true``. No relay round-trips; cameras without cached telemetry come back with ``telemetry: null``.","default":false,"title":"Include Telemetry"},"description":"Include the last-known telemetry snapshot from the Redis cache. Implies ``include_status=true``. No relay round-trips; cameras without cached telemetry come back with ``telemetry: null``."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+created_at","name","created_at","-name","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CameraRead"}},{"type":"array","items":{"$ref":"#/components/schemas/CameraReadWithStatus"}}],"title":"Response Get User Cameras V1 Plugins R9Cam Cameras Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["r9cam-management"],"summary":"Register new Raspberry Pi camera","description":"Register a new Raspberry Pi camera.\n\nThe normal user flow is /plugins/r9cam/pairing/claim. This endpoint is\nkept as a structured API surface for tests/admin automation and still\nrequires a public device key.","operationId":"register_user_camera_v1_plugins_r9cam_cameras_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}":{"get":{"tags":["r9cam-management"],"summary":"Get Raspberry Pi camera by ID","description":"Get single Raspberry Pi camera by ID, if owned by the current user.","operationId":"get_user_camera_v1_plugins_r9cam_cameras__camera_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}},{"name":"include_status","in":"query","required":false,"schema":{"type":"boolean","description":"Include camera online status","default":false,"title":"Include Status"},"description":"Include camera online status","examples":{"disabled":{"value":false,"summary":"Return camera metadata only"},"enabled":{"value":true,"summary":"Include current online status"}}},{"name":"include_telemetry","in":"query","required":false,"schema":{"type":"boolean","description":"Include last-known telemetry from the Redis cache. Implies ``include_status=true``.","default":false,"title":"Include Telemetry"},"description":"Include last-known telemetry from the Redis cache. Implies ``include_status=true``."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CameraRead"},{"$ref":"#/components/schemas/CameraReadWithStatus"}],"title":"Response Get User Camera V1 Plugins R9Cam Cameras Camera Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["r9cam-management"],"summary":"Update Raspberry Pi camera","description":"Update Raspberry Pi camera.","operationId":"update_user_camera_v1_plugins_r9cam_cameras__camera_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["r9cam-management"],"summary":"Delete Raspberry Pi camera","description":"Delete Raspberry Pi camera.","operationId":"delete_user_camera_v1_plugins_r9cam_cameras__camera_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/preview-thumbnail":{"get":{"tags":["r9cam-management"],"summary":"Get a camera's cached preview thumbnail","description":"Serve the owner's cached preview thumbnail.\n\nOwner-checked (``UserOwnedCameraDep`` 404s for non-owners) and served off the\nprivate preview directory rather than the public ``/uploads/images`` mount, so\na camera id alone no longer grants a stranger a recent frame. Cached only\nprivately and revalidated, never long-lived immutable like the public mount.","operationId":"get_camera_preview_thumbnail_v1_plugins_r9cam_cameras__camera_id__preview_thumbnail_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response"},"404":{"description":"No cached preview thumbnail available for this camera."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/status":{"get":{"tags":["r9cam-management"],"summary":"Get Raspberry Pi camera online status","description":"Get Raspberry Pi camera online status.","operationId":"get_user_camera_status_v1_plugins_r9cam_cameras__camera_id__status_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/local-access":{"get":{"tags":["r9cam-management"],"summary":"Get local direct-connection info for a camera","description":"Relays GET /system/local-access to the Pi via the WebSocket connection. Returns the local API key and candidate IP addresses so the frontend can auto-configure Ethernet/USB-C direct access without manual key copying. Returns 503 when the camera is offline.","operationId":"get_camera_local_access_v1_plugins_r9cam_cameras__camera_id__local_access_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalAccessInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/captures":{"post":{"tags":["r9cam-interaction"],"summary":"Capture a still image with a remote Raspberry Pi Camera","description":"Capture a still image with a remote Raspberry Pi Camera and store it in the file storage. Send optional parent type and ID in the request body to associate the image with another object.","operationId":"capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/recording-stream":{"get":{"tags":["r9cam-interaction"],"summary":"Get the active YouTube recording stream status","description":"Fetch the current remote camera stream status from the Raspberry Pi camera plugin.","operationId":"get_camera_stream_status_v1_plugins_r9cam_cameras__camera_id__recording_stream_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["r9cam-interaction"],"summary":"Start recording to YouTube","description":"Start a YouTube recording stream.","operationId":"start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["r9cam-interaction"],"summary":"Stop recording to YouTube","description":"Stop the active YouTube recording and return its video record.","operationId":"stop_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/recording-stream/monitor":{"get":{"tags":["r9cam-interaction"],"summary":"Get YouTube livestream monitor stream","description":"Get the YouTube monitor stream for the active backend-owned recording session.","operationId":"get_recording_monitor_stream_v1_plugins_r9cam_cameras__camera_id__recording_stream_monitor_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeMonitorStreamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/telemetry":{"get":{"tags":["r9cam-interaction"],"summary":"Get a camera's latest telemetry snapshot","description":"Return the most recent telemetry snapshot for the camera. Backed by a Redis cache with a 120s TTL so mosaic polling does not fan out one relay round-trip per camera on every refresh. Pass ``force_refresh=true`` to bypass the cache and re-fetch from the Pi.","operationId":"get_camera_telemetry_v1_plugins_r9cam_cameras__camera_id__telemetry_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}},{"name":"force_refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetrySnapshot"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/hls/{hls_path}":{"get":{"tags":["r9cam-interaction"],"summary":"Proxy LL-HLS playlists and segments from the camera's MediaMTX","description":"Forward an LL-HLS request to the camera over its WebSocket relay. Playlist requests return ``application/vnd.apple.mpegurl`` text; segment/part requests return binary ``video/mp4`` or ``video/iso.segment``. The frontend simply points ``hls.js`` / ``expo-video`` at this URL and the player walks the manifest on its own.","operationId":"proxy_hls_v1_plugins_r9cam_cameras__camera_id__hls__hls_path__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}},{"name":"hls_path","in":"path","required":true,"schema":{"type":"string","title":"Hls Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/device/cameras/{camera_id}/self":{"delete":{"tags":["r9cam-device"],"summary":"Pi-initiated self-unpair","description":"Called by the Pi when the user triggers unpair from the local /setup page. Authenticates via the device's assertion. Deletes the camera from the database so the backend no longer shows it as offline.","operationId":"self_unpair_camera_v1_plugins_r9cam_device_cameras__camera_id__self_delete","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/device/cameras/{camera_id}/image-upload":{"post":{"tags":["r9cam-device"],"summary":"Internal: receive an image pushed directly from a paired Raspberry Pi","description":"Called by the Pi after a successful capture. Authenticated with a short-lived device assertion (same credential used by the WebSocket relay). The Pi provides the JPEG body plus two JSON blobs: `capture_metadata` (libcamera metadata) and `upload_metadata` (opaque dict forwarded by whichever caller triggered the capture, typically `{product_id, description}`). The backend stores the image via the normal image storage service and returns a tiny ack envelope the Pi consumes.","operationId":"receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceImageUploadAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/device/cameras/{camera_id}/preview-thumbnail-upload":{"post":{"tags":["r9cam-device"],"summary":"Internal: receive a cached preview thumbnail pushed directly from a paired Raspberry Pi","description":"Called by the Pi's background thumbnail worker. Authenticated with the same short-lived device assertion used by the WebSocket relay. Stores a deterministic per-camera JPEG cache file for camera-card previews without creating an Image database row.","operationId":"receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePreviewThumbnailAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/pairing/claim":{"post":{"tags":["RPi Camera Pairing"],"summary":"Claim a pairing code and create a camera (called by user)","description":"Claim a pairing code and create a WebSocket-relayed camera.\n\nThe pending record is consumed atomically (GETDEL) so two concurrent claims\nof the same code cannot both succeed: only the winner observes the pending\nrecord and goes on to create the camera. The loser sees a missing key and\ngets the same invalid-code error as an unknown code.","operationId":"claim_pairing_code_v1_plugins_r9cam_pairing_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingClaimRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/plugins/r9cam/pairing/register":{"post":{"tags":["RPi Camera Pairing"],"summary":"Register a pairing code (called by RPi)","description":"Register a short-lived pairing code and the camera's public device key.","operationId":"register_pairing_code_v1_plugins_r9cam_pairing_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingRegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/pairing/poll":{"post":{"tags":["RPi Camera Pairing"],"summary":"Poll pairing status (called by RPi)","description":"Poll for pairing completion. Returns non-secret relay metadata once claimed.\n\nTakes the code and fingerprint in a POST body (not query params) so the\nclaim credential never reaches proxy/uvicorn access logs.","operationId":"poll_pairing_status_v1_plugins_r9cam_pairing_poll_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingPollRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingPollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/admin/plugins/r9cam/cameras":{"get":{"tags":["admin"],"summary":"Get all Raspberry Pi cameras","description":"Get all Raspberry Pi cameras.","operationId":"get_all_cameras_v1_admin_plugins_r9cam_cameras_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"owner_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"}},{"name":"owner_email[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email[Ilike]"}},{"name":"owner_username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"}},{"name":"owner_username[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+created_at","+owner_email","+owner_username","name","created_at","owner_email","owner_username","-name","-created_at","-owner_email","-owner_username"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CameraRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/plugins/r9cam/cameras/{camera_id}":{"get":{"tags":["admin"],"summary":"Get Raspberry Pi camera by ID","description":"Get single Raspberry Pi camera by ID.","operationId":"get_camera_v1_admin_plugins_r9cam_cameras__camera_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin"],"summary":"Delete Raspberry Pi camera","description":"Delete Raspberry Pi camera.","operationId":"delete_camera_v1_admin_plugins_r9cam_cameras__camera_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/plugins/r9cam/cameras/{camera_id}/status":{"get":{"tags":["admin"],"summary":"Get Raspberry Pi camera online status","description":"Get Raspberry Pi camera online status.","operationId":"get_camera_status_v1_admin_plugins_r9cam_cameras__camera_id__status_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/stats/totals":{"get":{"tags":["stats"],"summary":"Get Stats Totals","description":"System-wide all-time aggregate statistics.","operationId":"get_stats_totals_v1_stats_totals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotalsResponse"}}}}},"x-audience":["public","app"]}},"/v1/stats/categories":{"get":{"tags":["stats"],"summary":"Get Stats Categories","description":"Product categories ordered by count, capped at limit (max 100).\n\n`scope` selects what is counted: `products` (top-level products only, the\ndefault), `components` (categorised by the component's own type), or `all`.","operationId":"get_stats_categories_v1_stats_categories_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"scope","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CategoryScope","default":"products"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/stats/series":{"get":{"tags":["stats"],"summary":"Get Stats Series","description":"Time-bucketed activity series. Granularity: day | week | month | year.","operationId":"get_stats_series_v1_stats_series_get","parameters":[{"name":"granularity","in":"query","required":false,"schema":{"enum":["day","week","month","year"],"type":"string","default":"month","title":"Granularity"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}}},"components":{"schemas":{"Body_auth_bearer_login_v1_auth_bearer_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_auth_bearer_login_v1_auth_bearer_login_post"},"Body_auth_session_login_v1_auth_session_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_auth_session_login_v1_auth_session_login_post"},"Body_capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post":{"properties":{"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id","description":"ID of product to associate the image with"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Custom description for the image"}},"type":"object","required":["product_id"],"title":"Body_capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post"},"Body_receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Captured JPEG"},"capture_metadata":{"type":"string","title":"Capture Metadata","description":"libcamera capture metadata as a JSON string"},"upload_metadata":{"type":"string","title":"Upload Metadata","description":"Parent association metadata as a JSON string"}},"type":"object","required":["file","capture_metadata","upload_metadata"],"title":"Body_receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post"},"Body_receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Cached preview JPEG thumbnail"}},"type":"object","required":["file"],"title":"Body_receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post"},"Body_reset_forgot_password_v1_auth_forgot_password_post":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"Body_reset_forgot_password_v1_auth_forgot_password_post"},"Body_reset_reset_password_v1_auth_reset_password_post":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","title":"Password"}},"type":"object","required":["token","password"],"title":"Body_reset_reset_password_v1_auth_reset_password_post"},"Body_start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post":{"properties":{"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id","description":"ID of product to associate the video with"},"title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Title","description":"Custom video title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Custom description for the video"},"privacy_status":{"$ref":"#/components/schemas/YouTubePrivacyStatus","description":"Privacy status for the YouTube video","default":"private"}},"type":"object","required":["product_id"],"title":"Body_start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post"},"Body_upload_component_file_v1_components__component_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_component_file_v1_components__component_id__files_post"},"Body_upload_component_image_v1_components__component_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_component_image_v1_components__component_id__images_post"},"Body_upload_material_file_v1_admin_materials__material_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_material_file_v1_admin_materials__material_id__files_post"},"Body_upload_material_image_v1_admin_materials__material_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_material_image_v1_admin_materials__material_id__images_post"},"Body_upload_product_file_v1_products__product_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_product_file_v1_products__product_id__files_post"},"Body_upload_product_image_v1_products__product_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_product_image_v1_products__product_id__images_post"},"Body_upload_product_type_file_v1_admin_product_types__product_type_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_product_type_file_v1_admin_product_types__product_type_id__files_post"},"Body_upload_product_type_image_v1_admin_product_types__product_type_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_product_type_image_v1_admin_product_types__product_type_id__images_post"},"Body_verify_request_token_v1_auth_request_verify_token_post":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"Body_verify_request_token_v1_auth_request_verify_token_post"},"Body_verify_verify_v1_auth_verify_post":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"Body_verify_verify_v1_auth_verify_post"},"CacheNamespace":{"type":"string","enum":["reference-data","stats"],"title":"CacheNamespace","description":"Cache namespace identifiers for different application areas."},"CameraConnectionStatus":{"type":"string","enum":["online","offline","unauthorized","forbidden","error"],"title":"CameraConnectionStatus","description":"Camera connection status."},"CameraCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"relay_public_key_jwk":{"$ref":"#/components/schemas/RelayPublicKeyJWK"},"relay_key_id":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]+$","title":"Relay Key Id"}},"additionalProperties":false,"type":"object","required":["name","relay_public_key_jwk","relay_key_id"],"title":"CameraCreate","description":"Schema for creating a WebSocket-relayed camera.","examples":[{"description":"Ceiling-mounted camera above the teardown bench","name":"Workbench Camera","relay_key_id":"cam-key-1","relay_public_key_jwk":{"crv":"P-256","kid":"cam-key-1","kty":"EC","x":"axfR8uEsQkf4vOblY6RA8ncDfYEt6zOg9KE5RdiYwpY","y":"T-NC4v4af5uO5-tKfA-eFivOM1drMV7Oy7ZAaDe_UfU"}}]},"CameraCredentialStatus":{"type":"string","enum":["active","revoked"],"title":"CameraCredentialStatus","description":"Status of the camera's relay device credential."},"CameraMode":{"type":"string","enum":["photo","video"],"title":"CameraMode","description":"Camera use mode. Contains camera configuration for each mode."},"CameraProperties":{"properties":{"Model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"unit_cell_size":{"anyOf":[{"prefixItems":[{"type":"integer","exclusiveMinimum":0.0},{"type":"integer","exclusiveMinimum":0.0}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Unit Cell Size","description":"Sensor unit cell size in nanometers"},"pixel_array_size":{"anyOf":[{"prefixItems":[{"type":"integer","exclusiveMinimum":0.0},{"type":"integer","exclusiveMinimum":0.0}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Pixel Array Size"},"sensor_sensitivity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sensor Sensitivity"}},"type":"object","title":"CameraProperties","description":"Static camera properties from libcamera.\n\nFor more info, see https://github.com/raspberrypi/libcamera/blob/main/src/libcamera/property_ids_core.yaml."},"CameraRead":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"owner_id":{"type":"string","format":"uuid4","title":"Owner Id"},"relay_key_id":{"type":"string","title":"Relay Key Id"},"relay_credential_status":{"$ref":"#/components/schemas/CameraCredentialStatus"}},"type":"object","required":["name","id","owner_id","relay_key_id","relay_credential_status"],"title":"CameraRead","description":"Basic Camera Read schema.","examples":[{"created_at":"2026-04-28T10:00:00Z","description":"Ceiling-mounted camera above the teardown bench","id":"12345678-cc4e-405c-8553-7806424de2a1","name":"Workbench Camera","owner_id":"87654321-cc4e-405c-8553-7806424de2a1","relay_credential_status":"active","relay_key_id":"cam-key-1","updated_at":"2026-04-28T10:00:00Z"}]},"CameraReadWithStatus":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"owner_id":{"type":"string","format":"uuid4","title":"Owner Id"},"relay_key_id":{"type":"string","title":"Relay Key Id"},"relay_credential_status":{"$ref":"#/components/schemas/CameraCredentialStatus"},"status":{"$ref":"#/components/schemas/CameraStatus"},"telemetry":{"anyOf":[{"$ref":"#/components/schemas/TelemetrySnapshot"},{"type":"null"}]},"preview_thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Thumbnail Url"}},"type":"object","required":["name","id","owner_id","relay_key_id","relay_credential_status","status"],"title":"CameraReadWithStatus","description":"Schema for camera read with online status.","examples":[{"created_at":"2026-04-28T10:00:00Z","description":"Ceiling-mounted camera above the teardown bench","id":"12345678-cc4e-405c-8553-7806424de2a1","name":"Workbench Camera","owner_id":"87654321-cc4e-405c-8553-7806424de2a1","relay_credential_status":"active","relay_key_id":"cam-key-1","updated_at":"2026-04-28T10:00:00Z"}]},"CameraStatus":{"properties":{"connection":{"$ref":"#/components/schemas/CameraConnectionStatus"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"details":{"anyOf":[{"$ref":"#/components/schemas/CameraStatusView"},{"type":"null"}]}},"type":"object","required":["connection"],"title":"CameraStatus","description":"Camera connection status and details."},"CameraStatusView":{"properties":{"current_mode":{"anyOf":[{"$ref":"#/components/schemas/CameraMode"},{"type":"null"}]},"stream":{"anyOf":[{"$ref":"#/components/schemas/StreamView"},{"type":"null"}]}},"type":"object","title":"CameraStatusView","description":"API response model for camera status."},"CameraUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"relay_public_key_jwk":{"anyOf":[{"$ref":"#/components/schemas/RelayPublicKeyJWK"},{"type":"null"}]},"relay_key_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]+$"},{"type":"null"}],"title":"Relay Key Id"},"relay_credential_status":{"anyOf":[{"$ref":"#/components/schemas/CameraCredentialStatus"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"CameraUpdate","description":"Schema for updating a camera.","examples":[{"description":"Camera assigned to the repairability bench"}]},"CaptureMetadata":{"properties":{"exposure_time":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Exposure Time","description":"Exposure time in microseconds"},"frame_duration":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Frame Duration","description":"Frame duration in microseconds"},"color_temperature":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Color Temperature","description":"Color temperature in K"},"analogue_gain":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Analogue Gain"},"digital_gain":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Digital Gain"},"lux":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Lux","description":"Illuminance in lux"},"sensor_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sensor Temperature","description":"Sensor temperature in \u00b0C"}},"type":"object","title":"CaptureMetadata","description":"Dynamic capture metadata from libcamera.\n\nFor more info, see https://github.com/raspberrypi/libcamera/blob/main/src/libcamera/control_ids_core.yaml."},"CategoriesResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"limit":{"type":"integer","title":"Limit"},"scope":{"$ref":"#/components/schemas/CategoryScope"},"categories":{"items":{"$ref":"#/components/schemas/CategoryStat"},"type":"array","title":"Categories"}},"type":"object","required":["generated_at","limit","scope","categories"],"title":"CategoriesResponse","description":"Response payload for the top-categories endpoint."},"CategoryCreate":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"taxonomy_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Taxonomy Id"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryCreate"},"type":"array","title":"Subcategories","description":"List of subcategories to create under this category"}},"additionalProperties":false,"type":"object","required":["name"],"title":"CategoryCreate","description":"Schema for creating a category, optionally with nested subcategories.\n\n- ``taxonomy_id`` is required for root categories and ignored when\n ``supercategory_id`` is provided (the parent's taxonomy is inherited).\n- ``supercategory_id`` is optional; when set the new category becomes a\n nested category under that parent."},"CategoryRead":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"taxonomy_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Taxonomy Id","description":"ID of the taxonomy"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"}},"type":"object","required":["name","id","taxonomy_id"],"title":"CategoryRead","description":"Schema for reading flat category information.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","supercategory_id":1,"taxonomy_id":1}]},"CategoryReadAsSubCategory":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","id"],"title":"CategoryReadAsSubCategory","description":"Schema for reading subcategory information.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals"}]},"CategoryReadAsSubCategoryWithRecursiveSubCategories":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryReadAsSubCategoryWithRecursiveSubCategories"},"type":"array","title":"Subcategories","description":"List of subcategories"}},"type":"object","required":["name","id"],"title":"CategoryReadAsSubCategoryWithRecursiveSubCategories","description":"Schema for reading category information with recursive subcategories.","examples":[{"description":"All kinds of metals","id":1,"name":"Metals","subcategories":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","subcategories":[{"description":"Steel alloys","id":3,"name":"Steel"}]}]}]},"CategoryReadWithRecursiveSubCategories":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"taxonomy_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Taxonomy Id","description":"ID of the taxonomy"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryReadAsSubCategoryWithRecursiveSubCategories"},"type":"array","title":"Subcategories","description":"List of subcategories"}},"type":"object","required":["name","id","taxonomy_id"],"title":"CategoryReadWithRecursiveSubCategories","description":"Schema for reading base category information with recursive subcategories.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","supercategory_id":1,"taxonomy_id":1}]},"CategoryReadWithRelationshipsAndFlatSubCategories":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"taxonomy_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Taxonomy Id","description":"ID of the taxonomy"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"},"materials":{"items":{"$ref":"#/components/schemas/MaterialRead"},"type":"array","title":"Materials","description":"List of materials linked to the category"},"product_types":{"items":{"$ref":"#/components/schemas/ProductTypeRead"},"type":"array","title":"Product Types","description":"List of product types linked to the category"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryReadAsSubCategory"},"type":"array","title":"Subcategories","description":"List of subcategories"}},"type":"object","required":["name","id","taxonomy_id"],"title":"CategoryReadWithRelationshipsAndFlatSubCategories","description":"Schema for reading category information with flat (one level deep) subcategories.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","supercategory_id":1,"taxonomy_id":1}]},"CategoryScope":{"type":"string","enum":["products","components","all"],"title":"CategoryScope","description":"Which population a category breakdown counts.\n\nA product's category is its own ``product_type``, and every product carries\none -- including components. A laptop torn down into a PCB and a screw\ncontributes one product to \"Laptop\" and one component each to \"PCB\" and\n\"Screw\"; it contributes nothing to \"Laptop\" from its components. So the\npopulation being categorised has to be chosen explicitly:\n\n- ``PRODUCTS``: top-level products only (``parent_id IS NULL``) -- the\n things that were torn down.\n- ``COMPONENTS``: components only (``parent_id IS NOT NULL``) -- the parts\n extracted from them, categorised by the part's own type.\n- ``ALL``: both, categorised the same way."},"CategoryStat":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["name","count"],"title":"CategoryStat","description":"Count of products in a single category, within the requested scope."},"CategoryUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"}},"additionalProperties":false,"type":"object","title":"CategoryUpdate","description":"Schema for the partial update of a category.\n\nUpdating the parent_id or taxonomy_id is not allowed, as it greatly increases the risk\nfor self-referential loops and other inconsistencies.","examples":[{"description":"All kinds of metals","name":"Metals"}]},"CircularityPropertiesFields":{"properties":{"recyclability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Recyclability"},"disassemblability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Disassemblability"},"remanufacturability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Remanufacturability"}},"additionalProperties":false,"type":"object","title":"CircularityPropertiesFields","description":"Circularity note fields read from a product JSON object."},"CircularityPropertiesInputFields":{"properties":{"recyclability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Recyclability"},"disassemblability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Disassemblability"},"remanufacturability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Remanufacturability"}},"additionalProperties":false,"type":"object","title":"CircularityPropertiesInputFields","description":"Write-side circularity note fields with user-text validation."},"ComponentCreateWithComponents":{"properties":{"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesInputFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"type":"array","maxItems":100,"title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"amount_in_parent":{"type":"integer","maximum":1000.0,"exclusiveMinimum":0.0,"title":"Amount In Parent","description":"Quantity within parent product. Required for component products."},"components":{"items":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"type":"array","maxItems":100,"title":"Components","description":"Set of component products"}},"additionalProperties":false,"type":"object","required":["name","amount_in_parent"],"title":"ComponentCreateWithComponents","description":"Schema for creating a component with optional sub-components.\n\nThis schema is used for recursive creation of components with sub-components.\n\nOwner ID and parent ID are inferred from the parent product within the CRUD layer."},"ComponentExportRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"components":{"items":{"$ref":"#/components/schemas/ComponentExportRead"},"type":"array","title":"Components","description":"List of sub-components"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentExportRead","description":"Component in a product export: the detail read plus every sub-component."},"ComponentRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentRead","description":"Read schema for components (nested inside a base product tree)."},"ComponentReadWithRecursiveComponents":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"components":{"items":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"},"type":"array","title":"Components","description":"List of component products"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentReadWithRecursiveComponents","description":"Component read schema with recursive sub-components."},"ComponentReadWithRelationshipsAndFlatComponents":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"components":{"items":{"$ref":"#/components/schemas/ComponentRead"},"type":"array","title":"Components","description":"List of sub-components"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentReadWithRelationshipsAndFlatComponents","description":"Component detail schema with one level of child components."},"DeviceImageUploadAck":{"properties":{"image_id":{"type":"string","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9._~-]+$","title":"Image Id","description":"Stored backend image ID."},"image_url":{"type":"string","maxLength":2048,"minLength":1,"pattern":"^(https?://[^\\s]+|/([^\\s/][^\\s]*)?)$","title":"Image Url","description":"Backend-hosted URL for the stored image"}},"additionalProperties":false,"type":"object","required":["image_id","image_url"],"title":"DeviceImageUploadAck","description":"Backend -> Pi acknowledgement of a direct image upload."},"DevicePreviewThumbnailAck":{"properties":{"preview_thumbnail_url":{"type":"string","maxLength":2048,"minLength":1,"pattern":"^(https?://[^\\s]+|/([^\\s/][^\\s]*)?)$","title":"Preview Thumbnail Url","description":"Backend-hosted URL for the cached preview thumbnail"}},"additionalProperties":false,"type":"object","required":["preview_thumbnail_url"],"title":"DevicePreviewThumbnailAck","description":"Backend -> Pi acknowledgement of a cached preview-thumbnail upload."},"DevicePublicKeyJWK":{"properties":{"kty":{"type":"string","pattern":"^EC$","title":"Kty"},"crv":{"type":"string","pattern":"^P-256$","title":"Crv"},"x":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"X"},"y":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"Y"},"use":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Use"},"kid":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Kid"}},"additionalProperties":false,"type":"object","required":["kty","crv","x","y"],"title":"DevicePublicKeyJWK","description":"Public P-256 JWK registered by the Pi during pairing."},"EmailValidationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"EmailValidationRequest","description":"Body for the pre-registration email validation check."},"ErasureContent":{"type":"string","enum":["anonymize","delete"]},"ErrorModel":{"properties":{"detail":{"anyOf":[{"type":"string"},{"additionalProperties":{"type":"string"},"type":"object"}],"title":"Detail"}},"type":"object","required":["detail"],"title":"ErrorModel"},"FileRead":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id","description":"ID of the parent object"},"parent_type":{"$ref":"#/components/schemas/MediaParentType","description":"Type of the parent object, e.g. product, product_type, material"}},"type":"object","required":["id","filename","parent_id","parent_type"],"title":"FileRead","description":"Schema for reading file information.","examples":[{"description":"Assembly manual PDF","file_url":"/uploads/files/manuals/manual.pdf","filename":"manual.pdf","id":"12345678-cc4e-405c-8553-7806424de2a1"}]},"FileReadWithinParent":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"}},"type":"object","required":["id","filename"],"title":"FileReadWithinParent","description":"Schema for reading file information within a parent object.","examples":[{"description":"Assembly manual PDF","file_url":"/uploads/files/manuals/manual.pdf","filename":"manual.pdf","id":"12345678-cc4e-405c-8553-7806424de2a1"}]},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HttpUrlToDB":{"type":"string","maxLength":250,"minLength":1,"format":"uri"},"ImageRead":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Image Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"width_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width Px","description":"Pixel width of the stored image, after any EXIF rotation. Null for images uploaded before dimensions were recorded whose file could not be measured since, which includes every remotely stored (S3) one. With `height_px` this gives the aspect ratio every entry in `thumbnail_urls` shares, so a client can reserve layout space before the image loads and derive each derivative's height from its width."},"height_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height Px","description":"Pixel height of the stored image, after rotation."},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"parent_type":{"$ref":"#/components/schemas/MediaParentType","description":"Type of the parent object, e.g. product, product_type, material"}},"type":"object","required":["id","filename","parent_id","parent_type"],"title":"ImageRead","description":"Schema for reading image information.","examples":[{"description":"Front view of the product","filename":"front-view.webp","id":"12345678-cc4e-405c-8553-7806424de2a1","image_metadata":{"camera_make":"Raspberry Pi","orientation":"landscape"},"image_url":"/uploads/images/products/front-view.webp","thumbnail_url":"/uploads/images/products/front-view_thumb_200.webp"}]},"ImageReadWithinParent":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Image Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"width_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width Px","description":"Pixel width of the stored image, after any EXIF rotation. Null for images uploaded before dimensions were recorded whose file could not be measured since, which includes every remotely stored (S3) one. With `height_px` this gives the aspect ratio every entry in `thumbnail_urls` shares, so a client can reserve layout space before the image loads and derive each derivative's height from its width."},"height_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height Px","description":"Pixel height of the stored image, after rotation."},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."}},"type":"object","required":["id","filename"],"title":"ImageReadWithinParent","description":"Schema for reading image information within a parent object.","examples":[{"description":"Front view of the product","filename":"front-view.webp","id":"12345678-cc4e-405c-8553-7806424de2a1","image_metadata":{"camera_make":"Raspberry Pi","orientation":"landscape"},"image_url":"/uploads/images/products/front-view.webp","thumbnail_url":"/uploads/images/products/front-view_thumb_200.webp"}]},"Links":{"properties":{"first":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First","examples":["/api/v1/users?limit=1&offset1"]},"last":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last","examples":["/api/v1/users?limit=1&offset1"]},"self":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Self","examples":["/api/v1/users?limit=1&offset1"]},"next":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next","examples":["/api/v1/users?limit=1&offset1"]},"prev":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev","examples":["/api/v1/users?limit=1&offset1"]}},"type":"object","title":"Links"},"LocalAccessInfo":{"properties":{"local_api_key":{"type":"string","maxLength":256,"minLength":8,"title":"Local Api Key"},"candidate_urls":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","maxItems":16,"minItems":1,"title":"Candidate Urls"},"mdns_name":{"anyOf":[{"type":"string","maxLength":253,"pattern":"^[A-Za-z0-9.-]+$"},{"type":"null"}],"title":"Mdns Name"}},"additionalProperties":false,"type":"object","required":["local_api_key","candidate_urls"],"title":"LocalAccessInfo","description":"Plugin -> backend -> frontend local direct-connection bootstrap payload."},"MaterialCreateWithCategories":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3"},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm"},"category_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Category Ids","description":"List of category IDs"}},"additionalProperties":false,"type":"object","required":["name"],"title":"MaterialCreateWithCategories","description":"Schema for creating a material with links to existing categories."},"MaterialProductLinkCreateWithinProduct":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"},"material_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Material Id","description":"ID of the material in the product"}},"additionalProperties":false,"type":"object","required":["quantity","material_id"],"title":"MaterialProductLinkCreateWithinProduct","description":"Schema for creating material-product links from the product side."},"MaterialProductLinkCreateWithinProductAndMaterial":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"}},"additionalProperties":false,"type":"object","required":["quantity"],"title":"MaterialProductLinkCreateWithinProductAndMaterial","description":"Schema for creating material-product links with an external material ID."},"MaterialProductLinkReadWithinMaterial":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id"},"product":{"$ref":"#/components/schemas/ProductSummary"}},"type":"object","required":["quantity","product_id","product"],"title":"MaterialProductLinkReadWithinMaterial","description":"Schema for reading material-product links from the material side."},"MaterialProductLinkReadWithinProduct":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"material_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Material Id"},"material":{"$ref":"#/components/schemas/MaterialRead"}},"type":"object","required":["quantity","material_id","material"],"title":"MaterialProductLinkReadWithinProduct","description":"Schema for reading material-product links from the product side."},"MaterialProductLinkUpdate":{"properties":{"quantity":{"anyOf":[{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Quantity"},"unit":{"anyOf":[{"$ref":"#/components/schemas/Unit"},{"type":"null"}],"default":"kg"}},"additionalProperties":false,"type":"object","title":"MaterialProductLinkUpdate","description":"Schema for updating material-product links."},"MaterialRead":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Material"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Material"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source","description":"Source of the material data, e.g. URL, IRI or citation key"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3","description":"Volumetric density (kg/m^3)"},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm","description":"Is this material a Critical Raw Material (CRM)?"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","id"],"title":"MaterialRead","description":"Schema for reading material information."},"MaterialReadWithRelationships":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Material"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Material"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source","description":"Source of the material data, e.g. URL, IRI or citation key"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3","description":"Volumetric density (kg/m^3)"},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm","description":"Is this material a Critical Raw Material (CRM)?"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"categories":{"items":{"$ref":"#/components/schemas/CategoryRead"},"type":"array","title":"Categories","description":"List of categories linked to the material"},"product_links":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinMaterial"},"type":"array","title":"Product Links","description":"List of products that have this material"},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"List of images for the material"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"List of files for the material"}},"type":"object","required":["name","id"],"title":"MaterialReadWithRelationships","description":"Schema for reading material information with all relationships."},"MaterialUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"source":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Source","description":"Source of the material data, e.g. URL, IRI or citation key"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3","description":"Volumetric density (kg/m\u00b3) "},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm","description":"Is this material a Critical Raw Material (CRM)?"}},"additionalProperties":false,"type":"object","title":"MaterialUpdate","description":"Schema for a partial update of a material."},"MediaParentType":{"type":"string","enum":["product","product_type","material"],"title":"MediaParentType","description":"Parent entity types that can own files and images."},"MfaChallengeRequest":{"properties":{"mfa_token":{"type":"string","format":"password","title":"Mfa Token","writeOnly":true},"code":{"type":"string","maxLength":20,"minLength":6,"title":"Code"}},"additionalProperties":false,"type":"object","required":["mfa_token","code"],"title":"MfaChallengeRequest","description":"Request to complete MFA with either a TOTP code or a recovery code."},"MfaOAuthClaimRequest":{"properties":{"mfa_handoff":{"type":"string","format":"password","title":"Mfa Handoff","writeOnly":true}},"additionalProperties":false,"type":"object","required":["mfa_handoff"],"title":"MfaOAuthClaimRequest","description":"Request to claim an OAuth MFA handoff."},"MfaPendingResponse":{"properties":{"mfa_required":{"type":"boolean","title":"Mfa Required","default":true},"mfa_token":{"type":"string","title":"Mfa Token","description":"Short-lived token for completing an MFA challenge"}},"type":"object","required":["mfa_token"],"title":"MfaPendingResponse","description":"Response returned after the first authentication factor succeeds."},"MfaRecoveryCodesRegenerateRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"title":"Code"}},"additionalProperties":false,"type":"object","required":["code"],"title":"MfaRecoveryCodesRegenerateRequest","description":"Request to reissue recovery codes, confirmed with a current TOTP code."},"MfaRecoveryCodesResponse":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes"}},"type":"object","required":["recovery_codes"],"title":"MfaRecoveryCodesResponse","description":"One-time delivery of freshly generated recovery codes."},"MfaTotpConfirmRequest":{"properties":{"setup_token":{"type":"string","format":"password","title":"Setup Token","writeOnly":true},"code":{"type":"string","maxLength":6,"minLength":6,"title":"Code"},"password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Password","description":"Current account password, to reauthenticate the change. Required unless the account has no usable password (OAuth-only)."}},"additionalProperties":false,"type":"object","required":["setup_token","code"],"title":"MfaTotpConfirmRequest","description":"Request to confirm authenticated TOTP setup."},"MfaTotpConfirmResponse":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes"},"tokens":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenResponse"},{"type":"null"}],"description":"New bearer tokens; null for browser sessions, which get new cookies instead"}},"type":"object","required":["recovery_codes"],"title":"MfaTotpConfirmResponse","description":"Recovery codes plus the session that replaces the ones enrolment revoked."},"MfaTotpDisableRequest":{"properties":{"code":{"type":"string","maxLength":20,"minLength":6,"title":"Code"},"password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Password","description":"Current account password, to reauthenticate the change. Required unless the account has no usable password (OAuth-only)."}},"additionalProperties":false,"type":"object","required":["code"],"title":"MfaTotpDisableRequest","description":"Request to turn off TOTP MFA, confirmed with the password and a current or recovery code."},"MfaTotpSetupResponse":{"properties":{"setup_token":{"type":"string","title":"Setup Token"},"secret":{"type":"string","title":"Secret"},"otpauth_uri":{"type":"string","title":"Otpauth Uri"}},"type":"object","required":["setup_token","secret","otpauth_uri"],"title":"MfaTotpSetupResponse","description":"TOTP setup material for authenticator apps."},"OAuth2AuthorizeResponse":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"OAuth2AuthorizeResponse","description":"Response model for OAuth2 authorization endpoint."},"OAuthAccountRead":{"properties":{"oauth_name":{"type":"string","title":"Oauth Name"},"account_id":{"type":"string","title":"Account Id"},"account_email":{"type":"string","title":"Account Email"}},"type":"object","required":["oauth_name","account_id","account_email"],"title":"OAuthAccountRead","description":"Read schema for OAuth accounts."},"Page_CameraRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CameraRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CameraRead]"},"Page_CategoryReadWithRecursiveSubCategories_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CategoryReadWithRecursiveSubCategories"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CategoryReadWithRecursiveSubCategories]"},"Page_CategoryReadWithRelationshipsAndFlatSubCategories_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CategoryReadWithRelationshipsAndFlatSubCategories"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CategoryReadWithRelationshipsAndFlatSubCategories]"},"Page_CategoryRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CategoryRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CategoryRead]"},"Page_MaterialReadWithRelationships_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MaterialReadWithRelationships"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[MaterialReadWithRelationships]"},"Page_ProductTypeReadWithRelationships_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductTypeReadWithRelationships"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[ProductTypeReadWithRelationships]"},"Page_TaxonomyRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaxonomyRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[TaxonomyRead]"},"Page_TypeVar_Customized_ComponentRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ComponentRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[ComponentRead]"},"Page_TypeVar_Customized_FileReadWithinParent_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FileReadWithinParent"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[FileReadWithinParent]"},"Page_TypeVar_Customized_ImageReadWithinParent_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ImageReadWithinParent"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[ImageReadWithinParent]"},"Page_TypeVar_Customized_ProductRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[ProductRead]"},"Page_TypeVar_Customized_str_":{"properties":{"items":{"items":{"type":"string"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[str]"},"Page_UserRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[UserRead]"},"PairingClaimRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"Pairing code displayed on the RPi's setup page."},"camera_name":{"type":"string","maxLength":100,"minLength":2,"title":"Camera Name","description":"Name for the new camera."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"type":"object","required":["code","camera_name"],"title":"PairingClaimRequest","description":"User -> backend: claim a pairing code and create a camera."},"PairingPollRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"Pairing code generated by the Pi."},"fingerprint":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]{8,64}$","title":"Fingerprint","description":"Random device fingerprint nonce chosen at registration."}},"type":"object","required":["code","fingerprint"],"title":"PairingPollRequest","description":"Pi -> backend: poll pairing status.\n\nSent as a POST body (not query params) so the pairing code and device\nfingerprint never land in reverse-proxy or uvicorn access logs."},"PairingPollResponse":{"properties":{"status":{"type":"string","enum":["waiting","paired"],"title":"Status"},"camera_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9._~-]+$"},{"type":"null"}],"title":"Camera Id"},"ws_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Ws Url"},"auth_scheme":{"anyOf":[{"$ref":"#/components/schemas/RelayAuthScheme"},{"type":"null"}]},"key_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9._~-]+$"},{"type":"null"}],"title":"Key Id"}},"additionalProperties":false,"type":"object","required":["status"],"title":"PairingPollResponse","description":"Backend -> Pi current pairing state."},"PairingRegisterRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"6-character uppercase pairing code generated by the Pi."},"rpi_fingerprint":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]{8,64}$","title":"Rpi Fingerprint","description":"Random nonce generated by the Pi. Required to retrieve credentials later."},"public_key_jwk":{"$ref":"#/components/schemas/DevicePublicKeyJWK","description":"Public P-256 JWK generated by the Pi."},"key_id":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]+$","title":"Key Id"}},"additionalProperties":false,"type":"object","required":["code","rpi_fingerprint","public_key_jwk","key_id"],"title":"PairingRegisterRequest","description":"Pi -> backend pairing registration payload."},"PairingRegisterResponse":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"6-character uppercase pairing code generated by the Pi."},"expires_in":{"type":"integer","maximum":600.0,"exclusiveMinimum":0.0,"title":"Expires In","description":"Seconds until the pairing code expires."}},"additionalProperties":false,"type":"object","required":["code","expires_in"],"title":"PairingRegisterResponse","description":"Backend -> Pi acknowledgement of a pairing registration."},"ProductCreateWithComponents":{"properties":{"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesInputFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"type":"array","maxItems":100,"title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"videos":{"items":{"$ref":"#/components/schemas/VideoCreateWithinProduct"},"type":"array","maxItems":5,"title":"Videos","description":"Disassembly videos"},"components":{"items":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"type":"array","maxItems":100,"title":"Components","description":"Set of component products"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ProductCreateWithComponents","description":"Schema for creating a base product with optional components.","examples":[{"bill_of_materials":[{"material_id":1,"quantity":0.3,"unit":"g"},{"material_id":2,"quantity":0.1,"unit":"g"}],"brand":"Brand 1","circularity_properties":{"disassemblability":"Most fasteners are visible and non-destructive to remove.","recyclability":"Metal frame and plastic shell can be separated with basic tools."},"depth_cm":50,"description":"Complete chair assembly","height_cm":150,"model":"Model 1","name":"Office Chair","product_type_id":1,"videos":[{"description":"Disassembly video","url":"https://www.youtube.com/watch?v=123456789"}],"weight_g":20000,"width_cm":70}]},"ProductExportRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"videos":{"items":{"$ref":"#/components/schemas/VideoReadWithinProduct"},"type":"array","title":"Videos","description":"Disassembly videos"},"components":{"items":{"$ref":"#/components/schemas/ComponentExportRead"},"type":"array","title":"Components","description":"List of component products"}},"type":"object","required":["name","id"],"title":"ProductExportRead","description":"Base product in a product export: the detail read plus its whole component tree."},"ProductFacetValue":{"properties":{"value":{"type":"string","title":"Value"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["value","count"],"title":"ProductFacetValue","description":"One derived product facet option and its result count."},"ProductRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"}},"type":"object","required":["name","id"],"title":"ProductRead","description":"Read schema for base products (top of a product tree)."},"ProductReadWithRelationshipsAndFlatComponents":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"videos":{"items":{"$ref":"#/components/schemas/VideoReadWithinProduct"},"type":"array","title":"Videos","description":"Disassembly videos"},"components":{"items":{"$ref":"#/components/schemas/ComponentRead"},"type":"array","title":"Components","description":"List of component products"}},"type":"object","required":["name","id"],"title":"ProductReadWithRelationshipsAndFlatComponents","description":"Base-product detail schema with one level of child components."},"ProductSummary":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"ProductSummary","description":"Minimal product summary for embedding in unrelated contexts (e.g. material links).\n\nDeliberately narrower than ``ProductRead``: no owner, physical/circularity\nproperties, or other detail-view fields since no consumer needs them here.\nExtend with more fields only when an actual caller needs them."},"ProductTypeCreateWithCategories":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"category_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Category Ids"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ProductTypeCreateWithCategories","description":"Schema for creating a product type with links to existing categories."},"ProductTypeRead":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Product Type."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Product Type."},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","id"],"title":"ProductTypeRead","description":"Schema for reading flat product type information."},"ProductTypeReadWithRelationships":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Product Type."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Product Type."},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"categories":{"items":{"$ref":"#/components/schemas/CategoryRead"},"type":"array","title":"Categories"},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files"}},"type":"object","required":["name","id"],"title":"ProductTypeReadWithRelationships","description":"Schema for reading product type information with all relationships."},"ProductTypeUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"additionalProperties":false,"type":"object","title":"ProductTypeUpdate","description":"Schema for a partial update of a product type."},"ProductUpdate":{"properties":{"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesInputFields"},{"type":"null"}]},"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"amount_in_parent":{"anyOf":[{"type":"integer","maximum":1000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount In Parent","description":"Quantity within parent product. Required for component products."},"weight_g":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Depth Cm"}},"additionalProperties":false,"type":"object","title":"ProductUpdate","description":"Schema for updating product information including physical and circularity properties."},"ProfileVisibility":{"type":"string","enum":["public","community","private"],"title":"ProfileVisibility","description":"Discrete values stored on ``User.preferences[\"profile_visibility\"]``."},"PublicProfileView":{"properties":{"username":{"type":"string","pattern":"^[a-z0-9_]+$","title":"Username"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"product_count":{"type":"integer","title":"Product Count","description":"Number of products registered.","default":0},"total_weight_kg":{"type":"number","title":"Total Weight Kg","description":"Aggregate weight of products in kg.","default":0.0},"image_count":{"type":"integer","title":"Image Count","description":"Total images uploaded.","default":0},"top_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Category","description":"Most common product type."}},"type":"object","required":["username","created_at"],"title":"PublicProfileView","description":"Detailed public profile view with aggregated stats."},"RefreshTokenRequest":{"properties":{"refresh_token":{"type":"string","format":"password","title":"Refresh Token","description":"Refresh token obtained from login","writeOnly":true}},"additionalProperties":false,"type":"object","required":["refresh_token"],"title":"RefreshTokenRequest","description":"Request schema for refreshing access token.","examples":[{"refresh_token":"refresh-token-from-login"}]},"RefreshTokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token","description":"New JWT access token"},"refresh_token":{"type":"string","title":"Refresh Token","description":"Rotated refresh token"},"token_type":{"type":"string","title":"Token Type","description":"Token type (always 'bearer')","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","description":"Access token expiration time in seconds"}},"type":"object","required":["access_token","refresh_token","expires_in"],"title":"RefreshTokenResponse","description":"Response for token refresh.","examples":[{"access_token":"new-jwt-access-token","expires_in":3600,"refresh_token":"rotated-refresh-token","token_type":"bearer"}]},"RegistrationResponse":{"properties":{"detail":{"type":"string","title":"Detail","default":"If the email address is available, a verification link has been sent. Please check your inbox."}},"type":"object","title":"RegistrationResponse","description":"Uniform registration acknowledgement.\n\nDeliberately reveals nothing about whether the email already exists; the same\nbody is returned whether a new account was created or the address was already\ntaken, so registration cannot be used to enumerate accounts."},"RelayAuthScheme":{"type":"string","enum":["device_assertion"],"title":"RelayAuthScheme","description":"Authentication schemes understood by the device seam."},"RelayPublicKeyJWK":{"properties":{"kty":{"type":"string","pattern":"^EC$","title":"Kty"},"crv":{"type":"string","pattern":"^P-256$","title":"Crv"},"x":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"X"},"y":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"Y"},"use":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Use"},"kid":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Kid"}},"additionalProperties":false,"type":"object","required":["kty","crv","x","y"],"title":"RelayPublicKeyJWK","description":"Public JWK registered by an RPi camera: P-256 for ES256 or Ed25519 for EdDSA."},"SeriesPoint":{"properties":{"period":{"type":"string","title":"Period"},"teardowns":{"type":"integer","title":"Teardowns"},"parts":{"type":"integer","title":"Parts"},"mass_kg":{"type":"number","title":"Mass Kg"},"images":{"type":"integer","title":"Images"},"users_new":{"type":"integer","title":"Users New"},"users_active":{"type":"integer","title":"Users Active"}},"type":"object","required":["period","teardowns","parts","mass_kg","images","users_new","users_active"],"title":"SeriesPoint","description":"Aggregated metrics for one period of a time series."},"SeriesResponse":{"properties":{"granularity":{"type":"string","title":"Granularity"},"start":{"type":"string","format":"date","title":"Start"},"end":{"type":"string","format":"date","title":"End"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"series":{"items":{"$ref":"#/components/schemas/SeriesPoint"},"type":"array","title":"Series"}},"type":"object","required":["granularity","start","end","generated_at","series"],"title":"SeriesResponse","description":"Response payload for the time-series endpoint."},"StepUpRequest":{"properties":{"current_password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Current Password","description":"Current account password, to reauthenticate the change. Required unless the account has no usable password (OAuth-only)."},"mfa_code":{"anyOf":[{"type":"string","maxLength":20,"minLength":6},{"type":"null"}],"title":"Mfa Code","description":"Current authenticator code or a recovery code. Required when the account has MFA enabled."}},"additionalProperties":false,"type":"object","title":"StepUpRequest","description":"Optional step-up body for a sensitive account change (social login link or unlink, account deletion).\n\nOptional because an OAuth-only account has no usable password to re-assert, and an\naccount without MFA has no code; the server decides which the account needs."},"StreamMetadata":{"properties":{"camera_properties":{"$ref":"#/components/schemas/CameraProperties"},"capture_metadata":{"$ref":"#/components/schemas/CaptureMetadata"},"fps":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Fps","description":"Frames per second calculated from frame duration.","readOnly":true}},"type":"object","required":["camera_properties","capture_metadata","fps"],"title":"StreamMetadata","description":"Metadata specific to video streams."},"StreamMode":{"type":"string","enum":["youtube"],"title":"StreamMode","description":"Active stream provider/mode."},"StreamView":{"properties":{"mode":{"$ref":"#/components/schemas/StreamMode"},"provider":{"type":"string","title":"Provider","description":"Stream provider identifier"},"url":{"type":"string","minLength":1,"format":"uri","title":"Url"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"metadata":{"$ref":"#/components/schemas/StreamMetadata"}},"type":"object","required":["mode","provider","url","started_at","metadata"],"title":"StreamView","description":"Provider-neutral public model for active stream information."},"TaxonomyCreateWithCategories":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"version":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"domains":{"items":{"$ref":"#/components/schemas/TaxonomyDomain"},"type":"array","uniqueItems":true,"title":"Domains","default":[]},"source":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Source"},"categories":{"items":{"$ref":"#/components/schemas/CategoryCreate"},"type":"array","title":"Categories","description":"Categories to create in this taxonomy"}},"additionalProperties":false,"type":"object","required":["name"],"title":"TaxonomyCreateWithCategories","description":"Schema for creating a new taxonomy, optionally with new categories."},"TaxonomyDomain":{"type":"string","enum":["materials","products","other"],"title":"TaxonomyDomain","description":"Enumeration of taxonomy domains."},"TaxonomyRead":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"version":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"domains":{"items":{"$ref":"#/components/schemas/TaxonomyDomain"},"type":"array","uniqueItems":true,"title":"Domains","description":"Domains of the taxonomy, e.g. {materials, products, other}"},"source":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Source","description":"Source of the taxonomy data, e.g. URL, IRI or citation key"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","version","domains","id"],"title":"TaxonomyRead","description":"Schema for reading minimal taxonomy information.","examples":[{"description":"Taxonomy for materials","domains":["materials"],"name":"Materials Taxonomy","source":"DOI:10.2345/12345"}]},"TaxonomyUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":50,"minLength":2},{"type":"null"}],"title":"Name"},"version":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"domains":{"anyOf":[{"items":{"$ref":"#/components/schemas/TaxonomyDomain"},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Domains","description":"Domains of the taxonomy, e.g. {materials, products, other}"},"source":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Source","description":"Source of the taxonomy data"}},"additionalProperties":false,"type":"object","title":"TaxonomyUpdate","description":"Schema for the partial update of a taxonomy."},"TelemetrySnapshot":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When this snapshot was collected."},"cpu_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Temp C","description":"CPU die temperature in Celsius; None if the sysfs reading is unavailable."},"cpu_percent":{"type":"number","title":"Cpu Percent","description":"CPU utilisation as a percentage (0-100)."},"mem_percent":{"type":"number","title":"Mem Percent","description":"Memory utilisation as a percentage (0-100)."},"disk_percent":{"type":"number","title":"Disk Percent","description":"Disk utilisation on the images volume as a percentage (0-100)."},"preview_fps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Preview Fps","description":"Observed preview encoder frame rate, or None if no preview pipeline is active."},"preview_sessions":{"type":"integer","title":"Preview Sessions","description":"Number of active LL-HLS preview subscribers on the local MediaMTX instance.","default":0},"thermal_state":{"$ref":"#/components/schemas/ThermalState","description":"Thermal governor classification for this snapshot."},"current_preview_size":{"anyOf":[{"prefixItems":[{"type":"integer"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Current Preview Size","description":"Current lores-stream size (width, height); None when no preview pipeline is configured."}},"type":"object","required":["timestamp","cpu_percent","mem_percent","disk_percent","thermal_state"],"title":"TelemetrySnapshot","description":"Point-in-time device health sample emitted by the Pi plugin."},"ThemeMode":{"type":"string","enum":["light","dark","auto"],"title":"ThemeMode","description":"Supported app theme modes."},"ThermalState":{"type":"string","enum":["normal","warm","throttle","critical"],"title":"ThermalState","description":"Coarse thermal classification used by the thermal governor."},"Totals":{"properties":{"teardowns":{"type":"integer","title":"Teardowns"},"parts":{"type":"integer","title":"Parts"},"mass_kg":{"type":"number","title":"Mass Kg"},"images":{"type":"integer","title":"Images"},"users":{"type":"integer","title":"Users"}},"type":"object","required":["teardowns","parts","mass_kg","images","users"],"title":"Totals","description":"System-wide cumulative counts across all data."},"TotalsResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"totals":{"$ref":"#/components/schemas/Totals"}},"type":"object","required":["generated_at","totals"],"title":"TotalsResponse","description":"Response payload for the totals endpoint."},"Unit":{"type":"string","enum":["kg","g","m","cm"],"title":"Unit","description":"Allowed units in the data collection."},"UserPreferences":{"properties":{"email_updates_enabled":{"type":"boolean","title":"Email Updates Enabled","default":false},"profile_visibility":{"$ref":"#/components/schemas/ProfileVisibility","default":"public"},"theme_mode":{"$ref":"#/components/schemas/ThemeMode","default":"auto"},"products_welcome_dismissed":{"type":"boolean","title":"Products Welcome Dismissed","default":false},"rpi_camera_enabled":{"type":"boolean","title":"Rpi Camera Enabled","default":false},"youtube_streaming_enabled":{"type":"boolean","title":"Youtube Streaming Enabled","default":false}},"additionalProperties":false,"type":"object","title":"UserPreferences","description":"Typed user preferences persisted as JSONB."},"UserPreferencesUpdate":{"properties":{"email_updates_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Updates Enabled"},"profile_visibility":{"anyOf":[{"$ref":"#/components/schemas/ProfileVisibility"},{"type":"null"}]},"theme_mode":{"anyOf":[{"$ref":"#/components/schemas/ThemeMode"},{"type":"null"}]},"products_welcome_dismissed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Products Welcome Dismissed"},"rpi_camera_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rpi Camera Enabled"},"youtube_streaming_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Youtube Streaming Enabled"}},"additionalProperties":false,"type":"object","title":"UserPreferencesUpdate","description":"Patch model for user preferences updates."},"UserRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_superuser":{"type":"boolean","title":"Is Superuser","default":false},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"oauth_accounts":{"items":{"$ref":"#/components/schemas/OAuthAccountRead"},"type":"array","title":"Oauth Accounts","description":"List of linked OAuth accounts."},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","description":"Whether TOTP MFA is enabled for this account.","default":false},"has_usable_password":{"type":"boolean","title":"Has Usable Password","description":"Whether the account has a user-set password (false for OAuth-only accounts). Clients use it to decide whether unlinking a social login needs a password.","default":true},"preferences":{"$ref":"#/components/schemas/UserPreferences","description":"User preferences."},"terms_accepted_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Terms Accepted Version","description":"Version of the contributor terms this account accepted at signup, or null if it predates acceptance tracking. Recorded by the server; not client-settable."},"terms_accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Terms Accepted At","description":"When the contributor terms were accepted. Recorded by the server; not client-settable."},"terms_acceptance_required":{"type":"boolean","title":"Terms Acceptance Required","description":"Whether this account should be prompted to accept the contributor terms. True when it has never accepted, or accepted a version older than the one that grants the publication licence a dataset release needs.","default":false},"role":{"$ref":"#/components/schemas/UserRole","description":"Contributor tier. `lab` accounts may upload non-image research files and carry a larger upload quota. Set by an administrator; not client-settable.","default":"contributor"},"upload_quota_files":{"type":"integer","title":"Upload Quota Files","description":"Maximum number of files and images this account's role allows.","default":0},"upload_quota_bytes":{"type":"integer","title":"Upload Quota Bytes","description":"Maximum total upload size this account's role allows.","default":0},"image_upload_max_bytes":{"type":"integer","title":"Image Upload Max Bytes","description":"Largest single image this account may upload.","default":0},"image_upload_max_pixels":{"type":"integer","title":"Image Upload Max Pixels","description":"Most pixels (width x height) in a single image this account may upload.","default":0},"upload_file_count":{"type":"integer","title":"Upload File Count","description":"Files and images this account currently has stored.","default":0},"upload_total_bytes":{"type":"integer","title":"Upload Total Bytes","description":"Total bytes this account currently has stored.","default":0}},"type":"object","required":["id","email"],"title":"UserRead","description":"Read schema for users.","examples":[{"email":"user@example.com","id":"1fa85f64-5717-4562-b3fc-2c963f66afa6","is_active":true,"is_superuser":false,"is_verified":true,"username":"username"}]},"UserRegister":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":12,"format":"password","title":"Password"},"username":{"type":"string","maxLength":50,"minLength":2,"title":"Username"}},"additionalProperties":false,"type":"object","required":["email","password","username"],"title":"UserRegister","description":"Registration schema for password sign-up.","examples":[{"email":"user@example.com","password":"fake_password","username":"username"}]},"UserRole":{"type":"string","enum":["contributor","lab"],"title":"UserRole","description":"Ordered contributor tiers. Compare with :func:`role_rank`, not ``<``."},"UserRoleUpdate":{"properties":{"role":{"$ref":"#/components/schemas/UserRole","description":"The contributor tier to assign."}},"additionalProperties":false,"type":"object","required":["role"],"title":"UserRoleUpdate","description":"Administrator request to set one account's contributor tier."},"UserUpdate":{"properties":{"password":{"anyOf":[{"type":"string","minLength":12},{"type":"null"}],"format":"password","title":"Password"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"username":{"anyOf":[{"type":"string","maxLength":50,"minLength":2},{"type":"null"}],"title":"Username"},"current_password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"format":"password","title":"Current Password","description":"Current password required when changing email or password."},"mfa_code":{"anyOf":[{"type":"string","maxLength":20,"minLength":6},{"type":"null"}],"title":"Mfa Code","description":"Current authenticator code or a recovery code. Required to change email or password when the account has MFA enabled."},"preferences":{"anyOf":[{"$ref":"#/components/schemas/UserPreferencesUpdate"},{"type":"null"}],"description":"User preferences (partial merge)."}},"additionalProperties":false,"type":"object","title":"UserUpdate","description":"Update schema for users.","examples":[{"email":"user@example.com","password":"newpassword","username":"username"}]},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VideoCreateWithinProduct":{"properties":{"url":{"$ref":"#/components/schemas/HttpUrlToDB"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata"}},"additionalProperties":false,"type":"object","required":["url"],"title":"VideoCreateWithinProduct","description":"Schema for creating a video.","examples":[{"description":"Recorded teardown of the product","title":"Full disassembly","url":"https://www.youtube.com/watch?v=abcdefghijk","video_metadata":{"duration_seconds":420,"source":"youtube"}}]},"VideoRead":{"properties":{"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id"}},"type":"object","required":["url","id","product_id"],"title":"VideoRead","description":"Schema for reading video information."},"VideoReadWithinProduct":{"properties":{"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["url","id"],"title":"VideoReadWithinProduct","description":"Schema for reading video information within a product.","examples":[{"description":"Recorded teardown of the product","id":1,"title":"Full disassembly","url":"https://www.youtube.com/watch?v=abcdefghijk","video_metadata":{"duration_seconds":420,"source":"youtube"}}]},"VideoUpdateWithinProduct":{"properties":{"url":{"anyOf":[{"$ref":"#/components/schemas/HttpUrlToDB"},{"type":"null"}],"description":"URL linking to the video"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title","description":"Title of the video"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the video"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata","description":"Video metadata as a JSON dict"}},"additionalProperties":false,"type":"object","title":"VideoUpdateWithinProduct","description":"Schema for updating a video within a product.","examples":[{"description":"Shortened version for publication","title":"Updated disassembly title","video_metadata":{"edited":true}}]},"YouTubeMonitorStreamResponse":{"properties":{"enableMonitorStream":{"type":"boolean","title":"Enablemonitorstream"},"broadcastStreamDelayMs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Broadcaststreamdelayms"},"embedHtml":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedhtml"}},"type":"object","required":["enableMonitorStream"],"title":"YouTubeMonitorStreamResponse","description":"Subset of monitor stream fields used by the app."},"YouTubePrivacyStatus":{"type":"string","enum":["public","private","unlisted"],"title":"YouTubePrivacyStatus","description":"Enumeration of YouTube privacy statuses."}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/v1/auth/bearer/login"}}},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"__Host-r9lab-auth"}}},"x-tagGroups":[{"name":"Auth","tags":["auth","users"]},{"name":"Reference Data","tags":["categories","taxonomies","materials","product-types"]},{"name":"Data Collection","tags":["products"]},{"name":"Plugins","tags":["r9cam-management","r9cam-interaction"]},{"name":"Admin","tags":["admin"]}]} +{"openapi":"3.1.0","info":{"title":"R9lab \u2013 Data Collection API","description":"Data collection app for the R9lab project at the Institute of Environmental Sciences (CML), Leiden University.\n\n**Licensing.** This API specification is licensed Apache-2.0 so that anyone may write clients, importers, or integrations against it without inheriting the platform's copyleft. The R9lab platform software itself remains AGPL-3.0-or-later, and curated dataset releases are licensed CC BY 4.0.","license":{"name":"Apache-2.0","identifier":"Apache-2.0"},"version":"1.0.0","x-api-version":"1.0.0","x-api-major":"v1","x-deprecation-policy":"Breaking changes are documented in release notes."},"paths":{"/v1/admin/cache/clear/{namespace}":{"post":{"tags":["admin"],"summary":"Clear cache by namespace","description":"Clear cached responses for a specific namespace.","operationId":"clear_cache_by_namespace_v1_admin_cache_clear__namespace__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CacheNamespace","description":"Cache namespace to clear"},"description":"Cache namespace to clear"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Clear Cache By Namespace V1 Admin Cache Clear Namespace Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/categories":{"post":{"tags":["admin","categories"],"summary":"Create a new category","description":"Create a category.\n\n``taxonomy_id`` is required for root categories and is inherited from the\nparent when ``supercategory_id`` is supplied.","operationId":"create_category_v1_admin_categories_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/categories/{category_id}":{"patch":{"tags":["admin","categories"],"summary":"Update category","description":"Update an existing category.","operationId":"update_category_v1_admin_categories__category_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","categories"],"summary":"Delete category","description":"Delete a category by ID, including its subcategories.","operationId":"delete_category_v1_admin_categories__category_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/taxonomies":{"post":{"tags":["admin","taxonomies"],"summary":"Create a new taxonomy","description":"Create a new taxonomy, optionally with categories.","operationId":"create_taxonomy_endpoint_v1_admin_taxonomies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyCreateWithCategories"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/taxonomies/{taxonomy_id}":{"patch":{"tags":["admin","taxonomies"],"summary":"Update taxonomy","description":"Update an existing taxonomy.","operationId":"update_taxonomy_v1_admin_taxonomies__taxonomy_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","taxonomies"],"summary":"Delete taxonomy, including categories","description":"Delete a taxonomy by ID, including its categories.","operationId":"delete_taxonomy_v1_admin_taxonomies__taxonomy_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials":{"post":{"tags":["admin","materials"],"summary":"Create material","description":"Create a material.","operationId":"create_material_v1_admin_materials_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialCreateWithCategories"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/materials/{material_id}":{"patch":{"tags":["admin","materials"],"summary":"Update material","description":"Update a material.","operationId":"update_material_v1_admin_materials__material_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","materials"],"summary":"Delete material","description":"Delete a material.","operationId":"delete_material_v1_admin_materials__material_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/categories":{"post":{"tags":["admin","materials"],"summary":"Add multiple categories to the material","description":"Add multiple categories to a material.","operationId":"add_categories_to_material_v1_admin_materials__material_id__categories_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to assign to the material","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Add Categories To Material V1 Admin Materials Material Id Categories Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","materials"],"summary":"Remove multiple categories from the material","description":"Remove multiple categories from a material.","operationId":"remove_categories_from_material_v1_admin_materials__material_id__categories_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Material ID","title":"Material Id"},"description":"Material ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to remove from the material","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/files":{"post":{"tags":["admin","materials"],"summary":"Add File to Material","description":"Upload a new file for the material.","operationId":"upload_material_file_v1_admin_materials__material_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_material_file_v1_admin_materials__material_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/files/{file_id}":{"delete":{"tags":["admin","materials"],"summary":"Remove File from Material","description":"Remove a file from the material.","operationId":"delete_material_file_v1_admin_materials__material_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/images":{"post":{"tags":["admin","materials"],"summary":"Add Image to Material","description":"Upload a new image for the material.","operationId":"upload_material_image_v1_admin_materials__material_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_material_image_v1_admin_materials__material_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/materials/{material_id}/images/{image_id}":{"delete":{"tags":["admin","materials"],"summary":"Remove Image from Material","description":"Remove an image from the material.","operationId":"delete_material_image_v1_admin_materials__material_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types":{"post":{"tags":["admin","product-types"],"summary":"Create product type","description":"Create a product type.","operationId":"create_product_type_v1_admin_product_types_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeCreateWithCategories"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}":{"patch":{"tags":["admin","product-types"],"summary":"Update product type","description":"Update a product type.","operationId":"update_product_type_v1_admin_product_types__product_type_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","product-types"],"summary":"Delete product type","description":"Delete a product type.","operationId":"delete_product_type_v1_admin_product_types__product_type_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/categories":{"post":{"tags":["admin","product-types"],"summary":"Add multiple categories to the product type","description":"Add multiple categories to a product type.","operationId":"add_categories_to_product_type_v1_admin_product_types__product_type_id__categories_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to assign to the product type","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Add Categories To Product Type V1 Admin Product Types Product Type Id Categories Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin","product-types"],"summary":"Remove multiple categories from the product type","description":"Remove multiple categories from a product type.","operationId":"remove_categories_from_product_type_v1_admin_product_types__product_type_id__categories_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Product Type ID","title":"Product Type Id"},"description":"Product Type ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer"},"description":"Category IDs to remove from the product type","title":"Category Ids"},"examples":{"multiple_category_ids":{"value":[1,2,3],"summary":"Assign multiple categories"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/files":{"post":{"tags":["admin","product-types"],"summary":"Add File to Product Type","description":"Upload a new file for the product type.","operationId":"upload_product_type_file_v1_admin_product_types__product_type_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_type_file_v1_admin_product_types__product_type_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/files/{file_id}":{"delete":{"tags":["admin","product-types"],"summary":"Remove File from Product Type","description":"Remove a file from the product type.","operationId":"delete_product_type_file_v1_admin_product_types__product_type_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/images":{"post":{"tags":["admin","product-types"],"summary":"Add Image to Product Type","description":"Upload a new image for the product type.","operationId":"upload_product_type_image_v1_admin_product_types__product_type_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_type_image_v1_admin_product_types__product_type_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/product-types/{product_type_id}/images/{image_id}":{"delete":{"tags":["admin","product-types"],"summary":"Remove Image from Product Type","description":"Remove an image from the product type.","operationId":"delete_product_type_image_v1_admin_product_types__product_type_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/categories":{"get":{"tags":["categories"],"summary":"Get all categories with optional filtering and all relationships","description":"Get all categories with all relationships loaded.","operationId":"get_categories_v1_categories_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"taxonomy_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name"}},{"name":"taxonomy_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name[Ilike]"}},{"name":"taxonomy_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version"}},{"name":"taxonomy_version[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version[Ilike]"}},{"name":"taxonomy_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description"}},{"name":"taxonomy_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description[Ilike]"}},{"name":"taxonomy_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source"}},{"name":"taxonomy_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","+taxonomy_name","name","external_id","taxonomy_name","-name","-external_id","-taxonomy_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRelationshipsAndFlatSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/tree":{"get":{"tags":["categories"],"summary":"Get categories tree","description":"Get a page of top-level categories, each with its subcategories in a tree structure.","operationId":"get_categories_tree_v1_categories_tree_get","parameters":[{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"taxonomy_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name"}},{"name":"taxonomy_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Name[Ilike]"}},{"name":"taxonomy_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version"}},{"name":"taxonomy_version[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Version[Ilike]"}},{"name":"taxonomy_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description"}},{"name":"taxonomy_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Description[Ilike]"}},{"name":"taxonomy_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source"}},{"name":"taxonomy_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Source[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","+taxonomy_name","name","external_id","taxonomy_name","-name","-external_id","-taxonomy_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRecursiveSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/{category_id}":{"get":{"tags":["categories"],"summary":"Get Category","description":"Get category by ID with all relationships.","operationId":"get_category_v1_categories__category_id__get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryReadWithRelationshipsAndFlatSubCategories"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/{category_id}/subcategories":{"get":{"tags":["categories"],"summary":"Get category subcategories with optional filtering and all relationships","description":"Get paginated subcategories of a category with all relationships loaded.","operationId":"get_subcategories_v1_categories__category_id__subcategories_get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Category ID","title":"Category Id"},"description":"Category ID"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRelationshipsAndFlatSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/categories/{category_id}/subcategories/tree":{"get":{"tags":["categories"],"summary":"Get category subtree","description":"Get a page of a category's subcategories in a tree structure, up to a specified depth.","operationId":"get_category_subtree_v1_categories__category_id__subcategories_tree_get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Category Id"}},{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRecursiveSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies":{"get":{"tags":["taxonomies"],"summary":"Get Taxonomies","description":"Get all taxonomies with optional filtering.","operationId":"get_taxonomies_v1_taxonomies_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},{"name":"version[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+version","+source","name","version","source","-name","-version","-source"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TaxonomyRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies/{taxonomy_id}":{"get":{"tags":["taxonomies"],"summary":"Get Taxonomy","description":"Get taxonomy by ID.","operationId":"get_taxonomy_v1_taxonomies__taxonomy_id__get","parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies/{taxonomy_id}/categories/tree":{"get":{"tags":["taxonomies"],"summary":"Get the category tree of a taxonomy","description":"Get paginated top-level categories of a taxonomy with their recursive subcategory trees.","operationId":"get_taxonomy_category_tree_v1_taxonomies__taxonomy_id__categories_tree_get","parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}},{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryReadWithRecursiveSubCategories_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/taxonomies/{taxonomy_id}/categories":{"get":{"tags":["taxonomies"],"summary":"View categories of taxonomy","description":"Get taxonomy categories with optional filtering.","operationId":"get_taxonomy_categories_v1_taxonomies__taxonomy_id__categories_get","parameters":[{"name":"taxonomy_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Taxonomy Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CategoryRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials":{"get":{"tags":["materials"],"summary":"Get all materials with all relationships","description":"Get all materials with all relationships loaded.","operationId":"get_materials_v1_materials_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"density_kg_m3","in":"query","required":false,"schema":{"type":"number","title":"Density Kg M3"}},{"name":"density_kg_m3[ge]","in":"query","required":false,"schema":{"type":"number","title":"Density Kg M3[Ge]"}},{"name":"density_kg_m3[le]","in":"query","required":false,"schema":{"type":"number","title":"Density Kg M3[Le]"}},{"name":"is_crm","in":"query","required":false,"schema":{"type":"boolean","title":"Is Crm"}},{"name":"is_crm[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Crm[Eq]"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source[Ilike]"}},{"name":"category_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name"}},{"name":"category_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name[Ilike]"}},{"name":"category_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description"}},{"name":"category_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description[Ilike]"}},{"name":"category_external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id"}},{"name":"category_external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+density_kg_m3","+source","name","density_kg_m3","source","-name","-density_kg_m3","-source"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MaterialReadWithRelationships_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}":{"get":{"tags":["materials"],"summary":"Get Material","description":"Get material by ID with all relationships loaded.","operationId":"get_material_v1_materials__material_id__get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialReadWithRelationships"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}/categories":{"get":{"tags":["materials"],"summary":"View categories of material","description":"Get categories linked to a material.","operationId":"get_material_categories_v1_materials__material_id__categories_get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Get Material Categories V1 Materials Material Id Categories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}/files":{"get":{"tags":["materials"],"summary":"Get Material Files","description":"Get all files associated with a material.","operationId":"get_material_files_v1_materials__material_id__files_get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileReadWithinParent"},"title":"Response Get Material Files V1 Materials Material Id Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/materials/{material_id}/images":{"get":{"tags":["materials"],"summary":"Get Material Images","description":"Get all images associated with a material.","operationId":"get_material_images_v1_materials__material_id__images_get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Material","title":"Material Id"},"description":"ID of the Material"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImageReadWithinParent"},"title":"Response Get Material Images V1 Materials Material Id Images Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types":{"get":{"tags":["product-types"],"summary":"Get all product types with all relationships","description":"Get a list of all product types with all relationships loaded.","operationId":"get_product_types_v1_product_types_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Name[In]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"category_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name"}},{"name":"category_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name[Ilike]"}},{"name":"category_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description"}},{"name":"category_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Description[Ilike]"}},{"name":"category_external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id"}},{"name":"category_external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","name","-name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ProductTypeReadWithRelationships_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}":{"get":{"tags":["product-types"],"summary":"Get product type by ID with all relationships","description":"Get a single product type by ID with all relationships loaded.","operationId":"get_product_type_v1_product_types__product_type_id__get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTypeReadWithRelationships"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}/categories":{"get":{"tags":["product-types"],"summary":"View categories of product type","description":"Get categories linked to a product type.","operationId":"get_product_type_categories_v1_product_types__product_type_id__categories_get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Type Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"external_id[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+external_id","name","external_id","-name","-external_id"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRead"},"title":"Response Get Product Type Categories V1 Product Types Product Type Id Categories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}/files":{"get":{"tags":["product-types"],"summary":"Get Product Type Files","description":"Get all files associated with a product type.","operationId":"get_product_type_files_v1_product_types__product_type_id__files_get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileReadWithinParent"},"title":"Response Get Product Type Files V1 Product Types Product Type Id Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/product-types/{product_type_id}/images":{"get":{"tags":["product-types"],"summary":"Get Product Type Images","description":"Get all images associated with a product type.","operationId":"get_product_type_images_v1_product_types__product_type_id__images_get","parameters":[{"name":"product_type_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of the Product Type","title":"Product Type Id"},"description":"ID of the Product Type"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImageReadWithinParent"},"title":"Response Get Product Type Images V1 Product Types Product Type Id Images Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/units":{"get":{"tags":["units"],"summary":"Get Units","description":"Get a list of available units.","operationId":"get_units_v1_units_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get Units V1 Units Get"}}}}},"x-audience":["public","app"]}},"/v1/users/{user_id}/products":{"get":{"tags":["products"],"summary":"Get base products collected by a user","description":"Get base products collected by a specific user.","operationId":"get_user_products_v1_users__user_id__products_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ProductRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products":{"get":{"tags":["products"],"summary":"Get all base products","description":"Get all base products. Components live under ``/products/{id}/components``.","operationId":"get_products_v1_products_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Use 'me' for the current user's products, or a username for that user's public products","title":"Owner"},"description":"Use 'me' for the current user's products, or a username for that user's public products"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ProductRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Create a new product, optionally with components","description":"Create a new product.\n\nAn optional ``Idempotency-Key`` header makes a retried request safe: replaying the same\nkey returns the original response instead of creating a second product. The key is bound to\nthis user and this request body; reusing it with a different body is a 422.","operationId":"create_product_v1_products_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreateWithComponents","description":"Product to create"},"examples":{"basic":{"value":{"name":"Office Chair","description":"Complete chair assembly","brand":"Brand 1","model":"Model 1","product_type_id":1,"weight_g":20000,"height_cm":150,"width_cm":70,"depth_cm":50,"circularity_properties":{"recyclability":"Metal frame and plastic shell can be separated with basic tools.","disassemblability":"Most fasteners are visible and non-destructive to remove."},"videos":[{"url":"https://www.youtube.com/watch?v=123456789","description":"Disassembly video"}],"bill_of_materials":[{"quantity":0.3,"unit":"g","material_id":1},{"quantity":0.1,"unit":"g","material_id":2}]},"summary":"Basic product without components"},"with_components":{"value":{"name":"Office Chair","description":"Complete chair assembly","brand":"Brand 1","model":"Model 1","product_type_id":1,"weight_g":20000,"height_cm":150,"width_cm":70,"depth_cm":50,"circularity_properties":{"recyclability":"Metal frame and plastic shell can be separated with basic tools.","disassemblability":"Most fasteners are visible and non-destructive to remove."},"videos":[{"url":"https://www.youtube.com/watch?v=123456789","description":"Disassembly video"}],"bill_of_materials":[{"quantity":0.3,"unit":"g","material_id":1},{"quantity":0.1,"unit":"g","material_id":2}],"components":[{"name":"Office Chair Seat","description":"Seat assembly","brand":"Brand 2","model":"Model 2","amount_in_parent":1,"product_type_id":2,"weight_g":5000,"height_cm":50,"width_cm":40,"depth_cm":30,"components":[{"name":"Seat Cushion","description":"Seat cushion assembly","amount_in_parent":1,"weight_g":2000,"height_cm":10,"width_cm":40,"depth_cm":30,"product_type_id":3,"bill_of_materials":[{"quantity":1.5,"unit":"g","material_id":1},{"quantity":0.5,"unit":"g","material_id":2}]}]}]},"summary":"Product with components"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRead"}}}},"409":{"description":"A request with this Idempotency-Key is already being processed."},"503":{"description":"The idempotency store is unreachable; retry later."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/export":{"get":{"tags":["products"],"summary":"Export base products matching the list filters, with their components","description":"Export every base product the product list would match, each with its whole component tree.\n\nTakes the same filters, search and sorting as ``GET /products``. CSV has one row per\nproduct or component, linked by ``parent_id``; JSON nests components as the detail read\ndoes. At most 100 base products, 5,000 components and 10 component levels: narrow the filters,\nor use the dataset release for bulk data.","operationId":"export_products_v1_products_export_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["csv","json"],"type":"string","description":"File format: 'csv' or 'json'","default":"csv","title":"Format"},"description":"File format: 'csv' or 'json'"},{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Use 'me' for the current user's products, or a username for that user's public products","title":"Owner"},"description":"Use 'me' for the current user's products, or a username for that user's public products"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductExportRead"},"title":"Response Export Products V1 Products Export Get"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"More than 100 base products match, or the export is too large (components nested more than 10 levels deep, or more than 5,000 components)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/facets":{"get":{"tags":["products"],"summary":"Get derived product facets","description":"Return derived filter values and counts for product browsing.","operationId":"get_product_facets_v1_products_facets_get","parameters":[{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["brand","model"],"type":"string"}},{"type":"null"}],"description":"Product fields to facet. Repeat the parameter for multiple fields.","title":"Fields"},"description":"Product fields to facet. Repeat the parameter for multiple fields."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProductFacetValue"}},"title":"Response Get Product Facets V1 Products Facets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}":{"get":{"tags":["products"],"summary":"Get base product by ID","description":"Get a base product by ID. For components, use ``/components/{component_id}``.","operationId":"get_product_v1_products__product_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReadWithRelationshipsAndFlatComponents"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["products"],"summary":"Update base product","description":"Update an existing base product. Use ``PATCH /components/{id}`` for components.","operationId":"update_product_v1_products__product_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"if-match","in":"header","required":true,"schema":{"type":"string","description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412.","title":"If-Match"},"description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRead"}}}},"412":{"description":"The record changed since the `version` sent in `If-Match`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Delete base product","description":"Delete a base product, cascading to its components. Use ``DELETE /components/{id}`` for a component.","operationId":"delete_product_v1_products__product_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/export":{"get":{"tags":["products"],"summary":"Export one base product with its components","description":"Export one base product and its whole component tree, in the same formats as ``/products/export``.","operationId":"export_product_v1_products__product_id__export_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"format","in":"query","required":false,"schema":{"enum":["csv","json"],"type":"string","description":"File format: 'csv' or 'json'","default":"csv","title":"Format"},"description":"File format: 'csv' or 'json'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductExportRead"},"title":"Response Export Product V1 Products Product Id Export Get"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"The export is too large (components nested more than 10 levels deep, or more than 5,000 components)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/components/tree":{"get":{"tags":["products"],"summary":"Get product component subtree","description":"Get a product's component subtree as a bounded hierarchical view.\n\nA tree with more components than the cap, across all levels, is a 400. Page through\n``/components`` level by level, or use the export, for bigger products.","operationId":"get_product_subtree_v1_products__product_id__components_tree_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"recursion_depth","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Maximum recursion depth","default":1,"title":"Recursion Depth"},"description":"Maximum recursion depth"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"},"title":"Response Get Product Subtree V1 Products Product Id Components Tree Get"}}}},"400":{"description":"More than 1,000 components at the requested depth"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/components":{"get":{"tags":["products"],"summary":"Get product components","description":"Get a page of a product's direct components.","operationId":"get_product_components_v1_products__product_id__components_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},{"name":"brand[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand[Ilike]"}},{"name":"brand[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Brand[In]"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"model[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model[Ilike]"}},{"name":"created_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At"}},{"name":"created_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Ge]"}},{"name":"created_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Created At[Le]"}},{"name":"updated_at","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At"}},{"name":"updated_at[ge]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Ge]"}},{"name":"updated_at[le]","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Updated At[Le]"}},{"name":"weight_g","in":"query","required":false,"schema":{"type":"number","title":"Weight G"}},{"name":"weight_g[ge]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Ge]"}},{"name":"weight_g[le]","in":"query","required":false,"schema":{"type":"number","title":"Weight G[Le]"}},{"name":"height_cm","in":"query","required":false,"schema":{"type":"number","title":"Height Cm"}},{"name":"height_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Ge]"}},{"name":"height_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Height Cm[Le]"}},{"name":"width_cm","in":"query","required":false,"schema":{"type":"number","title":"Width Cm"}},{"name":"width_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Ge]"}},{"name":"width_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Width Cm[Le]"}},{"name":"depth_cm","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm"}},{"name":"depth_cm[ge]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Ge]"}},{"name":"depth_cm[le]","in":"query","required":false,"schema":{"type":"number","title":"Depth Cm[Le]"}},{"name":"product_type_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name"}},{"name":"product_type_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Name[Ilike]"}},{"name":"product_type_name[in]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Product Type Name[In]"}},{"name":"product_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description"}},{"name":"product_type_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+brand","+model","+created_at","+updated_at","+product_type_name","name","brand","model","created_at","updated_at","product_type_name","-name","-brand","-model","-created_at","-updated_at","-product_type_name"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ComponentRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Create a new component under a base product","description":"Create a new component under the given base product.\n\nAn optional ``Idempotency-Key`` header makes a retried request safe: replaying the same\nkey returns the original response instead of creating a second component. The key is bound to\nthis user, this parent, and this request body; reusing it with a different body is a 422.","operationId":"add_component_to_product_v1_products__product_id__components_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"examples":{"simple":{"value":{"name":"Seat Assembly","description":"Chair seat component","amount_in_parent":1,"bill_of_materials":[{"material_id":1,"quantity":0.5,"unit":"g"}]},"summary":"Basic component","description":"Create a component without subcomponents"},"nested":{"value":{"name":"Seat Assembly","description":"Chair seat with cushion","amount_in_parent":1,"components":[{"name":"Cushion","description":"Foam cushion","amount_in_parent":1,"bill_of_materials":[{"material_id":2,"quantity":0.3,"unit":"g"}]}]},"summary":"Component with subcomponents","description":"Create a component with nested subcomponents"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"}}}},"409":{"description":"A request with this Idempotency-Key is already being processed."},"503":{"description":"The idempotency store is unreachable; retry later."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/suggestions/brands":{"get":{"tags":["products"],"summary":"Get product brand suggestions","description":"Get a paginated, searchable list of unique product brands derived from product data.","operationId":"get_brand_suggestions_v1_products_suggestions_brands_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Search brand (case-insensitive)","title":"Search"},"description":"Search brand (case-insensitive)"},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"Sort order: 'asc' or 'desc'","default":"asc","title":"Order"},"description":"Sort order: 'asc' or 'desc'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_str_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/suggestions/models":{"get":{"tags":["products"],"summary":"Get product model suggestions","description":"Get a paginated, searchable list of unique product model names derived from product data.","operationId":"get_model_suggestions_v1_products_suggestions_models_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Search model name (case-insensitive)","title":"Search"},"description":"Search model name (case-insensitive)"},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"Sort order: 'asc' or 'desc'","default":"asc","title":"Order"},"description":"Sort order: 'asc' or 'desc'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_str_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/files":{"get":{"tags":["products"],"summary":"List files attached to a base product","description":"List all files attached to a base product.","operationId":"get_product_files_v1_products__product_id__files_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_FileReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Upload a file to a base product","description":"Upload a new file for a base product.\n\nRestricted to lab accounts: research-file formats are a lab capability, so the\ndependency rejects before the multipart body is read.","operationId":"upload_product_file_v1_products__product_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_file_v1_products__product_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/files/{file_id}":{"get":{"tags":["products"],"summary":"Get a specific base-product file","description":"Get a specific file attached to a base product.","operationId":"get_product_file_v1_products__product_id__files__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove a file from a base product","description":"Remove a file from a base product.","operationId":"delete_product_file_v1_products__product_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/images":{"get":{"tags":["products"],"summary":"List images attached to a base product","description":"List all images attached to a base product.","operationId":"get_product_images_v1_products__product_id__images_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ImageReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Upload an image to a base product","description":"Upload a new image for a base product.","operationId":"upload_product_image_v1_products__product_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_image_v1_products__product_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/images/{image_id}":{"get":{"tags":["products"],"summary":"Get a specific base-product image","description":"Get a specific image attached to a base product.","operationId":"get_product_image_v1_products__product_id__images__image_id__get","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove an image from a base product","description":"Remove an image from a base product.","operationId":"delete_product_image_v1_products__product_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}":{"get":{"tags":["components"],"summary":"Get component by ID","description":"Fetch a component by its stable id.","operationId":"get_component_v1_components__component_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRelationshipsAndFlatComponents"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["components"],"summary":"Update component","description":"Update a component. Response is the lean :class:`ComponentRead` shape (no relationships).","operationId":"update_component_v1_components__component_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"if-match","in":"header","required":true,"schema":{"type":"string","description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412.","title":"If-Match"},"description":"The `version` field from the product's last read, quoted: `\"3\"`. Not the `ETag` a GET returns: that one also changes with media. A stale or malformed value is refused with 412."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentRead"}}}},"412":{"description":"The record changed since the `version` sent in `If-Match`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Delete component","description":"Delete a component (cascades to its sub-components).","operationId":"delete_component_v1_components__component_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/components":{"post":{"tags":["components"],"summary":"Create a nested component","description":"Create a new component below an existing component.\n\nAn optional ``Idempotency-Key`` header makes a retried request safe: replaying the same\nkey returns the original response instead of creating a second component. The key is bound to\nthis user, this parent, and this request body; reusing it with a different body is a 422.","operationId":"add_component_to_component_v1_components__component_id__components_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"examples":{"simple":{"value":{"name":"Seat Assembly","description":"Chair seat component","amount_in_parent":1,"bill_of_materials":[{"material_id":1,"quantity":0.5,"unit":"g"}]},"summary":"Basic component","description":"Create a component without subcomponents"},"nested":{"value":{"name":"Seat Assembly","description":"Chair seat with cushion","amount_in_parent":1,"components":[{"name":"Cushion","description":"Foam cushion","amount_in_parent":1,"bill_of_materials":[{"material_id":2,"quantity":0.3,"unit":"g"}]}]},"summary":"Component with subcomponents","description":"Create a component with nested subcomponents"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"}}}},"409":{"description":"A request with this Idempotency-Key is already being processed."},"503":{"description":"The idempotency store is unreachable; retry later."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/files":{"get":{"tags":["components"],"summary":"List files attached to a component","description":"List all files attached to a component.","operationId":"get_component_files_v1_components__component_id__files_get","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_FileReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Upload a file to a component","description":"Upload a new file for a component.\n\nRestricted to lab accounts, like the product-level route.","operationId":"upload_component_file_v1_components__component_id__files_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_component_file_v1_components__component_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/files/{file_id}":{"get":{"tags":["components"],"summary":"Get a specific component file","description":"Get a specific file attached to a component.","operationId":"get_component_file_v1_components__component_id__files__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove a file from a component","description":"Remove a file from a component.","operationId":"delete_component_file_v1_components__component_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the file","title":"File Id"},"description":"ID of the file"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/images":{"get":{"tags":["components"],"summary":"List images attached to a component","description":"List all images attached to a component.","operationId":"get_component_images_v1_components__component_id__images_get","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"filename[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"parent_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"parent_type[eq]","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MediaParentType"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+filename","+created_at","filename","created_at","-filename","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TypeVar_Customized_ImageReadWithinParent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Upload an image to a component","description":"Upload a new image for a component.","operationId":"upload_component_image_v1_components__component_id__images_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_component_image_v1_components__component_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/images/{image_id}":{"get":{"tags":["components"],"summary":"Get a specific component image","description":"Get a specific image attached to a component.","operationId":"get_component_image_v1_components__component_id__images__image_id__get","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageReadWithinParent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove an image from a component","description":"Remove an image from a component.","operationId":"delete_component_image_v1_components__component_id__images__image_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"ID of the image","title":"Image Id"},"description":"ID of the image"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/materials":{"get":{"tags":["components"],"summary":"Get component bill of materials","description":"Get bill of materials for a component.","operationId":"get_component_bill_of_materials_v1_components__component_id__materials_get","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"quantity","in":"query","required":false,"schema":{"type":"number","title":"Quantity"}},{"name":"quantity[ge]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Ge]"}},{"name":"quantity[le]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Le]"}},{"name":"unit","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},{"name":"unit[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit[Ilike]"}},{"name":"material_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name"}},{"name":"material_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name[Ilike]"}},{"name":"material_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description"}},{"name":"material_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description[Ilike]"}},{"name":"material_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source"}},{"name":"material_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source[Ilike]"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Get Component Bill Of Materials V1 Components Component Id Materials Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Add multiple materials to component bill of materials","description":"Add multiple materials to a component's bill of materials.","operationId":"add_materials_to_component_v1_components__component_id__materials_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"description":"List of materials-component links to add to the component","title":"Materials"},"examples":{"multiple_materials":{"value":[{"material_id":1,"quantity":5,"unit":"g"},{"material_id":2,"quantity":10,"unit":"g"}],"summary":"Add multiple materials"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Add Materials To Component V1 Components Component Id Materials Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove multiple materials from component bill of materials","description":"Remove multiple materials from a component's bill of materials.","operationId":"remove_materials_from_component_bulk_v1_components__component_id__materials_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer","exclusiveMinimum":0},"description":"Material IDs to remove from the component","title":"Material Ids"},"examples":{"multiple_material_ids":{"value":[1,2,3],"summary":"Remove multiple material links"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/components/{component_id}/materials/{material_id}":{"get":{"tags":["components"],"summary":"Get material in component bill of materials","description":"Get a material in a component's bill of materials.","operationId":"get_material_in_component_bill_of_materials_v1_components__component_id__materials__material_id__get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["components"],"summary":"Add single material to component bill of materials","description":"Add a single material to a component's bill of materials.","operationId":"add_material_to_component_v1_components__component_id__materials__material_id__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to add to the component","title":"Material Id"},"description":"ID of material to add to the component","examples":{"material_id":{"value":1,"summary":"Existing material ID"}}},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProductAndMaterial","description":"Material-component link details"},"examples":{"single_material":{"value":{"quantity":5,"unit":"g"},"summary":"Link details for one material"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["components"],"summary":"Update material in component bill of materials","description":"Update material in bill of materials for a component.","operationId":"update_component_bill_of_materials_v1_components__component_id__materials__material_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["components"],"summary":"Remove single material from component bill of materials","description":"Remove a single material from a component's bill of materials.","operationId":"remove_material_from_component_v1_components__component_id__materials__material_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to remove from the component","title":"Material Id"},"description":"ID of material to remove from the component"},{"name":"component_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Component Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/videos":{"get":{"tags":["products"],"summary":"Get all videos for a base product","description":"Get all videos associated with a base product.\n\nVideos live only on base products (dismantling captures whole products,\nnot components). Component ids are rejected.","operationId":"get_product_videos_v1_products__product_id__videos_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},{"name":"url[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+url","+created_at","url","created_at","-url","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VideoReadWithinProduct"},"title":"Response Get Product Videos V1 Products Product Id Videos Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Create a new video for a base product","description":"Create a new video associated with a base product.","operationId":"create_product_video_v1_products__product_id__videos_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoCreateWithinProduct"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/videos/{video_id}":{"get":{"tags":["products"],"summary":"Get video by ID","description":"Get a video associated with a base product.","operationId":"get_product_video_v1_products__product_id__videos__video_id__get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Video Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["products"],"summary":"Update video by ID","description":"Update a video associated with a base product.","operationId":"update_product_video_v1_products__product_id__videos__video_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Video Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoUpdateWithinProduct"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Delete video by ID","description":"Delete a video associated with a base product.","operationId":"delete_product_video_v1_products__product_id__videos__video_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Video Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/materials":{"get":{"tags":["products"],"summary":"Get product bill of materials","description":"Get bill of materials for a base product.","operationId":"get_product_bill_of_materials_v1_products__product_id__materials_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"quantity","in":"query","required":false,"schema":{"type":"number","title":"Quantity"}},{"name":"quantity[ge]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Ge]"}},{"name":"quantity[le]","in":"query","required":false,"schema":{"type":"number","title":"Quantity[Le]"}},{"name":"unit","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},{"name":"unit[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit[Ilike]"}},{"name":"material_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name"}},{"name":"material_name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Name[Ilike]"}},{"name":"material_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description"}},{"name":"material_description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Description[Ilike]"}},{"name":"material_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source"}},{"name":"material_source[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Material Source[Ilike]"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Get Product Bill Of Materials V1 Products Product Id Materials Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Add multiple materials to product bill of materials","description":"Add multiple materials to a base product's bill of materials.","operationId":"add_materials_to_product_v1_products__product_id__materials_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"description":"List of materials-product links to add to the product","title":"Materials"},"examples":{"multiple_materials":{"value":[{"material_id":1,"quantity":5,"unit":"g"},{"material_id":2,"quantity":10,"unit":"g"}],"summary":"Add multiple materials"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"title":"Response Add Materials To Product V1 Products Product Id Materials Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove multiple materials from product bill of materials","description":"Remove multiple materials from a base product's bill of materials.","operationId":"remove_materials_from_product_bulk_v1_products__product_id__materials_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"integer","exclusiveMinimum":0},"description":"Material IDs to remove from the product","title":"Material Ids"},"examples":{"multiple_material_ids":{"value":[1,2,3],"summary":"Remove multiple material links"}}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/products/{product_id}/materials/{material_id}":{"get":{"tags":["products"],"summary":"Get material in product bill of materials","description":"Get a material in a base product's bill of materials.","operationId":"get_material_in_product_bill_of_materials_v1_products__product_id__materials__material_id__get","parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["products"],"summary":"Add single material to product bill of materials","description":"Add a single material to a base product's bill of materials.","operationId":"add_material_to_product_v1_products__product_id__materials__material_id__post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to add to the product","title":"Material Id"},"description":"ID of material to add to the product","examples":{"material_id":{"value":1,"summary":"Existing material ID"}}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProductAndMaterial","description":"Material-product link details"},"examples":{"single_material":{"value":{"quantity":5,"unit":"g"},"summary":"Link details for one material"}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["products"],"summary":"Update material in product bill of materials","description":"Update material in bill of materials for a base product.","operationId":"update_product_bill_of_materials_v1_products__product_id__materials__material_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Material Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["products"],"summary":"Remove single material from product bill of materials","description":"Remove a single material from a base product's bill of materials.","operationId":"remove_material_from_product_v1_products__product_id__materials__material_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"material_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"ID of material to remove from the product","title":"Material Id"},"description":"ID of material to remove from the product"},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/bearer/login":{"post":{"tags":["auth"],"summary":"Login with email and password for bearer-token clients","description":"Authenticate a bearer client and return access and refresh tokens in JSON.","operationId":"auth_bearer_login_v1_auth_bearer_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_auth_bearer_login_v1_auth_bearer_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenResponse"},{"$ref":"#/components/schemas/MfaPendingResponse"}],"title":"Response Auth Bearer Login V1 Auth Bearer Login Post"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"429":{"description":"Too many attempts for this address or account. See the Retry-After header."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/session/login":{"post":{"tags":["auth"],"summary":"Login with email and password for browser sessions","description":"Authenticate a browser client and return MFA challenge only when MFA is enabled.","operationId":"auth_session_login_v1_auth_session_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_auth_session_login_v1_auth_session_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MfaPendingResponse"},{"type":"null"}],"title":"Response Auth Session Login V1 Auth Session Login Post"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"429":{"description":"Too many attempts for this address or account. See the Retry-After header."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/register":{"post":{"tags":["auth"],"summary":"Register a new user","description":"Register a new user, returning the same response whether or not the email is taken.","operationId":"register_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegister"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/bearer/refresh":{"post":{"tags":["auth"],"summary":"Refresh tokens for bearer-token clients","description":"Refresh access token using refresh token for bearer auth.\n\nValidates refresh token and issues new access token.","operationId":"auth_bearer_refresh_v1_auth_bearer_refresh_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/session/refresh":{"post":{"tags":["auth"],"summary":"Refresh tokens for browser sessions","description":"Refresh access token using refresh token from cookie.\n\nValidates refresh token cookie and issues new access token cookie.","operationId":"auth_session_refresh_v1_auth_session_refresh_post","parameters":[{"name":"__Host-r9lab-refresh","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":" Host-R9Lab-Refresh"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/bearer/logout":{"post":{"tags":["auth"],"summary":"Log out a bearer-token client","description":"Logout a bearer client and revoke its supplied refresh token.","operationId":"auth_bearer_logout_v1_auth_bearer_logout_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/session/logout":{"post":{"tags":["auth"],"summary":"Log out a browser session","description":"Logout a browser session, revoke refresh state, and clear browser storage.","operationId":"auth_session_logout_v1_auth_session_logout_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"__Host-r9lab-refresh","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":" Host-R9Lab-Refresh"}},{"name":"__Host-r9lab-auth","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":" Host-R9Lab-Auth"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/sessions/revoke-all":{"post":{"tags":["auth"],"summary":"Revoke every session of the current user","description":"Revoke all refresh tokens for the current user and clear browser session state.","operationId":"auth_sessions_revoke_all_v1_auth_sessions_revoke_all_post","responses":{"204":{"description":"Successful Response"}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/totp/setup":{"post":{"tags":["auth"],"summary":"Start Totp Setup","description":"Start authenticated TOTP enrollment for an account that opted into MFA.","operationId":"start_totp_setup_v1_auth_mfa_totp_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpSetupResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/totp/confirm":{"post":{"tags":["auth"],"summary":"Confirm Totp Setup","description":"Confirm TOTP enrollment, return one-time recovery codes, and replace the session.\n\nEnrolment signs out every other session. A client that authenticated with a bearer\ntoken gets new tokens in ``tokens``; a browser session gets new cookies.","operationId":"confirm_totp_setup_v1_auth_mfa_totp_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpConfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/totp/disable":{"post":{"tags":["auth"],"summary":"Disable Totp","description":"Turn off TOTP MFA after confirming the password and a current or recovery code.\n\nAccounts without a usable password (signed up with Google or GitHub) send only the code.","operationId":"disable_totp_v1_auth_mfa_totp_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaTotpDisableRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"400":{"description":"The password or the code is missing."},"401":{"description":"MFA is not on for this account."},"403":{"description":"The password or the code is wrong."},"429":{"description":"Too many guesses for this account. See the Retry-After header."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/recovery-codes/regenerate":{"post":{"tags":["auth"],"summary":"Regenerate Recovery Codes","description":"Reissue recovery codes after confirming a current TOTP code.","operationId":"regenerate_recovery_codes_v1_auth_mfa_recovery_codes_regenerate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaRecoveryCodesRegenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaRecoveryCodesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/auth/mfa/oauth/claim":{"post":{"tags":["auth"],"summary":"Claim Oauth Mfa Handoff","description":"Claim a one-time OAuth MFA handoff and return pending MFA state.","operationId":"claim_oauth_mfa_handoff_v1_auth_mfa_oauth_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaOAuthClaimRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaPendingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/mfa/challenge":{"post":{"tags":["auth"],"summary":"Complete Mfa Challenge","description":"Complete login for a user with TOTP already enabled.","operationId":"complete_mfa_challenge_v1_auth_mfa_challenge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaChallengeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenResponse"},{"type":"null"}],"title":"Response Complete Mfa Challenge V1 Auth Mfa Challenge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/request-verify-token":{"post":{"tags":["auth"],"summary":"Verify:Request-Token","operationId":"verify_request_token_v1_auth_request_verify_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_verify_request_token_v1_auth_request_verify_token_post"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/verify":{"post":{"tags":["auth"],"summary":"Verify:Verify","operationId":"verify_verify_v1_auth_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_verify_verify_v1_auth_verify_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"VERIFY_USER_BAD_TOKEN":{"summary":"Bad token, not existing user or not the e-mail currently set for the user.","value":{"detail":"VERIFY_USER_BAD_TOKEN"}},"VERIFY_USER_ALREADY_VERIFIED":{"summary":"The user is already verified.","value":{"detail":"VERIFY_USER_ALREADY_VERIFIED"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Reset:Forgot Password","description":"Start a forgot-password request without revealing whether the account exists.","operationId":"reset_forgot_password_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_reset_forgot_password_v1_auth_forgot_password_post"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset:Reset Password","description":"Reset a password while preserving FastAPI-Users' public error contract.","operationId":"reset_reset_password_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_reset_reset_password_v1_auth_reset_password_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"RESET_PASSWORD_BAD_TOKEN":{"summary":"Bad or expired token.","value":{"detail":"RESET_PASSWORD_BAD_TOKEN"}},"RESET_PASSWORD_INVALID_PASSWORD":{"summary":"Password validation failed.","value":{"detail":{"code":"RESET_PASSWORD_INVALID_PASSWORD","reason":"Password should be at least 3 characters"}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/auth/validate-email":{"post":{"tags":["auth"],"summary":"Validate Email","description":"Validate email address for registration.\n\nTakes the email in a POST body (not a query param) so it doesn't land in\nproxy/uvicorn access logs, matching the pairing endpoints' approach.","operationId":"validate_email_v1_auth_validate_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailValidationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"null"}]},"type":"object","title":"Response Validate Email V1 Auth Validate Email Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/github/token/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Bearer.Authorize","operationId":"oauth_github_bearer_authorize_v1_oauth_github_token_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/github/token/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Bearer.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_github_bearer_callback_v1_oauth_github_token_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/github/session/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Cookie.Authorize","operationId":"oauth_github_cookie_authorize_v1_oauth_github_session_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/github/session/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Github.Cookie.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_github_cookie_callback_v1_oauth_github_session_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/github/associate/authorize":{"post":{"tags":["oauth"],"summary":"Oauth-Associate:Github.Authorize","operationId":"oauth_associate_github_authorize_v1_oauth_github_associate_authorize_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/oauth/github/associate/callback":{"get":{"tags":["oauth"],"summary":"Oauth-Associate:Github.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_associate_github_callback_v1_oauth_github_associate_callback_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google/token/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Bearer.Authorize","operationId":"oauth_google_bearer_authorize_v1_oauth_google_token_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/google/token/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Bearer.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_google_bearer_callback_v1_oauth_google_token_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google/session/authorize":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Cookie.Authorize","operationId":"oauth_google_cookie_authorize_v1_oauth_google_session_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"400":{"description":"redirect_uri is not allowed, or was sent to the bearer (token) route, which returns its tokens in the callback body."}},"x-audience":["public","app"]}},"/v1/oauth/google/session/callback":{"get":{"tags":["oauth"],"summary":"Oauth:Google.Cookie.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_google_cookie_callback_v1_oauth_google_session_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google/associate/authorize":{"post":{"tags":["oauth"],"summary":"Oauth-Associate:Google.Authorize","operationId":"oauth_associate_google_authorize_v1_oauth_google_associate_authorize_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/oauth/google/associate/callback":{"get":{"tags":["oauth"],"summary":"Oauth-Associate:Google.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_associate_google_callback_v1_oauth_google_associate_callback_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/google-youtube/associate/authorize":{"post":{"tags":["oauth"],"summary":"Oauth-Associate:Google-Youtube.Authorize","operationId":"oauth_associate_google_youtube_authorize_v1_oauth_google_youtube_associate_authorize_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/oauth/google-youtube/associate/callback":{"get":{"tags":["oauth"],"summary":"Oauth-Associate:Google-Youtube.Callback","description":"The response varies based on the authentication backend used.","operationId":"oauth_associate_google_youtube_callback_v1_oauth_google_youtube_associate_callback_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"code_verifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/oauth/{provider}/associate":{"delete":{"tags":["oauth"],"summary":"Remove Oauth Association","description":"Remove a linked OAuth account (password and MFA step-up where the account has them).","operationId":"remove_oauth_association_v1_oauth__provider__associate_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/users/me":{"get":{"tags":["users"],"summary":"Users:Current User","operationId":"users_current_user_v1_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"401":{"description":"Missing token or inactive user."}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]},"delete":{"tags":["users"],"summary":"Delete your own account","description":"Delete the signed-in account, keeping its products under the anonymous system account.\n\nPersonal data is erased; contributed products and media stay on the platform without\nthe owner's name. Requires the current password, the same step-up as an email or\npassword change, and a current MFA code when the account has MFA enabled. An account\nwith neither must have signed in within the last few minutes. The former address gets\na notification email.","operationId":"delete_own_account_v1_users_me_delete","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StepUpRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"204":{"description":"Successful Response"},"400":{"description":"The current password or MFA code is missing."},"403":{"description":"The current password or MFA code is invalid, or the account needs a fresh sign-in."},"409":{"description":"This account cannot be deleted (the last active superuser)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]},"patch":{"tags":["users"],"summary":"Users:Patch Current User","operationId":"users_patch_current_user_v1_users_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"401":{"description":"Missing token or inactive user."},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"UPDATE_USER_EMAIL_ALREADY_EXISTS":{"summary":"A user with this email already exists.","value":{"detail":"UPDATE_USER_EMAIL_ALREADY_EXISTS"}},"UPDATE_USER_INVALID_PASSWORD":{"summary":"Password validation failed.","value":{"detail":{"code":"UPDATE_USER_INVALID_PASSWORD","reason":"Password should beat least 3 characters"}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/users/me/accept-terms":{"post":{"tags":["users"],"summary":"Accept the current contributor terms","description":"Record that this account accepted the contributor terms.\n\nThe route takes no body: the server stamps ``CURRENT_TERMS_VERSION``, so a client\ncannot claim a grant under terms it was never shown. An acceptance already past the\ncurrent version is kept.\n\nWrites through the user database: the account was loaded by the auth session, not\n``AsyncSessionDep``, so committing on the latter would persist nothing.","operationId":"accept_terms_v1_users_me_accept_terms_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/admin/users":{"get":{"tags":["admin"],"summary":"View all users","description":"Get a list of all users with optional filtering.","operationId":"get_users_v1_admin_users_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},{"name":"email[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email[Ilike]"}},{"name":"username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"}},{"name":"username[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username[Ilike]"}},{"name":"is_active","in":"query","required":false,"schema":{"type":"boolean","title":"Is Active"}},{"name":"is_active[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Active[Eq]"}},{"name":"is_superuser","in":"query","required":false,"schema":{"type":"boolean","title":"Is Superuser"}},{"name":"is_superuser[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Superuser[Eq]"}},{"name":"is_verified","in":"query","required":false,"schema":{"type":"boolean","title":"Is Verified"}},{"name":"is_verified[eq]","in":"query","required":false,"schema":{"type":"boolean","title":"Is Verified[Eq]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+email","+username","email","username","-email","-username"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"List of users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_UserRead_"},"examples":{"basic":{"value":[{"id":"12345678-cc4e-405c-8553-7806424de2a1","username":"alice","email":"alice@example.com","is_active":true,"is_superuser":false,"is_verified":true}],"summary":"Users without relationships"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/users/{user_id}":{"get":{"tags":["admin"],"summary":"View a single user by ID","description":"Get a user by ID.","operationId":"get_user_v1_admin_users__user_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"patch":{"tags":["admin"],"summary":"Update a user by ID","description":"Update a user by ID without requiring the target account's password.\n\n`safe=False` lets an administrator change fields the self-service route\nreauthenticates for; UserManager skips the current-password gate on this path.","operationId":"update_user_v1_admin_users__user_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin"],"summary":"Delete a user by ID","description":"Delete a user by ID, anonymizing or deleting the content they own.","operationId":"delete_user_v1_admin_users__user_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"},{"name":"content","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ErasureContent","description":"What to do with the research data this user contributed: `anonymize` reassigns their products to the anonymous system account, `delete` removes the products and their media. Personal data is erased either way.","default":"anonymize"},"description":"What to do with the research data this user contributed: `anonymize` reassigns their products to the anonymous system account, `delete` removes the products and their media. Personal data is erased either way."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/users/{user_id}/mfa/reset":{"post":{"tags":["admin"],"summary":"Reset a user's MFA enrollment","description":"Reset TOTP MFA after an administrator performs identity-proofed recovery.","operationId":"reset_user_mfa_v1_admin_users__user_id__mfa_reset_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/users/{user_id}/role":{"put":{"tags":["admin"],"summary":"Set a user's contributor tier","description":"Set a user's role.\n\nA dedicated route rather than a field on `UserUpdate`: fastapi-users' safe\nupdate path excludes a fixed set of privileged fields, so anything new added\nto that schema would flow straight through self-service `PATCH /users/me`.\nKeeping role off the schema entirely makes that escalation unrepresentable.\n\nWrites through the user database rather than `AsyncSessionDep`: the target\nuser is loaded by the auth session, which is a separate dependency, so a\ncommit on the common session would persist nothing.","operationId":"set_user_role_v1_admin_users__user_id__role_put","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The user's ID","title":"User Id"},"description":"The user's ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/profiles/{username}":{"get":{"tags":["profiles"],"summary":"Get public profile of a user","description":"Get public profile statistics for a specified user by username.\n\nReturns 404 if the user is not found or if the profile is marked as private (and you are not the user).\nRecomputes stats on the fly when no snapshot exists yet, without persisting the result.","operationId":"get_public_profile_v1_profiles__username__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProfileView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras":{"get":{"tags":["r9cam-management"],"summary":"Get Raspberry Pi cameras of the current user","description":"Get all Raspberry Pi cameras of the current user.","operationId":"get_user_cameras_v1_plugins_r9cam_cameras_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"include_status","in":"query","required":false,"schema":{"type":"boolean","description":"Include camera online status","default":false,"title":"Include Status"},"description":"Include camera online status","examples":{"disabled":{"value":false,"summary":"Return camera metadata only"},"enabled":{"value":true,"summary":"Include current online status"}}},{"name":"include_telemetry","in":"query","required":false,"schema":{"type":"boolean","description":"Include the last-known telemetry snapshot from the Redis cache. Implies ``include_status=true``. No relay round-trips; cameras without cached telemetry come back with ``telemetry: null``.","default":false,"title":"Include Telemetry"},"description":"Include the last-known telemetry snapshot from the Redis cache. Implies ``include_status=true``. No relay round-trips; cameras without cached telemetry come back with ``telemetry: null``."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+created_at","name","created_at","-name","-created_at"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CameraRead"}},{"type":"array","items":{"$ref":"#/components/schemas/CameraReadWithStatus"}}],"title":"Response Get User Cameras V1 Plugins R9Cam Cameras Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["r9cam-management"],"summary":"Register new Raspberry Pi camera","description":"Register a new Raspberry Pi camera.\n\nThe normal user flow is /plugins/r9cam/pairing/claim. This endpoint is\nkept as a structured API surface for tests/admin automation and still\nrequires a public device key.","operationId":"register_user_camera_v1_plugins_r9cam_cameras_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}":{"get":{"tags":["r9cam-management"],"summary":"Get Raspberry Pi camera by ID","description":"Get single Raspberry Pi camera by ID, if owned by the current user.","operationId":"get_user_camera_v1_plugins_r9cam_cameras__camera_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}},{"name":"include_status","in":"query","required":false,"schema":{"type":"boolean","description":"Include camera online status","default":false,"title":"Include Status"},"description":"Include camera online status","examples":{"disabled":{"value":false,"summary":"Return camera metadata only"},"enabled":{"value":true,"summary":"Include current online status"}}},{"name":"include_telemetry","in":"query","required":false,"schema":{"type":"boolean","description":"Include last-known telemetry from the Redis cache. Implies ``include_status=true``.","default":false,"title":"Include Telemetry"},"description":"Include last-known telemetry from the Redis cache. Implies ``include_status=true``."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CameraRead"},{"$ref":"#/components/schemas/CameraReadWithStatus"}],"title":"Response Get User Camera V1 Plugins R9Cam Cameras Camera Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"patch":{"tags":["r9cam-management"],"summary":"Update Raspberry Pi camera","description":"Update Raspberry Pi camera.","operationId":"update_user_camera_v1_plugins_r9cam_cameras__camera_id__patch","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["r9cam-management"],"summary":"Delete Raspberry Pi camera","description":"Delete Raspberry Pi camera.","operationId":"delete_user_camera_v1_plugins_r9cam_cameras__camera_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/preview-thumbnail":{"get":{"tags":["r9cam-management"],"summary":"Get a camera's cached preview thumbnail","description":"Serve the owner's cached preview thumbnail.\n\nOwner-checked (``UserOwnedCameraDep`` 404s for non-owners) and served off the\nprivate preview directory rather than the public ``/uploads/images`` mount, so\na camera id alone no longer grants a stranger a recent frame. Cached only\nprivately and revalidated, never long-lived immutable like the public mount.","operationId":"get_camera_preview_thumbnail_v1_plugins_r9cam_cameras__camera_id__preview_thumbnail_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response"},"404":{"description":"No cached preview thumbnail available for this camera."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/status":{"get":{"tags":["r9cam-management"],"summary":"Get Raspberry Pi camera online status","description":"Get Raspberry Pi camera online status.","operationId":"get_user_camera_status_v1_plugins_r9cam_cameras__camera_id__status_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/local-access":{"get":{"tags":["r9cam-management"],"summary":"Get local direct-connection info for a camera","description":"Relays GET /system/local-access to the Pi via the WebSocket connection. Returns the local API key and candidate IP addresses so the frontend can auto-configure Ethernet/USB-C direct access without manual key copying. Returns 503 when the camera is offline.","operationId":"get_camera_local_access_v1_plugins_r9cam_cameras__camera_id__local_access_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalAccessInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/captures":{"post":{"tags":["r9cam-interaction"],"summary":"Capture a still image with a remote Raspberry Pi Camera","description":"Capture a still image with a remote Raspberry Pi Camera and store it in the file storage. Send optional parent type and ID in the request body to associate the image with another object.","operationId":"capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/recording-stream":{"get":{"tags":["r9cam-interaction"],"summary":"Get the active YouTube recording stream status","description":"Fetch the current remote camera stream status from the Raspberry Pi camera plugin.","operationId":"get_camera_stream_status_v1_plugins_r9cam_cameras__camera_id__recording_stream_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"post":{"tags":["r9cam-interaction"],"summary":"Start recording to YouTube","description":"Start a YouTube recording stream.","operationId":"start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]},"delete":{"tags":["r9cam-interaction"],"summary":"Stop recording to YouTube","description":"Stop the active YouTube recording and return its video record.","operationId":"stop_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/recording-stream/monitor":{"get":{"tags":["r9cam-interaction"],"summary":"Get YouTube livestream monitor stream","description":"Get the YouTube monitor stream for the active backend-owned recording session.","operationId":"get_recording_monitor_stream_v1_plugins_r9cam_cameras__camera_id__recording_stream_monitor_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeMonitorStreamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/telemetry":{"get":{"tags":["r9cam-interaction"],"summary":"Get a camera's latest telemetry snapshot","description":"Return the most recent telemetry snapshot for the camera. Backed by a Redis cache with a 120s TTL so mosaic polling does not fan out one relay round-trip per camera on every refresh. Pass ``force_refresh=true`` to bypass the cache and re-fetch from the Pi.","operationId":"get_camera_telemetry_v1_plugins_r9cam_cameras__camera_id__telemetry_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}},{"name":"force_refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetrySnapshot"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/cameras/{camera_id}/hls/{hls_path}":{"get":{"tags":["r9cam-interaction"],"summary":"Proxy LL-HLS playlists and segments from the camera's MediaMTX","description":"Forward an LL-HLS request to the camera over its WebSocket relay. Playlist requests return ``application/vnd.apple.mpegurl`` text; segment/part requests return binary ``video/mp4`` or ``video/iso.segment``. The frontend simply points ``hls.js`` / ``expo-video`` at this URL and the player walks the manifest on its own.","operationId":"proxy_hls_v1_plugins_r9cam_cameras__camera_id__hls__hls_path__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}},{"name":"hls_path","in":"path","required":true,"schema":{"type":"string","title":"Hls Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/plugins/r9cam/device/cameras/{camera_id}/self":{"delete":{"tags":["r9cam-device"],"summary":"Pi-initiated self-unpair","description":"Called by the Pi when the user triggers unpair from the local /setup page. Authenticates via the device's assertion. Deletes the camera from the database so the backend no longer shows it as offline.","operationId":"self_unpair_camera_v1_plugins_r9cam_device_cameras__camera_id__self_delete","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/device/cameras/{camera_id}/image-upload":{"post":{"tags":["r9cam-device"],"summary":"Internal: receive an image pushed directly from a paired Raspberry Pi","description":"Called by the Pi after a successful capture. Authenticated with a short-lived device assertion (same credential used by the WebSocket relay). The Pi provides the JPEG body plus two JSON blobs: `capture_metadata` (libcamera metadata) and `upload_metadata` (opaque dict forwarded by whichever caller triggered the capture, typically `{product_id, description}`). The backend stores the image via the normal image storage service and returns a tiny ack envelope the Pi consumes.","operationId":"receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceImageUploadAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/device/cameras/{camera_id}/preview-thumbnail-upload":{"post":{"tags":["r9cam-device"],"summary":"Internal: receive a cached preview thumbnail pushed directly from a paired Raspberry Pi","description":"Called by the Pi's background thumbnail worker. Authenticated with the same short-lived device assertion used by the WebSocket relay. Stores a deterministic per-camera JPEG cache file for camera-card previews without creating an Image database row.","operationId":"receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePreviewThumbnailAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/pairing/claim":{"post":{"tags":["RPi Camera Pairing"],"summary":"Claim a pairing code and create a camera (called by user)","description":"Claim a pairing code and create a WebSocket-relayed camera.\n\nThe pending record is consumed atomically (GETDEL) so two concurrent claims\nof the same code cannot both succeed: only the winner observes the pending\nrecord and goes on to create the camera. The loser sees a missing key and\ngets the same invalid-code error as an unknown code.","operationId":"claim_pairing_code_v1_plugins_r9cam_pairing_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingClaimRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"x-audience":["public","app"]}},"/v1/plugins/r9cam/pairing/register":{"post":{"tags":["RPi Camera Pairing"],"summary":"Register a pairing code (called by RPi)","description":"Register a short-lived pairing code and the camera's public device key.","operationId":"register_pairing_code_v1_plugins_r9cam_pairing_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingRegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/plugins/r9cam/pairing/poll":{"post":{"tags":["RPi Camera Pairing"],"summary":"Poll pairing status (called by RPi)","description":"Poll for pairing completion. Returns non-secret relay metadata once claimed.\n\nTakes the code and fingerprint in a POST body (not query params) so the\nclaim credential never reaches proxy/uvicorn access logs.","operationId":"poll_pairing_status_v1_plugins_r9cam_pairing_poll_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingPollRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingPollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["device"]}},"/v1/admin/plugins/r9cam/cameras":{"get":{"tags":["admin"],"summary":"Get all Raspberry Pi cameras","description":"Get all Raspberry Pi cameras.","operationId":"get_all_cameras_v1_admin_plugins_r9cam_cameras_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"name[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name[Ilike]"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"description[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description[Ilike]"}},{"name":"owner_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"}},{"name":"owner_email[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email[Ilike]"}},{"name":"owner_username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"}},{"name":"owner_username[ilike]","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username[Ilike]"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"array","items":{"enum":["+name","+created_at","+owner_email","+owner_username","name","created_at","owner_email","owner_username","-name","-created_at","-owner_email","-owner_username"],"type":"string"},"explode":false,"title":"Order By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CameraRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/plugins/r9cam/cameras/{camera_id}":{"get":{"tags":["admin"],"summary":"Get Raspberry Pi camera by ID","description":"Get single Raspberry Pi camera by ID.","operationId":"get_camera_v1_admin_plugins_r9cam_cameras__camera_id__get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]},"delete":{"tags":["admin"],"summary":"Delete Raspberry Pi camera","description":"Delete Raspberry Pi camera.","operationId":"delete_camera_v1_admin_plugins_r9cam_cameras__camera_id__delete","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/admin/plugins/r9cam/cameras/{camera_id}/status":{"get":{"tags":["admin"],"summary":"Get Raspberry Pi camera online status","description":"Get Raspberry Pi camera online status.","operationId":"get_camera_status_v1_admin_plugins_r9cam_cameras__camera_id__status_get","security":[{"OAuth2PasswordBearer":[]},{"APIKeyCookie":[]}],"parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Camera Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["admin"]}},"/v1/stats/totals":{"get":{"tags":["stats"],"summary":"Get Stats Totals","description":"System-wide all-time aggregate statistics.","operationId":"get_stats_totals_v1_stats_totals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotalsResponse"}}}}},"x-audience":["public","app"]}},"/v1/stats/categories":{"get":{"tags":["stats"],"summary":"Get Stats Categories","description":"Product categories ordered by count, capped at limit (max 100).\n\n`scope` selects what is counted: `products` (top-level products only, the\ndefault), `components` (categorised by the component's own type), or `all`.","operationId":"get_stats_categories_v1_stats_categories_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"scope","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CategoryScope","default":"products"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}},"/v1/stats/series":{"get":{"tags":["stats"],"summary":"Get Stats Series","description":"Time-bucketed activity series. Granularity: day | week | month | year.","operationId":"get_stats_series_v1_stats_series_get","parameters":[{"name":"granularity","in":"query","required":false,"schema":{"enum":["day","week","month","year"],"type":"string","default":"month","title":"Granularity"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-audience":["public","app"]}}},"components":{"schemas":{"Body_auth_bearer_login_v1_auth_bearer_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_auth_bearer_login_v1_auth_bearer_login_post"},"Body_auth_session_login_v1_auth_session_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_auth_session_login_v1_auth_session_login_post"},"Body_capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post":{"properties":{"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id","description":"ID of product to associate the image with"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Custom description for the image"}},"type":"object","required":["product_id"],"title":"Body_capture_image_v1_plugins_r9cam_cameras__camera_id__captures_post"},"Body_receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Captured JPEG"},"capture_metadata":{"type":"string","title":"Capture Metadata","description":"libcamera capture metadata as a JSON string"},"upload_metadata":{"type":"string","title":"Upload Metadata","description":"Parent association metadata as a JSON string"}},"type":"object","required":["file","capture_metadata","upload_metadata"],"title":"Body_receive_camera_upload_v1_plugins_r9cam_device_cameras__camera_id__image_upload_post"},"Body_receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Cached preview JPEG thumbnail"}},"type":"object","required":["file"],"title":"Body_receive_preview_thumbnail_upload_v1_plugins_r9cam_device_cameras__camera_id__preview_thumbnail_upload_post"},"Body_reset_forgot_password_v1_auth_forgot_password_post":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"Body_reset_forgot_password_v1_auth_forgot_password_post"},"Body_reset_reset_password_v1_auth_reset_password_post":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","title":"Password"}},"type":"object","required":["token","password"],"title":"Body_reset_reset_password_v1_auth_reset_password_post"},"Body_start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post":{"properties":{"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id","description":"ID of product to associate the video with"},"title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Title","description":"Custom video title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Custom description for the video"},"privacy_status":{"$ref":"#/components/schemas/YouTubePrivacyStatus","description":"Privacy status for the YouTube video","default":"private"}},"type":"object","required":["product_id"],"title":"Body_start_recording_v1_plugins_r9cam_cameras__camera_id__recording_stream_post"},"Body_upload_component_file_v1_components__component_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_component_file_v1_components__component_id__files_post"},"Body_upload_component_image_v1_components__component_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_component_image_v1_components__component_id__images_post"},"Body_upload_material_file_v1_admin_materials__material_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_material_file_v1_admin_materials__material_id__files_post"},"Body_upload_material_image_v1_admin_materials__material_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_material_image_v1_admin_materials__material_id__images_post"},"Body_upload_product_file_v1_products__product_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_product_file_v1_products__product_id__files_post"},"Body_upload_product_image_v1_products__product_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_product_image_v1_products__product_id__images_post"},"Body_upload_product_type_file_v1_admin_product_types__product_type_id__files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A file to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file"],"title":"Body_upload_product_type_file_v1_admin_product_types__product_type_id__files_post"},"Body_upload_product_type_image_v1_admin_product_types__product_type_id__images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"An image to upload"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Metadata","description":"Image metadata in JSON string format"}},"type":"object","required":["file"],"title":"Body_upload_product_type_image_v1_admin_product_types__product_type_id__images_post"},"Body_verify_request_token_v1_auth_request_verify_token_post":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"Body_verify_request_token_v1_auth_request_verify_token_post"},"Body_verify_verify_v1_auth_verify_post":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"Body_verify_verify_v1_auth_verify_post"},"CacheNamespace":{"type":"string","enum":["reference-data","stats"],"title":"CacheNamespace","description":"Cache namespace identifiers for different application areas."},"CameraConnectionStatus":{"type":"string","enum":["online","offline","unauthorized","forbidden","error"],"title":"CameraConnectionStatus","description":"Camera connection status."},"CameraCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"relay_public_key_jwk":{"$ref":"#/components/schemas/RelayPublicKeyJWK"},"relay_key_id":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]+$","title":"Relay Key Id"}},"additionalProperties":false,"type":"object","required":["name","relay_public_key_jwk","relay_key_id"],"title":"CameraCreate","description":"Schema for creating a WebSocket-relayed camera.","examples":[{"description":"Ceiling-mounted camera above the teardown bench","name":"Workbench Camera","relay_key_id":"cam-key-1","relay_public_key_jwk":{"crv":"P-256","kid":"cam-key-1","kty":"EC","x":"axfR8uEsQkf4vOblY6RA8ncDfYEt6zOg9KE5RdiYwpY","y":"T-NC4v4af5uO5-tKfA-eFivOM1drMV7Oy7ZAaDe_UfU"}}]},"CameraCredentialStatus":{"type":"string","enum":["active","revoked"],"title":"CameraCredentialStatus","description":"Status of the camera's relay device credential."},"CameraMode":{"type":"string","enum":["photo","video"],"title":"CameraMode","description":"Camera use mode. Contains camera configuration for each mode."},"CameraProperties":{"properties":{"Model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"unit_cell_size":{"anyOf":[{"prefixItems":[{"type":"integer","exclusiveMinimum":0.0},{"type":"integer","exclusiveMinimum":0.0}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Unit Cell Size","description":"Sensor unit cell size in nanometers"},"pixel_array_size":{"anyOf":[{"prefixItems":[{"type":"integer","exclusiveMinimum":0.0},{"type":"integer","exclusiveMinimum":0.0}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Pixel Array Size"},"sensor_sensitivity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sensor Sensitivity"}},"type":"object","title":"CameraProperties","description":"Static camera properties from libcamera.\n\nFor more info, see https://github.com/raspberrypi/libcamera/blob/main/src/libcamera/property_ids_core.yaml."},"CameraRead":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"owner_id":{"type":"string","format":"uuid4","title":"Owner Id"},"relay_key_id":{"type":"string","title":"Relay Key Id"},"relay_credential_status":{"$ref":"#/components/schemas/CameraCredentialStatus"}},"type":"object","required":["name","id","owner_id","relay_key_id","relay_credential_status"],"title":"CameraRead","description":"Basic Camera Read schema.","examples":[{"created_at":"2026-04-28T10:00:00Z","description":"Ceiling-mounted camera above the teardown bench","id":"12345678-cc4e-405c-8553-7806424de2a1","name":"Workbench Camera","owner_id":"87654321-cc4e-405c-8553-7806424de2a1","relay_credential_status":"active","relay_key_id":"cam-key-1","updated_at":"2026-04-28T10:00:00Z"}]},"CameraReadWithStatus":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"owner_id":{"type":"string","format":"uuid4","title":"Owner Id"},"relay_key_id":{"type":"string","title":"Relay Key Id"},"relay_credential_status":{"$ref":"#/components/schemas/CameraCredentialStatus"},"status":{"$ref":"#/components/schemas/CameraStatus"},"telemetry":{"anyOf":[{"$ref":"#/components/schemas/TelemetrySnapshot"},{"type":"null"}]},"preview_thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Thumbnail Url"}},"type":"object","required":["name","id","owner_id","relay_key_id","relay_credential_status","status"],"title":"CameraReadWithStatus","description":"Schema for camera read with online status.","examples":[{"created_at":"2026-04-28T10:00:00Z","description":"Ceiling-mounted camera above the teardown bench","id":"12345678-cc4e-405c-8553-7806424de2a1","name":"Workbench Camera","owner_id":"87654321-cc4e-405c-8553-7806424de2a1","relay_credential_status":"active","relay_key_id":"cam-key-1","updated_at":"2026-04-28T10:00:00Z"}]},"CameraStatus":{"properties":{"connection":{"$ref":"#/components/schemas/CameraConnectionStatus"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"details":{"anyOf":[{"$ref":"#/components/schemas/CameraStatusView"},{"type":"null"}]}},"type":"object","required":["connection"],"title":"CameraStatus","description":"Camera connection status and details."},"CameraStatusView":{"properties":{"current_mode":{"anyOf":[{"$ref":"#/components/schemas/CameraMode"},{"type":"null"}]},"stream":{"anyOf":[{"$ref":"#/components/schemas/StreamView"},{"type":"null"}]}},"type":"object","title":"CameraStatusView","description":"API response model for camera status."},"CameraUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"relay_public_key_jwk":{"anyOf":[{"$ref":"#/components/schemas/RelayPublicKeyJWK"},{"type":"null"}]},"relay_key_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]+$"},{"type":"null"}],"title":"Relay Key Id"},"relay_credential_status":{"anyOf":[{"$ref":"#/components/schemas/CameraCredentialStatus"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"CameraUpdate","description":"Schema for updating a camera.","examples":[{"description":"Camera assigned to the repairability bench"}]},"CaptureMetadata":{"properties":{"exposure_time":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Exposure Time","description":"Exposure time in microseconds"},"frame_duration":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Frame Duration","description":"Frame duration in microseconds"},"color_temperature":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Color Temperature","description":"Color temperature in K"},"analogue_gain":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Analogue Gain"},"digital_gain":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Digital Gain"},"lux":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Lux","description":"Illuminance in lux"},"sensor_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sensor Temperature","description":"Sensor temperature in \u00b0C"},"lens_position":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lens Position","description":"Lens focus position in dioptres"},"color_gains":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Color Gains","description":"Red and blue white-balance gains"},"scaler_crop":{"anyOf":[{"prefixItems":[{"type":"integer"},{"type":"integer"},{"type":"integer"},{"type":"integer"}],"type":"array","maxItems":4,"minItems":4},{"type":"null"}],"title":"Scaler Crop","description":"Sensor area read for the image as x, y, width, height in sensor pixels"}},"type":"object","title":"CaptureMetadata","description":"Dynamic capture metadata from libcamera.\n\nFor more info, see https://github.com/raspberrypi/libcamera/blob/main/src/libcamera/control_ids_core.yaml."},"CategoriesResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"limit":{"type":"integer","title":"Limit"},"scope":{"$ref":"#/components/schemas/CategoryScope"},"categories":{"items":{"$ref":"#/components/schemas/CategoryStat"},"type":"array","title":"Categories"}},"type":"object","required":["generated_at","limit","scope","categories"],"title":"CategoriesResponse","description":"Response payload for the top-categories endpoint."},"CategoryCreate":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"taxonomy_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Taxonomy Id"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryCreate"},"type":"array","title":"Subcategories","description":"List of subcategories to create under this category"}},"additionalProperties":false,"type":"object","required":["name"],"title":"CategoryCreate","description":"Schema for creating a category, optionally with nested subcategories.\n\n- ``taxonomy_id`` is required for root categories and ignored when\n ``supercategory_id`` is provided (the parent's taxonomy is inherited).\n- ``supercategory_id`` is optional; when set the new category becomes a\n nested category under that parent."},"CategoryRead":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"taxonomy_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Taxonomy Id","description":"ID of the taxonomy"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"}},"type":"object","required":["name","id","taxonomy_id"],"title":"CategoryRead","description":"Schema for reading flat category information.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","supercategory_id":1,"taxonomy_id":1}]},"CategoryReadAsSubCategory":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","id"],"title":"CategoryReadAsSubCategory","description":"Schema for reading subcategory information.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals"}]},"CategoryReadAsSubCategoryWithRecursiveSubCategories":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryReadAsSubCategoryWithRecursiveSubCategories"},"type":"array","title":"Subcategories","description":"List of subcategories"}},"type":"object","required":["name","id"],"title":"CategoryReadAsSubCategoryWithRecursiveSubCategories","description":"Schema for reading category information with recursive subcategories.","examples":[{"description":"All kinds of metals","id":1,"name":"Metals","subcategories":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","subcategories":[{"description":"Steel alloys","id":3,"name":"Steel"}]}]}]},"CategoryReadWithRecursiveSubCategories":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"taxonomy_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Taxonomy Id","description":"ID of the taxonomy"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryReadAsSubCategoryWithRecursiveSubCategories"},"type":"array","title":"Subcategories","description":"List of subcategories"}},"type":"object","required":["name","id","taxonomy_id"],"title":"CategoryReadWithRecursiveSubCategories","description":"Schema for reading base category information with recursive subcategories.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","supercategory_id":1,"taxonomy_id":1}]},"CategoryReadWithRelationshipsAndFlatSubCategories":{"properties":{"name":{"type":"string","maxLength":250,"minLength":2,"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"ID of the category in the external taxonomy"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"taxonomy_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Taxonomy Id","description":"ID of the taxonomy"},"supercategory_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Supercategory Id"},"materials":{"items":{"$ref":"#/components/schemas/MaterialRead"},"type":"array","title":"Materials","description":"List of materials linked to the category"},"product_types":{"items":{"$ref":"#/components/schemas/ProductTypeRead"},"type":"array","title":"Product Types","description":"List of product types linked to the category"},"subcategories":{"items":{"$ref":"#/components/schemas/CategoryReadAsSubCategory"},"type":"array","title":"Subcategories","description":"List of subcategories"}},"type":"object","required":["name","id","taxonomy_id"],"title":"CategoryReadWithRelationshipsAndFlatSubCategories","description":"Schema for reading category information with flat (one level deep) subcategories.","examples":[{"description":"Iron and its alloys","id":2,"name":"Ferrous metals","supercategory_id":1,"taxonomy_id":1}]},"CategoryScope":{"type":"string","enum":["products","components","all"],"title":"CategoryScope","description":"Which population a category breakdown counts.\n\nA product's category is its own ``product_type``, and every product carries\none -- including components. A laptop torn down into a PCB and a screw\ncontributes one product to \"Laptop\" and one component each to \"PCB\" and\n\"Screw\"; it contributes nothing to \"Laptop\" from its components. So the\npopulation being categorised has to be chosen explicitly:\n\n- ``PRODUCTS``: top-level products only (``parent_id IS NULL``) -- the\n things that were torn down.\n- ``COMPONENTS``: components only (``parent_id IS NOT NULL``) -- the parts\n extracted from them, categorised by the part's own type.\n- ``ALL``: both, categorised the same way."},"CategoryStat":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["name","count"],"title":"CategoryStat","description":"Count of products in a single category, within the requested scope."},"CategoryUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name","description":"Name of the category"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the category"}},"additionalProperties":false,"type":"object","title":"CategoryUpdate","description":"Schema for the partial update of a category.\n\nUpdating the parent_id or taxonomy_id is not allowed, as it greatly increases the risk\nfor self-referential loops and other inconsistencies.","examples":[{"description":"All kinds of metals","name":"Metals"}]},"CircularityPropertiesFields":{"properties":{"recyclability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Recyclability"},"disassemblability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Disassemblability"},"remanufacturability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Remanufacturability"}},"additionalProperties":false,"type":"object","title":"CircularityPropertiesFields","description":"Circularity note fields read from a product JSON object."},"CircularityPropertiesInputFields":{"properties":{"recyclability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Recyclability"},"disassemblability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Disassemblability"},"remanufacturability":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Remanufacturability"}},"additionalProperties":false,"type":"object","title":"CircularityPropertiesInputFields","description":"Write-side circularity note fields with user-text validation."},"ComponentCreateWithComponents":{"properties":{"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesInputFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"type":"array","maxItems":100,"title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"amount_in_parent":{"type":"integer","maximum":1000.0,"exclusiveMinimum":0.0,"title":"Amount In Parent","description":"Quantity within parent product. Required for component products."},"components":{"items":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"type":"array","maxItems":100,"title":"Components","description":"Set of component products"}},"additionalProperties":false,"type":"object","required":["name","amount_in_parent"],"title":"ComponentCreateWithComponents","description":"Schema for creating a component with optional sub-components.\n\nThis schema is used for recursive creation of components with sub-components.\n\nOwner ID and parent ID are inferred from the parent product within the CRUD layer."},"ComponentExportRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"components":{"items":{"$ref":"#/components/schemas/ComponentExportRead"},"type":"array","title":"Components","description":"List of sub-components"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentExportRead","description":"Component in a product export: the detail read plus every sub-component."},"ComponentRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentRead","description":"Read schema for components (nested inside a base product tree)."},"ComponentReadWithRecursiveComponents":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"components":{"items":{"$ref":"#/components/schemas/ComponentReadWithRecursiveComponents"},"type":"array","title":"Components","description":"List of component products"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentReadWithRecursiveComponents","description":"Component read schema with recursive sub-components."},"ComponentReadWithRelationshipsAndFlatComponents":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"amount_in_parent":{"type":"integer","title":"Amount In Parent","description":"Quantity within parent product"},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"components":{"items":{"$ref":"#/components/schemas/ComponentRead"},"type":"array","title":"Components","description":"List of sub-components"}},"type":"object","required":["name","id","parent_id","amount_in_parent"],"title":"ComponentReadWithRelationshipsAndFlatComponents","description":"Component detail schema with one level of child components."},"DeviceImageUploadAck":{"properties":{"image_id":{"type":"string","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9._~-]+$","title":"Image Id","description":"Stored backend image ID."},"image_url":{"type":"string","maxLength":2048,"minLength":1,"pattern":"^(https?://[^\\s]+|/([^\\s/][^\\s]*)?)$","title":"Image Url","description":"Backend-hosted URL for the stored image"}},"type":"object","required":["image_id","image_url"],"title":"DeviceImageUploadAck","description":"Backend -> Pi acknowledgement of a direct image upload."},"DevicePreviewThumbnailAck":{"properties":{"preview_thumbnail_url":{"type":"string","maxLength":2048,"minLength":1,"pattern":"^(https?://[^\\s]+|/([^\\s/][^\\s]*)?)$","title":"Preview Thumbnail Url","description":"Backend-hosted URL for the cached preview thumbnail"}},"type":"object","required":["preview_thumbnail_url"],"title":"DevicePreviewThumbnailAck","description":"Backend -> Pi acknowledgement of a cached preview-thumbnail upload."},"DevicePublicKeyJWK":{"properties":{"kty":{"type":"string","pattern":"^(EC|OKP)$","title":"Kty"},"crv":{"type":"string","pattern":"^(P-256|Ed25519)$","title":"Crv"},"x":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"X"},"y":{"anyOf":[{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$"},{"type":"null"}],"title":"Y"},"alg":{"anyOf":[{"type":"string","enum":["ES256","EdDSA"]},{"type":"null"}],"title":"Alg"},"use":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Use"},"kid":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Kid"}},"additionalProperties":false,"type":"object","required":["kty","crv","x"],"title":"DevicePublicKeyJWK","description":"Public JWK registered by the Pi during pairing: EC P-256 (ES256) or OKP Ed25519 (EdDSA).\n\n``alg`` is optional, as in RFC 7517: ``kty`` and ``crv`` already fix the algorithm."},"EmailValidationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"EmailValidationRequest","description":"Body for the pre-registration email validation check."},"ErasureContent":{"type":"string","enum":["anonymize","delete"]},"ErrorModel":{"properties":{"detail":{"anyOf":[{"type":"string"},{"additionalProperties":{"type":"string"},"type":"object"}],"title":"Detail"}},"type":"object","required":["detail"],"title":"ErrorModel"},"FileRead":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id","description":"ID of the parent object"},"parent_type":{"$ref":"#/components/schemas/MediaParentType","description":"Type of the parent object, e.g. product, product_type, material"}},"type":"object","required":["id","filename","parent_id","parent_type"],"title":"FileRead","description":"Schema for reading file information.","examples":[{"description":"Assembly manual PDF","file_url":"/uploads/files/manuals/manual.pdf","filename":"manual.pdf","id":"12345678-cc4e-405c-8553-7806424de2a1"}]},"FileReadWithinParent":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"}},"type":"object","required":["id","filename"],"title":"FileReadWithinParent","description":"Schema for reading file information within a parent object.","examples":[{"description":"Assembly manual PDF","file_url":"/uploads/files/manuals/manual.pdf","filename":"manual.pdf","id":"12345678-cc4e-405c-8553-7806424de2a1"}]},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HttpUrlToDB":{"type":"string","maxLength":250,"minLength":1,"format":"uri"},"ImageRead":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Image Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"width_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width Px","description":"Pixel width of the stored image, after any EXIF rotation. Null for images uploaded before dimensions were recorded whose file could not be measured since, which includes every remotely stored (S3) one. With `height_px` this gives the aspect ratio every entry in `thumbnail_urls` shares, so a client can reserve layout space before the image loads and derive each derivative's height from its width."},"height_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height Px","description":"Pixel height of the stored image, after rotation."},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"parent_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Parent Id"},"parent_type":{"$ref":"#/components/schemas/MediaParentType","description":"Type of the parent object, e.g. product, product_type, material"}},"type":"object","required":["id","filename","parent_id","parent_type"],"title":"ImageRead","description":"Schema for reading image information.","examples":[{"description":"Front view of the product","filename":"front-view.webp","id":"12345678-cc4e-405c-8553-7806424de2a1","image_metadata":{"camera_make":"Raspberry Pi","orientation":"landscape"},"image_url":"/uploads/images/products/front-view.webp","thumbnail_url":"/uploads/images/products/front-view_thumb_200.webp"}]},"ImageReadWithinParent":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"image_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Image Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","format":"uuid4","title":"Id"},"filename":{"type":"string","title":"Filename"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"width_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width Px","description":"Pixel width of the stored image, after any EXIF rotation. Null for images uploaded before dimensions were recorded whose file could not be measured since, which includes every remotely stored (S3) one. With `height_px` this gives the aspect ratio every entry in `thumbnail_urls` shares, so a client can reserve layout space before the image loads and derive each derivative's height from its width."},"height_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height Px","description":"Pixel height of the stored image, after rotation."},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."}},"type":"object","required":["id","filename"],"title":"ImageReadWithinParent","description":"Schema for reading image information within a parent object.","examples":[{"description":"Front view of the product","filename":"front-view.webp","id":"12345678-cc4e-405c-8553-7806424de2a1","image_metadata":{"camera_make":"Raspberry Pi","orientation":"landscape"},"image_url":"/uploads/images/products/front-view.webp","thumbnail_url":"/uploads/images/products/front-view_thumb_200.webp"}]},"Links":{"properties":{"first":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First","examples":["/api/v1/users?limit=1&offset1"]},"last":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last","examples":["/api/v1/users?limit=1&offset1"]},"self":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Self","examples":["/api/v1/users?limit=1&offset1"]},"next":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next","examples":["/api/v1/users?limit=1&offset1"]},"prev":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev","examples":["/api/v1/users?limit=1&offset1"]}},"type":"object","title":"Links"},"LocalAccessInfo":{"properties":{"local_api_key":{"type":"string","maxLength":256,"minLength":8,"title":"Local Api Key"},"candidate_urls":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","maxItems":16,"minItems":1,"title":"Candidate Urls"},"mdns_name":{"anyOf":[{"type":"string","maxLength":253,"pattern":"^[A-Za-z0-9.-]+$"},{"type":"null"}],"title":"Mdns Name"}},"additionalProperties":false,"type":"object","required":["local_api_key","candidate_urls"],"title":"LocalAccessInfo","description":"Plugin -> backend -> frontend local direct-connection bootstrap payload."},"MaterialCreateWithCategories":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3"},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm"},"category_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Category Ids","description":"List of category IDs"}},"additionalProperties":false,"type":"object","required":["name"],"title":"MaterialCreateWithCategories","description":"Schema for creating a material with links to existing categories."},"MaterialProductLinkCreateWithinProduct":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"},"material_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Material Id","description":"ID of the material in the product"}},"additionalProperties":false,"type":"object","required":["quantity","material_id"],"title":"MaterialProductLinkCreateWithinProduct","description":"Schema for creating material-product links from the product side."},"MaterialProductLinkCreateWithinProductAndMaterial":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"}},"additionalProperties":false,"type":"object","required":["quantity"],"title":"MaterialProductLinkCreateWithinProductAndMaterial","description":"Schema for creating material-product links with an external material ID."},"MaterialProductLinkReadWithinMaterial":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id"},"product":{"$ref":"#/components/schemas/ProductSummary"}},"type":"object","required":["quantity","product_id","product"],"title":"MaterialProductLinkReadWithinMaterial","description":"Schema for reading material-product links from the material side."},"MaterialProductLinkReadWithinProduct":{"properties":{"quantity":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity","description":"Quantity of the material in the product"},"unit":{"$ref":"#/components/schemas/Unit","description":"Unit of the quantity, e.g. kg, g, m","default":"kg"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"material_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Material Id"},"material":{"$ref":"#/components/schemas/MaterialRead"}},"type":"object","required":["quantity","material_id","material"],"title":"MaterialProductLinkReadWithinProduct","description":"Schema for reading material-product links from the product side."},"MaterialProductLinkUpdate":{"properties":{"quantity":{"anyOf":[{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Quantity"},"unit":{"anyOf":[{"$ref":"#/components/schemas/Unit"},{"type":"null"}],"default":"kg"}},"additionalProperties":false,"type":"object","title":"MaterialProductLinkUpdate","description":"Schema for updating material-product links."},"MaterialRead":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Material"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Material"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source","description":"Source of the material data, e.g. URL, IRI or citation key"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3","description":"Volumetric density (kg/m^3)"},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm","description":"Is this material a Critical Raw Material (CRM)?"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","id"],"title":"MaterialRead","description":"Schema for reading material information."},"MaterialReadWithRelationships":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Material"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Material"},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Source","description":"Source of the material data, e.g. URL, IRI or citation key"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3","description":"Volumetric density (kg/m^3)"},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm","description":"Is this material a Critical Raw Material (CRM)?"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"categories":{"items":{"$ref":"#/components/schemas/CategoryRead"},"type":"array","title":"Categories","description":"List of categories linked to the material"},"product_links":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinMaterial"},"type":"array","title":"Product Links","description":"List of products that have this material"},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"List of images for the material"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"List of files for the material"}},"type":"object","required":["name","id"],"title":"MaterialReadWithRelationships","description":"Schema for reading material information with all relationships."},"MaterialUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"source":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Source","description":"Source of the material data, e.g. URL, IRI or citation key"},"density_kg_m3":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Density Kg M3","description":"Volumetric density (kg/m\u00b3) "},"is_crm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Crm","description":"Is this material a Critical Raw Material (CRM)?"}},"additionalProperties":false,"type":"object","title":"MaterialUpdate","description":"Schema for a partial update of a material."},"MediaParentType":{"type":"string","enum":["product","product_type","material"],"title":"MediaParentType","description":"Parent entity types that can own files and images."},"MfaChallengeRequest":{"properties":{"mfa_token":{"type":"string","format":"password","title":"Mfa Token","writeOnly":true},"code":{"type":"string","maxLength":20,"minLength":6,"title":"Code"}},"additionalProperties":false,"type":"object","required":["mfa_token","code"],"title":"MfaChallengeRequest","description":"Request to complete MFA with either a TOTP code or a recovery code."},"MfaOAuthClaimRequest":{"properties":{"mfa_handoff":{"type":"string","format":"password","title":"Mfa Handoff","writeOnly":true}},"additionalProperties":false,"type":"object","required":["mfa_handoff"],"title":"MfaOAuthClaimRequest","description":"Request to claim an OAuth MFA handoff."},"MfaPendingResponse":{"properties":{"mfa_required":{"type":"boolean","title":"Mfa Required","default":true},"mfa_token":{"type":"string","title":"Mfa Token","description":"Short-lived token for completing an MFA challenge"}},"type":"object","required":["mfa_token"],"title":"MfaPendingResponse","description":"Response returned after the first authentication factor succeeds."},"MfaRecoveryCodesRegenerateRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"title":"Code"}},"additionalProperties":false,"type":"object","required":["code"],"title":"MfaRecoveryCodesRegenerateRequest","description":"Request to reissue recovery codes, confirmed with a current TOTP code."},"MfaRecoveryCodesResponse":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes"}},"type":"object","required":["recovery_codes"],"title":"MfaRecoveryCodesResponse","description":"One-time delivery of freshly generated recovery codes."},"MfaTotpConfirmRequest":{"properties":{"setup_token":{"type":"string","format":"password","title":"Setup Token","writeOnly":true},"code":{"type":"string","maxLength":6,"minLength":6,"title":"Code"},"password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Password","description":"Current account password, to reauthenticate the change. Required unless the account has no usable password (OAuth-only)."}},"additionalProperties":false,"type":"object","required":["setup_token","code"],"title":"MfaTotpConfirmRequest","description":"Request to confirm authenticated TOTP setup."},"MfaTotpConfirmResponse":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes"},"tokens":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenResponse"},{"type":"null"}],"description":"New bearer tokens; null for browser sessions, which get new cookies instead"}},"type":"object","required":["recovery_codes"],"title":"MfaTotpConfirmResponse","description":"Recovery codes plus the session that replaces the ones enrolment revoked."},"MfaTotpDisableRequest":{"properties":{"code":{"type":"string","maxLength":20,"minLength":6,"title":"Code"},"password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Password","description":"Current account password, to reauthenticate the change. Required unless the account has no usable password (OAuth-only)."}},"additionalProperties":false,"type":"object","required":["code"],"title":"MfaTotpDisableRequest","description":"Request to turn off TOTP MFA, confirmed with the password and a current or recovery code."},"MfaTotpSetupResponse":{"properties":{"setup_token":{"type":"string","title":"Setup Token"},"secret":{"type":"string","title":"Secret"},"otpauth_uri":{"type":"string","title":"Otpauth Uri"}},"type":"object","required":["setup_token","secret","otpauth_uri"],"title":"MfaTotpSetupResponse","description":"TOTP setup material for authenticator apps."},"OAuth2AuthorizeResponse":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"OAuth2AuthorizeResponse","description":"Response model for OAuth2 authorization endpoint."},"OAuthAccountRead":{"properties":{"oauth_name":{"type":"string","title":"Oauth Name"},"account_id":{"type":"string","title":"Account Id"},"account_email":{"type":"string","title":"Account Email"}},"type":"object","required":["oauth_name","account_id","account_email"],"title":"OAuthAccountRead","description":"Read schema for OAuth accounts."},"Page_CameraRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CameraRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CameraRead]"},"Page_CategoryReadWithRecursiveSubCategories_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CategoryReadWithRecursiveSubCategories"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CategoryReadWithRecursiveSubCategories]"},"Page_CategoryReadWithRelationshipsAndFlatSubCategories_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CategoryReadWithRelationshipsAndFlatSubCategories"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CategoryReadWithRelationshipsAndFlatSubCategories]"},"Page_CategoryRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CategoryRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[CategoryRead]"},"Page_MaterialReadWithRelationships_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MaterialReadWithRelationships"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[MaterialReadWithRelationships]"},"Page_ProductTypeReadWithRelationships_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductTypeReadWithRelationships"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[ProductTypeReadWithRelationships]"},"Page_TaxonomyRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaxonomyRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[TaxonomyRead]"},"Page_TypeVar_Customized_ComponentRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ComponentRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[ComponentRead]"},"Page_TypeVar_Customized_FileReadWithinParent_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FileReadWithinParent"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[FileReadWithinParent]"},"Page_TypeVar_Customized_ImageReadWithinParent_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ImageReadWithinParent"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[ImageReadWithinParent]"},"Page_TypeVar_Customized_ProductRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[ProductRead]"},"Page_TypeVar_Customized_str_":{"properties":{"items":{"items":{"type":"string"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"links":{"$ref":"#/components/schemas/Links","readOnly":true}},"type":"object","required":["items","total","page","size","pages","links"],"title":"Page[TypeVar]Customized[str]"},"Page_UserRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserRead"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[UserRead]"},"PairingClaimRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"Pairing code displayed on the RPi's setup page."},"camera_name":{"type":"string","maxLength":100,"minLength":2,"title":"Camera Name","description":"Name for the new camera."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"type":"object","required":["code","camera_name"],"title":"PairingClaimRequest","description":"User -> backend: claim a pairing code and create a camera."},"PairingPollRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"Pairing code generated by the Pi."},"fingerprint":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]{8,64}$","title":"Fingerprint","description":"Random device fingerprint nonce chosen at registration."}},"type":"object","required":["code","fingerprint"],"title":"PairingPollRequest","description":"Pi -> backend: poll pairing status.\n\nSent as a POST body (not query params) so the pairing code and device\nfingerprint never land in reverse-proxy or uvicorn access logs."},"PairingPollResponse":{"properties":{"status":{"type":"string","enum":["waiting","paired"],"title":"Status"},"camera_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9._~-]+$"},{"type":"null"}],"title":"Camera Id"},"ws_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Ws Url"},"auth_scheme":{"anyOf":[{"$ref":"#/components/schemas/RelayAuthScheme"},{"type":"null"}]},"key_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9._~-]+$"},{"type":"null"}],"title":"Key Id"}},"additionalProperties":false,"type":"object","required":["status"],"title":"PairingPollResponse","description":"Backend -> Pi current pairing state."},"PairingRegisterRequest":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"6-character uppercase pairing code generated by the Pi."},"rpi_fingerprint":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]{8,64}$","title":"Rpi Fingerprint","description":"Random nonce generated by the Pi. Required to retrieve credentials later."},"public_key_jwk":{"$ref":"#/components/schemas/DevicePublicKeyJWK","description":"Public JWK (P-256 or Ed25519) generated by the Pi."},"key_id":{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9._~-]+$","title":"Key Id"}},"additionalProperties":false,"type":"object","required":["code","rpi_fingerprint","public_key_jwk","key_id"],"title":"PairingRegisterRequest","description":"Pi -> backend pairing registration payload."},"PairingRegisterResponse":{"properties":{"code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$","title":"Code","description":"6-character uppercase pairing code generated by the Pi."},"expires_in":{"type":"integer","maximum":600.0,"exclusiveMinimum":0.0,"title":"Expires In","description":"Seconds until the pairing code expires."}},"additionalProperties":false,"type":"object","required":["code","expires_in"],"title":"PairingRegisterResponse","description":"Backend -> Pi acknowledgement of a pairing registration."},"ProductCreateWithComponents":{"properties":{"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesInputFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkCreateWithinProduct"},"type":"array","maxItems":100,"title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"videos":{"items":{"$ref":"#/components/schemas/VideoCreateWithinProduct"},"type":"array","maxItems":5,"title":"Videos","description":"Disassembly videos"},"components":{"items":{"$ref":"#/components/schemas/ComponentCreateWithComponents"},"type":"array","maxItems":100,"title":"Components","description":"Set of component products"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ProductCreateWithComponents","description":"Schema for creating a base product with optional components.","examples":[{"bill_of_materials":[{"material_id":1,"quantity":0.3,"unit":"g"},{"material_id":2,"quantity":0.1,"unit":"g"}],"brand":"Brand 1","circularity_properties":{"disassemblability":"Most fasteners are visible and non-destructive to remove.","recyclability":"Metal frame and plastic shell can be separated with basic tools."},"depth_cm":50,"description":"Complete chair assembly","height_cm":150,"model":"Model 1","name":"Office Chair","product_type_id":1,"videos":[{"description":"Disassembly video","url":"https://www.youtube.com/watch?v=123456789"}],"weight_g":20000,"width_cm":70}]},"ProductExportRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"videos":{"items":{"$ref":"#/components/schemas/VideoReadWithinProduct"},"type":"array","title":"Videos","description":"Disassembly videos"},"components":{"items":{"$ref":"#/components/schemas/ComponentExportRead"},"type":"array","title":"Components","description":"List of component products"}},"type":"object","required":["name","id"],"title":"ProductExportRead","description":"Base product in a product export: the detail read plus its whole component tree."},"ProductFacetValue":{"properties":{"value":{"type":"string","title":"Value"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["value","count"],"title":"ProductFacetValue","description":"One derived product facet option and its result count."},"ProductRead":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"}},"type":"object","required":["name","id"],"title":"ProductRead","description":"Read schema for base products (top of a product tree)."},"ProductReadWithRelationshipsAndFlatComponents":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesFields"},{"type":"null"}]},"weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depth Cm"},"volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Cm3"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"version":{"type":"integer","exclusiveMinimum":0.0,"title":"Version","description":"Edit version. Send it quoted in `If-Match` (`\"3\"`) when updating this product or component.","default":1},"owner_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Owner Id"},"owner_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Username"},"product_type":{"anyOf":[{"$ref":"#/components/schemas/ProductTypeRead"},{"type":"null"}]},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images","description":"Product images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files","description":"Product files"},"bill_of_materials":{"items":{"$ref":"#/components/schemas/MaterialProductLinkReadWithinProduct"},"type":"array","title":"Bill Of Materials","description":"Bill of materials with quantities and units"},"videos":{"items":{"$ref":"#/components/schemas/VideoReadWithinProduct"},"type":"array","title":"Videos","description":"Disassembly videos"},"components":{"items":{"$ref":"#/components/schemas/ComponentRead"},"type":"array","title":"Components","description":"List of component products"}},"type":"object","required":["name","id"],"title":"ProductReadWithRelationshipsAndFlatComponents","description":"Base-product detail schema with one level of child components."},"ProductSummary":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"thumbnail_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"pattern":"^[1-9][0-9]*$"},"type":"object","title":"Thumbnail Urls","description":"Pre-computed thumbnail URLs keyed by width in pixels. Only widths that exist for this image are present: narrower originals yield fewer entries. Pick the width you render at rather than scaling `thumbnail_url`, which is always the smallest, list-sized one."},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"ProductSummary","description":"Minimal product summary for embedding in unrelated contexts (e.g. material links).\n\nDeliberately narrower than ``ProductRead``: no owner, physical/circularity\nproperties, or other detail-view fields since no consumer needs them here.\nExtend with more fields only when an actual caller needs them."},"ProductTypeCreateWithCategories":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"category_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Category Ids"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ProductTypeCreateWithCategories","description":"Schema for creating a product type with links to existing categories."},"ProductTypeRead":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Product Type."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Product Type."},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","id"],"title":"ProductTypeRead","description":"Schema for reading flat product type information."},"ProductTypeReadWithRelationships":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name","description":"Name of the Product Type."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the Product Type."},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"categories":{"items":{"$ref":"#/components/schemas/CategoryRead"},"type":"array","title":"Categories"},"images":{"items":{"$ref":"#/components/schemas/ImageRead"},"type":"array","title":"Images"},"files":{"items":{"$ref":"#/components/schemas/FileRead"},"type":"array","title":"Files"}},"type":"object","required":["name","id"],"title":"ProductTypeReadWithRelationships","description":"Schema for reading product type information with all relationships."},"ProductTypeUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"additionalProperties":false,"type":"object","title":"ProductTypeUpdate","description":"Schema for a partial update of a product type."},"ProductUpdate":{"properties":{"circularity_properties":{"anyOf":[{"$ref":"#/components/schemas/CircularityPropertiesInputFields"},{"type":"null"}]},"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"brand":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Brand"},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model"},"product_type_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Product Type Id"},"amount_in_parent":{"anyOf":[{"type":"integer","maximum":1000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount In Parent","description":"Quantity within parent product. Required for component products."},"weight_g":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Weight G"},"height_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Height Cm"},"width_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Width Cm"},"depth_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Depth Cm"}},"additionalProperties":false,"type":"object","title":"ProductUpdate","description":"Schema for updating product information including physical and circularity properties."},"ProfileVisibility":{"type":"string","enum":["public","community","private"],"title":"ProfileVisibility","description":"Discrete values stored on ``User.preferences[\"profile_visibility\"]``."},"PublicProfileView":{"properties":{"username":{"type":"string","pattern":"^[a-z0-9_]+$","title":"Username"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"product_count":{"type":"integer","title":"Product Count","description":"Number of products registered.","default":0},"total_weight_kg":{"type":"number","title":"Total Weight Kg","description":"Aggregate weight of products in kg.","default":0.0},"image_count":{"type":"integer","title":"Image Count","description":"Total images uploaded.","default":0},"top_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Category","description":"Most common product type."}},"type":"object","required":["username","created_at"],"title":"PublicProfileView","description":"Detailed public profile view with aggregated stats."},"RefreshTokenRequest":{"properties":{"refresh_token":{"type":"string","format":"password","title":"Refresh Token","description":"Refresh token obtained from login","writeOnly":true}},"additionalProperties":false,"type":"object","required":["refresh_token"],"title":"RefreshTokenRequest","description":"Request schema for refreshing access token.","examples":[{"refresh_token":"refresh-token-from-login"}]},"RefreshTokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token","description":"New JWT access token"},"refresh_token":{"type":"string","title":"Refresh Token","description":"Rotated refresh token"},"token_type":{"type":"string","title":"Token Type","description":"Token type (always 'bearer')","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","description":"Access token expiration time in seconds"}},"type":"object","required":["access_token","refresh_token","expires_in"],"title":"RefreshTokenResponse","description":"Response for token refresh.","examples":[{"access_token":"new-jwt-access-token","expires_in":3600,"refresh_token":"rotated-refresh-token","token_type":"bearer"}]},"RegistrationResponse":{"properties":{"detail":{"type":"string","title":"Detail","default":"If the email address is available, a verification link has been sent. Please check your inbox."}},"type":"object","title":"RegistrationResponse","description":"Uniform registration acknowledgement.\n\nDeliberately reveals nothing about whether the email already exists; the same\nbody is returned whether a new account was created or the address was already\ntaken, so registration cannot be used to enumerate accounts."},"RelayAuthScheme":{"type":"string","enum":["device_assertion"],"title":"RelayAuthScheme","description":"Authentication schemes understood by the device seam."},"RelayPublicKeyJWK":{"properties":{"kty":{"type":"string","pattern":"^(EC|OKP)$","title":"Kty"},"crv":{"type":"string","pattern":"^(P-256|Ed25519)$","title":"Crv"},"x":{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$","title":"X"},"y":{"anyOf":[{"type":"string","maxLength":64,"minLength":42,"pattern":"^[A-Za-z0-9_-]+$"},{"type":"null"}],"title":"Y"},"alg":{"anyOf":[{"type":"string","enum":["ES256","EdDSA"]},{"type":"null"}],"title":"Alg"},"use":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Use"},"kid":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Kid"}},"additionalProperties":false,"type":"object","required":["kty","crv","x"],"title":"RelayPublicKeyJWK","description":"Public JWK registered by an RPi camera: P-256 for ES256 or Ed25519 for EdDSA."},"SeriesPoint":{"properties":{"period":{"type":"string","title":"Period"},"teardowns":{"type":"integer","title":"Teardowns"},"parts":{"type":"integer","title":"Parts"},"mass_kg":{"type":"number","title":"Mass Kg"},"images":{"type":"integer","title":"Images"},"users_new":{"type":"integer","title":"Users New"},"users_active":{"type":"integer","title":"Users Active"}},"type":"object","required":["period","teardowns","parts","mass_kg","images","users_new","users_active"],"title":"SeriesPoint","description":"Aggregated metrics for one period of a time series."},"SeriesResponse":{"properties":{"granularity":{"type":"string","title":"Granularity"},"start":{"type":"string","format":"date","title":"Start"},"end":{"type":"string","format":"date","title":"End"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"series":{"items":{"$ref":"#/components/schemas/SeriesPoint"},"type":"array","title":"Series"}},"type":"object","required":["granularity","start","end","generated_at","series"],"title":"SeriesResponse","description":"Response payload for the time-series endpoint."},"StepUpRequest":{"properties":{"current_password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Current Password","description":"Current account password, to reauthenticate the change. Required unless the account has no usable password (OAuth-only)."},"mfa_code":{"anyOf":[{"type":"string","maxLength":20,"minLength":6},{"type":"null"}],"title":"Mfa Code","description":"Current authenticator code or a recovery code. Required when the account has MFA enabled."}},"additionalProperties":false,"type":"object","title":"StepUpRequest","description":"Optional step-up body for a sensitive account change (social login link or unlink, account deletion).\n\nOptional because an OAuth-only account has no usable password to re-assert, and an\naccount without MFA has no code; the server decides which the account needs."},"StreamMetadata":{"properties":{"camera_properties":{"$ref":"#/components/schemas/CameraProperties"},"capture_metadata":{"$ref":"#/components/schemas/CaptureMetadata"},"fps":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Fps","description":"Frames per second calculated from frame duration.","readOnly":true}},"type":"object","required":["camera_properties","capture_metadata","fps"],"title":"StreamMetadata","description":"Metadata specific to video streams."},"StreamMode":{"type":"string","enum":["youtube"],"title":"StreamMode","description":"Active stream provider/mode."},"StreamView":{"properties":{"mode":{"$ref":"#/components/schemas/StreamMode"},"provider":{"type":"string","title":"Provider","description":"Stream provider identifier"},"url":{"type":"string","minLength":1,"format":"uri","title":"Url"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"metadata":{"$ref":"#/components/schemas/StreamMetadata"}},"type":"object","required":["mode","provider","url","started_at","metadata"],"title":"StreamView","description":"Provider-neutral public model for active stream information."},"TaxonomyCreateWithCategories":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"version":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"domains":{"items":{"$ref":"#/components/schemas/TaxonomyDomain"},"type":"array","uniqueItems":true,"title":"Domains","default":[]},"source":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Source"},"categories":{"items":{"$ref":"#/components/schemas/CategoryCreate"},"type":"array","title":"Categories","description":"Categories to create in this taxonomy"}},"additionalProperties":false,"type":"object","required":["name"],"title":"TaxonomyCreateWithCategories","description":"Schema for creating a new taxonomy, optionally with new categories."},"TaxonomyDomain":{"type":"string","enum":["materials","products","other"],"title":"TaxonomyDomain","description":"Enumeration of taxonomy domains."},"TaxonomyRead":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"version":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"domains":{"items":{"$ref":"#/components/schemas/TaxonomyDomain"},"type":"array","uniqueItems":true,"title":"Domains","description":"Domains of the taxonomy, e.g. {materials, products, other}"},"source":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Source","description":"Source of the taxonomy data, e.g. URL, IRI or citation key"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["name","version","domains","id"],"title":"TaxonomyRead","description":"Schema for reading minimal taxonomy information.","examples":[{"description":"Taxonomy for materials","domains":["materials"],"name":"Materials Taxonomy","source":"DOI:10.2345/12345"}]},"TaxonomyUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":50,"minLength":2},{"type":"null"}],"title":"Name"},"version":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"domains":{"anyOf":[{"items":{"$ref":"#/components/schemas/TaxonomyDomain"},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Domains","description":"Domains of the taxonomy, e.g. {materials, products, other}"},"source":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Source","description":"Source of the taxonomy data"}},"additionalProperties":false,"type":"object","title":"TaxonomyUpdate","description":"Schema for the partial update of a taxonomy."},"TelemetrySnapshot":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When this snapshot was collected."},"cpu_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Temp C","description":"CPU die temperature in Celsius; None if the sysfs reading is unavailable."},"cpu_percent":{"type":"number","title":"Cpu Percent","description":"CPU utilisation as a percentage (0-100)."},"mem_percent":{"type":"number","title":"Mem Percent","description":"Memory utilisation as a percentage (0-100)."},"disk_percent":{"type":"number","title":"Disk Percent","description":"Disk utilisation on the images volume as a percentage (0-100)."},"preview_fps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Preview Fps","description":"Observed preview encoder frame rate, or None if no preview pipeline is active."},"preview_sessions":{"type":"integer","title":"Preview Sessions","description":"Number of active LL-HLS preview subscribers on the local MediaMTX instance.","default":0},"thermal_state":{"$ref":"#/components/schemas/ThermalState","description":"Thermal governor classification for this snapshot."},"current_preview_size":{"anyOf":[{"prefixItems":[{"type":"integer"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Current Preview Size","description":"Current lores-stream size (width, height); None when no preview pipeline is configured."}},"type":"object","required":["timestamp","cpu_percent","mem_percent","disk_percent","thermal_state"],"title":"TelemetrySnapshot","description":"Point-in-time device health sample emitted by the Pi plugin."},"ThemeMode":{"type":"string","enum":["light","dark","auto"],"title":"ThemeMode","description":"Supported app theme modes."},"ThermalState":{"type":"string","enum":["normal","warm","throttle","critical"],"title":"ThermalState","description":"Coarse thermal classification used by the thermal governor."},"Totals":{"properties":{"teardowns":{"type":"integer","title":"Teardowns"},"parts":{"type":"integer","title":"Parts"},"mass_kg":{"type":"number","title":"Mass Kg"},"images":{"type":"integer","title":"Images"},"users":{"type":"integer","title":"Users"}},"type":"object","required":["teardowns","parts","mass_kg","images","users"],"title":"Totals","description":"System-wide cumulative counts across all data."},"TotalsResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"totals":{"$ref":"#/components/schemas/Totals"}},"type":"object","required":["generated_at","totals"],"title":"TotalsResponse","description":"Response payload for the totals endpoint."},"Unit":{"type":"string","enum":["kg","g","m","cm"],"title":"Unit","description":"Allowed units in the data collection."},"UserPreferences":{"properties":{"email_updates_enabled":{"type":"boolean","title":"Email Updates Enabled","default":false},"profile_visibility":{"$ref":"#/components/schemas/ProfileVisibility","default":"public"},"theme_mode":{"$ref":"#/components/schemas/ThemeMode","default":"auto"},"products_welcome_dismissed":{"type":"boolean","title":"Products Welcome Dismissed","default":false},"rpi_camera_enabled":{"type":"boolean","title":"Rpi Camera Enabled","default":false},"youtube_streaming_enabled":{"type":"boolean","title":"Youtube Streaming Enabled","default":false}},"additionalProperties":false,"type":"object","title":"UserPreferences","description":"Typed user preferences persisted as JSONB."},"UserPreferencesUpdate":{"properties":{"email_updates_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Updates Enabled"},"profile_visibility":{"anyOf":[{"$ref":"#/components/schemas/ProfileVisibility"},{"type":"null"}]},"theme_mode":{"anyOf":[{"$ref":"#/components/schemas/ThemeMode"},{"type":"null"}]},"products_welcome_dismissed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Products Welcome Dismissed"},"rpi_camera_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rpi Camera Enabled"},"youtube_streaming_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Youtube Streaming Enabled"}},"additionalProperties":false,"type":"object","title":"UserPreferencesUpdate","description":"Patch model for user preferences updates."},"UserRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_superuser":{"type":"boolean","title":"Is Superuser","default":false},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"oauth_accounts":{"items":{"$ref":"#/components/schemas/OAuthAccountRead"},"type":"array","title":"Oauth Accounts","description":"List of linked OAuth accounts."},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","description":"Whether TOTP MFA is enabled for this account.","default":false},"has_usable_password":{"type":"boolean","title":"Has Usable Password","description":"Whether the account has a user-set password (false for OAuth-only accounts). Clients use it to decide whether unlinking a social login needs a password.","default":true},"preferences":{"$ref":"#/components/schemas/UserPreferences","description":"User preferences."},"terms_accepted_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Terms Accepted Version","description":"Version of the contributor terms this account accepted at signup, or null if it predates acceptance tracking. Recorded by the server; not client-settable."},"terms_accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Terms Accepted At","description":"When the contributor terms were accepted. Recorded by the server; not client-settable."},"terms_acceptance_required":{"type":"boolean","title":"Terms Acceptance Required","description":"Whether this account should be prompted to accept the contributor terms. True when it has never accepted, or accepted a version older than the one that grants the publication licence a dataset release needs.","default":false},"role":{"$ref":"#/components/schemas/UserRole","description":"Contributor tier. `lab` accounts may upload non-image research files and carry a larger upload quota. Set by an administrator; not client-settable.","default":"contributor"},"upload_quota_files":{"type":"integer","title":"Upload Quota Files","description":"Maximum number of files and images this account's role allows.","default":0},"upload_quota_bytes":{"type":"integer","title":"Upload Quota Bytes","description":"Maximum total upload size this account's role allows.","default":0},"image_upload_max_bytes":{"type":"integer","title":"Image Upload Max Bytes","description":"Largest single image this account may upload.","default":0},"image_upload_max_pixels":{"type":"integer","title":"Image Upload Max Pixels","description":"Most pixels (width x height) in a single image this account may upload.","default":0},"upload_file_count":{"type":"integer","title":"Upload File Count","description":"Files and images this account currently has stored.","default":0},"upload_total_bytes":{"type":"integer","title":"Upload Total Bytes","description":"Total bytes this account currently has stored.","default":0}},"type":"object","required":["id","email"],"title":"UserRead","description":"Read schema for users.","examples":[{"email":"user@example.com","id":"1fa85f64-5717-4562-b3fc-2c963f66afa6","is_active":true,"is_superuser":false,"is_verified":true,"username":"username"}]},"UserRegister":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":12,"format":"password","title":"Password"},"username":{"type":"string","maxLength":50,"minLength":2,"title":"Username"}},"additionalProperties":false,"type":"object","required":["email","password","username"],"title":"UserRegister","description":"Registration schema for password sign-up.","examples":[{"email":"user@example.com","password":"fake_password","username":"username"}]},"UserRole":{"type":"string","enum":["contributor","lab"],"title":"UserRole","description":"Ordered contributor tiers. Compare with :func:`role_rank`, not ``<``."},"UserRoleUpdate":{"properties":{"role":{"$ref":"#/components/schemas/UserRole","description":"The contributor tier to assign."}},"additionalProperties":false,"type":"object","required":["role"],"title":"UserRoleUpdate","description":"Administrator request to set one account's contributor tier."},"UserUpdate":{"properties":{"password":{"anyOf":[{"type":"string","minLength":12},{"type":"null"}],"format":"password","title":"Password"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"username":{"anyOf":[{"type":"string","maxLength":50,"minLength":2},{"type":"null"}],"title":"Username"},"current_password":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"format":"password","title":"Current Password","description":"Current password required when changing email or password."},"mfa_code":{"anyOf":[{"type":"string","maxLength":20,"minLength":6},{"type":"null"}],"title":"Mfa Code","description":"Current authenticator code or a recovery code. Required to change email or password when the account has MFA enabled."},"preferences":{"anyOf":[{"$ref":"#/components/schemas/UserPreferencesUpdate"},{"type":"null"}],"description":"User preferences (partial merge)."}},"additionalProperties":false,"type":"object","title":"UserUpdate","description":"Update schema for users.","examples":[{"email":"user@example.com","password":"newpassword","username":"username"}]},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VideoCreateWithinProduct":{"properties":{"url":{"$ref":"#/components/schemas/HttpUrlToDB"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata"}},"additionalProperties":false,"type":"object","required":["url"],"title":"VideoCreateWithinProduct","description":"Schema for creating a video.","examples":[{"description":"Recorded teardown of the product","title":"Full disassembly","url":"https://www.youtube.com/watch?v=abcdefghijk","video_metadata":{"duration_seconds":420,"source":"youtube"}}]},"VideoRead":{"properties":{"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"},"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id"}},"type":"object","required":["url","id","product_id"],"title":"VideoRead","description":"Schema for reading video information."},"VideoReadWithinProduct":{"properties":{"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["url","id"],"title":"VideoReadWithinProduct","description":"Schema for reading video information within a product.","examples":[{"description":"Recorded teardown of the product","id":1,"title":"Full disassembly","url":"https://www.youtube.com/watch?v=abcdefghijk","video_metadata":{"duration_seconds":420,"source":"youtube"}}]},"VideoUpdateWithinProduct":{"properties":{"url":{"anyOf":[{"$ref":"#/components/schemas/HttpUrlToDB"},{"type":"null"}],"description":"URL linking to the video"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title","description":"Title of the video"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of the video"},"video_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Video Metadata","description":"Video metadata as a JSON dict"}},"additionalProperties":false,"type":"object","title":"VideoUpdateWithinProduct","description":"Schema for updating a video within a product.","examples":[{"description":"Shortened version for publication","title":"Updated disassembly title","video_metadata":{"edited":true}}]},"YouTubeMonitorStreamResponse":{"properties":{"enableMonitorStream":{"type":"boolean","title":"Enablemonitorstream"},"broadcastStreamDelayMs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Broadcaststreamdelayms"},"embedHtml":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedhtml"}},"type":"object","required":["enableMonitorStream"],"title":"YouTubeMonitorStreamResponse","description":"Subset of monitor stream fields used by the app."},"YouTubePrivacyStatus":{"type":"string","enum":["public","private","unlisted"],"title":"YouTubePrivacyStatus","description":"Enumeration of YouTube privacy statuses."}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/v1/auth/bearer/login"}}},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"__Host-r9lab-auth"}}},"x-tagGroups":[{"name":"Auth","tags":["auth","users"]},{"name":"Reference Data","tags":["categories","taxonomies","materials","product-types"]},{"name":"Data Collection","tags":["products"]},{"name":"Plugins","tags":["r9cam-management","r9cam-interaction"]},{"name":"Admin","tags":["admin"]}]} diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 13f53f588..d3b489286 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -37,7 +37,7 @@ "sqlalchemy>=2.0.41", # Shared application models and outbound integrations "httpx[http2]>=0.28.1", - "r9cam-models>=0.6.0,<0.7", + "r9cam-models>=0.7.0,<0.8", # Configuration, validation, and utility types # 2.14.0 and 2.14.1 cannot pickle parametrized generics such as the cached Page # responses (pydantic#13991); drop the exclusion once 2.14.2 ships the fix. diff --git a/backend/tests/unit/plugins/r9cam/test_pairing_router.py b/backend/tests/unit/plugins/r9cam/test_pairing_router.py index cb30efca0..449da8e71 100644 --- a/backend/tests/unit/plugins/r9cam/test_pairing_router.py +++ b/backend/tests/unit/plugins/r9cam/test_pairing_router.py @@ -33,6 +33,13 @@ "y": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", "kid": "key-12345", } +ED25519_JWK = { + "kty": "OKP", + "crv": "Ed25519", + "x": "11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo", + "alg": "EdDSA", + "kid": "key-12345", +} KEY_ID = "key-12345" PAIRING_CODE = "ABCD23" PAIRING_LOG_ID = rate_limit_bucket_key("r9cam:pairing", PAIRING_CODE) @@ -385,3 +392,18 @@ async def test_poll_pairing_status_reads_body_and_logs_digest(redis_client: Redi mock_logger.info.assert_called_once_with("Pairing credentials retrieved for code %s.", PAIRING_LOG_ID) assert PAIRING_CODE not in mock_logger.info.call_args.args[1] assert await redis_client.get(f"r9cam:pairing:{PAIRING_CODE}") is None + + +async def test_register_pairing_code_accepts_an_ed25519_key(redis_client: Redis) -> None: + """A Pi that pairs with an Ed25519 key (r9cam 0.8 default) registers like a P-256 one.""" + body = PairingRegisterRequest( + code=PAIRING_CODE, + rpi_fingerprint="fingerprint", + public_key_jwk=ED25519_JWK, + key_id=KEY_ID, + ) + + await register_pairing_code(body=body, redis=redis_client) + + stored = json.loads(await redis_client.get(f"r9cam:pairing:{PAIRING_CODE}")) + assert stored["public_key_jwk"] == ED25519_JWK diff --git a/backend/uv.lock b/backend/uv.lock index e98d9f3d2..a5c2affc1 100644 --- a/backend/uv.lock +++ b/backend/uv.lock @@ -2472,14 +2472,14 @@ wheels = [ [[package]] name = "r9cam-models" -version = "0.6.0" +version = "0.7.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pydantic" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ff/07/5d65f56679dfec3f0f844b7cec4320ea47148457fd20f55e7010428741de/r9cam_models-0.6.0.tar.gz", hash = "sha256:331d7cdeacd0cbaec36ff50b5041c8e14c915ca455d5d1d9c19df23b2a02a422", size = 13701, upload-time = "2026-10-13T14:14:15.083Z" } +sdist = { url = "https://files.pythonhosted.org/packages/3e/1c/a838df3f7cb04ad61c99046476cad5ac3bf7d770952a853c2832c4efa9af/r9cam_models-0.7.0.tar.gz", hash = "sha256:d5e33a82ac766c63e656cbff857bf71ddbff7d6748d6c88c586a7b6b625ebba8", size = 14729, upload-time = "2026-11-15T18:03:08.906Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/97/1a/1c820155b000703f5243ef85a9ea82163c6a7f766fea4cf83c767c712d26/r9cam_models-0.6.0-py3-none-any.whl", hash = "sha256:3866c8a5f233eb3e60a90f621eb1db9e424edfee1ac994ab7dda346909ca1b3d", size = 15886, upload-time = "2026-10-13T14:14:13.809Z" }, + { url = "https://files.pythonhosted.org/packages/68/29/c419eb264ffddecde1b42812167354c53b35c7bf28cbcd7bc1072485e565/r9cam_models-0.7.0-py3-none-any.whl", hash = "sha256:4d0136eb394b7ddd8c9d390a74b184bda9ca63a58f1ea04ad97f6cea5bf9126e", size = 16932, upload-time = "2026-11-15T18:03:07.597Z" }, ] [[package]] @@ -2594,7 +2594,7 @@ requires-dist = [ { name = "pyjwt", extras = ["crypto"], specifier = ">=2.12.1" }, { name = "pyotp", specifier = ">=2.9.0" }, { name = "python-json-logger", specifier = ">=4.1.0" }, - { name = "r9cam-models", specifier = ">=0.6.0,<0.7" }, + { name = "r9cam-models", specifier = ">=0.7.0,<0.8" }, { name = "redis", specifier = ">=5.2.1" }, { name = "sqlalchemy", specifier = ">=2.0.41" }, { name = "uvicorn", extras = ["standard"], specifier = ">=0.42.0" }, diff --git a/docs/public/api/schemas/openapi.device.json b/docs/public/api/schemas/openapi.device.json index aebb94c06..c7203d6e7 100644 --- a/docs/public/api/schemas/openapi.device.json +++ b/docs/public/api/schemas/openapi.device.json @@ -44,7 +44,6 @@ "type": "object" }, "DeviceImageUploadAck": { - "additionalProperties": false, "description": "Backend -> Pi acknowledgement of a direct image upload.", "properties": { "image_id": { @@ -72,7 +71,6 @@ "type": "object" }, "DevicePreviewThumbnailAck": { - "additionalProperties": false, "description": "Backend -> Pi acknowledgement of a cached preview-thumbnail upload.", "properties": { "preview_thumbnail_url": { @@ -92,10 +90,25 @@ }, "DevicePublicKeyJWK": { "additionalProperties": false, - "description": "Public P-256 JWK registered by the Pi during pairing.", + "description": "Public JWK registered by the Pi during pairing: EC P-256 (ES256) or OKP Ed25519 (EdDSA).\n\n``alg`` is optional, as in RFC 7517: ``kty`` and ``crv`` already fix the algorithm.", "properties": { + "alg": { + "anyOf": [ + { + "enum": [ + "ES256", + "EdDSA" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Alg" + }, "crv": { - "pattern": "^P-256$", + "pattern": "^(P-256|Ed25519)$", "title": "Crv", "type": "string" }, @@ -112,7 +125,7 @@ "title": "Kid" }, "kty": { - "pattern": "^EC$", + "pattern": "^(EC|OKP)$", "title": "Kty", "type": "string" }, @@ -136,18 +149,24 @@ "type": "string" }, "y": { - "maxLength": 64, - "minLength": 42, - "pattern": "^[A-Za-z0-9_-]+$", - "title": "Y", - "type": "string" + "anyOf": [ + { + "maxLength": 64, + "minLength": 42, + "pattern": "^[A-Za-z0-9_-]+$", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Y" } }, "required": [ "kty", "crv", - "x", - "y" + "x" ], "title": "DevicePublicKeyJWK", "type": "object" @@ -284,7 +303,7 @@ }, "public_key_jwk": { "$ref": "#/components/schemas/DevicePublicKeyJWK", - "description": "Public P-256 JWK generated by the Pi." + "description": "Public JWK (P-256 or Ed25519) generated by the Pi." }, "rpi_fingerprint": { "description": "Random nonce generated by the Pi. Required to retrieve credentials later.", diff --git a/docs/public/api/schemas/openapi.public.json b/docs/public/api/schemas/openapi.public.json index a102d8469..f9a34e2c5 100644 --- a/docs/public/api/schemas/openapi.public.json +++ b/docs/public/api/schemas/openapi.public.json @@ -843,6 +843,28 @@ ], "title": "Analogue Gain" }, + "color_gains": { + "anyOf": [ + { + "maxItems": 2, + "minItems": 2, + "prefixItems": [ + { + "type": "number" + }, + { + "type": "number" + } + ], + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Red and blue white-balance gains", + "title": "Color Gains" + }, "color_temperature": { "anyOf": [ { @@ -893,6 +915,18 @@ "description": "Frame duration in microseconds", "title": "Frame Duration" }, + "lens_position": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Lens focus position in dioptres", + "title": "Lens Position" + }, "lux": { "anyOf": [ { @@ -906,6 +940,34 @@ "description": "Illuminance in lux", "title": "Lux" }, + "scaler_crop": { + "anyOf": [ + { + "maxItems": 4, + "minItems": 4, + "prefixItems": [ + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Sensor area read for the image as x, y, width, height in sensor pixels", + "title": "Scaler Crop" + }, "sensor_temperature": { "anyOf": [ { @@ -5548,8 +5610,23 @@ "additionalProperties": false, "description": "Public JWK registered by an RPi camera: P-256 for ES256 or Ed25519 for EdDSA.", "properties": { + "alg": { + "anyOf": [ + { + "enum": [ + "ES256", + "EdDSA" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Alg" + }, "crv": { - "pattern": "^P-256$", + "pattern": "^(P-256|Ed25519)$", "title": "Crv", "type": "string" }, @@ -5566,7 +5643,7 @@ "title": "Kid" }, "kty": { - "pattern": "^EC$", + "pattern": "^(EC|OKP)$", "title": "Kty", "type": "string" }, @@ -5590,18 +5667,24 @@ "type": "string" }, "y": { - "maxLength": 64, - "minLength": 42, - "pattern": "^[A-Za-z0-9_-]+$", - "title": "Y", - "type": "string" + "anyOf": [ + { + "maxLength": 64, + "minLength": 42, + "pattern": "^[A-Za-z0-9_-]+$", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Y" } }, "required": [ "kty", "crv", - "x", - "y" + "x" ], "title": "RelayPublicKeyJWK", "type": "object" From ca23578c79d6eb1bd781f03b8533754254e2d09e Mon Sep 17 00:00:00 2001 From: Simon van Lierde <90462640+simonvanlierde@users.noreply.github.com> Date: Sun, 15 Nov 2026 19:24:18 +0100 Subject: [PATCH 3/3] test(r9cam): build the CRUD test JWK with model_validate r9cam-models 0.7.0 types RelayPublicKeyJWK.alg as Literal["ES256", "EdDSA"], so unpacking a dict[str, str] into it fails ty with invalid-argument-type in backend/check. Signed-off-by: Simon van Lierde <90462640+simonvanlierde@users.noreply.github.com> --- backend/tests/integration/db/test_r9cam_crud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/tests/integration/db/test_r9cam_crud.py b/backend/tests/integration/db/test_r9cam_crud.py index 6235af245..00c16d70a 100644 --- a/backend/tests/integration/db/test_r9cam_crud.py +++ b/backend/tests/integration/db/test_r9cam_crud.py @@ -44,7 +44,7 @@ async def test_create_camera(db_session: AsyncSession, db_superuser: User) -> No camera_in = CameraCreate( name=TEST_CAMERA_NAME, description=TEST_CAMERA_DESC, - relay_public_key_jwk=RelayPublicKeyJWK(**PUBLIC_JWK), + relay_public_key_jwk=RelayPublicKeyJWK.model_validate(PUBLIC_JWK), relay_key_id=KEY_ID, )