{"openapi":"3.1.0","info":{"title":"Vibedasher Public API","description":"\n# Vibedasher Public API\n\nPublic API for accessing and interacting with Vibedasher visualizations.\n\n## Authentication\n\nPublic endpoints do not require authentication. For authenticated endpoints, contact your administrator.\n\n## Base URL\n\nProduction: `https://api.us-east-1.vibedasher.com`\nStaging: `https://api-staging.vibedasher.com`\n\n## Support\n\nFor API support, visit [vibedasher.com](https://vibedasher.com) or contact support@vibedasher.com.\n        ","version":"1.0.0"},"paths":{"/v1/public/viz/slug/{slug}":{"get":{"tags":["viz"],"summary":"Get Public Viz By Global Slug","description":"Get a published public viz by slug across all accounts (no account required).\n\nUsed by the /v/{slug} share gate to resolve which account owns a slug without\nexposing draft vizes. Returns 404 if no published+public viz with that slug exists.","operationId":"get_public_viz_by_global_slug_v1_public_viz_slug__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Public Viz By Global Slug V1 Public Viz Slug  Slug  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/viz/{account_slug}/{slug}":{"get":{"tags":["viz"],"summary":"Get Public Viz","description":"Get a public viz by slug.","operationId":"get_public_viz_v1_public_viz__account_slug___slug__get","security":[{"OptionalJWTBearer":[]}],"parameters":[{"name":"account_slug","in":"path","required":true,"schema":{"type":"string","title":"Account Slug"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Public Viz V1 Public Viz  Account Slug   Slug  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/viz/{account_slug}/{slug}/query":{"post":{"tags":["viz"],"summary":"Run Viz Query","description":"Execute a SQL query against a public v2 viz.","operationId":"run_viz_query_v1_public_viz__account_slug___slug__query_post","security":[{"OptionalJWTBearer":[]}],"parameters":[{"name":"account_slug","in":"path","required":true,"schema":{"type":"string","title":"Account Slug"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_run_viz_query_v1_public_viz__account_slug___slug__query_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Viz Query V1 Public Viz  Account Slug   Slug  Query Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/viz/{account_slug}/{slug}/batch":{"post":{"tags":["viz"],"summary":"Run Viz Query Batch","description":"Batch SQL query submission for public v2 dashboards.\nAccepts up to 50 queries, validates account/viz once, runs all in parallel.\n\nEach query: { \"sql\": \"...\", \"args\": {...} }","operationId":"run_viz_query_batch_v1_public_viz__account_slug___slug__batch_post","security":[{"OptionalJWTBearer":[]}],"parameters":[{"name":"account_slug","in":"path","required":true,"schema":{"type":"string","title":"Account Slug"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_run_viz_query_batch_v1_public_viz__account_slug___slug__batch_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Viz Query Batch V1 Public Viz  Account Slug   Slug  Batch Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/viz/{account_slug}/{viz_slug}/sql/{query_id}":{"get":{"tags":["viz"],"summary":"Get Public Viz Sql Query Status","description":"Get SQL query status for a public v2 viz.","operationId":"get_public_viz_sql_query_status_v1_public_viz__account_slug___viz_slug__sql__query_id__get","parameters":[{"name":"account_slug","in":"path","required":true,"schema":{"type":"string","title":"Account Slug"}},{"name":"viz_slug","in":"path","required":true,"schema":{"type":"string","title":"Viz Slug"}},{"name":"query_id","in":"path","required":true,"schema":{"type":"string","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Public Viz Sql Query Status V1 Public Viz  Account Slug   Viz Slug  Sql  Query Id  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/viz/{account_slug}/{viz_slug}/sql/status/batch":{"post":{"tags":["viz"],"summary":"Get Public Viz Sql Query Status Batch","description":"Batch query status check for public v2 dashboards.","operationId":"get_public_viz_sql_query_status_batch_v1_public_viz__account_slug___viz_slug__sql_status_batch_post","parameters":[{"name":"account_slug","in":"path","required":true,"schema":{"type":"string","title":"Account Slug"}},{"name":"viz_slug","in":"path","required":true,"schema":{"type":"string","title":"Viz Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_public_viz_sql_query_status_batch_v1_public_viz__account_slug___viz_slug__sql_status_batch_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Public Viz Sql Query Status Batch V1 Public Viz  Account Slug   Viz Slug  Sql Status Batch Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/viz/{account_slug}/{viz_slug}/sql/{query_id}/result":{"get":{"tags":["viz"],"summary":"Get Public Viz Sql Query Result","description":"Get SQL query result for a public v2 viz.","operationId":"get_public_viz_sql_query_result_v1_public_viz__account_slug___viz_slug__sql__query_id__result_get","parameters":[{"name":"account_slug","in":"path","required":true,"schema":{"type":"string","title":"Account Slug"}},{"name":"viz_slug","in":"path","required":true,"schema":{"type":"string","title":"Viz Slug"}},{"name":"query_id","in":"path","required":true,"schema":{"type":"string","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Public Viz Sql Query Result V1 Public Viz  Account Slug   Viz Slug  Sql  Query Id  Result Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/viz/{account_slug}/{viz_slug}/cache/{cache_key}.msgpack":{"get":{"tags":["viz"],"summary":"Get Public Cached Result","description":"Serve cached query result directly as msgpack bytes.\n\nDesigned for CloudFront edge caching: the client computes the cache key\nlocally (SHA256 of sql|dataset_ids|mode) and fetches this endpoint.\nCloudFront caches the response for 5 minutes, eliminating Lambda\ninvocations for repeat viewers of viral public dashboards.\n\nReturns 404 if the cache entry doesn't exist (client falls back to\nthe batch POST endpoint for query execution).\n\nCloud-only: on-premise deployments don't use CloudFront but still\nbenefit from the direct-stream path (avoids presigned URL round-trip).","operationId":"get_public_cached_result_v1_public_viz__account_slug___viz_slug__cache__cache_key__msgpack_get","parameters":[{"name":"account_slug","in":"path","required":true,"schema":{"type":"string","title":"Account Slug"}},{"name":"viz_slug","in":"path","required":true,"schema":{"type":"string","title":"Viz Slug"}},{"name":"cache_key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$","title":"Cache Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/seeds":{"get":{"tags":["seeds"],"summary":"List Public Seeds","description":"List public seeds (no authentication required)","operationId":"list_public_seeds_v1_public_seeds_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"exclusiveMinimum":0,"default":100,"title":"Limit"}},{"name":"chartType","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Charttype"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Public Seeds V1 Public Seeds Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccessRightCreate":{"properties":{"resourceType":{"$ref":"#/components/schemas/ResourceType","description":"Type of the resource (e.g., dataset, viz)","default":"dataset"},"folderId":{"type":"integer","title":"Folderid","description":"ID of the specific folder","default":-1},"permission":{"$ref":"#/components/schemas/PermissionType","description":"Type of permission (e.g., view, edit, delete)"},"accessType":{"$ref":"#/components/schemas/AccessType","description":"Whether the permission is allowed or denied. Deny takes precedence."},"accountId":{"type":"string","title":"Accountid","description":"Account ID to which the access right belongs","default":""},"principalId":{"type":"string","title":"Principalid","description":"ID of the user or group this access right applies to"},"principalType":{"$ref":"#/components/schemas/PrincipalType","description":"Type of principal ('user' or 'group')"}},"type":"object","required":["permission","accessType","principalId","principalType"],"title":"AccessRightCreate","description":"AccessRight creation model"},"AccessRightUpdate":{"properties":{"accessType":{"anyOf":[{"$ref":"#/components/schemas/AccessType"},{"type":"null"}],"description":"Update whether the permission is allowed or denied."}},"type":"object","title":"AccessRightUpdate","description":"AccessRight update model - typically, access rights are replaced rather than updated field by field.\nHowever, if partial updates are needed, they can be defined here."},"AccessType":{"type":"string","enum":["allow","deny"],"title":"AccessType"},"Account":{"properties":{"name":{"type":"string","title":"Name","description":"Primary identifier or name for the account"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional descriptive text for the account"},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripecustomerid","description":"Stripe customer ID for payment processing"},"stripeCustomerEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripecustomeremail","description":"Email associated with Stripe customer"},"slug":{"anyOf":[{"type":"string","maxLength":100,"minLength":3,"pattern":"^[a-z0-9-_]+$"},{"type":"null"}],"title":"Slug"},"credits":{"type":"integer","minimum":0.0,"title":"Credits","description":"Number of credits available for the account","default":0},"agentName":{"type":"string","title":"Agentname","description":"Default name for the AI agent in conversations","default":"John"},"agentSoul":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Agentsoul","description":"Default behavioral persona (soul) for the AI agent, markdown"},"allowUserAgentCustomization":{"type":"boolean","title":"Allowuseragentcustomization","description":"When True, non-admin users can override agent name and soul per-user","default":false},"allowForPublicViz":{"type":"boolean","title":"Allowforpublicviz","description":"Whether the account allows public vizs to be created","default":true},"theme":{"$ref":"#/components/schemas/AccountTheme","description":"Account theme settings","default":{"light":{"accent":"#64B5F6","background":"#F4F5FA","primary":"#9155FD","secondary":"#8A8D93"},"dark":{"accent":"#63a8f7","background":"#28243D","primary":"#8442fd","secondary":"#8A8D93"},"chartPaletteLight":["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc","#2f4554"],"chartPaletteDark":["#7aa0ff","#a9e28c","#ffd776","#ff8787","#8fd4ee","#56c68c","#ffa06e","#b98bcb","#ff9ade","#5c7590"]}},"autoTopupEnabled":{"type":"boolean","title":"Autotopupenabled","description":"Whether automatic topup is enabled for the account","default":false},"topupThreshold":{"type":"integer","title":"Topupthreshold","description":"Credit threshold that triggers automatic topup in billionths of dollars","default":10000000000},"topupAmount":{"type":"integer","title":"Topupamount","description":"Amount to add when automatic topup is triggered in billionths of dollars","default":50000000000},"defaultPaymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultpaymentmethod","description":"Default Stripe payment method ID for automatic topup"},"paymentMethods":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Paymentmethods","description":"List of saved Stripe payment methods"},"icebergSnapshotRetention":{"type":"integer","title":"Icebergsnapshotretention","description":"Account-level Iceberg snapshot retention policy (allowed: 1 or 2)","default":1},"creditsZeroSince":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Creditszerosince","description":"Timestamp when account credits first hit zero (None if credits > 0)"},"firstDatasetReadyAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Firstdatasetreadyat","description":"Phase 70 — UTC timestamp when this account's FIRST dataset transitioned to READY. Set exactly once by a CAS UPDATE in the dataset_lifecycle subscriber; gates FirstDatasetReadyEvent."},"id":{"type":"string","title":"Id","description":"Account ID"}},"type":"object","required":["name"],"title":"Account","description":"Complete Account model","example":{"created_at":"2023-01-01T00:00:00","description":"A sample account instance.","id":"123e4567-e89b-12d3-a456-426614174000","name":"Sample Account","updated_at":"2023-01-01T00:00:00"}},"AccountCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Account name"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description","description":"Account description"},"slug":{"type":"string","maxLength":100,"title":"Slug","description":"URL-friendly account identifier"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region","description":"AWS region for the account (e.g., 'aws:eu-central-1')"},"icebergSnapshotRetention":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Icebergsnapshotretention","default":1}},"type":"object","required":["name","slug"],"title":"AccountCreate"},"AccountLogoCreate":{"properties":{"slug":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","title":"Slug","description":"URL-safe identifier, unique per account (lowercase letters, digits, _ or -)."},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Human-readable name shown in admin UI."},"contentType":{"type":"string","maxLength":64,"title":"Contenttype","description":"MIME type of the stored image.","default":"image/png"}},"type":"object","required":["slug","name"],"title":"AccountLogoCreate","description":"Payload to register a new logo. The bytes are uploaded via the returned presigned URL."},"AccountLogoUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"contentType":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Contenttype"}},"type":"object","title":"AccountLogoUpdate"},"AccountTheme":{"properties":{"light":{"$ref":"#/components/schemas/ThemeColors","description":"Light mode colors"},"dark":{"$ref":"#/components/schemas/ThemeColors","description":"Dark mode colors"},"chartPaletteLight":{"items":{"type":"string"},"type":"array","title":"Chartpalettelight","description":"Ordered ECharts series colours for light mode"},"chartPaletteDark":{"items":{"type":"string"},"type":"array","title":"Chartpalettedark","description":"Ordered ECharts series colours for dark mode"},"fontFamily":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fontfamily","description":"CSS font-family stack (e.g. 'Inter, system-ui, sans-serif')"},"baseSpacing":{"anyOf":[{"type":"integer","maximum":24.0,"minimum":2.0},{"type":"null"}],"title":"Basespacing","description":"Base spacing unit in px — drives chart padding, card gaps"}},"type":"object","title":"AccountTheme","description":"Account-level brand styling — single source of truth.\n\nFlows into (a) the dashboard coder prompt, (b) generated dashboard_config\ntheme_colors, and (c) seed-rendered chart palettes so every dashboard in the\naccount looks consistent."},"AccountUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripecustomerid","description":"Stripe customer ID (internal use only)"},"stripeCustomerEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripecustomeremail","description":"Email associated with Stripe customer"},"allowForPublicViz":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allowforpublicviz"},"agentName":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Agentname"},"agentSoul":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Agentsoul"},"allowUserAgentCustomization":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allowuseragentcustomization"},"theme":{"anyOf":[{"$ref":"#/components/schemas/AccountTheme"},{"type":"null"}],"description":"Account theme settings"},"autoTopupEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Autotopupenabled"},"topupThreshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Topupthreshold"},"topupAmount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Topupamount"},"defaultPaymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultpaymentmethod"},"paymentMethods":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Paymentmethods"},"icebergSnapshotRetention":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Icebergsnapshotretention"}},"type":"object","title":"AccountUpdate","description":"Account update model (slug and region are immutable and cannot be updated)"},"ApiKeyCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Name for the API key"},"expireAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expireat"}},"type":"object","required":["name"],"title":"ApiKeyCreate"},"ApiKeyUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"isActive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isactive"},"expireAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expireat"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lastusedat"}},"type":"object","title":"ApiKeyUpdate"},"Body_batch_write_files_v1_viz__viz_id__branches__branch__files_post":{"properties":{"files":{"additionalProperties":{"type":"string"},"type":"object","title":"Files"},"message":{"type":"string","title":"Message","default":"Batch update"}},"type":"object","required":["files"],"title":"Body_batch_write_files_v1_viz__viz_id__branches__branch__files_post"},"Body_create_branch_v1_viz__viz_id__branches_post":{"properties":{"name":{"type":"string","title":"Name","default":"draft"}},"type":"object","title":"Body_create_branch_v1_viz__viz_id__branches_post"},"Body_get_public_viz_sql_query_status_batch_v1_public_viz__account_slug___viz_slug__sql_status_batch_post":{"properties":{"queryIds":{"items":{"type":"string"},"type":"array","title":"Queryids"}},"type":"object","required":["queryIds"],"title":"Body_get_public_viz_sql_query_status_batch_v1_public_viz__account_slug___viz_slug__sql_status_batch_post"},"Body_run_viz_query_batch_v1_public_viz__account_slug___slug__batch_post":{"properties":{"queries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Queries"}},"type":"object","required":["queries"],"title":"Body_run_viz_query_batch_v1_public_viz__account_slug___slug__batch_post"},"Body_run_viz_query_v1_public_viz__account_slug___slug__query_post":{"properties":{"sql":{"type":"string","title":"Sql"},"args":{"additionalProperties":{"type":"string"},"type":"object","title":"Args","default":{}}},"type":"object","required":["sql"],"title":"Body_run_viz_query_v1_public_viz__account_slug___slug__query_post"},"Body_squash_branch_v1_viz__viz_id__branches__branch__squash_post":{"properties":{"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"Body_squash_branch_v1_viz__viz_id__branches__branch__squash_post"},"Body_transfer_folder_ownership_v1_folders__folder_id__owner_patch":{"properties":{"ownedBy":{"type":"string","title":"Ownedby"}},"type":"object","required":["ownedBy"],"title":"Body_transfer_folder_ownership_v1_folders__folder_id__owner_patch"},"Body_transfer_ownership_v1_viz__viz_id__owner_patch":{"properties":{"newOwnedBy":{"type":"string","title":"Newownedby"}},"type":"object","required":["newOwnedBy"],"title":"Body_transfer_ownership_v1_viz__viz_id__owner_patch"},"Body_write_file_v1_viz__viz_id__branches__branch__files__file_path__put":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"Body_write_file_v1_viz__viz_id__branches__branch__files__file_path__put"},"BuildComplete":{"properties":{"buildId":{"type":"integer","title":"Buildid"},"buildJobId":{"type":"string","title":"Buildjobid"},"vizId":{"type":"integer","title":"Vizid"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"},"success":{"type":"boolean","title":"Success"},"bundleSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bundlesize"},"buildTime":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Buildtime"},"cacheHit":{"type":"boolean","title":"Cachehit","default":false},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["buildId","buildJobId","vizId","success"],"title":"BuildComplete","description":"Build completion result from build service/lambda"},"BuildCreate":{"properties":{"vizId":{"type":"integer","title":"Vizid"},"vizName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vizname"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"},"accountId":{"type":"string","title":"Accountid","default":""},"userId":{"type":"string","title":"Userid","default":""}},"type":"object","required":["vizId"],"title":"BuildCreate","description":"Create build request"},"BundleStateStatus":{"type":"string","enum":["BUILDING","OK","FAILED","STALE","EMPTY_DATA"],"title":"BundleStateStatus","description":"Iframe bundle health, as reported by share-stackblitz via the\nparent SPA. NULL on the viz row means legacy / pre-V32 / no signal —\ncallers must treat the absence as UNKNOWN and decide policy.\n\nEMPTY_DATA (P3-09/P3-10) — the bundle compiled AND the React tree ran\nsuccessfully, but the chart's useSQL call returned 0 rows so the user\nsees \"No data available\". This is a third \"not ready\" category alongside\ncompile FAILED and runtime [runtime]-prefixed FAILED. Both the AI's\ncomplete_creation gate and the publish endpoint refuse on this status."},"BundleStateUpdate":{"properties":{"status":{"$ref":"#/components/schemas/BundleStateStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File"},"line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line"},"col":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Col"},"fileHashes":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Filehashes"},"lastUpdatedAt":{"type":"integer","title":"Lastupdatedat"},"tabSessionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tabsessionid"}},"type":"object","required":["status","lastUpdatedAt"],"title":"BundleStateUpdate","description":"Input model for ``POST /v1/viz/{viz_id}/bundle-state``.\n\nMirrors ``BundleState`` but every field is optional except status +\nlast_updated_at so the iframe can post partial payloads (e.g. OK\nwithout error fields, FAILED without file_hashes)."},"ChatDebugEvent":{"properties":{"timestamp":{"type":"string","title":"Timestamp","description":"ISO-8601 timestamp of the event"},"event":{"type":"string","title":"Event","description":"Event name, e.g. ai.completion"},"level":{"type":"string","title":"Level","description":"Log level: info, warning, error, debug","default":"info"},"fields":{"additionalProperties":true,"type":"object","title":"Fields","description":"All remaining structured fields from the log record"}},"type":"object","required":["timestamp","event"],"title":"ChatDebugEvent","description":"A single structured event emitted during an AI chat invocation."},"ChatDebugEventsResponse":{"properties":{"chatId":{"type":"string","title":"Chatid"},"events":{"items":{"$ref":"#/components/schemas/ChatDebugEvent"},"type":"array","title":"Events"},"count":{"type":"integer","title":"Count"},"source":{"type":"string","enum":["cloudwatch_logs","s3_recorder"],"title":"Source","description":"Where the events were loaded from"},"truncated":{"type":"boolean","title":"Truncated","description":"True if results were capped at the requested limit","default":false},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning","description":"Optional warning (e.g. partial results, CW unreachable)"}},"type":"object","required":["chatId","events","count","source"],"title":"ChatDebugEventsResponse","description":"Response payload for the chat debug events endpoint."},"DashboardSubscriptionCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Human-readable name for the subscription"},"vizId":{"type":"integer","title":"Vizid","description":"Viz this subscription is attached to"},"accountId":{"type":"string","title":"Accountid","description":"Owning account id","default":""},"cron":{"type":"string","title":"Cron","description":"Cron expression (5 or 6 fields)"},"format":{"$ref":"#/components/schemas/SubscriptionFormat","description":"Delivered file format"},"channel":{"$ref":"#/components/schemas/SubscriptionChannel","description":"Delivery channel"},"recipients":{"items":{"type":"string"},"type":"array","title":"Recipients","description":"Emails (channel=email) or webhook URLs (channel=slack)"},"filterState":{"additionalProperties":true,"type":"object","title":"Filterstate","description":"Opaque React store snapshot applied before rendering"},"subjectTemplate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subjecttemplate","description":"Optional subject / message template. Defaults to '{{viz_name}} — {{date}}'."},"isActive":{"type":"boolean","title":"Isactive","description":"Whether this subscription should fire on its schedule","default":true}},"type":"object","required":["name","vizId","cron","format","channel"],"title":"DashboardSubscriptionCreate","description":"Payload for creating a dashboard subscription."},"DashboardSubscriptionUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"cron":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cron"},"format":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionFormat"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionChannel"},{"type":"null"}]},"recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recipients"},"filterState":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filterstate"},"subjectTemplate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subjecttemplate"},"isActive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isactive"}},"type":"object","title":"DashboardSubscriptionUpdate","description":"Partial update payload for a dashboard subscription."},"FolderCreate":{"properties":{"account_id":{"type":"string","title":"Account Id","description":"Account ID to which the folder belongs","default":""},"owned_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owned By","description":"User ID of the owner of this folder"},"name":{"type":"string","title":"Name","description":"Name of the folder"},"description":{"type":"string","title":"Description","description":"Description of the folder","default":""},"parentId":{"type":"integer","title":"Parentid","description":"Parent folder ID (-1 for root)"}},"type":"object","required":["name","parentId"],"title":"FolderCreate"},"FolderUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the folder"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the folder"},"parentId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parentid","description":"Parent folder ID (-1 for root)"}},"type":"object","title":"FolderUpdate"},"GroupCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Name of the group"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description","description":"Optional descriptive text for the group"},"account_id":{"type":"string","title":"Account Id","description":"Account ID to which the group belongs","default":""}},"type":"object","required":["name"],"title":"GroupCreate"},"GroupUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"},"userIdsToAdd":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Useridstoadd","description":"List of user IDs to add to the group"},"userIdsToRemove":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Useridstoremove","description":"List of user IDs to remove from the group"}},"type":"object","title":"GroupUpdate","description":"Group update model"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Primary identifier or name for the image"},"base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base64","description":"Base64 encoded image data"},"object_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Path","description":"Path to the image object in storage"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"List of tags associated with the image"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description","description":"Optional descriptive text for the image"},"account_id":{"type":"string","title":"Account Id","description":"Account ID to which the image belongs","default":""}},"type":"object","required":["name"],"title":"ImageCreate","description":"Image creation model"},"ImageUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base64","description":"Base64 encoded image data"},"object_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Path","description":"Path to the image object in storage"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"List of tags associated with the image"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"}},"type":"object","title":"ImageUpdate","description":"Image update model"},"Lang":{"type":"string","enum":["en","fr","es"],"title":"Lang"},"Metadata":{"properties":{"fileName":{"type":"string","title":"Filename"},"fileType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filetype"},"extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extension"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contenttype"},"contentLength":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contentlength"},"stepMode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stepmode"}},"type":"object","required":["fileName"],"title":"Metadata"},"MetricsRollupModel":{"properties":{"rollupKey":{"type":"string","title":"Rollupkey"},"category":{"type":"string","enum":["funnel","quality","cost","reliability"],"title":"Category"},"window":{"type":"string","enum":["1h","24h","7d","30d"],"title":"Window"},"bucketStartMs":{"type":"integer","title":"Bucketstartms"},"computedAtMs":{"type":"integer","title":"Computedatms"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"type":"object","required":["rollupKey","category","window","bucketStartMs","computedAtMs"],"title":"MetricsRollupModel","description":"One pre-computed rollup row from metrics_rollups DDB.\n\n``payload`` is the raw dict produced by aggregate_*_metrics() in\ncore/metrics/aggregator.py — its keys vary by category."},"MetricsRollupsResponse":{"properties":{"rollups":{"items":{"$ref":"#/components/schemas/MetricsRollupModel"},"type":"array","title":"Rollups"},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"}},"type":"object","required":["rollups"],"title":"MetricsRollupsResponse"},"PermissionType":{"type":"string","enum":["view","edit","delete","create"],"title":"PermissionType"},"PrincipalType":{"type":"string","enum":["user","group"],"title":"PrincipalType"},"RefreshCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Name for the refresh schedule"},"projectId":{"type":"integer","title":"Projectid","description":"DBT project this refresh schedule belongs to"},"cron":{"type":"string","title":"Cron","description":"Cron expression for refresh schedule"},"isActive":{"type":"boolean","title":"Isactive","description":"Whether the refresh is active","default":true},"account_id":{"type":"string","title":"Account Id","description":"Account ID to which the refresh belongs","default":""},"nextRun":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Nextrun","description":"Pre-computed next run timestamp (set by service layer)"}},"type":"object","required":["name","projectId","cron"],"title":"RefreshCreate"},"RefreshUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"projectId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Projectid","description":"DBT project this refresh schedule belongs to"},"cron":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cron","description":"Cron expression for refresh schedule"},"isActive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isactive","description":"Whether the refresh is active"},"nextRun":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Nextrun","description":"Pre-computed next run (set by service layer)"}},"type":"object","title":"RefreshUpdate"},"ResourceType":{"type":"string","enum":["dataset","viz","folder","refresh","task"],"title":"ResourceType"},"SeedCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Name of the seed template"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Description of what this seed generates"},"chart_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chart Type","description":"Type of chart: 'bar', 'line', 'gauge', 'scatter', 'pie', 'area', etc."},"category":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Category","description":"Category: 'kpi', 'comparison', 'trend', 'distribution', etc."},"filePath":{"type":"string","maxLength":500,"title":"Filepath","description":"Relative file path (e.g., 'App.tsx', 'query.sql', 'shared/ThemeToggle.tsx')"},"codeTemplate":{"type":"string","title":"Codetemplate","description":"Code template content with optional Jinja2 variables"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Tags for filtering/search"},"requiresMeasures":{"type":"boolean","title":"Requiresmeasures","description":"Requires at least one measure","default":true},"requiresDimensions":{"type":"boolean","title":"Requiresdimensions","description":"Requires at least one dimension","default":false},"requiresDates":{"type":"boolean","title":"Requiresdates","description":"Requires at least one date column","default":false},"minMeasures":{"type":"integer","minimum":0.0,"title":"Minmeasures","description":"Minimum number of measures required","default":1},"minDimensions":{"type":"integer","minimum":0.0,"title":"Mindimensions","description":"Minimum number of dimensions required","default":0},"minCharts":{"type":"integer","minimum":0.0,"title":"Mincharts","description":"Minimum number of charts (for dashboard seeds)","default":0},"requiresMultipleMeasures":{"type":"boolean","title":"Requiresmultiplemeasures","description":"Requires multiple measures across different charts","default":false},"layout":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Layout","description":"Dashboard layout configuration (for dashboard seeds)"},"dashboardConfig":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dashboardconfig","description":"Dashboard structure config: navigation type/position, header/footer, page tree with charts"},"componentConfig":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Componentconfig","description":"Component toggles: drawer, theme_toggle, filters, parameters, export, etc."},"layoutConfig":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Layoutconfig","description":"Layout settings: flex direction, spacing, alignment, responsive breakpoints"},"configurableFeatures":{"items":{"type":"string"},"type":"array","title":"Configurablefeatures","description":"List of configurable features: ['drawer', 'theme_toggle', 'filters', 'parameters', 'export', 'refresh']"},"supportsFilters":{"type":"boolean","title":"Supportsfilters","description":"Supports dimension-based filters","default":true},"supportsParameters":{"type":"boolean","title":"Supportsparameters","description":"Supports dynamic parameters","default":true},"supportsDarkMode":{"type":"boolean","title":"Supportsdarkmode","description":"Supports dark mode theming","default":true},"previewImageUrl":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Previewimageurl","description":"URL to preview image"},"icon":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Icon","description":"Icon identifier or emoji"},"isUtilityComponent":{"type":"boolean","title":"Isutilitycomponent","description":"Whether this is a reusable utility component (not a standalone seed)","default":false},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions","description":"Markdown instructions: usage patterns, gotchas, integration notes."},"keyImports":{"items":{"type":"string"},"type":"array","title":"Keyimports","description":"Critical import lines the consumer needs (other seeds, not standard node_modules)."},"accountId":{"type":"string","title":"Accountid","description":"Account ID (defaults to current user's account)","default":""},"userId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Userid","description":"User ID who created the seed"}},"type":"object","required":["name","filePath","codeTemplate"],"title":"SeedCreate","description":"Seed creation model"},"SeedMatchRequest":{"properties":{"measureCount":{"type":"integer","minimum":0.0,"title":"Measurecount","description":"Number of measures available"},"dimensionCount":{"type":"integer","minimum":0.0,"title":"Dimensioncount","description":"Number of dimensions available"},"dateCount":{"type":"integer","minimum":0.0,"title":"Datecount","description":"Number of date columns available"},"preferredChartTypes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Preferredcharttypes","description":"Preferred chart types"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Filter by tags"},"chartTypeFilter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Charttypefilter","description":"Filter by seed type: 'chart', 'dashboard', or 'component'"}},"type":"object","required":["measureCount","dimensionCount","dateCount"],"title":"SeedMatchRequest","description":"Request model for matching seeds to dataset structure"},"SeedUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"chartType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Charttype"},"category":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Category"},"filePath":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Filepath"},"codeTemplate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codetemplate"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"requiresMeasures":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requiresmeasures"},"requiresDimensions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requiresdimensions"},"requiresDates":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requiresdates"},"minMeasures":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Minmeasures"},"minDimensions":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Mindimensions"},"minCharts":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Mincharts"},"requiresMultipleMeasures":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requiresmultiplemeasures"},"layout":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Layout"},"dashboardConfig":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dashboardconfig"},"componentConfig":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Componentconfig"},"layoutConfig":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Layoutconfig"},"configurableFeatures":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Configurablefeatures"},"supportsFilters":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supportsfilters"},"supportsParameters":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supportsparameters"},"supportsDarkMode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supportsdarkmode"},"previewImageUrl":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Previewimageurl"},"icon":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Icon"},"isUtilityComponent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isutilitycomponent"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"keyImports":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keyimports"}},"type":"object","title":"SeedUpdate","description":"Seed update model - all fields optional"},"SubscriptionChannel":{"type":"string","enum":["email","slack"],"title":"SubscriptionChannel","description":"Delivery channel for the subscription."},"SubscriptionFormat":{"type":"string","enum":["png","pdf"],"title":"SubscriptionFormat","description":"Output format for the rendered dashboard delivered to recipients."},"TaskCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Name for the task"},"vizId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vizid"},"cron":{"type":"string","title":"Cron","description":"Cron expression for schedule"},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Additional config for the task"},"account_id":{"type":"string","title":"Account Id","description":"Account ID to which the task belongs","default":""}},"type":"object","required":["name","cron"],"title":"TaskCreate"},"TaskUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"vizId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vizid"},"cron":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cron","description":"Cron expression for schedule"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"Additional config for the task"}},"type":"object","title":"TaskUpdate"},"ThemeColors":{"properties":{"primary":{"type":"string","title":"Primary","description":"Primary color","default":"#9155FD"},"secondary":{"type":"string","title":"Secondary","description":"Secondary color","default":"#8A8D93"},"accent":{"type":"string","title":"Accent","description":"Accent color","default":"#64B5F6"},"background":{"type":"string","title":"Background","description":"Background color","default":"#F4F5FA"}},"type":"object","title":"ThemeColors","description":"Theme colors for light and dark modes"},"UsageType":{"type":"string","enum":["AI_PROMPT","AI_COMPLETION","CPU","CPU_TIME","NETWORK","STORAGE","EMAIL","CUSTOM"],"title":"UsageType"},"UserCreate":{"properties":{"lang":{"anyOf":[{"$ref":"#/components/schemas/Lang"},{"type":"null"}],"description":"User language preference","default":"en"},"locale":{"type":"string","maxLength":10,"title":"Locale","description":"User locale for i18n (e.g., 'en', 'es', 'fr')","default":"en"},"role":{"anyOf":[{"$ref":"#/components/schemas/UserRole"},{"type":"null"}],"description":"User role in account","default":"viewer"},"lastLoginAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lastloginat","description":"Last login timestamp"},"allowedToolPermissions":{"items":{"type":"string"},"type":"array","title":"Allowedtoolpermissions","description":"List of tool types the user has globally allowed (e.g., 'run_sql', 'fetch')"},"maxConsecutiveToolCalls":{"type":"integer","title":"Maxconsecutivetoolcalls","description":"Maximum number of consecutive tool calls without user intervention","default":20},"maxConsecutiveAiMessages":{"type":"integer","title":"Maxconsecutiveaimessages","description":"Maximum number of consecutive AI messages without user response","default":20},"maxTokensPerConversation":{"type":"integer","title":"Maxtokensperconversation","description":"Maximum total tokens (input + output) allowed in a single conversation","default":200000},"maxConversationDurationMinutes":{"type":"integer","title":"Maxconversationdurationminutes","description":"Maximum conversation duration in minutes before requiring user confirmation","default":30},"aiProviderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aiproviderid","description":"User's preferred default AI provider ID"},"agentName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agentname","description":"Custom name for the AI agent (overrides account-level default)"},"agentSoul":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Agentsoul","description":"Custom behavioral persona for the AI agent, markdown (overrides account-level default)"},"email":{"type":"string","format":"email","title":"Email","description":"User email address (primary key)"},"userId":{"type":"string","title":"Userid","description":"User ID (auto-generated)"},"passwordHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Passwordhash","description":"Hashed password"},"emailVerified":{"type":"boolean","title":"Emailverified","description":"Whether email is verified","default":false},"firstName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Firstname","description":"First name"},"lastName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Lastname","description":"Last name"},"verificationCode":{"anyOf":[{"type":"string","maxLength":6},{"type":"null"}],"title":"Verificationcode","description":"Email verification code"},"verificationCodeExpiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verificationcodeexpiresat","description":"Verification code expiration time"},"passwordResetToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Passwordresettoken","description":"Password reset token"},"passwordResetTokenExpiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Passwordresettokenexpiresat","description":"Password reset token expiration time"},"password":{"anyOf":[{"type":"string","minLength":8},{"type":"null"}],"title":"Password","description":"User password"},"accountId":{"type":"string","title":"Accountid","description":"Account ID","default":""},"sendInvitationEmail":{"type":"boolean","title":"Sendinvitationemail","description":"Whether to send invitation email","default":false}},"type":"object","required":["email"],"title":"UserCreate","description":"User creation model"},"UserRole":{"type":"string","enum":["admin","creator","viewer"],"title":"UserRole"},"UserUpdate":{"properties":{"lang":{"anyOf":[{"$ref":"#/components/schemas/Lang"},{"type":"null"}]},"locale":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Locale","description":"User locale for i18n"},"role":{"anyOf":[{"$ref":"#/components/schemas/UserRole"},{"type":"null"}]},"groupIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Groupids","description":"List of group IDs the user belongs to"},"allowedToolPermissions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowedtoolpermissions"},"maxConsecutiveToolCalls":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxconsecutivetoolcalls"},"maxConsecutiveAiMessages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxconsecutiveaimessages"},"maxTokensPerConversation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxtokensperconversation"},"maxConversationDurationMinutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxconversationdurationminutes"},"aiProviderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aiproviderid"},"agentName":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Agentname"},"agentSoul":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Agentsoul"},"emailVerified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Emailverified"},"firstName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Lastname"},"emailVerificationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emailverificationcode","description":"Email verification code for email changes"}},"type":"object","title":"UserUpdate","description":"Client-facing user update model — the PUT /v1/users/{id} request body.\n\nDeliberately does NOT inherit UserAuthUpdate: a client request must never be\nable to set password_hash, verification_code(_expires_at) or\npassword_reset_token(_expires_at). Those are server-managed secrets, written\nonly by internal flows via UserAuthUpdate (see helpers.py). Only the\ngenuinely client-editable auth fields are re-declared here; any secret keys\na client puts in the body are dropped by Pydantic as unknown fields."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ViewMode":{"type":"string","enum":["public","private","protected"],"title":"ViewMode"},"VizCreate":{"properties":{"accountId":{"type":"string","title":"Accountid","default":""},"ownedBy":{"type":"string","title":"Ownedby","default":""},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"slug":{"type":"string","maxLength":100,"pattern":"^[a-z0-9\\-_]*$","title":"Slug","default":""},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"viewMode":{"$ref":"#/components/schemas/ViewMode","default":"private"},"datasetIds":{"items":{"type":"integer"},"type":"array","title":"Datasetids"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"folderId":{"type":"integer","title":"Folderid","default":0},"seedId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seedid"},"dashboardConfig":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dashboardconfig"},"measureConfigs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Measureconfigs"},"dimensionConfigs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Dimensionconfigs"},"filterConfigs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Filterconfigs"},"dateConfigs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Dateconfigs"},"componentConfig":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Componentconfig"},"locales":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Locales"},"chatId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chatid"},"ttl":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ttl"}},"type":"object","required":["name"],"title":"VizCreate","description":"Input model for creating a viz."},"VizUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"viewMode":{"anyOf":[{"$ref":"#/components/schemas/ViewMode"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"datasetIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Datasetids"},"folderId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Folderid"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","title":"VizUpdate","description":"Input model for updating a viz."}}},"tags":[{"name":"viz","description":"Public visualization endpoints for viewing and interacting with published charts and dashboards"},{"name":"seeds","description":"Public template seeds for creating new visualizations"}]}