@vertracloud/api-types 0.0.38 → 0.0.39
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/credits.d.ts +27 -14
- package/payloads/v1/credits.js.map +1 -1
- package/payloads/v1/index.d.ts +1 -1
- package/v1.d.ts +1 -1
package/package.json
CHANGED
package/payloads/v1/credits.d.ts
CHANGED
|
@@ -1,28 +1,38 @@
|
|
|
1
1
|
import { ISODateString } from '../../common/v1.js';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/** Compute credit balance (for running apps/databases) */
|
|
4
|
+
interface APICreditCompute {
|
|
4
5
|
free: number;
|
|
5
6
|
paid: number;
|
|
6
|
-
|
|
7
|
+
free_per_month: number;
|
|
7
8
|
free_reset_at: ISODateString;
|
|
8
9
|
paid_expires_at: ISODateString | null;
|
|
9
10
|
}
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
/** AI credit balance (for AI features) */
|
|
12
|
+
interface APICreditAI {
|
|
12
13
|
free: number;
|
|
13
|
-
/** Compute credits (purchased) */
|
|
14
14
|
paid: number;
|
|
15
15
|
free_per_month: number;
|
|
16
16
|
free_reset_at: ISODateString;
|
|
17
17
|
paid_expires_at: ISODateString | null;
|
|
18
|
-
/** AI credits (monthly — all plans) */
|
|
19
|
-
ai_free: number;
|
|
20
|
-
/** AI credits (purchased) */
|
|
21
|
-
ai_paid: number;
|
|
22
|
-
ai_free_per_month: number;
|
|
23
|
-
ai_free_reset_at: ISODateString;
|
|
24
|
-
ai_paid_expires_at: ISODateString | null;
|
|
25
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* User credits summary returned in GET /v1/users/@me
|
|
21
|
+
*/
|
|
22
|
+
interface APIUserCredits {
|
|
23
|
+
compute: APICreditCompute;
|
|
24
|
+
ai: APICreditAI;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Full credit balance returned by GET /v1/credits/balance
|
|
28
|
+
*/
|
|
29
|
+
interface APICreditBalance {
|
|
30
|
+
compute: APICreditCompute;
|
|
31
|
+
ai: APICreditAI;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Single credit usage entry returned by GET /v1/credits/usage
|
|
35
|
+
*/
|
|
26
36
|
interface APICreditUsage {
|
|
27
37
|
id: string;
|
|
28
38
|
resource_id: string;
|
|
@@ -33,11 +43,14 @@ interface APICreditUsage {
|
|
|
33
43
|
description: string | null;
|
|
34
44
|
created_at: ISODateString;
|
|
35
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Cost estimation returned by GET /v1/credits/cost?ram={mb}
|
|
48
|
+
*/
|
|
36
49
|
interface APICreditCostEstimate {
|
|
37
50
|
ram_mb: number;
|
|
38
|
-
cost_per_hour: number;
|
|
39
51
|
cost_per_day: number;
|
|
40
52
|
cost_per_week: number;
|
|
53
|
+
cost_per_month: number;
|
|
41
54
|
}
|
|
42
55
|
|
|
43
|
-
export type { APICreditBalance, APICreditCostEstimate, APICreditUsage, APIUserCredits };
|
|
56
|
+
export type { APICreditAI, APICreditBalance, APICreditCompute, APICreditCostEstimate, APICreditUsage, APIUserCredits };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["credits.ts"],"sourcesContent":["import type { ISODateString } from \"../../v1\";\n\nexport interface
|
|
1
|
+
{"version":3,"sources":["credits.ts"],"sourcesContent":["import type { ISODateString } from \"../../v1\";\n\n/** Compute credit balance (for running apps/databases) */\nexport interface APICreditCompute {\n\tfree: number;\n\tpaid: number;\n\tfree_per_month: number;\n\tfree_reset_at: ISODateString;\n\tpaid_expires_at: ISODateString | null;\n}\n\n/** AI credit balance (for AI features) */\nexport interface APICreditAI {\n\tfree: number;\n\tpaid: number;\n\tfree_per_month: number;\n\tfree_reset_at: ISODateString;\n\tpaid_expires_at: ISODateString | null;\n}\n\n/**\n * User credits summary returned in GET /v1/users/@me\n */\nexport interface APIUserCredits {\n\tcompute: APICreditCompute;\n\tai: APICreditAI;\n}\n\n/**\n * Full credit balance returned by GET /v1/credits/balance\n */\nexport interface APICreditBalance {\n\tcompute: APICreditCompute;\n\tai: APICreditAI;\n}\n\n/**\n * Single credit usage entry returned by GET /v1/credits/usage\n */\nexport interface APICreditUsage {\n\tid: string;\n\tresource_id: string;\n\tresource_type: \"app\" | \"database\" | \"ai\";\n\tresource_name: string | null;\n\tcredit_type: \"free\" | \"paid\" | \"ai_free\" | \"ai_paid\";\n\tamount: number;\n\tdescription: string | null;\n\tcreated_at: ISODateString;\n}\n\n/**\n * Cost estimation returned by GET /v1/credits/cost?ram={mb}\n */\nexport interface APICreditCostEstimate {\n\tram_mb: number;\n\tcost_per_day: number;\n\tcost_per_week: number;\n\tcost_per_month: number;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/payloads/v1/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { APIActivity, ActivityStatus, ActivityTargetType } from './activity.js';
|
|
2
2
|
export { APIApplication, APIApplicationActivity, APIApplicationConfig, APIApplicationDeployment, APIApplicationEnvironment, APIApplicationFile, APIApplicationFileContent, APIApplicationFileTree, APIApplicationMetric, APIApplicationNetwork, APIApplicationOperationResponse, APIApplicationStatus, APIApplicationStatusShort, APICustomDomainResponse, APIDnsRecord, APISubdomainResponse, APIWebhookUrl, ApplicationCluster, ApplicationFileContentType, ApplicationFileType, ApplicationLanguage, ApplicationStatus, ApplicationType, ApplicationVersion } from './application.js';
|
|
3
|
-
export { APICreditBalance, APICreditCostEstimate, APICreditUsage, APIUserCredits } from './credits.js';
|
|
3
|
+
export { APICreditAI, APICreditBalance, APICreditCompute, APICreditCostEstimate, APICreditUsage, APIUserCredits } from './credits.js';
|
|
4
4
|
export { APIDatabase, APIDatabaseActivity, APIDatabaseMetrics, APIDatabaseNetwork, APIDatabasePasswordReset, APIDatabaseSnapshot, APIDatabaseStatus, APIDatabaseStatusShort, DatabaseCluster, DatabaseStatus, DatabaseType } from './database.js';
|
|
5
5
|
export { APINotification, LocalizedContent, NotificationImportance, NotificationType } from './notification.js';
|
|
6
6
|
export { APIOrderCreateResponse, APIOrderListItem, APIOrderStatus, APIPixPaymentResponse, OrderProvider, OrderStatus, OrderType } from './orders.js';
|
package/v1.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { APIHeaders, APIPaginatedPayload, APIPayload, APIPayloadMessageOnly, APIReturnService, APIVersion, DeepPartial, ISODateString, PaginationMeta, SnowFlake, UserPlan } from './common/v1.js';
|
|
2
2
|
export { APIActivity, ActivityStatus, ActivityTargetType } from './payloads/v1/activity.js';
|
|
3
3
|
export { APIApplication, APIApplicationActivity, APIApplicationConfig, APIApplicationDeployment, APIApplicationEnvironment, APIApplicationFile, APIApplicationFileContent, APIApplicationFileTree, APIApplicationMetric, APIApplicationNetwork, APIApplicationOperationResponse, APIApplicationStatus, APIApplicationStatusShort, APICustomDomainResponse, APIDnsRecord, APISubdomainResponse, APIWebhookUrl, ApplicationCluster, ApplicationFileContentType, ApplicationFileType, ApplicationLanguage, ApplicationStatus, ApplicationType, ApplicationVersion } from './payloads/v1/application.js';
|
|
4
|
-
export { APICreditBalance, APICreditCostEstimate, APICreditUsage, APIUserCredits } from './payloads/v1/credits.js';
|
|
4
|
+
export { APICreditAI, APICreditBalance, APICreditCompute, APICreditCostEstimate, APICreditUsage, APIUserCredits } from './payloads/v1/credits.js';
|
|
5
5
|
export { APIDatabase, APIDatabaseActivity, APIDatabaseMetrics, APIDatabaseNetwork, APIDatabasePasswordReset, APIDatabaseSnapshot, APIDatabaseStatus, APIDatabaseStatusShort, DatabaseCluster, DatabaseStatus, DatabaseType } from './payloads/v1/database.js';
|
|
6
6
|
export { APINotification, LocalizedContent, NotificationImportance, NotificationType } from './payloads/v1/notification.js';
|
|
7
7
|
export { APIOrderCreateResponse, APIOrderListItem, APIOrderStatus, APIPixPaymentResponse, OrderProvider, OrderStatus, OrderType } from './payloads/v1/orders.js';
|