{"openapi":"3.1.0","info":{"title":"Borrowhood API","version":"1.0.0"},"paths":{"/v1/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","operationId":"signup_v1_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_v1_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/password-reset":{"post":{"tags":["auth"],"summary":"Request Password Reset","operationId":"request_password_reset_v1_auth_password_reset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh Token","operationId":"refresh_token_v1_auth_refresh_post","parameters":[{"name":"refresh_token","in":"query","required":true,"schema":{"type":"string","title":"Refresh Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/me":{"get":{"tags":["auth"],"summary":"Get Me","operationId":"get_me_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/communities":{"get":{"tags":["communities"],"summary":"List My Communities","operationId":"list_my_communities_v1_communities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CommunityResponse"},"type":"array","title":"Response List My Communities V1 Communities Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["communities"],"summary":"Create Community","operationId":"create_community_v1_communities_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/communities/{community_id}":{"get":{"tags":["communities"],"summary":"Get Community","operationId":"get_community_v1_communities__community_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["communities"],"summary":"Update Community","operationId":"update_community_v1_communities__community_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/logo":{"post":{"tags":["communities"],"summary":"Upload Logo","operationId":"upload_logo_v1_communities__community_id__logo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_logo_v1_communities__community_id__logo_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/join/{invite_code}":{"post":{"tags":["communities"],"summary":"Join Via Invite","operationId":"join_via_invite_v1_communities_join__invite_code__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invite_code","in":"path","required":true,"schema":{"type":"string","title":"Invite Code"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/regenerate-invite":{"post":{"tags":["communities"],"summary":"Regenerate Invite","operationId":"regenerate_invite_v1_communities__community_id__regenerate_invite_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Regenerate Invite V1 Communities  Community Id  Regenerate Invite Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/members":{"get":{"tags":["communities"],"summary":"List Members","operationId":"list_members_v1_communities__community_id__members_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemberResponse"},"title":"Response List Members V1 Communities  Community Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/members/{target_user_id}":{"patch":{"tags":["communities"],"summary":"Update Member Role","operationId":"update_member_role_v1_communities__community_id__members__target_user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"target_user_id","in":"path","required":true,"schema":{"type":"string","title":"Target User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["communities"],"summary":"Remove Member","operationId":"remove_member_v1_communities__community_id__members__target_user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"target_user_id","in":"path","required":true,"schema":{"type":"string","title":"Target User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/items":{"get":{"tags":["items"],"summary":"List Items","operationId":"list_items_v1_communities__community_id__items_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"ownership_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ownership Type"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"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":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ItemResponse"},"title":"Response List Items V1 Communities  Community Id  Items Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["items"],"summary":"Create Item","operationId":"create_item_v1_communities__community_id__items_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/items/{item_id}":{"get":{"tags":["items"],"summary":"Get Item","operationId":"get_item_v1_communities__community_id__items__item_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["items"],"summary":"Update Item","operationId":"update_item_v1_communities__community_id__items__item_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["items"],"summary":"Delete Item","operationId":"delete_item_v1_communities__community_id__items__item_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/items/{item_id}/photos":{"post":{"tags":["items"],"summary":"Upload Photos","operationId":"upload_photos_v1_communities__community_id__items__item_id__photos_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_photos_v1_communities__community_id__items__item_id__photos_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/items/categories/list":{"get":{"tags":["items"],"summary":"List Categories","operationId":"list_categories_v1_communities__community_id__items_categories_list_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/requests/manual":{"post":{"tags":["requests"],"summary":"Create Manual Loan","description":"Owner or admin manually records lending an item to a community member.\nCreates a borrow request that is already approved — no pending step.","operationId":"create_manual_loan_v1_communities__community_id__requests_manual_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualBorrowCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BorrowRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/requests":{"get":{"tags":["requests"],"summary":"List Requests","operationId":"list_requests_v1_communities__community_id__requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"view","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"mine","title":"View"}},{"name":"request_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BorrowRequestResponse"},"title":"Response List Requests V1 Communities  Community Id  Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["requests"],"summary":"Create Request","operationId":"create_request_v1_communities__community_id__requests_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BorrowRequestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BorrowRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/requests/{request_id}/approve":{"post":{"tags":["requests"],"summary":"Approve Request","operationId":"approve_request_v1_communities__community_id__requests__request_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BorrowRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/requests/{request_id}/decline":{"post":{"tags":["requests"],"summary":"Decline Request","operationId":"decline_request_v1_communities__community_id__requests__request_id__decline_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BorrowRequestDecline"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BorrowRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/requests/{request_id}/return":{"post":{"tags":["requests"],"summary":"Mark Returned","operationId":"mark_returned_v1_communities__community_id__requests__request_id__return_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BorrowRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/requests/{request_id}/cancel":{"post":{"tags":["requests"],"summary":"Cancel Request","operationId":"cancel_request_v1_communities__community_id__requests__request_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BorrowRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/requests/{request_id}":{"delete":{"tags":["requests"],"summary":"Delete Request","operationId":"delete_request_v1_communities__community_id__requests__request_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/requests/{request_id}/messages":{"get":{"tags":["messages"],"summary":"List Messages","operationId":"list_messages_v1_communities__community_id__requests__request_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MessageResponse"},"title":"Response List Messages V1 Communities  Community Id  Requests  Request Id  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["messages"],"summary":"Send Message","operationId":"send_message_v1_communities__community_id__requests__request_id__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout","operationId":"create_checkout_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/setup-intent":{"post":{"tags":["billing"],"summary":"Create Setup Intent","description":"Create a SetupIntent for Stripe Elements embedded checkout.","operationId":"create_setup_intent_v1_billing_setup_intent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/confirm-subscription":{"post":{"tags":["billing"],"summary":"Confirm Subscription","description":"After card is confirmed via Elements, create the subscription.","operationId":"confirm_subscription_v1_billing_confirm_subscription_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Customer Portal","operationId":"customer_portal_v1_billing_portal_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"query","required":true,"schema":{"type":"string","title":"Community Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","operationId":"stripe_webhook_v1_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/billing/status/{community_id}":{"get":{"tags":["billing"],"summary":"Get Billing Status","operationId":"get_billing_status_v1_billing_status__community_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/profile":{"get":{"tags":["profile"],"summary":"Get Profile","operationId":"get_profile_v1_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["profile"],"summary":"Update Profile","operationId":"update_profile_v1_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/profile/avatar":{"post":{"tags":["profile"],"summary":"Upload Avatar","operationId":"upload_avatar_v1_profile_avatar_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_avatar_v1_profile_avatar_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/profile/memberships":{"get":{"tags":["profile"],"summary":"Get Memberships","operationId":"get_memberships_v1_profile_memberships_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/profile/notifications":{"get":{"tags":["profile"],"summary":"List Notifications","operationId":"list_notifications_v1_profile_notifications_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/profile/notifications/read-all":{"post":{"tags":["profile"],"summary":"Mark All Read","operationId":"mark_all_read_v1_profile_notifications_read_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/profile/stats":{"get":{"tags":["profile"],"summary":"Get Stats","operationId":"get_stats_v1_profile_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/communities/{community_id}/announcements":{"get":{"tags":["announcements"],"summary":"List Announcements","operationId":"list_announcements_v1_communities__community_id__announcements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AnnouncementResponse"},"title":"Response List Announcements V1 Communities  Community Id  Announcements Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["announcements"],"summary":"Create Announcement","operationId":"create_announcement_v1_communities__community_id__announcements_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/communities/{community_id}/announcements/{announcement_id}":{"delete":{"tags":["announcements"],"summary":"Delete Announcement","operationId":"delete_announcement_v1_communities__community_id__announcements__announcement_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"string","title":"Community Id"}},{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","title":"Announcement Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AnnouncementCreate":{"properties":{"message":{"type":"string","title":"Message"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["message"],"title":"AnnouncementCreate"},"AnnouncementResponse":{"properties":{"id":{"type":"string","title":"Id"},"community_id":{"type":"string","title":"Community Id"},"author_id":{"type":"string","title":"Author Id"},"message":{"type":"string","title":"Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"}},"additionalProperties":true,"type":"object","required":["id","community_id","author_id","message","created_at"],"title":"AnnouncementResponse"},"ApproverType":{"type":"string","enum":["owner","admin"],"title":"ApproverType"},"Body_upload_avatar_v1_profile_avatar_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_avatar_v1_profile_avatar_post"},"Body_upload_logo_v1_communities__community_id__logo_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_logo_v1_communities__community_id__logo_post"},"Body_upload_photos_v1_communities__community_id__items__item_id__photos_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_upload_photos_v1_communities__community_id__items__item_id__photos_post"},"BorrowRequestCreate":{"properties":{"item_id":{"type":"string","title":"Item Id"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["item_id","start_date","end_date"],"title":"BorrowRequestCreate"},"BorrowRequestDecline":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"BorrowRequestDecline"},"BorrowRequestResponse":{"properties":{"id":{"type":"string","title":"Id"},"item_id":{"type":"string","title":"Item Id"},"community_id":{"type":"string","title":"Community Id"},"requester_id":{"type":"string","title":"Requester Id"},"approver_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approver Id"},"approver_type":{"$ref":"#/components/schemas/ApproverType"},"status":{"$ref":"#/components/schemas/RequestStatus"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"decline_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decline Reason"},"is_manual_loan":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Manual Loan","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"item":{"anyOf":[{"$ref":"#/components/schemas/RequestItemSlim"},{"type":"null"}]},"requester":{"anyOf":[{"$ref":"#/components/schemas/RequestProfileSlim"},{"type":"null"}]}},"type":"object","required":["id","item_id","community_id","requester_id","approver_type","status","start_date","end_date","created_at"],"title":"BorrowRequestResponse"},"CheckoutCreate":{"properties":{"community_id":{"type":"string","title":"Community Id"},"billing_period":{"type":"string","title":"Billing Period"},"billing_tier":{"type":"string","title":"Billing Tier","default":"group"}},"type":"object","required":["community_id","billing_period"],"title":"CheckoutCreate"},"CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"}},"type":"object","required":["checkout_url"],"title":"CheckoutResponse"},"CommunityCreate":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/CommunityType"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"province_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Province State"},"country":{"type":"string","title":"Country","default":"CA"}},"type":"object","required":["name","type"],"title":"CommunityCreate"},"CommunityResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/CommunityType"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"province_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Province State"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"invite_code":{"type":"string","title":"Invite Code"},"member_count":{"type":"integer","title":"Member Count"},"subscription_status":{"type":"string","title":"Subscription Status"},"trial_ends_at":{"type":"string","format":"date-time","title":"Trial Ends At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","type","invite_code","member_count","subscription_status","trial_ends_at","created_at"],"title":"CommunityResponse"},"CommunityType":{"type":"string","enum":["cohousing","coop","ecovillage","strata","hoa","neighbours","other"],"title":"CommunityType"},"CommunityUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"province_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Province State"}},"type":"object","title":"CommunityUpdate"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ItemCondition":{"type":"string","enum":["excellent","good","fair","poor"],"title":"ItemCondition"},"ItemCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"type":"string","title":"Category"},"condition":{"allOf":[{"$ref":"#/components/schemas/ItemCondition"}],"default":"good"},"ownership_type":{"allOf":[{"$ref":"#/components/schemas/OwnershipType"}],"default":"personal"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"photo_urls":{"items":{"type":"string"},"type":"array","title":"Photo Urls","default":[]},"physical_item_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Physical Item Id"}},"type":"object","required":["name","category"],"title":"ItemCreate"},"ItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"community_id":{"type":"string","title":"Community Id"},"owner_id":{"type":"string","title":"Owner Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"type":"string","title":"Category"},"condition":{"$ref":"#/components/schemas/ItemCondition"},"status":{"$ref":"#/components/schemas/ItemStatus"},"ownership_type":{"$ref":"#/components/schemas/OwnershipType"},"photo_urls":{"items":{"type":"string"},"type":"array","title":"Photo Urls"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"borrow_count":{"type":"integer","title":"Borrow Count"},"physical_item_id":{"type":"string","title":"Physical Item Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"owner":{"anyOf":[{"$ref":"#/components/schemas/ProfileResponse"},{"type":"null"}]}},"type":"object","required":["id","community_id","owner_id","name","category","condition","status","ownership_type","photo_urls","tags","borrow_count","physical_item_id","created_at"],"title":"ItemResponse"},"ItemStatus":{"type":"string","enum":["available","borrowed","unavailable"],"title":"ItemStatus"},"ItemUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"condition":{"anyOf":[{"$ref":"#/components/schemas/ItemCondition"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/ItemStatus"},{"type":"null"}]},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"ownership_type":{"anyOf":[{"$ref":"#/components/schemas/OwnershipType"},{"type":"null"}]}},"type":"object","title":"ItemUpdate"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"ManualBorrowCreate":{"properties":{"item_id":{"type":"string","title":"Item Id"},"borrower_id":{"type":"string","title":"Borrower Id"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["item_id","borrower_id","start_date","end_date"],"title":"ManualBorrowCreate"},"MemberResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"role":{"$ref":"#/components/schemas/MembershipRole"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"},"profile":{"anyOf":[{"$ref":"#/components/schemas/ProfileResponse"},{"type":"null"}]}},"type":"object","required":["id","user_id","role","joined_at"],"title":"MemberResponse"},"MemberRoleUpdate":{"properties":{"role":{"$ref":"#/components/schemas/MembershipRole"}},"type":"object","required":["role"],"title":"MemberRoleUpdate"},"MembershipRole":{"type":"string","enum":["member","admin","owner"],"title":"MembershipRole"},"MessageCreate":{"properties":{"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"MessageCreate"},"MessageOut":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"MessageOut"},"MessageResponse":{"properties":{"id":{"type":"string","title":"Id"},"request_id":{"type":"string","title":"Request Id"},"sender_id":{"type":"string","title":"Sender Id"},"body":{"type":"string","title":"Body"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Read At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sender":{"anyOf":[{"$ref":"#/components/schemas/ProfileResponse"},{"type":"null"}]}},"type":"object","required":["id","request_id","sender_id","body","created_at"],"title":"MessageResponse"},"OwnershipType":{"type":"string","enum":["personal","community"],"title":"OwnershipType"},"PasswordResetRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"PasswordResetRequest"},"ProfileResponse":{"properties":{"full_name":{"type":"string","title":"Full Name"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["full_name","id","email","created_at"],"title":"ProfileResponse"},"ProfileUpdate":{"properties":{"full_name":{"type":"string","title":"Full Name"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},"type":"object","required":["full_name"],"title":"ProfileUpdate"},"RequestItemSlim":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"ownership_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ownership Type"},"photo_urls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Photo Urls"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Id"},"owner":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Owner"}},"additionalProperties":true,"type":"object","required":["id"],"title":"RequestItemSlim","description":"Minimal item fields returned inside a borrow request."},"RequestProfileSlim":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"additionalProperties":true,"type":"object","required":["id"],"title":"RequestProfileSlim","description":"Minimal profile fields returned inside a borrow request."},"RequestStatus":{"type":"string","enum":["pending","approved","declined","returned","cancelled"],"title":"RequestStatus"},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"full_name":{"type":"string","title":"Full Name"}},"type":"object","required":["email","password","full_name"],"title":"SignupRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}