{"openapi":"3.1.0","info":{"title":"Bilingual Mini CRM API","description":"Backend for the bilingual (Hebrew/English) Mini CRM MVP.","version":"0.2.0"},"paths":{"/api/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","description":"Register an organization for approval.\n\nCreates a PENDING org + its admin (email+password). The org is inactive and\nthe owner can't log in until a superadmin approves it. Emails the user a\n\"received, under review\" note and the platform admin a notification.\n\nfixes14: the email may already exist in *other* organizations — email is\nunique per org, and login offers an org selection for multi-org identities.","operationId":"signup_api_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Signup Api Auth Signup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/verify-email":{"get":{"tags":["auth"],"summary":"Verify Email","description":"Activate the account behind a verification token and provision its org.","operationId":"verify_email_api_auth_verify_email_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Verify Email Api Auth Verify Email Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","description":"Re-issue a verification link. Always 200 (no email enumeration).\nfixes14: an email may exist in several orgs — cover every unverified one.","operationId":"resend_verification_api_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Resend Verification Api Auth Resend Verification Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_api_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/token":{"post":{"tags":["auth"],"summary":"Login","description":"Password login. The identifier matches username *or* email; when the\nverified credentials map to users in several organizations (fixes14), the\nresponse asks for an explicit org selection instead of issuing a token —\nthe client retries with `organization_id`.\n\nfixes107: async, in three phases — DB lookup (worker thread), bcrypt (its\nown CPU-sized pool, no DB connection held), then the rest (worker thread).","operationId":"login_api_auth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_api_auth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google":{"post":{"tags":["auth"],"summary":"Google Login","description":"Google Identity Services login. Links to existing users by email; when\nthe email exists in several organizations (fixes14) the response asks for\nan explicit org selection — the client retries with `organization_id`.","operationId":"google_login_api_auth_google_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google-signup":{"post":{"tags":["auth"],"summary":"Google Signup","description":"Register an organization for approval from a Google identity.\n\nGoogle verifies the email, but the org still needs superadmin approval before\nit goes live — same pending flow as the password signup (no immediate login).","operationId":"google_signup_api_auth_google_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleSignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Google Signup Api Auth Google Signup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/change-password":{"post":{"tags":["auth"],"summary":"Change Password","description":"Let a logged-in user change their own password. fixes98: the old\npassword isn't required — being signed in is enough. When one is sent\nanyway it must still be right.","operationId":"change_password_api_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Change Password Api Auth Change Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Email a one-time reset link to every active account with this email\n(one per organization). Always 200 — never reveals whether the address\nexists. The same address gets at most one mail a minute.","operationId":"forgot_password_api_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Forgot Password Api Auth Forgot Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Set a new password from a reset link. The link stops working once the\npassword changes (single use) and after PASSWORD_RESET_EXPIRE_MINUTES.","operationId":"reset_password_api_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Reset Password Api Auth Reset Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts":{"get":{"tags":["contacts"],"summary":"List Contacts","operationId":"list_contacts_api_contacts_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"pipeline_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Status"}},{"name":"contact_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Type"}},{"name":"assigned_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactOut"},"title":"Response List Contacts Api Contacts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["contacts"],"summary":"Create Contact","operationId":"create_contact_api_contacts_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/lookup":{"get":{"tags":["contacts"],"summary":"Lookup Contacts","description":"fixes121: name suggestions for another app (Give) — read only.\n\nAdmin and the contacts-only \"Shliach\" role (id `emissary`) only. Returns\nthe caller's organization's active mekurav contacts and, per contact,\nnothing but the id, the two name fields and the last 4 phone digits.\nThe organization comes from the token; there is no parameter for it.\n\nfixes123: only donor contacts (a donor_contact row) that are assigned\nto the calling user (contacts.assigned_user_id = the user's guid).","operationId":"lookup_contacts_api_contacts_lookup_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","maxLength":200,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/list":{"get":{"tags":["contacts"],"summary":"List Contacts Paginated","description":"One server-side page of contacts (same fixes8 §2C pattern as the\napartments list) — the contacts page uses this instead of the full dump.\nSorting (fixes11 §2.3): alphabetical (`name`) or `created` (creation date);\nthe page's default presentation is created-descending. fixes15 §5.1 adds\nthe apartments-style filters (q / area_ids / building_ids / has_mitzvot).","operationId":"list_contacts_paginated_api_contacts_list_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"pipeline_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Status"}},{"name":"contact_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Type"}},{"name":"assigned_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned User Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"area_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Area Ids"}},{"name":"building_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Building Ids"}},{"name":"has_mitzvot","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Has Mitzvot"}},{"name":"tzedaka_potential","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tzedaka Potential"}},{"name":"admin_area_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Admin Area Ids"}},{"name":"visit_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Visit From"}},{"name":"visit_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Visit To"}},{"name":"torah_thought","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Torah Thought"}},{"name":"connection_to_rebbe","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection To Rebbe"}},{"name":"custom_fields","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Fields"}},{"name":"picklist","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Picklist"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["name","created"],"type":"string","default":"name","title":"Sort"}},{"name":"dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"asc","title":"Dir"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}},{"name":"status","in":"query","required":false,"schema":{"enum":["active","draft"],"type":"string","default":"active","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/emails":{"get":{"tags":["contacts"],"summary":"List Contact Emails","description":"The distinct email addresses of every contact matching the same filter\nset as /list (fixes15 §5.2) — feeds the bulk `mailto:` BCC action, so it\nspans the whole filtered set, not just the visible page.","operationId":"list_contact_emails_api_contacts_emails_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"pipeline_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Status"}},{"name":"contact_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Type"}},{"name":"assigned_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned User Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"area_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Area Ids"}},{"name":"building_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Building Ids"}},{"name":"has_mitzvot","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Has Mitzvot"}},{"name":"tzedaka_potential","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tzedaka Potential"}},{"name":"admin_area_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Admin Area Ids"}},{"name":"torah_thought","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Torah Thought"}},{"name":"connection_to_rebbe","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection To Rebbe"}},{"name":"custom_fields","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Fields"}},{"name":"picklist","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Picklist"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response List Contact Emails Api Contacts Emails Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/tzedaka-values":{"get":{"tags":["contacts"],"summary":"List Tzedaka Values","description":"The distinct non-empty tzedaka-potential values in the org (fixes18 §3.2)\n— feeds the contacts page's dropdown filter. Scoped like the list itself,\nso a shliach only aggregates values from contacts they can see.","operationId":"list_tzedaka_values_api_contacts_tzedaka_values_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response List Tzedaka Values Api Contacts Tzedaka Values Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/contacts/bulk-update":{"post":{"tags":["contacts"],"summary":"Bulk Update Contacts","description":"fixes43 §1: reassign \"Assigned To\" on every contact matching the page's\ncurrent filters — mirrors the apartments bulk-update pattern (fixes23 §3):\nthe filter block is identical to GET /api/contacts/list, so \"everything\ncurrently on screen\" is exactly what this touches. A shliach cannot\nreassign ownership (same guard as the single-record PATCH).","operationId":"bulk_update_contacts_api_contacts_bulk_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBulkUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBulkUpdateResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/contacts/shliach/clear-report-numbers":{"post":{"tags":["contacts"],"summary":"Clear Shliach Report Numbers","description":"fixes43 §3.4 / fixes48 §3: \"ניקוי שיבוצים\" — clear the report-number\nassignment from every shliach contact in `contact_ids` (the Users page's\ncurrent filtered view). Admin-only, irreversible (the frontend confirms\nbefore calling). fixes45: applied as a versioned edit per shliach, same as\nany other coverage change, only touching the active row of each lineage.\nfixes48: this originally cleared `areas` instead — area assignment must\nbe left untouched, only report_numbers is in scope for this action.","operationId":"clear_shliach_report_numbers_api_contacts_shliach_clear_report_numbers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShliachClearReportNumbersIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShliachClearReportNumbersResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/contacts/{contact_id}/approve":{"post":{"tags":["contacts"],"summary":"Approve Contact","description":"Approve an Instinct draft: status 'draft' -> 'active', which moves it\ninto the regular contacts lists. Idempotent on an already-active contact.","operationId":"approve_contact_api_contacts__contact_id__approve_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/{contact_id}/deny":{"post":{"tags":["contacts"],"summary":"Deny Contact","description":"Deny an Instinct draft: it never became a real contact, so it's\ndeleted outright (a kept \"rejected\" row would still match Instinct's\nduplicate search). Drafts only — an active contact is a 409, so this\ncan't be used as a back-door delete.","operationId":"deny_contact_api_contacts__contact_id__deny_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/{contact_id}":{"get":{"tags":["contacts"],"summary":"Get Contact","operationId":"get_contact_api_contacts__contact_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["contacts"],"summary":"Update Contact","operationId":"update_contact_api_contacts__contact_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["contacts"],"summary":"Update Contact","operationId":"update_contact_api_contacts__contact_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contacts"],"summary":"Delete Contact","operationId":"delete_contact_api_contacts__contact_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/{contact_id}/shliach-history":{"get":{"tags":["contacts"],"summary":"Shliach Edit History","description":"fixes45: previous versions of this shliach's lineage, newest first —\nsame full-row-snapshot history view as the Apartments module's.","operationId":"shliach_edit_history_api_contacts__contact_id__shliach_history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShliachVersionOut"},"title":"Response Shliach Edit History Api Contacts  Contact Id  Shliach History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/{contact_id}/special-dates":{"get":{"tags":["contacts"],"summary":"List Special Dates","operationId":"list_special_dates_api_contacts__contact_id__special_dates_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SignificantDateOut"},"title":"Response List Special Dates Api Contacts  Contact Id  Special Dates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["contacts"],"summary":"Add Special Date","operationId":"add_special_date_api_contacts__contact_id__special_dates_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignificantDateCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignificantDateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/{contact_id}/special-dates/{sd_id}":{"put":{"tags":["contacts"],"summary":"Update Special Date","operationId":"update_special_date_api_contacts__contact_id__special_dates__sd_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"sd_id","in":"path","required":true,"schema":{"type":"integer","title":"Sd Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignificantDateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignificantDateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contacts"],"summary":"Delete Special Date","operationId":"delete_special_date_api_contacts__contact_id__special_dates__sd_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"sd_id","in":"path","required":true,"schema":{"type":"integer","title":"Sd Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/metadata/localization":{"get":{"tags":["metadata"],"summary":"Get Localization","description":"Return every UI string keyed by technical_name, with both languages.\n\nShape: { technical_name: { \"he\": <hebrew>, \"en\": <english> } }. `en` is \"\" until\nan admin fills it in. Public so the frontend can load labels at boot.","operationId":"get_localization_api_metadata_localization_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"additionalProperties":{"type":"string"},"type":"object"},"type":"object","title":"Response Get Localization Api Metadata Localization Get"}}}}}}},"/api/metadata/system-config":{"get":{"tags":["metadata"],"summary":"Get System Config","description":"Platform title configuration (fixes9 §1). Public — the frontend computes\nthe HTML <title> on every page, including the login screen pre-auth.","operationId":"get_system_config_api_metadata_system_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemConfigOut"}}}}}}},"/api/localization":{"get":{"tags":["localization"],"summary":"List Strings","operationId":"list_strings_api_localization_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LocalizationOut"},"type":"array","title":"Response List Strings Api Localization Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["localization"],"summary":"Create String","operationId":"create_string_api_localization_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalizationCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/localization/{string_id}":{"put":{"tags":["localization"],"summary":"Update String","operationId":"update_string_api_localization__string_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"string_id","in":"path","required":true,"schema":{"type":"integer","title":"String Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalizationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/picklists":{"get":{"tags":["picklists"],"summary":"List Field Keys","description":"The org's registry of managed picklists (DB-driven definitions), so admins\ncan edit every one — system and custom alike.","operationId":"list_field_keys_api_picklists_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PicklistFieldOut"},"type":"array","title":"Response List Field Keys Api Picklists Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/picklists/definition":{"post":{"tags":["picklists"],"summary":"Create Definition","operationId":"create_definition_api_picklists_definition_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PicklistDefinitionCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PicklistFieldOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/picklists/definition/{def_id}":{"put":{"tags":["picklists"],"summary":"Update Definition","operationId":"update_definition_api_picklists_definition__def_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"def_id","in":"path","required":true,"schema":{"type":"integer","title":"Def Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PicklistDefinitionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PicklistFieldOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["picklists"],"summary":"Delete Definition","operationId":"delete_definition_api_picklists_definition__def_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"def_id","in":"path","required":true,"schema":{"type":"integer","title":"Def Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/picklists/definition/{def_id}/usage":{"get":{"tags":["picklists"],"summary":"Definition Usage","description":"fixes48 §1: how many records currently hold any value under this\nwhole list — drives the \"dependent data\" confirmation before a delete\npurges it.","operationId":"definition_usage_api_picklists_definition__def_id__usage_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"def_id","in":"path","required":true,"schema":{"type":"integer","title":"Def Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/picklists/{field_key}":{"get":{"tags":["picklists"],"summary":"Get Options","operationId":"get_options_api_picklists__field_key__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}},{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PicklistValueOut"},"title":"Response Get Options Api Picklists  Field Key  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["picklists"],"summary":"Add Option","operationId":"add_option_api_picklists__field_key__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PicklistValueCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PicklistValueOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/picklists/{picklist_id}":{"put":{"tags":["picklists"],"summary":"Update Option","operationId":"update_option_api_picklists__picklist_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"picklist_id","in":"path","required":true,"schema":{"type":"integer","title":"Picklist Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PicklistValueUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PicklistValueOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["picklists"],"summary":"Delete Option","description":"Soft-delete (is_active=false) by default; `hard=true` permanently\nremoves it — refused with 409 while any live record still uses it\n(fixes72 §1, reversing fixes48's purge-on-confirm: the admin must see\nwhere it's used and change those records first). Links held only by\nretired apartment versions don't block and are purged with it.","operationId":"delete_option_api_picklists__picklist_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"picklist_id","in":"path","required":true,"schema":{"type":"integer","title":"Picklist Id"}},{"name":"hard","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Hard"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PicklistValueOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/picklists/{picklist_id}/usage":{"get":{"tags":["picklists"],"summary":"Value Usage","description":"How many records currently hold this value, and where (fixes72 §1) —\nthe frontend shows the breakdown instead of offering a hard delete.","operationId":"value_usage_api_picklists__picklist_id__usage_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"picklist_id","in":"path","required":true,"schema":{"type":"integer","title":"Picklist Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/picklists/{field_key}/reorder":{"put":{"tags":["picklists"],"summary":"Reorder Options","operationId":"reorder_options_api_picklists__field_key__reorder_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PicklistReorder"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PicklistValueOut"},"title":"Response Reorder Options Api Picklists  Field Key  Reorder Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users":{"get":{"tags":["users"],"summary":"List Users","operationId":"list_users_api_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserOut"},"type":"array","title":"Response List Users Api Users Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["users"],"summary":"Create User","operationId":"create_user_api_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUserCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/users/{user_id}":{"get":{"tags":["users"],"summary":"Get User","description":"fixes47: backs the dedicated dashboard/users/{id} detail page — same\nsingle-record-fetch role list_contacts's GET /{id} plays for Contacts.","operationId":"get_user_api_users__user_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["users"],"summary":"Update User","operationId":"update_user_api_users__user_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Delete User","operationId":"delete_user_api_users__user_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/{user_id}/shliach/restore-field":{"post":{"tags":["users"],"summary":"Restore Shliach Field","description":"fixes48 §4: roll one field of the linked shliach back to the value it\nheld in a previous version — same \"new active version carrying just the\nrestored field\" contract as apartments.restore_apartment_field. Admin\nonly; mirrors the history dashboard/users/{id} now shows.","operationId":"restore_shliach_field_api_users__user_id__shliach_restore_field_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShliachRestoreField"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/recreate":{"post":{"tags":["users"],"summary":"Recreate User","description":"fixes26 §4: one-click recovery of a shliach's login. Reactivates the\nsame-org account with the contact's email, or provisions a fresh\nrole='shliach' user, and re-links the ContactShliach record.","operationId":"recreate_user_api_users_recreate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRecreateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/organizations/me":{"get":{"tags":["organizations"],"summary":"Get My Org","operationId":"get_my_org_api_organizations_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOut"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["organizations"],"summary":"Update My Org","operationId":"update_my_org_api_organizations_me_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/organizations/slug-available":{"get":{"tags":["organizations"],"summary":"Slug Available","description":"fixes65 §1: live check for the Settings page — is this public-page\naddress free (not used by any *other* org)? The PUT below enforces the\nsame rule, and the DB's unique index backs both against races.","operationId":"slug_available_api_organizations_slug_available_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"slug","in":"query","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Slug Available Api Organizations Slug Available Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organizations/public-image-search":{"post":{"tags":["organizations"],"summary":"Public Image Search","description":"Search the web for images (Google Programmable Search, searchType=image)\nthat the admin can import into the org's public landing-page gallery via\n/api/uploads/gallery-image-url. 503 when the Google keys aren't configured.","operationId":"public_image_search_api_organizations_public_image_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicImageSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Public Image Search Api Organizations Public Image Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/custom-fields":{"get":{"tags":["custom-fields"],"summary":"List Definitions","operationId":"list_definitions_api_custom_fields_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldDefinitionOut"},"title":"Response List Definitions Api Custom Fields Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["custom-fields"],"summary":"Create Definition","operationId":"create_definition_api_custom_fields_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldDefinitionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldDefinitionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/custom-fields/{def_id}":{"put":{"tags":["custom-fields"],"summary":"Update Definition","operationId":"update_definition_api_custom_fields__def_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"def_id","in":"path","required":true,"schema":{"type":"integer","title":"Def Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldDefinitionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldDefinitionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["custom-fields"],"summary":"Delete Definition","description":"Soft-delete (is_active=false) by default; `hard=true` permanently\nremoves it AND purges every dependent value (fixes48 §1 — previously left\norphaned CustomFieldValue rows, or for a select-type field, an orphaned\nPicklistDefinition/Value/Link trio entirely untouched).","operationId":"delete_definition_api_custom_fields__def_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"def_id","in":"path","required":true,"schema":{"type":"integer","title":"Def Id"}},{"name":"hard","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Hard"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldDefinitionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/custom-fields/{def_id}/usage":{"get":{"tags":["custom-fields"],"summary":"Definition Usage","description":"fixes48 §1: how many records currently hold a value for this\ndefinition — drives the \"dependent data\" confirmation before a hard\ndelete purges it.","operationId":"definition_usage_api_custom_fields__def_id__usage_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"def_id","in":"path","required":true,"schema":{"type":"integer","title":"Def Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboard/summary":{"get":{"tags":["dashboard"],"summary":"Dashboard Summary","operationId":"dashboard_summary_api_dashboard_summary_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardSummaryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboard/new-signups":{"get":{"tags":["dashboard"],"summary":"New Signups","description":"Self-registered activists (public page or QR) since this admin last\ndismissed the card — per admin, so one admin dismissing it doesn't hide\nit from the others.","operationId":"new_signups_api_dashboard_new_signups_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewSignupsOut"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/dashboard/new-signups/dismiss":{"post":{"tags":["dashboard"],"summary":"Dismiss New Signups","operationId":"dismiss_new_signups_api_dashboard_new_signups_dismiss_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewSignupsOut"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/field-settings":{"get":{"tags":["field-settings"],"summary":"List Field Settings","description":"The full toggleable registry with each field's visibility for this org —\nthe static built-in registry plus a dynamic row per admin-added custom\npicklist (fixes33 §5.1), so those can be hidden too.","operationId":"list_field_settings_api_field_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FieldSettingOut"},"type":"array","title":"Response List Field Settings Api Field Settings Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["field-settings"],"summary":"Set Field Setting","description":"Show/hide a single field (admin only). Upserts the org's row.","operationId":"set_field_setting_api_field_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldSettingUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldSettingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin-areas":{"get":{"tags":["admin-areas"],"summary":"List Admin Areas","operationId":"list_admin_areas_api_admin_areas_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AdminAreaOut"},"type":"array","title":"Response List Admin Areas Api Admin Areas Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["admin-areas"],"summary":"Create Admin Area","operationId":"create_admin_area_api_admin_areas_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAreaCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAreaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin-areas/{admin_area_id}":{"get":{"tags":["admin-areas"],"summary":"Get Admin Area","operationId":"get_admin_area_api_admin_areas__admin_area_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_area_id","in":"path","required":true,"schema":{"type":"integer","title":"Admin Area Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAreaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin-areas"],"summary":"Update Admin Area","operationId":"update_admin_area_api_admin_areas__admin_area_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_area_id","in":"path","required":true,"schema":{"type":"integer","title":"Admin Area Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAreaUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAreaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin-areas"],"summary":"Delete Admin Area","operationId":"delete_admin_area_api_admin_areas__admin_area_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_area_id","in":"path","required":true,"schema":{"type":"integer","title":"Admin Area Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/report-numbers":{"get":{"tags":["report-numbers"],"summary":"List Report Numbers","operationId":"list_report_numbers_api_report_numbers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReportNumberOut"},"type":"array","title":"Response List Report Numbers Api Report Numbers Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["report-numbers"],"summary":"Create Report Number","operationId":"create_report_number_api_report_numbers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportNumberCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/report-numbers/shliach-assignments":{"get":{"tags":["report-numbers"],"summary":"Report Number Shliach Assignments","description":"fixes43 §4.3: every report number's currently-covering shliach(im),\nkeyed by report_number_id — powers the reassignment conflict warning on\nthe shliach edit form (a single query instead of one round trip per\nreport number).","operationId":"report_number_shliach_assignments_api_report_numbers_shliach_assignments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"items":{"$ref":"#/components/schemas/ShliachSummary"},"type":"array"},"type":"object","title":"Response Report Number Shliach Assignments Api Report Numbers Shliach Assignments Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/report-numbers/campaign-task-status":{"get":{"tags":["report-numbers"],"summary":"Report Number Campaign Task Status","description":"fixes58 §3.5: for each report number, its Task status under each\ncurrently-active campaign — `{report_number_id: {campaign_id: {status,\ntask_id}}}`. Powers the Report Numbers page's one-badge-column-per-\nactive-campaign display; fixes60 §2 added `task_id` so that badge can\nbecome an inline PUT-able status toggle. Nested by campaign_id (not a\nsingle flat value) because a report number can carry tasks under more\nthan one active campaign at once, and each gets its own column. If a\nreport number has 2+ tasks under the *same* campaign, the last one\niterated wins here (pre-existing behavior, unchanged by fixes60).","operationId":"report_number_campaign_task_status_api_report_numbers_campaign_task_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/TaskStatusWithId"},"type":"object"},"type":"object","title":"Response Report Number Campaign Task Status Api Report Numbers Campaign Task Status Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/report-numbers/jewish-counts":{"get":{"tags":["report-numbers"],"summary":"Report Number Jewish Counts","description":"fixes53 §3: \"Number of Jews\" / \"Number of Engaged Jews\" calculated\ncolumns for the Report Numbers grid, keyed by report_number_id. Missing\nkeys (no matching apartment) are 0/0 — the frontend fills those in.","operationId":"report_number_jewish_counts_api_report_numbers_jewish_counts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"$ref":"#/components/schemas/JewishCounts"},"type":"object","title":"Response Report Number Jewish Counts Api Report Numbers Jewish Counts Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/report-numbers/areas":{"get":{"tags":["report-numbers"],"summary":"Report Number Areas","description":"fixes68: for each report number, the area(s) its active apartments'\nbuildings sit in — keyed by report_number_id, most-buildings-first.\nDeclared before `/{report_number_id}` so that route doesn't swallow this\npath first.","operationId":"report_number_areas_api_report_numbers_areas_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"items":{"$ref":"#/components/schemas/ReportNumberAreaOut"},"type":"array"},"type":"object","title":"Response Report Number Areas Api Report Numbers Areas Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/report-numbers/{report_number_id}":{"get":{"tags":["report-numbers"],"summary":"Get Report Number","operationId":"get_report_number_api_report_numbers__report_number_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"report_number_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Number Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["report-numbers"],"summary":"Update Report Number","operationId":"update_report_number_api_report_numbers__report_number_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"report_number_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Number Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportNumberUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["report-numbers"],"summary":"Delete Report Number","operationId":"delete_report_number_api_report_numbers__report_number_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"report_number_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Number Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shliach-messages/report-completions":{"get":{"tags":["shliach-messages"],"summary":"List Report Completions","description":"fixes53 §9: the full org log, newest first, for /dashboard/messages-\nfrom-activists.","operationId":"list_report_completions_api_shliach_messages_report_completions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReportCompletionOut"},"type":"array","title":"Response List Report Completions Api Shliach Messages Report Completions Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["shliach-messages"],"summary":"Submit Report Completion","operationId":"submit_report_completion_api_shliach_messages_report_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCompletionCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCompletionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/shliach-messages/my-tasks":{"get":{"tags":["shliach-messages"],"summary":"My Reportable Tasks","description":"fixes74 §11: the signed-in activist's own current tasks (taken or\npaused), newest assignment first — the choices in the report form.","operationId":"my_reportable_tasks_api_shliach_messages_my_tasks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MyTaskOut"},"type":"array","title":"Response My Reportable Tasks Api Shliach Messages My Tasks Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/shliach-messages/system-comments":{"get":{"tags":["shliach-messages"],"summary":"List System Comments","operationId":"list_system_comments_api_shliach_messages_system_comments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SystemCommentOut"},"type":"array","title":"Response List System Comments Api Shliach Messages System Comments Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["shliach-messages"],"summary":"Submit System Comment","operationId":"submit_system_comment_api_shliach_messages_system_comments_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemCommentCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemCommentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/shliach-messages/announcements":{"get":{"tags":["shliach-messages"],"summary":"List Announcements","operationId":"list_announcements_api_shliach_messages_announcements_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ShliachAnnouncementOut"},"type":"array","title":"Response List Announcements Api Shliach Messages Announcements Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["shliach-messages"],"summary":"Create Announcement","operationId":"create_announcement_api_shliach_messages_announcements_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShliachAnnouncementCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShliachAnnouncementOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/shliach-messages/announcements/{announcement_id}":{"put":{"tags":["shliach-messages"],"summary":"Update Announcement","operationId":"update_announcement_api_shliach_messages_announcements__announcement_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"announcement_id","in":"path","required":true,"schema":{"type":"integer","title":"Announcement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShliachAnnouncementUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShliachAnnouncementOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["shliach-messages"],"summary":"Delete Announcement","operationId":"delete_announcement_api_shliach_messages_announcements__announcement_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"announcement_id","in":"path","required":true,"schema":{"type":"integer","title":"Announcement Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activist-messages/feed":{"get":{"tags":["activist-messages"],"summary":"Feed","description":"Any signed-in org user (the activist app): every message + the stats.","operationId":"feed_api_activist_messages_feed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivistMessagesFeed"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/activist-messages/stats":{"get":{"tags":["activist-messages"],"summary":"Get Stats","operationId":"get_stats_api_activist_messages_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgActivistStatsOut"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["activist-messages"],"summary":"Update Stats","operationId":"update_stats_api_activist_messages_stats_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgActivistStatsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgActivistStatsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/activist-messages/stats/recalculate":{"post":{"tags":["activist-messages"],"summary":"Recalculate Stats","operationId":"recalculate_stats_api_activist_messages_stats_recalculate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgActivistStatsOut"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/activist-messages":{"get":{"tags":["activist-messages"],"summary":"List Messages","operationId":"list_messages_api_activist_messages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ActivistMessageOut"},"type":"array","title":"Response List Messages Api Activist Messages Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["activist-messages"],"summary":"Create Message","operationId":"create_message_api_activist_messages_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivistMessageCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivistMessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/activist-messages/{message_id}":{"put":{"tags":["activist-messages"],"summary":"Update Message","operationId":"update_message_api_activist_messages__message_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivistMessageUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivistMessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["activist-messages"],"summary":"Delete Message","operationId":"delete_message_api_activist_messages__message_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/areas":{"get":{"tags":["areas"],"summary":"List Areas","operationId":"list_areas_api_areas_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AreaOut"},"type":"array","title":"Response List Areas Api Areas Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["areas"],"summary":"Create Area","operationId":"create_area_api_areas_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/areas/shliach-assignments":{"get":{"tags":["areas"],"summary":"Area Shliach Assignments","description":"fixes43 §4.2: every area's currently-covering shliach(im), keyed by\narea_id — powers the reassignment conflict warning on the shliach edit\nform (a single query instead of one round trip per area).","operationId":"area_shliach_assignments_api_areas_shliach_assignments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"items":{"$ref":"#/components/schemas/ShliachSummary"},"type":"array"},"type":"object","title":"Response Area Shliach Assignments Api Areas Shliach Assignments Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/areas/jewish-counts":{"get":{"tags":["areas"],"summary":"Area Jewish Counts","description":"fixes53 §3: \"Number of Jews\" / \"Number of Engaged Jews\" calculated\ncolumns for the Areas grid, keyed by area_id. Missing keys (no matching\napartment) are 0/0 — the frontend fills those in. Scoped to a shliach's\ncovered areas, matching `list_areas`.","operationId":"area_jewish_counts_api_areas_jewish_counts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"$ref":"#/components/schemas/JewishCounts"},"type":"object","title":"Response Area Jewish Counts Api Areas Jewish Counts Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/areas/{area_id}":{"get":{"tags":["areas"],"summary":"Get Area","operationId":"get_area_api_areas__area_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"area_id","in":"path","required":true,"schema":{"type":"integer","title":"Area Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["areas"],"summary":"Update Area","operationId":"update_area_api_areas__area_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"area_id","in":"path","required":true,"schema":{"type":"integer","title":"Area Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["areas"],"summary":"Delete Area","description":"fixes33 §2.2: an area with buildings needs an explicit choice — cascade\n(delete the buildings + their apartments too) or unassign (keep the\nbuildings, clear their area_id). Without buildings, deletes outright.\n\n`contact_shliach_area` rows (direct area-coverage assignments) have no\nORM relationship declared on `Area`, so the ORM cascade never reaches\nthem; left alone they trip the FK RESTRICT on every delete, buildings or\nnot — that was the actual \"deletion does nothing\" bug. Always clear them\nfirst regardless of mode.","operationId":"delete_area_api_areas__area_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"area_id","in":"path","required":true,"schema":{"type":"integer","title":"Area Id"}},{"name":"mode","in":"query","required":false,"schema":{"anyOf":[{"enum":["cascade","unassign"],"type":"string"},{"type":"null"}],"title":"Mode"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/areas/{area_id}/building-report-numbers":{"get":{"tags":["areas"],"summary":"Area Building Report Numbers","description":"Report numbers (מספרי דוח) per building in this area, for the area page.\nA building has no direct report link — it's the distinct report numbers of\nits active apartments (`is_display`). Buildings with none are omitted.\nSame access rule as `get_area`: a shliach only for an area they cover.","operationId":"area_building_report_numbers_api_areas__area_id__building_report_numbers_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"area_id","in":"path","required":true,"schema":{"type":"integer","title":"Area Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"title":"Response Area Building Report Numbers Api Areas  Area Id  Building Report Numbers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/areas/{area_id}/generate-polygon":{"post":{"tags":["areas"],"summary":"Generate Area Polygon","operationId":"generate_area_polygon_api_areas__area_id__generate_polygon_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"area_id","in":"path","required":true,"schema":{"type":"integer","title":"Area Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratePolygonResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/areas/generate-polygons":{"post":{"tags":["areas"],"summary":"Generate All Area Polygons","operationId":"generate_all_area_polygons_api_areas_generate_polygons_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GeneratePolygonResult"},"type":"array","title":"Response Generate All Area Polygons Api Areas Generate Polygons Post"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/areas/{area_id}/shluchim":{"get":{"tags":["areas"],"summary":"Area Shluchim","description":"Shliach contacts covering this area (contact_shliach_area). fixes19: the\napartment-coverage bridge is gone, so direct assignment is the only source.","operationId":"area_shluchim_api_areas__area_id__shluchim_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"area_id","in":"path","required":true,"schema":{"type":"integer","title":"Area Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactOut"},"title":"Response Area Shluchim Api Areas  Area Id  Shluchim Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["areas"],"summary":"Add Area Shliach","description":"fixes18 §4.2: assign an existing shliach contact to cover this area —\nthe area page's \"add activist\" dropdown. Idempotent: re-adding an already\ncovering shliach is a no-op. Returns the updated covering list.","operationId":"add_area_shliach_api_areas__area_id__shluchim_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"area_id","in":"path","required":true,"schema":{"type":"integer","title":"Area Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaShliachAdd"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactOut"},"title":"Response Add Area Shliach Api Areas  Area Id  Shluchim Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/areas/{area_id}/eligible-buildings":{"get":{"tags":["areas"],"summary":"Area Eligible Buildings","description":"fixes18 §4.3: the org's buildings whose coordinates fall inside this\narea's polygon and that aren't already assigned to it — the only options\nthe area page's \"add building\" dropdown offers. Empty when the area has no\n(valid) polygon or no positioned building lies within it.","operationId":"area_eligible_buildings_api_areas__area_id__eligible_buildings_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"area_id","in":"path","required":true,"schema":{"type":"integer","title":"Area Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BuildingOut"},"title":"Response Area Eligible Buildings Api Areas  Area Id  Eligible Buildings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/buildings":{"get":{"tags":["buildings"],"summary":"List Buildings","description":"The plain, unpaginated building list — feeds filters/pickers across\nseveral pages. No `floors` (see `BuildingListItemOut`): with a few\nthousand buildings, eager-loading and serializing every one's floors made\nthis slow enough to jeopardize sibling requests fired alongside it.","operationId":"list_buildings_api_buildings_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"area_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Area Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BuildingListItemOut"},"title":"Response List Buildings Api Buildings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["buildings"],"summary":"Create Building","operationId":"create_building_api_buildings_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildingCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/buildings/types":{"get":{"tags":["buildings"],"summary":"List Building Types","description":"fixes63: the fixed building_type registry (global, not org-scoped) —\nlets the buildings page show/filter by type without hardcoding labels.\nNo `sort_order` column (matches the table exactly as spec'd) — ordered\nhere by the natural building → town_house → divided_town_house progression.","operationId":"list_building_types_api_buildings_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BuildingTypeOut"},"type":"array","title":"Response List Building Types Api Buildings Types Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/buildings/list":{"get":{"tags":["buildings"],"summary":"List Buildings Paginated","description":"One server-side page of buildings (fixes12 §3.3, same envelope pattern\nas contacts/apartments). fixes15 §7.1: sortable (`sort`+`dir`) and\nfilterable by several areas at once (repeated ?area_ids=… params; the\nsingle `area_id` stays supported).\n\nfixes54 §2: `q` free-text-filters by address/name — added so pickers (the\nplain, unpaginated `GET /api/buildings` below) can move to server-side\nsearch instead of loading the whole org's buildings client-side. With an\norg grown past a few thousand buildings, that plain endpoint's payload\ngot large enough that pickers built on it (ApartmentPicker) intermittently\nrendered as stuck on \"no buildings yet\" while the fetch was still in\nflight, and even once loaded, a several-thousand-row client-filtered\ndropdown was too sluggish to use — the exact \"no buildings error followed\nby two non-functional dropdowns\" bug reported against the Contacts quick-\nedit building field.","operationId":"list_buildings_paginated_api_buildings_list_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"area_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Area Id"}},{"name":"area_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Area Ids"}},{"name":"building_type_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Building Type Ids"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["address","name","area","created"],"type":"string","default":"address","title":"Sort"}},{"name":"dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"asc","title":"Dir"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildingPageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/buildings/{building_id}":{"get":{"tags":["buildings"],"summary":"Get Building","operationId":"get_building_api_buildings__building_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"building_id","in":"path","required":true,"schema":{"type":"integer","title":"Building Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["buildings"],"summary":"Update Building","operationId":"update_building_api_buildings__building_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"building_id","in":"path","required":true,"schema":{"type":"integer","title":"Building Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["buildings"],"summary":"Delete Building","operationId":"delete_building_api_buildings__building_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"building_id","in":"path","required":true,"schema":{"type":"integer","title":"Building Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/buildings/{building_id}/floors":{"get":{"tags":["buildings"],"summary":"List Floors","operationId":"list_floors_api_buildings__building_id__floors_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"building_id","in":"path","required":true,"schema":{"type":"integer","title":"Building Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FloorOut"},"title":"Response List Floors Api Buildings  Building Id  Floors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["buildings"],"summary":"Add Floor","operationId":"add_floor_api_buildings__building_id__floors_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"building_id","in":"path","required":true,"schema":{"type":"integer","title":"Building Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FloorCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FloorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/buildings/{building_id}/floors/{floor_id}":{"put":{"tags":["buildings"],"summary":"Update Floor","operationId":"update_floor_api_buildings__building_id__floors__floor_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"building_id","in":"path","required":true,"schema":{"type":"integer","title":"Building Id"}},{"name":"floor_id","in":"path","required":true,"schema":{"type":"integer","title":"Floor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FloorUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FloorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["buildings"],"summary":"Delete Floor","operationId":"delete_floor_api_buildings__building_id__floors__floor_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"building_id","in":"path","required":true,"schema":{"type":"integer","title":"Building Id"}},{"name":"floor_id","in":"path","required":true,"schema":{"type":"integer","title":"Floor Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apartments":{"get":{"tags":["apartments"],"summary":"List Apartments","operationId":"list_apartments_api_apartments_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"building_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Building Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApartmentOut"},"title":"Response List Apartments Api Apartments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["apartments"],"summary":"Create Apartment","operationId":"create_apartment_api_apartments_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apartments/my-route":{"get":{"tags":["apartments"],"summary":"My Route","description":"fixes68 §1/§B1: one pre-sorted payload for the activist's door-to-door\nroute (Feature 1) — assigned apartments only, but every field, built via\nthe same `_enrich()` the admin apartments grid uses (fixed columns,\ndynamic picklist_values, custom_field_values, linked contact) so the\nactivist sees the same full picture an admin does, not a trimmed\nsubset. Still nowhere near the plain GET /api/apartments dump's size\n(unpaginated, org-wide, ~25k rows / 9.7MB — see the spec's SPEED PROBLEM\nnote): this is the activist's own set, tens to low hundreds of rows, and\nevery field on that set is still a small payload. Must stay registered\nbefore GET \"/{apartment_id}\" below — that route has no `:int` path\nconverter, so \"my-route\" would otherwise match it first and 422 on the\nint conversion.\n\nOrder is the same mandatory hierarchy sort as `sort=hierarchy` on /list\n(report number -> building -> floor -> label) — the frontend never\nre-sorts, \"next door\" is just index+1.","operationId":"my_route_api_apartments_my_route_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApartmentRouteItem"},"type":"array","title":"Response My Route Api Apartments My Route Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/apartments/list":{"get":{"tags":["apartments"],"summary":"List Apartments Enriched","description":"One page of apartments enriched with building/area + linked contact, for\nthe apartments page. Shliach users see only the apartments they cover.\n\nFilters: `building_id` / `area_id` bound the list (fixes8 §2A lazy loading);\n`apartment_id` returns a single enriched row (detail page); `q` matches the\nstreet name in the parent building address (plus label / resident name);\nfixes18 §5.2: `jewish_status` / `mezuzah_status` match the picklist columns.\nfixes19: only active versions (is_display) are returned.\nSorting (fixes8 §1D) defaults to floor, then apartment number within a floor;\n`dir` flips the primary key only. Pagination (fixes8 §2C) is server-side.","operationId":"list_apartments_enriched_api_apartments_list_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"building_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Building Id"}},{"name":"building_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Building Ids"}},{"name":"area_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Area Id"}},{"name":"area_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Area Ids"}},{"name":"apartment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Apartment Id"}},{"name":"apartment_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Apartment Ids"}},{"name":"report_number_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Report Number Ids"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"jewish_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Jewish Status"}},{"name":"mezuzah_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Mezuzah Status"}},{"name":"campaign_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Campaign Status"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Language"}},{"name":"picklist","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Picklist"}},{"name":"custom_field_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Filter"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["floor","label","resident","building","created","hierarchy","area","report_number","notes","phone","email"],"type":"string","default":"floor","title":"Sort"}},{"name":"dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"asc","title":"Dir"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}},{"name":"status","in":"query","required":false,"schema":{"enum":["active","draft"],"type":"string","default":"active","title":"Status"}},{"name":"as_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"As User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentPageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apartments/batch":{"post":{"tags":["apartments"],"summary":"Batch Create Apartments","description":"Bulk generator (fixes7 §5): insert the full floors × labels matrix in one\ntransaction, skipping combinations that already exist in the building.","operationId":"batch_create_apartments_api_apartments_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentBatchCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentBatchResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/apartments/report-number-buildings":{"get":{"tags":["apartments"],"summary":"Report Number Buildings","description":"fixes23 §2: distinct (report number → building) pairs across the org's\nactive apartments. The apartments page uses these to conditionally narrow the\nbuilding filter — a building shows only while it holds an apartment carrying a\nselected report number. Shliach users get only their visible apartments.","operationId":"report_number_buildings_api_apartments_report_number_buildings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReportNumberBuildingLink"},"type":"array","title":"Response Report Number Buildings Api Apartments Report Number Buildings Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/apartments/building-aggregates":{"get":{"tags":["apartments"],"summary":"Building Aggregates","description":"fixes30 §1: apartment counts per building under the exact /list filters —\nthe group-by-building view shows each building header with its full\nfiltered count, not just the rows on the current page. Shliach users are\nscoped to their covered apartments like everywhere else.","operationId":"building_aggregates_api_apartments_building_aggregates_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"building_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Building Id"}},{"name":"building_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Building Ids"}},{"name":"area_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Area Id"}},{"name":"area_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Area Ids"}},{"name":"report_number_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Report Number Ids"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"jewish_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Jewish Status"}},{"name":"mezuzah_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Mezuzah Status"}},{"name":"campaign_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Campaign Status"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Language"}},{"name":"picklist","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Picklist"}},{"name":"custom_field_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BuildingAggregate"},"title":"Response Building Aggregates Api Apartments Building Aggregates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apartments/bulk-update":{"post":{"tags":["apartments"],"summary":"Bulk Update Apartments","description":"fixes23 §3, expanded fixes52 §2.3: apply a change to every active\napartment matching the page's current filters, as versioned edits. The\nfilter block mirrors GET /api/apartments/list, so \"all apartments\ncurrently matching the active filters\" resolves to the exact same rows\nthe user sees. Shliach users only touch apartments assigned to them.\n`apartment_name`/`building_id` are never bulk-editable — they simply\naren't fields on `ApartmentBulkChanges`.","operationId":"bulk_update_apartments_api_apartments_bulk_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentBulkUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentBulkUpdateResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/apartments/lineage/{lineage_id}":{"get":{"tags":["apartments"],"summary":"Apartment Current Of Lineage","description":"fixes118 decision 8: a link by the stable lineage id (an apartment's id\nchanges on every save) — answers the current version's id, which the\n/dashboard/apartments/lineage/{id} page opens. Same visibility as\nGET /{apartment_id} for the current version: the caller's org only.","operationId":"apartment_current_of_lineage_api_apartments_lineage__lineage_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"lineage_id","in":"path","required":true,"schema":{"type":"integer","title":"Lineage Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apartments/{apartment_id}/history":{"get":{"tags":["apartments"],"summary":"Apartment History","description":"Previous versions of this apartment's lineage, newest first — the admin\nhistory view (fixes19 §3). Each row is a full read-only snapshot plus the\neditor's name and the retirement time.","operationId":"apartment_history_api_apartments__apartment_id__history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"apartment_id","in":"path","required":true,"schema":{"type":"integer","title":"Apartment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApartmentVersionOut"},"title":"Response Apartment History Api Apartments  Apartment Id  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apartments/{apartment_id}/restore-field":{"post":{"tags":["apartments"],"summary":"Restore Apartment Field","description":"fixes22 §2: roll one field of the active apartment back to the value it\nheld in a previous version. Applied as a normal versioned edit — a new\nactive version is created carrying the restored field, and the pre-restore\nstate itself becomes a history entry. Admin only.","operationId":"restore_apartment_field_api_apartments__apartment_id__restore_field_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"apartment_id","in":"path","required":true,"schema":{"type":"integer","title":"Apartment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentRestoreField"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apartments/{apartment_id}":{"get":{"tags":["apartments"],"summary":"Get Apartment","operationId":"get_apartment_api_apartments__apartment_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"apartment_id","in":"path","required":true,"schema":{"type":"integer","title":"Apartment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["apartments"],"summary":"Update Apartment","description":"Versioned update (fixes19 §3): the current row is retired\n(is_display=False + last_edit/editor_id stamp) and a new active row with the\nupdated values is inserted and returned. References from mekurav contacts\nfollow the new row. fixes22 §2: a shliach may edit only apartments assigned\nto them (their edits version + stamp editor_id like anyone else's).","operationId":"update_apartment_api_apartments__apartment_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"apartment_id","in":"path","required":true,"schema":{"type":"integer","title":"Apartment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["apartments"],"summary":"Delete Apartment","operationId":"delete_apartment_api_apartments__apartment_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"apartment_id","in":"path","required":true,"schema":{"type":"integer","title":"Apartment Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apartments/{apartment_id}/door-outcome":{"post":{"tags":["apartments"],"summary":"Record Door Outcome","description":"fixes68 §3/§8/§B2: one tap from the activist route — logs a door visit\nand, for jewish/not_jewish, updates the apartment's Jewish status too.\n\nIdempotent on client_uuid (fixes68 §8's offline outbox retries a POST\nwhose response was lost, e.g. a stairwell dropping mid-flush): a repeat\nis matched and returned as-is rather than logged twice.\n\nA jewish/not_jewish mark goes through the normal versioned apartment\nupdate (`_apply_versioned_update`), not a bare in-place picklist write —\napartments are versioned (fixes19 §3) and the admin dashboard's \"recent\nJewish-status changes\" panel (routers/dashboard.py::_jewish_status_changes)\ndetects a change by diffing a retired row against its successor. A\ndirect write would update the value correctly but leave it invisible to\nthat panel and with no editor_id/last_edit audit stamp — the spec's own\nwording (\"via the existing _apply_picklist_fields path\") undersells this;\nthat helper is read-only serialization, not a write path.\n\nThe route's cached `apartment_id` can go stale mid-session: a jewish/\nnot_jewish mark retires the row and hands the client a new one (see\nlib/activistRoute.ts's `applyLocalOutcome` — it patches the cached\nitem's outcome fields in place, it never rewrites `id`), and a second\nmark on the same door before the next full route refresh — e.g. the\nactivist correcting a jewish/not_jewish tap, or reopening at the door\nthey left via \"back\" — would otherwise resubmit the retired id. Resolve\nforward to the lineage's current active row first (same lineage lookup\n`delete_apartment` uses), the same way the system already forwards\nVisitHistory/ContactMekurav references on every versioned update —\nnever operate on a retired snapshot, which would silently mint a second\nis_display=True row for the lineage instead of updating the real one.","operationId":"record_door_outcome_api_apartments__apartment_id__door_outcome_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"apartment_id","in":"path","required":true,"schema":{"type":"integer","title":"Apartment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoorOutcomeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoorOutcomeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/{contact_id}/visits":{"get":{"tags":["visits"],"summary":"List Visits","operationId":"list_visits_api_contacts__contact_id__visits_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VisitOut"},"title":"Response List Visits Api Contacts  Contact Id  Visits Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["visits"],"summary":"Add Visit","operationId":"add_visit_api_contacts__contact_id__visits_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/{contact_id}/visits/{visit_id}":{"patch":{"tags":["visits"],"summary":"Update Visit","operationId":"update_visit_api_contacts__contact_id__visits__visit_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"visit_id","in":"path","required":true,"schema":{"type":"integer","title":"Visit Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["visits"],"summary":"Update Visit","operationId":"update_visit_api_contacts__contact_id__visits__visit_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"visit_id","in":"path","required":true,"schema":{"type":"integer","title":"Visit Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["visits"],"summary":"Delete Visit","operationId":"delete_visit_api_contacts__contact_id__visits__visit_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"visit_id","in":"path","required":true,"schema":{"type":"integer","title":"Visit Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/visits":{"get":{"tags":["visits"],"summary":"List All Visits","operationId":"list_all_visits_api_visits_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VisitOut"},"title":"Response List All Visits Api Visits Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["visits"],"summary":"Create Visit","operationId":"create_visit_api_visits_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/visits/summary":{"get":{"tags":["visits"],"summary":"Visits Summary","description":"fixes38 §1.2/§1.3: \"Summary of Visits\" report + per-contact Visit\nSummary — total count + per-category breakdown, scoped to the caller's\nassigned contacts unless a specific contact is requested or the caller\nopted into `scope_all`.\n\nfixes39 §2: the breakdown is dynamic — every active\nentity_type=\"visit\" boolean custom field (the 6 former Mivtzoim columns\nplus any org-added checklist item, e.g. \"mezuzah\"), not a fixed tuple.\n\nfixes40 §3: `assigned_user_id` scopes to one specific user's contacts\n(the \"Filter by contact owner\" control) — takes priority over\n`scope_all`/the default self-scoping, but only for a non-shliach caller.\nA shliach account is never allowed to self-serve another user's data\nthrough this param — same guarantee the default branch already gave\nthem (they only ever fell into the self-scoping \"else\" below), just\nmade explicit now that a second, caller-suppliable scoping path exists.\n\nfixes50 §3.1: `date_from`/`date_to` are optional — omitting either side\nleaves that end of the range open (the \"show all dates\" control sends\nneither). fixes50 §3.2: `scope_all` is no longer admin-exclusive — any\nnon-shliach caller may request it, same guard `assigned_user_id` already\nused above; a shliach is still always confined to their own contacts.","operationId":"visits_summary_api_visits_summary_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"}},{"name":"assigned_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned User Id"}},{"name":"scope_all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Scope All"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitSummaryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/visits/{visit_id}":{"patch":{"tags":["visits"],"summary":"Update Any Visit","operationId":"update_any_visit_api_visits__visit_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"visit_id","in":"path","required":true,"schema":{"type":"integer","title":"Visit Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["visits"],"summary":"Update Any Visit","operationId":"update_any_visit_api_visits__visit_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"visit_id","in":"path","required":true,"schema":{"type":"integer","title":"Visit Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["visits"],"summary":"Delete Any Visit","operationId":"delete_any_visit_api_visits__visit_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"visit_id","in":"path","required":true,"schema":{"type":"integer","title":"Visit Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/visits/{visit_id}/custom-fields":{"get":{"tags":["visits"],"summary":"Get Visit Custom Fields","operationId":"get_visit_custom_fields_api_visits__visit_id__custom_fields_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"visit_id","in":"path","required":true,"schema":{"type":"integer","title":"Visit Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactCustomFieldOut"},"title":"Response Get Visit Custom Fields Api Visits  Visit Id  Custom Fields Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["visits"],"summary":"Set Visit Custom Fields","operationId":"set_visit_custom_fields_api_visits__visit_id__custom_fields_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"visit_id","in":"path","required":true,"schema":{"type":"integer","title":"Visit Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldValueIn"},"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactCustomFieldOut"},"title":"Response Set Visit Custom Fields Api Visits  Visit Id  Custom Fields Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/donations":{"get":{"tags":["donations"],"summary":"List Donations","operationId":"list_donations_api_donations_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DonationOut"},"title":"Response List Donations Api Donations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["donations"],"summary":"Create Donation","operationId":"create_donation_api_donations_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/donations/{donation_id}":{"put":{"tags":["donations"],"summary":"Update Donation","operationId":"update_donation_api_donations__donation_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"donation_id","in":"path","required":true,"schema":{"type":"integer","title":"Donation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["donations"],"summary":"Delete Donation","operationId":"delete_donation_api_donations__donation_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"donation_id","in":"path","required":true,"schema":{"type":"integer","title":"Donation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/donors":{"get":{"tags":["donors"],"summary":"List Donors","operationId":"list_donors_api_donors_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"potential","in":"query","required":true,"schema":{"type":"boolean","title":"Potential"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"campaign_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DonorRow"},"title":"Response List Donors Api Donors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/donors/campaigns":{"get":{"tags":["donors"],"summary":"Campaign Options","description":"The org's campaigns for the donor campaign picker (the emissary role\ncan't reach /api/campaigns itself).","operationId":"campaign_options_api_donors_campaigns_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CampaignOption"},"type":"array","title":"Response Campaign Options Api Donors Campaigns Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/donors/contact/{contact_id}":{"get":{"tags":["donors"],"summary":"Get Donor","operationId":"get_donor_api_donors_contact__contact_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DonorOut"},{"type":"null"}],"title":"Response Get Donor Api Donors Contact  Contact Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["donors"],"summary":"Upsert Donor","operationId":"upsert_donor_api_donors_contact__contact_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonorIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["donors"],"summary":"Remove Donor","operationId":"remove_donor_api_donors_contact__contact_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/uploads/cloudinary-signature":{"get":{"tags":["uploads"],"summary":"Cloudinary Signature","description":"Return the params the browser needs for a signed Cloudinary upload.\n\nThe client must echo `timestamp` and `folder` back to Cloudinary verbatim,\nalong with `api_key` and `signature`, or the signature won't validate.","operationId":"cloudinary_signature_api_uploads_cloudinary_signature_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Cloudinary Signature Api Uploads Cloudinary Signature Get"}}}}}}},"/api/uploads/logo":{"post":{"tags":["uploads"],"summary":"Upload Logo","description":"Receive an image file and return a URL for it. Cloudinary first (when\nconfigured), the backend's local static uploads directory as the fallback\n(fixes25 §6 — broken/missing Cloudinary must not block branding).\n\nPublic on purpose: the org logo is chosen during signup, before there's a JWT.","operationId":"upload_logo_api_uploads_logo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_logo_api_uploads_logo_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Upload Logo Api Uploads Logo Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/uploads/announcement-images":{"get":{"tags":["uploads"],"summary":"List Announcement Images","description":"Gallery of previously-uploaded announcement images, scoped to the\ncaller's own org (via `require_admin` — never trusts a client-supplied\norg id).","operationId":"list_announcement_images_api_uploads_announcement_images_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Announcement Images Api Uploads Announcement Images Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/uploads/announcement-image":{"post":{"tags":["uploads"],"summary":"Upload Announcement Image","description":"Upload one image into the caller's own org folder. Admin-only (unlike\n/logo, this always has an authenticated org to scope to).","operationId":"upload_announcement_image_api_uploads_announcement_image_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_announcement_image_api_uploads_announcement_image_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Upload Announcement Image Api Uploads Announcement Image Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/uploads/gallery-image":{"post":{"tags":["uploads"],"summary":"Upload Gallery Image","description":"fixes65 §1: one photo for the org's public landing-page gallery —\nsame admin-only, org-scoped storage as announcement images, own folder.","operationId":"upload_gallery_image_api_uploads_gallery_image_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_gallery_image_api_uploads_gallery_image_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Upload Gallery Image Api Uploads Gallery Image Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/uploads/gallery-image-url":{"post":{"tags":["uploads"],"summary":"Upload Gallery Image Url","description":"fixes110: import a gallery photo from an external URL — downloaded\nserver-side (SSRF-guarded, same type/size allowlist as a file upload) and\npushed through the same Cloudinary/local pipeline as /gallery-image, so\nthe gallery stores our own URLs and never hotlinks the source site.","operationId":"upload_gallery_image_url_api_uploads_gallery_image_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GalleryImageUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Upload Gallery Image Url Api Uploads Gallery Image Url Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/test-email":{"post":{"tags":["admin"],"summary":"Test Email","description":"Send a real test email and report the exact outcome + SMTP config.\n\nLets us trigger a send on prod and see success or the precise exception,\ninstead of guessing from logs. Returns no secrets (password length only).","operationId":"test_email_api_admin_test_email_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"to","in":"query","required":true,"schema":{"type":"string","title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Test Email Api Admin Test Email Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/organizations":{"get":{"tags":["admin"],"summary":"List Organizations","operationId":"list_organizations_api_admin_organizations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AdminOrganizationOut"},"type":"array","title":"Response List Organizations Api Admin Organizations Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["admin"],"summary":"Create Organization","description":"Provision an org + its admin directly (already active & verified).\n\nNo email verification / Google needed — the superadmin sets the credentials.\nfixes14: the admin email may already exist in *other* organizations (email\nis unique per org, and the login flow offers an org selection).","operationId":"create_organization_api_admin_organizations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrgCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/organizations/{org_id}/clone":{"post":{"tags":["admin"],"summary":"Clone Organization Endpoint","description":"Copy an org's entire CRM data set into a brand-new organization, with\na fresh admin login the caller supplies — for sample/demo/sandbox copies.\nThe source org is never modified. See app.core.org_clone for exactly\nwhat's copied and how references are rewired.","operationId":"clone_organization_endpoint_api_admin_organizations__org_id__clone_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrgCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneResultOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/organizations/{org_id}/clone-plan":{"post":{"tags":["admin"],"summary":"Clone Plan Endpoint","description":"fixes87: preview a demo clone (nothing is written) — the activists\nwith tasks whose task apartments come closest to the target. The\nsuperadmin approves, then /clone receives exactly these user ids.","operationId":"clone_plan_endpoint_api_admin_organizations__org_id__clone_plan_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClonePlanIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClonePlanOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/organizations/{org_id}":{"get":{"tags":["admin"],"summary":"Get Organization","operationId":"get_organization_api_admin_organizations__org_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Organization","operationId":"delete_organization_api_admin_organizations__org_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/organizations/{org_id}/prefs":{"get":{"tags":["admin"],"summary":"Get Organization Prefs","description":"fixes54 §8: the org's feature-toggle state — see OrgPrefsOut for the\nraw-vs-effective (cascaded) distinction.","operationId":"get_organization_prefs_api_admin_organizations__org_id__prefs_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgPrefsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Update Organization Prefs","operationId":"update_organization_prefs_api_admin_organizations__org_id__prefs_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgPrefsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgPrefsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/organizations/{org_id}/users":{"get":{"tags":["admin"],"summary":"List Organization Users","operationId":"list_organization_users_api_admin_organizations__org_id__users_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserOut"},"title":"Response List Organization Users Api Admin Organizations  Org Id  Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/organizations/{org_id}/deactivate":{"post":{"tags":["admin"],"summary":"Deactivate Organization","operationId":"deactivate_organization_api_admin_organizations__org_id__deactivate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/organizations/{org_id}/activate":{"post":{"tags":["admin"],"summary":"Activate Organization","operationId":"activate_organization_api_admin_organizations__org_id__activate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/organizations/{org_id}/impersonate":{"post":{"tags":["admin"],"summary":"Impersonate Organization","description":"Issue an access token for the org's admin, so support can view its data.","operationId":"impersonate_organization_api_admin_organizations__org_id__impersonate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users":{"get":{"tags":["admin"],"summary":"List Users","operationId":"list_users_api_admin_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AdminUserOut"},"type":"array","title":"Response List Users Api Admin Users Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/users/{user_id}/dependencies":{"get":{"tags":["admin"],"summary":"User Dependencies","description":"Everything still tied to a user (fixes15 §2.2) — surfaced in the\ndelete-confirm modal so a shliach's data ties are visible before deleting.","operationId":"user_dependencies_api_admin_users__user_id__dependencies_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserDependenciesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}":{"delete":{"tags":["admin"],"summary":"Delete User","operationId":"delete_user_api_admin_users__user_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/deactivate":{"post":{"tags":["admin"],"summary":"Deactivate User","operationId":"deactivate_user_api_admin_users__user_id__deactivate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/activate":{"post":{"tags":["admin"],"summary":"Activate User","operationId":"activate_user_api_admin_users__user_id__activate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/reset-password":{"post":{"tags":["admin"],"summary":"Reset User Password","description":"fixes75 §3: the superadmin sets a new password for any (non-superadmin)\nuser. Same strength rule as the user's own change-password.","operationId":"reset_user_password_api_admin_users__user_id__reset_password_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPasswordReset"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/verify":{"post":{"tags":["admin"],"summary":"Verify User","description":"Manually mark a user's email verified + active (bypasses the email link).","operationId":"verify_user_api_admin_users__user_id__verify_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/organizations/{org_id}/approve":{"post":{"tags":["admin"],"summary":"Approve Organization","description":"Approve a pending org: activate it, provision its picklists, and email\nthe org admin the 'approved' notice with a login link.","operationId":"approve_organization_api_admin_organizations__org_id__approve_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/email-templates":{"get":{"tags":["admin"],"summary":"List Email Templates","operationId":"list_email_templates_api_admin_email_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EmailTemplateOut"},"type":"array","title":"Response List Email Templates Api Admin Email Templates Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/email-templates/{key}":{"put":{"tags":["admin"],"summary":"Update Email Template","operationId":"update_email_template_api_admin_email_templates__key__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/system-settings":{"get":{"tags":["admin"],"summary":"Get System Settings","operationId":"get_system_settings_api_admin_system_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemConfigOut"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["admin"],"summary":"Update System Settings","operationId":"update_system_settings_api_admin_system_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemConfigUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/notify-emails-status":{"get":{"tags":["admin"],"summary":"Notify Emails Status","description":"fixes101 §1/§3: per list, whether the superadmin configured it and\nwhere mail actually goes right now (the env fallback when empty) — drives\nthe \"not configured\" banner and each card's \"currently sent to\" line.","operationId":"notify_emails_status_api_admin_notify_emails_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Notify Emails Status Api Admin Notify Emails Status Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/pending-signup-emails":{"get":{"tags":["admin"],"summary":"Get Pending Signup Notify Emails","operationId":"get_pending_signup_notify_emails_api_admin_pending_signup_emails_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyEmails"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["admin"],"summary":"Update Pending Signup Notify Emails","operationId":"update_pending_signup_notify_emails_api_admin_pending_signup_emails_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyEmails"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyEmails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/error-notify-emails":{"get":{"tags":["admin"],"summary":"Get Error Notify Emails","operationId":"get_error_notify_emails_api_admin_error_notify_emails_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyEmails"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["admin"],"summary":"Update Error Notify Emails","operationId":"update_error_notify_emails_api_admin_error_notify_emails_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyEmails"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyEmails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/backups":{"get":{"tags":["backups"],"summary":"List Backups","operationId":"list_backups_api_backups_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BackupOut"},"type":"array","title":"Response List Backups Api Backups Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["backups"],"summary":"Create Backup","description":"Create a restore point of the data as it is right now.","operationId":"create_backup_api_backups_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/backups/{backup_id}/restore":{"post":{"tags":["backups"],"summary":"Restore Backup","description":"Replace the org's CRM data with this restore point — one transaction,\nall-or-nothing. A safety snapshot of the current state is created first so\nthe restore itself can be undone. (If the org is at the retention limit,\nthat safety snapshot may prune the oldest point — possibly the one being\nrestored; its data is already loaded, so the restore still completes.)","operationId":"restore_backup_api_backups__backup_id__restore_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"backup_id","in":"path","required":true,"schema":{"type":"integer","title":"Backup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupRestoreResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/backups/{backup_id}/download":{"get":{"tags":["backups"],"summary":"Download Backup","description":"The restore point as a readable JSON file (fixes16 §1 nice-to-have).","operationId":"download_backup_api_backups__backup_id__download_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"backup_id","in":"path","required":true,"schema":{"type":"integer","title":"Backup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/preferences":{"get":{"tags":["preferences"],"summary":"List Preferences","operationId":"list_preferences_api_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Preferences Api Preferences Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["preferences"],"summary":"Set Preference","description":"Upsert one preference; returns the user's full preference map.","operationId":"set_preference_api_preferences_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Preference Api Preferences Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/search":{"get":{"tags":["search"],"summary":"Global Search","operationId":"global_search_api_search_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai/query":{"post":{"tags":["ai"],"summary":"Query","operationId":"query_api_ai_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/assistant/proposals":{"post":{"tags":["assistant"],"summary":"Create Proposal","operationId":"create_proposal_api_assistant_proposals_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/assistant/proposals/{proposal_id}/confirm":{"post":{"tags":["assistant"],"summary":"Confirm Proposal","operationId":"confirm_proposal_api_assistant_proposals__proposal_id__confirm_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","title":"Proposal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/assistant/apartments/search":{"get":{"tags":["assistant"],"summary":"Search Apartments","operationId":"search_apartments_api_assistant_apartments_search_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/assistant/apartments/getapartment":{"get":{"tags":["assistant"],"summary":"Get Apartment","operationId":"get_apartment_api_assistant_apartments_getapartment_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/assistant/apartments/by-lineage/{lineage_id}":{"get":{"tags":["assistant"],"summary":"Get By Lineage","operationId":"get_by_lineage_api_assistant_apartments_by_lineage__lineage_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"lineage_id","in":"path","required":true,"schema":{"type":"integer","title":"Lineage Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/assistant/apartments/{apartment_id}/update":{"post":{"tags":["assistant"],"summary":"Update Apartment Field","operationId":"update_apartment_field_api_assistant_apartments__apartment_id__update_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"apartment_id","in":"path","required":true,"schema":{"type":"integer","title":"Apartment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldUpdateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/assistant/search":{"get":{"tags":["assistant"],"summary":"Assistant Search","operationId":"assistant_search_api_assistant_search_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/assistant/contacts/{contact_id}":{"get":{"tags":["assistant"],"summary":"Get Contact","operationId":"get_contact_api_assistant_contacts__contact_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/assistant/contacts/{contact_id}/update":{"post":{"tags":["assistant"],"summary":"Update Contact Field","operationId":"update_contact_field_api_assistant_contacts__contact_id__update_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldUpdateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/assistant/contacts/{contact_id}/visits":{"post":{"tags":["assistant"],"summary":"Add Visit","operationId":"add_visit_api_assistant_contacts__contact_id__visits_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__assistant_contacts__VisitIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns":{"get":{"tags":["campaigns"],"summary":"List Campaigns","operationId":"list_campaigns_api_campaigns_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignOut"},"title":"Response List Campaigns Api Campaigns Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["campaigns"],"summary":"Create Campaign","operationId":"create_campaign_api_campaigns_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/active-stats":{"get":{"tags":["campaigns"],"summary":"Campaign Active Stats","description":"fixes58 §3.2/Phase 6: the activist homepage's dynamic stat tiles — one\nper active campaign, `count` = distinct report numbers currently linked\nto an ACTIVE task under that campaign.","operationId":"campaign_active_stats_api_campaigns_active_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CampaignActiveStat"},"type":"array","title":"Response Campaign Active Stats Api Campaigns Active Stats Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/campaigns/active":{"get":{"tags":["campaigns"],"summary":"Get Active Campaign","description":"fixes71 §B/§C: the org's one active campaign (or None), plus which\napartment fields it hides — what street2 shows an activist. Open to any\nauthenticated user (activists included), unlike the rest of this router.\nDeclared before /{campaign_id} so \"active\" is never coerced into that\nint path param (same reason /active-stats already precedes it).","operationId":"get_active_campaign_api_campaigns_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CampaignActiveOut"},{"type":"null"}],"title":"Response Get Active Campaign Api Campaigns Active Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/campaigns/{campaign_id}":{"get":{"tags":["campaigns"],"summary":"Get Campaign","operationId":"get_campaign_api_campaigns__campaign_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["campaigns"],"summary":"Update Campaign","operationId":"update_campaign_api_campaigns__campaign_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["campaigns"],"summary":"Delete Campaign","operationId":"delete_campaign_api_campaigns__campaign_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/field-visibility":{"get":{"tags":["campaigns"],"summary":"List Campaign Field Visibility","description":"fixes71 §B.5/§B.6: the full apartment field catalog with this\ncampaign's visibility for each — mirrors field_settings.py's\nlist_field_settings shape, apartment-only, campaign-keyed.","operationId":"list_campaign_field_visibility_api_campaigns__campaign_id__field_visibility_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignFieldVisibilityOut"},"title":"Response List Campaign Field Visibility Api Campaigns  Campaign Id  Field Visibility Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["campaigns"],"summary":"Set Campaign Field Visibility","description":"Show/hide a single apartment field for this campaign (autosave,\nmirrors field_settings.py's set_field_setting). Upserts the campaign's row.","operationId":"set_campaign_field_visibility_api_campaigns__campaign_id__field_visibility_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignFieldVisibilityUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignFieldVisibilityOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/building-completions":{"post":{"tags":["campaigns"],"summary":"Complete Building","description":"fixes72 §A: an activist's own street2 completion write — idempotent\nupsert (re-POSTing an already-completed building just returns the\nexisting row). Open to any authenticated user, unlike the rest of this\nrouter — this is the activist's own action, not an admin operation.","operationId":"complete_building_api_campaigns__campaign_id__building_completions_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignBuildingCompletionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignBuildingCompletionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["campaigns"],"summary":"List Building Completions","description":"fixes72 §A: open to any authenticated user — street2 reads this on\nload to know which buildings to hide, and the campaign admin page reads\nthe exact same list to render the undo table. One endpoint, two\nconsumers.\n\nfixes139: an activist gets only the completions that hide buildings for\n*them* (`_counts_for`); so does an admin/campaign manager viewing an\nactivist's street2 (`as_user_id`). The admin's undo table still gets all.","operationId":"list_building_completions_api_campaigns__campaign_id__building_completions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"as_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"As User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignBuildingCompletionOut"},"title":"Response List Building Completions Api Campaigns  Campaign Id  Building Completions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/building-completions/{building_id}":{"delete":{"tags":["campaigns"],"summary":"Undo Building Completion","description":"fixes72 §A: the admin undo — deletes the row, the building reappears\non street2 for this campaign immediately (on its next load).","operationId":"undo_building_completion_api_campaigns__campaign_id__building_completions__building_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"building_id","in":"path","required":true,"schema":{"type":"integer","title":"Building Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{campaign_id}/history":{"get":{"tags":["campaigns"],"summary":"Get Campaign History","description":"fixes72 §B: per-campaign change history, computed at read time from\nthe Apartment version chain (see app/campaign_history.py) — what\nactually changed, per field, during this campaign.","operationId":"get_campaign_history_api_campaigns__campaign_id__history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignHistoryPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/list":{"get":{"tags":["tasks"],"summary":"List Tasks","operationId":"list_tasks_api_tasks_list_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Status"}},{"name":"campaign_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Campaign Id"}},{"name":"assignment","in":"query","required":false,"schema":{"anyOf":[{"enum":["orphan","assigned"],"type":"string"},{"type":"null"}],"title":"Assignment"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"picklist","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Picklist"}},{"name":"custom_field_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Filter"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"created_at","title":"Sort"}},{"name":"dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Dir"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskPageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/map":{"get":{"tags":["tasks"],"summary":"Task Map","description":"fixes96: buildings to show on a Google map + the polygons of their areas.\n\n- no task_id (activist): every building the activist can work in — the\n  SAME apartments street2 shows (active tasks under an active campaign,\n  plus area coverage: apartments._shliach_apartment_ids) — each with the\n  task numbers that cover it;\n- task_id (admin / campaign manager, or that task's own activist): the\n  buildings of that one task.\nDefined before the /{task_id} routes so \"map\" isn't read as a task id.","operationId":"task_map_api_tasks_map_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Task Map Api Tasks Map Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks":{"post":{"tags":["tasks"],"summary":"Create Task","operationId":"create_task_api_tasks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/tasks/bulk/preview":{"post":{"tags":["tasks"],"summary":"Preview Bulk Tasks","description":"fixes74 §3: the numbers a bulk create would use — eligible, already in\na task of this campaign (conflicts), and range numbers that aren't report\nnumbers at all (skipped). Range numbers match report numbers by name, so\n\"10-40\" finds \"10\"..\"40\".","operationId":"preview_bulk_tasks_api_tasks_bulk_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskBulkPreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskBulkPreviewOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/tasks/bulk":{"post":{"tags":["tasks"],"summary":"Create Bulk Tasks","description":"fixes74 §3: one separate task per report number, in one transaction.\nConflicts are re-checked here (not trusted from the preview): without\n`skip_conflicts` any conflict refuses the whole batch.","operationId":"create_bulk_tasks_api_tasks_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskBulkCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskBulkCreateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/tasks/{task_id}":{"put":{"tags":["tasks"],"summary":"Update Task","operationId":"update_task_api_tasks__task_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tasks"],"summary":"Delete Task","operationId":"delete_task_api_tasks__task_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tasks"],"summary":"Get Task","description":"fixes65 §6: a single task (the paper-entry page's header).","operationId":"get_task_api_tasks__task_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/{task_id}/unassign":{"post":{"tags":["tasks"],"summary":"Unassign Task","description":"Spec §4 admin override: back to the orphan pool. The claim token is\nderived from the task's guid, so existing printouts stay valid for the\nnext person who scans them.","operationId":"unassign_task_api_tasks__task_id__unassign_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/claim/{token}":{"post":{"tags":["tasks"],"summary":"Claim Task","description":"Spec §4: a signed-in user scanned an orphan task's QR. Returns\n`claimed` (now theirs), `yours` (already was), `taken` (another activist\nor the office has it) or `invalid` (bad/expired link, or another org's).\nOnly activists (role shliach) can take a task; anyone else gets the\ncurrent state back with an explanatory `detail`.","operationId":"claim_task_api_tasks_claim__token__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimResultOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/{task_id}/print-data":{"get":{"tags":["tasks"],"summary":"Task Print Data","description":"Spec §3: everything the client-side PDF needs — the task, its\napartments (grouped/sorted client-side like the apartments report) and\nthe signed task token for the QR. fixes66 §1: every sheet gets it, not\nonly unassigned ones — on an assigned task the same link is the\nactivist's way into the system (the claim page offers sign-in).","operationId":"task_print_data_api_tasks__task_id__print_data_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskPrintOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/{task_id}/paper-entries":{"get":{"tags":["tasks"],"summary":"List Paper Entries","operationId":"list_paper_entries_api_tasks__task_id__paper_entries_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaperEntryOut"},"title":"Response List Paper Entries Api Tasks  Task Id  Paper Entries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tasks"],"summary":"Create Paper Entry","description":"Spec §6: the office types in a handwritten task sheet. \"Who performed\nthe work?\" is mandatory — a registered user, a free-text name (logged\nhere only; no account is created) or explicitly unknown. Each changed\napartment goes through the normal versioned update. An orphan task\nleaves the pool: assigned to the registered performer, or locked as\noffice-handled (`claimed_via='paper'`) so its QR shows as taken.","operationId":"create_paper_entry_api_tasks__task_id__paper_entries_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaperEntryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaperEntryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/street-activity/sync":{"post":{"tags":["street-activity"],"summary":"Sync Street Activity","operationId":"sync_street_activity_api_street_activity_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreetActivitySync"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/street-activity/{user_id}":{"get":{"tags":["street-activity"],"summary":"Get Street Activity","operationId":"get_street_activity_api_street_activity__user_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreetActivityOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/orgs/{slug}":{"get":{"tags":["public"],"summary":"Get Public Org","operationId":"get_public_org_api_public_orgs__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOrgOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/claim/{token}":{"get":{"tags":["public"],"summary":"Get Claim Info","operationId":"get_claim_info_api_public_claim__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimInfoOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/register":{"post":{"tags":["public"],"summary":"Register","operationId":"register_api_public_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/register-google":{"post":{"tags":["public"],"summary":"Register Google","operationId":"register_google_api_public_register_google_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicGoogleRegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instinct/ping":{"get":{"tags":["instinct"],"summary":"Ping","operationId":"ping_api_instinct_ping_get","parameters":[{"name":"x-instinct-key","in":"header","required":true,"schema":{"type":"string","title":"X-Instinct-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instinct/contacts":{"post":{"tags":["instinct"],"summary":"Create Contact","operationId":"create_contact_api_instinct_contacts_post","parameters":[{"name":"x-instinct-key","in":"header","required":true,"schema":{"type":"string","title":"X-Instinct-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstinctContactIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["instinct"],"summary":"List Contacts","description":"§6b: compact rows (\"who registered today?\"), newest first.","operationId":"list_contacts_api_instinct_contacts_get","parameters":[{"name":"created_on","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created On"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["active","draft"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"x-instinct-key","in":"header","required":true,"schema":{"type":"string","title":"X-Instinct-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instinct/contacts/search":{"get":{"tags":["instinct"],"summary":"Search Contacts","description":"§1: case-insensitive substring match on the full name, or every word of\n`q` matching the first or last name (so \"Mizrahi Moshe\" finds \"Moshe\nMizrahi\"). Drafts are included by default so the assistant never creates\na duplicate of a contact still pending approval.","operationId":"search_contacts_api_instinct_contacts_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}},{"name":"status","in":"query","required":false,"schema":{"enum":["active","draft","all"],"type":"string","default":"all","title":"Status"}},{"name":"x-instinct-key","in":"header","required":true,"schema":{"type":"string","title":"X-Instinct-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instinct/contacts/{contact_id}/fields":{"patch":{"tags":["instinct"],"summary":"Update Contact Fields","description":"§4: upsert the contact's custom-field values (tefillin / mezuzot\ncounters). Unknown keys are parked in contacts.notes, never a 422.","operationId":"update_contact_fields_api_instinct_contacts__contact_id__fields_patch","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"x-instinct-key","in":"header","required":true,"schema":{"type":"string","title":"X-Instinct-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFieldsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instinct/contacts/{contact_id}/link-apartment":{"post":{"tags":["instinct"],"summary":"Link Apartment","description":"§5d: set contact_mekurav.apartment_id (creating the mekurav row if a\nmekurav contact lacks one).","operationId":"link_apartment_api_instinct_contacts__contact_id__link_apartment_post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"x-instinct-key","in":"header","required":true,"schema":{"type":"string","title":"X-Instinct-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkApartmentIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instinct/visits":{"post":{"tags":["instinct"],"summary":"Create Visit","operationId":"create_visit_api_instinct_visits_post","parameters":[{"name":"x-instinct-key","in":"header","required":true,"schema":{"type":"string","title":"X-Instinct-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__instinct__visits__VisitIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instinct/visits/{visit_id}/followup":{"patch":{"tags":["instinct"],"summary":"Update Followup","operationId":"update_followup_api_instinct_visits__visit_id__followup_patch","parameters":[{"name":"visit_id","in":"path","required":true,"schema":{"type":"integer","title":"Visit Id"}},{"name":"x-instinct-key","in":"header","required":true,"schema":{"type":"string","title":"X-Instinct-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowupIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instinct/apartments/search":{"get":{"tags":["instinct"],"summary":"Search Apartments","operationId":"search_apartments_api_instinct_apartments_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}},{"name":"x-instinct-key","in":"header","required":true,"schema":{"type":"string","title":"X-Instinct-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instinct/apartments":{"post":{"tags":["instinct"],"summary":"Create Apartment","operationId":"create_apartment_api_instinct_apartments_post","parameters":[{"name":"x-instinct-key","in":"header","required":true,"schema":{"type":"string","title":"X-Instinct-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instinct/apartments/{apartment_id}":{"patch":{"tags":["instinct"],"summary":"Update Apartment","operationId":"update_apartment_api_instinct_apartments__apartment_id__patch","parameters":[{"name":"apartment_id","in":"path","required":true,"schema":{"type":"integer","title":"Apartment Id"}},{"name":"x-instinct-key","in":"header","required":true,"schema":{"type":"string","title":"X-Instinct-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApartmentPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instinct/stats/registrations":{"get":{"tags":["instinct"],"summary":"Registrations","operationId":"registrations_api_instinct_stats_registrations_get","parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}},{"name":"x-instinct-key","in":"header","required":true,"schema":{"type":"string","title":"X-Instinct-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/instinct/stats/daily":{"get":{"tags":["instinct"],"summary":"Daily","operationId":"daily_api_instinct_stats_daily_get","parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}},{"name":"x-instinct-key","in":"header","required":true,"schema":{"type":"string","title":"X-Instinct-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/logs/access":{"get":{"tags":["logs"],"summary":"List Access Log","description":"Login attempts, newest first: user, time, IP, outcome.","operationId":"list_access_log_api_logs_access_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Access Log Api Logs Access Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/logs/errors":{"get":{"tags":["logs"],"summary":"List Error Log","description":"Errors (5xx, exceptions, browser crashes) and warnings (4xx answers,\ndropped connections), newest first.","operationId":"list_error_log_api_logs_errors_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"}},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(error|warning)$"},{"type":"null"}],"title":"Level"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(server|browser|logged)$"},{"type":"null"}],"title":"Source"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Error Log Api Logs Errors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/logs/errors/export.csv":{"get":{"tags":["logs"],"summary":"Export Error Log","description":"fixes125: the (filtered) error log as CSV — the Give system's columns,\nplus the organization. Newest first, at most EXPORT_MAX_ROWS rows.","operationId":"export_error_log_api_logs_errors_export_csv_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"}},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(error|warning)$"},{"type":"null"}],"title":"Level"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(server|browser|logged)$"},{"type":"null"}],"title":"Source"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/logs/settings":{"get":{"tags":["logs"],"summary":"Get Log Settings","operationId":"get_log_settings_api_logs_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Log Settings Api Logs Settings Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["logs"],"summary":"Update Log Settings","operationId":"update_log_settings_api_logs_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEmailsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Update Log Settings Api Logs Settings Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/logs/client-error":{"post":{"tags":["logs"],"summary":"Report Client Error","operationId":"report_client_error_api_logs_client_error_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientErrorIn"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/logs/activity":{"get":{"tags":["logs"],"summary":"List Activity Log","description":"Who did what, newest first. Only orgs the superadmin turned the\nlog on for have rows.","operationId":"list_activity_log_api_logs_activity_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(action|page_view)$"},{"type":"null"}],"title":"Kind"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Activity Log Api Logs Activity Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/logs/activity/options":{"get":{"tags":["logs"],"summary":"Activity Log Options","description":"Filter choices: the users and actions that actually appear.","operationId":"activity_log_options_api_logs_activity_options_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Activity Log Options Api Logs Activity Options Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activity/page-view":{"post":{"tags":["activity"],"summary":"Page View","description":"Recorded only if the user's org has the log on; a no-op otherwise\n(the frontend only calls this when the org's flag is on anyway).","operationId":"page_view_api_activity_page_view_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageViewIn"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/health":{"get":{"tags":["health"],"summary":"Health","description":"Liveness probe used by smoke checks.","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Api Health Get"}}}}}}}},"components":{"schemas":{"ActivistMessageCreate":{"properties":{"text":{"type":"string","maxLength":1000,"minLength":1,"title":"Text"},"language":{"type":"string","enum":["he","en"],"title":"Language"}},"type":"object","required":["text","language"],"title":"ActivistMessageCreate"},"ActivistMessageOut":{"properties":{"id":{"type":"integer","title":"Id"},"text":{"type":"string","title":"Text"},"language":{"type":"string","title":"Language"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["id","text","language","sort_order"],"title":"ActivistMessageOut"},"ActivistMessageUpdate":{"properties":{"text":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}],"title":"Text"},"language":{"anyOf":[{"type":"string","enum":["he","en"]},{"type":"null"}],"title":"Language"}},"type":"object","title":"ActivistMessageUpdate"},"ActivistMessagesFeed":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/ActivistMessageOut"},"type":"array","title":"Messages","default":[]},"stats":{"$ref":"#/components/schemas/OrgActivistStatsOut"}},"type":"object","required":["stats"],"title":"ActivistMessagesFeed","description":"What the activist app needs for its celebration popups."},"AdminAreaCreate":{"properties":{"name":{"type":"string","title":"Name"},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments"}},"type":"object","required":["name"],"title":"AdminAreaCreate"},"AdminAreaOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"name":{"type":"string","title":"Name"},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","guid","name"],"title":"AdminAreaOut"},"AdminAreaUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments"}},"type":"object","title":"AdminAreaUpdate"},"AdminOrgCreate":{"properties":{"organization_name":{"type":"string","title":"Organization Name"},"admin_email":{"type":"string","title":"Admin Email"},"admin_full_name":{"type":"string","title":"Admin Full Name"},"admin_username":{"type":"string","title":"Admin Username","default":"admin"},"admin_password":{"type":"string","title":"Admin Password"},"table_row_limits":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Table Row Limits"},"demo_activist_user_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Demo Activist User Ids"},"demo_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Demo Password"}},"type":"object","required":["organization_name","admin_email","admin_full_name","admin_password"],"title":"AdminOrgCreate","description":"Superadmin provisions an org + its (already-verified) admin directly."},"AdminOrganizationOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"approval_status":{"type":"string","title":"Approval Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"user_count":{"type":"integer","title":"User Count"},"admin_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Email"},"admin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Name"},"superadmin_usernames":{"items":{"type":"string"},"type":"array","title":"Superadmin Usernames","default":[]},"is_system":{"type":"boolean","title":"Is System","readOnly":true}},"type":"object","required":["id","guid","name","is_active","approval_status","created_at","user_count","is_system"],"title":"AdminOrganizationOut"},"AdminPasswordReset":{"properties":{"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["new_password"],"title":"AdminPasswordReset"},"AdminUserDependenciesOut":{"properties":{"assigned_contacts":{"type":"integer","title":"Assigned Contacts","default":0},"assigned_tasks":{"type":"integer","title":"Assigned Tasks","default":0},"shliach_contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Shliach Contact Id"},"shliach_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shliach Contact Name"},"covered_report_numbers":{"type":"integer","title":"Covered Report Numbers","default":0},"covered_areas":{"type":"integer","title":"Covered Areas","default":0},"has_dependencies":{"type":"boolean","title":"Has Dependencies","default":false}},"type":"object","title":"AdminUserDependenciesOut","description":"What still points at a user (fixes15 §2.2) — shown in the delete-confirm\nmodal so the superadmin sees the data ties before deleting a shliach."},"AdminUserOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"username":{"type":"string","title":"Username"},"full_name":{"type":"string","title":"Full Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"role":{"type":"string","title":"Role"},"is_active":{"type":"boolean","title":"Is Active"},"email_verified":{"type":"boolean","title":"Email Verified"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"organization_id":{"type":"integer","title":"Organization Id"}},"type":"object","required":["id","guid","username","full_name","role","is_active","email_verified","created_at","organization_id"],"title":"AdminUserOut"},"AiQueryColumn":{"properties":{"key":{"type":"string","title":"Key"},"label_he":{"type":"string","title":"Label He"},"label_en":{"type":"string","title":"Label En"}},"type":"object","required":["key","label_he","label_en"],"title":"AiQueryColumn"},"AiQueryRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"}},"type":"object","required":["prompt"],"title":"AiQueryRequest"},"AiQueryResponse":{"properties":{"table_title":{"type":"string","title":"Table Title"},"columns":{"items":{"$ref":"#/components/schemas/AiQueryColumn"},"type":"array","title":"Columns"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"row_count":{"type":"integer","title":"Row Count"},"truncated":{"type":"boolean","title":"Truncated"}},"type":"object","required":["table_title","columns","rows","row_count","truncated"],"title":"AiQueryResponse"},"ApartmentBatchCreate":{"properties":{"building_id":{"type":"integer","title":"Building Id"},"floor_ids":{"items":{"type":"integer"},"type":"array","title":"Floor Ids"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"}},"type":"object","required":["building_id","floor_ids","labels"],"title":"ApartmentBatchCreate","description":"Bulk generator (fixes7 §5): the Cartesian product of floors × labels."},"ApartmentBatchResult":{"properties":{"created":{"type":"integer","title":"Created"},"skipped":{"type":"integer","title":"Skipped"}},"type":"object","required":["created","skipped"],"title":"ApartmentBatchResult"},"ApartmentBulkChanges":{"properties":{"floor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Floor"},"apartment_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Notes"},"jewish_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jewish Status"},"campaign_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Status"},"mezuzah_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mezuzah Status"},"language":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Language"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"report_number_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Report Number Id"},"picklist_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Picklist Values"},"custom_field_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Custom Field Values"}},"type":"object","title":"ApartmentBulkChanges","description":"fixes52 §2.3: the \"new values\" half of a bulk edit — deliberately the\nsame shape as `ApartmentUpdate` minus `apartment_name`/`building_id` (the\nspec excludes both from bulk editing; leaving them off the schema blocks\na crafted request too, not just the UI). Key presence = \"update this\nfield\" (`model_dump(exclude_unset=True)`, mirrors the single-apartment\nPATCH contract exactly) — an omitted field is left untouched, an explicit\n`null` clears it."},"ApartmentBulkUpdate":{"properties":{"building_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Building Ids"},"area_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Area Ids"},"report_number_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Report Number Ids"},"jewish_status":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Jewish Status"},"mezuzah_status":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mezuzah Status"},"campaign_status":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Campaign Status"},"language":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Language"},"picklist":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Picklist"},"custom_field_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Custom Field Filter"},"q":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"},"changes":{"$ref":"#/components/schemas/ApartmentBulkChanges","default":{}}},"type":"object","title":"ApartmentBulkUpdate","description":"fixes23 §3, expanded fixes52 §2.3: apply a change to every active\napartment matching the page's current filters. The filter block mirrors\nthe /list query params exactly, so \"matching the active filters\" resolves\nto the same rows the grid shows."},"ApartmentBulkUpdateResult":{"properties":{"updated":{"type":"integer","title":"Updated"}},"type":"object","required":["updated"],"title":"ApartmentBulkUpdateResult"},"ApartmentCreate":{"properties":{"building_id":{"type":"integer","title":"Building Id"},"apartment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Name"},"apartment_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Notes"},"floor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Floor"},"jewish_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jewish Status"},"campaign_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Status"},"mezuzah_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mezuzah Status"},"language":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Language"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"report_number_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Report Number Id"},"picklist_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Picklist Values","default":{}},"custom_field_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Custom Field Values","default":{}},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"}},"type":"object","required":["building_id"],"title":"ApartmentCreate"},"ApartmentIn":{"properties":{"apartment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Name"},"floor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Floor"},"resident_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resident Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"building_address":{"type":"string","title":"Building Address"}},"type":"object","required":["building_address"],"title":"ApartmentIn"},"ApartmentListOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"building_id":{"type":"integer","title":"Building Id"},"apartment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Name"},"apartment_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Notes"},"floor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Floor"},"jewish_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jewish Status"},"campaign_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Status"},"mezuzah_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mezuzah Status"},"language":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Language"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"report_number_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Report Number Id"},"picklist_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Picklist Values","default":{}},"custom_field_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Custom Field Values","default":{}},"is_display":{"type":"boolean","title":"Is Display","default":true},"last_edit":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Edit"},"root_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Root Id"},"building_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Name"},"building_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Address"},"area_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Name"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"report_number_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Number Name"},"edited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Edited At"}},"type":"object","required":["id","guid","building_id"],"title":"ApartmentListOut","description":"Apartment enriched with its building/area context + a linked contact (if any)."},"ApartmentOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"building_id":{"type":"integer","title":"Building Id"},"apartment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Name"},"apartment_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Notes"},"floor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Floor"},"jewish_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jewish Status"},"campaign_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Status"},"mezuzah_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mezuzah Status"},"language":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Language"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"report_number_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Report Number Id"},"picklist_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Picklist Values","default":{}},"custom_field_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Custom Field Values","default":{}},"is_display":{"type":"boolean","title":"Is Display","default":true},"last_edit":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Edit"},"root_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Root Id"}},"type":"object","required":["id","guid","building_id"],"title":"ApartmentOut"},"ApartmentPageOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ApartmentListOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_buildings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Buildings"}},"type":"object","required":["items","total","page","page_size"],"title":"ApartmentPageOut","description":"One server-side page of the enriched apartment list (fixes8 §2C)."},"ApartmentPatch":{"properties":{"apartment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Name"},"floor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Floor"},"resident_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resident Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"status":{"anyOf":[{"type":"string","enum":["active","draft"]},{"type":"null"}],"title":"Status"}},"type":"object","title":"ApartmentPatch"},"ApartmentRestoreField":{"properties":{"version_id":{"type":"integer","title":"Version Id"},"field":{"type":"string","title":"Field"}},"type":"object","required":["version_id","field"],"title":"ApartmentRestoreField","description":"Restore one field of the active apartment to a historical version's value\n(fixes22 §2 admin per-field restore)."},"ApartmentRouteItem":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"building_id":{"type":"integer","title":"Building Id"},"apartment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Name"},"apartment_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Notes"},"floor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Floor"},"jewish_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jewish Status"},"campaign_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Status"},"mezuzah_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mezuzah Status"},"language":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Language"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"report_number_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Report Number Id"},"picklist_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Picklist Values","default":{}},"custom_field_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Custom Field Values","default":{}},"is_display":{"type":"boolean","title":"Is Display","default":true},"last_edit":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Edit"},"root_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Root Id"},"building_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Name"},"building_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Address"},"area_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Name"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"report_number_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Number Name"},"edited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Edited At"},"last_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Outcome"},"last_outcome_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Outcome At"}},"type":"object","required":["id","guid","building_id"],"title":"ApartmentRouteItem","description":"One door on an activist's route (GET /api/apartments/my-route).\n\nCarries every field ApartmentListOut does (fixed columns, dynamic\npicklist_values, custom_field_values, linked contact) — an activist\nneeds the same full picture an admin gets on the apartments grid, not a\ntrimmed subset. Pre-sorted server-side (hierarchy: report number ->\nbuilding -> floor -> label); the client never re-sorts."},"ApartmentUpdate":{"properties":{"building_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Building Id"},"apartment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Name"},"apartment_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Notes"},"floor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Floor"},"jewish_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jewish Status"},"campaign_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Status"},"mezuzah_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mezuzah Status"},"language":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Language"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"report_number_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Report Number Id"},"picklist_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Picklist Values"},"custom_field_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Custom Field Values"}},"type":"object","title":"ApartmentUpdate"},"ApartmentVersionOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"building_id":{"type":"integer","title":"Building Id"},"apartment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Name"},"apartment_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Notes"},"floor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Floor"},"jewish_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jewish Status"},"campaign_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Status"},"mezuzah_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mezuzah Status"},"language":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Language"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"report_number_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Report Number Id"},"picklist_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Picklist Values","default":{}},"custom_field_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Custom Field Values","default":{}},"is_display":{"type":"boolean","title":"Is Display","default":true},"last_edit":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Edit"},"root_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Root Id"},"editor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Editor Name"}},"type":"object","required":["id","guid","building_id"],"title":"ApartmentVersionOut","description":"One historical apartment version (admin history view, fixes19 §3):\nthe full snapshot plus who retired it and when."},"AreaCreate":{"properties":{"area_name":{"type":"string","title":"Area Name"},"area_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Notes"},"area_polygon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Polygon"}},"type":"object","required":["area_name"],"title":"AreaCreate"},"AreaOut":{"properties":{"area_name":{"type":"string","title":"Area Name"},"area_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Notes"},"area_polygon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Polygon"},"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"}},"type":"object","required":["area_name","id","guid"],"title":"AreaOut"},"AreaShliachAdd":{"properties":{"contact_id":{"type":"integer","title":"Contact Id"}},"type":"object","required":["contact_id"],"title":"AreaShliachAdd","description":"fixes18 §4.2: assign an existing shliach contact to cover an area."},"AreaUpdate":{"properties":{"area_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Name"},"area_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Notes"},"area_polygon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Polygon"}},"type":"object","title":"AreaUpdate"},"BackupCreate":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"BackupCreate"},"BackupOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"kind":{"type":"string","title":"Kind"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts","default":{}}},"type":"object","required":["id","guid","kind","created_at"],"title":"BackupOut","description":"One restore point (metadata only — the blob never leaves the server\nexcept via the explicit download endpoint)."},"BackupRestoreResult":{"properties":{"restored":{"additionalProperties":{"type":"integer"},"type":"object","title":"Restored"},"safety_backup_id":{"type":"integer","title":"Safety Backup Id"}},"type":"object","required":["restored","safety_backup_id"],"title":"BackupRestoreResult"},"Body_login_api_auth_token_post":{"properties":{"organization_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"},"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_login_api_auth_token_post"},"Body_upload_announcement_image_api_uploads_announcement_image_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_announcement_image_api_uploads_announcement_image_post"},"Body_upload_gallery_image_api_uploads_gallery_image_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_gallery_image_api_uploads_gallery_image_post"},"Body_upload_logo_api_uploads_logo_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_logo_api_uploads_logo_post"},"BuildingAggregate":{"properties":{"building_id":{"type":"integer","title":"Building Id"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["building_id","count"],"title":"BuildingAggregate","description":"fixes30 §1: apartment count per building under the /list filters — the\ngroup-by-building view's header aggregates (filter-scoped, not\npage-scoped)."},"BuildingCreate":{"properties":{"area_id":{"type":"integer","title":"Area Id"},"building_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Name"},"building_address":{"type":"string","title":"Building Address"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"is_town_house":{"type":"boolean","title":"Is Town House","default":false},"floors":{"items":{"type":"string"},"type":"array","title":"Floors"}},"type":"object","required":["area_id","building_address"],"title":"BuildingCreate"},"BuildingListItemOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"area_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Area Id"},"building_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Name"},"building_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Address"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"is_town_house":{"type":"boolean","title":"Is Town House","default":false},"building_type_id":{"type":"string","title":"Building Type Id","default":"building"},"is_townhouse":{"type":"boolean","title":"Is Townhouse","default":false}},"type":"object","required":["id","guid"],"title":"BuildingListItemOut","description":"Lighter `BuildingOut` for the plain, unpaginated `GET /api/buildings`\n(filters/pickers across ~7 pages) — no `floors`. That field was never\nread by any of those callers, but with an org past a few thousand\nbuildings the selectinload + per-building floor arrays made this\nendpoint's payload large enough to be slow/flaky, taking sibling\nparallel requests (areas/report-numbers/picklists) down with it — the\nexact \"all filter boxes empty\" bug this fixes."},"BuildingOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"area_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Area Id"},"building_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Name"},"building_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Address"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"is_town_house":{"type":"boolean","title":"Is Town House","default":false},"building_type_id":{"type":"string","title":"Building Type Id","default":"building"},"floors":{"items":{"$ref":"#/components/schemas/FloorOut"},"type":"array","title":"Floors","default":[]},"is_townhouse":{"type":"boolean","title":"Is Townhouse","default":false}},"type":"object","required":["id","guid"],"title":"BuildingOut"},"BuildingPageOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BuildingOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"BuildingPageOut","description":"One server-side page of the buildings list (fixes12 §3.3)."},"BuildingTypeOut":{"properties":{"id":{"type":"string","title":"Id"},"name_en":{"type":"string","title":"Name En"},"name_he":{"type":"string","title":"Name He"}},"type":"object","required":["id","name_en","name_he"],"title":"BuildingTypeOut"},"BuildingUpdate":{"properties":{"area_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Area Id"},"building_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Name"},"building_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Address"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"is_town_house":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Town House"}},"type":"object","title":"BuildingUpdate"},"CampaignActiveOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"hidden_field_keys":{"items":{"type":"string"},"type":"array","title":"Hidden Field Keys"}},"type":"object","required":["id","name","hidden_field_keys"],"title":"CampaignActiveOut"},"CampaignActiveStat":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"custom_stats_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Stats Text"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["id","name","count"],"title":"CampaignActiveStat","description":"fixes58 §3.2: one active campaign's homepage tile — `count` is the\nnumber of distinct report numbers currently under that campaign's active\ntasks, org-wide, with `custom_stats_text`'s `{{count}}` tag substituted\nclient-side."},"CampaignBuildingCompletionCreate":{"properties":{"building_id":{"type":"integer","title":"Building Id"}},"type":"object","required":["building_id"],"title":"CampaignBuildingCompletionCreate"},"CampaignBuildingCompletionOut":{"properties":{"building_id":{"type":"integer","title":"Building Id"},"building_label":{"type":"string","title":"Building Label"},"completed_at":{"type":"string","format":"date-time","title":"Completed At"},"completed_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed By Name"}},"type":"object","required":["building_id","building_label","completed_at"],"title":"CampaignBuildingCompletionOut"},"CampaignCreate":{"properties":{"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active","default":false},"custom_stats_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Stats Text"}},"type":"object","required":["name"],"title":"CampaignCreate"},"CampaignFieldVisibilityOut":{"properties":{"field_key":{"type":"string","title":"Field Key"},"label_key":{"type":"string","title":"Label Key"},"entity":{"type":"string","title":"Entity"},"is_visible":{"type":"boolean","title":"Is Visible"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"english_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Label"}},"type":"object","required":["field_key","label_key","entity","is_visible"],"title":"CampaignFieldVisibilityOut"},"CampaignFieldVisibilityUpdate":{"properties":{"field_key":{"type":"string","title":"Field Key"},"is_visible":{"type":"boolean","title":"Is Visible"}},"type":"object","required":["field_key","is_visible"],"title":"CampaignFieldVisibilityUpdate"},"CampaignHistoryEntry":{"properties":{"apartment_id":{"type":"integer","title":"Apartment Id"},"building_id":{"type":"integer","title":"Building Id"},"building_label":{"type":"string","title":"Building Label"},"event":{"type":"string","enum":["created","edited"],"title":"Event"},"editor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Editor Name"},"changed_at":{"type":"string","format":"date-time","title":"Changed At"},"changes":{"items":{"$ref":"#/components/schemas/CampaignHistoryFieldChange"},"type":"array","title":"Changes"}},"type":"object","required":["apartment_id","building_id","building_label","event","changed_at","changes"],"title":"CampaignHistoryEntry"},"CampaignHistoryFieldChange":{"properties":{"field_key":{"type":"string","title":"Field Key"},"label_key":{"type":"string","title":"Label Key"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"english_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Label"},"field_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Type"},"old_value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Old Value"},"new_value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"New Value"}},"type":"object","required":["field_key","label_key"],"title":"CampaignHistoryFieldChange"},"CampaignHistoryPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CampaignHistoryEntry"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"CampaignHistoryPage"},"CampaignOption":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"CampaignOption"},"CampaignOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"custom_stats_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Stats Text"},"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","guid","name","is_active"],"title":"CampaignOut"},"CampaignUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"custom_stats_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Stats Text"}},"type":"object","title":"CampaignUpdate"},"ChangePasswordRequest":{"properties":{"current_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["new_password"],"title":"ChangePasswordRequest"},"ClaimInfoOut":{"properties":{"state":{"type":"string","enum":["available","claimed","yours","taken","invalid"],"title":"State"},"organization_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"organization_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Slug"},"organization_logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Logo Url"},"campaign_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Name"},"report_number_names":{"items":{"type":"string"},"type":"array","title":"Report Number Names","default":[]},"apartment_count":{"type":"integer","title":"Apartment Count","default":0},"has_activist":{"type":"boolean","title":"Has Activist","default":false}},"type":"object","required":["state"],"title":"ClaimInfoOut"},"ClaimResultOut":{"properties":{"state":{"type":"string","enum":["available","claimed","yours","taken","invalid"],"title":"State"},"task_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Task Id"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["state"],"title":"ClaimResultOut"},"ClientErrorIn":{"properties":{"error_type":{"type":"string","maxLength":200,"title":"Error Type","default":"Error"},"message":{"type":"string","maxLength":4000,"title":"Message","default":""},"stack":{"type":"string","maxLength":20000,"title":"Stack","default":""},"page":{"type":"string","maxLength":500,"title":"Page","default":""},"user_agent":{"type":"string","maxLength":500,"title":"User Agent","default":""},"level":{"type":"string","pattern":"^(error|warning)$","title":"Level","default":"error"}},"type":"object","title":"ClientErrorIn"},"ClonePlanActivist":{"properties":{"user_id":{"type":"integer","title":"User Id"},"full_name":{"type":"string","title":"Full Name"},"task_count":{"type":"integer","title":"Task Count"},"apartment_count":{"type":"integer","title":"Apartment Count"}},"type":"object","required":["user_id","full_name","task_count","apartment_count"],"title":"ClonePlanActivist"},"ClonePlanIn":{"properties":{"activist_count":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Activist Count"},"apartment_target":{"type":"integer","minimum":0.0,"title":"Apartment Target"}},"type":"object","required":["activist_count","apartment_target"],"title":"ClonePlanIn","description":"fixes87: preview a demo clone — N activists (with tasks) whose task\napartments come closest to `apartment_target`."},"ClonePlanOut":{"properties":{"available_activists":{"type":"integer","title":"Available Activists"},"activists":{"items":{"$ref":"#/components/schemas/ClonePlanActivist"},"type":"array","title":"Activists"},"apartment_count":{"type":"integer","title":"Apartment Count"},"building_count":{"type":"integer","title":"Building Count"}},"type":"object","required":["available_activists","activists","apartment_count","building_count"],"title":"ClonePlanOut"},"CloneResultOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"approval_status":{"type":"string","title":"Approval Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"user_count":{"type":"integer","title":"User Count"},"admin_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Email"},"admin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Name"},"superadmin_usernames":{"items":{"type":"string"},"type":"array","title":"Superadmin Usernames","default":[]},"clone_activists":{"type":"integer","title":"Clone Activists","default":0},"clone_apartments":{"type":"integer","title":"Clone Apartments","default":0},"clone_tasks":{"type":"integer","title":"Clone Tasks","default":0},"demo_logins":{"items":{"$ref":"#/components/schemas/DemoLogin"},"type":"array","title":"Demo Logins","default":[]},"is_system":{"type":"boolean","title":"Is System","readOnly":true}},"type":"object","required":["id","guid","name","is_active","approval_status","created_at","user_count","is_system"],"title":"CloneResultOut","description":"fixes87: the new org + what the clone actually produced."},"ConfirmIn":{"properties":{"payload_hash":{"type":"string","title":"Payload Hash"},"fields":{"anyOf":[{"$ref":"#/components/schemas/ContactDraftFields"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["payload_hash"],"title":"ConfirmIn"},"ContactBulkUpdate":{"properties":{"pipeline_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Status"},"contact_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Type"},"assigned_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned User Id"},"q":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"},"area_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Area Ids"},"building_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Building Ids"},"has_mitzvot":{"type":"boolean","title":"Has Mitzvot","default":false},"tzedaka_potential":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tzedaka Potential"},"admin_area_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Admin Area Ids"},"visit_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Visit From"},"visit_to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Visit To"},"torah_thought":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Torah Thought"},"connection_to_rebbe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection To Rebbe"},"custom_fields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Custom Fields"},"picklist":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Picklist"},"new_assigned_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Assigned User Id"}},"type":"object","title":"ContactBulkUpdate","description":"fixes43 §1: reassign \"Assigned To\" on every contact matching the page's\ncurrent filters. The filter block mirrors GET /api/contacts/list, so \"all\ncontacts currently matching the active filters\" resolves to the exact\nsame rows the user sees. `set_assigned_user_id` disambiguates \"leave\nunchanged\" from \"clear to unassigned\" (same pattern as ApartmentBulkUpdate)."},"ContactBulkUpdateResult":{"properties":{"updated":{"type":"integer","title":"Updated"}},"type":"object","required":["updated"],"title":"ContactBulkUpdateResult"},"ContactCreate":{"properties":{"name":{"type":"string","title":"Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"contact_type":{"type":"string","enum":["mekurav","shliach","donor"],"title":"Contact Type","default":"mekurav"},"assigned_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned User Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"pipeline_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Status"},"color_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Tag"},"priority_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority Score"},"mekurav":{"anyOf":[{"$ref":"#/components/schemas/MekuravData"},{"type":"null"}]},"shliach":{"anyOf":[{"$ref":"#/components/schemas/ShliachData"},{"type":"null"}]},"picklist_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Picklist Values","default":{}},"custom_field_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Custom Field Values","default":{}}},"type":"object","required":["name"],"title":"ContactCreate"},"ContactCustomFieldOut":{"properties":{"definition_id":{"type":"integer","title":"Definition Id"},"field_key":{"type":"string","title":"Field Key"},"hebrew_label":{"type":"string","title":"Hebrew Label"},"checked":{"type":"boolean","title":"Checked"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["definition_id","field_key","hebrew_label","checked"],"title":"ContactCustomFieldOut","description":"A custom field merged with a visit's value (for display/editing).\n\nfixes25: values attach to visits (the name is kept for wire compatibility)."},"ContactDetailOut":{"properties":{"name":{"type":"string","title":"Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"contact_type":{"type":"string","enum":["mekurav","shliach","donor"],"title":"Contact Type","default":"mekurav"},"assigned_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned User Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"pipeline_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Status"},"color_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Tag"},"priority_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority Score"},"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"source":{"type":"string","title":"Source","default":"crm"},"status":{"type":"string","title":"Status","default":"active"},"building_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Name"},"area_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Name"},"admin_area_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Area Name"},"apartment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Apartment Id"},"admin_area_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Admin Area Id"},"login_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Login Status"},"picklist_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Picklist Values","default":{}},"custom_field_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Custom Field Values","default":{}},"mekurav":{"anyOf":[{"$ref":"#/components/schemas/MekuravOut"},{"type":"null"}]},"shliach":{"anyOf":[{"$ref":"#/components/schemas/ShliachOut"},{"type":"null"}]},"special_dates":{"items":{"$ref":"#/components/schemas/SignificantDateOut"},"type":"array","title":"Special Dates","default":[]}},"type":"object","required":["name","id","guid","created_at","updated_at"],"title":"ContactDetailOut"},"ContactDraftFields":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},"additionalProperties":false,"type":"object","title":"ContactDraftFields"},"ContactFieldsIn":{"properties":{"fields":{"additionalProperties":true,"type":"object","title":"Fields","default":{}},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ContactFieldsIn"},"ContactOut":{"properties":{"name":{"type":"string","title":"Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"contact_type":{"type":"string","enum":["mekurav","shliach","donor"],"title":"Contact Type","default":"mekurav"},"assigned_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned User Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"pipeline_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Status"},"color_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Tag"},"priority_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority Score"},"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"source":{"type":"string","title":"Source","default":"crm"},"status":{"type":"string","title":"Status","default":"active"},"building_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Name"},"area_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Name"},"admin_area_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Area Name"},"apartment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Apartment Id"},"admin_area_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Admin Area Id"},"login_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Login Status"},"picklist_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Picklist Values","default":{}},"custom_field_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Custom Field Values","default":{}}},"type":"object","required":["name","id","guid","created_at","updated_at"],"title":"ContactOut"},"ContactPageOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ContactOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"ContactPageOut","description":"One server-side page of the contacts list (fixes8 §2C pattern)."},"ContactUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"assigned_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned User Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"pipeline_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Status"},"color_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Tag"},"priority_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority Score"},"mekurav":{"anyOf":[{"$ref":"#/components/schemas/MekuravData"},{"type":"null"}]},"shliach":{"anyOf":[{"$ref":"#/components/schemas/ShliachData"},{"type":"null"}]},"picklist_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Picklist Values"},"custom_field_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Custom Field Values"}},"type":"object","title":"ContactUpdate"},"CustomFieldDefinitionCreate":{"properties":{"field_key":{"type":"string","title":"Field Key"},"hebrew_label":{"type":"string","title":"Hebrew Label"},"english_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Label"},"entity_type":{"type":"string","title":"Entity Type","default":"visit"},"field_type":{"type":"string","title":"Field Type","default":"boolean"},"picklist_options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Picklist Options"},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["field_key","hebrew_label"],"title":"CustomFieldDefinitionCreate"},"CustomFieldDefinitionOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"field_key":{"type":"string","title":"Field Key"},"hebrew_label":{"type":"string","title":"Hebrew Label"},"english_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Label"},"entity_type":{"type":"string","title":"Entity Type"},"field_type":{"type":"string","title":"Field Type"},"sort_order":{"type":"integer","title":"Sort Order"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","guid","field_key","hebrew_label","entity_type","field_type","sort_order","is_active"],"title":"CustomFieldDefinitionOut"},"CustomFieldDefinitionUpdate":{"properties":{"hebrew_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hebrew Label"},"english_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Label"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"CustomFieldDefinitionUpdate"},"CustomFieldValueIn":{"properties":{"definition_id":{"type":"integer","title":"Definition Id"},"checked":{"type":"boolean","title":"Checked","default":false},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["definition_id"],"title":"CustomFieldValueIn"},"DashboardActivistActivity":{"properties":{"user_id":{"type":"integer","title":"User Id"},"name":{"type":"string","title":"Name"},"edits":{"type":"integer","title":"Edits"}},"type":"object","required":["user_id","name","edits"],"title":"DashboardActivistActivity"},"DashboardJewishStatusBreakdownItem":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"DashboardJewishStatusBreakdownItem"},"DashboardJewishStatusChange":{"properties":{"apartment_id":{"type":"integer","title":"Apartment Id"},"label":{"type":"string","title":"Label"},"building_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Address"},"old_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Old Value"},"new_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Value"},"changed_at":{"type":"string","format":"date-time","title":"Changed At"},"editor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Editor Name"}},"type":"object","required":["apartment_id","label","changed_at"],"title":"DashboardJewishStatusChange"},"DashboardStat":{"properties":{"value":{"type":"integer","title":"Value"},"previous_value":{"type":"integer","title":"Previous Value"}},"type":"object","required":["value","previous_value"],"title":"DashboardStat"},"DashboardSummaryOut":{"properties":{"range_days":{"type":"integer","title":"Range Days"},"new_contacts":{"$ref":"#/components/schemas/DashboardStat"},"new_apartments":{"$ref":"#/components/schemas/DashboardStat"},"activist_edits":{"$ref":"#/components/schemas/DashboardStat"},"jewish_status_changes":{"$ref":"#/components/schemas/DashboardStat"},"trend":{"items":{"$ref":"#/components/schemas/DashboardTrendPoint"},"type":"array","title":"Trend"},"top_activists":{"items":{"$ref":"#/components/schemas/DashboardActivistActivity"},"type":"array","title":"Top Activists"},"jewish_status_breakdown":{"items":{"$ref":"#/components/schemas/DashboardJewishStatusBreakdownItem"},"type":"array","title":"Jewish Status Breakdown"},"recent_jewish_changes":{"items":{"$ref":"#/components/schemas/DashboardJewishStatusChange"},"type":"array","title":"Recent Jewish Changes"},"contacts_only":{"type":"boolean","title":"Contacts Only","default":false},"no_contacts":{"type":"boolean","title":"No Contacts","default":false}},"type":"object","required":["range_days","new_contacts","new_apartments","activist_edits","jewish_status_changes","trend","top_activists","jewish_status_breakdown","recent_jewish_changes"],"title":"DashboardSummaryOut"},"DashboardTrendPoint":{"properties":{"date":{"type":"string","title":"Date"},"contacts":{"type":"integer","title":"Contacts"},"apartments":{"type":"integer","title":"Apartments"}},"type":"object","required":["date","contacts","apartments"],"title":"DashboardTrendPoint"},"DemoLogin":{"properties":{"username":{"type":"string","title":"Username"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["username"],"title":"DemoLogin"},"DonationCreate":{"properties":{"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"donation_date":{"type":"string","format":"date-time","title":"Donation Date"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"is_ongoing":{"type":"boolean","title":"Is Ongoing","default":false},"number_of_payments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Payments"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_pledge":{"type":"boolean","title":"Is Pledge","default":false},"is_payments":{"type":"boolean","title":"Is Payments","default":false},"donation_location_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Donation Location Text"},"donation_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Donation Location"},"how_paid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"How Paid"},"donation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Donation Status"}},"type":"object","required":["donation_date"],"title":"DonationCreate"},"DonationOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"donation_date":{"type":"string","format":"date-time","title":"Donation Date"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"is_ongoing":{"type":"boolean","title":"Is Ongoing"},"number_of_payments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Payments"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_pledge":{"type":"boolean","title":"Is Pledge","default":false},"is_payments":{"type":"boolean","title":"Is Payments","default":false},"donation_location_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Donation Location Text"},"donation_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Donation Location"},"how_paid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"How Paid"},"donation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Donation Status"}},"type":"object","required":["id","guid","donation_date","is_ongoing"],"title":"DonationOut"},"DonationUpdate":{"properties":{"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"donation_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Donation Date"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"is_ongoing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Ongoing"},"number_of_payments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Payments"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_pledge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Pledge"},"is_payments":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Payments"},"donation_location_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Donation Location Text"},"donation_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Donation Location"},"how_paid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"How Paid"},"donation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Donation Status"}},"type":"object","title":"DonationUpdate"},"DonorIn":{"properties":{"is_potential_donor":{"type":"boolean","title":"Is Potential Donor","default":true},"campaign_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Campaign Id"},"donation_comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Donation Comments"}},"type":"object","title":"DonorIn"},"DonorOut":{"properties":{"contact_id":{"type":"integer","title":"Contact Id"},"is_potential_donor":{"type":"boolean","title":"Is Potential Donor"},"campaign_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Campaign Id"},"campaign_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Name"},"donation_comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Donation Comments"}},"type":"object","required":["contact_id","is_potential_donor"],"title":"DonorOut"},"DonorRow":{"properties":{"contact_id":{"type":"integer","title":"Contact Id"},"is_potential_donor":{"type":"boolean","title":"Is Potential Donor"},"campaign_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Campaign Id"},"campaign_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Name"},"donation_comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Donation Comments"},"name":{"type":"string","title":"Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"donations_count":{"type":"integer","title":"Donations Count","default":0},"donations_total":{"type":"number","title":"Donations Total","default":0.0}},"type":"object","required":["contact_id","is_potential_donor","name"],"title":"DonorRow"},"DoorOutcomeIn":{"properties":{"outcome":{"type":"string","enum":["answered","not_home","jewish","not_jewish","come_back_later"],"title":"Outcome"},"client_uuid":{"type":"string","title":"Client Uuid"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["outcome","client_uuid"],"title":"DoorOutcomeIn"},"DoorOutcomeOut":{"properties":{"id":{"type":"integer","title":"Id"},"apartment_id":{"type":"integer","title":"Apartment Id"},"client_uuid":{"type":"string","title":"Client Uuid"},"outcome":{"type":"string","title":"Outcome"},"visit_date":{"type":"string","format":"date-time","title":"Visit Date"}},"type":"object","required":["id","apartment_id","client_uuid","outcome","visit_date"],"title":"DoorOutcomeOut"},"EmailTemplateOut":{"properties":{"id":{"type":"integer","title":"Id"},"key":{"type":"string","title":"Key"},"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body"},"body_hebrew":{"type":"string","title":"Body Hebrew"}},"type":"object","required":["id","key","subject","body","body_hebrew"],"title":"EmailTemplateOut"},"EmailTemplateUpdate":{"properties":{"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"body_hebrew":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Hebrew"}},"type":"object","title":"EmailTemplateUpdate"},"ErrorEmailsIn":{"properties":{"errors_admin_emails":{"items":{"type":"string"},"type":"array","title":"Errors Admin Emails"}},"type":"object","required":["errors_admin_emails"],"title":"ErrorEmailsIn"},"FieldSettingOut":{"properties":{"field_key":{"type":"string","title":"Field Key"},"label_key":{"type":"string","title":"Label Key"},"entity":{"type":"string","title":"Entity"},"is_visible":{"type":"boolean","title":"Is Visible"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"english_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Label"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","required":["field_key","label_key","entity","is_visible"],"title":"FieldSettingOut"},"FieldSettingUpdate":{"properties":{"field_key":{"type":"string","title":"Field Key"},"is_visible":{"type":"boolean","title":"Is Visible"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","required":["field_key","is_visible"],"title":"FieldSettingUpdate"},"FieldUpdateIn":{"properties":{"field_key":{"type":"string","title":"Field Key"},"value":{"title":"Value"},"request_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Request Id"}},"additionalProperties":false,"type":"object","required":["field_key"],"title":"FieldUpdateIn"},"FloorCreate":{"properties":{"name":{"type":"string","title":"Name"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","required":["name"],"title":"FloorCreate"},"FloorOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"building_id":{"type":"integer","title":"Building Id"},"name":{"type":"string","title":"Name"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["id","guid","building_id","name","sort_order"],"title":"FloorOut"},"FloorUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"FloorUpdate"},"FollowupIn":{"properties":{"followup_done":{"type":"boolean","title":"Followup Done"}},"type":"object","required":["followup_done"],"title":"FollowupIn"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest","description":"fixes75 §7."},"GalleryImageUrlRequest":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"GalleryImageUrlRequest","description":"fixes110: import a public-gallery photo from an external URL — the\nbackend downloads it (SSRF-guarded) and pushes it through the same\nCloudinary/local pipeline as a file upload. The URL itself is validated\nin the router (scheme + SSRF guard)."},"GeneratePolygonResult":{"properties":{"area_id":{"type":"integer","title":"Area Id"},"area_name":{"type":"string","title":"Area Name"},"ok":{"type":"boolean","title":"Ok"},"building_count":{"type":"integer","title":"Building Count"},"skipped_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skipped Reason"}},"type":"object","required":["area_id","area_name","ok","building_count"],"title":"GeneratePolygonResult","description":"fixes60 §5: one area's outcome from a convex-hull polygon generation\nrun — `ok` means area_polygon was written; `skipped` names why not\n(typically too few geocoded buildings)."},"GoogleLoginRequest":{"properties":{"credential":{"type":"string","title":"Credential"},"organization_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"}},"type":"object","required":["credential"],"title":"GoogleLoginRequest","description":"Google Identity Services flow: the browser posts the Google ID token.\n`organization_id` completes a multi-org selection (fixes14)."},"GoogleSignupRequest":{"properties":{"credential":{"type":"string","title":"Credential"},"organization_name":{"type":"string","title":"Organization Name"},"organization_logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Logo Url"}},"type":"object","required":["credential","organization_name"],"title":"GoogleSignupRequest","description":"Create a new org + admin from a Google identity. Org name still required."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImpersonatorOut":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"full_name":{"type":"string","title":"Full Name"}},"type":"object","required":["id","full_name"],"title":"ImpersonatorOut","description":"fixes126: the superadmin behind an impersonation login."},"InstinctContactIn":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["first_name","last_name"],"title":"InstinctContactIn"},"JewishCounts":{"properties":{"jews":{"type":"integer","title":"Jews"},"engaged":{"type":"integer","title":"Engaged"}},"type":"object","required":["jews","engaged"],"title":"JewishCounts","description":"fixes53 §3/§4: calculated columns for the Report Numbers/Areas grids —\napartment counts under a report number or area matching the Jewish-status\ncategories in app.core.jewish_status."},"LinkApartmentIn":{"properties":{"apartment_id":{"type":"integer","title":"Apartment Id"}},"type":"object","required":["apartment_id"],"title":"LinkApartmentIn"},"LocalizationCreate":{"properties":{"entity_type":{"type":"string","title":"Entity Type","default":"custom"},"technical_name":{"type":"string","title":"Technical Name"},"hebrew_label":{"type":"string","title":"Hebrew Label"},"english_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Label"}},"type":"object","required":["technical_name","hebrew_label"],"title":"LocalizationCreate"},"LocalizationOut":{"properties":{"id":{"type":"integer","title":"Id"},"entity_type":{"type":"string","title":"Entity Type"},"technical_name":{"type":"string","title":"Technical Name"},"hebrew_label":{"type":"string","title":"Hebrew Label"},"english_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Label"}},"type":"object","required":["id","entity_type","technical_name","hebrew_label"],"title":"LocalizationOut"},"LocalizationUpdate":{"properties":{"hebrew_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hebrew Label"},"english_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Label"}},"type":"object","title":"LocalizationUpdate"},"LoginResponse":{"properties":{"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"requires_org_selection":{"type":"boolean","title":"Requires Org Selection","default":false},"organizations":{"items":{"$ref":"#/components/schemas/OrgOption"},"type":"array","title":"Organizations","default":[]}},"type":"object","title":"LoginResponse","description":"Login result: either a token, or (when the verified identity maps to\nmore than one organization and none was chosen yet) the list to pick from."},"MekuravData":{"properties":{"apartment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Apartment Id"},"admin_area_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Admin Area Id"},"tzedaka_potential":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tzedaka Potential"},"first_visit":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Visit"},"potential_next_step":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Potential Next Step"},"recommendations":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendations"},"background":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Background"}},"type":"object","title":"MekuravData"},"MekuravOut":{"properties":{"apartment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Apartment Id"},"admin_area_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Admin Area Id"},"tzedaka_potential":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tzedaka Potential"},"first_visit":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Visit"},"potential_next_step":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Potential Next Step"},"recommendations":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendations"},"background":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Background"},"id":{"type":"integer","title":"Id"},"contact_id":{"type":"integer","title":"Contact Id"}},"type":"object","required":["id","contact_id"],"title":"MekuravOut"},"MyTaskOut":{"properties":{"id":{"type":"integer","title":"Id"},"campaign_name":{"type":"string","title":"Campaign Name"},"report_number_names":{"items":{"type":"string"},"type":"array","title":"Report Number Names","default":[]},"task_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Text"},"status":{"type":"string","title":"Status"},"assigned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Assigned At"}},"type":"object","required":["id","campaign_name","status"],"title":"MyTaskOut","description":"fixes74 §11: a task the signed-in activist can report on."},"NewSignupsOut":{"properties":{"count":{"type":"integer","title":"Count"},"since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},"type":"object","required":["count"],"title":"NewSignupsOut"},"NotifyEmails":{"properties":{"emails":{"items":{"type":"string"},"type":"array","title":"Emails"}},"type":"object","required":["emails"],"title":"NotifyEmails","description":"fixes81 §3 / fixes100: a superadmin-managed recipient list (new-org\nsignups, server errors). Superadmin-only — kept out of the public\nSystemConfigOut."},"OrgActivistStatsOut":{"properties":{"organization_name":{"type":"string","title":"Organization Name"},"number_of_apartments":{"type":"integer","title":"Number Of Apartments"},"number_of_jews":{"type":"integer","title":"Number Of Jews"},"calculated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Calculated At"}},"type":"object","required":["organization_name","number_of_apartments","number_of_jews"],"title":"OrgActivistStatsOut"},"OrgActivistStatsUpdate":{"properties":{"organization_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Organization Name"},"number_of_apartments":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Number Of Apartments"},"number_of_jews":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Number Of Jews"}},"type":"object","title":"OrgActivistStatsUpdate"},"OrgOption":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"}},"type":"object","required":["id","name"],"title":"OrgOption","description":"One selectable organization on the login org-selection screen."},"OrgPrefsOut":{"properties":{"raw":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Raw"},"effective":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Effective"}},"type":"object","required":["raw","effective"],"title":"OrgPrefsOut","description":"fixes54 §8: an organization's feature-toggle state — `raw` is exactly\nwhat's stored (missing keys default to True); `effective` is `raw` after\nthe Area→Building→Apartment→Activist cascade (a disabled ancestor forces\nevery descendant False regardless of its own stored value)."},"OrgPrefsUpdate":{"properties":{"area_display_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Area Display Enabled"},"building_display_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Building Display Enabled"},"apartment_display_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apartment Display Enabled"},"activist_system_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Activist System Enabled"},"ai_query_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ai Query Enabled"},"localization_page_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Localization Page Enabled"},"activity_log_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Activity Log Enabled"}},"type":"object","title":"OrgPrefsUpdate","description":"Partial update — only keys present are changed; unknown keys ignored\nserver-side (see app.core.org_prefs.ALL_KEYS)."},"OrgUserCreate":{"properties":{"full_name":{"type":"string","title":"Full Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"role":{"type":"string","enum":["admin","mivzoim_admin","staff","campaign_manager","emissary"],"title":"Role","default":"staff"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"is_manual":{"type":"boolean","title":"Is Manual","default":false}},"type":"object","required":["full_name"],"title":"OrgUserCreate","description":"An admin provisions a user in their own org. Email is the identity —\nwith no password the account signs in via Google (verified email only).\n\nfixes61 §2: `is_manual` covers an activist tracked in the system who never\nlogs in themselves — email (their would-be login identity) is optional\nfor them; the endpoint fills in a username instead of defaulting to it."},"OrgUserUpdate":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"role":{"anyOf":[{"type":"string","enum":["admin","mivzoim_admin","staff","campaign_manager","emissary"]},{"type":"null"}],"title":"Role"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"shliach":{"anyOf":[{"$ref":"#/components/schemas/ShliachData"},{"type":"null"}]}},"type":"object","title":"OrgUserUpdate"},"OrganizationOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"name":{"type":"string","title":"Name"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"map_in_english":{"type":"boolean","title":"Map In English"},"default_lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Lat"},"default_lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Lng"},"default_zoom":{"type":"integer","title":"Default Zoom","default":13},"shliach_can_view_contacts":{"type":"boolean","title":"Shliach Can View Contacts","default":false},"report_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Notes"},"label_font_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Label Font Size"},"label_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Color"},"label_font_family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Font Family"},"shliach_view_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Shliach View Config"},"feature_flags":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Feature Flags","default":{}},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"public_subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Subtitle"},"public_gallery":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Public Gallery"},"self_registration_enabled":{"type":"boolean","title":"Self Registration Enabled","default":false},"name_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name En"},"public_subtitle_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Subtitle En"},"public_footer_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Footer Html"}},"type":"object","required":["id","guid","name","map_in_english"],"title":"OrganizationOut"},"OrganizationUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"map_in_english":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Map In English"},"default_lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Lat"},"default_lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Lng"},"default_zoom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Zoom"},"shliach_can_view_contacts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Shliach Can View Contacts"},"report_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Notes"},"shliach_view_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Shliach View Config"},"label_font_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Label Font Size"},"label_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Color"},"label_font_family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Font Family"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"public_subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Subtitle"},"public_gallery":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Public Gallery"},"self_registration_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Self Registration Enabled"},"name_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name En"},"public_subtitle_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Subtitle En"},"public_footer_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Footer Html"}},"type":"object","title":"OrganizationUpdate"},"PageViewIn":{"properties":{"page":{"type":"string","maxLength":500,"minLength":1,"title":"Page"}},"type":"object","required":["page"],"title":"PageViewIn"},"PaperEntryApartmentUpdate":{"properties":{"apartment_id":{"type":"integer","title":"Apartment Id"},"jewish_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jewish Status"},"mezuzah_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mezuzah Status"},"language":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Language"},"apartment_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Notes"},"fields":{"items":{"type":"string"},"type":"array","title":"Fields","default":[]}},"type":"object","required":["apartment_id"],"title":"PaperEntryApartmentUpdate"},"PaperEntryCreate":{"properties":{"performer_type":{"type":"string","enum":["user","name","unknown"],"title":"Performer Type"},"performer_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Performer User Id"},"performer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performer Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"apartments":{"items":{"$ref":"#/components/schemas/PaperEntryApartmentUpdate"},"type":"array","title":"Apartments","default":[]}},"type":"object","required":["performer_type"],"title":"PaperEntryCreate"},"PaperEntryOut":{"properties":{"id":{"type":"integer","title":"Id"},"task_id":{"type":"integer","title":"Task Id"},"performer_type":{"type":"string","enum":["user","name","unknown"],"title":"Performer Type"},"performer_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Performer User Id"},"performer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performer Name"},"entered_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entered By Name"},"apartment_count":{"type":"integer","title":"Apartment Count"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","task_id","performer_type","apartment_count","created_at"],"title":"PaperEntryOut"},"PicklistDefinitionCreate":{"properties":{"system_name":{"type":"string","title":"System Name"},"hebrew_display_name":{"type":"string","title":"Hebrew Display Name"},"english_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Display Name"},"entity_type":{"type":"string","title":"Entity Type"}},"type":"object","required":["system_name","hebrew_display_name","entity_type"],"title":"PicklistDefinitionCreate"},"PicklistDefinitionUpdate":{"properties":{"hebrew_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hebrew Display Name"},"english_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Display Name"}},"type":"object","title":"PicklistDefinitionUpdate"},"PicklistFieldOut":{"properties":{"id":{"type":"integer","title":"Id"},"field_key":{"type":"string","title":"Field Key"},"label":{"type":"string","title":"Label"},"english_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Label"},"is_system":{"type":"boolean","title":"Is System","default":true},"entity_type":{"type":"string","title":"Entity Type","default":"contact_mekurav"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","required":["id","field_key","label"],"title":"PicklistFieldOut","description":"A picklist *definition* (registry entry), DB-driven and bilingual."},"PicklistReorder":{"properties":{"ordered_ids":{"items":{"type":"integer"},"type":"array","title":"Ordered Ids"}},"type":"object","required":["ordered_ids"],"title":"PicklistReorder"},"PicklistValueCreate":{"properties":{"value":{"type":"string","title":"Value"},"hebrew_label":{"type":"string","title":"Hebrew Label"},"english_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Value"},"color_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hint"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["value","hebrew_label"],"title":"PicklistValueCreate"},"PicklistValueOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"field_key":{"type":"string","title":"Field Key"},"value":{"type":"string","title":"Value"},"hebrew_label":{"type":"string","title":"Hebrew Label"},"english_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Value"},"color_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hint"},"sort_order":{"type":"integer","title":"Sort Order"},"is_active":{"type":"boolean","title":"Is Active"},"is_default":{"type":"boolean","title":"Is Default"}},"type":"object","required":["id","guid","field_key","value","hebrew_label","sort_order","is_active","is_default"],"title":"PicklistValueOut"},"PicklistValueUpdate":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"hebrew_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hebrew Label"},"english_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Value"},"color_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hint"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"}},"type":"object","title":"PicklistValueUpdate"},"PreferenceIn":{"properties":{"key":{"type":"string","title":"Key"},"value":{"title":"Value"}},"type":"object","required":["key"],"title":"PreferenceIn"},"ProposalIn":{"properties":{"action":{"type":"string","const":"create_contact_draft","title":"Action"},"fields":{"$ref":"#/components/schemas/ContactDraftFields"}},"additionalProperties":false,"type":"object","required":["action","fields"],"title":"ProposalIn"},"PublicGoogleRegisterRequest":{"properties":{"credential":{"type":"string","title":"Credential"},"full_name":{"type":"string","title":"Full Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"org_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Slug"},"claim_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claim Token"}},"type":"object","required":["credential","full_name"],"title":"PublicGoogleRegisterRequest"},"PublicImageSearchRequest":{"properties":{"query":{"type":"string","title":"Query"},"count":{"type":"integer","title":"Count","default":7}},"type":"object","required":["query"],"title":"PublicImageSearchRequest"},"PublicOrgOut":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"name_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name En"},"subtitle_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle En"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"gallery":{"items":{"type":"string"},"type":"array","title":"Gallery","default":[]},"self_registration_enabled":{"type":"boolean","title":"Self Registration Enabled","default":false},"public_footer_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Footer Html"}},"type":"object","required":["id","slug","name"],"title":"PublicOrgOut"},"PublicRegisterRequest":{"properties":{"full_name":{"type":"string","title":"Full Name"},"email":{"type":"string","title":"Email"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"org_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Slug"},"claim_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claim Token"}},"type":"object","required":["full_name","email"],"title":"PublicRegisterRequest","description":"Activist self-registration — from an org landing page (`org_slug`) or\nthe QR claim flow (`claim_token`; the org is the task's). Email is the\nlogin and is always required on this path.\n\nfixes138: the QR claim flow asks for no password (the activist is signed\nin on the spot; later sign-ins use Google or \"forgot password\") and\nrequires an Israeli or US phone. The org page still requires a password."},"PublicRegisterResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"claim_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claim State"}},"type":"object","required":["access_token"],"title":"PublicRegisterResponse"},"ReminderIn":{"properties":{"offset_minutes":{"type":"integer","title":"Offset Minutes","default":0},"remind_at_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Remind At Time"},"channel":{"type":"string","title":"Channel","default":"email"}},"type":"object","title":"ReminderIn"},"ReminderOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"offset_minutes":{"type":"integer","title":"Offset Minutes"},"remind_at_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Remind At Time"},"channel":{"type":"string","title":"Channel"},"last_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sent At"}},"type":"object","required":["id","guid","offset_minutes","channel"],"title":"ReminderOut"},"ReportCompletionCreate":{"properties":{"status":{"type":"string","enum":["completed","not_completed","partial"],"title":"Status"},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments"},"task_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Task Id"}},"type":"object","required":["status"],"title":"ReportCompletionCreate","description":"fixes53 §7: the \"Report completed\" button's 3-choice modal + comment."},"ReportCompletionOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"status":{"type":"string","enum":["completed","not_completed","partial"],"title":"Status"},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"activist":{"$ref":"#/components/schemas/ShliachSummary"},"task_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Task Id"}},"type":"object","required":["id","guid","status","created_at","activist"],"title":"ReportCompletionOut"},"ReportNumberAreaOut":{"properties":{"id":{"type":"integer","title":"Id"},"area_name":{"type":"string","title":"Area Name"}},"type":"object","required":["id","area_name"],"title":"ReportNumberAreaOut","description":"fixes68: one area associated (via its apartments' buildings) with a\nreport number — powers the Report Numbers grid's optional Area column."},"ReportNumberBuildingLink":{"properties":{"report_number_id":{"type":"integer","title":"Report Number Id"},"building_id":{"type":"integer","title":"Building Id"}},"type":"object","required":["report_number_id","building_id"],"title":"ReportNumberBuildingLink","description":"fixes23 §2: a distinct (report number → building) pair, driving the\nconditional building filter — a building appears only while it holds an\napartment carrying one of the selected report numbers."},"ReportNumberCreate":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"ReportNumberCreate"},"ReportNumberOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"name":{"type":"string","title":"Name"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","guid","name"],"title":"ReportNumberOut"},"ReportNumberUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"ReportNumberUpdate"},"ResendRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ResendRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest","description":"fixes75 §7."},"SearchHit":{"properties":{"type":{"type":"string","title":"Type"},"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"contact_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Type"}},"type":"object","required":["type","id","title"],"title":"SearchHit","description":"One result row. `type` tells the frontend which detail page to link to."},"SearchOut":{"properties":{"query":{"type":"string","title":"Query"},"results":{"items":{"$ref":"#/components/schemas/SearchHit"},"type":"array","title":"Results"}},"type":"object","required":["query","results"],"title":"SearchOut"},"ShliachAnnouncementCreate":{"properties":{"message_title":{"type":"string","title":"Message Title"},"message_content":{"type":"string","title":"Message Content"},"is_visible":{"type":"boolean","title":"Is Visible","default":true}},"type":"object","required":["message_title","message_content"],"title":"ShliachAnnouncementCreate","description":"fixes54 §5: an admin-authored announcement for the activist landing\npage's feed."},"ShliachAnnouncementOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"message_title":{"type":"string","title":"Message Title"},"message_content":{"type":"string","title":"Message Content"},"is_visible":{"type":"boolean","title":"Is Visible"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","guid","message_title","message_content","is_visible","created_at","updated_at"],"title":"ShliachAnnouncementOut"},"ShliachAnnouncementUpdate":{"properties":{"message_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Title"},"message_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Content"},"is_visible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Visible"}},"type":"object","title":"ShliachAnnouncementUpdate"},"ShliachClearReportNumbersIn":{"properties":{"contact_ids":{"items":{"type":"integer"},"type":"array","title":"Contact Ids"}},"type":"object","required":["contact_ids"],"title":"ShliachClearReportNumbersIn","description":"fixes43 §3.4 / fixes48 §3: \"ניקוי שיבוצים\" — clear the report-number\nassignment from every shliach contact in the given id set (the Users\npage's current filtered view). fixes48: this used to clear `areas`\ninstead — the area assignment must be left untouched."},"ShliachClearReportNumbersResult":{"properties":{"updated":{"type":"integer","title":"Updated"}},"type":"object","required":["updated"],"title":"ShliachClearReportNumbersResult"},"ShliachData":{"properties":{"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"report_number_ids":{"items":{"type":"integer"},"type":"array","title":"Report Number Ids","default":[]},"area_ids":{"items":{"type":"integer"},"type":"array","title":"Area Ids","default":[]},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}},"type":"object","title":"ShliachData"},"ShliachOut":{"properties":{"id":{"type":"integer","title":"Id"},"contact_id":{"type":"integer","title":"Contact Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"report_number_ids":{"items":{"type":"integer"},"type":"array","title":"Report Number Ids","default":[]},"area_ids":{"items":{"type":"integer"},"type":"array","title":"Area Ids","default":[]},"login_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Login Status"}},"type":"object","required":["id","contact_id"],"title":"ShliachOut"},"ShliachRestoreField":{"properties":{"version_id":{"type":"integer","title":"Version Id"},"field":{"type":"string","title":"Field"}},"type":"object","required":["version_id","field"],"title":"ShliachRestoreField","description":"fixes48 §4: restore one field of the active shliach back to the value\nit held in a previous version — mirrors ApartmentRestoreField."},"ShliachSummary":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"}},"type":"object","required":["id","name"],"title":"ShliachSummary","description":"fixes43 §4.2/4.3: a shliach contact already covering an area/report\nnumber — powers the reassignment conflict warning on the shliach edit\nform (frontend formats name+last_name via contactFullName)."},"ShliachVersionOut":{"properties":{"id":{"type":"integer","title":"Id"},"contact_id":{"type":"integer","title":"Contact Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"report_number_ids":{"items":{"type":"integer"},"type":"array","title":"Report Number Ids","default":[]},"area_ids":{"items":{"type":"integer"},"type":"array","title":"Area Ids","default":[]},"last_edit":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Edit"},"editor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Editor Name"}},"type":"object","required":["id","contact_id"],"title":"ShliachVersionOut","description":"fixes45: one historical shliach version (admin history view) — the\nfull snapshot plus who retired it and when. Same shape as\nApartmentVersionOut."},"SignificantDateCreate":{"properties":{"special_date":{"type":"string","format":"date-time","title":"Special Date"},"hebrew_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hebrew Date"},"after_sunset":{"type":"boolean","title":"After Sunset","default":false},"special_date_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special Date Type"},"special_date_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special Date Title"},"is_set_reminder":{"type":"boolean","title":"Is Set Reminder","default":false},"reminders":{"items":{"$ref":"#/components/schemas/ReminderIn"},"type":"array","title":"Reminders","default":[]}},"type":"object","required":["special_date"],"title":"SignificantDateCreate"},"SignificantDateOut":{"properties":{"special_date":{"type":"string","format":"date-time","title":"Special Date"},"hebrew_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hebrew Date"},"after_sunset":{"type":"boolean","title":"After Sunset","default":false},"special_date_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special Date Type"},"special_date_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special Date Title"},"is_set_reminder":{"type":"boolean","title":"Is Set Reminder","default":false},"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"reminders":{"items":{"$ref":"#/components/schemas/ReminderOut"},"type":"array","title":"Reminders","default":[]},"hebrew_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hebrew Year"},"hebrew_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hebrew Month"},"hebrew_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hebrew Day"},"next_dates":{"items":{"type":"string","format":"date"},"type":"array","title":"Next Dates","default":[]}},"type":"object","required":["special_date","id","guid"],"title":"SignificantDateOut"},"SignificantDateUpdate":{"properties":{"special_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Special Date"},"hebrew_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hebrew Date"},"after_sunset":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"After Sunset"},"special_date_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special Date Type"},"special_date_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special Date Title"},"is_set_reminder":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Set Reminder"},"reminders":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReminderIn"},"type":"array"},{"type":"null"}],"title":"Reminders"}},"type":"object","title":"SignificantDateUpdate"},"SignupRequest":{"properties":{"organization_name":{"type":"string","title":"Organization Name"},"organization_logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Logo Url"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"phone":{"type":"string","title":"Phone"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"}},"type":"object","required":["organization_name","first_name","last_name","email","phone","username","password"],"title":"SignupRequest"},"StreetActivityEventIn":{"properties":{"client_id":{"type":"string","maxLength":36,"minLength":8,"title":"Client Id"},"event_type":{"type":"string","enum":["mark","unmark","building_complete"],"title":"Event Type"},"apartment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Apartment Id"},"building_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Building Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"}},"type":"object","required":["client_id","event_type","occurred_at"],"title":"StreetActivityEventIn"},"StreetActivityEventOut":{"properties":{"id":{"type":"integer","title":"Id"},"event_type":{"type":"string","title":"Event Type"},"apartment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Apartment Id"},"building_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Building Id"},"building_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Label"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"synced_at":{"type":"string","format":"date-time","title":"Synced At"}},"type":"object","required":["id","event_type","occurred_at","synced_at"],"title":"StreetActivityEventOut"},"StreetActivityOut":{"properties":{"user_id":{"type":"integer","title":"User Id"},"full_name":{"type":"string","title":"Full Name"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"events":{"items":{"$ref":"#/components/schemas/StreetActivityEventOut"},"type":"array","title":"Events","default":[]}},"type":"object","required":["user_id","full_name"],"title":"StreetActivityOut"},"StreetActivitySync":{"properties":{"events":{"items":{"$ref":"#/components/schemas/StreetActivityEventIn"},"type":"array","maxItems":500,"title":"Events"}},"type":"object","title":"StreetActivitySync"},"SystemCommentCreate":{"properties":{"comment":{"type":"string","title":"Comment"}},"type":"object","required":["comment"],"title":"SystemCommentCreate","description":"fixes53 §7: the \"Comments about the system\" button."},"SystemCommentOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"comment":{"type":"string","title":"Comment"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"activist":{"$ref":"#/components/schemas/ShliachSummary"}},"type":"object","required":["id","guid","comment","created_at","activist"],"title":"SystemCommentOut"},"SystemConfigOut":{"properties":{"title_template":{"type":"string","title":"Title Template"},"fallback_name":{"type":"string","title":"Fallback Name"}},"type":"object","required":["title_template","fallback_name"],"title":"SystemConfigOut","description":"The platform title configuration (fixes9 §1) — public + superadmin read."},"SystemConfigUpdate":{"properties":{"title_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title Template"},"fallback_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fallback Name"}},"type":"object","title":"SystemConfigUpdate"},"TaskBulkCreate":{"properties":{"campaign_id":{"type":"integer","title":"Campaign Id"},"report_number_ids":{"items":{"type":"integer"},"type":"array","title":"Report Number Ids"},"volunteer_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Volunteer User Id"},"custom_date_value_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Custom Date Value Id"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"status":{"type":"string","enum":["AVAILABLE","ACTIVE","COMPLETED","PAUSED"],"title":"Status","default":"ACTIVE"},"skip_conflicts":{"type":"boolean","title":"Skip Conflicts","default":false},"picklist_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Picklist Values"},"custom_field_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Custom Field Values"}},"type":"object","required":["campaign_id","report_number_ids"],"title":"TaskBulkCreate"},"TaskBulkCreateOut":{"properties":{"created_task_ids":{"items":{"type":"integer"},"type":"array","title":"Created Task Ids","default":[]},"skipped":{"items":{"$ref":"#/components/schemas/TaskBulkNumber"},"type":"array","title":"Skipped","default":[]}},"type":"object","title":"TaskBulkCreateOut"},"TaskBulkNumber":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"task_ids":{"items":{"type":"integer"},"type":"array","title":"Task Ids","default":[]}},"type":"object","required":["id","name"],"title":"TaskBulkNumber"},"TaskBulkPreviewOut":{"properties":{"eligible":{"items":{"$ref":"#/components/schemas/TaskBulkNumber"},"type":"array","title":"Eligible","default":[]},"conflicts":{"items":{"$ref":"#/components/schemas/TaskBulkNumber"},"type":"array","title":"Conflicts","default":[]},"missing":{"items":{"type":"string"},"type":"array","title":"Missing","default":[]}},"type":"object","title":"TaskBulkPreviewOut"},"TaskBulkPreviewRequest":{"properties":{"campaign_id":{"type":"integer","title":"Campaign Id"},"report_number_ids":{"items":{"type":"integer"},"type":"array","title":"Report Number Ids","default":[]},"range_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Range Text"}},"type":"object","required":["campaign_id"],"title":"TaskBulkPreviewRequest","description":"fixes74 §3: what \"one task per report number\" would create — the\nexplicitly picked report numbers plus any typed range (\"10-40, 55\")."},"TaskCreate":{"properties":{"campaign_id":{"type":"integer","title":"Campaign Id"},"volunteer_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Volunteer User Id"},"custom_date_value_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Custom Date Value Id"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"report_number_ids":{"items":{"type":"integer"},"type":"array","title":"Report Number Ids","default":[]},"status":{"type":"string","enum":["AVAILABLE","ACTIVE","COMPLETED","PAUSED"],"title":"Status","default":"ACTIVE"},"volunteer_report_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Volunteer Report Summary"},"task_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Text"},"picklist_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Picklist Values"},"custom_field_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Custom Field Values"}},"type":"object","required":["campaign_id"],"title":"TaskCreate"},"TaskOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"campaign_id":{"type":"integer","title":"Campaign Id"},"campaign_name":{"type":"string","title":"Campaign Name"},"campaign_is_active":{"type":"boolean","title":"Campaign Is Active","default":true},"volunteer_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Volunteer User Id"},"volunteer_name":{"type":"string","title":"Volunteer Name"},"custom_date_value_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Custom Date Value Id"},"custom_date_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Date Value"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"report_number_ids":{"items":{"type":"integer"},"type":"array","title":"Report Number Ids","default":[]},"report_number_names":{"items":{"type":"string"},"type":"array","title":"Report Number Names","default":[]},"task_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Text"},"status":{"type":"string","enum":["AVAILABLE","ACTIVE","COMPLETED","PAUSED"],"title":"Status"},"volunteer_report_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Volunteer Report Summary"},"latest_report_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Report Status"},"latest_report_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Report Notes"},"claimed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Claimed At"},"claimed_via":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimed Via"},"assigned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Assigned At"},"is_orphan":{"type":"boolean","title":"Is Orphan","default":false},"apartment_count":{"type":"integer","title":"Apartment Count","default":0},"claim_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claim Token"},"picklist_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Picklist Values","default":{}},"custom_field_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Custom Field Values","default":{}},"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","guid","campaign_id","campaign_name","volunteer_name","status"],"title":"TaskOut"},"TaskPageOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaskOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"TaskPageOut"},"TaskPrintApartment":{"properties":{"id":{"type":"integer","title":"Id"},"building_id":{"type":"integer","title":"Building Id"},"building_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Name"},"building_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Address"},"floor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Floor"},"apartment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Name"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"report_number_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Number Name"},"jewish_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jewish Status"},"mezuzah_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mezuzah Status"},"language":{"items":{"type":"string"},"type":"array","title":"Language","default":[]},"apartment_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apartment Notes"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"campaign_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Status"},"area_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Name"},"picklist_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Picklist Values","default":{}},"custom_field_values":{"additionalProperties":true,"type":"object","title":"Custom Field Values","default":{}}},"type":"object","required":["id","building_id"],"title":"TaskPrintApartment"},"TaskPrintOut":{"properties":{"task":{"$ref":"#/components/schemas/TaskOut"},"claim_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claim Token"},"apartments":{"items":{"$ref":"#/components/schemas/TaskPrintApartment"},"type":"array","title":"Apartments","default":[]}},"type":"object","required":["task"],"title":"TaskPrintOut"},"TaskStatusWithId":{"properties":{"status":{"type":"string","enum":["AVAILABLE","ACTIVE","COMPLETED","PAUSED"],"title":"Status"},"task_id":{"type":"integer","title":"Task Id"}},"type":"object","required":["status","task_id"],"title":"TaskStatusWithId","description":"fixes60 §2: report_number_campaign_task_status's per-cell value — a\nplain status string couldn't be PUT against, since there's no task id in\nit to address. Report Numbers' inline status toggle needs task_id."},"TaskUpdate":{"properties":{"campaign_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Campaign Id"},"volunteer_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Volunteer User Id"},"custom_date_value_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Custom Date Value Id"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"report_number_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Report Number Ids"},"status":{"anyOf":[{"type":"string","enum":["AVAILABLE","ACTIVE","COMPLETED","PAUSED"]},{"type":"null"}],"title":"Status"},"volunteer_report_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Volunteer Report Summary"},"task_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Text"},"picklist_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Picklist Values"},"custom_field_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Custom Field Values"}},"type":"object","title":"TaskUpdate"},"Token":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token"],"title":"Token"},"UsageLocation":{"properties":{"entity":{"type":"string","title":"Entity"},"count":{"type":"integer","title":"Count"},"samples":{"items":{"$ref":"#/components/schemas/UsageSample"},"type":"array","title":"Samples","default":[]}},"type":"object","required":["entity","count"],"title":"UsageLocation"},"UsageOut":{"properties":{"count":{"type":"integer","title":"Count"},"locations":{"items":{"$ref":"#/components/schemas/UsageLocation"},"type":"array","title":"Locations","default":[]}},"type":"object","required":["count"],"title":"UsageOut","description":"fixes48 §1: dependent-record count for a definition/value about to be\nhard-deleted — the frontend confirms with a data-loss warning when\ncount > 0, then purges on confirm.\n\nfixes72 §1: for a single *value*, a hard delete is now refused while in\nuse — `locations` says where, so the admin can go change those records."},"UsageSample":{"properties":{"id":{"type":"integer","title":"Id"},"label":{"type":"string","title":"Label"}},"type":"object","required":["id","label"],"title":"UsageSample"},"UserCreate":{"properties":{"username":{"type":"string","title":"Username"},"full_name":{"type":"string","title":"Full Name"},"password":{"type":"string","title":"Password"},"role":{"type":"string","enum":["admin","staff","shliach"],"title":"Role","default":"staff"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"}},"type":"object","required":["username","full_name","password"],"title":"UserCreate"},"UserOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"username":{"type":"string","title":"Username"},"full_name":{"type":"string","title":"Full Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"role":{"type":"string","title":"Role"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_manual":{"type":"boolean","title":"Is Manual","default":false},"registration_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Source"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"organization_id":{"type":"integer","title":"Organization Id"},"organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationOut"},{"type":"null"}]},"has_active_task":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Active Task"},"active_task_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Active Task Since"},"shliach":{"anyOf":[{"$ref":"#/components/schemas/ShliachOut"},{"type":"null"}]},"impersonator":{"anyOf":[{"$ref":"#/components/schemas/ImpersonatorOut"},{"type":"null"}]}},"type":"object","required":["id","guid","username","full_name","role","created_at","organization_id"],"title":"UserOut"},"UserRecreateIn":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"UserRecreateIn","description":"fixes26 §4: re-enable (or re-create) a shliach's login by the contact's\nemail — the one-click recovery for a deleted/disabled account."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VisitCreate":{"properties":{"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"visit_date":{"type":"string","format":"date-time","title":"Visit Date"},"visit_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visit Type"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"interactions":{"items":{"$ref":"#/components/schemas/VisitInteraction"},"type":"array","title":"Interactions","default":[]},"torah_thought":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Torah Thought"},"custom_field_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Custom Field Values","default":{}},"picklist_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Picklist Values","default":{}}},"type":"object","required":["visit_date"],"title":"VisitCreate"},"VisitInteraction":{"properties":{"category":{"type":"string","title":"Category"},"note":{"type":"string","title":"Note"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"}},"type":"object","required":["category","note"],"title":"VisitInteraction","description":"One entry of a visit's interaction log (fixes25 — stored as JSON on the\nvisit). `created_at`/`author_name` are stamped server-side when missing."},"VisitOut":{"properties":{"id":{"type":"integer","title":"Id"},"guid":{"type":"string","title":"Guid"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"visit_date":{"type":"string","format":"date-time","title":"Visit Date"},"visit_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visit Type"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"interactions":{"items":{"$ref":"#/components/schemas/VisitInteraction"},"type":"array","title":"Interactions","default":[]},"torah_thought":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Torah Thought"},"custom_field_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Custom Field Values","default":{}},"picklist_values":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Picklist Values","default":{}}},"type":"object","required":["id","guid","visit_date"],"title":"VisitOut"},"VisitSummaryCategory":{"properties":{"key":{"type":"string","title":"Key"},"hebrew_label":{"type":"string","title":"Hebrew Label"},"english_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"English Label"},"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/VisitSummaryItem"},"type":"array","title":"Items"}},"type":"object","required":["key","hebrew_label","count","items"],"title":"VisitSummaryCategory"},"VisitSummaryItem":{"properties":{"visit_id":{"type":"integer","title":"Visit Id"},"visit_date":{"type":"string","format":"date-time","title":"Visit Date"},"contact_id":{"type":"integer","title":"Contact Id"},"contact_name":{"type":"string","title":"Contact Name"}},"type":"object","required":["visit_id","visit_date","contact_id","contact_name"],"title":"VisitSummaryItem"},"VisitSummaryOut":{"properties":{"total":{"type":"integer","title":"Total"},"categories":{"items":{"$ref":"#/components/schemas/VisitSummaryCategory"},"type":"array","title":"Categories"}},"type":"object","required":["total","categories"],"title":"VisitSummaryOut"},"VisitUpdate":{"properties":{"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"visit_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Visit Date"},"visit_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visit Type"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"interactions":{"anyOf":[{"items":{"$ref":"#/components/schemas/VisitInteraction"},"type":"array"},{"type":"null"}],"title":"Interactions"},"torah_thought":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Torah Thought"},"custom_field_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Custom Field Values"},"picklist_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Picklist Values"}},"type":"object","title":"VisitUpdate"},"app__routers__assistant_contacts__VisitIn":{"properties":{"values":{"additionalProperties":true,"type":"object","title":"Values","default":{}},"request_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Request Id"}},"additionalProperties":false,"type":"object","title":"VisitIn"},"app__routers__instinct__visits__VisitIn":{"properties":{"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"apartment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Apartment Id"},"date":{"type":"string","title":"Date"},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"followup_task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Followup Task"},"custom_fields":{"additionalProperties":true,"type":"object","title":"Custom Fields","default":{}}},"type":"object","required":["date"],"title":"VisitIn"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}}}}}