{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"http://api.lotas.ai","description":"Generated server url"}],"paths":{"/api/user/update-email":{"put":{"tags":["secure-user-controller"],"operationId":"updateUserEmail","requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/org-promos/{promoId}":{"put":{"tags":["admin-controller"],"operationId":"updateOrgPromoCode","parameters":[{"name":"promoId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgPromoRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/webhooks/stripe":{"post":{"tags":["stripe-webhook-controller"],"operationId":"handleStripeWebhook","parameters":[{"name":"Stripe-Signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/setup/create-first-admin":{"post":{"tags":["setup-controller"],"operationId":"createFirstAdmin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdminRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/feedback":{"get":{"tags":["feedback-controller"],"operationId":"listFeedback","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageFeedbackEntryAdminResponse"}}}}}},"post":{"tags":["feedback-controller"],"operationId":"submitFeedback","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackSubmissionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}},"delete":{"tags":["feedback-controller"],"operationId":"clearFeedback","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/feedback/backup":{"post":{"tags":["feedback-controller"],"operationId":"backupFeedback","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/feedback/attachments":{"post":{"tags":["feedback-controller"],"operationId":"uploadAttachment","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/feedback/attachments/presign":{"post":{"tags":["feedback-controller"],"operationId":"presignAttachment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackAttachmentPresignRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/auth/logout":{"post":{"tags":["token-exchange-controller"],"operationId":"logout","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/auth/login":{"post":{"tags":["token-exchange-controller"],"operationId":"adminLogin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminLoginRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/auth/exchange-clerk-token":{"post":{"tags":["token-exchange-controller"],"operationId":"exchangeClerkToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClerkTokenRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/attachments/vector-stores":{"post":{"tags":["attachment-controller"],"operationId":"createVectorStore","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}}}}},"/attachments/vector-stores/{vectorStoreId}/files":{"post":{"tags":["attachment-controller"],"operationId":"addFileToVectorStore","parameters":[{"name":"vectorStoreId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddFileRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}}}}},"/attachments/upload-openai":{"post":{"tags":["attachment-controller"],"operationId":"uploadOpenAIFile","parameters":[{"name":"purpose","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/attachments/upload-anthropic":{"post":{"tags":["attachment-controller"],"operationId":"uploadAnthropicFile","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/api/user/usage-based-billing":{"post":{"tags":["secure-user-controller"],"operationId":"updateUsageBasedBilling","requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/user/usage-based-billing/enable":{"post":{"tags":["secure-user-controller"],"operationId":"enableUsageBasedBilling","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/user/usage-based-billing/disable":{"post":{"tags":["secure-user-controller"],"operationId":"disableUsageBasedBilling","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/user/subscription/create":{"post":{"tags":["secure-user-controller"],"operationId":"createSubscription","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/user/subscription/cancel":{"post":{"tags":["secure-user-controller"],"operationId":"cancelSubscription","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/user/regenerate-api-key":{"post":{"tags":["secure-user-controller"],"operationId":"regenerateApiKey","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/user/pay-pending-charges":{"post":{"tags":["secure-user-controller"],"operationId":"payPendingCharges","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/user/create-payment-intent":{"post":{"tags":["secure-user-controller"],"operationId":"createPaymentIntent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntentRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/user/apply-promo-code":{"post":{"tags":["secure-user-controller"],"operationId":"applyPromoCode","requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/api/telemetry/app-open":{"post":{"tags":["telemetry-controller"],"operationId":"recordAppOpen","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppOpenEventRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/referrals/link/activate":{"post":{"tags":["referral-controller"],"operationId":"activateLink","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReferralSummaryResponse"}}}}}}},"/api/referrals/claim":{"post":{"tags":["referral-controller"],"operationId":"claimReferral","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralClaimRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/ai/query":{"post":{"tags":["ai-backend-controller"],"operationId":"handleQuery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiQueryRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StreamingResponseBody"}}}}}}},"/ai/cancel":{"post":{"tags":["ai-backend-controller"],"operationId":"cancelQuery","parameters":[{"name":"requestId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/admin/users/{userId}/tokens":{"post":{"tags":["admin-controller"],"operationId":"updateUserTokens","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTokensUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/users/{userId}/subscription":{"post":{"tags":["admin-controller"],"operationId":"updateSubscription","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/users/{userId}/subscription-period":{"post":{"tags":["admin-controller"],"operationId":"updateSubscriptionPeriod","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPeriodUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/users/{userId}/queries":{"post":{"tags":["admin-controller"],"operationId":"updateUserQueries","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserQueriesUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/users/{userId}/promo-codes/remove":{"post":{"tags":["admin-controller"],"operationId":"removePromoCodeFromUser","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/users/{userId}/promo-codes/add":{"post":{"tags":["admin-controller"],"operationId":"addPromoCodeToUser","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/users/{userId}/extend-subscription":{"post":{"tags":["admin-controller"],"operationId":"extendSubscription","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionExtensionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/referrals/{linkId}/reset-cap":{"post":{"tags":["admin-controller"],"operationId":"resetReferralCap","parameters":[{"name":"linkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"newCap","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":5}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/referrals/{linkId}/disable":{"post":{"tags":["admin-controller"],"operationId":"disableReferralLink","parameters":[{"name":"linkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/org-promos":{"get":{"tags":["admin-controller"],"operationId":"getOrgPromoStats","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgPromoStatsResponse"}}}}}}},"post":{"tags":["admin-controller"],"operationId":"createOrgPromoCode","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgPromoRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/logs/clear":{"post":{"tags":["admin-controller"],"operationId":"clearLogs","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/log-backups/collect":{"post":{"tags":["log-backup-controller"],"operationId":"collectLogs","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/backups/create":{"post":{"tags":["backup-controller"],"operationId":"createManualBackup","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/webhooks/stripe/health":{"get":{"tags":["stripe-webhook-controller"],"operationId":"webhookHealth","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/setup/status":{"get":{"tags":["setup-controller"],"operationId":"getSetupStatus","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/feedback/attachments/{id}/download":{"get":{"tags":["feedback-controller"],"operationId":"downloadAttachment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}}}}},"/auth/me":{"get":{"tags":["token-exchange-controller"],"operationId":"getCurrentUser","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/auth/csrf-token":{"get":{"tags":["token-exchange-controller"],"operationId":"getCsrfToken","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/attachments/health":{"get":{"tags":["attachment-controller"],"operationId":"health","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/user/usage-history":{"get":{"tags":["secure-user-controller"],"operationId":"getUsageHistory","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UsageHistoryResponse"}}}}}}},"/api/user/subscription-status":{"get":{"tags":["secure-user-controller"],"operationId":"getSubscriptionStatus","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubscriptionStatusResponse"}}}}}}},"/api/user/profile":{"get":{"tags":["secure-user-controller"],"operationId":"getProfile","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserProfile"}}}}}}},"/api/user/billing-history":{"get":{"tags":["secure-user-controller"],"operationId":"getBillingHistory","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BillingHistoryResponse"}}}}}}},"/api/user/api-key":{"get":{"tags":["secure-user-controller"],"operationId":"getApiKey","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/telemetry/admin/events":{"get":{"tags":["telemetry-controller"],"operationId":"getEvents","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}},{"name":"userId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageAppUsageUserSummaryResponse"}}}}}}},"/api/telemetry/admin/events/user/{userId}":{"get":{"tags":["telemetry-controller"],"operationId":"getUserEvents","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppOpenEvent"}}}}}}}},"/api/telemetry/admin/analytics":{"get":{"tags":["telemetry-controller"],"operationId":"getAnalytics","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/api/referrals/summary":{"get":{"tags":["referral-controller"],"operationId":"getSummary","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReferralSummaryResponse"}}}}}}},"/api/referrals/link/validate":{"get":{"tags":["referral-controller"],"operationId":"validateReferralLink","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/users":{"get":{"tags":["admin-controller"],"operationId":"getAllUsers","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"order","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageAdminUserDto"}}}}}}},"/admin/users/{userId}":{"get":{"tags":["admin-controller"],"operationId":"getUserById","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminUserDto"}}}}}},"delete":{"tags":["admin-controller"],"operationId":"deleteUser","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/users/{userId}/usage":{"get":{"tags":["admin-controller"],"operationId":"getUserUsage","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/users/{userId}/subscription-status":{"get":{"tags":["admin-controller"],"operationId":"getUserSubscriptionStatus","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/users/{userId}/billing":{"get":{"tags":["admin-controller"],"operationId":"getUserBilling","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/users/activity-summary":{"get":{"tags":["admin-controller"],"operationId":"getUserActivitySummary","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/referrals":{"get":{"tags":["admin-controller"],"operationId":"getReferrals","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"referrerEmail","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/referrals/metrics":{"get":{"tags":["admin-controller"],"operationId":"getReferralMetrics","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/referrals/conversions":{"get":{"tags":["admin-controller"],"operationId":"getReferralConversions","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/logs":{"get":{"tags":["admin-controller"],"operationId":"getApplicationLogs","parameters":[{"name":"lines","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":1000}},{"name":"level","in":"query","required":false,"schema":{"type":"string","default":"INFO"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/logs/stats":{"get":{"tags":["admin-controller"],"operationId":"getLogStatistics","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/log-backups":{"get":{"tags":["log-backup-controller"],"operationId":"getAllLogBackups","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/log-backups/{backupId}":{"get":{"tags":["log-backup-controller"],"operationId":"getLogBackupDetails","parameters":[{"name":"backupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/log-backups/{backupId}/download":{"get":{"tags":["log-backup-controller"],"operationId":"downloadLogBackup","parameters":[{"name":"backupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/admin/log-backups/status":{"get":{"tags":["log-backup-controller"],"operationId":"getCurrentStatus","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/log-backups/status/{status}":{"get":{"tags":["log-backup-controller"],"operationId":"getLogBackupsByStatus","parameters":[{"name":"status","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/log-backups/statistics":{"get":{"tags":["log-backup-controller"],"operationId":"getLogBackupStatistics","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/backups":{"get":{"tags":["backup-controller"],"operationId":"getAllBackups","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/backups/{backupId}":{"get":{"tags":["backup-controller"],"operationId":"getBackupDetails","parameters":[{"name":"backupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}},"delete":{"tags":["backup-controller"],"operationId":"deleteBackup","parameters":[{"name":"backupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/backups/{backupId}/download":{"get":{"tags":["backup-controller"],"operationId":"downloadBackup","parameters":[{"name":"backupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/admin/backups/statistics":{"get":{"tags":["backup-controller"],"operationId":"getBackupStatistics","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/backups/health":{"get":{"tags":["backup-controller"],"operationId":"checkBackupHealth","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/available-promo-codes":{"get":{"tags":["admin-controller"],"operationId":"getAvailablePromoCodes","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/audit":{"get":{"tags":["admin-audit-controller"],"operationId":"getAuditLogs","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageAdminAuditLog"}}}}}}},"/admin/audit/suspicious":{"get":{"tags":["admin-audit-controller"],"operationId":"getSuspiciousActivity","parameters":[{"name":"hoursBack","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":24}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/audit/stats":{"get":{"tags":["admin-audit-controller"],"operationId":"getAuditStats","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/audit/recent/{userId}":{"get":{"tags":["admin-audit-controller"],"operationId":"getRecentAuditLogsForUser","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminAuditLog"}}}}}}}},"/admin/audit/by-target-user/{userId}":{"get":{"tags":["admin-audit-controller"],"operationId":"getAuditLogsByTargetUser","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageAdminAuditLog"}}}}}}},"/admin/audit/by-admin/{adminId}":{"get":{"tags":["admin-audit-controller"],"operationId":"getAuditLogsByAdmin","parameters":[{"name":"adminId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageAdminAuditLog"}}}}}}},"/admin/audit/by-action/{actionType}":{"get":{"tags":["admin-audit-controller"],"operationId":"getAuditLogsByActionType","parameters":[{"name":"actionType","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageAdminAuditLog"}}}}}}},"/admin/analytics/users":{"get":{"tags":["admin-controller"],"operationId":"getUserAnalytics","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/admin/analytics/queries":{"get":{"tags":["admin-controller"],"operationId":"getQueryAnalytics","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/feedback/attachments/{id}":{"delete":{"tags":["feedback-controller"],"operationId":"deleteAttachment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"token","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/attachments/vector-stores/{vectorStoreId}":{"delete":{"tags":["attachment-controller"],"operationId":"deleteVectorStore","parameters":[{"name":"vectorStoreId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}}}}},"/attachments/openai-files/{fileId}":{"delete":{"tags":["attachment-controller"],"operationId":"deleteOpenAIFile","parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/attachments/delete-all":{"delete":{"tags":["attachment-controller"],"operationId":"deleteAllAttachments","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/attachments/conversation/{conversationId}/attachments":{"delete":{"tags":["attachment-controller"],"operationId":"deleteConversationAttachments","parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"file_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"anthropic_file_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/attachments/anthropic-files/{fileId}":{"delete":{"tags":["attachment-controller"],"operationId":"deleteAnthropicFile","parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/api/user/delete-account":{"delete":{"tags":["secure-user-controller"],"operationId":"deleteAccount","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}}},"components":{"schemas":{"UpdateOrgPromoRequest":{"required":["minimumActiveUsers","monthlyRequests"],"type":"object","properties":{"monthlyRequests":{"minimum":1,"type":"integer","format":"int32"},"minimumActiveUsers":{"minimum":1,"type":"integer","format":"int32"}}},"CreateAdminRequest":{"required":["email","password","setupKey"],"type":"object","properties":{"setupKey":{"type":"string"},"email":{"type":"string"},"password":{"maxLength":2147483647,"minLength":12,"type":"string"}}},"AttachmentReference":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"token":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"integer","format":"int64"}}},"FeedbackSubmissionRequest":{"type":"object","properties":{"firstName":{"maxLength":100,"minLength":0,"type":"string"},"lastName":{"maxLength":100,"minLength":0,"type":"string"},"email":{"maxLength":320,"minLength":0,"type":"string"},"feedback":{"maxLength":10000,"minLength":0,"type":"string"},"clientVersion":{"maxLength":50,"minLength":0,"type":"string"},"appQuality":{"maxLength":20,"minLength":0,"type":"string"},"backendEnvironment":{"maxLength":20,"minLength":0,"type":"string"},"platform":{"maxLength":20,"minLength":0,"type":"string"},"appType":{"maxLength":50,"minLength":0,"type":"string"},"attachments":{"maxItems":5,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/AttachmentReference"}}}},"FeedbackAttachmentPresignRequest":{"required":["filename","mimeType"],"type":"object","properties":{"filename":{"maxLength":255,"minLength":0,"type":"string"},"mimeType":{"maxLength":150,"minLength":0,"type":"string"},"size":{"minimum":1,"type":"integer","format":"int64"}}},"AdminLoginRequest":{"required":["email","password"],"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}}},"ClerkTokenRequest":{"type":"object","properties":{"token":{"type":"string"}}},"VectorStoreRequest":{"type":"object","properties":{"name":{"type":"string"},"api_key":{"type":"string"}}},"AttachmentResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"data":{"$ref":"#/components/schemas/JsonNode"},"id":{"type":"string"},"object":{"type":"string"},"filename":{"type":"string"},"purpose":{"type":"string"},"bytes":{"type":"integer","format":"int64"},"status":{"type":"string"}}},"JsonNode":{"type":"object"},"AddFileRequest":{"type":"object","properties":{"file_id":{"type":"string"},"api_key":{"type":"string"}}},"PaymentIntentRequest":{"required":["amount","userId"],"type":"object","properties":{"amount":{"minimum":1,"type":"integer","format":"int64"},"userId":{"type":"string"}}},"AppOpenEventRequest":{"required":["appName","appVersion","userId"],"type":"object","properties":{"userId":{"type":"string"},"appVersion":{"type":"string"},"ipAddress":{"type":"string"},"operatingSystem":{"type":"string"},"appName":{"type":"string"}}},"ConversionInfo":{"type":"object","properties":{"invitee_email":{"type":"string"},"converted_at":{"type":"string","format":"date-time"}}},"ReferralSummaryResponse":{"type":"object","properties":{"eligible":{"type":"boolean"},"exhausted":{"type":"boolean"},"is_eligible":{"type":"boolean"},"code":{"type":"string"},"full_url":{"type":"string"},"successful_redemptions":{"type":"integer","format":"int32"},"max_redemptions":{"type":"integer","format":"int32"},"is_exhausted":{"type":"boolean"},"status":{"type":"string"},"conversions":{"type":"array","items":{"$ref":"#/components/schemas/ConversionInfo"}},"ineligibility_reason":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"ReferralClaimRequest":{"required":["code"],"type":"object","properties":{"code":{"maxLength":64,"minLength":8,"type":"string"}}},"AiQueryRequest":{"type":"object","properties":{"conversation":{"type":"array","items":{"$ref":"#/components/schemas/JsonNode"}},"provider":{"type":"string"},"model":{"type":"string"},"temperature":{"type":"number","format":"double"},"auth":{"$ref":"#/components/schemas/AuthData"},"request_type":{"type":"string"},"request_id":{"type":"string"},"function_call_depth":{"type":"integer","format":"int32"},"message_id":{"type":"string"},"function_call_result":{"$ref":"#/components/schemas/JsonNode"},"last_function_was_edit_file":{"type":"boolean"},"symbols_note":{"$ref":"#/components/schemas/SymbolsNote"},"user_os_version":{"type":"string"},"user_workspace_path":{"type":"string"},"user_shell":{"type":"string"},"project_layout":{"type":"string"},"client_version":{"type":"string"},"app_type":{"type":"string"},"interaction_mode":{"type":"string"},"previous_response_id":{"type":"string"},"context_items":{"type":"array","items":{"type":"string"}},"user_rules":{"type":"array","items":{"type":"string"}},"rule_file":{"type":"string"},"custom_system_prompt":{"type":"string"},"direct_context_message":{"type":"string"},"target_query_number":{"type":"integer","format":"int32"},"previous_summary":{"$ref":"#/components/schemas/PreviousSummary"},"enabled_tools":{"type":"array","items":{"type":"string"}},"custom_functions":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"replace_functions":{"type":"boolean"}}},"AuthData":{"type":"object","properties":{"api_key":{"type":"string"}}},"DirectContextItem":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"content":{"type":"object"},"symbols":{"type":"object"},"id":{"type":"string"},"summary":{"type":"string"},"topic":{"type":"string"},"markdown":{"type":"string"},"contents":{"type":"array","items":{"type":"string"}},"start_line":{"type":"integer","format":"int32"},"end_line":{"type":"integer","format":"int32"}}},"EnvironmentVariable":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}}},"EnvironmentVariables":{"type":"object","properties":{"Data":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentVariable"}},"Function":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentVariable"}},"Value":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentVariable"}}}},"ImageContextData":{"type":"object","properties":{"filename":{"type":"string"},"timestamp":{"type":"string"},"original_path":{"type":"string"},"local_path":{"type":"string"},"mime_type":{"type":"string"},"base64_data":{"type":"string"}}},"OpenFile":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":"string"},"type":{"type":"string"},"dirty":{"type":"boolean"},"name":{"type":"string"},"minutes_since_last_update":{"type":"number","format":"double"},"is_active":{"type":"boolean"}}},"PreviousSummary":{"type":"object","properties":{"query_number":{"type":"integer","format":"int32"},"timestamp":{"type":"string"},"summary_text":{"type":"string"},"first_unsummarized_message_id":{"type":"integer","format":"int32"},"tokens_at_summarization":{"type":"integer","format":"int32"}}},"SymbolsNote":{"type":"object","properties":{"keywords":{"type":"array","items":{"type":"object"}},"direct_context":{"type":"array","items":{"$ref":"#/components/schemas/DirectContextItem"}},"environment_variables":{"$ref":"#/components/schemas/EnvironmentVariables"},"open_files":{"type":"array","items":{"$ref":"#/components/schemas/OpenFile"}},"attached_images":{"type":"array","items":{"$ref":"#/components/schemas/ImageContextData"}}}},"StreamingResponseBody":{"type":"object"},"UserTokensUpdateRequest":{"required":["reason"],"type":"object","properties":{"reason":{"maxLength":500,"minLength":5,"type":"string"},"monthly_query_count":{"minimum":0,"type":"integer","format":"int32"},"pending_overage_cents":{"minimum":0,"type":"number"},"current_period_end":{"type":"string","format":"date-time"},"current_period_start":{"type":"string","format":"date-time"},"usage_based_billing_enabled":{"type":"boolean"}}},"SubscriptionUpdateRequest":{"type":"object","properties":{"reason":{"maxLength":500,"minLength":5,"type":"string"},"subscription_status":{"type":"string"},"current_period_end":{"type":"string","format":"date-time"},"usage_based_billing_enabled":{"type":"boolean"},"pending_overage_cents":{"type":"number"}}},"SubscriptionPeriodUpdateRequest":{"required":["reason"],"type":"object","properties":{"reason":{"maxLength":500,"minLength":10,"type":"string"},"current_period_start":{"type":"string","format":"date-time"},"current_period_end":{"type":"string","format":"date-time"}}},"UserQueriesUpdateRequest":{"required":["reason"],"type":"object","properties":{"reason":{"maxLength":500,"minLength":10,"type":"string"},"monthly_query_count":{"minimum":0,"type":"integer","format":"int32"},"pending_overage_cents":{"minimum":0,"type":"number"},"usage_based_billing_enabled":{"type":"boolean"}}},"SubscriptionExtensionRequest":{"required":["new_period_end","reason"],"type":"object","properties":{"reason":{"maxLength":500,"minLength":5,"type":"string"},"new_period_end":{"type":"string","format":"date-time"}}},"CreateOrgPromoRequest":{"required":["code","minimumActiveUsers","monthlyRequests"],"type":"object","properties":{"code":{"type":"string"},"monthlyRequests":{"minimum":1,"type":"integer","format":"int32"},"minimumActiveUsers":{"minimum":1,"type":"integer","format":"int32"}}},"FeedbackAttachmentAdminResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"filename":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"}}},"FeedbackEntryAdminResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"feedback":{"type":"string"},"clientVersion":{"type":"string"},"appQuality":{"type":"string"},"backendEnvironment":{"type":"string"},"platform":{"type":"string"},"appType":{"type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackAttachmentAdminResponse"}},"createdAt":{"type":"string","format":"date-time"}}},"PageFeedbackEntryAdminResponse":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"first":{"type":"boolean"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"last":{"type":"boolean"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackEntryAdminResponse"}},"number":{"type":"integer","format":"int32"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"empty":{"type":"boolean"}}},"PageableObject":{"type":"object","properties":{"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"offset":{"type":"integer","format":"int64"},"sort":{"$ref":"#/components/schemas/SortObject"},"paged":{"type":"boolean"},"unpaged":{"type":"boolean"}}},"SortObject":{"type":"object","properties":{"sorted":{"type":"boolean"},"empty":{"type":"boolean"},"unsorted":{"type":"boolean"}}},"UsageHistoryItem":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"model":{"type":"string"},"cost_type":{"type":"string"},"actual_cost_cents":{"type":"number"},"cost_display":{"type":"string"},"endpoint":{"type":"string"}}},"UsageHistoryResponse":{"type":"object","properties":{"usage":{"type":"array","items":{"$ref":"#/components/schemas/UsageHistoryItem"}},"total_pages":{"type":"integer","format":"int32"},"total_elements":{"type":"integer","format":"int64"},"current_page":{"type":"integer","format":"int32"},"page_size":{"type":"integer","format":"int32"},"current_subscription_status":{"type":"string"},"trial_queries_remaining":{"type":"integer","format":"int32"},"monthly_queries_remaining":{"type":"integer","format":"int32"},"queries_used":{"type":"integer","format":"int32"}}},"SubscriptionStatusResponse":{"type":"object","properties":{"subscription_status":{"type":"string"},"current_period_start":{"type":"string","format":"date-time"},"current_period_end":{"type":"string","format":"date-time"},"queries_remaining":{"type":"integer","format":"int32"},"queries_limit":{"type":"integer","format":"int32"},"overage_count":{"type":"integer","format":"int32"},"usage_based_billing_enabled":{"type":"boolean"},"pending_overage_cents":{"type":"number"},"trial_active":{"type":"boolean"},"trial_ends_at":{"type":"string","format":"date-time"},"queries_used":{"type":"integer","format":"int32"},"payments_enabled":{"type":"boolean"}}},"UserProfile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"subscription_status":{"type":"string"},"monthly_query_count":{"type":"integer","format":"int32"},"trial_start_date":{"type":"string","format":"date-time"},"current_period_start":{"type":"string","format":"date-time"},"current_period_end":{"type":"string","format":"date-time"},"usage_based_billing_enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"BillingHistoryItem":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string","format":"date-time"},"description":{"type":"string"},"payment_type":{"type":"string"},"amount_dollars":{"type":"number"},"status":{"type":"string"},"stripe_payment_id":{"type":"string"},"billing_period_start":{"type":"string","format":"date-time"},"billing_period_end":{"type":"string","format":"date-time"}}},"BillingHistoryResponse":{"type":"object","properties":{"billing_records":{"type":"array","items":{"$ref":"#/components/schemas/BillingHistoryItem"}},"total_pages":{"type":"integer","format":"int32"},"total_elements":{"type":"integer","format":"int64"},"current_page":{"type":"integer","format":"int32"},"page_size":{"type":"integer","format":"int32"},"billing_stats":{"$ref":"#/components/schemas/BillingStats"}}},"BillingStats":{"type":"object","properties":{"total_subscription_payments":{"type":"number"},"total_usage_based_payments":{"type":"number"},"total_pending_charges_payments":{"type":"number"},"total_amount_paid":{"type":"number"},"subscription_payment_count":{"type":"integer","format":"int64"},"usage_based_payment_count":{"type":"integer","format":"int64"},"pending_charges_payment_count":{"type":"integer","format":"int64"}}},"AppUsageUserSummaryResponse":{"type":"object","properties":{"userId":{"type":"string"},"lastAppVersion":{"type":"string"},"lastIpAddress":{"type":"string"},"lastOpenedAt":{"type":"string","format":"date-time"},"opensLast24Hours":{"type":"integer","format":"int64"},"opensLast7Days":{"type":"integer","format":"int64"},"opensLast30Days":{"type":"integer","format":"int64"},"activityStatus":{"type":"string"},"lastOperatingSystem":{"type":"string"},"lastAppName":{"type":"string"}}},"PageAppUsageUserSummaryResponse":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"first":{"type":"boolean"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"last":{"type":"boolean"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/AppUsageUserSummaryResponse"}},"number":{"type":"integer","format":"int32"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"empty":{"type":"boolean"}}},"AppOpenEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"type":"string"},"appVersion":{"type":"string"},"ipAddress":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"operatingSystem":{"type":"string"},"appName":{"type":"string"}}},"AdminUserDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"username":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"enabled":{"type":"boolean"},"subscription_status":{"type":"string"},"monthly_query_count":{"type":"integer","format":"int32"},"api_key":{"type":"string"},"stripe_customer":{"type":"string"},"clerk_user_id":{"type":"string"},"current_period_start":{"type":"string","format":"date-time"},"current_period_end":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"last_query_at":{"type":"string","format":"date-time"},"total_queries":{"type":"integer","format":"int64"},"usage_based_billing_enabled":{"type":"boolean"},"pending_overage_cents":{"type":"number"},"most_recent_rao_version":{"type":"string"},"most_recent_erdos_version":{"type":"string"},"active_promo_codes":{"type":"array","items":{"type":"string"}}}},"PageAdminUserDto":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"first":{"type":"boolean"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"last":{"type":"boolean"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserDto"}},"number":{"type":"integer","format":"int32"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"empty":{"type":"boolean"}}},"OrgPromoStatsResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"monthly_requests":{"type":"integer","format":"int32"},"minimum_active_users":{"type":"integer","format":"int32"},"total_users_redeemed":{"type":"integer","format":"int64"},"active_users_count":{"type":"integer","format":"int64"},"is_meeting_threshold":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"AdminAuditLog":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"adminUser":{"$ref":"#/components/schemas/User"},"actionType":{"type":"string"},"details":{"type":"string"},"targetUser":{"$ref":"#/components/schemas/User"},"ipAddress":{"type":"string"},"userAgent":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"adminUserId":{"type":"string","format":"uuid"},"targetUserId":{"type":"string","format":"uuid"}}},"PageAdminAuditLog":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"first":{"type":"boolean"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"last":{"type":"boolean"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/AdminAuditLog"}},"number":{"type":"integer","format":"int32"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"empty":{"type":"boolean"}}},"User":{"required":["email","username"],"type":"object","properties":{"id":{"type":"string","format":"uuid"},"username":{"maxLength":50,"minLength":3,"type":"string"},"email":{"type":"string"},"password":{"maxLength":2147483647,"minLength":8,"type":"string"},"stripeCustomer":{"type":"string"},"apiKey":{"type":"string"},"clerkUserId":{"type":"string"},"role":{"type":"string","enum":["USER","ADMIN","SUPER_ADMIN"]},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lastLoginAt":{"type":"string","format":"date-time"},"subscriptionStatus":{"type":"string"},"currentPeriodStart":{"type":"string","format":"date-time"},"currentPeriodEnd":{"type":"string","format":"date-time"},"monthlyQueryCount":{"type":"integer","format":"int32"},"trialStartDate":{"type":"string","format":"date-time"},"usageBasedBillingEnabled":{"type":"boolean"},"pendingOverageCents":{"type":"number"},"paymentStatusReason":{"type":"string"},"usedCodes":{"type":"string"},"aiSessionFollowUpCount":{"type":"integer","format":"int32"},"activeOrgPromoId":{"type":"string","format":"uuid"}}},"DeleteUserRequest":{"required":["reason"],"type":"object","properties":{"reason":{"maxLength":500,"minLength":20,"type":"string"}}}}}}