@vertracloud/api-types 0.3.6 → 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.
@@ -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,