mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-19 20:24:32 +02:00
70 lines
1.3 KiB
Python
70 lines
1.3 KiB
Python
from datetime import datetime
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from onyx.server.settings.models import ApplicationStatus
|
|
|
|
|
|
class CheckoutSessionCreationRequest(BaseModel):
|
|
quantity: int
|
|
|
|
|
|
class CreateTenantRequest(BaseModel):
|
|
tenant_id: str
|
|
initial_admin_email: str
|
|
|
|
|
|
class ProductGatingRequest(BaseModel):
|
|
tenant_id: str
|
|
application_status: ApplicationStatus
|
|
|
|
|
|
class SubscriptionStatusResponse(BaseModel):
|
|
subscribed: bool
|
|
|
|
|
|
class BillingInformation(BaseModel):
|
|
stripe_subscription_id: str
|
|
status: str
|
|
current_period_start: datetime
|
|
current_period_end: datetime
|
|
number_of_seats: int
|
|
cancel_at_period_end: bool
|
|
canceled_at: datetime | None
|
|
trial_start: datetime | None
|
|
trial_end: datetime | None
|
|
seats: int
|
|
payment_method_enabled: bool
|
|
|
|
|
|
class CheckoutSessionCreationResponse(BaseModel):
|
|
id: str
|
|
|
|
|
|
class ImpersonateRequest(BaseModel):
|
|
email: str
|
|
|
|
|
|
class TenantCreationPayload(BaseModel):
|
|
tenant_id: str
|
|
email: str
|
|
referral_source: str | None = None
|
|
|
|
|
|
class TenantDeletionPayload(BaseModel):
|
|
tenant_id: str
|
|
email: str
|
|
|
|
|
|
class AnonymousUserPath(BaseModel):
|
|
anonymous_user_path: str | None
|
|
|
|
|
|
class ProductGatingResponse(BaseModel):
|
|
updated: bool
|
|
error: str | None
|
|
|
|
|
|
class SubscriptionSessionResponse(BaseModel):
|
|
sessionId: str
|