Skip to content

Commit 118d3b0

Browse files
committed
feat: add app and script asset namespace keys
1 parent 528c0b9 commit 118d3b0

20 files changed

Lines changed: 1192 additions & 63 deletions

docs-site/content/docs/api-reference/assets.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ full: true
66

77
{/* This file was generated by scripts/generate-docs.ts. Do not edit manually. */}
88

9-
<APIPage document={"../openapi.json"} operations={[{"path":"/api/assets","method":"get"},{"path":"/api/assets/{entityType}/{id}/key","method":"patch"},{"path":"/api/assets/key-audit","method":"get"},{"path":"/api/assets/mappings","method":"post"}]} />
9+
<APIPage document={"../openapi.json"} operations={[{"path":"/api/assets","method":"get"},{"path":"/api/assets/{entityType}/{id}/key","method":"patch"},{"path":"/api/assets/app/{id}/key","method":"patch"},{"path":"/api/assets/key-audit","method":"get"},{"path":"/api/assets/mappings","method":"post"},{"path":"/api/assets/script/{id}/key","method":"patch"}]} />

docs-site/content/docs/api-reference/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Complete REST API reference for agent-swarm.dev — 171 endpoints a
99

1010
Base URL: `http://localhost:3013`
1111

12-
345 endpoints across 44 categories.
12+
347 endpoints across 44 categories.
1313

1414
### Categories
1515

@@ -18,7 +18,7 @@ Base URL: `http://localhost:3013`
1818
- [Agents](/docs/api-reference/agents) — 12 endpoints
1919
- [ApprovalRequests](/docs/api-reference/approvalrequests) — 4 endpoints
2020
- [Apps](/docs/api-reference/apps) — 20 endpoints
21-
- [Assets](/docs/api-reference/assets)4 endpoints
21+
- [Assets](/docs/api-reference/assets)6 endpoints
2222
- [Budgets](/docs/api-reference/budgets) — 5 endpoints
2323
- [Config](/docs/api-reference/config) — 7 endpoints
2424
- [Debug](/docs/api-reference/debug) — 1 endpoint

docs-site/content/docs/api-reference/typescript.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "TypeScript Types"
3-
description: "Generate a fully type-safe TypeScript SDK from the agent-swarm.dev OpenAPI spec — typed request bodies, params, and response shapes for all 345 endpoints"
3+
description: "Generate a fully type-safe TypeScript SDK from the agent-swarm.dev OpenAPI spec — typed request bodies, params, and response shapes for all 347 endpoints"
44
---
55

