@vertracloud/api-types 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/payloads/v1/api-error.d.ts +24 -0
- package/payloads/v1/api-error.js +12 -0
- package/payloads/v1/api-error.js.map +1 -1
- package/payloads/v1/api-error.mjs +12 -0
- package/payloads/v1/api-key.d.ts +3 -0
- package/payloads/v1/api-key.js +6 -2
- package/payloads/v1/api-key.js.map +1 -1
- package/payloads/v1/api-key.mjs +6 -2
- package/payloads/v1/application.d.ts +163 -2
- package/payloads/v1/application.js +34 -0
- package/payloads/v1/application.js.map +1 -1
- package/payloads/v1/application.mjs +30 -0
- package/payloads/v1/index.d.ts +1 -1
- package/payloads/v1/index.js +52 -2
- package/payloads/v1/index.js.map +1 -1
- package/payloads/v1/index.mjs +48 -2
- package/rest/v1/application.d.ts +69 -4
- package/rest/v1/application.js.map +1 -1
- package/rest/v1/index.d.ts +1 -1
- package/v1.d.ts +2 -2
- package/v1.js +52 -2
- package/v1.js.map +1 -1
- package/v1.mjs +48 -2
package/payloads/v1/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts","activity.ts","api-key.ts","workspace.ts","api-error.ts","application.ts","billing.ts","database.ts","database-data.ts","notification.ts","oauth.ts","orders.ts","snapshot.ts","status.ts","user.ts"],"sourcesContent":["export * from \"./activity\";\nexport * from \"./api-key\";\nexport * from \"./api-error\";\nexport * from \"./application\";\nexport * from \"./billing\";\nexport * from \"./database\";\nexport * from \"./database-data\";\nexport * from \"./notification\";\nexport * from \"./oauth\";\nexport * from \"./orders\";\nexport * from \"./redeem\";\nexport * from \"./snapshot\";\nexport * from \"./status\";\nexport * from \"./user\";\nexport * from \"./workspace\";\n","import type { ISODateString, SnowFlake } from \"../../v1\";\nimport type { LocalizedContent } from \"./notification\";\n\n/** Dashboard session only (not reachable with an API key). */\nexport type ActivityStatus = \"success\" | \"warning\" | \"error\" | \"info\";\nexport const ActivityStatus = {\n\tSuccess: \"success\",\n\tWarning: \"warning\",\n\tError: \"error\",\n\tInfo: \"info\",\n} as const;\n\n/** Dashboard session only (not reachable with an API key). */\nexport type ActivityTargetType = \"app\" | \"database\" | \"workspace\" | \"audit\";\nexport const ActivityTargetType = {\n\tApp: \"app\",\n\tDatabase: \"database\",\n\tWorkspace: \"workspace\",\n\tAudit: \"audit\",\n} as const;\n\n/** Dashboard session only (not reachable with an API key). */\nexport type ActivityOrigin = \"user\" | \"agent\" | \"api_key\" | \"system\" | \"admin\";\nexport const ActivityOrigin = {\n\tUser: \"user\",\n\tAgent: \"agent\",\n\tApiKey: \"api_key\",\n\tSystem: \"system\",\n\tAdmin: \"admin\",\n} as const;\n\n/** Dashboard session only (not reachable with an API key). */\nexport interface APIActivity {\n\tid: SnowFlake;\n\tstatus: ActivityStatus;\n\ttarget_id: string;\n\ttarget_type: ActivityTargetType;\n\tauthor_id: SnowFlake | null;\n\t/** Workspace the resource belonged to; `null` outside a workspace. */\n\tworkspace_id: SnowFlake | null;\n\t/** Who generated the activity; `null` when `origin` has no human author (`system`). */\n\tauthor: { id: SnowFlake; display_name: string } | null;\n\torigin: ActivityOrigin;\n\ttitle: LocalizedContent;\n\tmessage: LocalizedContent;\n\ttimestamp: ISODateString;\n}\n","import type { ISODateString } from \"../../common/v1\";\n\n/**\n * API key scope, in the form `<resource>:<action>`. Presets: `read` = every `*:read`;\n * `write` = `read` + every `*:write`; `full` = all of them, including the ones without a\n * `read`/`write` suffix (delete, envs, files, credentials).\n * @see https://docs.vertracloud.app/api-reference/introduction#scopes\n */\nexport type APIApiKeyScope =\n\t| \"apps:read\"\n\t| \"apps:write\"\n\t| \"apps:delete\"\n\t| \"apps:envs\"\n\t| \"apps:files\"\n\t| \"databases:read\"\n\t| \"databases:write\"\n\t| \"databases:delete\"\n\t| \"databases:credentials\"\n\t| \"snapshots:read\"\n\t| \"snapshots:write\"\n\t| \"account:read\"\n\t| \"account:write\"\n\t| \"workspaces:read\"\n\t| \"workspaces:write\"\n\t| \"workspaces:delete\"\n\t| \"workspaces:invites\"\n\t| \"billing:read\"\n\t| \"billing:write\"\n\t| \"redeem:write\";\n\nexport const APIApiKeyScope = {\n\tAPPS_READ: \"apps:read\",\n\tAPPS_WRITE: \"apps:write\",\n\tAPPS_DELETE: \"apps:delete\",\n\tAPPS_ENVS: \"apps:envs\",\n\tAPPS_FILES: \"apps:files\",\n\tDATABASES_READ: \"databases:read\",\n\tDATABASES_WRITE: \"databases:write\",\n\tDATABASES_DELETE: \"databases:delete\",\n\tDATABASES_CREDENTIALS: \"databases:credentials\",\n\tSNAPSHOTS_READ: \"snapshots:read\",\n\tSNAPSHOTS_WRITE: \"snapshots:write\",\n\tACCOUNT_READ: \"account:read\",\n\tACCOUNT_WRITE: \"account:write\",\n\tWORKSPACES_READ: \"workspaces:read\",\n\tWORKSPACES_WRITE: \"workspaces:write\",\n\tWORKSPACES_DELETE: \"workspaces:delete\",\n\tWORKSPACES_INVITES: \"workspaces:invites\",\n\tBILLING_READ: \"billing:read\",\n\tBILLING_WRITE: \"billing:write\",\n\tREDEEM_WRITE: \"redeem:write\",\n} as const satisfies Record<string, APIApiKeyScope>;\n\nexport type APIApiKeyPreset = \"read\" | \"write\" | \"full\";\nexport const APIApiKeyPreset = { Read: \"read\", Write: \"write\", Full: \"full\" } as const;\n\nexport type APIApiKeyRouteMethod = \"GET\" | \"POST\" | \"PUT\" | \"PATCH\" | \"DELETE\";\n\nexport interface APIApiKeyRoute {\n\tmethod: APIApiKeyRouteMethod;\n\t/** Full route pattern with `:param` placeholders (`/v1/apps/:id/files`). Matched exactly, no regex. */\n\tpath: string;\n}\n\nexport interface APIApiKeyScopeEntry {\n\t/** Display group the scope belongs to. */\n\tgroup: \"apps\" | \"databases\" | \"snapshots\" | \"account\" | \"workspaces\" | \"billing\";\n\troutes: APIApiKeyRoute[];\n}\n\n/**\n * Closed catalog of the routes an API key can reach, per scope. A key without the route's scope\n * gets 403 `API_KEY_SCOPE_DENIED`; a route that is not listed here always returns 403 to an API key.\n *\n * Intentionally left out (dashboard session only): key management, creating workspace invites\n * (an invite would outlive the key's revocation), revoking sessions, plan downgrade, and the\n * database **Data** tab (`/v1/databases/:id/data/*`).\n */\nexport const API_KEY_SCOPES: Record<APIApiKeyScope, APIApiKeyScopeEntry> = {\n\t\"apps:read\": {\n\t\tgroup: \"apps\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/apps/runtimes\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/status\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/status\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/realtime\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/metrics\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/logs\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/download\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/deploys\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/deploys/webhook\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/network/custom\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/network/dns\" },\n\t\t],\n\t},\n\t\"apps:write\": {\n\t\tgroup: \"apps\",\n\t\troutes: [\n\t\t\t{ method: \"POST\", path: \"/v1/apps\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/start\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/stop\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/restart\" },\n\t\t\t{ method: \"PATCH\", path: \"/v1/apps/:id/config\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/deploys/webhook\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/apps/:id/deploys/webhook\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/network/custom\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/apps/:id/network/custom\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/network/purge-cache\" },\n\t\t\t{ method: \"PATCH\", path: \"/v1/apps/:id/network/subdomain\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/network/publish\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/apps/:id/network/publish\" },\n\t\t],\n\t},\n\t\"apps:delete\": { group: \"apps\", routes: [{ method: \"DELETE\", path: \"/v1/apps/:id\" }] },\n\t\"apps:envs\": {\n\t\tgroup: \"apps\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/envs\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/envs\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/apps/:id/envs/:envId\" },\n\t\t],\n\t},\n\t\"apps:files\": {\n\t\tgroup: \"apps\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/files\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/files/tree\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/files/content\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/apps/:id/files\" },\n\t\t\t{ method: \"PATCH\", path: \"/v1/apps/:id/files\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/apps/:id/files\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/files/upload\" },\n\t\t],\n\t},\n\t\"databases:read\": {\n\t\tgroup: \"databases\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/databases/status\" },\n\t\t\t{ method: \"GET\", path: \"/v1/databases/:id\" },\n\t\t\t{ method: \"GET\", path: \"/v1/databases/:id/status\" },\n\t\t\t{ method: \"GET\", path: \"/v1/databases/:id/metrics\" },\n\t\t],\n\t},\n\t\"databases:write\": {\n\t\tgroup: \"databases\",\n\t\troutes: [\n\t\t\t{ method: \"POST\", path: \"/v1/databases\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/databases/:id\" },\n\t\t\t{ method: \"POST\", path: \"/v1/databases/:id/start\" },\n\t\t\t{ method: \"POST\", path: \"/v1/databases/:id/stop\" },\n\t\t\t{ method: \"POST\", path: \"/v1/databases/:id/reset\" },\n\t\t],\n\t},\n\t\"databases:delete\": { group: \"databases\", routes: [{ method: \"DELETE\", path: \"/v1/databases/:id\" }] },\n\t\"databases:credentials\": {\n\t\tgroup: \"databases\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/databases/:id/credentials/certificate\" },\n\t\t\t{ method: \"POST\", path: \"/v1/databases/:id/credentials/certificate/reset\" },\n\t\t\t{ method: \"POST\", path: \"/v1/databases/:id/credentials/reset\" },\n\t\t],\n\t},\n\t\"snapshots:read\": {\n\t\tgroup: \"snapshots\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/users/snapshots\" },\n\t\t\t{ method: \"GET\", path: \"/v1/users/:id/snapshots\" },\n\t\t\t{ method: \"GET\", path: \"/v1/users/:id/snapshots/:snapshot_id/download\" },\n\t\t],\n\t},\n\t\"snapshots:write\": {\n\t\tgroup: \"snapshots\",\n\t\troutes: [\n\t\t\t{ method: \"POST\", path: \"/v1/users/:id/snapshots\" },\n\t\t\t{ method: \"POST\", path: \"/v1/users/:id/snapshots/:snapshot_id/restore\" },\n\t\t],\n\t},\n\t\"account:read\": {\n\t\tgroup: \"account\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/users/me\" },\n\t\t\t{ method: \"GET\", path: \"/v1/users/me/sessions\" },\n\t\t],\n\t},\n\t\"account:write\": {\n\t\tgroup: \"account\",\n\t\troutes: [\n\t\t\t{ method: \"PATCH\", path: \"/v1/users/me\" },\n\t\t\t{ method: \"POST\", path: \"/v1/users/me/folders\" },\n\t\t\t{ method: \"PATCH\", path: \"/v1/users/me/folders/:folder_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/users/me/folders/:folder_id\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/users/me/folders/:folder_id/resources/:resource_type/:resource_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/users/me/folders/:folder_id/resources/:resource_type/:resource_id\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/users/me/favorites/:resource_type/:resource_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/users/me/favorites/:resource_type/:resource_id\" },\n\t\t],\n\t},\n\t\"workspaces:read\": {\n\t\tgroup: \"workspaces\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces\" },\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces/:id\" },\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces/:id/members\" },\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces/:id/roles\" },\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces/:id/action-requests\" },\n\t\t],\n\t},\n\t\"workspaces:write\": {\n\t\tgroup: \"workspaces\",\n\t\troutes: [\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/workspaces/:id\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/workspaces/:id/members/:user_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/members/:user_id\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/:id/roles\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/workspaces/:id/roles/:role_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/roles/:role_id\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/:id/apps/:app_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/apps/:app_id\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/:id/databases/:db_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/databases/:db_id\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/:id/folders\" },\n\t\t\t{ method: \"PATCH\", path: \"/v1/workspaces/:id/folders/:folder_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/folders/:folder_id\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/workspaces/:id/folders/:folder_id/resources/:resource_type/:resource_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/folders/:folder_id/resources/:resource_type/:resource_id\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/workspaces/:id/favorites/:resource_type/:resource_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/favorites/:resource_type/:resource_id\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/:id/action-requests\" },\n\t\t],\n\t},\n\t/**\n\t * Intentionally left out (dashboard session only): creating invites (a leaked key could grant\n\t * access that outlives its revocation), transferring ownership, approving/rejecting action\n\t * requests (approval is a human decision) and exporting activities.\n\t */\n\t/** Delete a workspace (soft delete). Only in the `full` preset, like `apps:delete`. */\n\t\"workspaces:delete\": {\n\t\tgroup: \"workspaces\",\n\t\troutes: [{ method: \"DELETE\", path: \"/v1/workspaces/:id\" }],\n\t},\n\t/** List and revoke workspace invites; view, accept and decline your own invite by token. Only in the `full` preset. */\n\t\"workspaces:invites\": {\n\t\tgroup: \"workspaces\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces/:id/invites\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/invites/:invite_id\" },\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces/invites/:token\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/invites/:token/accept\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/invites/:token/decline\" },\n\t\t],\n\t},\n\t\"billing:read\": {\n\t\tgroup: \"billing\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/orders\" },\n\t\t\t{ method: \"GET\", path: \"/v1/orders/:orderId/status\" },\n\t\t\t{ method: \"GET\", path: \"/v1/users/me/billing\" },\n\t\t],\n\t},\n\t/**\n\t * Creates a plan order and generates the PIX charge; the payment itself is made by a person in their banking app.\n\t * Also saves the billing details (name, address, CPF/CNPJ) an order needs.\n\t */\n\t\"billing:write\": {\n\t\tgroup: \"billing\",\n\t\troutes: [\n\t\t\t{ method: \"POST\", path: \"/v1/orders\" },\n\t\t\t{ method: \"POST\", path: \"/v1/orders/:orderId/initiate/pix\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/users/me/billing\" },\n\t\t],\n\t},\n\t\"redeem:write\": { group: \"billing\", routes: [{ method: \"POST\", path: \"/v1/redeem/:code\" }] },\n};\n\nexport const API_KEY_SCOPE_LIST = Object.keys(API_KEY_SCOPES) as APIApiKeyScope[];\n\n/** Scopes selected by a preset. `full` is the whole catalog. */\nexport function apiKeyPresetScopes(preset: APIApiKeyPreset): APIApiKeyScope[] {\n\tif (preset === \"full\") return API_KEY_SCOPE_LIST;\n\treturn API_KEY_SCOPE_LIST.filter((s) => s.endsWith(\":read\") || (preset === \"write\" && s.endsWith(\":write\")));\n}\n\n/** Maximum keys per account, entries in `allowed_ips`, and key name length. */\nexport const API_KEY_MAX_PER_USER = 10;\nexport const API_KEY_MAX_ALLOWED_IPS = 20;\nexport const API_KEY_NAME_MAX_LENGTH = 40;\n\n/**\n * An API key as listed. The secret is returned only ONCE, in `APIApiKeyCreated`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/api-keys/list\n */\nexport interface APIApiKey {\n\tid: string;\n\tname: string;\n\t/** Public start of the key (`vc_live_a1b2c3d4`; older keys: 8 hex characters). */\n\tprefix: string;\n\t/** Last 4 characters; `null` for keys generated before the `vc_live_` format. */\n\tlast4: string | null;\n\tscopes: APIApiKeyScope[];\n\t/** Allowed IPs/CIDRs. Empty list = any IP. */\n\tallowed_ips: string[];\n\tcreated_at: ISODateString;\n\tlast_used_at: ISODateString | null;\n}\n\nexport interface APIApiKeyCreated extends APIApiKey {\n\t/** The full secret. Shown once; it cannot be recovered. */\n\tapi_key: string;\n}\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\nimport type { APIApplication, APIDatabase } from \"./index\";\n\n/**\n * Granular workspace permission. Display group in `WORKSPACE_PERMISSIONS`.\n * The owner (`owner_id`) has no entry here: owner-only actions (rename/delete the workspace,\n * link/unlink projects, deploy webhook, web publishing) are allowed for the\n * owner only, never through a permission.\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/get\n */\nexport type WorkspacePermission =\n\t| \"apps:read\"\n\t| \"apps:manage\"\n\t| \"apps:lifecycle\"\n\t| \"apps:envs\"\n\t| \"apps:files\"\n\t| \"apps:delete\"\n\t| \"databases:read\"\n\t| \"databases:manage\"\n\t| \"databases:lifecycle\"\n\t| \"databases:credentials\"\n\t| \"databases:data\"\n\t| \"databases:delete\"\n\t| \"snapshots:read\"\n\t| \"snapshots:manage\"\n\t| \"members:read\"\n\t| \"members:manage\"\n\t| \"roles:manage\"\n\t| \"activities:read\";\n\nexport const WorkspacePermission = {\n\tAPPS_READ: \"apps:read\",\n\tAPPS_MANAGE: \"apps:manage\",\n\tAPPS_LIFECYCLE: \"apps:lifecycle\",\n\tAPPS_ENVS: \"apps:envs\",\n\tAPPS_FILES: \"apps:files\",\n\tAPPS_DELETE: \"apps:delete\",\n\tDATABASES_READ: \"databases:read\",\n\tDATABASES_MANAGE: \"databases:manage\",\n\tDATABASES_LIFECYCLE: \"databases:lifecycle\",\n\tDATABASES_CREDENTIALS: \"databases:credentials\",\n\tDATABASES_DATA: \"databases:data\",\n\tDATABASES_DELETE: \"databases:delete\",\n\tSNAPSHOTS_READ: \"snapshots:read\",\n\tSNAPSHOTS_MANAGE: \"snapshots:manage\",\n\tMEMBERS_READ: \"members:read\",\n\tMEMBERS_MANAGE: \"members:manage\",\n\tROLES_MANAGE: \"roles:manage\",\n\tACTIVITIES_READ: \"activities:read\",\n} as const satisfies Record<string, WorkspacePermission>;\n\nexport interface WorkspacePermissionEntry {\n\tgroup: \"apps\" | \"databases\" | \"snapshots\" | \"members\" | \"roles\" | \"activities\";\n}\n\n/**\n * Closed catalog of workspace permissions. A member whose role lacks the permission a route\n * requires gets 403 `WORKSPACE_PERMISSION_DENIED`.\n */\nexport const WORKSPACE_PERMISSIONS: Record<WorkspacePermission, WorkspacePermissionEntry> = {\n\t\"apps:read\": { group: \"apps\" },\n\t\"apps:manage\": { group: \"apps\" },\n\t\"apps:lifecycle\": { group: \"apps\" },\n\t\"apps:envs\": { group: \"apps\" },\n\t\"apps:files\": { group: \"apps\" },\n\t\"apps:delete\": { group: \"apps\" },\n\t\"databases:read\": { group: \"databases\" },\n\t\"databases:manage\": { group: \"databases\" },\n\t\"databases:lifecycle\": { group: \"databases\" },\n\t\"databases:credentials\": { group: \"databases\" },\n\t\"databases:data\": { group: \"databases\" },\n\t\"databases:delete\": { group: \"databases\" },\n\t\"snapshots:read\": { group: \"snapshots\" },\n\t\"snapshots:manage\": { group: \"snapshots\" },\n\t\"members:read\": { group: \"members\" },\n\t\"members:manage\": { group: \"members\" },\n\t\"roles:manage\": { group: \"roles\" },\n\t\"activities:read\": { group: \"activities\" },\n};\n\nexport const WORKSPACE_PERMISSION_LIST = Object.keys(WORKSPACE_PERMISSIONS) as WorkspacePermission[];\n\n/**\n * Seed role, created together with the workspace. It can be renamed and deleted like any other\n * role (it becomes a regular role; `preset` is not restored) and counts toward the plan's role limit.\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/get\n */\nexport type WorkspaceRolePreset = \"admin\" | \"developer\" | \"operator\" | \"viewer\";\nexport const WorkspaceRolePreset = {\n\tAdmin: \"admin\",\n\tDeveloper: \"developer\",\n\tOperator: \"operator\",\n\tViewer: \"viewer\",\n} as const satisfies Record<string, WorkspaceRolePreset>;\n\n/**\n * Permissions a seed role gets when the workspace is created. `admin` does NOT include\n * `snapshots:manage` (restoring/deleting snapshots is destructive); the owner can grant it per role.\n */\nexport function workspacePresetPermissions(preset: WorkspaceRolePreset): WorkspacePermission[] {\n\tswitch (preset) {\n\t\tcase \"admin\":\n\t\t\treturn WORKSPACE_PERMISSION_LIST.filter((p) => p !== \"snapshots:manage\");\n\t\tcase \"developer\":\n\t\t\treturn [\"apps:read\", \"apps:manage\", \"apps:lifecycle\", \"apps:envs\", \"apps:files\", \"databases:read\", \"databases:manage\", \"databases:lifecycle\", \"databases:credentials\", \"databases:data\", \"snapshots:read\", \"members:read\", \"activities:read\"];\n\t\tcase \"operator\":\n\t\t\treturn [\"apps:read\", \"apps:lifecycle\", \"databases:read\", \"databases:lifecycle\", \"snapshots:read\", \"members:read\", \"activities:read\"];\n\t\tcase \"viewer\":\n\t\t\treturn [\"apps:read\", \"databases:read\", \"snapshots:read\", \"members:read\", \"activities:read\"];\n\t}\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/roles/list\n */\nexport interface APIWorkspaceRole {\n\tid: SnowFlake;\n\tworkspace_id: SnowFlake;\n\tname: string;\n\tpermissions: WorkspacePermission[];\n\t/** Seed role it came from; `null` for a manually created role. Informational only. */\n\tpreset: WorkspaceRolePreset | null;\n\t/** Display order. */\n\tposition: number;\n\tmembers_count: number;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/members/list\n */\nexport interface APIWorkspaceMember {\n\tuser_id: SnowFlake;\n\trole_id: SnowFlake;\n\trole_name: string;\n\tjoined_at: ISODateString;\n\t/** When the member's access expires; `null` = never. */\n\texpires_at: ISODateString | null;\n\tuser: {\n\t\tdisplay_name: string;\n\t\temail: string;\n\t};\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/get\n */\nexport interface APIWorkspace {\n\tid: SnowFlake;\n\tname: string;\n\tdescription: string | null;\n\towner_id: SnowFlake;\n\towner: { display_name: string };\n\tmembers_count: number;\n\t/** Soft delete timestamp. `null` = active. */\n\tdeleted_at: ISODateString | null;\n\t/**\n\t * `true` when the OWNER's plan does not include workspaces (it expired or was downgraded):\n\t * reads keep working, every write returns `PLAN_RESTRICTED_FEATURE`. Nobody is removed — the\n\t * owner must upgrade to unfreeze it.\n\t */\n\tfrozen: boolean;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/get\n */\nexport interface APIWorkspaceInfoResponse extends APIWorkspace {\n\tmembers: APIWorkspaceMember[];\n\troles: APIWorkspaceRole[];\n\tapplications: APIApplication[];\n\tdatabases: APIDatabase[];\n\t/** Resolved permissions of the caller. The owner always gets the full list, regardless of role. */\n\tpermissions: WorkspacePermission[];\n\tis_owner: boolean;\n\t/** Owner's plan — it determines which features the workspace has. */\n\towner_plan_id: UserPlan;\n\t/** The caller's saved resource organization (folders, favorites) in this workspace. */\n\tresource_organization: APIWorkspaceResourceOrganization;\n}\n\nexport type WorkspaceResourceType = \"application\" | \"database\";\nexport const WorkspaceResourceType = { Application: \"application\", Database: \"database\" } as const satisfies Record<string, WorkspaceResourceType>;\n\nexport type WorkspaceResourceOrganizationScope = \"personal\" | \"workspace\";\nexport const WorkspaceResourceOrganizationScope = { Personal: \"personal\", Workspace: \"workspace\" } as const satisfies Record<string, WorkspaceResourceOrganizationScope>;\n\nexport type WorkspaceFolderColor = \"neutral\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"blue\" | \"purple\";\nexport const WorkspaceFolderColor = { Neutral: \"neutral\", Red: \"red\", Orange: \"orange\", Yellow: \"yellow\", Green: \"green\", Blue: \"blue\", Purple: \"purple\" } as const satisfies Record<string, WorkspaceFolderColor>;\nexport const WORKSPACE_FOLDER_COLORS = Object.values(WorkspaceFolderColor) as WorkspaceFolderColor[];\n\nexport interface APIWorkspaceResourceRef {\n\tresource_type: WorkspaceResourceType;\n\tresource_id: SnowFlake;\n}\n\nexport interface APIWorkspaceFolderItem extends APIWorkspaceResourceRef {\n\tposition: number;\n}\n\nexport interface APIWorkspaceResourceFolder {\n\tid: SnowFlake;\n\tname: string;\n\tcolor: WorkspaceFolderColor;\n\tposition: number;\n\tresources: APIWorkspaceFolderItem[];\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\nexport interface APIWorkspaceFavorite extends APIWorkspaceResourceRef {\n\tposition: number;\n\tcreated_at: ISODateString;\n}\n\nexport interface APIWorkspaceResourceOrganization {\n\tscope: WorkspaceResourceOrganizationScope;\n\tuser_id: SnowFlake;\n\tworkspace_id: SnowFlake | null;\n\tfolders: APIWorkspaceResourceFolder[];\n\tfavorites: APIWorkspaceFavorite[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/invites/list\n */\nexport type WorkspaceInviteKind = \"email\" | \"link\";\nexport const WorkspaceInviteKind = { Email: \"email\", Link: \"link\" } as const satisfies Record<string, WorkspaceInviteKind>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/invites/list\n */\nexport interface APIWorkspaceInvite {\n\tid: SnowFlake;\n\tworkspace_id: SnowFlake;\n\tkind: WorkspaceInviteKind;\n\t/** Bound e-mail; only for `kind: \"email\"`. */\n\temail: string | null;\n\trole_id: SnowFlake;\n\trole_name: string;\n\tinvited_by: { id: SnowFlake; display_name: string };\n\texpires_at: ISODateString;\n\taccepted_at: ISODateString | null;\n\trevoked_at: ISODateString | null;\n\tuses: number;\n\t/** Only for `kind: \"link\"`; `null` = unlimited uses. */\n\tmax_uses: number | null;\n\t/** Access expiration applied to members who join through this invite; `null` = never. */\n\texpires_in_days: number | null;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/invites/create\n */\nexport interface APIWorkspaceInviteCreated extends APIWorkspaceInvite {\n\t/** Invite URL; only for `kind: \"link\"`, shown once. */\n\turl: string | null;\n}\n\n/**\n * What the invitee sees before accepting (`GET /v1/workspaces/invites/:token`).\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/invites/preview\n */\nexport interface APIWorkspaceInvitePreview {\n\tworkspace: { id: SnowFlake; name: string };\n\tinviter: { display_name: string };\n\trole_name: string;\n\tkind: WorkspaceInviteKind;\n\texpires_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/action-requests/list\n */\nexport type WorkspaceActionRequestAction = \"app_delete\" | \"database_delete\" | \"snapshot_create\" | \"snapshot_restore\";\nexport const WorkspaceActionRequestAction = {\n\tAppDelete: \"app_delete\",\n\tDatabaseDelete: \"database_delete\",\n\tSnapshotCreate: \"snapshot_create\",\n\tSnapshotRestore: \"snapshot_restore\",\n} as const satisfies Record<string, WorkspaceActionRequestAction>;\n\nexport type WorkspaceActionRequestStatus = \"pending\" | \"approved\" | \"rejected\" | \"expired\";\nexport const WorkspaceActionRequestStatus = {\n\tPending: \"pending\",\n\tApproved: \"approved\",\n\tRejected: \"rejected\",\n\tExpired: \"expired\",\n} as const satisfies Record<string, WorkspaceActionRequestStatus>;\n\n/**\n * `params` of an action request, per `action`. Actions without parameters take an empty object;\n * unknown keys are rejected with `WORKSPACE_ACTION_INVALID_PARAMS`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/action-requests/create\n */\nexport interface WorkspaceActionRequestParams {\n\tapp_delete: Record<string, never>;\n\tdatabase_delete: Record<string, never>;\n\tsnapshot_create: Record<string, never>;\n\t/** The snapshot must belong to the request's resource. */\n\tsnapshot_restore: { snapshot_id: SnowFlake };\n}\n\ninterface APIWorkspaceActionRequestBase {\n\tid: SnowFlake;\n\tworkspace_id: SnowFlake;\n\tresource_type: WorkspaceResourceType;\n\tresource_id: SnowFlake;\n\tresource_name: string | null;\n\tstatus: WorkspaceActionRequestStatus;\n\trequested_by: { id: SnowFlake; display_name: string };\n\tdecided_by: { id: SnowFlake; display_name: string } | null;\n\tdecided_at: ISODateString | null;\n\texpires_at: ISODateString;\n\tcreated_at: ISODateString;\n}\n\n/**\n * A request for a destructive/sensitive action made by a member who lacks its permission, to be\n * approved by someone who has it. Expires after 24 h without a decision. Discriminated by `action`,\n * which decides the shape of `params`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/action-requests/list\n */\nexport type APIWorkspaceActionRequest = {\n\t[A in WorkspaceActionRequestAction]: APIWorkspaceActionRequestBase & { action: A; params: WorkspaceActionRequestParams[A] };\n}[WorkspaceActionRequestAction];\n\n/**\n * Workspace error codes. Stable English sentinels returned in `code`; clients are expected to\n * translate them.\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/get\n */\nexport const WORKSPACE_ERROR_CODES = {\n\tWORKSPACE_NOT_FOUND: \"WORKSPACE_NOT_FOUND\",\n\tWORKSPACE_NAME_ALREADY_EXISTS: \"WORKSPACE_NAME_ALREADY_EXISTS\",\n\tWORKSPACE_MEMBER_LIMIT_REACHED: \"WORKSPACE_MEMBER_LIMIT_REACHED\",\n\tWORKSPACE_ROLE_LIMIT_REACHED: \"WORKSPACE_ROLE_LIMIT_REACHED\",\n\tWORKSPACE_ROLE_IN_USE: \"WORKSPACE_ROLE_IN_USE\",\n\tWORKSPACE_ROLE_NOT_FOUND: \"WORKSPACE_ROLE_NOT_FOUND\",\n\tWORKSPACE_ROLE_NAME_ALREADY_EXISTS: \"WORKSPACE_ROLE_NAME_ALREADY_EXISTS\",\n\tWORKSPACE_PERMISSION_DENIED: \"WORKSPACE_PERMISSION_DENIED\",\n\tWORKSPACE_PERMISSION_ESCALATION: \"WORKSPACE_PERMISSION_ESCALATION\",\n\tWORKSPACE_INVITE_NOT_FOUND: \"WORKSPACE_INVITE_NOT_FOUND\",\n\tWORKSPACE_INVITE_EXPIRED: \"WORKSPACE_INVITE_EXPIRED\",\n\tWORKSPACE_INVITE_EMAIL_MISMATCH: \"WORKSPACE_INVITE_EMAIL_MISMATCH\",\n\t/** 400 — the invited account turned off workspace invites by email. */\n\tWORKSPACE_INVITES_DISABLED: \"WORKSPACE_INVITES_DISABLED\",\n\t/** 409 — the account is already the owner or a member of the workspace. */\n\tWORKSPACE_ALREADY_MEMBER: \"WORKSPACE_ALREADY_MEMBER\",\n\tWORKSPACE_OWNER_ONLY: \"WORKSPACE_OWNER_ONLY\",\n\tWORKSPACE_ACTION_REQUEST_NOT_FOUND: \"WORKSPACE_ACTION_REQUEST_NOT_FOUND\",\n\t/** 410 — the request expired before anyone decided on it. */\n\tWORKSPACE_ACTION_REQUEST_EXPIRED: \"WORKSPACE_ACTION_REQUEST_EXPIRED\",\n\t/** 409 — the request was already approved or rejected. */\n\tWORKSPACE_ACTION_REQUEST_ALREADY_DECIDED: \"WORKSPACE_ACTION_REQUEST_ALREADY_DECIDED\",\n\t/** 400 — the requester already has the permission; perform the action directly. */\n\tWORKSPACE_ACTION_NOT_NEEDED: \"WORKSPACE_ACTION_NOT_NEEDED\",\n\t/** 400 — the request `params` failed the action's validation (e.g. a snapshot of another resource). */\n\tWORKSPACE_ACTION_INVALID_PARAMS: \"WORKSPACE_ACTION_INVALID_PARAMS\",\n\t/** 409 — a pending request already exists for the same action on the same resource. */\n\tWORKSPACE_ACTION_REQUEST_PENDING: \"WORKSPACE_ACTION_REQUEST_PENDING\",\n\tWORKSPACE_RESOURCE_FOLDER_NOT_FOUND: \"WORKSPACE_RESOURCE_FOLDER_NOT_FOUND\",\n\tWORKSPACE_RESOURCE_FOLDER_NAME_CONFLICT: \"WORKSPACE_RESOURCE_FOLDER_NAME_CONFLICT\",\n\tWORKSPACE_RESOURCE_NOT_FOUND: \"WORKSPACE_RESOURCE_NOT_FOUND\",\n\tPLAN_RESTRICTED_FEATURE: \"PLAN_RESTRICTED_FEATURE\",\n} as const;\nexport type WorkspaceErrorCode = (typeof WORKSPACE_ERROR_CODES)[keyof typeof WORKSPACE_ERROR_CODES];\n","import { WORKSPACE_ERROR_CODES } from \"./workspace\";\n\n/** Stable error sentinels returned by routes available to API keys. */\nexport const API_ERROR_CODES = {\n\tACCESS_DENIED: \"ACCESS_DENIED\",\n\tAPI_KEY_INVALID: \"API_KEY_INVALID\",\n\t// Key management (`/v1/users/me/api-keys`) — dashboard-session routes.\n\tAPI_KEY_NOT_FOUND: \"API_KEY_NOT_FOUND\",\n\tAPI_KEY_LIMIT_REACHED: \"API_KEY_LIMIT_REACHED\",\n\tAPI_KEY_INVALID_NAME: \"API_KEY_INVALID_NAME\",\n\tAPI_KEY_INVALID_SCOPES: \"API_KEY_INVALID_SCOPES\",\n\tAPI_KEY_INVALID_IPS: \"API_KEY_INVALID_IPS\",\n\tAPI_KEY_IP_DENIED: \"API_KEY_IP_DENIED\",\n\tAPI_KEY_SCOPE_DENIED: \"API_KEY_SCOPE_DENIED\",\n\t/** 403 — the route only accepts a dashboard session; API keys are refused. */\n\tWEBSITE_ONLY: \"WEBSITE_ONLY\",\n\tAUTH_TOKEN_MISSING: \"AUTH_TOKEN_MISSING\",\n\tACCOUNT_BANNED: \"ACCOUNT_BANNED\",\n\tAPP_SHIELD_COOLDOWN: \"APP_SHIELD_COOLDOWN\",\n\tAPP_BANNED: \"APP_BANNED\",\n\tAPP_ALREADY_PUBLISHED: \"APP_ALREADY_PUBLISHED\",\n\tAPP_HAS_NO_SUBDOMAIN: \"APP_HAS_NO_SUBDOMAIN\",\n\tAPP_NOT_FOUND: \"APP_NOT_FOUND\",\n\tAPP_NOT_PUBLISHED: \"APP_NOT_PUBLISHED\",\n\tAPP_ALREADY_IN_WORKSPACE: \"APP_ALREADY_IN_WORKSPACE\",\n\tAPP_NOT_FOUND_IN_WORKSPACE: \"APP_NOT_FOUND_IN_WORKSPACE\",\n\tBUILD_FAILED: \"BUILD_FAILED\",\n\tBUILD_TIMEOUT: \"BUILD_TIMEOUT\",\n\t/** 400 — the order needs complete billing details for the service invoice (name, address and, in Brazil, CPF/CNPJ). Fill them with `PUT /v1/users/me/billing`. */\n\tBILLING_DETAILS_INCOMPLETE: \"BILLING_DETAILS_INCOMPLETE\",\n\t/** 400 — billing details failed validation; the field is in `details.path`. */\n\tBILLING_DETAILS_INVALID: \"BILLING_DETAILS_INVALID\",\n\t/** 402 — the bank refused the card charge. */\n\tCARD_DECLINED: \"CARD_DECLINED\",\n\t/** 400 — the plan can only be paid by PIX. */\n\tCARD_NOT_ALLOWED_FOR_PLAN: \"CARD_NOT_ALLOWED_FOR_PLAN\",\n\tCARD_NOT_FOUND: \"CARD_NOT_FOUND\",\n\tCERTIFICATE_NOT_FOUND: \"CERTIFICATE_NOT_FOUND\",\n\tCLEANUP_LANGUAGE_SAME_AS_CURRENT: \"CLEANUP_LANGUAGE_SAME_AS_CURRENT\",\n\tCONTAINER_ALREADY_RUNNING: \"CONTAINER_ALREADY_RUNNING\",\n\t/** 400 — no active coupon with this code. */\n\tCOUPON_INVALID: \"COUPON_INVALID\",\n\tCOUPON_INACTIVE: \"COUPON_INACTIVE\",\n\tCOUPON_NOT_STARTED: \"COUPON_NOT_STARTED\",\n\tCOUPON_EXPIRED: \"COUPON_EXPIRED\",\n\t/** 400 — the coupon reached its total number of uses. */\n\tCOUPON_EXHAUSTED: \"COUPON_EXHAUSTED\",\n\t/** 400 — the account already used this coupon as many times as allowed. */\n\tCOUPON_USER_LIMIT: \"COUPON_USER_LIMIT\",\n\t/** 400 — the coupon is not available to this account. */\n\tCOUPON_AUDIENCE: \"COUPON_AUDIENCE\",\n\t/** 400 — the coupon does not apply to this plan. */\n\tCOUPON_PLAN: \"COUPON_PLAN\",\n\t/** 400 — the coupon does not apply to this billing period. */\n\tCOUPON_DURATION: \"COUPON_DURATION\",\n\tCOUPON_PAYMENT_METHOD: \"COUPON_PAYMENT_METHOD\",\n\tCUSTOM_DOMAIN_RECORD_NOT_FOUND: \"CUSTOM_DOMAIN_RECORD_NOT_FOUND\",\n\tCUSTOM_DOMAIN_REGISTRATION_FAILED: \"CUSTOM_DOMAIN_REGISTRATION_FAILED\",\n\tDAILY_QUOTA_EXCEEDED: \"DAILY_QUOTA_EXCEEDED\",\n\tDATABASE_NOT_FOUND: \"DATABASE_NOT_FOUND\",\n\tDATABASE_NOT_RUNNING: \"DATABASE_NOT_RUNNING\",\n\tDATABASE_ALREADY_IN_WORKSPACE: \"DATABASE_ALREADY_IN_WORKSPACE\",\n\tDATABASE_NOT_FOUND_IN_WORKSPACE: \"DATABASE_NOT_FOUND_IN_WORKSPACE\",\n\tDATABASE_PERSISTENCE_FAILED: \"DATABASE_PERSISTENCE_FAILED\",\n\tDEPLOY_FAILED: \"DEPLOY_FAILED\",\n\tDEPLOYMENT_NOT_FOUND: \"DEPLOYMENT_NOT_FOUND\",\n\tDEPLOY_RATE_LIMITED: \"DEPLOY_RATE_LIMITED\",\n\tDOMAIN_ALREADY_IN_USE: \"DOMAIN_ALREADY_IN_USE\",\n\tENV_LIMIT_EXCEEDED: \"ENV_LIMIT_EXCEEDED\",\n\tENV_DUPLICATE_KEY: \"ENV_DUPLICATE_KEY\",\n\tENV_NOT_FOUND: \"ENV_NOT_FOUND\",\n\tFILE_TOO_LARGE: \"FILE_TOO_LARGE\",\n\tFILE_MODIFIED: \"FILE_MODIFIED\",\n\tFILE_NOT_FOUND: \"FILE_NOT_FOUND\",\n\tFILE_OR_FOLDER_NOT_FOUND: \"FILE_OR_FOLDER_NOT_FOUND\",\n\tFORBIDDEN: \"FORBIDDEN\",\n\tFORBIDDEN_DOMAIN: \"FORBIDDEN_DOMAIN\",\n\tFORBIDDEN_PATH: \"FORBIDDEN_PATH\",\n\tFORBIDDEN_KEY: \"FORBIDDEN_KEY\",\n\tFORCED_SNAPSHOT_RATE_LIMIT: \"FORCED_SNAPSHOT_RATE_LIMIT\",\n\tFREE_PLAN_NO_WEB_PUBLISH: \"FREE_PLAN_NO_WEB_PUBLISH\",\n\t/** 403 — the Free plan can no longer create applications or databases; a paid plan is required. */\n\tFREE_PLAN_SUSPENDED: \"FREE_PLAN_SUSPENDED\",\n\tINSTALLATION_NOT_FOUND: \"INSTALLATION_NOT_FOUND\",\n\tINSTALL_SHIELD_BLOCKED: \"INSTALL_SHIELD_BLOCKED\",\n\tINSTALL_TIMEOUT: \"INSTALL_TIMEOUT\",\n\tINSTALL_FAILED: \"INSTALL_FAILED\",\n\tINSTALL_CANCELLED: \"INSTALL_CANCELLED\",\n\tINSTALL_OUT_OF_MEMORY: \"INSTALL_OUT_OF_MEMORY\",\n\tINSTALL_QUEUE_FULL: \"INSTALL_QUEUE_FULL\",\n\tINSUFFICIENT_MEMORY: \"INSUFFICIENT_MEMORY\",\n\tINTERNAL_SERVER_ERROR: \"INTERNAL_SERVER_ERROR\",\n\tINVALID_CONFIG: \"INVALID_CONFIG\",\n\tINVALID_CUSTOM_DOMAIN_FORMAT: \"INVALID_CUSTOM_DOMAIN_FORMAT\",\n\tINVALID_HOSTNAME_FOR_APP: \"INVALID_HOSTNAME_FOR_APP\",\n\tINVALID_LANGUAGE: \"INVALID_LANGUAGE\",\n\tINVALID_MEMORY_FORMAT: \"INVALID_MEMORY_FORMAT\",\n\tINVALID_MONTHS: \"INVALID_MONTHS\",\n\tINVALID_OR_EXPIRED_CODE: \"INVALID_OR_EXPIRED_CODE\",\n\tINVALID_PARAMS: \"INVALID_PARAMS\",\n\tINVALID_PAYLOAD: \"INVALID_PAYLOAD\",\n\tINVALID_PATH: \"INVALID_PATH\",\n\tINVALID_PLAN: \"INVALID_PLAN\",\n\tINVALID_PLAN_NAME: \"INVALID_PLAN_NAME\",\n\tINVALID_RAM_LIMIT: \"INVALID_RAM_LIMIT\",\n\tINVALID_RANGE: \"INVALID_RANGE\",\n\tINVALID_SUBDOMAIN_FORMAT: \"INVALID_SUBDOMAIN_FORMAT\",\n\tINVALID_VERSION: \"INVALID_VERSION\",\n\tINVALID_ZIP: \"INVALID_ZIP\",\n\tINVALID_ZIP_STRUCTURE: \"INVALID_ZIP_STRUCTURE\",\n\tMAIN_FILE_NOT_FOUND: \"MAIN_FILE_NOT_FOUND\",\n\tMAX_APPS_REACHED: \"MAX_APPS_REACHED\",\n\tMAX_DATABASES_REACHED: \"MAX_DATABASES_REACHED\",\n\tMEMORY_BELOW_MINIMUM: \"MEMORY_BELOW_MINIMUM\",\n\tMEMORY_LIMIT_EXCEEDED: \"MEMORY_LIMIT_EXCEEDED\",\n\tMEMORY_MUST_BE_INTEGER: \"MEMORY_MUST_BE_INTEGER\",\n\tMEMORY_REQUIRED: \"MEMORY_REQUIRED\",\n\tMISSING_HEADERS: \"MISSING_HEADERS\",\n\tMISSING_PLAN_OR_MONTHS: \"MISSING_PLAN_OR_MONTHS\",\n\tMISSING_CONTENT: \"MISSING_CONTENT\",\n\tNOT_AN_UPGRADE: \"NOT_AN_UPGRADE\",\n\tNO_AUTHORIZED_PATHS: \"NO_AUTHORIZED_PATHS\",\n\tNO_CHANGES_PROVIDED: \"NO_CHANGES_PROVIDED\",\n\tNO_CUSTOM_DOMAIN: \"NO_CUSTOM_DOMAIN\",\n\tNO_FIELDS_TO_UPDATE: \"NO_FIELDS_TO_UPDATE\",\n\tNO_FILE_UPLOADED: \"NO_FILE_UPLOADED\",\n\tOPERATION_IN_PROGRESS: \"OPERATION_IN_PROGRESS\",\n\tORDER_NOT_FOUND: \"ORDER_NOT_FOUND\",\n\tORDER_NOT_PAID: \"ORDER_NOT_PAID\",\n\tORDER_NOT_PAYABLE: \"ORDER_NOT_PAYABLE\",\n\tORDER_NOT_REFUNDED: \"ORDER_NOT_REFUNDED\",\n\t/** 404 — the order has no payment receipt (unpaid, redeemed code or paid before receipts existed). */\n\tORDER_RECEIPT_UNAVAILABLE: \"ORDER_RECEIPT_UNAVAILABLE\",\n\tOWNER_APP_WITHOUT_LIMITS: \"OWNER_APP_WITHOUT_LIMITS\",\n\tPAYLOAD_TOO_LARGE: \"PAYLOAD_TOO_LARGE\",\n\t/** 409 — a folder in the path is an existing file (writing `app/x.js` when `app` is a file). */\n\tPATH_IS_FILE: \"PATH_IS_FILE\",\n\tPENDING_ORDER_LIMIT_REACHED: \"PENDING_ORDER_LIMIT_REACHED\",\n\tPAYMENT_METHOD_UNAVAILABLE: \"PAYMENT_METHOD_UNAVAILABLE\",\n\tPLAN_DOES_NOT_SUPPORT_CUSTOM_DOMAIN: \"PLAN_DOES_NOT_SUPPORT_CUSTOM_DOMAIN\",\n\tPLAN_DOES_NOT_SUPPORT_CUSTOM_SUBDOMAIN: \"PLAN_DOES_NOT_SUPPORT_CUSTOM_SUBDOMAIN\",\n\tPLAN_DOES_NOT_SUPPORT_WEB_PUBLISH: \"PLAN_DOES_NOT_SUPPORT_WEB_PUBLISH\",\n\tPLAN_MISMATCH_FOR_RENEWAL: \"PLAN_MISMATCH_FOR_RENEWAL\",\n\tPLAN_NOT_ALLOWED: \"PLAN_NOT_ALLOWED\",\n\tRATE_LIMIT_EXCEEDED: \"RATE_LIMIT_EXCEEDED\",\n\tREFUND_AMOUNT_EXCEEDS_PRICE: \"REFUND_AMOUNT_EXCEEDS_PRICE\",\n\tREPO_ALREADY_LINKED: \"REPO_ALREADY_LINKED\",\n\tRESTORE_COOLDOWN: \"RESTORE_COOLDOWN\",\n\tSNAPSHOT_ENGINE_MISMATCH: \"SNAPSHOT_ENGINE_MISMATCH\",\n\tSNAPSHOT_FAILED: \"SNAPSHOT_FAILED\",\n\tSNAPSHOT_IMPORT_FAILED: \"SNAPSHOT_IMPORT_FAILED\",\n\tSNAPSHOT_NOT_FOUND: \"SNAPSHOT_NOT_FOUND\",\n\tSNAPSHOT_RATE_LIMITED: \"SNAPSHOT_RATE_LIMITED\",\n\tSNAPSHOT_TYPE_MISMATCH: \"SNAPSHOT_TYPE_MISMATCH\",\n\tSNAPSHOT_TOO_LARGE: \"SNAPSHOT_TOO_LARGE\",\n\tSOURCE_CONFLICT: \"SOURCE_CONFLICT\",\n\tSOURCE_REQUIRED: \"SOURCE_REQUIRED\",\n\tSTORAGE_ABOVE_NEW_LIMIT: \"STORAGE_ABOVE_NEW_LIMIT\",\n\tSUBDOMAIN_CHANGE_RATE_LIMITED: \"SUBDOMAIN_CHANGE_RATE_LIMITED\",\n\tSUBDOMAIN_FORBIDDEN: \"SUBDOMAIN_FORBIDDEN\",\n\tSUBDOMAIN_TAKEN: \"SUBDOMAIN_TAKEN\",\n\t/** 400 — the CPF or CNPJ is not valid. */\n\tTAX_ID_INVALID: \"TAX_ID_INVALID\",\n\tTYPE_MISMATCH: \"TYPE_MISMATCH\",\n\tUSER_LIMITS_NOT_FOUND: \"USER_LIMITS_NOT_FOUND\",\n\tUSER_NOT_FOUND: \"USER_NOT_FOUND\",\n\tUSER_NOT_IN_WORKSPACE: \"USER_NOT_IN_WORKSPACE\",\n\tDATABASE_BANNED: \"DATABASE_BANNED\",\n\tVALIDATION_ERROR: \"VALIDATION_ERROR\",\n\tZIP_TOO_LARGE: \"ZIP_TOO_LARGE\",\n\tZIP_TOO_SMALL: \"ZIP_TOO_SMALL\",\n\tSTORAGE_FULL: \"STORAGE_FULL\",\n\tTARGET_IS_DIRECTORY: \"TARGET_IS_DIRECTORY\",\n\t...WORKSPACE_ERROR_CODES,\n} as const;\n\nexport const APIErrorCode = API_ERROR_CODES;\n\nexport type APIErrorCode = (typeof API_ERROR_CODES)[keyof typeof API_ERROR_CODES];\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationLanguage = \"javascript\" | \"typescript\" | \"bun\" | \"python\" | \"static\" | \"php\" | \"go\" | \"ruby\" | \"java\" | \"rust\";\nexport const ApplicationLanguage = {\n\tJAVASCRIPT: \"javascript\",\n\tTYPESCRIPT: \"typescript\",\n\tBUN: \"bun\",\n\tPYTHON: \"python\",\n\tSTATIC: \"static\",\n\tPHP: \"php\",\n\tGO: \"go\",\n\tRUBY: \"ruby\",\n\tJAVA: \"java\",\n\tRUST: \"rust\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationStatus = \"up\" | \"down\";\nexport const ApplicationStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationCluster = number;\nexport const ApplicationCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationType = 1 | 2;\nexport const ApplicationType = {\n\tBOT: 1,\n\tWEBSITE: 2,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/files\n */\nexport type ApplicationFileType = \"file\" | \"directory\";\nexport const ApplicationFileType = {\n\tFILE: \"file\",\n\tDIRECTORY: \"directory\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationVersion = \"recommended\" | \"latest\" | \"auto\" | (string & {});\nexport const ApplicationVersion = {\n\tRECOMMENDED: \"recommended\",\n\tLATEST: \"latest\",\n\tAUTO: \"auto\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/content\n */\nexport type ApplicationFileContentType = \"base64\";\nexport const ApplicationFileContentType = {\n\tBASE64: \"base64\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/files\n */\nexport interface APIApplicationFile {\n\ttype: ApplicationFileType;\n\tname: string;\n\tpath: string;\n\tsize?: string;\n\tlast_modified: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/tree\n */\nexport interface APIApplicationFileTree extends APIApplicationFile {\n\tchildren?: APIApplicationFileTree[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/content\n */\nexport interface APIApplicationFileContent {\n\ttype: \"base64\";\n\t/** File bytes in standard base64 (with padding). */\n\tdata: string;\n\t/** Actual size in bytes (not the length of the base64 string). */\n\tsize: number;\n\t/** File mtime; send it back on PUT (`last_modified`) to detect edit conflicts. */\n\tlast_modified: ISODateString;\n}\n\n/**\n * Successful ZIP upload through `POST /v1/apps/:id/files/upload`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/upload\n */\nexport interface APIApplicationFileUpload {\n\tapp_id: SnowFlake;\n\tupdated_at: ISODateString;\n\tmissing_dependencies: string[];\n\tremoved_directories: string[];\n}\n\n/**\n * Repository linked to the application for auto-deploy. The webhook URL is not included here.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport interface APIApplicationGithub {\n\trepo_owner: string;\n\trepo_name: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport interface APIApplication {\n\tid: SnowFlake;\n\tcluster: ApplicationCluster;\n\ttype: ApplicationType;\n\tname: string;\n\tdescription?: string;\n\towner_id: string; // UUID\n\towner_plan_id: UserPlan; // Owner's plan\n\tlanguage: ApplicationLanguage;\n\tram: number;\n\tstatus: ApplicationStatus;\n\tsubdomain: string | null; // example: \"my-app.vertraweb.app\"\n\t/**\n\t * Canonical public URL of the app, computed by the server (`custom_domain` > `subdomain` >\n\t * `null`). Clients should use it as-is instead of building the URL from the subdomain.\n\t */\n\tpublic_url: string | null;\n\t/**\n\t * GitHub integration of this application, if any. `null` = the source is a zip (or snapshot).\n\t * May be absent in older payloads. The webhook URL is available from\n\t * `GET /v1/apps/:id/deploys/webhook`.\n\t */\n\tgithub?: APIApplicationGithub | null;\n\tcustom_domain: string | null; // example: \"my-app.com.br\"\n\tlast_snapshot: ISODateString | null;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tmain_file: string;\n\tversion: ApplicationVersion;\n\tstart_command: string | null;\n\t/**\n\t * Build command, run once per deploy, after dependencies are installed and before the app\n\t * starts — in the build environment, with more memory than the app. `null` = no build step.\n\t * If it fails, the deploy fails and the app does not start.\n\t */\n\tbuild_command: string | null;\n\toffline_since: ISODateString | null;\n\tmissing_dependencies?: string[]; // Undeclared packages detected on build/deploy\n\t/** Active Vertra Shield containment (burst/rate limit); `null` when there is none. */\n\tshield_cooldown: APIApplicationShieldCooldown | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport interface APIApplicationNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/status\n */\nexport interface APIApplicationStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\t/** @deprecated Not returned by `GET /v1/apps/:id/status`; use `running`. */\n\tstatus?: ApplicationStatus;\n\trunning: boolean;\n\t/**\n\t * `true` while dependencies are being installed.\n\t *\n\t * During this window the app itself is not running yet, so `running: false` alone does not\n\t * mean the app is stopped. Optional: omitted when no installation is in progress.\n\t */\n\tinstalling?: boolean;\n\tstorage: string;\n\t/** `null` when network usage is unavailable (e.g. the app is stopped). */\n\tnetwork: APIApplicationNetwork | null;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/allstatus\n */\nexport interface APIApplicationStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\t/** Absent when the app's status could not be read. */\n\tstorage?: string;\n\t/** Absent when the app's status could not be read; `null` when network usage is unavailable. */\n\tnetwork?: APIApplicationNetwork | null;\n\trunning: boolean;\n\t/**\n\t * `true` while dependencies are being installed.\n\t *\n\t * During this window the app itself is not running yet, so `running: false` alone does not\n\t * mean the app is stopped. Optional: omitted when no installation is in progress.\n\t */\n\tinstalling?: boolean;\n\t/**\n\t * Seconds since the app started.\n\t *\n\t * A duration, not a point in time — hence `number` rather than `ISODateString`. Same unit and\n\t * type as `APIApplicationStatus.uptime`.\n\t *\n\t * `null` when unknown (the app is stopped or its status could not be read). **`0` is never used\n\t * as a sentinel** — `0` means \"just started\".\n\t */\n\tuptime: number | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/metrics\n */\nexport interface APIApplicationMetric {\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tdate: ISODateString;\n\tnetwork: number[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/create\n */\nexport interface APIApplicationConfig {\n\tNAME: string;\n\tMEMORY: number;\n\tMAIN: string;\n\tVERSION: ApplicationVersion;\n\tDESCRIPTION?: string;\n\tSTART?: string;\n\t/** Build command (see `APIApplication.build_command`). */\n\tBUILD?: string;\n\tSUBDOMAIN?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/get\n */\nexport interface APIApplicationEnvironment {\n\tid: string;\n\tkey: string;\n\tvalue: string;\n\tnote: string | null;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/start\n */\nexport interface APIApplicationOperationResponse {\n\tstatus: \"success\";\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/recents\n */\nexport interface APIApplicationDeployment {\n\tapp_id: SnowFlake;\n\tcommit_id: string;\n\tmessage: string;\n\tpusher: string;\n\tbranch: string;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns\n */\nexport type ApplicationDnsRecordType = \"CNAME\" | \"TXT\";\nexport const ApplicationDnsRecordType = {\n\tCNAME: \"CNAME\",\n\tTXT: \"TXT\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns\n */\nexport type ApplicationDnsRecordStatus = \"active\" | \"pending_validation\";\nexport const ApplicationDnsRecordStatus = {\n\tACTIVE: \"active\",\n\tPENDING_VALIDATION: \"pending_validation\",\n} as const;\n\n/**\n * DNS record the user must create at their DNS provider for the custom domain.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns\n */\nexport interface APIApplicationDnsRecord {\n\ttype: ApplicationDnsRecordType;\n\tname: string;\n\tvalue: string;\n\tstatus: ApplicationDnsRecordStatus;\n}\n\n/**\n * Returned when the auto-deploy webhook is created.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/create\n */\nexport interface APIApplicationWebhookUrl {\n\turl: string;\n}\n\n/**\n * Auto-deploy webhook of an application and the repository it is linked to.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/webhookurl\n */\nexport interface APIApplicationWebhook {\n\twebhook_url: string;\n\trepo_owner: string;\n\trepo_name: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/subdomain\n */\nexport interface APIApplicationSubdomain {\n\t/** Full hostname (`my-app.vertraweb.app`). */\n\tsubdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/customdomain\n */\nexport interface APIApplicationCustomDomain {\n\tdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ShieldIncidentReason = \"burst\" | \"rate_limit\";\nexport const ShieldIncidentReason = {\n\tBURST: \"burst\",\n\tRATE_LIMIT: \"rate_limit\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ShieldIncidentDirection = \"in\" | \"out\";\nexport const ShieldIncidentDirection = {\n\tIN: \"in\",\n\tOUT: \"out\",\n} as const;\n\n/**\n * Active Vertra Shield containment on this application (bandwidth limit after a burst/rate limit).\n * `null` when no containment is in effect.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport interface APIApplicationShieldCooldown {\n\tuntil: ISODateString;\n\treason: ShieldIncidentReason;\n\tdirection: ShieldIncidentDirection;\n\tstrikes: number;\n}\n\n/**\n * Web publishing state of an application.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/publish\n */\nexport interface APIApplicationWebPublish {\n\t/** `null` when web publishing is off. */\n\tsubdomain: string | null;\n\tcustom_domain: string | null;\n\ttype: ApplicationType;\n}\n\n/**\n * Suggestions from scanning the zip before creating an application. Nothing is applied\n * automatically: they are meant to pre-fill a creation form that the user can edit.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/scan\n */\nexport interface APIApplicationScanSuggestions {\n\tsuggested_start_command?: string;\n\tsuggested_build_command?: string;\n\tsuggested_memory_mb?: number;\n\tsuggested_public_web?: boolean;\n\tmissing_dependencies?: string[];\n}\n\n/**\n * One runtime of `GET /v1/apps/runtimes`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/runtimes\n */\nexport interface APIApplicationRuntime {\n\t/** Recommended version for new applications. */\n\trecommended: string;\n\tlatest: string;\n\t/** Other exact versions that can be pinned. Empty for runtimes without version pinning. */\n\tspecific: string[];\n}\n\n/**\n * Catalog of supported runtimes, keyed by language.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/runtimes\n */\nexport type APIApplicationRuntimes = Record<ApplicationLanguage, APIApplicationRuntime>;\n\n/**\n * `event` field of the `GET /v1/apps/:id/realtime` stream (`text/event-stream`).\n * `logs` = application output (one or more lines); `system` = stream/platform notices (e.g.\n * `install_note:started`); `heartbeat` = keep-alive, no content.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/realtime\n */\nexport type ApplicationRealtimeEventType = \"logs\" | \"system\" | \"heartbeat\";\nexport const ApplicationRealtimeEventType = {\n\tLOGS: \"logs\",\n\tSYSTEM: \"system\",\n\tHEARTBEAT: \"heartbeat\",\n} as const;\n\n/**\n * One server-sent event of `GET /v1/apps/:id/realtime`. `data` is plain text, not JSON; a `logs`\n * event may carry several lines separated by `\\n`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/realtime\n */\nexport interface APIApplicationRealtimeEvent {\n\tevent: ApplicationRealtimeEventType;\n\tdata: string;\n}\n","import type { ISODateString } from \"../../v1\";\n\n/** Postal address used for billing. `country` is a two-letter ISO code (`\"BR\"`). */\nexport interface APIBillingAddress {\n\t/** Street name. */\n\tline1: string;\n\t/** Street number; `\"S/N\"` when there is none. Required in Brazil. */\n\tnumber: string | null;\n\t/** Complement, for example `\"Apt 2\"`. */\n\tline2: string | null;\n\t/** Neighborhood (bairro). Required in Brazil. */\n\tdistrict: string | null;\n\tcity: string;\n\t/** Seven-digit IBGE city code. Required in Brazil. */\n\tcity_code: string | null;\n\t/** Two-letter state code in Brazil (`\"CE\"`); free text elsewhere. */\n\tstate: string | null;\n\tpostal_code: string | null;\n\tcountry: string;\n}\n\n/** Brazilian tax document kind. */\nexport type BillingTaxIdType = \"cpf\" | \"cnpj\";\nexport const BillingTaxIdType = {\n\tCPF: \"cpf\",\n\tCNPJ: \"cnpj\",\n} as const;\n\n/** Tax document as returned by the API: never the full number. */\nexport interface APIBillingTaxId {\n\ttype: BillingTaxIdType;\n\t/** Masked, for example `\"CPF ••• 47\"`. */\n\tmasked: string;\n}\n\n/**\n * Billing details of the logged-in account, used on receipts, invoices and fraud checks.\n * An order needs them complete (`complete: true`), otherwise `POST /v1/orders` fails with `BILLING_DETAILS_INCOMPLETE`.\n */\nexport interface APIBillingDetails {\n\tname: string | null;\n\taddress: APIBillingAddress | null;\n\t/** Optional. E.164, for example `\"+5585999990000\"`. */\n\tphone: string | null;\n\ttax_id: APIBillingTaxId | null;\n\t/** `true` when every field required to issue the service invoice is filled (in Brazil, including the tax document). */\n\tcomplete: boolean;\n}\n\n/** Saved card of the logged-in account. Dashboard session only. */\nexport interface APIBillingCard {\n\tid: string;\n\t/** Card brand as reported by the card network, for example `\"visa\"` or `\"mastercard\"`. */\n\tbrand: string;\n\tlast4: string;\n\texp_month: number;\n\texp_year: number;\n\t/** The plan renews automatically on the default card. */\n\tis_default: boolean;\n\tcreated_at: ISODateString;\n}\n\n/** Automatic renewal of the paid plan on the default card. Dashboard session only. */\nexport interface APIBillingRenewal {\n\t/** Preference of the account. `false` means the plan simply expires on its date; the saved cards are kept. */\n\tauto_renew: boolean;\n\t/** Plan expiry date, or `null` when the plan has none. */\n\trenews_at: ISODateString | null;\n\t/** Default card the renewal would charge, or `null` without one. */\n\tcard: { brand: string; last4: string } | null;\n\t/** `true` when the current plan can renew on a card (paid plan, not Economy) and a default card exists. */\n\teligible: boolean;\n}\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport type DatabaseType = 1 | 2 | 3 | 4;\nexport const DatabaseType = {\n\tPOSTGRESQL: 1,\n\tMONGODB: 2,\n\tREDIS: 3,\n\tMYSQL: 4,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport type DatabaseStatus = \"up\" | \"down\";\nexport const DatabaseStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport type DatabaseCluster = number;\nexport const DatabaseCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\n\nexport interface APIDatabase {\n\tid: SnowFlake;\n\tcluster: DatabaseCluster;\n\ttype: DatabaseType;\n\tname: string;\n\tdescription: string;\n\towner_id: SnowFlake;\n\towner_plan_id: UserPlan; // Owner's plan\n\tstatus: DatabaseStatus;\n\tram: number;\n\thost: string; // example: \"vertra-cloud-<type>-<dbId>.vertraweb.app\"\n\tport: number;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tlast_snapshot: ISODateString | null;\n\toffline_since: ISODateString | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport interface APIDatabaseNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/status\n */\nexport interface APIDatabaseStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: DatabaseStatus;\n\trunning: boolean;\n\tstorage: string;\n\t/** `null` when network usage is unavailable. */\n\tnetwork: APIDatabaseNetwork | null;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/allstatus\n */\nexport interface APIDatabaseStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstorage: string;\n\trunning: boolean;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport interface APIDatabaseOperationResponse {\n\tstatus: \"success\";\n}\n\n/**\n * Client certificate for TLS connections to the database.\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/credentials/get\n */\nexport interface APIDatabaseCertificate {\n\tcrt: string;\n\tkey: string;\n\tpem: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/metrics\n */\nexport interface APIDatabaseMetrics {\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tdate: ISODateString;\n\tnetwork: number[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/credentials/resetpassword\n */\nexport interface APIDatabasePasswordReset {\n\tpassword: string;\n}\n","/**\n * Payloads of the database **Data** tab (content management: SQL, Mongo, Redis).\n *\n * The resource here is the **content** of the user's database, not the database instance itself\n * (see `database.ts`). No field carries credentials: password, connection string and certificate\n * are never returned by these routes.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/overview\n */\n\n// ---------------------------------------------------------------------------\n// Common to every engine\n// ---------------------------------------------------------------------------\n\n/**\n * Tab header: which engine this is and how much it currently stores.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/overview\n */\nexport interface APIDatabaseDataOverview {\n\tengine_version: string;\n\tsize_bytes: number;\n\t/** Tables (SQL), collections (Mongo) or keys (Redis). */\n\tobjects_count: number;\n\tconnections_active: number;\n\tconnections_max: number;\n\tuptime_seconds: number;\n\t/** Engine-specific fields (e.g. `wal_size_bytes`, `replica_set`). Optional per engine. */\n\textra?: Record<string, string | number | boolean | null>;\n}\n\n/**\n * Sort direction for any listing in the tab.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/overview\n */\nexport type DatabaseSortDirection = \"asc\" | \"desc\";\nexport const DatabaseSortDirection = {\n\tAsc: \"asc\",\n\tDesc: \"desc\",\n} as const satisfies Record<string, DatabaseSortDirection>;\n\n/**\n * Operators accepted by the structured row filter (`APIDatabaseRowFilter.op`). Closed list —\n * anything else is rejected.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows\n */\nexport type DatabaseFilterOperator = \"=\" | \"!=\" | \"<\" | \"<=\" | \">\" | \">=\" | \"LIKE\" | \"IS NULL\" | \"IS NOT NULL\";\nexport const DatabaseFilterOperator = {\n\tEq: \"=\",\n\tNe: \"!=\",\n\tLt: \"<\",\n\tLte: \"<=\",\n\tGt: \">\",\n\tGte: \">=\",\n\tLike: \"LIKE\",\n\tIsNull: \"IS NULL\",\n\tIsNotNull: \"IS NOT NULL\",\n} as const satisfies Record<string, DatabaseFilterOperator>;\n\n/**\n * One item of the structured row filter. `value` is omitted for `IS NULL`/`IS NOT NULL`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows\n */\nexport interface APIDatabaseRowFilter {\n\tcolumn: string;\n\top: DatabaseFilterOperator;\n\tvalue?: unknown;\n}\n\n/**\n * Query-string parameters for paginated **row** listing. `per_page` is capped at 200.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows\n */\nexport interface APIDatabaseListParams {\n\tpage?: number;\n\tper_page?: number;\n\t/** Simple \"contains\" filter applied to the column/field given by `filter_field`. */\n\tfilter?: string;\n\tfilter_field?: string;\n\tsort?: string;\n\tdirection?: DatabaseSortDirection;\n\t/**\n\t * Structured filter: `APIDatabaseRowFilter[]` serialized as JSON. Up to 20 items and 4096\n\t * bytes — anything larger is rejected.\n\t */\n\tfilters?: string;\n}\n\n/**\n * Query-string parameters for paginated **document** listing. `filter` is a serialized Mongo\n * query JSON; `sort` is a serialized `{ field: 1 | -1 }`. No `direction`/`filter_field` — the\n * Mongo filter already carries the operator.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/documents\n */\nexport interface APIDatabaseDocumentListParams {\n\tpage?: number;\n\tper_page?: number;\n\tfilter?: string;\n\tsort?: string;\n}\n\n/**\n * Data operation error. Same error envelope as the rest of the API — `code` is a stable English\n * sentinel (`DB_NOT_RUNNING`, `QUERY_TIMEOUT`, …) meant to be translated by the client.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/errors\n */\nexport interface APIDatabaseDataError {\n\tcode: string;\n\tmessage?: string;\n\tdetails?: unknown;\n}\n\n// ---------------------------------------------------------------------------\n// SQL (PostgreSQL / MySQL)\n// ---------------------------------------------------------------------------\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/schemas\n */\nexport interface APIDatabaseSchema {\n\tname: string;\n\ttables_count: number;\n\tsize_bytes: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport type DatabaseTableKind = \"table\" | \"view\";\nexport const DatabaseTableKind = {\n\tTable: \"table\",\n\tView: \"view\",\n} as const satisfies Record<string, DatabaseTableKind>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport interface APIDatabaseTable {\n\tschema: string;\n\tname: string;\n\tkind: DatabaseTableKind;\n\t/** Engine estimate — an exact count would require a full scan. */\n\trows_estimate: number;\n\tsize_bytes: number;\n\tcolumns_count: number;\n\tindexes_count: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport interface APIDatabaseColumnReference {\n\tschema: string;\n\ttable: string;\n\tcolumn: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport interface APIDatabaseColumn {\n\tname: string;\n\t/** Raw engine type (`text`, `bigint`, `timestamptz`, `varchar(255)`…). */\n\tdata_type: string;\n\tnullable: boolean;\n\tdefault_value: string | null;\n\tis_primary_key: boolean;\n\tis_unique: boolean;\n\tis_foreign_key: boolean;\n\treferences?: APIDatabaseColumnReference;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport interface APIDatabaseIndex {\n\tname: string;\n\tcolumns: string[];\n\tunique: boolean;\n\tprimary: boolean;\n\tsize_bytes: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows\n */\nexport interface APIDatabaseRowsPage {\n\tcolumns: APIDatabaseColumn[];\n\trows: Record<string, unknown>[];\n\ttotal: number;\n\tpage: number;\n\tper_page: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/query\n */\nexport interface APIDatabaseQueryResult {\n\tcolumns: string[];\n\t/** Positional matrix — order matches `columns`. */\n\trows: unknown[][];\n\trow_count: number;\n\tduration_ms: number;\n\t/** `true` when the result was cut at the row limit. */\n\ttruncated: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// MongoDB\n// ---------------------------------------------------------------------------\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/collections\n */\nexport interface APIDatabaseCollection {\n\tname: string;\n\tdocuments_count: number;\n\tsize_bytes: number;\n\tavg_document_size: number;\n\tindexes_count: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/documents\n */\nexport interface APIDatabaseDocumentsPage {\n\tdocuments: Record<string, unknown>[];\n\ttotal: number;\n\tpage: number;\n\tper_page: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/collections\n */\nexport interface APIDatabaseMongoIndex {\n\tname: string;\n\t/** `{ created_at: -1 }` — same shape as `createIndex`. */\n\tkeys: Record<string, 1 | -1>;\n\tunique: boolean;\n\tsparse: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// Redis\n// ---------------------------------------------------------------------------\n\n/**\n * `SCAN` query-string parameters. `cursor` absent = start of the scan.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport interface APIDatabaseRedisScanParams {\n\tpattern?: string;\n\tcursor?: string;\n\tcount?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport type DatabaseRedisKeyType = \"string\" | \"hash\" | \"list\" | \"set\" | \"zset\" | \"stream\";\nexport const DatabaseRedisKeyType = {\n\tString: \"string\",\n\tHash: \"hash\",\n\tList: \"list\",\n\tSet: \"set\",\n\tZSet: \"zset\",\n\tStream: \"stream\",\n} as const satisfies Record<string, DatabaseRedisKeyType>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport interface APIDatabaseRedisKey {\n\tkey: string;\n\ttype: DatabaseRedisKeyType;\n\t/** `null` = no expiration. */\n\tttl_seconds: number | null;\n\tsize_bytes: number;\n\t/** Cardinality (items in the hash/list/set/zset/stream). Absent for `string`. */\n\tlength?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport interface APIDatabaseRedisKeysPage {\n\tkeys: APIDatabaseRedisKey[];\n\t/** `SCAN` cursor. `null` = the scan is complete. */\n\tcursor: string | null;\n\tscanned: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport interface APIDatabaseRedisZSetMember {\n\tmember: string;\n\tscore: number;\n}\n\n/**\n * Value of a key, discriminated by `type`. Collections are truncated at 1000 items **or** at the\n * read byte limit — `truncated: true` when the value was cut for either reason. Absent/`false` =\n * the full value was returned.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport type APIDatabaseRedisKeyValue =\n\t| { key: string; type: \"string\"; ttl_seconds: number | null; value: string; truncated?: boolean }\n\t| { key: string; type: \"hash\"; ttl_seconds: number | null; value: Record<string, string>; truncated?: boolean }\n\t| { key: string; type: \"list\"; ttl_seconds: number | null; value: string[]; truncated?: boolean }\n\t| { key: string; type: \"set\"; ttl_seconds: number | null; value: string[]; truncated?: boolean }\n\t| { key: string; type: \"zset\"; ttl_seconds: number | null; value: APIDatabaseRedisZSetMember[]; truncated?: boolean }\n\t| { key: string; type: \"stream\"; ttl_seconds: number | null; value: string[]; truncated?: boolean };\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/info\n */\nexport interface APIDatabaseRedisInfo {\n\tversion: string;\n\tused_memory_bytes: number;\n\t/** `null` = no `maxmemory` configured. */\n\tmax_memory_bytes: number | null;\n\tkeys_total: number;\n\texpires_total: number;\n\thits: number;\n\tmisses: number;\n\tconnected_clients: number;\n\tops_per_second: number;\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * Notification type:\n * 1 = Simple text notification\n * 2 = Notification with image/video attachment\n */\nexport type NotificationType = 1 | 2;\n\nexport const NotificationType = {\n\tSIMPLE: 1,\n\tATTACHMENT: 2,\n} as const;\n\n/**\n * Notification importance level.\n */\nexport type NotificationImportance = \"low\" | \"medium\" | \"high\" | \"critical\";\n\nexport const NotificationImportance = {\n\tLOW: \"low\",\n\tMEDIUM: \"medium\",\n\tHIGH: \"high\",\n\tCRITICAL: \"critical\",\n} as const;\n\nexport interface LocalizedContent {\n\t\"en-us\": string;\n\t\"pt-br\"?: string;\n\t\"es-es\"?: string;\n\t[key: string]: string | undefined;\n}\n\n/** Dashboard session only (not reachable with an API key). */\nexport interface APINotification {\n\tid: SnowFlake;\n\ttype: NotificationType;\n\timportance: NotificationImportance;\n\ttitle: LocalizedContent;\n\tmessage: LocalizedContent;\n\tattachment_url: string | null;\n\tshow_on_dashboard: boolean;\n\tis_read: boolean;\n\tcreated_at: ISODateString;\n\texpires_at: ISODateString;\n}\n","import type { ISODateString } from \"../../v1\";\n\n/**\n * OAuth client registered dynamically (RFC 7591) to connect an external agent to the account.\n * Public client: no secret, PKCE `S256` required.\n * @see https://docs.vertracloud.app/api-reference/introduction#connecting-through-oauth\n */\nexport interface APIOAuthClient {\n\tclient_id: string;\n\t/** Name shown on the consent screen; the API key created on consent is named `oauth:<client_name>` (max. 40 characters). */\n\tclient_name: string;\n\t/** Matched exactly on `authorize`; no wildcards. */\n\tredirect_uris: string[];\n\tcreated_at: ISODateString;\n}\n\nexport type APIOAuthCodeChallengeMethod = \"S256\";\nexport const APIOAuthCodeChallengeMethod = { S256: \"S256\" } as const;\n\nexport type APIOAuthConsentDecision = \"approve\" | \"deny\";\nexport const APIOAuthConsentDecision = { Approve: \"approve\", Deny: \"deny\" } as const;\n","import type { ISODateString } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport type OrderStatus = \"unpaid\" | \"paid\" | \"cancelled\" | \"expired\";\nexport const OrderStatus = {\n\tUNPAID: \"unpaid\",\n\tPAID: \"paid\",\n\tCANCELLED: \"cancelled\",\n\tEXPIRED: \"expired\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport type OrderType = \"purchase\" | \"renew\" | \"upgrade\";\nexport const OrderType = {\n\tPURCHASE: \"purchase\",\n\tRENEW: \"renew\",\n\tUPGRADE: \"upgrade\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport type OrderProvider = \"pix\" | \"card\" | \"redeem_code\";\nexport const OrderProvider = {\n\tPIX: \"pix\",\n\tCARD: \"card\",\n\tREDEEM_CODE: \"redeem_code\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport interface APIOrderCreateResponse {\n\tid: string;\n\tcode: string | null;\n\t/** Usually `\"unpaid\"`; `\"paid\"` right away when a coupon brings the price to zero. */\n\tstatus: OrderStatus;\n\tplan: string;\n\t/** Duration in days. */\n\tduration: number;\n\tdiscount: APIOrderDiscount;\n\t/** Final price, after the discount. */\n\tprice: number;\n\texpires_at: ISODateString | null;\n\t/**\n\t * Payment methods the order accepts. The Economy plan and a coupon restricted to one method narrow\n\t * the list; otherwise `[\"pix\", \"card\"]` when card payments are available, `[\"pix\"]` when not.\n\t * Starting a payment with a method outside the list returns 400 `COUPON_PAYMENT_METHOD` (coupon) or\n\t * 400 `CARD_NOT_ALLOWED_FOR_PLAN` (Economy).\n\t */\n\tallowed_payment_methods: OrderProvider[];\n}\n\n/**\n * Price an order would have with a coupon, without creating the order or using the coupon.\n * Prices already include the billing-period discount (3 months −5%, 12 −15%).\n */\nexport interface APIOrderCouponPreview {\n\t/** The coupon code as registered. */\n\tcoupon: string;\n\t/** Price for the plan and period before the coupon. */\n\tprice_before_discount: number;\n\tdiscount_amount: number;\n\t/** Final price with the coupon. */\n\tprice: number;\n\t/** Payment methods the coupon allows, same rule as `APIOrderCreateResponse.allowed_payment_methods`. */\n\tallowed_payment_methods: OrderProvider[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport interface APIOrderDiscount {\n\t/** `null` when no coupon was applied. */\n\tpercent: number | null;\n\tcoupon: string | null;\n\t/** Price before the discount. */\n\tprice: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/order-status\n */\nexport interface APIOrderStatus {\n\tid: string;\n\tstatus: OrderStatus;\n\tprice: number;\n\trelated_to: { plan: { name: string; months: number } };\n\t/** Same semantics as in {@link APIOrderCreateResponse.allowed_payment_methods}. */\n\tallowed_payment_methods: OrderProvider[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/list-orders\n */\nexport interface APIOrderListItem {\n\tid: string;\n\tstatus: OrderStatus;\n\tprice: number;\n\tprovider: OrderProvider;\n\ttype: OrderType;\n\trelated_to: { plan: { name: string; duration: number; months: number } };\n\tcreated_at: ISODateString;\n\tpaid_at: ISODateString | null;\n\t/** A payment receipt exists for this order (`GET /v1/orders/:orderId/receipt`). */\n\thas_receipt: boolean;\n}\n\n/**\n * Payment receipt of a paid order (`GET /v1/orders/:orderId/receipt`). Dashboard session only.\n */\nexport interface APIOrderReceipt {\n\t/** Public page of the receipt, hosted by the payment processor. */\n\turl: string;\n}\n\n/**\n * PIX charge of an order (`POST /v1/orders/:orderId/initiate/pix`).\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/initiate-pix\n */\nexport interface APIOrderPixPayment {\n\t/** Amount charged, in BRL. */\n\ttransaction_amount: number;\n\texternal_reference: string | null;\n\ttxid: string;\n\tqrcode: { copy: string | null; base64: string | null };\n}\n\n/**\n * Card charge of an order (`POST /v1/orders/:orderId/pay/card`). Dashboard session only.\n * - `succeeded`: paid; the plan is delivered in a few seconds.\n * - `requires_action`: the bank asks the customer to confirm (3-D Secure) in the browser with `client_secret`.\n * - `processing`: the bank is still confirming; poll the order status.\n */\nexport interface APIOrderCardPayment {\n\tclient_secret: string;\n\tstatus: OrderCardPaymentStatus;\n}\n\nexport type OrderCardPaymentStatus = \"succeeded\" | \"requires_action\" | \"processing\";\nexport const OrderCardPaymentStatus = {\n\tSUCCEEDED: \"succeeded\",\n\tREQUIRES_ACTION: \"requires_action\",\n\tPROCESSING: \"processing\",\n} as const;\n","import type { ApplicationType, DatabaseType, ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport type ResourceType = 1 | 2;\nexport const ResourceType = {\n\tAPPLICATION: 1,\n\tDATABASE: 2,\n} as const;\n\n/**\n * `resource_type` of a snapshot: the resource's own type at snapshot time — `ApplicationType` for\n * an application snapshot, `DatabaseType` (the engine) for a database snapshot.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport type SnapshotResourceType = ApplicationType | DatabaseType;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport interface APIResourceSnapshot {\n\tid: SnowFlake;\n\tresource_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tresource_type: SnapshotResourceType | null;\n\tsize: string;\n\tdate: ISODateString;\n\t/**\n\t * Name the resource had when this snapshot was taken — frozen: it does not follow renames and\n\t * is kept after the project is deleted. `null` for snapshots taken before this field existed.\n\t * For the CURRENT resource name, use `APIGroupedResourceSnapshots.resource_name`.\n\t */\n\tresource_name: string | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport interface APIGroupedResourceSnapshots {\n\tresource_id: SnowFlake;\n\t/**\n\t * CURRENT resource name. If the resource was deleted, falls back to the `resource_name` of the\n\t * group's most recent snapshot; `null` only when neither exists.\n\t */\n\tresource_name: string | null;\n\ttype: ResourceType;\n\tresource_type: SnapshotResourceType | null;\n\tsnapshots: APIResourceSnapshot[];\n}\n\n/**\n * Query of the snapshot routes under `/v1/users/...`: which kind of resource the snapshot belongs\n * to. Required — a missing `scope` returns 400.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport type SnapshotScope = \"applications\" | \"databases\";\nexport const SnapshotScope = {\n\tAPPLICATIONS: \"applications\",\n\tDATABASES: \"databases\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/snapshots/restore\n */\nexport interface APISnapshotRestoreResponse {\n\tmessage: string;\n}\n","/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/services/status\n */\nexport type StatusType = \"healthy\" | \"degraded\" | \"unknown\";\nexport const StatusType = {\n\tHEALTHY: \"healthy\",\n\tDEGRADED: \"degraded\",\n\tUNKNOWN: \"unknown\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/services/status\n */\nexport interface APIStatus {\n\tstatus: StatusType;\n\tmessage: string;\n}\n","import type { ISODateString, UserPlan } from \"../../v1\";\nimport type { APIApplication, APIDatabase, APIWorkspaceResourceOrganization } from \"./index\";\n\n/**\n * Dashboard and e-mail language of the account.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport type UserLanguage = \"pt-br\" | \"en-us\" | \"es-es\";\nexport const UserLanguage = {\n\tPT_BR: \"pt-br\",\n\tEN_US: \"en-us\",\n\tES_ES: \"es-es\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport interface APIUser {\n\tid: string;\n\tname: string;\n\temail: string;\n\tplan_id: UserPlan;\n\tlanguage: UserLanguage;\n\t/** Accepts workspace invites by e-mail (`WORKSPACE_INVITES_DISABLED` when off). */\n\tworkspace_invites_enabled: boolean;\n\t/** Receives promotional e-mails (offers and product announcements). Account notices are always sent. */\n\tmarketing_emails_enabled: boolean;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\nexport interface APIUserConnection {\n\tprovider: string;\n\tusername: string;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport interface APIUserInfoResponse extends APIUser {\n\tplan: APIUserPlan;\n\tapplications: APIApplication[];\n\tdatabases: APIDatabase[];\n\tconnections: APIUserConnection[];\n\t/** Saved resource organization (folders, favorites) of this account. */\n\tresource_organization: APIWorkspaceResourceOrganization;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport interface APIUserPlanMemory {\n\tlimit: number;\n\tused: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport interface APIUserPlan {\n\tid: UserPlan;\n\tname: string;\n\texpires_at: ISODateString | null;\n\tduration: number;\n\tmemory: APIUserPlanMemory;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/sessions\n */\nexport interface APIUserSession {\n\tid: string;\n\tuser_id: string;\n\tprovider: string;\n\tip_address: string | null;\n\tlocation: string | null;\n\tdevice: string | null;\n\texpires_at: ISODateString;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tis_current: boolean;\n}\n\n/**\n * Legacy response of `POST /me/generate-api-key` (CLI). Prefer `/me/api-keys`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/api-keys/create\n */\nexport interface APIUserApiKey {\n\tapi_key: string;\n}\n\n/**\n * A request made to the API with one of the user's keys. Dashboard only\n * (`GET /v1/users/me/api-key/requests` rejects API key authentication). Kept for 30 days.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/api-key-requests\n */\nexport interface APIUserApiKeyRequestEvent {\n\tid: string;\n\t/** Public prefix of the key used; `null` if the key has been deleted. */\n\tapi_key_prefix: string | null;\n\tapi_key_id: string | null;\n\tmethod: string;\n\t/** Route pattern (`/v1/apps/:id`). */\n\troute: string;\n\t/** Concrete path, without the query string. */\n\tpath: string | null;\n\tip: string | null;\n\tuser_agent: string | null;\n\tstatus: number;\n\tduration_ms: number;\n\tbytes_in: number | null;\n\tbytes_out: number | null;\n\terror_code: string | null;\n\t/** Request/response body, only for routes that carry no secrets (lifecycle, config, snapshots, network); JSON ≤ 4 KB with secrets redacted. `null` for every other route. */\n\trequest_body: string | null;\n\tresponse_body: string | null;\n\toccurred_at: ISODateString;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,iBAAiB;AAAA,EAC7B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AACP;AAIO,IAAM,qBAAqB;AAAA,EACjC,KAAK;AAAA,EACL,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACR;AAIO,IAAM,iBAAiB;AAAA,EAC7B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AACR;;;ACCO,IAAM,iBAAiB;AAAA,EAC7B,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,eAAe;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AAA,EACxB,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AACV;AAMO,IAAM,gBAAgB;AAAA,EAC5B,KAAK;AAAA,EACL,MAAM;AAAA,EACN,aAAa;AACd;AAiHO,IAAM,yBAAyB;AAAA,EACrC,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,YAAY;AACb;;;AC9IO,IAAM,eAAe;AAAA,EAC3B,aAAa;AAAA,EACb,UAAU;AACX;AAiDO,IAAM,gBAAgB;AAAA,EAC5B,cAAc;AAAA,EACd,WAAW;AACZ;;;ACzDO,IAAM,aAAa;AAAA,EACzB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACV;;;ACAO,IAAM,eAAe;AAAA,EAC3B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;","names":[]}
|
|
1
|
+
{"version":3,"sources":["index.ts","activity.ts","api-key.ts","workspace.ts","api-error.ts","application.ts","billing.ts","database.ts","database-data.ts","notification.ts","oauth.ts","orders.ts","snapshot.ts","status.ts","user.ts"],"sourcesContent":["export * from \"./activity\";\nexport * from \"./api-key\";\nexport * from \"./api-error\";\nexport * from \"./application\";\nexport * from \"./billing\";\nexport * from \"./database\";\nexport * from \"./database-data\";\nexport * from \"./notification\";\nexport * from \"./oauth\";\nexport * from \"./orders\";\nexport * from \"./redeem\";\nexport * from \"./snapshot\";\nexport * from \"./status\";\nexport * from \"./user\";\nexport * from \"./workspace\";\n","import type { ISODateString, SnowFlake } from \"../../v1\";\nimport type { LocalizedContent } from \"./notification\";\n\n/** Dashboard session only (not reachable with an API key). */\nexport type ActivityStatus = \"success\" | \"warning\" | \"error\" | \"info\";\nexport const ActivityStatus = {\n\tSuccess: \"success\",\n\tWarning: \"warning\",\n\tError: \"error\",\n\tInfo: \"info\",\n} as const;\n\n/** Dashboard session only (not reachable with an API key). */\nexport type ActivityTargetType = \"app\" | \"database\" | \"workspace\" | \"audit\";\nexport const ActivityTargetType = {\n\tApp: \"app\",\n\tDatabase: \"database\",\n\tWorkspace: \"workspace\",\n\tAudit: \"audit\",\n} as const;\n\n/** Dashboard session only (not reachable with an API key). */\nexport type ActivityOrigin = \"user\" | \"agent\" | \"api_key\" | \"system\" | \"admin\";\nexport const ActivityOrigin = {\n\tUser: \"user\",\n\tAgent: \"agent\",\n\tApiKey: \"api_key\",\n\tSystem: \"system\",\n\tAdmin: \"admin\",\n} as const;\n\n/** Dashboard session only (not reachable with an API key). */\nexport interface APIActivity {\n\tid: SnowFlake;\n\tstatus: ActivityStatus;\n\ttarget_id: string;\n\ttarget_type: ActivityTargetType;\n\tauthor_id: SnowFlake | null;\n\t/** Workspace the resource belonged to; `null` outside a workspace. */\n\tworkspace_id: SnowFlake | null;\n\t/** Who generated the activity; `null` when `origin` has no human author (`system`). */\n\tauthor: { id: SnowFlake; display_name: string } | null;\n\torigin: ActivityOrigin;\n\ttitle: LocalizedContent;\n\tmessage: LocalizedContent;\n\ttimestamp: ISODateString;\n}\n","import type { ISODateString } from \"../../common/v1\";\n\n/**\n * API key scope, in the form `<resource>:<action>`. Presets: `read` = every `*:read`;\n * `write` = `read` + every `*:write`; `full` = all of them, including the ones without a\n * `read`/`write` suffix (delete, envs, files, credentials).\n * @see https://docs.vertracloud.app/api-reference/introduction#scopes\n */\nexport type APIApiKeyScope =\n\t| \"apps:read\"\n\t| \"apps:write\"\n\t| \"apps:delete\"\n\t| \"apps:envs\"\n\t| \"apps:files\"\n\t| \"databases:read\"\n\t| \"databases:write\"\n\t| \"databases:delete\"\n\t| \"databases:credentials\"\n\t| \"snapshots:read\"\n\t| \"snapshots:write\"\n\t| \"account:read\"\n\t| \"account:write\"\n\t| \"workspaces:read\"\n\t| \"workspaces:write\"\n\t| \"workspaces:delete\"\n\t| \"workspaces:invites\"\n\t| \"billing:read\"\n\t| \"billing:write\"\n\t| \"redeem:write\";\n\nexport const APIApiKeyScope = {\n\tAPPS_READ: \"apps:read\",\n\tAPPS_WRITE: \"apps:write\",\n\tAPPS_DELETE: \"apps:delete\",\n\tAPPS_ENVS: \"apps:envs\",\n\tAPPS_FILES: \"apps:files\",\n\tDATABASES_READ: \"databases:read\",\n\tDATABASES_WRITE: \"databases:write\",\n\tDATABASES_DELETE: \"databases:delete\",\n\tDATABASES_CREDENTIALS: \"databases:credentials\",\n\tSNAPSHOTS_READ: \"snapshots:read\",\n\tSNAPSHOTS_WRITE: \"snapshots:write\",\n\tACCOUNT_READ: \"account:read\",\n\tACCOUNT_WRITE: \"account:write\",\n\tWORKSPACES_READ: \"workspaces:read\",\n\tWORKSPACES_WRITE: \"workspaces:write\",\n\tWORKSPACES_DELETE: \"workspaces:delete\",\n\tWORKSPACES_INVITES: \"workspaces:invites\",\n\tBILLING_READ: \"billing:read\",\n\tBILLING_WRITE: \"billing:write\",\n\tREDEEM_WRITE: \"redeem:write\",\n} as const satisfies Record<string, APIApiKeyScope>;\n\nexport type APIApiKeyPreset = \"read\" | \"write\" | \"full\";\nexport const APIApiKeyPreset = { Read: \"read\", Write: \"write\", Full: \"full\" } as const;\n\nexport type APIApiKeyRouteMethod = \"GET\" | \"POST\" | \"PUT\" | \"PATCH\" | \"DELETE\";\n\nexport interface APIApiKeyRoute {\n\tmethod: APIApiKeyRouteMethod;\n\t/** Full route pattern with `:param` placeholders (`/v1/apps/:id/files`). Matched exactly, no regex. */\n\tpath: string;\n}\n\nexport interface APIApiKeyScopeEntry {\n\t/** Display group the scope belongs to. */\n\tgroup: \"apps\" | \"databases\" | \"snapshots\" | \"account\" | \"workspaces\" | \"billing\";\n\troutes: APIApiKeyRoute[];\n}\n\n/**\n * Closed catalog of the routes an API key can reach, per scope. A key without the route's scope\n * gets 403 `API_KEY_SCOPE_DENIED`; a route that is not listed here always returns 403 to an API key.\n *\n * Intentionally left out (dashboard session only): key management, creating workspace invites\n * (an invite would outlive the key's revocation), revoking sessions, plan downgrade, and the\n * database **Data** tab (`/v1/databases/:id/data/*`).\n *\n * The rollback `POST` with `restore_environment: true` also requires `apps:envs` for an API key;\n * without it the request returns 403 `API_KEY_SCOPE_DENIED`.\n */\nexport const API_KEY_SCOPES: Record<APIApiKeyScope, APIApiKeyScopeEntry> = {\n\t\"apps:read\": {\n\t\tgroup: \"apps\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/apps/runtimes\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/status\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/status\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/realtime\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/metrics\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/logs\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/download\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/deploys\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/deploys/webhook\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/releases\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/releases/:release_id/log\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/network/custom\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/network/dns\" },\n\t\t],\n\t},\n\t\"apps:write\": {\n\t\tgroup: \"apps\",\n\t\troutes: [\n\t\t\t{ method: \"POST\", path: \"/v1/apps\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/start\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/stop\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/restart\" },\n\t\t\t{ method: \"PATCH\", path: \"/v1/apps/:id/config\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/deploys/webhook\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/apps/:id/deploys/webhook\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/network/custom\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/apps/:id/network/custom\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/network/purge-cache\" },\n\t\t\t{ method: \"PATCH\", path: \"/v1/apps/:id/network/subdomain\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/network/publish\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/apps/:id/network/publish\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/releases/:release_id/rollback\" },\n\t\t],\n\t},\n\t\"apps:delete\": { group: \"apps\", routes: [{ method: \"DELETE\", path: \"/v1/apps/:id\" }] },\n\t\"apps:envs\": {\n\t\tgroup: \"apps\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/envs\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/envs\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/apps/:id/envs/:envId\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/releases/:release_id/rollback\" },\n\t\t],\n\t},\n\t\"apps:files\": {\n\t\tgroup: \"apps\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/files\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/files/tree\" },\n\t\t\t{ method: \"GET\", path: \"/v1/apps/:id/files/content\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/apps/:id/files\" },\n\t\t\t{ method: \"PATCH\", path: \"/v1/apps/:id/files\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/apps/:id/files\" },\n\t\t\t{ method: \"POST\", path: \"/v1/apps/:id/files/upload\" },\n\t\t],\n\t},\n\t\"databases:read\": {\n\t\tgroup: \"databases\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/databases/status\" },\n\t\t\t{ method: \"GET\", path: \"/v1/databases/:id\" },\n\t\t\t{ method: \"GET\", path: \"/v1/databases/:id/status\" },\n\t\t\t{ method: \"GET\", path: \"/v1/databases/:id/metrics\" },\n\t\t],\n\t},\n\t\"databases:write\": {\n\t\tgroup: \"databases\",\n\t\troutes: [\n\t\t\t{ method: \"POST\", path: \"/v1/databases\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/databases/:id\" },\n\t\t\t{ method: \"POST\", path: \"/v1/databases/:id/start\" },\n\t\t\t{ method: \"POST\", path: \"/v1/databases/:id/stop\" },\n\t\t\t{ method: \"POST\", path: \"/v1/databases/:id/reset\" },\n\t\t],\n\t},\n\t\"databases:delete\": { group: \"databases\", routes: [{ method: \"DELETE\", path: \"/v1/databases/:id\" }] },\n\t\"databases:credentials\": {\n\t\tgroup: \"databases\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/databases/:id/credentials/certificate\" },\n\t\t\t{ method: \"POST\", path: \"/v1/databases/:id/credentials/certificate/reset\" },\n\t\t\t{ method: \"POST\", path: \"/v1/databases/:id/credentials/reset\" },\n\t\t],\n\t},\n\t\"snapshots:read\": {\n\t\tgroup: \"snapshots\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/users/snapshots\" },\n\t\t\t{ method: \"GET\", path: \"/v1/users/:id/snapshots\" },\n\t\t\t{ method: \"GET\", path: \"/v1/users/:id/snapshots/:snapshot_id/download\" },\n\t\t],\n\t},\n\t\"snapshots:write\": {\n\t\tgroup: \"snapshots\",\n\t\troutes: [\n\t\t\t{ method: \"POST\", path: \"/v1/users/:id/snapshots\" },\n\t\t\t{ method: \"POST\", path: \"/v1/users/:id/snapshots/:snapshot_id/restore\" },\n\t\t],\n\t},\n\t\"account:read\": {\n\t\tgroup: \"account\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/users/me\" },\n\t\t\t{ method: \"GET\", path: \"/v1/users/me/sessions\" },\n\t\t],\n\t},\n\t\"account:write\": {\n\t\tgroup: \"account\",\n\t\troutes: [\n\t\t\t{ method: \"PATCH\", path: \"/v1/users/me\" },\n\t\t\t{ method: \"POST\", path: \"/v1/users/me/folders\" },\n\t\t\t{ method: \"PATCH\", path: \"/v1/users/me/folders/:folder_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/users/me/folders/:folder_id\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/users/me/folders/:folder_id/resources/:resource_type/:resource_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/users/me/folders/:folder_id/resources/:resource_type/:resource_id\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/users/me/favorites/:resource_type/:resource_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/users/me/favorites/:resource_type/:resource_id\" },\n\t\t],\n\t},\n\t\"workspaces:read\": {\n\t\tgroup: \"workspaces\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces\" },\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces/:id\" },\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces/:id/members\" },\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces/:id/roles\" },\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces/:id/action-requests\" },\n\t\t],\n\t},\n\t\"workspaces:write\": {\n\t\tgroup: \"workspaces\",\n\t\troutes: [\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/workspaces/:id\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/workspaces/:id/members/:user_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/members/:user_id\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/:id/roles\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/workspaces/:id/roles/:role_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/roles/:role_id\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/:id/apps/:app_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/apps/:app_id\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/:id/databases/:db_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/databases/:db_id\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/:id/folders\" },\n\t\t\t{ method: \"PATCH\", path: \"/v1/workspaces/:id/folders/:folder_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/folders/:folder_id\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/workspaces/:id/folders/:folder_id/resources/:resource_type/:resource_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/folders/:folder_id/resources/:resource_type/:resource_id\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/workspaces/:id/favorites/:resource_type/:resource_id\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/favorites/:resource_type/:resource_id\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/:id/action-requests\" },\n\t\t],\n\t},\n\t/**\n\t * Intentionally left out (dashboard session only): creating invites (a leaked key could grant\n\t * access that outlives its revocation), transferring ownership, approving/rejecting action\n\t * requests (approval is a human decision) and exporting activities.\n\t */\n\t/** Delete a workspace (soft delete). Only in the `full` preset, like `apps:delete`. */\n\t\"workspaces:delete\": {\n\t\tgroup: \"workspaces\",\n\t\troutes: [{ method: \"DELETE\", path: \"/v1/workspaces/:id\" }],\n\t},\n\t/** List and revoke workspace invites; view, accept and decline your own invite by token. Only in the `full` preset. */\n\t\"workspaces:invites\": {\n\t\tgroup: \"workspaces\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces/:id/invites\" },\n\t\t\t{ method: \"DELETE\", path: \"/v1/workspaces/:id/invites/:invite_id\" },\n\t\t\t{ method: \"GET\", path: \"/v1/workspaces/invites/:token\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/invites/:token/accept\" },\n\t\t\t{ method: \"POST\", path: \"/v1/workspaces/invites/:token/decline\" },\n\t\t],\n\t},\n\t\"billing:read\": {\n\t\tgroup: \"billing\",\n\t\troutes: [\n\t\t\t{ method: \"GET\", path: \"/v1/orders\" },\n\t\t\t{ method: \"GET\", path: \"/v1/orders/:orderId/status\" },\n\t\t\t{ method: \"GET\", path: \"/v1/users/me/billing\" },\n\t\t],\n\t},\n\t/**\n\t * Creates a plan order and generates the PIX charge; the payment itself is made by a person in their banking app.\n\t * Also saves the billing details (name, address, CPF/CNPJ) an order needs.\n\t */\n\t\"billing:write\": {\n\t\tgroup: \"billing\",\n\t\troutes: [\n\t\t\t{ method: \"POST\", path: \"/v1/orders\" },\n\t\t\t{ method: \"POST\", path: \"/v1/orders/:orderId/initiate/pix\" },\n\t\t\t{ method: \"PUT\", path: \"/v1/users/me/billing\" },\n\t\t],\n\t},\n\t\"redeem:write\": { group: \"billing\", routes: [{ method: \"POST\", path: \"/v1/redeem/:code\" }] },\n};\n\nexport const API_KEY_SCOPE_LIST = Object.keys(API_KEY_SCOPES) as APIApiKeyScope[];\n\n/** Scopes selected by a preset. `full` is the whole catalog. */\nexport function apiKeyPresetScopes(preset: APIApiKeyPreset): APIApiKeyScope[] {\n\tif (preset === \"full\") return API_KEY_SCOPE_LIST;\n\treturn API_KEY_SCOPE_LIST.filter((s) => s.endsWith(\":read\") || (preset === \"write\" && s.endsWith(\":write\")));\n}\n\n/** Maximum keys per account, entries in `allowed_ips`, and key name length. */\nexport const API_KEY_MAX_PER_USER = 10;\nexport const API_KEY_MAX_ALLOWED_IPS = 20;\nexport const API_KEY_NAME_MAX_LENGTH = 40;\n\n/**\n * An API key as listed. The secret is returned only ONCE, in `APIApiKeyCreated`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/api-keys/list\n */\nexport interface APIApiKey {\n\tid: string;\n\tname: string;\n\t/** Public start of the key (`vc_live_a1b2c3d4`; older keys: 8 hex characters). */\n\tprefix: string;\n\t/** Last 4 characters; `null` for keys generated before the `vc_live_` format. */\n\tlast4: string | null;\n\tscopes: APIApiKeyScope[];\n\t/** Allowed IPs/CIDRs. Empty list = any IP. */\n\tallowed_ips: string[];\n\tcreated_at: ISODateString;\n\tlast_used_at: ISODateString | null;\n}\n\nexport interface APIApiKeyCreated extends APIApiKey {\n\t/** The full secret. Shown once; it cannot be recovered. */\n\tapi_key: string;\n}\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\nimport type { APIApplication, APIDatabase } from \"./index\";\n\n/**\n * Granular workspace permission. Display group in `WORKSPACE_PERMISSIONS`.\n * The owner (`owner_id`) has no entry here: owner-only actions (rename/delete the workspace,\n * link/unlink projects, deploy webhook, web publishing) are allowed for the\n * owner only, never through a permission.\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/get\n */\nexport type WorkspacePermission =\n\t| \"apps:read\"\n\t| \"apps:manage\"\n\t| \"apps:lifecycle\"\n\t| \"apps:envs\"\n\t| \"apps:files\"\n\t| \"apps:delete\"\n\t| \"databases:read\"\n\t| \"databases:manage\"\n\t| \"databases:lifecycle\"\n\t| \"databases:credentials\"\n\t| \"databases:data\"\n\t| \"databases:delete\"\n\t| \"snapshots:read\"\n\t| \"snapshots:manage\"\n\t| \"members:read\"\n\t| \"members:manage\"\n\t| \"roles:manage\"\n\t| \"activities:read\";\n\nexport const WorkspacePermission = {\n\tAPPS_READ: \"apps:read\",\n\tAPPS_MANAGE: \"apps:manage\",\n\tAPPS_LIFECYCLE: \"apps:lifecycle\",\n\tAPPS_ENVS: \"apps:envs\",\n\tAPPS_FILES: \"apps:files\",\n\tAPPS_DELETE: \"apps:delete\",\n\tDATABASES_READ: \"databases:read\",\n\tDATABASES_MANAGE: \"databases:manage\",\n\tDATABASES_LIFECYCLE: \"databases:lifecycle\",\n\tDATABASES_CREDENTIALS: \"databases:credentials\",\n\tDATABASES_DATA: \"databases:data\",\n\tDATABASES_DELETE: \"databases:delete\",\n\tSNAPSHOTS_READ: \"snapshots:read\",\n\tSNAPSHOTS_MANAGE: \"snapshots:manage\",\n\tMEMBERS_READ: \"members:read\",\n\tMEMBERS_MANAGE: \"members:manage\",\n\tROLES_MANAGE: \"roles:manage\",\n\tACTIVITIES_READ: \"activities:read\",\n} as const satisfies Record<string, WorkspacePermission>;\n\nexport interface WorkspacePermissionEntry {\n\tgroup: \"apps\" | \"databases\" | \"snapshots\" | \"members\" | \"roles\" | \"activities\";\n}\n\n/**\n * Closed catalog of workspace permissions. A member whose role lacks the permission a route\n * requires gets 403 `WORKSPACE_PERMISSION_DENIED`.\n */\nexport const WORKSPACE_PERMISSIONS: Record<WorkspacePermission, WorkspacePermissionEntry> = {\n\t\"apps:read\": { group: \"apps\" },\n\t\"apps:manage\": { group: \"apps\" },\n\t\"apps:lifecycle\": { group: \"apps\" },\n\t\"apps:envs\": { group: \"apps\" },\n\t\"apps:files\": { group: \"apps\" },\n\t\"apps:delete\": { group: \"apps\" },\n\t\"databases:read\": { group: \"databases\" },\n\t\"databases:manage\": { group: \"databases\" },\n\t\"databases:lifecycle\": { group: \"databases\" },\n\t\"databases:credentials\": { group: \"databases\" },\n\t\"databases:data\": { group: \"databases\" },\n\t\"databases:delete\": { group: \"databases\" },\n\t\"snapshots:read\": { group: \"snapshots\" },\n\t\"snapshots:manage\": { group: \"snapshots\" },\n\t\"members:read\": { group: \"members\" },\n\t\"members:manage\": { group: \"members\" },\n\t\"roles:manage\": { group: \"roles\" },\n\t\"activities:read\": { group: \"activities\" },\n};\n\nexport const WORKSPACE_PERMISSION_LIST = Object.keys(WORKSPACE_PERMISSIONS) as WorkspacePermission[];\n\n/**\n * Seed role, created together with the workspace. It can be renamed and deleted like any other\n * role (it becomes a regular role; `preset` is not restored) and counts toward the plan's role limit.\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/get\n */\nexport type WorkspaceRolePreset = \"admin\" | \"developer\" | \"operator\" | \"viewer\";\nexport const WorkspaceRolePreset = {\n\tAdmin: \"admin\",\n\tDeveloper: \"developer\",\n\tOperator: \"operator\",\n\tViewer: \"viewer\",\n} as const satisfies Record<string, WorkspaceRolePreset>;\n\n/**\n * Permissions a seed role gets when the workspace is created. `admin` does NOT include\n * `snapshots:manage` (restoring/deleting snapshots is destructive); the owner can grant it per role.\n */\nexport function workspacePresetPermissions(preset: WorkspaceRolePreset): WorkspacePermission[] {\n\tswitch (preset) {\n\t\tcase \"admin\":\n\t\t\treturn WORKSPACE_PERMISSION_LIST.filter((p) => p !== \"snapshots:manage\");\n\t\tcase \"developer\":\n\t\t\treturn [\"apps:read\", \"apps:manage\", \"apps:lifecycle\", \"apps:envs\", \"apps:files\", \"databases:read\", \"databases:manage\", \"databases:lifecycle\", \"databases:credentials\", \"databases:data\", \"snapshots:read\", \"members:read\", \"activities:read\"];\n\t\tcase \"operator\":\n\t\t\treturn [\"apps:read\", \"apps:lifecycle\", \"databases:read\", \"databases:lifecycle\", \"snapshots:read\", \"members:read\", \"activities:read\"];\n\t\tcase \"viewer\":\n\t\t\treturn [\"apps:read\", \"databases:read\", \"snapshots:read\", \"members:read\", \"activities:read\"];\n\t}\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/roles/list\n */\nexport interface APIWorkspaceRole {\n\tid: SnowFlake;\n\tworkspace_id: SnowFlake;\n\tname: string;\n\tpermissions: WorkspacePermission[];\n\t/** Seed role it came from; `null` for a manually created role. Informational only. */\n\tpreset: WorkspaceRolePreset | null;\n\t/** Display order. */\n\tposition: number;\n\tmembers_count: number;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/members/list\n */\nexport interface APIWorkspaceMember {\n\tuser_id: SnowFlake;\n\trole_id: SnowFlake;\n\trole_name: string;\n\tjoined_at: ISODateString;\n\t/** When the member's access expires; `null` = never. */\n\texpires_at: ISODateString | null;\n\tuser: {\n\t\tdisplay_name: string;\n\t\temail: string;\n\t};\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/get\n */\nexport interface APIWorkspace {\n\tid: SnowFlake;\n\tname: string;\n\tdescription: string | null;\n\towner_id: SnowFlake;\n\towner: { display_name: string };\n\tmembers_count: number;\n\t/** Soft delete timestamp. `null` = active. */\n\tdeleted_at: ISODateString | null;\n\t/**\n\t * `true` when the OWNER's plan does not include workspaces (it expired or was downgraded):\n\t * reads keep working, every write returns `PLAN_RESTRICTED_FEATURE`. Nobody is removed — the\n\t * owner must upgrade to unfreeze it.\n\t */\n\tfrozen: boolean;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/get\n */\nexport interface APIWorkspaceInfoResponse extends APIWorkspace {\n\tmembers: APIWorkspaceMember[];\n\troles: APIWorkspaceRole[];\n\tapplications: APIApplication[];\n\tdatabases: APIDatabase[];\n\t/** Resolved permissions of the caller. The owner always gets the full list, regardless of role. */\n\tpermissions: WorkspacePermission[];\n\tis_owner: boolean;\n\t/** Owner's plan — it determines which features the workspace has. */\n\towner_plan_id: UserPlan;\n\t/** The caller's saved resource organization (folders, favorites) in this workspace. */\n\tresource_organization: APIWorkspaceResourceOrganization;\n}\n\nexport type WorkspaceResourceType = \"application\" | \"database\";\nexport const WorkspaceResourceType = { Application: \"application\", Database: \"database\" } as const satisfies Record<string, WorkspaceResourceType>;\n\nexport type WorkspaceResourceOrganizationScope = \"personal\" | \"workspace\";\nexport const WorkspaceResourceOrganizationScope = { Personal: \"personal\", Workspace: \"workspace\" } as const satisfies Record<string, WorkspaceResourceOrganizationScope>;\n\nexport type WorkspaceFolderColor = \"neutral\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"blue\" | \"purple\";\nexport const WorkspaceFolderColor = { Neutral: \"neutral\", Red: \"red\", Orange: \"orange\", Yellow: \"yellow\", Green: \"green\", Blue: \"blue\", Purple: \"purple\" } as const satisfies Record<string, WorkspaceFolderColor>;\nexport const WORKSPACE_FOLDER_COLORS = Object.values(WorkspaceFolderColor) as WorkspaceFolderColor[];\n\nexport interface APIWorkspaceResourceRef {\n\tresource_type: WorkspaceResourceType;\n\tresource_id: SnowFlake;\n}\n\nexport interface APIWorkspaceFolderItem extends APIWorkspaceResourceRef {\n\tposition: number;\n}\n\nexport interface APIWorkspaceResourceFolder {\n\tid: SnowFlake;\n\tname: string;\n\tcolor: WorkspaceFolderColor;\n\tposition: number;\n\tresources: APIWorkspaceFolderItem[];\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\nexport interface APIWorkspaceFavorite extends APIWorkspaceResourceRef {\n\tposition: number;\n\tcreated_at: ISODateString;\n}\n\nexport interface APIWorkspaceResourceOrganization {\n\tscope: WorkspaceResourceOrganizationScope;\n\tuser_id: SnowFlake;\n\tworkspace_id: SnowFlake | null;\n\tfolders: APIWorkspaceResourceFolder[];\n\tfavorites: APIWorkspaceFavorite[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/invites/list\n */\nexport type WorkspaceInviteKind = \"email\" | \"link\";\nexport const WorkspaceInviteKind = { Email: \"email\", Link: \"link\" } as const satisfies Record<string, WorkspaceInviteKind>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/invites/list\n */\nexport interface APIWorkspaceInvite {\n\tid: SnowFlake;\n\tworkspace_id: SnowFlake;\n\tkind: WorkspaceInviteKind;\n\t/** Bound e-mail; only for `kind: \"email\"`. */\n\temail: string | null;\n\trole_id: SnowFlake;\n\trole_name: string;\n\tinvited_by: { id: SnowFlake; display_name: string };\n\texpires_at: ISODateString;\n\taccepted_at: ISODateString | null;\n\trevoked_at: ISODateString | null;\n\tuses: number;\n\t/** Only for `kind: \"link\"`; `null` = unlimited uses. */\n\tmax_uses: number | null;\n\t/** Access expiration applied to members who join through this invite; `null` = never. */\n\texpires_in_days: number | null;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/invites/create\n */\nexport interface APIWorkspaceInviteCreated extends APIWorkspaceInvite {\n\t/** Invite URL; only for `kind: \"link\"`, shown once. */\n\turl: string | null;\n}\n\n/**\n * What the invitee sees before accepting (`GET /v1/workspaces/invites/:token`).\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/invites/preview\n */\nexport interface APIWorkspaceInvitePreview {\n\tworkspace: { id: SnowFlake; name: string };\n\tinviter: { display_name: string };\n\trole_name: string;\n\tkind: WorkspaceInviteKind;\n\texpires_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/action-requests/list\n */\nexport type WorkspaceActionRequestAction = \"app_delete\" | \"database_delete\" | \"snapshot_create\" | \"snapshot_restore\";\nexport const WorkspaceActionRequestAction = {\n\tAppDelete: \"app_delete\",\n\tDatabaseDelete: \"database_delete\",\n\tSnapshotCreate: \"snapshot_create\",\n\tSnapshotRestore: \"snapshot_restore\",\n} as const satisfies Record<string, WorkspaceActionRequestAction>;\n\nexport type WorkspaceActionRequestStatus = \"pending\" | \"approved\" | \"rejected\" | \"expired\";\nexport const WorkspaceActionRequestStatus = {\n\tPending: \"pending\",\n\tApproved: \"approved\",\n\tRejected: \"rejected\",\n\tExpired: \"expired\",\n} as const satisfies Record<string, WorkspaceActionRequestStatus>;\n\n/**\n * `params` of an action request, per `action`. Actions without parameters take an empty object;\n * unknown keys are rejected with `WORKSPACE_ACTION_INVALID_PARAMS`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/action-requests/create\n */\nexport interface WorkspaceActionRequestParams {\n\tapp_delete: Record<string, never>;\n\tdatabase_delete: Record<string, never>;\n\tsnapshot_create: Record<string, never>;\n\t/** The snapshot must belong to the request's resource. */\n\tsnapshot_restore: { snapshot_id: SnowFlake };\n}\n\ninterface APIWorkspaceActionRequestBase {\n\tid: SnowFlake;\n\tworkspace_id: SnowFlake;\n\tresource_type: WorkspaceResourceType;\n\tresource_id: SnowFlake;\n\tresource_name: string | null;\n\tstatus: WorkspaceActionRequestStatus;\n\trequested_by: { id: SnowFlake; display_name: string };\n\tdecided_by: { id: SnowFlake; display_name: string } | null;\n\tdecided_at: ISODateString | null;\n\texpires_at: ISODateString;\n\tcreated_at: ISODateString;\n}\n\n/**\n * A request for a destructive/sensitive action made by a member who lacks its permission, to be\n * approved by someone who has it. Expires after 24 h without a decision. Discriminated by `action`,\n * which decides the shape of `params`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/action-requests/list\n */\nexport type APIWorkspaceActionRequest = {\n\t[A in WorkspaceActionRequestAction]: APIWorkspaceActionRequestBase & { action: A; params: WorkspaceActionRequestParams[A] };\n}[WorkspaceActionRequestAction];\n\n/**\n * Workspace error codes. Stable English sentinels returned in `code`; clients are expected to\n * translate them.\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces/get\n */\nexport const WORKSPACE_ERROR_CODES = {\n\tWORKSPACE_NOT_FOUND: \"WORKSPACE_NOT_FOUND\",\n\tWORKSPACE_NAME_ALREADY_EXISTS: \"WORKSPACE_NAME_ALREADY_EXISTS\",\n\tWORKSPACE_MEMBER_LIMIT_REACHED: \"WORKSPACE_MEMBER_LIMIT_REACHED\",\n\tWORKSPACE_ROLE_LIMIT_REACHED: \"WORKSPACE_ROLE_LIMIT_REACHED\",\n\tWORKSPACE_ROLE_IN_USE: \"WORKSPACE_ROLE_IN_USE\",\n\tWORKSPACE_ROLE_NOT_FOUND: \"WORKSPACE_ROLE_NOT_FOUND\",\n\tWORKSPACE_ROLE_NAME_ALREADY_EXISTS: \"WORKSPACE_ROLE_NAME_ALREADY_EXISTS\",\n\tWORKSPACE_PERMISSION_DENIED: \"WORKSPACE_PERMISSION_DENIED\",\n\tWORKSPACE_PERMISSION_ESCALATION: \"WORKSPACE_PERMISSION_ESCALATION\",\n\tWORKSPACE_INVITE_NOT_FOUND: \"WORKSPACE_INVITE_NOT_FOUND\",\n\tWORKSPACE_INVITE_EXPIRED: \"WORKSPACE_INVITE_EXPIRED\",\n\tWORKSPACE_INVITE_EMAIL_MISMATCH: \"WORKSPACE_INVITE_EMAIL_MISMATCH\",\n\t/** 400 — the invited account turned off workspace invites by email. */\n\tWORKSPACE_INVITES_DISABLED: \"WORKSPACE_INVITES_DISABLED\",\n\t/** 409 — the account is already the owner or a member of the workspace. */\n\tWORKSPACE_ALREADY_MEMBER: \"WORKSPACE_ALREADY_MEMBER\",\n\tWORKSPACE_OWNER_ONLY: \"WORKSPACE_OWNER_ONLY\",\n\tWORKSPACE_ACTION_REQUEST_NOT_FOUND: \"WORKSPACE_ACTION_REQUEST_NOT_FOUND\",\n\t/** 410 — the request expired before anyone decided on it. */\n\tWORKSPACE_ACTION_REQUEST_EXPIRED: \"WORKSPACE_ACTION_REQUEST_EXPIRED\",\n\t/** 409 — the request was already approved or rejected. */\n\tWORKSPACE_ACTION_REQUEST_ALREADY_DECIDED: \"WORKSPACE_ACTION_REQUEST_ALREADY_DECIDED\",\n\t/** 400 — the requester already has the permission; perform the action directly. */\n\tWORKSPACE_ACTION_NOT_NEEDED: \"WORKSPACE_ACTION_NOT_NEEDED\",\n\t/** 400 — the request `params` failed the action's validation (e.g. a snapshot of another resource). */\n\tWORKSPACE_ACTION_INVALID_PARAMS: \"WORKSPACE_ACTION_INVALID_PARAMS\",\n\t/** 409 — a pending request already exists for the same action on the same resource. */\n\tWORKSPACE_ACTION_REQUEST_PENDING: \"WORKSPACE_ACTION_REQUEST_PENDING\",\n\tWORKSPACE_RESOURCE_FOLDER_NOT_FOUND: \"WORKSPACE_RESOURCE_FOLDER_NOT_FOUND\",\n\tWORKSPACE_RESOURCE_FOLDER_NAME_CONFLICT: \"WORKSPACE_RESOURCE_FOLDER_NAME_CONFLICT\",\n\tWORKSPACE_RESOURCE_NOT_FOUND: \"WORKSPACE_RESOURCE_NOT_FOUND\",\n\tPLAN_RESTRICTED_FEATURE: \"PLAN_RESTRICTED_FEATURE\",\n} as const;\nexport type WorkspaceErrorCode = (typeof WORKSPACE_ERROR_CODES)[keyof typeof WORKSPACE_ERROR_CODES];\n","import { WORKSPACE_ERROR_CODES } from \"./workspace\";\n\n/** Stable error sentinels returned by routes available to API keys. */\nexport const API_ERROR_CODES = {\n\tACCESS_DENIED: \"ACCESS_DENIED\",\n\tAPI_KEY_INVALID: \"API_KEY_INVALID\",\n\t// Key management (`/v1/users/me/api-keys`) — dashboard-session routes.\n\tAPI_KEY_NOT_FOUND: \"API_KEY_NOT_FOUND\",\n\tAPI_KEY_LIMIT_REACHED: \"API_KEY_LIMIT_REACHED\",\n\tAPI_KEY_INVALID_NAME: \"API_KEY_INVALID_NAME\",\n\tAPI_KEY_INVALID_SCOPES: \"API_KEY_INVALID_SCOPES\",\n\tAPI_KEY_INVALID_IPS: \"API_KEY_INVALID_IPS\",\n\tAPI_KEY_IP_DENIED: \"API_KEY_IP_DENIED\",\n\tAPI_KEY_SCOPE_DENIED: \"API_KEY_SCOPE_DENIED\",\n\t/** 403 — the route only accepts a dashboard session; API keys are refused. */\n\tWEBSITE_ONLY: \"WEBSITE_ONLY\",\n\tAUTH_TOKEN_MISSING: \"AUTH_TOKEN_MISSING\",\n\tACCOUNT_BANNED: \"ACCOUNT_BANNED\",\n\tAPP_SHIELD_COOLDOWN: \"APP_SHIELD_COOLDOWN\",\n\tAPP_BANNED: \"APP_BANNED\",\n\tAPP_ALREADY_PUBLISHED: \"APP_ALREADY_PUBLISHED\",\n\tAPP_HAS_NO_SUBDOMAIN: \"APP_HAS_NO_SUBDOMAIN\",\n\tAPP_NOT_FOUND: \"APP_NOT_FOUND\",\n\tAPP_NOT_PUBLISHED: \"APP_NOT_PUBLISHED\",\n\tAPP_ALREADY_IN_WORKSPACE: \"APP_ALREADY_IN_WORKSPACE\",\n\tAPP_NOT_FOUND_IN_WORKSPACE: \"APP_NOT_FOUND_IN_WORKSPACE\",\n\tBUILD_FAILED: \"BUILD_FAILED\",\n\tBUILD_TIMEOUT: \"BUILD_TIMEOUT\",\n\t/** 400 — the order needs complete billing details for the service invoice (name, address and, in Brazil, CPF/CNPJ). Fill them with `PUT /v1/users/me/billing`. */\n\tBILLING_DETAILS_INCOMPLETE: \"BILLING_DETAILS_INCOMPLETE\",\n\t/** 400 — billing details failed validation; the field is in `details.path`. */\n\tBILLING_DETAILS_INVALID: \"BILLING_DETAILS_INVALID\",\n\t/** 402 — the bank refused the card charge. */\n\tCARD_DECLINED: \"CARD_DECLINED\",\n\t/** 400 — the plan can only be paid by PIX. */\n\tCARD_NOT_ALLOWED_FOR_PLAN: \"CARD_NOT_ALLOWED_FOR_PLAN\",\n\tCARD_NOT_FOUND: \"CARD_NOT_FOUND\",\n\tCERTIFICATE_NOT_FOUND: \"CERTIFICATE_NOT_FOUND\",\n\tCLEANUP_LANGUAGE_SAME_AS_CURRENT: \"CLEANUP_LANGUAGE_SAME_AS_CURRENT\",\n\tCONTAINER_ALREADY_RUNNING: \"CONTAINER_ALREADY_RUNNING\",\n\t/** 400 — no active coupon with this code. */\n\tCOUPON_INVALID: \"COUPON_INVALID\",\n\tCOUPON_INACTIVE: \"COUPON_INACTIVE\",\n\tCOUPON_NOT_STARTED: \"COUPON_NOT_STARTED\",\n\tCOUPON_EXPIRED: \"COUPON_EXPIRED\",\n\t/** 400 — the coupon reached its total number of uses. */\n\tCOUPON_EXHAUSTED: \"COUPON_EXHAUSTED\",\n\t/** 400 — the account already used this coupon as many times as allowed. */\n\tCOUPON_USER_LIMIT: \"COUPON_USER_LIMIT\",\n\t/** 400 — the coupon is not available to this account. */\n\tCOUPON_AUDIENCE: \"COUPON_AUDIENCE\",\n\t/** 400 — the coupon does not apply to this plan. */\n\tCOUPON_PLAN: \"COUPON_PLAN\",\n\t/** 400 — the coupon does not apply to this billing period. */\n\tCOUPON_DURATION: \"COUPON_DURATION\",\n\tCOUPON_PAYMENT_METHOD: \"COUPON_PAYMENT_METHOD\",\n\tCUSTOM_DOMAIN_RECORD_NOT_FOUND: \"CUSTOM_DOMAIN_RECORD_NOT_FOUND\",\n\tCUSTOM_DOMAIN_REGISTRATION_FAILED: \"CUSTOM_DOMAIN_REGISTRATION_FAILED\",\n\tDAILY_QUOTA_EXCEEDED: \"DAILY_QUOTA_EXCEEDED\",\n\tDATABASE_NOT_FOUND: \"DATABASE_NOT_FOUND\",\n\tDATABASE_NOT_RUNNING: \"DATABASE_NOT_RUNNING\",\n\tDATABASE_ALREADY_IN_WORKSPACE: \"DATABASE_ALREADY_IN_WORKSPACE\",\n\tDATABASE_NOT_FOUND_IN_WORKSPACE: \"DATABASE_NOT_FOUND_IN_WORKSPACE\",\n\tDATABASE_PERSISTENCE_FAILED: \"DATABASE_PERSISTENCE_FAILED\",\n\tDEPLOY_FAILED: \"DEPLOY_FAILED\",\n\tDEPLOYMENT_NOT_FOUND: \"DEPLOYMENT_NOT_FOUND\",\n\tDEPLOY_RATE_LIMITED: \"DEPLOY_RATE_LIMITED\",\n\tDOMAIN_ALREADY_IN_USE: \"DOMAIN_ALREADY_IN_USE\",\n\tENV_LIMIT_EXCEEDED: \"ENV_LIMIT_EXCEEDED\",\n\tENV_DUPLICATE_KEY: \"ENV_DUPLICATE_KEY\",\n\tENV_NOT_FOUND: \"ENV_NOT_FOUND\",\n\tFILE_TOO_LARGE: \"FILE_TOO_LARGE\",\n\tFILE_MODIFIED: \"FILE_MODIFIED\",\n\tFILE_NOT_FOUND: \"FILE_NOT_FOUND\",\n\tFILE_OR_FOLDER_NOT_FOUND: \"FILE_OR_FOLDER_NOT_FOUND\",\n\tFORBIDDEN: \"FORBIDDEN\",\n\tFORBIDDEN_DOMAIN: \"FORBIDDEN_DOMAIN\",\n\tFORBIDDEN_PATH: \"FORBIDDEN_PATH\",\n\tFORBIDDEN_KEY: \"FORBIDDEN_KEY\",\n\tFORCED_SNAPSHOT_RATE_LIMIT: \"FORCED_SNAPSHOT_RATE_LIMIT\",\n\tFREE_PLAN_NO_WEB_PUBLISH: \"FREE_PLAN_NO_WEB_PUBLISH\",\n\t/** 403 — the Free plan can no longer create applications or databases; a paid plan is required. */\n\tFREE_PLAN_SUSPENDED: \"FREE_PLAN_SUSPENDED\",\n\tINSTALLATION_NOT_FOUND: \"INSTALLATION_NOT_FOUND\",\n\tINSTALL_SHIELD_BLOCKED: \"INSTALL_SHIELD_BLOCKED\",\n\tINSTALL_TIMEOUT: \"INSTALL_TIMEOUT\",\n\tINSTALL_FAILED: \"INSTALL_FAILED\",\n\tINSTALL_CANCELLED: \"INSTALL_CANCELLED\",\n\tINSTALL_OUT_OF_MEMORY: \"INSTALL_OUT_OF_MEMORY\",\n\tINSTALL_QUEUE_FULL: \"INSTALL_QUEUE_FULL\",\n\tINSUFFICIENT_MEMORY: \"INSUFFICIENT_MEMORY\",\n\tINTERNAL_SERVER_ERROR: \"INTERNAL_SERVER_ERROR\",\n\tINVALID_CONFIG: \"INVALID_CONFIG\",\n\tINVALID_CUSTOM_DOMAIN_FORMAT: \"INVALID_CUSTOM_DOMAIN_FORMAT\",\n\tINVALID_HOSTNAME_FOR_APP: \"INVALID_HOSTNAME_FOR_APP\",\n\tINVALID_LANGUAGE: \"INVALID_LANGUAGE\",\n\tINVALID_MEMORY_FORMAT: \"INVALID_MEMORY_FORMAT\",\n\tINVALID_MONTHS: \"INVALID_MONTHS\",\n\tINVALID_OR_EXPIRED_CODE: \"INVALID_OR_EXPIRED_CODE\",\n\tINVALID_PARAMS: \"INVALID_PARAMS\",\n\tINVALID_PAYLOAD: \"INVALID_PAYLOAD\",\n\tINVALID_PATH: \"INVALID_PATH\",\n\tINVALID_PLAN: \"INVALID_PLAN\",\n\tINVALID_PLAN_NAME: \"INVALID_PLAN_NAME\",\n\tINVALID_RAM_LIMIT: \"INVALID_RAM_LIMIT\",\n\tINVALID_RANGE: \"INVALID_RANGE\",\n\tINVALID_SUBDOMAIN_FORMAT: \"INVALID_SUBDOMAIN_FORMAT\",\n\tINVALID_VERSION: \"INVALID_VERSION\",\n\tINVALID_ZIP: \"INVALID_ZIP\",\n\tINVALID_ZIP_STRUCTURE: \"INVALID_ZIP_STRUCTURE\",\n\tMAIN_FILE_NOT_FOUND: \"MAIN_FILE_NOT_FOUND\",\n\tMAX_APPS_REACHED: \"MAX_APPS_REACHED\",\n\tMAX_DATABASES_REACHED: \"MAX_DATABASES_REACHED\",\n\tMEMORY_BELOW_MINIMUM: \"MEMORY_BELOW_MINIMUM\",\n\tMEMORY_LIMIT_EXCEEDED: \"MEMORY_LIMIT_EXCEEDED\",\n\tMEMORY_MUST_BE_INTEGER: \"MEMORY_MUST_BE_INTEGER\",\n\tMEMORY_REQUIRED: \"MEMORY_REQUIRED\",\n\tMISSING_HEADERS: \"MISSING_HEADERS\",\n\tMISSING_PLAN_OR_MONTHS: \"MISSING_PLAN_OR_MONTHS\",\n\tMISSING_CONTENT: \"MISSING_CONTENT\",\n\tNOT_AN_UPGRADE: \"NOT_AN_UPGRADE\",\n\tNO_AUTHORIZED_PATHS: \"NO_AUTHORIZED_PATHS\",\n\tNO_CHANGES_PROVIDED: \"NO_CHANGES_PROVIDED\",\n\tNO_CUSTOM_DOMAIN: \"NO_CUSTOM_DOMAIN\",\n\tNO_FIELDS_TO_UPDATE: \"NO_FIELDS_TO_UPDATE\",\n\tNO_FILE_UPLOADED: \"NO_FILE_UPLOADED\",\n\tOPERATION_IN_PROGRESS: \"OPERATION_IN_PROGRESS\",\n\tORDER_NOT_FOUND: \"ORDER_NOT_FOUND\",\n\tORDER_NOT_PAID: \"ORDER_NOT_PAID\",\n\tORDER_NOT_PAYABLE: \"ORDER_NOT_PAYABLE\",\n\tORDER_NOT_REFUNDED: \"ORDER_NOT_REFUNDED\",\n\t/** 404 — the order has no payment receipt (unpaid, redeemed code or paid before receipts existed). */\n\tORDER_RECEIPT_UNAVAILABLE: \"ORDER_RECEIPT_UNAVAILABLE\",\n\tOWNER_APP_WITHOUT_LIMITS: \"OWNER_APP_WITHOUT_LIMITS\",\n\tPAYLOAD_TOO_LARGE: \"PAYLOAD_TOO_LARGE\",\n\t/** 409 — a folder in the path is an existing file (writing `app/x.js` when `app` is a file). */\n\tPATH_IS_FILE: \"PATH_IS_FILE\",\n\tPENDING_ORDER_LIMIT_REACHED: \"PENDING_ORDER_LIMIT_REACHED\",\n\tPAYMENT_METHOD_UNAVAILABLE: \"PAYMENT_METHOD_UNAVAILABLE\",\n\t/** 403 — the plan does not include automatic rollback (`deploy.auto_rollback: true` below Intermediary). */\n\tPLAN_DOES_NOT_SUPPORT_AUTO_ROLLBACK: \"PLAN_DOES_NOT_SUPPORT_AUTO_ROLLBACK\",\n\tPLAN_DOES_NOT_SUPPORT_CUSTOM_DOMAIN: \"PLAN_DOES_NOT_SUPPORT_CUSTOM_DOMAIN\",\n\tPLAN_DOES_NOT_SUPPORT_CUSTOM_SUBDOMAIN: \"PLAN_DOES_NOT_SUPPORT_CUSTOM_SUBDOMAIN\",\n\t/** 403 — the plan does not include rollback to earlier releases. */\n\tPLAN_DOES_NOT_SUPPORT_ROLLBACK: \"PLAN_DOES_NOT_SUPPORT_ROLLBACK\",\n\tPLAN_DOES_NOT_SUPPORT_WEB_PUBLISH: \"PLAN_DOES_NOT_SUPPORT_WEB_PUBLISH\",\n\t/** 403 — the plan does not include zero-downtime deploys (`deploy.zero_downtime: \"on\"` below Enterprise). */\n\tPLAN_DOES_NOT_SUPPORT_ZERO_DOWNTIME: \"PLAN_DOES_NOT_SUPPORT_ZERO_DOWNTIME\",\n\tPLAN_MISMATCH_FOR_RENEWAL: \"PLAN_MISMATCH_FOR_RENEWAL\",\n\tPLAN_NOT_ALLOWED: \"PLAN_NOT_ALLOWED\",\n\tRATE_LIMIT_EXCEEDED: \"RATE_LIMIT_EXCEEDED\",\n\tREFUND_AMOUNT_EXCEEDS_PRICE: \"REFUND_AMOUNT_EXCEEDS_PRICE\",\n\t/** 409 — the release is already the active one. */\n\tRELEASE_ALREADY_ACTIVE: \"RELEASE_ALREADY_ACTIVE\",\n\t/** 410 — the release's kept code has expired or is outside the limit of the plan. */\n\tRELEASE_EXPIRED: \"RELEASE_EXPIRED\",\n\t/** 404 — the release does not exist or belongs to another application. */\n\tRELEASE_NOT_FOUND: \"RELEASE_NOT_FOUND\",\n\tREPO_ALREADY_LINKED: \"REPO_ALREADY_LINKED\",\n\tRESTORE_COOLDOWN: \"RESTORE_COOLDOWN\",\n\tSNAPSHOT_ENGINE_MISMATCH: \"SNAPSHOT_ENGINE_MISMATCH\",\n\tSNAPSHOT_FAILED: \"SNAPSHOT_FAILED\",\n\tSNAPSHOT_IMPORT_FAILED: \"SNAPSHOT_IMPORT_FAILED\",\n\tSNAPSHOT_NOT_FOUND: \"SNAPSHOT_NOT_FOUND\",\n\tSNAPSHOT_RATE_LIMITED: \"SNAPSHOT_RATE_LIMITED\",\n\tSNAPSHOT_TYPE_MISMATCH: \"SNAPSHOT_TYPE_MISMATCH\",\n\tSNAPSHOT_TOO_LARGE: \"SNAPSHOT_TOO_LARGE\",\n\tSOURCE_CONFLICT: \"SOURCE_CONFLICT\",\n\tSOURCE_REQUIRED: \"SOURCE_REQUIRED\",\n\tSTORAGE_ABOVE_NEW_LIMIT: \"STORAGE_ABOVE_NEW_LIMIT\",\n\tSUBDOMAIN_CHANGE_RATE_LIMITED: \"SUBDOMAIN_CHANGE_RATE_LIMITED\",\n\tSUBDOMAIN_FORBIDDEN: \"SUBDOMAIN_FORBIDDEN\",\n\tSUBDOMAIN_TAKEN: \"SUBDOMAIN_TAKEN\",\n\t/** 400 — the CPF or CNPJ is not valid. */\n\tTAX_ID_INVALID: \"TAX_ID_INVALID\",\n\tTYPE_MISMATCH: \"TYPE_MISMATCH\",\n\tUSER_LIMITS_NOT_FOUND: \"USER_LIMITS_NOT_FOUND\",\n\tUSER_NOT_FOUND: \"USER_NOT_FOUND\",\n\tUSER_NOT_IN_WORKSPACE: \"USER_NOT_IN_WORKSPACE\",\n\tDATABASE_BANNED: \"DATABASE_BANNED\",\n\tVALIDATION_ERROR: \"VALIDATION_ERROR\",\n\tZIP_TOO_LARGE: \"ZIP_TOO_LARGE\",\n\tZIP_TOO_SMALL: \"ZIP_TOO_SMALL\",\n\tSTORAGE_FULL: \"STORAGE_FULL\",\n\tTARGET_IS_DIRECTORY: \"TARGET_IS_DIRECTORY\",\n\t...WORKSPACE_ERROR_CODES,\n} as const;\n\nexport const APIErrorCode = API_ERROR_CODES;\n\nexport type APIErrorCode = (typeof API_ERROR_CODES)[keyof typeof API_ERROR_CODES];\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationLanguage = \"javascript\" | \"typescript\" | \"bun\" | \"python\" | \"static\" | \"php\" | \"go\" | \"ruby\" | \"java\" | \"rust\";\nexport const ApplicationLanguage = {\n\tJAVASCRIPT: \"javascript\",\n\tTYPESCRIPT: \"typescript\",\n\tBUN: \"bun\",\n\tPYTHON: \"python\",\n\tSTATIC: \"static\",\n\tPHP: \"php\",\n\tGO: \"go\",\n\tRUBY: \"ruby\",\n\tJAVA: \"java\",\n\tRUST: \"rust\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationStatus = \"up\" | \"down\";\nexport const ApplicationStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationCluster = number;\nexport const ApplicationCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationType = 1 | 2;\nexport const ApplicationType = {\n\tBOT: 1,\n\tWEBSITE: 2,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/files\n */\nexport type ApplicationFileType = \"file\" | \"directory\";\nexport const ApplicationFileType = {\n\tFILE: \"file\",\n\tDIRECTORY: \"directory\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationVersion = \"recommended\" | \"latest\" | \"auto\" | (string & {});\nexport const ApplicationVersion = {\n\tRECOMMENDED: \"recommended\",\n\tLATEST: \"latest\",\n\tAUTO: \"auto\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/content\n */\nexport type ApplicationFileContentType = \"base64\";\nexport const ApplicationFileContentType = {\n\tBASE64: \"base64\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/files\n */\nexport interface APIApplicationFile {\n\ttype: ApplicationFileType;\n\tname: string;\n\tpath: string;\n\tsize?: string;\n\tlast_modified: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/tree\n */\nexport interface APIApplicationFileTree extends APIApplicationFile {\n\tchildren?: APIApplicationFileTree[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/content\n */\nexport interface APIApplicationFileContent {\n\ttype: \"base64\";\n\t/** File bytes in standard base64 (with padding). */\n\tdata: string;\n\t/** Actual size in bytes (not the length of the base64 string). */\n\tsize: number;\n\t/** File mtime; send it back on PUT (`last_modified`) to detect edit conflicts. */\n\tlast_modified: ISODateString;\n}\n\n/**\n * Successful ZIP upload through `POST /v1/apps/:id/files/upload`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/upload\n */\nexport interface APIApplicationFileUpload {\n\tapp_id: SnowFlake;\n\tupdated_at: ISODateString;\n\tmissing_dependencies: string[];\n\tremoved_directories: string[];\n}\n\n/**\n * Repository linked to the application for auto-deploy. The webhook URL is not included here.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport interface APIApplicationGithub {\n\trepo_owner: string;\n\trepo_name: string;\n}\n\n/**\n * How a new deploy replaces the running version. `auto` = without downtime only when the app receives\n * traffic through web publishing, otherwise with downtime; `on` = always without downtime (Enterprise);\n * `off` = the running version stops before the new one starts.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/updateconfig\n */\nexport type ApplicationZeroDowntime = \"auto\" | \"on\" | \"off\";\nexport const ApplicationZeroDowntime = {\n\tAUTO: \"auto\",\n\tON: \"on\",\n\tOFF: \"off\",\n} as const;\n\n/**\n * Deploy behavior of an application. Changed with `PATCH /v1/apps/:id/config` (`deploy`).\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/updateconfig\n */\nexport interface APIApplicationDeploySettings {\n\t/** The saved choice. Defaults to `auto`. */\n\tzero_downtime: ApplicationZeroDowntime;\n\t/**\n\t * Whether the next deploy runs without downtime. `true` on Enterprise when `zero_downtime` is `on`,\n\t * or when it is `auto` and the app receives traffic through web publishing.\n\t */\n\tzero_downtime_active: boolean;\n\t/**\n\t * If the new version stops within 60 seconds after a deploy, the platform switches back to the\n\t * previous version, once. Acts from the Intermediary plan; the saved value is returned on any plan.\n\t */\n\tauto_rollback: boolean;\n\t/**\n\t * HTTP path the platform calls on the new version before it receives traffic. Any HTTP response,\n\t * including 404, counts as healthy; a refused connection, a timeout or a 5xx counts as a failure.\n\t * Starts with `/`, at most 200 characters, printable ASCII only with no spaces; percent-encode anything\n\t * else (`%20`, `%C3%A9`). `null` = `/`.\n\t */\n\thealth_check_path: string | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport interface APIApplication {\n\tid: SnowFlake;\n\tcluster: ApplicationCluster;\n\ttype: ApplicationType;\n\tname: string;\n\tdescription?: string;\n\towner_id: string; // UUID\n\towner_plan_id: UserPlan; // Owner's plan\n\tlanguage: ApplicationLanguage;\n\tram: number;\n\tstatus: ApplicationStatus;\n\tsubdomain: string | null; // example: \"my-app.vertraweb.app\"\n\t/**\n\t * Canonical public URL of the app, computed by the server (`custom_domain` > `subdomain` >\n\t * `null`). Clients should use it as-is instead of building the URL from the subdomain.\n\t */\n\tpublic_url: string | null;\n\t/**\n\t * GitHub integration of this application, if any. `null` = the source is a zip (or snapshot).\n\t * May be absent in older payloads. The webhook URL is available from\n\t * `GET /v1/apps/:id/deploys/webhook`.\n\t */\n\tgithub?: APIApplicationGithub | null;\n\tcustom_domain: string | null; // example: \"my-app.com.br\"\n\tlast_snapshot: ISODateString | null;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tmain_file: string;\n\tversion: ApplicationVersion;\n\tstart_command: string | null;\n\t/**\n\t * Build command, run once per deploy, after dependencies are installed and before the app\n\t * starts — in the build environment, with more memory than the app. `null` = no build step.\n\t * If it fails, the deploy fails and the app does not start.\n\t */\n\tbuild_command: string | null;\n\toffline_since: ISODateString | null;\n\tmissing_dependencies?: string[]; // Undeclared packages detected on build/deploy\n\t/** Active Vertra Shield containment (burst/rate limit); `null` when there is none. */\n\tshield_cooldown: APIApplicationShieldCooldown | null;\n\t/** Deploy behavior: zero downtime, automatic rollback and health check. */\n\tdeploy: APIApplicationDeploySettings;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport interface APIApplicationNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/status\n */\nexport interface APIApplicationStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\t/** @deprecated Not returned by `GET /v1/apps/:id/status`; use `running`. */\n\tstatus?: ApplicationStatus;\n\trunning: boolean;\n\t/**\n\t * `true` while dependencies are being installed.\n\t *\n\t * During this window the app itself is not running yet, so `running: false` alone does not\n\t * mean the app is stopped. Optional: omitted when no installation is in progress.\n\t */\n\tinstalling?: boolean;\n\tstorage: string;\n\t/** `null` when network usage is unavailable (e.g. the app is stopped). */\n\tnetwork: APIApplicationNetwork | null;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/allstatus\n */\nexport interface APIApplicationStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\t/** Absent when the app's status could not be read. */\n\tstorage?: string;\n\t/** Absent when the app's status could not be read; `null` when network usage is unavailable. */\n\tnetwork?: APIApplicationNetwork | null;\n\trunning: boolean;\n\t/**\n\t * `true` while dependencies are being installed.\n\t *\n\t * During this window the app itself is not running yet, so `running: false` alone does not\n\t * mean the app is stopped. Optional: omitted when no installation is in progress.\n\t */\n\tinstalling?: boolean;\n\t/**\n\t * Seconds since the app started.\n\t *\n\t * A duration, not a point in time — hence `number` rather than `ISODateString`. Same unit and\n\t * type as `APIApplicationStatus.uptime`.\n\t *\n\t * `null` when unknown (the app is stopped or its status could not be read). **`0` is never used\n\t * as a sentinel** — `0` means \"just started\".\n\t */\n\tuptime: number | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/metrics\n */\nexport interface APIApplicationMetric {\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tdate: ISODateString;\n\tnetwork: number[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/create\n */\nexport interface APIApplicationConfig {\n\tNAME: string;\n\tMEMORY: number;\n\tMAIN: string;\n\tVERSION: ApplicationVersion;\n\tDESCRIPTION?: string;\n\tSTART?: string;\n\t/** Build command (see `APIApplication.build_command`). */\n\tBUILD?: string;\n\tSUBDOMAIN?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/get\n */\nexport interface APIApplicationEnvironment {\n\tid: string;\n\tkey: string;\n\tvalue: string;\n\tnote: string | null;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/start\n */\nexport interface APIApplicationOperationResponse {\n\tstatus: \"success\";\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/recents\n */\nexport interface APIApplicationDeployment {\n\tapp_id: SnowFlake;\n\tcommit_id: string;\n\tmessage: string;\n\tpusher: string;\n\tbranch: string;\n\tcreated_at: ISODateString;\n}\n\n/**\n * How a release was created.\n * `github` = push to the connected repository; `cli` = the Vertra CLI; `upload` = upload from the\n * dashboard, an SDK or an extension; `editor` = edits made in the file manager; `rollback` = a\n * release that restores an earlier one; `env_change` = a change to the environment variables only.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/list\n */\nexport type ApplicationReleaseSource = \"github\" | \"cli\" | \"upload\" | \"editor\" | \"rollback\" | \"env_change\";\nexport const ApplicationReleaseSource = {\n\tGITHUB: \"github\",\n\tCLI: \"cli\",\n\tUPLOAD: \"upload\",\n\tEDITOR: \"editor\",\n\tROLLBACK: \"rollback\",\n\tENV_CHANGE: \"env_change\",\n} as const;\n\n/**\n * Lifecycle of a release. `deploying` = being built and started; `active` = the application's current\n * code, one per application (see `first_started_at`: files committed without a restart are `active`\n * before the application runs them); `superseded` = replaced by a newer release; `failed` = the\n * application stopped right after this release was deployed and the platform rolled back to the\n * previous one; `rolled_back` = the active release was replaced by a rollback; `expired` = its code is\n * no longer kept.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/list\n */\nexport type ApplicationReleaseStatus = \"deploying\" | \"active\" | \"superseded\" | \"failed\" | \"rolled_back\" | \"expired\";\nexport const ApplicationReleaseStatus = {\n\tDEPLOYING: \"deploying\",\n\tACTIVE: \"active\",\n\tSUPERSEDED: \"superseded\",\n\tFAILED: \"failed\",\n\tROLLED_BACK: \"rolled_back\",\n\tEXPIRED: \"expired\",\n} as const;\n\n/**\n * One version of an application's code, kept so it can be listed and, when the plan allows it,\n * restored. The list is newest first. A release stays listed after its code expires.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/list\n */\nexport interface APIApplicationRelease {\n\tid: SnowFlake;\n\tapp_id: SnowFlake;\n\tsource: ApplicationReleaseSource;\n\tstatus: ApplicationReleaseStatus;\n\t/** Commit or upload message. `null` when none was given, and always `null` for file manager edits. */\n\tmessage: string | null;\n\t/** The GitHub pusher, or the name of the user who uploaded or edited the files. */\n\tauthor: string;\n\t/** The GitHub push that produced this release. `null` for any other source. */\n\tgithub: APIApplicationDeployment | null;\n\t/** Number of files changed by the operation that produced this release. */\n\tfiles_changed: number;\n\trollback: {\n\t\t/**\n\t\t * `false` for the active release, for an expired release, and when the plan does not allow\n\t\t * rolling back to this release.\n\t\t */\n\t\tavailable: boolean;\n\t\t/**\n\t\t * When this release's code stops being kept, counted from the moment it stopped being the active\n\t\t * release. `null` for the active release and when no code was kept.\n\t\t */\n\t\texpires_at: ISODateString | null;\n\t\t/** The release this one restores, when `source` is `rollback`. `null` otherwise. */\n\t\tfrom: SnowFlake | null;\n\t};\n\t/** `true` when a crash log was recorded for this release. The log can still expire; see the log endpoint. */\n\thas_log: boolean;\n\t/**\n\t * Time, in milliseconds, the platform took to install dependencies, build and start this release.\n\t * `null` when the release was not deployed with a build (for example, files committed without a restart).\n\t */\n\tbuild_duration_ms: number | null;\n\t/**\n\t * When the application first started with this release's code. `null` while the code is in the\n\t * application folder but the application has not been started with it yet (for example, files\n\t * committed without a restart): changes only take effect after a restart.\n\t */\n\tfirst_started_at: ISODateString | null;\n\tcreated_at: ISODateString;\n}\n\n/**\n * Crash log of a release. `content` is `null` when there is no log or it has expired.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/log\n */\nexport interface APIApplicationReleaseLog {\n\tcontent: string | null;\n}\n\n/**\n * How an environment variable changes if a rollback restores the release's variables, compared with the\n * active release. `added` = the release has it and the active release does not; `removed` = the active\n * release has it and the release does not; `modified` = both have it with different values.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/rollback-preview\n */\nexport type ApplicationEnvironmentChange = \"added\" | \"modified\" | \"removed\";\nexport const ApplicationEnvironmentChange = {\n\tADDED: \"added\",\n\tMODIFIED: \"modified\",\n\tREMOVED: \"removed\",\n} as const;\n\n/**\n * What a rollback to a release would change in the environment variables. Only variable names and the\n * kind of change are returned, never values. Sorted by key. Empty when the release has no stored variables.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/rollback-preview\n */\nexport interface APIApplicationRollbackPreview {\n\tenvironment_changes: { key: string; change: ApplicationEnvironmentChange }[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns\n */\nexport type ApplicationDnsRecordType = \"CNAME\" | \"TXT\";\nexport const ApplicationDnsRecordType = {\n\tCNAME: \"CNAME\",\n\tTXT: \"TXT\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns\n */\nexport type ApplicationDnsRecordStatus = \"active\" | \"pending_validation\";\nexport const ApplicationDnsRecordStatus = {\n\tACTIVE: \"active\",\n\tPENDING_VALIDATION: \"pending_validation\",\n} as const;\n\n/**\n * DNS record the user must create at their DNS provider for the custom domain.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns\n */\nexport interface APIApplicationDnsRecord {\n\ttype: ApplicationDnsRecordType;\n\tname: string;\n\tvalue: string;\n\tstatus: ApplicationDnsRecordStatus;\n}\n\n/**\n * Returned when the auto-deploy webhook is created.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/create\n */\nexport interface APIApplicationWebhookUrl {\n\turl: string;\n}\n\n/**\n * Auto-deploy webhook of an application and the repository it is linked to.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/webhookurl\n */\nexport interface APIApplicationWebhook {\n\twebhook_url: string;\n\trepo_owner: string;\n\trepo_name: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/subdomain\n */\nexport interface APIApplicationSubdomain {\n\t/** Full hostname (`my-app.vertraweb.app`). */\n\tsubdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/customdomain\n */\nexport interface APIApplicationCustomDomain {\n\tdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ShieldIncidentReason = \"burst\" | \"rate_limit\";\nexport const ShieldIncidentReason = {\n\tBURST: \"burst\",\n\tRATE_LIMIT: \"rate_limit\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ShieldIncidentDirection = \"in\" | \"out\";\nexport const ShieldIncidentDirection = {\n\tIN: \"in\",\n\tOUT: \"out\",\n} as const;\n\n/**\n * Active Vertra Shield containment on this application (bandwidth limit after a burst/rate limit).\n * `null` when no containment is in effect.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport interface APIApplicationShieldCooldown {\n\tuntil: ISODateString;\n\treason: ShieldIncidentReason;\n\tdirection: ShieldIncidentDirection;\n\tstrikes: number;\n}\n\n/**\n * Web publishing state of an application.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/publish\n */\nexport interface APIApplicationWebPublish {\n\t/** `null` when web publishing is off. */\n\tsubdomain: string | null;\n\tcustom_domain: string | null;\n\ttype: ApplicationType;\n}\n\n/**\n * Suggestions from scanning the zip before creating an application. Nothing is applied\n * automatically: they are meant to pre-fill a creation form that the user can edit.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/scan\n */\nexport interface APIApplicationScanSuggestions {\n\tsuggested_start_command?: string;\n\tsuggested_build_command?: string;\n\tsuggested_memory_mb?: number;\n\tsuggested_public_web?: boolean;\n\tmissing_dependencies?: string[];\n}\n\n/**\n * One runtime of `GET /v1/apps/runtimes`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/runtimes\n */\nexport interface APIApplicationRuntime {\n\t/** Recommended version for new applications. */\n\trecommended: string;\n\tlatest: string;\n\t/** Other exact versions that can be pinned. Empty for runtimes without version pinning. */\n\tspecific: string[];\n}\n\n/**\n * Catalog of supported runtimes, keyed by language.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/runtimes\n */\nexport type APIApplicationRuntimes = Record<ApplicationLanguage, APIApplicationRuntime>;\n\n/**\n * `event` field of the `GET /v1/apps/:id/realtime` stream (`text/event-stream`).\n * `logs` = application output (one or more lines); `system` = stream/platform notices (e.g.\n * `install_note:started`, `deploy_note:failed:<release_id>`, `deploy_note:rollback:<from>:<to>`,\n * `deploy_note:discarded:<release_id>` (Enterprise zero-downtime: the new release did not become healthy\n * and was dropped; the previous one keeps running), where `<from>` and `<to>` identify the releases\n * involved); `heartbeat` = keep-alive, no content.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/realtime\n */\nexport type ApplicationRealtimeEventType = \"logs\" | \"system\" | \"heartbeat\";\nexport const ApplicationRealtimeEventType = {\n\tLOGS: \"logs\",\n\tSYSTEM: \"system\",\n\tHEARTBEAT: \"heartbeat\",\n} as const;\n\n/**\n * One server-sent event of `GET /v1/apps/:id/realtime`. `data` is plain text, not JSON; a `logs`\n * event may carry several lines separated by `\\n`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/realtime\n */\nexport interface APIApplicationRealtimeEvent {\n\tevent: ApplicationRealtimeEventType;\n\tdata: string;\n}\n","import type { ISODateString } from \"../../v1\";\n\n/** Postal address used for billing. `country` is a two-letter ISO code (`\"BR\"`). */\nexport interface APIBillingAddress {\n\t/** Street name. */\n\tline1: string;\n\t/** Street number; `\"S/N\"` when there is none. Required in Brazil. */\n\tnumber: string | null;\n\t/** Complement, for example `\"Apt 2\"`. */\n\tline2: string | null;\n\t/** Neighborhood (bairro). Required in Brazil. */\n\tdistrict: string | null;\n\tcity: string;\n\t/** Seven-digit IBGE city code. Required in Brazil. */\n\tcity_code: string | null;\n\t/** Two-letter state code in Brazil (`\"CE\"`); free text elsewhere. */\n\tstate: string | null;\n\tpostal_code: string | null;\n\tcountry: string;\n}\n\n/** Brazilian tax document kind. */\nexport type BillingTaxIdType = \"cpf\" | \"cnpj\";\nexport const BillingTaxIdType = {\n\tCPF: \"cpf\",\n\tCNPJ: \"cnpj\",\n} as const;\n\n/** Tax document as returned by the API: never the full number. */\nexport interface APIBillingTaxId {\n\ttype: BillingTaxIdType;\n\t/** Masked, for example `\"CPF ••• 47\"`. */\n\tmasked: string;\n}\n\n/**\n * Billing details of the logged-in account, used on receipts, invoices and fraud checks.\n * An order needs them complete (`complete: true`), otherwise `POST /v1/orders` fails with `BILLING_DETAILS_INCOMPLETE`.\n */\nexport interface APIBillingDetails {\n\tname: string | null;\n\taddress: APIBillingAddress | null;\n\t/** Optional. E.164, for example `\"+5585999990000\"`. */\n\tphone: string | null;\n\ttax_id: APIBillingTaxId | null;\n\t/** `true` when every field required to issue the service invoice is filled (in Brazil, including the tax document). */\n\tcomplete: boolean;\n}\n\n/** Saved card of the logged-in account. Dashboard session only. */\nexport interface APIBillingCard {\n\tid: string;\n\t/** Card brand as reported by the card network, for example `\"visa\"` or `\"mastercard\"`. */\n\tbrand: string;\n\tlast4: string;\n\texp_month: number;\n\texp_year: number;\n\t/** The plan renews automatically on the default card. */\n\tis_default: boolean;\n\tcreated_at: ISODateString;\n}\n\n/** Automatic renewal of the paid plan on the default card. Dashboard session only. */\nexport interface APIBillingRenewal {\n\t/** Preference of the account. `false` means the plan simply expires on its date; the saved cards are kept. */\n\tauto_renew: boolean;\n\t/** Plan expiry date, or `null` when the plan has none. */\n\trenews_at: ISODateString | null;\n\t/** Default card the renewal would charge, or `null` without one. */\n\tcard: { brand: string; last4: string } | null;\n\t/** `true` when the current plan can renew on a card (paid plan, not Economy) and a default card exists. */\n\teligible: boolean;\n}\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport type DatabaseType = 1 | 2 | 3 | 4;\nexport const DatabaseType = {\n\tPOSTGRESQL: 1,\n\tMONGODB: 2,\n\tREDIS: 3,\n\tMYSQL: 4,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport type DatabaseStatus = \"up\" | \"down\";\nexport const DatabaseStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport type DatabaseCluster = number;\nexport const DatabaseCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\n\nexport interface APIDatabase {\n\tid: SnowFlake;\n\tcluster: DatabaseCluster;\n\ttype: DatabaseType;\n\tname: string;\n\tdescription: string;\n\towner_id: SnowFlake;\n\towner_plan_id: UserPlan; // Owner's plan\n\tstatus: DatabaseStatus;\n\tram: number;\n\thost: string; // example: \"vertra-cloud-<type>-<dbId>.vertraweb.app\"\n\tport: number;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tlast_snapshot: ISODateString | null;\n\toffline_since: ISODateString | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport interface APIDatabaseNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/status\n */\nexport interface APIDatabaseStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: DatabaseStatus;\n\trunning: boolean;\n\tstorage: string;\n\t/** `null` when network usage is unavailable. */\n\tnetwork: APIDatabaseNetwork | null;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/allstatus\n */\nexport interface APIDatabaseStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstorage: string;\n\trunning: boolean;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport interface APIDatabaseOperationResponse {\n\tstatus: \"success\";\n}\n\n/**\n * Client certificate for TLS connections to the database.\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/credentials/get\n */\nexport interface APIDatabaseCertificate {\n\tcrt: string;\n\tkey: string;\n\tpem: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/metrics\n */\nexport interface APIDatabaseMetrics {\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tdate: ISODateString;\n\tnetwork: number[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/credentials/resetpassword\n */\nexport interface APIDatabasePasswordReset {\n\tpassword: string;\n}\n","/**\n * Payloads of the database **Data** tab (content management: SQL, Mongo, Redis).\n *\n * The resource here is the **content** of the user's database, not the database instance itself\n * (see `database.ts`). No field carries credentials: password, connection string and certificate\n * are never returned by these routes.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/overview\n */\n\n// ---------------------------------------------------------------------------\n// Common to every engine\n// ---------------------------------------------------------------------------\n\n/**\n * Tab header: which engine this is and how much it currently stores.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/overview\n */\nexport interface APIDatabaseDataOverview {\n\tengine_version: string;\n\tsize_bytes: number;\n\t/** Tables (SQL), collections (Mongo) or keys (Redis). */\n\tobjects_count: number;\n\tconnections_active: number;\n\tconnections_max: number;\n\tuptime_seconds: number;\n\t/** Engine-specific fields (e.g. `wal_size_bytes`, `replica_set`). Optional per engine. */\n\textra?: Record<string, string | number | boolean | null>;\n}\n\n/**\n * Sort direction for any listing in the tab.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/overview\n */\nexport type DatabaseSortDirection = \"asc\" | \"desc\";\nexport const DatabaseSortDirection = {\n\tAsc: \"asc\",\n\tDesc: \"desc\",\n} as const satisfies Record<string, DatabaseSortDirection>;\n\n/**\n * Operators accepted by the structured row filter (`APIDatabaseRowFilter.op`). Closed list —\n * anything else is rejected.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows\n */\nexport type DatabaseFilterOperator = \"=\" | \"!=\" | \"<\" | \"<=\" | \">\" | \">=\" | \"LIKE\" | \"IS NULL\" | \"IS NOT NULL\";\nexport const DatabaseFilterOperator = {\n\tEq: \"=\",\n\tNe: \"!=\",\n\tLt: \"<\",\n\tLte: \"<=\",\n\tGt: \">\",\n\tGte: \">=\",\n\tLike: \"LIKE\",\n\tIsNull: \"IS NULL\",\n\tIsNotNull: \"IS NOT NULL\",\n} as const satisfies Record<string, DatabaseFilterOperator>;\n\n/**\n * One item of the structured row filter. `value` is omitted for `IS NULL`/`IS NOT NULL`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows\n */\nexport interface APIDatabaseRowFilter {\n\tcolumn: string;\n\top: DatabaseFilterOperator;\n\tvalue?: unknown;\n}\n\n/**\n * Query-string parameters for paginated **row** listing. `per_page` is capped at 200.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows\n */\nexport interface APIDatabaseListParams {\n\tpage?: number;\n\tper_page?: number;\n\t/** Simple \"contains\" filter applied to the column/field given by `filter_field`. */\n\tfilter?: string;\n\tfilter_field?: string;\n\tsort?: string;\n\tdirection?: DatabaseSortDirection;\n\t/**\n\t * Structured filter: `APIDatabaseRowFilter[]` serialized as JSON. Up to 20 items and 4096\n\t * bytes — anything larger is rejected.\n\t */\n\tfilters?: string;\n}\n\n/**\n * Query-string parameters for paginated **document** listing. `filter` is a serialized Mongo\n * query JSON; `sort` is a serialized `{ field: 1 | -1 }`. No `direction`/`filter_field` — the\n * Mongo filter already carries the operator.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/documents\n */\nexport interface APIDatabaseDocumentListParams {\n\tpage?: number;\n\tper_page?: number;\n\tfilter?: string;\n\tsort?: string;\n}\n\n/**\n * Data operation error. Same error envelope as the rest of the API — `code` is a stable English\n * sentinel (`DB_NOT_RUNNING`, `QUERY_TIMEOUT`, …) meant to be translated by the client.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/errors\n */\nexport interface APIDatabaseDataError {\n\tcode: string;\n\tmessage?: string;\n\tdetails?: unknown;\n}\n\n// ---------------------------------------------------------------------------\n// SQL (PostgreSQL / MySQL)\n// ---------------------------------------------------------------------------\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/schemas\n */\nexport interface APIDatabaseSchema {\n\tname: string;\n\ttables_count: number;\n\tsize_bytes: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport type DatabaseTableKind = \"table\" | \"view\";\nexport const DatabaseTableKind = {\n\tTable: \"table\",\n\tView: \"view\",\n} as const satisfies Record<string, DatabaseTableKind>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport interface APIDatabaseTable {\n\tschema: string;\n\tname: string;\n\tkind: DatabaseTableKind;\n\t/** Engine estimate — an exact count would require a full scan. */\n\trows_estimate: number;\n\tsize_bytes: number;\n\tcolumns_count: number;\n\tindexes_count: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport interface APIDatabaseColumnReference {\n\tschema: string;\n\ttable: string;\n\tcolumn: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport interface APIDatabaseColumn {\n\tname: string;\n\t/** Raw engine type (`text`, `bigint`, `timestamptz`, `varchar(255)`…). */\n\tdata_type: string;\n\tnullable: boolean;\n\tdefault_value: string | null;\n\tis_primary_key: boolean;\n\tis_unique: boolean;\n\tis_foreign_key: boolean;\n\treferences?: APIDatabaseColumnReference;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport interface APIDatabaseIndex {\n\tname: string;\n\tcolumns: string[];\n\tunique: boolean;\n\tprimary: boolean;\n\tsize_bytes: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows\n */\nexport interface APIDatabaseRowsPage {\n\tcolumns: APIDatabaseColumn[];\n\trows: Record<string, unknown>[];\n\ttotal: number;\n\tpage: number;\n\tper_page: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/query\n */\nexport interface APIDatabaseQueryResult {\n\tcolumns: string[];\n\t/** Positional matrix — order matches `columns`. */\n\trows: unknown[][];\n\trow_count: number;\n\tduration_ms: number;\n\t/** `true` when the result was cut at the row limit. */\n\ttruncated: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// MongoDB\n// ---------------------------------------------------------------------------\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/collections\n */\nexport interface APIDatabaseCollection {\n\tname: string;\n\tdocuments_count: number;\n\tsize_bytes: number;\n\tavg_document_size: number;\n\tindexes_count: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/documents\n */\nexport interface APIDatabaseDocumentsPage {\n\tdocuments: Record<string, unknown>[];\n\ttotal: number;\n\tpage: number;\n\tper_page: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/collections\n */\nexport interface APIDatabaseMongoIndex {\n\tname: string;\n\t/** `{ created_at: -1 }` — same shape as `createIndex`. */\n\tkeys: Record<string, 1 | -1>;\n\tunique: boolean;\n\tsparse: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// Redis\n// ---------------------------------------------------------------------------\n\n/**\n * `SCAN` query-string parameters. `cursor` absent = start of the scan.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport interface APIDatabaseRedisScanParams {\n\tpattern?: string;\n\tcursor?: string;\n\tcount?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport type DatabaseRedisKeyType = \"string\" | \"hash\" | \"list\" | \"set\" | \"zset\" | \"stream\";\nexport const DatabaseRedisKeyType = {\n\tString: \"string\",\n\tHash: \"hash\",\n\tList: \"list\",\n\tSet: \"set\",\n\tZSet: \"zset\",\n\tStream: \"stream\",\n} as const satisfies Record<string, DatabaseRedisKeyType>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport interface APIDatabaseRedisKey {\n\tkey: string;\n\ttype: DatabaseRedisKeyType;\n\t/** `null` = no expiration. */\n\tttl_seconds: number | null;\n\tsize_bytes: number;\n\t/** Cardinality (items in the hash/list/set/zset/stream). Absent for `string`. */\n\tlength?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport interface APIDatabaseRedisKeysPage {\n\tkeys: APIDatabaseRedisKey[];\n\t/** `SCAN` cursor. `null` = the scan is complete. */\n\tcursor: string | null;\n\tscanned: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport interface APIDatabaseRedisZSetMember {\n\tmember: string;\n\tscore: number;\n}\n\n/**\n * Value of a key, discriminated by `type`. Collections are truncated at 1000 items **or** at the\n * read byte limit — `truncated: true` when the value was cut for either reason. Absent/`false` =\n * the full value was returned.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport type APIDatabaseRedisKeyValue =\n\t| { key: string; type: \"string\"; ttl_seconds: number | null; value: string; truncated?: boolean }\n\t| { key: string; type: \"hash\"; ttl_seconds: number | null; value: Record<string, string>; truncated?: boolean }\n\t| { key: string; type: \"list\"; ttl_seconds: number | null; value: string[]; truncated?: boolean }\n\t| { key: string; type: \"set\"; ttl_seconds: number | null; value: string[]; truncated?: boolean }\n\t| { key: string; type: \"zset\"; ttl_seconds: number | null; value: APIDatabaseRedisZSetMember[]; truncated?: boolean }\n\t| { key: string; type: \"stream\"; ttl_seconds: number | null; value: string[]; truncated?: boolean };\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/info\n */\nexport interface APIDatabaseRedisInfo {\n\tversion: string;\n\tused_memory_bytes: number;\n\t/** `null` = no `maxmemory` configured. */\n\tmax_memory_bytes: number | null;\n\tkeys_total: number;\n\texpires_total: number;\n\thits: number;\n\tmisses: number;\n\tconnected_clients: number;\n\tops_per_second: number;\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * Notification type:\n * 1 = Simple text notification\n * 2 = Notification with image/video attachment\n */\nexport type NotificationType = 1 | 2;\n\nexport const NotificationType = {\n\tSIMPLE: 1,\n\tATTACHMENT: 2,\n} as const;\n\n/**\n * Notification importance level.\n */\nexport type NotificationImportance = \"low\" | \"medium\" | \"high\" | \"critical\";\n\nexport const NotificationImportance = {\n\tLOW: \"low\",\n\tMEDIUM: \"medium\",\n\tHIGH: \"high\",\n\tCRITICAL: \"critical\",\n} as const;\n\nexport interface LocalizedContent {\n\t\"en-us\": string;\n\t\"pt-br\"?: string;\n\t\"es-es\"?: string;\n\t[key: string]: string | undefined;\n}\n\n/** Dashboard session only (not reachable with an API key). */\nexport interface APINotification {\n\tid: SnowFlake;\n\ttype: NotificationType;\n\timportance: NotificationImportance;\n\ttitle: LocalizedContent;\n\tmessage: LocalizedContent;\n\tattachment_url: string | null;\n\tshow_on_dashboard: boolean;\n\tis_read: boolean;\n\tcreated_at: ISODateString;\n\texpires_at: ISODateString;\n}\n","import type { ISODateString } from \"../../v1\";\n\n/**\n * OAuth client registered dynamically (RFC 7591) to connect an external agent to the account.\n * Public client: no secret, PKCE `S256` required.\n * @see https://docs.vertracloud.app/api-reference/introduction#connecting-through-oauth\n */\nexport interface APIOAuthClient {\n\tclient_id: string;\n\t/** Name shown on the consent screen; the API key created on consent is named `oauth:<client_name>` (max. 40 characters). */\n\tclient_name: string;\n\t/** Matched exactly on `authorize`; no wildcards. */\n\tredirect_uris: string[];\n\tcreated_at: ISODateString;\n}\n\nexport type APIOAuthCodeChallengeMethod = \"S256\";\nexport const APIOAuthCodeChallengeMethod = { S256: \"S256\" } as const;\n\nexport type APIOAuthConsentDecision = \"approve\" | \"deny\";\nexport const APIOAuthConsentDecision = { Approve: \"approve\", Deny: \"deny\" } as const;\n","import type { ISODateString } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport type OrderStatus = \"unpaid\" | \"paid\" | \"cancelled\" | \"expired\";\nexport const OrderStatus = {\n\tUNPAID: \"unpaid\",\n\tPAID: \"paid\",\n\tCANCELLED: \"cancelled\",\n\tEXPIRED: \"expired\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport type OrderType = \"purchase\" | \"renew\" | \"upgrade\";\nexport const OrderType = {\n\tPURCHASE: \"purchase\",\n\tRENEW: \"renew\",\n\tUPGRADE: \"upgrade\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport type OrderProvider = \"pix\" | \"card\" | \"redeem_code\";\nexport const OrderProvider = {\n\tPIX: \"pix\",\n\tCARD: \"card\",\n\tREDEEM_CODE: \"redeem_code\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport interface APIOrderCreateResponse {\n\tid: string;\n\tcode: string | null;\n\t/** Usually `\"unpaid\"`; `\"paid\"` right away when a coupon brings the price to zero. */\n\tstatus: OrderStatus;\n\tplan: string;\n\t/** Duration in days. */\n\tduration: number;\n\tdiscount: APIOrderDiscount;\n\t/** Final price, after the discount. */\n\tprice: number;\n\texpires_at: ISODateString | null;\n\t/**\n\t * Payment methods the order accepts. The Economy plan and a coupon restricted to one method narrow\n\t * the list; otherwise `[\"pix\", \"card\"]` when card payments are available, `[\"pix\"]` when not.\n\t * Starting a payment with a method outside the list returns 400 `COUPON_PAYMENT_METHOD` (coupon) or\n\t * 400 `CARD_NOT_ALLOWED_FOR_PLAN` (Economy).\n\t */\n\tallowed_payment_methods: OrderProvider[];\n}\n\n/**\n * Price an order would have with a coupon, without creating the order or using the coupon.\n * Prices already include the billing-period discount (3 months −5%, 12 −15%).\n */\nexport interface APIOrderCouponPreview {\n\t/** The coupon code as registered. */\n\tcoupon: string;\n\t/** Price for the plan and period before the coupon. */\n\tprice_before_discount: number;\n\tdiscount_amount: number;\n\t/** Final price with the coupon. */\n\tprice: number;\n\t/** Payment methods the coupon allows, same rule as `APIOrderCreateResponse.allowed_payment_methods`. */\n\tallowed_payment_methods: OrderProvider[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport interface APIOrderDiscount {\n\t/** `null` when no coupon was applied. */\n\tpercent: number | null;\n\tcoupon: string | null;\n\t/** Price before the discount. */\n\tprice: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/order-status\n */\nexport interface APIOrderStatus {\n\tid: string;\n\tstatus: OrderStatus;\n\tprice: number;\n\trelated_to: { plan: { name: string; months: number } };\n\t/** Same semantics as in {@link APIOrderCreateResponse.allowed_payment_methods}. */\n\tallowed_payment_methods: OrderProvider[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/list-orders\n */\nexport interface APIOrderListItem {\n\tid: string;\n\tstatus: OrderStatus;\n\tprice: number;\n\tprovider: OrderProvider;\n\ttype: OrderType;\n\trelated_to: { plan: { name: string; duration: number; months: number } };\n\tcreated_at: ISODateString;\n\tpaid_at: ISODateString | null;\n\t/** A payment receipt exists for this order (`GET /v1/orders/:orderId/receipt`). */\n\thas_receipt: boolean;\n}\n\n/**\n * Payment receipt of a paid order (`GET /v1/orders/:orderId/receipt`). Dashboard session only.\n */\nexport interface APIOrderReceipt {\n\t/** Public page of the receipt, hosted by the payment processor. */\n\turl: string;\n}\n\n/**\n * PIX charge of an order (`POST /v1/orders/:orderId/initiate/pix`).\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/initiate-pix\n */\nexport interface APIOrderPixPayment {\n\t/** Amount charged, in BRL. */\n\ttransaction_amount: number;\n\texternal_reference: string | null;\n\ttxid: string;\n\tqrcode: { copy: string | null; base64: string | null };\n}\n\n/**\n * Card charge of an order (`POST /v1/orders/:orderId/pay/card`). Dashboard session only.\n * - `succeeded`: paid; the plan is delivered in a few seconds.\n * - `requires_action`: the bank asks the customer to confirm (3-D Secure) in the browser with `client_secret`.\n * - `processing`: the bank is still confirming; poll the order status.\n */\nexport interface APIOrderCardPayment {\n\tclient_secret: string;\n\tstatus: OrderCardPaymentStatus;\n}\n\nexport type OrderCardPaymentStatus = \"succeeded\" | \"requires_action\" | \"processing\";\nexport const OrderCardPaymentStatus = {\n\tSUCCEEDED: \"succeeded\",\n\tREQUIRES_ACTION: \"requires_action\",\n\tPROCESSING: \"processing\",\n} as const;\n","import type { ApplicationType, DatabaseType, ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport type ResourceType = 1 | 2;\nexport const ResourceType = {\n\tAPPLICATION: 1,\n\tDATABASE: 2,\n} as const;\n\n/**\n * `resource_type` of a snapshot: the resource's own type at snapshot time — `ApplicationType` for\n * an application snapshot, `DatabaseType` (the engine) for a database snapshot.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport type SnapshotResourceType = ApplicationType | DatabaseType;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport interface APIResourceSnapshot {\n\tid: SnowFlake;\n\tresource_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tresource_type: SnapshotResourceType | null;\n\tsize: string;\n\tdate: ISODateString;\n\t/**\n\t * Name the resource had when this snapshot was taken — frozen: it does not follow renames and\n\t * is kept after the project is deleted. `null` for snapshots taken before this field existed.\n\t * For the CURRENT resource name, use `APIGroupedResourceSnapshots.resource_name`.\n\t */\n\tresource_name: string | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport interface APIGroupedResourceSnapshots {\n\tresource_id: SnowFlake;\n\t/**\n\t * CURRENT resource name. If the resource was deleted, falls back to the `resource_name` of the\n\t * group's most recent snapshot; `null` only when neither exists.\n\t */\n\tresource_name: string | null;\n\ttype: ResourceType;\n\tresource_type: SnapshotResourceType | null;\n\tsnapshots: APIResourceSnapshot[];\n}\n\n/**\n * Query of the snapshot routes under `/v1/users/...`: which kind of resource the snapshot belongs\n * to. Required — a missing `scope` returns 400.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport type SnapshotScope = \"applications\" | \"databases\";\nexport const SnapshotScope = {\n\tAPPLICATIONS: \"applications\",\n\tDATABASES: \"databases\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/snapshots/restore\n */\nexport interface APISnapshotRestoreResponse {\n\tmessage: string;\n}\n","/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/services/status\n */\nexport type StatusType = \"healthy\" | \"degraded\" | \"unknown\";\nexport const StatusType = {\n\tHEALTHY: \"healthy\",\n\tDEGRADED: \"degraded\",\n\tUNKNOWN: \"unknown\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/services/status\n */\nexport interface APIStatus {\n\tstatus: StatusType;\n\tmessage: string;\n}\n","import type { ISODateString, UserPlan } from \"../../v1\";\nimport type { APIApplication, APIDatabase, APIWorkspaceResourceOrganization } from \"./index\";\n\n/**\n * Dashboard and e-mail language of the account.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport type UserLanguage = \"pt-br\" | \"en-us\" | \"es-es\";\nexport const UserLanguage = {\n\tPT_BR: \"pt-br\",\n\tEN_US: \"en-us\",\n\tES_ES: \"es-es\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport interface APIUser {\n\tid: string;\n\tname: string;\n\temail: string;\n\tplan_id: UserPlan;\n\tlanguage: UserLanguage;\n\t/** Accepts workspace invites by e-mail (`WORKSPACE_INVITES_DISABLED` when off). */\n\tworkspace_invites_enabled: boolean;\n\t/** Receives promotional e-mails (offers and product announcements). Account notices are always sent. */\n\tmarketing_emails_enabled: boolean;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\nexport interface APIUserConnection {\n\tprovider: string;\n\tusername: string;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport interface APIUserInfoResponse extends APIUser {\n\tplan: APIUserPlan;\n\tapplications: APIApplication[];\n\tdatabases: APIDatabase[];\n\tconnections: APIUserConnection[];\n\t/** Saved resource organization (folders, favorites) of this account. */\n\tresource_organization: APIWorkspaceResourceOrganization;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport interface APIUserPlanMemory {\n\tlimit: number;\n\tused: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport interface APIUserPlan {\n\tid: UserPlan;\n\tname: string;\n\texpires_at: ISODateString | null;\n\tduration: number;\n\tmemory: APIUserPlanMemory;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/sessions\n */\nexport interface APIUserSession {\n\tid: string;\n\tuser_id: string;\n\tprovider: string;\n\tip_address: string | null;\n\tlocation: string | null;\n\tdevice: string | null;\n\texpires_at: ISODateString;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tis_current: boolean;\n}\n\n/**\n * Legacy response of `POST /me/generate-api-key` (CLI). Prefer `/me/api-keys`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/api-keys/create\n */\nexport interface APIUserApiKey {\n\tapi_key: string;\n}\n\n/**\n * A request made to the API with one of the user's keys. Dashboard only\n * (`GET /v1/users/me/api-key/requests` rejects API key authentication). Kept for 30 days.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/api-key-requests\n */\nexport interface APIUserApiKeyRequestEvent {\n\tid: string;\n\t/** Public prefix of the key used; `null` if the key has been deleted. */\n\tapi_key_prefix: string | null;\n\tapi_key_id: string | null;\n\tmethod: string;\n\t/** Route pattern (`/v1/apps/:id`). */\n\troute: string;\n\t/** Concrete path, without the query string. */\n\tpath: string | null;\n\tip: string | null;\n\tuser_agent: string | null;\n\tstatus: number;\n\tduration_ms: number;\n\tbytes_in: number | null;\n\tbytes_out: number | null;\n\terror_code: string | null;\n\t/** Request/response body, only for routes that carry no secrets (lifecycle, config, snapshots, network); JSON ≤ 4 KB with secrets redacted. `null` for every other route. */\n\trequest_body: string | null;\n\tresponse_body: string | null;\n\toccurred_at: ISODateString;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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