Skip to content

Commit 0326602

Browse files
Add initial Vercel plugin dataStreams and dashboards
1 parent 6c9ac76 commit 0326602

30 files changed

Lines changed: 2196 additions & 0 deletions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"steps": [
3+
{
4+
"displayName": "Authenticate",
5+
"dataStream": { "name": "currentUser" },
6+
"required": true,
7+
"error": "Could not authenticate with Vercel. Check that your API Token is valid and has not expired.",
8+
"success": "Connected to Vercel successfully."
9+
}
10+
]
11+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[
2+
{
3+
"name": "Vercel Project",
4+
"sourceType": "Vercel Project",
5+
"icon": "rocket",
6+
"singular": "Project",
7+
"plural": "Projects"
8+
},
9+
{
10+
"name": "Vercel Domain",
11+
"sourceType": "Vercel Domain",
12+
"icon": "globe",
13+
"singular": "Domain",
14+
"plural": "Domains"
15+
}
16+
]
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "activity",
3+
"displayName": "Activity",
4+
"description": "Vercel account or team activity feed, one row per audit-style event. Backs activity and audit log tiles",
5+
"tags": ["Activity"],
6+
"baseDataSourceName": "httpRequestUnscoped",
7+
"config": {
8+
"httpMethod": "get",
9+
"endpointPath": "v3/events",
10+
"pathToData": "events",
11+
"expandInnerObjects": true,
12+
"getArgs": [
13+
{ "key": "since", "value": "{{timeframe.start}}" },
14+
{ "key": "until", "value": "{{timeframe.end}}" },
15+
{ "key": "limit", "value": "100" }
16+
],
17+
"paging": { "mode": "none" }
18+
},
19+
"matches": "none",
20+
"metadata": [
21+
{ "name": "id", "displayName": "ID", "role": "id", "visible": false },
22+
{ "name": "type", "displayName": "Type" },
23+
{ "name": "text", "displayName": "Summary", "role": "label" },
24+
{
25+
"name": "actor",
26+
"displayName": "Actor",
27+
"computed": true,
28+
"valueExpression": "{{ $['user.username'] || $['user.email'] || $['userId'] }}"
29+
},
30+
{ "name": "user.username", "displayName": "User", "visible": false },
31+
{ "name": "user.email", "displayName": "Email", "visible": false },
32+
{ "name": "userId", "displayName": "User ID", "visible": false },
33+
{ "name": "createdAt", "displayName": "Created", "shape": "date", "role": "timestamp" }
34+
],
35+
"timeframes": true
36+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"name": "cost",
3+
"displayName": "Cost",
4+
"description": "Vercel usage cost and consumption from the FOCUS billing endpoint, one row per daily charge",
5+
"tags": ["Cost", "Billing"],
6+
"baseDataSourceName": "httpRequestUnscoped",
7+
"config": {
8+
"httpMethod": "get",
9+
"endpointPath": "v1/billing/charges",
10+
"postRequestScript": "cost.js",
11+
"getArgs": [
12+
{ "key": "from", "value": "{{timeframe.start}}" },
13+
{ "key": "to", "value": "{{timeframe.end}}" }
14+
],
15+
"headers": [
16+
{
17+
"key": "Accept-Encoding",
18+
"value": "gzip"
19+
}
20+
]
21+
},
22+
"matches": "none",
23+
"metadata": [
24+
{
25+
"name": "service",
26+
"displayName": "Service",
27+
"shape": "string",
28+
"role": "label"
29+
},
30+
{
31+
"name": "billedCost",
32+
"displayName": "Billed Cost ($)",
33+
"shape": [
34+
"currency",
35+
{
36+
"code": "usd",
37+
"decimalPlaces": 2,
38+
"thousandsSeparator": true
39+
}
40+
],
41+
"role": "value"
42+
},
43+
{
44+
"name": "effectiveCost",
45+
"displayName": "Effective Cost ($)",
46+
"shape": [
47+
"currency",
48+
{
49+
"code": "usd",
50+
"decimalPlaces": 2,
51+
"thousandsSeparator": true
52+
}
53+
]
54+
},
55+
{ "name": "quantity", "displayName": "Quantity", "shape": "number" },
56+
{ "name": "unit", "displayName": "Unit", "shape": "string" },
57+
{
58+
"name": "projectName",
59+
"displayName": "Project",
60+
"shape": "string",
61+
"role": "label"
62+
},
63+
{
64+
"name": "periodStart",
65+
"displayName": "Period Start",
66+
"shape": "date",
67+
"role": "timestamp"
68+
}
69+
],
70+
"timeframes": ["last24hours", "last7days", "last30days", "thisMonth"]
71+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "currentUser",
3+
"displayName": "Current User",
4+
"description": "Returns the authenticated Vercel user. Used to validate the connection.",
5+
"tags": [],
6+
"baseDataSourceName": "httpRequestUnscoped",
7+
"config": {
8+
"httpMethod": "get",
9+
"endpointPath": "v2/user",
10+
"postRequestScript": "currentUser.js"
11+
},
12+
"matches": "none",
13+
"metadata": [
14+
{ "name": "id", "displayName": "ID", "visible": false },
15+
{ "name": "username", "displayName": "Username", "role": "label" },
16+
{ "name": "name", "displayName": "Name" },
17+
{ "name": "email", "displayName": "Email" }
18+
],
19+
"timeframes": false,
20+
"visibility": { "type": "hidden" }
21+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"name": "deployments",
3+
"displayName": "Deployments",
4+
"description": "Vercel deployments across the account or a selected project, one row per deployment. Backs deployment health and history tiles",
5+
"tags": ["Deployments"],
6+
"baseDataSourceName": "httpRequestUnscoped",
7+
"config": {
8+
"httpMethod": "get",
9+
"endpointPath": "v7/deployments",
10+
"postRequestScript": "deployments.js",
11+
"getArgs": [
12+
{ "key": "since", "value": "{{timeframe.unixStart * 1000}}" }
13+
],
14+
"paging": {
15+
"mode": "token",
16+
"pageSize": {
17+
"realm": "queryArg",
18+
"path": "limit",
19+
"value": "100"
20+
},
21+
"in": { "realm": "payload", "path": "pagination.next" },
22+
"out": { "realm": "queryArg", "path": "until" }
23+
}
24+
},
25+
"matches": "none",
26+
"ui": [
27+
{
28+
"type": "objects",
29+
"name": "project",
30+
"label": "Project (optional)",
31+
"matches": {
32+
"sourceType": { "type": "equals", "value": "Vercel Project" }
33+
}
34+
}
35+
],
36+
"metadata": [
37+
{
38+
"name": "uid",
39+
"displayName": "ID",
40+
"role": "value",
41+
"visible": false
42+
},
43+
{ "name": "name", "displayName": "Name", "role": "label" },
44+
{
45+
"name": "state",
46+
"displayName": "State",
47+
"shape": [
48+
"state",
49+
{
50+
"map": {
51+
"success": ["READY"],
52+
"error": ["ERROR", "CANCELED"],
53+
"warning": ["BUILDING", "QUEUED", "INITIALIZING"],
54+
"unknown": ["DELETED"]
55+
}
56+
}
57+
]
58+
},
59+
{ "name": "target", "displayName": "Target" },
60+
{ "name": "projectId", "displayName": "Project ID", "visible": false },
61+
{
62+
"name": "created",
63+
"displayName": "Created",
64+
"shape": "date",
65+
"role": "timestamp"
66+
},
67+
{ "name": "url", "displayName": "Url", "shape": "url" },
68+
{
69+
"name": "inspectorUrl",
70+
"displayName": "Inspector Url",
71+
"shape": "url"
72+
},
73+
{ "name": "creator", "displayName": "Creator" },
74+
{
75+
"name": "ready",
76+
"displayName": "Ready",
77+
"shape": "date",
78+
"role": "timestamp"
79+
},
80+
{
81+
"name": "buildingAt",
82+
"displayName": "Building At",
83+
"shape": "date",
84+
"role": "timestamp"
85+
},
86+
{
87+
"name": "createdAt",
88+
"displayName": "Created At",
89+
"shape": "date",
90+
"role": "timestamp"
91+
},
92+
{ "pattern": ".*" }
93+
],
94+
"timeframes": true
95+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "domainConfig",
3+
"displayName": "Domain Config",
4+
"description": "Configuration health for a single Vercel domain — whether DNS/nameservers are misconfigured, the service type, and who configured it",
5+
"tags": ["Domain"],
6+
"baseDataSourceName": "httpRequestScopedSingle",
7+
"config": {
8+
"httpMethod": "get",
9+
"endpointPath": "v6/domains/{{object.name}}/config"
10+
},
11+
"matches": { "sourceType": { "type": "equals", "value": "Vercel Domain" } },
12+
"metadata": [
13+
{ "name": "misconfigured", "displayName": "Misconfigured", "shape": "boolean" },
14+
{ "name": "serviceType", "displayName": "Service Type", "shape": "string" },
15+
{ "name": "configuredBy", "displayName": "Configured By", "shape": "string" }
16+
],
17+
"timeframes": false
18+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "domains",
3+
"displayName": "Domains",
4+
"description": "Lists Vercel custom domains in the configured account or team. Backs the Vercel Domain import and domain inventory tiles.",
5+
"tags": [],
6+
"baseDataSourceName": "httpRequestUnscoped",
7+
"config": {
8+
"httpMethod": "get",
9+
"endpointPath": "v5/domains",
10+
"pathToData": "domains",
11+
"paging": {
12+
"mode": "token",
13+
"pageSize": { "realm": "queryArg", "path": "limit", "value": "100" },
14+
"in": { "realm": "payload", "path": "pagination.next" },
15+
"out": { "realm": "queryArg", "path": "until" }
16+
}
17+
},
18+
"matches": "none",
19+
"metadata": [
20+
{ "name": "id", "displayName": "ID", "visible": false },
21+
{ "name": "sourceType", "computed": true, "valueExpression": "Vercel Domain", "visible": false },
22+
{ "name": "name", "displayName": "Domain", "role": "label" },
23+
{ "name": "verified", "displayName": "Verified" },
24+
{ "name": "serviceType", "displayName": "Service Type" },
25+
{ "name": "expiresAt", "displayName": "Expires", "shape": "date" },
26+
{ "name": "boughtAt", "displayName": "Bought", "shape": "date" },
27+
{ "name": "renew", "displayName": "Auto-renew" },
28+
{ "name": "createdAt", "displayName": "Created", "shape": "date" }
29+
],
30+
"timeframes": false
31+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"name": "firewallEvents",
3+
"displayName": "Firewall Events",
4+
"description": "Per-action firewall event counts over the timeframe for a single Vercel project, one row per time-bucket and action type",
5+
"tags": ["Security", "Firewall"],
6+
"baseDataSourceName": "httpRequestScopedSingle",
7+
"config": {
8+
"httpMethod": "get",
9+
"endpointPath": "v1/security/firewall/events",
10+
"getArgs": [
11+
{ "key": "projectId", "value": "{{object.rawId}}" },
12+
{
13+
"key": "startTimestamp",
14+
"value": "{{timeframe.unixStart * 1000}}"
15+
},
16+
{ "key": "endTimestamp", "value": "{{timeframe.unixEnd * 1000}}" }
17+
],
18+
"pathToData": "actions"
19+
},
20+
"matches": {
21+
"sourceType": { "type": "equals", "value": "Vercel Project" }
22+
},
23+
"metadata": [
24+
{
25+
"name": "startTime",
26+
"displayName": "Time",
27+
"shape": "date",
28+
"role": "timestamp"
29+
},
30+
{
31+
"name": "action",
32+
"displayName": "Action",
33+
"shape": "string",
34+
"role": "label"
35+
},
36+
{
37+
"name": "count",
38+
"displayName": "Count",
39+
"shape": "number",
40+
"role": "value"
41+
},
42+
{
43+
"name": "host",
44+
"displayName": "Host",
45+
"shape": "string"
46+
},
47+
{
48+
"name": "public_ip",
49+
"displayName": "Public IP",
50+
"shape": "string"
51+
},
52+
{
53+
"name": "action_type",
54+
"displayName": "Action Category",
55+
"shape": "string",
56+
"visible": false
57+
},
58+
{
59+
"name": "isActive",
60+
"displayName": "Active",
61+
"shape": "boolean",
62+
"visible": false
63+
},
64+
{
65+
"pattern": ".*"
66+
}
67+
],
68+
"timeframes": true
69+
}

0 commit comments

Comments
 (0)