@vertracloud/api-types 0.1.0 → 0.2.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.
Files changed (113) hide show
  1. package/README.md +63 -35
  2. package/common/v1.d.ts +23 -7
  3. package/common/v1.js.map +1 -1
  4. package/package.json +5 -5
  5. package/payloads/v1/activity.d.ts +22 -10
  6. package/payloads/v1/activity.js +9 -0
  7. package/payloads/v1/activity.js.map +1 -1
  8. package/payloads/v1/activity.mjs +8 -0
  9. package/payloads/v1/api-error.d.ts +302 -0
  10. package/payloads/v1/api-error.js +216 -0
  11. package/payloads/v1/api-error.js.map +1 -0
  12. package/payloads/v1/api-error.mjs +188 -0
  13. package/payloads/v1/api-key.d.ts +88 -0
  14. package/payloads/v1/api-key.js +267 -0
  15. package/payloads/v1/api-key.js.map +1 -0
  16. package/payloads/v1/api-key.mjs +235 -0
  17. package/payloads/v1/application.d.ts +235 -47
  18. package/payloads/v1/application.js +34 -3
  19. package/payloads/v1/application.js.map +1 -1
  20. package/payloads/v1/application.mjs +28 -2
  21. package/payloads/v1/database-data.d.ts +329 -0
  22. package/payloads/v1/database-data.js +63 -0
  23. package/payloads/v1/database-data.js.map +1 -0
  24. package/payloads/v1/database-data.mjs +35 -0
  25. package/payloads/v1/database.d.ts +29 -31
  26. package/payloads/v1/database.js.map +1 -1
  27. package/payloads/v1/github.d.ts +20 -0
  28. package/{rest/v1/credits.js → payloads/v1/github.js} +4 -4
  29. package/payloads/v1/github.js.map +1 -0
  30. package/payloads/v1/github.mjs +1 -0
  31. package/payloads/v1/index.d.ts +12 -9
  32. package/payloads/v1/index.js +630 -10
  33. package/payloads/v1/index.js.map +1 -1
  34. package/payloads/v1/index.mjs +590 -9
  35. package/payloads/v1/notification.d.ts +2 -3
  36. package/payloads/v1/notification.js.map +1 -1
  37. package/payloads/v1/oauth.d.ts +27 -0
  38. package/payloads/v1/oauth.js +34 -0
  39. package/payloads/v1/oauth.js.map +1 -0
  40. package/payloads/v1/oauth.mjs +8 -0
  41. package/payloads/v1/orders.d.ts +52 -27
  42. package/payloads/v1/orders.js +30 -0
  43. package/payloads/v1/orders.js.map +1 -1
  44. package/payloads/v1/orders.mjs +21 -0
  45. package/payloads/v1/redeem.d.ts +1 -1
  46. package/payloads/v1/redeem.js.map +1 -1
  47. package/payloads/v1/snapshot.d.ts +37 -7
  48. package/payloads/v1/snapshot.js +8 -2
  49. package/payloads/v1/snapshot.js.map +1 -1
  50. package/payloads/v1/snapshot.mjs +6 -1
  51. package/payloads/v1/status.d.ts +2 -2
  52. package/payloads/v1/status.js.map +1 -1
  53. package/payloads/v1/user.d.ts +54 -20
  54. package/payloads/v1/user.js +16 -0
  55. package/payloads/v1/user.js.map +1 -1
  56. package/payloads/v1/user.mjs +9 -0
  57. package/payloads/v1/workspace.d.ts +296 -25
  58. package/payloads/v1/workspace.js +128 -8
  59. package/payloads/v1/workspace.js.map +1 -1
  60. package/payloads/v1/workspace.mjs +115 -7
  61. package/rest/v1/activity.d.ts +20 -9
  62. package/rest/v1/activity.js.map +1 -1
  63. package/rest/v1/api-key.d.ts +26 -0
  64. package/{payloads/v1/credits.js → rest/v1/api-key.js} +4 -4
  65. package/rest/v1/api-key.js.map +1 -0
  66. package/rest/v1/api-key.mjs +1 -0
  67. package/rest/v1/application.d.ts +305 -23
  68. package/rest/v1/application.js.map +1 -1
  69. package/rest/v1/database-data.d.ts +234 -0
  70. package/rest/v1/database-data.js +19 -0
  71. package/rest/v1/database-data.js.map +1 -0
  72. package/rest/v1/database-data.mjs +1 -0
  73. package/rest/v1/database.d.ts +55 -14
  74. package/rest/v1/database.js.map +1 -1
  75. package/rest/v1/github.d.ts +22 -0
  76. package/rest/v1/{wing.js → github.js} +4 -4
  77. package/rest/v1/github.js.map +1 -0
  78. package/rest/v1/github.mjs +1 -0
  79. package/rest/v1/index.d.ts +16 -11
  80. package/rest/v1/index.js.map +1 -1
  81. package/rest/v1/notification.d.ts +2 -3
  82. package/rest/v1/notification.js.map +1 -1
  83. package/rest/v1/oauth.d.ts +60 -0
  84. package/{payloads/v1/wing.js → rest/v1/oauth.js} +4 -4
  85. package/rest/v1/oauth.js.map +1 -0
  86. package/rest/v1/oauth.mjs +1 -0
  87. package/rest/v1/orders.d.ts +28 -7
  88. package/rest/v1/orders.js.map +1 -1
  89. package/rest/v1/redeem.d.ts +2 -1
  90. package/rest/v1/redeem.js.map +1 -1
  91. package/rest/v1/snapshot.d.ts +45 -10
  92. package/rest/v1/snapshot.js.map +1 -1
  93. package/rest/v1/status.d.ts +1 -0
  94. package/rest/v1/user.d.ts +56 -7
  95. package/rest/v1/user.js.map +1 -1
  96. package/rest/v1/workspace.d.ts +186 -18
  97. package/rest/v1/workspace.js.map +1 -1
  98. package/v1.d.ts +24 -19
  99. package/v1.js +630 -10
  100. package/v1.js.map +1 -1
  101. package/v1.mjs +590 -9
  102. package/payloads/v1/credits.d.ts +0 -56
  103. package/payloads/v1/credits.js.map +0 -1
  104. package/payloads/v1/credits.mjs +0 -1
  105. package/payloads/v1/wing.d.ts +0 -133
  106. package/payloads/v1/wing.js.map +0 -1
  107. package/payloads/v1/wing.mjs +0 -1
  108. package/rest/v1/credits.d.ts +0 -17
  109. package/rest/v1/credits.js.map +0 -1
  110. package/rest/v1/credits.mjs +0 -1
  111. package/rest/v1/wing.d.ts +0 -38
  112. package/rest/v1/wing.js.map +0 -1
  113. package/rest/v1/wing.mjs +0 -1
package/README.md CHANGED
@@ -1,65 +1,93 @@
1
- # @vertracloud/api-types
1
+ <div align="center">
2
+ <a href="https://vertracloud.app">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://vertracloud.app/brand/github-banner.png">
5
+ <source media="(prefers-color-scheme: light)" srcset="https://vertracloud.app/brand/github-banner-light.png">
6
+ <img src="https://vertracloud.app/brand/github-banner-light.png" alt="Vertra Cloud" width="1200">
7
+ </picture>
8
+ </a>
9
+ </div>
2
10
 
3
- Simple type definitions for the **Vertra Cloud API**.
11
+ # @vertracloud/api-types
4
12
 
