@vertracloud/api-types 0.4.2 → 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/v1.d.ts +1 -1
- package/v1.js +18 -1
- package/v1.js.map +1 -1
- package/v1.mjs +17 -1
package/payloads/v1/index.mjs
CHANGED
|
@@ -432,6 +432,8 @@ var API_ERROR_CODES = {
|
|
|
432
432
|
APP_BANNED: "APP_BANNED",
|
|
433
433
|
APP_ALREADY_PUBLISHED: "APP_ALREADY_PUBLISHED",
|
|
434
434
|
APP_HAS_NO_SUBDOMAIN: "APP_HAS_NO_SUBDOMAIN",
|
|
435
|
+
/** 409 — the application is still building; wait until the build ends. */
|
|
436
|
+
APP_BUILDING: "APP_BUILDING",
|
|
435
437
|
APP_NOT_FOUND: "APP_NOT_FOUND",
|
|
436
438
|
APP_NOT_PUBLISHED: "APP_NOT_PUBLISHED",
|
|
437
439
|
APP_ALREADY_IN_WORKSPACE: "APP_ALREADY_IN_WORKSPACE",
|
|
@@ -484,6 +486,8 @@ var API_ERROR_CODES = {
|
|
|
484
486
|
STORAGE_QUOTA_EXCEEDED: "STORAGE_QUOTA_EXCEEDED",
|
|
485
487
|
BUILD_FAILED: "BUILD_FAILED",
|
|
486
488
|
BUILD_TIMEOUT: "BUILD_TIMEOUT",
|
|
489
|
+
/** The build was interrupted before it finished; start it again with a restart. */
|
|
490
|
+
BUILD_INTERRUPTED: "BUILD_INTERRUPTED",
|
|
487
491
|
/** 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`. */
|
|
488
492
|
BILLING_DETAILS_INCOMPLETE: "BILLING_DETAILS_INCOMPLETE",
|
|
489
493
|
/** 400 — billing details failed validation; the field is in `details.path`. */
|
|
@@ -660,7 +664,18 @@ var ApplicationLanguage = {
|
|
|
660
664
|
};
|
|
661
665
|
var ApplicationStatus = {
|
|
662
666
|
UP: "up",
|
|
663
|
-
DOWN: "down"
|
|
667
|
+
DOWN: "down",
|
|
668
|
+
/** First build and start in progress after `POST /v1/apps`; ends as `up` or `down`. */
|
|
669
|
+
BUILDING: "building"
|
|
670
|
+
};
|
|
671
|
+
var ApplicationBuildError = {
|
|
672
|
+
BUILD_FAILED: "BUILD_FAILED",
|
|
673
|
+
BUILD_TIMEOUT: "BUILD_TIMEOUT",
|
|
674
|
+
INSTALL_FAILED: "INSTALL_FAILED",
|
|
675
|
+
INSTALL_OUT_OF_MEMORY: "INSTALL_OUT_OF_MEMORY",
|
|
676
|
+
INSTALL_TIMEOUT: "INSTALL_TIMEOUT",
|
|
677
|
+
INSTALL_SHIELD_BLOCKED: "INSTALL_SHIELD_BLOCKED",
|
|
678
|
+
BUILD_INTERRUPTED: "BUILD_INTERRUPTED"
|
|
664
679
|
};
|
|
665
680
|
var ApplicationCluster = {
|
|
666
681
|
USA_1: 1,
|
|
@@ -880,6 +895,7 @@ export {
|
|
|
880
895
|
ActivityOrigin,
|
|
881
896
|
ActivityStatus,
|
|
882
897
|
ActivityTargetType,
|
|
898
|
+
ApplicationBuildError,
|
|
883
899
|
ApplicationCluster,
|
|
884
900
|
ApplicationDnsRecordStatus,
|
|
885
901
|
ApplicationDnsRecordType,
|
package/rest/v1/application.d.ts
CHANGED
|
@@ -239,12 +239,12 @@ interface RESTPostAPIApplicationCreateBody {
|
|
|
239
239
|
envs?: RESTPostAPIApplicationEnvironmentVariableBody[];
|
|
240
240
|
}
|
|
241
241
|
/**
|
|
242
|
-
*
|
|
242
|
+
* `202` — the application, with `status: "building"`. The build and first start continue in the
|
|
243
|
+
* background; follow the logs or poll the application until `status` is `up` or `down`.
|
|
244
|
+
* `missing_dependencies` on the application is filled when the build ends.
|
|
243
245
|
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/create
|
|
244
246
|
*/
|
|
245
|
-
type RESTPostAPIApplicationCreateResponse = APIPayload<APIApplication
|
|
246
|
-
removed_directories: string[];
|
|
247
|
-
}>;
|
|
247
|
+
type RESTPostAPIApplicationCreateResponse = APIPayload<APIApplication>;
|
|
248
248
|
/**
|
|
249
249
|
* Scans a zip before creating the application and returns suggestions (start/build command,
|
|
250
250
|
* memory). Creates nothing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["application.ts"],"sourcesContent":["import type {\n\tAPIApplication,\n\tAPIApplicationCustomDomain,\n\tAPIApplicationDeployment,\n\tAPIApplicationDnsRecord,\n\tAPIApplicationEnvironment,\n\tAPIApplicationFile,\n\tAPIApplicationFileContent,\n\tAPIApplicationFileTree,\n\tAPIApplicationFileUpload,\n\tAPIApplicationMetric,\n\tAPIApplicationOperationResponse,\n\tAPIApplicationRealtimeEvent,\n\tAPIApplicationRelease,\n\tAPIApplicationReleaseLog,\n\tAPIApplicationRollbackPreview,\n\tAPIApplicationRuntimes,\n\tAPIApplicationScanSuggestions,\n\tAPIApplicationStatus,\n\tAPIApplicationStatusShort,\n\tAPIApplicationSubdomain,\n\tAPIApplicationWebPublish,\n\tAPIApplicationWebhook,\n\tAPIApplicationWebhookUrl,\n\tAPIPaginatedPayload,\n\tAPIPayload,\n\tApplicationLanguage,\n\tApplicationZeroDowntime,\n\tISODateString,\n\tRESTAPIWorkspaceQuery,\n} from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/runtimes\n */\nexport type RESTGetAPIApplicationRuntimesResponse = APIPayload<APIApplicationRuntimes>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type RESTGetAPIApplicationResponse = APIPayload<APIApplication>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/status\n */\nexport type RESTGetAPIApplicationStatusResponse = APIPayload<APIApplicationStatus>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/allstatus\n */\nexport type RESTGetAPIApplicationStatusShortResponse = APIPayload<APIApplicationStatusShort[]>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/logs\n */\nexport type RESTGetAPIApplicationLogsResponse = APIPayload<string>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/metrics\n */\nexport interface RESTGetAPIApplicationMetricsQuery extends RESTAPIWorkspaceQuery {\n\trange?: \"10m\" | \"30m\" | \"24h\";\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/metrics\n */\nexport type RESTGetAPIApplicationMetricsResponse = APIPayload<APIApplicationMetric[]>;\n\n/**\n * `GET /v1/apps/:id/files`. `path` absent = the application root.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/files\n */\nexport interface RESTGetAPIApplicationFilesQuery extends RESTAPIWorkspaceQuery {\n\tpath?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/files\n */\nexport type RESTGetAPIApplicationFilesResponse = APIPayload<APIApplicationFile[]>;\n\n/**\n * `GET /v1/apps/:id/files/tree` — the whole file tree (depth-limited), as a list of root entries.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/tree\n */\nexport type RESTGetAPIApplicationFileTreeResponse = APIPayload<APIApplicationFileTree[]>;\n\n/**\n * `GET /v1/apps/:id/files/content`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/content\n */\nexport interface RESTGetAPIApplicationFileContentQuery extends RESTAPIWorkspaceQuery {\n\tpath: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/content\n */\nexport type RESTGetAPIApplicationFileContentResponse = APIPayload<APIApplicationFileContent>;\n\n/**\n * `POST /v1/apps/:id/files/upload` (multipart, single file or zip). `restart: \"true\"` restarts the app after the upload.\n * `path` is the destination folder inside the application (default: root); a zip is extracted into it.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/upload\n */\nexport interface RESTPostAPIApplicationFileUploadQuery extends RESTAPIWorkspaceQuery {\n\trestart?: \"true\" | \"false\";\n\tpath?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/upload\n */\nexport type RESTPostAPIApplicationFileUploadResponse = APIPayload<APIApplicationFileUpload>;\n\n/**\n * Multipart body of `POST /v1/apps/:id/files/upload`: `file` as a file part, `message` as a text part.\n * `message` is the commit message shown in the release history. Optional, up to 500 characters;\n * surrounding spaces are trimmed and an empty value is stored as `null`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/upload\n */\nexport interface RESTPostAPIApplicationFileUploadBody {\n\t/** Zip or single file. */\n\tfile: unknown;\n\tmessage?: string;\n}\n\n/**\n * `GET /v1/apps/:id/releases`. Newest first. `limit` defaults to 20; the maximum is 50 and larger values return 400 `VALIDATION_ERROR`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/list\n */\nexport interface RESTGetAPIApplicationReleasesQuery extends RESTAPIWorkspaceQuery {\n\tpage?: number;\n\tlimit?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/list\n */\nexport type RESTGetAPIApplicationReleasesResponse = APIPaginatedPayload<APIApplicationRelease>;\n\n/**\n * `GET /v1/apps/:id/releases/:release_id/log`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/log\n */\nexport type RESTGetAPIApplicationReleaseLogResponse = APIPayload<APIApplicationReleaseLog>;\n\n/**\n * `GET /v1/apps/:id/releases/:release_id/rollback`. Previews a rollback to this release; changes nothing.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/rollback-preview\n */\nexport type RESTGetAPIApplicationRollbackPreviewResponse = APIPayload<APIApplicationRollbackPreview>;\n\n/**\n * Body of `POST /v1/apps/:id/releases/:release_id/rollback`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/rollback\n */\nexport interface RESTPostAPIApplicationRollbackBody {\n\t/** `true` also restores the environment variables saved with that release. Default `false`: the current variables are kept. */\n\trestore_environment?: boolean;\n}\n\n/**\n * Rolls the application back to this release. Restores all of its code, deletes the code files the\n * release did not have, leaves the data the application created while running untouched, and restarts\n * the application. Returns the new release, with `source: \"rollback\"`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/rollback\n */\nexport type RESTPostAPIApplicationRollbackResponse = APIPayload<APIApplicationRelease>;\n\n/**\n * Creates or overwrites a file. Without `content`, creates (or truncates to) an empty file.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/save\n */\nexport interface RESTPutAPIApplicationFileBody {\n\tpath: string;\n\tcontent?: string;\n\t/** ISO 8601 datetime from the last read; a mismatch returns `409 FILE_MODIFIED`. */\n\tlast_modified?: ISODateString;\n\tworkspace_id?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/save\n */\nexport type RESTPutAPIApplicationFileResponse = APIPayload<null>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/delete\n */\nexport interface RESTDeleteAPIApplicationFileBody {\n\tpath: string;\n\tworkspace_id?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/delete\n */\nexport type RESTDeleteAPIApplicationFileResponse = APIPayload<null>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/move\n */\nexport interface RESTPatchAPIApplicationFileMoveBody {\n\tpath: string;\n\tto: string;\n\tworkspace_id?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/move\n */\nexport type RESTPatchAPIApplicationFileMoveResponse = APIPayload<null>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/get\n */\nexport type RESTGetAPIApplicationEnvironmentResponse = APIPayload<APIApplicationEnvironment[]>;\n\n/**\n * One variable of the `POST /apps/:id/envs` body. `note: null` clears the existing note.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/createOrEdit\n */\nexport interface RESTPostAPIApplicationEnvironmentVariableBody {\n\tkey: string;\n\tvalue: string;\n\tnote?: string | null;\n}\n\n/**\n * Body of `POST /apps/:id/envs`: a single object (one variable) or an array (batch), with no repeated keys.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/createOrEdit\n */\nexport type RESTPostAPIApplicationEnvironmentBody = RESTPostAPIApplicationEnvironmentVariableBody | RESTPostAPIApplicationEnvironmentVariableBody[];\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/createOrEdit\n */\nexport type RESTPostAPIApplicationEnvironmentResponse = APIPayload<APIApplicationEnvironment[]>;\n\n/**\n * `DELETE /v1/apps/:id/envs/:envId`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/delete\n */\nexport type RESTDeleteAPIApplicationEnvironmentResponse = APIPayload<null>;\n\n/**\n * Body of `POST /apps` — **`multipart/form-data`**, not JSON. Each field below is one multipart\n * part: `file` as a file and **every other field as a text field** (including `snapshot_id`,\n * `memory` and `envs`, the latter as a JSON-serialized string).\n *\n * The application has **two mutually exclusive sources**:\n *\n * - `file` — the zip uploaded by the user;\n * - `snapshot_id` — alternative to `file`: the app is created from that snapshot (which already\n * includes its `vertracloud.config`).\n *\n * **Exactly one of them must be present.** Neither → `SOURCE_REQUIRED`; both →\n * `SOURCE_CONFLICT`.\n *\n * Error codes:\n *\n * - `SOURCE_REQUIRED` — neither `file` nor `snapshot_id`.\n * - `SOURCE_CONFLICT` — `file` and `snapshot_id` together.\n * - `SNAPSHOT_NOT_FOUND` — the snapshot does not exist or does not belong to the user.\n * - `SNAPSHOT_TYPE_MISMATCH` — the snapshot is from a database, not an application.\n * - `SNAPSHOT_TOO_LARGE` — the snapshot exceeds the size limit for creation.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/create\n */\nexport interface RESTPostAPIApplicationCreateBody {\n\t/** Application zip. Absent when the source is `snapshot_id`. */\n\tfile?: unknown;\n\t/**\n\t * Alternative to `file`: id of the **application** snapshot to create the app from. Sent as a\n\t * multipart text field. Exactly one of `file` and `snapshot_id`.\n\t */\n\tsnapshot_id?: string;\n\tname: string;\n\tdescription?: string | null;\n\t/** RAM in MB. Multipart text field. Required with `file`; with `snapshot_id` defaults to the snapshot's config. */\n\tmemory?: number;\n\t/** Required with `file`; with `snapshot_id` defaults to the snapshot's config. */\n\tmain?: string;\n\t/** Required with `file`; with `snapshot_id` defaults to the snapshot's config. */\n\tversion?: string;\n\tstart?: string;\n\t/** Build command (see `APIApplication.build_command`). */\n\tbuild?: string;\n\t/** `\"random\"` = the platform picks one at random. */\n\tsubdomain?: string;\n\tworkspace_id?: string;\n\t/** JSON-serialized string in the multipart body. */\n\tenvs?: RESTPostAPIApplicationEnvironmentVariableBody[];\n}\n\n/**\n * The created application, plus the directories removed from the uploaded zip.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/create\n */\nexport type RESTPostAPIApplicationCreateResponse = APIPayload<APIApplication & { removed_directories: string[] }>;\n\n/**\n * Scans a zip before creating the application and returns suggestions (start/build command,\n * memory). Creates nothing.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/scan\n */\nexport interface RESTPostAPIApplicationScanBody {\n\t/** Application zip. */\n\tfile: unknown;\n\t/** Main file of the application — used only to infer the language, as on create. */\n\tmain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/scan\n */\nexport type RESTPostAPIApplicationScanResponse = APIPayload<APIApplicationScanSuggestions>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/delete\n */\nexport type RESTDeleteAPIApplicationResponse = APIPayload<null>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/download\n */\nexport type RESTGetAPIApplicationDownloadResponse = ArrayBuffer;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/realtime\n */\nexport interface RESTGetAPIApplicationRealtimeQuery extends RESTAPIWorkspaceQuery {\n\tsince?: number;\n}\n\n/**\n * The route answers with a `text/event-stream`; this is the shape of each event in it.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/realtime\n */\nexport type RESTGetAPIApplicationRealtimeResponse = APIApplicationRealtimeEvent;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/start\n */\nexport type RESTPostAPIApplicationStartResponse = APIPayload<APIApplicationOperationResponse>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/stop\n */\nexport type RESTPostAPIApplicationStopResponse = APIPayload<APIApplicationOperationResponse>;\n\n/**\n * Optional restart body. No body = regular restart, reusing the install and build cache.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/restart\n */\nexport interface RESTPostAPIApplicationRestartBody {\n\t/** Reinstalls dependencies from scratch, ignoring the install cache. */\n\treinstall_dependencies?: boolean;\n\t/** Runs the build command again even without code changes. Counts as a deploy toward the hourly limit. */\n\tforce_build?: boolean;\n\t/**\n\t * After changing the app's language, removes the dependencies left by the previous runtime.\n\t * Must differ from the current language (`CLEANUP_LANGUAGE_SAME_AS_CURRENT`).\n\t */\n\tcleanup_old_runtime_language?: ApplicationLanguage;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/restart\n */\nexport type RESTPostAPIApplicationRestartResponse = APIPayload<APIApplicationOperationResponse>;\n\n/**\n * Body for updating the app configuration. Every field is optional, but at least one must be\n * provided.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/updateconfig\n */\nexport interface RESTPatchAPIApplicationUpdateConfigBody {\n\tname?: string;\n\tdescription?: string | null;\n\tmain_file?: string;\n\tversion?: string;\n\tstart_command?: string | null;\n\tbuild_command?: string | null;\n\tram?: number;\n\tlanguage?: ApplicationLanguage;\n\t/**\n\t * Deploy behavior. `zero_downtime: \"on\"` needs the Enterprise plan and `auto_rollback: true` needs\n\t * Intermediary or higher; below that the request fails with 403\n\t * (`PLAN_DOES_NOT_SUPPORT_ZERO_DOWNTIME` / `PLAN_DOES_NOT_SUPPORT_AUTO_ROLLBACK`). `\"off\"`, `\"auto\"`\n\t * and `auto_rollback: false` are always accepted. `health_check_path` must start with `/`, have at most 200\n\t * characters and be printable ASCII without spaces (percent-encode anything else, e.g. `%20`); `null` clears\n\t * it (back to `/`).\n\t */\n\tdeploy?: {\n\t\tzero_downtime?: ApplicationZeroDowntime;\n\t\tauto_rollback?: boolean;\n\t\thealth_check_path?: string | null;\n\t};\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/updateconfig\n */\nexport type RESTPatchAPIApplicationUpdateConfigResponse = APIPayload<string>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns\n */\nexport type RESTGetAPIApplicationDnsRecordsResponse = APIPayload<APIApplicationDnsRecord[]>;\n\n/**\n * Purges the edge cache of a published application.\n *\n * `hostnames` absent or empty = every host of the application (subdomain and custom domain).\n * When provided, each host must belong to the application. `paths` narrows the purge to\n * specific URLs within those hosts.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/purgecache\n */\nexport interface RESTPostAPIApplicationPurgeCacheBody {\n\thostnames?: string[];\n\tpaths?: string[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/purgecache\n */\nexport type RESTPostAPIApplicationPurgeCacheResponse = APIPayload<null>;\n\n/**\n * `GET /v1/apps/:id/network/custom` — `404 NO_CUSTOM_DOMAIN` when the application has none.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/customdomain\n */\nexport type RESTGetAPIApplicationCustomDomainResponse = APIPayload<APIApplicationCustomDomain>;\n\n/**\n * `POST /v1/apps/:id/network/custom`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/customdomain\n */\nexport interface RESTPostAPIApplicationCustomDomainBody {\n\tdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/customdomain\n */\nexport type RESTPostAPIApplicationCustomDomainResponse = APIPayload<APIApplicationCustomDomain>;\n\n/**\n * `DELETE /v1/apps/:id/network/custom`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/customdomain\n */\nexport type RESTDeleteAPIApplicationCustomDomainResponse = APIPayload<null>;\n\n/**\n * `PATCH /v1/apps/:id/network/subdomain`. Only the label (`my-app`), 3–50 characters.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/subdomain\n */\nexport interface RESTPatchAPIApplicationSubdomainBody {\n\tsubdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/subdomain\n */\nexport type RESTPatchAPIApplicationSubdomainResponse = APIPayload<APIApplicationSubdomain>;\n\n/**\n * Turns on web publishing for an application created without it.\n * `subdomain` absent = the platform picks one at random; choosing one requires a plan with custom subdomains.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/publish\n */\nexport interface RESTPostAPIApplicationWebPublishBody {\n\tsubdomain?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/publish\n */\nexport type RESTPostAPIApplicationWebPublishResponse = APIPayload<APIApplicationWebPublish>;\n\n/**\n * Turns off web publishing: releases the subdomain, removes the custom domain and makes the application private again.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/publish\n */\nexport type RESTDeleteAPIApplicationWebPublishResponse = APIPayload<APIApplicationWebPublish>;\n\n/**\n * `GET /v1/apps/:id/deploys/webhook`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/webhookurl\n */\nexport type RESTGetAPIApplicationWebhookUrlResponse = APIPayload<APIApplicationWebhook>;\n\n/**\n * Creates the auto-deploy webhook from an already connected repository.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/create\n */\nexport interface RESTPostAPIApplicationWebhookCreateBody {\n\towner: string;\n\trepo_name: string;\n\trepo_id: string;\n\taccount_id: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/create\n */\nexport type RESTPostAPIApplicationWebhookCreateResponse = APIPayload<APIApplicationWebhookUrl>;\n\n/**\n * `DELETE /v1/apps/:id/deploys/webhook`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/delete\n */\nexport type RESTDeleteAPIApplicationWebhookResponse = APIPayload<null>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/recents\n */\nexport type RESTGetAPIApplicationDeploymentsResponse = APIPayload<APIApplicationDeployment[]>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["application.ts"],"sourcesContent":["import type {\n\tAPIApplication,\n\tAPIApplicationCustomDomain,\n\tAPIApplicationDeployment,\n\tAPIApplicationDnsRecord,\n\tAPIApplicationEnvironment,\n\tAPIApplicationFile,\n\tAPIApplicationFileContent,\n\tAPIApplicationFileTree,\n\tAPIApplicationFileUpload,\n\tAPIApplicationMetric,\n\tAPIApplicationOperationResponse,\n\tAPIApplicationRealtimeEvent,\n\tAPIApplicationRelease,\n\tAPIApplicationReleaseLog,\n\tAPIApplicationRollbackPreview,\n\tAPIApplicationRuntimes,\n\tAPIApplicationScanSuggestions,\n\tAPIApplicationStatus,\n\tAPIApplicationStatusShort,\n\tAPIApplicationSubdomain,\n\tAPIApplicationWebPublish,\n\tAPIApplicationWebhook,\n\tAPIApplicationWebhookUrl,\n\tAPIPaginatedPayload,\n\tAPIPayload,\n\tApplicationLanguage,\n\tApplicationZeroDowntime,\n\tISODateString,\n\tRESTAPIWorkspaceQuery,\n} from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/runtimes\n */\nexport type RESTGetAPIApplicationRuntimesResponse = APIPayload<APIApplicationRuntimes>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type RESTGetAPIApplicationResponse = APIPayload<APIApplication>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/status\n */\nexport type RESTGetAPIApplicationStatusResponse = APIPayload<APIApplicationStatus>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/allstatus\n */\nexport type RESTGetAPIApplicationStatusShortResponse = APIPayload<APIApplicationStatusShort[]>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/logs\n */\nexport type RESTGetAPIApplicationLogsResponse = APIPayload<string>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/metrics\n */\nexport interface RESTGetAPIApplicationMetricsQuery extends RESTAPIWorkspaceQuery {\n\trange?: \"10m\" | \"30m\" | \"24h\";\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/metrics\n */\nexport type RESTGetAPIApplicationMetricsResponse = APIPayload<APIApplicationMetric[]>;\n\n/**\n * `GET /v1/apps/:id/files`. `path` absent = the application root.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/files\n */\nexport interface RESTGetAPIApplicationFilesQuery extends RESTAPIWorkspaceQuery {\n\tpath?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/files\n */\nexport type RESTGetAPIApplicationFilesResponse = APIPayload<APIApplicationFile[]>;\n\n/**\n * `GET /v1/apps/:id/files/tree` — the whole file tree (depth-limited), as a list of root entries.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/tree\n */\nexport type RESTGetAPIApplicationFileTreeResponse = APIPayload<APIApplicationFileTree[]>;\n\n/**\n * `GET /v1/apps/:id/files/content`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/content\n */\nexport interface RESTGetAPIApplicationFileContentQuery extends RESTAPIWorkspaceQuery {\n\tpath: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/content\n */\nexport type RESTGetAPIApplicationFileContentResponse = APIPayload<APIApplicationFileContent>;\n\n/**\n * `POST /v1/apps/:id/files/upload` (multipart, single file or zip). `restart: \"true\"` restarts the app after the upload.\n * `path` is the destination folder inside the application (default: root); a zip is extracted into it.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/upload\n */\nexport interface RESTPostAPIApplicationFileUploadQuery extends RESTAPIWorkspaceQuery {\n\trestart?: \"true\" | \"false\";\n\tpath?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/upload\n */\nexport type RESTPostAPIApplicationFileUploadResponse = APIPayload<APIApplicationFileUpload>;\n\n/**\n * Multipart body of `POST /v1/apps/:id/files/upload`: `file` as a file part, `message` as a text part.\n * `message` is the commit message shown in the release history. Optional, up to 500 characters;\n * surrounding spaces are trimmed and an empty value is stored as `null`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/upload\n */\nexport interface RESTPostAPIApplicationFileUploadBody {\n\t/** Zip or single file. */\n\tfile: unknown;\n\tmessage?: string;\n}\n\n/**\n * `GET /v1/apps/:id/releases`. Newest first. `limit` defaults to 20; the maximum is 50 and larger values return 400 `VALIDATION_ERROR`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/list\n */\nexport interface RESTGetAPIApplicationReleasesQuery extends RESTAPIWorkspaceQuery {\n\tpage?: number;\n\tlimit?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/list\n */\nexport type RESTGetAPIApplicationReleasesResponse = APIPaginatedPayload<APIApplicationRelease>;\n\n/**\n * `GET /v1/apps/:id/releases/:release_id/log`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/log\n */\nexport type RESTGetAPIApplicationReleaseLogResponse = APIPayload<APIApplicationReleaseLog>;\n\n/**\n * `GET /v1/apps/:id/releases/:release_id/rollback`. Previews a rollback to this release; changes nothing.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/rollback-preview\n */\nexport type RESTGetAPIApplicationRollbackPreviewResponse = APIPayload<APIApplicationRollbackPreview>;\n\n/**\n * Body of `POST /v1/apps/:id/releases/:release_id/rollback`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/rollback\n */\nexport interface RESTPostAPIApplicationRollbackBody {\n\t/** `true` also restores the environment variables saved with that release. Default `false`: the current variables are kept. */\n\trestore_environment?: boolean;\n}\n\n/**\n * Rolls the application back to this release. Restores all of its code, deletes the code files the\n * release did not have, leaves the data the application created while running untouched, and restarts\n * the application. Returns the new release, with `source: \"rollback\"`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/releases/rollback\n */\nexport type RESTPostAPIApplicationRollbackResponse = APIPayload<APIApplicationRelease>;\n\n/**\n * Creates or overwrites a file. Without `content`, creates (or truncates to) an empty file.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/save\n */\nexport interface RESTPutAPIApplicationFileBody {\n\tpath: string;\n\tcontent?: string;\n\t/** ISO 8601 datetime from the last read; a mismatch returns `409 FILE_MODIFIED`. */\n\tlast_modified?: ISODateString;\n\tworkspace_id?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/save\n */\nexport type RESTPutAPIApplicationFileResponse = APIPayload<null>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/delete\n */\nexport interface RESTDeleteAPIApplicationFileBody {\n\tpath: string;\n\tworkspace_id?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/delete\n */\nexport type RESTDeleteAPIApplicationFileResponse = APIPayload<null>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/move\n */\nexport interface RESTPatchAPIApplicationFileMoveBody {\n\tpath: string;\n\tto: string;\n\tworkspace_id?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/move\n */\nexport type RESTPatchAPIApplicationFileMoveResponse = APIPayload<null>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/get\n */\nexport type RESTGetAPIApplicationEnvironmentResponse = APIPayload<APIApplicationEnvironment[]>;\n\n/**\n * One variable of the `POST /apps/:id/envs` body. `note: null` clears the existing note.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/createOrEdit\n */\nexport interface RESTPostAPIApplicationEnvironmentVariableBody {\n\tkey: string;\n\tvalue: string;\n\tnote?: string | null;\n}\n\n/**\n * Body of `POST /apps/:id/envs`: a single object (one variable) or an array (batch), with no repeated keys.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/createOrEdit\n */\nexport type RESTPostAPIApplicationEnvironmentBody = RESTPostAPIApplicationEnvironmentVariableBody | RESTPostAPIApplicationEnvironmentVariableBody[];\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/createOrEdit\n */\nexport type RESTPostAPIApplicationEnvironmentResponse = APIPayload<APIApplicationEnvironment[]>;\n\n/**\n * `DELETE /v1/apps/:id/envs/:envId`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/delete\n */\nexport type RESTDeleteAPIApplicationEnvironmentResponse = APIPayload<null>;\n\n/**\n * Body of `POST /apps` — **`multipart/form-data`**, not JSON. Each field below is one multipart\n * part: `file` as a file and **every other field as a text field** (including `snapshot_id`,\n * `memory` and `envs`, the latter as a JSON-serialized string).\n *\n * The application has **two mutually exclusive sources**:\n *\n * - `file` — the zip uploaded by the user;\n * - `snapshot_id` — alternative to `file`: the app is created from that snapshot (which already\n * includes its `vertracloud.config`).\n *\n * **Exactly one of them must be present.** Neither → `SOURCE_REQUIRED`; both →\n * `SOURCE_CONFLICT`.\n *\n * Error codes:\n *\n * - `SOURCE_REQUIRED` — neither `file` nor `snapshot_id`.\n * - `SOURCE_CONFLICT` — `file` and `snapshot_id` together.\n * - `SNAPSHOT_NOT_FOUND` — the snapshot does not exist or does not belong to the user.\n * - `SNAPSHOT_TYPE_MISMATCH` — the snapshot is from a database, not an application.\n * - `SNAPSHOT_TOO_LARGE` — the snapshot exceeds the size limit for creation.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/create\n */\nexport interface RESTPostAPIApplicationCreateBody {\n\t/** Application zip. Absent when the source is `snapshot_id`. */\n\tfile?: unknown;\n\t/**\n\t * Alternative to `file`: id of the **application** snapshot to create the app from. Sent as a\n\t * multipart text field. Exactly one of `file` and `snapshot_id`.\n\t */\n\tsnapshot_id?: string;\n\tname: string;\n\tdescription?: string | null;\n\t/** RAM in MB. Multipart text field. Required with `file`; with `snapshot_id` defaults to the snapshot's config. */\n\tmemory?: number;\n\t/** Required with `file`; with `snapshot_id` defaults to the snapshot's config. */\n\tmain?: string;\n\t/** Required with `file`; with `snapshot_id` defaults to the snapshot's config. */\n\tversion?: string;\n\tstart?: string;\n\t/** Build command (see `APIApplication.build_command`). */\n\tbuild?: string;\n\t/** `\"random\"` = the platform picks one at random. */\n\tsubdomain?: string;\n\tworkspace_id?: string;\n\t/** JSON-serialized string in the multipart body. */\n\tenvs?: RESTPostAPIApplicationEnvironmentVariableBody[];\n}\n\n/**\n * `202` — the application, with `status: \"building\"`. The build and first start continue in the\n * background; follow the logs or poll the application until `status` is `up` or `down`.\n * `missing_dependencies` on the application is filled when the build ends.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/create\n */\nexport type RESTPostAPIApplicationCreateResponse = APIPayload<APIApplication>;\n\n/**\n * Scans a zip before creating the application and returns suggestions (start/build command,\n * memory). Creates nothing.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/scan\n */\nexport interface RESTPostAPIApplicationScanBody {\n\t/** Application zip. */\n\tfile: unknown;\n\t/** Main file of the application — used only to infer the language, as on create. */\n\tmain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/scan\n */\nexport type RESTPostAPIApplicationScanResponse = APIPayload<APIApplicationScanSuggestions>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/delete\n */\nexport type RESTDeleteAPIApplicationResponse = APIPayload<null>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/download\n */\nexport type RESTGetAPIApplicationDownloadResponse = ArrayBuffer;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/realtime\n */\nexport interface RESTGetAPIApplicationRealtimeQuery extends RESTAPIWorkspaceQuery {\n\tsince?: number;\n}\n\n/**\n * The route answers with a `text/event-stream`; this is the shape of each event in it.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/realtime\n */\nexport type RESTGetAPIApplicationRealtimeResponse = APIApplicationRealtimeEvent;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/start\n */\nexport type RESTPostAPIApplicationStartResponse = APIPayload<APIApplicationOperationResponse>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/stop\n */\nexport type RESTPostAPIApplicationStopResponse = APIPayload<APIApplicationOperationResponse>;\n\n/**\n * Optional restart body. No body = regular restart, reusing the install and build cache.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/restart\n */\nexport interface RESTPostAPIApplicationRestartBody {\n\t/** Reinstalls dependencies from scratch, ignoring the install cache. */\n\treinstall_dependencies?: boolean;\n\t/** Runs the build command again even without code changes. Counts as a deploy toward the hourly limit. */\n\tforce_build?: boolean;\n\t/**\n\t * After changing the app's language, removes the dependencies left by the previous runtime.\n\t * Must differ from the current language (`CLEANUP_LANGUAGE_SAME_AS_CURRENT`).\n\t */\n\tcleanup_old_runtime_language?: ApplicationLanguage;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/restart\n */\nexport type RESTPostAPIApplicationRestartResponse = APIPayload<APIApplicationOperationResponse>;\n\n/**\n * Body for updating the app configuration. Every field is optional, but at least one must be\n * provided.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/updateconfig\n */\nexport interface RESTPatchAPIApplicationUpdateConfigBody {\n\tname?: string;\n\tdescription?: string | null;\n\tmain_file?: string;\n\tversion?: string;\n\tstart_command?: string | null;\n\tbuild_command?: string | null;\n\tram?: number;\n\tlanguage?: ApplicationLanguage;\n\t/**\n\t * Deploy behavior. `zero_downtime: \"on\"` needs the Enterprise plan and `auto_rollback: true` needs\n\t * Intermediary or higher; below that the request fails with 403\n\t * (`PLAN_DOES_NOT_SUPPORT_ZERO_DOWNTIME` / `PLAN_DOES_NOT_SUPPORT_AUTO_ROLLBACK`). `\"off\"`, `\"auto\"`\n\t * and `auto_rollback: false` are always accepted. `health_check_path` must start with `/`, have at most 200\n\t * characters and be printable ASCII without spaces (percent-encode anything else, e.g. `%20`); `null` clears\n\t * it (back to `/`).\n\t */\n\tdeploy?: {\n\t\tzero_downtime?: ApplicationZeroDowntime;\n\t\tauto_rollback?: boolean;\n\t\thealth_check_path?: string | null;\n\t};\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/updateconfig\n */\nexport type RESTPatchAPIApplicationUpdateConfigResponse = APIPayload<string>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns\n */\nexport type RESTGetAPIApplicationDnsRecordsResponse = APIPayload<APIApplicationDnsRecord[]>;\n\n/**\n * Purges the edge cache of a published application.\n *\n * `hostnames` absent or empty = every host of the application (subdomain and custom domain).\n * When provided, each host must belong to the application. `paths` narrows the purge to\n * specific URLs within those hosts.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/purgecache\n */\nexport interface RESTPostAPIApplicationPurgeCacheBody {\n\thostnames?: string[];\n\tpaths?: string[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/purgecache\n */\nexport type RESTPostAPIApplicationPurgeCacheResponse = APIPayload<null>;\n\n/**\n * `GET /v1/apps/:id/network/custom` — `404 NO_CUSTOM_DOMAIN` when the application has none.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/customdomain\n */\nexport type RESTGetAPIApplicationCustomDomainResponse = APIPayload<APIApplicationCustomDomain>;\n\n/**\n * `POST /v1/apps/:id/network/custom`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/customdomain\n */\nexport interface RESTPostAPIApplicationCustomDomainBody {\n\tdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/customdomain\n */\nexport type RESTPostAPIApplicationCustomDomainResponse = APIPayload<APIApplicationCustomDomain>;\n\n/**\n * `DELETE /v1/apps/:id/network/custom`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/customdomain\n */\nexport type RESTDeleteAPIApplicationCustomDomainResponse = APIPayload<null>;\n\n/**\n * `PATCH /v1/apps/:id/network/subdomain`. Only the label (`my-app`), 3–50 characters.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/subdomain\n */\nexport interface RESTPatchAPIApplicationSubdomainBody {\n\tsubdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/subdomain\n */\nexport type RESTPatchAPIApplicationSubdomainResponse = APIPayload<APIApplicationSubdomain>;\n\n/**\n * Turns on web publishing for an application created without it.\n * `subdomain` absent = the platform picks one at random; choosing one requires a plan with custom subdomains.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/publish\n */\nexport interface RESTPostAPIApplicationWebPublishBody {\n\tsubdomain?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/publish\n */\nexport type RESTPostAPIApplicationWebPublishResponse = APIPayload<APIApplicationWebPublish>;\n\n/**\n * Turns off web publishing: releases the subdomain, removes the custom domain and makes the application private again.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/publish\n */\nexport type RESTDeleteAPIApplicationWebPublishResponse = APIPayload<APIApplicationWebPublish>;\n\n/**\n * `GET /v1/apps/:id/deploys/webhook`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/webhookurl\n */\nexport type RESTGetAPIApplicationWebhookUrlResponse = APIPayload<APIApplicationWebhook>;\n\n/**\n * Creates the auto-deploy webhook from an already connected repository.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/create\n */\nexport interface RESTPostAPIApplicationWebhookCreateBody {\n\towner: string;\n\trepo_name: string;\n\trepo_id: string;\n\taccount_id: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/create\n */\nexport type RESTPostAPIApplicationWebhookCreateResponse = APIPayload<APIApplicationWebhookUrl>;\n\n/**\n * `DELETE /v1/apps/:id/deploys/webhook`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/delete\n */\nexport type RESTDeleteAPIApplicationWebhookResponse = APIPayload<null>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/recents\n */\nexport type RESTGetAPIApplicationDeploymentsResponse = APIPayload<APIApplicationDeployment[]>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/v1.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { APIErrorPayload, APIHeaders, APIPaginatedPayload, APIPayload, APIPayloa
|
|
|
2
2
|
export { APIActivity, ActivityOrigin, ActivityStatus, ActivityTargetType } from './payloads/v1/activity.js';
|
|
3
3
|
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 './payloads/v1/api-key.js';
|
|
4
4
|
export { APIErrorCode, API_ERROR_CODES } from './payloads/v1/api-error.js';
|
|
5
|
-
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 './payloads/v1/application.js';
|
|
5
|
+
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 './payloads/v1/application.js';
|
|
6
6
|
export { APIBillingAddress, APIBillingCard, APIBillingDetails, APIBillingRenewal, APIBillingTaxId, BillingTaxIdType } from './payloads/v1/billing.js';
|
|
7
7
|
export { APIBlobBatchResult, APIBlobCustomDomain, APIBlobDeleteResult, APIBlobDownload, APIBlobLimits, APIBlobObject, APIBlobObjectList, APIBlobRule, APIBlobRules, APIBlobS3Credentials, APIBlobShare, APIBlobSharePublic, APIBlobStats, APIBlobUpload, APIBlobUploadPart, APIBlobUploadToken, BlobContentDisposition, BlobCustomDomainStatus, BlobUploadMode, BlobUploadStatus, BlobVisibility } from './payloads/v1/blob.js';
|
|
8
8
|
export { APIDatabase, APIDatabaseCertificate, APIDatabaseMetrics, APIDatabaseNetwork, APIDatabaseOperationResponse, APIDatabasePasswordReset, APIDatabaseStatus, APIDatabaseStatusShort, DatabaseCluster, DatabaseStatus, DatabaseType } from './payloads/v1/database.js';
|
package/v1.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,
|
|
@@ -548,6 +549,8 @@ var API_ERROR_CODES = {
|
|
|
548
549
|
APP_BANNED: "APP_BANNED",
|
|
549
550
|
APP_ALREADY_PUBLISHED: "APP_ALREADY_PUBLISHED",
|
|
550
551
|
APP_HAS_NO_SUBDOMAIN: "APP_HAS_NO_SUBDOMAIN",
|
|
552
|
+
/** 409 — the application is still building; wait until the build ends. */
|
|
553
|
+
APP_BUILDING: "APP_BUILDING",
|
|
551
554
|
APP_NOT_FOUND: "APP_NOT_FOUND",
|
|
552
555
|
APP_NOT_PUBLISHED: "APP_NOT_PUBLISHED",
|
|
553
556
|
APP_ALREADY_IN_WORKSPACE: "APP_ALREADY_IN_WORKSPACE",
|
|
@@ -600,6 +603,8 @@ var API_ERROR_CODES = {
|
|
|
600
603
|
STORAGE_QUOTA_EXCEEDED: "STORAGE_QUOTA_EXCEEDED",
|
|
601
604
|
BUILD_FAILED: "BUILD_FAILED",
|
|
602
605
|
BUILD_TIMEOUT: "BUILD_TIMEOUT",
|
|
606
|
+
/** The build was interrupted before it finished; start it again with a restart. */
|
|
607
|
+
BUILD_INTERRUPTED: "BUILD_INTERRUPTED",
|
|
603
608
|
/** 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`. */
|
|
604
609
|
BILLING_DETAILS_INCOMPLETE: "BILLING_DETAILS_INCOMPLETE",
|
|
605
610
|
/** 400 — billing details failed validation; the field is in `details.path`. */
|
|
@@ -776,7 +781,18 @@ var ApplicationLanguage = {
|
|
|
776
781
|
};
|
|
777
782
|
var ApplicationStatus = {
|
|
778
783
|
UP: "up",
|
|
779
|
-
DOWN: "down"
|
|
784
|
+
DOWN: "down",
|
|
785
|
+
/** First build and start in progress after `POST /v1/apps`; ends as `up` or `down`. */
|
|
786
|
+
BUILDING: "building"
|
|
787
|
+
};
|
|
788
|
+
var ApplicationBuildError = {
|
|
789
|
+
BUILD_FAILED: "BUILD_FAILED",
|
|
790
|
+
BUILD_TIMEOUT: "BUILD_TIMEOUT",
|
|
791
|
+
INSTALL_FAILED: "INSTALL_FAILED",
|
|
792
|
+
INSTALL_OUT_OF_MEMORY: "INSTALL_OUT_OF_MEMORY",
|
|
793
|
+
INSTALL_TIMEOUT: "INSTALL_TIMEOUT",
|
|
794
|
+
INSTALL_SHIELD_BLOCKED: "INSTALL_SHIELD_BLOCKED",
|
|
795
|
+
BUILD_INTERRUPTED: "BUILD_INTERRUPTED"
|
|
780
796
|
};
|
|
781
797
|
var ApplicationCluster = {
|
|
782
798
|
USA_1: 1,
|
|
@@ -997,6 +1013,7 @@ var UserLanguage = {
|
|
|
997
1013
|
ActivityOrigin,
|
|
998
1014
|
ActivityStatus,
|
|
999
1015
|
ActivityTargetType,
|
|
1016
|
+
ApplicationBuildError,
|
|
1000
1017
|
ApplicationCluster,
|
|
1001
1018
|
ApplicationDnsRecordStatus,
|
|
1002
1019
|
ApplicationDnsRecordType,
|