{"openapi":"3.1.0","info":{"title":"Storefront API","description":"Offline-first Retail Management System Backend","version":"1.0.0"},"paths":{"/api/sync/pull":{"get":{"tags":["sync"],"summary":"Pull Deltas","description":"Returns a cursor-based delta for all synced tables, scoped to the current tenant.","operationId":"pull_deltas_api_sync_pull_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"since_ts","in":"query","required":false,"schema":{"type":"string","format":"date-time","default":"1970-01-01T00:00:00Z","title":"Since Ts"}},{"name":"since_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","default":"00000000-0000-0000-0000-000000000000","title":"Since Id"}},{"name":"tables","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tables"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"include_drift","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Drift"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sync/push":{"post":{"tags":["sync"],"summary":"Push Batch","description":"Accepts a batch of domain events from the client, processes them in order,\nand returns per-operation status.\n\nConcurrency model: one transaction per batch with a SAVEPOINT per op.\nA failed op rolls back to its savepoint; the rest of the batch keeps\ngoing. The single batch-level COMMIT replaces N per-op fsyncs (which\nwere the dominant cost — see docs/phase14R/perf-artifacts/\nb1-profile-findings.md).\n\nSafety-watermark contract: each batch must complete in < SAFETY_WINDOW\n(5s) so the pull endpoint's clock_timestamp() filter doesn't miss\nin-flight rows. At the default batch size (50) and observed p95 batch\nlatency (~650ms pre-tuning), the headroom is comfortable. If batch\nsize is raised significantly, add a wall-clock guard that commits\nearly when approaching the watermark.","operationId":"push_batch_api_sync_push_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushBatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/stores":{"get":{"tags":["stores"],"summary":"Get Store","description":"Retrieves the current store configuration based on the user's JWT store_id.","operationId":"get_store_api_stores_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/stores/{store_id}":{"get":{"tags":["stores"],"summary":"Get Store By Id","description":"Retrieves a specific store by its UUID, verifying access via current_store_id.","operationId":"get_store_by_id_api_stores__store_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Store Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["stores"],"summary":"Update Store","description":"Updates a specific store's configuration.\nPartial updates are allowed via the StoreUpdate schema.\nAdmin-only.","operationId":"update_store_api_stores__store_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Store Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["stores"],"summary":"Delete Store","description":"Soft-deletes a store. Admin-only.","operationId":"delete_store_api_stores__store_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Store Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inventory/products":{"post":{"tags":["inventory"],"summary":"Create Product","description":"Creates a new product in the catalog.","operationId":"create_product_api_inventory_products_post","security":[{"OAuth2PasswordBearer":[]}],"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/ProductCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["inventory"],"summary":"Get Products","description":"Retrieves all products in the catalog.","operationId":"get_products_api_inventory_products_get","security":[{"OAuth2PasswordBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductResponse"},"title":"Response Get Products Api Inventory Products Get"}}}}}}},"/api/inventory/products/{product_id}/metrics":{"get":{"tags":["inventory"],"summary":"Get Product Metrics","description":"Retrieves full metrics for a product including profit, sales velocity, and price history.","operationId":"get_product_metrics_api_inventory_products__product_id__metrics_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inventory/products/{product_id}":{"put":{"tags":["inventory"],"summary":"Update Product","description":"Updates an existing product. \nIf current_price is altered, appending to ProductPriceHistory is enforced.","operationId":"update_product_api_inventory_products__product_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","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/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inventory/batch-restock":{"post":{"tags":["inventory"],"summary":"Process Batch Restock","description":"Processes a batch of products to restock.\nSupports 'on-the-fly' creation if product_id is not provided but new_product_name is.","operationId":"process_batch_restock_api_inventory_batch_restock_post","security":[{"OAuth2PasswordBearer":[]}],"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/BatchRestockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inventory/batch-adjust":{"post":{"tags":["inventory"],"summary":"Process Batch Adjustment","description":"Creates a compensatory ledger entry for an earlier restock batch.","operationId":"process_batch_adjustment_api_inventory_batch_adjust_post","security":[{"OAuth2PasswordBearer":[]}],"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/BatchAdjustmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inventory/procurement/batches":{"get":{"tags":["inventory"],"summary":"Get Procurement Batches","description":"Retrieves all procurement batches ordered by latest.","operationId":"get_procurement_batches_api_inventory_procurement_batches_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BatchSummaryResponse"},"type":"array","title":"Response Get Procurement Batches Api Inventory Procurement Batches Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/inventory/procurement/batches/{batch_id}":{"get":{"tags":["inventory"],"summary":"Get Procurement Batch Detail","description":"Retrieves detail for a specific procurement batch including its items.","operationId":"get_procurement_batch_detail_api_inventory_procurement_batches__batch_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inventory/products/{product_id}/history":{"get":{"tags":["inventory"],"summary":"Get Product History","description":"Retrieves the full ledger history for a specific product.","operationId":"get_product_history_api_inventory_products__product_id__history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductHistoryResponse"},"title":"Response Get Product History Api Inventory Products  Product Id  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inventory/notifications":{"get":{"tags":["inventory"],"summary":"Get Notifications","description":"Retrieves all unresolved pricing notifications.","operationId":"get_notifications_api_inventory_notifications_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NotificationResponse"},"type":"array","title":"Response Get Notifications Api Inventory Notifications Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/inventory/notifications/{notification_id}/resolve":{"post":{"tags":["inventory"],"summary":"Resolve Notification","description":"Marks a pricing notification as resolved.","operationId":"resolve_notification_api_inventory_notifications__notification_id__resolve_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Notification Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inventory/products/{product_id}/audit-history":{"get":{"tags":["inventory"],"summary":"Get Product Audit History","description":"Retrieves chronological audit history for a product. Admin only.","operationId":"get_product_audit_history_api_inventory_products__product_id__audit_history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductAuditResponse"},"title":"Response Get Product Audit History Api Inventory Products  Product Id  Audit History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/summary":{"get":{"tags":["analytics"],"summary":"Get Dashboard Summary","description":"Retrieves high-level summary metrics spanning the entire catalog.\nUses scalable arithmetic: SUM((unit_price_at_sale - unit_cost_at_sale) * quantity).","operationId":"get_dashboard_summary_api_analytics_summary_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDashboardSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/teller-summary":{"get":{"tags":["analytics"],"summary":"Get Teller Dashboard Summary","description":"Retrieves visual dashboard metrics for tellers with profit fields isolated.\nEnforces a strict per-tenant historical calendar range via silent clamping.","operationId":"get_teller_dashboard_summary_api_analytics_teller_summary_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TellerDashboardSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/sales/timeline":{"get":{"tags":["analytics"],"summary":"Get Sales Timeline","description":"Retrieves time-series data for Recharts grouping by 'day', 'week', or 'month'.\nCalculates profit securely without ledger joins. Gated to admins.","operationId":"get_sales_timeline_api_analytics_sales_timeline_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"interval","in":"query","required":false,"schema":{"type":"string","default":"day","title":"Interval"}},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Product Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SalesTimelineItem"},"title":"Response Get Sales Timeline Api Analytics Sales Timeline Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/product-performance":{"get":{"tags":["analytics"],"summary":"Get Product Performance","description":"Retrieves a leaderboard of all active products sorted by total profit generated. Gated to admins.","operationId":"get_product_performance_api_analytics_product_performance_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductPerformanceItem"},"title":"Response Get Product Performance Api Analytics Product Performance Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/period-report":{"get":{"tags":["analytics"],"summary":"Get Admin Period Report","operationId":"get_admin_period_report_api_analytics_period_report_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPeriodReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/teller-period-report":{"get":{"tags":["analytics"],"summary":"Get Teller Period Report","operationId":"get_teller_period_report_api_analytics_teller_period_report_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TellerPeriodReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/sales/{sale_id}/history":{"get":{"tags":["analytics"],"summary":"Get Sale History","operationId":"get_sale_history_api_analytics_sales__sale_id__history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"sale_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sale Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"tags":["Authentication"],"summary":"Login For Access Token","operationId":"login_for_access_token_api_auth_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_for_access_token_api_auth_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/register":{"post":{"tags":["Authentication"],"summary":"Register","operationId":"register_api_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/verify-otp":{"post":{"tags":["Authentication"],"summary":"Verify Otp","description":"Validates the 6-digit PIN and activates the user.\nUses stateful rate limiting to prevent brute force.","operationId":"verify_otp_api_auth_verify_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOTPRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/forgot-password":{"post":{"tags":["Authentication"],"summary":"Forgot Password","description":"Request a password reset link. Always returns 200 with a generic message\nregardless of whether the email exists (anti-enumeration).","operationId":"forgot_password_api_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/reset-password":{"post":{"tags":["Authentication"],"summary":"Reset Password","description":"Reset password using a valid token from the forgot-password email.","operationId":"reset_password_api_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/refresh":{"post":{"tags":["Authentication"],"summary":"Refresh Access Token","operationId":"refresh_access_token_api_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me":{"get":{"tags":["Authentication"],"summary":"Read Users Me","operationId":"read_users_me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/users":{"get":{"tags":["Authentication"],"summary":"Read Users","operationId":"read_users_api_auth_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Response Read Users Api Auth Users Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/sync-users":{"get":{"tags":["Authentication"],"summary":"Sync Users","description":"Simplified user list for POS sync fallback (tenant-scoped).","operationId":"sync_users_api_auth_sync_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Response Sync Users Api Auth Sync Users Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/invite":{"post":{"tags":["Authentication"],"summary":"Invite User","operationId":"invite_user_api_auth_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/invitations":{"get":{"tags":["Authentication"],"summary":"Get Invitations","operationId":"get_invitations_api_auth_invitations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InvitationResponse"},"type":"array","title":"Response Get Invitations Api Auth Invitations Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/invitations/{invitation_id}":{"delete":{"tags":["Authentication"],"summary":"Revoke Invitation","operationId":"revoke_invitation_api_auth_invitations__invitation_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/invite/{token}":{"get":{"tags":["Authentication"],"summary":"Get Invite Details","operationId":"get_invite_details_api_auth_invite__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/accept-invite":{"post":{"tags":["Authentication"],"summary":"Accept Invite","operationId":"accept_invite_api_auth_accept_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me/profile":{"put":{"tags":["Authentication"],"summary":"Update Profile","operationId":"update_profile_api_auth_me_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/me/password":{"put":{"tags":["Authentication"],"summary":"Update Password","operationId":"update_password_api_auth_me_password_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPasswordUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/users/{user_id}":{"put":{"tags":["Authentication"],"summary":"Update User","operationId":"update_user_api_auth_users__user_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/users/{user_id}/reset-pin":{"post":{"tags":["Authentication"],"summary":"Reset User Pin","operationId":"reset_user_pin_api_auth_users__user_id__reset_pin_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/":{"get":{"tags":["sales"],"summary":"List Sales","description":"Standard sales list for web POS (tenant-scoped, cursor-paginated).\nWhen `cursor` is omitted, returns the most-recent `limit` sales.","operationId":"list_sales_api_sales__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque base64-JSON cursor from previous page","title":"Cursor"},"description":"Opaque base64-JSON cursor from previous page"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tx ID substring filter","title":"Q"},"description":"Tx ID substring filter"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleListPagedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["sales"],"summary":"Create Sale","description":"Direct sale creation for web POS. Replaces /api/sync/push.\nUses process_sale_insert for consistent business logic.","operationId":"create_sale_api_sales__post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineSale"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/{sale_id}/add-item":{"post":{"tags":["sales"],"summary":"Add Sale Item","operationId":"add_sale_item_api_sales__sale_id__add_item_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"sale_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sale 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/AddSaleItemRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSaleItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/{sale_id}/void":{"post":{"tags":["sales"],"summary":"Void Sale","operationId":"void_sale_api_sales__sale_id__void_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"sale_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sale Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/{sale_id}/refund":{"post":{"tags":["sales"],"summary":"Refund Sale Item","operationId":"refund_sale_item_api_sales__sale_id__refund_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"sale_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sale Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/telemetry/sync-event":{"post":{"tags":["telemetry"],"summary":"Create Sync Event","description":"Fire-and-forget telemetry emission.\nThe client batches events and sends them periodically.","operationId":"create_sync_event_api_telemetry_sync_event_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncEventBatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/telemetry/sync-summary":{"get":{"tags":["telemetry"],"summary":"Get Sync Summary","description":"Per-terminal aggregates over the last 24h: last sync time, oldest pending\nop, push failure rate, pull duration p95, upgrade-required count.\n\nTenant scoping happens twice: explicitly in the WHERE clause AND via the\nRLS policy applied to `telemetry_events`. The explicit filter keeps the\nquery plan focused on the right partition; the policy is the\ndefense-in-depth guarantee.","operationId":"get_sync_summary_api_telemetry_sync_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/telemetry/prune":{"post":{"tags":["telemetry"],"summary":"Manual Prune Telemetry Events","description":"Admin-triggered retention sweep. Same DELETE as the scheduled task; useful\nfor verifying the retention policy in staging without waiting up to 6 hours.\nReturns the number of rows actually deleted (or -1 if another worker is\nalready running a sweep — try again in a few seconds).","operationId":"manual_prune_telemetry_events_api_telemetry_prune_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/expense-types":{"get":{"tags":["expenses"],"summary":"List Expense Types","operationId":"list_expense_types_api_expense_types_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseTypeResponse"},"title":"Response List Expense Types Api Expense Types Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["expenses"],"summary":"Create Expense Type","operationId":"create_expense_type_api_expense_types_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseTypeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/expenses/receipt":{"post":{"tags":["expenses"],"summary":"Upload Receipt","operationId":"upload_receipt_api_expenses_receipt_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_receipt_api_expenses_receipt_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/expenses/{id}/receipt":{"get":{"tags":["expenses"],"summary":"Get Receipt Presigned Url","operationId":"get_receipt_presigned_url_api_expenses__id__receipt_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/expenses/summary":{"get":{"tags":["expenses"],"summary":"Get Expenses Summary","operationId":"get_expenses_summary_api_expenses_summary_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"}},{"name":"expense_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Expense Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/expenses":{"get":{"tags":["expenses"],"summary":"List Expenses","operationId":"list_expenses_api_expenses_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"}},{"name":"expense_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Expense Type Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpensePagedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["expenses"],"summary":"Create Expense","operationId":"create_expense_api_expenses_post","security":[{"OAuth2PasswordBearer":[]}],"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/ExpenseCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/expenses/{id}":{"put":{"tags":["expenses"],"summary":"Update Expense","operationId":"update_expense_api_expenses__id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["expenses"],"summary":"Delete Expense","operationId":"delete_expense_api_expenses__id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/expenses/{id}/history":{"get":{"tags":["expenses"],"summary":"Get Expense History","operationId":"get_expense_history_api_expenses__id__history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseAuditResponse"},"title":"Response Get Expense History Api Expenses  Id  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customers/":{"get":{"tags":["customers"],"summary":"List Customers","description":"Search and list active customers with order counts, spend, and role-gated profit.","operationId":"list_customers_api_customers__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerResponse"},"title":"Response List Customers Api Customers  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["customers"],"summary":"Create Customer","description":"Create a new customer profile with audit entry.","operationId":"create_customer_api_customers__post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customers":{"get":{"tags":["customers"],"summary":"List Customers","description":"Search and list active customers with order counts, spend, and role-gated profit.","operationId":"list_customers_api_customers_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerResponse"},"title":"Response List Customers Api Customers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["customers"],"summary":"Create Customer","description":"Create a new customer profile with audit entry.","operationId":"create_customer_api_customers_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customers/analytics/headline":{"get":{"tags":["customers"],"summary":"Get Customer Headline Analytics","description":"Headline customer analytics: total customers, spend, top by orders, top by profit (Admin only).","operationId":"get_customer_headline_analytics_api_customers_analytics_headline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerHeadlineAnalyticsResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/customers/{id}":{"get":{"tags":["customers"],"summary":"Get Customer","description":"Retrieve detailed customer profile with lifetime KPI metrics.","operationId":"get_customer_api_customers__id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["customers"],"summary":"Update Customer","description":"Update customer profile with immutable audit tracking.","operationId":"update_customer_api_customers__id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["customers"],"summary":"Delete Customer","description":"Soft delete customer profile (Admin only; Tellers get 403).","operationId":"delete_customer_api_customers__id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customers/{id}/history":{"get":{"tags":["customers"],"summary":"Get Customer History","description":"Retrieve audit timeline log for a customer.","operationId":"get_customer_history_api_customers__id__history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerAuditResponse"},"title":"Response Get Customer History Api Customers  Id  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customers/{id}/sales":{"get":{"tags":["customers"],"summary":"Get Customer Sales","description":"Retrieve transaction history for a customer with line items.","operationId":"get_customer_sales_api_customers__id__sales_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSaleResponse"},"title":"Response Get Customer Sales Api Customers  Id  Sales Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AcceptInviteRequest":{"properties":{"token":{"type":"string","title":"Token"},"username":{"type":"string","minLength":3,"title":"Username"},"password":{"type":"string","minLength":8,"title":"Password"}},"type":"object","required":["token","username","password"],"title":"AcceptInviteRequest"},"AddSaleItemRequest":{"properties":{"product_id":{"type":"string","format":"uuid","title":"Product Id"},"quantity":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Quantity"},"unit_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unit Price"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"payments":{"anyOf":[{"items":{"$ref":"#/components/schemas/OfflineSalePayment"},"type":"array"},{"type":"null"}],"title":"Payments"}},"type":"object","required":["product_id","quantity"],"title":"AddSaleItemRequest"},"AddSaleItemResponse":{"properties":{"child_sale_id":{"type":"string","format":"uuid","title":"Child Sale Id"},"added_amount":{"type":"number","title":"Added Amount"},"net_total":{"type":"number","title":"Net Total"},"child_sale":{"anyOf":[{"$ref":"#/components/schemas/SaleListResponse"},{"type":"null"}]}},"type":"object","required":["child_sale_id","added_amount","net_total"],"title":"AddSaleItemResponse"},"AdminDashboardSummary":{"properties":{"total_revenue":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Revenue"},"total_profit":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Profit"},"total_transactions":{"type":"integer","title":"Total Transactions"},"items_sold":{"type":"number","title":"Items Sold"},"top_selling_product_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Top Selling Product Id"},"previous_period_revenue":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Previous Period Revenue"},"revenue_change_pct":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Revenue Change Pct"}},"type":"object","required":["total_revenue","total_profit","total_transactions","items_sold"],"title":"AdminDashboardSummary"},"AdminPeriodReport":{"properties":{"total_revenue":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Revenue"},"transaction_count":{"type":"integer","title":"Transaction Count"},"items_sold":{"type":"number","title":"Items Sold"},"payment_breakdown":{"items":{"$ref":"#/components/schemas/PeriodReportPaymentBreakdown"},"type":"array","title":"Payment Breakdown"},"product_breakdown":{"items":{"$ref":"#/components/schemas/PeriodReportProductBreakdown"},"type":"array","title":"Product Breakdown"}},"type":"object","required":["total_revenue","transaction_count","items_sold","payment_breakdown","product_breakdown"],"title":"AdminPeriodReport"},"BatchAdjustmentRequest":{"properties":{"batch_id":{"type":"string","format":"uuid","title":"Batch Id"},"product_id":{"type":"string","format":"uuid","title":"Product Id"},"adjustment_quantity":{"type":"integer","title":"Adjustment Quantity"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["batch_id","product_id","adjustment_quantity"],"title":"BatchAdjustmentRequest"},"BatchDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"total_cost":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Cost"},"supplier_receipt_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Receipt Url"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"items":{"items":{"$ref":"#/components/schemas/BatchItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["id","total_cost","supplier_receipt_url","notes","created_at","items"],"title":"BatchDetailResponse"},"BatchItemResponse":{"properties":{"product_id":{"type":"string","format":"uuid","title":"Product Id"},"product_name":{"type":"string","title":"Product Name"},"quantity":{"type":"number","title":"Quantity"},"unit_cost":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Unit Cost"}},"type":"object","required":["product_id","product_name","quantity","unit_cost"],"title":"BatchItemResponse"},"BatchRestockRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RestockItem"},"type":"array","title":"Items"},"supplier_receipt_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Receipt Url"}},"type":"object","required":["items"],"title":"BatchRestockRequest"},"BatchSummaryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"total_cost":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Cost"},"supplier_receipt_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Receipt Url"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","total_cost","supplier_receipt_url","notes","created_at"],"title":"BatchSummaryResponse"},"Body_login_for_access_token_api_auth_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_login_for_access_token_api_auth_login_post"},"Body_upload_receipt_api_expenses_receipt_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_receipt_api_expenses_receipt_post"},"CustomerAuditAction":{"type":"string","enum":["CREATE","UPDATE","DELETE"],"title":"CustomerAuditAction"},"CustomerAuditResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"store_id":{"type":"string","format":"uuid","title":"Store Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"actor_id":{"type":"string","format":"uuid","title":"Actor Id"},"actor_username":{"type":"string","title":"Actor Username"},"action":{"$ref":"#/components/schemas/CustomerAuditAction"},"before":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Before"},"after":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"After"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","store_id","customer_id","actor_id","actor_username","action","created_at"],"title":"CustomerAuditResponse"},"CustomerCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"phone_number":{"type":"string","maxLength":50,"minLength":1,"title":"Phone Number"},"whatsapp_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Whatsapp Number"},"location":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Location"}},"type":"object","required":["name","phone_number"],"title":"CustomerCreate"},"CustomerHeadlineAnalyticsResponse":{"properties":{"total_customers":{"type":"integer","title":"Total Customers"},"total_spend":{"type":"number","title":"Total Spend"},"top_customer_by_orders":{"anyOf":[{"$ref":"#/components/schemas/CustomerTopHeadline"},{"type":"null"}]},"top_customer_by_profit":{"anyOf":[{"$ref":"#/components/schemas/CustomerTopHeadline"},{"type":"null"}]},"sale_mix":{"anyOf":[{"$ref":"#/components/schemas/CustomerSaleMix"},{"type":"null"}]}},"type":"object","required":["total_customers","total_spend"],"title":"CustomerHeadlineAnalyticsResponse"},"CustomerResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"store_id":{"type":"string","format":"uuid","title":"Store Id"},"name":{"type":"string","title":"Name"},"phone_number":{"type":"string","title":"Phone Number"},"whatsapp_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Number"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"is_active":{"type":"boolean","title":"Is Active"},"orders_count":{"type":"integer","title":"Orders Count","default":0},"total_spent":{"type":"number","title":"Total Spent","default":0.0},"total_profit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Profit"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","store_id","name","phone_number","is_active","created_at","updated_at"],"title":"CustomerResponse"},"CustomerSaleLineItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"product_id":{"type":"string","format":"uuid","title":"Product Id"},"product_name":{"type":"string","title":"Product Name"},"quantity":{"type":"number","title":"Quantity"},"unit_price_at_sale":{"type":"number","title":"Unit Price At Sale"},"applied_min_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Applied Min Quantity"}},"type":"object","required":["id","product_id","product_name","quantity","unit_price_at_sale"],"title":"CustomerSaleLineItemResponse"},"CustomerSaleMix":{"properties":{"walk_in":{"$ref":"#/components/schemas/CustomerSaleMixBucket"},"registered":{"$ref":"#/components/schemas/CustomerSaleMixBucket"}},"type":"object","required":["walk_in","registered"],"title":"CustomerSaleMix"},"CustomerSaleMixBucket":{"properties":{"orders":{"type":"integer","title":"Orders"},"revenue":{"type":"number","title":"Revenue"},"profit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit"}},"type":"object","required":["orders","revenue"],"title":"CustomerSaleMixBucket","description":"One side of the walk-in vs registered split. Net of voids/refunds."},"CustomerSaleResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"total_amount":{"type":"number","title":"Total Amount"},"sale_date":{"type":"string","format":"date-time","title":"Sale Date"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"modification_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modification Type"},"parent_sale_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Sale Id"},"line_items":{"items":{"$ref":"#/components/schemas/CustomerSaleLineItemResponse"},"type":"array","title":"Line Items"}},"type":"object","required":["id","total_amount","sale_date","line_items"],"title":"CustomerSaleResponse"},"CustomerTopHeadline":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"orders_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Orders Count"},"total_spent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Spent"},"total_profit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Profit"}},"type":"object","required":["id","name"],"title":"CustomerTopHeadline"},"CustomerUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"phone_number":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Phone Number"},"whatsapp_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Whatsapp Number"},"location":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Location"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"CustomerUpdate"},"ExpenseAuditAction":{"type":"string","enum":["CREATE","UPDATE","DELETE"],"title":"ExpenseAuditAction"},"ExpenseAuditResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"store_id":{"type":"string","format":"uuid","title":"Store Id"},"expense_id":{"type":"string","format":"uuid","title":"Expense Id"},"actor_id":{"type":"string","format":"uuid","title":"Actor Id"},"actor_username":{"type":"string","title":"Actor Username"},"action":{"$ref":"#/components/schemas/ExpenseAuditAction"},"before":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Before"},"after":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"After"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","store_id","expense_id","actor_id","actor_username","action","created_at"],"title":"ExpenseAuditResponse"},"ExpenseCreate":{"properties":{"expense_type_id":{"type":"string","format":"uuid","title":"Expense Type Id"},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"description":{"type":"string","maxLength":1000,"minLength":1,"title":"Description"},"expense_date":{"type":"string","format":"date","title":"Expense Date"},"receipt_object_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Object Key"}},"type":"object","required":["expense_type_id","amount","description","expense_date"],"title":"ExpenseCreate"},"ExpensePagedResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ExpenseResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"ExpensePagedResponse"},"ExpenseResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"store_id":{"type":"string","format":"uuid","title":"Store Id"},"expense_type_id":{"type":"string","format":"uuid","title":"Expense Type Id"},"expense_type_name":{"type":"string","title":"Expense Type Name"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"description":{"type":"string","title":"Description"},"expense_date":{"type":"string","format":"date","title":"Expense Date"},"receipt_object_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Object Key"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","store_id","expense_type_id","expense_type_name","amount","description","expense_date","created_by","created_at","updated_at"],"title":"ExpenseResponse"},"ExpenseSummaryByType":{"properties":{"expense_type_id":{"type":"string","format":"uuid","title":"Expense Type Id"},"name":{"type":"string","title":"Name"},"total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total"}},"type":"object","required":["expense_type_id","name","total"],"title":"ExpenseSummaryByType"},"ExpenseSummaryResponse":{"properties":{"total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total"},"by_type":{"items":{"$ref":"#/components/schemas/ExpenseSummaryByType"},"type":"array","title":"By Type"}},"type":"object","required":["total","by_type"],"title":"ExpenseSummaryResponse"},"ExpenseTypeCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"ExpenseTypeCreate"},"ExpenseTypeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"store_id":{"type":"string","format":"uuid","title":"Store Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","store_id","name","created_at","updated_at"],"title":"ExpenseTypeResponse"},"ExpenseUpdate":{"properties":{"expense_type_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Expense Type Id"},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"description":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}],"title":"Description"},"expense_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expense Date"},"receipt_object_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Object Key"}},"type":"object","title":"ExpenseUpdate"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvitationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/UserRole"},"status":{"$ref":"#/components/schemas/InvitationStatus"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"invited_by":{"type":"string","format":"uuid","title":"Invited By"}},"type":"object","required":["id","email","role","status","expires_at","created_at","invited_by"],"title":"InvitationResponse"},"InvitationStatus":{"type":"string","enum":["PENDING","ACCEPTED","REVOKED"],"title":"InvitationStatus"},"InviteRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/UserRole"}},"type":"object","required":["email","role"],"title":"InviteRequest"},"NotificationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"product_id":{"type":"string","format":"uuid","title":"Product Id"},"type":{"type":"string","title":"Type"},"message":{"type":"string","title":"Message"},"is_resolved":{"type":"boolean","title":"Is Resolved"}},"type":"object","required":["id","product_id","type","message","is_resolved"],"title":"NotificationResponse"},"OfflineSale":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"cashier_id":{"type":"string","format":"uuid","title":"Cashier Id"},"store_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Store Id"},"total_amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Total Amount"},"client_mutation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Client Mutation Id"},"lamport_timestamp":{"type":"integer","title":"Lamport Timestamp","default":0},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"customer_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Details"},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"},"sale_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sale Date"},"parent_sale_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Sale Id"},"modification_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modification Type"},"line_items":{"items":{"$ref":"#/components/schemas/OfflineSaleLineItem"},"type":"array","title":"Line Items"},"payments":{"items":{"$ref":"#/components/schemas/OfflineSalePayment"},"type":"array","title":"Payments"}},"additionalProperties":false,"type":"object","required":["id","cashier_id","total_amount","line_items"],"title":"OfflineSale"},"OfflineSaleLineItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"ledger_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Ledger Id"},"product_id":{"type":"string","format":"uuid","title":"Product Id"},"quantity":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Quantity"},"unit_price_at_sale":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Unit Price At Sale"},"unit_cost_at_sale":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unit Cost At Sale"},"applied_min_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Applied Min Quantity"}},"additionalProperties":false,"type":"object","required":["id","product_id","quantity","unit_price_at_sale"],"title":"OfflineSaleLineItem"},"OfflineSalePayment":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"payment_method":{"type":"string","title":"Payment Method"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"tendered_amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tendered Amount"}},"additionalProperties":false,"type":"object","required":["id","payment_method","amount"],"title":"OfflineSalePayment"},"PeriodReportPaymentBreakdown":{"properties":{"payment_method":{"type":"string","title":"Payment Method"},"total_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Amount"},"transaction_count":{"type":"integer","title":"Transaction Count"}},"type":"object","required":["payment_method","total_amount","transaction_count"],"title":"PeriodReportPaymentBreakdown"},"PeriodReportProductBreakdown":{"properties":{"product_id":{"type":"string","format":"uuid","title":"Product Id"},"product_name":{"type":"string","title":"Product Name"},"units_sold":{"type":"number","title":"Units Sold"},"revenue":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Revenue"}},"type":"object","required":["product_id","product_name","units_sold","revenue"],"title":"PeriodReportProductBreakdown"},"PriceHistoryPoint":{"properties":{"date":{"type":"string","format":"date-time","title":"Date"},"selling_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Selling Price"},"cost_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Cost Price"}},"type":"object","required":["date","selling_price","cost_price"],"title":"PriceHistoryPoint"},"ProductAuditAction":{"type":"string","enum":["CREATE","RENAME","PRICE_CHANGE","WHOLESALE_PRICE_CHANGE","WHOLESALE_LIMIT_CHANGE","DEACTIVATE","ACTIVATE","UPDATE"],"title":"ProductAuditAction"},"ProductAuditResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"store_id":{"type":"string","format":"uuid","title":"Store Id"},"product_id":{"type":"string","format":"uuid","title":"Product Id"},"actor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Id"},"actor_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Username"},"action":{"$ref":"#/components/schemas/ProductAuditAction"},"before":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Before"},"after":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"After"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","store_id","product_id","action","created_at"],"title":"ProductAuditResponse"},"ProductCreate":{"properties":{"name":{"type":"string","title":"Name"},"current_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Current Price","default":"0.00"},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Barcode"},"wholesale_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Wholesale Price"},"wholesale_min_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wholesale Min Quantity"}},"type":"object","required":["name"],"title":"ProductCreate"},"ProductHistoryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"quantity_change":{"type":"number","title":"Quantity Change"},"reason":{"type":"string","title":"Reason"},"unit_cost":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unit Cost"},"reference_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reference Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","quantity_change","reason","unit_cost","reference_id","created_at"],"title":"ProductHistoryResponse"},"ProductMetricsResponse":{"properties":{"total_profits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Profits"},"quantities_sold":{"$ref":"#/components/schemas/QuantitiesSold"},"price_history":{"items":{"$ref":"#/components/schemas/PriceHistoryPoint"},"type":"array","title":"Price History"}},"type":"object","required":["total_profits","quantities_sold","price_history"],"title":"ProductMetricsResponse"},"ProductPerformanceItem":{"properties":{"product_id":{"type":"string","format":"uuid","title":"Product Id"},"product_name":{"type":"string","title":"Product Name"},"units_sold":{"type":"number","title":"Units Sold"},"revenue":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Revenue"},"profit":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Profit"}},"type":"object","required":["product_id","product_name","units_sold","revenue","profit"],"title":"ProductPerformanceItem"},"ProductResponse":{"properties":{"name":{"type":"string","title":"Name"},"current_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Current Price","default":"0.00"},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Barcode"},"wholesale_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Wholesale Price"},"wholesale_min_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wholesale Min Quantity"},"id":{"type":"string","format":"uuid","title":"Id"},"is_active":{"type":"boolean","title":"Is Active"},"current_average_cost":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Current Average Cost"},"current_stock":{"type":"number","title":"Current Stock","default":0.0},"current_cost_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Current Cost Price","default":"0.00"},"version_vector":{"additionalProperties":{"type":"integer"},"type":"object","title":"Version Vector","default":{"server":1}}},"type":"object","required":["name","id","is_active","current_average_cost"],"title":"ProductResponse"},"ProductUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"current_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Current Price"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"version_vector":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Version Vector"},"wholesale_price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Wholesale Price"},"wholesale_min_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wholesale Min Quantity"}},"type":"object","title":"ProductUpdate"},"PullResult":{"properties":{"tables":{"additionalProperties":{"$ref":"#/components/schemas/PullTableResult"},"type":"object","title":"Tables"},"server_schema_version":{"type":"integer","title":"Server Schema Version"},"server_time":{"type":"string","format":"date-time","title":"Server Time"}},"additionalProperties":false,"type":"object","required":["tables","server_schema_version","server_time"],"title":"PullResult"},"PullTableResult":{"properties":{"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"cursor_ts":{"type":"string","format":"date-time","title":"Cursor Ts"},"cursor_id":{"type":"string","format":"uuid","title":"Cursor Id"},"has_more":{"type":"boolean","title":"Has More"},"row_count_behind_cursor":{"type":"integer","title":"Row Count Behind Cursor","default":0}},"additionalProperties":false,"type":"object","required":["rows","cursor_ts","cursor_id","has_more"],"title":"PullTableResult"},"PushBatch":{"properties":{"operations":{"items":{"$ref":"#/components/schemas/PushOperation"},"type":"array","title":"Operations"}},"additionalProperties":false,"type":"object","required":["operations"],"title":"PushBatch"},"PushOpResult":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["ok","skipped"],"title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"retryable":{"type":"boolean","title":"Retryable","default":true}},"additionalProperties":false,"type":"object","required":["id","status"],"title":"PushOpResult"},"PushOperation":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"seq":{"type":"integer","title":"Seq"},"kind":{"type":"string","enum":["sale_insert","sale_modification","product_create","product_update","user_update","restock","adjustment","customer_create","customer_update"],"title":"Kind"},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"additionalProperties":false,"type":"object","required":["id","seq","kind","payload"],"title":"PushOperation"},"PushResult":{"properties":{"processed":{"items":{"$ref":"#/components/schemas/PushOpResult"},"type":"array","title":"Processed"},"server_time":{"type":"string","format":"date-time","title":"Server Time"}},"additionalProperties":false,"type":"object","required":["processed","server_time"],"title":"PushResult"},"QuantitiesSold":{"properties":{"day":{"type":"number","title":"Day"},"week":{"type":"number","title":"Week"},"month":{"type":"number","title":"Month"}},"type":"object","required":["day","week","month"],"title":"QuantitiesSold"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"RefundRequest":{"properties":{"product_id":{"type":"string","format":"uuid","title":"Product Id"},"quantity":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Quantity"},"refund_payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refund Payment Method","default":"CASH"}},"type":"object","required":["product_id","quantity"],"title":"RefundRequest"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"username":{"type":"string","minLength":3,"title":"Username"},"password":{"type":"string","minLength":8,"title":"Password"},"store_name":{"type":"string","minLength":1,"title":"Store Name"},"captcha_token":{"type":"string","title":"Captcha Token"}},"type":"object","required":["email","username","password","store_name","captcha_token"],"title":"RegisterRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","minLength":6,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"RestockItem":{"properties":{"ledger_id":{"type":"string","format":"uuid","title":"Ledger Id"},"product_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Product Id"},"new_product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Product Name"},"new_product_barcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Product Barcode"},"new_product_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"New Product Price","default":"0.00"},"quantity":{"type":"integer","minimum":1.0,"title":"Quantity"},"unit_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Unit Cost"}},"type":"object","required":["ledger_id","quantity","unit_cost"],"title":"RestockItem"},"SaleHistoryItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"cashier_username":{"type":"string","title":"Cashier Username"},"total_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Amount"},"sale_date":{"type":"string","format":"date-time","title":"Sale Date"},"modification_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modification Type"},"parent_sale_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Sale Id"}},"type":"object","required":["id","cashier_username","total_amount","sale_date"],"title":"SaleHistoryItem"},"SaleHistoryResponse":{"properties":{"original":{"$ref":"#/components/schemas/SaleHistoryItem"},"modifications":{"items":{"$ref":"#/components/schemas/SaleHistoryItem"},"type":"array","title":"Modifications"},"derived_status":{"type":"string","title":"Derived Status"},"current_net_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Current Net Amount"}},"type":"object","required":["original","modifications","derived_status","current_net_amount"],"title":"SaleHistoryResponse"},"SaleListLineItemResponse":{"properties":{"product_id":{"type":"string","format":"uuid","title":"Product Id"},"quantity":{"type":"number","title":"Quantity"},"unit_price_at_sale":{"type":"number","title":"Unit Price At Sale"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"applied_min_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Applied Min Quantity"}},"type":"object","required":["product_id","quantity","unit_price_at_sale"],"title":"SaleListLineItemResponse"},"SaleListPagedResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"sales":{"items":{"$ref":"#/components/schemas/SaleListResponse"},"type":"array","title":"Sales"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["sales"],"title":"SaleListPagedResponse"},"SaleListResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"cashier_id":{"type":"string","format":"uuid","title":"Cashier Id"},"cashier_name":{"type":"string","title":"Cashier Name"},"total_amount":{"type":"number","title":"Total Amount"},"sale_date":{"type":"string","format":"date-time","title":"Sale Date"},"modification_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modification Type"},"parent_sale_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Sale Id"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"customer_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Details"},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"line_items":{"items":{"$ref":"#/components/schemas/SaleListLineItemResponse"},"type":"array","title":"Line Items"},"payments":{"items":{"$ref":"#/components/schemas/SalePaymentResponse"},"type":"array","title":"Payments"}},"type":"object","required":["id","cashier_id","cashier_name","total_amount","sale_date","modification_type","parent_sale_id","line_items"],"title":"SaleListResponse"},"SalePaymentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"payment_method":{"type":"string","title":"Payment Method"},"amount":{"type":"number","title":"Amount"},"tendered_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tendered Amount"}},"type":"object","required":["id","payment_method","amount"],"title":"SalePaymentResponse"},"SalesTimelineItem":{"properties":{"date_period":{"type":"string","title":"Date Period"},"total_revenue":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Revenue"},"total_cost":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Cost"},"profit":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Profit"}},"type":"object","required":["date_period","total_revenue","total_cost","profit"],"title":"SalesTimelineItem"},"StoreResponse":{"properties":{"name":{"type":"string","title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"temporal_tray_limit":{"type":"integer","title":"Temporal Tray Limit","default":3},"disable_customer_capture":{"type":"boolean","title":"Disable Customer Capture","default":false},"currency":{"type":"string","title":"Currency","default":"GHS"},"auto_lock_minutes":{"type":"integer","title":"Auto Lock Minutes","default":3},"teller_history_days":{"type":"integer","title":"Teller History Days","default":30},"allow_decimal_quantities":{"type":"boolean","title":"Allow Decimal Quantities","default":false},"id":{"type":"string","format":"uuid","title":"Id"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["name","id","is_active"],"title":"StoreResponse"},"StoreUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"temporal_tray_limit":{"anyOf":[{"type":"integer","maximum":20.0,"minimum":1.0},{"type":"null"}],"title":"Temporal Tray Limit"},"disable_customer_capture":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Customer Capture"},"currency":{"anyOf":[{"type":"string","maxLength":5,"minLength":2},{"type":"null"}],"title":"Currency"},"auto_lock_minutes":{"anyOf":[{"type":"integer","maximum":60.0,"minimum":1.0},{"type":"null"}],"title":"Auto Lock Minutes"},"teller_history_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Teller History Days"},"allow_decimal_quantities":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Decimal Quantities"}},"type":"object","title":"StoreUpdate"},"SyncEventBatch":{"properties":{"events":{"items":{"$ref":"#/components/schemas/SyncEventPayload"},"type":"array","title":"Events"}},"type":"object","required":["events"],"title":"SyncEventBatch"},"SyncEventPayload":{"properties":{"event_type":{"type":"string","title":"Event Type"},"event_data":{"additionalProperties":true,"type":"object","title":"Event Data","default":{}},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"}},"type":"object","required":["event_type","occurred_at"],"title":"SyncEventPayload"},"TellerDashboardSummary":{"properties":{"total_revenue":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Revenue"},"total_transactions":{"type":"integer","title":"Total Transactions"},"items_sold":{"type":"number","title":"Items Sold"}},"type":"object","required":["total_revenue","total_transactions","items_sold"],"title":"TellerDashboardSummary"},"TellerPeriodReport":{"properties":{"total_revenue":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Revenue"},"transaction_count":{"type":"integer","title":"Transaction Count"},"items_sold":{"type":"number","title":"Items Sold"},"payment_breakdown":{"items":{"$ref":"#/components/schemas/PeriodReportPaymentBreakdown"},"type":"array","title":"Payment Breakdown"},"product_breakdown":{"items":{"$ref":"#/components/schemas/PeriodReportProductBreakdown"},"type":"array","title":"Product Breakdown"}},"type":"object","required":["total_revenue","transaction_count","items_sold","payment_breakdown","product_breakdown"],"title":"TellerPeriodReport"},"UserPasswordUpdate":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"UserPasswordUpdate"},"UserProfileUpdate":{"properties":{"username":{"type":"string","title":"Username"}},"type":"object","required":["username"],"title":"UserProfileUpdate"},"UserResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"username":{"type":"string","title":"Username"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"role":{"$ref":"#/components/schemas/UserRole"},"is_active":{"type":"boolean","title":"Is Active"},"is_owner":{"type":"boolean","title":"Is Owner","default":false},"requires_pin_reset":{"type":"boolean","title":"Requires Pin Reset"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","username","role","is_active","requires_pin_reset","created_at"],"title":"UserResponse"},"UserRole":{"type":"string","enum":["ADMIN","TELLER"],"title":"UserRole"},"UserUpdate":{"properties":{"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"role":{"anyOf":[{"$ref":"#/components/schemas/UserRole"},{"type":"null"}]}},"type":"object","title":"UserUpdate"},"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"},"VerifyOTPRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"pin":{"type":"string","title":"Pin"}},"type":"object","required":["email","pin"],"title":"VerifyOTPRequest"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"api/auth/login"}}}}}}