5
- [![GitHub](https://img.shields.io/github/license/vertracloud/api-types)](https://github.com/vertracloud/api-types/blob/main/LICENSE)
13
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
14
  [![npm](https://img.shields.io/npm/v/@vertracloud/api-types?color=red&logo=npm)](https://www.npmjs.com/package/@vertracloud/api-types)
7
15
 
16
+ TypeScript types for the public API of [Vertra Cloud](https://vertracloud.app), a Brazilian application hosting platform (PaaS) for applications, managed databases and bots.
17
+
18
+ - Imports are scoped by API version (`/v1`).
19
+ - Every route documented with a link to the [API reference](https://docs.vertracloud.app/api-reference/introduction).
20
+
21
+ **[Leia em português](#em-português)**
22
+
8
23
  ## Installation
9
24
 
10
25
  ```bash
11
26
  npm install @vertracloud/api-types
12
- // or
13
- yarn add @vertracloud/api-types
14
- // or
15
- pnpm add @vertracloud/api-types
16
27
  ```
17
28
 
18
- ## Getting Started
29
+ ## Usage
19
30
 
20
- Using these type definitions is straightforward. To specify a particular API version, simply append `/v*` to the import path, where `*` corresponds to your desired version. For example:
31
+ Import from the API version you target:
21
32
 
22
33
  ```ts
23
- // Importing type definitions for version 1
24
- import { APIUser, APIDatabase, APIApplication } from '@vertracloud/api-types/v1';
34
+ import type { APIApplication, RESTGetAPIApplicationResponse } from "@vertracloud/api-types/v1";
35
+
36
+ const res = await fetch(`https://api.vertracloud.app/v1/apps/${id}`, {
37
+ headers: { Authorization: `Bearer ${process.env.VERTRA_API_KEY}` },
38
+ });
39
+ const body = (await res.json()) as RESTGetAPIApplicationResponse;
40
+
41
+ if ("code" in body) {
42
+ console.error(body.code, body.message);
43
+ } else {
44
+ const app: APIApplication = body.response;
45
+ console.log(app.name);
46
+ }
25
47
  ```
26
48
 
27
- You can also import only the specific types you need:
49
+ Prefer the official SDK if you don't want to write the requests yourself: [`@vertracloud/sdk-api`](https://www.npmjs.com/package/@vertracloud/sdk-api).
28
50
 
29
- ```ts
30
- // Importing only the APIUser type from version 1
31
- import { APIUser } from '@vertracloud/api-types/v1';
32
- ```
51
+ ## Conventions
33
52
 
34
- > ***Note:** The versioned exports (`@vertracloud/api-types/v*`) include relevant types for `user`, `database`, as well as additional utilities and helpers.*
53
+ **Envelope.** Every JSON response is `{ response }` on success and `{ code, message?, details? }` on error (`APIPayload<T>`). `code` is a stable English sentinel listed in `APIErrorCode`; routes with nothing to return answer `{ response: null }`. `APIPayload<T>` is a union of both shapes: check `"code" in body` and TypeScript narrows each branch.
35
54
 
36
- ## Project Structure
55
+ **Naming.**
37
56
 
38
- The exported types for each API version are organized into two main categories:
57
+ | Prefix | Meaning | Example |
58
+ |---|---|---|
59
+ | `API*` | A payload returned by the API | `APIApplication` |
60
+ | `REST<Method>API<Resource>*Body` | Request body | `RESTPostAPIApplicationCreateBody` |
61
+ | `REST<Method>API<Resource>*Query` | Query string | `RESTGetAPIApplicationMetricsQuery` |
62
+ | `REST<Method>API<Resource>*Response` | Full response envelope | `RESTGetAPIApplicationResponse` |
39
63
 
40
- * Types prefixed with `API` represent the payloads returned by the REST API.
41
- * Types prefixed with `REST` represent the data sent to or received from REST API endpoints.
64
+ **Wire format.** Fields are `snake_case`. Most string unions have a companion `const` with the same name, so you can use either the literal or the constant:
42
65
 
43
- REST types follow a specific naming convention:
66
+ ```ts
67
+ import { ApplicationLanguage } from "@vertracloud/api-types/v1";
44
68
 
45
- ```
46
- REST<HTTP Method><Action><Type>
69
+ ApplicationLanguage.PYTHON === "python"; // true
47
70
  ```
48
71
 
49
- Where:
72
+ ## Em português
50
73
 
51
- * `HTTP Method` is one of: `Get`, `Post`, `Put`, `Delete`, etc.
52
- * `Action` describes the intent (e.g., `Create`, `Update`, `Delete`)
53
- * `Type` represents the related resource (e.g., `User`, `Database`, `Application`)
74
+ Tipos TypeScript da API pública da [Vertra Cloud](https://vertracloud.app), a plataforma brasileira de hospedagem de aplicações, bancos de dados e bots.
54
75
 
55
- ### Examples
76
+ ```bash
77
+ npm install @vertracloud/api-types
78
+ ```
79
+
80
+ ```ts
81
+ import type { RESTGetAPIApplicationResponse } from "@vertracloud/api-types/v1";
82
+ ```
56
83
 
57
- * `RESTPostAPIApplicationCreateBody`: request payload for creating a app.
58
- * `RESTGetAPIApplicationResponse`: expected response when retrieving a app.
84
+ - **Envelope:** sucesso é `{ response }`; erro é `{ code, message?, details? }`. O `code` é uma constante estável em inglês, listada em `APIErrorCode`. `APIPayload<T>` é a união das duas formas: cheque `"code" in body` e o TypeScript separa cada caso.
85
+ - **Nomes:** `API*` é o que a API devolve; `REST*Body`, `REST*Query` e `REST*Response` são o corpo, a query e a resposta de cada rota.
86
+ - **Campos** em `snake_case`. A maioria das uniões de strings tem um `const` com o mesmo nome.
87
+ - Prefere não montar as requisições? Use o SDK oficial, [`@vertracloud/sdk-api`](https://www.npmjs.com/package/@vertracloud/sdk-api).
59
88
 
60
- If a type name ends with `Response`, it refers to the structure returned by the API for that route.
89
+ Documentação completa: [docs.vertracloud.app](https://docs.vertracloud.app/api-reference/introduction). Histórico de versões: [CHANGELOG.md](CHANGELOG.md).
61
90
 
62
- This separation provides a clear distinction between:
91
+ ## License
63
92
 
64
- * What is **sent to** the API (via `REST*Body` or similar types)
65
- * And what is **returned from** the API (via `API*` or `REST*Response` types)
93
+ [MIT](LICENSE)
package/common/v1.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { APIErrorCode } from '../payloads/v1/api-error.js';
2
+
1
3
  type SnowFlake = string;
2
4
  interface PaginationMeta<T> {
3
5
  data: T[];
@@ -11,14 +13,28 @@ interface PaginationMeta<T> {
11
13
  interface APIPaginatedPayload<T> {
12
14
  response: PaginationMeta<T>;
13
15
  }
14
- interface APIPayload<T> {
15
- response?: T;
16
- code?: string;
16
+ /**
17
+ * Error body: `code` is a stable English sentinel, `details` carries the machine-readable context
18
+ * of the error (e.g. the invalid field's `path` on `VALIDATION_ERROR`).
19
+ */
20
+ interface APIErrorPayload<TErrorCode extends string = APIErrorCode> {
21
+ code: TErrorCode;
17
22
  message?: string;
23
+ details?: Record<string, unknown>;
18
24
  }
19
- interface APIReturnService<T> {
20
- status: number;
21
- payload: APIPayload<T>;
25
+ /**
26
+ * Envelope of every JSON response: `{ response }` on success — routes with nothing to return send
27
+ * `{ response: null }` (`APIPayload<null>`) — or an `APIErrorPayload`. Narrow with `"code" in body`.
28
+ */
29
+ type APIPayload<T, TErrorCode extends string = APIErrorCode> = {
30
+ response: T;
31
+ } | APIErrorPayload<TErrorCode>;
32
+ /**
33
+ * Query accepted by the application and database routes: the workspace the resource belongs to.
34
+ * Required for a workspace member acting on a resource they do not own; the owner may omit it.
35
+ */
36
+ interface RESTAPIWorkspaceQuery {
37
+ workspace_id?: string;
22
38
  }
23
39
  interface APIPayloadMessageOnly {
24
40
  message: string;
@@ -54,4 +70,4 @@ declare const UserPlan: {
54
70
  readonly ENTERPRISE_32: 8;
55
71
  };
56
72
 
57
- export { type APIHeaders, type APIPaginatedPayload, type APIPayload, type APIPayloadMessageOnly, type APIReturnService, type APIVersion, type DeepPartial, type ISODateString, type PaginationMeta, type SnowFlake, UserPlan };
73
+ export { type APIErrorPayload, type APIHeaders, type APIPaginatedPayload, type APIPayload, type APIPayloadMessageOnly, type APIVersion, type DeepPartial, type ISODateString, type PaginationMeta, type RESTAPIWorkspaceQuery, type SnowFlake, UserPlan };
package/common/v1.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["v1.ts"],"sourcesContent":["export type SnowFlake = string;\n\nexport interface PaginationMeta<T> {\n\tdata: T[];\n\ttotal_count: number;\n\tpage: number;\n\tlimit: number;\n\ttotal_pages: number;\n\thas_next_page: boolean;\n\thas_previous_page: boolean;\n}\n\nexport interface APIPaginatedPayload<T> {\n\tresponse: PaginationMeta<T>;\n}\n\nexport interface APIPayload<T> {\n\tresponse?: T;\n\tcode?: string;\n\tmessage?: string;\n}\n\nexport interface APIReturnService<T> {\n\tstatus: number;\n\tpayload: APIPayload<T>;\n}\n\nexport interface APIPayloadMessageOnly {\n\tmessage: string;\n}\n\nexport interface APIHeaders {\n\tAuthorization: string;\n}\n\nexport type DeepPartial<T> = T extends object\n\t? {\n\t\t\t[P in keyof T]?: DeepPartial<T[P]>;\n\t\t}\n\t: T;\n\nexport type APIVersion<TVersion extends number> = `v${TVersion}`;\n\nexport type ISODateString = string;\n\nexport type UserPlan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19;\n\nexport const UserPlan = {\n\tFREE: 1,\n\tECONOMY: 2,\n\tPRO: 3,\n\tSCALE: 4,\n\tINTERMEDIARY: 9,\n\n\tENTERPRISE_4: 5,\n\tENTERPRISE_6: 19,\n\tENTERPRISE_8: 6,\n\tENTERPRISE_12: 10,\n\tENTERPRISE_14: 11,\n\tENTERPRISE_16: 7,\n\tENTERPRISE_18: 12,\n\tENTERPRISE_20: 13,\n\tENTERPRISE_22: 14,\n\tENTERPRISE_24: 15,\n\tENTERPRISE_26: 16,\n\tENTERPRISE_28: 17,\n\tENTERPRISE_30: 18,\n\tENTERPRISE_32: 8,\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+CO,IAAM,WAAW;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,cAAc;AAAA,EAEd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAChB;","names":[]}
1
+ {"version":3,"sources":["v1.ts"],"sourcesContent":["import type { APIErrorCode } from \"../payloads/v1/api-error\";\n\nexport type SnowFlake = string;\n\nexport interface PaginationMeta<T> {\n\tdata: T[];\n\ttotal_count: number;\n\tpage: number;\n\tlimit: number;\n\ttotal_pages: number;\n\thas_next_page: boolean;\n\thas_previous_page: boolean;\n}\n\nexport interface APIPaginatedPayload<T> {\n\tresponse: PaginationMeta<T>;\n}\n\n/**\n * Error body: `code` is a stable English sentinel, `details` carries the machine-readable context\n * of the error (e.g. the invalid field's `path` on `VALIDATION_ERROR`).\n */\nexport interface APIErrorPayload<TErrorCode extends string = APIErrorCode> {\n\tcode: TErrorCode;\n\tmessage?: string;\n\tdetails?: Record<string, unknown>;\n}\n\n/**\n * Envelope of every JSON response: `{ response }` on success — routes with nothing to return send\n * `{ response: null }` (`APIPayload<null>`) — or an `APIErrorPayload`. Narrow with `\"code\" in body`.\n */\nexport type APIPayload<T, TErrorCode extends string = APIErrorCode> = { response: T } | APIErrorPayload<TErrorCode>;\n\n/**\n * Query accepted by the application and database routes: the workspace the resource belongs to.\n * Required for a workspace member acting on a resource they do not own; the owner may omit it.\n */\nexport interface RESTAPIWorkspaceQuery {\n\tworkspace_id?: string;\n}\n\nexport interface APIPayloadMessageOnly {\n\tmessage: string;\n}\n\nexport interface APIHeaders {\n\tAuthorization: string;\n}\n\nexport type DeepPartial<T> = T extends object\n\t? {\n\t\t\t[P in keyof T]?: DeepPartial<T[P]>;\n\t\t}\n\t: T;\n\nexport type APIVersion<TVersion extends number> = `v${TVersion}`;\n\nexport type ISODateString = string;\n\nexport type UserPlan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19;\n\nexport const UserPlan = {\n\tFREE: 1,\n\tECONOMY: 2,\n\tPRO: 3,\n\tSCALE: 4,\n\tINTERMEDIARY: 9,\n\n\tENTERPRISE_4: 5,\n\tENTERPRISE_6: 19,\n\tENTERPRISE_8: 6,\n\tENTERPRISE_12: 10,\n\tENTERPRISE_14: 11,\n\tENTERPRISE_16: 7,\n\tENTERPRISE_18: 12,\n\tENTERPRISE_20: 13,\n\tENTERPRISE_22: 14,\n\tENTERPRISE_24: 15,\n\tENTERPRISE_26: 16,\n\tENTERPRISE_28: 17,\n\tENTERPRISE_30: 18,\n\tENTERPRISE_32: 8,\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8DO,IAAM,WAAW;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,cAAc;AAAA,EAEd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAChB;","names":[]}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@vertracloud/api-types",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
- "description": "Typings for Vertra Cloud API",
6
- "homepage": "https://github.com/vertracloud/api-types#readme",
5
+ "description": "TypeScript types for the public API of Vertra Cloud, a Brazilian application hosting platform (PaaS) for applications, managed databases and bots.",
6
+ "homepage": "https://vertracloud.app",
7
7
  "exports": {
8
8
  "./v*": {
9
9
  "types": "./v*.d.ts",
@@ -32,7 +32,7 @@
32
32
  }
33
33
  },
34
34
  "scripts": {
35
- "build": "run-s lint tsc",
35
+ "build": "run-s clean lint tsc",
36
36
  "clean": "rimraf {common,payloads,rest}/**/*.{*js,d.*ts,*map} {utils,v*}.{*js,d.*ts,*map}",
37
37
  "lint": "biome check --fix .",
38
38
  "tsc": "tsup",
@@ -48,7 +48,7 @@
48
48
  "type": "git",
49
49
  "url": "git+https://github.com/vertracloud/api-types.git"
50
50
  },
51
- "keywords": ["api", "vertracloud", "vertra cloud api", "vertra", "types"],
51
+ "keywords": ["api", "vertracloud", "vertra cloud", "vertra cloud api", "vertra", "types", "typescript", "paas", "hosting", "deploy", "brazil"],
52
52
  "author": "Eydrenn Araujo",
53
53
  "bugs": {
54
54
  "url": "https://github.com/vertracloud/api-types/issues"
@@ -1,9 +1,8 @@
1
1
  import { SnowFlake, ISODateString } from '../../common/v1.js';
2
2
  import { LocalizedContent } from './notification.js';
3
+ import './api-error.js';
3
4
 
4
- /**
5
- * @see https://docs.vertracloud.app/api-reference/endpoint/activities
6
- */
5
+ /** Dashboard session only (not reachable with an API key). */
7
6
  type ActivityStatus = "success" | "warning" | "error" | "info";
8
7
  declare const ActivityStatus: {
9
8
  readonly Success: "success";
@@ -11,9 +10,7 @@ declare const ActivityStatus: {
11
10
  readonly Error: "error";
12
11
  readonly Info: "info";
13
12
  };
14
- /**
15
- * @see https://docs.vertracloud.app/api-reference/endpoint/activities
16
- */
13
+ /** Dashboard session only (not reachable with an API key). */
17
14
  type ActivityTargetType = "app" | "database" | "workspace" | "audit";
18
15
  declare const ActivityTargetType: {
19
16
  readonly App: "app";
@@ -21,18 +18,33 @@ declare const ActivityTargetType: {
21
18
  readonly Workspace: "workspace";
22
19
  readonly Audit: "audit";
23
20
  };
24
- /**
25
- * @see https://docs.vertracloud.app/api-reference/endpoint/activities
26
- */
21
+ /** Dashboard session only (not reachable with an API key). */
22
+ type ActivityOrigin = "user" | "agent" | "api_key" | "system" | "admin";
23
+ declare const ActivityOrigin: {
24
+ readonly User: "user";
25
+ readonly Agent: "agent";
26
+ readonly ApiKey: "api_key";
27
+ readonly System: "system";
28
+ readonly Admin: "admin";
29
+ };
30
+ /** Dashboard session only (not reachable with an API key). */
27
31
  interface APIActivity {
28
32
  id: SnowFlake;
29
33
  status: ActivityStatus;
30
34
  target_id: string;
31
35
  target_type: ActivityTargetType;
32
36
  author_id: SnowFlake | null;
37
+ /** Workspace the resource belonged to; `null` outside a workspace. */
38
+ workspace_id: SnowFlake | null;
39
+ /** Who generated the activity; `null` when `origin` has no human author (`system`). */
40
+ author: {
41
+ id: SnowFlake;
42
+ display_name: string;
43
+ } | null;
44
+ origin: ActivityOrigin;
33
45
  title: LocalizedContent;
34
46
  message: LocalizedContent;
35
47
  timestamp: ISODateString;
36
48
  }
37
49
 
38
- export { type APIActivity, ActivityStatus, ActivityTargetType };
50
+ export { type APIActivity, ActivityOrigin, ActivityStatus, ActivityTargetType };
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // payloads/v1/activity.ts
21
21
  var activity_exports = {};
22
22
  __export(activity_exports, {
23
+ ActivityOrigin: () => ActivityOrigin,
23
24
  ActivityStatus: () => ActivityStatus,
24
25
  ActivityTargetType: () => ActivityTargetType
25
26
  });
@@ -36,8 +37,16 @@ var ActivityTargetType = {
36
37
  Workspace: "workspace",
37
38
  Audit: "audit"
38
39
  };
40
+ var ActivityOrigin = {
41
+ User: "user",
42
+ Agent: "agent",
43
+ ApiKey: "api_key",
44
+ System: "system",
45
+ Admin: "admin"
46
+ };
39
47
  // Annotate the CommonJS export names for ESM import in node:
40
48
  0 && (module.exports = {
49
+ ActivityOrigin,
41
50
  ActivityStatus,
42
51
  ActivityTargetType
43
52
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["activity.ts"],"sourcesContent":["import type { ISODateString, SnowFlake } from \"../../v1\";\nimport type { LocalizedContent } from \"./notification\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/activities\n */\nexport type ActivityStatus = \"success\" | \"warning\" | \"error\" | \"info\";\nexport const ActivityStatus = {\n\tSuccess: \"success\",\n\tWarning: \"warning\",\n\tError: \"error\",\n\tInfo: \"info\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/activities\n */\nexport type ActivityTargetType = \"app\" | \"database\" | \"workspace\" | \"audit\";\nexport const ActivityTargetType = {\n\tApp: \"app\",\n\tDatabase: \"database\",\n\tWorkspace: \"workspace\",\n\tAudit: \"audit\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/activities\n */\nexport interface APIActivity {\n\tid: SnowFlake;\n\tstatus: ActivityStatus;\n\ttarget_id: string;\n\ttarget_type: ActivityTargetType;\n\tauthor_id: SnowFlake | null;\n\ttitle: LocalizedContent;\n\tmessage: LocalizedContent;\n\ttimestamp: ISODateString;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,IAAM,iBAAiB;AAAA,EAC7B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AACP;AAMO,IAAM,qBAAqB;AAAA,EACjC,KAAK;AAAA,EACL,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACR;","names":[]}
1
+ {"version":3,"sources":["activity.ts"],"sourcesContent":["import type { ISODateString, SnowFlake } from \"../../v1\";\nimport type { LocalizedContent } from \"./notification\";\n\n/** Dashboard session only (not reachable with an API key). */\nexport type ActivityStatus = \"success\" | \"warning\" | \"error\" | \"info\";\nexport const ActivityStatus = {\n\tSuccess: \"success\",\n\tWarning: \"warning\",\n\tError: \"error\",\n\tInfo: \"info\",\n} as const;\n\n/** Dashboard session only (not reachable with an API key). */\nexport type ActivityTargetType = \"app\" | \"database\" | \"workspace\" | \"audit\";\nexport const ActivityTargetType = {\n\tApp: \"app\",\n\tDatabase: \"database\",\n\tWorkspace: \"workspace\",\n\tAudit: \"audit\",\n} as const;\n\n/** Dashboard session only (not reachable with an API key). */\nexport type ActivityOrigin = \"user\" | \"agent\" | \"api_key\" | \"system\" | \"admin\";\nexport const ActivityOrigin = {\n\tUser: \"user\",\n\tAgent: \"agent\",\n\tApiKey: \"api_key\",\n\tSystem: \"system\",\n\tAdmin: \"admin\",\n} as const;\n\n/** Dashboard session only (not reachable with an API key). */\nexport interface APIActivity {\n\tid: SnowFlake;\n\tstatus: ActivityStatus;\n\ttarget_id: string;\n\ttarget_type: ActivityTargetType;\n\tauthor_id: SnowFlake | null;\n\t/** Workspace the resource belonged to; `null` outside a workspace. */\n\tworkspace_id: SnowFlake | null;\n\t/** Who generated the activity; `null` when `origin` has no human author (`system`). */\n\tauthor: { id: SnowFlake; display_name: string } | null;\n\torigin: ActivityOrigin;\n\ttitle: LocalizedContent;\n\tmessage: LocalizedContent;\n\ttimestamp: ISODateString;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,IAAM,iBAAiB;AAAA,EAC7B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AACP;AAIO,IAAM,qBAAqB;AAAA,EACjC,KAAK;AAAA,EACL,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACR;AAIO,IAAM,iBAAiB;AAAA,EAC7B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AACR;","names":[]}
@@ -11,7 +11,15 @@ var ActivityTargetType = {
11
11
  Workspace: "workspace",
12
12
  Audit: "audit"
13
13
  };
14
+ var ActivityOrigin = {
15
+ User: "user",
16
+ Agent: "agent",
17
+ ApiKey: "api_key",
18
+ System: "system",
19
+ Admin: "admin"
20
+ };
14
21
  export {
22
+ ActivityOrigin,
15
23
  ActivityStatus,
16
24
  ActivityTargetType
17
25
  };
@@ -0,0 +1,302 @@
1
+ /** Stable error sentinels returned by routes available to API keys. */
2
+ declare const API_ERROR_CODES: {
3
+ readonly WORKSPACE_NOT_FOUND: "WORKSPACE_NOT_FOUND";
4
+ readonly WORKSPACE_NAME_ALREADY_EXISTS: "WORKSPACE_NAME_ALREADY_EXISTS";
5
+ readonly WORKSPACE_MEMBER_LIMIT_REACHED: "WORKSPACE_MEMBER_LIMIT_REACHED";
6
+ readonly WORKSPACE_ROLE_LIMIT_REACHED: "WORKSPACE_ROLE_LIMIT_REACHED";
7
+ readonly WORKSPACE_ROLE_IN_USE: "WORKSPACE_ROLE_IN_USE";
8
+ readonly WORKSPACE_ROLE_NOT_FOUND: "WORKSPACE_ROLE_NOT_FOUND";
9
+ readonly WORKSPACE_ROLE_NAME_ALREADY_EXISTS: "WORKSPACE_ROLE_NAME_ALREADY_EXISTS";
10
+ readonly WORKSPACE_PERMISSION_DENIED: "WORKSPACE_PERMISSION_DENIED";
11
+ readonly WORKSPACE_PERMISSION_ESCALATION: "WORKSPACE_PERMISSION_ESCALATION";
12
+ readonly WORKSPACE_INVITE_NOT_FOUND: "WORKSPACE_INVITE_NOT_FOUND";
13
+ readonly WORKSPACE_INVITE_EXPIRED: "WORKSPACE_INVITE_EXPIRED";
14
+ readonly WORKSPACE_INVITE_EMAIL_MISMATCH: "WORKSPACE_INVITE_EMAIL_MISMATCH";
15
+ readonly WORKSPACE_OWNER_ONLY: "WORKSPACE_OWNER_ONLY";
16
+ readonly WORKSPACE_ACTION_REQUEST_NOT_FOUND: "WORKSPACE_ACTION_REQUEST_NOT_FOUND";
17
+ readonly WORKSPACE_ACTION_NOT_NEEDED: "WORKSPACE_ACTION_NOT_NEEDED";
18
+ readonly WORKSPACE_ACTION_INVALID_PARAMS: "WORKSPACE_ACTION_INVALID_PARAMS";
19
+ readonly WORKSPACE_ACTION_REQUEST_PENDING: "WORKSPACE_ACTION_REQUEST_PENDING";
20
+ readonly WORKSPACE_RESOURCE_FOLDER_NOT_FOUND: "WORKSPACE_RESOURCE_FOLDER_NOT_FOUND";
21
+ readonly WORKSPACE_RESOURCE_FOLDER_NAME_CONFLICT: "WORKSPACE_RESOURCE_FOLDER_NAME_CONFLICT";
22
+ readonly WORKSPACE_RESOURCE_NOT_FOUND: "WORKSPACE_RESOURCE_NOT_FOUND";
23
+ readonly PLAN_RESTRICTED_FEATURE: "PLAN_RESTRICTED_FEATURE";
24
+ readonly ACCESS_DENIED: "ACCESS_DENIED";
25
+ readonly API_KEY_INVALID: "API_KEY_INVALID";
26
+ readonly API_KEY_IP_DENIED: "API_KEY_IP_DENIED";
27
+ readonly API_KEY_SCOPE_DENIED: "API_KEY_SCOPE_DENIED";
28
+ readonly AUTH_TOKEN_MISSING: "AUTH_TOKEN_MISSING";
29
+ readonly ACCOUNT_BANNED: "ACCOUNT_BANNED";
30
+ readonly APP_SHIELD_COOLDOWN: "APP_SHIELD_COOLDOWN";
31
+ readonly APP_BANNED: "APP_BANNED";
32
+ readonly APP_ALREADY_PUBLISHED: "APP_ALREADY_PUBLISHED";
33
+ readonly APP_HAS_NO_SUBDOMAIN: "APP_HAS_NO_SUBDOMAIN";
34
+ readonly APP_NOT_FOUND: "APP_NOT_FOUND";
35
+ readonly APP_NOT_PUBLISHED: "APP_NOT_PUBLISHED";
36
+ readonly APP_ALREADY_IN_WORKSPACE: "APP_ALREADY_IN_WORKSPACE";
37
+ readonly APP_NOT_FOUND_IN_WORKSPACE: "APP_NOT_FOUND_IN_WORKSPACE";
38
+ readonly BUILD_FAILED: "BUILD_FAILED";
39
+ readonly BUILD_TIMEOUT: "BUILD_TIMEOUT";
40
+ readonly CERTIFICATE_NOT_FOUND: "CERTIFICATE_NOT_FOUND";
41
+ readonly CLEANUP_LANGUAGE_SAME_AS_CURRENT: "CLEANUP_LANGUAGE_SAME_AS_CURRENT";
42
+ readonly CONTAINER_ALREADY_RUNNING: "CONTAINER_ALREADY_RUNNING";
43
+ readonly CUSTOM_DOMAIN_RECORD_NOT_FOUND: "CUSTOM_DOMAIN_RECORD_NOT_FOUND";
44
+ readonly CUSTOM_DOMAIN_REGISTRATION_FAILED: "CUSTOM_DOMAIN_REGISTRATION_FAILED";
45
+ readonly DAILY_QUOTA_EXCEEDED: "DAILY_QUOTA_EXCEEDED";
46
+ readonly DATABASE_NOT_FOUND: "DATABASE_NOT_FOUND";
47
+ readonly DATABASE_NOT_RUNNING: "DATABASE_NOT_RUNNING";
48
+ readonly DATABASE_ALREADY_IN_WORKSPACE: "DATABASE_ALREADY_IN_WORKSPACE";
49
+ readonly DATABASE_NOT_FOUND_IN_WORKSPACE: "DATABASE_NOT_FOUND_IN_WORKSPACE";
50
+ readonly DATABASE_PERSISTENCE_FAILED: "DATABASE_PERSISTENCE_FAILED";
51
+ readonly DEPLOY_FAILED: "DEPLOY_FAILED";
52
+ readonly DEPLOYMENT_NOT_FOUND: "DEPLOYMENT_NOT_FOUND";
53
+ readonly DEPLOY_RATE_LIMITED: "DEPLOY_RATE_LIMITED";
54
+ readonly DOMAIN_ALREADY_IN_USE: "DOMAIN_ALREADY_IN_USE";
55
+ readonly ENV_LIMIT_EXCEEDED: "ENV_LIMIT_EXCEEDED";
56
+ readonly ENV_DUPLICATE_KEY: "ENV_DUPLICATE_KEY";
57
+ readonly ENV_NOT_FOUND: "ENV_NOT_FOUND";
58
+ readonly FILE_TOO_LARGE: "FILE_TOO_LARGE";
59
+ readonly FILE_MODIFIED: "FILE_MODIFIED";
60
+ readonly FILE_NOT_FOUND: "FILE_NOT_FOUND";
61
+ readonly FILE_OR_FOLDER_NOT_FOUND: "FILE_OR_FOLDER_NOT_FOUND";
62
+ readonly FORBIDDEN: "FORBIDDEN";
63
+ readonly FORBIDDEN_DOMAIN: "FORBIDDEN_DOMAIN";
64
+ readonly FORBIDDEN_PATH: "FORBIDDEN_PATH";
65
+ readonly FORBIDDEN_KEY: "FORBIDDEN_KEY";
66
+ readonly FORCED_SNAPSHOT_RATE_LIMIT: "FORCED_SNAPSHOT_RATE_LIMIT";
67
+ readonly FREE_PLAN_NO_WEB_PUBLISH: "FREE_PLAN_NO_WEB_PUBLISH";
68
+ readonly INSTALLATION_NOT_FOUND: "INSTALLATION_NOT_FOUND";
69
+ readonly INSTALL_SHIELD_BLOCKED: "INSTALL_SHIELD_BLOCKED";
70
+ readonly INSTALL_TIMEOUT: "INSTALL_TIMEOUT";
71
+ readonly INSTALL_FAILED: "INSTALL_FAILED";
72
+ readonly INSTALL_CANCELLED: "INSTALL_CANCELLED";
73
+ readonly INSTALL_OUT_OF_MEMORY: "INSTALL_OUT_OF_MEMORY";
74
+ readonly INSTALL_QUEUE_FULL: "INSTALL_QUEUE_FULL";
75
+ readonly INSUFFICIENT_MEMORY: "INSUFFICIENT_MEMORY";
76
+ readonly INTERNAL_SERVER_ERROR: "INTERNAL_SERVER_ERROR";
77
+ readonly INVALID_CONFIG: "INVALID_CONFIG";
78
+ readonly INVALID_CUSTOM_DOMAIN_FORMAT: "INVALID_CUSTOM_DOMAIN_FORMAT";
79
+ readonly INVALID_HOSTNAME_FOR_APP: "INVALID_HOSTNAME_FOR_APP";
80
+ readonly INVALID_LANGUAGE: "INVALID_LANGUAGE";
81
+ readonly INVALID_MEMORY_FORMAT: "INVALID_MEMORY_FORMAT";
82
+ readonly INVALID_MONTHS: "INVALID_MONTHS";
83
+ readonly INVALID_OR_EXPIRED_CODE: "INVALID_OR_EXPIRED_CODE";
84
+ readonly INVALID_PARAMS: "INVALID_PARAMS";
85
+ readonly INVALID_PAYLOAD: "INVALID_PAYLOAD";
86
+ readonly INVALID_PATH: "INVALID_PATH";
87
+ readonly INVALID_PLAN: "INVALID_PLAN";
88
+ readonly INVALID_PLAN_NAME: "INVALID_PLAN_NAME";
89
+ readonly INVALID_RAM_LIMIT: "INVALID_RAM_LIMIT";
90
+ readonly INVALID_RANGE: "INVALID_RANGE";
91
+ readonly INVALID_SUBDOMAIN_FORMAT: "INVALID_SUBDOMAIN_FORMAT";
92
+ readonly INVALID_ZIP: "INVALID_ZIP";
93
+ readonly INVALID_ZIP_STRUCTURE: "INVALID_ZIP_STRUCTURE";
94
+ readonly MAIN_FILE_NOT_FOUND: "MAIN_FILE_NOT_FOUND";
95
+ readonly MAX_APPS_REACHED: "MAX_APPS_REACHED";
96
+ readonly MAX_DATABASES_REACHED: "MAX_DATABASES_REACHED";
97
+ readonly MEMORY_BELOW_MINIMUM: "MEMORY_BELOW_MINIMUM";
98
+ readonly MEMORY_LIMIT_EXCEEDED: "MEMORY_LIMIT_EXCEEDED";
99
+ readonly MEMORY_MUST_BE_INTEGER: "MEMORY_MUST_BE_INTEGER";
100
+ readonly MEMORY_REQUIRED: "MEMORY_REQUIRED";
101
+ readonly MISSING_HEADERS: "MISSING_HEADERS";
102
+ readonly MISSING_PLAN_OR_MONTHS: "MISSING_PLAN_OR_MONTHS";
103
+ readonly MISSING_CONTENT: "MISSING_CONTENT";
104
+ readonly NOT_AN_UPGRADE: "NOT_AN_UPGRADE";
105
+ readonly NO_AUTHORIZED_PATHS: "NO_AUTHORIZED_PATHS";
106
+ readonly NO_CHANGES_PROVIDED: "NO_CHANGES_PROVIDED";
107
+ readonly NO_CUSTOM_DOMAIN: "NO_CUSTOM_DOMAIN";
108
+ readonly NO_FIELDS_TO_UPDATE: "NO_FIELDS_TO_UPDATE";
109
+ readonly NO_FILE_UPLOADED: "NO_FILE_UPLOADED";
110
+ readonly OPERATION_IN_PROGRESS: "OPERATION_IN_PROGRESS";
111
+ readonly ORDER_NOT_FOUND: "ORDER_NOT_FOUND";
112
+ readonly ORDER_NOT_PAID: "ORDER_NOT_PAID";
113
+ readonly ORDER_NOT_PAYABLE: "ORDER_NOT_PAYABLE";
114
+ readonly ORDER_NOT_REFUNDED: "ORDER_NOT_REFUNDED";
115
+ readonly OWNER_APP_WITHOUT_LIMITS: "OWNER_APP_WITHOUT_LIMITS";
116
+ readonly PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
117
+ readonly PENDING_ORDER_LIMIT_REACHED: "PENDING_ORDER_LIMIT_REACHED";
118
+ readonly PLAN_DOES_NOT_SUPPORT_CUSTOM_DOMAIN: "PLAN_DOES_NOT_SUPPORT_CUSTOM_DOMAIN";
119
+ readonly PLAN_DOES_NOT_SUPPORT_CUSTOM_SUBDOMAIN: "PLAN_DOES_NOT_SUPPORT_CUSTOM_SUBDOMAIN";
120
+ readonly PLAN_DOES_NOT_SUPPORT_WEB_PUBLISH: "PLAN_DOES_NOT_SUPPORT_WEB_PUBLISH";
121
+ readonly PLAN_MISMATCH_FOR_RENEWAL: "PLAN_MISMATCH_FOR_RENEWAL";
122
+ readonly PLAN_NOT_ALLOWED: "PLAN_NOT_ALLOWED";
123
+ readonly RATE_LIMIT_EXCEEDED: "RATE_LIMIT_EXCEEDED";
124
+ readonly REFUND_AMOUNT_EXCEEDS_PRICE: "REFUND_AMOUNT_EXCEEDS_PRICE";
125
+ readonly REPO_ALREADY_LINKED: "REPO_ALREADY_LINKED";
126
+ readonly RESTORE_COOLDOWN: "RESTORE_COOLDOWN";
127
+ readonly SNAPSHOT_ENGINE_MISMATCH: "SNAPSHOT_ENGINE_MISMATCH";
128
+ readonly SNAPSHOT_IMPORT_FAILED: "SNAPSHOT_IMPORT_FAILED";
129
+ readonly SNAPSHOT_NOT_FOUND: "SNAPSHOT_NOT_FOUND";
130
+ readonly SNAPSHOT_RATE_LIMITED: "SNAPSHOT_RATE_LIMITED";
131
+ readonly SNAPSHOT_TYPE_MISMATCH: "SNAPSHOT_TYPE_MISMATCH";
132
+ readonly SNAPSHOT_TOO_LARGE: "SNAPSHOT_TOO_LARGE";
133
+ readonly SOURCE_CONFLICT: "SOURCE_CONFLICT";
134
+ readonly SOURCE_REQUIRED: "SOURCE_REQUIRED";
135
+ readonly STORAGE_ABOVE_NEW_LIMIT: "STORAGE_ABOVE_NEW_LIMIT";
136
+ readonly SUBDOMAIN_ALREADY_IN_USE: "SUBDOMAIN_ALREADY_IN_USE";
137
+ readonly SUBDOMAIN_CHANGE_RATE_LIMITED: "SUBDOMAIN_CHANGE_RATE_LIMITED";
138
+ readonly SUBDOMAIN_FORBIDDEN: "SUBDOMAIN_FORBIDDEN";
139
+ readonly SUBDOMAIN_TAKEN: "SUBDOMAIN_TAKEN";
140
+ readonly TYPE_MISMATCH: "TYPE_MISMATCH";
141
+ readonly USER_LIMITS_NOT_FOUND: "USER_LIMITS_NOT_FOUND";
142
+ readonly USER_NOT_FOUND: "USER_NOT_FOUND";
143
+ readonly USER_NOT_IN_WORKSPACE: "USER_NOT_IN_WORKSPACE";
144
+ readonly DATABASE_BANNED: "DATABASE_BANNED";
145
+ readonly VALIDATION_ERROR: "VALIDATION_ERROR";
146
+ readonly ZIP_TOO_LARGE: "ZIP_TOO_LARGE";
147
+ readonly ZIP_TOO_SMALL: "ZIP_TOO_SMALL";
148
+ readonly STORAGE_FULL: "STORAGE_FULL";
149
+ readonly TARGET_IS_DIRECTORY: "TARGET_IS_DIRECTORY";
150
+ };
151
+ declare const APIErrorCode: {
152
+ readonly WORKSPACE_NOT_FOUND: "WORKSPACE_NOT_FOUND";
153
+ readonly WORKSPACE_NAME_ALREADY_EXISTS: "WORKSPACE_NAME_ALREADY_EXISTS";
154
+ readonly WORKSPACE_MEMBER_LIMIT_REACHED: "WORKSPACE_MEMBER_LIMIT_REACHED";
155
+ readonly WORKSPACE_ROLE_LIMIT_REACHED: "WORKSPACE_ROLE_LIMIT_REACHED";
156
+ readonly WORKSPACE_ROLE_IN_USE: "WORKSPACE_ROLE_IN_USE";
157
+ readonly WORKSPACE_ROLE_NOT_FOUND: "WORKSPACE_ROLE_NOT_FOUND";
158
+ readonly WORKSPACE_ROLE_NAME_ALREADY_EXISTS: "WORKSPACE_ROLE_NAME_ALREADY_EXISTS";
159
+ readonly WORKSPACE_PERMISSION_DENIED: "WORKSPACE_PERMISSION_DENIED";
160
+ readonly WORKSPACE_PERMISSION_ESCALATION: "WORKSPACE_PERMISSION_ESCALATION";
161
+ readonly WORKSPACE_INVITE_NOT_FOUND: "WORKSPACE_INVITE_NOT_FOUND";
162
+ readonly WORKSPACE_INVITE_EXPIRED: "WORKSPACE_INVITE_EXPIRED";
163
+ readonly WORKSPACE_INVITE_EMAIL_MISMATCH: "WORKSPACE_INVITE_EMAIL_MISMATCH";
164
+ readonly WORKSPACE_OWNER_ONLY: "WORKSPACE_OWNER_ONLY";
165
+ readonly WORKSPACE_ACTION_REQUEST_NOT_FOUND: "WORKSPACE_ACTION_REQUEST_NOT_FOUND";
166
+ readonly WORKSPACE_ACTION_NOT_NEEDED: "WORKSPACE_ACTION_NOT_NEEDED";
167
+ readonly WORKSPACE_ACTION_INVALID_PARAMS: "WORKSPACE_ACTION_INVALID_PARAMS";
168
+ readonly WORKSPACE_ACTION_REQUEST_PENDING: "WORKSPACE_ACTION_REQUEST_PENDING";
169
+ readonly WORKSPACE_RESOURCE_FOLDER_NOT_FOUND: "WORKSPACE_RESOURCE_FOLDER_NOT_FOUND";
170
+ readonly WORKSPACE_RESOURCE_FOLDER_NAME_CONFLICT: "WORKSPACE_RESOURCE_FOLDER_NAME_CONFLICT";
171
+ readonly WORKSPACE_RESOURCE_NOT_FOUND: "WORKSPACE_RESOURCE_NOT_FOUND";
172
+ readonly PLAN_RESTRICTED_FEATURE: "PLAN_RESTRICTED_FEATURE";
173
+ readonly ACCESS_DENIED: "ACCESS_DENIED";
174
+ readonly API_KEY_INVALID: "API_KEY_INVALID";
175
+ readonly API_KEY_IP_DENIED: "API_KEY_IP_DENIED";
176
+ readonly API_KEY_SCOPE_DENIED: "API_KEY_SCOPE_DENIED";
177
+ readonly AUTH_TOKEN_MISSING: "AUTH_TOKEN_MISSING";
178
+ readonly ACCOUNT_BANNED: "ACCOUNT_BANNED";
179
+ readonly APP_SHIELD_COOLDOWN: "APP_SHIELD_COOLDOWN";
180
+ readonly APP_BANNED: "APP_BANNED";
181
+ readonly APP_ALREADY_PUBLISHED: "APP_ALREADY_PUBLISHED";
182
+ readonly APP_HAS_NO_SUBDOMAIN: "APP_HAS_NO_SUBDOMAIN";
183
+ readonly APP_NOT_FOUND: "APP_NOT_FOUND";
184
+ readonly APP_NOT_PUBLISHED: "APP_NOT_PUBLISHED";
185
+ readonly APP_ALREADY_IN_WORKSPACE: "APP_ALREADY_IN_WORKSPACE";
186
+ readonly APP_NOT_FOUND_IN_WORKSPACE: "APP_NOT_FOUND_IN_WORKSPACE";
187
+ readonly BUILD_FAILED: "BUILD_FAILED";
188
+ readonly BUILD_TIMEOUT: "BUILD_TIMEOUT";
189
+ readonly CERTIFICATE_NOT_FOUND: "CERTIFICATE_NOT_FOUND";
190
+ readonly CLEANUP_LANGUAGE_SAME_AS_CURRENT: "CLEANUP_LANGUAGE_SAME_AS_CURRENT";
191
+ readonly CONTAINER_ALREADY_RUNNING: "CONTAINER_ALREADY_RUNNING";
192
+ readonly CUSTOM_DOMAIN_RECORD_NOT_FOUND: "CUSTOM_DOMAIN_RECORD_NOT_FOUND";
193
+ readonly CUSTOM_DOMAIN_REGISTRATION_FAILED: "CUSTOM_DOMAIN_REGISTRATION_FAILED";
194
+ readonly DAILY_QUOTA_EXCEEDED: "DAILY_QUOTA_EXCEEDED";
195
+ readonly DATABASE_NOT_FOUND: "DATABASE_NOT_FOUND";
196
+ readonly DATABASE_NOT_RUNNING: "DATABASE_NOT_RUNNING";
197
+ readonly DATABASE_ALREADY_IN_WORKSPACE: "DATABASE_ALREADY_IN_WORKSPACE";
198
+ readonly DATABASE_NOT_FOUND_IN_WORKSPACE: "DATABASE_NOT_FOUND_IN_WORKSPACE";
199
+ readonly DATABASE_PERSISTENCE_FAILED: "DATABASE_PERSISTENCE_FAILED";
200
+ readonly DEPLOY_FAILED: "DEPLOY_FAILED";
201
+ readonly DEPLOYMENT_NOT_FOUND: "DEPLOYMENT_NOT_FOUND";
202
+ readonly DEPLOY_RATE_LIMITED: "DEPLOY_RATE_LIMITED";
203
+ readonly DOMAIN_ALREADY_IN_USE: "DOMAIN_ALREADY_IN_USE";
204
+ readonly ENV_LIMIT_EXCEEDED: "ENV_LIMIT_EXCEEDED";
205
+ readonly ENV_DUPLICATE_KEY: "ENV_DUPLICATE_KEY";
206
+ readonly ENV_NOT_FOUND: "ENV_NOT_FOUND";
207
+ readonly FILE_TOO_LARGE: "FILE_TOO_LARGE";
208
+ readonly FILE_MODIFIED: "FILE_MODIFIED";
209
+ readonly FILE_NOT_FOUND: "FILE_NOT_FOUND";
210
+ readonly FILE_OR_FOLDER_NOT_FOUND: "FILE_OR_FOLDER_NOT_FOUND";
211
+ readonly FORBIDDEN: "FORBIDDEN";
212
+ readonly FORBIDDEN_DOMAIN: "FORBIDDEN_DOMAIN";
213
+ readonly FORBIDDEN_PATH: "FORBIDDEN_PATH";
214
+ readonly FORBIDDEN_KEY: "FORBIDDEN_KEY";
215
+ readonly FORCED_SNAPSHOT_RATE_LIMIT: "FORCED_SNAPSHOT_RATE_LIMIT";
216
+ readonly FREE_PLAN_NO_WEB_PUBLISH: "FREE_PLAN_NO_WEB_PUBLISH";
217
+ readonly INSTALLATION_NOT_FOUND: "INSTALLATION_NOT_FOUND";
218
+ readonly INSTALL_SHIELD_BLOCKED: "INSTALL_SHIELD_BLOCKED";
219
+ readonly INSTALL_TIMEOUT: "INSTALL_TIMEOUT";
220
+ readonly INSTALL_FAILED: "INSTALL_FAILED";
221
+ readonly INSTALL_CANCELLED: "INSTALL_CANCELLED";
222
+ readonly INSTALL_OUT_OF_MEMORY: "INSTALL_OUT_OF_MEMORY";
223
+ readonly INSTALL_QUEUE_FULL: "INSTALL_QUEUE_FULL";
224
+ readonly INSUFFICIENT_MEMORY: "INSUFFICIENT_MEMORY";
225
+ readonly INTERNAL_SERVER_ERROR: "INTERNAL_SERVER_ERROR";
226
+ readonly INVALID_CONFIG: "INVALID_CONFIG";
227
+ readonly INVALID_CUSTOM_DOMAIN_FORMAT: "INVALID_CUSTOM_DOMAIN_FORMAT";
228
+ readonly INVALID_HOSTNAME_FOR_APP: "INVALID_HOSTNAME_FOR_APP";
229
+ readonly INVALID_LANGUAGE: "INVALID_LANGUAGE";
230
+ readonly INVALID_MEMORY_FORMAT: "INVALID_MEMORY_FORMAT";
231
+ readonly INVALID_MONTHS: "INVALID_MONTHS";
232
+ readonly INVALID_OR_EXPIRED_CODE: "INVALID_OR_EXPIRED_CODE";
233
+ readonly INVALID_PARAMS: "INVALID_PARAMS";
234
+ readonly INVALID_PAYLOAD: "INVALID_PAYLOAD";
235
+ readonly INVALID_PATH: "INVALID_PATH";
236
+ readonly INVALID_PLAN: "INVALID_PLAN";
237
+ readonly INVALID_PLAN_NAME: "INVALID_PLAN_NAME";
238
+ readonly INVALID_RAM_LIMIT: "INVALID_RAM_LIMIT";
239
+ readonly INVALID_RANGE: "INVALID_RANGE";
240
+ readonly INVALID_SUBDOMAIN_FORMAT: "INVALID_SUBDOMAIN_FORMAT";
241
+ readonly INVALID_ZIP: "INVALID_ZIP";
242
+ readonly INVALID_ZIP_STRUCTURE: "INVALID_ZIP_STRUCTURE";
243
+ readonly MAIN_FILE_NOT_FOUND: "MAIN_FILE_NOT_FOUND";
244
+ readonly MAX_APPS_REACHED: "MAX_APPS_REACHED";
245
+ readonly MAX_DATABASES_REACHED: "MAX_DATABASES_REACHED";
246
+ readonly MEMORY_BELOW_MINIMUM: "MEMORY_BELOW_MINIMUM";
247
+ readonly MEMORY_LIMIT_EXCEEDED: "MEMORY_LIMIT_EXCEEDED";
248
+ readonly MEMORY_MUST_BE_INTEGER: "MEMORY_MUST_BE_INTEGER";
249
+ readonly MEMORY_REQUIRED: "MEMORY_REQUIRED";
250
+ readonly MISSING_HEADERS: "MISSING_HEADERS";
251
+ readonly MISSING_PLAN_OR_MONTHS: "MISSING_PLAN_OR_MONTHS";
252
+ readonly MISSING_CONTENT: "MISSING_CONTENT";
253
+ readonly NOT_AN_UPGRADE: "NOT_AN_UPGRADE";
254
+ readonly NO_AUTHORIZED_PATHS: "NO_AUTHORIZED_PATHS";
255
+ readonly NO_CHANGES_PROVIDED: "NO_CHANGES_PROVIDED";
256
+ readonly NO_CUSTOM_DOMAIN: "NO_CUSTOM_DOMAIN";
257
+ readonly NO_FIELDS_TO_UPDATE: "NO_FIELDS_TO_UPDATE";
258
+ readonly NO_FILE_UPLOADED: "NO_FILE_UPLOADED";
259
+ readonly OPERATION_IN_PROGRESS: "OPERATION_IN_PROGRESS";
260
+ readonly ORDER_NOT_FOUND: "ORDER_NOT_FOUND";
261
+ readonly ORDER_NOT_PAID: "ORDER_NOT_PAID";
262
+ readonly ORDER_NOT_PAYABLE: "ORDER_NOT_PAYABLE";
263
+ readonly ORDER_NOT_REFUNDED: "ORDER_NOT_REFUNDED";
264
+ readonly OWNER_APP_WITHOUT_LIMITS: "OWNER_APP_WITHOUT_LIMITS";
265
+ readonly PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
266
+ readonly PENDING_ORDER_LIMIT_REACHED: "PENDING_ORDER_LIMIT_REACHED";
267
+ readonly PLAN_DOES_NOT_SUPPORT_CUSTOM_DOMAIN: "PLAN_DOES_NOT_SUPPORT_CUSTOM_DOMAIN";
268
+ readonly PLAN_DOES_NOT_SUPPORT_CUSTOM_SUBDOMAIN: "PLAN_DOES_NOT_SUPPORT_CUSTOM_SUBDOMAIN";
269
+ readonly PLAN_DOES_NOT_SUPPORT_WEB_PUBLISH: "PLAN_DOES_NOT_SUPPORT_WEB_PUBLISH";
270
+ readonly PLAN_MISMATCH_FOR_RENEWAL: "PLAN_MISMATCH_FOR_RENEWAL";
271
+ readonly PLAN_NOT_ALLOWED: "PLAN_NOT_ALLOWED";
272
+ readonly RATE_LIMIT_EXCEEDED: "RATE_LIMIT_EXCEEDED";
273
+ readonly REFUND_AMOUNT_EXCEEDS_PRICE: "REFUND_AMOUNT_EXCEEDS_PRICE";
274
+ readonly REPO_ALREADY_LINKED: "REPO_ALREADY_LINKED";
275
+ readonly RESTORE_COOLDOWN: "RESTORE_COOLDOWN";
276
+ readonly SNAPSHOT_ENGINE_MISMATCH: "SNAPSHOT_ENGINE_MISMATCH";
277
+ readonly SNAPSHOT_IMPORT_FAILED: "SNAPSHOT_IMPORT_FAILED";
278
+ readonly SNAPSHOT_NOT_FOUND: "SNAPSHOT_NOT_FOUND";
279
+ readonly SNAPSHOT_RATE_LIMITED: "SNAPSHOT_RATE_LIMITED";
280
+ readonly SNAPSHOT_TYPE_MISMATCH: "SNAPSHOT_TYPE_MISMATCH";
281
+ readonly SNAPSHOT_TOO_LARGE: "SNAPSHOT_TOO_LARGE";
282
+ readonly SOURCE_CONFLICT: "SOURCE_CONFLICT";
283
+ readonly SOURCE_REQUIRED: "SOURCE_REQUIRED";
284
+ readonly STORAGE_ABOVE_NEW_LIMIT: "STORAGE_ABOVE_NEW_LIMIT";
285
+ readonly SUBDOMAIN_ALREADY_IN_USE: "SUBDOMAIN_ALREADY_IN_USE";
286
+ readonly SUBDOMAIN_CHANGE_RATE_LIMITED: "SUBDOMAIN_CHANGE_RATE_LIMITED";
287
+ readonly SUBDOMAIN_FORBIDDEN: "SUBDOMAIN_FORBIDDEN";
288
+ readonly SUBDOMAIN_TAKEN: "SUBDOMAIN_TAKEN";
289
+ readonly TYPE_MISMATCH: "TYPE_MISMATCH";
290
+ readonly USER_LIMITS_NOT_FOUND: "USER_LIMITS_NOT_FOUND";
291
+ readonly USER_NOT_FOUND: "USER_NOT_FOUND";
292
+ readonly USER_NOT_IN_WORKSPACE: "USER_NOT_IN_WORKSPACE";
293
+ readonly DATABASE_BANNED: "DATABASE_BANNED";
294
+ readonly VALIDATION_ERROR: "VALIDATION_ERROR";
295
+ readonly ZIP_TOO_LARGE: "ZIP_TOO_LARGE";
296
+ readonly ZIP_TOO_SMALL: "ZIP_TOO_SMALL";
297
+ readonly STORAGE_FULL: "STORAGE_FULL";
298
+ readonly TARGET_IS_DIRECTORY: "TARGET_IS_DIRECTORY";
299
+ };
300
+ type APIErrorCode = (typeof API_ERROR_CODES)[keyof typeof API_ERROR_CODES];
301
+
302
+ export { APIErrorCode, API_ERROR_CODES };