@vertracloud/api-types 0.0.36 → 0.0.37
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/application.d.ts +1 -0
- package/payloads/v1/application.js.map +1 -1
- package/payloads/v1/credits.d.ts +12 -15
- package/payloads/v1/credits.js.map +1 -1
- package/payloads/v1/database.d.ts +1 -0
- package/payloads/v1/database.js.map +1 -1
- package/payloads/v1/index.js.map +1 -1
- package/v1.js.map +1 -1
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["application.ts"],"sourcesContent":["import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport type ApplicationLanguage = \"javascript\" | \"typescript\" | \"bun\" | \"python\" | \"static\" | \"php\" | \"go\" | \"ruby\" | \"java\" | \"rust\";\nexport const ApplicationLanguage = {\n\tJAVASCRIPT: \"javascript\",\n\tTYPESCRIPT: \"typescript\",\n\tBUN: \"bun\",\n\tPYTHON: \"python\",\n\tSTATIC: \"static\",\n\tPHP: \"php\",\n\tGO: \"go\",\n\tRUBY: \"ruby\",\n\tJAVA: \"java\",\n\tRUST: \"rust\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/api-reference/endpoint/applications\n */\nexport type ApplicationCluster = number;\nexport const ApplicationCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/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.app/api-reference/endpoint/applications\n */\nexport type ApplicationVersion = \"recommended\" | \"latest\" | \"auto\" | (string & {});\nexport const ApplicationVersion = {\n\tRECOMMENDED: \"recommended\",\n\tLATEST: \"latest\",\n\tAUTO: \"auto\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFile {\n\ttype: ApplicationFileType;\n\tname: string;\n\tpath: string;\n\tsize?: string;\n\tlast_modified: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileTree extends APIApplicationFile {\n\tchildren?: APIApplicationFileTree[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileContent {\n\ttype: ApplicationFileContentType;\n\tdata: number[];\n}\n\n/**\n * @see https://docs.vertracloud.app/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: string; // UUID\n\towner_plan_id: UserPlan; // Owner App Plan\n\tlanguage: ApplicationLanguage;\n\tram: number;\n\tstatus: ApplicationStatus;\n\tsubdomain: string | null; // example: \"my-app.vertraweb.com\"\n\tcustom_domain: string | null; // example: \"my-app.com.br\"\n\tlast_snapshot: ISODateString | null;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tmain_file: string;\n\tversion: ApplicationVersion;\n\tauto_restart: boolean;\n\tstart_command: string | null;\n\tuse_credits: boolean;\n\tcredits_used?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: ApplicationStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIApplicationNetwork;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/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.app/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.app/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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationEnvironment {\n\tid: string;\n\tkey: string;\n\tvalue: string;\n\tnote: string | null;\n\tcreated_at: ISODateString;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,sBAAsB;AAAA,EAClC,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACP;AAMO,IAAM,oBAAoB;AAAA,EAChC,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,qBAAqB;AAAA,EACjC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,kBAAkB;AAAA,EAC9B,KAAK;AAAA,EACL,SAAS;AACV;AAMO,IAAM,sBAAsB;AAAA,EAClC,MAAM;AAAA,EACN,WAAW;AACZ;AAMO,IAAM,qBAAqB;AAAA,EACjC,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,MAAM;AACP;AAMO,IAAM,6BAA6B;AAAA,EACzC,QAAQ;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["application.ts"],"sourcesContent":["import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport type ApplicationLanguage = \"javascript\" | \"typescript\" | \"bun\" | \"python\" | \"static\" | \"php\" | \"go\" | \"ruby\" | \"java\" | \"rust\";\nexport const ApplicationLanguage = {\n\tJAVASCRIPT: \"javascript\",\n\tTYPESCRIPT: \"typescript\",\n\tBUN: \"bun\",\n\tPYTHON: \"python\",\n\tSTATIC: \"static\",\n\tPHP: \"php\",\n\tGO: \"go\",\n\tRUBY: \"ruby\",\n\tJAVA: \"java\",\n\tRUST: \"rust\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/api-reference/endpoint/applications\n */\nexport type ApplicationCluster = number;\nexport const ApplicationCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/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.app/api-reference/endpoint/applications\n */\nexport type ApplicationVersion = \"recommended\" | \"latest\" | \"auto\" | (string & {});\nexport const ApplicationVersion = {\n\tRECOMMENDED: \"recommended\",\n\tLATEST: \"latest\",\n\tAUTO: \"auto\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFile {\n\ttype: ApplicationFileType;\n\tname: string;\n\tpath: string;\n\tsize?: string;\n\tlast_modified: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileTree extends APIApplicationFile {\n\tchildren?: APIApplicationFileTree[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileContent {\n\ttype: ApplicationFileContentType;\n\tdata: number[];\n}\n\n/**\n * @see https://docs.vertracloud.app/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: string; // UUID\n\towner_plan_id: UserPlan; // Owner App Plan\n\tlanguage: ApplicationLanguage;\n\tram: number;\n\tstatus: ApplicationStatus;\n\tsubdomain: string | null; // example: \"my-app.vertraweb.com\"\n\tcustom_domain: string | null; // example: \"my-app.com.br\"\n\tlast_snapshot: ISODateString | null;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tmain_file: string;\n\tversion: ApplicationVersion;\n\tauto_restart: boolean;\n\tstart_command: string | null;\n\tuse_credits: boolean;\n\tcredits_used?: number;\n\toffline_since: ISODateString | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: ApplicationStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIApplicationNetwork;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/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.app/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.app/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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationEnvironment {\n\tid: string;\n\tkey: string;\n\tvalue: string;\n\tnote: string | null;\n\tcreated_at: ISODateString;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,sBAAsB;AAAA,EAClC,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACP;AAMO,IAAM,oBAAoB;AAAA,EAChC,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,qBAAqB;AAAA,EACjC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,kBAAkB;AAAA,EAC9B,KAAK;AAAA,EACL,SAAS;AACV;AAMO,IAAM,sBAAsB;AAAA,EAClC,MAAM;AAAA,EACN,WAAW;AACZ;AAMO,IAAM,qBAAqB;AAAA,EACjC,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,MAAM;AACP;AAMO,IAAM,6BAA6B;AAAA,EACzC,QAAQ;AACT;","names":[]}
|
package/payloads/v1/credits.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { ISODateString } from '../../common/v1.js';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/credits
|
|
5
|
-
*/
|
|
6
3
|
interface APIUserCredits {
|
|
7
4
|
free: number;
|
|
8
5
|
paid: number;
|
|
@@ -10,32 +7,32 @@ interface APIUserCredits {
|
|
|
10
7
|
free_reset_at: ISODateString;
|
|
11
8
|
paid_expires_at: ISODateString | null;
|
|
12
9
|
}
|
|
13
|
-
/**
|
|
14
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/credits
|
|
15
|
-
*/
|
|
16
10
|
interface APICreditBalance {
|
|
11
|
+
/** Compute credits (monthly — FREE plan only) */
|
|
17
12
|
free: number;
|
|
13
|
+
/** Compute credits (purchased) */
|
|
18
14
|
paid: number;
|
|
19
|
-
|
|
15
|
+
free_per_month: number;
|
|
20
16
|
free_reset_at: ISODateString;
|
|
21
17
|
paid_expires_at: ISODateString | null;
|
|
18
|
+
/** AI credits (monthly — all plans) */
|
|
19
|
+
ai_free: number;
|
|
20
|
+
/** AI credits (purchased) */
|
|
21
|
+
ai_paid: number;
|
|
22
|
+
ai_free_per_month: number;
|
|
23
|
+
ai_free_reset_at: ISODateString;
|
|
24
|
+
ai_paid_expires_at: ISODateString | null;
|
|
22
25
|
}
|
|
23
|
-
/**
|
|
24
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/credits
|
|
25
|
-
*/
|
|
26
26
|
interface APICreditUsage {
|
|
27
27
|
id: string;
|
|
28
28
|
resource_id: string;
|
|
29
|
-
resource_type: "app" | "database";
|
|
29
|
+
resource_type: "app" | "database" | "ai";
|
|
30
30
|
resource_name: string | null;
|
|
31
|
-
credit_type: "free" | "paid";
|
|
31
|
+
credit_type: "free" | "paid" | "ai_free" | "ai_paid";
|
|
32
32
|
amount: number;
|
|
33
33
|
description: string | null;
|
|
34
34
|
created_at: ISODateString;
|
|
35
35
|
}
|
|
36
|
-
/**
|
|
37
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/credits
|
|
38
|
-
*/
|
|
39
36
|
interface APICreditCostEstimate {
|
|
40
37
|
ram_mb: number;
|
|
41
38
|
cost_per_hour: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["credits.ts"],"sourcesContent":["import type { ISODateString } from \"../../v1\";\n\
|
|
1
|
+
{"version":3,"sources":["credits.ts"],"sourcesContent":["import type { ISODateString } from \"../../v1\";\n\nexport interface APIUserCredits {\n\tfree: number;\n\tpaid: number;\n\tfree_per_week: number;\n\tfree_reset_at: ISODateString;\n\tpaid_expires_at: ISODateString | null;\n}\n\nexport interface APICreditBalance {\n\t/** Compute credits (monthly — FREE plan only) */\n\tfree: number;\n\t/** Compute credits (purchased) */\n\tpaid: number;\n\tfree_per_month: number;\n\tfree_reset_at: ISODateString;\n\tpaid_expires_at: ISODateString | null;\n\t/** AI credits (monthly — all plans) */\n\tai_free: number;\n\t/** AI credits (purchased) */\n\tai_paid: number;\n\tai_free_per_month: number;\n\tai_free_reset_at: ISODateString;\n\tai_paid_expires_at: ISODateString | null;\n}\n\nexport interface APICreditUsage {\n\tid: string;\n\tresource_id: string;\n\tresource_type: \"app\" | \"database\" | \"ai\";\n\tresource_name: string | null;\n\tcredit_type: \"free\" | \"paid\" | \"ai_free\" | \"ai_paid\";\n\tamount: number;\n\tdescription: string | null;\n\tcreated_at: ISODateString;\n}\n\nexport interface APICreditCostEstimate {\n\tram_mb: number;\n\tcost_per_hour: number;\n\tcost_per_day: number;\n\tcost_per_week: number;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["database.ts"],"sourcesContent":["import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseType = 1 | 2 | 3 | 4;\nexport const DatabaseType = {\n\tPOSTGRESQL: 1,\n\tMONGODB: 2,\n\tREDIS: 3,\n\tMYSQL: 4,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseStatus = \"up\" | \"down\";\nexport const DatabaseStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport type DatabaseCluster = number;\nexport const DatabaseCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\n\nexport interface APIDatabase {\n\tid: SnowFlake;\n\tcluster: DatabaseCluster;\n\ttype: DatabaseType;\n\tname: string;\n\tdescription: string;\n\towner_id: SnowFlake;\n\towner_plan_id: UserPlan; // Owner App Plan\n\tstatus: DatabaseStatus;\n\tram: number;\n\thost: string; // example: \"vertra-cloud-<type>-<dbId>.vertraweb.app\"\n\tport: number;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tlast_snapshot: ISODateString | null;\n\tuse_credits: boolean;\n\tcredits_used?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseSnapshot {\n\tid: SnowFlake;\n\tresource_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tsize: string;\n\tdate: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: DatabaseStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIDatabaseNetwork;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstorage: string;\n\trunning: boolean;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseMetrics {\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tdate: ISODateString;\n\tnetwork: number[];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,eAAe;AAAA,EAC3B,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,iBAAiB;AAAA,EAC7B,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,kBAAkB;AAAA,EAC9B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;","names":[]}
|
|
1
|
+
{"version":3,"sources":["database.ts"],"sourcesContent":["import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseType = 1 | 2 | 3 | 4;\nexport const DatabaseType = {\n\tPOSTGRESQL: 1,\n\tMONGODB: 2,\n\tREDIS: 3,\n\tMYSQL: 4,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseStatus = \"up\" | \"down\";\nexport const DatabaseStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport type DatabaseCluster = number;\nexport const DatabaseCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\n\nexport interface APIDatabase {\n\tid: SnowFlake;\n\tcluster: DatabaseCluster;\n\ttype: DatabaseType;\n\tname: string;\n\tdescription: string;\n\towner_id: SnowFlake;\n\towner_plan_id: UserPlan; // Owner App Plan\n\tstatus: DatabaseStatus;\n\tram: number;\n\thost: string; // example: \"vertra-cloud-<type>-<dbId>.vertraweb.app\"\n\tport: number;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tlast_snapshot: ISODateString | null;\n\tuse_credits: boolean;\n\tcredits_used?: number;\n\toffline_since: ISODateString | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseSnapshot {\n\tid: SnowFlake;\n\tresource_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tsize: string;\n\tdate: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: DatabaseStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIDatabaseNetwork;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstorage: string;\n\trunning: boolean;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseMetrics {\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tdate: ISODateString;\n\tnetwork: number[];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,eAAe;AAAA,EAC3B,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,iBAAiB;AAAA,EAC7B,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,kBAAkB;AAAA,EAC9B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;","names":[]}
|
package/payloads/v1/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts","activity.ts","application.ts","database.ts","notification.ts","snapshot.ts","status.ts","workspace.ts"],"sourcesContent":["export * from \"./activity\";\nexport * from \"./application\";\nexport * from \"./credits\";\nexport * from \"./database\";\nexport * from \"./notification\";\nexport * from \"./snapshot\";\nexport * from \"./status\";\nexport * from \"./user\";\nexport * from \"./workspace\";\n","import type { ISODateString, SnowFlake } from \"../../v1\";\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: string;\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport type ApplicationLanguage = \"javascript\" | \"typescript\" | \"bun\" | \"python\" | \"static\" | \"php\" | \"go\" | \"ruby\" | \"java\" | \"rust\";\nexport const ApplicationLanguage = {\n\tJAVASCRIPT: \"javascript\",\n\tTYPESCRIPT: \"typescript\",\n\tBUN: \"bun\",\n\tPYTHON: \"python\",\n\tSTATIC: \"static\",\n\tPHP: \"php\",\n\tGO: \"go\",\n\tRUBY: \"ruby\",\n\tJAVA: \"java\",\n\tRUST: \"rust\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/api-reference/endpoint/applications\n */\nexport type ApplicationCluster = number;\nexport const ApplicationCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/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.app/api-reference/endpoint/applications\n */\nexport type ApplicationVersion = \"recommended\" | \"latest\" | \"auto\" | (string & {});\nexport const ApplicationVersion = {\n\tRECOMMENDED: \"recommended\",\n\tLATEST: \"latest\",\n\tAUTO: \"auto\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFile {\n\ttype: ApplicationFileType;\n\tname: string;\n\tpath: string;\n\tsize?: string;\n\tlast_modified: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileTree extends APIApplicationFile {\n\tchildren?: APIApplicationFileTree[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileContent {\n\ttype: ApplicationFileContentType;\n\tdata: number[];\n}\n\n/**\n * @see https://docs.vertracloud.app/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: string; // UUID\n\towner_plan_id: UserPlan; // Owner App Plan\n\tlanguage: ApplicationLanguage;\n\tram: number;\n\tstatus: ApplicationStatus;\n\tsubdomain: string | null; // example: \"my-app.vertraweb.com\"\n\tcustom_domain: string | null; // example: \"my-app.com.br\"\n\tlast_snapshot: ISODateString | null;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tmain_file: string;\n\tversion: ApplicationVersion;\n\tauto_restart: boolean;\n\tstart_command: string | null;\n\tuse_credits: boolean;\n\tcredits_used?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: ApplicationStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIApplicationNetwork;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/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.app/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.app/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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationEnvironment {\n\tid: string;\n\tkey: string;\n\tvalue: string;\n\tnote: string | null;\n\tcreated_at: ISODateString;\n}\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseType = 1 | 2 | 3 | 4;\nexport const DatabaseType = {\n\tPOSTGRESQL: 1,\n\tMONGODB: 2,\n\tREDIS: 3,\n\tMYSQL: 4,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseStatus = \"up\" | \"down\";\nexport const DatabaseStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport type DatabaseCluster = number;\nexport const DatabaseCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\n\nexport interface APIDatabase {\n\tid: SnowFlake;\n\tcluster: DatabaseCluster;\n\ttype: DatabaseType;\n\tname: string;\n\tdescription: string;\n\towner_id: SnowFlake;\n\towner_plan_id: UserPlan; // Owner App Plan\n\tstatus: DatabaseStatus;\n\tram: number;\n\thost: string; // example: \"vertra-cloud-<type>-<dbId>.vertraweb.app\"\n\tport: number;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tlast_snapshot: ISODateString | null;\n\tuse_credits: boolean;\n\tcredits_used?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseSnapshot {\n\tid: SnowFlake;\n\tresource_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tsize: string;\n\tdate: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: DatabaseStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIDatabaseNetwork;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstorage: string;\n\trunning: boolean;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseMetrics {\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tdate: ISODateString;\n\tnetwork: number[];\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * Notification type:\n * 1 = Simple text notification\n * 2 = Notification with image/video attachment\n */\nexport type NotificationType = 1 | 2;\n\nexport const NotificationType = {\n\tSIMPLE: 1,\n\tATTACHMENT: 2,\n} as const;\n\n/**\n * Notification importance level.\n */\nexport type NotificationImportance = \"low\" | \"medium\" | \"high\" | \"critical\";\n\nexport const NotificationImportance = {\n\tLOW: \"low\",\n\tMEDIUM: \"medium\",\n\tHIGH: \"high\",\n\tCRITICAL: \"critical\",\n} as const;\n\nexport interface LocalizedContent {\n\t\"en-us\": string;\n\t\"pt-br\"?: string;\n\t\"es-es\"?: string;\n\t[key: string]: string | undefined;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/notifications\n */\nexport interface APINotification {\n\tid: SnowFlake;\n\ttype: NotificationType;\n\timportance: NotificationImportance;\n\ttitle: LocalizedContent;\n\tmessage: LocalizedContent;\n\tattachment_url: string | null;\n\tshow_on_dashboard: boolean;\n\tis_read: boolean;\n\tcreated_at: ISODateString;\n\texpires_at: ISODateString;\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport type ResourceType = 1 | 2;\nexport const ResourceType = {\n\tAPPLICATION: 1,\n\tDATABASE: 2,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport interface APIResourceSnapshot {\n\tid: SnowFlake;\n\tresource_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tresource_type: number | null;\n\tsize: string;\n\tdate: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport interface APIGroupedResourceSnapshots {\n\tresource_id: SnowFlake;\n\tresource_name: string | null;\n\ttype: ResourceType;\n\tresource_type: number | null;\n\tsnapshots: APIResourceSnapshot[];\n}\n","/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport type StatusType = \"healthy\" | \"degraded\" | \"unknown\";\nexport const StatusType = {\n\tHEALTHY: \"healthy\",\n\tDEGRADED: \"degraded\",\n\tUNKNOWN: \"unknown\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport interface APIStatus {\n\tstatus: StatusType;\n\tmessage: string;\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\nimport type { APIApplication, APIDatabase } from \"./index\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport type WorkspaceMemberRole = \"owner\" | \"admin\" | \"developer\" | \"operator\" | \"viewer\";\nexport const WorkspaceMemberRole = {\n\tOWNER: \"owner\",\n\tADMIN: \"admin\",\n\tDEVELOPER: \"developer\",\n\tOPERATOR: \"operator\",\n\tVIEWER: \"viewer\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceMember {\n\tuser_id: string;\n\trole: WorkspaceMemberRole;\n\tjoined_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspace {\n\tid: SnowFlake;\n\tname: string;\n\tdescription: string | null;\n\towner_id: SnowFlake;\n\tmembers: APIWorkspaceMember[];\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceInfoResponse extends APIWorkspace {\n\tapplications: APIApplication[];\n\tdatabases: APIDatabase[];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMO,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;;;AChBO,IAAM,sBAAsB;AAAA,EAClC,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACP;AAMO,IAAM,oBAAoB;AAAA,EAChC,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,qBAAqB;AAAA,EACjC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,kBAAkB;AAAA,EAC9B,KAAK;AAAA,EACL,SAAS;AACV;AAMO,IAAM,sBAAsB;AAAA,EAClC,MAAM;AAAA,EACN,WAAW;AACZ;AAMO,IAAM,qBAAqB;AAAA,EACjC,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,MAAM;AACP;AAMO,IAAM,6BAA6B;AAAA,EACzC,QAAQ;AACT;;;AClEO,IAAM,eAAe;AAAA,EAC3B,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,iBAAiB;AAAA,EAC7B,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,kBAAkB;AAAA,EAC9B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;;;ACrBO,IAAM,mBAAmB;AAAA,EAC/B,QAAQ;AAAA,EACR,YAAY;AACb;AAOO,IAAM,yBAAyB;AAAA,EACrC,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AACX;;;AClBO,IAAM,eAAe;AAAA,EAC3B,aAAa;AAAA,EACb,UAAU;AACX;;;ACLO,IAAM,aAAa;AAAA,EACzB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACV;;;ACDO,IAAM,sBAAsB;AAAA,EAClC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AAAA,EACX,UAAU;AAAA,EACV,QAAQ;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["index.ts","activity.ts","application.ts","database.ts","notification.ts","snapshot.ts","status.ts","workspace.ts"],"sourcesContent":["export * from \"./activity\";\nexport * from \"./application\";\nexport * from \"./credits\";\nexport * from \"./database\";\nexport * from \"./notification\";\nexport * from \"./snapshot\";\nexport * from \"./status\";\nexport * from \"./user\";\nexport * from \"./workspace\";\n","import type { ISODateString, SnowFlake } from \"../../v1\";\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: string;\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport type ApplicationLanguage = \"javascript\" | \"typescript\" | \"bun\" | \"python\" | \"static\" | \"php\" | \"go\" | \"ruby\" | \"java\" | \"rust\";\nexport const ApplicationLanguage = {\n\tJAVASCRIPT: \"javascript\",\n\tTYPESCRIPT: \"typescript\",\n\tBUN: \"bun\",\n\tPYTHON: \"python\",\n\tSTATIC: \"static\",\n\tPHP: \"php\",\n\tGO: \"go\",\n\tRUBY: \"ruby\",\n\tJAVA: \"java\",\n\tRUST: \"rust\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/api-reference/endpoint/applications\n */\nexport type ApplicationCluster = number;\nexport const ApplicationCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/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.app/api-reference/endpoint/applications\n */\nexport type ApplicationVersion = \"recommended\" | \"latest\" | \"auto\" | (string & {});\nexport const ApplicationVersion = {\n\tRECOMMENDED: \"recommended\",\n\tLATEST: \"latest\",\n\tAUTO: \"auto\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFile {\n\ttype: ApplicationFileType;\n\tname: string;\n\tpath: string;\n\tsize?: string;\n\tlast_modified: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileTree extends APIApplicationFile {\n\tchildren?: APIApplicationFileTree[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileContent {\n\ttype: ApplicationFileContentType;\n\tdata: number[];\n}\n\n/**\n * @see https://docs.vertracloud.app/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: string; // UUID\n\towner_plan_id: UserPlan; // Owner App Plan\n\tlanguage: ApplicationLanguage;\n\tram: number;\n\tstatus: ApplicationStatus;\n\tsubdomain: string | null; // example: \"my-app.vertraweb.com\"\n\tcustom_domain: string | null; // example: \"my-app.com.br\"\n\tlast_snapshot: ISODateString | null;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tmain_file: string;\n\tversion: ApplicationVersion;\n\tauto_restart: boolean;\n\tstart_command: string | null;\n\tuse_credits: boolean;\n\tcredits_used?: number;\n\toffline_since: ISODateString | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: ApplicationStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIApplicationNetwork;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/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.app/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.app/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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationEnvironment {\n\tid: string;\n\tkey: string;\n\tvalue: string;\n\tnote: string | null;\n\tcreated_at: ISODateString;\n}\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseType = 1 | 2 | 3 | 4;\nexport const DatabaseType = {\n\tPOSTGRESQL: 1,\n\tMONGODB: 2,\n\tREDIS: 3,\n\tMYSQL: 4,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseStatus = \"up\" | \"down\";\nexport const DatabaseStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport type DatabaseCluster = number;\nexport const DatabaseCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\n\nexport interface APIDatabase {\n\tid: SnowFlake;\n\tcluster: DatabaseCluster;\n\ttype: DatabaseType;\n\tname: string;\n\tdescription: string;\n\towner_id: SnowFlake;\n\towner_plan_id: UserPlan; // Owner App Plan\n\tstatus: DatabaseStatus;\n\tram: number;\n\thost: string; // example: \"vertra-cloud-<type>-<dbId>.vertraweb.app\"\n\tport: number;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tlast_snapshot: ISODateString | null;\n\tuse_credits: boolean;\n\tcredits_used?: number;\n\toffline_since: ISODateString | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseSnapshot {\n\tid: SnowFlake;\n\tresource_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tsize: string;\n\tdate: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: DatabaseStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIDatabaseNetwork;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstorage: string;\n\trunning: boolean;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseMetrics {\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tdate: ISODateString;\n\tnetwork: number[];\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * Notification type:\n * 1 = Simple text notification\n * 2 = Notification with image/video attachment\n */\nexport type NotificationType = 1 | 2;\n\nexport const NotificationType = {\n\tSIMPLE: 1,\n\tATTACHMENT: 2,\n} as const;\n\n/**\n * Notification importance level.\n */\nexport type NotificationImportance = \"low\" | \"medium\" | \"high\" | \"critical\";\n\nexport const NotificationImportance = {\n\tLOW: \"low\",\n\tMEDIUM: \"medium\",\n\tHIGH: \"high\",\n\tCRITICAL: \"critical\",\n} as const;\n\nexport interface LocalizedContent {\n\t\"en-us\": string;\n\t\"pt-br\"?: string;\n\t\"es-es\"?: string;\n\t[key: string]: string | undefined;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/notifications\n */\nexport interface APINotification {\n\tid: SnowFlake;\n\ttype: NotificationType;\n\timportance: NotificationImportance;\n\ttitle: LocalizedContent;\n\tmessage: LocalizedContent;\n\tattachment_url: string | null;\n\tshow_on_dashboard: boolean;\n\tis_read: boolean;\n\tcreated_at: ISODateString;\n\texpires_at: ISODateString;\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport type ResourceType = 1 | 2;\nexport const ResourceType = {\n\tAPPLICATION: 1,\n\tDATABASE: 2,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport interface APIResourceSnapshot {\n\tid: SnowFlake;\n\tresource_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tresource_type: number | null;\n\tsize: string;\n\tdate: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport interface APIGroupedResourceSnapshots {\n\tresource_id: SnowFlake;\n\tresource_name: string | null;\n\ttype: ResourceType;\n\tresource_type: number | null;\n\tsnapshots: APIResourceSnapshot[];\n}\n","/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport type StatusType = \"healthy\" | \"degraded\" | \"unknown\";\nexport const StatusType = {\n\tHEALTHY: \"healthy\",\n\tDEGRADED: \"degraded\",\n\tUNKNOWN: \"unknown\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport interface APIStatus {\n\tstatus: StatusType;\n\tmessage: string;\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\nimport type { APIApplication, APIDatabase } from \"./index\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport type WorkspaceMemberRole = \"owner\" | \"admin\" | \"developer\" | \"operator\" | \"viewer\";\nexport const WorkspaceMemberRole = {\n\tOWNER: \"owner\",\n\tADMIN: \"admin\",\n\tDEVELOPER: \"developer\",\n\tOPERATOR: \"operator\",\n\tVIEWER: \"viewer\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceMember {\n\tuser_id: string;\n\trole: WorkspaceMemberRole;\n\tjoined_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspace {\n\tid: SnowFlake;\n\tname: string;\n\tdescription: string | null;\n\towner_id: SnowFlake;\n\tmembers: APIWorkspaceMember[];\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceInfoResponse extends APIWorkspace {\n\tapplications: APIApplication[];\n\tdatabases: APIDatabase[];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMO,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;;;AChBO,IAAM,sBAAsB;AAAA,EAClC,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACP;AAMO,IAAM,oBAAoB;AAAA,EAChC,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,qBAAqB;AAAA,EACjC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,kBAAkB;AAAA,EAC9B,KAAK;AAAA,EACL,SAAS;AACV;AAMO,IAAM,sBAAsB;AAAA,EAClC,MAAM;AAAA,EACN,WAAW;AACZ;AAMO,IAAM,qBAAqB;AAAA,EACjC,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,MAAM;AACP;AAMO,IAAM,6BAA6B;AAAA,EACzC,QAAQ;AACT;;;AClEO,IAAM,eAAe;AAAA,EAC3B,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,iBAAiB;AAAA,EAC7B,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,kBAAkB;AAAA,EAC9B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;;;ACrBO,IAAM,mBAAmB;AAAA,EAC/B,QAAQ;AAAA,EACR,YAAY;AACb;AAOO,IAAM,yBAAyB;AAAA,EACrC,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AACX;;;AClBO,IAAM,eAAe;AAAA,EAC3B,aAAa;AAAA,EACb,UAAU;AACX;;;ACLO,IAAM,aAAa;AAAA,EACzB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACV;;;ACDO,IAAM,sBAAsB;AAAA,EAClC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AAAA,EACX,UAAU;AAAA,EACV,QAAQ;AACT;","names":[]}
|
package/v1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["v1.ts","common/v1.ts","payloads/v1/activity.ts","payloads/v1/application.ts","payloads/v1/database.ts","payloads/v1/notification.ts","payloads/v1/snapshot.ts","payloads/v1/status.ts","payloads/v1/workspace.ts"],"sourcesContent":["export * from \"./common/v1\";\nexport * from \"./payloads/v1/index\";\nexport * from \"./rest/v1/index\";\nexport * from \"./utils\";\n","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","import type { ISODateString, SnowFlake } from \"../../v1\";\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: string;\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport type ApplicationLanguage = \"javascript\" | \"typescript\" | \"bun\" | \"python\" | \"static\" | \"php\" | \"go\" | \"ruby\" | \"java\" | \"rust\";\nexport const ApplicationLanguage = {\n\tJAVASCRIPT: \"javascript\",\n\tTYPESCRIPT: \"typescript\",\n\tBUN: \"bun\",\n\tPYTHON: \"python\",\n\tSTATIC: \"static\",\n\tPHP: \"php\",\n\tGO: \"go\",\n\tRUBY: \"ruby\",\n\tJAVA: \"java\",\n\tRUST: \"rust\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/api-reference/endpoint/applications\n */\nexport type ApplicationCluster = number;\nexport const ApplicationCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/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.app/api-reference/endpoint/applications\n */\nexport type ApplicationVersion = \"recommended\" | \"latest\" | \"auto\" | (string & {});\nexport const ApplicationVersion = {\n\tRECOMMENDED: \"recommended\",\n\tLATEST: \"latest\",\n\tAUTO: \"auto\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFile {\n\ttype: ApplicationFileType;\n\tname: string;\n\tpath: string;\n\tsize?: string;\n\tlast_modified: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileTree extends APIApplicationFile {\n\tchildren?: APIApplicationFileTree[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileContent {\n\ttype: ApplicationFileContentType;\n\tdata: number[];\n}\n\n/**\n * @see https://docs.vertracloud.app/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: string; // UUID\n\towner_plan_id: UserPlan; // Owner App Plan\n\tlanguage: ApplicationLanguage;\n\tram: number;\n\tstatus: ApplicationStatus;\n\tsubdomain: string | null; // example: \"my-app.vertraweb.com\"\n\tcustom_domain: string | null; // example: \"my-app.com.br\"\n\tlast_snapshot: ISODateString | null;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tmain_file: string;\n\tversion: ApplicationVersion;\n\tauto_restart: boolean;\n\tstart_command: string | null;\n\tuse_credits: boolean;\n\tcredits_used?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: ApplicationStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIApplicationNetwork;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/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.app/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.app/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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationEnvironment {\n\tid: string;\n\tkey: string;\n\tvalue: string;\n\tnote: string | null;\n\tcreated_at: ISODateString;\n}\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseType = 1 | 2 | 3 | 4;\nexport const DatabaseType = {\n\tPOSTGRESQL: 1,\n\tMONGODB: 2,\n\tREDIS: 3,\n\tMYSQL: 4,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseStatus = \"up\" | \"down\";\nexport const DatabaseStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport type DatabaseCluster = number;\nexport const DatabaseCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\n\nexport interface APIDatabase {\n\tid: SnowFlake;\n\tcluster: DatabaseCluster;\n\ttype: DatabaseType;\n\tname: string;\n\tdescription: string;\n\towner_id: SnowFlake;\n\towner_plan_id: UserPlan; // Owner App Plan\n\tstatus: DatabaseStatus;\n\tram: number;\n\thost: string; // example: \"vertra-cloud-<type>-<dbId>.vertraweb.app\"\n\tport: number;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tlast_snapshot: ISODateString | null;\n\tuse_credits: boolean;\n\tcredits_used?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseSnapshot {\n\tid: SnowFlake;\n\tresource_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tsize: string;\n\tdate: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: DatabaseStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIDatabaseNetwork;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstorage: string;\n\trunning: boolean;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseMetrics {\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tdate: ISODateString;\n\tnetwork: number[];\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * Notification type:\n * 1 = Simple text notification\n * 2 = Notification with image/video attachment\n */\nexport type NotificationType = 1 | 2;\n\nexport const NotificationType = {\n\tSIMPLE: 1,\n\tATTACHMENT: 2,\n} as const;\n\n/**\n * Notification importance level.\n */\nexport type NotificationImportance = \"low\" | \"medium\" | \"high\" | \"critical\";\n\nexport const NotificationImportance = {\n\tLOW: \"low\",\n\tMEDIUM: \"medium\",\n\tHIGH: \"high\",\n\tCRITICAL: \"critical\",\n} as const;\n\nexport interface LocalizedContent {\n\t\"en-us\": string;\n\t\"pt-br\"?: string;\n\t\"es-es\"?: string;\n\t[key: string]: string | undefined;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/notifications\n */\nexport interface APINotification {\n\tid: SnowFlake;\n\ttype: NotificationType;\n\timportance: NotificationImportance;\n\ttitle: LocalizedContent;\n\tmessage: LocalizedContent;\n\tattachment_url: string | null;\n\tshow_on_dashboard: boolean;\n\tis_read: boolean;\n\tcreated_at: ISODateString;\n\texpires_at: ISODateString;\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport type ResourceType = 1 | 2;\nexport const ResourceType = {\n\tAPPLICATION: 1,\n\tDATABASE: 2,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport interface APIResourceSnapshot {\n\tid: SnowFlake;\n\tresource_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tresource_type: number | null;\n\tsize: string;\n\tdate: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport interface APIGroupedResourceSnapshots {\n\tresource_id: SnowFlake;\n\tresource_name: string | null;\n\ttype: ResourceType;\n\tresource_type: number | null;\n\tsnapshots: APIResourceSnapshot[];\n}\n","/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport type StatusType = \"healthy\" | \"degraded\" | \"unknown\";\nexport const StatusType = {\n\tHEALTHY: \"healthy\",\n\tDEGRADED: \"degraded\",\n\tUNKNOWN: \"unknown\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport interface APIStatus {\n\tstatus: StatusType;\n\tmessage: string;\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\nimport type { APIApplication, APIDatabase } from \"./index\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport type WorkspaceMemberRole = \"owner\" | \"admin\" | \"developer\" | \"operator\" | \"viewer\";\nexport const WorkspaceMemberRole = {\n\tOWNER: \"owner\",\n\tADMIN: \"admin\",\n\tDEVELOPER: \"developer\",\n\tOPERATOR: \"operator\",\n\tVIEWER: \"viewer\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceMember {\n\tuser_id: string;\n\trole: WorkspaceMemberRole;\n\tjoined_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspace {\n\tid: SnowFlake;\n\tname: string;\n\tdescription: string | null;\n\towner_id: SnowFlake;\n\tmembers: APIWorkspaceMember[];\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceInfoResponse extends APIWorkspace {\n\tapplications: APIApplication[];\n\tdatabases: APIDatabase[];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC+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;;;AC9DO,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;;;AChBO,IAAM,sBAAsB;AAAA,EAClC,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACP;AAMO,IAAM,oBAAoB;AAAA,EAChC,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,qBAAqB;AAAA,EACjC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,kBAAkB;AAAA,EAC9B,KAAK;AAAA,EACL,SAAS;AACV;AAMO,IAAM,sBAAsB;AAAA,EAClC,MAAM;AAAA,EACN,WAAW;AACZ;AAMO,IAAM,qBAAqB;AAAA,EACjC,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,MAAM;AACP;AAMO,IAAM,6BAA6B;AAAA,EACzC,QAAQ;AACT;;;AClEO,IAAM,eAAe;AAAA,EAC3B,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,iBAAiB;AAAA,EAC7B,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,kBAAkB;AAAA,EAC9B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;;;ACrBO,IAAM,mBAAmB;AAAA,EAC/B,QAAQ;AAAA,EACR,YAAY;AACb;AAOO,IAAM,yBAAyB;AAAA,EACrC,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AACX;;;AClBO,IAAM,eAAe;AAAA,EAC3B,aAAa;AAAA,EACb,UAAU;AACX;;;ACLO,IAAM,aAAa;AAAA,EACzB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACV;;;ACDO,IAAM,sBAAsB;AAAA,EAClC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AAAA,EACX,UAAU;AAAA,EACV,QAAQ;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["v1.ts","common/v1.ts","payloads/v1/activity.ts","payloads/v1/application.ts","payloads/v1/database.ts","payloads/v1/notification.ts","payloads/v1/snapshot.ts","payloads/v1/status.ts","payloads/v1/workspace.ts"],"sourcesContent":["export * from \"./common/v1\";\nexport * from \"./payloads/v1/index\";\nexport * from \"./rest/v1/index\";\nexport * from \"./utils\";\n","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","import type { ISODateString, SnowFlake } from \"../../v1\";\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: string;\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport type ApplicationLanguage = \"javascript\" | \"typescript\" | \"bun\" | \"python\" | \"static\" | \"php\" | \"go\" | \"ruby\" | \"java\" | \"rust\";\nexport const ApplicationLanguage = {\n\tJAVASCRIPT: \"javascript\",\n\tTYPESCRIPT: \"typescript\",\n\tBUN: \"bun\",\n\tPYTHON: \"python\",\n\tSTATIC: \"static\",\n\tPHP: \"php\",\n\tGO: \"go\",\n\tRUBY: \"ruby\",\n\tJAVA: \"java\",\n\tRUST: \"rust\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/api-reference/endpoint/applications\n */\nexport type ApplicationCluster = number;\nexport const ApplicationCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/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.app/api-reference/endpoint/applications\n */\nexport type ApplicationVersion = \"recommended\" | \"latest\" | \"auto\" | (string & {});\nexport const ApplicationVersion = {\n\tRECOMMENDED: \"recommended\",\n\tLATEST: \"latest\",\n\tAUTO: \"auto\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/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.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFile {\n\ttype: ApplicationFileType;\n\tname: string;\n\tpath: string;\n\tsize?: string;\n\tlast_modified: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileTree extends APIApplicationFile {\n\tchildren?: APIApplicationFileTree[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileContent {\n\ttype: ApplicationFileContentType;\n\tdata: number[];\n}\n\n/**\n * @see https://docs.vertracloud.app/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: string; // UUID\n\towner_plan_id: UserPlan; // Owner App Plan\n\tlanguage: ApplicationLanguage;\n\tram: number;\n\tstatus: ApplicationStatus;\n\tsubdomain: string | null; // example: \"my-app.vertraweb.com\"\n\tcustom_domain: string | null; // example: \"my-app.com.br\"\n\tlast_snapshot: ISODateString | null;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tmain_file: string;\n\tversion: ApplicationVersion;\n\tauto_restart: boolean;\n\tstart_command: string | null;\n\tuse_credits: boolean;\n\tcredits_used?: number;\n\toffline_since: ISODateString | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: ApplicationStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIApplicationNetwork;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/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.app/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.app/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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationEnvironment {\n\tid: string;\n\tkey: string;\n\tvalue: string;\n\tnote: string | null;\n\tcreated_at: ISODateString;\n}\n","import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseType = 1 | 2 | 3 | 4;\nexport const DatabaseType = {\n\tPOSTGRESQL: 1,\n\tMONGODB: 2,\n\tREDIS: 3,\n\tMYSQL: 4,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseStatus = \"up\" | \"down\";\nexport const DatabaseStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport type DatabaseCluster = number;\nexport const DatabaseCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\n\nexport interface APIDatabase {\n\tid: SnowFlake;\n\tcluster: DatabaseCluster;\n\ttype: DatabaseType;\n\tname: string;\n\tdescription: string;\n\towner_id: SnowFlake;\n\towner_plan_id: UserPlan; // Owner App Plan\n\tstatus: DatabaseStatus;\n\tram: number;\n\thost: string; // example: \"vertra-cloud-<type>-<dbId>.vertraweb.app\"\n\tport: number;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tlast_snapshot: ISODateString | null;\n\tuse_credits: boolean;\n\tcredits_used?: number;\n\toffline_since: ISODateString | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseSnapshot {\n\tid: SnowFlake;\n\tresource_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tsize: string;\n\tdate: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: DatabaseStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIDatabaseNetwork;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstorage: string;\n\trunning: boolean;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabaseMetrics {\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tdate: ISODateString;\n\tnetwork: number[];\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * Notification type:\n * 1 = Simple text notification\n * 2 = Notification with image/video attachment\n */\nexport type NotificationType = 1 | 2;\n\nexport const NotificationType = {\n\tSIMPLE: 1,\n\tATTACHMENT: 2,\n} as const;\n\n/**\n * Notification importance level.\n */\nexport type NotificationImportance = \"low\" | \"medium\" | \"high\" | \"critical\";\n\nexport const NotificationImportance = {\n\tLOW: \"low\",\n\tMEDIUM: \"medium\",\n\tHIGH: \"high\",\n\tCRITICAL: \"critical\",\n} as const;\n\nexport interface LocalizedContent {\n\t\"en-us\": string;\n\t\"pt-br\"?: string;\n\t\"es-es\"?: string;\n\t[key: string]: string | undefined;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/notifications\n */\nexport interface APINotification {\n\tid: SnowFlake;\n\ttype: NotificationType;\n\timportance: NotificationImportance;\n\ttitle: LocalizedContent;\n\tmessage: LocalizedContent;\n\tattachment_url: string | null;\n\tshow_on_dashboard: boolean;\n\tis_read: boolean;\n\tcreated_at: ISODateString;\n\texpires_at: ISODateString;\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport type ResourceType = 1 | 2;\nexport const ResourceType = {\n\tAPPLICATION: 1,\n\tDATABASE: 2,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport interface APIResourceSnapshot {\n\tid: SnowFlake;\n\tresource_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tresource_type: number | null;\n\tsize: string;\n\tdate: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport interface APIGroupedResourceSnapshots {\n\tresource_id: SnowFlake;\n\tresource_name: string | null;\n\ttype: ResourceType;\n\tresource_type: number | null;\n\tsnapshots: APIResourceSnapshot[];\n}\n","/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport type StatusType = \"healthy\" | \"degraded\" | \"unknown\";\nexport const StatusType = {\n\tHEALTHY: \"healthy\",\n\tDEGRADED: \"degraded\",\n\tUNKNOWN: \"unknown\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/status\n */\nexport interface APIStatus {\n\tstatus: StatusType;\n\tmessage: string;\n}\n","import type { ISODateString, SnowFlake } from \"../../v1\";\nimport type { APIApplication, APIDatabase } from \"./index\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport type WorkspaceMemberRole = \"owner\" | \"admin\" | \"developer\" | \"operator\" | \"viewer\";\nexport const WorkspaceMemberRole = {\n\tOWNER: \"owner\",\n\tADMIN: \"admin\",\n\tDEVELOPER: \"developer\",\n\tOPERATOR: \"operator\",\n\tVIEWER: \"viewer\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceMember {\n\tuser_id: string;\n\trole: WorkspaceMemberRole;\n\tjoined_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspace {\n\tid: SnowFlake;\n\tname: string;\n\tdescription: string | null;\n\towner_id: SnowFlake;\n\tmembers: APIWorkspaceMember[];\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceInfoResponse extends APIWorkspace {\n\tapplications: APIApplication[];\n\tdatabases: APIDatabase[];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC+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;;;AC9DO,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;;;AChBO,IAAM,sBAAsB;AAAA,EAClC,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACP;AAMO,IAAM,oBAAoB;AAAA,EAChC,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,qBAAqB;AAAA,EACjC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,kBAAkB;AAAA,EAC9B,KAAK;AAAA,EACL,SAAS;AACV;AAMO,IAAM,sBAAsB;AAAA,EAClC,MAAM;AAAA,EACN,WAAW;AACZ;AAMO,IAAM,qBAAqB;AAAA,EACjC,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,MAAM;AACP;AAMO,IAAM,6BAA6B;AAAA,EACzC,QAAQ;AACT;;;AClEO,IAAM,eAAe;AAAA,EAC3B,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,iBAAiB;AAAA,EAC7B,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,kBAAkB;AAAA,EAC9B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;;;ACrBO,IAAM,mBAAmB;AAAA,EAC/B,QAAQ;AAAA,EACR,YAAY;AACb;AAOO,IAAM,yBAAyB;AAAA,EACrC,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AACX;;;AClBO,IAAM,eAAe;AAAA,EAC3B,aAAa;AAAA,EACb,UAAU;AACX;;;ACLO,IAAM,aAAa;AAAA,EACzB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACV;;;ACDO,IAAM,sBAAsB;AAAA,EAClC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AAAA,EACX,UAAU;AAAA,EACV,QAAQ;AACT;","names":[]}
|