66
{/* This file was generated by scripts/generate-docs.ts. Do not edit manually. */}
@@ -12,7 +12,7 @@ responses. Each operation page also shows its exact response type inline (the
1212

1313
## Pre-generated definitions
1414

15-
- [openapi.d.ts](/openapi.d.ts) — TypeScript definitions for all 345 operations (`paths` + `components`), generated with [openapi-typescript](https://openapi-ts.dev)
15+
- [openapi.d.ts](/openapi.d.ts) — TypeScript definitions for all 347 operations (`paths` + `components`), generated with [openapi-typescript](https://openapi-ts.dev)
1616
- [openapi.json](https://github.com/desplega-ai/agent-swarm/blob/main/openapi.json) — the spec itself (also served at `GET /openapi.json` by every running server)
1717

1818
## Generate your own

docs-site/public/openapi.d.ts

Lines changed: 179 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3174,7 +3174,7 @@ export interface paths {
31743174
/** @enum {string} */
31753175
code: "missing-key" | "noncanonical-key" | "unknown-personal-user" | "missing-provider-mapping" | "provider-mapping-drift";
31763176
/** @enum {string} */
3177-
entityType: "task" | "workflow" | "schedule" | "page" | "file";
3177+
entityType: "task" | "workflow" | "schedule" | "page" | "app" | "script" | "file";
31783178
entityId: string;
31793179
message: string;
31803180
}[];
@@ -3216,7 +3216,7 @@ export interface paths {
32163216
query?: {
32173217
/** @description Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form. */
32183218
keyPrefix?: string;
3219-
/** @description Comma-separated task,workflow,schedule,page,file list */
3219+
/** @description Comma-separated task,workflow,schedule,page,app,script,file list */
32203220
types?: string;
32213221
limit?: number;
32223222
};
@@ -3325,6 +3325,180 @@ export interface paths {
33253325
patch?: never;
33263326
trace?: never;
33273327
};
3328+
"/api/assets/app/{id}/key": {
3329+
parameters: {
3330+
query?: never;
3331+
header?: never;
3332+
path?: never;
3333+
cookie?: never;
3334+
};
3335+
get?: never;
3336+
put?: never;
3337+
post?: never;
3338+
delete?: never;
3339+
options?: never;
3340+
head?: never;
3341+
/** Move an app to another logical namespace */
3342+
patch: {
3343+
parameters: {
3344+
query?: never;
3345+
header?: never;
3346+
path: {
3347+
id: string;
3348+
};
3349+
cookie?: never;
3350+
};
3351+
requestBody?: {
3352+
content: {
3353+
"application/json": {
3354+
/** @description Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form. */
3355+
key: string;
3356+
};
3357+
};
3358+
};
3359+
responses: {
3360+
/** @description Asset namespace updated */
3361+
200: {
3362+
headers: {
3363+
[name: string]: unknown;
3364+
};
3365+
content: {
3366+
"application/json": {
3367+
/** @enum {string} */
3368+
entityType: "task" | "workflow" | "schedule" | "page" | "app" | "script" | "file";
3369+
id: string;
3370+
/** @description Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form. */
3371+
key: string;
3372+
};
3373+
};
3374+
};
3375+
/** @description Invalid namespace */
3376+
400: {
3377+
headers: {
3378+
[name: string]: unknown;
3379+
};
3380+
content: {
3381+
"application/json": components["schemas"]["ErrorResponse"];
3382+
};
3383+
};
3384+
/** @description Move not authorized */
3385+
403: {
3386+
headers: {
3387+
[name: string]: unknown;
3388+
};
3389+
content: {
3390+
"application/json": components["schemas"]["ErrorResponse"];
3391+
};
3392+
};
3393+
/** @description Asset not found */
3394+
404: {
3395+
headers: {
3396+
[name: string]: unknown;
3397+
};
3398+
content: {
3399+
"application/json": components["schemas"]["ErrorResponse"];
3400+
};
3401+
};
3402+
/** @description Moves blocked until audit warnings are repaired */
3403+
409: {
3404+
headers: {
3405+
[name: string]: unknown;
3406+
};
3407+
content: {
3408+
"application/json": components["schemas"]["ErrorResponse"];
3409+
};
3410+
};
3411+
};
3412+
};
3413+
trace?: never;
3414+
};
3415+
"/api/assets/script/{id}/key": {
3416+
parameters: {
3417+
query?: never;
3418+
header?: never;
3419+
path?: never;
3420+
cookie?: never;
3421+
};
3422+
get?: never;
3423+
put?: never;
3424+
post?: never;
3425+
delete?: never;
3426+
options?: never;
3427+
head?: never;
3428+
/** Move a script to another logical namespace */
3429+
patch: {
3430+
parameters: {
3431+
query?: never;
3432+
header?: never;
3433+
path: {
3434+
id: string;
3435+
};
3436+
cookie?: never;
3437+
};
3438+
requestBody?: {
3439+
content: {
3440+
"application/json": {
3441+
/** @description Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form. */
3442+
key: string;
3443+
};
3444+
};
3445+
};
3446+
responses: {
3447+
/** @description Asset namespace updated */
3448+
200: {
3449+
headers: {
3450+
[name: string]: unknown;
3451+
};
3452+
content: {
3453+
"application/json": {
3454+
/** @enum {string} */
3455+
entityType: "task" | "workflow" | "schedule" | "page" | "app" | "script" | "file";
3456+
id: string;
3457+
/** @description Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form. */
3458+
key: string;
3459+
};
3460+
};
3461+
};
3462+
/** @description Invalid namespace */
3463+
400: {
3464+
headers: {
3465+
[name: string]: unknown;
3466+
};
3467+
content: {
3468+
"application/json": components["schemas"]["ErrorResponse"];
3469+
};
3470+
};
3471+
/** @description Move not authorized */
3472+
403: {
3473+
headers: {
3474+
[name: string]: unknown;
3475+
};
3476+
content: {
3477+
"application/json": components["schemas"]["ErrorResponse"];
3478+
};
3479+
};
3480+
/** @description Asset not found */
3481+
404: {
3482+
headers: {
3483+
[name: string]: unknown;
3484+
};
3485+
content: {
3486+
"application/json": components["schemas"]["ErrorResponse"];
3487+
};
3488+
};
3489+
/** @description Moves blocked until audit warnings are repaired */
3490+
409: {
3491+
headers: {
3492+
[name: string]: unknown;
3493+
};
3494+
content: {
3495+
"application/json": components["schemas"]["ErrorResponse"];
3496+
};
3497+
};
3498+
};
3499+
};
3500+
trace?: never;
3501+
};
33283502
"/api/assets/{entityType}/{id}/key": {
33293503
parameters: {
33303504
query?: never;
@@ -3347,7 +3521,7 @@ export interface paths {
33473521
query?: never;
33483522
header?: never;
33493523
path: {
3350-
entityType: "task" | "workflow" | "schedule" | "page" | "file";
3524+
entityType: "task" | "workflow" | "schedule" | "page" | "app" | "script" | "file";
33513525
id: string;
33523526
};
33533527
cookie?: never;
@@ -3369,7 +3543,7 @@ export interface paths {
33693543
content: {
33703544
"application/json": {
33713545
/** @enum {string} */
3372-
entityType: "task" | "workflow" | "schedule" | "page" | "file";
3546+
entityType: "task" | "workflow" | "schedule" | "page" | "app" | "script" | "file";
33733547
id: string;
33743548
/** @description Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form. */
33753549
key: string;
@@ -19336,7 +19510,7 @@ export interface components {
1933619510
};
1933719511
AssetSummary: {
1933819512
/** @enum {string} */
19339-
entityType: "task" | "workflow" | "schedule" | "page" | "file";
19513+
entityType: "task" | "workflow" | "schedule" | "page" | "app" | "script" | "file";
1934019514
id: string;
1934119515
/** @description Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form. */
1934219516
key: string;

0 commit comments

Comments
 (0)