@vertracloud/api-types 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -40
- package/common/v1.d.ts +23 -7
- package/common/v1.js.map +1 -1
- package/package.json +5 -5
- package/payloads/v1/activity.d.ts +22 -10
- package/payloads/v1/activity.js +9 -0
- package/payloads/v1/activity.js.map +1 -1
- package/payloads/v1/activity.mjs +8 -0
- package/payloads/v1/api-error.d.ts +302 -0
- package/payloads/v1/api-error.js +216 -0
- package/payloads/v1/api-error.js.map +1 -0
- package/payloads/v1/api-error.mjs +188 -0
- package/payloads/v1/api-key.d.ts +88 -0
- package/payloads/v1/api-key.js +267 -0
- package/payloads/v1/api-key.js.map +1 -0
- package/payloads/v1/api-key.mjs +235 -0
- package/payloads/v1/application.d.ts +234 -47
- package/payloads/v1/application.js +34 -3
- package/payloads/v1/application.js.map +1 -1
- package/payloads/v1/application.mjs +28 -2
- package/payloads/v1/database-data.d.ts +329 -0
- package/payloads/v1/database-data.js +63 -0
- package/payloads/v1/database-data.js.map +1 -0
- package/payloads/v1/database-data.mjs +35 -0
- package/payloads/v1/database.d.ts +29 -31
- package/payloads/v1/database.js.map +1 -1
- package/payloads/v1/github.d.ts +20 -0
- package/{rest/v1/credits.js → payloads/v1/github.js} +4 -4
- package/payloads/v1/github.js.map +1 -0
- package/payloads/v1/github.mjs +1 -0
- package/payloads/v1/index.d.ts +12 -9
- package/payloads/v1/index.js +630 -10
- package/payloads/v1/index.js.map +1 -1
- package/payloads/v1/index.mjs +590 -9
- package/payloads/v1/notification.d.ts +2 -3
- package/payloads/v1/notification.js.map +1 -1
- package/payloads/v1/oauth.d.ts +27 -0
- package/payloads/v1/oauth.js +34 -0
- package/payloads/v1/oauth.js.map +1 -0
- package/payloads/v1/oauth.mjs +8 -0
- package/payloads/v1/orders.d.ts +52 -27
- package/payloads/v1/orders.js +30 -0
- package/payloads/v1/orders.js.map +1 -1
- package/payloads/v1/orders.mjs +21 -0
- package/payloads/v1/redeem.d.ts +1 -1
- package/payloads/v1/redeem.js.map +1 -1
- package/payloads/v1/snapshot.d.ts +37 -7
- package/payloads/v1/snapshot.js +8 -2
- package/payloads/v1/snapshot.js.map +1 -1
- package/payloads/v1/snapshot.mjs +6 -1
- package/payloads/v1/status.d.ts +2 -2
- package/payloads/v1/status.js.map +1 -1
- package/payloads/v1/user.d.ts +54 -20
- package/payloads/v1/user.js +16 -0
- package/payloads/v1/user.js.map +1 -1
- package/payloads/v1/user.mjs +9 -0
- package/payloads/v1/workspace.d.ts +296 -25
- package/payloads/v1/workspace.js +128 -8
- package/payloads/v1/workspace.js.map +1 -1
- package/payloads/v1/workspace.mjs +115 -7
- package/rest/v1/activity.d.ts +20 -9
- package/rest/v1/activity.js.map +1 -1
- package/rest/v1/api-key.d.ts +26 -0
- package/{payloads/v1/credits.js → rest/v1/api-key.js} +4 -4
- package/rest/v1/api-key.js.map +1 -0
- package/rest/v1/api-key.mjs +1 -0
- package/rest/v1/application.d.ts +302 -30
- package/rest/v1/application.js.map +1 -1
- package/rest/v1/database-data.d.ts +234 -0
- package/rest/v1/database-data.js +19 -0
- package/rest/v1/database-data.js.map +1 -0
- package/rest/v1/database-data.mjs +1 -0
- package/rest/v1/database.d.ts +55 -14
- package/rest/v1/database.js.map +1 -1
- package/rest/v1/github.d.ts +22 -0
- package/rest/v1/{wing.js → github.js} +4 -4
- package/rest/v1/github.js.map +1 -0
- package/rest/v1/github.mjs +1 -0
- package/rest/v1/index.d.ts +16 -11
- package/rest/v1/index.js.map +1 -1
- package/rest/v1/notification.d.ts +2 -3
- package/rest/v1/notification.js.map +1 -1
- package/rest/v1/oauth.d.ts +60 -0
- package/{payloads/v1/wing.js → rest/v1/oauth.js} +4 -4
- package/rest/v1/oauth.js.map +1 -0
- package/rest/v1/oauth.mjs +1 -0
- package/rest/v1/orders.d.ts +28 -7
- package/rest/v1/orders.js.map +1 -1
- package/rest/v1/redeem.d.ts +2 -1
- package/rest/v1/redeem.js.map +1 -1
- package/rest/v1/snapshot.d.ts +45 -10
- package/rest/v1/snapshot.js.map +1 -1
- package/rest/v1/status.d.ts +1 -0
- package/rest/v1/user.d.ts +56 -7
- package/rest/v1/user.js.map +1 -1
- package/rest/v1/workspace.d.ts +186 -18
- package/rest/v1/workspace.js.map +1 -1
- package/v1.d.ts +24 -19
- package/v1.js +630 -10
- package/v1.js.map +1 -1
- package/v1.mjs +590 -9
- package/payloads/v1/credits.d.ts +0 -56
- package/payloads/v1/credits.js.map +0 -1
- package/payloads/v1/credits.mjs +0 -1
- package/payloads/v1/wing.d.ts +0 -133
- package/payloads/v1/wing.js.map +0 -1
- package/payloads/v1/wing.mjs +0 -1
- package/rest/v1/credits.d.ts +0 -17
- package/rest/v1/credits.js.map +0 -1
- package/rest/v1/credits.mjs +0 -1
- package/rest/v1/wing.d.ts +0 -38
- package/rest/v1/wing.js.map +0 -1
- package/rest/v1/wing.mjs +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ISODateString } from '../../common/v1.js';
|
|
2
|
+
import './api-error.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* OAuth client registered dynamically (RFC 7591) to connect an external agent to the account.
|
|
6
|
+
* Public client: no secret, PKCE `S256` required.
|
|
7
|
+
* @see https://docs.vertracloud.app/api-reference/introduction#connecting-through-oauth
|
|
8
|
+
*/
|
|
9
|
+
interface APIOAuthClient {
|
|
10
|
+
client_id: string;
|
|
11
|
+
/** Name shown on the consent screen; the API key created on consent is named `oauth:<client_name>` (max. 40 characters). */
|
|
12
|
+
client_name: string;
|
|
13
|
+
/** Matched exactly on `authorize`; no wildcards. */
|
|
14
|
+
redirect_uris: string[];
|
|
15
|
+
created_at: ISODateString;
|
|
16
|
+
}
|
|
17
|
+
type APIOAuthCodeChallengeMethod = "S256";
|
|
18
|
+
declare const APIOAuthCodeChallengeMethod: {
|
|
19
|
+
readonly S256: "S256";
|
|
20
|
+
};
|
|
21
|
+
type APIOAuthConsentDecision = "approve" | "deny";
|
|
22
|
+
declare const APIOAuthConsentDecision: {
|
|
23
|
+
readonly Approve: "approve";
|
|
24
|
+
readonly Deny: "deny";
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { type APIOAuthClient, APIOAuthCodeChallengeMethod, APIOAuthConsentDecision };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// payloads/v1/oauth.ts
|
|
21
|
+
var oauth_exports = {};
|
|
22
|
+
__export(oauth_exports, {
|
|
23
|
+
APIOAuthCodeChallengeMethod: () => APIOAuthCodeChallengeMethod,
|
|
24
|
+
APIOAuthConsentDecision: () => APIOAuthConsentDecision
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(oauth_exports);
|
|
27
|
+
var APIOAuthCodeChallengeMethod = { S256: "S256" };
|
|
28
|
+
var APIOAuthConsentDecision = { Approve: "approve", Deny: "deny" };
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
APIOAuthCodeChallengeMethod,
|
|
32
|
+
APIOAuthConsentDecision
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=oauth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["oauth.ts"],"sourcesContent":["import type { ISODateString } from \"../../v1\";\n\n/**\n * OAuth client registered dynamically (RFC 7591) to connect an external agent to the account.\n * Public client: no secret, PKCE `S256` required.\n * @see https://docs.vertracloud.app/api-reference/introduction#connecting-through-oauth\n */\nexport interface APIOAuthClient {\n\tclient_id: string;\n\t/** Name shown on the consent screen; the API key created on consent is named `oauth:<client_name>` (max. 40 characters). */\n\tclient_name: string;\n\t/** Matched exactly on `authorize`; no wildcards. */\n\tredirect_uris: string[];\n\tcreated_at: ISODateString;\n}\n\nexport type APIOAuthCodeChallengeMethod = \"S256\";\nexport const APIOAuthCodeChallengeMethod = { S256: \"S256\" } as const;\n\nexport type APIOAuthConsentDecision = \"approve\" | \"deny\";\nexport const APIOAuthConsentDecision = { Approve: \"approve\", Deny: \"deny\" } as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBO,IAAM,8BAA8B,EAAE,MAAM,OAAO;AAGnD,IAAM,0BAA0B,EAAE,SAAS,WAAW,MAAM,OAAO;","names":[]}
|
package/payloads/v1/orders.d.ts
CHANGED
|
@@ -1,61 +1,84 @@
|
|
|
1
1
|
import { ISODateString } from '../../common/v1.js';
|
|
2
|
+
import './api-error.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
5
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order
|
|
5
6
|
*/
|
|
6
7
|
type OrderStatus = "unpaid" | "paid" | "cancelled" | "expired";
|
|
8
|
+
declare const OrderStatus: {
|
|
9
|
+
readonly UNPAID: "unpaid";
|
|
10
|
+
readonly PAID: "paid";
|
|
11
|
+
readonly CANCELLED: "cancelled";
|
|
12
|
+
readonly EXPIRED: "expired";
|
|
13
|
+
};
|
|
7
14
|
/**
|
|
8
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
15
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order
|
|
9
16
|
*/
|
|
10
|
-
type OrderType = "purchase" | "renew" | "upgrade"
|
|
17
|
+
type OrderType = "purchase" | "renew" | "upgrade";
|
|
18
|
+
declare const OrderType: {
|
|
19
|
+
readonly PURCHASE: "purchase";
|
|
20
|
+
readonly RENEW: "renew";
|
|
21
|
+
readonly UPGRADE: "upgrade";
|
|
22
|
+
};
|
|
11
23
|
/**
|
|
12
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
24
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order
|
|
13
25
|
*/
|
|
14
26
|
type OrderProvider = "pix" | "redeem_code";
|
|
27
|
+
declare const OrderProvider: {
|
|
28
|
+
readonly PIX: "pix";
|
|
29
|
+
readonly REDEEM_CODE: "redeem_code";
|
|
30
|
+
};
|
|
15
31
|
/**
|
|
16
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
32
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order
|
|
17
33
|
*/
|
|
18
34
|
interface APIOrderCreateResponse {
|
|
19
35
|
id: string;
|
|
20
36
|
code: string | null;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
37
|
+
/** Usually `"unpaid"`; `"paid"` right away when a coupon brings the price to zero. */
|
|
38
|
+
status: OrderStatus;
|
|
39
|
+
plan: string;
|
|
40
|
+
/** Duration in days. */
|
|
41
|
+
duration: number;
|
|
42
|
+
discount: APIOrderDiscount;
|
|
43
|
+
/** Final price, after the discount. */
|
|
25
44
|
price: number;
|
|
26
45
|
expires_at: ISODateString | null;
|
|
27
46
|
}
|
|
28
47
|
/**
|
|
29
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
48
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order
|
|
49
|
+
*/
|
|
50
|
+
interface APIOrderDiscount {
|
|
51
|
+
/** `null` when no coupon was applied. */
|
|
52
|
+
percent: number | null;
|
|
53
|
+
coupon: string | null;
|
|
54
|
+
/** Price before the discount. */
|
|
55
|
+
price: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/billing/order-status
|
|
30
59
|
*/
|
|
31
60
|
interface APIOrderStatus {
|
|
32
61
|
id: string;
|
|
33
|
-
status:
|
|
62
|
+
status: OrderStatus;
|
|
34
63
|
price: number;
|
|
35
64
|
related_to: {
|
|
36
|
-
|
|
37
|
-
amount: number;
|
|
38
|
-
};
|
|
39
|
-
plan?: {
|
|
65
|
+
plan: {
|
|
40
66
|
name: string;
|
|
41
67
|
months: number;
|
|
42
68
|
};
|
|
43
69
|
};
|
|
44
70
|
}
|
|
45
71
|
/**
|
|
46
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/orders
|
|
72
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/billing/list-orders
|
|
47
73
|
*/
|
|
48
74
|
interface APIOrderListItem {
|
|
49
75
|
id: string;
|
|
50
|
-
status:
|
|
76
|
+
status: OrderStatus;
|
|
51
77
|
price: number;
|
|
52
|
-
provider:
|
|
53
|
-
type:
|
|
78
|
+
provider: OrderProvider;
|
|
79
|
+
type: OrderType;
|
|
54
80
|
related_to: {
|
|
55
|
-
|
|
56
|
-
amount: number;
|
|
57
|
-
};
|
|
58
|
-
plan?: {
|
|
81
|
+
plan: {
|
|
59
82
|
name: string;
|
|
60
83
|
duration: number;
|
|
61
84
|
months: number;
|
|
@@ -65,10 +88,12 @@ interface APIOrderListItem {
|
|
|
65
88
|
paid_at: ISODateString | null;
|
|
66
89
|
}
|
|
67
90
|
/**
|
|
68
|
-
*
|
|
91
|
+
* PIX charge of an order (`POST /v1/orders/:orderId/initiate/pix`).
|
|
92
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/billing/initiate-pix
|
|
69
93
|
*/
|
|
70
|
-
interface
|
|
71
|
-
|
|
94
|
+
interface APIOrderPixPayment {
|
|
95
|
+
/** Amount charged, in BRL. */
|
|
96
|
+
transaction_amount: number;
|
|
72
97
|
external_reference: string | null;
|
|
73
98
|
txid: string;
|
|
74
99
|
qrcode: {
|
|
@@ -77,4 +102,4 @@ interface APIPixPaymentResponse {
|
|
|
77
102
|
};
|
|
78
103
|
}
|
|
79
104
|
|
|
80
|
-
export type
|
|
105
|
+
export { type APIOrderCreateResponse, type APIOrderDiscount, type APIOrderListItem, type APIOrderPixPayment, type APIOrderStatus, OrderProvider, OrderStatus, OrderType };
|
package/payloads/v1/orders.js
CHANGED
|
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
6
10
|
var __copyProps = (to, from, except, desc) => {
|
|
7
11
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
12
|
for (let key of __getOwnPropNames(from))
|
|
@@ -15,5 +19,31 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
15
19
|
|
|
16
20
|
// payloads/v1/orders.ts
|
|
17
21
|
var orders_exports = {};
|
|
22
|
+
__export(orders_exports, {
|
|
23
|
+
OrderProvider: () => OrderProvider,
|
|
24
|
+
OrderStatus: () => OrderStatus,
|
|
25
|
+
OrderType: () => OrderType
|
|
26
|
+
});
|
|
18
27
|
module.exports = __toCommonJS(orders_exports);
|
|
28
|
+
var OrderStatus = {
|
|
29
|
+
UNPAID: "unpaid",
|
|
30
|
+
PAID: "paid",
|
|
31
|
+
CANCELLED: "cancelled",
|
|
32
|
+
EXPIRED: "expired"
|
|
33
|
+
};
|
|
34
|
+
var OrderType = {
|
|
35
|
+
PURCHASE: "purchase",
|
|
36
|
+
RENEW: "renew",
|
|
37
|
+
UPGRADE: "upgrade"
|
|
38
|
+
};
|
|
39
|
+
var OrderProvider = {
|
|
40
|
+
PIX: "pix",
|
|
41
|
+
REDEEM_CODE: "redeem_code"
|
|
42
|
+
};
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
OrderProvider,
|
|
46
|
+
OrderStatus,
|
|
47
|
+
OrderType
|
|
48
|
+
});
|
|
19
49
|
//# sourceMappingURL=orders.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["orders.ts"],"sourcesContent":["import type { ISODateString } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
1
|
+
{"version":3,"sources":["orders.ts"],"sourcesContent":["import type { ISODateString } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport type OrderStatus = \"unpaid\" | \"paid\" | \"cancelled\" | \"expired\";\nexport const OrderStatus = {\n\tUNPAID: \"unpaid\",\n\tPAID: \"paid\",\n\tCANCELLED: \"cancelled\",\n\tEXPIRED: \"expired\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport type OrderType = \"purchase\" | \"renew\" | \"upgrade\";\nexport const OrderType = {\n\tPURCHASE: \"purchase\",\n\tRENEW: \"renew\",\n\tUPGRADE: \"upgrade\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport type OrderProvider = \"pix\" | \"redeem_code\";\nexport const OrderProvider = {\n\tPIX: \"pix\",\n\tREDEEM_CODE: \"redeem_code\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport interface APIOrderCreateResponse {\n\tid: string;\n\tcode: string | null;\n\t/** Usually `\"unpaid\"`; `\"paid\"` right away when a coupon brings the price to zero. */\n\tstatus: OrderStatus;\n\tplan: string;\n\t/** Duration in days. */\n\tduration: number;\n\tdiscount: APIOrderDiscount;\n\t/** Final price, after the discount. */\n\tprice: number;\n\texpires_at: ISODateString | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/create-order\n */\nexport interface APIOrderDiscount {\n\t/** `null` when no coupon was applied. */\n\tpercent: number | null;\n\tcoupon: string | null;\n\t/** Price before the discount. */\n\tprice: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/order-status\n */\nexport interface APIOrderStatus {\n\tid: string;\n\tstatus: OrderStatus;\n\tprice: number;\n\trelated_to: { plan: { name: string; months: number } };\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/list-orders\n */\nexport interface APIOrderListItem {\n\tid: string;\n\tstatus: OrderStatus;\n\tprice: number;\n\tprovider: OrderProvider;\n\ttype: OrderType;\n\trelated_to: { plan: { name: string; duration: number; months: number } };\n\tcreated_at: ISODateString;\n\tpaid_at: ISODateString | null;\n}\n\n/**\n * PIX charge of an order (`POST /v1/orders/:orderId/initiate/pix`).\n * @see https://docs.vertracloud.app/api-reference/endpoint/billing/initiate-pix\n */\nexport interface APIOrderPixPayment {\n\t/** Amount charged, in BRL. */\n\ttransaction_amount: number;\n\texternal_reference: string | null;\n\ttxid: string;\n\tqrcode: { copy: string | null; base64: string | null };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,cAAc;AAAA,EAC1B,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,WAAW;AAAA,EACX,SAAS;AACV;AAMO,IAAM,YAAY;AAAA,EACxB,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AACV;AAMO,IAAM,gBAAgB;AAAA,EAC5B,KAAK;AAAA,EACL,aAAa;AACd;","names":[]}
|
package/payloads/v1/orders.mjs
CHANGED
|
@@ -1 +1,22 @@
|
|
|
1
|
+
// payloads/v1/orders.ts
|
|
2
|
+
var OrderStatus = {
|
|
3
|
+
UNPAID: "unpaid",
|
|
4
|
+
PAID: "paid",
|
|
5
|
+
CANCELLED: "cancelled",
|
|
6
|
+
EXPIRED: "expired"
|
|
7
|
+
};
|
|
8
|
+
var OrderType = {
|
|
9
|
+
PURCHASE: "purchase",
|
|
10
|
+
RENEW: "renew",
|
|
11
|
+
UPGRADE: "upgrade"
|
|
12
|
+
};
|
|
13
|
+
var OrderProvider = {
|
|
14
|
+
PIX: "pix",
|
|
15
|
+
REDEEM_CODE: "redeem_code"
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
OrderProvider,
|
|
19
|
+
OrderStatus,
|
|
20
|
+
OrderType
|
|
21
|
+
};
|
|
1
22
|
//# sourceMappingURL=orders.mjs.map
|
package/payloads/v1/redeem.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["redeem.ts"],"sourcesContent":["/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/redeem\n */\nexport interface APIRedeemResponse {\n\tplan: {\n\t\tname: string;\n\t\tduration: number;\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["redeem.ts"],"sourcesContent":["/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/redeem/redeem\n */\nexport interface APIRedeemResponse {\n\tplan: {\n\t\tname: string;\n\t\tduration: number;\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { SnowFlake, ISODateString } from '../../common/v1.js';
|
|
2
|
+
import { ApplicationType } from './application.js';
|
|
3
|
+
import { DatabaseType } from './database.js';
|
|
4
|
+
import './api-error.js';
|
|
2
5
|
|
|
3
6
|
/**
|
|
4
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/snapshots
|
|
7
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots
|
|
5
8
|
*/
|
|
6
9
|
type ResourceType = 1 | 2;
|
|
7
10
|
declare const ResourceType: {
|
|
@@ -9,31 +12,58 @@ declare const ResourceType: {
|
|
|
9
12
|
readonly DATABASE: 2;
|
|
10
13
|
};
|
|
11
14
|
/**
|
|
12
|
-
*
|
|
15
|
+
* `resource_type` of a snapshot: the resource's own type at snapshot time — `ApplicationType` for
|
|
16
|
+
* an application snapshot, `DatabaseType` (the engine) for a database snapshot.
|
|
17
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots
|
|
18
|
+
*/
|
|
19
|
+
type SnapshotResourceType = ApplicationType | DatabaseType;
|
|
20
|
+
/**
|
|
21
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots
|
|
13
22
|
*/
|
|
14
23
|
interface APIResourceSnapshot {
|
|
15
24
|
id: SnowFlake;
|
|
16
25
|
resource_id: SnowFlake;
|
|
17
26
|
author_id: SnowFlake | null;
|
|
18
|
-
resource_type:
|
|
27
|
+
resource_type: SnapshotResourceType | null;
|
|
19
28
|
size: string;
|
|
20
29
|
date: ISODateString;
|
|
30
|
+
/**
|
|
31
|
+
* Name the resource had when this snapshot was taken — frozen: it does not follow renames and
|
|
32
|
+
* is kept after the project is deleted. `null` for snapshots taken before this field existed.
|
|
33
|
+
* For the CURRENT resource name, use `APIGroupedResourceSnapshots.resource_name`.
|
|
34
|
+
*/
|
|
35
|
+
resource_name: string | null;
|
|
21
36
|
}
|
|
22
37
|
/**
|
|
23
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/snapshots
|
|
38
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots
|
|
24
39
|
*/
|
|
25
40
|
interface APIGroupedResourceSnapshots {
|
|
26
41
|
resource_id: SnowFlake;
|
|
42
|
+
/**
|
|
43
|
+
* CURRENT resource name. If the resource was deleted, falls back to the `resource_name` of the
|
|
44
|
+
* group's most recent snapshot; `null` only when neither exists.
|
|
45
|
+
*/
|
|
27
46
|
resource_name: string | null;
|
|
28
47
|
type: ResourceType;
|
|
29
|
-
resource_type:
|
|
48
|
+
resource_type: SnapshotResourceType | null;
|
|
30
49
|
snapshots: APIResourceSnapshot[];
|
|
31
50
|
}
|
|
32
51
|
/**
|
|
33
|
-
*
|
|
52
|
+
* Query of the snapshot routes under `/v1/users/...`: which kind of resource the snapshot belongs
|
|
53
|
+
* to. Required — a missing `scope` returns 400.
|
|
54
|
+
*
|
|
55
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots
|
|
56
|
+
*/
|
|
57
|
+
type SnapshotScope = "applications" | "databases";
|
|
58
|
+
declare const SnapshotScope: {
|
|
59
|
+
readonly APPLICATIONS: "applications";
|
|
60
|
+
readonly DATABASES: "databases";
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/snapshots/restore
|
|
34
64
|
*/
|
|
35
65
|
interface APISnapshotRestoreResponse {
|
|
36
66
|
message: string;
|
|
37
67
|
}
|
|
38
68
|
|
|
39
|
-
export { type APIGroupedResourceSnapshots, type APIResourceSnapshot, type APISnapshotRestoreResponse, ResourceType };
|
|
69
|
+
export { type APIGroupedResourceSnapshots, type APIResourceSnapshot, type APISnapshotRestoreResponse, ResourceType, type SnapshotResourceType, SnapshotScope };
|
package/payloads/v1/snapshot.js
CHANGED
|
@@ -20,15 +20,21 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// payloads/v1/snapshot.ts
|
|
21
21
|
var snapshot_exports = {};
|
|
22
22
|
__export(snapshot_exports, {
|
|
23
|
-
ResourceType: () => ResourceType
|
|
23
|
+
ResourceType: () => ResourceType,
|
|
24
|
+
SnapshotScope: () => SnapshotScope
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(snapshot_exports);
|
|
26
27
|
var ResourceType = {
|
|
27
28
|
APPLICATION: 1,
|
|
28
29
|
DATABASE: 2
|
|
29
30
|
};
|
|
31
|
+
var SnapshotScope = {
|
|
32
|
+
APPLICATIONS: "applications",
|
|
33
|
+
DATABASES: "databases"
|
|
34
|
+
};
|
|
30
35
|
// Annotate the CommonJS export names for ESM import in node:
|
|
31
36
|
0 && (module.exports = {
|
|
32
|
-
ResourceType
|
|
37
|
+
ResourceType,
|
|
38
|
+
SnapshotScope
|
|
33
39
|
});
|
|
34
40
|
//# sourceMappingURL=snapshot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["snapshot.ts"],"sourcesContent":["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:
|
|
1
|
+
{"version":3,"sources":["snapshot.ts"],"sourcesContent":["import type { ApplicationType, DatabaseType, ISODateString, SnowFlake } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport type ResourceType = 1 | 2;\nexport const ResourceType = {\n\tAPPLICATION: 1,\n\tDATABASE: 2,\n} as const;\n\n/**\n * `resource_type` of a snapshot: the resource's own type at snapshot time — `ApplicationType` for\n * an application snapshot, `DatabaseType` (the engine) for a database snapshot.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport type SnapshotResourceType = ApplicationType | DatabaseType;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport interface APIResourceSnapshot {\n\tid: SnowFlake;\n\tresource_id: SnowFlake;\n\tauthor_id: SnowFlake | null;\n\tresource_type: SnapshotResourceType | null;\n\tsize: string;\n\tdate: ISODateString;\n\t/**\n\t * Name the resource had when this snapshot was taken — frozen: it does not follow renames and\n\t * is kept after the project is deleted. `null` for snapshots taken before this field existed.\n\t * For the CURRENT resource name, use `APIGroupedResourceSnapshots.resource_name`.\n\t */\n\tresource_name: string | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport interface APIGroupedResourceSnapshots {\n\tresource_id: SnowFlake;\n\t/**\n\t * CURRENT resource name. If the resource was deleted, falls back to the `resource_name` of the\n\t * group's most recent snapshot; `null` only when neither exists.\n\t */\n\tresource_name: string | null;\n\ttype: ResourceType;\n\tresource_type: SnapshotResourceType | null;\n\tsnapshots: APIResourceSnapshot[];\n}\n\n/**\n * Query of the snapshot routes under `/v1/users/...`: which kind of resource the snapshot belongs\n * to. Required — a missing `scope` returns 400.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/snapshots\n */\nexport type SnapshotScope = \"applications\" | \"databases\";\nexport const SnapshotScope = {\n\tAPPLICATIONS: \"applications\",\n\tDATABASES: \"databases\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/snapshots/restore\n */\nexport interface APISnapshotRestoreResponse {\n\tmessage: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,eAAe;AAAA,EAC3B,aAAa;AAAA,EACb,UAAU;AACX;AAiDO,IAAM,gBAAgB;AAAA,EAC5B,cAAc;AAAA,EACd,WAAW;AACZ;","names":[]}
|
package/payloads/v1/snapshot.mjs
CHANGED
package/payloads/v1/status.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/status
|
|
2
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/services/status
|
|
3
3
|
*/
|
|
4
4
|
type StatusType = "healthy" | "degraded" | "unknown";
|
|
5
5
|
declare const StatusType: {
|
|
@@ -8,7 +8,7 @@ declare const StatusType: {
|
|
|
8
8
|
readonly UNKNOWN: "unknown";
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/status
|
|
11
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/services/status
|
|
12
12
|
*/
|
|
13
13
|
interface APIStatus {
|
|
14
14
|
status: StatusType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["status.ts"],"sourcesContent":["/**\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,aAAa;AAAA,EACzB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACV;","names":[]}
|
|
1
|
+
{"version":3,"sources":["status.ts"],"sourcesContent":["/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/services/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/services/status\n */\nexport interface APIStatus {\n\tstatus: StatusType;\n\tmessage: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,aAAa;AAAA,EACzB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACV;","names":[]}
|
package/payloads/v1/user.d.ts
CHANGED
|
@@ -1,44 +1,58 @@
|
|
|
1
|
-
import { UserPlan, ISODateString
|
|
1
|
+
import { UserPlan, ISODateString } from '../../common/v1.js';
|
|
2
2
|
import { APIApplication } from './application.js';
|
|
3
|
-
import { APIUserCredits } from './credits.js';
|
|
4
3
|
import { APIDatabase } from './database.js';
|
|
4
|
+
import { APIWorkspaceResourceOrganization } from './workspace.js';
|
|
5
|
+
import './api-error.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
+
* Dashboard and e-mail language of the account.
|
|
9
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/users/me
|
|
10
|
+
*/
|
|
11
|
+
type UserLanguage = "pt-br" | "en-us" | "es-es";
|
|
12
|
+
declare const UserLanguage: {
|
|
13
|
+
readonly PT_BR: "pt-br";
|
|
14
|
+
readonly EN_US: "en-us";
|
|
15
|
+
readonly ES_ES: "es-es";
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/users/me
|
|
8
19
|
*/
|
|
9
20
|
interface APIUser {
|
|
10
21
|
id: string;
|
|
11
22
|
name: string;
|
|
12
23
|
email: string;
|
|
13
24
|
plan_id: UserPlan;
|
|
14
|
-
language:
|
|
25
|
+
language: UserLanguage;
|
|
26
|
+
/** Accepts workspace invites by e-mail (`WORKSPACE_INVITES_DISABLED` when off). */
|
|
27
|
+
workspace_invites_enabled: boolean;
|
|
15
28
|
created_at: ISODateString;
|
|
16
29
|
updated_at: ISODateString;
|
|
17
30
|
}
|
|
18
31
|
interface APIUserConnection {
|
|
19
32
|
provider: string;
|
|
20
33
|
username: string;
|
|
21
|
-
created_at: ISODateString
|
|
34
|
+
created_at: ISODateString;
|
|
22
35
|
}
|
|
23
36
|
/**
|
|
24
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/users
|
|
37
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/users/me
|
|
25
38
|
*/
|
|
26
39
|
interface APIUserInfoResponse extends APIUser {
|
|
27
40
|
plan: APIUserPlan;
|
|
28
41
|
applications: APIApplication[];
|
|
29
42
|
databases: APIDatabase[];
|
|
30
43
|
connections: APIUserConnection[];
|
|
31
|
-
|
|
44
|
+
/** Saved resource organization (folders, favorites) of this account. */
|
|
45
|
+
resource_organization: APIWorkspaceResourceOrganization;
|
|
32
46
|
}
|
|
33
47
|
/**
|
|
34
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/users
|
|
48
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/users/me
|
|
35
49
|
*/
|
|
36
50
|
interface APIUserPlanMemory {
|
|
37
51
|
limit: number;
|
|
38
52
|
used: number;
|
|
39
53
|
}
|
|
40
54
|
/**
|
|
41
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/users
|
|
55
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/users/me
|
|
42
56
|
*/
|
|
43
57
|
interface APIUserPlan {
|
|
44
58
|
id: UserPlan;
|
|
@@ -48,15 +62,7 @@ interface APIUserPlan {
|
|
|
48
62
|
memory: APIUserPlanMemory;
|
|
49
63
|
}
|
|
50
64
|
/**
|
|
51
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/users
|
|
52
|
-
*/
|
|
53
|
-
interface APIUserWorkspaceInviteKey {
|
|
54
|
-
code: SnowFlake;
|
|
55
|
-
created_at: ISODateString;
|
|
56
|
-
expires_at: ISODateString;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/users
|
|
65
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/users/sessions
|
|
60
66
|
*/
|
|
61
67
|
interface APIUserSession {
|
|
62
68
|
id: string;
|
|
@@ -71,10 +77,38 @@ interface APIUserSession {
|
|
|
71
77
|
is_current: boolean;
|
|
72
78
|
}
|
|
73
79
|
/**
|
|
74
|
-
*
|
|
80
|
+
* Legacy response of `POST /me/generate-api-key` (CLI). Prefer `/me/api-keys`.
|
|
81
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/users/api-keys/create
|
|
75
82
|
*/
|
|
76
83
|
interface APIUserApiKey {
|
|
77
84
|
api_key: string;
|
|
78
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* A request made to the API with one of the user's keys. Dashboard only
|
|
88
|
+
* (`GET /v1/users/me/api-key/requests` rejects API key authentication). Kept for 30 days.
|
|
89
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/users/api-key-requests
|
|
90
|
+
*/
|
|
91
|
+
interface APIUserApiKeyRequestEvent {
|
|
92
|
+
id: string;
|
|
93
|
+
/** Public prefix of the key used; `null` if the key has been deleted. */
|
|
94
|
+
api_key_prefix: string | null;
|
|
95
|
+
api_key_id: string | null;
|
|
96
|
+
method: string;
|
|
97
|
+
/** Route pattern (`/v1/apps/:id`). */
|
|
98
|
+
route: string;
|
|
99
|
+
/** Concrete path, without the query string. */
|
|
100
|
+
path: string | null;
|
|
101
|
+
ip: string | null;
|
|
102
|
+
user_agent: string | null;
|
|
103
|
+
status: number;
|
|
104
|
+
duration_ms: number;
|
|
105
|
+
bytes_in: number | null;
|
|
106
|
+
bytes_out: number | null;
|
|
107
|
+
error_code: string | null;
|
|
108
|
+
/** Request/response body, only for routes that carry no secrets (lifecycle, config, snapshots, network); JSON ≤ 4 KB with secrets redacted. `null` for every other route. */
|
|
109
|
+
request_body: string | null;
|
|
110
|
+
response_body: string | null;
|
|
111
|
+
occurred_at: ISODateString;
|
|
112
|
+
}
|
|
79
113
|
|
|
80
|
-
export type
|
|
114
|
+
export { type APIUser, type APIUserApiKey, type APIUserApiKeyRequestEvent, type APIUserConnection, type APIUserInfoResponse, type APIUserPlan, type APIUserPlanMemory, type APIUserSession, UserLanguage };
|
package/payloads/v1/user.js
CHANGED
|
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
6
10
|
var __copyProps = (to, from, except, desc) => {
|
|
7
11
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
12
|
for (let key of __getOwnPropNames(from))
|
|
@@ -15,5 +19,17 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
15
19
|
|
|
16
20
|
// payloads/v1/user.ts
|
|
17
21
|
var user_exports = {};
|
|
22
|
+
__export(user_exports, {
|
|
23
|
+
UserLanguage: () => UserLanguage
|
|
24
|
+
});
|
|
18
25
|
module.exports = __toCommonJS(user_exports);
|
|
26
|
+
var UserLanguage = {
|
|
27
|
+
PT_BR: "pt-br",
|
|
28
|
+
EN_US: "en-us",
|
|
29
|
+
ES_ES: "es-es"
|
|
30
|
+
};
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
UserLanguage
|
|
34
|
+
});
|
|
19
35
|
//# sourceMappingURL=user.js.map
|
package/payloads/v1/user.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["user.ts"],"sourcesContent":["import type { ISODateString,
|
|
1
|
+
{"version":3,"sources":["user.ts"],"sourcesContent":["import type { ISODateString, UserPlan } from \"../../v1\";\nimport type { APIApplication, APIDatabase, APIWorkspaceResourceOrganization } from \"./index\";\n\n/**\n * Dashboard and e-mail language of the account.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport type UserLanguage = \"pt-br\" | \"en-us\" | \"es-es\";\nexport const UserLanguage = {\n\tPT_BR: \"pt-br\",\n\tEN_US: \"en-us\",\n\tES_ES: \"es-es\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport interface APIUser {\n\tid: string;\n\tname: string;\n\temail: string;\n\tplan_id: UserPlan;\n\tlanguage: UserLanguage;\n\t/** Accepts workspace invites by e-mail (`WORKSPACE_INVITES_DISABLED` when off). */\n\tworkspace_invites_enabled: boolean;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n}\n\nexport interface APIUserConnection {\n\tprovider: string;\n\tusername: string;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport interface APIUserInfoResponse extends APIUser {\n\tplan: APIUserPlan;\n\tapplications: APIApplication[];\n\tdatabases: APIDatabase[];\n\tconnections: APIUserConnection[];\n\t/** Saved resource organization (folders, favorites) of this account. */\n\tresource_organization: APIWorkspaceResourceOrganization;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport interface APIUserPlanMemory {\n\tlimit: number;\n\tused: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/me\n */\nexport interface APIUserPlan {\n\tid: UserPlan;\n\tname: string;\n\texpires_at: ISODateString | null;\n\tduration: number;\n\tmemory: APIUserPlanMemory;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/sessions\n */\nexport interface APIUserSession {\n\tid: string;\n\tuser_id: string;\n\tprovider: string;\n\tip_address: string | null;\n\tlocation: string | null;\n\tdevice: string | null;\n\texpires_at: ISODateString;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tis_current: boolean;\n}\n\n/**\n * Legacy response of `POST /me/generate-api-key` (CLI). Prefer `/me/api-keys`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/api-keys/create\n */\nexport interface APIUserApiKey {\n\tapi_key: string;\n}\n\n/**\n * A request made to the API with one of the user's keys. Dashboard only\n * (`GET /v1/users/me/api-key/requests` rejects API key authentication). Kept for 30 days.\n * @see https://docs.vertracloud.app/api-reference/endpoint/users/api-key-requests\n */\nexport interface APIUserApiKeyRequestEvent {\n\tid: string;\n\t/** Public prefix of the key used; `null` if the key has been deleted. */\n\tapi_key_prefix: string | null;\n\tapi_key_id: string | null;\n\tmethod: string;\n\t/** Route pattern (`/v1/apps/:id`). */\n\troute: string;\n\t/** Concrete path, without the query string. */\n\tpath: string | null;\n\tip: string | null;\n\tuser_agent: string | null;\n\tstatus: number;\n\tduration_ms: number;\n\tbytes_in: number | null;\n\tbytes_out: number | null;\n\terror_code: string | null;\n\t/** Request/response body, only for routes that carry no secrets (lifecycle, config, snapshots, network); JSON ≤ 4 KB with secrets redacted. `null` for every other route. */\n\trequest_body: string | null;\n\tresponse_body: string | null;\n\toccurred_at: ISODateString;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,IAAM,eAAe;AAAA,EAC3B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;","names":[]}
|