@vertracloud/api-types 0.4.1 → 0.4.3
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 +8 -0
- package/payloads/v1/api-error.js +4 -0
- package/payloads/v1/api-error.js.map +1 -1
- package/payloads/v1/api-error.mjs +4 -0
- package/payloads/v1/application.d.ts +20 -2
- package/payloads/v1/application.js +14 -1
- package/payloads/v1/application.js.map +1 -1
- package/payloads/v1/application.mjs +13 -1
- package/payloads/v1/index.d.ts +1 -1
- package/payloads/v1/index.js +18 -1
- package/payloads/v1/index.js.map +1 -1
- package/payloads/v1/index.mjs +17 -1
- package/rest/v1/application.d.ts +4 -4
- package/rest/v1/application.js.map +1 -1
- package/rest/v1/blob.d.ts +5 -0
- package/rest/v1/blob.js.map +1 -1
- package/v1.d.ts +1 -1
- package/v1.js +18 -1
- package/v1.js.map +1 -1
- package/v1.mjs +17 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertracloud/api-types",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "TypeScript types for the public API of Vertra Cloud, a Brazilian application hosting platform (PaaS) for applications, managed databases and bots.",
|
|
6
6
|
"homepage": "https://vertracloud.app",
|
|
@@ -42,6 +42,8 @@ declare const API_ERROR_CODES: {
|
|
|
42
42
|
readonly APP_BANNED: "APP_BANNED";
|
|
43
43
|
readonly APP_ALREADY_PUBLISHED: "APP_ALREADY_PUBLISHED";
|
|
44
44
|
readonly APP_HAS_NO_SUBDOMAIN: "APP_HAS_NO_SUBDOMAIN";
|
|
45
|
+
/** 409 — the application is still building; wait until the build ends. */
|
|
46
|
+
readonly APP_BUILDING: "APP_BUILDING";
|
|
45
47
|
readonly APP_NOT_FOUND: "APP_NOT_FOUND";
|
|
46
48
|
readonly APP_NOT_PUBLISHED: "APP_NOT_PUBLISHED";
|
|
47
49
|
readonly APP_ALREADY_IN_WORKSPACE: "APP_ALREADY_IN_WORKSPACE";
|
|
@@ -94,6 +96,8 @@ declare const API_ERROR_CODES: {
|
|
|
94
96
|
readonly STORAGE_QUOTA_EXCEEDED: "STORAGE_QUOTA_EXCEEDED";
|
|
95
97
|
readonly BUILD_FAILED: "BUILD_FAILED";
|
|
96
98
|
readonly BUILD_TIMEOUT: "BUILD_TIMEOUT";
|
|
99
|
+
/** The build was interrupted before it finished; start it again with a restart. */
|
|
100
|
+
readonly BUILD_INTERRUPTED: "BUILD_INTERRUPTED";
|
|
97
101
|
/** 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`. */
|
|
98
102
|
readonly BILLING_DETAILS_INCOMPLETE: "BILLING_DETAILS_INCOMPLETE";
|
|
99
103
|
/** 400 — billing details failed validation; the field is in `details.path`. */
|
|
@@ -295,6 +299,8 @@ declare const APIErrorCode: {
|
|
|
295
299
|
readonly APP_BANNED: "APP_BANNED";
|
|
296
300
|
readonly APP_ALREADY_PUBLISHED: "APP_ALREADY_PUBLISHED";
|
|
297
301
|
readonly APP_HAS_NO_SUBDOMAIN: "APP_HAS_NO_SUBDOMAIN";
|
|
302
|
+
/** 409 — the application is still building; wait until the build ends. */
|
|
303
|
+
readonly APP_BUILDING: "APP_BUILDING";
|
|
298
304
|
readonly APP_NOT_FOUND: "APP_NOT_FOUND";
|
|
299
305
|
readonly APP_NOT_PUBLISHED: "APP_NOT_PUBLISHED";
|
|
300
306
|
readonly APP_ALREADY_IN_WORKSPACE: "APP_ALREADY_IN_WORKSPACE";
|
|
@@ -347,6 +353,8 @@ declare const APIErrorCode: {
|
|
|
347
353
|
readonly STORAGE_QUOTA_EXCEEDED: "STORAGE_QUOTA_EXCEEDED";
|
|
348
354
|
readonly BUILD_FAILED: "BUILD_FAILED";
|
|
349
355
|
readonly BUILD_TIMEOUT: "BUILD_TIMEOUT";
|
|
356
|
+
/** The build was interrupted before it finished; start it again with a restart. */
|
|
357
|
+
readonly BUILD_INTERRUPTED: "BUILD_INTERRUPTED";
|
|
350
358
|
/** 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`. */
|
|
351
359
|
readonly BILLING_DETAILS_INCOMPLETE: "BILLING_DETAILS_INCOMPLETE";
|
|
352
360
|
/** 400 — billing details failed validation; the field is in `details.path`. */
|
package/payloads/v1/api-error.js
CHANGED
|
@@ -106,6 +106,8 @@ var API_ERROR_CODES = {
|
|
|
106
106
|
APP_BANNED: "APP_BANNED",
|
|
107
107
|
APP_ALREADY_PUBLISHED: "APP_ALREADY_PUBLISHED",
|
|
108
108
|
APP_HAS_NO_SUBDOMAIN: "APP_HAS_NO_SUBDOMAIN",
|
|
109
|
+
/** 409 — the application is still building; wait until the build ends. */
|
|
110
|
+
APP_BUILDING: "APP_BUILDING",
|
|
109
111
|
APP_NOT_FOUND: "APP_NOT_FOUND",
|
|
110
112
|
APP_NOT_PUBLISHED: "APP_NOT_PUBLISHED",
|
|
111
113
|
APP_ALREADY_IN_WORKSPACE: "APP_ALREADY_IN_WORKSPACE",
|
|
@@ -158,6 +160,8 @@ var API_ERROR_CODES = {
|
|
|
158
160
|
STORAGE_QUOTA_EXCEEDED: "STORAGE_QUOTA_EXCEEDED",
|
|
159
161
|
BUILD_FAILED: "BUILD_FAILED",
|
|
160
162
|
BUILD_TIMEOUT: "BUILD_TIMEOUT",
|
|
163
|
+
/** The build was interrupted before it finished; start it again with a restart. */
|
|
164
|
+
BUILD_INTERRUPTED: "BUILD_INTERRUPTED",
|
|
161
165
|
/** 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`. */
|
|
162
166
|
BILLING_DETAILS_INCOMPLETE: "BILLING_DETAILS_INCOMPLETE",
|
|
163
167
|
/** 400 — billing details failed validation; the field is in `details.path`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["api-error.ts","workspace.ts"],"sourcesContent":["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\t/** 404 — the object does not exist or belongs to another account. */\n\tBLOB_OBJECT_NOT_FOUND: \"BLOB_OBJECT_NOT_FOUND\",\n\t/** 409 — the path is taken and `overwrite` is not set. */\n\tBLOB_OBJECT_ALREADY_EXISTS: \"BLOB_OBJECT_ALREADY_EXISTS\",\n\t/** 404 — the upload does not exist, is not yours, or is already completed or aborted. */\n\tBLOB_UPLOAD_NOT_FOUND: \"BLOB_UPLOAD_NOT_FOUND\",\n\t/** 410 — the upload passed its deadline. */\n\tBLOB_UPLOAD_EXPIRED: \"BLOB_UPLOAD_EXPIRED\",\n\t/** 409 — parts are missing or the stored size differs from the declared size. */\n\tBLOB_UPLOAD_INCOMPLETE: \"BLOB_UPLOAD_INCOMPLETE\",\n\t/** 409 — more uploads open than the plan allows. */\n\tBLOB_UPLOAD_LIMIT: \"BLOB_UPLOAD_LIMIT\",\n\t/** 400 — the SHA-256 sent does not match the file. */\n\tBLOB_CHECKSUM_MISMATCH: \"BLOB_CHECKSUM_MISMATCH\",\n\t/** 413 — the file exceeds the plan, single-request upload, folder rule or upload token limit. */\n\tBLOB_FILE_TOO_LARGE: \"BLOB_FILE_TOO_LARGE\",\n\t/** 403 — Blob Storage is suspended for the account (grace period, abuse or deletion). */\n\tBLOB_NAMESPACE_SUSPENDED: \"BLOB_NAMESPACE_SUSPENDED\",\n\t/** 401 — the upload token does not exist, expired or was revoked. */\n\tBLOB_UPLOAD_TOKEN_INVALID: \"BLOB_UPLOAD_TOKEN_INVALID\",\n\t/** 401 — the upload token has no uses left. */\n\tBLOB_UPLOAD_TOKEN_EXHAUSTED: \"BLOB_UPLOAD_TOKEN_EXHAUSTED\",\n\t/** 403 — upload tokens only work on the upload routes. */\n\tBLOB_UPLOAD_TOKEN_NOT_ALLOWED: \"BLOB_UPLOAD_TOKEN_NOT_ALLOWED\",\n\t/** 403 — the path, size or extension is outside what the upload token allows. */\n\tBLOB_UPLOAD_TOKEN_CONSTRAINT: \"BLOB_UPLOAD_TOKEN_CONSTRAINT\",\n\t/** 404 — the share does not exist, was revoked or expired. */\n\tBLOB_SHARE_NOT_FOUND: \"BLOB_SHARE_NOT_FOUND\",\n\t/** 410 — the share reached its download limit. */\n\tBLOB_SHARE_EXHAUSTED: \"BLOB_SHARE_EXHAUSTED\",\n\t/** 401 — wrong share password. */\n\tBLOB_SHARE_PASSWORD_INVALID: \"BLOB_SHARE_PASSWORD_INVALID\",\n\t/** 409 — the `If-Match` of the rule list is outdated; read it again. */\n\tBLOB_RULES_CONFLICT: \"BLOB_RULES_CONFLICT\",\n\t/** 409 — more folder rules than the plan allows. */\n\tBLOB_RULE_LIMIT: \"BLOB_RULE_LIMIT\",\n\t/** 409 — more custom domains than the plan allows. */\n\tBLOB_CUSTOM_DOMAIN_LIMIT: \"BLOB_CUSTOM_DOMAIN_LIMIT\",\n\t/** 409 — the hostname is already in use. */\n\tBLOB_CUSTOM_DOMAIN_TAKEN: \"BLOB_CUSTOM_DOMAIN_TAKEN\",\n\t/** 404 — the domain does not exist or belongs to another account. */\n\tBLOB_CUSTOM_DOMAIN_NOT_FOUND: \"BLOB_CUSTOM_DOMAIN_NOT_FOUND\",\n\t/** 422 — the file extension is blocked, outside the rule or token, or the content is an executable. */\n\tBLOCKED_FILE_TYPE: \"BLOCKED_FILE_TYPE\",\n\t/** 403 — the upload would exceed the storage quota. */\n\tSTORAGE_QUOTA_EXCEEDED: \"STORAGE_QUOTA_EXCEEDED\",\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\";\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| \"blob:read\"\n\t| \"blob: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\tBLOB_READ: \"blob:read\",\n\tBLOB_MANAGE: \"blob: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\" | \"blob\" | \"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\"blob:read\": { group: \"blob\" },\n\t\"blob:manage\": { group: \"blob\" },\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) nor `blob:read`/`blob:manage`\n * (Blob Storage files are the owner's data); the owner can grant them 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\" && p !== \"blob:read\" && p !== \"blob: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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC+DO,IAAM,wBAA+E;AAAA,EAC3F,aAAa,EAAE,OAAO,OAAO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A6B;AAAA;AAAA,EAE7B,wBAAwB;AAAA;AAAA,EAExB,iBAAiB;AAAA;AAAA,EAEjB,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,kBAAkB;AAAA,EAClB,0BAA0B;AAAA,EAC1B,iBAAiB;AAAA,EACjB,wBAAwB;AAAA,EACxB,oBAAoB;AAAA,EACpB,uBAAuB;AAAA,EACvB,wBAAwB;AAAA,EACxB,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,yBAAyB;AAAA,EACzB,+BAA+B;AAAA,EAC/B,qBAAqB;AAAA,EACrB,iBAAiB;AAAA;AAAA,EAEjB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,gBAAgB;AAAA,EAChB,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,cAAc;AAAA,EACd,qBAAqB;AAAA,EACrB,GAAG;AACJ;AAEO,IAAM,eAAe;","names":[]}
|
|
1
|
+
{"version":3,"sources":["api-error.ts","workspace.ts"],"sourcesContent":["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\t/** 409 — the application is still building; wait until the build ends. */\n\tAPP_BUILDING: \"APP_BUILDING\",\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\t/** 404 — the object does not exist or belongs to another account. */\n\tBLOB_OBJECT_NOT_FOUND: \"BLOB_OBJECT_NOT_FOUND\",\n\t/** 409 — the path is taken and `overwrite` is not set. */\n\tBLOB_OBJECT_ALREADY_EXISTS: \"BLOB_OBJECT_ALREADY_EXISTS\",\n\t/** 404 — the upload does not exist, is not yours, or is already completed or aborted. */\n\tBLOB_UPLOAD_NOT_FOUND: \"BLOB_UPLOAD_NOT_FOUND\",\n\t/** 410 — the upload passed its deadline. */\n\tBLOB_UPLOAD_EXPIRED: \"BLOB_UPLOAD_EXPIRED\",\n\t/** 409 — parts are missing or the stored size differs from the declared size. */\n\tBLOB_UPLOAD_INCOMPLETE: \"BLOB_UPLOAD_INCOMPLETE\",\n\t/** 409 — more uploads open than the plan allows. */\n\tBLOB_UPLOAD_LIMIT: \"BLOB_UPLOAD_LIMIT\",\n\t/** 400 — the SHA-256 sent does not match the file. */\n\tBLOB_CHECKSUM_MISMATCH: \"BLOB_CHECKSUM_MISMATCH\",\n\t/** 413 — the file exceeds the plan, single-request upload, folder rule or upload token limit. */\n\tBLOB_FILE_TOO_LARGE: \"BLOB_FILE_TOO_LARGE\",\n\t/** 403 — Blob Storage is suspended for the account (grace period, abuse or deletion). */\n\tBLOB_NAMESPACE_SUSPENDED: \"BLOB_NAMESPACE_SUSPENDED\",\n\t/** 401 — the upload token does not exist, expired or was revoked. */\n\tBLOB_UPLOAD_TOKEN_INVALID: \"BLOB_UPLOAD_TOKEN_INVALID\",\n\t/** 401 — the upload token has no uses left. */\n\tBLOB_UPLOAD_TOKEN_EXHAUSTED: \"BLOB_UPLOAD_TOKEN_EXHAUSTED\",\n\t/** 403 — upload tokens only work on the upload routes. */\n\tBLOB_UPLOAD_TOKEN_NOT_ALLOWED: \"BLOB_UPLOAD_TOKEN_NOT_ALLOWED\",\n\t/** 403 — the path, size or extension is outside what the upload token allows. */\n\tBLOB_UPLOAD_TOKEN_CONSTRAINT: \"BLOB_UPLOAD_TOKEN_CONSTRAINT\",\n\t/** 404 — the share does not exist, was revoked or expired. */\n\tBLOB_SHARE_NOT_FOUND: \"BLOB_SHARE_NOT_FOUND\",\n\t/** 410 — the share reached its download limit. */\n\tBLOB_SHARE_EXHAUSTED: \"BLOB_SHARE_EXHAUSTED\",\n\t/** 401 — wrong share password. */\n\tBLOB_SHARE_PASSWORD_INVALID: \"BLOB_SHARE_PASSWORD_INVALID\",\n\t/** 409 — the `If-Match` of the rule list is outdated; read it again. */\n\tBLOB_RULES_CONFLICT: \"BLOB_RULES_CONFLICT\",\n\t/** 409 — more folder rules than the plan allows. */\n\tBLOB_RULE_LIMIT: \"BLOB_RULE_LIMIT\",\n\t/** 409 — more custom domains than the plan allows. */\n\tBLOB_CUSTOM_DOMAIN_LIMIT: \"BLOB_CUSTOM_DOMAIN_LIMIT\",\n\t/** 409 — the hostname is already in use. */\n\tBLOB_CUSTOM_DOMAIN_TAKEN: \"BLOB_CUSTOM_DOMAIN_TAKEN\",\n\t/** 404 — the domain does not exist or belongs to another account. */\n\tBLOB_CUSTOM_DOMAIN_NOT_FOUND: \"BLOB_CUSTOM_DOMAIN_NOT_FOUND\",\n\t/** 422 — the file extension is blocked, outside the rule or token, or the content is an executable. */\n\tBLOCKED_FILE_TYPE: \"BLOCKED_FILE_TYPE\",\n\t/** 403 — the upload would exceed the storage quota. */\n\tSTORAGE_QUOTA_EXCEEDED: \"STORAGE_QUOTA_EXCEEDED\",\n\tBUILD_FAILED: \"BUILD_FAILED\",\n\tBUILD_TIMEOUT: \"BUILD_TIMEOUT\",\n\t/** The build was interrupted before it finished; start it again with a restart. */\n\tBUILD_INTERRUPTED: \"BUILD_INTERRUPTED\",\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\";\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| \"blob:read\"\n\t| \"blob: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\tBLOB_READ: \"blob:read\",\n\tBLOB_MANAGE: \"blob: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\" | \"blob\" | \"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\"blob:read\": { group: \"blob\" },\n\t\"blob:manage\": { group: \"blob\" },\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) nor `blob:read`/`blob:manage`\n * (Blob Storage files are the owner's data); the owner can grant them 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\" && p !== \"blob:read\" && p !== \"blob: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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC+DO,IAAM,wBAA+E;AAAA,EAC3F,aAAa,EAAE,OAAO,OAAO;AAAA,EAC7B,eAAe,EAAE,OAAO,OAAO;AAAA,EAC/B,kBAAkB,EAAE,OAAO,OAAO;AAAA,EAClC,aAAa,EAAE,OAAO,OAAO;AAAA,EAC7B,cAAc,EAAE,OAAO,OAAO;AAAA,EAC9B,eAAe,EAAE,OAAO,OAAO;AAAA,EAC/B,kBAAkB,EAAE,OAAO,YAAY;AAAA,EACvC,oBAAoB,EAAE,OAAO,YAAY;AAAA,EACzC,uBAAuB,EAAE,OAAO,YAAY;AAAA,EAC5C,yBAAyB,EAAE,OAAO,YAAY;AAAA,EAC9C,kBAAkB,EAAE,OAAO,YAAY;AAAA,EACvC,oBAAoB,EAAE,OAAO,YAAY;AAAA,EACzC,kBAAkB,EAAE,O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A;AAAA,EAEjB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,gBAAgB;AAAA,EAChB,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,cAAc;AAAA,EACd,qBAAqB;AAAA,EACrB,GAAG;AACJ;AAEO,IAAM,eAAe;","names":[]}
|
|
@@ -79,6 +79,8 @@ var API_ERROR_CODES = {
|
|
|
79
79
|
APP_BANNED: "APP_BANNED",
|
|
80
80
|
APP_ALREADY_PUBLISHED: "APP_ALREADY_PUBLISHED",
|
|
81
81
|
APP_HAS_NO_SUBDOMAIN: "APP_HAS_NO_SUBDOMAIN",
|
|
82
|
+
/** 409 — the application is still building; wait until the build ends. */
|
|
83
|
+
APP_BUILDING: "APP_BUILDING",
|
|
82
84
|
APP_NOT_FOUND: "APP_NOT_FOUND",
|
|
83
85
|
APP_NOT_PUBLISHED: "APP_NOT_PUBLISHED",
|
|
84
86
|
APP_ALREADY_IN_WORKSPACE: "APP_ALREADY_IN_WORKSPACE",
|
|
@@ -131,6 +133,8 @@ var API_ERROR_CODES = {
|
|
|
131
133
|
STORAGE_QUOTA_EXCEEDED: "STORAGE_QUOTA_EXCEEDED",
|
|
132
134
|
BUILD_FAILED: "BUILD_FAILED",
|
|
133
135
|
BUILD_TIMEOUT: "BUILD_TIMEOUT",
|
|
136
|
+
/** The build was interrupted before it finished; start it again with a restart. */
|
|
137
|
+
BUILD_INTERRUPTED: "BUILD_INTERRUPTED",
|
|
134
138
|
/** 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`. */
|
|
135
139
|
BILLING_DETAILS_INCOMPLETE: "BILLING_DETAILS_INCOMPLETE",
|
|
136
140
|
/** 400 — billing details failed validation; the field is in `details.path`. */
|
|
@@ -20,10 +20,26 @@ declare const ApplicationLanguage: {
|
|
|
20
20
|
/**
|
|
21
21
|
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
22
22
|
*/
|
|
23
|
-
type ApplicationStatus = "up" | "down";
|
|
23
|
+
type ApplicationStatus = "up" | "down" | "building";
|
|
24
24
|
declare const ApplicationStatus: {
|
|
25
25
|
readonly UP: "up";
|
|
26
26
|
readonly DOWN: "down";
|
|
27
|
+
/** First build and start in progress after `POST /v1/apps`; ends as `up` or `down`. */
|
|
28
|
+
readonly BUILDING: "building";
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Why the last build or install failed. See `APIApplication.last_build_error`.
|
|
32
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
33
|
+
*/
|
|
34
|
+
type ApplicationBuildError = "BUILD_FAILED" | "BUILD_TIMEOUT" | "INSTALL_FAILED" | "INSTALL_OUT_OF_MEMORY" | "INSTALL_TIMEOUT" | "INSTALL_SHIELD_BLOCKED" | "BUILD_INTERRUPTED";
|
|
35
|
+
declare const ApplicationBuildError: {
|
|
36
|
+
readonly BUILD_FAILED: "BUILD_FAILED";
|
|
37
|
+
readonly BUILD_TIMEOUT: "BUILD_TIMEOUT";
|
|
38
|
+
readonly INSTALL_FAILED: "INSTALL_FAILED";
|
|
39
|
+
readonly INSTALL_OUT_OF_MEMORY: "INSTALL_OUT_OF_MEMORY";
|
|
40
|
+
readonly INSTALL_TIMEOUT: "INSTALL_TIMEOUT";
|
|
41
|
+
readonly INSTALL_SHIELD_BLOCKED: "INSTALL_SHIELD_BLOCKED";
|
|
42
|
+
readonly BUILD_INTERRUPTED: "BUILD_INTERRUPTED";
|
|
27
43
|
};
|
|
28
44
|
/**
|
|
29
45
|
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
@@ -167,6 +183,8 @@ interface APIApplication {
|
|
|
167
183
|
language: ApplicationLanguage;
|
|
168
184
|
ram: number;
|
|
169
185
|
status: ApplicationStatus;
|
|
186
|
+
/** Code of the last failed build/install; `null` after a successful build. Details in the app logs. */
|
|
187
|
+
last_build_error: ApplicationBuildError | null;
|
|
170
188
|
subdomain: string | null;
|
|
171
189
|
/**
|
|
172
190
|
* Canonical public URL of the app, computed by the server (`custom_domain` > `subdomain` >
|
|
@@ -575,4 +593,4 @@ interface APIApplicationRealtimeEvent {
|
|
|
575
593
|
data: string;
|
|
576
594
|
}
|
|
577
595
|
|
|
578
|
-
export { type APIApplication, type APIApplicationConfig, type APIApplicationCustomDomain, type APIApplicationDeploySettings, type APIApplicationDeployment, type APIApplicationDnsRecord, type APIApplicationEnvironment, type APIApplicationFile, type APIApplicationFileContent, type APIApplicationFileTree, type APIApplicationFileUpload, type APIApplicationGithub, type APIApplicationMetric, type APIApplicationNetwork, type APIApplicationOperationResponse, type APIApplicationRealtimeEvent, type APIApplicationRelease, type APIApplicationReleaseLog, type APIApplicationRollbackPreview, type APIApplicationRuntime, type APIApplicationRuntimes, type APIApplicationScanSuggestions, type APIApplicationShieldCooldown, type APIApplicationStatus, type APIApplicationStatusShort, type APIApplicationSubdomain, type APIApplicationWebPublish, type APIApplicationWebhook, type APIApplicationWebhookUrl, ApplicationCluster, ApplicationDnsRecordStatus, ApplicationDnsRecordType, ApplicationEnvironmentChange, ApplicationFileContentType, ApplicationFileType, ApplicationLanguage, ApplicationRealtimeEventType, ApplicationReleaseSource, ApplicationReleaseStatus, ApplicationStatus, ApplicationType, ApplicationVersion, ApplicationZeroDowntime, ShieldIncidentDirection, ShieldIncidentReason };
|
|
596
|
+
export { type APIApplication, type APIApplicationConfig, type APIApplicationCustomDomain, type APIApplicationDeploySettings, type APIApplicationDeployment, type APIApplicationDnsRecord, type APIApplicationEnvironment, type APIApplicationFile, type APIApplicationFileContent, type APIApplicationFileTree, type APIApplicationFileUpload, type APIApplicationGithub, type APIApplicationMetric, type APIApplicationNetwork, type APIApplicationOperationResponse, type APIApplicationRealtimeEvent, type APIApplicationRelease, type APIApplicationReleaseLog, type APIApplicationRollbackPreview, type APIApplicationRuntime, type APIApplicationRuntimes, type APIApplicationScanSuggestions, type APIApplicationShieldCooldown, type APIApplicationStatus, type APIApplicationStatusShort, type APIApplicationSubdomain, type APIApplicationWebPublish, type APIApplicationWebhook, type APIApplicationWebhookUrl, ApplicationBuildError, ApplicationCluster, ApplicationDnsRecordStatus, ApplicationDnsRecordType, ApplicationEnvironmentChange, ApplicationFileContentType, ApplicationFileType, ApplicationLanguage, ApplicationRealtimeEventType, ApplicationReleaseSource, ApplicationReleaseStatus, ApplicationStatus, ApplicationType, ApplicationVersion, ApplicationZeroDowntime, ShieldIncidentDirection, ShieldIncidentReason };
|
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// payloads/v1/application.ts
|
|
21
21
|
var application_exports = {};
|
|
22
22
|
__export(application_exports, {
|
|
23
|
+
ApplicationBuildError: () => ApplicationBuildError,
|
|
23
24
|
ApplicationCluster: () => ApplicationCluster,
|
|
24
25
|
ApplicationDnsRecordStatus: () => ApplicationDnsRecordStatus,
|
|
25
26
|
ApplicationDnsRecordType: () => ApplicationDnsRecordType,
|
|
@@ -52,7 +53,18 @@ var ApplicationLanguage = {
|
|
|
52
53
|
};
|
|
53
54
|
var ApplicationStatus = {
|
|
54
55
|
UP: "up",
|
|
55
|
-
DOWN: "down"
|
|
56
|
+
DOWN: "down",
|
|
57
|
+
/** First build and start in progress after `POST /v1/apps`; ends as `up` or `down`. */
|
|
58
|
+
BUILDING: "building"
|
|
59
|
+
};
|
|
60
|
+
var ApplicationBuildError = {
|
|
61
|
+
BUILD_FAILED: "BUILD_FAILED",
|
|
62
|
+
BUILD_TIMEOUT: "BUILD_TIMEOUT",
|
|
63
|
+
INSTALL_FAILED: "INSTALL_FAILED",
|
|
64
|
+
INSTALL_OUT_OF_MEMORY: "INSTALL_OUT_OF_MEMORY",
|
|
65
|
+
INSTALL_TIMEOUT: "INSTALL_TIMEOUT",
|
|
66
|
+
INSTALL_SHIELD_BLOCKED: "INSTALL_SHIELD_BLOCKED",
|
|
67
|
+
BUILD_INTERRUPTED: "BUILD_INTERRUPTED"
|
|
56
68
|
};
|
|
57
69
|
var ApplicationCluster = {
|
|
58
70
|
USA_1: 1,
|
|
@@ -124,6 +136,7 @@ var ApplicationRealtimeEventType = {
|
|
|
124
136
|
};
|
|
125
137
|
// Annotate the CommonJS export names for ESM import in node:
|
|
126
138
|
0 && (module.exports = {
|
|
139
|
+
ApplicationBuildError,
|
|
127
140
|
ApplicationCluster,
|
|
128
141
|
ApplicationDnsRecordStatus,
|
|
129
142
|
ApplicationDnsRecordType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["application.ts"],"sourcesContent":["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 `off`: zero-downtime deploys are opt-in. */\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. Off by default (opt-in). Acts from the Intermediary plan; the saved value is returned on\n\t * 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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,sBAAsB;AAAA,EAClC,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACP;AAMO,IAAM,oBAAoB;AAAA,EAChC,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,qBAAqB;AAAA,EACjC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,kBAAkB;AAAA,EAC9B,KAAK;AAAA,EACL,SAAS;AACV;AAMO,IAAM,sBAAsB;AAAA,EAClC,MAAM;AAAA,EACN,WAAW;AACZ;AAMO,IAAM,qBAAqB;AAAA,EACjC,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,MAAM;AACP;AAMO,IAAM,6BAA6B;AAAA,EACzC,QAAQ;AACT;AA8DO,IAAM,0BAA0B;AAAA,EACtC,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,KAAK;AACN;AA4MO,IAAM,2BAA2B;AAAA,EACvC,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,YAAY;AACb;AAaO,IAAM,2BAA2B;AAAA,EACvC,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,SAAS;AACV;AAoEO,IAAM,+BAA+B;AAAA,EAC3C,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AACV;AAgBO,IAAM,2BAA2B;AAAA,EACvC,OAAO;AAAA,EACP,KAAK;AACN;AAMO,IAAM,6BAA6B;AAAA,EACzC,QAAQ;AAAA,EACR,oBAAoB;AACrB;AAmDO,IAAM,uBAAuB;AAAA,EACnC,OAAO;AAAA,EACP,YAAY;AACb;AAMO,IAAM,0BAA0B;AAAA,EACtC,IAAI;AAAA,EACJ,KAAK;AACN;AAqEO,IAAM,+BAA+B;AAAA,EAC3C,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,WAAW;AACZ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["application.ts"],"sourcesContent":["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\" | \"building\";\nexport const ApplicationStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n\t/** First build and start in progress after `POST /v1/apps`; ends as `up` or `down`. */\n\tBUILDING: \"building\",\n} as const;\n\n/**\n * Why the last build or install failed. See `APIApplication.last_build_error`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationBuildError = \"BUILD_FAILED\" | \"BUILD_TIMEOUT\" | \"INSTALL_FAILED\" | \"INSTALL_OUT_OF_MEMORY\" | \"INSTALL_TIMEOUT\" | \"INSTALL_SHIELD_BLOCKED\" | \"BUILD_INTERRUPTED\";\nexport const ApplicationBuildError = {\n\tBUILD_FAILED: \"BUILD_FAILED\",\n\tBUILD_TIMEOUT: \"BUILD_TIMEOUT\",\n\tINSTALL_FAILED: \"INSTALL_FAILED\",\n\tINSTALL_OUT_OF_MEMORY: \"INSTALL_OUT_OF_MEMORY\",\n\tINSTALL_TIMEOUT: \"INSTALL_TIMEOUT\",\n\tINSTALL_SHIELD_BLOCKED: \"INSTALL_SHIELD_BLOCKED\",\n\tBUILD_INTERRUPTED: \"BUILD_INTERRUPTED\",\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 `off`: zero-downtime deploys are opt-in. */\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. Off by default (opt-in). Acts from the Intermediary plan; the saved value is returned on\n\t * 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\t/** Code of the last failed build/install; `null` after a successful build. Details in the app logs. */\n\tlast_build_error: ApplicationBuildError | null;\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,sBAAsB;AAAA,EAClC,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACP;AAMO,IAAM,oBAAoB;AAAA,EAChC,IAAI;AAAA,EACJ,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AAAA,EACN,QAAQ;AAAA,EACR,WAAW;AACZ;","names":[]}
|
|
@@ -13,7 +13,18 @@ var ApplicationLanguage = {
|
|
|
13
13
|
};
|
|
14
14
|
var ApplicationStatus = {
|
|
15
15
|
UP: "up",
|
|
16
|
-
DOWN: "down"
|
|
16
|
+
DOWN: "down",
|
|
17
|
+
/** First build and start in progress after `POST /v1/apps`; ends as `up` or `down`. */
|
|
18
|
+
BUILDING: "building"
|
|
19
|
+
};
|
|
20
|
+
var ApplicationBuildError = {
|
|
21
|
+
BUILD_FAILED: "BUILD_FAILED",
|
|
22
|
+
BUILD_TIMEOUT: "BUILD_TIMEOUT",
|
|
23
|
+
INSTALL_FAILED: "INSTALL_FAILED",
|
|
24
|
+
INSTALL_OUT_OF_MEMORY: "INSTALL_OUT_OF_MEMORY",
|
|
25
|
+
INSTALL_TIMEOUT: "INSTALL_TIMEOUT",
|
|
26
|
+
INSTALL_SHIELD_BLOCKED: "INSTALL_SHIELD_BLOCKED",
|
|
27
|
+
BUILD_INTERRUPTED: "BUILD_INTERRUPTED"
|
|
17
28
|
};
|
|
18
29
|
var ApplicationCluster = {
|
|
19
30
|
USA_1: 1,
|
|
@@ -84,6 +95,7 @@ var ApplicationRealtimeEventType = {
|
|
|
84
95
|
HEARTBEAT: "heartbeat"
|
|
85
96
|
};
|
|
86
97
|
export {
|
|
98
|
+
ApplicationBuildError,
|
|
87
99
|
ApplicationCluster,
|
|
88
100
|
ApplicationDnsRecordStatus,
|
|
89
101
|
ApplicationDnsRecordType,
|
package/payloads/v1/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { APIActivity, ActivityOrigin, ActivityStatus, ActivityTargetType } from './activity.js';
|
|
2
2
|
export { APIApiKey, APIApiKeyCreated, APIApiKeyPreset, APIApiKeyRoute, APIApiKeyRouteMethod, APIApiKeyScope, APIApiKeyScopeEntry, API_KEY_MAX_ALLOWED_IPS, API_KEY_MAX_PER_USER, API_KEY_NAME_MAX_LENGTH, API_KEY_SCOPES, API_KEY_SCOPE_LIST, apiKeyPresetScopes } from './api-key.js';
|
|
3
3
|
export { APIErrorCode, API_ERROR_CODES } from './api-error.js';
|
|
4
|
-
export { APIApplication, APIApplicationConfig, APIApplicationCustomDomain, APIApplicationDeploySettings, APIApplicationDeployment, APIApplicationDnsRecord, APIApplicationEnvironment, APIApplicationFile, APIApplicationFileContent, APIApplicationFileTree, APIApplicationFileUpload, APIApplicationGithub, APIApplicationMetric, APIApplicationNetwork, APIApplicationOperationResponse, APIApplicationRealtimeEvent, APIApplicationRelease, APIApplicationReleaseLog, APIApplicationRollbackPreview, APIApplicationRuntime, APIApplicationRuntimes, APIApplicationScanSuggestions, APIApplicationShieldCooldown, APIApplicationStatus, APIApplicationStatusShort, APIApplicationSubdomain, APIApplicationWebPublish, APIApplicationWebhook, APIApplicationWebhookUrl, ApplicationCluster, ApplicationDnsRecordStatus, ApplicationDnsRecordType, ApplicationEnvironmentChange, ApplicationFileContentType, ApplicationFileType, ApplicationLanguage, ApplicationRealtimeEventType, ApplicationReleaseSource, ApplicationReleaseStatus, ApplicationStatus, ApplicationType, ApplicationVersion, ApplicationZeroDowntime, ShieldIncidentDirection, ShieldIncidentReason } from './application.js';
|
|
4
|
+
export { APIApplication, APIApplicationConfig, APIApplicationCustomDomain, APIApplicationDeploySettings, APIApplicationDeployment, APIApplicationDnsRecord, APIApplicationEnvironment, APIApplicationFile, APIApplicationFileContent, APIApplicationFileTree, APIApplicationFileUpload, APIApplicationGithub, APIApplicationMetric, APIApplicationNetwork, APIApplicationOperationResponse, APIApplicationRealtimeEvent, APIApplicationRelease, APIApplicationReleaseLog, APIApplicationRollbackPreview, APIApplicationRuntime, APIApplicationRuntimes, APIApplicationScanSuggestions, APIApplicationShieldCooldown, APIApplicationStatus, APIApplicationStatusShort, APIApplicationSubdomain, APIApplicationWebPublish, APIApplicationWebhook, APIApplicationWebhookUrl, ApplicationBuildError, ApplicationCluster, ApplicationDnsRecordStatus, ApplicationDnsRecordType, ApplicationEnvironmentChange, ApplicationFileContentType, ApplicationFileType, ApplicationLanguage, ApplicationRealtimeEventType, ApplicationReleaseSource, ApplicationReleaseStatus, ApplicationStatus, ApplicationType, ApplicationVersion, ApplicationZeroDowntime, ShieldIncidentDirection, ShieldIncidentReason } from './application.js';
|
|
5
5
|
export { APIBillingAddress, APIBillingCard, APIBillingDetails, APIBillingRenewal, APIBillingTaxId, BillingTaxIdType } from './billing.js';
|
|
6
6
|
export { APIBlobBatchResult, APIBlobCustomDomain, APIBlobDeleteResult, APIBlobDownload, APIBlobLimits, APIBlobObject, APIBlobObjectList, APIBlobRule, APIBlobRules, APIBlobS3Credentials, APIBlobShare, APIBlobSharePublic, APIBlobStats, APIBlobUpload, APIBlobUploadPart, APIBlobUploadToken, BlobContentDisposition, BlobCustomDomainStatus, BlobUploadMode, BlobUploadStatus, BlobVisibility } from './blob.js';
|
|
7
7
|
export { APIDatabase, APIDatabaseCertificate, APIDatabaseMetrics, APIDatabaseNetwork, APIDatabaseOperationResponse, APIDatabasePasswordReset, APIDatabaseStatus, APIDatabaseStatusShort, DatabaseCluster, DatabaseStatus, DatabaseType } from './database.js';
|
package/payloads/v1/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(v1_exports, {
|
|
|
34
34
|
ActivityOrigin: () => ActivityOrigin,
|
|
35
35
|
ActivityStatus: () => ActivityStatus,
|
|
36
36
|
ActivityTargetType: () => ActivityTargetType,
|
|
37
|
+
ApplicationBuildError: () => ApplicationBuildError,
|
|
37
38
|
ApplicationCluster: () => ApplicationCluster,
|
|
38
39
|
ApplicationDnsRecordStatus: () => ApplicationDnsRecordStatus,
|
|
39
40
|
ApplicationDnsRecordType: () => ApplicationDnsRecordType,
|
|
@@ -524,6 +525,8 @@ var API_ERROR_CODES = {
|
|
|
524
525
|
APP_BANNED: "APP_BANNED",
|
|
525
526
|
APP_ALREADY_PUBLISHED: "APP_ALREADY_PUBLISHED",
|
|
526
527
|
APP_HAS_NO_SUBDOMAIN: "APP_HAS_NO_SUBDOMAIN",
|
|
528
|
+
/** 409 — the application is still building; wait until the build ends. */
|
|
529
|
+
APP_BUILDING: "APP_BUILDING",
|
|
527
530
|
APP_NOT_FOUND: "APP_NOT_FOUND",
|
|
528
531
|
APP_NOT_PUBLISHED: "APP_NOT_PUBLISHED",
|
|
529
532
|
APP_ALREADY_IN_WORKSPACE: "APP_ALREADY_IN_WORKSPACE",
|
|
@@ -576,6 +579,8 @@ var API_ERROR_CODES = {
|
|
|
576
579
|
STORAGE_QUOTA_EXCEEDED: "STORAGE_QUOTA_EXCEEDED",
|
|
577
580
|
BUILD_FAILED: "BUILD_FAILED",
|
|
578
581
|
BUILD_TIMEOUT: "BUILD_TIMEOUT",
|
|
582
|
+
/** The build was interrupted before it finished; start it again with a restart. */
|
|
583
|
+
BUILD_INTERRUPTED: "BUILD_INTERRUPTED",
|
|
579
584
|
/** 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`. */
|
|
580
585
|
BILLING_DETAILS_INCOMPLETE: "BILLING_DETAILS_INCOMPLETE",
|
|
581
586
|
/** 400 — billing details failed validation; the field is in `details.path`. */
|
|
@@ -752,7 +757,18 @@ var ApplicationLanguage = {
|
|
|
752
757
|
};
|
|
753
758
|
var ApplicationStatus = {
|
|
754
759
|
UP: "up",
|
|
755
|
-
DOWN: "down"
|
|
760
|
+
DOWN: "down",
|
|
761
|
+
/** First build and start in progress after `POST /v1/apps`; ends as `up` or `down`. */
|
|
762
|
+
BUILDING: "building"
|
|
763
|
+
};
|
|
764
|
+
var ApplicationBuildError = {
|
|
765
|
+
BUILD_FAILED: "BUILD_FAILED",
|
|
766
|
+
BUILD_TIMEOUT: "BUILD_TIMEOUT",
|
|
767
|
+
INSTALL_FAILED: "INSTALL_FAILED",
|
|
768
|
+
INSTALL_OUT_OF_MEMORY: "INSTALL_OUT_OF_MEMORY",
|
|
769
|
+
INSTALL_TIMEOUT: "INSTALL_TIMEOUT",
|
|
770
|
+
INSTALL_SHIELD_BLOCKED: "INSTALL_SHIELD_BLOCKED",
|
|
771
|
+
BUILD_INTERRUPTED: "BUILD_INTERRUPTED"
|
|
756
772
|
};
|
|
757
773
|
var ApplicationCluster = {
|
|
758
774
|
USA_1: 1,
|
|
@@ -973,6 +989,7 @@ var UserLanguage = {
|
|
|
973
989
|
ActivityOrigin,
|
|
974
990
|
ActivityStatus,
|
|
975
991
|
ActivityTargetType,
|
|
992
|
+
ApplicationBuildError,
|
|
976
993
|
ApplicationCluster,
|
|
977
994
|
ApplicationDnsRecordStatus,
|
|
978
995
|
ApplicationDnsRecordType,
|