@vertracloud/api-types 0.3.5 → 0.4.0
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 +92 -0
- package/payloads/v1/api-error.js +48 -0
- package/payloads/v1/api-error.js.map +1 -1
- package/payloads/v1/api-error.mjs +48 -0
- package/payloads/v1/api-key.d.ts +4 -2
- package/payloads/v1/api-key.js +43 -0
- package/payloads/v1/api-key.js.map +1 -1
- package/payloads/v1/api-key.mjs +43 -0
- package/payloads/v1/application.d.ts +3 -2
- package/payloads/v1/application.js.map +1 -1
- package/payloads/v1/blob.d.ts +248 -0
- package/payloads/v1/blob.js +56 -0
- package/payloads/v1/blob.js.map +1 -0
- package/payloads/v1/blob.mjs +27 -0
- package/payloads/v1/index.d.ts +1 -0
- package/payloads/v1/index.js +124 -1
- package/payloads/v1/index.js.map +1 -1
- package/payloads/v1/index.mjs +119 -1
- package/payloads/v1/orders.d.ts +4 -0
- package/payloads/v1/orders.js.map +1 -1
- package/payloads/v1/workspace.d.ts +6 -3
- package/payloads/v1/workspace.js +5 -1
- package/payloads/v1/workspace.js.map +1 -1
- package/payloads/v1/workspace.mjs +5 -1
- package/rest/v1/blob.d.ts +389 -0
- package/rest/v1/blob.js +19 -0
- package/rest/v1/blob.js.map +1 -0
- package/rest/v1/blob.mjs +1 -0
- package/rest/v1/index.d.ts +2 -0
- package/rest/v1/index.js.map +1 -1
- package/v1.d.ts +2 -0
- package/v1.js +124 -1
- package/v1.js.map +1 -1
- package/v1.mjs +119 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["blob.ts"],"sourcesContent":["import type { ISODateString, SnowFlake } from \"../../v1\";\nimport type { APIErrorCode } from \"./api-error\";\n\n/** Who can read an object by its public URL. `private` objects need a temporary link or a share. */\nexport type BlobVisibility = \"public\" | \"private\";\nexport const BlobVisibility = { PUBLIC: \"public\", PRIVATE: \"private\" } as const satisfies Record<string, BlobVisibility>;\n\n/** How a browser treats the file: shown in the page (`inline`) or saved (`attachment`). */\nexport type BlobContentDisposition = \"inline\" | \"attachment\";\nexport const BlobContentDisposition = {\n\tINLINE: \"inline\",\n\tATTACHMENT: \"attachment\",\n} as const satisfies Record<string, BlobContentDisposition>;\n\n/** `single` = one `PUT` to one URL; `multipart` = several parts, each with its own URL. */\nexport type BlobUploadMode = \"single\" | \"multipart\";\nexport const BlobUploadMode = { SINGLE: \"single\", MULTIPART: \"multipart\" } as const satisfies Record<string, BlobUploadMode>;\n\nexport type BlobUploadStatus = \"pending\" | \"completed\" | \"aborted\" | \"expired\";\nexport const BlobUploadStatus = {\n\tPENDING: \"pending\",\n\tCOMPLETED: \"completed\",\n\tABORTED: \"aborted\",\n\tEXPIRED: \"expired\",\n} as const satisfies Record<string, BlobUploadStatus>;\n\nexport type BlobCustomDomainStatus = \"pending\" | \"active\" | \"failed\" | \"suspended\";\nexport const BlobCustomDomainStatus = {\n\tPENDING: \"pending\",\n\tACTIVE: \"active\",\n\tFAILED: \"failed\",\n\tSUSPENDED: \"suspended\",\n} as const satisfies Record<string, BlobCustomDomainStatus>;\n\n/** A stored file. The `id` never changes; `path` can (move, rename). */\nexport interface APIBlobObject {\n\tid: SnowFlake;\n\t/** Full path inside the account, for example `images/avatars/joao.png`. */\n\tpath: string;\n\tsize: number;\n\tcontent_type: string;\n\tetag: string;\n\t/** SHA-256 (hex) of the content, when the upload sent a checksum. */\n\tsha256: string | null;\n\tvisibility: BlobVisibility;\n\t/** Public URL; `null` while the object is private. */\n\turl: string | null;\n\t/** `immutable`, `max-age=<seconds>` or `no-cache` (plan-dependent); `null` = default. */\n\tcache_control: string | null;\n\tcontent_disposition: BlobContentDisposition;\n\t/** File name suggested on download; `null` = the last segment of `path`. */\n\tfilename: string | null;\n\t/** Up to 5 keys (`[a-z0-9-]{1,64}`) and 512 bytes in total; plan-dependent. */\n\tmetadata: Record<string, string>;\n\texpires_at: ISODateString | null;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\n/** Result of listing objects: one page of files plus the folders found under the prefix. */\nexport interface APIBlobObjectList {\n\tobjects: APIBlobObject[];\n\t/** Folder prefixes ending in `/` (empty without a `delimiter`). */\n\tfolders: string[];\n\t/** Pass back as `cursor` for the next page; `null` = last page. */\n\tcursor: string | null;\n}\n\n/** A direct upload in progress. Bytes go straight to the URLs, not through the API. */\nexport interface APIBlobUpload {\n\tid: SnowFlake;\n\t/** Final path (with the random suffix, when requested). */\n\tpath: string;\n\tmode: BlobUploadMode;\n\tstatus: BlobUploadStatus;\n\tsize: number;\n\t/** When the URLs and the reserved storage expire. */\n\texpires_at: ISODateString;\n\t/** `single` mode: URL to `PUT` the whole file to. */\n\turl?: string;\n\t/** Headers the `PUT` must send exactly as given. */\n\theaders: Record<string, string>;\n\t/** `multipart` mode: fixed part size (the last part can be smaller). */\n\tpart_size?: number;\n\tpart_count?: number;\n\t/** Part numbers already stored; use it to resume an interrupted upload. */\n\tuploaded_parts?: number[];\n\tcreated_at: ISODateString;\n}\n\nexport interface APIBlobUploadPart {\n\tpart_number: number;\n\turl: string;\n\tsize: number;\n\t/** Headers the `PUT` of this part must send exactly as given. */\n\theaders: Record<string, string>;\n}\n\n/** Plan limits that apply to Blob Storage, so clients need not hardcode them. */\nexport interface APIBlobLimits {\n\t/** Largest file accepted by the single-request upload. */\n\tmax_simple_upload_bytes: number;\n\t/** Largest file that can be sent in one part of a direct upload. */\n\tmax_single_put_bytes: number;\n\tmax_object_bytes: number;\n\tmin_part_bytes: number;\n\tmax_part_bytes: number;\n\tmax_parts: number;\n\tmax_open_uploads: number;\n\t/** `null` = no limit of its own. */\n\tuploads_per_second: number | null;\n\tmax_rules: number;\n\tmax_custom_domains: number;\n\tmetadata_enabled: boolean;\n\tshare_password_enabled: boolean;\n\t/** Whether `cache_control: \"no-cache\"` is allowed. */\n\tno_cache_enabled: boolean;\n\t/** Shortest accepted `expires_at` from now, in seconds. */\n\tmin_expiration_seconds: number;\n\t/** 0 = image transformation is not included in the plan. */\n\timage_transformations_per_month: number;\n}\n\nexport interface APIBlobStats {\n\tobjects: number;\n\tused_bytes: number;\n\tquota_bytes: number;\n\t/** Above 0 only after a plan downgrade. */\n\tover_quota_bytes: number;\n\t/** Estimated overage charge, in cents, billed on renewal. */\n\testimated_overage_cents: number;\n\tmonth_average_bytes: number;\n\t/** Image transformations used in the current month. */\n\timage_transformations_used: number;\n\t/** Base URL of the public files of the account. */\n\tpublic_base_url: string;\n\tlimits: APIBlobLimits;\n}\n\n/** One item of a batch update. */\nexport interface APIBlobBatchResult {\n\tid: SnowFlake;\n\tok: boolean;\n\t/** Set when `ok` is `false`. */\n\tcode?: APIErrorCode;\n\t/** Set when `ok` is `true`. */\n\tobject?: APIBlobObject;\n}\n\nexport interface APIBlobDeleteResult {\n\tdeleted: SnowFlake[];\n\tnot_found: SnowFlake[];\n\t/** `true` when more objects match and another call is needed. */\n\tremaining: boolean;\n}\n\n/** Temporary download link, returned when `redirect=false`. */\nexport interface APIBlobDownload {\n\turl: string;\n\texpires_at: ISODateString;\n}\n\n/** Short-lived credential for browsers and untrusted clients; usable only on the upload routes. */\nexport interface APIBlobUploadToken {\n\t/** Starts with `vcup_`. Shown once. */\n\ttoken: string;\n\texpires_at: ISODateString;\n\tmax_uses: number;\n}\n\nexport interface APIBlobShare {\n\tid: SnowFlake;\n\tobject_id: SnowFlake;\n\t/** Share page URL. */\n\turl: string;\n\texpires_at: ISODateString;\n\tmax_downloads: number | null;\n\tremaining_downloads: number | null;\n\thas_password: boolean;\n\t/** `true` = the object is public, so the share does not protect it. */\n\tobject_is_public: boolean;\n\tcreated_at: ISODateString;\n}\n\n/** What the public share page shows before the download. No sign-in needed; the token is the credential. */\nexport interface APIBlobSharePublic {\n\tfilename: string;\n\tsize: number;\n\tcontent_type: string;\n\thas_password: boolean;\n\texpires_at: ISODateString;\n\tremaining_downloads: number | null;\n}\n\n/** Defaults and limits applied to every object under a folder prefix. The longest matching prefix wins. */\nexport interface APIBlobRule {\n\t/** Folder prefix, always stored with a trailing `/`. */\n\tprefix: string;\n\t/** Default visibility of new objects in the folder. */\n\tvisibility?: BlobVisibility;\n\t/** Default expiration of each new object, in seconds. */\n\texpire_seconds?: number;\n\t/** Largest accepted file, 512 bytes to 10 GB. */\n\tmax_size?: number;\n\t/** Accepted extensions (1–50), lowercase, without the dot. */\n\textensions?: string[];\n\tcache_control?: string;\n\t/** Delete objects this many days after upload (1–3650). */\n\tdelete_after_days?: number;\n\t/** When `delete_after_days` starts to apply. */\n\tactive_from?: ISODateString;\n\tcreated_at: ISODateString;\n}\n\n/** The rule list and the version tag to send back as `If-Match` when replacing it. */\nexport interface APIBlobRules {\n\trules: APIBlobRule[];\n\tetag: string;\n}\n\n/** S3-compatible credentials, derived from the API key that requested them. */\nexport interface APIBlobS3Credentials {\n\taccess_key_id: string;\n\tsecret_access_key: string;\n\tendpoint: string;\n\tregion: \"auto\";\n\tbuckets: [\"public\", \"private\"];\n\taccess: { read: boolean; write: boolean };\n}\n\nexport interface APIBlobCustomDomain {\n\tid: SnowFlake;\n\t/** Subdomain only (`cdn.example.com`). */\n\thostname: string;\n\tstatus: BlobCustomDomainStatus;\n\tssl_status: string;\n\t/** Point a CNAME record of `hostname` to this value. */\n\tcname_target: string;\n\t/** When set, the domain serves only this folder. */\n\tprefix: string | null;\n\t/**\n\t * `true`: on this domain, `.html`, `.htm`, `.xhtml`, `.svg` and `.xml` open in the browser with their real type (pages\n\t * run JavaScript in a sandbox: no forms, no cookies, no top-level navigation). `false` (default): they always download.\n\t * The default public URL always downloads them, whatever this value.\n\t */\n\tweb_content: boolean;\n\t/**\n\t * Ownership proof: publish this `TXT` record at `name` with the exact `value`. The domain only becomes\n\t * `active` after it resolves (and the CNAME and certificate are ready). `null` once the domain is active.\n\t */\n\tverification?: { type: \"txt\"; name: string; value: string } | null;\n\tcreated_at: ISODateString;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,IAAM,iBAAiB,EAAE,QAAQ,UAAU,SAAS,UAAU;AAI9D,IAAM,yBAAyB;AAAA,EACrC,QAAQ;AAAA,EACR,YAAY;AACb;AAIO,IAAM,iBAAiB,EAAE,QAAQ,UAAU,WAAW,YAAY;AAGlE,IAAM,mBAAmB;AAAA,EAC/B,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AACV;AAGO,IAAM,yBAAyB;AAAA,EACrC,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AACZ;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// payloads/v1/blob.ts
|
|
2
|
+
var BlobVisibility = { PUBLIC: "public", PRIVATE: "private" };
|
|
3
|
+
var BlobContentDisposition = {
|
|
4
|
+
INLINE: "inline",
|
|
5
|
+
ATTACHMENT: "attachment"
|
|
6
|
+
};
|
|
7
|
+
var BlobUploadMode = { SINGLE: "single", MULTIPART: "multipart" };
|
|
8
|
+
var BlobUploadStatus = {
|
|
9
|
+
PENDING: "pending",
|
|
10
|
+
COMPLETED: "completed",
|
|
11
|
+
ABORTED: "aborted",
|
|
12
|
+
EXPIRED: "expired"
|
|
13
|
+
};
|
|
14
|
+
var BlobCustomDomainStatus = {
|
|
15
|
+
PENDING: "pending",
|
|
16
|
+
ACTIVE: "active",
|
|
17
|
+
FAILED: "failed",
|
|
18
|
+
SUSPENDED: "suspended"
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
BlobContentDisposition,
|
|
22
|
+
BlobCustomDomainStatus,
|
|
23
|
+
BlobUploadMode,
|
|
24
|
+
BlobUploadStatus,
|
|
25
|
+
BlobVisibility
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=blob.mjs.map
|
package/payloads/v1/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { APIApiKey, APIApiKeyCreated, APIApiKeyPreset, APIApiKeyRoute, APIApiKey
|
|
|
3
3
|
export { APIErrorCode, API_ERROR_CODES } from './api-error.js';
|
|
4
4
|
export { APIApplication, APIApplicationConfig, APIApplicationCustomDomain, APIApplicationDeploySettings, APIApplicationDeployment, APIApplicationDnsRecord, APIApplicationEnvironment, APIApplicationFile, APIApplicationFileContent, APIApplicationFileTree, APIApplicationFileUpload, APIApplicationGithub, APIApplicationMetric, APIApplicationNetwork, APIApplicationOperationResponse, APIApplicationRealtimeEvent, APIApplicationRelease, APIApplicationReleaseLog, APIApplicationRollbackPreview, APIApplicationRuntime, APIApplicationRuntimes, APIApplicationScanSuggestions, APIApplicationShieldCooldown, APIApplicationStatus, APIApplicationStatusShort, APIApplicationSubdomain, APIApplicationWebPublish, APIApplicationWebhook, APIApplicationWebhookUrl, ApplicationCluster, ApplicationDnsRecordStatus, ApplicationDnsRecordType, ApplicationEnvironmentChange, ApplicationFileContentType, ApplicationFileType, ApplicationLanguage, ApplicationRealtimeEventType, ApplicationReleaseSource, ApplicationReleaseStatus, ApplicationStatus, ApplicationType, ApplicationVersion, ApplicationZeroDowntime, ShieldIncidentDirection, ShieldIncidentReason } from './application.js';
|
|
5
5
|
export { APIBillingAddress, APIBillingCard, APIBillingDetails, APIBillingRenewal, APIBillingTaxId, BillingTaxIdType } from './billing.js';
|
|
6
|
+
export { APIBlobBatchResult, APIBlobCustomDomain, APIBlobDeleteResult, APIBlobDownload, APIBlobLimits, APIBlobObject, APIBlobObjectList, APIBlobRule, APIBlobRules, APIBlobS3Credentials, APIBlobShare, APIBlobSharePublic, APIBlobStats, APIBlobUpload, APIBlobUploadPart, APIBlobUploadToken, BlobContentDisposition, BlobCustomDomainStatus, BlobUploadMode, BlobUploadStatus, BlobVisibility } from './blob.js';
|
|
6
7
|
export { APIDatabase, APIDatabaseCertificate, APIDatabaseMetrics, APIDatabaseNetwork, APIDatabaseOperationResponse, APIDatabasePasswordReset, APIDatabaseStatus, APIDatabaseStatusShort, DatabaseCluster, DatabaseStatus, DatabaseType } from './database.js';
|
|
7
8
|
export { APIDatabaseCollection, APIDatabaseColumn, APIDatabaseColumnReference, APIDatabaseDataError, APIDatabaseDataOverview, APIDatabaseDocumentListParams, APIDatabaseDocumentsPage, APIDatabaseIndex, APIDatabaseListParams, APIDatabaseMongoIndex, APIDatabaseQueryResult, APIDatabaseRedisInfo, APIDatabaseRedisKey, APIDatabaseRedisKeyValue, APIDatabaseRedisKeysPage, APIDatabaseRedisScanParams, APIDatabaseRedisZSetMember, APIDatabaseRowFilter, APIDatabaseRowsPage, APIDatabaseSchema, APIDatabaseTable, DatabaseFilterOperator, DatabaseRedisKeyType, DatabaseSortDirection, DatabaseTableKind } from './database-data.js';
|
|
8
9
|
export { APINotification, LocalizedContent, NotificationImportance, NotificationType } from './notification.js';
|
package/payloads/v1/index.js
CHANGED
|
@@ -49,6 +49,11 @@ __export(v1_exports, {
|
|
|
49
49
|
ApplicationVersion: () => ApplicationVersion,
|
|
50
50
|
ApplicationZeroDowntime: () => ApplicationZeroDowntime,
|
|
51
51
|
BillingTaxIdType: () => BillingTaxIdType,
|
|
52
|
+
BlobContentDisposition: () => BlobContentDisposition,
|
|
53
|
+
BlobCustomDomainStatus: () => BlobCustomDomainStatus,
|
|
54
|
+
BlobUploadMode: () => BlobUploadMode,
|
|
55
|
+
BlobUploadStatus: () => BlobUploadStatus,
|
|
56
|
+
BlobVisibility: () => BlobVisibility,
|
|
52
57
|
DatabaseCluster: () => DatabaseCluster,
|
|
53
58
|
DatabaseFilterOperator: () => DatabaseFilterOperator,
|
|
54
59
|
DatabaseRedisKeyType: () => DatabaseRedisKeyType,
|
|
@@ -125,6 +130,8 @@ var APIApiKeyScope = {
|
|
|
125
130
|
WORKSPACES_WRITE: "workspaces:write",
|
|
126
131
|
WORKSPACES_DELETE: "workspaces:delete",
|
|
127
132
|
WORKSPACES_INVITES: "workspaces:invites",
|
|
133
|
+
BLOB_READ: "blob:read",
|
|
134
|
+
BLOB_WRITE: "blob:write",
|
|
128
135
|
BILLING_READ: "billing:read",
|
|
129
136
|
BILLING_WRITE: "billing:write",
|
|
130
137
|
REDEEM_WRITE: "redeem:write"
|
|
@@ -309,6 +316,47 @@ var API_KEY_SCOPES = {
|
|
|
309
316
|
{ method: "POST", path: "/v1/workspaces/invites/:token/decline" }
|
|
310
317
|
]
|
|
311
318
|
},
|
|
319
|
+
/** Blob Storage (`blob.vertracloud.app`). Upload tokens (`vcup_`) are a separate credential, not a scope. */
|
|
320
|
+
"blob:read": {
|
|
321
|
+
group: "blob",
|
|
322
|
+
routes: [
|
|
323
|
+
{ method: "GET", path: "/v1/blob/objects" },
|
|
324
|
+
{ method: "GET", path: "/v1/blob/objects/:object_id" },
|
|
325
|
+
{ method: "GET", path: "/v1/blob/objects/:object_id/download" },
|
|
326
|
+
{ method: "GET", path: "/v1/blob/shares" },
|
|
327
|
+
{ method: "GET", path: "/v1/blob/rules" },
|
|
328
|
+
{ method: "GET", path: "/v1/blob/stats" },
|
|
329
|
+
{ method: "GET", path: "/v1/blob/s3/credentials" },
|
|
330
|
+
{ method: "GET", path: "/v1/blob/domains" }
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
"blob:write": {
|
|
334
|
+
group: "blob",
|
|
335
|
+
routes: [
|
|
336
|
+
{ method: "POST", path: "/v1/blob/objects" },
|
|
337
|
+
{ method: "PATCH", path: "/v1/blob/objects" },
|
|
338
|
+
{ method: "PATCH", path: "/v1/blob/objects/:object_id" },
|
|
339
|
+
{ method: "POST", path: "/v1/blob/objects/copy" },
|
|
340
|
+
{ method: "DELETE", path: "/v1/blob/objects" },
|
|
341
|
+
{ method: "DELETE", path: "/v1/blob/objects/:object_id" },
|
|
342
|
+
{ method: "POST", path: "/v1/blob/uploads" },
|
|
343
|
+
{ method: "GET", path: "/v1/blob/uploads" },
|
|
344
|
+
{ method: "GET", path: "/v1/blob/uploads/:upload_id" },
|
|
345
|
+
{ method: "POST", path: "/v1/blob/uploads/:upload_id/parts" },
|
|
346
|
+
{ method: "POST", path: "/v1/blob/uploads/:upload_id/complete" },
|
|
347
|
+
{ method: "DELETE", path: "/v1/blob/uploads/:upload_id" },
|
|
348
|
+
{ method: "POST", path: "/v1/blob/shares" },
|
|
349
|
+
{ method: "DELETE", path: "/v1/blob/shares/:share_id" },
|
|
350
|
+
{ method: "PUT", path: "/v1/blob/rules" },
|
|
351
|
+
{ method: "PUT", path: "/v1/blob/rules/:prefix" },
|
|
352
|
+
{ method: "DELETE", path: "/v1/blob/rules/:prefix" },
|
|
353
|
+
{ method: "POST", path: "/v1/blob/upload-tokens" },
|
|
354
|
+
{ method: "POST", path: "/v1/blob/domains" },
|
|
355
|
+
{ method: "POST", path: "/v1/blob/domains/:domain_id/verify" },
|
|
356
|
+
{ method: "PATCH", path: "/v1/blob/domains/:domain_id" },
|
|
357
|
+
{ method: "DELETE", path: "/v1/blob/domains/:domain_id" }
|
|
358
|
+
]
|
|
359
|
+
},
|
|
312
360
|
"billing:read": {
|
|
313
361
|
group: "billing",
|
|
314
362
|
routes: [
|
|
@@ -356,6 +404,8 @@ var WorkspacePermission = {
|
|
|
356
404
|
DATABASES_DELETE: "databases:delete",
|
|
357
405
|
SNAPSHOTS_READ: "snapshots:read",
|
|
358
406
|
SNAPSHOTS_MANAGE: "snapshots:manage",
|
|
407
|
+
BLOB_READ: "blob:read",
|
|
408
|
+
BLOB_MANAGE: "blob:manage",
|
|
359
409
|
MEMBERS_READ: "members:read",
|
|
360
410
|
MEMBERS_MANAGE: "members:manage",
|
|
361
411
|
ROLES_MANAGE: "roles:manage",
|
|
@@ -376,6 +426,8 @@ var WORKSPACE_PERMISSIONS = {
|
|
|
376
426
|
"databases:delete": { group: "databases" },
|
|
377
427
|
"snapshots:read": { group: "snapshots" },
|
|
378
428
|
"snapshots:manage": { group: "snapshots" },
|
|
429
|
+
"blob:read": { group: "blob" },
|
|
430
|
+
"blob:manage": { group: "blob" },
|
|
379
431
|
"members:read": { group: "members" },
|
|
380
432
|
"members:manage": { group: "members" },
|
|
381
433
|
"roles:manage": { group: "roles" },
|
|
@@ -391,7 +443,7 @@ var WorkspaceRolePreset = {
|
|
|
391
443
|
function workspacePresetPermissions(preset) {
|
|
392
444
|
switch (preset) {
|
|
393
445
|
case "admin":
|
|
394
|
-
return WORKSPACE_PERMISSION_LIST.filter((p) => p !== "snapshots:manage");
|
|
446
|
+
return WORKSPACE_PERMISSION_LIST.filter((p) => p !== "snapshots:manage" && p !== "blob:read" && p !== "blob:manage");
|
|
395
447
|
case "developer":
|
|
396
448
|
return ["apps:read", "apps:manage", "apps:lifecycle", "apps:envs", "apps:files", "databases:read", "databases:manage", "databases:lifecycle", "databases:credentials", "databases:data", "snapshots:read", "members:read", "activities:read"];
|
|
397
449
|
case "operator":
|
|
@@ -476,6 +528,52 @@ var API_ERROR_CODES = {
|
|
|
476
528
|
APP_NOT_PUBLISHED: "APP_NOT_PUBLISHED",
|
|
477
529
|
APP_ALREADY_IN_WORKSPACE: "APP_ALREADY_IN_WORKSPACE",
|
|
478
530
|
APP_NOT_FOUND_IN_WORKSPACE: "APP_NOT_FOUND_IN_WORKSPACE",
|
|
531
|
+
/** 404 — the object does not exist or belongs to another account. */
|
|
532
|
+
BLOB_OBJECT_NOT_FOUND: "BLOB_OBJECT_NOT_FOUND",
|
|
533
|
+
/** 409 — the path is taken and `overwrite` is not set. */
|
|
534
|
+
BLOB_OBJECT_ALREADY_EXISTS: "BLOB_OBJECT_ALREADY_EXISTS",
|
|
535
|
+
/** 404 — the upload does not exist, is not yours, or is already completed or aborted. */
|
|
536
|
+
BLOB_UPLOAD_NOT_FOUND: "BLOB_UPLOAD_NOT_FOUND",
|
|
537
|
+
/** 410 — the upload passed its deadline. */
|
|
538
|
+
BLOB_UPLOAD_EXPIRED: "BLOB_UPLOAD_EXPIRED",
|
|
539
|
+
/** 409 — parts are missing or the stored size differs from the declared size. */
|
|
540
|
+
BLOB_UPLOAD_INCOMPLETE: "BLOB_UPLOAD_INCOMPLETE",
|
|
541
|
+
/** 409 — more uploads open than the plan allows. */
|
|
542
|
+
BLOB_UPLOAD_LIMIT: "BLOB_UPLOAD_LIMIT",
|
|
543
|
+
/** 400 — the SHA-256 sent does not match the file. */
|
|
544
|
+
BLOB_CHECKSUM_MISMATCH: "BLOB_CHECKSUM_MISMATCH",
|
|
545
|
+
/** 413 — the file exceeds the plan, single-request upload, folder rule or upload token limit. */
|
|
546
|
+
BLOB_FILE_TOO_LARGE: "BLOB_FILE_TOO_LARGE",
|
|
547
|
+
/** 403 — Blob Storage is suspended for the account (grace period, abuse or deletion). */
|
|
548
|
+
BLOB_NAMESPACE_SUSPENDED: "BLOB_NAMESPACE_SUSPENDED",
|
|
549
|
+
/** 401 — the upload token does not exist, expired or was revoked. */
|
|
550
|
+
BLOB_UPLOAD_TOKEN_INVALID: "BLOB_UPLOAD_TOKEN_INVALID",
|
|
551
|
+
/** 401 — the upload token has no uses left. */
|
|
552
|
+
BLOB_UPLOAD_TOKEN_EXHAUSTED: "BLOB_UPLOAD_TOKEN_EXHAUSTED",
|
|
553
|
+
/** 403 — upload tokens only work on the upload routes. */
|
|
554
|
+
BLOB_UPLOAD_TOKEN_NOT_ALLOWED: "BLOB_UPLOAD_TOKEN_NOT_ALLOWED",
|
|
555
|
+
/** 403 — the path, size or extension is outside what the upload token allows. */
|
|
556
|
+
BLOB_UPLOAD_TOKEN_CONSTRAINT: "BLOB_UPLOAD_TOKEN_CONSTRAINT",
|
|
557
|
+
/** 404 — the share does not exist, was revoked or expired. */
|
|
558
|
+
BLOB_SHARE_NOT_FOUND: "BLOB_SHARE_NOT_FOUND",
|
|
559
|
+
/** 410 — the share reached its download limit. */
|
|
560
|
+
BLOB_SHARE_EXHAUSTED: "BLOB_SHARE_EXHAUSTED",
|
|
561
|
+
/** 401 — wrong share password. */
|
|
562
|
+
BLOB_SHARE_PASSWORD_INVALID: "BLOB_SHARE_PASSWORD_INVALID",
|
|
563
|
+
/** 409 — the `If-Match` of the rule list is outdated; read it again. */
|
|
564
|
+
BLOB_RULES_CONFLICT: "BLOB_RULES_CONFLICT",
|
|
565
|
+
/** 409 — more folder rules than the plan allows. */
|
|
566
|
+
BLOB_RULE_LIMIT: "BLOB_RULE_LIMIT",
|
|
567
|
+
/** 409 — more custom domains than the plan allows. */
|
|
568
|
+
BLOB_CUSTOM_DOMAIN_LIMIT: "BLOB_CUSTOM_DOMAIN_LIMIT",
|
|
569
|
+
/** 409 — the hostname is already in use. */
|
|
570
|
+
BLOB_CUSTOM_DOMAIN_TAKEN: "BLOB_CUSTOM_DOMAIN_TAKEN",
|
|
571
|
+
/** 404 — the domain does not exist or belongs to another account. */
|
|
572
|
+
BLOB_CUSTOM_DOMAIN_NOT_FOUND: "BLOB_CUSTOM_DOMAIN_NOT_FOUND",
|
|
573
|
+
/** 422 — the file extension is blocked, outside the rule or token, or the content is an executable. */
|
|
574
|
+
BLOCKED_FILE_TYPE: "BLOCKED_FILE_TYPE",
|
|
575
|
+
/** 403 — the upload would exceed the storage quota. */
|
|
576
|
+
STORAGE_QUOTA_EXCEEDED: "STORAGE_QUOTA_EXCEEDED",
|
|
479
577
|
BUILD_FAILED: "BUILD_FAILED",
|
|
480
578
|
BUILD_TIMEOUT: "BUILD_TIMEOUT",
|
|
481
579
|
/** 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`. */
|
|
@@ -731,6 +829,26 @@ var BillingTaxIdType = {
|
|
|
731
829
|
CNPJ: "cnpj"
|
|
732
830
|
};
|
|
733
831
|
|
|
832
|
+
// payloads/v1/blob.ts
|
|
833
|
+
var BlobVisibility = { PUBLIC: "public", PRIVATE: "private" };
|
|
834
|
+
var BlobContentDisposition = {
|
|
835
|
+
INLINE: "inline",
|
|
836
|
+
ATTACHMENT: "attachment"
|
|
837
|
+
};
|
|
838
|
+
var BlobUploadMode = { SINGLE: "single", MULTIPART: "multipart" };
|
|
839
|
+
var BlobUploadStatus = {
|
|
840
|
+
PENDING: "pending",
|
|
841
|
+
COMPLETED: "completed",
|
|
842
|
+
ABORTED: "aborted",
|
|
843
|
+
EXPIRED: "expired"
|
|
844
|
+
};
|
|
845
|
+
var BlobCustomDomainStatus = {
|
|
846
|
+
PENDING: "pending",
|
|
847
|
+
ACTIVE: "active",
|
|
848
|
+
FAILED: "failed",
|
|
849
|
+
SUSPENDED: "suspended"
|
|
850
|
+
};
|
|
851
|
+
|
|
734
852
|
// payloads/v1/database.ts
|
|
735
853
|
var DatabaseType = {
|
|
736
854
|
POSTGRESQL: 1,
|
|
@@ -870,6 +988,11 @@ var UserLanguage = {
|
|
|
870
988
|
ApplicationVersion,
|
|
871
989
|
ApplicationZeroDowntime,
|
|
872
990
|
BillingTaxIdType,
|
|
991
|
+
BlobContentDisposition,
|
|
992
|
+
BlobCustomDomainStatus,
|
|
993
|
+
BlobUploadMode,
|
|
994
|
+
BlobUploadStatus,
|
|
995
|
+
BlobVisibility,
|
|
873
996
|
DatabaseCluster,
|
|
874
997
|
DatabaseFilterOperator,
|
|
875
998
|
DatabaseRedisKeyType,
|