{"openapi":"3.1.0","info":{"title":"AnyMoment API","description":"API documentation for the AnyMoment platform","version":"0.1.0"},"paths":{"/auth/token":{"post":{"tags":["Authentication"],"summary":"Create Token","description":"Create an authentication token for a user based on their login credentials.","operationId":"create_token_auth_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_create_token_auth_token_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Create Token Auth Token Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/token/extend":{"get":{"tags":["Authentication"],"summary":"Extend Token","description":"Extend the validity of an existing authentication token for a user.","operationId":"extend_token_auth_token_extend_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Extend Token Auth Token Extend Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/users":{"get":{"tags":["Authentication"],"summary":"Get Users","description":"Retrieve a list of all users in the system.\n\nThis endpoint requires admin privileges","operationId":"get_users_auth_users_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserInfo"},"title":"Response Get Users Auth Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Authentication"],"summary":"Create User","description":"Create a new user in the system.\n\nOptional `ref` is the first-touch marketing source. It is trimmed and\nlowercased, then stored only when it is a slug of at most 64 characters.\nMissing, empty, and invalid values leave `ref` null and still create the\naccount. The stored value is not changed by a later request.","operationId":"create_user_auth_users_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Authentication"],"summary":"Delete User","description":"Delete a user (admin) or delete your own account.\n\nPayload examples:\n- Admin delete by email:\n  {\"email\": \"user@example.com\"}\n- User self-delete:\n  {\"confirm\": true}","operationId":"delete_user_auth_users_delete","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"get":{"tags":["Authentication"],"summary":"Me","description":"Get the current user's information.","operationId":"me_auth_me_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Authentication"],"summary":"Update User Preferences","description":"Update the current user's preferences (timezone, country, birthday, display name).\nOnly provided fields are updated.","operationId":"update_user_preferences_auth_me_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPreferencesUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/users/change-password":{"post":{"tags":["Authentication"],"summary":"Change Password","description":"Change the current user's password.\n\nFor users who signed up with Google SSO only (no password set), old_password is not required.\nFor users with existing passwords, old_password verification is required.","operationId":"change_password_auth_users_change_password_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_change_password_auth_users_change_password_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/users/{email}":{"get":{"tags":["Authentication"],"summary":"Get User By Email","description":"Get a user by their email.","operationId":"get_user_by_email_auth_users__email__get","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/users/reset-password":{"post":{"tags":["Authentication"],"summary":"Reset Password","description":"Reset a user's password to a new password provided by the admin.\nThis endpoint requires admin privileges","operationId":"reset_password_auth_users_reset_password_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_reset_password_auth_users_reset_password_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/users/forgot-password":{"post":{"tags":["Authentication"],"summary":"Forgot Password","description":"Ask for a password reset email. No login is required.\n\nAlways returns the same 200 and message whether or not the email belongs\nto an account. Rate limits by IP and by email return 429.","operationId":"forgot_password_auth_users_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"}}}}}}},"/auth/users/forgot-password/confirm":{"post":{"tags":["Authentication"],"summary":"Forgot Password Confirm","description":"Set a new password with a single-use reset token. No login is required.\n\nUses the same password gate as account creation and change-password.\nMissing, used, and expired tokens all return the same 400.","operationId":"forgot_password_confirm_auth_users_forgot_password_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/users/set-active":{"post":{"tags":["Authentication"],"summary":"Set Active","description":"Set a user's active status.\nThis endpoint requires admin privileges","operationId":"set_active_auth_users_set_active_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_set_active_auth_users_set_active_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/users/set-admin":{"post":{"tags":["Authentication"],"summary":"Set Admin","description":"Set a user's admin status.\nThis endpoint requires admin privileges","operationId":"set_admin_auth_users_set_admin_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_set_admin_auth_users_set_admin_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/users/set-verified":{"post":{"tags":["Authentication"],"summary":"Set Verified","operationId":"set_verified_auth_users_set_verified_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_set_verified_auth_users_set_verified_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify-email/{user_id}/{verification_token}":{"get":{"tags":["Authentication"],"summary":"Verify Email Link","description":"Verify a user's email.","operationId":"verify_email_link_auth_verify_email__user_id___verification_token__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"verification_token","in":"path","required":true,"schema":{"type":"string","title":"Verification Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/resend-verification":{"post":{"tags":["Authentication"],"summary":"Resend Verification","description":"Send the same verification email again. One send per minute per user.","operationId":"resend_verification_auth_resend_verification_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/permanent-token":{"post":{"tags":["Authentication"],"summary":"Create Permanent Token","description":"Create a permanent authentication token for a user.\nThis endpoint requires admin privileges","operationId":"create_permanent_token_auth_permanent_token_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserBase"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Create Permanent Token Auth Permanent Token Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Authentication"],"summary":"Get Tokens","description":"Retrieve a list of all permanent authentication tokens in the system.\nThis endpoint requires admin privileges","operationId":"get_tokens_auth_permanent_token_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Token"},"title":"Response Get Tokens Auth Permanent Token Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Authentication"],"summary":"Delete Permanent Token","description":"Delete/revoke a permanent authentication token for a user.\nThis endpoint requires admin privileges","operationId":"delete_permanent_token_auth_permanent_token_delete","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_delete_permanent_token_auth_permanent_token_delete"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/feedback":{"post":{"tags":["Authentication"],"summary":"Create Feedback","description":"Create feedback for the app.","operationId":"create_feedback_auth_feedback_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feedback"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/admin/users/search":{"get":{"tags":["Authentication"],"summary":"Search Users","description":"Search and filter users with server-side pagination, sorting, and faceted search.\n\nThis endpoint supports:\n- Fuzzy search on email, name, user ID, and linked Google account emails\n- Structured filters for status, subscription, trial, Google auth, sync failures\n- Date range filters for signup and last active\n- Sorting by multiple fields (ascending/descending)\n- Offset pagination with page/page_size\n\nReturns aggregated data with no N+1 queries.","operationId":"search_users_auth_admin_users_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search query for email, name, user ID, or linked Google email","title":"Q"},"description":"Search query for email, name, user ID, or linked Google email"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: active, inactive, verified, unverified","title":"Status"},"description":"Filter by status: active, inactive, verified, unverified"},{"name":"subscription_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by subscription status: trialing, active, past_due, canceled, unpaid, none","title":"Subscription Status"},"description":"Filter by subscription status: trialing, active, past_due, canceled, unpaid, none"},{"name":"trial_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by trial status: active, expiring_soon, expired","title":"Trial Status"},"description":"Filter by trial status: active, expiring_soon, expired"},{"name":"google_auth_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by Google auth status: linked, needs_reauth, invalid, none","title":"Google Auth Status"},"description":"Filter by Google auth status: linked, needs_reauth, invalid, none"},{"name":"has_sync_failures","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by sync failures","title":"Has Sync Failures"},"description":"Filter by sync failures"},{"name":"signup_date_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by signup date start (ISO 8601)","title":"Signup Date Start"},"description":"Filter by signup date start (ISO 8601)"},{"name":"signup_date_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by signup date end (ISO 8601)","title":"Signup Date End"},"description":"Filter by signup date end (ISO 8601)"},{"name":"last_active_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by last active start (ISO 8601)","title":"Last Active Start"},"description":"Filter by last active start (ISO 8601)"},{"name":"last_active_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by last active end (ISO 8601)","title":"Last Active End"},"description":"Filter by last active end (ISO 8601)"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort by: created_at, last_login, last_token_check, email, display_name","default":"created_at","title":"Sort By"},"description":"Sort by: created_at, last_login, last_token_check, email, display_name"},{"name":"sort_order","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort order: asc, desc","default":"desc","title":"Sort Order"},"description":"Sort order: asc, desc"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed)","default":1,"title":"Page"},"description":"Page number (1-indexed)"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page (max 100)","default":50,"title":"Page Size"},"description":"Items per page (max 100)"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/admin/users/{user_id}":{"get":{"tags":["Authentication"],"summary":"Get User Detail","description":"Get detailed information for a specific user.\n\nReturns full user details including:\n- Core user info (email, name, first-touch ref, status, timestamps)\n- Subscription details with tier info and Stripe IDs\n- Google accounts with auth status and linked calendars\n- Calendar summary with event counts\n- Active tokens\n- User statistics","operationId":"get_user_detail_auth_admin_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/admin/users/{user_id}/suspend":{"post":{"tags":["Authentication"],"summary":"Suspend User","description":"Suspend a user account.\n\nSets is_active=false which:\n- Prevents the user from logging in\n- Blocks API access with existing tokens\n- Pauses all calendar sync work for this user's exports:\n  * Job workers filter out suspended users at SQL level (never fetched)\n  * Google push notifications are acknowledged but don't enqueue new work\n  * Backup poll task skips suspended users\n  * Watch renewal skips suspended users (channels expire ~7 days)\n  * Horizon extend skips suspended users\n  * Other users' exports for the same calendar continue syncing (no calendar-level suspension)\n\nSide effects:\n- Revokes all permanent tokens\n- User cannot access the platform until reactivated\n- Pending jobs stay in queue (will resume on reactivation)\n\nSecurity:\n- Admins cannot suspend themselves\n- Suspending another superuser requires confirm_admin_target=true\n\nAudit:\n- Logs action to admin_action_log table\n- Logs to application logs with actor + target emails\n\nAdmin visibility:\n- GET /auth/admin/users/{id} shows sync_suspension: {sync_paused, reason_code, pending_jobs_held}\n- Makes it clear sync is paused intentionally (not an error)\n\nReturns clear success/error messages for the admin UI.","operationId":"suspend_user_auth_admin_users__user_id__suspend_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuspendUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/admin/users/{user_id}/activate":{"post":{"tags":["Authentication"],"summary":"Activate User","description":"Activate a suspended user account.\n\nSets is_active=true which:\n- Allows the user to log in again\n- Restores API access\n- Resumes calendar sync for this user's exports:\n  * Enqueues catch-up delta syncs (coalesce=True avoids duplicates)\n  * Job workers will now fetch and process pending jobs (SQL filter)\n  * Push notifications will enqueue new work normally\n  * Poll task will include this user's calendars again\n  * Horizon extend will resume\n  * Watch renewal will re-create expired channels on next run (hourly)\n\nAudit:\n- Logs action to admin_action_log table\n- Logs to application logs with actor + target emails\n\nReturns clear success/error messages for the admin UI.","operationId":"activate_user_auth_admin_users__user_id__activate_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/admin/users/{user_id}/extend-trial":{"post":{"tags":["Authentication"],"summary":"Extend Trial","description":"Extend a user's trial period.\n\nAccepts either:\n- `days`: Number of days to extend from current trial_end (or now if expired)\n- `until`: ISO8601 date to set as new trial_end\n\nThis is a local DB override only - does NOT sync to Stripe.\n\nSecurity limits:\n- `days` > 90 requires confirm_long_extension=true\n- `until` > 365 days from now requires confirm_long_extension=true\n\nAudit:\n- Logs action to admin_action_log table\n- Logs to application logs with actor + target emails\n\nReturns:\n- Updated subscription details\n- Clear error messages for validation failures (422)\n- 404 if user or subscription not found","operationId":"extend_trial_auth_admin_users__user_id__extend_trial_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendTrialRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendTrialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/admin/user-usage":{"get":{"tags":["Authentication"],"summary":"Get User Usage Stats","description":"Get user usage statistics for admin dashboard.\n\n**Authentication:** Requires `x-auth-token` header with superuser privileges\n\nReturns:\n- total_users: Total number of users in the system\n- active_users: Number of users who have logged in or created an event in the last 30 days\n- active_definition: Explanation of how \"active\" is defined\n- token_active_users: Number of distinct users with a successful token check in the last 30 days\n- token_active_definition: Explanation of how \"token_active_users\" is defined\n- users: List of all users with their usage statistics\n  - user_id: User's unique identifier\n  - email: User's email address\n  - display_name: User's display name (if set)\n  - last_login: Last time the user logged in (may be null if not tracked)\n  - last_token_check_at: Last time a valid token was presented (may be null)\n  - last_event_created_at: Last time the user created an event\n  - calendar_count: Number of calendars synced for this user","operationId":"get_user_usage_stats_auth_admin_user_usage_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/admin/llm-usage":{"get":{"tags":["Authentication"],"summary":"Admin Llm Spend","description":"Spend for every user. Dates are inclusive UTC calendar days.","operationId":"admin_llm_spend_auth_admin_llm_usage_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To"}},{"name":"bucket","in":"query","required":false,"schema":{"enum":["day","week","month"],"type":"string","default":"day","title":"Bucket"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmSpendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/admin/users/{user_id}/llm-usage":{"get":{"tags":["Authentication"],"summary":"Admin User Llm Spend","description":"Spend for one user. Unknown users are 404. top_users is empty.","operationId":"admin_user_llm_spend_auth_admin_users__user_id__llm_usage_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To"}},{"name":"bucket","in":"query","required":false,"schema":{"enum":["day","week","month"],"type":"string","default":"day","title":"Bucket"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmSpendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/admin/metrics/acquisition":{"get":{"tags":["Authentication"],"summary":"Admin Acquisition Metrics","description":"New accounts, trial starts, and first paid subscriptions.\n\nDates are inclusive UTC calendar days. `from`, `to`, and `bucket` match\nGET /auth/admin/llm-usage. Week buckets start Monday. Month buckets start\non the 1st. Empty buckets are included. The range cannot exceed 366 days.\n\nnew_users counts userdb rows created in the bucket. Login, verification,\nprofile edits, and token checks do not add a point.\n\nnew_trials counts trial starts. The day is trial_started_at, or created_at\nwhile the row is still a trial and has never been paid. A conversion keeps\nthe original trial day. Extending a trial does not count again. A direct\npaid signup is not a trial.\n\nnew_subscriptions counts paid_started_at. It is set once, when a trial\nconverts or a checkout first becomes paid (status active, past_due, or\nunpaid). A trial start is not a paid subscription. Renewals are not counted\nagain.\n\nTotals are those counts over the whole window. Someone who starts a trial\nand later pays is one new user, one new trial, and one new subscription,\non the days those events happened. Paid rows from before paid_started_at\nwas stored are left out, because that day was not kept.\n\n`by_ref` splits the same three counts by the user's first-touch ref.\nAccounts with no ref are the null entry, not dropped. A renewal does not\nadd another new_subscription and does not move the ref. `points` and\n`totals` stay the aggregate series.\n\nCurrent revenue, retention, and churn for each ref are on\nGET /auth/admin/metrics/sources. Amounts are not stored on the subscription,\nso that route reports counts and leaves money null.","operationId":"admin_acquisition_metrics_auth_admin_metrics_acquisition_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive UTC start date. Defaults to 30 days before to.","title":"From"},"description":"Inclusive UTC start date. Defaults to 30 days before to."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive UTC end date. Defaults to today.","title":"To"},"description":"Inclusive UTC end date. Defaults to today."},{"name":"bucket","in":"query","required":false,"schema":{"enum":["day","week","month"],"type":"string","description":"Chart granularity. Same values as /auth/admin/llm-usage.","default":"day","title":"Bucket"},"description":"Chart granularity. Same values as /auth/admin/llm-usage."},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcquisitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/admin/metrics/sources":{"get":{"tags":["Authentication"],"summary":"Admin Source Metrics","description":"Signups, trials, first payments, retention, churn, and the money gap by ref.\n\n`from`, `to`, and `bucket` match GET /auth/admin/metrics/acquisition, including\nthe 366-day cap. Those parameters filter `acquisition` only.\n\n`retention` and `money` are the live state of every account on that ref at\n`as_of`. The null ref is every account with no stored source. A user who\nstarts a trial and later pays, renews, or cancels stays on the original ref.\n\n`money.status` is `unavailable` and the amount fields are null. Subscription\nrows do not store a price amount, currency, or interval, and paid invoices\nare not stored. The route does not call Stripe. `active_paid_subscriptions`\nis a count. `active_paid_by_price` counts those subscriptions by the stored\nstripe_price_id and the local tier name.","operationId":"admin_source_metrics_auth_admin_metrics_sources_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive UTC start date. Same parameter as /auth/admin/metrics/acquisition.","title":"From"},"description":"Inclusive UTC start date. Same parameter as /auth/admin/metrics/acquisition."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive UTC end date. Same parameter as /auth/admin/metrics/acquisition.","title":"To"},"description":"Inclusive UTC end date. Same parameter as /auth/admin/metrics/acquisition."},{"name":"bucket","in":"query","required":false,"schema":{"enum":["day","week","month"],"type":"string","description":"Bucket for the acquisition series inside each source. Retention ignores this.","default":"day","title":"Bucket"},"description":"Bucket for the acquisition series inside each source. Retention ignores this."},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys":{"post":{"tags":["API Keys"],"summary":"Create Api Key","description":"Create a key. The full key is returned once, in this response only.","operationId":"create_api_key_api_keys_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["API Keys"],"summary":"List Api Keys","description":"List the caller's keys. The secret is never included.","operationId":"list_api_keys_api_keys_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyOut"},"title":"Response List Api Keys Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/{key_id}":{"get":{"tags":["API Keys"],"summary":"Get Api Key","operationId":"get_api_key_api_keys__key_id__get","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Key Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["API Keys"],"summary":"Update Api Key","operationId":"update_api_key_api_keys__key_id__patch","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Key Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["API Keys"],"summary":"Delete Api Key","description":"Revoke the key. The row stays so the prefix remains identifiable.","operationId":"delete_api_key_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Key Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/{key_id}/revoke":{"post":{"tags":["API Keys"],"summary":"Revoke Api Key","operationId":"revoke_api_key_api_keys__key_id__revoke_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Key Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/{key_id}/rotate":{"post":{"tags":["API Keys"],"summary":"Rotate Api Key","description":"Revoke this key and return a new one with the same name, scopes, calendars, and expiry.","operationId":"rotate_api_key_api_keys__key_id__rotate_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Key Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/checkout":{"post":{"tags":["Subscriptions"],"summary":"Create Checkout Session","description":"Create a Stripe Checkout session for subscription purchase.\n\nprice_id must be an active recurring price of a configured subscription\nproduct. Archived, one-time, and other-product prices are rejected.\n\nArgs:\n    price_id: Stripe Price ID\n    success_url: URL to redirect after successful payment\n    cancel_url: URL to redirect if payment is canceled\n\nReturns:\n    Checkout session URL","operationId":"create_checkout_session_subscription_checkout_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/portal":{"post":{"tags":["Subscriptions"],"summary":"Create Portal Session","description":"Create a Stripe Customer Portal session for subscription management.\n\nArgs:\n    return_url: URL to return to after managing subscription\n\nReturns:\n    Portal session URL","operationId":"create_portal_session_subscription_portal_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_create_portal_session_subscription_portal_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/status":{"get":{"tags":["Subscriptions"],"summary":"Get Subscription Status","description":"Get current subscription status for the authenticated user.\n\nReturns:\n    Subscription information including status, tier, and expiration","operationId":"get_subscription_status_subscription_status_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/tiers":{"get":{"tags":["Subscriptions"],"summary":"Get Subscription Tiers","description":"List subscription tiers for the pricing page.\n\nNames and levels come from the local catalog. Amount, currency, interval,\nand tax behavior are read from the Stripe Price and cached in this process\nfor at most 60 seconds. Inactive prices are left out of this list. If\nStripe cannot be reached, the price fields are null and price_status is\n\"unavailable\".","operationId":"get_subscription_tiers_subscription_tiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SubscriptionTierOutput"},"type":"array","title":"Response Get Subscription Tiers Subscription Tiers Get"}}}}}}},"/subscription/admin/sync-tiers":{"post":{"tags":["Subscriptions"],"summary":"Sync Subscription Tiers","description":"Sync subscription tiers from Stripe products.\n\nFetches all active Stripe products with metadata and creates/updates\ntier records in the database.\n\nRequired Stripe product metadata:\n- tier_level: Integer (1=Pro, 2=Enterprise, etc.)\n- tier_name: String (display name for the tier)\n\nExample Stripe product setup:\n1. Create Product: \"Pro Plan\"\n2. Add metadata: tier_level=1, tier_name=Pro\n3. Create Price (monthly/yearly)\n4. Call this endpoint to sync\n\nNote: Trial tier (tier_level=0) is created automatically\n\nReturns:\n    Summary of created/updated/skipped tiers","operationId":"sync_subscription_tiers_subscription_admin_sync_tiers_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stripe/webhook":{"post":{"tags":["Stripe"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events.\nVerifies signature and routes events to appropriate handlers.","operationId":"stripe_webhook_stripe_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/events/admin/webhooks/{webhook_id}/runs":{"post":{"tags":["Admin"],"summary":"Admin Create Webhook Run","operationId":"admin_create_webhook_run_events_admin_webhooks__webhook_id__runs_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Webhook Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRunCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRunOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/admin/webhooks/runs":{"get":{"tags":["Admin"],"summary":"Admin List All Webhook Runs","operationId":"admin_list_all_webhook_runs_events_admin_webhooks_runs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookRunOutput"},"title":"Response Admin List All Webhook Runs Events Admin Webhooks Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/admin/all-events":{"get":{"tags":["Admin"],"summary":"Admin List All Events","description":"List all recurrent events across all users (admin only).\n\n**Authentication:** Requires `x-auth-token` header with superuser privileges\n\nThis endpoint is only accessible to superusers and returns all events\nin the system regardless of ownership.\n\nOptional filters:\n- is_active: Filter by active status\n- limit: Maximum number of results\n- offset: Number of results to skip","operationId":"admin_list_all_events_events_admin_all_events_get","parameters":[{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdvancedRecurrentEventOutput-Output"},"title":"Response Admin List All Events Events Admin All Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/admin/all-calendars":{"get":{"tags":["Admin - Calendars"],"summary":"Admin List All Calendars","description":"List all calendars across all users (admin only).\n\n**Authentication:** Requires `x-auth-token` header with superuser privileges\n\nThis endpoint is only accessible to superusers and returns all calendars\nin the system regardless of ownership.\n\nOptional filters:\n- is_active: Filter by active status\n- limit: Maximum number of results\n- offset: Number of results to skip","operationId":"admin_list_all_calendars_calendars_admin_all_calendars_get","parameters":[{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum number of results","title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of results to skip","title":"Offset"},"description":"Number of results to skip"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CalendarOutput"},"title":"Response Admin List All Calendars Calendars Admin All Calendars Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/admin/calendar/{calendar_id}/users":{"get":{"tags":["Admin - Calendars"],"summary":"Admin List Calendar Users","description":"List all users with access to a calendar (admin only).\n\n**Authentication:** Requires `x-auth-token` header with superuser privileges\n\nReturns list of users with their role for this calendar.","operationId":"admin_list_calendar_users_calendars_admin_calendar__calendar_id__users_get","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Admin List Calendar Users Calendars Admin Calendar  Calendar Id  Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events":{"get":{"tags":["Recurrent Events"],"summary":"List Events","description":"List all recurrent events for the authenticated user.\n\n**Authentication:** Requires `x-auth-token` header\n\nEvents combine multiple recurrence patterns using boolean operators\n(OR, AND, NOT, XOR) to create complex schedules.\n\nOptional filters:\n- is_active: Filter by active status\n- minimal: Return minimal event info for fast listings\n- limit: Maximum number of results\n- offset: Number of results to skip","operationId":"list_events_events_get","parameters":[{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"minimal","in":"query","required":false,"schema":{"type":"boolean","description":"If true, return minimal event data for fast listings","default":false,"title":"Minimal"},"description":"If true, return minimal event data for fast listings"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AdvancedRecurrentEventOutput-Output"}},{"type":"array","items":{"$ref":"#/components/schemas/AdvancedRecurrentEventMinimalOutput"}}],"title":"Response List Events Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Recurrent Events"],"summary":"Create Event","description":"Create a new recurrent event with multiple recurrence patterns\ncombined using boolean operations.\n\n**Authentication:** Requires `x-auth-token` header\n\n**Boolean Operators:**\n- `OR`: Union - includes instances from both patterns\n- `AND`: Intersection - only instances that match both patterns\n- `NOT`: Difference - excludes instances matching the pattern\n- `XOR`: Symmetric difference - instances in one pattern but not both\n\n**Example - Weekdays except holidays:**\n```json\n{\n  \"name\": \"Workdays\",\n  \"description\": \"Every weekday except holidays\",\n  \"components\": [\n    {\n      \"operator\": \"OR\",\n      \"event_config\": {\n        \"recurrence\": 1,\n        \"start_time\": \"09:00\",\n        \"config\": {\n          \"interval\": 1,\n          \"days_of_week\": [0, 1, 2, 3, 4]\n        }\n      }\n    },\n    {\n      \"operator\": \"NOT\",\n      \"event_config\": {\n        \"recurrence\": 4,\n        \"start_time\": \"09:00\",\n        \"config\": {\n          \"scheduled_datetime\": \"2024-12-25T09:00:00\"\n        }\n      }\n    }\n  ]\n}\n```","operationId":"create_event_events_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedRecurrentEventCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedRecurrentEventOutput-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Recurrent Events"],"summary":"Batch Delete Events","description":"Delete multiple recurrent events by id.\n\n**Authentication:** Requires `x-auth-token` header\n\nRequest body: `{ \"event_ids\": [\"uuid\", ...] }`. Ids the user can access are\ndeleted. Ids that are already missing, duplicated, or not accessible are\nskipped. Response includes `deleted`, `skipped`, and any Google or sync\nwarnings from the deletes that ran.","operationId":"batch_delete_events_events_delete","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchDeleteEventsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchDeleteEventsResponseWithWarnings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/batch":{"post":{"tags":["Recurrent Events"],"summary":"List Events Batch","description":"List recurrent events by IDs (request body). Same filters as GET /events\n(is_active, minimal, limit, offset) as query params. Use this when requesting\nmany IDs to avoid URL length limits.","operationId":"list_events_batch_events_batch_post","parameters":[{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"minimal","in":"query","required":false,"schema":{"type":"boolean","description":"If true, return minimal event data for fast listings","default":false,"title":"Minimal"},"description":"If true, return minimal event data for fast listings"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEventsBatchBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AdvancedRecurrentEventOutput-Output"}},{"type":"array","items":{"$ref":"#/components/schemas/AdvancedRecurrentEventMinimalOutput"}}],"title":"Response List Events Batch Events Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/feedback":{"get":{"tags":["Recurrent Events","Feedback"],"summary":"List Event Feedback","description":"List all event feedback with optional filtering.\n\n**Authentication:** Requires `x-auth-token` header\n\nThis endpoint returns all event feedback in the system. Since feedback is anonymous,\nthis endpoint is accessible to all authenticated users.\n\n**Optional Query Parameters:**\n- `value`: Filter by feedback value (1 for likes, -1 for dislikes)\n- `limit`: Maximum number of results to return\n- `offset`: Number of results to skip (for pagination)\n\n**Examples:**\n```\n# Get all feedback\nGET /events/feedback\n\n# Get only positive feedback (likes)\nGET /events/feedback?value=1\n\n# Get only negative feedback (dislikes)\nGET /events/feedback?value=-1\n\n# Paginated results\nGET /events/feedback?limit=10&offset=20\n```","operationId":"list_event_feedback_events_feedback_get","parameters":[{"name":"value","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by feedback value: 1 for likes, -1 for dislikes","title":"Value"},"description":"Filter by feedback value: 1 for likes, -1 for dislikes"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum number of results","title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of results to skip","title":"Offset"},"description":"Number of results to skip"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventFeedbackOutput"},"title":"Response List Event Feedback Events Feedback Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Recurrent Events","Feedback"],"summary":"Submit Event Feedback","description":"Submit anonymous feedback on an event.\n\n**Authentication:** Requires `x-auth-token` header\n\nThis endpoint allows users to provide feedback on events, including both\npersisted events and preview events (which are not saved to the database).\nThe event data is stored as a JSON snapshot for analysis.\n\n**Request Body:**\n- `value`: Feedback value - 1 for like, -1 for dislike (required)\n- `event_data`: Complete event object to store (required)\n- `message`: Optional text feedback message (max 5000 characters)\n\n**Example Request:**\n```json\n{\n  \"value\": 1,\n  \"event_data\": {\n    \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n    \"name\": \"Weekly Team Meeting\",\n    \"description\": \"Team standup meeting\",\n    \"components\": [...]\n  },\n  \"message\": \"This feature is really helpful!\"\n}\n```\n\n**Note:** Feedback is anonymous and not linked to user accounts.","operationId":"submit_event_feedback_events_feedback_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventFeedbackCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventFeedbackOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}":{"get":{"tags":["Recurrent Events"],"summary":"Get Event","description":"Get a specific recurrent event by ID.\n\n**Authentication:** Requires `x-auth-token` header","operationId":"get_event_events__event_id__get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedRecurrentEventOutput-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Recurrent Events"],"summary":"Update Event","description":"Partially update an existing recurrent event.\n\n**Authentication:** Requires `x-auth-token` header\n\nThis endpoint supports partial updates - you can send only the fields you want to update.\n\n**Fields:**\n- `name`: Update the event name (optional)\n- `description`: Update the event description (optional)\n- `components`: Replace all components with new configuration (optional). \n  If provided, old components and their associated RecurrentEvents will be deleted.\n\n**Examples:**\n```json\n# Update only the name\n{\n  \"name\": \"New Event Name\"\n}\n\n# Update name and description\n{\n  \"name\": \"New Event Name\",\n  \"description\": \"Updated description\"\n}\n\n# Update all fields including components\n{\n  \"name\": \"New Event Name\",\n  \"description\": \"Updated description\",\n  \"components\": [...]\n}\n```","operationId":"update_event_events__event_id__put","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedRecurrentEventUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedRecurrentEventOutputWithWarnings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Recurrent Events"],"summary":"Delete Event","description":"Delete a recurrent event.\n\n**Authentication:** Requires `x-auth-token` header\n\nThis will also delete all associated components and their RecurrentEvents\ndue to cascade deletion.","operationId":"delete_event_events__event_id__delete","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDeleteResponseWithWarnings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/from-recurrence-text":{"post":{"tags":["Recurrent Events"],"summary":"Create Event From Text","description":"Create a new recurrent event from a natural language description.\n\n**Authentication:** Requires `x-auth-token` header\n\nThis endpoint uses AI to parse natural language recurrence descriptions\ninto structured Recurrent Event configurations.\n\n**Request Body:**\n- `name`: User-provided event name (required)\n- `recurrence_text`: Natural language description of the recurrence pattern (required)\n- `description`: Optional event description\n- `timezone`: Timezone for the event (default: \"UTC\")\n- `model`: Model configuration (default: \"high\"):\n  - `\"high\"`: Detailed prompt with GPT-4o-mini (balanced quality/cost)\n  - `\"low\"`: Compact prompt with GPT-4o-mini (fastest, cheapest)\n  - `\"mega\"`: Detailed prompt with GPT-5 (highest quality, most expensive)\n\n**Examples of recurrence_text:**\n- \"Every Monday at 10 AM\"\n- \"Weekdays from 9 to 5, except the 13th of every month\"\n- \"First and last Friday of each month at 2 PM\"\n- \"Every Monday and Wednesday, from 9:00 to 12:00 and 13:00 to 17:00\"\n\n**Example Request:**\n```json\n{\n  \"name\": \"Weekly Team Meeting\",\n  \"recurrence_text\": \"Every Monday at 10 AM\",\n  \"description\": \"Team standup meeting\",\n  \"timezone\": \"America/New_York\"\n}\n```\n\n**Note:** This endpoint requires an API key to be configured.","operationId":"create_event_from_text_events_from_recurrence_text_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedEventFromTextCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedRecurrentEventOutput-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/from-recurrence-text":{"put":{"tags":["Recurrent Events"],"summary":"Update Event From Text","description":"Update an existing recurrent event from a natural language description.\n\n**Authentication:** Requires `x-auth-token` header\n\nThis endpoint uses AI to parse natural language recurrence descriptions\nand update the event's components. This will replace all existing components\nwith the new configuration from the natural language prompt.\n\n**Request Body:**\n- `name`: User-provided event name (required)\n- `recurrence_text`: Natural language description of the recurrence pattern (required)\n- `description`: Optional event description\n- `timezone`: Timezone for the event (default: \"UTC\")\n- `model`: Model configuration (default: \"high\"):\n  - `\"high\"`: Detailed prompt with GPT-4o-mini (balanced quality/cost)\n  - `\"low\"`: Compact prompt with GPT-4o-mini (fastest, cheapest)\n  - `\"mega\"`: Detailed prompt with GPT-5 (highest quality, most expensive)\n\n**Examples of recurrence_text:**\n- \"Every Monday at 10 AM\"\n- \"Weekdays from 9 to 5, except the 13th of every month\"\n- \"First and last Friday of each month at 2 PM\"\n- \"Every Monday and Wednesday, from 9:00 to 12:00 and 13:00 to 17:00\"\n\n**Example Request:**\n```json\n{\n  \"name\": \"Weekly Team Meeting\",\n  \"recurrence_text\": \"Every Tuesday at 11 AM\",\n  \"description\": \"Updated team standup meeting time\",\n  \"timezone\": \"America/New_York\"\n}\n```\n\n**Note:** This endpoint requires an API key to be configured.\nOld components and their RecurrentEvents will be deleted.","operationId":"update_event_from_text_events__event_id__from_recurrence_text_put","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedEventFromTextUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedRecurrentEventOutputWithWarnings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/from-recurrence-text/preview":{"post":{"tags":["Recurrent Events"],"summary":"Preview Event From Text","description":"Preview event instances from natural language without saving to database.\n\n**Authentication:** Requires `x-auth-token` header\n\nThis is the free-tier endpoint that parses natural language recurrence descriptions\nand returns calculated instances without persisting the event to the database.\nReturns JSON only - use `/from-recurrence-text/preview/download` to get ICS or CSV formats.\n\n**Request Body:**\n- `name`: User-provided event name (required)\n- `recurrence_text`: Natural language description of the recurrence pattern (required)\n- `description`: Optional event description\n- `timezone`: Timezone for the event (default: \"UTC\")\n- `start`: Start of date range for calculating instances (ISO format, required)\n- `end`: End of date range for calculating instances (ISO format, required)\n- `model`: Documentation mode - \"high\" for detailed prompt (slower, more accurate) or \"low\" for compact prompt (faster, cheaper) (default: \"high\")\n\n**Example Request:**\n```json\n{\n  \"name\": \"Weekly Team Meeting\",\n  \"recurrence_text\": \"Every Monday at 10 AM\",\n  \"description\": \"Team standup meeting\",\n  \"timezone\": \"America/New_York\",\n  \"start\": \"2024-01-01T00:00:00Z\",\n  \"end\": \"2024-12-31T23:59:59Z\"\n}\n```\n\n**Response:**\nReturns JSON with event details and array of instances. The `components` array\ncan be used with `/from-recurrence-text/preview/download` to get ICS or CSV formats without re-parsing.\n\n**Note:** This endpoint requires an API key to be configured.\nIntended for use via Next.js server-side API routes with a free-tier token.","operationId":"preview_event_from_text_events_from_recurrence_text_preview_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedEventFromTextPreview"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/webhooks":{"get":{"tags":["Recurrent Events"],"summary":"List Event Webhooks","operationId":"list_event_webhooks_events__event_id__webhooks_get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventWebhookOutput"},"title":"Response List Event Webhooks Events  Event Id  Webhooks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Recurrent Events"],"summary":"Create Event Webhook","operationId":"create_event_webhook_events__event_id__webhooks_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventWebhookCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventWebhookOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/webhooks/{webhook_id}":{"get":{"tags":["Recurrent Events"],"summary":"Get Event Webhook","operationId":"get_event_webhook_events__event_id__webhooks__webhook_id__get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Webhook Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventWebhookOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Recurrent Events"],"summary":"Update Event Webhook","operationId":"update_event_webhook_events__event_id__webhooks__webhook_id__put","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Webhook Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventWebhookCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventWebhookOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Recurrent Events"],"summary":"Delete Event Webhook","operationId":"delete_event_webhook_events__event_id__webhooks__webhook_id__delete","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Webhook Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/guests":{"get":{"tags":["Recurrent Events"],"summary":"List Event Guests","operationId":"list_event_guests_events__event_id__guests_get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventGuestOutput"},"title":"Response List Event Guests Events  Event Id  Guests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Recurrent Events"],"summary":"Create Event Guest","operationId":"create_event_guest_events__event_id__guests_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventGuestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventGuestOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/guests/{guest_id}":{"patch":{"tags":["Recurrent Events"],"summary":"Update Event Guest","operationId":"update_event_guest_events__event_id__guests__guest_id__patch","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"guest_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Guest Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventGuestUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventGuestOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Recurrent Events"],"summary":"Delete Event Guest","operationId":"delete_event_guest_events__event_id__guests__guest_id__delete","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"guest_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Guest Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/conference-data/generate":{"post":{"tags":["Recurrent Events"],"summary":"Generate Event Conference Data","operationId":"generate_event_conference_data_events__event_id__conference_data_generate_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConferenceDataGenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/conference-data":{"put":{"tags":["Recurrent Events"],"summary":"Update Event Conference Data","operationId":"update_event_conference_data_events__event_id__conference_data_put","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConferenceDataUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConferenceDataOutput"},{"type":"null"}],"title":"Response Update Event Conference Data Events  Event Id  Conference Data Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/guest-invitations":{"post":{"tags":["Recurrent Events"],"summary":"Send Guest Invitations","operationId":"send_guest_invitations_events__event_id__guest_invitations_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuestInvitationSendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuestInvitationSendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/guests/rsvp/{token}":{"get":{"tags":["Recurrent Events"],"summary":"Rsvp Guest Invitation","operationId":"rsvp_guest_invitation_events_guests_rsvp__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"response","in":"query","required":false,"schema":{"type":"string","description":"accepted | declined | tentative | needsAction","default":"accepted","title":"Response"},"description":"accepted | declined | tentative | needsAction"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/webhooks/{webhook_id}/runs":{"get":{"tags":["Recurrent Events"],"summary":"List Webhook Runs","operationId":"list_webhook_runs_events__event_id__webhooks__webhook_id__runs_get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Webhook Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookRunOutput"},"title":"Response List Webhook Runs Events  Event Id  Webhooks  Webhook Id  Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/from-recurrence-text/preview/download":{"post":{"tags":["Recurrent Events"],"summary":"Download Preview Event","description":"Download preview event in ICS or CSV format without re-parsing or re-calculating.\n\n**Authentication:** Requires `x-auth-token` header\n\nThis endpoint accepts the complete preview response from `/from-recurrence-text/preview` and generates\nICS or CSV files from the already-calculated instances (faster, cheaper, consistent).\n\n**Request Body:**\n- `preview`: Complete response object from `/from-recurrence-text/preview` (required)\n- `format`: Response format - 'ics' or 'csv' (required)\n\n**Example Request:**\n```json\n{\n  \"preview\": {\n    \"event\": { ... },\n    \"instances\": [ ... ]\n  },\n  \"format\": \"ics\"\n}\n```\n\n**Response:**\n- `ics`: Returns downloadable iCalendar file\n- `csv`: Returns downloadable CSV file\n\n**Workflow:**\n1. Call `/from-recurrence-text/preview` to parse natural language and get JSON with event + instances\n2. Pass the entire preview response to this endpoint with desired format for download\n\n**Note:** This endpoint does NOT re-parse or re-calculate instances - it simply formats\nthe data you already received from the preview endpoint.","operationId":"download_preview_event_events_from_recurrence_text_preview_download_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedEventFromTextPreviewDownload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/from-ics":{"post":{"tags":["Recurrent Events"],"summary":"Create Event From Ics","description":"Create one or more recurrent events from iCalendar (.ics) content.\n\n**Authentication:** Requires `x-auth-token` header\n\nThis endpoint parses iCalendar format and converts RRULE, EXDATE, and RDATE\npatterns into AnyMoment AdvancedRecurrentEvent configurations.\n\n**Request Body:**\n- `name`: Optional base name for imported events (individual events will use names from ICS)\n- `ics_content`: Raw iCalendar (.ics) content as a string\n- `description`: Optional description to add to all imported events\n- `timezone`: Default timezone for events without TZID (default: \"UTC\")\n\n**Supported iCalendar Features:**\n- RRULE patterns (DAILY, WEEKLY, MONTHLY, YEARLY, etc.)\n- EXDATE exclusions\n- RDATE additional dates\n- Timezone information (TZID)\n- All-day vs timed events\n\n**Example Request:**\n```json\n{\n  \"name\": \"Imported Calendar\",\n  \"ics_content\": \"BEGIN:VCALENDAR\\nVERSION:2.0\\n...\\nEND:VCALENDAR\",\n  \"timezone\": \"America/New_York\"\n}\n```\n\n**Returns:** Detailed import results showing successful and failed events\n```\n{\n  \"events\": [\n    {\n      \"event\": {...},  // Full AdvancedRecurrentEventOutput if successful\n      \"error\": null,   // Error message if failed\n      \"event_index\": 0,\n      \"summary\": \"Event Name\",\n      \"component_data\": {...}  // Original ICS data for failed events\n    }\n  ],\n  \"total_events\": 1,\n  \"successful_imports\": 1,\n  \"failed_imports\": 0,\n  \"errors\": []  // High-level errors during processing\n}\n```","operationId":"create_event_from_ics_events_from_ics_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedEventFromICSCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedEventFromICSResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/toggle":{"patch":{"tags":["Recurrent Events"],"summary":"Toggle Event Active","description":"Toggle the active status of a recurrent event.\n\n**Authentication:** Requires `x-auth-token` header","operationId":"toggle_event_active_events__event_id__toggle_patch","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedRecurrentEventOutputWithWarnings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/loose-events":{"delete":{"tags":["Recurrent Events"],"summary":"Delete My Loose Events","description":"Delete all loose events of the current user (events not attached to any calendar).\n\nOwnership matches `GET /events`: a membership link or `created_by_user_id`.\nThere is no page limit. Registered before `DELETE /{event_id}` so the static\npath is not captured as an event id.\n\nResponse: `{ \"deleted\": <count>, \"skipped\": <count> }`.","operationId":"delete_my_loose_events_events_loose_events_delete","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDeleteCountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/instances":{"get":{"tags":["Recurrent Events"],"summary":"Get Event Instances Endpoint","description":"Get all instances of a recurrent event within a specified date range.\n\n**Authentication:** Requires `x-auth-token` header\n\nThis endpoint calculates instances by combining multiple recurrence patterns\nusing boolean operations (OR, AND, NOT, XOR).\n\nReturns the event details along with an array of all occurrences between\nthe start and end datetimes, after applying boolean operations.\n\n**Format Options:**\n- `json` (default): Returns JSON with event details and instances\n- `ics`: Returns iCalendar format (.ics file) suitable for import into calendar applications\n- `csv`: Returns CSV format for spreadsheet analysis\n\n**Examples:**\n```\n# JSON format\nGET /events/{event_id}/instances?start=2024-01-01T00:00:00&end=2024-12-31T23:59:59\n\n# ICS format\nGET /events/{event_id}/instances?start=2024-01-01T00:00:00&end=2024-12-31T23:59:59&format=ics\n\n# CSV format\nGET /events/{event_id}/instances?start=2024-01-01T00:00:00&end=2024-12-31T23:59:59&format=csv\n```\n\n**JSON Response includes:**\n- event: Full event details with all components\n- instances: Array of occurrences after boolean operations, each with:\n  - start: DateTime when this instance starts\n  - end: DateTime when this instance ends (null for point-in-time events)\n  - is_all_day: Whether this is an all-day event\n\n**Optimized JSON Response (optimized=true):**\n- event_id: Event ID\n- instances: Array of occurrences (same shape as above)\n\n**ICS Response:**\n- Returns a complete iCalendar file that can be saved as .ics and imported\n\n**CSV Response:**\n- Returns CSV file with columns: Event Name, Start Date, Start Time, End Date, End Time, Duration, All Day, ISO Start, ISO End","operationId":"get_event_instances_endpoint_events__event_id__instances_get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Start of date range (ISO format)","title":"Start"},"description":"Start of date range (ISO format)"},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"End of date range (ISO format)","title":"End"},"description":"End of date range (ISO format)"},{"name":"format","in":"query","required":false,"schema":{"enum":["json","ics","csv"],"type":"string","description":"Response format: 'json' (default), 'ics' for iCalendar, or 'csv'","default":"json","title":"Format"},"description":"Response format: 'json' (default), 'ics' for iCalendar, or 'csv'"},{"name":"include_webhooks","in":"query","required":false,"schema":{"type":"boolean","description":"If true (default), include webhooks in event payload (slower)","default":true,"title":"Include Webhooks"},"description":"If true (default), include webhooks in event payload (slower)"},{"name":"optimized","in":"query","required":false,"schema":{"type":"boolean","description":"If true, return only event_id and instances (JSON only)","default":false,"title":"Optimized"},"description":"If true, return only event_id and instances (JSON only)"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AdvancedEventInstanceResponse-Output"},{"$ref":"#/components/schemas/AdvancedEventInstanceOptimizedResponse"}],"title":"Response Get Event Instances Endpoint Events  Event Id  Instances Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/next-instance":{"get":{"tags":["Recurrent Events"],"summary":"Get Event Next Instance","operationId":"get_event_next_instance_events__event_id__next_instance_get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventInstanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/extract":{"post":{"tags":["Recurrent Events"],"summary":"Extract And Create Events","description":"Extract events from natural language (or voice) and create them as recurrent events.\n\n**Authentication:** Requires `x-auth-token` header\n\nAccepts either:\n- **application/json**: Body is ChatExtractEventsRequest (text, context, timezone, model, calendar_id).\n- **multipart/form-data**: Required `audio` file part; optional form fields: context, timezone, model, calendar_id.\n  Audio is transcribed via Whisper (or configured STT), then the same extraction pipeline runs on the text.\n\nText with no URL is extracted in this request. The response is the finished\nresult and `job` is null.\n\nA URL in `text` is not fetched in this request. The response comes back\nimmediately with `job.id`, `job.status` `pending`, and one `page_reads` row\nper URL with `status` `pending`. Words around the URL are instructions for\nthat read (for example \"only the Saturday shows\"), not an event of their own.\nPoll `GET /events/extract/jobs/{job_id}`, or listen for the websocket\nmessage `page_extract_job`. iCalendar links are imported directly inside the\njob. HTML pages are extracted with the model under `page_extract`.\n\n`watch_request` is set on this response when the user's own words ask to\nkeep watching the page, including while the read is still pending. It is\nnull when they did not ask, and null when the text has no URL. The page\ncannot set it, and this endpoint does not create a watch. The user confirms\nthat in the client. `interval` is `daily`, `weekly`, `monthly`, `yearly`,\nor null when they asked to watch but named no frequency. Use\n`suggested_interval` on the finished job in that case. `weekday` is Monday\n0 through Sunday 6, or null. `day_of_month` is 1 through 31 or null.\n`month` is 1 through 12 or null. `anchor_time` is `HH:MM` or null.\n`source` is `user_text`.\n\n**Response includes:**\n- `job`: Present only when the text had a URL. Poll the job for the result.\n- `extracted_events`: Events found. Empty until a page-read job finishes, and empty here when `job` is set. `source_url` is set when the event came from a link.\n- `created_events`: Results of attempting to create each event. Empty when `job` is set.\n- `summary`: Counts of total extracted, successfully created, and failed events. Zeros when `job` is set.\n- `page_reads`: One entry per URL. Empty when the text had no URL.\n  `status` `pending` is not an error (`message` is null). After the job finishes, `ok` false means that URL failed; show `message`.\n- `watch_request`: Null, or the page watch the user's text asked for. See the fields above. Not created server-side.\n- `suggested_interval`: Null on this response while a page read is pending. The finished job has the value.\n\n**Note:** Requires OpenAI API key for LLM and (for voice) for Whisper.\nReading a calendar feed does not call the model. Subscription gating is unchanged.","operationId":"extract_and_create_events_events_extract_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatExtractEventsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/extract/jobs/{job_id}":{"get":{"tags":["Recurrent Events"],"summary":"Get Page Extract Job","description":"Status of a background page read started by `POST /events/extract`.\n\n**Authentication:** Requires `x-auth-token` header. Only the user who\nstarted the job can read it. Another user, and an unknown id, both get 404.\n\n`status` is `pending`, `running`, `done`, or `failed`. `done` includes the\nextracted events, created events, summary, created event ids, and page reads\nthe synchronous extract used to return. `failed` sets `message` and does not\nstay `pending`.\n\n`suggested_interval` is `daily`, `weekly`, `monthly`, or `yearly` once a\npage has been read, and null before that. `watch_request` is the same object\nas on `POST /events/extract`: what the user's text asked, or null. It is\nalready set while this job is pending. It is not a watch, and the page\ncannot change it.","operationId":"get_page_extract_job_events_extract_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Job Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageExtractJobStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/refresh/changes":{"get":{"tags":["Refresh"],"summary":"Poll User Changes","description":"Poll for event/calendar changes for the authenticated user.\n\n**Authentication:** Requires `x-auth-token` header","operationId":"poll_user_changes_refresh_changes_get","parameters":[{"name":"since","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Return changes since this datetime (ISO 8601)","title":"Since"},"description":"Return changes since this datetime (ISO 8601)"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserChangePollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/refresh/calendars/{calendar_id}/changes":{"get":{"tags":["Refresh"],"summary":"Poll Calendar Changes","description":"Poll for event/calendar changes for a single calendar.\n\n**Authentication:** When the calendar is public, `x-auth-token` is optional for read-only access.\nWhen the calendar is not public, `x-auth-token` is required.\n\nReturns the same shape as GET /refresh/changes but scoped to this calendar:\ncalendars list has 0 or 1 item (if the calendar changed since `since`),\nevents list contains only events in this calendar that changed since `since`.","operationId":"poll_calendar_changes_refresh_calendars__calendar_id__changes_get","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"since","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Return changes since this datetime (ISO 8601)","title":"Since"},"description":"Return changes since this datetime (ISO 8601)"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserChangePollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/loose-events/instances":{"get":{"tags":["Calendars"],"summary":"Get Loose Events Instances Batch Endpoint","description":"Get all instances of loose events (events not in any calendar) for the current user within a date range.\n\n**Authentication:** Requires `x-auth-token` header. Only events linked to the authenticated user\nvia UserEventLink and that have no CalendarEventLink are returned.\n\nReturns the same shape as `GET /calendars/{calendar_id}/instances`: a list of\n`{ event, instances }` objects (or `{ event_id, instances }` when `optimized=true`).","operationId":"get_loose_events_instances_batch_endpoint_calendars_loose_events_instances_get","parameters":[{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Start of date range (ISO format)","title":"Start"},"description":"Start of date range (ISO format)"},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"End of date range (ISO format)","title":"End"},"description":"End of date range (ISO format)"},{"name":"include_webhooks","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include webhooks in each event payload (slower)","default":false,"title":"Include Webhooks"},"description":"If true, include webhooks in each event payload (slower)"},{"name":"optimized","in":"query","required":false,"schema":{"type":"boolean","description":"If true, return only event_id and instances for each event","default":false,"title":"Optimized"},"description":"If true, return only event_id and instances for each event"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AdvancedEventInstanceBatchResponse"},{"$ref":"#/components/schemas/AdvancedEventInstanceOptimizedBatchResponse"}],"title":"Response Get Loose Events Instances Batch Endpoint Calendars Loose Events Instances Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/instances":{"get":{"tags":["Calendars"],"summary":"Get Calendar Instances Batch Endpoint","description":"Get all instances of all events in a calendar within a specified date range.\n\n**Authentication:** When the calendar is public, `x-auth-token` is optional for read-only access.\nWhen the calendar is not public, `x-auth-token` is required.\n\nReturns a list of `{ event, instances }` objects (one per event), using the same\ninstance-calculation logic as `/events/{event_id}/instances`.\n\nIf `optimized=true`, returns `{ event_id, instances }` for each event.","operationId":"get_calendar_instances_batch_endpoint_calendars__calendar_id__instances_get","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Start of date range (ISO format)","title":"Start"},"description":"Start of date range (ISO format)"},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"End of date range (ISO format)","title":"End"},"description":"End of date range (ISO format)"},{"name":"include_webhooks","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include webhooks in each event payload (slower)","default":false,"title":"Include Webhooks"},"description":"If true, include webhooks in each event payload (slower)"},{"name":"optimized","in":"query","required":false,"schema":{"type":"boolean","description":"If true, return only event_id and instances for each event","default":false,"title":"Optimized"},"description":"If true, return only event_id and instances for each event"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AdvancedEventInstanceBatchResponse"},{"$ref":"#/components/schemas/AdvancedEventInstanceOptimizedBatchResponse"}],"title":"Response Get Calendar Instances Batch Endpoint Calendars  Calendar Id  Instances Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars":{"get":{"tags":["Calendars"],"summary":"List Calendars","description":"List all calendars for the authenticated user.\n\n**Authentication:** Requires `x-auth-token` header\n\nOptional filters:\n- is_active: Filter by active status\n- limit: Maximum number of results\n- offset: Number of results to skip","operationId":"list_calendars_calendars_get","parameters":[{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum number of results","title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of results to skip","title":"Offset"},"description":"Number of results to skip"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CalendarOutput"},"title":"Response List Calendars Calendars Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Calendars"],"summary":"Create Calendar","description":"Create a new calendar.\n\n**Authentication:** Requires `x-auth-token` header\n\nThe calendar will be automatically linked to the current user as owner.\n\n**Request Body:**\n- `name`: Calendar name (required)\n- `description`: Optional calendar description\n- `timezone`: Calendar timezone (default: \"UTC\")\n- `color`: Optional color for UI purposes\n\n**Example Request:**\n```json\n{\n  \"name\": \"Work Calendar\",\n  \"description\": \"My work-related events\",\n  \"timezone\": \"America/New_York\",\n  \"color\": \"#FF5733\"\n}\n```","operationId":"create_calendar_calendars_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/order":{"put":{"tags":["Calendars"],"summary":"Reorder Calendars","description":"Set the display order of the current user's calendars.\n\n**Authentication:** Requires `x-auth-token` header\n\n**Request Body:** `{ \"calendar_ids\": [\"uuid1\", \"uuid2\", ...] }` — exact sequence of calendar IDs for this user. Only calendars the user has access to are updated; invalid IDs are ignored.","operationId":"reorder_calendars_calendars_order_put","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarOrderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}":{"get":{"tags":["Calendars"],"summary":"Get Calendar","description":"Get a specific calendar by ID (name, color, timezone, etc.).\n\n**Authentication:** When the calendar is public, `x-auth-token` is optional for read-only access.\nWhen the calendar is not public, `x-auth-token` is required.","operationId":"get_calendar_calendars__calendar_id__get","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Calendars"],"summary":"Update Calendar","description":"Update a calendar.\n\n**Authentication:** Requires `x-auth-token` header\n**Permissions:** Requires 'owner' role on the calendar\n\nThis endpoint supports partial updates - you can send only the fields you want to update.\n\n**Fields:**\n- `name`: Update the calendar name (optional)\n- `description`: Update the calendar description (optional)\n- `timezone`: Update the calendar timezone (optional)\n- `color`: Update the calendar color (optional)\n- `is_active`: Update the active status (optional)","operationId":"update_calendar_calendars__calendar_id__put","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Calendars"],"summary":"Delete Calendar","description":"Delete a calendar.\n\n**Authentication:** Requires `x-auth-token` header\n**Permissions:** Requires 'owner' role on the calendar\n\nThis removes the calendar. Events stay in the account (they show up as\nloose events) unless `delete_events=true`. With that flag, events that\nbelong only to this calendar are deleted with the same Google and export\ncleanup as `DELETE /events/{event_id}`. Events that also belong to another\ncalendar stay on that calendar.","operationId":"delete_calendar_calendars__calendar_id__delete","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"delete_events","in":"query","required":false,"schema":{"type":"boolean","description":"If true, delete events that belong only to this calendar (same cleanup as deleting an event), then delete the calendar. Shared events stay on their other calendars.","default":false,"title":"Delete Events"},"description":"If true, delete events that belong only to this calendar (same cleanup as deleting an event), then delete the calendar. Shared events stay on their other calendars."},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/share":{"post":{"tags":["Calendars"],"summary":"Share Calendar","description":"Share a calendar with another user by user_id.\n\n**Permissions:** Requires 'owner' role on the calendar.","operationId":"share_calendar_calendars__calendar_id__share_post","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarShareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/share/{user_id}":{"put":{"tags":["Calendars"],"summary":"Update Shared Calendar Role","description":"Update a shared user's role for a calendar.\n\n**Permissions:** Requires 'owner' role on the calendar.","operationId":"update_shared_calendar_role_calendars__calendar_id__share__user_id__put","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarShareUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Calendars"],"summary":"Unshare Calendar","description":"Remove an internal AnyMoment share for a calendar.\n\n**Permissions:** Requires 'owner' role on the calendar.","operationId":"unshare_calendar_calendars__calendar_id__share__user_id__delete","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/events":{"get":{"tags":["Calendars"],"summary":"List Calendar Events","description":"List all events in a calendar with their link metadata.\n\n**Authentication:** When the calendar is public, `x-auth-token` is optional for read-only access.\nWhen the calendar is not public, `x-auth-token` is required.\n\nReturns events ordered by display_order (if set), then by added_at.","operationId":"list_calendar_events_calendars__calendar_id__events_get","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum number of results","title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of results to skip","title":"Offset"},"description":"Number of results to skip"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventInCalendarOutput"},"title":"Response List Calendar Events Calendars  Calendar Id  Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Calendars"],"summary":"Batch Add Events To Calendar","description":"Add multiple events to a calendar.\n\n**Authentication:** Requires `x-auth-token` header\n**Permissions:** Requires 'owner' role on the calendar\n\nRequest body: `{ \"event_ids\": [\"uuid\", ...], \"display_order\": optional, \"color_override\": optional }`.\n\nThe batch is atomic: every event is linked, or none are. Each item uses the same\nshape as adding a single event, including `google_export_warnings`.","operationId":"batch_add_events_to_calendar_calendars__calendar_id__events_post","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchAddEventsToCalendarRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEventLinkOutputWithWarnings"},"title":"Response Batch Add Events To Calendar Calendars  Calendar Id  Events Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/events/batch-unlink":{"post":{"tags":["Calendars"],"summary":"Batch Remove Events From Calendar","description":"Remove multiple events from a calendar (unlink only; events are not deleted).\n\n**Authentication:** Requires `x-auth-token` header\n**Permissions:** Requires 'owner' role on the calendar\n\nRequest body: `{ \"event_ids\": [\"uuid\", ...] }`.","operationId":"batch_remove_events_from_calendar_calendars__calendar_id__events_batch_unlink_post","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRemoveEventsFromCalendarRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/events/extract":{"post":{"tags":["Calendars"],"summary":"Calendar Extract And Create Events","description":"Extract events from natural language (or voice) and create them linked to this calendar.\n\nSame request body as POST /events/extract (JSON or multipart with audio).\nA URL in the text queues the same background page read as POST /events/extract\nand this response returns that pending job. Text with no URL is still synchronous.\nBody calendar_id is ignored; all created events are linked to the calendar in the path.\n\n**Authentication:** Requires `x-auth-token` header\n**Permissions:** Requires 'owner' role on the calendar","operationId":"calendar_extract_and_create_events_calendars__calendar_id__events_extract_post","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatExtractEventsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/events/{event_id}":{"post":{"tags":["Calendars"],"summary":"Add Event To Calendar","description":"Add an event to a calendar with optional metadata.\n\n**Authentication:** Requires `x-auth-token` header\n**Permissions:** Requires 'owner' role on the calendar\n\n**Request Body:**\n- `display_order`: Optional custom display order (integer)\n- `color_override`: Optional calendar-specific color for this event\n\n**Example Request:**\n```json\n{\n  \"display_order\": 1,\n  \"color_override\": \"#00FF00\"\n}\n```","operationId":"add_event_to_calendar_calendars__calendar_id__events__event_id__post","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventLinkCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventLinkOutputWithWarnings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Calendars"],"summary":"Update Event Link Metadata","description":"Update the metadata for an event-calendar link.\n\n**Authentication:** Requires `x-auth-token` header\n**Permissions:** Requires 'owner' role on the calendar\n\nThis updates the calendar-specific metadata (display_order, color_override)\nwithout modifying the event itself.\n\n**Request Body:**\n- `display_order`: Optional custom display order (integer)\n- `color_override`: Optional calendar-specific color for this event","operationId":"update_event_link_metadata_calendars__calendar_id__events__event_id__put","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventLinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventLinkOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Calendars"],"summary":"Remove Event From Calendar","description":"Remove an event from a calendar.\n\n**Authentication:** Requires `x-auth-token` header\n**Permissions:** Requires 'owner' role on the calendar\n\nThis only removes the link between the calendar and event.\nThe event itself remains in the system.","operationId":"remove_event_from_calendar_calendars__calendar_id__events__event_id__delete","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Event Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/export":{"get":{"tags":["Calendars"],"summary":"Export Calendar","description":"Export a calendar to iCalendar format (.ics file).\n\n**Authentication:** Requires `x-auth-token` header\n\nThis exports all events in the calendar within the specified date range\nas a single iCalendar file that can be imported into calendar applications.\n\n**Query Parameters:**\n- `start`: Start of date range (ISO format, required)\n- `end`: End of date range (ISO format, required)\n\n**Example:**\n```\nGET /calendars/{calendar_id}/export?start=2024-01-01T00:00:00Z&end=2024-12-31T23:59:59Z\n```","operationId":"export_calendar_calendars__calendar_id__export_get","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Start of date range (ISO format)","title":"Start"},"description":"Start of date range (ISO format)"},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"End of date range (ISO format)","title":"End"},"description":"End of date range (ISO format)"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/webhook-url":{"get":{"tags":["Calendars"],"summary":"Generate Calendar Webhook Url","description":"Generate a webhook URL with cryptographic signature for unauthenticated access to this calendar.\n\n**Authentication:** Requires `x-auth-token` header\n\nThis endpoint creates a signed URL that external automation tools (like Zapier, n8n) can use\nto send natural language text and automatically create events in this calendar.\n\n**Path Parameters:**\n- `calendar_id`: UUID of the calendar to generate webhook URL for\n\n**Response includes:**\n- `webhook_url`: The signed webhook URL for external tools\n- `calendar_id`: The calendar ID\n- `user_id`: The user ID who owns the calendar\n\n**Example Response:**\n```json\n{\n  \"webhook_url\": \"https://api.example.com/webhooks/calendar/123e4567-e89b-12d3-a456-426614174000/456e7890-e89b-12d3-a456-426614174001/abcdef123456...\",\n  \"calendar_id\": \"456e7890-e89b-12d3-a456-426614174001\",\n  \"user_id\": \"123e4567-e89b-12d3-a456-426614174000\"\n}\n```\n\n**Usage with Zapier/n8n:**\nConfigure your automation tool to POST to the webhook_url with a JSON body containing:\n```json\n{\n  \"text\": \"Meeting with John tomorrow at 3 PM\",\n  \"context\": \"Email from assistant\"\n}\n```\n\n**Note:** Only `text` is required. `context`, `timezone` (\"Europe/Madrid\" by default), and `model` (\"high\" by default) are optional.","operationId":"generate_calendar_webhook_url_calendars__calendar_id__webhook_url_get","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarWebhookUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/subscriptions":{"get":{"tags":["Outgoing Webhooks"],"summary":"List Subscriptions","description":"List outgoing subscriptions for a calendar. The secret is never included.","operationId":"list_subscriptions_calendars__calendar_id__subscriptions_get","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionOut"},"title":"Response List Subscriptions Calendars  Calendar Id  Subscriptions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Outgoing Webhooks"],"summary":"Create Subscription","description":"Create a subscription. A generated secret is returned once. A caller-supplied secret is not returned.","operationId":"create_subscription_calendars__calendar_id__subscriptions_post","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/subscriptions/{subscription_id}":{"get":{"tags":["Outgoing Webhooks"],"summary":"Get Subscription","operationId":"get_subscription_calendars__calendar_id__subscriptions__subscription_id__get","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Subscription Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Outgoing Webhooks"],"summary":"Update Subscription","description":"Update a subscription. A replacement secret is stored and not returned.","operationId":"update_subscription_calendars__calendar_id__subscriptions__subscription_id__patch","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Subscription Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Outgoing Webhooks"],"summary":"Delete Subscription","operationId":"delete_subscription_calendars__calendar_id__subscriptions__subscription_id__delete","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Subscription Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/subscriptions/{subscription_id}/deliveries":{"get":{"tags":["Outgoing Webhooks"],"summary":"List Deliveries","description":"Delivery log for one subscription, newest first.","operationId":"list_deliveries_calendars__calendar_id__subscriptions__subscription_id__deliveries_get","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Subscription Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryOut"},"title":"Response List Deliveries Calendars  Calendar Id  Subscriptions  Subscription Id  Deliveries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/subscriptions/{subscription_id}/deliveries/{delivery_id}/replay":{"post":{"tags":["Outgoing Webhooks"],"summary":"Replay Delivery","description":"Queue a new delivery with the same payload. The original row is unchanged.","operationId":"replay_delivery_calendars__calendar_id__subscriptions__subscription_id__deliveries__delivery_id__replay_post","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Calendar Id"}},{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Subscription Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Delivery Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agenda/cache/monitor":{"get":{"tags":["Agenda"],"summary":"Get Cache Monitor","description":"Monitor the instance cache: instance count, effective window, and how many events/calendars have cached data.\n\n**Authentication:** Requires `x-auth-token` header.","operationId":"get_cache_monitor_agenda_cache_monitor_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheMonitorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agenda":{"get":{"tags":["Agenda"],"summary":"Get Agenda","description":"Get all events and their instances within a time window (agenda).\n\n**Authentication:** Requires `x-auth-token` header.\n\nReturns full event detail plus instances in the requested window for every event\n(across all accessible calendars, or only those in `calendar_ids`) that has at least\none instance in [start, end]. Use this for \"What's on my plate today?\" or to find\nevents to act on (e.g. cancel meetings this week).\n\nIf any events fail to build instances, they are returned in the `failures` array with\nevent_id, event_name, and a user-facing message.","operationId":"get_agenda_agenda_get","parameters":[{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Start of window (ISO format)","title":"Start"},"description":"Start of window (ISO format)"},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"End of window (ISO format)","title":"End"},"description":"End of window (ISO format)"},{"name":"calendar_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"description":"Restrict to these calendar IDs (must have access)","title":"Calendar Ids"},"description":"Restrict to these calendar IDs (must have access)"},{"name":"use_cache","in":"query","required":false,"schema":{"type":"boolean","description":"Use instance cache when available","default":true,"title":"Use Cache"},"description":"Use instance cache when available"},{"name":"include_webhooks","in":"query","required":false,"schema":{"type":"boolean","description":"Include webhooks in each event payload","default":false,"title":"Include Webhooks"},"description":"Include webhooks in each event payload"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedEventInstanceBatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agenda/search":{"get":{"tags":["Agenda"],"summary":"Search Events","description":"Fuzzy search over events the user can access (all calendars or filter by calendar_ids).\n\n**Authentication:** Requires `x-auth-token` header.\n\nUses PostgreSQL pg_trgm for similarity on event name (and optionally description).\nOptional filters: calendar_ids, start/end (only events with an instance in that range), is_active.\nWhen start/end are provided and include_instances is true, each result includes instances in that window.","operationId":"search_events_agenda_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search query (fuzzy match on name, optional description)","title":"Q"},"description":"Search query (fuzzy match on name, optional description)"},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only events with at least one instance on or after this time","title":"Start"},"description":"Only events with at least one instance on or after this time"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only events with at least one instance on or before this time","title":"End"},"description":"Only events with at least one instance on or before this time"},{"name":"calendar_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"description":"Restrict to these calendar IDs","title":"Calendar Ids"},"description":"Restrict to these calendar IDs"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results","default":50,"title":"Limit"},"description":"Max results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Skip this many results","default":0,"title":"Offset"},"description":"Skip this many results"},{"name":"include_instances","in":"query","required":false,"schema":{"type":"boolean","description":"If start/end provided, include instances in window in response","default":true,"title":"Include Instances"},"description":"If start/end provided, include instances in window in response"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SearchEventOutput"},"title":"Response Search Events Agenda Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/calendar/{user_id}/{calendar_id}/{signature}":{"post":{"tags":["Webhooks"],"summary":"Process Calendar Webhook","description":"Process unauthenticated webhook requests to create events from natural language.\n\n**Security:** This endpoint uses cryptographic signature verification for authentication.\nThe signature is generated from user_id + calendar_id using HMAC-SHA256 with APP_SECRET_KEY.\n\n**Path Parameters:**\n- `user_id`: UUID of the user who owns the calendar\n- `calendar_id`: UUID of the calendar to add events to\n- `signature`: Cryptographic signature for verification\n\n**Request Body:** Same as /events/extract endpoint\n- `text`: Natural language text containing event descriptions (required)\n- `context`: Optional context about the text source\n- `timezone`: Default timezone for events (default: \"Europe/Madrid\")\n- `model`: Model configuration for parsing (default: \"high\")\n- `calendar_id`: Always set to the calendar from the URL path\n\n**Response:** Same as /events/extract endpoint\n- `extracted_events`: List of events found in the text\n- `created_events`: Results of attempting to create each event\n- `summary`: Counts of total extracted, successfully created, and failed events\n- `job`: Set when `text` contains a URL. The read finishes in the background\n  and this response is the pending job. Counts on the webhook run are filled\n  in when that job finishes.","operationId":"process_calendar_webhook_webhooks_calendar__user_id___calendar_id___signature__post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","title":"Calendar Id"}},{"name":"signature","in":"path","required":true,"schema":{"type":"string","title":"Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatExtractEventsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatExtractEventsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/login":{"get":{"tags":["Google Integration"],"summary":"Login","description":"Initiates Google SSO for App Login.\n\nOptional `ref` is carried in the OAuth state and signed with the callback\nURL. It is stored only when this callback creates the AnyMoment account.\nA sign-in of an existing account leaves that account's ref unchanged.\nAn invalid ref does not stop the redirect.","operationId":"login_google_login_get","parameters":[{"name":"callback_url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url"}},{"name":"ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/callback":{"get":{"tags":["Google Integration"],"summary":"Login Callback","description":"Handles the callback for App Login.","operationId":"login_callback_google_callback_get","parameters":[{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}},{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/connect":{"get":{"tags":["Google Integration"],"summary":"Connect Calendar","description":"Initiates flow to connect a Google Calendar (requires Auth).\nRequests 'offline' access to get a Refresh Token.","operationId":"connect_calendar_google_connect_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleConnectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/connect/callback":{"get":{"tags":["Google Integration"],"summary":"Connect Callback","description":"Handles the callback for Connecting a Calendar.","operationId":"connect_callback_google_connect_callback_get","parameters":[{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}},{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/exports":{"get":{"tags":["Google Integration"],"summary":"List Calendar Exports","description":"List Google Calendar exports for the authenticated user.\n\n**Authentication:** Requires `x-auth-token` header\n\n**Query Parameters:**\n- `calendar_id`: Optional filter by specific calendar ID\n- `include_inactive`: If true, include inactive/unlinked exports (default: false)\n\n**Note:** By default, only active exports are returned to avoid showing duplicate\ncalendar entries when a calendar has been unlinked and re-linked multiple times.","operationId":"list_calendar_exports_google_exports_get","parameters":[{"name":"calendar_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"description":"Filter by calendar ID","title":"Calendar Id"},"description":"Filter by calendar ID"},{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include inactive/unlinked exports","default":false,"title":"Include Inactive"},"description":"If true, include inactive/unlinked exports"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GoogleCalendarExportOutput"},"title":"Response List Calendar Exports Google Exports Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/accounts":{"get":{"tags":["Google Integration"],"summary":"List Accounts","operationId":"list_accounts_google_accounts_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConnectedAccount"},"title":"Response List Accounts Google Accounts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/calendars":{"get":{"tags":["Google Integration"],"summary":"List Google Calendars","description":"List cached Google calendars for the given connected account.\n\nThis returns calendar metadata only (not events) so the UI can let the user pick\nwhich calendars to sync.\n\nDeduplicates calendars with the same summary (e.g., primary calendar can appear\nwith both id=email and id=calendar_id). Prefers primary=true entry.","operationId":"list_google_calendars_google_calendars_get","parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"string","description":"Google ID of the connected Google account","title":"Account Id"},"description":"Google ID of the connected Google account"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GoogleCalendarListEntryOutput"},"title":"Response List Google Calendars Google Calendars Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/calendars/refresh":{"post":{"tags":["Google Integration"],"summary":"Refresh Google Calendars Cache","description":"Force-refresh the cached Google calendar list for a connected account.\n\nReturns the number of calendars cached.","operationId":"refresh_google_calendars_cache_google_calendars_refresh_post","parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"string","description":"Google ID of the connected Google account","title":"Account Id"},"description":"Google ID of the connected Google account"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/accounts/{account_id}":{"delete":{"tags":["Google Integration"],"summary":"Disconnect Account","description":"Disconnect a linked Google account.\n\nRuns synchronously so the account is gone from GET /google/accounts immediately\n(the previous queue-only path left the row until a background job finished).","operationId":"disconnect_account_google_accounts__account_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/sync-calendar":{"post":{"tags":["Google Integration"],"summary":"Sync Calendar","description":"Enqueue a calendar sync job (two-way).\n\n**Async contract:**\n- This endpoint always returns `status=\"queued\"` with a `job_id`.\n- The sync runs in the background. If conflicts are detected, they are returned via\n  `GET /google/sync-status?job_id=...` in `job.payload.result` with `status=\"conflicts\"`.\n- To resolve conflicts, retry this endpoint and provide `conflict_resolution` (same shape as returned),\n  after filling in each conflict's `resolution` (\"local\" or \"remote\").","operationId":"sync_calendar_google_sync_calendar_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncCalendarRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/admin/queue-full-sync-all":{"post":{"tags":["Google Integration"],"summary":"Admin Queue Full Sync All Linked Calendars","description":"Queue a full Google history re-sync (clears sync token on run) for every active calendar export link.\n\nRequires superuser. Intended for operational recovery (e.g. after changing list API parameters).","operationId":"admin_queue_full_sync_all_linked_calendars_google_admin_queue_full_sync_all_post","parameters":[{"name":"skip_if_active_job","in":"query","required":false,"schema":{"type":"boolean","description":"If true, skip exports that already have a pending or running calendar_initial_import / calendar_delta_sync job.","default":true,"title":"Skip If Active Job"},"description":"If true, skip exports that already have a pending or running calendar_initial_import / calendar_delta_sync job."},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminQueueFullSyncAllOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/cleanup/purge-managed-events":{"post":{"tags":["Google Integration"],"summary":"Purge Managed Google Events","description":"Enqueue a conservative cleanup job that removes AnyMoment-managed Google events from a Google calendar.\nIf no Google calendar ID is provided, the purge runs across all calendars for the account.\n\nBy default this runs in dry-run mode (no deletes) to reduce risk.","operationId":"purge_managed_google_events_google_cleanup_purge_managed_events_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeManagedGoogleEventsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/cleanup/revert-from-log":{"post":{"tags":["Google Integration"],"summary":"Revert From Sync Log","description":"Enqueue a best-effort revert job from a JSONL sync log.\n\nDefault is dry-run for safety.","operationId":"revert_from_sync_log_google_cleanup_revert_from_log_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevertFromSyncLogRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/sync-event":{"post":{"tags":["Google Integration"],"summary":"Sync Event","description":"Enqueue a single-event sync job within the selected calendar link.\n\n**Async contract:**\n- This endpoint always returns `status=\"queued\"` with a `job_id`.\n- Conflicts (if any) are returned via `GET /google/sync-status?job_id=...` in `job.payload.result`.","operationId":"sync_event_google_sync_event_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncEventRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/sync-status":{"get":{"tags":["Google Integration"],"summary":"Google Sync Status","description":"Return sync status using only a background job id.\n\nFor queued sync endpoints (`/google/sync-calendar`, `/google/sync-event`), the final sync result\n(including conflicts) is exposed here in `job.payload.result`.\n\nIf the job is not found (e.g. cleaned up after retention period, worker restart, etc.),\nreturns 200 with status=\"not_found\" so clients can stop polling.","operationId":"google_sync_status_google_sync_status_get","parameters":[{"name":"job_id","in":"query","required":true,"schema":{"type":"string","format":"uuid4","title":"Job Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/jobs":{"get":{"tags":["Google Integration"],"summary":"List Google Jobs","description":"List Google background jobs for the authenticated user.\n\nDefault behavior returns all jobs except terminal states (completed/resolved/superseded).\nThis is intended for a UI polling loop (toast/jobs panel), and includes conflicts jobs.","operationId":"list_google_jobs_google_jobs_get","parameters":[{"name":"include_terminal","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include completed/resolved/superseded jobs","default":false,"title":"Include Terminal"},"description":"If true, include completed/resolved/superseded jobs"},{"name":"clear_non_active","in":"query","required":false,"schema":{"type":"boolean","description":"If true, delete any returned jobs that are not pending/running","default":false,"title":"Clear Non Active"},"description":"If true, delete any returned jobs that are not pending/running"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GoogleSyncJobOutput"},"title":"Response List Google Jobs Google Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/jobs/{job_id}":{"delete":{"tags":["Google Integration"],"summary":"Delete Google Job","description":"Delete a Google sync job.\n\nAuthorization:\n- Superusers can delete any job\n- Otherwise the job must belong to the authenticated user\n  (either via google_export_id -> GoogleSSOUser.user_id, or payload.google_account_id).","operationId":"delete_google_job_google_jobs__job_id__delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Job Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/unlink-calendar":{"delete":{"tags":["Google Integration"],"summary":"Unlink Google Calendar","description":"Disable (unlink) a local calendar <-> Google calendar sync link.\n\n- Nothing is deleted (neither on Google nor locally)\n- The link is preserved for future re-linking without duplicating common events\n- Future sync jobs must only operate on active links","operationId":"unlink_google_calendar_google_unlink_calendar_delete","parameters":[{"name":"local_calendar_id","in":"query","required":true,"schema":{"type":"string","format":"uuid4","title":"Local Calendar Id"}},{"name":"google_account_id","in":"query","required":true,"schema":{"type":"string","title":"Google Account Id"}},{"name":"google_calendar_id","in":"query","required":true,"schema":{"type":"string","title":"Google Calendar Id"}},{"name":"delete_remote","in":"query","required":false,"schema":{"type":"boolean","description":"Delete the Google calendar. Off unless the user confirmed it.","default":false,"title":"Delete Remote"},"description":"Delete the Google calendar. Off unless the user confirmed it."},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/exports/{export_id}":{"delete":{"tags":["Google Integration"],"summary":"Delete Calendar Export","description":"Permanently remove a calendar from sync.\n\nThis endpoint is intended for cleaning up orphaned calendar exports (e.g. when\nthe Google calendar was deleted on Google's side and the sync is permanently\nfailing with 404 errors).\n\n**What gets deleted:**\n- Google watch channel (stopped if active)\n- All pending sync operations (outbox items)\n- All conflict records (quarantine items)\n- All event links between local and Google events\n- All background sync jobs for this export\n- The calendar export link itself\n\n**Optional:**\n- Pass `delete_local_calendar=true` to also delete the local calendar and all\n  its events. Use with caution: this is irreversible.\n\n**Authorization:**\n- Only the user who owns the Google account linked to this export can delete it.\n\n**After deletion:**\n- The calendar will no longer appear in sync health or cause 404 errors.\n- The local calendar (if not deleted) remains accessible but is no longer synced.","operationId":"delete_calendar_export_google_exports__export_id__delete","parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Export Id"}},{"name":"delete_local_calendar","in":"query","required":false,"schema":{"type":"boolean","description":"If true, also delete the local calendar and all its events","default":false,"title":"Delete Local Calendar"},"description":"If true, also delete the local calendar and all its events"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/push":{"post":{"tags":["Google Integration"],"summary":"Google Calendar Push Notification","description":"Google Calendar push notification receiver (events.watch).\n\nGoogle sends headers only (empty body). We verify channel token and enqueue delta sync.","operationId":"google_calendar_push_notification_google_push_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/google/sync-health":{"get":{"tags":["Google Integration"],"summary":"Get Sync Health","description":"Per-export or account-wide sync health for UI/ops.","operationId":"get_sync_health_google_sync_health_get","parameters":[{"name":"export_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Export Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/quarantine":{"get":{"tags":["Google Integration"],"summary":"List Quarantine","operationId":"list_quarantine_google_quarantine_get","parameters":[{"name":"export_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Export Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"open","title":"Status"}},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"google (default) or caldav","title":"Provider"},"description":"google (default) or caldav"},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/quarantine/{quarantine_id}/resolve":{"post":{"tags":["Google Integration"],"summary":"Resolve Quarantine Item","operationId":"resolve_quarantine_item_google_quarantine__quarantine_id__resolve_post","parameters":[{"name":"quarantine_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Quarantine Id"}},{"name":"resolution","in":"query","required":true,"schema":{"type":"string","pattern":"^(local|remote|dismiss)$","title":"Resolution"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/admin/diagnostics":{"get":{"tags":["Google Integration"],"summary":"Get Sync Diagnostics","description":"Diagnostic endpoint for troubleshooting sync job processing.\n\nReturns stats about pending/running jobs and potential blockers.\nRequires superuser access.","operationId":"get_sync_diagnostics_google_admin_diagnostics_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/admin/backfill-next-attempt":{"post":{"tags":["Google Integration"],"summary":"Backfill Job Next Attempt","description":"Backfill next_attempt_at for pending jobs missing it.\n\nThis fixes jobs created before the field was made mandatory.\nRequires superuser access.","operationId":"backfill_job_next_attempt_google_admin_backfill_next_attempt_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/admin/fix-stuck-running":{"post":{"tags":["Google Integration"],"summary":"Fix Stuck Running Jobs","description":"Fix stuck running jobs with NULL lease_until (forever blockers).\n\nMarks them as failed so they no longer block pending jobs on the same export.\nRequires superuser access.","operationId":"fix_stuck_running_jobs_google_admin_fix_stuck_running_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/admin/sync-jobs":{"get":{"tags":["Google Integration"],"summary":"List Admin Sync Jobs","description":"List recent Google Calendar sync jobs across all users.\n\nReturns comprehensive diagnostics including:\n- Full job details (status, attempts, errors)\n- Calendar and account identity\n- User information\n- Complete error text for debugging\n\nRequires superuser access.","operationId":"list_admin_sync_jobs_google_admin_sync_jobs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of jobs to return","default":100,"title":"Limit"},"description":"Maximum number of jobs to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of jobs to skip","default":0,"title":"Offset"},"description":"Number of jobs to skip"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by job status (pending, running, completed, failed, resolved, superseded)","title":"Status"},"description":"Filter by job status (pending, running, completed, failed, resolved, superseded)"},{"name":"job_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by job type (event_rebuild, calendar_initial_import, calendar_delta_sync, etc.)","title":"Job Type"},"description":"Filter by job type (event_rebuild, calendar_initial_import, calendar_delta_sync, etc.)"},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by provider (google or caldav). Omitted returns every provider.","title":"Provider"},"description":"Filter by provider (google or caldav). Omitted returns every provider."},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSyncJobsListOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/admin/sync-logs/days":{"get":{"tags":["Google Integration"],"summary":"List Sync Log Days","description":"List available day directories under logs/google_sync.\n\nReturns a list of day directory names (YYYY-MM-DD format).\nRequires superuser access.","operationId":"list_sync_log_days_google_admin_sync_logs_days_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/admin/sync-logs/day/{day}":{"get":{"tags":["Google Integration"],"summary":"Get Sync Log Day Contents","description":"Get the contents of all log files for a specific day.\n\nReturns the aggregated contents of all JSONL log files for the specified day,\ncapped at 10MB per response to prevent unbounded memory usage.\n\nPath safety: Validates that the day parameter is a valid date directory name\nand does not contain path traversal characters. Returns 404 if the directory\ndoes not exist or path traversal is attempted.\n\nRequires superuser access.","operationId":"get_sync_log_day_contents_google_admin_sync_logs_day__day__get","parameters":[{"name":"day","in":"path","required":true,"schema":{"type":"string","title":"Day"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/admin/sync-jobs/clear-all":{"post":{"tags":["Google Integration"],"summary":"Clear All Sync Jobs","description":"Delete every Google Calendar sync job row from the database.\n\n**DANGER: This removes all job history and pending work across all users.**\n\n**What gets deleted:**\n- All GoogleCalendarSyncJob rows (pending, running, completed, failed, resolved, superseded)\n- Complete job history and queue\n\n**What is preserved:**\n- All users and Google accounts\n- All calendars (local and export links)\n- All events and event links\n- All calendar memberships\n- All settings and configurations\n\n**Important notes:**\n- Workers that already loaded a running job may still finish that work in memory\n- No Google API calls are made; this only affects local database state\n- Requires exact confirmation phrase: \"DELETE ALL SYNC JOBS\"\n\nRequires superuser access.","operationId":"clear_all_sync_jobs_google_admin_sync_jobs_clear_all_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearAllSyncJobsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/capabilities":{"get":{"tags":["caldav"],"summary":"Get Capabilities","operationId":"get_capabilities_caldav_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/caldav/discover":{"post":{"tags":["caldav"],"summary":"Discover","operationId":"discover_caldav_discover_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/accounts/test":{"post":{"tags":["caldav"],"summary":"Test Account","operationId":"test_account_caldav_accounts_test_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/accounts":{"post":{"tags":["caldav"],"summary":"Post Account","operationId":"post_account_caldav_accounts_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["caldav"],"summary":"List Accounts","operationId":"list_accounts_caldav_accounts_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/accounts/{account_id}":{"get":{"tags":["caldav"],"summary":"Get Account","operationId":"get_account_caldav_accounts__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Account Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["caldav"],"summary":"Patch Account","operationId":"patch_account_caldav_accounts__account_id__patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Account Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/accounts/{account_id}/calendars/refresh":{"post":{"tags":["caldav"],"summary":"Refresh Calendars","operationId":"refresh_calendars_caldav_accounts__account_id__calendars_refresh_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Account Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/login-flow/start":{"post":{"tags":["caldav"],"summary":"Login Flow Start","operationId":"login_flow_start_caldav_login_flow_start_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginFlowStartBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/login-flow/poll":{"post":{"tags":["caldav"],"summary":"Login Flow Poll","operationId":"login_flow_poll_caldav_login_flow_poll_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginFlowPollBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/accounts/{account_id}/links":{"post":{"tags":["caldav"],"summary":"Post Links","operationId":"post_links_caldav_accounts__account_id__links_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Account Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["caldav"],"summary":"Get Links","operationId":"get_links_caldav_accounts__account_id__links_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Account Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/accounts/{account_id}/destinations":{"post":{"tags":["caldav"],"summary":"Post Destination","operationId":"post_destination_caldav_accounts__account_id__destinations_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Account Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/refresh":{"post":{"tags":["caldav"],"summary":"Refresh Sync","operationId":"refresh_sync_caldav_refresh_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/links/{link_id}/remote-deleted":{"post":{"tags":["caldav"],"summary":"Post Remote Deleted","operationId":"post_remote_deleted_caldav_links__link_id__remote_deleted_post","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Link Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteDeletedBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/sync-health":{"get":{"tags":["caldav"],"summary":"Get Caldav Sync Health","operationId":"get_caldav_sync_health_caldav_sync_health_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/quarantine":{"get":{"tags":["caldav"],"summary":"Get Caldav Quarantine","operationId":"get_caldav_quarantine_caldav_quarantine_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"open","title":"Status"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/quarantine/{quarantine_id}/resolve":{"post":{"tags":["caldav"],"summary":"Post Caldav Quarantine Resolve","operationId":"post_caldav_quarantine_resolve_caldav_quarantine__quarantine_id__resolve_post","parameters":[{"name":"quarantine_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Quarantine Id"}},{"name":"resolution","in":"query","required":true,"schema":{"type":"string","title":"Resolution"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/accounts/{account_id}/push":{"post":{"tags":["caldav"],"summary":"Post Enable Push","operationId":"post_enable_push_caldav_accounts__account_id__push_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Account Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/push/{account_id}":{"post":{"tags":["caldav"],"summary":"Post Push Notification","operationId":"post_push_notification_caldav_push__account_id__post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/certificate":{"post":{"tags":["caldav"],"summary":"Post Certificate","operationId":"post_certificate_caldav_certificate_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/accounts/{account_id}/disconnect-preview":{"get":{"tags":["caldav"],"summary":"Get Disconnect Preview","operationId":"get_disconnect_preview_caldav_accounts__account_id__disconnect_preview_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Account Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/accounts/{account_id}/reconnect":{"post":{"tags":["caldav"],"summary":"Post Reconnect","operationId":"post_reconnect_caldav_accounts__account_id__reconnect_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Account Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconnectBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caldav/accounts/{account_id}/disconnect":{"post":{"tags":["caldav"],"summary":"Post Disconnect","operationId":"post_disconnect_caldav_accounts__account_id__disconnect_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Account Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/logs/ingest":{"post":{"tags":["Admin Logs"],"summary":"Ingest Logs","description":"Ingest log entries from Coolify via Fluent Bit or manual curl.\n\n**Authentication:** Requires `Authorization: Bearer <LOG_DRAIN_TOKEN>` header.\n\nAccepts:\n- Fluent Bit JSON format: array of objects with `log`, `date`, `source`, `container_name`\n- Single JSON object with the same fields\n- Raw text (stored as-is)\n\nThe LOG_DRAIN_TOKEN environment variable must be set, or all requests are rejected.","operationId":"ingest_logs_admin_logs_ingest_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/logs":{"get":{"tags":["Admin Logs"],"summary":"Get Logs","description":"Retrieve recent log entries.\n\n**Authentication:** Requires `x-auth-token` header with superuser privileges.\n\nReturns logs sorted by timestamp (newest first by default, or oldest first if newest_first=false).","operationId":"get_logs_admin_logs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}},{"name":"newest_first","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Newest First"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminLogResponse"},"title":"Response Get Logs Admin Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/page-watches":{"post":{"tags":["Page watches"],"summary":"Create Page Watch","description":"Start watching one URL.\n\nThe optional instructions are saved on the watch and sent with every later\ncheck. `interval` may be omitted. AnyMoment then uses `suggested_interval`\nfrom the latest finished page read of this URL for this user, or weekly.\n\n`weekday` is Monday 0 through Sunday 6 and is used when the interval is\nweekly. `day_of_month` and `month` are used for monthly and yearly checks.\nA short month uses its last day, so the 31st becomes the 28th or 29th in\nFebruary. `anchor_time` is HH:MM in `timezone`.\n\nThe first automatic check is the next time that interval comes around, not\nimmediately. Use run-now to check sooner.","operationId":"create_page_watch_page_watches_post","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageWatchCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageWatchOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Page watches"],"summary":"List Page Watches","description":"Watches owned by the signed-in user, newest first. Each one includes its latest run.","operationId":"list_page_watches_page_watches_get","parameters":[{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PageWatchOutput"},"title":"Response List Page Watches Page Watches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/page-watches/{watch_id}":{"get":{"tags":["Page watches"],"summary":"Get Page Watch","description":"One watch, including the latest run. Another user's watch is 404.","operationId":"get_page_watch_page_watches__watch_id__get","parameters":[{"name":"watch_id","in":"path","required":true,"schema":{"type":"string","title":"Watch Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageWatchOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Page watches"],"summary":"Update Page Watch","description":"Change the instructions or the schedule.\n\nSend only the fields to change. An interval shorter than the account\nminimum is rejected. The next run is recomputed when the schedule changes\nand the watch is active.","operationId":"update_page_watch_page_watches__watch_id__patch","parameters":[{"name":"watch_id","in":"path","required":true,"schema":{"type":"string","title":"Watch Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageWatchUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageWatchOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Page watches"],"summary":"Delete Page Watch","description":"Delete the watch. Events it created stay on the calendar, with no watch attached.","operationId":"delete_page_watch_page_watches__watch_id__delete","parameters":[{"name":"watch_id","in":"path","required":true,"schema":{"type":"string","title":"Watch Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/page-watches/{watch_id}/pause":{"post":{"tags":["Page watches"],"summary":"Pause Page Watch","description":"Stop scheduled checks until resume. `pause_reason` becomes `user`.","operationId":"pause_page_watch_page_watches__watch_id__pause_post","parameters":[{"name":"watch_id","in":"path","required":true,"schema":{"type":"string","title":"Watch Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageWatchOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/page-watches/{watch_id}/resume":{"post":{"tags":["Page watches"],"summary":"Resume Page Watch","description":"Resume a paused or auto-paused watch and clear the failure streak.\n\nA next run that is already in the past is picked up by the scheduler.","operationId":"resume_page_watch_page_watches__watch_id__resume_post","parameters":[{"name":"watch_id","in":"path","required":true,"schema":{"type":"string","title":"Watch Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageWatchOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/page-watches/{watch_id}/run-now":{"post":{"tags":["Page watches"],"summary":"Run Page Watch Now","description":"Make the next check due now.\n\nLimited to one run-now per watch per `WATCH_RUN_NOW_COOLDOWN_MINUTES`\n(60 by default). A second call inside that window is 429. A paused watch\nis 409. The check itself runs on the scheduler, under the same lease as a\nscheduled run.","operationId":"run_page_watch_now_page_watches__watch_id__run_now_post","parameters":[{"name":"watch_id","in":"path","required":true,"schema":{"type":"string","title":"Watch Id"}},{"name":"x-auth-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Auth-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageWatchOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","description":"Root endpoint that returns a welcome message.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health Check","description":"Health check endpoint for monitoring. Indicates the application process is up.\nencryption_enabled is false when CREDENTIALS_ENCRYPTION_KEYS is missing; the process still serves traffic.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/redis":{"get":{"summary":"Health Redis","description":"Health check for Redis. Returns 200 when Redis is reachable (ping), 503 otherwise.\nUse for load balancers or orchestration that need to verify Redis before routing traffic.","operationId":"health_redis_health_redis_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AccountPatch":{"properties":{"display_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Label"},"tls_pin_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tls Pin Sha256"}},"type":"object","title":"AccountPatch"},"AcquisitionPoint":{"properties":{"new_users":{"type":"integer","title":"New Users","description":"Accounts created in the window. Later edits of those accounts are not included."},"new_trials":{"type":"integer","title":"New Trials","description":"Trials started in the window. A later conversion stays on the trial's start day and is not counted here again."},"new_subscriptions":{"type":"integer","title":"New Subscriptions","description":"First paid subscriptions in the window. Trial starts and renewals are not included."},"t":{"type":"string","title":"T","description":"Bucket start, UTC. A day bucket is that date, a week bucket is the Monday, a month bucket is the 1st."}},"type":"object","required":["new_users","new_trials","new_subscriptions","t"],"title":"AcquisitionPoint"},"AcquisitionRefSeries":{"properties":{"new_users":{"type":"integer","title":"New Users","description":"Accounts created in the window. Later edits of those accounts are not included."},"new_trials":{"type":"integer","title":"New Trials","description":"Trials started in the window. A later conversion stays on the trial's start day and is not counted here again."},"new_subscriptions":{"type":"integer","title":"New Subscriptions","description":"First paid subscriptions in the window. Trial starts and renewals are not included."},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref","description":"Marketing ref stored on the user at account creation. Null is every account in the window with no ref. A trial that later converts stays on this ref."},"points":{"items":{"$ref":"#/components/schemas/AcquisitionPoint"},"type":"array","title":"Points"}},"type":"object","required":["new_users","new_trials","new_subscriptions","ref","points"],"title":"AcquisitionRefSeries","description":"One first-touch ref inside the same window and buckets as `points`."},"AcquisitionResponse":{"properties":{"from":{"type":"string","format":"date","title":"From"},"to":{"type":"string","format":"date","title":"To"},"bucket":{"type":"string","enum":["day","week","month"],"title":"Bucket"},"timezone":{"type":"string","const":"UTC","title":"Timezone"},"points":{"items":{"$ref":"#/components/schemas/AcquisitionPoint"},"type":"array","title":"Points"},"totals":{"$ref":"#/components/schemas/AcquisitionTotals"},"by_ref":{"items":{"$ref":"#/components/schemas/AcquisitionRefSeries"},"type":"array","title":"By Ref","description":"The same new_users, new_trials, and new_subscriptions counts split by first-touch ref. Refs with no event in the window are omitted. The null ref is included when the window has unattributed events. Named refs are alphabetical and the null ref is last. Sums of by_ref match totals."}},"type":"object","required":["from","to","bucket","timezone","points","totals","by_ref"],"title":"AcquisitionResponse","description":"Time series of new accounts, trial starts, and first paid subscriptions."},"AcquisitionTotals":{"properties":{"new_users":{"type":"integer","title":"New Users","description":"Accounts created in the window. Later edits of those accounts are not included."},"new_trials":{"type":"integer","title":"New Trials","description":"Trials started in the window. A later conversion stays on the trial's start day and is not counted here again."},"new_subscriptions":{"type":"integer","title":"New Subscriptions","description":"First paid subscriptions in the window. Trial starts and renewals are not included."}},"type":"object","required":["new_users","new_trials","new_subscriptions"],"title":"AcquisitionTotals"},"ActivateUserRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ActivateUserRequest","description":"Request to activate a user"},"ActivePaidPriceCount":{"properties":{"price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Id","description":"subscription.stripe_price_id. Null when that column is null."},"tier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Name","description":"SubscriptionTier.name for that price id, when the catalog has a row."},"subscriptions":{"type":"integer","title":"Subscriptions"}},"type":"object","required":["price_id","tier_name","subscriptions"],"title":"ActivePaidPriceCount","description":"How many current active paid subscriptions use a stored price id. Not an amount."},"AdminActionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"user_id":{"type":"string","format":"uuid4","title":"User Id"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","required":["success","message","user_id"],"title":"AdminActionResponse","description":"Response for admin action endpoints"},"AdminCalDavAccount":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"provider_kind":{"type":"string","title":"Provider Kind"},"display_label":{"type":"string","title":"Display Label"},"username":{"type":"string","title":"Username"},"auth_status":{"type":"string","title":"Auth Status"},"last_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Code"},"calendars":{"items":{"$ref":"#/components/schemas/AdminCalDavCalendar"},"type":"array","title":"Calendars","default":[]}},"type":"object","required":["id","provider_kind","display_label","username","auth_status"],"title":"AdminCalDavAccount","description":"CalDAV account on the admin user card. The secret is never included."},"AdminCalDavCalendar":{"properties":{"link_id":{"type":"string","format":"uuid4","title":"Link Id"},"local_calendar_id":{"type":"string","format":"uuid4","title":"Local Calendar Id"},"local_calendar_name":{"type":"string","title":"Local Calendar Name"},"remote_name":{"type":"string","title":"Remote Name"},"link_origin":{"type":"string","title":"Link Origin"},"is_active":{"type":"boolean","title":"Is Active"},"can_write":{"type":"boolean","title":"Can Write"},"quarantine_count":{"type":"integer","title":"Quarantine Count","default":0},"sync_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync State"},"remote_deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Remote Deleted At"}},"type":"object","required":["link_id","local_calendar_id","local_calendar_name","remote_name","link_origin","is_active","can_write"],"title":"AdminCalDavCalendar","description":"One CalDAV calendar link on the admin user card."},"AdminCalendar":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"event_count":{"type":"integer","title":"Event Count"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"has_google_export":{"type":"boolean","title":"Has Google Export","default":false},"google_calendar_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Calendar Name"}},"type":"object","required":["id","name","role","event_count","is_active","created_at"],"title":"AdminCalendar","description":"Calendar summary for admin user detail"},"AdminGoogleAccount":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"picture":{"type":"string","title":"Picture"},"auth_status":{"type":"string","title":"Auth Status"},"auth_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Error Message"},"auth_error_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Auth Error Timestamp"},"token_expiry":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Token Expiry"},"scopes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scopes"},"linked_calendars":{"items":{"$ref":"#/components/schemas/AdminLinkedCalendar"},"type":"array","title":"Linked Calendars","default":[]}},"type":"object","required":["id","email","name","picture","auth_status"],"title":"AdminGoogleAccount","description":"Google account details for admin user detail"},"AdminLinkedCalendar":{"properties":{"export_id":{"type":"string","format":"uuid4","title":"Export Id"},"local_calendar_id":{"type":"string","format":"uuid4","title":"Local Calendar Id"},"local_calendar_name":{"type":"string","title":"Local Calendar Name"},"google_calendar_id":{"type":"string","title":"Google Calendar Id"},"is_active":{"type":"boolean","title":"Is Active"},"export_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Export Status"},"sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Status"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"quarantine_count":{"type":"integer","title":"Quarantine Count"}},"type":"object","required":["export_id","local_calendar_id","local_calendar_name","google_calendar_id","is_active","quarantine_count"],"title":"AdminLinkedCalendar","description":"Linked calendar details for admin user detail"},"AdminLogResponse":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"message":{"type":"string","title":"Message"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"container_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container Name"},"log_date":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Log Date"}},"type":"object","required":["id","message","timestamp"],"title":"AdminLogResponse"},"AdminQueueFullSyncAllOutput":{"properties":{"queued":{"type":"integer","title":"Queued"},"skipped_active_job":{"type":"integer","title":"Skipped Active Job"},"jobs":{"items":{"$ref":"#/components/schemas/AdminQueuedFullSyncItem"},"type":"array","title":"Jobs"}},"type":"object","required":["queued","skipped_active_job","jobs"],"title":"AdminQueueFullSyncAllOutput"},"AdminQueuedFullSyncItem":{"properties":{"google_export_id":{"type":"string","format":"uuid4","title":"Google Export Id"},"local_calendar_id":{"type":"string","format":"uuid4","title":"Local Calendar Id"},"google_calendar_id":{"type":"string","title":"Google Calendar Id"},"job_id":{"type":"string","format":"uuid4","title":"Job Id"}},"type":"object","required":["google_export_id","local_calendar_id","google_calendar_id","job_id"],"title":"AdminQueuedFullSyncItem"},"AdminSyncJobDetail":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"job_type":{"type":"string","title":"Job Type"},"status":{"type":"string","title":"Status"},"google_export_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Google Export Id"},"advanced_event_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Advanced Event Id"},"attempts":{"type":"integer","title":"Attempts"},"max_attempts":{"type":"integer","title":"Max Attempts"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"last_error_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Class"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Attempt At"},"lease_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lease Owner"},"lease_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lease Until"},"google_calendar_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Calendar Id"},"google_calendar_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Calendar Name"},"google_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Account Id"},"google_account_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Account Email"},"local_calendar_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Local Calendar Id"},"local_calendar_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Local Calendar Name"},"user_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"caldav_link_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Caldav Link Id"},"remote_calendar_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remote Calendar Name"}},"type":"object","required":["id","job_type","status","attempts","max_attempts"],"title":"AdminSyncJobDetail"},"AdminSyncJobStatusCounts":{"properties":{"pending":{"type":"integer","title":"Pending","default":0},"running":{"type":"integer","title":"Running","default":0},"failed":{"type":"integer","title":"Failed","default":0},"completed":{"type":"integer","title":"Completed","default":0},"stuck":{"type":"integer","title":"Stuck","description":"Jobs with attempts >= 3 that are not failed or completed","default":0}},"type":"object","title":"AdminSyncJobStatusCounts","description":"Queue-wide status counts for admin sync job dashboard."},"AdminSyncJobsListOutput":{"properties":{"jobs":{"items":{"$ref":"#/components/schemas/AdminSyncJobDetail"},"type":"array","title":"Jobs"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"counts":{"anyOf":[{"$ref":"#/components/schemas/AdminSyncJobStatusCounts"},{"type":"null"}],"description":"Queue-wide status counts (ignores filter and pagination)"}},"type":"object","required":["jobs","total","limit","offset"],"title":"AdminSyncJobsListOutput"},"AdminSyncSuspensionInfo":{"properties":{"sync_paused":{"type":"boolean","title":"Sync Paused"},"reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Code"},"pending_jobs_held":{"type":"integer","title":"Pending Jobs Held","default":0},"caldav_sync_paused":{"type":"boolean","title":"Caldav Sync Paused","default":false},"caldav_reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caldav Reason Code"},"caldav_pending_jobs_held":{"type":"integer","title":"Caldav Pending Jobs Held","default":0}},"type":"object","required":["sync_paused"],"title":"AdminSyncSuspensionInfo","description":"Calendar sync suspension information for admin visibility"},"AdminToken":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","title":"AdminToken","description":"Token info for admin user detail"},"AdminUserDetailResponse":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref","description":"First-touch marketing ref. Null when the account has no source. Never replaced."},"preferred_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Timezone"},"birthday":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthday"},"default_country":{"type":"string","title":"Default Country"},"default_subdiv":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Subdiv"},"is_active":{"type":"boolean","title":"Is Active"},"is_verified":{"type":"boolean","title":"Is Verified"},"is_superuser":{"type":"boolean","title":"Is Superuser"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_login":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login"},"last_token_check":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Token Check"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/AdminUserDetailSubscription"},{"type":"null"}]},"google_accounts":{"items":{"$ref":"#/components/schemas/AdminGoogleAccount"},"type":"array","title":"Google Accounts","default":[]},"calendars":{"items":{"$ref":"#/components/schemas/AdminCalendar"},"type":"array","title":"Calendars","default":[]},"active_tokens":{"items":{"$ref":"#/components/schemas/AdminToken"},"type":"array","title":"Active Tokens","default":[]},"stats":{"$ref":"#/components/schemas/AdminUserStats"},"sync_suspension":{"$ref":"#/components/schemas/AdminSyncSuspensionInfo"},"caldav_accounts":{"items":{"$ref":"#/components/schemas/AdminCalDavAccount"},"type":"array","title":"Caldav Accounts","default":[]}},"type":"object","required":["id","email","default_country","is_active","is_verified","is_superuser","created_at","stats","sync_suspension"],"title":"AdminUserDetailResponse","description":"Response for admin user detail endpoint"},"AdminUserDetailSubscription":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"status":{"type":"string","title":"Status"},"is_trial":{"type":"boolean","title":"Is Trial"},"trial_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial End"},"current_period_start":{"type":"string","format":"date-time","title":"Current Period Start"},"current_period_end":{"type":"string","format":"date-time","title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"},"tier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Name"},"tier_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tier Level"},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Subscription Id"},"stripe_price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Price Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","is_trial","current_period_start","current_period_end","cancel_at_period_end","created_at","updated_at"],"title":"AdminUserDetailSubscription","description":"Detailed subscription info for admin user detail"},"AdminUserListItem":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref","description":"First-touch marketing ref. Null when the account has no source. Never replaced."},"is_active":{"type":"boolean","title":"Is Active"},"is_verified":{"type":"boolean","title":"Is Verified"},"is_superuser":{"type":"boolean","title":"Is Superuser"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_login":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login"},"last_token_check":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Token Check"},"last_event_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event Created At"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionSummary"},{"type":"null"}]},"google_accounts":{"items":{"$ref":"#/components/schemas/GoogleAccountSummary"},"type":"array","title":"Google Accounts","default":[]},"sync_health":{"$ref":"#/components/schemas/SyncHealthSummary"},"calendar_count":{"type":"integer","title":"Calendar Count"},"event_count":{"type":"integer","title":"Event Count"}},"type":"object","required":["id","email","is_active","is_verified","is_superuser","created_at","sync_health","calendar_count","event_count"],"title":"AdminUserListItem","description":"User item for admin user list"},"AdminUserListResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/AdminUserListItem"},"type":"array","title":"Users"},"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"filters_applied":{"$ref":"#/components/schemas/FiltersApplied"}},"type":"object","required":["users","pagination","filters_applied"],"title":"AdminUserListResponse","description":"Response for admin user list endpoint"},"AdminUserStats":{"properties":{"total_events":{"type":"integer","title":"Total Events"},"total_calendars":{"type":"integer","title":"Total Calendars"},"total_google_accounts":{"type":"integer","title":"Total Google Accounts"},"total_active_exports":{"type":"integer","title":"Total Active Exports"},"total_quarantine_items":{"type":"integer","title":"Total Quarantine Items"},"last_event_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event Created At"},"total_caldav_accounts":{"type":"integer","title":"Total Caldav Accounts","default":0}},"type":"object","required":["total_events","total_calendars","total_google_accounts","total_active_exports","total_quarantine_items"],"title":"AdminUserStats","description":"User statistics for admin user detail"},"AdvancedEventFromICSCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"ics_content":{"type":"string","title":"Ics Content"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"timezone":{"type":"string","title":"Timezone","default":"UTC"}},"type":"object","required":["ics_content"],"title":"AdvancedEventFromICSCreate","description":"Request model for creating event from iCalendar (.ics) content"},"AdvancedEventFromICSResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/ICSImportResult"},"type":"array","title":"Events"},"total_events":{"type":"integer","title":"Total Events"},"successful_imports":{"type":"integer","title":"Successful Imports"},"failed_imports":{"type":"integer","title":"Failed Imports"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["events","total_events","successful_imports","failed_imports","errors"],"title":"AdvancedEventFromICSResponse","description":"Response model for ICS import operation"},"AdvancedEventFromTextCreate":{"properties":{"name":{"type":"string","title":"Name"},"recurrence_text":{"type":"string","title":"Recurrence Text"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"model":{"type":"string","enum":["high","low","mega"],"title":"Model","default":"high"}},"type":"object","required":["name","recurrence_text"],"title":"AdvancedEventFromTextCreate","description":"Request model for creating event from natural language"},"AdvancedEventFromTextPreview":{"properties":{"name":{"type":"string","title":"Name"},"recurrence_text":{"type":"string","title":"Recurrence Text"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"},"model":{"type":"string","enum":["high","low"],"title":"Model","default":"high"}},"type":"object","required":["name","recurrence_text","start","end"],"title":"AdvancedEventFromTextPreview","description":"Request model for previewing event from natural language (without saving)"},"AdvancedEventFromTextPreviewDownload":{"properties":{"preview":{"$ref":"#/components/schemas/AdvancedEventInstanceResponse-Input"},"format":{"type":"string","enum":["ics","csv"],"title":"Format"}},"type":"object","required":["preview","format"],"title":"AdvancedEventFromTextPreviewDownload","description":"Request model for downloading preview in different formats (without re-parsing)"},"AdvancedEventFromTextUpdate":{"properties":{"name":{"type":"string","title":"Name"},"recurrence_text":{"type":"string","title":"Recurrence Text"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"model":{"type":"string","enum":["high","low","mega"],"title":"Model","default":"high"}},"type":"object","required":["name","recurrence_text"],"title":"AdvancedEventFromTextUpdate","description":"Request model for updating event from natural language"},"AdvancedEventInstanceBatchResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/AdvancedEventInstanceResponse-Output"},"type":"array","title":"Events"},"failures":{"items":{"$ref":"#/components/schemas/EventInstanceFailure"},"type":"array","title":"Failures","default":[]}},"type":"object","required":["events"],"title":"AdvancedEventInstanceBatchResponse","description":"Response model for batch instance endpoints with optional failures"},"AdvancedEventInstanceOptimizedBatchResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/AdvancedEventInstanceOptimizedResponse"},"type":"array","title":"Events"},"failures":{"items":{"$ref":"#/components/schemas/EventInstanceFailure"},"type":"array","title":"Failures","default":[]}},"type":"object","required":["events"],"title":"AdvancedEventInstanceOptimizedBatchResponse","description":"Optimized batch response with optional failures"},"AdvancedEventInstanceOptimizedResponse":{"properties":{"event_id":{"type":"string","format":"uuid4","title":"Event Id"},"instances":{"items":{"$ref":"#/components/schemas/EventInstanceResponse"},"type":"array","title":"Instances"}},"type":"object","required":["event_id","instances"],"title":"AdvancedEventInstanceOptimizedResponse","description":"Optimized response with event_id and instances only"},"AdvancedEventInstanceResponse-Input":{"properties":{"event":{"$ref":"#/components/schemas/AdvancedRecurrentEventOutput-Input"},"instances":{"items":{"$ref":"#/components/schemas/EventInstanceResponse"},"type":"array","title":"Instances"}},"type":"object","required":["event","instances"],"title":"AdvancedEventInstanceResponse","description":"Response model for event with its instances"},"AdvancedEventInstanceResponse-Output":{"properties":{"event":{"$ref":"#/components/schemas/AdvancedRecurrentEventOutput-Output"},"instances":{"items":{"$ref":"#/components/schemas/EventInstanceResponse"},"type":"array","title":"Instances"}},"type":"object","required":["event","instances"],"title":"AdvancedEventInstanceResponse","description":"Response model for event with its instances"},"AdvancedRecurrentEventCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"User-friendly name for this event"},"description":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Description","description":"Optional detailed description"},"components":{"items":{"$ref":"#/components/schemas/RecurrentEventComponentCreate"},"type":"array","minItems":1,"title":"Components","description":"List of recurrent event components with their boolean operators. First component should typically use OR."},"roll":{"$ref":"#/components/schemas/BusinessDayRoll","description":"After expansion, move a non-business day forward, backward, or to the nearest business day, or drop it (skip). none leaves the date unchanged.","default":"none"},"business_calendar":{"anyOf":[{"$ref":"#/components/schemas/BusinessCalendar"},{"type":"null"}],"description":"Working calendar for this event. Used by business-day monthly rules and by roll. Omit to keep weekends as Saturday and Sunday with no holidays."}},"additionalProperties":false,"type":"object","required":["name","components"],"title":"AdvancedRecurrentEventCreate","description":"Model for creating an advanced recurrent event"},"AdvancedRecurrentEventMinimalOutput":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"calendar_ids":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Calendar Ids","description":"List of calendar IDs this event belongs to"},"google_origin":{"type":"boolean","title":"Google Origin","description":"True when this event was imported from Google Calendar (read-only mirror)","default":false},"external_origin":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"External Origin","description":"Set when the event was imported from CalDAV. read_only is true for those events."},"missing_from_source":{"type":"boolean","title":"Missing From Source","description":"True when a page watch created this event and the event is no longer on that page. The event is kept. The mark clears if a later check finds it again.","default":false}},"type":"object","required":["id","name","is_active"],"title":"AdvancedRecurrentEventMinimalOutput","description":"Minimal output for event listings"},"AdvancedRecurrentEventOutput-Input":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"roll":{"type":"string","title":"Roll","description":"Post-expansion roll. none leaves dates unchanged. forward, backward, and nearest move a weekend or holiday. skip drops it.","default":"none"},"business_calendar":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Business Calendar","description":"Event working calendar. Null when the event has none. Dates are YYYY-MM-DD strings."},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"components":{"items":{"$ref":"#/components/schemas/RecurrentEventComponentOutput-Input"},"type":"array","title":"Components"},"webhooks":{"items":{"$ref":"#/components/schemas/EventWebhookOutput"},"type":"array","title":"Webhooks"},"conference_data":{"anyOf":[{"$ref":"#/components/schemas/ConferenceDataOutput"},{"type":"null"}]},"guests":{"items":{"$ref":"#/components/schemas/EventGuestOutput"},"type":"array","title":"Guests"},"calendar_ids":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Calendar Ids","description":"List of calendar IDs this event belongs to"},"display_name":{"type":"string","title":"Display Name"},"google_origin":{"type":"boolean","title":"Google Origin","description":"True when this event was imported from Google Calendar. Google-origin events are read-only mirrors: local edits are never pushed to Google.","default":false},"google_event_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Event Url","description":"Deep link to open this event in Google Calendar (only set for Google-origin events)"},"external_origin":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"External Origin","description":"Set when the event was imported from CalDAV. read_only is true for those events."},"sync_warnings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sync Warnings","description":"User-facing sync warnings. Each one names the event or calendar and a next step."},"missing_from_source":{"type":"boolean","title":"Missing From Source","description":"True when a page watch created this event and the event is no longer on that page. The event is kept. The mark clears if a later check finds it again.","default":false}},"type":"object","required":["id","name","is_active","created_at","updated_at","components","webhooks","display_name"],"title":"AdvancedRecurrentEventOutput","description":"Output model for an advanced recurrent event"},"AdvancedRecurrentEventOutput-Output":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"roll":{"type":"string","title":"Roll","description":"Post-expansion roll. none leaves dates unchanged. forward, backward, and nearest move a weekend or holiday. skip drops it.","default":"none"},"business_calendar":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Business Calendar","description":"Event working calendar. Null when the event has none. Dates are YYYY-MM-DD strings."},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"components":{"items":{"$ref":"#/components/schemas/RecurrentEventComponentOutput-Output"},"type":"array","title":"Components"},"webhooks":{"items":{"$ref":"#/components/schemas/EventWebhookOutput"},"type":"array","title":"Webhooks"},"conference_data":{"anyOf":[{"$ref":"#/components/schemas/ConferenceDataOutput"},{"type":"null"}]},"guests":{"items":{"$ref":"#/components/schemas/EventGuestOutput"},"type":"array","title":"Guests"},"calendar_ids":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Calendar Ids","description":"List of calendar IDs this event belongs to"},"display_name":{"type":"string","title":"Display Name"},"google_origin":{"type":"boolean","title":"Google Origin","description":"True when this event was imported from Google Calendar. Google-origin events are read-only mirrors: local edits are never pushed to Google.","default":false},"google_event_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Event Url","description":"Deep link to open this event in Google Calendar (only set for Google-origin events)"},"external_origin":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"External Origin","description":"Set when the event was imported from CalDAV. read_only is true for those events."},"sync_warnings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sync Warnings","description":"User-facing sync warnings. Each one names the event or calendar and a next step."},"missing_from_source":{"type":"boolean","title":"Missing From Source","description":"True when a page watch created this event and the event is no longer on that page. The event is kept. The mark clears if a later check finds it again.","default":false}},"type":"object","required":["id","name","is_active","created_at","updated_at","components","webhooks","display_name"],"title":"AdvancedRecurrentEventOutput","description":"Output model for an advanced recurrent event"},"AdvancedRecurrentEventOutputWithWarnings":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"roll":{"type":"string","title":"Roll","description":"Post-expansion roll. none leaves dates unchanged. forward, backward, and nearest move a weekend or holiday. skip drops it.","default":"none"},"business_calendar":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Business Calendar","description":"Event working calendar. Null when the event has none. Dates are YYYY-MM-DD strings."},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"components":{"items":{"$ref":"#/components/schemas/RecurrentEventComponentOutput-Output"},"type":"array","title":"Components"},"webhooks":{"items":{"$ref":"#/components/schemas/EventWebhookOutput"},"type":"array","title":"Webhooks"},"conference_data":{"anyOf":[{"$ref":"#/components/schemas/ConferenceDataOutput"},{"type":"null"}]},"guests":{"items":{"$ref":"#/components/schemas/EventGuestOutput"},"type":"array","title":"Guests"},"calendar_ids":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Calendar Ids","description":"List of calendar IDs this event belongs to"},"display_name":{"type":"string","title":"Display Name"},"google_origin":{"type":"boolean","title":"Google Origin","description":"True when this event was imported from Google Calendar. Google-origin events are read-only mirrors: local edits are never pushed to Google.","default":false},"google_event_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Event Url","description":"Deep link to open this event in Google Calendar (only set for Google-origin events)"},"external_origin":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"External Origin","description":"Set when the event was imported from CalDAV. read_only is true for those events."},"sync_warnings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sync Warnings","description":"User-facing sync warnings. Each one names the event or calendar and a next step."},"missing_from_source":{"type":"boolean","title":"Missing From Source","description":"True when a page watch created this event and the event is no longer on that page. The event is kept. The mark clears if a later check finds it again.","default":false},"google_export_warnings":{"items":{"$ref":"#/components/schemas/GoogleExportWarning"},"type":"array","title":"Google Export Warnings","description":"Warnings about Google exports that were skipped"}},"type":"object","required":["id","name","is_active","created_at","updated_at","components","webhooks","display_name"],"title":"AdvancedRecurrentEventOutputWithWarnings","description":"Advanced event output plus Google export warnings from the mutation that produced it."},"AdvancedRecurrentEventUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name","description":"User-friendly name for this event"},"description":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Description","description":"Optional detailed description"},"components":{"anyOf":[{"items":{"$ref":"#/components/schemas/RecurrentEventComponentCreate"},"type":"array","minItems":1},{"type":"null"}],"title":"Components","description":"List of recurrent event components with their boolean operators. If provided, replaces all existing components."},"roll":{"anyOf":[{"$ref":"#/components/schemas/BusinessDayRoll"},{"type":"null"}],"description":"Replace the post-expansion roll. Send none to stop moving dates."},"business_calendar":{"anyOf":[{"$ref":"#/components/schemas/BusinessCalendar"},{"type":"null"}],"description":"Replace the event working calendar. Send null to clear it."}},"additionalProperties":false,"type":"object","title":"AdvancedRecurrentEventUpdate","description":"Model for partially updating an advanced recurrent event"},"ApiKeyCreate":{"properties":{"name":{"type":"string","title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"calendar_ids":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Calendar Ids"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"additionalProperties":false,"type":"object","required":["name","scopes"],"title":"ApiKeyCreate"},"ApiKeyCreated":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"calendar_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Calendar Ids"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"rotated_from_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Rotated From Id"},"key":{"type":"string","title":"Key"}},"type":"object","required":["id","name","prefix","scopes","calendar_ids","expires_at","revoked_at","last_used_at","created_at","key"],"title":"ApiKeyCreated","description":"Returned only by create and rotate. `key` is the full secret."},"ApiKeyOut":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"calendar_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Calendar Ids"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"rotated_from_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Rotated From Id"}},"type":"object","required":["id","name","prefix","scopes","calendar_ids","expires_at","revoked_at","last_used_at","created_at"],"title":"ApiKeyOut"},"ApiKeyUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"calendar_ids":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Calendar Ids"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"additionalProperties":false,"type":"object","title":"ApiKeyUpdate"},"BatchAddEventsToCalendarRequest":{"properties":{"event_ids":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Event Ids"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"},"color_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Override"}},"type":"object","required":["event_ids"],"title":"BatchAddEventsToCalendarRequest","description":"Request body for batch add events to calendar."},"BatchDeleteEventsRequest":{"properties":{"event_ids":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Event Ids"}},"type":"object","required":["event_ids"],"title":"BatchDeleteEventsRequest","description":"Request body for batch delete events."},"BatchDeleteEventsResponseWithWarnings":{"properties":{"message":{"type":"string","title":"Message"},"deleted":{"type":"integer","title":"Deleted"},"skipped":{"type":"integer","title":"Skipped","description":"Ids that were missing, duplicated, or not accessible","default":0},"sync_warnings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sync Warnings","description":"Warnings from other sync providers, such as CalDAV"},"google_export_warnings":{"items":{"$ref":"#/components/schemas/GoogleExportWarning"},"type":"array","title":"Google Export Warnings","description":"Warnings about Google exports that failed"}},"type":"object","required":["message","deleted"],"title":"BatchDeleteEventsResponseWithWarnings","description":"Response for batch delete events with optional Google export warnings"},"BatchRemoveEventsFromCalendarRequest":{"properties":{"event_ids":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Event Ids"}},"type":"object","required":["event_ids"],"title":"BatchRemoveEventsFromCalendarRequest","description":"Request body for batch remove events from calendar."},"Body_change_password_auth_users_change_password_post":{"properties":{"old_password":{"type":"string","title":"Old Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["new_password"],"title":"Body_change_password_auth_users_change_password_post"},"Body_create_portal_session_subscription_portal_post":{"properties":{"return_url":{"type":"string","title":"Return Url"}},"type":"object","required":["return_url"],"title":"Body_create_portal_session_subscription_portal_post"},"Body_create_token_auth_token_post":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"one_time_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"One Time Token"}},"type":"object","title":"Body_create_token_auth_token_post"},"Body_delete_permanent_token_auth_permanent_token_delete":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"Body_delete_permanent_token_auth_permanent_token_delete"},"Body_reset_password_auth_users_reset_password_post":{"properties":{"user":{"$ref":"#/components/schemas/UserBase"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["user","new_password"],"title":"Body_reset_password_auth_users_reset_password_post"},"Body_set_active_auth_users_set_active_post":{"properties":{"user":{"$ref":"#/components/schemas/UserBase"},"active":{"type":"boolean","title":"Active"}},"type":"object","required":["user","active"],"title":"Body_set_active_auth_users_set_active_post"},"Body_set_admin_auth_users_set_admin_post":{"properties":{"user":{"$ref":"#/components/schemas/UserBase"},"admin":{"type":"boolean","title":"Admin"}},"type":"object","required":["user","admin"],"title":"Body_set_admin_auth_users_set_admin_post"},"Body_set_verified_auth_users_set_verified_post":{"properties":{"user":{"$ref":"#/components/schemas/UserBase"},"verified":{"type":"boolean","title":"Verified"}},"type":"object","required":["user","verified"],"title":"Body_set_verified_auth_users_set_verified_post"},"BooleanOperator":{"type":"string","enum":["OR","AND","NOT","XOR"],"title":"BooleanOperator","description":"Boolean operators for combining recurrent events"},"BusinessCalendar":{"properties":{"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 country code, such as GB or US"},"subdiv":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subdiv","description":"Subdivision code understood by the holidays package, such as ENG or CA"},"weekend_days":{"items":{"type":"integer"},"type":"array","title":"Weekend Days","description":"Days off. 0=Monday ... 6=Sunday. Default is Saturday and Sunday."},"closures":{"items":{"type":"string","format":"date"},"type":"array","title":"Closures","description":"Extra non-working dates, YYYY-MM-DD"},"extra_workdays":{"items":{"type":"string","format":"date"},"type":"array","title":"Extra Workdays","description":"Working dates that override weekends, holidays, and closures"}},"additionalProperties":false,"type":"object","title":"BusinessCalendar","description":"Working calendar for one event.\n\ncountry and subdiv select the pinned python-holidays calendar.\nweekend_days uses the same numbering as the rest of the API: 0 Monday through 6 Sunday.\nclosures are extra days off. extra_workdays are business days even when they\nfall on a weekend, a holiday, or a closure."},"BusinessDayRoll":{"type":"string","enum":["none","forward","backward","nearest","skip"],"title":"BusinessDayRoll","description":"What to do after expansion when a date is not a business day."},"CacheMonitorResponse":{"properties":{"instance_count":{"type":"integer","title":"Instance Count","description":"Number of instances in cache"},"window_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window Start","description":"Start of effective cache window (min across all events)"},"window_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window End","description":"End of effective cache window (max across all events)"},"window_duration_days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Window Duration Days","description":"Duration of effective cache window in days"},"events_with_cached_instances":{"type":"integer","title":"Events With Cached Instances","description":"Number of events that have cached instances"},"calendars_with_cached_events":{"type":"integer","title":"Calendars With Cached Events","description":"Number of calendars with events that have cached instances"}},"type":"object","required":["instance_count","events_with_cached_instances","calendars_with_cached_events"],"title":"CacheMonitorResponse","description":"Cache monitor: instance count, effective window, and coverage by events/calendars."},"CalendarChangeOutput":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"timezone":{"type":"string","title":"Timezone"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"is_active":{"type":"boolean","title":"Is Active"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order","description":"Per-user display order for calendar list"},"event_count":{"type":"integer","title":"Event Count","description":"Number of events in this calendar","default":0},"google_calendar_ids":{"items":{"type":"string"},"type":"array","title":"Google Calendar Ids","description":"IDs of connected Google Calendars for this calendar"}},"type":"object","required":["id","name","description","timezone","color","is_active","updated_at"],"title":"CalendarChangeOutput","description":"Output for changed calendars in poll responses"},"CalendarCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Calendar name"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"Optional calendar description"},"timezone":{"type":"string","title":"Timezone","description":"Calendar timezone (e.g., 'America/New_York', 'Europe/London', 'UTC')","default":"UTC"},"color":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Color","description":"Optional calendar color for UI"},"public":{"type":"boolean","title":"Public","description":"If true, events and instances are readable without authentication","default":false}},"additionalProperties":false,"type":"object","required":["name"],"title":"CalendarCreate","description":"Model for creating a calendar"},"CalendarEventLinkCreate":{"properties":{"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order","description":"Custom display order for this event in the calendar"},"color_override":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Color Override","description":"Calendar-specific color override for this event"}},"additionalProperties":false,"type":"object","title":"CalendarEventLinkCreate","description":"Model for adding an event to a calendar with metadata"},"CalendarEventLinkOutput":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"calendar_id":{"type":"string","format":"uuid4","title":"Calendar Id"},"event_id":{"type":"string","format":"uuid4","title":"Event Id"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"},"color_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Override"},"added_at":{"type":"string","format":"date-time","title":"Added At"}},"type":"object","required":["id","calendar_id","event_id","display_order","color_override","added_at"],"title":"CalendarEventLinkOutput","description":"Output model for calendar-event link"},"CalendarEventLinkOutputWithWarnings":{"properties":{"link":{"$ref":"#/components/schemas/CalendarEventLinkOutput"},"google_export_warnings":{"items":{"$ref":"#/components/schemas/GoogleExportWarning"},"type":"array","title":"Google Export Warnings","description":"Warnings when a Google-linked calendar could not export this event. Empty when the calendar is not linked to Google."},"sync_warnings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sync Warnings","description":"Warnings from other sync providers, such as CalDAV. Empty when the calendar is not linked to that provider."}},"type":"object","required":["link"],"title":"CalendarEventLinkOutputWithWarnings","description":"Output model for calendar-event link with optional sync warnings"},"CalendarEventLinkUpdate":{"properties":{"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order","description":"Custom display order for this event in the calendar"},"color_override":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Color Override","description":"Calendar-specific color override for this event"}},"additionalProperties":false,"type":"object","title":"CalendarEventLinkUpdate","description":"Model for updating calendar-event link metadata"},"CalendarOrderRequest":{"properties":{"calendar_ids":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Calendar Ids","description":"Ordered list of calendar IDs (user's display order)"}},"additionalProperties":false,"type":"object","required":["calendar_ids"],"title":"CalendarOrderRequest","description":"Request model for reordering user's calendars"},"CalendarOutput":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"timezone":{"type":"string","title":"Timezone"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"is_active":{"type":"boolean","title":"Is Active"},"public":{"type":"boolean","title":"Public"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order","description":"Per-user display order for calendar list (from UserCalendarLink.display_order)"},"event_count":{"type":"integer","title":"Event Count","description":"Number of events in this calendar","default":0},"google_calendar_ids":{"items":{"type":"string"},"type":"array","title":"Google Calendar Ids","description":"IDs of connected Google Calendars for this calendar"},"shared_with":{"items":{"$ref":"#/components/schemas/CalendarShareInfoOutput"},"type":"array","title":"Shared With","description":"Users this calendar is shared with and their roles"}},"type":"object","required":["id","name","description","timezone","color","is_active","public","created_at","updated_at"],"title":"CalendarOutput","description":"Output model for a calendar"},"CalendarShareInfoOutput":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"}},"type":"object","required":["email","role"],"title":"CalendarShareInfoOutput","description":"Output model for calendar sharing info"},"CalendarShareRequest":{"properties":{"user_id":{"type":"string","format":"uuid4","title":"User Id","description":"User ID to share the calendar with"},"role":{"type":"string","title":"Role","description":"Role for the shared user: 'owner', 'editor', 'viewer'","default":"viewer"}},"additionalProperties":false,"type":"object","required":["user_id"],"title":"CalendarShareRequest","description":"Request model for sharing a calendar with another user"},"CalendarShareUpdateRequest":{"properties":{"role":{"type":"string","title":"Role","description":"New role for the shared user: 'owner', 'editor', 'viewer'"}},"additionalProperties":false,"type":"object","required":["role"],"title":"CalendarShareUpdateRequest","description":"Request model for updating a shared user's role"},"CalendarUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name","description":"Calendar name"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"Calendar description"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"Calendar timezone"},"color":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Color","description":"Calendar color for UI"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Whether the calendar is active"},"public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Public","description":"If true, events and instances are readable without authentication"}},"additionalProperties":false,"type":"object","title":"CalendarUpdate","description":"Model for updating a calendar"},"CalendarWebhookUrlResponse":{"properties":{"webhook_url":{"type":"string","title":"Webhook Url"},"calendar_id":{"type":"string","title":"Calendar Id"},"user_id":{"type":"string","title":"User Id"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["webhook_url","calendar_id","user_id"],"title":"CalendarWebhookUrlResponse","description":"Response model for webhook URL generation"},"CertificateBody":{"properties":{"address":{"type":"string","title":"Address"}},"type":"object","required":["address"],"title":"CertificateBody"},"ChatExtractEventsRequest":{"properties":{"text":{"type":"string","title":"Text"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"timezone":{"type":"string","title":"Timezone","default":"Europe/Madrid"},"model":{"type":"string","enum":["high","low","mega"],"title":"Model","default":"high"},"calendar_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Calendar Id"}},"type":"object","required":["text"],"title":"ChatExtractEventsRequest","description":"Request model for chat-based event extraction"},"ChatExtractEventsResponse":{"properties":{"extracted_events":{"items":{"$ref":"#/components/schemas/ExtractedEventInfo"},"type":"array","title":"Extracted Events"},"created_events":{"items":{"$ref":"#/components/schemas/EventCreationResult"},"type":"array","title":"Created Events"},"summary":{"additionalProperties":{"type":"integer"},"type":"object","title":"Summary"},"page_reads":{"items":{"$ref":"#/components/schemas/PageReadStatus"},"type":"array","title":"Page Reads","description":"One status per URL in the request. Empty when the text had no URL. When job is set, each row starts as status pending and the event lists are empty until GET /events/extract/jobs/{id} reports done. Events from URLs that were read are still in extracted_events and created_events when other URLs failed."},"job":{"anyOf":[{"$ref":"#/components/schemas/PageExtractJobRef"},{"type":"null"}],"description":"Set when the text contains a URL. The read runs in the background. Null when the text had no URL; the rest of this body is then the finished result."},"suggested_interval":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly","yearly"]},{"type":"null"}],"title":"Suggested Interval","description":"How often AnyMoment would check this page again, when the text contained a link and at least one page was read. Null for typed text and for a read that is still running."},"watch_request":{"anyOf":[{"$ref":"#/components/schemas/WatchRequest"},{"type":"null"}],"description":"What the user's own text asked about watching the page. Null when the text had no URL or did not ask to keep watching it. Set as soon as the extract is accepted, including while job.status is pending. interval null means they named no frequency: use suggested_interval from the finished job. The API does not create the watch."}},"type":"object","required":["extracted_events","created_events","summary"],"title":"ChatExtractEventsResponse","description":"Response model for chat-based event extraction and creation"},"CheckoutSessionCreate":{"properties":{"price_id":{"type":"string","title":"Price Id"},"success_url":{"type":"string","title":"Success Url"},"cancel_url":{"type":"string","title":"Cancel Url"}},"type":"object","required":["price_id","success_url","cancel_url"],"title":"CheckoutSessionCreate","description":"Request model for creating a checkout session"},"ClearAllSyncJobsRequest":{"properties":{"confirm":{"type":"string","title":"Confirm","description":"Must be exactly 'DELETE ALL SYNC JOBS' to proceed"}},"type":"object","required":["confirm"],"title":"ClearAllSyncJobsRequest","description":"Request to clear all Google Calendar sync jobs (admin-only).\n\nRequires exact confirmation phrase for safety."},"ConferenceDataGenerateResponse":{"properties":{"status":{"type":"string","enum":["google_meet","jitsi","manual_required"],"title":"Status"},"conference_data":{"anyOf":[{"$ref":"#/components/schemas/ConferenceDataOutput"},{"type":"null"}]},"reauth_required":{"type":"boolean","title":"Reauth Required","default":false},"debug_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Debug Message"}},"type":"object","required":["status"],"title":"ConferenceDataGenerateResponse"},"ConferenceDataOutput":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"url":{"type":"string","title":"Url"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"}},"type":"object","required":["id","url","name","description"],"title":"ConferenceDataOutput","description":"Output model for conference data"},"ConferenceDataUpdateRequest":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"ConferenceDataUpdateRequest"},"ConnectedAccount":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"picture":{"type":"string","title":"Picture"},"scopes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scopes"},"auth_status":{"type":"string","title":"Auth Status","default":"active"},"auth_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Error Message"},"auth_error_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Auth Error Timestamp"}},"type":"object","required":["id","email","name","picture"],"title":"ConnectedAccount"},"CredentialsBody":{"properties":{"address":{"type":"string","title":"Address"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"display_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Label"},"provider_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Kind"},"tls_pin_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tls Pin Sha256"}},"type":"object","required":["address","username","password"],"title":"CredentialsBody"},"DailyScheduleConfig":{"properties":{"interval":{"type":"integer","minimum":1.0,"title":"Interval","description":"Every N days"},"interval_anchor":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Interval Anchor","description":"Local date derived from this anchors INTERVAL (every N days). Omit to fall back to range_start, then query window."},"range_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range Start","description":"Optional start date/time for this recurrence (instances before this are excluded)"},"range_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range End","description":"Optional end date/time for this recurrence (instances after this are excluded)"}},"additionalProperties":false,"type":"object","required":["interval"],"title":"DailyScheduleConfig"},"DayOfTheWeek":{"type":"integer","enum":[0,1,2,3,4,5,6],"title":"DayOfTheWeek"},"DeleteUserRequest":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"confirm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Confirm"}},"additionalProperties":false,"type":"object","title":"DeleteUserRequest"},"DeliveryOut":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"subscription_id":{"type":"string","format":"uuid4","title":"Subscription Id"},"calendar_id":{"type":"string","format":"uuid4","title":"Calendar Id"},"event_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Event Id"},"change_type":{"type":"string","title":"Change Type"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"occurrence_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurrence Time"},"status":{"type":"string","title":"Status"},"attempts":{"type":"integer","title":"Attempts"},"max_attempts":{"type":"integer","title":"Max Attempts"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Attempt At"},"last_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Status Code"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"},"replay_of_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Replay Of Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","subscription_id","calendar_id","event_id","change_type","payload","occurrence_time","status","attempts","max_attempts","next_attempt_at","last_status_code","last_error","delivered_at","replay_of_id","created_at"],"title":"DeliveryOut"},"DestinationBody":{"properties":{"local_calendar_id":{"type":"string","format":"uuid4","title":"Local Calendar Id"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"remote_href":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remote Href"}},"type":"object","required":["local_calendar_id"],"title":"DestinationBody"},"DisconnectBody":{"properties":{"remove_imported":{"type":"boolean","title":"Remove Imported","default":true},"remove_remote_managed":{"type":"boolean","title":"Remove Remote Managed","default":false}},"type":"object","title":"DisconnectBody"},"EventChangeOutput":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"calendar_ids":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Calendar Ids","description":"List of calendar IDs this event belongs to"}},"type":"object","required":["id","name","is_active","updated_at"],"title":"EventChangeOutput","description":"Output for changed events in poll responses"},"EventCreationResult":{"properties":{"success":{"type":"boolean","title":"Success"},"event_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Event Id"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"extracted_event":{"$ref":"#/components/schemas/ExtractedEventInfo"},"google_export_warnings":{"items":{"$ref":"#/components/schemas/GoogleExportWarning"},"type":"array","title":"Google Export Warnings","description":"Warnings about Google exports that were skipped"},"sync_warnings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sync Warnings","description":"Warnings from other sync providers, such as CalDAV. Empty when the calendar is not linked."}},"type":"object","required":["success","extracted_event"],"title":"EventCreationResult","description":"Result of creating an event"},"EventDeleteCountResponse":{"properties":{"deleted":{"type":"integer","title":"Deleted"},"skipped":{"type":"integer","title":"Skipped"}},"type":"object","required":["deleted","skipped"],"title":"EventDeleteCountResponse","description":"How many events were deleted, and how many ids were already gone."},"EventDeleteResponseWithWarnings":{"properties":{"message":{"type":"string","title":"Message"},"sync_warnings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sync Warnings","description":"Warnings from other sync providers, such as CalDAV"},"google_export_warnings":{"items":{"$ref":"#/components/schemas/GoogleExportWarning"},"type":"array","title":"Google Export Warnings","description":"Warnings about Google exports that failed"}},"type":"object","required":["message"],"title":"EventDeleteResponseWithWarnings","description":"Response for event deletion with optional Google export warnings"},"EventFeedbackCreate":{"properties":{"value":{"type":"integer","enum":[1,-1],"title":"Value","description":"Feedback value: 1 for like, -1 for dislike"},"event_data":{"additionalProperties":true,"type":"object","title":"Event Data","description":"Complete event object to store as snapshot"},"message":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Message","description":"Optional feedback message"}},"additionalProperties":false,"type":"object","required":["value","event_data"],"title":"EventFeedbackCreate","description":"Model for creating event feedback"},"EventFeedbackOutput":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"value":{"type":"integer","title":"Value"},"event_data":{"additionalProperties":true,"type":"object","title":"Event Data"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","value","event_data","message","created_at"],"title":"EventFeedbackOutput","description":"Output model for event feedback"},"EventGuestCreate":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"response_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Status"},"is_organizer":{"type":"boolean","title":"Is Organizer","default":false},"is_optional":{"type":"boolean","title":"Is Optional","default":false},"is_resource":{"type":"boolean","title":"Is Resource","default":false}},"additionalProperties":false,"type":"object","title":"EventGuestCreate","description":"Model for creating an event guest"},"EventGuestOutput":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"event_id":{"type":"string","format":"uuid4","title":"Event Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"response_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Status"},"is_organizer":{"type":"boolean","title":"Is Organizer"},"is_optional":{"type":"boolean","title":"Is Optional"},"is_resource":{"type":"boolean","title":"Is Resource"},"invited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Invited At"},"responded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Responded At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","event_id","email","name","response_status","is_organizer","is_optional","is_resource","invited_at","responded_at","created_at","updated_at"],"title":"EventGuestOutput","description":"Output model for an event guest"},"EventGuestUpdate":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"response_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Status"},"is_organizer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Organizer"},"is_optional":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Optional"},"is_resource":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Resource"}},"additionalProperties":false,"type":"object","title":"EventGuestUpdate","description":"Model for updating an event guest"},"EventInCalendarOutput":{"properties":{"event":{"$ref":"#/components/schemas/AdvancedRecurrentEventOutput-Output"},"link":{"$ref":"#/components/schemas/CalendarEventLinkOutput"}},"type":"object","required":["event","link"],"title":"EventInCalendarOutput","description":"Output model for an event with its calendar link metadata"},"EventInstanceFailure":{"properties":{"event_id":{"type":"string","format":"uuid4","title":"Event Id"},"event_name":{"type":"string","title":"Event Name"},"message":{"type":"string","title":"Message"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Machine-readable reason code for the failure"},"is_google_synced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Google Synced","description":"Whether this event is synced from Google Calendar"}},"type":"object","required":["event_id","event_name","message"],"title":"EventInstanceFailure","description":"Information about an event that failed to build instances"},"EventInstanceResponse":{"properties":{"start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End"},"is_all_day":{"type":"boolean","title":"Is All Day"}},"type":"object","required":["start","end","is_all_day"],"title":"EventInstanceResponse","description":"Response model for a single event instance"},"EventScheduleCreate":{"properties":{"recurrence":{"$ref":"#/components/schemas/Recurrence"},"start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time","description":"Time in HH:MM format. Required unless is_all_day is true."},"end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Time","description":"Optional end time in HH:MM format for events with duration"},"is_all_day":{"type":"boolean","title":"Is All Day","description":"If true, event spans the entire day (start_time/end_time must not be provided)","default":false},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date","description":"Inclusive last day for a single (ONCE) event. Null means the same day as the start."},"timezone":{"type":"string","title":"Timezone","description":"Timezone for the event (e.g., 'America/New_York', 'Europe/London', 'UTC'). Defaults to UTC.","default":"UTC"},"config":{"anyOf":[{"$ref":"#/components/schemas/ExternalRuleScheduleConfig"},{"$ref":"#/components/schemas/WeeklyScheduleConfig"},{"$ref":"#/components/schemas/MonthlyScheduleConfig"},{"$ref":"#/components/schemas/YearlyScheduleConfig"},{"$ref":"#/components/schemas/WeeksOfYearScheduleConfig"},{"$ref":"#/components/schemas/MonthsOfYearScheduleConfig"},{"$ref":"#/components/schemas/OnceScheduleConfig"},{"$ref":"#/components/schemas/DailyScheduleConfig"}],"title":"Config"}},"additionalProperties":false,"type":"object","required":["recurrence","config"],"title":"EventScheduleCreate"},"EventWebhookCreate":{"properties":{"url":{"type":"string","title":"Url"},"method":{"$ref":"#/components/schemas/HttpMethod"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"include_event_data":{"type":"boolean","title":"Include Event Data","default":true},"is_active":{"type":"boolean","title":"Is Active","default":true},"offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset"},"offset_unit":{"anyOf":[{"$ref":"#/components/schemas/OffsetUnit"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["url","method"],"title":"EventWebhookCreate","description":"Model for creating/updating an event webhook"},"EventWebhookOutput":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"event_id":{"type":"string","format":"uuid4","title":"Event Id"},"url":{"type":"string","title":"Url"},"method":{"$ref":"#/components/schemas/HttpMethod"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"include_event_data":{"type":"boolean","title":"Include Event Data"},"is_active":{"type":"boolean","title":"Is Active"},"offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset"},"offset_unit":{"anyOf":[{"$ref":"#/components/schemas/OffsetUnit"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","event_id","url","method","headers","include_event_data","is_active","offset","offset_unit","created_at","updated_at"],"title":"EventWebhookOutput"},"ExtendTrialRequest":{"properties":{"days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days"},"until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Until"},"confirm_long_extension":{"type":"boolean","title":"Confirm Long Extension","default":false}},"type":"object","title":"ExtendTrialRequest","description":"Request to extend a user's trial"},"ExtendTrialResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"subscription":{"$ref":"#/components/schemas/SubscriptionSummary"}},"type":"object","required":["success","message","subscription"],"title":"ExtendTrialResponse","description":"Response for trial extension"},"ExternalRuleScheduleConfig":{"properties":{"type":{"type":"string","enum":["include_bank_holidays","exclude_bank_holidays"],"title":"Type"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 country code (e.g., 'ES', 'US')"},"subdiv":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subdiv","description":"Optional subdivision/state code"},"months":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Months","description":"Optional months filter (1-12)"},"years":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Years","description":"Optional years filter (e.g., [2026])"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Optional limit for next N holidays"}},"additionalProperties":false,"type":"object","required":["type"],"title":"ExternalRuleScheduleConfig"},"ExtractedEventInfo":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"recurrence_text":{"type":"string","title":"Recurrence Text"},"timezone":{"type":"string","title":"Timezone"},"status":{"type":"string","title":"Status"},"confidence":{"additionalProperties":true,"type":"object","title":"Confidence"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","description":"Address, room, or join link stated in the source. Null when the source gives none."},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url","description":"Page or calendar link this event was read from. Null when the event came from typed or spoken text."}},"type":"object","required":["name","description","recurrence_text","timezone","status","confidence"],"title":"ExtractedEventInfo","description":"Information about an extracted event"},"FeatureSpend":{"properties":{"feature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feature"},"cost_usd":{"type":"number","title":"Cost Usd"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["feature","cost_usd","calls"],"title":"FeatureSpend"},"Feedback":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"user_id":{"type":"string","format":"uuid4","title":"User Id"},"message":{"type":"string","title":"Message"},"rating":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":0.0},{"type":"null"}],"title":"Rating"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["user_id","message","created_at"],"title":"Feedback"},"FeedbackCreate":{"properties":{"message":{"type":"string","title":"Message"},"rating":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rating"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","required":["message"],"title":"FeedbackCreate"},"FiltersApplied":{"properties":{"q":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"},"trial_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trial Status"},"google_auth_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Auth Status"},"has_sync_failures":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Sync Failures"},"signup_date_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Date Start"},"signup_date_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Date End"},"last_active_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Active Start"},"last_active_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Active End"},"sort_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"},"sort_order":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"FiltersApplied","description":"Filters applied to the query"},"ForgotPasswordConfirmRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"}},"additionalProperties":false,"type":"object","required":["token","new_password"],"title":"ForgotPasswordConfirmRequest"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","title":"Email"}},"additionalProperties":false,"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"GoogleAccountSummary":{"properties":{"email":{"type":"string","title":"Email"},"auth_status":{"type":"string","title":"Auth Status"},"auth_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Error Message"},"linked_calendars_count":{"type":"integer","title":"Linked Calendars Count"}},"type":"object","required":["email","auth_status","linked_calendars_count"],"title":"GoogleAccountSummary","description":"Summary of a user's Google account"},"GoogleCalendarExportOutput":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"calendar_id":{"type":"string","format":"uuid4","title":"Calendar Id"},"google_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Account Id"},"google_calendar_id":{"type":"string","title":"Google Calendar Id"},"google_calendar_name":{"type":"string","title":"Google Calendar Name"},"is_active":{"type":"boolean","title":"Is Active","default":true},"link_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Origin"},"export_status":{"type":"string","title":"Export Status"},"last_export_at":{"type":"string","format":"date-time","title":"Last Export At"},"export_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Export Error"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Status"},"google_events_sync_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Events Sync Token"},"initial_sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial Sync Status"},"initial_sync_progress":{"additionalProperties":true,"type":"object","title":"Initial Sync Progress"},"last_delta_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delta Sync At"},"last_delta_sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Delta Sync Error"},"last_push_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Push At"},"watch_channel_expiration":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Watch Channel Expiration"},"quarantine_count":{"type":"integer","title":"Quarantine Count","default":0},"sync_engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Engine","default":"v3"},"sync_health":{"additionalProperties":true,"type":"object","title":"Sync Health"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","calendar_id","google_account_id","google_calendar_id","google_calendar_name","export_status","last_export_at","export_error","last_sync_at","sync_status","created_at","updated_at"],"title":"GoogleCalendarExportOutput","description":"Output model for Google Calendar export tracking"},"GoogleCalendarListEntryOutput":{"properties":{"google_calendar_id":{"type":"string","title":"Google Calendar Id"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"time_zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time Zone"},"access_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Role"},"is_primary":{"type":"boolean","title":"Is Primary","default":false},"deleted":{"type":"boolean","title":"Deleted","default":false},"hidden":{"type":"boolean","title":"Hidden","default":false},"color_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Id"},"background_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Background Color"},"foreground_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Foreground Color"},"last_fetched_at":{"type":"string","format":"date-time","title":"Last Fetched At"}},"type":"object","required":["google_calendar_id","last_fetched_at"],"title":"GoogleCalendarListEntryOutput","description":"Cached Google calendar list entry (for UI selection)."},"GoogleConnectResponse":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"GoogleConnectResponse"},"GoogleExportWarning":{"properties":{"reason":{"type":"string","title":"Reason","description":"Machine-readable reason code (e.g., 'account_needs_reauth', 'read_only_calendar')"},"account_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Email","description":"Email of Google account that needs attention (for needs_reauth)"},"user_message":{"type":"string","title":"User Message","description":"Human-readable message explaining what the user should do"},"event_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Name","description":"Name of the event this warning is about"},"calendar_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calendar Name","description":"Name of the calendar this warning is about"}},"type":"object","required":["reason","user_message"],"title":"GoogleExportWarning","description":"Warning about a Google export that was skipped or failed"},"GoogleSSOUser":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"picture":{"type":"string","title":"Picture"},"user_id":{"type":"string","format":"uuid4","title":"User Id"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"token_expiry":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Token Expiry"},"scopes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scopes"},"auth_status":{"type":"string","title":"Auth Status","default":"active"},"auth_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Error Message"},"auth_error_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Auth Error Timestamp"}},"type":"object","required":["id","email","name","picture","user_id"],"title":"GoogleSSOUser"},"GoogleSyncJobOutput":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"job_type":{"type":"string","title":"Job Type"},"status":{"type":"string","title":"Status"},"google_export_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Google Export Id"},"advanced_event_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Advanced Event Id"},"attempts":{"type":"integer","title":"Attempts"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","job_type","status","attempts"],"title":"GoogleSyncJobOutput"},"GuestInvitationSendRequest":{"properties":{"guest_ids":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Guest Ids"},"force":{"type":"boolean","title":"Force","default":false}},"type":"object","title":"GuestInvitationSendRequest"},"GuestInvitationSendResponse":{"properties":{"sent":{"type":"integer","title":"Sent"},"skipped":{"type":"integer","title":"Skipped"},"failed":{"type":"integer","title":"Failed"}},"type":"object","required":["sent","skipped","failed"],"title":"GuestInvitationSendResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HttpMethod":{"type":"string","enum":["GET","POST"],"title":"HttpMethod"},"ICSImportResult":{"properties":{"event":{"anyOf":[{"$ref":"#/components/schemas/AdvancedRecurrentEventOutput-Output"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"event_index":{"type":"integer","title":"Event Index"},"summary":{"type":"string","title":"Summary"},"component_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Component Data"}},"type":"object","required":["event_index","summary"],"title":"ICSImportResult","description":"Result of importing a single event from ICS"},"LinkBody":{"properties":{"calendars":{"items":{"$ref":"#/components/schemas/LinkSelection"},"type":"array","title":"Calendars"}},"type":"object","required":["calendars"],"title":"LinkBody"},"LinkSelection":{"properties":{"href":{"type":"string","title":"Href"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"can_write":{"type":"boolean","title":"Can Write","default":false},"bring_in":{"type":"boolean","title":"Bring In","default":true},"ctag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ctag"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"type":"object","required":["href"],"title":"LinkSelection"},"ListEventsBatchBody":{"properties":{"event_ids":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Event Ids"}},"type":"object","required":["event_ids"],"title":"ListEventsBatchBody","description":"Request body for POST /events/batch: list events by IDs (avoids URL length limits)."},"LlmSpendResponse":{"properties":{"from":{"type":"string","format":"date","title":"From"},"to":{"type":"string","format":"date","title":"To"},"bucket":{"type":"string","enum":["day","week","month"],"title":"Bucket"},"timezone":{"type":"string","const":"UTC","title":"Timezone"},"currency":{"type":"string","const":"USD","title":"Currency"},"points":{"items":{"$ref":"#/components/schemas/SpendPoint"},"type":"array","title":"Points"},"totals":{"$ref":"#/components/schemas/SpendTotals"},"by_feature":{"items":{"$ref":"#/components/schemas/FeatureSpend"},"type":"array","title":"By Feature"},"top_users":{"items":{"$ref":"#/components/schemas/TopUserSpend"},"type":"array","title":"Top Users"}},"type":"object","required":["from","to","bucket","timezone","currency","points","totals","by_feature","top_users"],"title":"LlmSpendResponse"},"LoginFlowPollBody":{"properties":{"poll_endpoint":{"type":"string","title":"Poll Endpoint"},"poll_token":{"type":"string","title":"Poll Token"},"login_url":{"type":"string","title":"Login Url","default":""}},"type":"object","required":["poll_endpoint","poll_token"],"title":"LoginFlowPollBody"},"LoginFlowStartBody":{"properties":{"server_url":{"type":"string","title":"Server Url"}},"type":"object","required":["server_url"],"title":"LoginFlowStartBody"},"MonthlyScheduleConfig":{"properties":{"interval":{"type":"integer","minimum":1.0,"title":"Interval","description":"Every N months"},"type":{"$ref":"#/components/schemas/MonthlyType"},"day":{"anyOf":[{"type":"integer","maximum":31.0,"minimum":1.0},{"type":"null"}],"title":"Day","description":"Day of month (1-31)"},"day_of_week":{"anyOf":[{"$ref":"#/components/schemas/DayOfTheWeek"},{"type":"null"}],"description":"Day of week"},"week_of_month":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Week Of Month","description":"Week of month (1-5, where 5 = last)"},"n":{"anyOf":[{"type":"integer","maximum":31.0,"minimum":1.0},{"type":"null"}],"title":"N","description":"Which business day (1 = first). Required for nth_business_day."},"from_end":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"From End","description":"Count n from the end of the month. Used by nth_business_day."},"range_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range Start","description":"Optional start date/time for this recurrence (instances before this are excluded)"},"range_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range End","description":"Optional end date/time for this recurrence (instances after this are excluded)"}},"additionalProperties":false,"type":"object","required":["interval","type"],"title":"MonthlyScheduleConfig"},"MonthlyType":{"type":"string","enum":["day_of_month","day_of_week","nth_business_day","last_business_day"],"title":"MonthlyType"},"MonthsOfYearScheduleConfig":{"properties":{"interval":{"type":"integer","minimum":1.0,"title":"Interval","description":"Every N years"},"months":{"items":{"type":"integer"},"type":"array","title":"Months","description":"Months (1-12) when events occur every day"},"range_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range Start","description":"Optional start date/time for this recurrence (instances before this are excluded)"},"range_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range End","description":"Optional end date/time for this recurrence (instances after this are excluded)"}},"additionalProperties":false,"type":"object","required":["interval","months"],"title":"MonthsOfYearScheduleConfig"},"OffsetUnit":{"type":"string","enum":["SECONDS","MINUTES","HOURS","DAYS","WEEKS","MONTHS"],"title":"OffsetUnit"},"OnceScheduleConfig":{"properties":{"scheduled_datetime":{"type":"string","format":"date-time","title":"Scheduled Datetime","description":"Specific date and time to run"},"range_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range Start","description":"Optional start date/time for this recurrence (instances before this are excluded)"},"range_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range End","description":"Optional end date/time for this recurrence (instances after this are excluded)"}},"additionalProperties":false,"type":"object","required":["scheduled_datetime"],"title":"OnceScheduleConfig"},"PageExtractJobRef":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"status":{"type":"string","enum":["pending","running","done","failed"],"title":"Status"},"job_type":{"type":"string","const":"page_extract","title":"Job Type","default":"page_extract"}},"type":"object","required":["id","status"],"title":"PageExtractJobRef","description":"Handle returned as soon as a page read is queued."},"PageExtractJobStatus":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"job_type":{"type":"string","const":"page_extract","title":"Job Type","default":"page_extract"},"status":{"type":"string","enum":["pending","running","done","failed"],"title":"Status"},"page_reads":{"items":{"$ref":"#/components/schemas/PageReadStatus"},"type":"array","title":"Page Reads"},"created_event_ids":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Created Event Ids"},"summary":{"additionalProperties":{"type":"integer"},"type":"object","title":"Summary"},"extracted_events":{"items":{"$ref":"#/components/schemas/ExtractedEventInfo"},"type":"array","title":"Extracted Events"},"created_events":{"items":{"$ref":"#/components/schemas/EventCreationResult"},"type":"array","title":"Created Events"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Why the job failed. Null unless status is failed."},"suggested_interval":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly","yearly"]},{"type":"null"}],"title":"Suggested Interval","description":"How often AnyMoment would check this page again. daily, weekly, monthly, or yearly. Null when the read did not finish a page. The user can pick a different interval when they watch the page. Nothing shorter than daily is suggested."},"watch_request":{"anyOf":[{"$ref":"#/components/schemas/WatchRequest"},{"type":"null"}],"description":"What the user's own text asked about watching this page. Null when they did not ask. Also set while the job is pending, because it does not depend on the page. The API does not create the watch."}},"type":"object","required":["id","status","summary"],"title":"PageExtractJobStatus","description":"Owner-only snapshot of a background page read.\n\n``done`` carries the same extracted events, created events, summary, and\npage reads a synchronous extract returned, so the confirmation toast can\nuse this body. ``failed`` sets ``message``. ``pending`` and ``running``\nhave empty event lists and one ``page_reads`` row per URL with\n``status`` ``pending`` until that URL has been read."},"PageReadStatus":{"properties":{"url":{"type":"string","title":"Url","description":"Link as it appeared in the request, including a webcal:// link."},"final_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Url","description":"Address after redirects. Null when the fetch did not succeed."},"ok":{"type":"boolean","title":"Ok","description":"True when the page or calendar was read."},"kind":{"anyOf":[{"type":"string","enum":["html","ics"]},{"type":"null"}],"title":"Kind","description":"html for a web page, ics for a calendar feed. Null when the read failed."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Page title, when the page is HTML."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable failure code. Null when ok is true. See the page-read docs for the list."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Sentence explaining a failure, or a partial read. Safe to show. Null when the read is complete. Also set when ok is true and the page was truncated or stopped at the daily AI limit."},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning","description":"Set when ok is true but only part of the page was used. Same sentence as message. Null when the read is complete or the URL failed."},"events_found":{"type":"integer","title":"Events Found","description":"Events taken from this URL. Zero when the URL failed or the page listed none.","default":0},"read_path":{"anyOf":[{"type":"string","enum":["static","rendered"]},{"type":"null"}],"title":"Read Path","description":"static when the text came from the page's HTML response. rendered when a headless browser had to run the page. Null when the link was not read."},"status":{"anyOf":[{"type":"string","enum":["pending","running","done","failed"]},{"type":"null"}],"title":"Status","description":"Set while a background page read is in progress or after it finishes. pending means the link has not been fetched yet: ok is false and message is null, and that is not an error. Null on a finished read that did not go through a job."}},"type":"object","required":["url","ok"],"title":"PageReadStatus","description":"Outcome of reading one URL during event extraction.\n\nOne entry per link found in the request, in that order. Show ``message``\nwhen ``ok`` is false. A readable page that simply lists no events has\n``ok`` true and ``events_found`` 0. A page with almost no text has\n``ok`` false and ``error_code`` ``no_readable_content``."},"PageWatchCreate":{"properties":{"url":{"type":"string","title":"Url"},"calendar_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Calendar Id"},"timezone":{"type":"string","title":"Timezone","default":"Europe/Madrid"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"interval":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly","yearly"]},{"type":"null"}],"title":"Interval","description":"Omit to use the suggested interval from the latest finished read of this URL, or weekly."},"weekday":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Weekday","description":"Monday 0 through Sunday 6. Defaults to today in timezone when omitted."},"day_of_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Day Of Month","description":"Defaults to today's date in timezone."},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Month","description":"Defaults to the current month in timezone. Used when interval is yearly."},"anchor_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Time","description":"HH:MM in timezone. Defaults to the current local time."},"model":{"type":"string","enum":["high","low","mega"],"title":"Model","default":"high"}},"type":"object","required":["url"],"title":"PageWatchCreate"},"PageWatchOutput":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"url":{"type":"string","title":"Url"},"calendar_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Calendar Id"},"timezone":{"type":"string","title":"Timezone"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"interval":{"type":"string","enum":["daily","weekly","monthly","yearly"],"title":"Interval"},"weekday":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Weekday","description":"Monday is 0 and Sunday is 6. Set for a weekly watch. Null is allowed on the other intervals."},"day_of_month":{"type":"integer","title":"Day Of Month","description":"Day of the month used by monthly and yearly watches. Shorter months use the last day."},"month":{"type":"integer","title":"Month","description":"Month used by a yearly watch, 1 through 12."},"anchor_time":{"type":"string","title":"Anchor Time","description":"Local time of day the watch runs, HH:MM, in timezone."},"status":{"type":"string","enum":["active","paused","auto_paused"],"title":"Status"},"pause_reason":{"anyOf":[{"type":"string","enum":["user","consecutive_failures"]},{"type":"null"}],"title":"Pause Reason"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Run At"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"latest_run":{"anyOf":[{"$ref":"#/components/schemas/PageWatchRunSummary"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","url","timezone","interval","day_of_month","month","anchor_time","status","consecutive_failures","created_at","updated_at"],"title":"PageWatchOutput"},"PageWatchRunSummary":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"status":{"type":"string","enum":["running","unchanged","completed","skipped_budget","failed"],"title":"Status"},"new_count":{"type":"integer","title":"New Count"},"updated_count":{"type":"integer","title":"Updated Count"},"missing_count":{"type":"integer","title":"Missing Count"},"skipped_user_edited_count":{"type":"integer","title":"Skipped User Edited Count"},"unchanged_count":{"type":"integer","title":"Unchanged Count"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"event_ids":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Event Ids"},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"},"read_path":{"anyOf":[{"type":"string","enum":["static","rendered"]},{"type":"null"}],"title":"Read Path"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"}},"type":"object","required":["id","status","new_count","updated_count","missing_count","skipped_user_edited_count","unchanged_count","started_at"],"title":"PageWatchRunSummary"},"PageWatchUpdate":{"properties":{"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"interval":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly","yearly"]},{"type":"null"}],"title":"Interval"},"weekday":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Weekday"},"day_of_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Day Of Month"},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Month"},"anchor_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Time"}},"type":"object","title":"PageWatchUpdate"},"PaginationInfo":{"properties":{"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_count":{"type":"integer","title":"Total Count"},"total_pages":{"type":"integer","title":"Total Pages"},"has_next":{"type":"boolean","title":"Has Next"},"has_prev":{"type":"boolean","title":"Has Prev"}},"type":"object","required":["page","page_size","total_count","total_pages","has_next","has_prev"],"title":"PaginationInfo","description":"Pagination information"},"PurgeManagedGoogleEventsRequest":{"properties":{"google_account_id":{"type":"string","title":"Google Account Id"},"google_calendar_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Calendar Id"},"local_calendar_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Local Calendar Id"},"from_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Date"},"to_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"},"dry_run":{"type":"boolean","title":"Dry Run","default":true},"max_deletes":{"type":"integer","maximum":20000.0,"minimum":0.0,"title":"Max Deletes","description":"Safety cap; 0 means no deletions will be performed","default":500}},"type":"object","required":["google_account_id"],"title":"PurgeManagedGoogleEventsRequest","description":"Cleanup tool: remove AnyMoment-managed Google events from a target Google calendar.\n\nThis is intended as a conservative \"dedupe\" for incidents where AnyMoment accidentally\ncreated duplicate events on the remote calendar. It targets only events carrying our\nprivate extendedProperties (rw_*), leaving user-owned/unmanaged events untouched."},"ReconnectBody":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"ReconnectBody"},"Recurrence":{"type":"integer","enum":[0,1,2,3,4,5,6,7],"title":"Recurrence"},"RecurrentEventComponentCreate":{"properties":{"operator":{"$ref":"#/components/schemas/BooleanOperator","description":"Boolean operator: OR (union), AND (intersection), NOT (difference), XOR (symmetric difference)"},"event_config":{"$ref":"#/components/schemas/EventScheduleCreate","description":"Configuration for the recurrent event in this component"}},"additionalProperties":false,"type":"object","required":["operator","event_config"],"title":"RecurrentEventComponentCreate","description":"Model for creating a component of an advanced recurrent event"},"RecurrentEventComponentOutput-Input":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"operator":{"$ref":"#/components/schemas/BooleanOperator"},"sequence":{"type":"integer","title":"Sequence"},"recurrent_event":{"$ref":"#/components/schemas/ScheduleOutput-Input"}},"type":"object","required":["id","operator","sequence","recurrent_event"],"title":"RecurrentEventComponentOutput","description":"Output model for a recurrent event component"},"RecurrentEventComponentOutput-Output":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"operator":{"$ref":"#/components/schemas/BooleanOperator"},"sequence":{"type":"integer","title":"Sequence"},"recurrent_event":{"$ref":"#/components/schemas/ScheduleOutput-Output"}},"type":"object","required":["id","operator","sequence","recurrent_event"],"title":"RecurrentEventComponentOutput","description":"Output model for a recurrent event component"},"RemoteDeletedBody":{"properties":{"action":{"type":"string","title":"Action"}},"type":"object","required":["action"],"title":"RemoteDeletedBody"},"RevertFromSyncLogRequest":{"properties":{"google_account_id":{"type":"string","title":"Google Account Id"},"log_relative_path":{"type":"string","title":"Log Relative Path"},"dry_run":{"type":"boolean","title":"Dry Run","default":true},"max_deletes":{"type":"integer","maximum":20000.0,"minimum":0.0,"title":"Max Deletes","default":500},"force":{"type":"boolean","title":"Force","description":"If true, delete even when rw_* markers are missing (NOT recommended)","default":false}},"type":"object","required":["google_account_id","log_relative_path"],"title":"RevertFromSyncLogRequest","description":"Best-effort revert tool: reads a JSONL sync log and attempts to undo actions.\n\nCurrently supports safely deleting Google events that were created by AnyMoment\nduring a sync (based on logged google_create_success entries)."},"ScheduleOutput-Input":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"recurrence":{"$ref":"#/components/schemas/Recurrence"},"start_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"End Time"},"is_all_day":{"type":"boolean","title":"Is All Day"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"timezone":{"type":"string","title":"Timezone"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"last_event":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event"},"next_event":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Event"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","recurrence","start_time","end_time","is_all_day","timezone","config","last_event","next_event","is_active","created_at","updated_at"],"title":"ScheduleOutput"},"ScheduleOutput-Output":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"recurrence":{"$ref":"#/components/schemas/Recurrence"},"start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Time"},"is_all_day":{"type":"boolean","title":"Is All Day"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"timezone":{"type":"string","title":"Timezone"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"last_event":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event"},"next_event":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Event"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"display_name":{"type":"string","title":"Display Name","readOnly":true}},"type":"object","required":["id","recurrence","start_time","end_time","is_all_day","timezone","config","last_event","next_event","is_active","created_at","updated_at","display_name"],"title":"ScheduleOutput"},"SearchEventOutput":{"properties":{"event":{"$ref":"#/components/schemas/AdvancedRecurrentEventOutput-Output"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"instances":{"anyOf":[{"items":{"$ref":"#/components/schemas/EventInstanceResponse"},"type":"array"},{"type":"null"}],"title":"Instances"}},"type":"object","required":["event"],"title":"SearchEventOutput","description":"One search result: event plus optional similarity score and instances in requested window."},"SourceAcquisition":{"properties":{"new_users":{"type":"integer","title":"New Users","description":"Accounts created in the window. Later edits are not included."},"new_trials":{"type":"integer","title":"New Trials","description":"Trial starts in the window. A conversion stays on the original trial day."},"new_subscriptions":{"type":"integer","title":"New Subscriptions","description":"First paid subscriptions in the window. Trial starts and renewals are not included."},"points":{"items":{"$ref":"#/components/schemas/AcquisitionPoint"},"type":"array","title":"Points"}},"type":"object","required":["new_users","new_trials","new_subscriptions","points"],"title":"SourceAcquisition","description":"Windowed counts. Same definitions as GET /auth/admin/metrics/acquisition."},"SourceMoney":{"properties":{"status":{"type":"string","const":"unavailable","title":"Status","description":"unavailable means the minor-unit fields are unknown. Do not treat them as zero."},"reason":{"type":"string","const":"amounts_not_stored","title":"Reason","description":"No local unit_amount, currency, interval, or invoice history. stripe_price_id and SubscriptionTier.name are stored. This route does not call Stripe."},"currency":{"type":"null","title":"Currency","description":"No currency is stored, so this is null rather than a guessed code."},"mrr_minor":{"type":"null","title":"Mrr Minor","description":"Would be the current recurring amount, normalized to a month, in minor units, for active_paid subscriptions. Null because the price amount and interval are not stored."},"cumulative_revenue_minor":{"type":"null","title":"Cumulative Revenue Minor","description":"Would be the sum of collected invoice amounts for accounts on this ref. Null because invoice payments are not stored. Renewals are not reconstructed."},"active_paid_subscriptions":{"type":"integer","title":"Active Paid Subscriptions","description":"Same count as retention.active_paid. The cohort size for MRR, not an amount."},"active_paid_by_price":{"items":{"$ref":"#/components/schemas/ActivePaidPriceCount"},"type":"array","title":"Active Paid By Price"}},"type":"object","required":["status","reason","active_paid_subscriptions","active_paid_by_price"],"title":"SourceMoney","description":"Money for this ref. Unavailable until amounts exist in local rows."},"SourceRates":{"properties":{"trial_conversion":{"$ref":"#/components/schemas/SourceRatio","description":"numerator is trials_converted. denominator is trials_converted + trialing + trials_expired_unpaid."},"resolved_trial_conversion":{"$ref":"#/components/schemas/SourceRatio","description":"numerator is trials_converted. denominator is trials_converted + trials_expired_unpaid. Open trials are left out."},"churn":{"$ref":"#/components/schemas/SourceRatio","description":"numerator is churned. denominator is active_paid + past_due + churned. cancel_scheduled stays in active_paid and is not churn."}},"type":"object","required":["trial_conversion","resolved_trial_conversion","churn"],"title":"SourceRates","description":"Rates a console can show without choosing a denominator."},"SourceRatio":{"properties":{"numerator":{"type":"integer","title":"Numerator"},"denominator":{"type":"integer","title":"Denominator"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate","description":"numerator / denominator, half up to 4 decimal places. Null when the denominator is 0. Use the integers for display math."}},"type":"object","required":["numerator","denominator","rate"],"title":"SourceRatio","description":"Exact integer ratio. `rate` is null when the denominator is 0, not 0."},"SourceRecord":{"properties":{"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref","description":"First-touch marketing ref. Null is the unattributed bucket. It is not dropped."},"acquisition":{"$ref":"#/components/schemas/SourceAcquisition"},"retention":{"$ref":"#/components/schemas/SourceRetention"},"rates":{"$ref":"#/components/schemas/SourceRates"},"money":{"$ref":"#/components/schemas/SourceMoney"}},"type":"object","required":["ref","acquisition","retention","rates","money"],"title":"SourceRecord","description":"One first-touch ref, including the null ref for accounts with no source."},"SourceRetention":{"properties":{"accounts":{"type":"integer","title":"Accounts","description":"Accounts on this ref, including ones with no subscription."},"no_subscription":{"type":"integer","title":"No Subscription","description":"Accounts on this ref with no subscription row."},"active_paid":{"type":"integer","title":"Active Paid","description":"Not a trial, status active, and current_period_end is still after as_of. Includes cancel_scheduled. This is the set that would contribute to current recurring revenue if amounts were stored."},"cancel_scheduled":{"type":"integer","title":"Cancel Scheduled","description":"Subset of active_paid whose cancel_at_period_end is true. Not churned yet."},"past_due":{"type":"integer","title":"Past Due","description":"Not a trial and status past_due. Payment is failing. Not counted as churned."},"churned":{"type":"integer","title":"Churned","description":"Not a trial, and status is canceled, unpaid, or incomplete_expired, or status is active and current_period_end is at or before as_of. An expired trial that never paid is not churned."},"incomplete":{"type":"integer","title":"Incomplete","description":"Not a trial and status incomplete. Checkout has not finished. Not churned."},"trialing":{"type":"integer","title":"Trialing","description":"is_trial, status trialing, and the trial end (or the period end when trial_end is null) is after as_of."},"trials_converted":{"type":"integer","title":"Trials Converted","description":"trial_started_at and paid_started_at are both set. A renewal does not add another conversion. Stays on the ref stored at account creation."},"trials_expired_unpaid":{"type":"integer","title":"Trials Expired Unpaid","description":"A trial was started (trial_started_at is set, or the row is still marked a trial) and paid_started_at is null and the trial is not open at as_of."},"direct_paid":{"type":"integer","title":"Direct Paid","description":"paid_started_at is set and trial_started_at is null. Not a trial conversion."}},"type":"object","required":["accounts","no_subscription","active_paid","cancel_scheduled","past_due","churned","incomplete","trialing","trials_converted","trials_expired_unpaid","direct_paid"],"title":"SourceRetention","description":"Current subscription state for every account on this ref.\n\nEvaluated at `as_of`, ignoring the chart window. A user has one subscription\nrow. cancel_scheduled is a subset of active_paid. trials_converted can also\nbe active_paid, past_due, or churned. The other trial outcomes are separate\nfrom those paid states."},"SourcesResponse":{"properties":{"from":{"type":"string","format":"date","title":"From","description":"Inclusive UTC start. Same default as acquisition."},"to":{"type":"string","format":"date","title":"To","description":"Inclusive UTC end. Same default as acquisition."},"bucket":{"type":"string","enum":["day","week","month"],"title":"Bucket"},"timezone":{"type":"string","const":"UTC","title":"Timezone"},"as_of":{"type":"string","format":"date-time","title":"As Of","description":"UTC instant used for retention and churn. Independent of the window."},"money_status":{"type":"string","const":"unavailable","title":"Money Status"},"money_reason":{"type":"string","const":"amounts_not_stored","title":"Money Reason"},"sources":{"items":{"$ref":"#/components/schemas/SourceRecord"},"type":"array","title":"Sources"}},"type":"object","required":["from","to","bucket","timezone","as_of","money_status","money_reason","sources"],"title":"SourcesResponse","description":"Current source economics, plus the acquisition series for the requested window."},"SpendPoint":{"properties":{"cost_usd":{"type":"number","title":"Cost Usd"},"calls":{"type":"integer","title":"Calls"},"failed_calls":{"type":"integer","title":"Failed Calls"},"tokens_in":{"type":"integer","title":"Tokens In"},"tokens_out":{"type":"integer","title":"Tokens Out"},"unpriced_calls":{"type":"integer","title":"Unpriced Calls"},"t":{"type":"string","title":"T"}},"type":"object","required":["cost_usd","calls","failed_calls","tokens_in","tokens_out","unpriced_calls","t"],"title":"SpendPoint"},"SpendTotals":{"properties":{"cost_usd":{"type":"number","title":"Cost Usd"},"calls":{"type":"integer","title":"Calls"},"failed_calls":{"type":"integer","title":"Failed Calls"},"tokens_in":{"type":"integer","title":"Tokens In"},"tokens_out":{"type":"integer","title":"Tokens Out"},"unpriced_calls":{"type":"integer","title":"Unpriced Calls"}},"type":"object","required":["cost_usd","calls","failed_calls","tokens_in","tokens_out","unpriced_calls"],"title":"SpendTotals"},"SubscriptionCreate":{"properties":{"url":{"type":"string","title":"Url"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"},"occurrence_offset_seconds":{"type":"integer","title":"Occurrence Offset Seconds","default":0}},"additionalProperties":false,"type":"object","required":["url","event_types"],"title":"SubscriptionCreate"},"SubscriptionOut":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"calendar_id":{"type":"string","format":"uuid4","title":"Calendar Id"},"url":{"type":"string","title":"Url"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"},"occurrence_offset_seconds":{"type":"integer","title":"Occurrence Offset Seconds"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"},"paused_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paused Reason"}},"additionalProperties":false,"type":"object","required":["id","calendar_id","url","event_types","occurrence_offset_seconds","is_active","created_at","updated_at"],"title":"SubscriptionOut"},"SubscriptionOutput":{"properties":{"status":{"type":"string","title":"Status"},"current_period_start":{"type":"string","format":"date-time","title":"Current Period Start"},"current_period_end":{"type":"string","format":"date-time","title":"Current Period End"},"is_trial":{"type":"boolean","title":"Is Trial"},"trial_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial End"},"tier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Name"},"is_expired":{"type":"boolean","title":"Is Expired"},"is_active_or_trialing":{"type":"boolean","title":"Is Active Or Trialing"}},"type":"object","required":["status","current_period_start","current_period_end","is_trial","is_expired","is_active_or_trialing"],"title":"SubscriptionOutput","description":"Output model for subscription information"},"SubscriptionSummary":{"properties":{"status":{"type":"string","title":"Status"},"is_trial":{"type":"boolean","title":"Is Trial"},"trial_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial End"},"current_period_end":{"type":"string","format":"date-time","title":"Current Period End"},"tier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Name"},"tier_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tier Level"}},"type":"object","required":["status","is_trial","current_period_end"],"title":"SubscriptionSummary","description":"Summary of a user's subscription"},"SubscriptionTierOutput":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"tier_level":{"type":"integer","title":"Tier Level"},"unit_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unit Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"interval":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interval"},"interval_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval Count"},"display_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Label"},"tax_behavior":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Behavior"},"price_status":{"type":"string","enum":["live","unavailable"],"title":"Price Status"}},"type":"object","required":["id","name","tier_level","price_status"],"title":"SubscriptionTierOutput","description":"Output model for subscription tier"},"SubscriptionUpdate":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"},"event_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Event Types"},"occurrence_offset_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Occurrence Offset Seconds"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"additionalProperties":false,"type":"object","title":"SubscriptionUpdate"},"SuspendUserRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"confirm_admin_target":{"type":"boolean","title":"Confirm Admin Target","default":false}},"type":"object","title":"SuspendUserRequest","description":"Request to suspend a user"},"SyncCalendarRequest":{"properties":{"local_calendar_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Local Calendar Id"},"local_calendar_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Local Calendar Name","description":"Optional name to use when creating a new local calendar"},"local_calendar_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Local Calendar Timezone","description":"Optional timezone to use when creating a new local calendar (defaults to cached Google timezone or UTC)"},"google_account_id":{"type":"string","title":"Google Account Id"},"google_calendar_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Calendar Id"},"from_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Date"},"to_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"},"force_full_sync":{"type":"boolean","title":"Force Full Sync","description":"If true, clears any stored syncToken and re-imports full calendar history","default":false},"conflict_resolution":{"anyOf":[{"$ref":"#/components/schemas/SyncConflictResolution"},{"type":"null"}]}},"type":"object","required":["google_account_id"],"title":"SyncCalendarRequest"},"SyncConflict":{"properties":{"conflict_id":{"type":"string","title":"Conflict Id","description":"Deterministic identifier for this conflict (stable across retries)"},"entity_type":{"type":"string","enum":["calendar","event"],"title":"Entity Type"},"local_calendar_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Local Calendar Id"},"local_event_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Local Event Id"},"google_account_id":{"type":"string","title":"Google Account Id"},"google_calendar_id":{"type":"string","title":"Google Calendar Id"},"google_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Event Id"},"local_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Local Snapshot"},"remote_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Remote Snapshot"},"conflicting_fields":{"items":{"type":"string"},"type":"array","title":"Conflicting Fields"},"resolution":{"anyOf":[{"type":"string","enum":["local","remote"]},{"type":"null"}],"title":"Resolution"}},"type":"object","required":["conflict_id","entity_type","google_account_id","google_calendar_id"],"title":"SyncConflict","description":"Standard conflict structure for calendar/event sync.\n\nNote: For queued/background sync endpoints, conflicts are not returned directly by the enqueue call.\nInstead, they are returned in the completed job payload via `GET /google/sync-status?job_id=...`."},"SyncConflictResolution":{"properties":{"resolves_job_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Resolves Job Id","description":"If set, marks the given job id as resolved after a successful sync."},"conflicts":{"items":{"$ref":"#/components/schemas/SyncConflict"},"type":"array","title":"Conflicts"}},"type":"object","title":"SyncConflictResolution","description":"Conflict resolution envelope (UX-first).\n\nThis exact shape is:\n- returned to clients in `SyncResult.conflict_resolution`\n- accepted back by sync endpoints in `request.conflict_resolution`"},"SyncEventRequest":{"properties":{"local_calendar_id":{"type":"string","format":"uuid4","title":"Local Calendar Id"},"local_event_id":{"type":"string","format":"uuid4","title":"Local Event Id"},"google_account_id":{"type":"string","title":"Google Account Id"},"google_calendar_id":{"type":"string","title":"Google Calendar Id"},"from_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Date"},"to_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"},"conflict_resolution":{"anyOf":[{"$ref":"#/components/schemas/SyncConflictResolution"},{"type":"null"}]}},"type":"object","required":["local_calendar_id","local_event_id","google_account_id","google_calendar_id"],"title":"SyncEventRequest"},"SyncHealthSummary":{"properties":{"total_exports":{"type":"integer","title":"Total Exports"},"active_exports":{"type":"integer","title":"Active Exports"},"quarantine_count":{"type":"integer","title":"Quarantine Count"},"failed_exports":{"type":"integer","title":"Failed Exports"},"last_sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Error"}},"type":"object","required":["total_exports","active_exports","quarantine_count","failed_exports"],"title":"SyncHealthSummary","description":"Summary of a user's sync health"},"SyncResult":{"properties":{"status":{"type":"string","enum":["queued","success","conflicts"],"title":"Status","description":"Status of the sync result. For enqueue endpoints this is always 'queued'. When polling /google/sync-status, a completed job may report 'success' or 'conflicts'."},"conflicts":{"items":{"$ref":"#/components/schemas/SyncConflict"},"type":"array","title":"Conflicts","description":"Conflict list. For enqueue endpoints this is always empty; conflicts are returned via /google/sync-status."},"conflict_resolution":{"anyOf":[{"$ref":"#/components/schemas/SyncConflictResolution"},{"type":"null"}],"description":"Ready-to-resend conflict resolution payload. When status='conflicts', this contains the conflicts in the exact input format expected by sync endpoints, with resolution=null."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stats":{"additionalProperties":{"type":"integer"},"type":"object","title":"Stats"},"local_calendar_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Local Calendar Id"},"job_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Job Id","description":"Background job id when status='queued'. Poll /google/sync-status with this id for the final result."}},"type":"object","required":["status"],"title":"SyncResult","description":"Sync result envelope.\n\n**Important (async jobs):**\n- `POST /google/sync-calendar` and `POST /google/sync-event` enqueue work and return `status=\"queued\"` immediately.\n- Conflicts (if any) are discovered during job execution and are returned later via\n  `GET /google/sync-status?job_id=...` in `job.payload.result`."},"Token":{"properties":{"token":{"type":"string","title":"Token"},"user_id":{"type":"string","format":"uuid4","title":"User Id"}},"type":"object","required":["token","user_id"],"title":"Token"},"TopUserSpend":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"cost_usd":{"type":"number","title":"Cost Usd"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["user_id","email","cost_usd","calls"],"title":"TopUserSpend"},"UsageStatsResponse":{"properties":{"total_users":{"type":"integer","title":"Total Users"},"active_users":{"type":"integer","title":"Active Users"},"active_definition":{"type":"string","title":"Active Definition"},"token_active_users":{"type":"integer","title":"Token Active Users"},"token_active_definition":{"type":"string","title":"Token Active Definition"},"users":{"items":{"$ref":"#/components/schemas/UserUsageStats"},"type":"array","title":"Users"}},"type":"object","required":["total_users","active_users","active_definition","token_active_users","token_active_definition","users"],"title":"UsageStatsResponse","description":"Overall usage statistics response"},"User":{"properties":{"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"preferred_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Timezone"},"birthday":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthday"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_superuser":{"type":"boolean","title":"Is Superuser","default":false},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"last_login":{"type":"string","format":"date-time","title":"Last Login"},"last_token_check":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Token Check"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"default_country":{"type":"string","title":"Default Country"},"default_subdiv":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Subdiv"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref","description":"First-touch marketing ref. Set only when the account is created, then kept for the life of the account. Null when signup had no valid ref. Login, profile edits, and a later Google sign-in do not change it."}},"type":"object","required":["email","last_login","created_at"],"title":"User"},"UserBase":{"properties":{"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"preferred_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Timezone"},"birthday":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthday"}},"type":"object","required":["email"],"title":"UserBase"},"UserChangePollResponse":{"properties":{"since":{"type":"string","format":"date-time","title":"Since"},"as_of":{"type":"string","format":"date-time","title":"As Of"},"events":{"items":{"$ref":"#/components/schemas/EventChangeOutput"},"type":"array","title":"Events"},"calendars":{"items":{"$ref":"#/components/schemas/CalendarChangeOutput"},"type":"array","title":"Calendars"}},"type":"object","required":["since","as_of"],"title":"UserChangePollResponse","description":"Response model for poll changes endpoint"},"UserCreate":{"properties":{"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"preferred_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Timezone"},"birthday":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthday"},"password":{"type":"string","title":"Password"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref","description":"Optional first-touch marketing ref. Trimmed and lowercased. Stored only when it is a slug of lowercase letters, digits, and single hyphens, at most 64 characters. Missing, empty, and invalid values are ignored and signup still succeeds. A non-string is ignored the same way."}},"type":"object","required":["email","password"],"title":"UserCreate"},"UserInfo":{"properties":{"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"preferred_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Timezone"},"birthday":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthday"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_superuser":{"type":"boolean","title":"Is Superuser","default":false},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"last_login":{"type":"string","format":"date-time","title":"Last Login"},"last_token_check":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Token Check"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"default_country":{"type":"string","title":"Default Country"},"default_subdiv":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Subdiv"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref","description":"First-touch marketing ref. Set only when the account is created, then kept for the life of the account. Null when signup had no valid ref. Login, profile edits, and a later Google sign-in do not change it."},"google_sso_users":{"items":{"$ref":"#/components/schemas/GoogleSSOUser"},"type":"array","title":"Google Sso Users","default":[]},"subscription":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionOutput"},{"type":"null"}]}},"type":"object","required":["email","last_login","created_at"],"title":"UserInfo"},"UserPreferencesUpdate":{"properties":{"preferred_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Timezone"},"default_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Country"},"default_subdiv":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Subdiv"},"birthday":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthday"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"additionalProperties":false,"type":"object","title":"UserPreferencesUpdate","description":"Optional fields for updating current user preferences."},"UserUsageStats":{"properties":{"user_id":{"type":"string","format":"uuid4","title":"User Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"last_login":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login"},"last_token_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Token Check At"},"last_event_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event Created At"},"calendar_count":{"type":"integer","title":"Calendar Count"}},"type":"object","required":["user_id","email","last_login","last_token_check_at","last_event_created_at","calendar_count"],"title":"UserUsageStats","description":"User usage statistics for admin dashboard"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WatchRequest":{"properties":{"requested":{"type":"boolean","title":"Requested","description":"True when the user's text asks to keep watching the page."},"interval":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly","yearly"]},{"type":"null"}],"title":"Interval","description":"How often the user asked to check the page: daily, weekly, monthly, or yearly. Null when they asked to watch it but named no frequency."},"weekday":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Weekday","description":"Monday is 0 and Sunday is 6. Null when the text did not name one weekday."},"day_of_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Day Of Month","description":"1 through 31 when the text named a day of the month. Null otherwise."},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Month","description":"1 through 12 when the text named a month. Null otherwise."},"anchor_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Time","description":"Time of day the user named, HH:MM. Null when they did not name one."},"source":{"type":"string","const":"user_text","title":"Source","description":"Always user_text. The page is never the source.","default":"user_text"}},"type":"object","required":["requested"],"title":"WatchRequest","description":"A page watch asked for in the user's own extract text.\n\nThe API does not create the watch from this. Page content cannot fill it in.\n``source`` is always ``user_text``. When ``interval`` is null, the user asked\nto watch the page and did not name a frequency, so the client uses\n``suggested_interval``."},"WebhookRunCreate":{"properties":{"executed_at":{"type":"string","format":"date-time","title":"Executed At"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"additionalProperties":false,"type":"object","required":["executed_at"],"title":"WebhookRunCreate"},"WebhookRunOutput":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"webhook_id":{"type":"string","format":"uuid4","title":"Webhook Id"},"executed_at":{"type":"string","format":"date-time","title":"Executed At"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","webhook_id","executed_at","status_code","error_message","created_at"],"title":"WebhookRunOutput"},"WeeklyScheduleConfig":{"properties":{"interval":{"type":"integer","minimum":1.0,"title":"Interval","description":"Every N weeks"},"days_of_week":{"items":{"$ref":"#/components/schemas/DayOfTheWeek"},"type":"array","title":"Days Of Week","description":"Days of the week to run"},"interval_anchor":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Interval Anchor","description":"Local date in the event timezone whose week anchors INTERVAL (every N weeks). Omit to fall back to range_start, then query window."},"range_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range Start","description":"Optional start date/time for this recurrence (instances before this are excluded)"},"range_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range End","description":"Optional end date/time for this recurrence (instances after this are excluded)"}},"additionalProperties":false,"type":"object","required":["interval","days_of_week"],"title":"WeeklyScheduleConfig"},"WeeksOfYearScheduleConfig":{"properties":{"interval":{"type":"integer","minimum":1.0,"title":"Interval","description":"Every N years"},"weeks_of_year":{"items":{"type":"integer"},"type":"array","title":"Weeks Of Year","description":"ISO week numbers (1-53) when events occur every day"},"range_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range Start","description":"Optional start date/time for this recurrence (instances before this are excluded)"},"range_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range End","description":"Optional end date/time for this recurrence (instances after this are excluded)"}},"additionalProperties":false,"type":"object","required":["interval","weeks_of_year"],"title":"WeeksOfYearScheduleConfig"},"YearlyScheduleConfig":{"properties":{"interval":{"type":"integer","minimum":1.0,"title":"Interval","description":"Every N years"},"month":{"type":"integer","maximum":12.0,"minimum":1.0,"title":"Month","description":"Month (1-12)"},"day":{"type":"integer","maximum":31.0,"minimum":1.0,"title":"Day","description":"Day of month"},"range_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range Start","description":"Optional start date/time for this recurrence (instances before this are excluded)"},"range_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range End","description":"Optional end date/time for this recurrence (instances after this are excluded)"}},"additionalProperties":false,"type":"object","required":["interval","month","day"],"title":"YearlyScheduleConfig"}}}}