@vertracloud/api-types 0.0.1

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 (71) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +65 -0
  3. package/common/v1.d.ts +33 -0
  4. package/common/v1.js +19 -0
  5. package/common/v1.js.map +1 -0
  6. package/common/v1.mjs +1 -0
  7. package/package.json +67 -0
  8. package/payloads/v1/activity.d.ts +37 -0
  9. package/payloads/v1/activity.js +44 -0
  10. package/payloads/v1/activity.js.map +1 -0
  11. package/payloads/v1/activity.mjs +18 -0
  12. package/payloads/v1/application.d.ts +202 -0
  13. package/payloads/v1/application.js +76 -0
  14. package/payloads/v1/application.js.map +1 -0
  15. package/payloads/v1/application.mjs +44 -0
  16. package/payloads/v1/database.d.ts +3 -0
  17. package/payloads/v1/database.js +46 -0
  18. package/payloads/v1/database.js.map +1 -0
  19. package/payloads/v1/database.mjs +19 -0
  20. package/payloads/v1/index.d.ts +6 -0
  21. package/payloads/v1/index.js +173 -0
  22. package/payloads/v1/index.js.map +1 -0
  23. package/payloads/v1/index.mjs +129 -0
  24. package/payloads/v1/organization.d.ts +45 -0
  25. package/payloads/v1/organization.js +37 -0
  26. package/payloads/v1/organization.js.map +1 -0
  27. package/payloads/v1/organization.mjs +12 -0
  28. package/payloads/v1/status.d.ts +42 -0
  29. package/payloads/v1/status.js +42 -0
  30. package/payloads/v1/status.js.map +1 -0
  31. package/payloads/v1/status.mjs +16 -0
  32. package/payloads/v1/user.d.ts +3 -0
  33. package/payloads/v1/user.js +56 -0
  34. package/payloads/v1/user.js.map +1 -0
  35. package/payloads/v1/user.mjs +30 -0
  36. package/rest/v1/activity.d.ts +13 -0
  37. package/rest/v1/activity.js +19 -0
  38. package/rest/v1/activity.js.map +1 -0
  39. package/rest/v1/activity.mjs +1 -0
  40. package/rest/v1/application.d.ts +61 -0
  41. package/rest/v1/application.js +19 -0
  42. package/rest/v1/application.js.map +1 -0
  43. package/rest/v1/application.mjs +1 -0
  44. package/rest/v1/database.d.ts +38 -0
  45. package/rest/v1/database.js +19 -0
  46. package/rest/v1/database.js.map +1 -0
  47. package/rest/v1/database.mjs +1 -0
  48. package/rest/v1/index.d.ts +10 -0
  49. package/rest/v1/index.js +19 -0
  50. package/rest/v1/index.js.map +1 -0
  51. package/rest/v1/index.mjs +1 -0
  52. package/rest/v1/organization.d.ts +15 -0
  53. package/rest/v1/organization.js +19 -0
  54. package/rest/v1/organization.js.map +1 -0
  55. package/rest/v1/organization.mjs +1 -0
  56. package/rest/v1/status.d.ts +9 -0
  57. package/rest/v1/status.js +19 -0
  58. package/rest/v1/status.js.map +1 -0
  59. package/rest/v1/status.mjs +1 -0
  60. package/rest/v1/user.d.ts +14 -0
  61. package/rest/v1/user.js +19 -0
  62. package/rest/v1/user.js.map +1 -0
  63. package/rest/v1/user.mjs +1 -0
  64. package/utils.d.ts +8 -0
  65. package/utils.js +19 -0
  66. package/utils.js.map +1 -0
  67. package/utils.mjs +1 -0
  68. package/v1.d.ts +12 -0
  69. package/v1.js +173 -0
  70. package/v1.js.map +1 -0
  71. package/v1.mjs +129 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 VertraCloud
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # @vertracloud/api-types
2
+
3
+ Simple type definitions for the **VertraCloud API**.
4
+
5
+ [![GitHub](https://img.shields.io/github/license/vertracloud/api-types)](https://github.com/vertracloud/api-types/main/LICENSE)
6
+ [![npm](https://img.shields.io/npm/v/api-types?color=crimson&logo=npm)](https://www.npmjs.com/package/@vertracloud/api-types)
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install @vertracloud/api-types
12
+ // or
13
+ yarn add @vertracloud/api-types
14
+ // or
15
+ pnpm add @vertracloud/api-types
16
+ ```
17
+
18
+ ## Getting Started
19
+
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:
21
+
22
+ ```ts
23
+ // Importing type definitions for version 1
24
+ import { APIUser, APIDatabase, APIApplication } from '@vertracloud/api-types/v1';
25
+ ```
26
+
27
+ You can also import only the specific types you need:
28
+
29
+ ```ts
30
+ // Importing only the APIUser type from version 1
31
+ import { APIUser } from '@vertracloud/api-types/v1';
32
+ ```
33
+
34
+ > ***Note:** The versioned exports (`@vertracloud/api-types/v*`) include relevant types for `user`, `database`, as well as additional utilities and helpers.*
35
+
36
+ ## Project Structure
37
+
38
+ The exported types for each API version are organized into two main categories:
39
+
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.
42
+
43
+ REST types follow a specific naming convention:
44
+
45
+ ```
46
+ REST<HTTP Method><Action><Type>
47
+ ```
48
+
49
+ Where:
50
+
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`)
54
+
55
+ ### Examples
56
+
57
+ * `RESTPostAPIApplicationCreateBody`: request payload for creating a app.
58
+ * `RESTGetAPIApplicationResponse`: expected response when retrieving a app.
59
+
60
+ If a type name ends with `Response`, it refers to the structure returned by the API for that route.
61
+
62
+ This separation provides a clear distinction between:
63
+
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)
package/common/v1.d.ts ADDED
@@ -0,0 +1,33 @@
1
+ type APIPayloadStatus = "error" | "success";
2
+ type SnowFlake = string;
3
+ interface APIPayload<TResponse> {
4
+ status: APIPayloadStatus;
5
+ response: TResponse;
6
+ code?: string;
7
+ }
8
+ interface APIPayloadStatusOnly {
9
+ status: APIPayloadStatus;
10
+ }
11
+ interface APIPaginatedPayload<TResponse> {
12
+ status: APIPayloadStatus;
13
+ response: TResponse;
14
+ meta?: PaginationMeta;
15
+ }
16
+ interface APIHeaders {
17
+ Authorization: string;
18
+ }
19
+ type DeepPartial<T> = T extends object ? {
20
+ [P in keyof T]?: DeepPartial<T[P]>;
21
+ } : T;
22
+ type APIVersion<TVersion extends number> = `v${TVersion}`;
23
+ type ISODateString = string;
24
+ interface PaginationMeta {
25
+ total_count: number;
26
+ page: number;
27
+ limit: number;
28
+ total_pages: number;
29
+ has_next_page: boolean;
30
+ has_previous_page: boolean;
31
+ }
32
+
33
+ export type { APIHeaders, APIPaginatedPayload, APIPayload, APIPayloadStatus, APIPayloadStatusOnly, APIVersion, DeepPartial, ISODateString, PaginationMeta, SnowFlake };
package/common/v1.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // common/v1.ts
17
+ var v1_exports = {};
18
+ module.exports = __toCommonJS(v1_exports);
19
+ //# sourceMappingURL=v1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["v1.ts"],"sourcesContent":["export type APIPayloadStatus = \"error\" | \"success\";\n\nexport type SnowFlake = string;\n\nexport interface APIPayload<TResponse> {\n\tstatus: APIPayloadStatus;\n\tresponse: TResponse;\n\tcode?: string;\n}\n\nexport interface APIPayloadStatusOnly {\n\tstatus: APIPayloadStatus;\n}\n\nexport interface APIPaginatedPayload<TResponse> {\n\tstatus: APIPayloadStatus;\n\tresponse: TResponse;\n\tmeta?: PaginationMeta;\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 interface PaginationMeta {\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"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/common/v1.mjs ADDED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=v1.mjs.map
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@vertracloud/api-types",
3
+ "version": "0.0.1",
4
+ "private": false,
5
+ "description": "Typings for Vertra Cloud API",
6
+ "homepage": "https://github.com/vertracloud/api-types#readme",
7
+ "exports": {
8
+ "./v*": {
9
+ "types": "./v*.d.ts",
10
+ "require": "./v*.js",
11
+ "import": "./v*.mjs"
12
+ },
13
+ "./utils": {
14
+ "types": "./utils.d.ts",
15
+ "require": "./utils.js",
16
+ "import": "./utils.mjs"
17
+ },
18
+ "./common/v*": {
19
+ "types": "./common/v*.d.ts",
20
+ "require": "./common/v*.js",
21
+ "import": "./common/v*.mjs"
22
+ },
23
+ "./payloads/v*": {
24
+ "types": "./payloads/v*/index.d.ts",
25
+ "require": "./payloads/v*/index.js",
26
+ "import": "./payloads/v*/index.mjs"
27
+ },
28
+ "./rest/v*": {
29
+ "types": "./rest/v*/index.d.ts",
30
+ "require": "./rest/v*/index.js",
31
+ "import": "./rest/v*/index.mjs"
32
+ }
33
+ },
34
+ "scripts": {
35
+ "build": "run-s lint tsc",
36
+ "clean": "rimraf {common,payloads,rest}/**/*.{*js,d.*ts,*map} {utils,v*}.{*js,d.*ts,*map}",
37
+ "lint": "biome check --fix .",
38
+ "tsc": "tsup",
39
+ "check-types": "tsc --noEmit",
40
+ "prepublishOnly": "run-s clean lint build",
41
+ "postpublish": "npm run clean",
42
+ "release": "npm run build && changeset publish"
43
+ },
44
+ "license": "MIT",
45
+ "files": [
46
+ "{common,payloads,rest}/**/*.{js,js.map,d.ts,d.ts.map,mjs}",
47
+ "{utils,v*}.{js,js.map,d.ts,d.ts.map,mjs}"
48
+ ],
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/vertracloud/api-types.git"
52
+ },
53
+ "keywords": ["api", "vertracloud", "vertra cloud api", "vertra", "types"],
54
+ "author": "Eydrenn Araujo",
55
+ "bugs": {
56
+ "url": "https://github.com/vertracloud/api-types/issues"
57
+ },
58
+ "devDependencies": {
59
+ "@biomejs/biome": "^1.9.4",
60
+ "@changesets/cli": "^2.27.10",
61
+ "@types/node": "^22.10.1",
62
+ "npm-run-all": "^4.1.5",
63
+ "rimraf": "3.0.2",
64
+ "tsup": "^8.3.5",
65
+ "typescript": "^5.7.2"
66
+ }
67
+ }
@@ -0,0 +1,37 @@
1
+ import { SnowFlake, ISODateString } from '../../common/v1.js';
2
+
3
+ /**
4
+ * @see https://docs.vertracloud.com/api-reference/endpoint/activities
5
+ */
6
+ type ActivityStatus = "success" | "warning" | "error" | "info";
7
+ declare const ActivityStatus: {
8
+ readonly Success: "success";
9
+ readonly Warning: "warning";
10
+ readonly Error: "error";
11
+ readonly Info: "info";
12
+ };
13
+ /**
14
+ * @see https://docs.vertracloud.com/api-reference/endpoint/activities
15
+ */
16
+ type ActivityTargetType = "app" | "database" | "organization" | "audit";
17
+ declare const ActivityTargetType: {
18
+ readonly App: "app";
19
+ readonly Database: "database";
20
+ readonly Organization: "organization";
21
+ readonly Audit: "audit";
22
+ };
23
+ /**
24
+ * @see https://docs.vertracloud.com/api-reference/endpoint/activities
25
+ */
26
+ interface APIActivity {
27
+ id: SnowFlake;
28
+ status: ActivityStatus;
29
+ target_id: string;
30
+ target_type: ActivityTargetType;
31
+ author_id: SnowFlake | null;
32
+ title: string;
33
+ message: string;
34
+ timestamp: ISODateString;
35
+ }
36
+
37
+ export { type APIActivity, ActivityStatus, ActivityTargetType };
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // payloads/v1/activity.ts
21
+ var activity_exports = {};
22
+ __export(activity_exports, {
23
+ ActivityStatus: () => ActivityStatus,
24
+ ActivityTargetType: () => ActivityTargetType
25
+ });
26
+ module.exports = __toCommonJS(activity_exports);
27
+ var ActivityStatus = {
28
+ Success: "success",
29
+ Warning: "warning",
30
+ Error: "error",
31
+ Info: "info"
32
+ };
33
+ var ActivityTargetType = {
34
+ App: "app",
35
+ Database: "database",
36
+ Organization: "organization",
37
+ Audit: "audit"
38
+ };
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
41
+ ActivityStatus,
42
+ ActivityTargetType
43
+ });
44
+ //# sourceMappingURL=activity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["activity.ts"],"sourcesContent":["import type { ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.com/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.com/api-reference/endpoint/activities\n */\nexport type ActivityTargetType = \"app\" | \"database\" | \"organization\" | \"audit\";\nexport const ActivityTargetType = {\n\tApp: \"app\",\n\tDatabase: \"database\",\n\tOrganization: \"organization\",\n\tAudit: \"audit\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.com/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: string;\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,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,cAAc;AAAA,EACd,OAAO;AACR;","names":[]}
@@ -0,0 +1,18 @@
1
+ // payloads/v1/activity.ts
2
+ var ActivityStatus = {
3
+ Success: "success",
4
+ Warning: "warning",
5
+ Error: "error",
6
+ Info: "info"
7
+ };
8
+ var ActivityTargetType = {
9
+ App: "app",
10
+ Database: "database",
11
+ Organization: "organization",
12
+ Audit: "audit"
13
+ };
14
+ export {
15
+ ActivityStatus,
16
+ ActivityTargetType
17
+ };
18
+ //# sourceMappingURL=activity.mjs.map
@@ -0,0 +1,202 @@
1
+ import { ISODateString, SnowFlake } from '../../common/v1.js';
2
+
3
+ /**
4
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
5
+ */
6
+ type ApplicationLanguage = "nodejs" | "python";
7
+ declare const ApplicationLanguage: {
8
+ readonly NodeJS: "nodejs";
9
+ readonly Python: "python";
10
+ };
11
+ /**
12
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
13
+ */
14
+ type ApplicationStatus = "up" | "down";
15
+ declare const ApplicationStatus: {
16
+ readonly UP: "up";
17
+ readonly DOWN: "down";
18
+ };
19
+ /**
20
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
21
+ */
22
+ type ApplicationCommitStatus = 1 | 2 | 3 | 4;
23
+ declare const ApplicationCommitStatus: {
24
+ readonly PENDING: 1;
25
+ readonly DEPLOYING: 2;
26
+ readonly COMPLETED: 3;
27
+ readonly FAILED: 4;
28
+ };
29
+ /**
30
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
31
+ */
32
+ type ApplicationCluster = 1;
33
+ declare const ApplicationCluster: {
34
+ readonly USA: 1;
35
+ };
36
+ /**
37
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
38
+ */
39
+ type ApplicationType = 1 | 2;
40
+ declare const ApplicationType: {
41
+ readonly Bot: 1;
42
+ readonly Website: 2;
43
+ };
44
+ /**
45
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
46
+ */
47
+ interface ApplicationCommit {
48
+ version: string;
49
+ timestamp: ISODateString;
50
+ notes: string;
51
+ }
52
+ /**
53
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
54
+ */
55
+ type ApplicationFileType = "file" | "directory";
56
+ declare const ApplicationFileType: {
57
+ readonly File: "file";
58
+ readonly Directory: "directory";
59
+ };
60
+ /**
61
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
62
+ */
63
+ type ApplicationVersion = "recommended" | "latest";
64
+ declare const ApplicationVersion: {
65
+ readonly RECOMMENDED: "recommended";
66
+ readonly LATEST: "latest";
67
+ };
68
+ /**
69
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
70
+ */
71
+ type ApplicationFileContentType = "buffer";
72
+ declare const ApplicationFileContentType: {
73
+ readonly Buffer: "buffer";
74
+ };
75
+ /**
76
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
77
+ */
78
+ interface APIApplicationFile {
79
+ type: ApplicationFileType;
80
+ name: string;
81
+ size?: string;
82
+ last_modified: ISODateString;
83
+ }
84
+ /**
85
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
86
+ */
87
+ interface APIApplicationFileContent {
88
+ type: ApplicationFileContentType;
89
+ data: number[];
90
+ }
91
+ /**
92
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
93
+ */
94
+ interface APIApplication {
95
+ id: SnowFlake;
96
+ cluster: ApplicationCluster;
97
+ type: ApplicationType;
98
+ name: string;
99
+ description: string;
100
+ owner_id: SnowFlake;
101
+ language: ApplicationLanguage;
102
+ ram: number;
103
+ status: ApplicationStatus;
104
+ domain: string | null;
105
+ custom_domain: string | null;
106
+ last_commit: ISODateString;
107
+ last_backup: ISODateString | null;
108
+ created_at: ISODateString;
109
+ updated_at: ISODateString;
110
+ }
111
+ /**
112
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
113
+ */
114
+ interface APIApplicationNetwork {
115
+ total: number;
116
+ now: number;
117
+ }
118
+ /**
119
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
120
+ */
121
+ interface APIApplicationActivity {
122
+ message: string;
123
+ timestamp: ISODateString;
124
+ }
125
+ /**
126
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
127
+ */
128
+ interface APIApplicationStatus {
129
+ cpu: string;
130
+ ram: string;
131
+ status: ApplicationStatus;
132
+ running: boolean;
133
+ storage: string;
134
+ network: APIApplicationNetwork;
135
+ uptime: number;
136
+ created_at: ISODateString;
137
+ updated_at: ISODateString;
138
+ }
139
+ /**
140
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
141
+ */
142
+ interface APIApplicationStatusShort {
143
+ id: SnowFlake;
144
+ cpu: string;
145
+ ram: string;
146
+ running: boolean;
147
+ }
148
+ /**
149
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
150
+ */
151
+ interface APIApplicationMetric {
152
+ cpu: number;
153
+ ram: number;
154
+ storage: number;
155
+ date: ISODateString;
156
+ network: number[];
157
+ }
158
+ /**
159
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
160
+ */
161
+ interface APIApplicationCommit {
162
+ id: SnowFlake;
163
+ author_id: SnowFlake;
164
+ message: string;
165
+ version: string;
166
+ status: ApplicationCommitStatus;
167
+ size: string;
168
+ date: ISODateString;
169
+ }
170
+ /**
171
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
172
+ */
173
+ interface APIApplicationBackup {
174
+ id: SnowFlake;
175
+ app_id: SnowFlake;
176
+ author_id: SnowFlake | null;
177
+ size: string;
178
+ date: ISODateString;
179
+ }
180
+ /**
181
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
182
+ */
183
+ interface APIGroupedApplicationBackups {
184
+ app_id: SnowFlake;
185
+ app_name: string | null;
186
+ backups: APIApplicationBackup[];
187
+ }
188
+ /**
189
+ * @see https://docs.vertracloud.com/api-reference/endpoint/applications
190
+ */
191
+ interface APIApplicationConfig {
192
+ NAME: string;
193
+ MEMORY: number;
194
+ MAIN: string;
195
+ VERSION: ApplicationVersion;
196
+ DESCRIPTION?: string;
197
+ AUTORESTART?: boolean;
198
+ START?: string;
199
+ SUBDOMAIN?: string;
200
+ }
201
+
202
+ export { type APIApplication, type APIApplicationActivity, type APIApplicationBackup, type APIApplicationCommit, type APIApplicationConfig, type APIApplicationFile, type APIApplicationFileContent, type APIApplicationMetric, type APIApplicationNetwork, type APIApplicationStatus, type APIApplicationStatusShort, type APIGroupedApplicationBackups, ApplicationCluster, type ApplicationCommit, ApplicationCommitStatus, ApplicationFileContentType, ApplicationFileType, ApplicationLanguage, ApplicationStatus, ApplicationType, ApplicationVersion };
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // payloads/v1/application.ts
21
+ var application_exports = {};
22
+ __export(application_exports, {
23
+ ApplicationCluster: () => ApplicationCluster,
24
+ ApplicationCommitStatus: () => ApplicationCommitStatus,
25
+ ApplicationFileContentType: () => ApplicationFileContentType,
26
+ ApplicationFileType: () => ApplicationFileType,
27
+ ApplicationLanguage: () => ApplicationLanguage,
28
+ ApplicationStatus: () => ApplicationStatus,
29
+ ApplicationType: () => ApplicationType,
30
+ ApplicationVersion: () => ApplicationVersion
31
+ });
32
+ module.exports = __toCommonJS(application_exports);
33
+ var ApplicationLanguage = {
34
+ NodeJS: "nodejs",
35
+ Python: "python"
36
+ };
37
+ var ApplicationStatus = {
38
+ UP: "up",
39
+ DOWN: "down"
40
+ };
41
+ var ApplicationCommitStatus = {
42
+ PENDING: 1,
43
+ DEPLOYING: 2,
44
+ COMPLETED: 3,
45
+ FAILED: 4
46
+ };
47
+ var ApplicationCluster = {
48
+ USA: 1
49
+ };
50
+ var ApplicationType = {
51
+ Bot: 1,
52
+ Website: 2
53
+ };
54
+ var ApplicationFileType = {
55
+ File: "file",
56
+ Directory: "directory"
57
+ };
58
+ var ApplicationVersion = {
59
+ RECOMMENDED: "recommended",
60
+ LATEST: "latest"
61
+ };
62
+ var ApplicationFileContentType = {
63
+ Buffer: "buffer"
64
+ };
65
+ // Annotate the CommonJS export names for ESM import in node:
66
+ 0 && (module.exports = {
67
+ ApplicationCluster,
68
+ ApplicationCommitStatus,
69
+ ApplicationFileContentType,
70
+ ApplicationFileType,
71
+ ApplicationLanguage,
72
+ ApplicationStatus,
73
+ ApplicationType,
74
+ ApplicationVersion
75
+ });
76
+ //# sourceMappingURL=application.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["application.ts"],"sourcesContent":["import type { ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport type ApplicationLanguage = \"nodejs\" | \"python\";\nexport const ApplicationLanguage = {\n\tNodeJS: \"nodejs\",\n\tPython: \"python\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport type ApplicationStatus = \"up\" | \"down\";\nexport const ApplicationStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport type ApplicationCommitStatus = 1 | 2 | 3 | 4;\nexport const ApplicationCommitStatus = {\n\tPENDING: 1,\n\tDEPLOYING: 2,\n\tCOMPLETED: 3,\n\tFAILED: 4,\n} as const;\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport type ApplicationCluster = 1;\nexport const ApplicationCluster = {\n\tUSA: 1,\n} as const;\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport type ApplicationType = 1 | 2;\nexport const ApplicationType = {\n\tBot: 1,\n\tWebsite: 2,\n} as const;\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport interface ApplicationCommit {\n\tversion: string;\n\ttimestamp: ISODateString;\n\tnotes: string;\n}\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport type ApplicationFileType = \"file\" | \"directory\";\nexport const ApplicationFileType = {\n\tFile: \"file\",\n\tDirectory: \"directory\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport type ApplicationVersion = \"recommended\" | \"latest\";\nexport const ApplicationVersion = {\n\tRECOMMENDED: \"recommended\",\n\tLATEST: \"latest\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport type ApplicationFileContentType = \"buffer\";\nexport const ApplicationFileContentType = {\n\tBuffer: \"buffer\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport interface APIApplicationFile {\n\ttype: ApplicationFileType;\n\tname: string;\n\tsize?: string;\n\tlast_modified: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileContent {\n\ttype: ApplicationFileContentType;\n\tdata: number[];\n}\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport interface APIApplication {\n\tid: SnowFlake;\n\tcluster: ApplicationCluster;\n\ttype: ApplicationType;\n\tname: string;\n\tdescription: string;\n\towner_id: SnowFlake;\n\tlanguage: ApplicationLanguage;\n\tram: number;\n\tstatus: ApplicationStatus;\n\tdomain: string | null;\n\tcustom_domain: string | null;\n\tlast_commit: ISODateString;\n\tlast_backup: ISODateString | null;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport interface APIApplicationNetwork {\n\ttotal: number;\n\tnow: number;\n}\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport interface APIApplicationActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport interface APIApplicationStatus {\n\tcpu: string;\n\tram: string;\n\tstatus: ApplicationStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIApplicationNetwork;\n\tuptime: number;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport interface APIApplicationStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\trunning: boolean;\n}\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport interface APIApplicationMetric {\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tdate: ISODateString;\n\tnetwork: number[];\n}\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport interface APIApplicationCommit {\n\tid: SnowFlake;\n\tauthor_id: SnowFlake;\n\tmessage: string;\n\tversion: string;\n\tstatus: ApplicationCommitStatus;\n\tsize: string;\n\tdate: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport interface APIApplicationBackup {\n\tid: SnowFlake;\n\tapp_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tsize: string;\n\tdate: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport interface APIGroupedApplicationBackups {\n\tapp_id: SnowFlake;\n\tapp_name: string | null;\n\tbackups: APIApplicationBackup[];\n}\n\n/**\n * @see https://docs.vertracloud.com/api-reference/endpoint/applications\n */\nexport interface APIApplicationConfig {\n\tNAME: string;\n\tMEMORY: number;\n\tMAIN: string;\n\tVERSION: ApplicationVersion;\n\tDESCRIPTION?: string;\n\tAUTORESTART?: boolean;\n\tSTART?: string;\n\tSUBDOMAIN?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,sBAAsB;AAAA,EAClC,QAAQ;AAAA,EACR,QAAQ;AACT;AAMO,IAAM,oBAAoB;AAAA,EAChC,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,0BAA0B;AAAA,EACtC,SAAS;AAAA,EACT,WAAW;AAAA,EACX,WAAW;AAAA,EACX,QAAQ;AACT;AAMO,IAAM,qBAAqB;AAAA,EACjC,KAAK;AACN;AAMO,IAAM,kBAAkB;AAAA,EAC9B,KAAK;AAAA,EACL,SAAS;AACV;AAeO,IAAM,sBAAsB;AAAA,EAClC,MAAM;AAAA,EACN,WAAW;AACZ;AAMO,IAAM,qBAAqB;AAAA,EACjC,aAAa;AAAA,EACb,QAAQ;AACT;AAMO,IAAM,6BAA6B;AAAA,EACzC,QAAQ;AACT;","names":[]}
@@ -0,0 +1,44 @@
1
+ // payloads/v1/application.ts
2
+ var ApplicationLanguage = {
3
+ NodeJS: "nodejs",
4
+ Python: "python"
5
+ };
6
+ var ApplicationStatus = {
7
+ UP: "up",
8
+ DOWN: "down"
9
+ };
10
+ var ApplicationCommitStatus = {
11
+ PENDING: 1,
12
+ DEPLOYING: 2,
13
+ COMPLETED: 3,
14
+ FAILED: 4
15
+ };
16
+ var ApplicationCluster = {
17
+ USA: 1
18
+ };
19
+ var ApplicationType = {
20
+ Bot: 1,
21
+ Website: 2
22
+ };
23
+ var ApplicationFileType = {
24
+ File: "file",
25
+ Directory: "directory"
26
+ };
27
+ var ApplicationVersion = {
28
+ RECOMMENDED: "recommended",
29
+ LATEST: "latest"
30
+ };
31
+ var ApplicationFileContentType = {
32
+ Buffer: "buffer"
33
+ };
34
+ export {
35
+ ApplicationCluster,
36
+ ApplicationCommitStatus,
37
+ ApplicationFileContentType,
38
+ ApplicationFileType,
39
+ ApplicationLanguage,
40
+ ApplicationStatus,
41
+ ApplicationType,
42
+ ApplicationVersion
43
+ };
44
+ //# sourceMappingURL=application.mjs.map
@@ -0,0 +1,3 @@
1
+ import '../../common/v1.js';
2
+ export { d as APIDatabase, c as APIDatabaseActivity, f as APIDatabaseBackup, A as APIDatabaseConnection, i as APIDatabaseMetrics, e as APIDatabaseNetwork, g as APIDatabaseStatus, h as APIDatabaseStatusShort, b as DatabaseCluster, a as DatabaseStatus, D as DatabaseType } from '../../user-CeSEUubY.js';
3
+ import './application.js';