@oriva/cli 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/openapi-snapshot.json +3893 -1
  2. package/package.json +2 -2
@@ -1 +1,3893 @@
1
- {"openapi":"3.1.0","info":{"title":"Oriva Platform API","version":"1.0.0","description":"Public API for 3rd party Oriva developers. Authenticate with your API key as a Bearer token."},"servers":[{"url":"https://api.oriva.io","description":"Production"},{"url":"http://localhost:3002","description":"Local BFF proxy"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","description":"API key with oriva_pk_ prefix"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UserMe":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"username":{"type":["string","null"]},"displayName":{"type":"string"},"email":{"type":["string","null"],"format":"email"},"bio":{"type":["string","null"]},"location":{"type":["string","null"]},"website":{"type":["string","null"],"format":"uri"},"avatar":{"type":["string","null"],"format":"uri"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"apiKeyInfo":{"type":"object","properties":{"keyId":{"type":"string"},"name":{"type":"string"},"userId":{"type":"string","format":"uuid"},"permissions":{"type":"array","items":{"type":"string"}},"usageCount":{"type":"integer"}},"required":["keyId","name","userId","permissions","usageCount"]}},"required":["id","username","displayName","email","bio","location","website","avatar","createdAt","updatedAt","apiKeyInfo"]}},"required":["ok","success","data"]},"AnalyticsSummary":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"object","properties":{"overview":{"type":"object","properties":{"totalEntries":{"type":"integer"},"totalResponses":{"type":"integer"},"totalGroups":{"type":"integer"},"installedApps":{"type":"integer"}},"required":["totalEntries","totalResponses","totalGroups","installedApps"]},"metrics":{"type":"object","properties":{"entriesGrowth":{"type":"string"},"responseGrowth":{"type":"string"},"groupActivity":{"type":"string"},"appUsage":{"type":"string"}},"required":["entriesGrowth","responseGrowth","groupActivity","appUsage"]},"recentActivity":{"type":"array","items":{}},"timeRange":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}},"required":["start","end"]}},"required":["overview","metrics","recentActivity","timeRange"]},"message":{"type":"string"}},"required":["ok","success","data"]},"ProfileSummary":{"type":"object","properties":{"profileId":{"type":"string","example":"ext_a1b2c3d4e5f6a7b8"},"profileName":{"type":"string"},"isActive":{"type":"boolean"},"avatar":{"type":["string","null"],"format":"uri"},"isDefault":{"type":"boolean"}},"required":["profileId","profileName","isActive","avatar","isDefault"]},"UpdatedProfile":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"object","properties":{"profileId":{"type":"string"},"profileName":{"type":"string"},"isActive":{"type":"boolean"},"avatar":{"type":["string","null"],"format":"uri"},"bio":{"type":["string","null"]},"location":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["profileId","profileName","isActive","avatar","bio","location","updatedAt"]},"message":{"type":"string"}},"required":["ok","success","data"]},"GroupSummary":{"type":"object","properties":{"groupId":{"type":"string","format":"uuid"},"groupName":{"type":"string"},"memberCount":{"type":"integer"},"isActive":{"type":"boolean"},"role":{"type":"string","example":"admin"},"description":{"type":["string","null"]},"image_url":{"type":["string","null"],"format":"uri"},"external_link":{"type":["string","null"],"format":"uri"}},"required":["groupId","groupName","memberCount","isActive","role","description","image_url","external_link"]},"GroupMember":{"type":"object","properties":{"memberId":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"role":{"type":"string"},"joinedAt":{"type":"string","format":"date-time"},"avatar":{"type":["string","null"],"format":"uri"}},"required":["memberId","displayName","role","joinedAt","avatar"]},"AuthSessionResponse":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"],"format":"email"},"display_name":{"type":["string","null"]},"username":{"type":["string","null"]},"subscription_tier":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","email","display_name","username","subscription_tier","created_at"]},"access_token":{"type":"string"},"refresh_token":{"type":"string"},"expires_in":{"type":"integer"}},"required":["user","access_token","refresh_token","expires_in"]},"AuthProfileResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":["string","null"],"format":"email"},"displayName":{"type":"string"},"avatar":{"type":["string","null"],"format":"uri"},"authType":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"lastLogin":{"type":"string","format":"date-time"},"accountStatus":{"type":"string"},"twoFactorEnabled":{"type":"boolean"},"emailVerified":{"type":"boolean"}},"required":["id","email","displayName","avatar","authType","permissions","lastLogin","accountStatus","twoFactorEnabled","emailVerified"]}},"required":["ok","success","data"]},"RawProfileResponse":{"type":"object","properties":{"id":{"type":"string"},"display_name":{"type":["string","null"]},"username":{"type":["string","null"]},"bio":{"type":["string","null"]},"avatar_url":{"type":["string","null"],"format":"uri"},"location":{"type":["string","null"]},"website_url":{"type":["string","null"],"format":"uri"}},"required":["id","display_name","username","bio","avatar_url","location","website_url"]},"TokenRefreshResponse":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"expires_in":{"type":"integer"}},"required":["access_token","refresh_token","expires_in"]},"TeamMember":{"type":"object","properties":{"profileId":{"type":"string","format":"uuid"},"displayName":{"type":["string","null"]},"username":{"type":["string","null"]},"avatarUrl":{"type":["string","null"],"format":"uri"},"role":{"type":"string"},"joinedAt":{"type":"string","format":"date-time"},"group":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]}},"required":["profileId","displayName","username","avatarUrl","role","joinedAt","group"]},"MarketplaceApp":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"external_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"tagline":{"type":["string","null"]},"description":{"type":["string","null"]},"category":{"type":"string"},"icon_url":{"type":["string","null"],"format":"uri"},"screenshots":{"type":["array","null"],"items":{"type":"string","format":"uri"}},"version":{"type":"string"},"pricing_model":{"type":"string"},"pricing_config":{"type":["object","null"],"additionalProperties":{}},"install_count":{"type":"integer"},"developer_id":{"type":"string","format":"uuid"},"developer_name":{"type":"string"},"status":{"type":"string","enum":["draft","pending_review","approved","rejected"]},"is_active":{"type":"boolean"},"supported_audience":{"type":["array","null"],"items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","slug","category","version","pricing_model","install_count","developer_id","developer_name","status","is_active","created_at","updated_at"]},"InstalledApp":{"type":"object","properties":{"installationId":{"type":"string","format":"uuid"},"installedAt":{"type":"string","format":"date-time"},"isActive":{"type":"boolean"},"settings":{"type":["object","null"],"additionalProperties":{}},"app":{"$ref":"#/components/schemas/MarketplaceApp"}},"required":["installationId","installedAt","isActive","settings","app"]},"MarketplaceItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"content":{"type":["string","null"]},"profile_id":{"type":"string","format":"uuid"},"entry_type":{"type":"string"},"marketplace_metadata":{"type":["object","null"],"additionalProperties":{}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","title","profile_id","entry_type","created_at","updated_at"]},"Category":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"collection_type":{"type":"string"},"organization_rules":{"type":["object","null"],"additionalProperties":{}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","collection_type","created_at","updated_at"]},"Entry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"content":{"type":"string"},"profile_id":{"type":"string","format":"uuid"},"audience_type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","title","content","profile_id","audience_type","created_at","updated_at"]},"Event":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"location":{"type":["string","null"]},"isOnline":{"type":"boolean"},"category":{"type":"string"},"organizer":{"type":"string","format":"uuid"},"maxAttendees":{"type":["integer","null"]},"currentAttendees":{"type":["integer","null"]},"price":{"type":"number","minimum":0},"tags":{"type":"array","items":{"type":"string"}},"imageUrl":{"type":["string","null"],"format":"uri"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","description","startDate","endDate","location","isOnline","category","organizer","maxAttendees","currentAttendees","price","tags","imageUrl","createdAt","updatedAt"]}},"parameters":{}},"paths":{"/api/v1/user/me":{"get":{"operationId":"getCurrentUser","tags":["User"],"summary":"Get current user","description":"Returns the authenticated user's active profile and API key metadata.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Current user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMe"}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/analytics/summary":{"get":{"operationId":"getAnalyticsSummary","tags":["Analytics"],"summary":"Get analytics summary","description":"Returns 7-day usage analytics for the authenticated API key.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Analytics summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsSummary"}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/profiles/available":{"get":{"operationId":"listProfiles","tags":["Profiles"],"summary":"List available profiles","description":"Returns all non-anonymous active profiles for the authenticated API key.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Available profiles","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProfileSummary"}}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/profiles/active":{"get":{"operationId":"getActiveProfile","tags":["Profiles"],"summary":"Get active profile","description":"Returns the default active (non-anonymous) profile for the authenticated API key.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Active profile","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ProfileSummary"}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/profiles/{profileId}":{"put":{"operationId":"updateProfile","tags":["Profiles"],"summary":"Update a profile","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","pattern":"^ext_[a-f0-9]{16}$","example":"ext_a1b2c3d4e5f6a7b8"},"required":true,"name":"profileId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profileName":{"type":"string","minLength":1},"avatar":{"type":"string","format":"uri"},"bio":{"type":["string","null"]},"location":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Profile updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatedProfile"}}}},"400":{"description":"Validation error — invalid profileId format or body"},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/profiles/{profileId}/activate":{"post":{"operationId":"activateProfile","tags":["Profiles"],"summary":"Activate a profile","description":"Switches the active profile to the specified profile.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","pattern":"^ext_[a-f0-9]{16}$","example":"ext_a1b2c3d4e5f6a7b8"},"required":true,"name":"profileId","in":"path"}],"responses":{"200":{"description":"Profile activated","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"object","properties":{"activeProfile":{"type":"string"},"switchedAt":{"type":"string","format":"date-time"}},"required":["activeProfile","switchedAt"]}},"required":["ok","success","data"]}}}},"400":{"description":"Validation error — invalid profileId format"},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/groups":{"get":{"operationId":"listGroups","tags":["Groups"],"summary":"List groups","description":"Returns all groups the authenticated user created or joined.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"User groups","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/GroupSummary"}}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/groups/{groupId}/members":{"get":{"operationId":"listGroupMembers","tags":["Groups"],"summary":"Get group members","description":"Returns members of a group. Requires the caller to be the creator or a member.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"required":true,"name":"groupId","in":"path"}],"responses":{"200":{"description":"Group members","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/GroupMember"}}},"required":["ok","success","data"]}}}},"400":{"description":"Validation error — invalid groupId format"},"401":{"description":"Invalid or missing API key"},"403":{"description":"Not a member or creator of this group"},"404":{"description":"Group not found"}}}},"/api/v1/auth/register":{"post":{"operationId":"register","tags":["Auth"],"summary":"Register a new user","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":8,"pattern":"[A-Z]"},"name":{"type":"string"},"username":{"type":"string"},"preferences":{}},"required":["email","password"]}}}},"responses":{"201":{"description":"User registered and session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSessionResponse"}}}},"400":{"description":"Validation error — weak password or invalid email"},"409":{"description":"Email already registered"}}}},"/api/v1/auth/login":{"post":{"operationId":"login","tags":["Auth"],"summary":"Log in","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":1}},"required":["email","password"]}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSessionResponse"}}}},"400":{"description":"Validation error — missing email or password"},"401":{"description":"Invalid credentials"}}}},"/api/v1/auth/logout":{"post":{"operationId":"logout","tags":["Auth"],"summary":"Log out","description":"Invalidates the current session. Requires Authorization header.","security":[{"BearerAuth":[]}],"responses":{"204":{"description":"Logged out"},"401":{"description":"Missing authorization header"}}}},"/api/v1/auth/token/refresh":{"post":{"operationId":"refreshToken","tags":["Auth"],"summary":"Refresh access token","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"refresh_token":{"type":"string","minLength":1}},"required":["refresh_token"]}}}},"responses":{"200":{"description":"New tokens issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRefreshResponse"}}}},"400":{"description":"Validation error — missing refresh_token"},"401":{"description":"Invalid or expired refresh token"}}}},"/api/v1/auth/profile":{"get":{"operationId":"getAuthProfile","tags":["Auth"],"summary":"Get auth profile","description":"Returns the authenticated user identity and API key metadata.","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"responses":{"200":{"description":"Auth profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthProfileResponse"}}}},"401":{"description":"Unauthorized"}}},"patch":{"operationId":"patchAuthProfile","tags":["Auth"],"summary":"Update profile (partial)","security":[{"BearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"bio":{"type":"string"},"avatar_url":{"type":"string","format":"uri"},"location":{"type":"string"},"website_url":{"type":"string","format":"uri"}}}}}},"responses":{"200":{"description":"Updated profile row","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RawProfileResponse"}}}},"400":{"description":"No fields provided"},"401":{"description":"Unauthorized"}}},"put":{"operationId":"putAuthProfile","tags":["Auth"],"summary":"Update profile (full)","description":"Superset of PATCH — also accepts preferences and data_retention_days (min 30).","security":[{"BearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"bio":{"type":"string"},"avatar_url":{"type":"string","format":"uri"},"location":{"type":"string"},"website_url":{"type":"string","format":"uri"},"preferences":{"type":"object","additionalProperties":{}},"data_retention_days":{"type":"integer","minimum":30}}}}}},"responses":{"200":{"description":"Updated profile row","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RawProfileResponse"}}}},"400":{"description":"No fields provided, or data_retention_days < 30"},"401":{"description":"Unauthorized"}}}},"/api/v1/auth/account":{"delete":{"operationId":"deleteAccount","tags":["Auth"],"summary":"Delete account","security":[{"BearerAuth":[]}],"responses":{"204":{"description":"Account deleted"},"401":{"description":"Unauthorized"}}}},"/api/v1/sessions":{"get":{"operationId":"listSessions","tags":["Sessions"],"summary":"List sessions","description":"Returns the user's sessions. Sessions feature is not yet implemented — returns empty paginated list.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Sessions list (currently always empty)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{}},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","limit","total","totalPages"]}},"required":["pagination"]},"message":{"type":"string"}},"required":["ok","success","data","meta"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/sessions/upcoming":{"get":{"operationId":"listUpcomingSessions","tags":["Sessions"],"summary":"List upcoming sessions","description":"Returns upcoming sessions. Sessions feature is not yet implemented — returns empty list.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Upcoming sessions (currently always empty)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{}},"message":{"type":"string"}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/team/members":{"get":{"operationId":"listTeamMembers","tags":["Team"],"summary":"List team members","description":"Returns group memberships for the authenticated user as a flat list of team members.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Team members","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TeamMember"}},"meta":{"type":"object","properties":{"total":{"type":"integer"},"roles":{"type":"array","items":{"type":"string"}}},"required":["total","roles"]}},"required":["ok","success","data","meta"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/marketplace/apps":{"get":{"operationId":"listMarketplaceApps","tags":["Marketplace"],"summary":"Browse marketplace apps","description":"Returns paginated list of approved, active marketplace apps.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","minimum":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"Marketplace apps","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceApp"}},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","limit","total","totalPages"]}},"required":["pagination"]}},"required":["ok","success","data","meta"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/marketplace/trending":{"get":{"operationId":"listTrendingApps","tags":["Marketplace"],"summary":"Trending apps","description":"Returns approved apps sorted by install count (top 20).","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Trending apps","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceApp"}}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/marketplace/featured":{"get":{"operationId":"listFeaturedApps","tags":["Marketplace"],"summary":"Featured apps","description":"Returns featured approved apps (curated subset of top apps).","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Featured apps","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceApp"}}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/marketplace/categories":{"get":{"operationId":"listMarketplaceCategories","tags":["Marketplace"],"summary":"List app categories","description":"Returns distinct categories from approved apps with their app counts. Note: a second registration of this path exists (no auth, collections-table version) but is shadowed by this route (Express first-match).","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Category counts","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"count":{"type":"integer"}},"required":["category","count"]}}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/marketplace/apps/{appId}":{"get":{"operationId":"getMarketplaceApp","tags":["Marketplace"],"summary":"Get app details","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"appId","in":"path"}],"responses":{"200":{"description":"App details","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/MarketplaceApp"}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"},"404":{"description":"App not found"}}}},"/api/v1/marketplace/installed":{"get":{"operationId":"listInstalledApps","tags":["Marketplace"],"summary":"List installed apps","description":"Returns all apps installed by the authenticated user.","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","minimum":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Installed apps","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstalledApp"}},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","limit","total","totalPages"]}},"required":["pagination"]}},"required":["ok","success","data","meta"]}}}},"401":{"description":"Unauthorized"}}}},"/api/v1/marketplace/install/{appId}":{"post":{"operationId":"installMarketplaceApp","tags":["Marketplace"],"summary":"Install app","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"appId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","additionalProperties":{}}}}}}},"responses":{"200":{"description":"App installed","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/InstalledApp"},"message":{"type":"string"}},"required":["ok","success","data","message"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"App not found or not available for installation"},"409":{"description":"App already installed"}}}},"/api/v1/marketplace/uninstall/{appId}":{"delete":{"operationId":"uninstallMarketplaceApp","tags":["Marketplace"],"summary":"Uninstall app","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"appId","in":"path"}],"responses":{"200":{"description":"App uninstalled","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"message":{"type":"string"}},"required":["ok","success","message"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"App installation not found"}}}},"/api/v1/marketplace/items":{"get":{"operationId":"listMarketplaceItems","tags":["Marketplace"],"summary":"List marketplace items","description":"Public listing of published marketplace items (entry-based). No authentication required.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","minimum":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string"},"required":false,"name":"item_type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"earner_type","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"category_id","in":"query"},{"schema":{"type":"number"},"required":false,"name":"min_price","in":"query"},{"schema":{"type":"number"},"required":false,"name":"max_price","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"seller_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"Marketplace items","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceItem"}},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","limit","total","totalPages"]}},"required":["pagination"]}},"required":["ok","success","data","meta"]}}}}}}},"/api/v1/marketplace/items/{id}":{"get":{"operationId":"getMarketplaceItem","tags":["Marketplace"],"summary":"Get marketplace item","description":"Returns a single published marketplace item by ID.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Marketplace item","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/MarketplaceItem"}},"required":["ok","success","data"]}}}},"404":{"description":"Item not found"}}}},"/api/v1/marketplace/search":{"post":{"operationId":"searchMarketplace","tags":["Marketplace"],"summary":"Search marketplace","description":"Full-text search across marketplace items. No authentication required.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1},"filters":{"type":"object","additionalProperties":{}},"limit":{"type":"integer","maximum":100},"offset":{"type":"integer"}},"required":["query"]}}}},"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceItem"}},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","limit","total","totalPages"]}},"required":["pagination"]}},"required":["ok","success","data","meta"]}}}}}}},"/api/v1/marketplace/categories/tree":{"get":{"operationId":"getCategoryTree","tags":["Marketplace"],"summary":"Category tree","description":"Returns marketplace categories as a hierarchical tree from the collections table. Children are nested category objects of the same shape.","responses":{"200":{"description":"Category tree","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Category"},{"type":"object","properties":{"children":{"type":"array","items":{"type":"object","additionalProperties":{}}}}}]}}},"required":["ok","success","data"]}}}}}}},"/api/v1/marketplace/categories/{id}":{"get":{"operationId":"getMarketplaceCategory","tags":["Marketplace"],"summary":"Get category","description":"Returns a single marketplace category from the collections table.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Category","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/Category"}},"required":["ok","success","data"]}}}},"404":{"description":"Category not found"}}}},"/api/v1/developer/apps":{"get":{"operationId":"listDeveloperApps","tags":["Developer"],"summary":"List developer apps","description":"Returns all marketplace apps owned by the authenticated developer.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Developer apps","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceApp"}}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"}}},"post":{"operationId":"createDeveloperApp","tags":["Developer"],"summary":"Create app","security":[{"ApiKeyAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"tagline":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","minLength":1},"icon_url":{"type":"string","format":"uri"},"screenshots":{"type":"array","items":{"type":"string","format":"uri"}},"version":{"type":"string","default":"1.0.0"},"pricing_model":{"type":"string","default":"free"},"pricing_config":{"type":"object","additionalProperties":{}},"supported_audience":{"type":"array","items":{"type":"string"}}},"required":["name","slug","category"]}}}},"responses":{"201":{"description":"App created (status: draft)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/MarketplaceApp"}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/developer/apps/{appId}":{"get":{"operationId":"getDeveloperApp","tags":["Developer"],"summary":"Get developer app","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"appId","in":"path"}],"responses":{"200":{"description":"App details","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/MarketplaceApp"}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"},"404":{"description":"App not found or not owned by this developer"}}},"put":{"operationId":"updateDeveloperApp","tags":["Developer"],"summary":"Update app","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"appId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"tagline":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"icon_url":{"type":"string","format":"uri"},"screenshots":{"type":"array","items":{"type":"string","format":"uri"}},"version":{"type":"string"},"pricing_model":{"type":"string"},"pricing_config":{"type":"object","additionalProperties":{}},"supported_audience":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"App updated","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/MarketplaceApp"}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"},"404":{"description":"App not found or not owned by this developer"}}},"delete":{"operationId":"deleteDeveloperApp","tags":["Developer"],"summary":"Delete app","description":"Only draft apps can be deleted. Approved apps must be deactivated first.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"appId","in":"path"}],"responses":{"204":{"description":"App deleted"},"400":{"description":"App is not in draft status — cannot delete"},"401":{"description":"Invalid or missing API key"},"404":{"description":"App not found or not owned by this developer"}}}},"/api/v1/developer/apps/{appId}/submit":{"post":{"operationId":"submitDeveloperApp","tags":["Developer"],"summary":"Submit app for review","description":"Transitions app from draft → pending_review.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"appId","in":"path"}],"responses":{"200":{"description":"App submitted for review","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/MarketplaceApp"},"message":{"type":"string"}},"required":["ok","success","data","message"]}}}},"400":{"description":"App is not in draft status"},"401":{"description":"Invalid or missing API key"},"404":{"description":"App not found or not owned by this developer"}}}},"/api/v1/developer/apps/{appId}/resubmit":{"post":{"operationId":"resubmitDeveloperApp","tags":["Developer"],"summary":"Resubmit rejected app","description":"Updates fields and resubmits a rejected app for review.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"appId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"tagline":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"icon_url":{"type":"string","format":"uri"},"screenshots":{"type":"array","items":{"type":"string","format":"uri"}},"version":{"type":"string"},"pricing_model":{"type":"string"},"pricing_config":{"type":"object","additionalProperties":{}},"supported_audience":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"App resubmitted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/MarketplaceApp"},"message":{"type":"string"}},"required":["ok","success","data","message"]}}}},"400":{"description":"App is not in rejected status"},"401":{"description":"Invalid or missing API key"},"404":{"description":"App not found or not owned by this developer"}}}},"/api/v1/entries":{"get":{"operationId":"listEntries","tags":["Entries"],"summary":"List entries","description":"Returns paginated entries for the authenticated user's profile.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Entries list","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Entry"}},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","limit","total","totalPages"]}},"required":["pagination"]}},"required":["ok","success","data","meta"]}}}},"401":{"description":"Invalid or missing API key"},"404":{"description":"User profile not found"}}}},"/api/v1/templates":{"get":{"operationId":"listTemplates","tags":["Entries"],"summary":"List templates","description":"Returns available entry templates. Not yet implemented — returns empty list.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Templates list (currently always empty)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{}},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","limit","total","totalPages"]}},"required":["pagination"]}},"required":["ok","success","data","meta"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/storage":{"get":{"operationId":"getStorage","tags":["Entries"],"summary":"Get storage info","description":"Returns storage usage for the authenticated user. Not yet implemented — returns empty object.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Storage info","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"object","additionalProperties":{}}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/v1/ui/notifications":{"post":{"operationId":"createUiNotification","tags":["UI"],"summary":"Create notification","description":"Creates a UI notification for the authenticated user.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Notification created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"required":["ok","success","data"]}}}},"401":{"description":"Invalid or missing API key"}}}},"/api/oriva/events":{"get":{"operationId":"listEvents","tags":["Events"],"summary":"List events","description":"Returns active events with optional filtering by category and date range.","parameters":[{"schema":{"type":"string"},"required":false,"name":"category","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"endDate","in":"query"},{"schema":{"type":"integer","maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Events list","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}},"required":["ok","success","data","total","limit","offset"]}}}}}},"post":{"operationId":"createEvent","tags":["Events"],"summary":"Create event","security":[{"BearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"isOnline":{"type":"boolean"},"category":{"type":"string","minLength":1},"location":{"type":["string","null"]},"maxAttendees":{"type":["integer","null"],"exclusiveMinimum":0},"price":{"type":"number","minimum":0},"tags":{"type":"array","items":{"type":"string"},"maxItems":20},"imageUrl":{"type":["string","null"],"format":"uri"}},"required":["title","description","startDate","endDate","isOnline","category"]}}}},"responses":{"201":{"description":"Event created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/Event"},"message":{"type":"string"}},"required":["ok","success","data","message"]}}}},"400":{"description":"Validation error — missing required fields or invalid category"},"401":{"description":"Unauthorized"}}}},"/api/oriva/events/{eventId}":{"get":{"operationId":"getEvent","tags":["Events"],"summary":"Get event","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"eventId","in":"path"}],"responses":{"200":{"description":"Event details","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/Event"}},"required":["ok","success","data"]}}}},"404":{"description":"Event not found"}}}}},"webhooks":{}}
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Oriva Platform API",
5
+ "version": "1.0.0",
6
+ "description": "Public API for 3rd party Oriva developers. Authenticate with your API key as a Bearer token."
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "https://api.oriva.io",
11
+ "description": "Production"
12
+ },
13
+ {
14
+ "url": "http://localhost:3002",
15
+ "description": "Local BFF proxy"
16
+ }
17
+ ],
18
+ "components": {
19
+ "securitySchemes": {
20
+ "ApiKeyAuth": {
21
+ "type": "http",
22
+ "scheme": "bearer",
23
+ "description": "API key with oriva_pk_ prefix"
24
+ },
25
+ "BearerAuth": {
26
+ "type": "http",
27
+ "scheme": "bearer",
28
+ "bearerFormat": "JWT"
29
+ }
30
+ },
31
+ "schemas": {
32
+ "UserMe": {
33
+ "type": "object",
34
+ "properties": {
35
+ "ok": {
36
+ "type": "boolean"
37
+ },
38
+ "success": {
39
+ "type": "boolean"
40
+ },
41
+ "data": {
42
+ "type": "object",
43
+ "properties": {
44
+ "id": {
45
+ "type": "string",
46
+ "format": "uuid"
47
+ },
48
+ "username": {
49
+ "type": ["string", "null"]
50
+ },
51
+ "displayName": {
52
+ "type": "string"
53
+ },
54
+ "email": {
55
+ "type": ["string", "null"],
56
+ "format": "email"
57
+ },
58
+ "bio": {
59
+ "type": ["string", "null"]
60
+ },
61
+ "location": {
62
+ "type": ["string", "null"]
63
+ },
64
+ "website": {
65
+ "type": ["string", "null"],
66
+ "format": "uri"
67
+ },
68
+ "avatar": {
69
+ "type": ["string", "null"],
70
+ "format": "uri"
71
+ },
72
+ "createdAt": {
73
+ "type": "string",
74
+ "format": "date-time"
75
+ },
76
+ "updatedAt": {
77
+ "type": "string",
78
+ "format": "date-time"
79
+ },
80
+ "apiKeyInfo": {
81
+ "type": "object",
82
+ "properties": {
83
+ "keyId": {
84
+ "type": "string"
85
+ },
86
+ "name": {
87
+ "type": "string"
88
+ },
89
+ "userId": {
90
+ "type": "string",
91
+ "format": "uuid"
92
+ },
93
+ "permissions": {
94
+ "type": "array",
95
+ "items": {
96
+ "type": "string"
97
+ }
98
+ },
99
+ "usageCount": {
100
+ "type": "integer"
101
+ }
102
+ },
103
+ "required": [
104
+ "keyId",
105
+ "name",
106
+ "userId",
107
+ "permissions",
108
+ "usageCount"
109
+ ]
110
+ }
111
+ },
112
+ "required": [
113
+ "id",
114
+ "username",
115
+ "displayName",
116
+ "email",
117
+ "bio",
118
+ "location",
119
+ "website",
120
+ "avatar",
121
+ "createdAt",
122
+ "updatedAt",
123
+ "apiKeyInfo"
124
+ ]
125
+ }
126
+ },
127
+ "required": ["ok", "success", "data"]
128
+ },
129
+ "AnalyticsSummary": {
130
+ "type": "object",
131
+ "properties": {
132
+ "ok": {
133
+ "type": "boolean"
134
+ },
135
+ "success": {
136
+ "type": "boolean"
137
+ },
138
+ "data": {
139
+ "type": "object",
140
+ "properties": {
141
+ "overview": {
142
+ "type": "object",
143
+ "properties": {
144
+ "totalEntries": {
145
+ "type": "integer"
146
+ },
147
+ "totalResponses": {
148
+ "type": "integer"
149
+ },
150
+ "totalGroups": {
151
+ "type": "integer"
152
+ },
153
+ "installedApps": {
154
+ "type": "integer"
155
+ }
156
+ },
157
+ "required": [
158
+ "totalEntries",
159
+ "totalResponses",
160
+ "totalGroups",
161
+ "installedApps"
162
+ ]
163
+ },
164
+ "metrics": {
165
+ "type": "object",
166
+ "properties": {
167
+ "entriesGrowth": {
168
+ "type": "string"
169
+ },
170
+ "responseGrowth": {
171
+ "type": "string"
172
+ },
173
+ "groupActivity": {
174
+ "type": "string"
175
+ },
176
+ "appUsage": {
177
+ "type": "string"
178
+ }
179
+ },
180
+ "required": [
181
+ "entriesGrowth",
182
+ "responseGrowth",
183
+ "groupActivity",
184
+ "appUsage"
185
+ ]
186
+ },
187
+ "recentActivity": {
188
+ "type": "array",
189
+ "items": {}
190
+ },
191
+ "timeRange": {
192
+ "type": "object",
193
+ "properties": {
194
+ "start": {
195
+ "type": "string",
196
+ "format": "date-time"
197
+ },
198
+ "end": {
199
+ "type": "string",
200
+ "format": "date-time"
201
+ }
202
+ },
203
+ "required": ["start", "end"]
204
+ }
205
+ },
206
+ "required": ["overview", "metrics", "recentActivity", "timeRange"]
207
+ },
208
+ "message": {
209
+ "type": "string"
210
+ }
211
+ },
212
+ "required": ["ok", "success", "data"]
213
+ },
214
+ "ProfileSummary": {
215
+ "type": "object",
216
+ "properties": {
217
+ "profileId": {
218
+ "type": "string",
219
+ "example": "ext_a1b2c3d4e5f6a7b8"
220
+ },
221
+ "profileName": {
222
+ "type": "string"
223
+ },
224
+ "isActive": {
225
+ "type": "boolean"
226
+ },
227
+ "avatar": {
228
+ "type": ["string", "null"],
229
+ "format": "uri"
230
+ },
231
+ "isDefault": {
232
+ "type": "boolean"
233
+ }
234
+ },
235
+ "required": [
236
+ "profileId",
237
+ "profileName",
238
+ "isActive",
239
+ "avatar",
240
+ "isDefault"
241
+ ]
242
+ },
243
+ "UpdatedProfile": {
244
+ "type": "object",
245
+ "properties": {
246
+ "ok": {
247
+ "type": "boolean"
248
+ },
249
+ "success": {
250
+ "type": "boolean"
251
+ },
252
+ "data": {
253
+ "type": "object",
254
+ "properties": {
255
+ "profileId": {
256
+ "type": "string"
257
+ },
258
+ "profileName": {
259
+ "type": "string"
260
+ },
261
+ "isActive": {
262
+ "type": "boolean"
263
+ },
264
+ "avatar": {
265
+ "type": ["string", "null"],
266
+ "format": "uri"
267
+ },
268
+ "bio": {
269
+ "type": ["string", "null"]
270
+ },
271
+ "location": {
272
+ "type": ["string", "null"]
273
+ },
274
+ "updatedAt": {
275
+ "type": "string",
276
+ "format": "date-time"
277
+ }
278
+ },
279
+ "required": [
280
+ "profileId",
281
+ "profileName",
282
+ "isActive",
283
+ "avatar",
284
+ "bio",
285
+ "location",
286
+ "updatedAt"
287
+ ]
288
+ },
289
+ "message": {
290
+ "type": "string"
291
+ }
292
+ },
293
+ "required": ["ok", "success", "data"]
294
+ },
295
+ "GroupSummary": {
296
+ "type": "object",
297
+ "properties": {
298
+ "groupId": {
299
+ "type": "string",
300
+ "format": "uuid"
301
+ },
302
+ "groupName": {
303
+ "type": "string"
304
+ },
305
+ "memberCount": {
306
+ "type": "integer"
307
+ },
308
+ "isActive": {
309
+ "type": "boolean"
310
+ },
311
+ "role": {
312
+ "type": "string",
313
+ "example": "admin"
314
+ },
315
+ "description": {
316
+ "type": ["string", "null"]
317
+ },
318
+ "image_url": {
319
+ "type": ["string", "null"],
320
+ "format": "uri"
321
+ },
322
+ "external_link": {
323
+ "type": ["string", "null"],
324
+ "format": "uri"
325
+ }
326
+ },
327
+ "required": [
328
+ "groupId",
329
+ "groupName",
330
+ "memberCount",
331
+ "isActive",
332
+ "role",
333
+ "description",
334
+ "image_url",
335
+ "external_link"
336
+ ]
337
+ },
338
+ "GroupMember": {
339
+ "type": "object",
340
+ "properties": {
341
+ "memberId": {
342
+ "type": "string",
343
+ "format": "uuid"
344
+ },
345
+ "displayName": {
346
+ "type": "string"
347
+ },
348
+ "role": {
349
+ "type": "string"
350
+ },
351
+ "joinedAt": {
352
+ "type": "string",
353
+ "format": "date-time"
354
+ },
355
+ "avatar": {
356
+ "type": ["string", "null"],
357
+ "format": "uri"
358
+ }
359
+ },
360
+ "required": ["memberId", "displayName", "role", "joinedAt", "avatar"]
361
+ },
362
+ "AuthSessionResponse": {
363
+ "type": "object",
364
+ "properties": {
365
+ "user": {
366
+ "type": "object",
367
+ "properties": {
368
+ "id": {
369
+ "type": "string"
370
+ },
371
+ "email": {
372
+ "type": ["string", "null"],
373
+ "format": "email"
374
+ },
375
+ "display_name": {
376
+ "type": ["string", "null"]
377
+ },
378
+ "username": {
379
+ "type": ["string", "null"]
380
+ },
381
+ "subscription_tier": {
382
+ "type": "string"
383
+ },
384
+ "created_at": {
385
+ "type": "string",
386
+ "format": "date-time"
387
+ }
388
+ },
389
+ "required": [
390
+ "id",
391
+ "email",
392
+ "display_name",
393
+ "username",
394
+ "subscription_tier",
395
+ "created_at"
396
+ ]
397
+ },
398
+ "access_token": {
399
+ "type": "string"
400
+ },
401
+ "refresh_token": {
402
+ "type": "string"
403
+ },
404
+ "expires_in": {
405
+ "type": "integer"
406
+ }
407
+ },
408
+ "required": ["user", "access_token", "refresh_token", "expires_in"]
409
+ },
410
+ "AuthProfileResponse": {
411
+ "type": "object",
412
+ "properties": {
413
+ "ok": {
414
+ "type": "boolean"
415
+ },
416
+ "success": {
417
+ "type": "boolean"
418
+ },
419
+ "data": {
420
+ "type": "object",
421
+ "properties": {
422
+ "id": {
423
+ "type": "string",
424
+ "format": "uuid"
425
+ },
426
+ "email": {
427
+ "type": ["string", "null"],
428
+ "format": "email"
429
+ },
430
+ "displayName": {
431
+ "type": "string"
432
+ },
433
+ "avatar": {
434
+ "type": ["string", "null"],
435
+ "format": "uri"
436
+ },
437
+ "authType": {
438
+ "type": "string"
439
+ },
440
+ "permissions": {
441
+ "type": "array",
442
+ "items": {
443
+ "type": "string"
444
+ }
445
+ },
446
+ "lastLogin": {
447
+ "type": "string",
448
+ "format": "date-time"
449
+ },
450
+ "accountStatus": {
451
+ "type": "string"
452
+ },
453
+ "twoFactorEnabled": {
454
+ "type": "boolean"
455
+ },
456
+ "emailVerified": {
457
+ "type": "boolean"
458
+ }
459
+ },
460
+ "required": [
461
+ "id",
462
+ "email",
463
+ "displayName",
464
+ "avatar",
465
+ "authType",
466
+ "permissions",
467
+ "lastLogin",
468
+ "accountStatus",
469
+ "twoFactorEnabled",
470
+ "emailVerified"
471
+ ]
472
+ }
473
+ },
474
+ "required": ["ok", "success", "data"]
475
+ },
476
+ "RawProfileResponse": {
477
+ "type": "object",
478
+ "properties": {
479
+ "id": {
480
+ "type": "string"
481
+ },
482
+ "display_name": {
483
+ "type": ["string", "null"]
484
+ },
485
+ "username": {
486
+ "type": ["string", "null"]
487
+ },
488
+ "bio": {
489
+ "type": ["string", "null"]
490
+ },
491
+ "avatar_url": {
492
+ "type": ["string", "null"],
493
+ "format": "uri"
494
+ },
495
+ "location": {
496
+ "type": ["string", "null"]
497
+ },
498
+ "website_url": {
499
+ "type": ["string", "null"],
500
+ "format": "uri"
501
+ }
502
+ },
503
+ "required": [
504
+ "id",
505
+ "display_name",
506
+ "username",
507
+ "bio",
508
+ "avatar_url",
509
+ "location",
510
+ "website_url"
511
+ ]
512
+ },
513
+ "TokenRefreshResponse": {
514
+ "type": "object",
515
+ "properties": {
516
+ "access_token": {
517
+ "type": "string"
518
+ },
519
+ "refresh_token": {
520
+ "type": "string"
521
+ },
522
+ "expires_in": {
523
+ "type": "integer"
524
+ }
525
+ },
526
+ "required": ["access_token", "refresh_token", "expires_in"]
527
+ },
528
+ "TeamMember": {
529
+ "type": "object",
530
+ "properties": {
531
+ "profileId": {
532
+ "type": "string",
533
+ "format": "uuid"
534
+ },
535
+ "displayName": {
536
+ "type": ["string", "null"]
537
+ },
538
+ "username": {
539
+ "type": ["string", "null"]
540
+ },
541
+ "avatarUrl": {
542
+ "type": ["string", "null"],
543
+ "format": "uri"
544
+ },
545
+ "role": {
546
+ "type": "string"
547
+ },
548
+ "joinedAt": {
549
+ "type": "string",
550
+ "format": "date-time"
551
+ },
552
+ "group": {
553
+ "type": "object",
554
+ "properties": {
555
+ "id": {
556
+ "type": "string",
557
+ "format": "uuid"
558
+ },
559
+ "name": {
560
+ "type": "string"
561
+ }
562
+ },
563
+ "required": ["id", "name"]
564
+ }
565
+ },
566
+ "required": [
567
+ "profileId",
568
+ "displayName",
569
+ "username",
570
+ "avatarUrl",
571
+ "role",
572
+ "joinedAt",
573
+ "group"
574
+ ]
575
+ },
576
+ "MarketplaceApp": {
577
+ "type": "object",
578
+ "properties": {
579
+ "id": {
580
+ "type": "string",
581
+ "format": "uuid"
582
+ },
583
+ "external_id": {
584
+ "type": "string"
585
+ },
586
+ "name": {
587
+ "type": "string"
588
+ },
589
+ "slug": {
590
+ "type": "string"
591
+ },
592
+ "tagline": {
593
+ "type": ["string", "null"]
594
+ },
595
+ "description": {
596
+ "type": ["string", "null"]
597
+ },
598
+ "category": {
599
+ "type": "string"
600
+ },
601
+ "icon_url": {
602
+ "type": ["string", "null"],
603
+ "format": "uri"
604
+ },
605
+ "screenshots": {
606
+ "type": ["array", "null"],
607
+ "items": {
608
+ "type": "string",
609
+ "format": "uri"
610
+ }
611
+ },
612
+ "version": {
613
+ "type": "string"
614
+ },
615
+ "pricing_model": {
616
+ "type": "string"
617
+ },
618
+ "pricing_config": {
619
+ "type": ["object", "null"],
620
+ "additionalProperties": {}
621
+ },
622
+ "install_count": {
623
+ "type": "integer"
624
+ },
625
+ "developer_id": {
626
+ "type": "string",
627
+ "format": "uuid"
628
+ },
629
+ "developer_name": {
630
+ "type": "string"
631
+ },
632
+ "status": {
633
+ "type": "string",
634
+ "enum": ["draft", "pending_review", "approved", "rejected"]
635
+ },
636
+ "is_active": {
637
+ "type": "boolean"
638
+ },
639
+ "supported_audience": {
640
+ "type": ["array", "null"],
641
+ "items": {
642
+ "type": "string"
643
+ }
644
+ },
645
+ "created_at": {
646
+ "type": "string",
647
+ "format": "date-time"
648
+ },
649
+ "updated_at": {
650
+ "type": "string",
651
+ "format": "date-time"
652
+ }
653
+ },
654
+ "required": [
655
+ "id",
656
+ "name",
657
+ "slug",
658
+ "category",
659
+ "version",
660
+ "pricing_model",
661
+ "install_count",
662
+ "developer_id",
663
+ "developer_name",
664
+ "status",
665
+ "is_active",
666
+ "created_at",
667
+ "updated_at"
668
+ ]
669
+ },
670
+ "InstalledApp": {
671
+ "type": "object",
672
+ "properties": {
673
+ "installationId": {
674
+ "type": "string",
675
+ "format": "uuid"
676
+ },
677
+ "installedAt": {
678
+ "type": "string",
679
+ "format": "date-time"
680
+ },
681
+ "isActive": {
682
+ "type": "boolean"
683
+ },
684
+ "settings": {
685
+ "type": ["object", "null"],
686
+ "additionalProperties": {}
687
+ },
688
+ "app": {
689
+ "$ref": "#/components/schemas/MarketplaceApp"
690
+ }
691
+ },
692
+ "required": [
693
+ "installationId",
694
+ "installedAt",
695
+ "isActive",
696
+ "settings",
697
+ "app"
698
+ ]
699
+ },
700
+ "MarketplaceItem": {
701
+ "type": "object",
702
+ "properties": {
703
+ "id": {
704
+ "type": "string",
705
+ "format": "uuid"
706
+ },
707
+ "title": {
708
+ "type": "string"
709
+ },
710
+ "content": {
711
+ "type": ["string", "null"]
712
+ },
713
+ "profile_id": {
714
+ "type": "string",
715
+ "format": "uuid"
716
+ },
717
+ "entry_type": {
718
+ "type": "string"
719
+ },
720
+ "marketplace_metadata": {
721
+ "type": ["object", "null"],
722
+ "additionalProperties": {}
723
+ },
724
+ "created_at": {
725
+ "type": "string",
726
+ "format": "date-time"
727
+ },
728
+ "updated_at": {
729
+ "type": "string",
730
+ "format": "date-time"
731
+ }
732
+ },
733
+ "required": [
734
+ "id",
735
+ "title",
736
+ "profile_id",
737
+ "entry_type",
738
+ "created_at",
739
+ "updated_at"
740
+ ]
741
+ },
742
+ "Category": {
743
+ "type": "object",
744
+ "properties": {
745
+ "id": {
746
+ "type": "string",
747
+ "format": "uuid"
748
+ },
749
+ "name": {
750
+ "type": "string"
751
+ },
752
+ "description": {
753
+ "type": ["string", "null"]
754
+ },
755
+ "collection_type": {
756
+ "type": "string"
757
+ },
758
+ "organization_rules": {
759
+ "type": ["object", "null"],
760
+ "additionalProperties": {}
761
+ },
762
+ "created_at": {
763
+ "type": "string",
764
+ "format": "date-time"
765
+ },
766
+ "updated_at": {
767
+ "type": "string",
768
+ "format": "date-time"
769
+ }
770
+ },
771
+ "required": [
772
+ "id",
773
+ "name",
774
+ "collection_type",
775
+ "created_at",
776
+ "updated_at"
777
+ ]
778
+ },
779
+ "Entry": {
780
+ "type": "object",
781
+ "properties": {
782
+ "id": {
783
+ "type": "string",
784
+ "format": "uuid"
785
+ },
786
+ "title": {
787
+ "type": "string"
788
+ },
789
+ "content": {
790
+ "type": "string"
791
+ },
792
+ "profile_id": {
793
+ "type": "string",
794
+ "format": "uuid"
795
+ },
796
+ "audience_type": {
797
+ "type": "string"
798
+ },
799
+ "created_at": {
800
+ "type": "string",
801
+ "format": "date-time"
802
+ },
803
+ "updated_at": {
804
+ "type": "string",
805
+ "format": "date-time"
806
+ }
807
+ },
808
+ "required": [
809
+ "id",
810
+ "title",
811
+ "content",
812
+ "profile_id",
813
+ "audience_type",
814
+ "created_at",
815
+ "updated_at"
816
+ ]
817
+ },
818
+ "Event": {
819
+ "type": "object",
820
+ "properties": {
821
+ "id": {
822
+ "type": "string",
823
+ "format": "uuid"
824
+ },
825
+ "title": {
826
+ "type": "string"
827
+ },
828
+ "description": {
829
+ "type": "string"
830
+ },
831
+ "startDate": {
832
+ "type": "string",
833
+ "format": "date-time"
834
+ },
835
+ "endDate": {
836
+ "type": "string",
837
+ "format": "date-time"
838
+ },
839
+ "location": {
840
+ "type": ["string", "null"]
841
+ },
842
+ "isOnline": {
843
+ "type": "boolean"
844
+ },
845
+ "category": {
846
+ "type": "string"
847
+ },
848
+ "organizer": {
849
+ "type": "string",
850
+ "format": "uuid"
851
+ },
852
+ "maxAttendees": {
853
+ "type": ["integer", "null"]
854
+ },
855
+ "currentAttendees": {
856
+ "type": ["integer", "null"]
857
+ },
858
+ "price": {
859
+ "type": "number",
860
+ "minimum": 0
861
+ },
862
+ "tags": {
863
+ "type": "array",
864
+ "items": {
865
+ "type": "string"
866
+ }
867
+ },
868
+ "imageUrl": {
869
+ "type": ["string", "null"],
870
+ "format": "uri"
871
+ },
872
+ "createdAt": {
873
+ "type": "string",
874
+ "format": "date-time"
875
+ },
876
+ "updatedAt": {
877
+ "type": "string",
878
+ "format": "date-time"
879
+ }
880
+ },
881
+ "required": [
882
+ "id",
883
+ "title",
884
+ "description",
885
+ "startDate",
886
+ "endDate",
887
+ "location",
888
+ "isOnline",
889
+ "category",
890
+ "organizer",
891
+ "maxAttendees",
892
+ "currentAttendees",
893
+ "price",
894
+ "tags",
895
+ "imageUrl",
896
+ "createdAt",
897
+ "updatedAt"
898
+ ]
899
+ },
900
+ "CreatedPersonalToken": {
901
+ "type": "object",
902
+ "properties": {
903
+ "ok": {
904
+ "type": "boolean",
905
+ "enum": [true]
906
+ },
907
+ "success": {
908
+ "type": "boolean",
909
+ "enum": [true]
910
+ },
911
+ "data": {
912
+ "type": "object",
913
+ "properties": {
914
+ "token": {
915
+ "type": "string",
916
+ "description": "Full token value — displayed ONCE. Store it now; it cannot be retrieved again."
917
+ },
918
+ "id": {
919
+ "type": "string",
920
+ "format": "uuid"
921
+ },
922
+ "name": {
923
+ "type": "string"
924
+ },
925
+ "prefix": {
926
+ "type": "string",
927
+ "description": "First 20 characters of the token, safe to display later."
928
+ },
929
+ "created_at": {
930
+ "type": "string",
931
+ "format": "date-time"
932
+ },
933
+ "expires_at": {
934
+ "type": ["string", "null"],
935
+ "format": "date-time"
936
+ }
937
+ },
938
+ "required": [
939
+ "token",
940
+ "id",
941
+ "name",
942
+ "prefix",
943
+ "created_at",
944
+ "expires_at"
945
+ ]
946
+ }
947
+ },
948
+ "required": ["ok", "success", "data"]
949
+ },
950
+ "PersonalTokenSummary": {
951
+ "type": "object",
952
+ "properties": {
953
+ "id": {
954
+ "type": "string",
955
+ "format": "uuid"
956
+ },
957
+ "name": {
958
+ "type": "string"
959
+ },
960
+ "prefix": {
961
+ "type": "string"
962
+ },
963
+ "created_at": {
964
+ "type": "string",
965
+ "format": "date-time"
966
+ },
967
+ "last_used_at": {
968
+ "type": ["string", "null"],
969
+ "format": "date-time"
970
+ },
971
+ "expires_at": {
972
+ "type": ["string", "null"],
973
+ "format": "date-time"
974
+ },
975
+ "is_active": {
976
+ "type": "boolean"
977
+ }
978
+ },
979
+ "required": [
980
+ "id",
981
+ "name",
982
+ "prefix",
983
+ "created_at",
984
+ "last_used_at",
985
+ "expires_at",
986
+ "is_active"
987
+ ]
988
+ },
989
+ "PersonalTokenList": {
990
+ "type": "object",
991
+ "properties": {
992
+ "ok": {
993
+ "type": "boolean",
994
+ "enum": [true]
995
+ },
996
+ "success": {
997
+ "type": "boolean",
998
+ "enum": [true]
999
+ },
1000
+ "data": {
1001
+ "type": "array",
1002
+ "items": {
1003
+ "$ref": "#/components/schemas/PersonalTokenSummary"
1004
+ }
1005
+ }
1006
+ },
1007
+ "required": ["ok", "success", "data"]
1008
+ }
1009
+ },
1010
+ "parameters": {}
1011
+ },
1012
+ "paths": {
1013
+ "/api/v1/user/me": {
1014
+ "get": {
1015
+ "operationId": "getCurrentUser",
1016
+ "tags": ["User"],
1017
+ "summary": "Get current user",
1018
+ "description": "Returns the authenticated user's active profile and API key metadata.",
1019
+ "security": [
1020
+ {
1021
+ "ApiKeyAuth": []
1022
+ }
1023
+ ],
1024
+ "responses": {
1025
+ "200": {
1026
+ "description": "Current user",
1027
+ "content": {
1028
+ "application/json": {
1029
+ "schema": {
1030
+ "$ref": "#/components/schemas/UserMe"
1031
+ }
1032
+ }
1033
+ }
1034
+ },
1035
+ "401": {
1036
+ "description": "Invalid or missing API key"
1037
+ }
1038
+ }
1039
+ }
1040
+ },
1041
+ "/api/v1/analytics/summary": {
1042
+ "get": {
1043
+ "operationId": "getAnalyticsSummary",
1044
+ "tags": ["Analytics"],
1045
+ "summary": "Get analytics summary",
1046
+ "description": "Returns 7-day usage analytics for the authenticated API key.",
1047
+ "security": [
1048
+ {
1049
+ "ApiKeyAuth": []
1050
+ }
1051
+ ],
1052
+ "responses": {
1053
+ "200": {
1054
+ "description": "Analytics summary",
1055
+ "content": {
1056
+ "application/json": {
1057
+ "schema": {
1058
+ "$ref": "#/components/schemas/AnalyticsSummary"
1059
+ }
1060
+ }
1061
+ }
1062
+ },
1063
+ "401": {
1064
+ "description": "Invalid or missing API key"
1065
+ }
1066
+ }
1067
+ }
1068
+ },
1069
+ "/api/v1/profiles/available": {
1070
+ "get": {
1071
+ "operationId": "listProfiles",
1072
+ "tags": ["Profiles"],
1073
+ "summary": "List available profiles",
1074
+ "description": "Returns all non-anonymous active profiles for the authenticated API key.",
1075
+ "security": [
1076
+ {
1077
+ "ApiKeyAuth": []
1078
+ }
1079
+ ],
1080
+ "responses": {
1081
+ "200": {
1082
+ "description": "Available profiles",
1083
+ "content": {
1084
+ "application/json": {
1085
+ "schema": {
1086
+ "type": "object",
1087
+ "properties": {
1088
+ "ok": {
1089
+ "type": "boolean"
1090
+ },
1091
+ "success": {
1092
+ "type": "boolean"
1093
+ },
1094
+ "data": {
1095
+ "type": "array",
1096
+ "items": {
1097
+ "$ref": "#/components/schemas/ProfileSummary"
1098
+ }
1099
+ }
1100
+ },
1101
+ "required": ["ok", "success", "data"]
1102
+ }
1103
+ }
1104
+ }
1105
+ },
1106
+ "401": {
1107
+ "description": "Invalid or missing API key"
1108
+ }
1109
+ }
1110
+ }
1111
+ },
1112
+ "/api/v1/profiles/active": {
1113
+ "get": {
1114
+ "operationId": "getActiveProfile",
1115
+ "tags": ["Profiles"],
1116
+ "summary": "Get active profile",
1117
+ "description": "Returns the default active (non-anonymous) profile for the authenticated API key.",
1118
+ "security": [
1119
+ {
1120
+ "ApiKeyAuth": []
1121
+ }
1122
+ ],
1123
+ "responses": {
1124
+ "200": {
1125
+ "description": "Active profile",
1126
+ "content": {
1127
+ "application/json": {
1128
+ "schema": {
1129
+ "type": "object",
1130
+ "properties": {
1131
+ "ok": {
1132
+ "type": "boolean"
1133
+ },
1134
+ "success": {
1135
+ "type": "boolean"
1136
+ },
1137
+ "data": {
1138
+ "$ref": "#/components/schemas/ProfileSummary"
1139
+ }
1140
+ },
1141
+ "required": ["ok", "success", "data"]
1142
+ }
1143
+ }
1144
+ }
1145
+ },
1146
+ "401": {
1147
+ "description": "Invalid or missing API key"
1148
+ }
1149
+ }
1150
+ }
1151
+ },
1152
+ "/api/v1/profiles/{profileId}": {
1153
+ "put": {
1154
+ "operationId": "updateProfile",
1155
+ "tags": ["Profiles"],
1156
+ "summary": "Update a profile",
1157
+ "security": [
1158
+ {
1159
+ "ApiKeyAuth": []
1160
+ }
1161
+ ],
1162
+ "parameters": [
1163
+ {
1164
+ "schema": {
1165
+ "type": "string",
1166
+ "pattern": "^ext_[a-f0-9]{16}$",
1167
+ "example": "ext_a1b2c3d4e5f6a7b8"
1168
+ },
1169
+ "required": true,
1170
+ "name": "profileId",
1171
+ "in": "path"
1172
+ }
1173
+ ],
1174
+ "requestBody": {
1175
+ "content": {
1176
+ "application/json": {
1177
+ "schema": {
1178
+ "type": "object",
1179
+ "properties": {
1180
+ "profileName": {
1181
+ "type": "string",
1182
+ "minLength": 1
1183
+ },
1184
+ "avatar": {
1185
+ "type": "string",
1186
+ "format": "uri"
1187
+ },
1188
+ "bio": {
1189
+ "type": ["string", "null"]
1190
+ },
1191
+ "location": {
1192
+ "type": ["string", "null"]
1193
+ }
1194
+ }
1195
+ }
1196
+ }
1197
+ }
1198
+ },
1199
+ "responses": {
1200
+ "200": {
1201
+ "description": "Profile updated",
1202
+ "content": {
1203
+ "application/json": {
1204
+ "schema": {
1205
+ "$ref": "#/components/schemas/UpdatedProfile"
1206
+ }
1207
+ }
1208
+ }
1209
+ },
1210
+ "400": {
1211
+ "description": "Validation error — invalid profileId format or body"
1212
+ },
1213
+ "401": {
1214
+ "description": "Invalid or missing API key"
1215
+ }
1216
+ }
1217
+ }
1218
+ },
1219
+ "/api/v1/profiles/{profileId}/activate": {
1220
+ "post": {
1221
+ "operationId": "activateProfile",
1222
+ "tags": ["Profiles"],
1223
+ "summary": "Activate a profile",
1224
+ "description": "Switches the active profile to the specified profile.",
1225
+ "security": [
1226
+ {
1227
+ "ApiKeyAuth": []
1228
+ }
1229
+ ],
1230
+ "parameters": [
1231
+ {
1232
+ "schema": {
1233
+ "type": "string",
1234
+ "pattern": "^ext_[a-f0-9]{16}$",
1235
+ "example": "ext_a1b2c3d4e5f6a7b8"
1236
+ },
1237
+ "required": true,
1238
+ "name": "profileId",
1239
+ "in": "path"
1240
+ }
1241
+ ],
1242
+ "responses": {
1243
+ "200": {
1244
+ "description": "Profile activated",
1245
+ "content": {
1246
+ "application/json": {
1247
+ "schema": {
1248
+ "type": "object",
1249
+ "properties": {
1250
+ "ok": {
1251
+ "type": "boolean"
1252
+ },
1253
+ "success": {
1254
+ "type": "boolean"
1255
+ },
1256
+ "data": {
1257
+ "type": "object",
1258
+ "properties": {
1259
+ "activeProfile": {
1260
+ "type": "string"
1261
+ },
1262
+ "switchedAt": {
1263
+ "type": "string",
1264
+ "format": "date-time"
1265
+ }
1266
+ },
1267
+ "required": ["activeProfile", "switchedAt"]
1268
+ }
1269
+ },
1270
+ "required": ["ok", "success", "data"]
1271
+ }
1272
+ }
1273
+ }
1274
+ },
1275
+ "400": {
1276
+ "description": "Validation error — invalid profileId format"
1277
+ },
1278
+ "401": {
1279
+ "description": "Invalid or missing API key"
1280
+ }
1281
+ }
1282
+ }
1283
+ },
1284
+ "/api/v1/groups": {
1285
+ "get": {
1286
+ "operationId": "listGroups",
1287
+ "tags": ["Groups"],
1288
+ "summary": "List groups",
1289
+ "description": "Returns all groups the authenticated user created or joined.",
1290
+ "security": [
1291
+ {
1292
+ "ApiKeyAuth": []
1293
+ }
1294
+ ],
1295
+ "responses": {
1296
+ "200": {
1297
+ "description": "User groups",
1298
+ "content": {
1299
+ "application/json": {
1300
+ "schema": {
1301
+ "type": "object",
1302
+ "properties": {
1303
+ "ok": {
1304
+ "type": "boolean"
1305
+ },
1306
+ "success": {
1307
+ "type": "boolean"
1308
+ },
1309
+ "data": {
1310
+ "type": "array",
1311
+ "items": {
1312
+ "$ref": "#/components/schemas/GroupSummary"
1313
+ }
1314
+ }
1315
+ },
1316
+ "required": ["ok", "success", "data"]
1317
+ }
1318
+ }
1319
+ }
1320
+ },
1321
+ "401": {
1322
+ "description": "Invalid or missing API key"
1323
+ }
1324
+ }
1325
+ }
1326
+ },
1327
+ "/api/v1/groups/{groupId}/members": {
1328
+ "get": {
1329
+ "operationId": "listGroupMembers",
1330
+ "tags": ["Groups"],
1331
+ "summary": "Get group members",
1332
+ "description": "Returns members of a group. Requires the caller to be the creator or a member.",
1333
+ "security": [
1334
+ {
1335
+ "ApiKeyAuth": []
1336
+ }
1337
+ ],
1338
+ "parameters": [
1339
+ {
1340
+ "schema": {
1341
+ "type": "string",
1342
+ "format": "uuid",
1343
+ "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
1344
+ },
1345
+ "required": true,
1346
+ "name": "groupId",
1347
+ "in": "path"
1348
+ }
1349
+ ],
1350
+ "responses": {
1351
+ "200": {
1352
+ "description": "Group members",
1353
+ "content": {
1354
+ "application/json": {
1355
+ "schema": {
1356
+ "type": "object",
1357
+ "properties": {
1358
+ "ok": {
1359
+ "type": "boolean"
1360
+ },
1361
+ "success": {
1362
+ "type": "boolean"
1363
+ },
1364
+ "data": {
1365
+ "type": "array",
1366
+ "items": {
1367
+ "$ref": "#/components/schemas/GroupMember"
1368
+ }
1369
+ }
1370
+ },
1371
+ "required": ["ok", "success", "data"]
1372
+ }
1373
+ }
1374
+ }
1375
+ },
1376
+ "400": {
1377
+ "description": "Validation error — invalid groupId format"
1378
+ },
1379
+ "401": {
1380
+ "description": "Invalid or missing API key"
1381
+ },
1382
+ "403": {
1383
+ "description": "Not a member or creator of this group"
1384
+ },
1385
+ "404": {
1386
+ "description": "Group not found"
1387
+ }
1388
+ }
1389
+ }
1390
+ },
1391
+ "/api/v1/auth/register": {
1392
+ "post": {
1393
+ "operationId": "register",
1394
+ "tags": ["Auth"],
1395
+ "summary": "Register a new user",
1396
+ "requestBody": {
1397
+ "content": {
1398
+ "application/json": {
1399
+ "schema": {
1400
+ "type": "object",
1401
+ "properties": {
1402
+ "email": {
1403
+ "type": "string",
1404
+ "format": "email"
1405
+ },
1406
+ "password": {
1407
+ "type": "string",
1408
+ "minLength": 8,
1409
+ "pattern": "[A-Z]"
1410
+ },
1411
+ "name": {
1412
+ "type": "string"
1413
+ },
1414
+ "username": {
1415
+ "type": "string"
1416
+ },
1417
+ "preferences": {}
1418
+ },
1419
+ "required": ["email", "password"]
1420
+ }
1421
+ }
1422
+ }
1423
+ },
1424
+ "responses": {
1425
+ "201": {
1426
+ "description": "User registered and session created",
1427
+ "content": {
1428
+ "application/json": {
1429
+ "schema": {
1430
+ "$ref": "#/components/schemas/AuthSessionResponse"
1431
+ }
1432
+ }
1433
+ }
1434
+ },
1435
+ "400": {
1436
+ "description": "Validation error — weak password or invalid email"
1437
+ },
1438
+ "409": {
1439
+ "description": "Email already registered"
1440
+ }
1441
+ }
1442
+ }
1443
+ },
1444
+ "/api/v1/auth/login": {
1445
+ "post": {
1446
+ "operationId": "login",
1447
+ "tags": ["Auth"],
1448
+ "summary": "Log in",
1449
+ "requestBody": {
1450
+ "content": {
1451
+ "application/json": {
1452
+ "schema": {
1453
+ "type": "object",
1454
+ "properties": {
1455
+ "email": {
1456
+ "type": "string",
1457
+ "format": "email"
1458
+ },
1459
+ "password": {
1460
+ "type": "string",
1461
+ "minLength": 1
1462
+ }
1463
+ },
1464
+ "required": ["email", "password"]
1465
+ }
1466
+ }
1467
+ }
1468
+ },
1469
+ "responses": {
1470
+ "200": {
1471
+ "description": "Login successful",
1472
+ "content": {
1473
+ "application/json": {
1474
+ "schema": {
1475
+ "$ref": "#/components/schemas/AuthSessionResponse"
1476
+ }
1477
+ }
1478
+ }
1479
+ },
1480
+ "400": {
1481
+ "description": "Validation error — missing email or password"
1482
+ },
1483
+ "401": {
1484
+ "description": "Invalid credentials"
1485
+ }
1486
+ }
1487
+ }
1488
+ },
1489
+ "/api/v1/auth/logout": {
1490
+ "post": {
1491
+ "operationId": "logout",
1492
+ "tags": ["Auth"],
1493
+ "summary": "Log out",
1494
+ "description": "Invalidates the current session. Requires Authorization header.",
1495
+ "security": [
1496
+ {
1497
+ "BearerAuth": []
1498
+ }
1499
+ ],
1500
+ "responses": {
1501
+ "204": {
1502
+ "description": "Logged out"
1503
+ },
1504
+ "401": {
1505
+ "description": "Missing authorization header"
1506
+ }
1507
+ }
1508
+ }
1509
+ },
1510
+ "/api/v1/auth/token/refresh": {
1511
+ "post": {
1512
+ "operationId": "refreshToken",
1513
+ "tags": ["Auth"],
1514
+ "summary": "Refresh access token",
1515
+ "requestBody": {
1516
+ "content": {
1517
+ "application/json": {
1518
+ "schema": {
1519
+ "type": "object",
1520
+ "properties": {
1521
+ "refresh_token": {
1522
+ "type": "string",
1523
+ "minLength": 1
1524
+ }
1525
+ },
1526
+ "required": ["refresh_token"]
1527
+ }
1528
+ }
1529
+ }
1530
+ },
1531
+ "responses": {
1532
+ "200": {
1533
+ "description": "New tokens issued",
1534
+ "content": {
1535
+ "application/json": {
1536
+ "schema": {
1537
+ "$ref": "#/components/schemas/TokenRefreshResponse"
1538
+ }
1539
+ }
1540
+ }
1541
+ },
1542
+ "400": {
1543
+ "description": "Validation error — missing refresh_token"
1544
+ },
1545
+ "401": {
1546
+ "description": "Invalid or expired refresh token"
1547
+ }
1548
+ }
1549
+ }
1550
+ },
1551
+ "/api/v1/auth/profile": {
1552
+ "get": {
1553
+ "operationId": "getAuthProfile",
1554
+ "tags": ["Auth"],
1555
+ "summary": "Get auth profile",
1556
+ "description": "Returns the authenticated user identity and API key metadata.",
1557
+ "security": [
1558
+ {
1559
+ "ApiKeyAuth": []
1560
+ },
1561
+ {
1562
+ "BearerAuth": []
1563
+ }
1564
+ ],
1565
+ "responses": {
1566
+ "200": {
1567
+ "description": "Auth profile",
1568
+ "content": {
1569
+ "application/json": {
1570
+ "schema": {
1571
+ "$ref": "#/components/schemas/AuthProfileResponse"
1572
+ }
1573
+ }
1574
+ }
1575
+ },
1576
+ "401": {
1577
+ "description": "Unauthorized"
1578
+ }
1579
+ }
1580
+ },
1581
+ "patch": {
1582
+ "operationId": "patchAuthProfile",
1583
+ "tags": ["Auth"],
1584
+ "summary": "Update profile (partial)",
1585
+ "security": [
1586
+ {
1587
+ "BearerAuth": []
1588
+ }
1589
+ ],
1590
+ "requestBody": {
1591
+ "content": {
1592
+ "application/json": {
1593
+ "schema": {
1594
+ "type": "object",
1595
+ "properties": {
1596
+ "name": {
1597
+ "type": "string"
1598
+ },
1599
+ "bio": {
1600
+ "type": "string"
1601
+ },
1602
+ "avatar_url": {
1603
+ "type": "string",
1604
+ "format": "uri"
1605
+ },
1606
+ "location": {
1607
+ "type": "string"
1608
+ },
1609
+ "website_url": {
1610
+ "type": "string",
1611
+ "format": "uri"
1612
+ }
1613
+ }
1614
+ }
1615
+ }
1616
+ }
1617
+ },
1618
+ "responses": {
1619
+ "200": {
1620
+ "description": "Updated profile row",
1621
+ "content": {
1622
+ "application/json": {
1623
+ "schema": {
1624
+ "$ref": "#/components/schemas/RawProfileResponse"
1625
+ }
1626
+ }
1627
+ }
1628
+ },
1629
+ "400": {
1630
+ "description": "No fields provided"
1631
+ },
1632
+ "401": {
1633
+ "description": "Unauthorized"
1634
+ }
1635
+ }
1636
+ },
1637
+ "put": {
1638
+ "operationId": "putAuthProfile",
1639
+ "tags": ["Auth"],
1640
+ "summary": "Update profile (full)",
1641
+ "description": "Superset of PATCH — also accepts preferences and data_retention_days (min 30).",
1642
+ "security": [
1643
+ {
1644
+ "BearerAuth": []
1645
+ }
1646
+ ],
1647
+ "requestBody": {
1648
+ "content": {
1649
+ "application/json": {
1650
+ "schema": {
1651
+ "type": "object",
1652
+ "properties": {
1653
+ "name": {
1654
+ "type": "string"
1655
+ },
1656
+ "bio": {
1657
+ "type": "string"
1658
+ },
1659
+ "avatar_url": {
1660
+ "type": "string",
1661
+ "format": "uri"
1662
+ },
1663
+ "location": {
1664
+ "type": "string"
1665
+ },
1666
+ "website_url": {
1667
+ "type": "string",
1668
+ "format": "uri"
1669
+ },
1670
+ "preferences": {
1671
+ "type": "object",
1672
+ "additionalProperties": {}
1673
+ },
1674
+ "data_retention_days": {
1675
+ "type": "integer",
1676
+ "minimum": 30
1677
+ }
1678
+ }
1679
+ }
1680
+ }
1681
+ }
1682
+ },
1683
+ "responses": {
1684
+ "200": {
1685
+ "description": "Updated profile row",
1686
+ "content": {
1687
+ "application/json": {
1688
+ "schema": {
1689
+ "$ref": "#/components/schemas/RawProfileResponse"
1690
+ }
1691
+ }
1692
+ }
1693
+ },
1694
+ "400": {
1695
+ "description": "No fields provided, or data_retention_days < 30"
1696
+ },
1697
+ "401": {
1698
+ "description": "Unauthorized"
1699
+ }
1700
+ }
1701
+ }
1702
+ },
1703
+ "/api/v1/auth/account": {
1704
+ "delete": {
1705
+ "operationId": "deleteAccount",
1706
+ "tags": ["Auth"],
1707
+ "summary": "Delete account",
1708
+ "security": [
1709
+ {
1710
+ "BearerAuth": []
1711
+ }
1712
+ ],
1713
+ "responses": {
1714
+ "204": {
1715
+ "description": "Account deleted"
1716
+ },
1717
+ "401": {
1718
+ "description": "Unauthorized"
1719
+ }
1720
+ }
1721
+ }
1722
+ },
1723
+ "/api/v1/sessions": {
1724
+ "get": {
1725
+ "operationId": "listSessions",
1726
+ "tags": ["Sessions"],
1727
+ "summary": "List sessions",
1728
+ "description": "Returns the user's sessions. Sessions feature is not yet implemented — returns empty paginated list.",
1729
+ "security": [
1730
+ {
1731
+ "ApiKeyAuth": []
1732
+ }
1733
+ ],
1734
+ "responses": {
1735
+ "200": {
1736
+ "description": "Sessions list (currently always empty)",
1737
+ "content": {
1738
+ "application/json": {
1739
+ "schema": {
1740
+ "type": "object",
1741
+ "properties": {
1742
+ "ok": {
1743
+ "type": "boolean"
1744
+ },
1745
+ "success": {
1746
+ "type": "boolean"
1747
+ },
1748
+ "data": {
1749
+ "type": "array",
1750
+ "items": {}
1751
+ },
1752
+ "meta": {
1753
+ "type": "object",
1754
+ "properties": {
1755
+ "pagination": {
1756
+ "type": "object",
1757
+ "properties": {
1758
+ "page": {
1759
+ "type": "integer"
1760
+ },
1761
+ "limit": {
1762
+ "type": "integer"
1763
+ },
1764
+ "total": {
1765
+ "type": "integer"
1766
+ },
1767
+ "totalPages": {
1768
+ "type": "integer"
1769
+ }
1770
+ },
1771
+ "required": ["page", "limit", "total", "totalPages"]
1772
+ }
1773
+ },
1774
+ "required": ["pagination"]
1775
+ },
1776
+ "message": {
1777
+ "type": "string"
1778
+ }
1779
+ },
1780
+ "required": ["ok", "success", "data", "meta"]
1781
+ }
1782
+ }
1783
+ }
1784
+ },
1785
+ "401": {
1786
+ "description": "Invalid or missing API key"
1787
+ }
1788
+ }
1789
+ }
1790
+ },
1791
+ "/api/v1/sessions/upcoming": {
1792
+ "get": {
1793
+ "operationId": "listUpcomingSessions",
1794
+ "tags": ["Sessions"],
1795
+ "summary": "List upcoming sessions",
1796
+ "description": "Returns upcoming sessions. Sessions feature is not yet implemented — returns empty list.",
1797
+ "security": [
1798
+ {
1799
+ "ApiKeyAuth": []
1800
+ }
1801
+ ],
1802
+ "responses": {
1803
+ "200": {
1804
+ "description": "Upcoming sessions (currently always empty)",
1805
+ "content": {
1806
+ "application/json": {
1807
+ "schema": {
1808
+ "type": "object",
1809
+ "properties": {
1810
+ "ok": {
1811
+ "type": "boolean"
1812
+ },
1813
+ "success": {
1814
+ "type": "boolean"
1815
+ },
1816
+ "data": {
1817
+ "type": "array",
1818
+ "items": {}
1819
+ },
1820
+ "message": {
1821
+ "type": "string"
1822
+ }
1823
+ },
1824
+ "required": ["ok", "success", "data"]
1825
+ }
1826
+ }
1827
+ }
1828
+ },
1829
+ "401": {
1830
+ "description": "Invalid or missing API key"
1831
+ }
1832
+ }
1833
+ }
1834
+ },
1835
+ "/api/v1/team/members": {
1836
+ "get": {
1837
+ "operationId": "listTeamMembers",
1838
+ "tags": ["Team"],
1839
+ "summary": "List team members",
1840
+ "description": "Returns group memberships for the authenticated user as a flat list of team members.",
1841
+ "security": [
1842
+ {
1843
+ "ApiKeyAuth": []
1844
+ }
1845
+ ],
1846
+ "responses": {
1847
+ "200": {
1848
+ "description": "Team members",
1849
+ "content": {
1850
+ "application/json": {
1851
+ "schema": {
1852
+ "type": "object",
1853
+ "properties": {
1854
+ "ok": {
1855
+ "type": "boolean"
1856
+ },
1857
+ "success": {
1858
+ "type": "boolean"
1859
+ },
1860
+ "data": {
1861
+ "type": "array",
1862
+ "items": {
1863
+ "$ref": "#/components/schemas/TeamMember"
1864
+ }
1865
+ },
1866
+ "meta": {
1867
+ "type": "object",
1868
+ "properties": {
1869
+ "total": {
1870
+ "type": "integer"
1871
+ },
1872
+ "roles": {
1873
+ "type": "array",
1874
+ "items": {
1875
+ "type": "string"
1876
+ }
1877
+ }
1878
+ },
1879
+ "required": ["total", "roles"]
1880
+ }
1881
+ },
1882
+ "required": ["ok", "success", "data", "meta"]
1883
+ }
1884
+ }
1885
+ }
1886
+ },
1887
+ "401": {
1888
+ "description": "Invalid or missing API key"
1889
+ }
1890
+ }
1891
+ }
1892
+ },
1893
+ "/api/v1/marketplace/apps": {
1894
+ "get": {
1895
+ "operationId": "listMarketplaceApps",
1896
+ "tags": ["Marketplace"],
1897
+ "summary": "Browse marketplace apps",
1898
+ "description": "Returns paginated list of approved, active marketplace apps.",
1899
+ "security": [
1900
+ {
1901
+ "ApiKeyAuth": []
1902
+ }
1903
+ ],
1904
+ "parameters": [
1905
+ {
1906
+ "schema": {
1907
+ "type": "integer",
1908
+ "minimum": 1,
1909
+ "maximum": 100
1910
+ },
1911
+ "required": false,
1912
+ "name": "limit",
1913
+ "in": "query"
1914
+ },
1915
+ {
1916
+ "schema": {
1917
+ "type": "integer",
1918
+ "minimum": 0
1919
+ },
1920
+ "required": false,
1921
+ "name": "offset",
1922
+ "in": "query"
1923
+ },
1924
+ {
1925
+ "schema": {
1926
+ "type": "string"
1927
+ },
1928
+ "required": false,
1929
+ "name": "category",
1930
+ "in": "query"
1931
+ },
1932
+ {
1933
+ "schema": {
1934
+ "type": "string"
1935
+ },
1936
+ "required": false,
1937
+ "name": "search",
1938
+ "in": "query"
1939
+ }
1940
+ ],
1941
+ "responses": {
1942
+ "200": {
1943
+ "description": "Marketplace apps",
1944
+ "content": {
1945
+ "application/json": {
1946
+ "schema": {
1947
+ "type": "object",
1948
+ "properties": {
1949
+ "ok": {
1950
+ "type": "boolean"
1951
+ },
1952
+ "success": {
1953
+ "type": "boolean"
1954
+ },
1955
+ "data": {
1956
+ "type": "array",
1957
+ "items": {
1958
+ "$ref": "#/components/schemas/MarketplaceApp"
1959
+ }
1960
+ },
1961
+ "meta": {
1962
+ "type": "object",
1963
+ "properties": {
1964
+ "pagination": {
1965
+ "type": "object",
1966
+ "properties": {
1967
+ "page": {
1968
+ "type": "integer"
1969
+ },
1970
+ "limit": {
1971
+ "type": "integer"
1972
+ },
1973
+ "total": {
1974
+ "type": "integer"
1975
+ },
1976
+ "totalPages": {
1977
+ "type": "integer"
1978
+ }
1979
+ },
1980
+ "required": ["page", "limit", "total", "totalPages"]
1981
+ }
1982
+ },
1983
+ "required": ["pagination"]
1984
+ }
1985
+ },
1986
+ "required": ["ok", "success", "data", "meta"]
1987
+ }
1988
+ }
1989
+ }
1990
+ },
1991
+ "401": {
1992
+ "description": "Invalid or missing API key"
1993
+ }
1994
+ }
1995
+ }
1996
+ },
1997
+ "/api/v1/marketplace/trending": {
1998
+ "get": {
1999
+ "operationId": "listTrendingApps",
2000
+ "tags": ["Marketplace"],
2001
+ "summary": "Trending apps",
2002
+ "description": "Returns approved apps sorted by install count (top 20).",
2003
+ "security": [
2004
+ {
2005
+ "ApiKeyAuth": []
2006
+ }
2007
+ ],
2008
+ "responses": {
2009
+ "200": {
2010
+ "description": "Trending apps",
2011
+ "content": {
2012
+ "application/json": {
2013
+ "schema": {
2014
+ "type": "object",
2015
+ "properties": {
2016
+ "ok": {
2017
+ "type": "boolean"
2018
+ },
2019
+ "success": {
2020
+ "type": "boolean"
2021
+ },
2022
+ "data": {
2023
+ "type": "array",
2024
+ "items": {
2025
+ "$ref": "#/components/schemas/MarketplaceApp"
2026
+ }
2027
+ }
2028
+ },
2029
+ "required": ["ok", "success", "data"]
2030
+ }
2031
+ }
2032
+ }
2033
+ },
2034
+ "401": {
2035
+ "description": "Invalid or missing API key"
2036
+ }
2037
+ }
2038
+ }
2039
+ },
2040
+ "/api/v1/marketplace/featured": {
2041
+ "get": {
2042
+ "operationId": "listFeaturedApps",
2043
+ "tags": ["Marketplace"],
2044
+ "summary": "Featured apps",
2045
+ "description": "Returns featured approved apps (curated subset of top apps).",
2046
+ "security": [
2047
+ {
2048
+ "ApiKeyAuth": []
2049
+ }
2050
+ ],
2051
+ "responses": {
2052
+ "200": {
2053
+ "description": "Featured apps",
2054
+ "content": {
2055
+ "application/json": {
2056
+ "schema": {
2057
+ "type": "object",
2058
+ "properties": {
2059
+ "ok": {
2060
+ "type": "boolean"
2061
+ },
2062
+ "success": {
2063
+ "type": "boolean"
2064
+ },
2065
+ "data": {
2066
+ "type": "array",
2067
+ "items": {
2068
+ "$ref": "#/components/schemas/MarketplaceApp"
2069
+ }
2070
+ }
2071
+ },
2072
+ "required": ["ok", "success", "data"]
2073
+ }
2074
+ }
2075
+ }
2076
+ },
2077
+ "401": {
2078
+ "description": "Invalid or missing API key"
2079
+ }
2080
+ }
2081
+ }
2082
+ },
2083
+ "/api/v1/marketplace/categories": {
2084
+ "get": {
2085
+ "operationId": "listMarketplaceCategories",
2086
+ "tags": ["Marketplace"],
2087
+ "summary": "List app categories",
2088
+ "description": "Returns distinct categories from approved apps with their app counts. Note: a second registration of this path exists (no auth, collections-table version) but is shadowed by this route (Express first-match).",
2089
+ "security": [
2090
+ {
2091
+ "ApiKeyAuth": []
2092
+ }
2093
+ ],
2094
+ "responses": {
2095
+ "200": {
2096
+ "description": "Category counts",
2097
+ "content": {
2098
+ "application/json": {
2099
+ "schema": {
2100
+ "type": "object",
2101
+ "properties": {
2102
+ "ok": {
2103
+ "type": "boolean"
2104
+ },
2105
+ "success": {
2106
+ "type": "boolean"
2107
+ },
2108
+ "data": {
2109
+ "type": "array",
2110
+ "items": {
2111
+ "type": "object",
2112
+ "properties": {
2113
+ "category": {
2114
+ "type": "string"
2115
+ },
2116
+ "count": {
2117
+ "type": "integer"
2118
+ }
2119
+ },
2120
+ "required": ["category", "count"]
2121
+ }
2122
+ }
2123
+ },
2124
+ "required": ["ok", "success", "data"]
2125
+ }
2126
+ }
2127
+ }
2128
+ },
2129
+ "401": {
2130
+ "description": "Invalid or missing API key"
2131
+ }
2132
+ }
2133
+ }
2134
+ },
2135
+ "/api/v1/marketplace/apps/{appId}": {
2136
+ "get": {
2137
+ "operationId": "getMarketplaceApp",
2138
+ "tags": ["Marketplace"],
2139
+ "summary": "Get app details",
2140
+ "security": [
2141
+ {
2142
+ "ApiKeyAuth": []
2143
+ }
2144
+ ],
2145
+ "parameters": [
2146
+ {
2147
+ "schema": {
2148
+ "type": "string",
2149
+ "format": "uuid"
2150
+ },
2151
+ "required": true,
2152
+ "name": "appId",
2153
+ "in": "path"
2154
+ }
2155
+ ],
2156
+ "responses": {
2157
+ "200": {
2158
+ "description": "App details",
2159
+ "content": {
2160
+ "application/json": {
2161
+ "schema": {
2162
+ "type": "object",
2163
+ "properties": {
2164
+ "ok": {
2165
+ "type": "boolean"
2166
+ },
2167
+ "success": {
2168
+ "type": "boolean"
2169
+ },
2170
+ "data": {
2171
+ "$ref": "#/components/schemas/MarketplaceApp"
2172
+ }
2173
+ },
2174
+ "required": ["ok", "success", "data"]
2175
+ }
2176
+ }
2177
+ }
2178
+ },
2179
+ "401": {
2180
+ "description": "Invalid or missing API key"
2181
+ },
2182
+ "404": {
2183
+ "description": "App not found"
2184
+ }
2185
+ }
2186
+ }
2187
+ },
2188
+ "/api/v1/marketplace/installed": {
2189
+ "get": {
2190
+ "operationId": "listInstalledApps",
2191
+ "tags": ["Marketplace"],
2192
+ "summary": "List installed apps",
2193
+ "description": "Returns all apps installed by the authenticated user.",
2194
+ "security": [
2195
+ {
2196
+ "BearerAuth": []
2197
+ }
2198
+ ],
2199
+ "parameters": [
2200
+ {
2201
+ "schema": {
2202
+ "type": "integer",
2203
+ "minimum": 1,
2204
+ "maximum": 100
2205
+ },
2206
+ "required": false,
2207
+ "name": "limit",
2208
+ "in": "query"
2209
+ },
2210
+ {
2211
+ "schema": {
2212
+ "type": "integer",
2213
+ "minimum": 0
2214
+ },
2215
+ "required": false,
2216
+ "name": "offset",
2217
+ "in": "query"
2218
+ }
2219
+ ],
2220
+ "responses": {
2221
+ "200": {
2222
+ "description": "Installed apps",
2223
+ "content": {
2224
+ "application/json": {
2225
+ "schema": {
2226
+ "type": "object",
2227
+ "properties": {
2228
+ "ok": {
2229
+ "type": "boolean"
2230
+ },
2231
+ "success": {
2232
+ "type": "boolean"
2233
+ },
2234
+ "data": {
2235
+ "type": "array",
2236
+ "items": {
2237
+ "$ref": "#/components/schemas/InstalledApp"
2238
+ }
2239
+ },
2240
+ "meta": {
2241
+ "type": "object",
2242
+ "properties": {
2243
+ "pagination": {
2244
+ "type": "object",
2245
+ "properties": {
2246
+ "page": {
2247
+ "type": "integer"
2248
+ },
2249
+ "limit": {
2250
+ "type": "integer"
2251
+ },
2252
+ "total": {
2253
+ "type": "integer"
2254
+ },
2255
+ "totalPages": {
2256
+ "type": "integer"
2257
+ }
2258
+ },
2259
+ "required": ["page", "limit", "total", "totalPages"]
2260
+ }
2261
+ },
2262
+ "required": ["pagination"]
2263
+ }
2264
+ },
2265
+ "required": ["ok", "success", "data", "meta"]
2266
+ }
2267
+ }
2268
+ }
2269
+ },
2270
+ "401": {
2271
+ "description": "Unauthorized"
2272
+ }
2273
+ }
2274
+ }
2275
+ },
2276
+ "/api/v1/marketplace/install/{appId}": {
2277
+ "post": {
2278
+ "operationId": "installMarketplaceApp",
2279
+ "tags": ["Marketplace"],
2280
+ "summary": "Install app",
2281
+ "security": [
2282
+ {
2283
+ "BearerAuth": []
2284
+ }
2285
+ ],
2286
+ "parameters": [
2287
+ {
2288
+ "schema": {
2289
+ "type": "string",
2290
+ "format": "uuid"
2291
+ },
2292
+ "required": true,
2293
+ "name": "appId",
2294
+ "in": "path"
2295
+ }
2296
+ ],
2297
+ "requestBody": {
2298
+ "content": {
2299
+ "application/json": {
2300
+ "schema": {
2301
+ "type": "object",
2302
+ "properties": {
2303
+ "settings": {
2304
+ "type": "object",
2305
+ "additionalProperties": {}
2306
+ }
2307
+ }
2308
+ }
2309
+ }
2310
+ }
2311
+ },
2312
+ "responses": {
2313
+ "200": {
2314
+ "description": "App installed",
2315
+ "content": {
2316
+ "application/json": {
2317
+ "schema": {
2318
+ "type": "object",
2319
+ "properties": {
2320
+ "ok": {
2321
+ "type": "boolean"
2322
+ },
2323
+ "success": {
2324
+ "type": "boolean"
2325
+ },
2326
+ "data": {
2327
+ "$ref": "#/components/schemas/InstalledApp"
2328
+ },
2329
+ "message": {
2330
+ "type": "string"
2331
+ }
2332
+ },
2333
+ "required": ["ok", "success", "data", "message"]
2334
+ }
2335
+ }
2336
+ }
2337
+ },
2338
+ "401": {
2339
+ "description": "Unauthorized"
2340
+ },
2341
+ "404": {
2342
+ "description": "App not found or not available for installation"
2343
+ },
2344
+ "409": {
2345
+ "description": "App already installed"
2346
+ }
2347
+ }
2348
+ }
2349
+ },
2350
+ "/api/v1/marketplace/uninstall/{appId}": {
2351
+ "delete": {
2352
+ "operationId": "uninstallMarketplaceApp",
2353
+ "tags": ["Marketplace"],
2354
+ "summary": "Uninstall app",
2355
+ "security": [
2356
+ {
2357
+ "BearerAuth": []
2358
+ }
2359
+ ],
2360
+ "parameters": [
2361
+ {
2362
+ "schema": {
2363
+ "type": "string",
2364
+ "format": "uuid"
2365
+ },
2366
+ "required": true,
2367
+ "name": "appId",
2368
+ "in": "path"
2369
+ }
2370
+ ],
2371
+ "responses": {
2372
+ "200": {
2373
+ "description": "App uninstalled",
2374
+ "content": {
2375
+ "application/json": {
2376
+ "schema": {
2377
+ "type": "object",
2378
+ "properties": {
2379
+ "ok": {
2380
+ "type": "boolean"
2381
+ },
2382
+ "success": {
2383
+ "type": "boolean"
2384
+ },
2385
+ "message": {
2386
+ "type": "string"
2387
+ }
2388
+ },
2389
+ "required": ["ok", "success", "message"]
2390
+ }
2391
+ }
2392
+ }
2393
+ },
2394
+ "401": {
2395
+ "description": "Unauthorized"
2396
+ },
2397
+ "404": {
2398
+ "description": "App installation not found"
2399
+ }
2400
+ }
2401
+ }
2402
+ },
2403
+ "/api/v1/marketplace/items": {
2404
+ "get": {
2405
+ "operationId": "listMarketplaceItems",
2406
+ "tags": ["Marketplace"],
2407
+ "summary": "List marketplace items",
2408
+ "description": "Public listing of published marketplace items (entry-based). No authentication required.",
2409
+ "parameters": [
2410
+ {
2411
+ "schema": {
2412
+ "type": "integer",
2413
+ "minimum": 1,
2414
+ "maximum": 100
2415
+ },
2416
+ "required": false,
2417
+ "name": "limit",
2418
+ "in": "query"
2419
+ },
2420
+ {
2421
+ "schema": {
2422
+ "type": "integer",
2423
+ "minimum": 0
2424
+ },
2425
+ "required": false,
2426
+ "name": "offset",
2427
+ "in": "query"
2428
+ },
2429
+ {
2430
+ "schema": {
2431
+ "type": "string"
2432
+ },
2433
+ "required": false,
2434
+ "name": "item_type",
2435
+ "in": "query"
2436
+ },
2437
+ {
2438
+ "schema": {
2439
+ "type": "string"
2440
+ },
2441
+ "required": false,
2442
+ "name": "earner_type",
2443
+ "in": "query"
2444
+ },
2445
+ {
2446
+ "schema": {
2447
+ "type": "string",
2448
+ "format": "uuid"
2449
+ },
2450
+ "required": false,
2451
+ "name": "category_id",
2452
+ "in": "query"
2453
+ },
2454
+ {
2455
+ "schema": {
2456
+ "type": "number"
2457
+ },
2458
+ "required": false,
2459
+ "name": "min_price",
2460
+ "in": "query"
2461
+ },
2462
+ {
2463
+ "schema": {
2464
+ "type": "number"
2465
+ },
2466
+ "required": false,
2467
+ "name": "max_price",
2468
+ "in": "query"
2469
+ },
2470
+ {
2471
+ "schema": {
2472
+ "type": "string",
2473
+ "format": "uuid"
2474
+ },
2475
+ "required": false,
2476
+ "name": "seller_id",
2477
+ "in": "query"
2478
+ },
2479
+ {
2480
+ "schema": {
2481
+ "type": "string"
2482
+ },
2483
+ "required": false,
2484
+ "name": "search",
2485
+ "in": "query"
2486
+ }
2487
+ ],
2488
+ "responses": {
2489
+ "200": {
2490
+ "description": "Marketplace items",
2491
+ "content": {
2492
+ "application/json": {
2493
+ "schema": {
2494
+ "type": "object",
2495
+ "properties": {
2496
+ "ok": {
2497
+ "type": "boolean"
2498
+ },
2499
+ "success": {
2500
+ "type": "boolean"
2501
+ },
2502
+ "data": {
2503
+ "type": "array",
2504
+ "items": {
2505
+ "$ref": "#/components/schemas/MarketplaceItem"
2506
+ }
2507
+ },
2508
+ "meta": {
2509
+ "type": "object",
2510
+ "properties": {
2511
+ "pagination": {
2512
+ "type": "object",
2513
+ "properties": {
2514
+ "page": {
2515
+ "type": "integer"
2516
+ },
2517
+ "limit": {
2518
+ "type": "integer"
2519
+ },
2520
+ "total": {
2521
+ "type": "integer"
2522
+ },
2523
+ "totalPages": {
2524
+ "type": "integer"
2525
+ }
2526
+ },
2527
+ "required": ["page", "limit", "total", "totalPages"]
2528
+ }
2529
+ },
2530
+ "required": ["pagination"]
2531
+ }
2532
+ },
2533
+ "required": ["ok", "success", "data", "meta"]
2534
+ }
2535
+ }
2536
+ }
2537
+ }
2538
+ }
2539
+ }
2540
+ },
2541
+ "/api/v1/marketplace/items/{id}": {
2542
+ "get": {
2543
+ "operationId": "getMarketplaceItem",
2544
+ "tags": ["Marketplace"],
2545
+ "summary": "Get marketplace item",
2546
+ "description": "Returns a single published marketplace item by ID.",
2547
+ "parameters": [
2548
+ {
2549
+ "schema": {
2550
+ "type": "string",
2551
+ "format": "uuid"
2552
+ },
2553
+ "required": true,
2554
+ "name": "id",
2555
+ "in": "path"
2556
+ }
2557
+ ],
2558
+ "responses": {
2559
+ "200": {
2560
+ "description": "Marketplace item",
2561
+ "content": {
2562
+ "application/json": {
2563
+ "schema": {
2564
+ "type": "object",
2565
+ "properties": {
2566
+ "ok": {
2567
+ "type": "boolean"
2568
+ },
2569
+ "success": {
2570
+ "type": "boolean"
2571
+ },
2572
+ "data": {
2573
+ "$ref": "#/components/schemas/MarketplaceItem"
2574
+ }
2575
+ },
2576
+ "required": ["ok", "success", "data"]
2577
+ }
2578
+ }
2579
+ }
2580
+ },
2581
+ "404": {
2582
+ "description": "Item not found"
2583
+ }
2584
+ }
2585
+ }
2586
+ },
2587
+ "/api/v1/marketplace/search": {
2588
+ "post": {
2589
+ "operationId": "searchMarketplace",
2590
+ "tags": ["Marketplace"],
2591
+ "summary": "Search marketplace",
2592
+ "description": "Full-text search across marketplace items. No authentication required.",
2593
+ "requestBody": {
2594
+ "content": {
2595
+ "application/json": {
2596
+ "schema": {
2597
+ "type": "object",
2598
+ "properties": {
2599
+ "query": {
2600
+ "type": "string",
2601
+ "minLength": 1
2602
+ },
2603
+ "filters": {
2604
+ "type": "object",
2605
+ "additionalProperties": {}
2606
+ },
2607
+ "limit": {
2608
+ "type": "integer",
2609
+ "maximum": 100
2610
+ },
2611
+ "offset": {
2612
+ "type": "integer"
2613
+ }
2614
+ },
2615
+ "required": ["query"]
2616
+ }
2617
+ }
2618
+ }
2619
+ },
2620
+ "responses": {
2621
+ "200": {
2622
+ "description": "Search results",
2623
+ "content": {
2624
+ "application/json": {
2625
+ "schema": {
2626
+ "type": "object",
2627
+ "properties": {
2628
+ "ok": {
2629
+ "type": "boolean"
2630
+ },
2631
+ "success": {
2632
+ "type": "boolean"
2633
+ },
2634
+ "data": {
2635
+ "type": "array",
2636
+ "items": {
2637
+ "$ref": "#/components/schemas/MarketplaceItem"
2638
+ }
2639
+ },
2640
+ "meta": {
2641
+ "type": "object",
2642
+ "properties": {
2643
+ "pagination": {
2644
+ "type": "object",
2645
+ "properties": {
2646
+ "page": {
2647
+ "type": "integer"
2648
+ },
2649
+ "limit": {
2650
+ "type": "integer"
2651
+ },
2652
+ "total": {
2653
+ "type": "integer"
2654
+ },
2655
+ "totalPages": {
2656
+ "type": "integer"
2657
+ }
2658
+ },
2659
+ "required": ["page", "limit", "total", "totalPages"]
2660
+ }
2661
+ },
2662
+ "required": ["pagination"]
2663
+ }
2664
+ },
2665
+ "required": ["ok", "success", "data", "meta"]
2666
+ }
2667
+ }
2668
+ }
2669
+ }
2670
+ }
2671
+ }
2672
+ },
2673
+ "/api/v1/marketplace/categories/tree": {
2674
+ "get": {
2675
+ "operationId": "getCategoryTree",
2676
+ "tags": ["Marketplace"],
2677
+ "summary": "Category tree",
2678
+ "description": "Returns marketplace categories as a hierarchical tree from the collections table. Children are nested category objects of the same shape.",
2679
+ "responses": {
2680
+ "200": {
2681
+ "description": "Category tree",
2682
+ "content": {
2683
+ "application/json": {
2684
+ "schema": {
2685
+ "type": "object",
2686
+ "properties": {
2687
+ "ok": {
2688
+ "type": "boolean"
2689
+ },
2690
+ "success": {
2691
+ "type": "boolean"
2692
+ },
2693
+ "data": {
2694
+ "type": "array",
2695
+ "items": {
2696
+ "allOf": [
2697
+ {
2698
+ "$ref": "#/components/schemas/Category"
2699
+ },
2700
+ {
2701
+ "type": "object",
2702
+ "properties": {
2703
+ "children": {
2704
+ "type": "array",
2705
+ "items": {
2706
+ "type": "object",
2707
+ "additionalProperties": {}
2708
+ }
2709
+ }
2710
+ }
2711
+ }
2712
+ ]
2713
+ }
2714
+ }
2715
+ },
2716
+ "required": ["ok", "success", "data"]
2717
+ }
2718
+ }
2719
+ }
2720
+ }
2721
+ }
2722
+ }
2723
+ },
2724
+ "/api/v1/marketplace/categories/{id}": {
2725
+ "get": {
2726
+ "operationId": "getMarketplaceCategory",
2727
+ "tags": ["Marketplace"],
2728
+ "summary": "Get category",
2729
+ "description": "Returns a single marketplace category from the collections table.",
2730
+ "parameters": [
2731
+ {
2732
+ "schema": {
2733
+ "type": "string",
2734
+ "format": "uuid"
2735
+ },
2736
+ "required": true,
2737
+ "name": "id",
2738
+ "in": "path"
2739
+ }
2740
+ ],
2741
+ "responses": {
2742
+ "200": {
2743
+ "description": "Category",
2744
+ "content": {
2745
+ "application/json": {
2746
+ "schema": {
2747
+ "type": "object",
2748
+ "properties": {
2749
+ "ok": {
2750
+ "type": "boolean"
2751
+ },
2752
+ "success": {
2753
+ "type": "boolean"
2754
+ },
2755
+ "data": {
2756
+ "$ref": "#/components/schemas/Category"
2757
+ }
2758
+ },
2759
+ "required": ["ok", "success", "data"]
2760
+ }
2761
+ }
2762
+ }
2763
+ },
2764
+ "404": {
2765
+ "description": "Category not found"
2766
+ }
2767
+ }
2768
+ }
2769
+ },
2770
+ "/api/v1/developer/apps": {
2771
+ "get": {
2772
+ "operationId": "listDeveloperApps",
2773
+ "tags": ["Developer"],
2774
+ "summary": "List developer apps",
2775
+ "description": "Returns all marketplace apps owned by the authenticated developer.",
2776
+ "security": [
2777
+ {
2778
+ "ApiKeyAuth": []
2779
+ }
2780
+ ],
2781
+ "responses": {
2782
+ "200": {
2783
+ "description": "Developer apps",
2784
+ "content": {
2785
+ "application/json": {
2786
+ "schema": {
2787
+ "type": "object",
2788
+ "properties": {
2789
+ "ok": {
2790
+ "type": "boolean"
2791
+ },
2792
+ "success": {
2793
+ "type": "boolean"
2794
+ },
2795
+ "data": {
2796
+ "type": "array",
2797
+ "items": {
2798
+ "$ref": "#/components/schemas/MarketplaceApp"
2799
+ }
2800
+ }
2801
+ },
2802
+ "required": ["ok", "success", "data"]
2803
+ }
2804
+ }
2805
+ }
2806
+ },
2807
+ "401": {
2808
+ "description": "Invalid or missing API key"
2809
+ }
2810
+ }
2811
+ },
2812
+ "post": {
2813
+ "operationId": "createDeveloperApp",
2814
+ "tags": ["Developer"],
2815
+ "summary": "Create app",
2816
+ "security": [
2817
+ {
2818
+ "ApiKeyAuth": []
2819
+ }
2820
+ ],
2821
+ "requestBody": {
2822
+ "content": {
2823
+ "application/json": {
2824
+ "schema": {
2825
+ "type": "object",
2826
+ "properties": {
2827
+ "name": {
2828
+ "type": "string",
2829
+ "minLength": 1
2830
+ },
2831
+ "slug": {
2832
+ "type": "string",
2833
+ "minLength": 1
2834
+ },
2835
+ "tagline": {
2836
+ "type": "string"
2837
+ },
2838
+ "description": {
2839
+ "type": "string"
2840
+ },
2841
+ "category": {
2842
+ "type": "string",
2843
+ "minLength": 1
2844
+ },
2845
+ "icon_url": {
2846
+ "type": "string",
2847
+ "format": "uri"
2848
+ },
2849
+ "screenshots": {
2850
+ "type": "array",
2851
+ "items": {
2852
+ "type": "string",
2853
+ "format": "uri"
2854
+ }
2855
+ },
2856
+ "version": {
2857
+ "type": "string",
2858
+ "default": "1.0.0"
2859
+ },
2860
+ "pricing_model": {
2861
+ "type": "string",
2862
+ "default": "free"
2863
+ },
2864
+ "pricing_config": {
2865
+ "type": "object",
2866
+ "additionalProperties": {}
2867
+ },
2868
+ "supported_audience": {
2869
+ "type": "array",
2870
+ "items": {
2871
+ "type": "string"
2872
+ }
2873
+ }
2874
+ },
2875
+ "required": ["name", "slug", "category"]
2876
+ }
2877
+ }
2878
+ }
2879
+ },
2880
+ "responses": {
2881
+ "201": {
2882
+ "description": "App created (status: draft)",
2883
+ "content": {
2884
+ "application/json": {
2885
+ "schema": {
2886
+ "type": "object",
2887
+ "properties": {
2888
+ "ok": {
2889
+ "type": "boolean"
2890
+ },
2891
+ "success": {
2892
+ "type": "boolean"
2893
+ },
2894
+ "data": {
2895
+ "$ref": "#/components/schemas/MarketplaceApp"
2896
+ }
2897
+ },
2898
+ "required": ["ok", "success", "data"]
2899
+ }
2900
+ }
2901
+ }
2902
+ },
2903
+ "401": {
2904
+ "description": "Invalid or missing API key"
2905
+ }
2906
+ }
2907
+ }
2908
+ },
2909
+ "/api/v1/developer/apps/{appId}": {
2910
+ "get": {
2911
+ "operationId": "getDeveloperApp",
2912
+ "tags": ["Developer"],
2913
+ "summary": "Get developer app",
2914
+ "security": [
2915
+ {
2916
+ "ApiKeyAuth": []
2917
+ }
2918
+ ],
2919
+ "parameters": [
2920
+ {
2921
+ "schema": {
2922
+ "type": "string",
2923
+ "format": "uuid"
2924
+ },
2925
+ "required": true,
2926
+ "name": "appId",
2927
+ "in": "path"
2928
+ }
2929
+ ],
2930
+ "responses": {
2931
+ "200": {
2932
+ "description": "App details",
2933
+ "content": {
2934
+ "application/json": {
2935
+ "schema": {
2936
+ "type": "object",
2937
+ "properties": {
2938
+ "ok": {
2939
+ "type": "boolean"
2940
+ },
2941
+ "success": {
2942
+ "type": "boolean"
2943
+ },
2944
+ "data": {
2945
+ "$ref": "#/components/schemas/MarketplaceApp"
2946
+ }
2947
+ },
2948
+ "required": ["ok", "success", "data"]
2949
+ }
2950
+ }
2951
+ }
2952
+ },
2953
+ "401": {
2954
+ "description": "Invalid or missing API key"
2955
+ },
2956
+ "404": {
2957
+ "description": "App not found or not owned by this developer"
2958
+ }
2959
+ }
2960
+ },
2961
+ "put": {
2962
+ "operationId": "updateDeveloperApp",
2963
+ "tags": ["Developer"],
2964
+ "summary": "Update app",
2965
+ "security": [
2966
+ {
2967
+ "ApiKeyAuth": []
2968
+ }
2969
+ ],
2970
+ "parameters": [
2971
+ {
2972
+ "schema": {
2973
+ "type": "string",
2974
+ "format": "uuid"
2975
+ },
2976
+ "required": true,
2977
+ "name": "appId",
2978
+ "in": "path"
2979
+ }
2980
+ ],
2981
+ "requestBody": {
2982
+ "content": {
2983
+ "application/json": {
2984
+ "schema": {
2985
+ "type": "object",
2986
+ "properties": {
2987
+ "name": {
2988
+ "type": "string",
2989
+ "minLength": 1
2990
+ },
2991
+ "slug": {
2992
+ "type": "string",
2993
+ "minLength": 1
2994
+ },
2995
+ "tagline": {
2996
+ "type": "string"
2997
+ },
2998
+ "description": {
2999
+ "type": "string"
3000
+ },
3001
+ "category": {
3002
+ "type": "string"
3003
+ },
3004
+ "icon_url": {
3005
+ "type": "string",
3006
+ "format": "uri"
3007
+ },
3008
+ "screenshots": {
3009
+ "type": "array",
3010
+ "items": {
3011
+ "type": "string",
3012
+ "format": "uri"
3013
+ }
3014
+ },
3015
+ "version": {
3016
+ "type": "string"
3017
+ },
3018
+ "pricing_model": {
3019
+ "type": "string"
3020
+ },
3021
+ "pricing_config": {
3022
+ "type": "object",
3023
+ "additionalProperties": {}
3024
+ },
3025
+ "supported_audience": {
3026
+ "type": "array",
3027
+ "items": {
3028
+ "type": "string"
3029
+ }
3030
+ }
3031
+ }
3032
+ }
3033
+ }
3034
+ }
3035
+ },
3036
+ "responses": {
3037
+ "200": {
3038
+ "description": "App updated",
3039
+ "content": {
3040
+ "application/json": {
3041
+ "schema": {
3042
+ "type": "object",
3043
+ "properties": {
3044
+ "ok": {
3045
+ "type": "boolean"
3046
+ },
3047
+ "success": {
3048
+ "type": "boolean"
3049
+ },
3050
+ "data": {
3051
+ "$ref": "#/components/schemas/MarketplaceApp"
3052
+ }
3053
+ },
3054
+ "required": ["ok", "success", "data"]
3055
+ }
3056
+ }
3057
+ }
3058
+ },
3059
+ "401": {
3060
+ "description": "Invalid or missing API key"
3061
+ },
3062
+ "404": {
3063
+ "description": "App not found or not owned by this developer"
3064
+ }
3065
+ }
3066
+ },
3067
+ "delete": {
3068
+ "operationId": "deleteDeveloperApp",
3069
+ "tags": ["Developer"],
3070
+ "summary": "Delete app",
3071
+ "description": "Only draft apps can be deleted. Approved apps must be deactivated first.",
3072
+ "security": [
3073
+ {
3074
+ "ApiKeyAuth": []
3075
+ }
3076
+ ],
3077
+ "parameters": [
3078
+ {
3079
+ "schema": {
3080
+ "type": "string",
3081
+ "format": "uuid"
3082
+ },
3083
+ "required": true,
3084
+ "name": "appId",
3085
+ "in": "path"
3086
+ }
3087
+ ],
3088
+ "responses": {
3089
+ "204": {
3090
+ "description": "App deleted"
3091
+ },
3092
+ "400": {
3093
+ "description": "App is not in draft status — cannot delete"
3094
+ },
3095
+ "401": {
3096
+ "description": "Invalid or missing API key"
3097
+ },
3098
+ "404": {
3099
+ "description": "App not found or not owned by this developer"
3100
+ }
3101
+ }
3102
+ }
3103
+ },
3104
+ "/api/v1/developer/apps/{appId}/submit": {
3105
+ "post": {
3106
+ "operationId": "submitDeveloperApp",
3107
+ "tags": ["Developer"],
3108
+ "summary": "Submit app for review",
3109
+ "description": "Transitions app from draft → pending_review.",
3110
+ "security": [
3111
+ {
3112
+ "ApiKeyAuth": []
3113
+ }
3114
+ ],
3115
+ "parameters": [
3116
+ {
3117
+ "schema": {
3118
+ "type": "string",
3119
+ "format": "uuid"
3120
+ },
3121
+ "required": true,
3122
+ "name": "appId",
3123
+ "in": "path"
3124
+ }
3125
+ ],
3126
+ "responses": {
3127
+ "200": {
3128
+ "description": "App submitted for review",
3129
+ "content": {
3130
+ "application/json": {
3131
+ "schema": {
3132
+ "type": "object",
3133
+ "properties": {
3134
+ "ok": {
3135
+ "type": "boolean"
3136
+ },
3137
+ "success": {
3138
+ "type": "boolean"
3139
+ },
3140
+ "data": {
3141
+ "$ref": "#/components/schemas/MarketplaceApp"
3142
+ },
3143
+ "message": {
3144
+ "type": "string"
3145
+ }
3146
+ },
3147
+ "required": ["ok", "success", "data", "message"]
3148
+ }
3149
+ }
3150
+ }
3151
+ },
3152
+ "400": {
3153
+ "description": "App is not in draft status"
3154
+ },
3155
+ "401": {
3156
+ "description": "Invalid or missing API key"
3157
+ },
3158
+ "404": {
3159
+ "description": "App not found or not owned by this developer"
3160
+ }
3161
+ }
3162
+ }
3163
+ },
3164
+ "/api/v1/developer/apps/{appId}/resubmit": {
3165
+ "post": {
3166
+ "operationId": "resubmitDeveloperApp",
3167
+ "tags": ["Developer"],
3168
+ "summary": "Resubmit rejected app",
3169
+ "description": "Updates fields and resubmits a rejected app for review.",
3170
+ "security": [
3171
+ {
3172
+ "ApiKeyAuth": []
3173
+ }
3174
+ ],
3175
+ "parameters": [
3176
+ {
3177
+ "schema": {
3178
+ "type": "string",
3179
+ "format": "uuid"
3180
+ },
3181
+ "required": true,
3182
+ "name": "appId",
3183
+ "in": "path"
3184
+ }
3185
+ ],
3186
+ "requestBody": {
3187
+ "content": {
3188
+ "application/json": {
3189
+ "schema": {
3190
+ "type": "object",
3191
+ "properties": {
3192
+ "name": {
3193
+ "type": "string",
3194
+ "minLength": 1
3195
+ },
3196
+ "slug": {
3197
+ "type": "string",
3198
+ "minLength": 1
3199
+ },
3200
+ "tagline": {
3201
+ "type": "string"
3202
+ },
3203
+ "description": {
3204
+ "type": "string"
3205
+ },
3206
+ "category": {
3207
+ "type": "string"
3208
+ },
3209
+ "icon_url": {
3210
+ "type": "string",
3211
+ "format": "uri"
3212
+ },
3213
+ "screenshots": {
3214
+ "type": "array",
3215
+ "items": {
3216
+ "type": "string",
3217
+ "format": "uri"
3218
+ }
3219
+ },
3220
+ "version": {
3221
+ "type": "string"
3222
+ },
3223
+ "pricing_model": {
3224
+ "type": "string"
3225
+ },
3226
+ "pricing_config": {
3227
+ "type": "object",
3228
+ "additionalProperties": {}
3229
+ },
3230
+ "supported_audience": {
3231
+ "type": "array",
3232
+ "items": {
3233
+ "type": "string"
3234
+ }
3235
+ }
3236
+ }
3237
+ }
3238
+ }
3239
+ }
3240
+ },
3241
+ "responses": {
3242
+ "200": {
3243
+ "description": "App resubmitted",
3244
+ "content": {
3245
+ "application/json": {
3246
+ "schema": {
3247
+ "type": "object",
3248
+ "properties": {
3249
+ "ok": {
3250
+ "type": "boolean"
3251
+ },
3252
+ "success": {
3253
+ "type": "boolean"
3254
+ },
3255
+ "data": {
3256
+ "$ref": "#/components/schemas/MarketplaceApp"
3257
+ },
3258
+ "message": {
3259
+ "type": "string"
3260
+ }
3261
+ },
3262
+ "required": ["ok", "success", "data", "message"]
3263
+ }
3264
+ }
3265
+ }
3266
+ },
3267
+ "400": {
3268
+ "description": "App is not in rejected status"
3269
+ },
3270
+ "401": {
3271
+ "description": "Invalid or missing API key"
3272
+ },
3273
+ "404": {
3274
+ "description": "App not found or not owned by this developer"
3275
+ }
3276
+ }
3277
+ }
3278
+ },
3279
+ "/api/v1/entries": {
3280
+ "get": {
3281
+ "operationId": "listEntries",
3282
+ "tags": ["Entries"],
3283
+ "summary": "List entries",
3284
+ "description": "Returns paginated entries for the authenticated user's profile.",
3285
+ "security": [
3286
+ {
3287
+ "ApiKeyAuth": []
3288
+ }
3289
+ ],
3290
+ "parameters": [
3291
+ {
3292
+ "schema": {
3293
+ "type": "integer",
3294
+ "minimum": 1,
3295
+ "maximum": 100,
3296
+ "default": 20
3297
+ },
3298
+ "required": false,
3299
+ "name": "limit",
3300
+ "in": "query"
3301
+ },
3302
+ {
3303
+ "schema": {
3304
+ "type": "integer",
3305
+ "minimum": 0,
3306
+ "default": 0
3307
+ },
3308
+ "required": false,
3309
+ "name": "offset",
3310
+ "in": "query"
3311
+ }
3312
+ ],
3313
+ "responses": {
3314
+ "200": {
3315
+ "description": "Entries list",
3316
+ "content": {
3317
+ "application/json": {
3318
+ "schema": {
3319
+ "type": "object",
3320
+ "properties": {
3321
+ "ok": {
3322
+ "type": "boolean"
3323
+ },
3324
+ "success": {
3325
+ "type": "boolean"
3326
+ },
3327
+ "data": {
3328
+ "type": "array",
3329
+ "items": {
3330
+ "$ref": "#/components/schemas/Entry"
3331
+ }
3332
+ },
3333
+ "meta": {
3334
+ "type": "object",
3335
+ "properties": {
3336
+ "pagination": {
3337
+ "type": "object",
3338
+ "properties": {
3339
+ "page": {
3340
+ "type": "integer"
3341
+ },
3342
+ "limit": {
3343
+ "type": "integer"
3344
+ },
3345
+ "total": {
3346
+ "type": "integer"
3347
+ },
3348
+ "totalPages": {
3349
+ "type": "integer"
3350
+ }
3351
+ },
3352
+ "required": ["page", "limit", "total", "totalPages"]
3353
+ }
3354
+ },
3355
+ "required": ["pagination"]
3356
+ }
3357
+ },
3358
+ "required": ["ok", "success", "data", "meta"]
3359
+ }
3360
+ }
3361
+ }
3362
+ },
3363
+ "401": {
3364
+ "description": "Invalid or missing API key"
3365
+ },
3366
+ "404": {
3367
+ "description": "User profile not found"
3368
+ }
3369
+ }
3370
+ }
3371
+ },
3372
+ "/api/v1/templates": {
3373
+ "get": {
3374
+ "operationId": "listTemplates",
3375
+ "tags": ["Entries"],
3376
+ "summary": "List templates",
3377
+ "description": "Returns available entry templates. Not yet implemented — returns empty list.",
3378
+ "security": [
3379
+ {
3380
+ "ApiKeyAuth": []
3381
+ }
3382
+ ],
3383
+ "responses": {
3384
+ "200": {
3385
+ "description": "Templates list (currently always empty)",
3386
+ "content": {
3387
+ "application/json": {
3388
+ "schema": {
3389
+ "type": "object",
3390
+ "properties": {
3391
+ "ok": {
3392
+ "type": "boolean"
3393
+ },
3394
+ "success": {
3395
+ "type": "boolean"
3396
+ },
3397
+ "data": {
3398
+ "type": "array",
3399
+ "items": {}
3400
+ },
3401
+ "meta": {
3402
+ "type": "object",
3403
+ "properties": {
3404
+ "pagination": {
3405
+ "type": "object",
3406
+ "properties": {
3407
+ "page": {
3408
+ "type": "integer"
3409
+ },
3410
+ "limit": {
3411
+ "type": "integer"
3412
+ },
3413
+ "total": {
3414
+ "type": "integer"
3415
+ },
3416
+ "totalPages": {
3417
+ "type": "integer"
3418
+ }
3419
+ },
3420
+ "required": ["page", "limit", "total", "totalPages"]
3421
+ }
3422
+ },
3423
+ "required": ["pagination"]
3424
+ }
3425
+ },
3426
+ "required": ["ok", "success", "data", "meta"]
3427
+ }
3428
+ }
3429
+ }
3430
+ },
3431
+ "401": {
3432
+ "description": "Invalid or missing API key"
3433
+ }
3434
+ }
3435
+ }
3436
+ },
3437
+ "/api/v1/storage": {
3438
+ "get": {
3439
+ "operationId": "getStorage",
3440
+ "tags": ["Entries"],
3441
+ "summary": "Get storage info",
3442
+ "description": "Returns storage usage for the authenticated user. Not yet implemented — returns empty object.",
3443
+ "security": [
3444
+ {
3445
+ "ApiKeyAuth": []
3446
+ }
3447
+ ],
3448
+ "responses": {
3449
+ "200": {
3450
+ "description": "Storage info",
3451
+ "content": {
3452
+ "application/json": {
3453
+ "schema": {
3454
+ "type": "object",
3455
+ "properties": {
3456
+ "ok": {
3457
+ "type": "boolean"
3458
+ },
3459
+ "success": {
3460
+ "type": "boolean"
3461
+ },
3462
+ "data": {
3463
+ "type": "object",
3464
+ "additionalProperties": {}
3465
+ }
3466
+ },
3467
+ "required": ["ok", "success", "data"]
3468
+ }
3469
+ }
3470
+ }
3471
+ },
3472
+ "401": {
3473
+ "description": "Invalid or missing API key"
3474
+ }
3475
+ }
3476
+ }
3477
+ },
3478
+ "/api/v1/ui/notifications": {
3479
+ "post": {
3480
+ "operationId": "createUiNotification",
3481
+ "tags": ["UI"],
3482
+ "summary": "Create notification",
3483
+ "description": "Creates a UI notification for the authenticated user.",
3484
+ "security": [
3485
+ {
3486
+ "ApiKeyAuth": []
3487
+ }
3488
+ ],
3489
+ "responses": {
3490
+ "200": {
3491
+ "description": "Notification created",
3492
+ "content": {
3493
+ "application/json": {
3494
+ "schema": {
3495
+ "type": "object",
3496
+ "properties": {
3497
+ "ok": {
3498
+ "type": "boolean"
3499
+ },
3500
+ "success": {
3501
+ "type": "boolean"
3502
+ },
3503
+ "data": {
3504
+ "type": "object",
3505
+ "properties": {
3506
+ "id": {
3507
+ "type": "string"
3508
+ }
3509
+ },
3510
+ "required": ["id"]
3511
+ }
3512
+ },
3513
+ "required": ["ok", "success", "data"]
3514
+ }
3515
+ }
3516
+ }
3517
+ },
3518
+ "401": {
3519
+ "description": "Invalid or missing API key"
3520
+ }
3521
+ }
3522
+ }
3523
+ },
3524
+ "/api/oriva/events": {
3525
+ "get": {
3526
+ "operationId": "listEvents",
3527
+ "tags": ["Events"],
3528
+ "summary": "List events",
3529
+ "description": "Returns active events with optional filtering by category and date range.",
3530
+ "parameters": [
3531
+ {
3532
+ "schema": {
3533
+ "type": "string"
3534
+ },
3535
+ "required": false,
3536
+ "name": "category",
3537
+ "in": "query"
3538
+ },
3539
+ {
3540
+ "schema": {
3541
+ "type": "string",
3542
+ "format": "date-time"
3543
+ },
3544
+ "required": false,
3545
+ "name": "startDate",
3546
+ "in": "query"
3547
+ },
3548
+ {
3549
+ "schema": {
3550
+ "type": "string",
3551
+ "format": "date-time"
3552
+ },
3553
+ "required": false,
3554
+ "name": "endDate",
3555
+ "in": "query"
3556
+ },
3557
+ {
3558
+ "schema": {
3559
+ "type": "integer",
3560
+ "maximum": 100,
3561
+ "default": 20
3562
+ },
3563
+ "required": false,
3564
+ "name": "limit",
3565
+ "in": "query"
3566
+ },
3567
+ {
3568
+ "schema": {
3569
+ "type": "integer",
3570
+ "minimum": 0,
3571
+ "default": 0
3572
+ },
3573
+ "required": false,
3574
+ "name": "offset",
3575
+ "in": "query"
3576
+ }
3577
+ ],
3578
+ "responses": {
3579
+ "200": {
3580
+ "description": "Events list",
3581
+ "content": {
3582
+ "application/json": {
3583
+ "schema": {
3584
+ "type": "object",
3585
+ "properties": {
3586
+ "ok": {
3587
+ "type": "boolean"
3588
+ },
3589
+ "success": {
3590
+ "type": "boolean"
3591
+ },
3592
+ "data": {
3593
+ "type": "array",
3594
+ "items": {
3595
+ "$ref": "#/components/schemas/Event"
3596
+ }
3597
+ },
3598
+ "total": {
3599
+ "type": "integer"
3600
+ },
3601
+ "limit": {
3602
+ "type": "integer"
3603
+ },
3604
+ "offset": {
3605
+ "type": "integer"
3606
+ }
3607
+ },
3608
+ "required": [
3609
+ "ok",
3610
+ "success",
3611
+ "data",
3612
+ "total",
3613
+ "limit",
3614
+ "offset"
3615
+ ]
3616
+ }
3617
+ }
3618
+ }
3619
+ }
3620
+ }
3621
+ },
3622
+ "post": {
3623
+ "operationId": "createEvent",
3624
+ "tags": ["Events"],
3625
+ "summary": "Create event",
3626
+ "security": [
3627
+ {
3628
+ "BearerAuth": []
3629
+ }
3630
+ ],
3631
+ "requestBody": {
3632
+ "content": {
3633
+ "application/json": {
3634
+ "schema": {
3635
+ "type": "object",
3636
+ "properties": {
3637
+ "title": {
3638
+ "type": "string",
3639
+ "minLength": 1
3640
+ },
3641
+ "description": {
3642
+ "type": "string",
3643
+ "minLength": 1
3644
+ },
3645
+ "startDate": {
3646
+ "type": "string",
3647
+ "format": "date-time"
3648
+ },
3649
+ "endDate": {
3650
+ "type": "string",
3651
+ "format": "date-time"
3652
+ },
3653
+ "isOnline": {
3654
+ "type": "boolean"
3655
+ },
3656
+ "category": {
3657
+ "type": "string",
3658
+ "minLength": 1
3659
+ },
3660
+ "location": {
3661
+ "type": ["string", "null"]
3662
+ },
3663
+ "maxAttendees": {
3664
+ "type": ["integer", "null"],
3665
+ "exclusiveMinimum": 0
3666
+ },
3667
+ "price": {
3668
+ "type": "number",
3669
+ "minimum": 0
3670
+ },
3671
+ "tags": {
3672
+ "type": "array",
3673
+ "items": {
3674
+ "type": "string"
3675
+ },
3676
+ "maxItems": 20
3677
+ },
3678
+ "imageUrl": {
3679
+ "type": ["string", "null"],
3680
+ "format": "uri"
3681
+ }
3682
+ },
3683
+ "required": [
3684
+ "title",
3685
+ "description",
3686
+ "startDate",
3687
+ "endDate",
3688
+ "isOnline",
3689
+ "category"
3690
+ ]
3691
+ }
3692
+ }
3693
+ }
3694
+ },
3695
+ "responses": {
3696
+ "201": {
3697
+ "description": "Event created",
3698
+ "content": {
3699
+ "application/json": {
3700
+ "schema": {
3701
+ "type": "object",
3702
+ "properties": {
3703
+ "ok": {
3704
+ "type": "boolean"
3705
+ },
3706
+ "success": {
3707
+ "type": "boolean"
3708
+ },
3709
+ "data": {
3710
+ "$ref": "#/components/schemas/Event"
3711
+ },
3712
+ "message": {
3713
+ "type": "string"
3714
+ }
3715
+ },
3716
+ "required": ["ok", "success", "data", "message"]
3717
+ }
3718
+ }
3719
+ }
3720
+ },
3721
+ "400": {
3722
+ "description": "Validation error — missing required fields or invalid category"
3723
+ },
3724
+ "401": {
3725
+ "description": "Unauthorized"
3726
+ }
3727
+ }
3728
+ }
3729
+ },
3730
+ "/api/oriva/events/{eventId}": {
3731
+ "get": {
3732
+ "operationId": "getEvent",
3733
+ "tags": ["Events"],
3734
+ "summary": "Get event",
3735
+ "parameters": [
3736
+ {
3737
+ "schema": {
3738
+ "type": "string",
3739
+ "format": "uuid"
3740
+ },
3741
+ "required": true,
3742
+ "name": "eventId",
3743
+ "in": "path"
3744
+ }
3745
+ ],
3746
+ "responses": {
3747
+ "200": {
3748
+ "description": "Event details",
3749
+ "content": {
3750
+ "application/json": {
3751
+ "schema": {
3752
+ "type": "object",
3753
+ "properties": {
3754
+ "ok": {
3755
+ "type": "boolean"
3756
+ },
3757
+ "success": {
3758
+ "type": "boolean"
3759
+ },
3760
+ "data": {
3761
+ "$ref": "#/components/schemas/Event"
3762
+ }
3763
+ },
3764
+ "required": ["ok", "success", "data"]
3765
+ }
3766
+ }
3767
+ }
3768
+ },
3769
+ "404": {
3770
+ "description": "Event not found"
3771
+ }
3772
+ }
3773
+ }
3774
+ },
3775
+ "/api/v1/me/tokens": {
3776
+ "post": {
3777
+ "operationId": "createPersonalAccessToken",
3778
+ "tags": ["PersonalTokens"],
3779
+ "summary": "Create a Personal Access Token",
3780
+ "description": "Issues a new Personal Access Token (PAT) scoped to the authenticated account. The full token value is returned **once** and cannot be retrieved again. PATs carry broad `[\"read\",\"write\"]` permissions and are intended for personal tooling (e.g. MCP servers).",
3781
+ "security": [
3782
+ {
3783
+ "BearerAuth": []
3784
+ }
3785
+ ],
3786
+ "requestBody": {
3787
+ "required": true,
3788
+ "content": {
3789
+ "application/json": {
3790
+ "schema": {
3791
+ "type": "object",
3792
+ "properties": {
3793
+ "name": {
3794
+ "type": "string",
3795
+ "minLength": 1,
3796
+ "maxLength": 100,
3797
+ "description": "Human-readable label for the token"
3798
+ },
3799
+ "expires_at": {
3800
+ "type": "string",
3801
+ "format": "date-time",
3802
+ "description": "ISO 8601 expiry date. Omit for a non-expiring token."
3803
+ }
3804
+ },
3805
+ "required": ["name"]
3806
+ }
3807
+ }
3808
+ }
3809
+ },
3810
+ "responses": {
3811
+ "201": {
3812
+ "description": "Token created — contains the full one-time token value",
3813
+ "content": {
3814
+ "application/json": {
3815
+ "schema": {
3816
+ "$ref": "#/components/schemas/CreatedPersonalToken"
3817
+ }
3818
+ }
3819
+ }
3820
+ },
3821
+ "400": {
3822
+ "description": "Validation error"
3823
+ },
3824
+ "401": {
3825
+ "description": "Not authenticated"
3826
+ }
3827
+ }
3828
+ },
3829
+ "get": {
3830
+ "operationId": "listPersonalAccessTokens",
3831
+ "tags": ["PersonalTokens"],
3832
+ "summary": "List Personal Access Tokens",
3833
+ "description": "Returns all PATs belonging to the authenticated account. Full token values and hashes are never returned.",
3834
+ "security": [
3835
+ {
3836
+ "BearerAuth": []
3837
+ }
3838
+ ],
3839
+ "responses": {
3840
+ "200": {
3841
+ "description": "List of PATs",
3842
+ "content": {
3843
+ "application/json": {
3844
+ "schema": {
3845
+ "$ref": "#/components/schemas/PersonalTokenList"
3846
+ }
3847
+ }
3848
+ }
3849
+ },
3850
+ "401": {
3851
+ "description": "Not authenticated"
3852
+ }
3853
+ }
3854
+ }
3855
+ },
3856
+ "/api/v1/me/tokens/{id}": {
3857
+ "delete": {
3858
+ "operationId": "revokePersonalAccessToken",
3859
+ "tags": ["PersonalTokens"],
3860
+ "summary": "Revoke a Personal Access Token",
3861
+ "description": "Sets `is_active = false` on the token (soft-delete). The row is preserved for audit purposes. Returns 404 if the token does not belong to this account.",
3862
+ "security": [
3863
+ {
3864
+ "BearerAuth": []
3865
+ }
3866
+ ],
3867
+ "parameters": [
3868
+ {
3869
+ "schema": {
3870
+ "type": "string",
3871
+ "format": "uuid"
3872
+ },
3873
+ "required": true,
3874
+ "name": "id",
3875
+ "in": "path"
3876
+ }
3877
+ ],
3878
+ "responses": {
3879
+ "204": {
3880
+ "description": "Revoked successfully"
3881
+ },
3882
+ "401": {
3883
+ "description": "Not authenticated"
3884
+ },
3885
+ "404": {
3886
+ "description": "Token not found or does not belong to this account"
3887
+ }
3888
+ }
3889
+ }
3890
+ }
3891
+ },
3892
+ "webhooks": {}
3893
+ }