package dto

import "time"

// AppPublicConfigResponse is returned by the browser-facing public config endpoint.
type AppPublicConfigResponse struct {
	PingCAPAuthEnabled           bool   `json:"pingcapAuthEnabled"`
	PasswordAuthEnabled          bool   `json:"passwordAuthEnabled"`
	OpenRegistration             bool   `json:"openRegistration"`
	RegistrationMode             string `json:"registrationMode"`
	MessageHistoryDays           int    `json:"messageHistoryDays"`
	MessageSearchEnabled         bool   `json:"messageSearchEnabled"`
	TeamsEnabled                 bool   `json:"teamsEnabled"`
	AgentToolsSettingsEnabled    bool   `json:"agentToolsSettingsEnabled"`
	OrganizationDirectoryEnabled bool   `json:"organizationDirectoryEnabled"`
	OrganizationBYOKEnabled      bool   `json:"organizationByokEnabled"`
	BillingEnabled               bool   `json:"billingEnabled"`
	DaemonConnectBaseURL         string `json:"daemonConnectBaseURL"`
	MeshXEnabled                 bool   `json:"meshXEnabled"`
	MeshXKnowledgeBasesEnabled   bool   `json:"meshXKnowledgeBasesEnabled"`
	MeshXWorkflowsEnabled        bool   `json:"meshXWorkflowsEnabled"`
	MeshXMiniappPairingEnabled   bool   `json:"meshXMiniappPairingEnabled"`
	MeshXRolesEnabled            bool   `json:"meshXRolesEnabled"`
	MeshXBaseURL                 string `json:"meshXBaseURL"`
	DesktopQuickStartEnabled     bool   `json:"desktopQuickStartEnabled"`
	ServerVersion                string `json:"serverVersion"`
	ServerGitHash                string `json:"serverGitHash"`
	DeploymentEnvironment        string `json:"deploymentEnvironment,omitempty"`
	ServerBuildTime              string `json:"serverBuildTime,omitempty"`
	CoreSchemaVersion            *int64 `json:"coreSchemaVersion,omitempty"`
}

// AppAttachment is the API wire shape for uploaded message attachments.
type AppAttachment struct {
	ID           string `json:"id"`
	Filename     string `json:"filename"`
	ContentType  string `json:"contentType,omitempty"`
	SizeBytes    int64  `json:"sizeBytes,omitempty"`
	ThumbnailURL string `json:"thumbnailUrl,omitempty"`
}

// AppAttachmentUploadResponse wraps uploaded message attachments.
type AppAttachmentUploadResponse struct {
	Attachments []AppAttachment `json:"attachments"`
}

// AppAvatarUploadResponse returns the stored avatar identity and URL.
type AppAvatarUploadResponse struct {
	ID  string `json:"id"`
	URL string `json:"url"`
}

// AppOpenThreadRequest opens or resolves a reply thread for a parent message.
type AppOpenThreadRequest struct {
	ParentMessageID string `json:"parentMessageId"`
}

// PersonalSticker is the API wire shape for a personal sticker.
type PersonalSticker struct {
	ID          string    `json:"id"`
	Filename    string    `json:"filename"`
	ContentType string    `json:"contentType"`
	SizeBytes   int64     `json:"sizeBytes"`
	CreatedAt   time.Time `json:"createdAt"`
}

// AppPersonalStickerUploadResponse wraps uploaded personal stickers.
type AppPersonalStickerUploadResponse struct {
	Stickers []PersonalSticker `json:"stickers"`
}
