{"openapi":"3.0.0","info":{"title":"V2 Dataing Backend API","version":"1.0.0"},"components":{"schemas":{"ProfilePicture":{"type":"object","properties":{"id":{"type":"string","example":"pic_123"},"url":{"type":"string","format":"uri","example":"https://cdn.example.com/profile-pictures/user123/pic.jpg"},"storageKey":{"type":"string","example":"profile-pictures/user123/1699900000000-abc123.jpg"},"position":{"type":"integer","minimum":0,"example":0},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","url","storageKey","position","createdAt","updatedAt"]},"CurrentUserLLMModel":{"type":"object","properties":{"id":{"type":"string","example":"cm39model123"},"name":{"type":"string","example":"GPT-4"},"provider":{"type":"string","example":"openai"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","name","provider","createdAt","updatedAt"]},"CurrentUserBio":{"type":"object","properties":{"id":{"type":"string","example":"cm39bio123"},"content":{"type":"string","example":"I love hiking and outdoor adventures"},"userId":{"type":"string","example":"cm39user123"},"llmModelId":{"type":"string","example":"cm39model123"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"llmModel":{"$ref":"#/components/schemas/CurrentUserLLMModel"}},"required":["id","content","userId","llmModelId","createdAt","updatedAt"]},"UserProfile":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"gender":{"type":"string","nullable":true,"enum":["MALE","FEMALE","NONBINARY"]},"birthday":{"type":"string","nullable":true},"heightInches":{"type":"number","nullable":true},"occupation":{"type":"string","nullable":true},"educationLevel":{"type":"string","nullable":true,"enum":["HIGH_SCHOOL","SOME_COLLEGE","ASSOCIATES","BACHELORS","MASTERS","DOCTORATE","TRADE_SCHOOL"]},"relationshipTerm":{"type":"array","items":{"type":"string","enum":["LONG_TERM","SHORT_TERM"]}},"interestedIn":{"type":"array","items":{"type":"string","enum":["MALE","FEMALE","NONBINARY"]}},"ageRangeMin":{"type":"number","nullable":true},"ageRangeMax":{"type":"number","nullable":true},"dealbreaker":{"type":"boolean"},"appleAgeVerificationStatus":{"type":"string","nullable":true,"enum":["VERIFIED_ADULT","FALLBACK_VERIFIED_ADULT","UNDERAGE","DECLINED","UNSUPPORTED","FAILED"]},"appleAgeVerificationLowerBound":{"type":"number","nullable":true},"appleAgeVerificationUpperBound":{"type":"number","nullable":true},"appleAgeVerificationDeclaration":{"type":"string","nullable":true,"enum":["SELF_DECLARED","GUARDIAN_DECLARED","UNKNOWN"]},"appleAgeVerificationParentalControls":{"type":"array","items":{"type":"string"}},"appleAgeVerificationUpdatedAt":{"type":"string","nullable":true}},"required":["id","name","gender","birthday","heightInches","occupation","educationLevel","relationshipTerm","interestedIn","ageRangeMin","ageRangeMax","dealbreaker","appleAgeVerificationStatus","appleAgeVerificationLowerBound","appleAgeVerificationUpperBound","appleAgeVerificationDeclaration","appleAgeVerificationParentalControls","appleAgeVerificationUpdatedAt"],"description":"User profile data"},"User":{"type":"object","properties":{"id":{"type":"string","example":"cm39abc123xyz"},"role":{"type":"string","enum":["USER","AMBASSADOR","TESTER","ADMIN","SUPERADMIN"],"example":"USER"},"email":{"type":"string","nullable":true,"format":"email","example":"user@example.com"},"phone":{"type":"string","nullable":true,"example":"+18186181349"},"waitlisted":{"type":"boolean","example":false},"acceptedPrivacyPolicy":{"type":"boolean","example":false},"acceptedAiDataPolicy":{"type":"boolean","example":false},"policiesAcceptedAt":{"type":"string","nullable":true,"example":"2024-01-01T00:00:00.000Z"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"profilePictures":{"type":"array","items":{"$ref":"#/components/schemas/ProfilePicture"},"description":"Ordered list of profile pictures","example":[]}},"required":["id","role","email","phone","waitlisted","acceptedPrivacyPolicy","acceptedAiDataPolicy","policiesAcceptedAt","createdAt","updatedAt"]},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"An error occurred"}},"required":["success","message"]},"UpdateProfileResponse":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/UserProfile"}},"required":["success","data"]},"UpdateProfile":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50},"gender":{"type":"string","enum":["MALE","FEMALE","NONBINARY"]},"birthday":{"type":"string","format":"date"},"heightInches":{"type":"integer","nullable":true,"minimum":36,"maximum":108},"occupation":{"type":"string","nullable":true,"maxLength":100},"educationLevel":{"type":"string","nullable":true,"enum":["HIGH_SCHOOL","SOME_COLLEGE","ASSOCIATES","BACHELORS","MASTERS","DOCTORATE","TRADE_SCHOOL"]},"relationshipTerm":{"type":"array","items":{"type":"string","enum":["LONG_TERM","SHORT_TERM"]}},"interestedIn":{"type":"array","items":{"type":"string","enum":["MALE","FEMALE","NONBINARY"]},"minItems":1},"ageRangeMin":{"type":"integer","nullable":true,"minimum":18,"maximum":100},"ageRangeMax":{"type":"integer","nullable":true,"minimum":18,"maximum":100},"dealbreaker":{"type":"boolean"},"appleAgeVerificationStatus":{"type":"string","enum":["VERIFIED_ADULT","FALLBACK_VERIFIED_ADULT","UNDERAGE","DECLINED","UNSUPPORTED","FAILED"]},"appleAgeVerificationLowerBound":{"type":"integer","nullable":true,"minimum":0,"maximum":150},"appleAgeVerificationUpperBound":{"type":"integer","nullable":true,"minimum":0,"maximum":150},"appleAgeVerificationDeclaration":{"type":"string","nullable":true,"enum":["SELF_DECLARED","GUARDIAN_DECLARED","UNKNOWN"]},"appleAgeVerificationParentalControls":{"type":"array","items":{"type":"string"}},"appleAgeVerificationUpdatedAt":{"type":"string","nullable":true,"format":"date-time"}}},"SuccessMessageResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Operation successful"}},"required":["success","message"]},"TokenPair":{"type":"object","properties":{"accessToken":{"type":"string","description":"Short-lived access token for API authentication","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"refreshToken":{"type":"string","description":"Long-lived refresh token for obtaining new access tokens","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"expiresIn":{"type":"number","description":"Access token expiration time in seconds","example":900}},"required":["accessToken","refreshToken","expiresIn"]},"AuthSuccessResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Authentication successful"},"data":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"tokens":{"$ref":"#/components/schemas/TokenPair"}},"required":["user","tokens"]}},"required":["success","message","data"]},"RefreshSuccessResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Tokens refreshed successfully"},"data":{"$ref":"#/components/schemas/TokenPair"}},"required":["success","message","data"]},"LLMModel":{"type":"object","properties":{"id":{"type":"string","example":"cm39model123"},"name":{"type":"string","example":"GPT-4"},"provider":{"type":"string","example":"OpenAI"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","name","provider","createdAt","updatedAt"]},"Bio":{"type":"object","properties":{"id":{"type":"string","example":"cm39bio123xyz"},"content":{"type":"string","example":"I love hiking and outdoor adventures..."},"userId":{"type":"string","example":"cm39user123"},"llmModelId":{"type":"string","example":"cm39model123"},"llmModel":{"$ref":"#/components/schemas/LLMModel"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","content","userId","llmModelId","createdAt","updatedAt"]},"BiosListResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Bio"}}},"required":["success","data"]},"BioLatestResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"allOf":[{"$ref":"#/components/schemas/Bio"},{"nullable":true,"description":"Latest bio for the user, or null when no bios exist yet","example":null}]}},"required":["success","data"]},"BioSingleResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Bio"}},"required":["success","data"]},"BioDeleteResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Bio deleted successfully"}},"required":["success","message"]},"Trait":{"type":"object","properties":{"id":{"type":"string","example":"cm39trait123"},"name":{"type":"string","example":"Adventurousness"},"category":{"type":"string","nullable":true,"example":"Personality"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","name","category","createdAt","updatedAt"]},"TraitEvidence":{"type":"object","properties":{"id":{"type":"string","example":"cm39traitevidence123"},"userTraitId":{"type":"string","example":"cm39usertrait123"},"sourceTable":{"type":"string","example":"YoutubeConnection"},"sourceType":{"type":"string","nullable":true,"example":"YouTubeLikedVideo"},"sourceId":{"type":"string","example":"ytvideo123"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","userTraitId","sourceTable","sourceType","sourceId","createdAt","updatedAt"]},"UserTrait":{"type":"object","properties":{"id":{"type":"string","example":"cm39usertrait123"},"userId":{"type":"string","example":"cm39user123"},"traitId":{"type":"string","example":"cm39trait123"},"value":{"type":"number","example":0.75},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","userId","traitId","value","createdAt","updatedAt"]},"UserTraitWithRelations":{"allOf":[{"$ref":"#/components/schemas/UserTrait"},{"type":"object","properties":{"trait":{"$ref":"#/components/schemas/Trait"},"evidences":{"type":"array","items":{"$ref":"#/components/schemas/TraitEvidence"}}},"required":["trait","evidences"]}]},"UserTraitsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserTraitWithRelations"},"example":[{"id":"cm39usertrait123","userId":"cm39user123","traitId":"cm39trait123","value":0.75,"createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-02T00:00:00.000Z","trait":{"id":"cm39trait123","name":"Adventurousness","category":"PERSONALITY","createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-02T00:00:00.000Z"},"evidences":[{"id":"cm39traitevidence123","userTraitId":"cm39usertrait123","sourceTable":"YoutubeConnection","sourceType":"YouTubeLikedVideo","sourceId":"ytvideo123","createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-01T00:00:00.000Z"}]}]}},"required":["success","data"]},"PresignProfilePictureUploadTarget":{"type":"object","properties":{"key":{"type":"string","example":"profile-pictures/user123/pic.jpg"},"uploadUrl":{"type":"string","format":"uri","example":"https://bucket.s3.amazonaws.com/profile-pictures/user123/pic.jpg?signature=..."},"publicUrl":{"type":"string","format":"uri","example":"https://cdn.example.com/profile-pictures/user123/pic.jpg"},"expiresIn":{"type":"integer","example":900}},"required":["key","uploadUrl","publicUrl","expiresIn"]},"PresignProfilePictureUploadRequest":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"contentType":{"type":"string","minLength":1,"description":"MIME type of the file to upload","example":"image/jpeg"}},"required":["contentType"]},"minItems":1,"maxItems":12,"description":"List of files requiring presigned upload URLs"}},"required":["files"]},"CreateProfilePicturesRequest":{"type":"object","properties":{"pictures":{"type":"array","items":{"type":"object","properties":{"storageKey":{"type":"string","minLength":1,"example":"profile-pictures/user123/1699900000000-abc123.jpg"}},"required":["storageKey"]},"minItems":1,"maxItems":12,"description":"Storage keys previously issued via presign endpoint"}},"required":["pictures"]},"ReorderProfilePicturesRequest":{"type":"object","properties":{"pictureIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"Profile picture IDs in the desired order"}},"required":["pictureIds"]},"DeleteProfilePicturesResponse":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"deletedPictureIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["success","message","deletedPictureIds"]},"DeleteProfilePicturesRequest":{"type":"object","properties":{"pictureIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"Profile picture IDs to delete"}},"required":["pictureIds"]},"PublicProfileTrait":{"type":"object","properties":{"name":{"type":"string","example":"Adventurousness"},"category":{"type":"string","nullable":true,"example":"PERSONALITY"},"value":{"type":"number","description":"Trait value from -1 to 1","example":0.75}},"required":["name","category","value"]},"PublicProfileLinkedSignal":{"type":"object","properties":{"provider":{"type":"string","enum":["YOUTUBE","PINTEREST","TWITTER","EVENTBRITE","TIKTOK","GOOGLE_CALENDAR","APPLE_MUSIC","CHATGPT","LOCATION","PHOTOS"],"example":"YOUTUBE"},"label":{"type":"string","example":"YouTube"}},"required":["provider","label"]},"PublicProfileInsight":{"type":"object","properties":{"id":{"type":"string","example":"what_might_click:shared_concept:fitness_and_health"},"section":{"type":"string","enum":["what_might_click","what_to_explore"],"example":"what_might_click"},"kind":{"type":"string","enum":["shared_concept","positive_complement","difference","possible_friction"],"example":"shared_concept"},"conceptKey":{"type":"string","example":"fitness_and_health"},"label":{"type":"string","example":"physical fitness"},"viewerTraits":{"type":"array","items":{"type":"string"},"example":["fitness-oriented"]},"viewedTraits":{"type":"array","items":{"type":"string"},"example":["athlete"]},"explanation":{"type":"string","example":"You both value physical fitness."},"askThemAbout":{"type":"string","example":"Are they training for something specific, or just for life?"}},"required":["id","section","kind","conceptKey","label","viewerTraits","viewedTraits","explanation","askThemAbout"]},"PublicProfileViewerContext":{"type":"object","nullable":true,"properties":{"compatibilityScore":{"type":"number","nullable":true,"description":"Deterministic compatibility score from 0 to 1.","example":0.964},"compatibilityDescription":{"type":"string","nullable":true,"description":"Deterministic compatibility summary.","example":"Strong compatibility. Both connect over fitness."},"sharedTraits":{"type":"array","items":{"type":"string"},"example":["fitness-oriented"]},"insights":{"type":"array","items":{"$ref":"#/components/schemas/PublicProfileInsight"},"description":"Deterministic profile insights for the viewing user and viewed user."}},"required":["compatibilityScore","compatibilityDescription","sharedTraits","insights"],"description":"Pair-specific deterministic context for the authenticated viewer"},"PublicProfile":{"type":"object","properties":{"id":{"type":"string","example":"cm39user123"},"publicProfileCode":{"type":"string","nullable":true,"description":"Unique shareable code for public profile URL","example":"RGgLkGmQbB"},"name":{"type":"string","nullable":true,"example":"Sarah"},"gender":{"type":"string","nullable":true,"enum":["MALE","FEMALE","NONBINARY"],"example":"FEMALE"},"birthday":{"type":"string","nullable":true,"example":"1995-06-15T00:00:00.000Z"},"heightInches":{"type":"integer","nullable":true,"example":65},"occupation":{"type":"string","nullable":true,"example":"Software Engineer"},"relationshipTerm":{"type":"array","items":{"type":"string","enum":["LONG_TERM","SHORT_TERM"]},"example":["LONG_TERM"]},"dealbreaker":{"type":"boolean","example":false},"bio":{"type":"string","nullable":true,"example":"I love hiking and outdoor adventures"},"profilePictures":{"type":"array","items":{"$ref":"#/components/schemas/ProfilePicture"},"description":"Profile pictures"},"traits":{"type":"array","items":{"$ref":"#/components/schemas/PublicProfileTrait"},"description":"Top 5 traits for this user"},"linkedSignals":{"type":"array","items":{"$ref":"#/components/schemas/PublicProfileLinkedSignal"},"description":"Connected signal providers visible on the public profile"},"viewerContext":{"$ref":"#/components/schemas/PublicProfileViewerContext"},"isRecentlyActive":{"type":"boolean","description":"Whether the user has been active within the last 7 days","example":true}},"required":["id","publicProfileCode","name","gender","birthday","heightInches","occupation","relationshipTerm","dealbreaker","bio","profilePictures","traits","linkedSignals","isRecentlyActive"]},"PublicProfileResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/PublicProfile"}},"required":["success","data"]},"AccessDeniedResponse":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Access denied"},"reason":{"type":"string","description":"Reason for access denial. 'profile_hidden' = compatibility below threshold. 'compatibility_pending' = score not yet computed. 'no_relationship' = no relationship exists.","example":"profile_hidden"}},"required":["success","message","reason"]},"MatchRequest":{"type":"object","properties":{"relationshipId":{"type":"string","example":"cm39rel123"},"profile":{"$ref":"#/components/schemas/PublicProfile"},"requestedAt":{"type":"string","description":"When the other user accepted (sent the match request)","example":"2025-01-15T10:30:00.000Z"},"isMutualMatch":{"type":"boolean","description":"True if both users have accepted each other","example":false},"threadId":{"type":"string","nullable":true,"description":"The chat thread ID if a conversation exists for this match","example":"cm39thread456"}},"required":["relationshipId","profile","requestedAt","isMutualMatch","threadId"]},"MatchRequestsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/MatchRequest"},"description":"List of incoming match requests"}},"required":["success","data"]},"SendMatchRequestResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Request sent"},"isMutualMatch":{"type":"boolean","example":false},"threadId":{"type":"string","nullable":true,"description":"Chat thread ID if a mutual match was created","example":null}},"required":["success","message","isMutualMatch","threadId"]},"SendMatchRequestBody":{"type":"object","properties":{"otherUserId":{"type":"string","minLength":1,"example":"cm39user456"}},"required":["otherUserId"]},"RespondMatchRequestResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Request accepted"},"isMutualMatch":{"type":"boolean","example":true},"threadId":{"type":"string","nullable":true,"description":"Chat thread ID if a mutual match was created","example":"cm39thread789"}},"required":["success","message","isMutualMatch","threadId"]},"RespondMatchRequestBody":{"type":"object","properties":{"action":{"type":"string","enum":["accept","decline"],"example":"accept"}},"required":["action"]},"DirectMatch":{"type":"object","properties":{"id":{"type":"string","example":"cm39dm123"},"requesterId":{"type":"string","example":"cm39user123"},"targetId":{"type":"string","example":"cm39user456"},"requesterStatus":{"type":"string","enum":["PENDING","ACCEPTED","DECLINED"],"example":"ACCEPTED"},"targetStatus":{"type":"string","enum":["PENDING","ACCEPTED","DECLINED"],"example":"PENDING"},"isRequester":{"type":"boolean","description":"Whether the current user is the requester of this direct match","example":true},"isMutualMatch":{"type":"boolean","description":"True if both users have accepted the direct match","example":false},"chatThreadId":{"type":"string","nullable":true,"description":"The chat thread ID for mutual matches, null if not yet created","example":"cm39thread123"},"profile":{"allOf":[{"$ref":"#/components/schemas/PublicProfile"},{"description":"Public profile of the other user in the direct match"}]},"createdAt":{"type":"string","example":"2025-01-15T10:30:00.000Z"},"updatedAt":{"type":"string","example":"2025-01-15T10:30:00.000Z"}},"required":["id","requesterId","targetId","requesterStatus","targetStatus","isRequester","isMutualMatch","chatThreadId","profile","createdAt","updatedAt"]},"DirectMatchesResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/DirectMatch"},"description":"List of direct matches"}},"required":["success","data"]},"SendDirectMatchResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Direct match request sent successfully"},"data":{"allOf":[{"$ref":"#/components/schemas/DirectMatch"},{"description":"The created or existing direct match"}]}},"required":["success","message"]},"SendDirectMatchRequest":{"type":"object","properties":{"identifier":{"type":"string","minLength":1,"description":"Phone number or email address of the user to send a direct match request to","example":"+18186181349"}},"required":["identifier"]},"RespondDirectMatchResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Direct match request accepted"},"data":{"allOf":[{"$ref":"#/components/schemas/DirectMatch"},{"description":"The updated direct match"}]}},"required":["success","message"]},"RespondDirectMatchRequest":{"type":"object","properties":{"action":{"type":"string","enum":["accept","decline"],"description":"The response action to take on the direct match request","example":"accept"}},"required":["action"]},"DiscoverMatch":{"type":"object","properties":{"relationshipId":{"type":"string","nullable":true,"example":"cm39rel123"},"otherUserId":{"type":"string","example":"cm39user456"},"profile":{"$ref":"#/components/schemas/PublicProfile"},"compatibilityScore":{"type":"number","nullable":true,"description":"Compatibility score from 0 to 1, or null if not yet calculated","example":0.85},"compatibilityDescription":{"type":"string","nullable":true,"description":"AI-generated explanation of the compatibility","example":"Both share a love for outdoor activities and have similar communication styles."},"matchReason":{"type":"string","nullable":true,"description":"LLM-generated description of why Cupid matched these two users, based on their bios and traits","example":"You both have a creative streak and a love for live music — your Pinterest boards and concert history tell the same story."},"sharedTraits":{"type":"array","items":{"type":"string"},"description":"Trait names shared between both users","example":["Adventurousness","Creativity"]},"requestStatus":{"type":"string","enum":["none","sent","received","accepted"],"description":"Status of the match request from the current user's perspective. Note: declined relationships are filtered out at the database level and never returned.","example":"none"},"recommendationType":{"type":"string","enum":["daily","discover"],"description":"How this profile was surfaced to the current user. Daily picks are generated by the scheduled refresh job.","example":"daily"},"timestamp":{"type":"string","description":"When the relationship was last updated","example":"2025-01-15T10:30:00.000Z"},"threadId":{"type":"string","nullable":true,"description":"The chat thread ID if a conversation exists","example":"cm39thread456"},"distanceMiles":{"type":"number","nullable":true,"description":"Approximate distance in miles from the current user's connected location to this user's connected location. Null when either user has no location.","example":12.4},"viewed":{"type":"boolean","description":"Whether the current user has viewed this profile","example":false}},"required":["relationshipId","otherUserId","profile","compatibilityScore","compatibilityDescription","matchReason","sharedTraits","requestStatus","recommendationType","timestamp","threadId","distanceMiles","viewed"]},"DiscoverResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/DiscoverMatch"},"description":"List of discover matches"}},"required":["success","data"]},"PassDiscoverProfileResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Profile passed"},"relationshipId":{"type":"string","description":"The relationship marked as rejected for the current user","example":"cm39rel123"}},"required":["success","message","relationshipId"]},"PassDiscoverProfileBody":{"type":"object","properties":{"otherUserId":{"type":"string","minLength":1,"description":"The discover profile user ID to pass on","example":"cm39user456"}},"required":["otherUserId"]},"PushNotificationToken":{"type":"object","properties":{"id":{"type":"string","example":"cm39abc123xyz"},"userId":{"type":"string","example":"cm39abc123xyz"},"token":{"type":"string","example":"fcm_token_here"},"deviceId":{"type":"string","nullable":true,"example":"device_123"},"platform":{"type":"string","enum":["IOS","ANDROID"],"example":"IOS"},"isActive":{"type":"boolean","example":true},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","userId","token","deviceId","platform","isActive","createdAt","updatedAt"]},"RegisterTokenResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Push notification token registered successfully"},"data":{"$ref":"#/components/schemas/PushNotificationToken"}},"required":["success","message","data"]},"UnregisterTokenResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Push notification token unregistered successfully"}},"required":["success","message"]},"PushNotificationStatus":{"type":"object","properties":{"hasActiveTokens":{"type":"boolean","example":true},"activeTokensCount":{"type":"number","example":1},"tokens":{"type":"array","items":{"$ref":"#/components/schemas/PushNotificationToken"},"description":"List of active push notification tokens"}},"required":["hasActiveTokens","activeTokensCount","tokens"]},"PushNotificationStatusResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/PushNotificationStatus"}},"required":["success","data"]},"PrivateProfileApiTokenSettings":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether a private profile API token is currently active","example":true},"createdAt":{"type":"string","nullable":true,"description":"When the current private profile API token was created or rotated","example":"2024-01-01T00:00:00.000Z"},"lastUsedAt":{"type":"string","nullable":true,"description":"When the current private profile API token was last used","example":"2024-01-02T00:00:00.000Z"}},"required":["enabled","createdAt","lastUsedAt"]},"UserSettings":{"type":"object","properties":{"id":{"type":"string","example":"cm39settings123"},"userId":{"type":"string","example":"cm39user123"},"publicProfileEnabled":{"type":"boolean","example":true},"publicProfileCode":{"type":"string","nullable":true,"example":"abc123xyz"},"dailyMatchPushNotificationsEnabled":{"type":"boolean","description":"Whether daily curated match push notifications are enabled","example":true},"privateProfileApiToken":{"$ref":"#/components/schemas/PrivateProfileApiTokenSettings"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","userId","publicProfileEnabled","publicProfileCode","dailyMatchPushNotificationsEnabled","privateProfileApiToken","createdAt","updatedAt"]},"UserSettingsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UserSettings"}},"required":["success","data"]},"UpdateUserSettings":{"type":"object","properties":{"publicProfileEnabled":{"type":"boolean","description":"Enable or disable public profile visibility","example":true},"dailyMatchPushNotificationsEnabled":{"type":"boolean","description":"Enable or disable daily curated match push notifications","example":true}}},"PrivateProfileApiTokenResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"token":{"type":"string","description":"Raw private profile API token. Returned only immediately after create/rotation.","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"settings":{"$ref":"#/components/schemas/UserSettings"}},"required":["token","settings"]}},"required":["success","data"]},"RevokePrivateProfileApiTokenResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UserSettings"}},"required":["success","data"]},"BlockUserResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"User blocked successfully"}},"required":["success","message"]},"BlockUserRequest":{"type":"object","properties":{"blockedUserId":{"type":"string","minLength":1,"description":"The ID of the user to block","example":"cm39user456"}},"required":["blockedUserId"]},"UnblockUserResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"User unblocked successfully"}},"required":["success","message"]},"UnblockUserRequest":{"type":"object","properties":{"blockedUserId":{"type":"string","minLength":1,"description":"The ID of the user to unblock","example":"cm39user456"}},"required":["blockedUserId"]},"BlockedUser":{"type":"object","properties":{"id":{"type":"string","example":"cm39block123"},"blockedId":{"type":"string","example":"cm39user456"},"profile":{"$ref":"#/components/schemas/PublicProfile"},"createdAt":{"type":"string","example":"2025-01-15T10:30:00.000Z"}},"required":["id","blockedId","profile","createdAt"]},"BlockedUsersResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/BlockedUser"},"description":"List of blocked users"}},"required":["success","data"]},"ReportUserResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"User reported successfully"}},"required":["success","message"]},"ReportUserRequest":{"type":"object","properties":{"reportedUserId":{"type":"string","minLength":1,"description":"The ID of the user to report","example":"cm39user456"},"reason":{"type":"string","enum":["INAPPROPRIATE_CONTENT","HARASSMENT","FAKE_PROFILE","SPAM","UNDERAGE","OTHER"],"description":"Reason for reporting the user","example":"HARASSMENT"},"description":{"type":"string","maxLength":500,"description":"Additional details about the report","example":"This user sent me inappropriate messages"},"autoBlock":{"type":"boolean","default":true,"description":"Whether to also block the reported user (default: true)","example":true}},"required":["reportedUserId","reason"]},"RecordProfileViewResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Profile view recorded"}},"required":["success","message"]},"RecordProfileViewRequest":{"type":"object","properties":{"viewedUserId":{"type":"string","minLength":1,"description":"The ID of the user whose profile was viewed","example":"cm39user456"}},"required":["viewedUserId"]},"ActivityTrait":{"type":"object","properties":{"name":{"type":"string","example":"Beach Lover"},"evidenceSources":{"type":"array","items":{"type":"string"},"description":"Sources that support the trait","example":["Photos","Location"]}},"required":["name","evidenceSources"]},"ActivityItem":{"type":"object","properties":{"id":{"type":"string","example":"cm39abc123xyz"},"source":{"type":"string","enum":["generation","event"],"example":"generation"},"type":{"type":"string","example":"BIO"},"description":{"type":"string","nullable":true,"description":"Backend-provided description (resultSummary or event message). May be null for generation items with no summary.","example":"Cupid's learned more about you, and adjusted your bio accordingly."},"actionPath":{"type":"string","nullable":true,"description":"Optional in-app navigation path for activity items that should open a specific destination.","example":"/messages?thread=cm39abc123xyz"},"bioContent":{"type":"string","nullable":true,"description":"Full generated bio text for BIO generation items. Included so each activity card can show the bio from that event rather than the latest bio.","example":"Alex is a thoughtful city explorer who..."},"dailyMatchNames":{"type":"array","items":{"type":"string"},"description":"Display names for DAILY_MATCHES event items.","example":["Jordan","Taylor","Sam"]},"traits":{"type":"array","items":{"$ref":"#/components/schemas/ActivityTrait"},"description":"Structured trait details for TRAITS generation items after duplicate trait names have been removed from the feed."},"isRead":{"type":"boolean","example":true},"relatedUserName":{"type":"string","nullable":true,"example":"Taylor"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","source","type","description","isRead","relatedUserName","createdAt"]},"ActivityResponse":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ActivityItem"},"description":"List of activity items"}},"required":["success","data"]},"UserApiUser":{"type":"object","properties":{"id":{"type":"string","example":"cm39user123"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","createdAt","updatedAt"]},"UserApiMe":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/UserApiUser"},"profile":{"$ref":"#/components/schemas/UserProfile"},"age":{"type":"integer","nullable":true,"example":29},"profileComplete":{"type":"boolean","example":true},"latestBio":{"allOf":[{"$ref":"#/components/schemas/Bio"},{"nullable":true}]},"topTraits":{"type":"array","items":{"$ref":"#/components/schemas/PublicProfileTrait"}},"linkedSignals":{"type":"array","items":{"$ref":"#/components/schemas/PublicProfileLinkedSignal"}},"generatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["user","profile","age","profileComplete","latestBio","topTraits","linkedSignals","generatedAt"]},"UserApiMeResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UserApiMe"}},"required":["success","data"]},"UserApiPagination":{"type":"object","properties":{"limit":{"type":"integer","example":25},"nextCursor":{"type":"string","nullable":true,"example":"50"},"offset":{"type":"integer","example":25}},"required":["limit","nextCursor","offset"]},"UserApiBiosResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Bio"}},"pagination":{"$ref":"#/components/schemas/UserApiPagination"}},"required":["success","data","pagination"]},"UserApiLatestBioResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"allOf":[{"$ref":"#/components/schemas/Bio"},{"nullable":true}]}},"required":["success","data"]},"UserApiTraitsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserTraitWithRelations"}},"pagination":{"$ref":"#/components/schemas/UserApiPagination"}},"required":["success","data","pagination"]},"UserApiProfilePicturesResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProfilePicture"}},"pagination":{"$ref":"#/components/schemas/UserApiPagination"}},"required":["success","data","pagination"]},"DataConnection":{"type":"object","properties":{"id":{"type":"string","example":"cm39conn123xyz"},"userId":{"type":"string","example":"cm39user123"},"provider":{"type":"string","enum":["YOUTUBE","PINTEREST","TWITTER","EVENTBRITE","TIKTOK","GOOGLE_CALENDAR","APPLE_MUSIC","CHATGPT","LOCATION","PHOTOS"],"example":"YOUTUBE"},"status":{"type":"string","enum":["CONNECTED","DISCONNECTED","ERROR","PENDING"],"example":"CONNECTED"},"lastSyncedAt":{"type":"string","nullable":true,"example":"2024-01-01T00:00:00.000Z"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","userId","provider","status","lastSyncedAt","createdAt","updatedAt"]},"UserApiDataConnectionsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/DataConnection"}}},"required":["success","data"]},"UserApiCompatibility":{"type":"object","properties":{"id":{"type":"string","example":"cm39compat123"},"otherUserId":{"type":"string","example":"cm39user456"},"score":{"type":"number","example":0.87},"areProfilesAligned":{"type":"boolean","example":true},"description":{"type":"string","nullable":true,"example":"Strong compatibility"},"matchReason":{"type":"string","nullable":true,"example":"You both value creative weekends."},"traitContributions":{"nullable":true,"description":"Stored trait contribution details for this compatibility record."},"alignmentDetails":{"nullable":true,"description":"Stored profile alignment details for this compatibility record."},"staleAt":{"type":"string","nullable":true,"example":null},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"profile":{"allOf":[{"$ref":"#/components/schemas/PublicProfile"},{"nullable":true}]}},"required":["id","otherUserId","score","areProfilesAligned","description","matchReason","staleAt","createdAt","updatedAt","profile"]},"UserApiCompatibilitiesResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserApiCompatibility"}},"pagination":{"$ref":"#/components/schemas/UserApiPagination"}},"required":["success","data","pagination"]},"UserApiDiscoverResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/DiscoverMatch"}},"pagination":{"$ref":"#/components/schemas/UserApiPagination"}},"required":["success","data","pagination"]},"UserApiMatchRequestsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/MatchRequest"}},"pagination":{"$ref":"#/components/schemas/UserApiPagination"}},"required":["success","data","pagination"]},"ThreadParticipantPreview":{"type":"object","properties":{"userId":{"type":"string","nullable":true,"example":"cmj0user456"},"name":{"type":"string","nullable":true,"example":"Taylor"}},"required":["userId","name"]},"ChatThreadMessage":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cmj0message123"},"threadId":{"type":"string","example":"cmj0thread123"},"senderType":{"type":"string","enum":["USER","BOT"],"description":"Origin of the chat message","example":"BOT"},"userId":{"type":"string","nullable":true,"description":"User id when sender is a user","example":"cmj0user456"},"content":{"type":"string","example":"Welcome back!"},"metadata":{"nullable":true,"example":{"action":{"type":"suggest","relationshipId":"cmj0relationship123"}}},"createdAt":{"type":"string","example":"2025-11-16T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2025-11-16T01:00:00.000Z"},"user":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cmj0user456"},"name":{"type":"string","nullable":true,"example":"Taylor"}},"required":["id","name"]}},"required":["id","threadId","senderType","userId","content","createdAt","updatedAt"],"description":"Most recent message in the thread"},"ThreadListItem":{"type":"object","properties":{"id":{"type":"string","example":"cmj0thread123"},"type":{"type":"string","enum":["SOLO","MULTI","SUPPORT"],"description":"Type of chat thread","example":"SOLO"},"relationshipId":{"type":"string","nullable":true,"description":"The relationship this thread belongs to (for MULTI threads)","example":"cmj0relationship456"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/ThreadParticipantPreview"},"description":"List of participants in the thread"},"lastMessage":{"$ref":"#/components/schemas/ChatThreadMessage"},"unreadCount":{"type":"number","description":"Number of unread messages (placeholder, always 0 for now)","example":0},"createdAt":{"type":"string","example":"2025-11-16T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2025-11-16T01:00:00.000Z"}},"required":["id","type","relationshipId","participants","lastMessage","unreadCount","createdAt","updatedAt"]},"ThreadListResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"threads":{"type":"array","items":{"$ref":"#/components/schemas/ThreadListItem"}},"pagination":{"type":"object","properties":{"page":{"type":"number","example":1},"limit":{"type":"number","example":20},"total":{"type":"number","example":5},"hasMore":{"type":"boolean","example":false}},"required":["page","limit","total","hasMore"]}},"required":["threads","pagination"]}},"required":["success","data"]},"SoloChatMetadata":{"type":"object","properties":{"id":{"type":"string","example":"cmj0metadata123"},"userId":{"type":"string","example":"cmj0user123"},"status":{"type":"string","enum":["ONBOARDING","EXPLORING_MATCHES","FOCUSED_MATCH"],"description":"State of the solo chat experience","example":"EXPLORING_MATCHES"},"context":{"nullable":true,"description":"Focused match context when Cupid is zeroing in on someone","example":{"focusedRelationshipId":"cmj0relationship123","otherUserName":"Jordan"}},"createdAt":{"type":"string","example":"2025-11-16T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2025-11-16T01:00:00.000Z"}},"required":["id","userId","status","createdAt","updatedAt"]},"RelationshipTraitHighlight":{"type":"object","properties":{"name":{"type":"string","example":"Creative spark"},"score":{"type":"number","example":0.92},"evidence":{"type":"array","items":{"type":"string","example":"YouTube liked videos"},"description":"Short labels summarizing supporting evidence"}},"required":["name","score","evidence"]},"SoloRelationshipSummary":{"type":"object","properties":{"id":{"type":"string","example":"cmj0relationship123"},"otherUserId":{"type":"string","example":"cmj0user789"},"otherUserName":{"type":"string","nullable":true,"description":"Display name of the other user","example":"Taylor"},"status":{"type":"string","enum":["NOT_INITIATED","DISCOVER_SUGGESTED","DAILY_SUGGESTED","SUGGESTED","ACCEPTED","REJECTED"],"description":"Current status of the relationship","example":"SUGGESTED"},"occupation":{"type":"string","nullable":true,"example":"Community Manager"},"bioSnippet":{"type":"string","nullable":true,"description":"Short introduction pulled from the user's bio","example":"Emily blends community-building with a love for live music and beach days."},"traits":{"type":"array","items":{"$ref":"#/components/schemas/RelationshipTraitHighlight"}}},"required":["id","otherUserId","otherUserName","status"]},"SoloChatContext":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/SoloChatMetadata"},"relationships":{"type":"array","items":{"$ref":"#/components/schemas/SoloRelationshipSummary"}}},"required":["metadata","relationships"],"description":"Cupid solo chat context, present for SOLO threads"},"ThreadMessagesResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"threadId":{"type":"string","example":"cmj0thread123"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatThreadMessage"}},"participants":{"type":"array","items":{"$ref":"#/components/schemas/ThreadParticipantPreview"}},"hasMore":{"type":"boolean","description":"Whether older messages exist","example":true},"context":{"$ref":"#/components/schemas/SoloChatContext"}},"required":["threadId","messages","participants","hasMore"]}},"required":["success","data"]},"DataConnectionsListResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/DataConnection"}}},"required":["success","data"]},"DataConnectionWithData":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cm39conn123xyz"},"userId":{"type":"string","example":"cm39user123"},"provider":{"type":"string","enum":["YOUTUBE","PINTEREST","TWITTER","EVENTBRITE","TIKTOK","GOOGLE_CALENDAR","APPLE_MUSIC","CHATGPT","LOCATION","PHOTOS"],"example":"YOUTUBE"},"status":{"type":"string","enum":["CONNECTED","DISCONNECTED","ERROR","PENDING"],"example":"CONNECTED"},"lastSyncedAt":{"type":"string","nullable":true,"example":"2024-01-01T00:00:00.000Z"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"data":{"oneOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["YOUTUBE"]},"data":{"type":"object","properties":{"channelId":{"type":"string","nullable":true},"channelName":{"type":"string","nullable":true},"subscriberCount":{"type":"number","nullable":true},"videoCount":{"type":"number","nullable":true},"viewCount":{"type":"number","nullable":true},"subscribedChannels":{"type":"array","nullable":true,"items":{"type":"string"}},"likedVideos":{"type":"array","nullable":true,"items":{"type":"object","properties":{"videoId":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"url":{"type":"string","nullable":true,"format":"uri"}},"required":["videoId","title","description","publishedAt","thumbnailPath","url"]}},"playlists":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["channelId","channelName","subscriberCount","videoCount","viewCount","subscribedChannels","likedVideos","playlists"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["PINTEREST"]},"data":{"type":"object","properties":{"accountId":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"fullName":{"type":"string","nullable":true},"followerCount":{"type":"number","nullable":true},"followingCount":{"type":"number","nullable":true},"boardCount":{"type":"number","nullable":true},"pinCount":{"type":"number","nullable":true},"profileImageUrl":{"type":"string","nullable":true,"format":"uri"},"boards":{"type":"array","nullable":true,"items":{"type":"object","properties":{"boardId":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true,"format":"uri"},"coverImageUrl":{"type":"string","nullable":true,"format":"uri"},"pinCount":{"type":"number","nullable":true},"isSecret":{"type":"boolean","nullable":true}},"required":["boardId","name","description","url","coverImageUrl","pinCount","isSecret"]}},"pins":{"type":"array","nullable":true,"items":{"type":"object","properties":{"pinId":{"type":"string"},"boardId":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"altText":{"type":"string","nullable":true},"mediaUrl":{"type":"string","nullable":true,"format":"uri"},"mediaType":{"type":"string","nullable":true},"mediaWidth":{"type":"number","nullable":true},"mediaHeight":{"type":"number","nullable":true},"mediaDominantColor":{"type":"string","nullable":true},"link":{"type":"string","nullable":true,"format":"uri"},"localMediaPath":{"type":"string","nullable":true},"savedAt":{"type":"string","nullable":true}},"required":["pinId","boardId","title","description","altText","mediaUrl","mediaType","mediaWidth","mediaHeight","mediaDominantColor","link","localMediaPath","savedAt"]}},"interests":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string"},"category":{"type":"string","nullable":true}},"required":["id","name","category"]}}},"required":["accountId","username","fullName","followerCount","followingCount","boardCount","pinCount","profileImageUrl","boards","pins","interests"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["TWITTER"]},"data":{"type":"object","properties":{"twitterId":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"profileBio":{"type":"string","nullable":true},"profileLocation":{"type":"string","nullable":true},"profileUrl":{"type":"string","nullable":true},"profileImageUrl":{"type":"string","nullable":true},"profileBannerUrl":{"type":"string","nullable":true},"accountCreatedAt":{"type":"string","nullable":true},"isProtected":{"type":"boolean","nullable":true},"followerCount":{"type":"number","nullable":true},"followingCount":{"type":"number","nullable":true},"tweetCount":{"type":"number","nullable":true},"verified":{"type":"boolean","nullable":true},"verifiedType":{"type":"string","nullable":true},"isIdentityVerified":{"type":"boolean","nullable":true},"pinnedTweetId":{"type":"string","nullable":true},"tweets":{"type":"array","nullable":true,"items":{"type":"object","properties":{"tweetId":{"type":"string"},"text":{"type":"string"},"authorId":{"type":"string","nullable":true},"tweetCreatedAt":{"type":"string","nullable":true},"likeCount":{"type":"number","nullable":true},"retweetCount":{"type":"number","nullable":true},"replyCount":{"type":"number","nullable":true},"quoteCount":{"type":"number","nullable":true},"language":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"sourceTypes":{"type":"array","nullable":true,"items":{"type":"string"}},"conversationId":{"type":"string","nullable":true},"noteText":{"type":"string","nullable":true},"possiblySensitive":{"type":"boolean","nullable":true},"mediaKeys":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["tweetId","text","authorId","tweetCreatedAt","likeCount","retweetCount","replyCount","quoteCount","language","source","sourceTypes","conversationId","noteText","possiblySensitive","mediaKeys"]}},"followedAccounts":{"type":"array","nullable":true,"items":{"type":"string"}},"likedTweets":{"type":"array","nullable":true,"items":{"type":"string"}},"bookmarkedTweets":{"type":"array","nullable":true,"items":{"type":"string"}},"interests":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["twitterId","username","displayName","profileBio","profileLocation","profileUrl","profileImageUrl","profileBannerUrl","accountCreatedAt","isProtected","followerCount","followingCount","tweetCount","verified","verifiedType","isIdentityVerified","pinnedTweetId","tweets","followedAccounts","likedTweets","bookmarkedTweets","interests"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["APPLE_MUSIC"]},"data":{"type":"object","properties":{"appleMusicId":{"type":"string","nullable":true},"topArtists":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"topAlbums":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"artistName":{"type":"string","nullable":true},"genres":{"type":"array","nullable":true,"items":{"type":"string"}},"trackCount":{"type":"number","nullable":true},"dateAdded":{"type":"string","nullable":true},"releaseDate":{"type":"string","nullable":true},"artworkUrl":{"type":"string","nullable":true}},"required":["id","name"]}},"topSongs":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"artistName":{"type":"string","nullable":true},"albumName":{"type":"string","nullable":true},"genres":{"type":"array","nullable":true,"items":{"type":"string"}},"durationMs":{"type":"number","nullable":true},"trackNumber":{"type":"number","nullable":true},"releaseDate":{"type":"string","nullable":true},"artworkUrl":{"type":"string","nullable":true}},"required":["id","name"]}},"playlists":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"dateAdded":{"type":"string","nullable":true},"lastModifiedDate":{"type":"string","nullable":true},"isPublic":{"type":"boolean","nullable":true},"artworkUrl":{"type":"string","nullable":true}},"required":["id","name"]}},"recentlyPlayed":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"artistName":{"type":"string","nullable":true},"albumName":{"type":"string","nullable":true},"genres":{"type":"array","nullable":true,"items":{"type":"string"}},"durationMs":{"type":"number","nullable":true},"trackNumber":{"type":"number","nullable":true},"releaseDate":{"type":"string","nullable":true},"artworkUrl":{"type":"string","nullable":true}},"required":["id","name"]}},"genres":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["appleMusicId","topArtists","topAlbums","topSongs","playlists","recentlyPlayed","genres"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["PHOTOS"]},"data":{"type":"object","properties":{"photoCount":{"type":"number"},"photos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"storageKey":{"type":"string"},"url":{"type":"string","nullable":true},"originalName":{"type":"string","nullable":true},"analysisStatus":{"type":"string","enum":["PENDING","ANALYZING","COMPLETED","FAILED"]},"analysisSummary":{"type":"string","nullable":true},"uploadedAt":{"type":"string"}},"required":["id","storageKey","url","originalName","analysisStatus","analysisSummary","uploadedAt"]}}},"required":["photoCount","photos"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["TIKTOK"]},"data":{"type":"object","properties":{"tiktokId":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"avatarUrl":{"type":"string","nullable":true,"format":"uri"},"followerCount":{"type":"number","nullable":true},"followingCount":{"type":"number","nullable":true},"likeCount":{"type":"number","nullable":true},"videoCount":{"type":"number","nullable":true},"bioDescription":{"type":"string","nullable":true},"isVerified":{"type":"boolean","nullable":true},"videos":{"type":"array","nullable":true,"items":{"type":"object","properties":{"videoId":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"duration":{"type":"number","nullable":true},"coverImageUrl":{"type":"string","nullable":true,"format":"uri"},"embedLink":{"type":"string","nullable":true,"format":"uri"},"likeCount":{"type":"number","nullable":true},"commentCount":{"type":"number","nullable":true},"shareCount":{"type":"number","nullable":true},"viewCount":{"type":"number","nullable":true},"createdAt":{"type":"string","nullable":true}},"required":["videoId","title","description","duration","coverImageUrl","embedLink","likeCount","commentCount","shareCount","viewCount","createdAt"]}},"likedVideos":{"type":"array","nullable":true,"items":{"type":"string"}},"followedAccounts":{"type":"array","nullable":true,"items":{"type":"string"}},"interests":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["tiktokId","username","displayName","avatarUrl","followerCount","followingCount","likeCount","videoCount","bioDescription","isVerified","videos","likedVideos","followedAccounts","interests"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["EVENTBRITE"]},"data":{"type":"object","properties":{"eventbriteId":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"attendedEvents":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"startTime":{"type":"string","nullable":true},"endTime":{"type":"string","nullable":true},"venue":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"isOnline":{"type":"boolean","nullable":true},"isFree":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true}},"required":["id","name","description","startTime","endTime","venue","category","isOnline","isFree","url"]}},"upcomingEvents":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"startTime":{"type":"string","nullable":true},"endTime":{"type":"string","nullable":true},"venue":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"isOnline":{"type":"boolean","nullable":true},"isFree":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true}},"required":["id","name","description","startTime","endTime","venue","category","isOnline","isFree","url"]}},"eventCategories":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["eventbriteId","email","attendedEvents","upcomingEvents","eventCategories"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["GOOGLE_CALENDAR"]},"data":{"type":"object","properties":{"email":{"type":"string","nullable":true},"primaryCalendarId":{"type":"string","nullable":true},"calendars":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"isPrimary":{"type":"boolean","nullable":true},"timeZone":{"type":"string","nullable":true},"backgroundColor":{"type":"string","nullable":true}},"required":["id","name","description","isPrimary","timeZone","backgroundColor"]}},"upcomingEvents":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"startTime":{"type":"string","nullable":true},"endTime":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"isAllDay":{"type":"boolean","nullable":true},"recurrence":{"type":"array","nullable":true,"items":{"type":"string"}},"attendees":{"type":"number","nullable":true}},"required":["id","title","description","startTime","endTime","location","isAllDay","recurrence","attendees"]}},"recurringEvents":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"startTime":{"type":"string","nullable":true},"endTime":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"isAllDay":{"type":"boolean","nullable":true},"recurrence":{"type":"array","nullable":true,"items":{"type":"string"}},"attendees":{"type":"number","nullable":true}},"required":["id","title","description","startTime","endTime","location","isAllDay","recurrence","attendees"]}},"eventCategories":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["email","primaryCalendarId","calendars","upcomingEvents","recurringEvents","eventCategories"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["LOCATION"]},"data":{"type":"object","properties":{"currentCity":{"type":"string","nullable":true},"currentState":{"type":"string","nullable":true},"currentCountry":{"type":"string","nullable":true},"currentLatitude":{"type":"number","nullable":true},"currentLongitude":{"type":"number","nullable":true},"frequentLocations":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"visits":{"type":"number"}},"required":["name","lat","lng","visits"]}},"recentLocations":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"timestamp":{"type":"string"}},"required":["name","lat","lng","timestamp"]}},"homeLocation":{"type":"object","nullable":true,"properties":{"address":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"}},"required":["address","lat","lng"]},"workLocation":{"type":"object","nullable":true,"properties":{"address":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"}},"required":["address","lat","lng"]}},"required":["currentCity","currentState","currentCountry","currentLatitude","currentLongitude","frequentLocations","recentLocations","homeLocation","workLocation"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["CHATGPT"]},"data":{"type":"object","properties":{"openaiId":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"conversationTopics":{"type":"array","nullable":true,"items":{"type":"string"}},"customInstructions":{"type":"string","nullable":true},"pluginsUsed":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["openaiId","email","conversationTopics","customInstructions","pluginsUsed"]}},"required":["provider","data"]},{"nullable":true}]}},"required":["id","userId","provider","status","lastSyncedAt","createdAt","updatedAt","data"]},"DataConnectionSingleResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/DataConnectionWithData"}},"required":["success","data"]},"ConnectDataSourceResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Data source connected successfully"},"data":{"$ref":"#/components/schemas/DataConnection"}},"required":["success","message","data"]},"DisconnectDataSourceResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Data source disconnected successfully"}},"required":["success","message"]},"ChatMemory":{"type":"object","properties":{"id":{"type":"string","example":"cmj0memory123"},"userId":{"type":"string","example":"cmj0user123"},"value":{"type":"string","description":"The extracted memory content from chat conversation","example":"User prefers hiking in the mountains on weekends"},"category":{"type":"string","nullable":true,"description":"Category of the memory (preferences, dealbreakers, context)","example":"preferences"},"source":{"type":"string","description":"Where the memory was created from (api or langgraph)","example":"langgraph"},"evidenceId":{"type":"string","nullable":true,"description":"Reference to the chat message this memory was extracted from (optional for langgraph memories)","example":"cmj0message456"},"createdAt":{"type":"string","example":"2025-11-29T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2025-11-29T01:00:00.000Z"}},"required":["id","userId","value","category","source","evidenceId","createdAt","updatedAt"]},"ChatMemoryWithEvidence":{"allOf":[{"$ref":"#/components/schemas/ChatMemory"},{"type":"object","properties":{"evidence":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cmj0message456"},"content":{"type":"string","example":"I love hiking in the mountains every weekend"},"createdAt":{"type":"string","example":"2025-11-29T00:00:00.000Z"}},"required":["id","content","createdAt"],"description":"The source chat message this memory was extracted from (null for langgraph memories)"}},"required":["evidence"]}]},"ChatMemoriesListResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"memories":{"type":"array","items":{"$ref":"#/components/schemas/ChatMemoryWithEvidence"}},"pagination":{"type":"object","properties":{"page":{"type":"number","example":1},"limit":{"type":"number","example":20},"total":{"type":"number","example":42},"hasMore":{"type":"boolean","example":true}},"required":["page","limit","total","hasMore"]}},"required":["memories","pagination"]}},"required":["success","data"]},"DeleteChatMemoryResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"deleted":{"type":"boolean","example":true}},"required":["deleted"]}},"required":["success","data"]},"DeleteAllChatMemoriesResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"deleted":{"type":"number","description":"Number of memories deleted","example":12}},"required":["deleted"]}},"required":["success","data"]},"SendThreadMessageResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"threadId":{"type":"string","example":"cmj0thread123"},"message":{"$ref":"#/components/schemas/ChatThreadMessage"},"assistantMessage":{"allOf":[{"$ref":"#/components/schemas/ChatThreadMessage"},{"description":"Only present for SOLO threads where the assistant responds"}]}},"required":["threadId","message"]}},"required":["success","data"]},"SendThreadMessageBody":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":4000,"example":"Hey! Nice to meet you"},"clientContext":{"type":"object","properties":{"activeSuggestion":{"type":"object","properties":{"userId":{"type":"string","description":"The suggested profile currently in view in the client","example":"cmj0user789"},"relationshipId":{"type":"string","nullable":true,"description":"The relationship ID for the active suggestion, when known","example":"cmj0relationship123"}}},"decision":{"type":"object","properties":{"type":{"type":"string","enum":["accept","reject"],"description":"Explicit decision made through a card control","example":"accept"},"userId":{"type":"string","description":"The suggested user the decision applies to","example":"cmj0user789"},"relationshipId":{"type":"string","nullable":true,"description":"The relationship the decision applies to, when known","example":"cmj0relationship123"}},"required":["type"]}},"description":"Structured client context for solo chat routing. This is not displayed as message text."}},"required":["content"]},"AdminUserListItem":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"Null when the row is redacted for a protected search match","example":"cm39abc123xyz"},"email":{"type":"string","nullable":true,"format":"email","example":"user@example.com"},"phone":{"type":"string","nullable":true,"example":"+18186181349"},"name":{"type":"string","nullable":true,"description":"Name from user profile","example":"John Doe"},"profilePictureUrl":{"type":"string","nullable":true,"example":"https://cdn.example.com/profile.jpg"},"profilePictureCount":{"type":"integer","nullable":true,"minimum":0,"example":2},"profileComplete":{"type":"boolean","nullable":true,"example":true},"missingSignupFields":{"type":"array","items":{"type":"string"},"example":["birthday","profile picture"]},"soloChatThreadId":{"type":"string","nullable":true,"description":"Cupid solo chat thread ID","example":"cm39thread123xyz"},"role":{"type":"string","nullable":true,"enum":["USER","AMBASSADOR","TESTER","ADMIN","SUPERADMIN"],"example":"USER"},"requiresSuperadminToView":{"type":"boolean","example":false},"redacted":{"type":"boolean","description":"True when only the existence of a protected search match may be shown","example":false},"createdAt":{"type":"string","nullable":true,"example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","nullable":true,"example":"2024-01-01T00:00:00.000Z"}},"required":["id","email","phone","name","profilePictureUrl","profilePictureCount","profileComplete","missingSignupFields","soloChatThreadId","role","requiresSuperadminToView","redacted","createdAt","updatedAt"]},"PaginationMeta":{"type":"object","properties":{"page":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":20},"total":{"type":"integer","minimum":0,"example":150},"totalPages":{"type":"integer","minimum":0,"example":8},"hasNextPage":{"type":"boolean","example":true},"hasPrevPage":{"type":"boolean","example":false}},"required":["page","limit","total","totalPages","hasNextPage","hasPrevPage"]},"AdminUserListResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserListItem"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["success","data","meta"]},"AdminUserApiUsageUser":{"type":"object","properties":{"id":{"type":"string","example":"cm39abc123xyz"},"email":{"type":"string","nullable":true,"format":"email","example":"user@example.com"},"phone":{"type":"string","nullable":true,"example":"+18186181349"},"name":{"type":"string","nullable":true,"example":"John Doe"}},"required":["id","email","phone","name"]},"AdminUserApiUsageEvent":{"type":"object","properties":{"id":{"type":"string","example":"cm39usage123xyz"},"userId":{"type":"string","example":"cm39abc123xyz"},"method":{"type":"string","example":"GET"},"path":{"type":"string","example":"/user-api/bios/latest"},"statusCode":{"type":"integer","example":200},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"user":{"$ref":"#/components/schemas/AdminUserApiUsageUser"}},"required":["id","userId","method","path","statusCode","createdAt","user"]},"AdminUserApiUsageSummary":{"type":"object","properties":{"totalEvents":{"type":"integer","minimum":0,"example":120},"activeTokenUsers":{"type":"integer","minimum":0,"example":7},"uniqueUsersWithEvents":{"type":"integer","minimum":0,"example":5},"requestsToday":{"type":"integer","minimum":0,"example":12},"requestsLast7Days":{"type":"integer","minimum":0,"example":43}},"required":["totalEvents","activeTokenUsers","uniqueUsersWithEvents","requestsToday","requestsLast7Days"]},"AdminUserApiUsageResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserApiUsageEvent"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"summary":{"$ref":"#/components/schemas/AdminUserApiUsageSummary"}},"required":["success","data","meta","summary"]},"AdminUserProfile":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string","nullable":true},"gender":{"type":"string","nullable":true,"enum":["MALE","FEMALE","NONBINARY"]},"birthday":{"type":"string","nullable":true},"heightInches":{"type":"number","nullable":true},"occupation":{"type":"string","nullable":true},"educationLevel":{"type":"string","nullable":true,"enum":["HIGH_SCHOOL","SOME_COLLEGE","ASSOCIATES","BACHELORS","MASTERS","DOCTORATE","TRADE_SCHOOL"]},"relationshipTerm":{"type":"array","items":{"type":"string","enum":["LONG_TERM","SHORT_TERM"]}},"interestedIn":{"type":"array","items":{"type":"string","enum":["MALE","FEMALE","NONBINARY"]}},"ageRangeMin":{"type":"number","nullable":true},"ageRangeMax":{"type":"number","nullable":true},"dealbreaker":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","name","gender","birthday","heightInches","occupation","educationLevel","relationshipTerm","interestedIn","ageRangeMin","ageRangeMax","dealbreaker","createdAt","updatedAt"]},"AdminProfilePicture":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"storageKey":{"type":"string"},"url":{"type":"string"},"position":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","storageKey","url","position","createdAt","updatedAt"]},"AdminLLMModel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","provider","createdAt","updatedAt"]},"AdminBio":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"userId":{"type":"string"},"llmModelId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"llmModel":{"$ref":"#/components/schemas/AdminLLMModel"}},"required":["id","content","userId","llmModelId","createdAt","updatedAt","llmModel"]},"AdminTrait":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","nullable":true}},"required":["id","name","category"]},"AdminUserTrait":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"traitId":{"type":"string"},"value":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"trait":{"$ref":"#/components/schemas/AdminTrait"}},"required":["id","userId","traitId","value","createdAt","updatedAt","trait"]},"AdminDataConnection":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"provider":{"type":"string","enum":["YOUTUBE","PINTEREST","TWITTER","EVENTBRITE","TIKTOK","GOOGLE_CALENDAR","APPLE_MUSIC","CHATGPT","LOCATION","PHOTOS"]},"status":{"type":"string","enum":["CONNECTED","DISCONNECTED","ERROR","PENDING"]},"lastSyncedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","provider","status","lastSyncedAt","createdAt","updatedAt"]},"AdminCompatibility":{"type":"object","properties":{"id":{"type":"string"},"userOneId":{"type":"string"},"userTwoId":{"type":"string"},"score":{"type":"number"},"areProfilesAligned":{"type":"boolean"},"description":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userOneId","userTwoId","score","areProfilesAligned","description","createdAt","updatedAt"]},"AdminRelationship":{"type":"object","properties":{"id":{"type":"string"},"userOneId":{"type":"string"},"userTwoId":{"type":"string"},"userOneStatus":{"type":"string","enum":["NOT_INITIATED","DISCOVER_SUGGESTED","DAILY_SUGGESTED","SUGGESTED","ACCEPTED","REJECTED"]},"userTwoStatus":{"type":"string","enum":["NOT_INITIATED","DISCOVER_SUGGESTED","DAILY_SUGGESTED","SUGGESTED","ACCEPTED","REJECTED"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userOneId","userTwoId","userOneStatus","userTwoStatus","createdAt","updatedAt"]},"AdminChatThreadMessage":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"senderType":{"type":"string","enum":["USER","BOT"]},"userId":{"type":"string","nullable":true},"content":{"type":"string"},"metadata":{"nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","threadId","senderType","userId","content","createdAt","updatedAt"]},"AdminChatThread":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["SOLO","MULTI","SUPPORT"]},"primaryUserId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/AdminChatThreadMessage"}}},"required":["id","type","primaryUserId","createdAt","updatedAt","messages"]},"AdminSoloChatMetadata":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"userId":{"type":"string"},"status":{"type":"string","enum":["ONBOARDING","EXPLORING_MATCHES","FOCUSED_MATCH"]},"context":{"nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","status","createdAt","updatedAt"]},"AdminUserDetail":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","nullable":true,"format":"email"},"phone":{"type":"string","nullable":true},"role":{"type":"string","enum":["USER","AMBASSADOR","TESTER","ADMIN","SUPERADMIN"]},"requiresSuperadminToView":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"profile":{"$ref":"#/components/schemas/AdminUserProfile"},"profilePictures":{"type":"array","items":{"$ref":"#/components/schemas/AdminProfilePicture"}},"bios":{"type":"array","items":{"$ref":"#/components/schemas/AdminBio"}},"traits":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserTrait"}},"dataConnections":{"type":"array","items":{"$ref":"#/components/schemas/AdminDataConnection"}},"compatibilitiesInitiated":{"type":"array","items":{"$ref":"#/components/schemas/AdminCompatibility"}},"compatibilitiesReceived":{"type":"array","items":{"$ref":"#/components/schemas/AdminCompatibility"}},"relationshipsInitiated":{"type":"array","items":{"$ref":"#/components/schemas/AdminRelationship"}},"relationshipsReceived":{"type":"array","items":{"$ref":"#/components/schemas/AdminRelationship"}},"soloChatThread":{"$ref":"#/components/schemas/AdminChatThread"},"soloChatMetadata":{"$ref":"#/components/schemas/AdminSoloChatMetadata"}},"required":["id","email","phone","role","requiresSuperadminToView","createdAt","updatedAt","profile","profilePictures","bios","traits","dataConnections","compatibilitiesInitiated","compatibilitiesReceived","relationshipsInitiated","relationshipsReceived","soloChatThread","soloChatMetadata"]},"AdminUserDetailResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AdminUserDetail"}},"required":["success","data"]},"AdminSupportChatUser":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cm39abc123xyz"},"name":{"type":"string","nullable":true,"example":"John Doe"},"email":{"type":"string","nullable":true,"format":"email","example":"user@example.com"},"phone":{"type":"string","nullable":true,"example":"+18186181349"}},"required":["id","name","email","phone"]},"AdminSupportChatParticipant":{"type":"object","properties":{"userId":{"type":"string","nullable":true,"example":"cm39abc123xyz"},"user":{"$ref":"#/components/schemas/AdminSupportChatUser"}},"required":["userId","user"]},"AdminSupportChatLastMessage":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cm39msg123xyz"},"content":{"type":"string","example":"Hello, I need help"},"senderType":{"type":"string","enum":["USER","BOT"],"example":"USER"},"user":{"$ref":"#/components/schemas/AdminSupportChatUser"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","content","senderType","user","createdAt"]},"AdminSupportChatListItem":{"type":"object","properties":{"id":{"type":"string","example":"cm39thread123xyz"},"type":{"type":"string","enum":["SOLO","MULTI","SUPPORT"],"example":"SUPPORT"},"primaryUserId":{"type":"string","nullable":true,"example":"cm39abc123xyz"},"supportUserId":{"type":"string","nullable":true,"example":"cm39abc123xyz"},"relationshipId":{"type":"string","nullable":true,"example":"cm39rel123xyz"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"user":{"$ref":"#/components/schemas/AdminSupportChatUser"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/AdminSupportChatParticipant"}},"lastMessage":{"$ref":"#/components/schemas/AdminSupportChatLastMessage"}},"required":["id","type","primaryUserId","supportUserId","relationshipId","createdAt","updatedAt","user","participants","lastMessage"]},"AdminSupportChatSearchUser":{"allOf":[{"$ref":"#/components/schemas/AdminSupportChatUser"},{"type":"object","properties":{"chatCount":{"type":"integer","minimum":0,"description":"Number of matching visible conversations for this user","example":3}},"required":["chatCount"]}]},"AdminSupportChatListResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/AdminSupportChatListItem"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"matchingUsers":{"type":"array","items":{"$ref":"#/components/schemas/AdminSupportChatSearchUser"}}},"required":["success","data","meta","matchingUsers"]},"AdminSupportChatMessage":{"type":"object","properties":{"id":{"type":"string","example":"cm39msg123xyz"},"threadId":{"type":"string","example":"cm39thread123xyz"},"senderType":{"type":"string","enum":["USER","BOT"],"example":"USER"},"userId":{"type":"string","nullable":true,"example":"cm39abc123xyz"},"user":{"$ref":"#/components/schemas/AdminSupportChatUser"},"content":{"type":"string","example":"Hello, I need help"},"metadata":{"nullable":true,"example":{"type":"support_response"}},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","threadId","senderType","userId","user","content","createdAt","updatedAt"]},"AdminSupportChatDetail":{"type":"object","properties":{"id":{"type":"string","example":"cm39thread123xyz"},"type":{"type":"string","enum":["SOLO","MULTI","SUPPORT"],"example":"SUPPORT"},"primaryUserId":{"type":"string","nullable":true,"example":"cm39abc123xyz"},"supportUserId":{"type":"string","nullable":true,"example":"cm39abc123xyz"},"relationshipId":{"type":"string","nullable":true,"example":"cm39rel123xyz"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"user":{"$ref":"#/components/schemas/AdminSupportChatUser"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/AdminSupportChatParticipant"}},"messages":{"type":"array","items":{"$ref":"#/components/schemas/AdminSupportChatMessage"}}},"required":["id","type","primaryUserId","supportUserId","relationshipId","createdAt","updatedAt","user","participants","messages"]},"AdminSupportChatDetailResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AdminSupportChatDetail"}},"required":["success","data"]},"AdminSendSupportMessageResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AdminSupportChatMessage"}},"required":["success","data"]},"AdminSendSupportMessageBody":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000,"example":"Thank you for reaching out!"}},"required":["content"]},"GenerationAuditLog":{"type":"object","properties":{"id":{"type":"string","example":"cm39log123xyz"},"userId":{"type":"string","example":"cm39abc123xyz"},"generationType":{"type":"string","enum":["BIO","TRAITS","COMPATIBILITY","RELATIONSHIP"],"example":"BIO"},"reasoning":{"type":"string","nullable":true,"example":"Generated bio using 2 data sources: YouTube, Pinterest."},"resultSummary":{"type":"string","nullable":true,"example":"Bio generated: \"John Doe is a passionate traveler...\""},"result":{"nullable":true,"example":{"bioId":"cm39bio123","content":"Full bio text..."}},"metadata":{"nullable":true,"example":{"modelName":"gpt-4","dataSources":["YouTube","Pinterest"]}},"version":{"type":"integer","example":1},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","userId","generationType","result","version","createdAt"]},"GenerationAuditLogWithUser":{"allOf":[{"$ref":"#/components/schemas/GenerationAuditLog"},{"type":"object","properties":{"userName":{"type":"string","nullable":true,"example":"John Doe"},"userEmail":{"type":"string","nullable":true,"example":"john@example.com"}},"required":["userName","userEmail"]}],"required":["id","userId","generationType","result","version","createdAt"]},"RecentGenerationsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/GenerationAuditLogWithUser"}},"totalCount":{"type":"integer","minimum":0,"example":150}},"required":["success","data","totalCount"]},"GenerationHistoryResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/GenerationAuditLog"},{"required":["id","userId","generationType","version","createdAt"]}]}},"totalCount":{"type":"integer","minimum":0,"example":150}},"required":["success","data","totalCount"]},"GenerationStats":{"type":"object","properties":{"bio":{"type":"object","properties":{"totalGenerations":{"type":"integer"},"latestVersion":{"type":"integer"},"lastGeneratedAt":{"type":"string","nullable":true}},"required":["totalGenerations","latestVersion","lastGeneratedAt"]},"traits":{"type":"object","properties":{"totalGenerations":{"type":"integer"},"latestVersion":{"type":"integer"},"lastGeneratedAt":{"type":"string","nullable":true}},"required":["totalGenerations","latestVersion","lastGeneratedAt"]},"compatibility":{"type":"object","properties":{"totalGenerations":{"type":"integer"},"latestVersion":{"type":"integer"},"lastGeneratedAt":{"type":"string","nullable":true}},"required":["totalGenerations","latestVersion","lastGeneratedAt"]},"relationship":{"type":"object","properties":{"totalGenerations":{"type":"integer"},"latestVersion":{"type":"integer"},"lastGeneratedAt":{"type":"string","nullable":true}},"required":["totalGenerations","latestVersion","lastGeneratedAt"]}},"required":["bio","traits","compatibility","relationship"]},"GenerationStatsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/GenerationStats"}},"required":["success","data"]},"TraitEvidenceDetail":{"type":"object","properties":{"id":{"type":"string"},"traitId":{"type":"string"},"traitName":{"type":"string","nullable":true},"value":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"evidences":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/TraitEvidence"},{"properties":{"id":{"type":"string"},"sourceTable":{"type":"string"},"sourceType":{"type":"string","nullable":true},"sourceId":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","sourceTable","sourceType","sourceId","createdAt"]}]}}},"required":["id","traitId","traitName","value","createdAt","updatedAt","evidences"]},"TraitEvidenceResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/TraitEvidenceDetail"}},"required":["success","data"]},"DeleteUserResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"User deleted successfully"}},"required":["success","message"]},"ResetUserResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"User reset successfully"}},"required":["success","message"]},"UpdateUserSuperadminViewRequirementResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"string","example":"cm39abc123xyz"},"requiresSuperadminToView":{"type":"boolean","example":true},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","requiresSuperadminToView","updatedAt"]}},"required":["success","data"]},"UpdateUserSuperadminViewRequirementBody":{"type":"object","properties":{"requiresSuperadminToView":{"type":"boolean","example":true}},"required":["requiresSuperadminToView"]},"AdminReport":{"type":"object","properties":{"id":{"type":"string","example":"cm39report123"},"reporterId":{"type":"string","example":"cm39user123"},"reportedId":{"type":"string","example":"cm39user456"},"reporterName":{"type":"string","nullable":true,"example":"Sarah"},"reportedName":{"type":"string","nullable":true,"example":"John"},"reason":{"type":"string","enum":["INAPPROPRIATE_CONTENT","HARASSMENT","FAKE_PROFILE","SPAM","UNDERAGE","OTHER"],"example":"HARASSMENT"},"description":{"type":"string","nullable":true,"example":"Sent inappropriate messages"},"resolvedAt":{"type":"string","nullable":true,"example":null},"createdAt":{"type":"string","example":"2025-01-15T10:30:00.000Z"}},"required":["id","reporterId","reportedId","reporterName","reportedName","reason","description","resolvedAt","createdAt"]},"AdminReportsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/AdminReport"}},"meta":{"type":"object","properties":{"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"}},"required":["total","page","limit","totalPages"]}},"required":["success","data","meta"]},"AdminResolveReportResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Report resolved"}},"required":["success","message"]}},"parameters":{}},"paths":{"/user/me":{"get":{"summary":"Get current user","description":"Retrieves the currently authenticated user's profile information","tags":["Users"],"responses":{"200":{"description":"Current user information","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":"object","properties":{"bios":{"type":"array","items":{"$ref":"#/components/schemas/CurrentUserBio"},"description":"Generated bios for the user","example":[]},"profile":{"$ref":"#/components/schemas/UserProfile"},"profileComplete":{"type":"boolean","description":"Whether the user has completed their profile setup","example":false}},"required":["profileComplete"]}]}},"required":["success","data"]},"example":{"success":true,"data":{"id":"123","email":"user@example.com","name":"John Doe","createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-01T00:00:00.000Z","profilePictures":[]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve user"}}}}}}},"/user/profile":{"put":{"summary":"Update user profile","description":"Creates or updates the authenticated user's profile information","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfile"}}}},"responses":{"200":{"description":"Profile updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/signup":{"post":{"summary":"Send signup verification code","description":"Accepts a phone number, generates a 6-digit code, and caches it for verification.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","minLength":8,"maxLength":20}},"required":["phone"]},"example":{"phone":"+18186181349"}}}},"responses":{"200":{"description":"Signup code sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessMessageResponse"},"example":{"success":true,"message":"Signup code sent successfully"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid phone number"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to send signup code"}}}}}}},"/user/verify":{"post":{"summary":"Verify phone and get JWT tokens","description":"Validates the verification code, finds or creates a user, and returns JWT access and refresh tokens.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","minLength":8,"maxLength":20},"code":{"type":"string","minLength":6,"maxLength":6},"acceptedPrivacyPolicy":{"type":"boolean"},"acceptedAiDataPolicy":{"type":"boolean"}},"required":["phone","code"]},"example":{"phone":"+18186181349","code":"123456"}}}},"responses":{"200":{"description":"Verification successful - returns user and JWT tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSuccessResponse"},"example":{"success":true,"message":"Verification successful","data":{"user":{"id":"123","email":null,"phone":"+18186181349","name":null,"role":"USER","createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-01T00:00:00.000Z"},"tokens":{"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refreshToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","expiresIn":900}}}}}},"400":{"description":"Invalid or expired code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid code"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Verification failed"}}}}}}},"/user/signout":{"post":{"summary":"Sign out user","description":"Invalidates user cache. For JWT auth, clients should also discard stored tokens.","tags":["Users"],"responses":{"200":{"description":"Signed out successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessMessageResponse"},"example":{"success":true,"message":"Signed out successfully"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Signout failed"}}}}}}},"/user/google":{"post":{"summary":"Sign in with Google","description":"Verifies a Google ID token, finds or creates a user, and returns JWT access and refresh tokens.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idToken":{"type":"string","minLength":1},"acceptedPrivacyPolicy":{"type":"boolean"},"acceptedAiDataPolicy":{"type":"boolean"}},"required":["idToken"]},"example":{"idToken":"eyJhbGciOiJSUzI1NiIsImtpZCI6Ij..."}}}},"responses":{"200":{"description":"Google sign-in successful - returns user and JWT tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSuccessResponse"},"example":{"success":true,"message":"Google sign-in successful","data":{"user":{"id":"123","email":"user@example.com","phone":null,"name":"John Doe","role":"USER","createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-01T00:00:00.000Z"},"tokens":{"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refreshToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","expiresIn":900}}}}}},"400":{"description":"Policy acceptance required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"You must accept the Privacy Policy, Terms of Service, and AI Data Sharing Policy to continue."}}}},"401":{"description":"Invalid Google token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid Google token"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to sign in with Google"}}}}}}},"/user/refresh":{"post":{"summary":"Refresh JWT tokens","description":"Validates a refresh token and returns a new access/refresh token pair. Use this when the access token expires.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"refreshToken":{"type":"string","minLength":1}},"required":["refreshToken"]},"example":{"refreshToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}}}},"responses":{"200":{"description":"Tokens refreshed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshSuccessResponse"},"example":{"success":true,"message":"Tokens refreshed successfully","data":{"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refreshToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","expiresIn":900}}}}},"401":{"description":"Invalid or expired refresh token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid or expired refresh token"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Token refresh failed"}}}}}}},"/user/bios/events":{"get":{"summary":"Stream bio updates","description":"Establishes an SSE connection that streams realtime bio updates for the authenticated user.","tags":["Bios"],"responses":{"200":{"description":"SSE stream of bio-generated events","content":{"text/event-stream":{"schema":{"type":"string","description":"SSE payload containing bio.generated events","example":"id: cm39bio123xyz\nevent: bio.generated\ndata: {\"id\":\"cm39bio123xyz\",\"content\":\"Excited builder\",\"userId\":\"cm39user123\"}\n\n"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/bios":{"get":{"summary":"Get all user bios","description":"Retrieves all bios for the authenticated user","tags":["Bios"],"responses":{"200":{"description":"List of user bios","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiosListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a new bio","description":"Creates a new bio for the authenticated user","tags":["Bios"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000},"llmModelId":{"type":"string"}},"required":["content"]}}}},"responses":{"201":{"description":"Bio created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioSingleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/bios/latest":{"get":{"summary":"Get latest bio","description":"Retrieves the most recently updated bio for the authenticated user","tags":["Bios"],"responses":{"200":{"description":"Latest bio (null if user has none yet)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioLatestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/bios/{bioId}":{"get":{"summary":"Get a specific bio","description":"Retrieves a specific bio by ID for the authenticated user","tags":["Bios"],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"bioId","in":"path"}],"responses":{"200":{"description":"Bio details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioSingleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Bio not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"summary":"Update a bio","description":"Updates an existing bio for the authenticated user","tags":["Bios"],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"bioId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000}},"required":["content"]}}}},"responses":{"200":{"description":"Bio updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioSingleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Bio not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete a bio","description":"Deletes a bio for the authenticated user","tags":["Bios"],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"bioId","in":"path"}],"responses":{"200":{"description":"Bio deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioDeleteResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Bio not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/traits":{"get":{"summary":"List current user's traits","description":"Returns the traits that have been generated for the currently authenticated user, including trait metadata and evidence references.","tags":["Traits"],"responses":{"200":{"description":"Current user's traits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTraitsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve traits"}}}}}}},"/user/profile-pictures/presign":{"post":{"summary":"Generate presigned upload URLs","description":"Creates presigned S3 upload URLs for upcoming profile picture uploads","tags":["Profile Pictures"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignProfilePictureUploadRequest"}}}},"responses":{"200":{"description":"Presigned URLs generated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PresignProfilePictureUploadTarget"}}},"required":["success","data"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unsupported content type: text/plain"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/profile-pictures":{"post":{"summary":"Create profile picture records","description":"Persists uploaded profile pictures and assigns positions","tags":["Profile Pictures"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProfilePicturesRequest"}}}},"responses":{"201":{"description":"Profile pictures created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProfilePicture"}}},"required":["success","data"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"summary":"List profile pictures","description":"Returns all profile pictures for the authenticated user","tags":["Profile Pictures"],"responses":{"200":{"description":"Profile pictures retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProfilePicture"}}},"required":["success","data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete profile pictures","description":"Removes profile pictures and reorders remaining items","tags":["Profile Pictures"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProfilePicturesRequest"}}}},"responses":{"200":{"description":"Profile pictures deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProfilePicturesResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/profile-pictures/order":{"put":{"summary":"Reorder profile pictures","description":"Updates the display ordering for profile pictures","tags":["Profile Pictures"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderProfilePicturesRequest"}}}},"responses":{"200":{"description":"Profile pictures reordered","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProfilePicture"}}},"required":["success","data"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/public-profile/{code}":{"get":{"summary":"Get a user's public profile by code","description":"Retrieves a user's public profile using their shareable public profile code. No authentication required. Returns 404 if code is invalid or public profile is disabled.","tags":["Users"],"parameters":[{"schema":{"type":"string","description":"Public profile code","example":"abc123xyz"},"required":true,"name":"code","in":"path"}],"responses":{"200":{"description":"User's public profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProfileResponse"}}}},"404":{"description":"Public profile not found or disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Public profile not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve profile"}}}}}}},"/user/{userId}/profile":{"get":{"summary":"Get a user's public profile","description":"Retrieves another user's public profile including profile pictures, bio, and traits. Access granted if: user is ADMIN, target has public profile enabled, or compatibility score >= 0.35 and a relationship exists.","tags":["Users"],"parameters":[{"schema":{"type":"string","description":"Target user ID","example":"cm39user123"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"User's public profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProfileResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User ID is required"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Access denied. Possible reasons: 'profile_hidden', 'compatibility_pending', 'no_relationship'.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedResponse"},"example":{"success":false,"message":"Access denied","reason":"profile_hidden"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve profile"}}}}}}},"/user/match-requests":{"get":{"summary":"Get incoming match requests","description":"Retrieves a list of incoming match requests for the current user. A match request is when another user has accepted/liked you. Returns public profiles of users who have sent match requests, including mutual matches where both users have accepted (indicated by isMutualMatch flag).","tags":["Users"],"responses":{"200":{"description":"List of incoming match requests with public profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchRequestsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve match requests"}}}}}}},"/user/match-requests/send":{"post":{"summary":"Send a match request","description":"Send a match request to another user from the discover page.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMatchRequestBody"}}}},"responses":{"200":{"description":"Match request sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMatchRequestResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden — blocked user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Cannot send request to this user"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to send match request"}}}}}}},"/user/match-requests/{relationshipId}/respond":{"post":{"summary":"Respond to a match request","description":"Accept or decline an incoming match request.","tags":["Users"],"parameters":[{"schema":{"type":"string","description":"The relationship ID"},"required":true,"name":"relationshipId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondMatchRequestBody"}}}},"responses":{"200":{"description":"Response recorded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondMatchRequestResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden — user is not part of this relationship","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not authorized"}}}},"404":{"description":"Relationship not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Request not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to respond to match request"}}}}}}},"/user/direct-matches":{"get":{"summary":"Get direct matches","description":"Retrieves all direct matches for the current user, including both sent and received requests. Returns the status of each match (pending, accepted, declined) and public profiles of the other users.","tags":["Users"],"responses":{"200":{"description":"List of direct matches with public profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectMatchesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve direct matches"}}}}}},"post":{"summary":"Send a direct match request","description":"Send a direct match request to another user by their phone number or email address. If the target user has already sent a request to you, this will automatically accept it. Only one direct match can exist between any two users.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDirectMatchRequest"}}}},"responses":{"200":{"description":"Direct match request sent or existing match returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDirectMatchResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"No user found with that phone number or email address"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to send direct match request"}}}}}}},"/user/direct-matches/{id}/respond":{"post":{"summary":"Respond to a direct match request","description":"Accept or decline a direct match request. When both users accept, a Compatibility record is created/updated between them.","tags":["Users"],"parameters":[{"schema":{"type":"string","description":"The ID of the direct match"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondDirectMatchRequest"}}}},"responses":{"200":{"description":"Response recorded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondDirectMatchResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Direct match not found"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to respond to direct match"}}}}}}},"/user/discover":{"get":{"summary":"Get discover matches","description":"Retrieves all relationships for the current user with compatibility scores, shared traits, and request statuses. Used by the Discover page. Supports pagination via take/skip parameters.","tags":["Users"],"parameters":[{"schema":{"type":"string","description":"Maximum number of matches to return (default: 50, max: 200)","example":"50"},"required":false,"name":"take","in":"query"},{"schema":{"type":"string","description":"Number of matches to skip for pagination (default: 0)","example":"0"},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"List of discover matches with profiles and compatibility data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve discover matches"}}}}}}},"/user/discover/pass":{"post":{"summary":"Pass on a discover profile","description":"Marks the current user as having passed on a discover profile. Passed profiles are filtered out of future discover queues.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassDiscoverProfileBody"}}}},"responses":{"200":{"description":"Profile passed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassDiscoverProfileResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Cannot pass on this profile"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to pass discover profile"}}}}}}},"/user/push-notifications/register":{"post":{"summary":"Register push notification token","description":"Registers a Firebase Cloud Messaging token for push notifications","tags":["Push Notifications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1},"deviceId":{"type":"string"},"platform":{"type":"string","enum":["IOS","ANDROID"],"default":"IOS"}},"required":["token"]},"example":{"token":"fcm_token_here","deviceId":"device_123","platform":"ios"}}}},"responses":{"201":{"description":"Token registered successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterTokenResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to register push notification token"}}}}}}},"/user/push-notifications/unregister":{"post":{"summary":"Unregister push notification token","description":"Unregisters a Firebase Cloud Messaging token","tags":["Push Notifications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1}},"required":["token"]},"example":{"token":"fcm_token_here"}}}},"responses":{"200":{"description":"Token unregistered successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnregisterTokenResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to unregister push notification token"}}}}}}},"/user/push-notifications/status":{"get":{"summary":"Get push notification status","description":"Retrieves the current push notification status for the authenticated user","tags":["Push Notifications"],"responses":{"200":{"description":"Push notification status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushNotificationStatusResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get push notification status"}}}}}}},"/user/settings":{"get":{"summary":"Get user settings","description":"Retrieves the current user's settings including public profile preferences.","tags":["Users"],"responses":{"200":{"description":"User settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"404":{"description":"Settings not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Settings not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve settings"}}}}}},"patch":{"summary":"Update user settings","description":"Updates the current user's settings. When enabling public profile, a unique shareable code is generated.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserSettings"}}}},"responses":{"200":{"description":"Settings updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"publicProfileEnabled must be a boolean"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to update settings"}}}}}}},"/user/settings/private-profile-token":{"post":{"summary":"Create or rotate private profile API token","description":"Creates or rotates the current user's private profile API token. The raw token is returned only in this response.","tags":["Users"],"responses":{"200":{"description":"Private profile API token created or rotated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivateProfileApiTokenResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to rotate private profile API token"}}}}}},"delete":{"summary":"Revoke private profile API token","description":"Revokes the current user's private profile API token.","tags":["Users"],"responses":{"200":{"description":"Private profile API token revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokePrivateProfileApiTokenResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to revoke private profile API token"}}}}}}},"/user/block":{"post":{"summary":"Block a user","description":"Block another user. Blocked users will not appear in your discover feed, and neither of you will be able to send messages or match requests to each other.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockUserRequest"}}}},"responses":{"200":{"description":"User blocked successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockUserResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"You cannot block yourself"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to block user"}}}}}}},"/user/unblock":{"post":{"summary":"Unblock a user","description":"Unblock a previously blocked user. They will appear in your discover feed again.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockUserRequest"}}}},"responses":{"200":{"description":"User unblocked successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockUserResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"blockedUserId is required"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to unblock user"}}}}}}},"/user/blocked-users":{"get":{"summary":"Get blocked users","description":"Get a list of all users you have blocked, with their public profiles.","tags":["Users"],"responses":{"200":{"description":"List of blocked users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockedUsersResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve blocked users"}}}}}}},"/user/report":{"post":{"summary":"Report a user","description":"Report a user for inappropriate behavior. By default, this also blocks the reported user.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportUserRequest"}}}},"responses":{"200":{"description":"User reported successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportUserResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"You cannot report yourself"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to report user"}}}}}}},"/user/profile-views":{"post":{"summary":"Record a profile view","description":"Record that the current user viewed another user's profile. Idempotent.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordProfileViewRequest"}}}},"responses":{"200":{"description":"Profile view recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordProfileViewResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Cannot record a view of your own profile"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"404":{"description":"Viewed user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to record profile view"}}}}}}},"/user/activity":{"get":{"summary":"Get user activity feed","description":"Returns a combined feed of generation audit logs (bio updates, trait discovery, compatibility) and user-facing activity events, sorted by most recent.","parameters":[{"schema":{"type":"number","minimum":1,"maximum":50,"default":10,"description":"Maximum number of activity items to return","example":10},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Activity feed retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user-api/me":{"get":{"summary":"Get private API profile summary","description":"Returns a compact profile summary for the private profile API token owner. Requires a private profile API token.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Private API profile summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiMeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/bios":{"get":{"summary":"List bios","description":"Returns paginated bios for the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Maximum number of items to return. Defaults to 25, max 100.","example":"25"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Number of items to skip. Ignored when cursor is provided.","example":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned as nextCursor from a previous response.","example":"25"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated bios","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiBiosResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/bios/latest":{"get":{"summary":"Get latest bio","description":"Returns the latest bio for the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Latest bio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiLatestBioResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/traits":{"get":{"summary":"List traits","description":"Returns paginated generated traits for the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Maximum number of items to return. Defaults to 25, max 100.","example":"25"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Number of items to skip. Ignored when cursor is provided.","example":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned as nextCursor from a previous response.","example":"25"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated traits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiTraitsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/profile-pictures":{"get":{"summary":"List profile pictures","description":"Returns paginated profile pictures for the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Maximum number of items to return. Defaults to 25, max 100.","example":"25"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Number of items to skip. Ignored when cursor is provided.","example":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned as nextCursor from a previous response.","example":"25"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated profile pictures","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiProfilePicturesResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/data-connections":{"get":{"summary":"List data connection summaries","description":"Returns safe connected-provider summaries for the private profile API token owner. OAuth tokens and raw provider payloads are never returned.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Data connection summaries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiDataConnectionsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/compatibilities":{"get":{"summary":"List compatibilities","description":"Returns paginated compatibility records involving the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Maximum number of items to return. Defaults to 25, max 100.","example":"25"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Number of items to skip. Ignored when cursor is provided.","example":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned as nextCursor from a previous response.","example":"25"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated compatibilities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiCompatibilitiesResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/discover":{"get":{"summary":"List discover profiles","description":"Returns paginated discover-style profiles for the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Maximum number of items to return. Defaults to 25, max 100.","example":"25"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Number of items to skip. Ignored when cursor is provided.","example":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned as nextCursor from a previous response.","example":"25"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated discover profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiDiscoverResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/match-requests":{"get":{"summary":"List match requests","description":"Returns paginated incoming/outgoing match requests visible to the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Maximum number of items to return. Defaults to 25, max 100.","example":"25"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Number of items to skip. Ignored when cursor is provided.","example":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned as nextCursor from a previous response.","example":"25"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated match requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiMatchRequestsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/threads":{"get":{"summary":"List chat threads","description":"Returns chat threads visible to the private profile API token owner. Supports SOLO, MULTI, and SUPPORT thread filters.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Page number. Defaults to 1.","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","description":"Maximum number of threads to return. Defaults to 20, max 100.","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["SOLO","MULTI","SUPPORT"],"description":"Type of chat thread","example":"SOLO"},{"type":"string","enum":["ALL"]}],"default":"ALL","description":"Filter by thread type. Defaults to ALL.","example":"ALL"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated chat threads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadListResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/threads/{threadId}/messages":{"get":{"summary":"Get chat thread messages","description":"Returns messages for a chat thread visible to the private profile API token owner. Use `before` to paginate older messages.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Chat thread ID","example":"cmj0thread123"},"required":true,"name":"threadId","in":"path"},{"schema":{"type":"string","description":"Maximum number of messages to return. Defaults to 20, max 100.","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Cursor: return messages older than this message ID.","example":"cmj0msg456"},"required":false,"name":"before","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Chat thread messages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadMessagesResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"404":{"description":"Thread not found or access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Thread not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/data-connections":{"get":{"summary":"List user data connections","description":"Returns all data connections for the authenticated user","tags":["Users"],"responses":{"200":{"description":"Connections retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataConnectionsListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/{provider}":{"get":{"summary":"Get data connection","description":"Returns a specific data connection including provider data","tags":["Data Connections"],"parameters":[{"schema":{"type":"string","enum":["YOUTUBE","PINTEREST","TWITTER","EVENTBRITE","TIKTOK","GOOGLE_CALENDAR","APPLE_MUSIC","CHATGPT","LOCATION","PHOTOS"]},"required":true,"name":"provider","in":"path"}],"responses":{"200":{"description":"Connection retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataConnectionSingleResponse"}}}},"400":{"description":"Invalid provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/youtube":{"post":{"summary":"Connect YouTube account","description":"Completes the YouTube OAuth flow and stores tokens for the user","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"authCode":{"type":"string","minLength":1},"redirectUri":{"type":"string","format":"uri"}},"required":["authCode"]},"example":{"authCode":"4/0AbCdEfGhIjKlMn"}}}},"responses":{"200":{"description":"YouTube connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/pinterest":{"post":{"summary":"Connect Pinterest account","description":"Completes the Pinterest OAuth flow and stores tokens for the user","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"authCode":{"type":"string","minLength":1},"redirectUri":{"type":"string","format":"uri"},"codeVerifier":{"type":"string"}},"required":["authCode"]},"example":{"authCode":"AQAABBBB","redirectUri":"http://localhost:3000/oauth-redirect/pinterest"}}}},"responses":{"200":{"description":"Pinterest connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/twitter":{"post":{"summary":"Connect Twitter account","description":"Completes the Twitter OAuth flow and stores tokens for the user","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"authCode":{"type":"string","minLength":1},"redirectUri":{"type":"string","format":"uri"},"codeVerifier":{"type":"string","minLength":1,"description":"PKCE code verifier used during the Twitter authorization flow"}},"required":["authCode"]},"example":{"authCode":"twitter-auth-code","codeVerifier":"PKCE_CODE_VERIFIER"}}}},"responses":{"200":{"description":"Twitter connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/tiktok":{"post":{"summary":"Connect TikTok account","description":"Completes the TikTok OAuth flow and stores tokens for the user","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"authCode":{"type":"string","minLength":1},"redirectUri":{"type":"string","format":"uri"},"codeVerifier":{"type":"string","minLength":1}},"required":["authCode"]},"example":{"authCode":"tiktok-auth-code","redirectUri":"http://localhost:3000/oauth/tiktok"}}}},"responses":{"200":{"description":"TikTok connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/google-calendar":{"post":{"summary":"Connect Google Calendar account","description":"Completes the Google Calendar OAuth flow and stores tokens for the user","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"authCode":{"type":"string","minLength":1},"redirectUri":{"type":"string","format":"uri"}},"required":["authCode"]},"example":{"authCode":"4/0AbCdEfGhIjKlMn","redirectUri":"http://localhost:3000/oauth-redirect/google-calendar"}}}},"responses":{"200":{"description":"Google Calendar connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/eventbrite":{"post":{"summary":"Connect Eventbrite account","description":"Completes the Eventbrite OAuth flow and stores tokens for the user","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"authCode":{"type":"string","minLength":1},"redirectUri":{"type":"string","format":"uri"}},"required":["authCode"]},"example":{"authCode":"eventbrite-auth-code","redirectUri":"http://localhost:3000/oauth-redirect/eventbrite"}}}},"responses":{"200":{"description":"Eventbrite connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/location":{"post":{"summary":"Connect location data","description":"Stores the user's current location from the device's geolocation API (web or iOS)","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"accuracy":{"type":"number"},"altitude":{"type":"number","nullable":true},"altitudeAccuracy":{"type":"number","nullable":true},"heading":{"type":"number","nullable":true},"speed":{"type":"number","nullable":true},"timestamp":{"type":"number"}},"required":["latitude","longitude"]},"example":{"latitude":37.7749,"longitude":-122.4194,"accuracy":10}}}},"responses":{"200":{"description":"Location connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/apple-music":{"post":{"summary":"Connect Apple Music","description":"Stores the user's Apple Music library data fetched from the iOS device via MusicKit. Unlike other providers, Apple Music data is fetched directly on the device and submitted here.","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"topArtists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"topAlbums":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"artistName":{"type":"string","nullable":true},"genres":{"type":"array","nullable":true,"items":{"type":"string"}},"trackCount":{"type":"number","nullable":true},"dateAdded":{"type":"string","nullable":true},"releaseDate":{"type":"string","nullable":true},"artworkUrl":{"type":"string","nullable":true},"artworkData":{"type":"string","nullable":true,"maxLength":200000}},"required":["id","name"]}},"topSongs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"artistName":{"type":"string","nullable":true},"albumName":{"type":"string","nullable":true},"genres":{"type":"array","nullable":true,"items":{"type":"string"}},"durationMs":{"type":"number","nullable":true},"trackNumber":{"type":"number","nullable":true},"releaseDate":{"type":"string","nullable":true},"artworkUrl":{"type":"string","nullable":true},"artworkData":{"type":"string","nullable":true,"maxLength":200000}},"required":["id","name"]}},"playlists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"dateAdded":{"type":"string","nullable":true},"lastModifiedDate":{"type":"string","nullable":true},"isPublic":{"type":"boolean","nullable":true},"artworkUrl":{"type":"string","nullable":true},"artworkData":{"type":"string","nullable":true,"maxLength":200000}},"required":["id","name"]}},"recentlyPlayed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"artistName":{"type":"string","nullable":true},"albumName":{"type":"string","nullable":true},"genres":{"type":"array","nullable":true,"items":{"type":"string"}},"durationMs":{"type":"number","nullable":true},"trackNumber":{"type":"number","nullable":true},"releaseDate":{"type":"string","nullable":true},"artworkUrl":{"type":"string","nullable":true},"artworkData":{"type":"string","nullable":true,"maxLength":200000}},"required":["id","name"]}},"genres":{"type":"array","items":{"type":"string"}}},"required":["topArtists","topAlbums","topSongs","playlists","recentlyPlayed","genres"]},"example":{"topArtists":[{"id":"123","name":"Taylor Swift"}],"topAlbums":[{"id":"456","name":"1989","artistName":"Taylor Swift","genres":["Pop"],"trackCount":13,"releaseDate":"2014-10-27"}],"topSongs":[{"id":"789","name":"Shake It Off","artistName":"Taylor Swift","albumName":"1989","durationMs":219000}],"playlists":[{"id":"pl1","name":"My Favorites"}],"recentlyPlayed":[],"genres":["Pop","Rock"]}}}},"responses":{"200":{"description":"Apple Music connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/photos/presign":{"post":{"summary":"Generate presigned upload URLs for photos","description":"Generates presigned S3 upload URLs for a batch of photos. Up to 50 photos total per user.","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"contentType":{"type":"string","enum":["image/jpeg","image/jpg","image/png","image/webp","image/heic","image/heif"],"example":"image/jpeg"}},"required":["contentType"]},"minItems":1,"maxItems":50}},"required":["files"]},"example":{"files":[{"contentType":"image/jpeg"},{"contentType":"image/png"}]}}}},"responses":{"200":{"description":"Presigned URLs generated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"uploadUrl":{"type":"string"},"expiresIn":{"type":"number"}},"required":["key","uploadUrl","expiresIn"]}}},"required":["success","data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/photos":{"post":{"summary":"Connect photos for analysis","description":"Registers uploaded photos and triggers AI vision analysis. Photos are private and only used for trait and bio generation.","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"photos":{"type":"array","items":{"type":"object","properties":{"storageKey":{"type":"string"},"originalName":{"type":"string"},"contentType":{"type":"string"}},"required":["storageKey"]},"minItems":1,"maxItems":50}},"required":["photos"]},"example":{"photos":[{"storageKey":"development/user-photos/user123/1710000000-uuid.jpg","originalName":"IMG_1234.jpg","contentType":"image/jpeg"}]}}}},"responses":{"200":{"description":"Photos connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/{provider}/disconnect":{"post":{"summary":"Disconnect data connection","description":"Disconnects a data source for the authenticated user","tags":["Data Connections"],"parameters":[{"schema":{"type":"string","enum":["YOUTUBE","PINTEREST","TWITTER","EVENTBRITE","TIKTOK","GOOGLE_CALENDAR","APPLE_MUSIC","CHATGPT","LOCATION","PHOTOS"]},"required":true,"name":"provider","in":"path"}],"responses":{"200":{"description":"Data source disconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectDataSourceResponse"}}}},"400":{"description":"Invalid provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Connection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/chat/events":{"get":{"summary":"Stream Cupid chat events","description":"Establishes an SSE connection that streams realtime Cupid chat updates (messages and context changes) for the authenticated user.","tags":["Chat"],"responses":{"200":{"description":"SSE stream of Cupid chat events","content":{"text/event-stream":{"schema":{"type":"string","description":"SSE payload containing streaming chat message deltas followed by the final message and context events","example":"id: cm39msg123:0\nevent: chat.message.delta\ndata: {\"threadId\":\"cm39thread123\",\"messageId\":\"cm39msg123\",\"delta\":\"Here's someone new \",\"sequence\":0}\n\nid: cm39msg123:1\nevent: chat.message.delta\ndata: {\"threadId\":\"cm39thread123\",\"messageId\":\"cm39msg123\",\"delta\":\"I think you'll click with!\",\"sequence\":1,\"isFinal\":true,\"fullText\":\"Here's someone new I think you'll click with!\"}\n\nid: cm39msg123\nevent: chat.message\ndata: {\"threadId\":\"cm39thread123\",\"message\":{\"id\":\"cm39msg123\",\"threadId\":\"cm39thread123\",\"senderType\":\"BOT\",\"userId\":null,\"content\":\"Here's someone new I think you'll click with!\",\"metadata\":null,\"createdAt\":\"2025-11-16T00:00:00.000Z\",\"updatedAt\":\"2025-11-16T00:05:00.000Z\",\"user\":null}}\n\nid: context-cm39thread123\nevent: chat.context\ndata: {\"threadId\":\"cm39thread123\",\"context\":{\"metadata\":{\"id\":\"cm39context123\",\"userId\":\"cm39user123\",\"status\":\"FOCUSED_MATCH\",\"context\":{\"focusedRelationshipId\":\"cm39relationship123\",\"otherUserName\":\"Jordan\"},\"createdAt\":\"2025-11-15T23:59:00.000Z\",\"updatedAt\":\"2025-11-16T00:05:00.000Z\"},\"relationships\":[]}}\n\n"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/chat/memories":{"get":{"summary":"List user's chat memories","description":"Returns a paginated list of all chat memories extracted from the user's conversations. Memories represent things the user has revealed about their likes, dislikes, interests, etc.","tags":["Chat"],"parameters":[{"schema":{"type":"string","description":"Page number (default: 1)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","description":"Items per page (default: 50, max: 100)","example":"50"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"List of chat memories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMemoriesListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete all chat memories","description":"Deletes all chat memories for the authenticated user. Also clears the LangGraph store (best-effort).","tags":["Chat"],"responses":{"200":{"description":"All memories deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAllChatMemoriesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/chat/memories/{memoryId}":{"delete":{"summary":"Delete a specific chat memory","description":"Deletes a single chat memory by ID. Also removes it from the LangGraph store (best-effort).","tags":["Chat"],"parameters":[{"schema":{"type":"string","description":"The memory ID to delete","example":"cmj0memory123"},"required":true,"name":"memoryId","in":"path"}],"responses":{"200":{"description":"Memory deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteChatMemoryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/chat/threads":{"get":{"summary":"List user's chat threads","description":"Returns a paginated list of all chat threads the user participates in. Includes solo Cupid threads, support threads, and multi-user match threads.","tags":["Chat"],"parameters":[{"schema":{"type":"string","description":"Page number (default: 1)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","description":"Items per page (default: 20)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["SOLO","MULTI","SUPPORT","ALL"],"description":"Filter by thread type (default: ALL)","example":"MULTI"},"required":false,"name":"type","in":"query"}],"responses":{"200":{"description":"List of chat threads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/chat/threads/{threadId}/messages":{"get":{"summary":"Get thread messages","description":"Fetches messages in a specific chat thread with cursor-based pagination. Returns the latest messages first (newest at end of array). Use the `before` cursor to load older messages.","tags":["Chat"],"parameters":[{"schema":{"type":"string","description":"Thread ID","example":"cmj0thread123"},"required":true,"name":"threadId","in":"path"},{"schema":{"type":"string","description":"Number of messages to return (default: 20, max: 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Cursor: return messages older than this message ID","example":"cmj0msg456"},"required":false,"name":"before","in":"query"}],"responses":{"200":{"description":"Thread messages retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadMessagesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Thread not found or access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Send thread message","description":"Sends a message in a chat thread. For SOLO threads, the assistant will respond with streaming. For MULTI threads, this is a direct user-to-user message.","tags":["Chat"],"parameters":[{"schema":{"type":"string","description":"Thread ID","example":"cmj0thread123"},"required":true,"name":"threadId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendThreadMessageBody"}}}},"responses":{"200":{"description":"Message sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendThreadMessageResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Blocked — messaging not allowed between blocked users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Thread not found or access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/users":{"get":{"summary":"List all users (paginated)","description":"Retrieves a paginated list of all users. Only accessible by admins. Supports database-backed search by name, email, phone number, or user ID. Does not include all user relations for performance.","tags":["Admin"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number (1-indexed)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page (max 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Search users by name, email, phone number, or user ID","example":"Helen"},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"Paginated list of users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserListResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to list users"}}}}}}},"/admin/user-api-usage":{"get":{"summary":"List private user API usage events","description":"Retrieves a paginated event log of successful private /user-api requests. Only accessible by admins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number (1-indexed)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page (max 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Search usage events by user name, email, phone number, or user ID","example":"Helen"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter usage events to a specific user ID","example":"cm39abc123xyz"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Filter usage events by exact endpoint path","example":"/user-api/bios/latest"},"required":false,"name":"path","in":"query"}],"responses":{"200":{"description":"Paginated list of private user API usage events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserApiUsageResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to list user API usage events"}}}}}}},"/admin/users/{userId}":{"get":{"summary":"Get user details","description":"Retrieves detailed information about a specific user including traits, relationships, profile, compatibilities, bios, chats, and data connections. Only accessible by admins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"Detailed user information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserDetailResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get user details"}}}}}},"delete":{"summary":"Delete a user","description":"Permanently deletes a user and all associated data (profile, traits, relationships, messages, etc.). This action cannot be undone. Users can delete their own account; admins can delete any user. Useful for test cleanup.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"User deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin and not deleting own account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to delete user"}}}}}}},"/admin/support-chats":{"get":{"summary":"List all chat conversations (paginated)","description":"Retrieves a paginated list of all chat threads that appear in users' conversation lists, including Cupid, support, and direct-message chats. Only accessible by admins. Supports sorting, filtering by chat type, and searching by participant name, email, phone number, or user ID.","tags":["Admin"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number (1-indexed)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page (max 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["latest_user_message","latest_support_message","updated_at"],"default":"updated_at","description":"Sort by: latest_user_message (chats with newest user messages first), latest_support_message (chats with newest bot/support messages first), updated_at (default, most recently updated first)","example":"latest_user_message"},"required":false,"name":"sortBy","in":"query"},{"schema":{"type":"string","enum":["all","support","cupid","dm"],"default":"all","description":"Filter conversations by type: all (default), support, cupid (solo Cupid chat), or dm (direct-message chats)","example":"support"},"required":false,"name":"chatType","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Search conversations by participant name, email, phone number, or user ID","example":"Helen"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter conversations to a specific participant user ID","example":"cm39abc123xyz"},"required":false,"name":"userId","in":"query"}],"responses":{"200":{"description":"Paginated list of chat conversations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSupportChatListResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to list support chats"}}}}}}},"/admin/support-chats/{threadId}":{"get":{"summary":"Get chat conversation messages","description":"Retrieves all messages in a specific chat thread. Only accessible by admins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"Thread ID","example":"cm39thread123"},"required":true,"name":"threadId","in":"path"}],"responses":{"200":{"description":"Chat thread with messages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSupportChatDetailResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"Chat thread not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Chat thread not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get chat messages"}}}}}}},"/admin/support-chats/{threadId}/messages":{"post":{"summary":"Send a support message","description":"Sends a message in a support chat thread as support staff. Only accessible by admins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"Thread ID","example":"cm39thread123"},"required":true,"name":"threadId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSendSupportMessageBody"}}}},"responses":{"200":{"description":"Support message sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSendSupportMessageResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"Support chat thread not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Support chat thread not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to send support message"}}}}}}},"/admin/generation-history/recent":{"get":{"summary":"Get recent generations across all users","description":"Retrieves the most recent generation audit logs across all users. Useful for monitoring system-wide generation activity.","tags":["Admin"],"parameters":[{"schema":{"type":"string","enum":["BIO","TRAITS","COMPATIBILITY","RELATIONSHIP"],"description":"Filter by generation type","example":"BIO"},"required":false,"name":"generationType","in":"query"},{"schema":{"type":"string","default":"50","description":"Number of items to return (max 100)","example":"50"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0","description":"Number of items to skip for pagination","example":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Recent generations retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentGenerationsResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get recent generations"}}}}}}},"/admin/users/{userId}/generation-history":{"get":{"summary":"Get generation history for a user","description":"Retrieves the generation audit log for a user, showing all bio, trait, and compatibility generations with reasoning and metadata.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"},{"schema":{"type":"string","enum":["BIO","TRAITS","COMPATIBILITY","RELATIONSHIP"],"description":"Filter by generation type","example":"BIO"},"required":false,"name":"generationType","in":"query"},{"schema":{"type":"string","default":"50","description":"Number of items to return (max 100)","example":"50"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0","description":"Number of items to skip for pagination","example":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Generation history retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationHistoryResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get generation history"}}}}}}},"/admin/users/{userId}/generation-stats":{"get":{"summary":"Get generation statistics for a user","description":"Retrieves aggregated statistics about all generations for a user, including counts and latest versions.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"Generation stats retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationStatsResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get generation stats"}}}}}}},"/admin/users/{userId}/traits/{traitId}/evidence":{"get":{"summary":"Get trait evidence details","description":"Retrieves detailed evidence for a specific user trait, showing which data sources contributed to the trait extraction.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"},{"schema":{"type":"string","description":"Trait ID","example":"cm39trait123"},"required":true,"name":"traitId","in":"path"}],"responses":{"200":{"description":"Trait evidence retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraitEvidenceResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"Trait not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Trait not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get trait evidence"}}}}}}},"/admin/users/{userId}/reset":{"post":{"summary":"Reset a user to fresh state","description":"Resets a user to 'just signed up' state — deletes all traits, bios, data connections, matches, relationships, chat history, live activity, profile pictures, etc. Keeps User record, UserProfile, and UserSettings intact. Only accessible by admins. Useful for testing and debugging.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"User reset successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetUserResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to reset user"}}}}}}},"/admin/users/{userId}/superadmin-view-requirement":{"patch":{"summary":"Update whether a user requires superadmin to view","description":"Marks or unmarks a user as requiring superadmin access to view in admin user and conversation surfaces. Only accessible by superadmins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserSuperadminViewRequirementBody"}}}},"responses":{"200":{"description":"User visibility requirement updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserSuperadminViewRequirementResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not a superadmin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Superadmin access required"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to update user visibility requirement"}}}}}}},"/admin/reports":{"get":{"summary":"List user reports (paginated)","description":"Retrieves a paginated list of user reports. Can filter by resolved status. Only accessible by admins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","default":"1","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Filter by resolved status","example":"false"},"required":false,"name":"resolved","in":"query"}],"responses":{"200":{"description":"Paginated list of reports","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReportsResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to list reports"}}}}}}},"/admin/reports/{reportId}/resolve":{"post":{"summary":"Resolve a user report","description":"Mark a user report as resolved. Only accessible by admins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"The ID of the report"},"required":true,"name":"reportId","in":"path"}],"responses":{"200":{"description":"Report resolved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminResolveReportResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Report not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to resolve report"}}}}}}},"/sse/events":{"get":{"summary":"Stream real-time events (SSE)","description":"Establishes an SSE connection for real-time updates. Must be called via Lambda Function URL, not API Gateway. Returns chat messages, context updates, and other real-time events.","tags":["SSE Streaming"],"responses":{"200":{"description":"SSE stream of real-time events","content":{"text/event-stream":{"schema":{"type":"string","description":"Server-Sent Events stream with event types and JSON data payloads","example":"retry: 5000\n\nevent: connected\ndata: {}\n\nid: msg-123\nevent: message\ndata: {\"content\":\"Hello world\"}\n\n"}}}},"401":{"description":"Unauthorized - valid session required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/sse/test":{"get":{"summary":"Test streaming endpoint","description":"A simple test endpoint that streams numbered chunks. Use to verify Lambda Function URL streaming is working correctly.","tags":["SSE Streaming"],"responses":{"200":{"description":"Streaming text response with numbered chunks","content":{"text/plain":{"schema":{"type":"string","description":"Plain text streaming response for testing","example":"chunk 1\nchunk 2\nchunk 3\n..."}}}}}}},"/sse/health":{"get":{"summary":"SSE endpoint health check","description":"Returns health status of the SSE streaming endpoint","tags":["SSE Streaming"],"responses":{"200":{"description":"Health status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"streaming":{"type":"boolean"},"timestamp":{"type":"string"}},"required":["status","streaming","timestamp"]}}}}}}},"/waitlist/count":{"get":{"summary":"Get waitlist count","description":"Returns the total number of users currently on the waitlist","tags":["Waitlist"],"responses":{"200":{"description":"Waitlist count retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"count":{"type":"number","example":42}},"required":["count"]}},"required":["success","data"]},"example":{"success":true,"data":{"count":42}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve waitlist count"}}}}}}}}}