Skip to content

Commit 9841657

Browse files
committed
adding a public api
1 parent 26024a3 commit 9841657

File tree

4 files changed

+623
-13
lines changed

4 files changed

+623
-13
lines changed

docs-website/src/lib/mdx-render-node.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const renderNode: RenderNode = (node, transform) => {
2020
<span className='dark:text-red-200 dark:bg-red-950/30 px-1 rounded font-mono text-[0.9em]'>{node.value}</span>
2121
)
2222
}
23+
2324
if (node.type === 'code') {
2425
const language = node.lang || ''
2526

website/CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# Changelog
22

3+
## 2025-01-25 11:00
4+
5+
- Refactor public REST API v1 with simplified architecture
6+
- Remove upsert route to keep API simpler
7+
- Add DELETE /api/v1/sites/:siteId/files endpoint to delete specific files from a site
8+
- Delete files from search API when deleting files
9+
- Update GET /api/v1/sites/:siteId to return docsJson from the site's branch
10+
- Assume sites have only one branch for API simplicity
11+
- All branch operations now use the first branch automatically
12+
- Import searchApi client for file deletion operations
13+
- Fix CloudflareClient method name from deleteDomain to removeDomain
14+
- Extract and export filesSchema for reuse across both internal and public APIs
15+
- Update /upsertSiteFromFiles route to use the exported filesSchema
16+
17+
## 2025-01-25 10:45
18+
19+
- Add public REST API v1 for external integrations
20+
- Create spiceflow-public-api.ts with versioned REST endpoints at /api/v1
21+
- Implement API key authentication using x-api-key header (uses existing CLI login sessions)
22+
- Add POST /api/v1/sites endpoint to create new documentation sites
23+
- Add POST /api/v1/sites/:siteId/sync endpoint to sync files to existing sites
24+
- Add POST /api/v1/sites/:siteId endpoint to update site configuration
25+
- Add GET /api/v1/sites endpoint to list all accessible sites
26+
- Add GET /api/v1/sites/:siteId endpoint to get site details
27+
- Add DELETE /api/v1/sites/:siteId endpoint to delete sites and associated domains
28+
- Reuse existing filesSchema from spiceflow.ts to avoid duplication
29+
- Remove response type definitions to keep routes flexible
30+
- Delete domains from Cloudflare when deleting sites
31+
- Reuse existing createSite and syncSite functions from internal implementation
32+
- Mount public API app to main spiceflow app
33+
- Include OpenAPI documentation support and proper error handling
34+
335
## 2025-01-25 09:25
436

537
- Add Google Search support as fallback when Firecrawl is not available

0 commit comments

Comments
 (0)