@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/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/rest/v1/blob.d.ts
CHANGED
|
@@ -164,6 +164,11 @@ interface RESTPostAPIBlobObjectCopyBody {
|
|
|
164
164
|
move?: boolean;
|
|
165
165
|
overwrite?: boolean;
|
|
166
166
|
random_suffix?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Copy only: when `path` is taken (including the source's own path), save as `name-1.ext`, `name-2.ext`, …
|
|
169
|
+
* instead of returning `BLOB_OBJECT_ALREADY_EXISTS`. Cannot be combined with `overwrite`; ignored on a move.
|
|
170
|
+
*/
|
|
171
|
+
rename_on_conflict?: boolean;
|
|
167
172
|
visibility?: BlobVisibility;
|
|
168
173
|
}
|
|
169
174
|
type RESTPostAPIBlobObjectCopyQuery = RESTAPIWorkspaceQuery;
|
package/rest/v1/blob.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["blob.ts"],"sourcesContent":["import type {\n\tAPIBlobBatchResult,\n\tAPIBlobCustomDomain,\n\tAPIBlobDeleteResult,\n\tAPIBlobDownload,\n\tAPIBlobObject,\n\tAPIBlobObjectList,\n\tAPIBlobRule,\n\tAPIBlobRules,\n\tAPIBlobS3Credentials,\n\tAPIBlobShare,\n\tAPIBlobSharePublic,\n\tAPIBlobStats,\n\tAPIBlobUpload,\n\tAPIBlobUploadPart,\n\tAPIBlobUploadToken,\n\tAPIPayload,\n\tBlobContentDisposition,\n\tBlobVisibility,\n\tISODateString,\n\tRESTAPIWorkspaceQuery,\n\tSnowFlake,\n} from \"../../v1\";\n\n// Blob Storage routes are served at `https://blob.vertracloud.app/v1/...`. Every route accepts\n// `workspace_id` (query) to act on the blob of a workspace owner. Authenticate with a dashboard\n// session, an API key (`blob:read` / `blob:write`) or, on the upload routes only, an upload token.\n\n/**\n * Options shared by both ways of uploading. Defaults: `visibility: \"private\"`, `overwrite: false`,\n * `random_suffix: false` (always `true` for an upload token without a fixed `path`).\n */\nexport interface RESTBlobObjectWriteOptions {\n\tvisibility?: BlobVisibility;\n\t/** Replace an existing object at `path`. Without it a taken path returns `BLOB_OBJECT_ALREADY_EXISTS`. */\n\toverwrite?: boolean;\n\t/** Insert `-<10 random characters>` before the extension. */\n\trandom_suffix?: boolean;\n\t/**\n\t * When `path` is taken, save as `name-1.ext`, `name-2.ext`, … (the first free one) instead of returning\n\t * `BLOB_OBJECT_ALREADY_EXISTS`. The object comes back with the final `path`. Cannot be combined with `overwrite`.\n\t */\n\trename_on_conflict?: boolean;\n\tcache_control?: string;\n\tcontent_disposition?: BlobContentDisposition;\n\tfilename?: string;\n\texpires_at?: ISODateString;\n\t/**\n\t * Hex SHA-256 of the file; a mismatch returns `BLOB_CHECKSUM_MISMATCH`. Only valid for the\n\t * single-request upload and for a direct upload sent in one part: a multipart upload refuses it\n\t * (`VALIDATION_ERROR`), because a SHA-256 of the whole object cannot be verified from separate parts.\n\t */\n\tchecksum_sha256?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Upload\n// ---------------------------------------------------------------------------\n\n/**\n * `POST /v1/objects` — single-request upload (up to the plan's `max_simple_upload_bytes`). The\n * body is `multipart/form-data` with one `file` field; options go in the query. Accepts an upload token.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/upload\n */\nexport interface RESTPostAPIBlobObjectQuery extends RESTAPIWorkspaceQuery, RESTBlobObjectWriteOptions {\n\tpath: string;\n\t/** JSON object, URL-encoded. */\n\tmetadata?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/upload\n */\nexport type RESTPostAPIBlobObjectResponse = APIPayload<APIBlobObject>;\n\n/**\n * `POST /v1/uploads` — starts a direct upload (single or multipart, chosen by `size`). Accepts an upload token.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/create\n */\nexport interface RESTPostAPIBlobUploadBody extends RESTBlobObjectWriteOptions {\n\tpath: string;\n\tsize: number;\n\tmetadata?: Record<string, string>;\n}\nexport type RESTPostAPIBlobUploadQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/create\n */\nexport type RESTPostAPIBlobUploadResponse = APIPayload<APIBlobUpload>;\n\n/** `GET /v1/uploads` — uploads still in progress. */\nexport type RESTGetAPIBlobUploadsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/list\n */\nexport type RESTGetAPIBlobUploadsResponse = APIPayload<APIBlobUpload[]>;\n\n/** `GET /v1/uploads/:upload_id` — status of one upload, to resume it. Accepts an upload token. */\nexport type RESTGetAPIBlobUploadQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/get\n */\nexport type RESTGetAPIBlobUploadResponse = APIPayload<APIBlobUpload>;\n\n/**\n * `POST /v1/uploads/:upload_id/parts` — URLs for up to 100 parts. Accepts an upload token.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/parts\n */\nexport interface RESTPostAPIBlobUploadPartsBody {\n\tpart_numbers: number[];\n}\nexport type RESTPostAPIBlobUploadPartsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/parts\n */\nexport type RESTPostAPIBlobUploadPartsResponse = APIPayload<APIBlobUploadPart[]>;\n\n/** `POST /v1/uploads/:upload_id/complete` — checks the parts and creates the object. Accepts an upload token. */\nexport type RESTPostAPIBlobUploadCompleteQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/complete\n */\nexport type RESTPostAPIBlobUploadCompleteResponse = APIPayload<APIBlobObject>;\n\n/** `DELETE /v1/uploads/:upload_id` — aborts an upload; repeating it is not an error. Accepts an upload token. */\nexport type RESTDeleteAPIBlobUploadQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/abort\n */\nexport type RESTDeleteAPIBlobUploadResponse = APIPayload<null>;\n\n// ---------------------------------------------------------------------------\n// Objects\n// ---------------------------------------------------------------------------\n\n/**\n * `GET /v1/objects`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/list\n */\nexport interface RESTGetAPIBlobObjectsQuery extends RESTAPIWorkspaceQuery {\n\tprefix?: string;\n\t/** Group paths into folders at `/`. Omit it for a flat list. */\n\tdelimiter?: \"/\";\n\tvisibility?: BlobVisibility;\n\tcursor?: string;\n\t/** 1–1000. Default 100. */\n\tlimit?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/list\n */\nexport type RESTGetAPIBlobObjectsResponse = APIPayload<APIBlobObjectList>;\n\n/** `GET /v1/objects/:object_id`. */\nexport type RESTGetAPIBlobObjectQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/get\n */\nexport type RESTGetAPIBlobObjectResponse = APIPayload<APIBlobObject>;\n\n/**\n * Fields of an object that can change. `null` restores the default; a `null` metadata value removes that key.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/update\n */\nexport interface RESTPatchAPIBlobObjectBody {\n\tvisibility?: BlobVisibility;\n\tcache_control?: string | null;\n\tcontent_disposition?: BlobContentDisposition | null;\n\tfilename?: string | null;\n\texpires_at?: ISODateString | null;\n\tmetadata?: Record<string, string | null>;\n}\n\n/** `PATCH /v1/objects/:object_id`. */\nexport type RESTPatchAPIBlobObjectQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/update\n */\nexport type RESTPatchAPIBlobObjectResponse = APIPayload<APIBlobObject>;\n\n/**\n * `PATCH /v1/objects` — applies the same changes to up to 100 objects.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/update-many\n */\nexport interface RESTPatchAPIBlobObjectsBody {\n\tids: SnowFlake[];\n\tchanges: RESTPatchAPIBlobObjectBody;\n}\nexport type RESTPatchAPIBlobObjectsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/update-many\n */\nexport type RESTPatchAPIBlobObjectsResponse = APIPayload<APIBlobBatchResult[]>;\n\n/**\n * `POST /v1/objects/copy` — copies or moves an object. A move keeps the `id`; a copy creates\n * another object that counts toward storage.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/copy\n */\nexport interface RESTPostAPIBlobObjectCopyBody {\n\tsource: SnowFlake;\n\tpath: string;\n\tmove?: boolean;\n\toverwrite?: boolean;\n\trandom_suffix?: boolean;\n\tvisibility?: BlobVisibility;\n}\nexport type RESTPostAPIBlobObjectCopyQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/copy\n */\nexport type RESTPostAPIBlobObjectCopyResponse = APIPayload<APIBlobObject>;\n\n/** `DELETE /v1/objects/:object_id`. */\nexport type RESTDeleteAPIBlobObjectQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/delete\n */\nexport type RESTDeleteAPIBlobObjectResponse = APIPayload<null>;\n\n/**\n * `DELETE /v1/objects` — up to 1000 objects per call, by `ids` or by folder `prefix` (send one of them).\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/delete-many\n */\nexport type RESTDeleteAPIBlobObjectsBody = { ids: SnowFlake[]; prefix?: never } | { prefix: string; ids?: never };\nexport type RESTDeleteAPIBlobObjectsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/delete-many\n */\nexport type RESTDeleteAPIBlobObjectsResponse = APIPayload<APIBlobDeleteResult>;\n\n/**\n * `GET /v1/objects/:object_id/download` — temporary download link; it cannot be revoked. With\n * `redirect` true (default) the response is a `302` to the link; with `false` it is `RESTGetAPIBlobObjectDownloadResponse`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/download\n */\nexport interface RESTGetAPIBlobObjectDownloadQuery extends RESTAPIWorkspaceQuery {\n\t/** Seconds, 60–86400. Default 3600. */\n\texpires_in?: number;\n\tdisposition?: BlobContentDisposition;\n\tfilename?: string;\n\tredirect?: boolean;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/download\n */\nexport type RESTGetAPIBlobObjectDownloadResponse = APIPayload<APIBlobDownload>;\n\n// ---------------------------------------------------------------------------\n// Shares\n// ---------------------------------------------------------------------------\n\n/**\n * `POST /v1/shares` — responds `201`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/shares/create\n */\nexport interface RESTPostAPIBlobShareBody {\n\tobject_id: SnowFlake;\n\t/** Seconds, 60 to 30 days. Default 24 hours. */\n\texpires_in?: number;\n\t/** 1–10000. */\n\tmax_downloads?: number;\n\t/** 8–128 characters; plan-dependent. */\n\tpassword?: string;\n}\nexport type RESTPostAPIBlobShareQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/shares/create\n */\nexport type RESTPostAPIBlobShareResponse = APIPayload<APIBlobShare>;\n\n/**\n * `GET /v1/shares`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/shares/list\n */\nexport interface RESTGetAPIBlobSharesQuery extends RESTAPIWorkspaceQuery {\n\tobject_id?: SnowFlake;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/shares/list\n */\nexport type RESTGetAPIBlobSharesResponse = APIPayload<APIBlobShare[]>;\n\n/** `DELETE /v1/shares/:share_id` — revokes the share. */\nexport type RESTDeleteAPIBlobShareQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/shares/revoke\n */\nexport type RESTDeleteAPIBlobShareResponse = APIPayload<null>;\n\n/** `GET /v1/shares/public/:token` — no authentication; used by the share page. `BLOB_SHARE_NOT_FOUND` / `BLOB_SHARE_EXHAUSTED`. */\nexport type RESTGetAPIBlobSharePublicResponse = APIPayload<APIBlobSharePublic>;\n\n/** `POST /v1/shares/public/:token/download` — no authentication. Counts one download and returns a temporary link. A wrong password returns `BLOB_SHARE_PASSWORD_INVALID` (rate limited). */\nexport interface RESTPostAPIBlobSharePublicDownloadBody {\n\tpassword?: string;\n}\nexport type RESTPostAPIBlobSharePublicDownloadResponse = APIPayload<APIBlobDownload>;\n\n// ---------------------------------------------------------------------------\n// Folder rules\n// ---------------------------------------------------------------------------\n\n/** Rule fields a client sends; `prefix` and `created_at` are not part of the body, `active_from` is set by the platform. */\nexport type RESTBlobRuleInput = Omit<APIBlobRule, \"prefix\" | \"created_at\" | \"active_from\">;\n\n/** `GET /v1/rules`. */\nexport type RESTGetAPIBlobRulesQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/get\n */\nexport type RESTGetAPIBlobRulesResponse = APIPayload<APIBlobRules>;\n\n/**\n * `PUT /v1/rules` — replaces the whole list. Requires the `If-Match` header with the `etag` of the list you read. Returns the saved list and its new `etag`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/replace\n */\nexport interface RESTPutAPIBlobRulesBody {\n\trules: (RESTBlobRuleInput & { prefix: string })[];\n}\nexport type RESTPutAPIBlobRulesQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/replace\n */\nexport interface RESTPutAPIBlobRulesHeaders {\n\t\"If-Match\": string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/replace\n */\nexport type RESTPutAPIBlobRulesResponse = APIPayload<APIBlobRules>;\n\n/**\n * `PUT /v1/rules/:prefix` — creates or changes one rule (URL-encode the prefix). Returns the whole list and its new `etag`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/put\n */\nexport type RESTPutAPIBlobRuleBody = RESTBlobRuleInput;\nexport type RESTPutAPIBlobRuleQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/put\n */\nexport type RESTPutAPIBlobRuleResponse = APIPayload<APIBlobRules>;\n\n/** `DELETE /v1/rules/:prefix` (URL-encode the prefix). Returns the remaining list and its new `etag`. */\nexport type RESTDeleteAPIBlobRuleQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/delete\n */\nexport type RESTDeleteAPIBlobRuleResponse = APIPayload<APIBlobRules>;\n\n// ---------------------------------------------------------------------------\n// Account, upload tokens, S3 and custom domains\n// ---------------------------------------------------------------------------\n\n/** `GET /v1/stats`. */\nexport type RESTGetAPIBlobStatsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/account/stats\n */\nexport type RESTGetAPIBlobStatsResponse = APIPayload<APIBlobStats>;\n\n/**\n * `POST /v1/upload-tokens` — creates a token that fixes every constraint below. Send `path` (one\n * file) or `prefix` (any file under a folder, random suffix forced). It stops working when the\n * API key that created it is revoked.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/account/upload-tokens\n */\nexport interface RESTPostAPIBlobUploadTokenBody {\n\tpath?: string;\n\tprefix?: string;\n\tvisibility?: BlobVisibility;\n\tmax_size?: number;\n\t/** 1–20 extensions, lowercase, without the dot. */\n\tallowed_extensions?: string[];\n\tcache_control?: string;\n\tcontent_disposition?: BlobContentDisposition;\n\texpires_at?: ISODateString;\n\tmetadata?: Record<string, string>;\n\t/**\n\t * Allow the token to replace an existing object. Default `false`: a token without `overwrite: true`\n\t * never replaces an object, even if the upload asks for `overwrite`.\n\t */\n\toverwrite?: boolean;\n\t/** Seconds the token stays valid, 60–3600. Default 900. */\n\texpires_in?: number;\n\t/** 1–100. Default 1. */\n\tmax_uses?: number;\n}\nexport type RESTPostAPIBlobUploadTokenQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/account/upload-tokens\n */\nexport type RESTPostAPIBlobUploadTokenResponse = APIPayload<APIBlobUploadToken>;\n\n/** `GET /v1/s3/credentials` — read-only access when the API key only has `blob:read`. Limited to 10 calls per hour. */\nexport type RESTGetAPIBlobS3CredentialsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/account/s3-credentials\n */\nexport type RESTGetAPIBlobS3CredentialsResponse = APIPayload<APIBlobS3Credentials>;\n\n/** `GET /v1/domains`. */\nexport type RESTGetAPIBlobDomainsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/domains/list\n */\nexport type RESTGetAPIBlobDomainsResponse = APIPayload<APIBlobCustomDomain[]>;\n\n/**\n * `POST /v1/domains` — responds `201`. Plan-dependent.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/domains/add\n */\nexport interface RESTPostAPIBlobDomainBody {\n\thostname: string;\n\tprefix?: string;\n\t/** Defaults to `false`. See {@link APIBlobCustomDomain.web_content}. */\n\tweb_content?: boolean;\n}\nexport type RESTPostAPIBlobDomainQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/domains/add\n */\nexport type RESTPostAPIBlobDomainResponse = APIPayload<APIBlobCustomDomain>;\n\n/** `POST /v1/domains/:domain_id/verify` — checks the ownership record, the CNAME and the certificate again. */\nexport type RESTPostAPIBlobDomainVerifyQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/domains/verify\n */\nexport type RESTPostAPIBlobDomainVerifyResponse = APIPayload<APIBlobCustomDomain>;\n\n/** `PATCH /v1/domains/:domain_id`. */\nexport interface RESTPatchAPIBlobDomainBody {\n\t/** See {@link APIBlobCustomDomain.web_content}. Takes effect within about a minute. */\n\tweb_content?: boolean;\n}\nexport type RESTPatchAPIBlobDomainQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/domains/update\n */\nexport type RESTPatchAPIBlobDomainResponse = APIPayload<APIBlobCustomDomain>;\n\n/** `DELETE /v1/domains/:domain_id`. */\nexport type RESTDeleteAPIBlobDomainQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/domains/delete\n */\nexport type RESTDeleteAPIBlobDomainResponse = APIPayload<null>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["blob.ts"],"sourcesContent":["import type {\n\tAPIBlobBatchResult,\n\tAPIBlobCustomDomain,\n\tAPIBlobDeleteResult,\n\tAPIBlobDownload,\n\tAPIBlobObject,\n\tAPIBlobObjectList,\n\tAPIBlobRule,\n\tAPIBlobRules,\n\tAPIBlobS3Credentials,\n\tAPIBlobShare,\n\tAPIBlobSharePublic,\n\tAPIBlobStats,\n\tAPIBlobUpload,\n\tAPIBlobUploadPart,\n\tAPIBlobUploadToken,\n\tAPIPayload,\n\tBlobContentDisposition,\n\tBlobVisibility,\n\tISODateString,\n\tRESTAPIWorkspaceQuery,\n\tSnowFlake,\n} from \"../../v1\";\n\n// Blob Storage routes are served at `https://blob.vertracloud.app/v1/...`. Every route accepts\n// `workspace_id` (query) to act on the blob of a workspace owner. Authenticate with a dashboard\n// session, an API key (`blob:read` / `blob:write`) or, on the upload routes only, an upload token.\n\n/**\n * Options shared by both ways of uploading. Defaults: `visibility: \"private\"`, `overwrite: false`,\n * `random_suffix: false` (always `true` for an upload token without a fixed `path`).\n */\nexport interface RESTBlobObjectWriteOptions {\n\tvisibility?: BlobVisibility;\n\t/** Replace an existing object at `path`. Without it a taken path returns `BLOB_OBJECT_ALREADY_EXISTS`. */\n\toverwrite?: boolean;\n\t/** Insert `-<10 random characters>` before the extension. */\n\trandom_suffix?: boolean;\n\t/**\n\t * When `path` is taken, save as `name-1.ext`, `name-2.ext`, … (the first free one) instead of returning\n\t * `BLOB_OBJECT_ALREADY_EXISTS`. The object comes back with the final `path`. Cannot be combined with `overwrite`.\n\t */\n\trename_on_conflict?: boolean;\n\tcache_control?: string;\n\tcontent_disposition?: BlobContentDisposition;\n\tfilename?: string;\n\texpires_at?: ISODateString;\n\t/**\n\t * Hex SHA-256 of the file; a mismatch returns `BLOB_CHECKSUM_MISMATCH`. Only valid for the\n\t * single-request upload and for a direct upload sent in one part: a multipart upload refuses it\n\t * (`VALIDATION_ERROR`), because a SHA-256 of the whole object cannot be verified from separate parts.\n\t */\n\tchecksum_sha256?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Upload\n// ---------------------------------------------------------------------------\n\n/**\n * `POST /v1/objects` — single-request upload (up to the plan's `max_simple_upload_bytes`). The\n * body is `multipart/form-data` with one `file` field; options go in the query. Accepts an upload token.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/upload\n */\nexport interface RESTPostAPIBlobObjectQuery extends RESTAPIWorkspaceQuery, RESTBlobObjectWriteOptions {\n\tpath: string;\n\t/** JSON object, URL-encoded. */\n\tmetadata?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/upload\n */\nexport type RESTPostAPIBlobObjectResponse = APIPayload<APIBlobObject>;\n\n/**\n * `POST /v1/uploads` — starts a direct upload (single or multipart, chosen by `size`). Accepts an upload token.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/create\n */\nexport interface RESTPostAPIBlobUploadBody extends RESTBlobObjectWriteOptions {\n\tpath: string;\n\tsize: number;\n\tmetadata?: Record<string, string>;\n}\nexport type RESTPostAPIBlobUploadQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/create\n */\nexport type RESTPostAPIBlobUploadResponse = APIPayload<APIBlobUpload>;\n\n/** `GET /v1/uploads` — uploads still in progress. */\nexport type RESTGetAPIBlobUploadsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/list\n */\nexport type RESTGetAPIBlobUploadsResponse = APIPayload<APIBlobUpload[]>;\n\n/** `GET /v1/uploads/:upload_id` — status of one upload, to resume it. Accepts an upload token. */\nexport type RESTGetAPIBlobUploadQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/get\n */\nexport type RESTGetAPIBlobUploadResponse = APIPayload<APIBlobUpload>;\n\n/**\n * `POST /v1/uploads/:upload_id/parts` — URLs for up to 100 parts. Accepts an upload token.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/parts\n */\nexport interface RESTPostAPIBlobUploadPartsBody {\n\tpart_numbers: number[];\n}\nexport type RESTPostAPIBlobUploadPartsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/parts\n */\nexport type RESTPostAPIBlobUploadPartsResponse = APIPayload<APIBlobUploadPart[]>;\n\n/** `POST /v1/uploads/:upload_id/complete` — checks the parts and creates the object. Accepts an upload token. */\nexport type RESTPostAPIBlobUploadCompleteQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/complete\n */\nexport type RESTPostAPIBlobUploadCompleteResponse = APIPayload<APIBlobObject>;\n\n/** `DELETE /v1/uploads/:upload_id` — aborts an upload; repeating it is not an error. Accepts an upload token. */\nexport type RESTDeleteAPIBlobUploadQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/uploads/abort\n */\nexport type RESTDeleteAPIBlobUploadResponse = APIPayload<null>;\n\n// ---------------------------------------------------------------------------\n// Objects\n// ---------------------------------------------------------------------------\n\n/**\n * `GET /v1/objects`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/list\n */\nexport interface RESTGetAPIBlobObjectsQuery extends RESTAPIWorkspaceQuery {\n\tprefix?: string;\n\t/** Group paths into folders at `/`. Omit it for a flat list. */\n\tdelimiter?: \"/\";\n\tvisibility?: BlobVisibility;\n\tcursor?: string;\n\t/** 1–1000. Default 100. */\n\tlimit?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/list\n */\nexport type RESTGetAPIBlobObjectsResponse = APIPayload<APIBlobObjectList>;\n\n/** `GET /v1/objects/:object_id`. */\nexport type RESTGetAPIBlobObjectQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/get\n */\nexport type RESTGetAPIBlobObjectResponse = APIPayload<APIBlobObject>;\n\n/**\n * Fields of an object that can change. `null` restores the default; a `null` metadata value removes that key.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/update\n */\nexport interface RESTPatchAPIBlobObjectBody {\n\tvisibility?: BlobVisibility;\n\tcache_control?: string | null;\n\tcontent_disposition?: BlobContentDisposition | null;\n\tfilename?: string | null;\n\texpires_at?: ISODateString | null;\n\tmetadata?: Record<string, string | null>;\n}\n\n/** `PATCH /v1/objects/:object_id`. */\nexport type RESTPatchAPIBlobObjectQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/update\n */\nexport type RESTPatchAPIBlobObjectResponse = APIPayload<APIBlobObject>;\n\n/**\n * `PATCH /v1/objects` — applies the same changes to up to 100 objects.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/update-many\n */\nexport interface RESTPatchAPIBlobObjectsBody {\n\tids: SnowFlake[];\n\tchanges: RESTPatchAPIBlobObjectBody;\n}\nexport type RESTPatchAPIBlobObjectsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/update-many\n */\nexport type RESTPatchAPIBlobObjectsResponse = APIPayload<APIBlobBatchResult[]>;\n\n/**\n * `POST /v1/objects/copy` — copies or moves an object. A move keeps the `id`; a copy creates\n * another object that counts toward storage.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/copy\n */\nexport interface RESTPostAPIBlobObjectCopyBody {\n\tsource: SnowFlake;\n\tpath: string;\n\tmove?: boolean;\n\toverwrite?: boolean;\n\trandom_suffix?: boolean;\n\t/**\n\t * Copy only: when `path` is taken (including the source's own path), save as `name-1.ext`, `name-2.ext`, …\n\t * instead of returning `BLOB_OBJECT_ALREADY_EXISTS`. Cannot be combined with `overwrite`; ignored on a move.\n\t */\n\trename_on_conflict?: boolean;\n\tvisibility?: BlobVisibility;\n}\nexport type RESTPostAPIBlobObjectCopyQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/copy\n */\nexport type RESTPostAPIBlobObjectCopyResponse = APIPayload<APIBlobObject>;\n\n/** `DELETE /v1/objects/:object_id`. */\nexport type RESTDeleteAPIBlobObjectQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/delete\n */\nexport type RESTDeleteAPIBlobObjectResponse = APIPayload<null>;\n\n/**\n * `DELETE /v1/objects` — up to 1000 objects per call, by `ids` or by folder `prefix` (send one of them).\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/delete-many\n */\nexport type RESTDeleteAPIBlobObjectsBody = { ids: SnowFlake[]; prefix?: never } | { prefix: string; ids?: never };\nexport type RESTDeleteAPIBlobObjectsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/delete-many\n */\nexport type RESTDeleteAPIBlobObjectsResponse = APIPayload<APIBlobDeleteResult>;\n\n/**\n * `GET /v1/objects/:object_id/download` — temporary download link; it cannot be revoked. With\n * `redirect` true (default) the response is a `302` to the link; with `false` it is `RESTGetAPIBlobObjectDownloadResponse`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/download\n */\nexport interface RESTGetAPIBlobObjectDownloadQuery extends RESTAPIWorkspaceQuery {\n\t/** Seconds, 60–86400. Default 3600. */\n\texpires_in?: number;\n\tdisposition?: BlobContentDisposition;\n\tfilename?: string;\n\tredirect?: boolean;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/objects/download\n */\nexport type RESTGetAPIBlobObjectDownloadResponse = APIPayload<APIBlobDownload>;\n\n// ---------------------------------------------------------------------------\n// Shares\n// ---------------------------------------------------------------------------\n\n/**\n * `POST /v1/shares` — responds `201`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/shares/create\n */\nexport interface RESTPostAPIBlobShareBody {\n\tobject_id: SnowFlake;\n\t/** Seconds, 60 to 30 days. Default 24 hours. */\n\texpires_in?: number;\n\t/** 1–10000. */\n\tmax_downloads?: number;\n\t/** 8–128 characters; plan-dependent. */\n\tpassword?: string;\n}\nexport type RESTPostAPIBlobShareQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/shares/create\n */\nexport type RESTPostAPIBlobShareResponse = APIPayload<APIBlobShare>;\n\n/**\n * `GET /v1/shares`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/shares/list\n */\nexport interface RESTGetAPIBlobSharesQuery extends RESTAPIWorkspaceQuery {\n\tobject_id?: SnowFlake;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/shares/list\n */\nexport type RESTGetAPIBlobSharesResponse = APIPayload<APIBlobShare[]>;\n\n/** `DELETE /v1/shares/:share_id` — revokes the share. */\nexport type RESTDeleteAPIBlobShareQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/shares/revoke\n */\nexport type RESTDeleteAPIBlobShareResponse = APIPayload<null>;\n\n/** `GET /v1/shares/public/:token` — no authentication; used by the share page. `BLOB_SHARE_NOT_FOUND` / `BLOB_SHARE_EXHAUSTED`. */\nexport type RESTGetAPIBlobSharePublicResponse = APIPayload<APIBlobSharePublic>;\n\n/** `POST /v1/shares/public/:token/download` — no authentication. Counts one download and returns a temporary link. A wrong password returns `BLOB_SHARE_PASSWORD_INVALID` (rate limited). */\nexport interface RESTPostAPIBlobSharePublicDownloadBody {\n\tpassword?: string;\n}\nexport type RESTPostAPIBlobSharePublicDownloadResponse = APIPayload<APIBlobDownload>;\n\n// ---------------------------------------------------------------------------\n// Folder rules\n// ---------------------------------------------------------------------------\n\n/** Rule fields a client sends; `prefix` and `created_at` are not part of the body, `active_from` is set by the platform. */\nexport type RESTBlobRuleInput = Omit<APIBlobRule, \"prefix\" | \"created_at\" | \"active_from\">;\n\n/** `GET /v1/rules`. */\nexport type RESTGetAPIBlobRulesQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/get\n */\nexport type RESTGetAPIBlobRulesResponse = APIPayload<APIBlobRules>;\n\n/**\n * `PUT /v1/rules` — replaces the whole list. Requires the `If-Match` header with the `etag` of the list you read. Returns the saved list and its new `etag`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/replace\n */\nexport interface RESTPutAPIBlobRulesBody {\n\trules: (RESTBlobRuleInput & { prefix: string })[];\n}\nexport type RESTPutAPIBlobRulesQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/replace\n */\nexport interface RESTPutAPIBlobRulesHeaders {\n\t\"If-Match\": string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/replace\n */\nexport type RESTPutAPIBlobRulesResponse = APIPayload<APIBlobRules>;\n\n/**\n * `PUT /v1/rules/:prefix` — creates or changes one rule (URL-encode the prefix). Returns the whole list and its new `etag`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/put\n */\nexport type RESTPutAPIBlobRuleBody = RESTBlobRuleInput;\nexport type RESTPutAPIBlobRuleQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/put\n */\nexport type RESTPutAPIBlobRuleResponse = APIPayload<APIBlobRules>;\n\n/** `DELETE /v1/rules/:prefix` (URL-encode the prefix). Returns the remaining list and its new `etag`. */\nexport type RESTDeleteAPIBlobRuleQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/rules/delete\n */\nexport type RESTDeleteAPIBlobRuleResponse = APIPayload<APIBlobRules>;\n\n// ---------------------------------------------------------------------------\n// Account, upload tokens, S3 and custom domains\n// ---------------------------------------------------------------------------\n\n/** `GET /v1/stats`. */\nexport type RESTGetAPIBlobStatsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/account/stats\n */\nexport type RESTGetAPIBlobStatsResponse = APIPayload<APIBlobStats>;\n\n/**\n * `POST /v1/upload-tokens` — creates a token that fixes every constraint below. Send `path` (one\n * file) or `prefix` (any file under a folder, random suffix forced). It stops working when the\n * API key that created it is revoked.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/account/upload-tokens\n */\nexport interface RESTPostAPIBlobUploadTokenBody {\n\tpath?: string;\n\tprefix?: string;\n\tvisibility?: BlobVisibility;\n\tmax_size?: number;\n\t/** 1–20 extensions, lowercase, without the dot. */\n\tallowed_extensions?: string[];\n\tcache_control?: string;\n\tcontent_disposition?: BlobContentDisposition;\n\texpires_at?: ISODateString;\n\tmetadata?: Record<string, string>;\n\t/**\n\t * Allow the token to replace an existing object. Default `false`: a token without `overwrite: true`\n\t * never replaces an object, even if the upload asks for `overwrite`.\n\t */\n\toverwrite?: boolean;\n\t/** Seconds the token stays valid, 60–3600. Default 900. */\n\texpires_in?: number;\n\t/** 1–100. Default 1. */\n\tmax_uses?: number;\n}\nexport type RESTPostAPIBlobUploadTokenQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/account/upload-tokens\n */\nexport type RESTPostAPIBlobUploadTokenResponse = APIPayload<APIBlobUploadToken>;\n\n/** `GET /v1/s3/credentials` — read-only access when the API key only has `blob:read`. Limited to 10 calls per hour. */\nexport type RESTGetAPIBlobS3CredentialsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/account/s3-credentials\n */\nexport type RESTGetAPIBlobS3CredentialsResponse = APIPayload<APIBlobS3Credentials>;\n\n/** `GET /v1/domains`. */\nexport type RESTGetAPIBlobDomainsQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/domains/list\n */\nexport type RESTGetAPIBlobDomainsResponse = APIPayload<APIBlobCustomDomain[]>;\n\n/**\n * `POST /v1/domains` — responds `201`. Plan-dependent.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/domains/add\n */\nexport interface RESTPostAPIBlobDomainBody {\n\thostname: string;\n\tprefix?: string;\n\t/** Defaults to `false`. See {@link APIBlobCustomDomain.web_content}. */\n\tweb_content?: boolean;\n}\nexport type RESTPostAPIBlobDomainQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/domains/add\n */\nexport type RESTPostAPIBlobDomainResponse = APIPayload<APIBlobCustomDomain>;\n\n/** `POST /v1/domains/:domain_id/verify` — checks the ownership record, the CNAME and the certificate again. */\nexport type RESTPostAPIBlobDomainVerifyQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/domains/verify\n */\nexport type RESTPostAPIBlobDomainVerifyResponse = APIPayload<APIBlobCustomDomain>;\n\n/** `PATCH /v1/domains/:domain_id`. */\nexport interface RESTPatchAPIBlobDomainBody {\n\t/** See {@link APIBlobCustomDomain.web_content}. Takes effect within about a minute. */\n\tweb_content?: boolean;\n}\nexport type RESTPatchAPIBlobDomainQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/domains/update\n */\nexport type RESTPatchAPIBlobDomainResponse = APIPayload<APIBlobCustomDomain>;\n\n/** `DELETE /v1/domains/:domain_id`. */\nexport type RESTDeleteAPIBlobDomainQuery = RESTAPIWorkspaceQuery;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/blob/domains/delete\n */\nexport type RESTDeleteAPIBlobDomainResponse = APIPayload<null>;\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,
|