@vertracloud/api-types 0.0.40 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/payloads/v1/activity.d.ts +3 -2
- package/payloads/v1/activity.js.map +1 -1
- package/payloads/v1/index.d.ts +1 -1
- package/payloads/v1/index.js.map +1 -1
- package/payloads/v1/wing.d.ts +10 -1
- package/payloads/v1/wing.js.map +1 -1
- package/rest/v1/activity.d.ts +1 -0
- package/rest/v1/index.d.ts +2 -2
- package/rest/v1/wing.d.ts +4 -2
- package/rest/v1/wing.js.map +1 -1
- package/v1.d.ts +2 -2
- package/v1.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SnowFlake, ISODateString } from '../../common/v1.js';
|
|
2
|
+
import { LocalizedContent } from './notification.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @see https://docs.vertracloud.app/api-reference/endpoint/activities
|
|
@@ -29,8 +30,8 @@ interface APIActivity {
|
|
|
29
30
|
target_id: string;
|
|
30
31
|
target_type: ActivityTargetType;
|
|
31
32
|
author_id: SnowFlake | null;
|
|
32
|
-
title:
|
|
33
|
-
message:
|
|
33
|
+
title: LocalizedContent;
|
|
34
|
+
message: LocalizedContent;
|
|
34
35
|
timestamp: ISODateString;
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["activity.ts"],"sourcesContent":["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:
|
|
1
|
+
{"version":3,"sources":["activity.ts"],"sourcesContent":["import type { ISODateString, SnowFlake } from \"../../v1\";\nimport type { LocalizedContent } from \"./notification\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/activities\n */\nexport type ActivityStatus = \"success\" | \"warning\" | \"error\" | \"info\";\nexport const ActivityStatus = {\n\tSuccess: \"success\",\n\tWarning: \"warning\",\n\tError: \"error\",\n\tInfo: \"info\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/activities\n */\nexport type ActivityTargetType = \"app\" | \"database\" | \"workspace\" | \"audit\";\nexport const ActivityTargetType = {\n\tApp: \"app\",\n\tDatabase: \"database\",\n\tWorkspace: \"workspace\",\n\tAudit: \"audit\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/activities\n */\nexport interface APIActivity {\n\tid: SnowFlake;\n\tstatus: ActivityStatus;\n\ttarget_id: string;\n\ttarget_type: ActivityTargetType;\n\tauthor_id: SnowFlake | null;\n\ttitle: LocalizedContent;\n\tmessage: LocalizedContent;\n\ttimestamp: ISODateString;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,IAAM,iBAAiB;AAAA,EAC7B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AACP;AAMO,IAAM,qBAAqB;AAAA,EACjC,KAAK;AAAA,EACL,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACR;","names":[]}
|
package/payloads/v1/index.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export { APIRedeemResponse } from './redeem.js';
|
|
|
8
8
|
export { APIGroupedResourceSnapshots, APIResourceSnapshot, APISnapshotRestoreResponse, ResourceType } from './snapshot.js';
|
|
9
9
|
export { APIStatus, StatusType } from './status.js';
|
|
10
10
|
export { APIUser, APIUserApiKey, APIUserConnection, APIUserInfoResponse, APIUserPlan, APIUserPlanMemory, APIUserSession, APIUserWorkspaceInviteKey } from './user.js';
|
|
11
|
-
export { APIPayloadStatus, WingPayload, WingServiceResult, WingsAppCreateResponse, WingsAppRebuildResponse, WingsContainerMetric, WingsDatabaseCertificate, WingsDatabaseCreateResponse, WingsDatabaseRebuildResponse, WingsDatabaseResetResponse, WingsFileMoveResponse, WingsFileUploadResponse, WingsSnapshotRestoreResponse } from './wing.js';
|
|
11
|
+
export { APIPayloadStatus, WingPayload, WingServiceResult, WingsAppCreateResponse, WingsAppDeployResponse, WingsAppRebuildResponse, WingsContainerMetric, WingsDatabaseCertificate, WingsDatabaseCreateResponse, WingsDatabaseRebuildResponse, WingsDatabaseResetResponse, WingsFileMoveResponse, WingsFileUploadResponse, WingsSnapshotRestoreResponse } from './wing.js';
|
|
12
12
|
export { APIWorkspace, APIWorkspaceInfoResponse, APIWorkspaceMember, APIWorkspaceMemberAdd, APIWorkspaceMemberRoleUpdate, WorkspaceMemberRole } from './workspace.js';
|
|
13
13
|
import '../../common/v1.js';
|
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 \"./orders\";\nexport * from \"./redeem\";\nexport * from \"./snapshot\";\nexport * from \"./status\";\nexport * from \"./user\";\nexport * from \"./wing\";\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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationOperationResponse {\n\tstatus: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationDeployment {\n\tapp_id: SnowFlake;\n\tcommit_id: string;\n\tmessage: string;\n\tpusher: string;\n\tbranch: string;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIDnsRecord {\n\ttype: string;\n\tname: string;\n\tvalue: string;\n\tstatus: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIWebhookUrl {\n\turl: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APISubdomainResponse {\n\tsubdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APICustomDomainResponse {\n\tdomain: string;\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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabasePasswordReset {\n\tpassword: string;\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/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport interface APISnapshotRestoreResponse {\n\tmessage: string;\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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceMemberAdd {\n\tid: string;\n\temail: string;\n\trole: WorkspaceMemberRole;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceMemberRoleUpdate {\n\tuser_id: string;\n\trole: WorkspaceMemberRole;\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 \"./orders\";\nexport * from \"./redeem\";\nexport * from \"./snapshot\";\nexport * from \"./status\";\nexport * from \"./user\";\nexport * from \"./wing\";\nexport * from \"./workspace\";\n","import type { ISODateString, SnowFlake } from \"../../v1\";\nimport type { LocalizedContent } from \"./notification\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/activities\n */\nexport type ActivityStatus = \"success\" | \"warning\" | \"error\" | \"info\";\nexport const ActivityStatus = {\n\tSuccess: \"success\",\n\tWarning: \"warning\",\n\tError: \"error\",\n\tInfo: \"info\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/activities\n */\nexport type ActivityTargetType = \"app\" | \"database\" | \"workspace\" | \"audit\";\nexport const ActivityTargetType = {\n\tApp: \"app\",\n\tDatabase: \"database\",\n\tWorkspace: \"workspace\",\n\tAudit: \"audit\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/activities\n */\nexport interface APIActivity {\n\tid: SnowFlake;\n\tstatus: ActivityStatus;\n\ttarget_id: string;\n\ttarget_type: ActivityTargetType;\n\tauthor_id: SnowFlake | null;\n\ttitle: LocalizedContent;\n\tmessage: LocalizedContent;\n\ttimestamp: ISODateString;\n}\n","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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationOperationResponse {\n\tstatus: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationDeployment {\n\tapp_id: SnowFlake;\n\tcommit_id: string;\n\tmessage: string;\n\tpusher: string;\n\tbranch: string;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIDnsRecord {\n\ttype: string;\n\tname: string;\n\tvalue: string;\n\tstatus: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIWebhookUrl {\n\turl: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APISubdomainResponse {\n\tsubdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APICustomDomainResponse {\n\tdomain: string;\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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabasePasswordReset {\n\tpassword: string;\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/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport interface APISnapshotRestoreResponse {\n\tmessage: string;\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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceMemberAdd {\n\tid: string;\n\temail: string;\n\trole: WorkspaceMemberRole;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceMemberRoleUpdate {\n\tuser_id: string;\n\trole: WorkspaceMemberRole;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOO,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;;;ACjBO,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/payloads/v1/wing.d.ts
CHANGED
|
@@ -50,6 +50,15 @@ interface WingsAppCreateResponse {
|
|
|
50
50
|
vcpus: number;
|
|
51
51
|
auto_restart: boolean;
|
|
52
52
|
created_at: ISODateString;
|
|
53
|
+
missing_dependencies?: string[];
|
|
54
|
+
removed_directories?: string[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Application container deploy response
|
|
58
|
+
*/
|
|
59
|
+
interface WingsAppDeployResponse {
|
|
60
|
+
missing_dependencies?: string[];
|
|
61
|
+
removed_directories?: string[];
|
|
53
62
|
}
|
|
54
63
|
/**
|
|
55
64
|
* Application container rebuild response
|
|
@@ -121,4 +130,4 @@ interface WingsDatabaseResetResponse {
|
|
|
121
130
|
id: string;
|
|
122
131
|
}
|
|
123
132
|
|
|
124
|
-
export type { APIPayloadStatus, WingPayload, WingServiceResult, WingsAppCreateResponse, WingsAppRebuildResponse, WingsContainerMetric, WingsDatabaseCertificate, WingsDatabaseCreateResponse, WingsDatabaseRebuildResponse, WingsDatabaseResetResponse, WingsFileMoveResponse, WingsFileUploadResponse, WingsSnapshotRestoreResponse };
|
|
133
|
+
export type { APIPayloadStatus, WingPayload, WingServiceResult, WingsAppCreateResponse, WingsAppDeployResponse, WingsAppRebuildResponse, WingsContainerMetric, WingsDatabaseCertificate, WingsDatabaseCreateResponse, WingsDatabaseRebuildResponse, WingsDatabaseResetResponse, WingsFileMoveResponse, WingsFileUploadResponse, WingsSnapshotRestoreResponse };
|
package/payloads/v1/wing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["wing.ts"],"sourcesContent":["import type { ISODateString } from \"../../common/v1\";\nimport type { ApplicationLanguage } from \"./application\";\n\n/**\n * Wing service response wrapper\n */\nexport type APIPayloadStatus = \"error\" | \"success\";\n\nexport interface WingPayload<T = unknown> {\n\tstatus: APIPayloadStatus;\n\tresponse?: T;\n\tcode?: string;\n}\n\nexport interface WingServiceResult<T = unknown> {\n\tstatus: number;\n\tpayload: WingPayload<T>;\n}\n\n/**\n * Container metrics (shared between apps and databases)\n */\nexport interface WingsContainerMetric {\n\tid: string;\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tnetwork_in: number;\n\tnetwork_out: number;\n\tnetwork: { total: string; now: string } | null;\n\tuptime: number;\n\trunning: boolean;\n}\n\n/**\n * Application container creation response\n */\nexport interface WingsAppCreateResponse {\n\tcontainer_id: string;\n\tcontainer_name: string;\n\tenvs: Array<{ key: string; value: string; note?: string }>;\n\tlanguage: ApplicationLanguage;\n\tversion: string;\n\tsubdomain: string;\n\tmax_bandwidth: string;\n\tmemory: number;\n\tvcpus: number;\n\tauto_restart: boolean;\n\tcreated_at: ISODateString;\n}\n\n/**\n * Application container rebuild response\n */\nexport interface WingsAppRebuildResponse {\n\tcontainer_id: string;\n\tcontainer_name: string;\n\tversion: string;\n}\n\n/**\n * Database container creation response\n */\nexport interface WingsDatabaseCreateResponse {\n\tcontainer_id: string;\n\tcontainer_name: string;\n\tsubdomain_full: string;\n\tmax_bandwidth: string;\n\tmemory: number;\n\tvcpus: number;\n\ttype: number;\n\thost: string;\n\tport: number;\n\tstorage: number;\n\tcreated_at: ISODateString;\n}\n\n/**\n * Database container rebuild response\n */\nexport interface WingsDatabaseRebuildResponse {\n\tcontainer_id: string;\n\tcontainer_name: string;\n\ttype: number;\n\thost: string;\n\tport: number;\n\tcreated_at: ISODateString;\n}\n\n/**\n * Database certificate bundle\n */\nexport interface WingsDatabaseCertificate {\n\tcrt: string;\n\tkey: string;\n\tpem: string;\n}\n\n/**\n * File upload response\n */\nexport interface WingsFileUploadResponse {\n\tapp_id: string;\n\tupdated_at: ISODateString;\n}\n\n/**\n * File move response\n */\nexport interface WingsFileMoveResponse {\n\tfrom: string;\n\tto: string;\n}\n\n/**\n * Snapshot restore response\n */\nexport interface WingsSnapshotRestoreResponse {\n\tmessage: string;\n}\n\n/**\n * Database reset response\n */\nexport interface WingsDatabaseResetResponse {\n\tid: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["wing.ts"],"sourcesContent":["import type { ISODateString } from \"../../common/v1\";\nimport type { ApplicationLanguage } from \"./application\";\n\n/**\n * Wing service response wrapper\n */\nexport type APIPayloadStatus = \"error\" | \"success\";\n\nexport interface WingPayload<T = unknown> {\n\tstatus: APIPayloadStatus;\n\tresponse?: T;\n\tcode?: string;\n}\n\nexport interface WingServiceResult<T = unknown> {\n\tstatus: number;\n\tpayload: WingPayload<T>;\n}\n\n/**\n * Container metrics (shared between apps and databases)\n */\nexport interface WingsContainerMetric {\n\tid: string;\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tnetwork_in: number;\n\tnetwork_out: number;\n\tnetwork: { total: string; now: string } | null;\n\tuptime: number;\n\trunning: boolean;\n}\n\n/**\n * Application container creation response\n */\nexport interface WingsAppCreateResponse {\n\tcontainer_id: string;\n\tcontainer_name: string;\n\tenvs: Array<{ key: string; value: string; note?: string }>;\n\tlanguage: ApplicationLanguage;\n\tversion: string;\n\tsubdomain: string;\n\tmax_bandwidth: string;\n\tmemory: number;\n\tvcpus: number;\n\tauto_restart: boolean;\n\tcreated_at: ISODateString;\n\tmissing_dependencies?: string[];\n\tremoved_directories?: string[];\n}\n\n/**\n * Application container deploy response\n */\nexport interface WingsAppDeployResponse {\n\tmissing_dependencies?: string[];\n\tremoved_directories?: string[];\n}\n\n/**\n * Application container rebuild response\n */\nexport interface WingsAppRebuildResponse {\n\tcontainer_id: string;\n\tcontainer_name: string;\n\tversion: string;\n}\n\n/**\n * Database container creation response\n */\nexport interface WingsDatabaseCreateResponse {\n\tcontainer_id: string;\n\tcontainer_name: string;\n\tsubdomain_full: string;\n\tmax_bandwidth: string;\n\tmemory: number;\n\tvcpus: number;\n\ttype: number;\n\thost: string;\n\tport: number;\n\tstorage: number;\n\tcreated_at: ISODateString;\n}\n\n/**\n * Database container rebuild response\n */\nexport interface WingsDatabaseRebuildResponse {\n\tcontainer_id: string;\n\tcontainer_name: string;\n\ttype: number;\n\thost: string;\n\tport: number;\n\tcreated_at: ISODateString;\n}\n\n/**\n * Database certificate bundle\n */\nexport interface WingsDatabaseCertificate {\n\tcrt: string;\n\tkey: string;\n\tpem: string;\n}\n\n/**\n * File upload response\n */\nexport interface WingsFileUploadResponse {\n\tapp_id: string;\n\tupdated_at: ISODateString;\n}\n\n/**\n * File move response\n */\nexport interface WingsFileMoveResponse {\n\tfrom: string;\n\tto: string;\n}\n\n/**\n * Snapshot restore response\n */\nexport interface WingsSnapshotRestoreResponse {\n\tmessage: string;\n}\n\n/**\n * Database reset response\n */\nexport interface WingsDatabaseResetResponse {\n\tid: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/rest/v1/activity.d.ts
CHANGED
package/rest/v1/index.d.ts
CHANGED
|
@@ -8,14 +8,14 @@ export { RESTPostAPIRedeemResponse } from './redeem.js';
|
|
|
8
8
|
export { RESTGetAPIGroupedSnapshotsResponse, RESTGetAPISnapshotDownloadResponse, RESTGetAPISnapshotResponse, RESTGetAPISnapshotsResponse, RESTPostAPISnapshotCreateResponse, RESTPostAPISnapshotRestoreResponse } from './snapshot.js';
|
|
9
9
|
export { RESTGetAPIStatusResponse } from './status.js';
|
|
10
10
|
export { RESTGetAPIUserInfoResponse, RESTGetAPIUserSessionsResponse, RESTPostAPIUserDowngradeResponse, RESTPostAPIUserGenerateApiKeyResponse } from './user.js';
|
|
11
|
-
export { WingGetAppDownloadResponse, WingGetAppLogsResponse, WingGetAppStatusResponse, WingGetDatabaseCertificateResponse, WingGetDatabaseStatusResponse, WingPostAppAllStatusResponse, WingPostAppCreateResponse, WingPostAppFileUploadResponse, WingPostAppRebuildResponse, WingPostDatabaseAllStatusResponse, WingPostDatabaseCreateResponse, WingPostDatabaseRebuildResponse, WingPostDatabaseResetCertificateResponse, WingPostDatabaseResetResponse, WingPostSnapshotRestoreResponse } from './wing.js';
|
|
11
|
+
export { WingGetAppDownloadResponse, WingGetAppLogsResponse, WingGetAppStatusResponse, WingGetDatabaseCertificateResponse, WingGetDatabaseStatusResponse, WingPostAppAllStatusResponse, WingPostAppCreateResponse, WingPostAppDeployResponse, WingPostAppFileUploadResponse, WingPostAppRebuildResponse, WingPostDatabaseAllStatusResponse, WingPostDatabaseCreateResponse, WingPostDatabaseRebuildResponse, WingPostDatabaseResetCertificateResponse, WingPostDatabaseResetResponse, WingPostSnapshotRestoreResponse } from './wing.js';
|
|
12
12
|
export { RESTDeleteAPIWorkspaceResponse, RESTGetAPIWorkspaceInfoResponse, RESTGetAPIWorkspaceResponse, RESTGetAPIWorkspacesResponse, RESTPostAPIWorkspaceCreateResponse, RESTPostAPIWorkspaceMemberAddResponse, RESTPutAPIWorkspaceMemberRoleResponse, RESTPutAPIWorkspaceUpdateResponse } from './workspace.js';
|
|
13
13
|
import '../../common/v1.js';
|
|
14
14
|
import '../../payloads/v1/activity.js';
|
|
15
|
+
import '../../payloads/v1/notification.js';
|
|
15
16
|
import '../../payloads/v1/application.js';
|
|
16
17
|
import '../../payloads/v1/credits.js';
|
|
17
18
|
import '../../payloads/v1/database.js';
|
|
18
|
-
import '../../payloads/v1/notification.js';
|
|
19
19
|
import '../../payloads/v1/orders.js';
|
|
20
20
|
import '../../payloads/v1/redeem.js';
|
|
21
21
|
import '../../payloads/v1/snapshot.js';
|
package/rest/v1/wing.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { WingPayload, WingsAppCreateResponse, WingsAppRebuildResponse, WingsContainerMetric, WingsFileUploadResponse, WingsDatabaseCreateResponse, WingsDatabaseRebuildResponse, WingsDatabaseCertificate, WingsDatabaseResetResponse, WingsSnapshotRestoreResponse } from '../../payloads/v1/wing.js';
|
|
1
|
+
import { WingPayload, WingsAppCreateResponse, WingsAppDeployResponse, WingsAppRebuildResponse, WingsContainerMetric, WingsFileUploadResponse, WingsDatabaseCreateResponse, WingsDatabaseRebuildResponse, WingsDatabaseCertificate, WingsDatabaseResetResponse, WingsSnapshotRestoreResponse } from '../../payloads/v1/wing.js';
|
|
2
2
|
import '../../common/v1.js';
|
|
3
3
|
import '../../payloads/v1/application.js';
|
|
4
4
|
|
|
5
5
|
/** @see Wing: POST /api/v1/apps */
|
|
6
6
|
type WingPostAppCreateResponse = WingPayload<WingsAppCreateResponse>;
|
|
7
|
+
/** @see Wing: POST /api/v1/apps/:app_id/deploy */
|
|
8
|
+
type WingPostAppDeployResponse = WingPayload<WingsAppDeployResponse>;
|
|
7
9
|
/** @see Wing: POST /api/v1/apps/:app_id/rebuild */
|
|
8
10
|
type WingPostAppRebuildResponse = WingPayload<WingsAppRebuildResponse>;
|
|
9
11
|
/** @see Wing: GET /api/v1/apps/:app_id/status */
|
|
@@ -33,4 +35,4 @@ type WingPostDatabaseResetResponse = WingPayload<WingsDatabaseResetResponse>;
|
|
|
33
35
|
/** @see Wing: POST /api/v1/apps/:app_id/snapshots/:snapshot_id/restore */
|
|
34
36
|
type WingPostSnapshotRestoreResponse = WingPayload<WingsSnapshotRestoreResponse>;
|
|
35
37
|
|
|
36
|
-
export type { WingGetAppDownloadResponse, WingGetAppLogsResponse, WingGetAppStatusResponse, WingGetDatabaseCertificateResponse, WingGetDatabaseStatusResponse, WingPostAppAllStatusResponse, WingPostAppCreateResponse, WingPostAppFileUploadResponse, WingPostAppRebuildResponse, WingPostDatabaseAllStatusResponse, WingPostDatabaseCreateResponse, WingPostDatabaseRebuildResponse, WingPostDatabaseResetCertificateResponse, WingPostDatabaseResetResponse, WingPostSnapshotRestoreResponse };
|
|
38
|
+
export type { WingGetAppDownloadResponse, WingGetAppLogsResponse, WingGetAppStatusResponse, WingGetDatabaseCertificateResponse, WingGetDatabaseStatusResponse, WingPostAppAllStatusResponse, WingPostAppCreateResponse, WingPostAppDeployResponse, WingPostAppFileUploadResponse, WingPostAppRebuildResponse, WingPostDatabaseAllStatusResponse, WingPostDatabaseCreateResponse, WingPostDatabaseRebuildResponse, WingPostDatabaseResetCertificateResponse, WingPostDatabaseResetResponse, WingPostSnapshotRestoreResponse };
|
package/rest/v1/wing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["wing.ts"],"sourcesContent":["import type { WingPayload, WingsAppCreateResponse, WingsAppRebuildResponse, WingsContainerMetric, WingsDatabaseCertificate, WingsDatabaseCreateResponse, WingsDatabaseRebuildResponse, WingsDatabaseResetResponse, WingsFileUploadResponse, WingsSnapshotRestoreResponse } from \"../../v1\";\n\n/** @see Wing: POST /api/v1/apps */\nexport type WingPostAppCreateResponse = WingPayload<WingsAppCreateResponse>;\n\n/** @see Wing: POST /api/v1/apps/:app_id/rebuild */\nexport type WingPostAppRebuildResponse = WingPayload<WingsAppRebuildResponse>;\n\n/** @see Wing: GET /api/v1/apps/:app_id/status */\nexport type WingGetAppStatusResponse = WingPayload<WingsContainerMetric>;\n\n/** @see Wing: POST /api/v1/apps/status */\nexport type WingPostAppAllStatusResponse = WingPayload<WingsContainerMetric[]>;\n\n/** @see Wing: GET /api/v1/apps/:app_id/logs */\nexport type WingGetAppLogsResponse = WingPayload<string>;\n\n/** @see Wing: GET /api/v1/apps/:app_id/download */\nexport type WingGetAppDownloadResponse = WingPayload<string>;\n\n/** @see Wing: POST /api/v1/apps/:app_id/files/upload */\nexport type WingPostAppFileUploadResponse = WingPayload<WingsFileUploadResponse>;\n\n/** @see Wing: POST /api/v1/databases */\nexport type WingPostDatabaseCreateResponse = WingPayload<WingsDatabaseCreateResponse>;\n\n/** @see Wing: POST /api/v1/databases/:db_id/rebuild */\nexport type WingPostDatabaseRebuildResponse = WingPayload<WingsDatabaseRebuildResponse>;\n\n/** @see Wing: GET /api/v1/databases/:db_id/status */\nexport type WingGetDatabaseStatusResponse = WingPayload<WingsContainerMetric>;\n\n/** @see Wing: POST /api/v1/databases/status */\nexport type WingPostDatabaseAllStatusResponse = WingPayload<WingsContainerMetric[]>;\n\n/** @see Wing: GET /api/v1/databases/:db_id/certificate */\nexport type WingGetDatabaseCertificateResponse = WingPayload<WingsDatabaseCertificate>;\n\n/** @see Wing: POST /api/v1/databases/:db_id/certificate/reset */\nexport type WingPostDatabaseResetCertificateResponse = WingPayload<WingsDatabaseCertificate>;\n\n/** @see Wing: POST /api/v1/databases/:db_id/reset */\nexport type WingPostDatabaseResetResponse = WingPayload<WingsDatabaseResetResponse>;\n\n/** @see Wing: POST /api/v1/apps/:app_id/snapshots/:snapshot_id/restore */\nexport type WingPostSnapshotRestoreResponse = WingPayload<WingsSnapshotRestoreResponse>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["wing.ts"],"sourcesContent":["import type { WingPayload, WingsAppCreateResponse, WingsAppDeployResponse, WingsAppRebuildResponse, WingsContainerMetric, WingsDatabaseCertificate, WingsDatabaseCreateResponse, WingsDatabaseRebuildResponse, WingsDatabaseResetResponse, WingsFileUploadResponse, WingsSnapshotRestoreResponse } from \"../../v1\";\n\n/** @see Wing: POST /api/v1/apps */\nexport type WingPostAppCreateResponse = WingPayload<WingsAppCreateResponse>;\n\n/** @see Wing: POST /api/v1/apps/:app_id/deploy */\nexport type WingPostAppDeployResponse = WingPayload<WingsAppDeployResponse>;\n\n/** @see Wing: POST /api/v1/apps/:app_id/rebuild */\nexport type WingPostAppRebuildResponse = WingPayload<WingsAppRebuildResponse>;\n\n/** @see Wing: GET /api/v1/apps/:app_id/status */\nexport type WingGetAppStatusResponse = WingPayload<WingsContainerMetric>;\n\n/** @see Wing: POST /api/v1/apps/status */\nexport type WingPostAppAllStatusResponse = WingPayload<WingsContainerMetric[]>;\n\n/** @see Wing: GET /api/v1/apps/:app_id/logs */\nexport type WingGetAppLogsResponse = WingPayload<string>;\n\n/** @see Wing: GET /api/v1/apps/:app_id/download */\nexport type WingGetAppDownloadResponse = WingPayload<string>;\n\n/** @see Wing: POST /api/v1/apps/:app_id/files/upload */\nexport type WingPostAppFileUploadResponse = WingPayload<WingsFileUploadResponse>;\n\n/** @see Wing: POST /api/v1/databases */\nexport type WingPostDatabaseCreateResponse = WingPayload<WingsDatabaseCreateResponse>;\n\n/** @see Wing: POST /api/v1/databases/:db_id/rebuild */\nexport type WingPostDatabaseRebuildResponse = WingPayload<WingsDatabaseRebuildResponse>;\n\n/** @see Wing: GET /api/v1/databases/:db_id/status */\nexport type WingGetDatabaseStatusResponse = WingPayload<WingsContainerMetric>;\n\n/** @see Wing: POST /api/v1/databases/status */\nexport type WingPostDatabaseAllStatusResponse = WingPayload<WingsContainerMetric[]>;\n\n/** @see Wing: GET /api/v1/databases/:db_id/certificate */\nexport type WingGetDatabaseCertificateResponse = WingPayload<WingsDatabaseCertificate>;\n\n/** @see Wing: POST /api/v1/databases/:db_id/certificate/reset */\nexport type WingPostDatabaseResetCertificateResponse = WingPayload<WingsDatabaseCertificate>;\n\n/** @see Wing: POST /api/v1/databases/:db_id/reset */\nexport type WingPostDatabaseResetResponse = WingPayload<WingsDatabaseResetResponse>;\n\n/** @see Wing: POST /api/v1/apps/:app_id/snapshots/:snapshot_id/restore */\nexport type WingPostSnapshotRestoreResponse = WingPayload<WingsSnapshotRestoreResponse>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/v1.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { APIRedeemResponse } from './payloads/v1/redeem.js';
|
|
|
9
9
|
export { APIGroupedResourceSnapshots, APIResourceSnapshot, APISnapshotRestoreResponse, ResourceType } from './payloads/v1/snapshot.js';
|
|
10
10
|
export { APIStatus, StatusType } from './payloads/v1/status.js';
|
|
11
11
|
export { APIUser, APIUserApiKey, APIUserConnection, APIUserInfoResponse, APIUserPlan, APIUserPlanMemory, APIUserSession, APIUserWorkspaceInviteKey } from './payloads/v1/user.js';
|
|
12
|
-
export { APIPayloadStatus, WingPayload, WingServiceResult, WingsAppCreateResponse, WingsAppRebuildResponse, WingsContainerMetric, WingsDatabaseCertificate, WingsDatabaseCreateResponse, WingsDatabaseRebuildResponse, WingsDatabaseResetResponse, WingsFileMoveResponse, WingsFileUploadResponse, WingsSnapshotRestoreResponse } from './payloads/v1/wing.js';
|
|
12
|
+
export { APIPayloadStatus, WingPayload, WingServiceResult, WingsAppCreateResponse, WingsAppDeployResponse, WingsAppRebuildResponse, WingsContainerMetric, WingsDatabaseCertificate, WingsDatabaseCreateResponse, WingsDatabaseRebuildResponse, WingsDatabaseResetResponse, WingsFileMoveResponse, WingsFileUploadResponse, WingsSnapshotRestoreResponse } from './payloads/v1/wing.js';
|
|
13
13
|
export { APIWorkspace, APIWorkspaceInfoResponse, APIWorkspaceMember, APIWorkspaceMemberAdd, APIWorkspaceMemberRoleUpdate, WorkspaceMemberRole } from './payloads/v1/workspace.js';
|
|
14
14
|
export { RESTGetAPIActivitiesResponse, RESTGetAPIActivityResponse } from './rest/v1/activity.js';
|
|
15
15
|
export { RESTDeleteAPIApplicationResponse, RESTGetAPIApplicationDeploymentsResponse, RESTGetAPIApplicationDnsRecordsResponse, RESTGetAPIApplicationDownloadResponse, RESTGetAPIApplicationEnvironmentResponse, RESTGetAPIApplicationFileContentResponse, RESTGetAPIApplicationFilesResponse, RESTGetAPIApplicationLogsResponse, RESTGetAPIApplicationMetricsResponse, RESTGetAPIApplicationRealtimeResponse, RESTGetAPIApplicationResponse, RESTGetAPIApplicationRestartResponse, RESTGetAPIApplicationStartResponse, RESTGetAPIApplicationStatusResponse, RESTGetAPIApplicationStatusShortResponse, RESTGetAPIApplicationStopResponse, RESTGetAPIApplicationWebhookUrlResponse, RESTPatchAPIApplicationSubdomainResponse, RESTPostAPIApplicationCreateResponse, RESTPostAPIApplicationCustomDomainResponse, RESTPostAPIApplicationRestartResponse, RESTPostAPIApplicationStartResponse, RESTPostAPIApplicationStopResponse, RESTPostAPIApplicationUpdateConfigResponse } from './rest/v1/application.js';
|
|
@@ -21,6 +21,6 @@ export { RESTPostAPIRedeemResponse } from './rest/v1/redeem.js';
|
|
|
21
21
|
export { RESTGetAPIGroupedSnapshotsResponse, RESTGetAPISnapshotDownloadResponse, RESTGetAPISnapshotResponse, RESTGetAPISnapshotsResponse, RESTPostAPISnapshotCreateResponse, RESTPostAPISnapshotRestoreResponse } from './rest/v1/snapshot.js';
|
|
22
22
|
export { RESTGetAPIStatusResponse } from './rest/v1/status.js';
|
|
23
23
|
export { RESTGetAPIUserInfoResponse, RESTGetAPIUserSessionsResponse, RESTPostAPIUserDowngradeResponse, RESTPostAPIUserGenerateApiKeyResponse } from './rest/v1/user.js';
|
|
24
|
-
export { WingGetAppDownloadResponse, WingGetAppLogsResponse, WingGetAppStatusResponse, WingGetDatabaseCertificateResponse, WingGetDatabaseStatusResponse, WingPostAppAllStatusResponse, WingPostAppCreateResponse, WingPostAppFileUploadResponse, WingPostAppRebuildResponse, WingPostDatabaseAllStatusResponse, WingPostDatabaseCreateResponse, WingPostDatabaseRebuildResponse, WingPostDatabaseResetCertificateResponse, WingPostDatabaseResetResponse, WingPostSnapshotRestoreResponse } from './rest/v1/wing.js';
|
|
24
|
+
export { WingGetAppDownloadResponse, WingGetAppLogsResponse, WingGetAppStatusResponse, WingGetDatabaseCertificateResponse, WingGetDatabaseStatusResponse, WingPostAppAllStatusResponse, WingPostAppCreateResponse, WingPostAppDeployResponse, WingPostAppFileUploadResponse, WingPostAppRebuildResponse, WingPostDatabaseAllStatusResponse, WingPostDatabaseCreateResponse, WingPostDatabaseRebuildResponse, WingPostDatabaseResetCertificateResponse, WingPostDatabaseResetResponse, WingPostSnapshotRestoreResponse } from './rest/v1/wing.js';
|
|
25
25
|
export { RESTDeleteAPIWorkspaceResponse, RESTGetAPIWorkspaceInfoResponse, RESTGetAPIWorkspaceResponse, RESTGetAPIWorkspacesResponse, RESTPostAPIWorkspaceCreateResponse, RESTPostAPIWorkspaceMemberAddResponse, RESTPutAPIWorkspaceMemberRoleResponse, RESTPutAPIWorkspaceUpdateResponse } from './rest/v1/workspace.js';
|
|
26
26
|
export { Brand, Prettify } from './utils.js';
|
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\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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationOperationResponse {\n\tstatus: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationDeployment {\n\tapp_id: SnowFlake;\n\tcommit_id: string;\n\tmessage: string;\n\tpusher: string;\n\tbranch: string;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIDnsRecord {\n\ttype: string;\n\tname: string;\n\tvalue: string;\n\tstatus: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIWebhookUrl {\n\turl: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APISubdomainResponse {\n\tsubdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APICustomDomainResponse {\n\tdomain: string;\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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabasePasswordReset {\n\tpassword: string;\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/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport interface APISnapshotRestoreResponse {\n\tmessage: string;\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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceMemberAdd {\n\tid: string;\n\temail: string;\n\trole: WorkspaceMemberRole;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceMemberRoleUpdate {\n\tuser_id: string;\n\trole: WorkspaceMemberRole;\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\";\nimport type { LocalizedContent } from \"./notification\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/activities\n */\nexport type ActivityStatus = \"success\" | \"warning\" | \"error\" | \"info\";\nexport const ActivityStatus = {\n\tSuccess: \"success\",\n\tWarning: \"warning\",\n\tError: \"error\",\n\tInfo: \"info\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/activities\n */\nexport type ActivityTargetType = \"app\" | \"database\" | \"workspace\" | \"audit\";\nexport const ActivityTargetType = {\n\tApp: \"app\",\n\tDatabase: \"database\",\n\tWorkspace: \"workspace\",\n\tAudit: \"audit\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/activities\n */\nexport interface APIActivity {\n\tid: SnowFlake;\n\tstatus: ActivityStatus;\n\ttarget_id: string;\n\ttarget_type: ActivityTargetType;\n\tauthor_id: SnowFlake | null;\n\ttitle: LocalizedContent;\n\tmessage: LocalizedContent;\n\ttimestamp: ISODateString;\n}\n","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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationOperationResponse {\n\tstatus: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationDeployment {\n\tapp_id: SnowFlake;\n\tcommit_id: string;\n\tmessage: string;\n\tpusher: string;\n\tbranch: string;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIDnsRecord {\n\ttype: string;\n\tname: string;\n\tvalue: string;\n\tstatus: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIWebhookUrl {\n\turl: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APISubdomainResponse {\n\tsubdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APICustomDomainResponse {\n\tdomain: string;\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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport interface APIDatabasePasswordReset {\n\tpassword: string;\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/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/snapshots\n */\nexport interface APISnapshotRestoreResponse {\n\tmessage: string;\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\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceMemberAdd {\n\tid: string;\n\temail: string;\n\trole: WorkspaceMemberRole;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/workspaces\n */\nexport interface APIWorkspaceMemberRoleUpdate {\n\tuser_id: string;\n\trole: WorkspaceMemberRole;\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;;;AC7DO,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;;;ACjBO,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":[]}
|