Skip to content

Commit e1d1e03

Browse files
committed
add v4/events and Event Types V2 to sidebar
1 parent ebb5118 commit e1d1e03

3 files changed

Lines changed: 57 additions & 20 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ api-generate-all: venv
2424
&& ./scripts/api-generate-pages \
2525
'
2626

27-
.PHONY: boken-links
27+
.PHONY: broken-links
2828
broken-links:
29-
cd docs && npx mintlify broken-links
29+
python3 scripts/broken-links-check.py
3030

3131
.PHONY: lintlify
3232
lintlify: venv

docs/docs.json

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
"groups": [
1616
{
1717
"group": "Introduction",
18-
"pages": [
19-
"introduction/getting-started"
20-
]
18+
"pages": ["introduction/getting-started"]
2119
},
2220
{
2321
"group": "Base Concepts",
@@ -30,18 +28,11 @@
3028
},
3129
{
3230
"group": "SDK, MCP & CLI",
33-
"pages": [
34-
"sdk/python",
35-
"sdk/go",
36-
"sdk/cli",
37-
"sdk/mcp"
38-
]
31+
"pages": ["sdk/python", "sdk/go", "sdk/cli", "sdk/mcp"]
3932
},
4033
{
4134
"group": "Advanced",
42-
"pages": [
43-
"advanced/event-source-filters"
44-
]
35+
"pages": ["advanced/event-source-filters"]
4536
},
4637
{
4738
"group": "Guides",
@@ -80,6 +71,7 @@
8071
"group": "Events",
8172
"pages": [
8273
"api-reference/v2/endpoints/activities/get-fireworkv2activities-",
74+
"api-reference/v4/endpoints/get-event",
8375
"api-reference/v2/endpoints/activities/get-fireworkv2activities--ai_assistance",
8476
"api-reference/v4/endpoints/event-actions",
8577
"api-reference/v4/endpoints/public/update-tenant-metadata"
@@ -118,9 +110,7 @@
118110
},
119111
{
120112
"group": "Cookies",
121-
"pages": [
122-
"api-reference/astp/endpoints/post-cookies-search"
123-
]
113+
"pages": ["api-reference/astp/endpoints/post-cookies-search"]
124114
}
125115
]
126116
},
@@ -288,6 +278,22 @@
288278
"event-types/source-code",
289279
"event-types/stealer-log"
290280
]
281+
},
282+
{
283+
"group": "Events V2 (Beta)",
284+
"pages": [
285+
"event-types-v2/overview",
286+
"event-types-v2/blog-post",
287+
"event-types-v2/bucket",
288+
"event-types-v2/chat-message",
289+
"event-types-v2/domain",
290+
"event-types-v2/forum-post",
291+
"event-types-v2/listing",
292+
"event-types-v2/paste",
293+
"event-types-v2/ransom-leak",
294+
"event-types-v2/social-media-account",
295+
"event-types-v2/stealer-log"
296+
]
291297
}
292298
]
293299
},
@@ -296,9 +302,7 @@
296302
"groups": [
297303
{
298304
"group": "Changelog",
299-
"pages": [
300-
"changelog/overview"
301-
]
305+
"pages": ["changelog/overview"]
302306
}
303307
]
304308
}

scripts/broken-links-check.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Run mintlify broken-links while ignoring known false positives.
4+
5+
Temporarily replaces cursor:// deep links (valid but unresolvable by the
6+
checker) with an HTTPS placeholder, then restores the originals after the check.
7+
"""
8+
9+
import re
10+
import subprocess
11+
import sys
12+
13+
from pathlib import Path
14+
15+
16+
CURSOR_URL_RE = re.compile(r"cursor://\S+")
17+
PLACEHOLDER = "https://cursor.com"
18+
19+
docs_dir = Path(__file__).parent.parent / "docs"
20+
patched: dict[Path, str] = {}
21+
22+
for path in docs_dir.rglob("*.mdx"):
23+
original = path.read_text(encoding="utf-8")
24+
if CURSOR_URL_RE.search(original):
25+
patched[path] = original
26+
path.write_text(CURSOR_URL_RE.sub(PLACEHOLDER, original), encoding="utf-8")
27+
28+
try:
29+
result = subprocess.run(["npx", "mintlify", "broken-links"], cwd=docs_dir)
30+
sys.exit(result.returncode)
31+
finally:
32+
for path, original in patched.items():
33+
path.write_text(original, encoding="utf-8")

0 commit comments

Comments
 (0)