Skip to content

Commit 0298f5c

Browse files
Regenerate OpenAPI document and TypeScript SDK
1 parent a53f155 commit 0298f5c

15 files changed

Lines changed: 153 additions & 71 deletions

File tree

‎.github/fern/openapi/openapi.json‎

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,27 +1342,48 @@
13421342
},
13431343
"GetMeResponse": {
13441344
"properties": {
1345-
"email": {
1346-
"description": "User email from the ID token when connected; `\"default\"` when anonymous.",
1345+
"is_admin": {
1346+
"description": "Whether the caller has admin privileges.",
1347+
"type": "boolean"
1348+
},
1349+
"subject": {
1350+
"$ref": "#/components/schemas/GetMeSubject"
1351+
},
1352+
"tenant_id": {
1353+
"description": "Tenant scope for the authenticated caller.",
1354+
"type": "string"
1355+
}
1356+
},
1357+
"required": [
1358+
"tenant_id",
1359+
"subject",
1360+
"is_admin"
1361+
],
1362+
"type": "object"
1363+
},
1364+
"GetMeSubject": {
1365+
"properties": {
1366+
"display_name": {
1367+
"description": "Human-readable name for the caller.",
13471368
"type": "string"
13481369
},
1349-
"role": {
1350-
"description": "Caller role.",
1370+
"id": {
1371+
"description": "Stable subject identifier for the caller.",
13511372
"type": "string"
13521373
},
13531374
"type": {
1354-
"description": "Session kind: `default` when no valid OIDC session; `oidc-connected` after a successful browser login.",
1375+
"description": "Subject kind: interactive user or virtual account.",
13551376
"enum": [
1356-
"default",
1357-
"oidc-connected"
1377+
"user",
1378+
"virtualaccount"
13581379
],
13591380
"type": "string"
13601381
}
13611382
},
13621383
"required": [
1384+
"id",
13631385
"type",
1364-
"email",
1365-
"role"
1386+
"display_name"
13661387
],
13671388
"type": "object"
13681389
},
@@ -4823,14 +4844,14 @@
48234844
"securitySchemes": {
48244845
"BearerAuth": {
48254846
"bearerFormat": "JWT",
4826-
"description": "ID token (`Authorization: Bearer <id_token>`). Required on protected routes. Browser sessions may use the HttpOnly `id_token` cookie instead.",
4847+
"description": "Caller credential (`Authorization: Bearer <token>`). Required on protected routes when auth is enabled. Browser sessions may use the HttpOnly `id_token` or `accessToken` cookie instead.",
48274848
"scheme": "bearer",
48284849
"type": "http"
48294850
}
48304851
}
48314852
},
48324853
"info": {
4833-
"description": "HTTP API for the TrueForge agent server (`/api/v1`). Interactive docs are served at `/api/v1/docs` (OpenAPI JSON at `/api/v1/openapi.json`).\n\n**Authentication:** Standalone deployments (no OIDC) accept requests without credentials — middleware stamps a local default user. When OIDC is configured, protected routes require a valid `id_token` cookie or `Authorization: Bearer` ID token. There is no built-in API-key scheme; pass custom headers only if your reverse proxy or IdP layer requires them.\n\nCovers DB-backed sessions, the agent registry, settings catalogs, and model/MCP/skill/sandbox providers.",
4854+
"description": "HTTP API for the TrueForge agent server (`/api/v1`). Interactive docs are served at `/api/v1/docs` (OpenAPI JSON at `/api/v1/openapi.json`).\n\n**Authentication:** Standalone auth accepts requests without credentials — middleware stamps a local default user. When OIDC or TrueFoundry auth is configured, protected routes require a valid cookie or `Authorization: Bearer` token. There is no built-in API-key scheme; pass custom headers only if your reverse proxy or IdP layer requires them.\n\nCovers DB-backed sessions, the agent registry, settings catalogs, and model/MCP/skill/sandbox providers.",
48344855
"title": "TrueForge API",
48354856
"version": "0.2.0-rc.0"
48364857
},
@@ -5529,7 +5550,7 @@
55295550
},
55305551
"/api/v1/auth/me": {
55315552
"get": {
5532-
"description": "Returns the authenticated caller identity. When auth is enabled this requires a valid `id_token` cookie or `Authorization: Bearer` ID token (401 otherwise). When auth is disabled, returns the default identity.",
5553+
"description": "Returns the authenticated caller identity (`tenant_id`, `subject`, `is_admin`). When auth is enabled this requires a valid `id_token` cookie or `Authorization: Bearer` token (401 otherwise). When auth is disabled, returns the standalone default identity.",
55335554
"responses": {
55345555
"200": {
55355556
"content": {
@@ -5539,7 +5560,7 @@
55395560
}
55405561
}
55415562
},
5542-
"description": "Session type and identity for the current request."
5563+
"description": "Caller identity for the current request."
55435564
},
55445565
"401": {
55455566
"content": {
@@ -5549,7 +5570,7 @@
55495570
}
55505571
}
55515572
},
5552-
"description": "Auth is enabled and the request has no valid cookie or Bearer ID token."
5573+
"description": "Auth is enabled and the request has no valid cookie or Bearer token."
55535574
}
55545575
},
55555576
"summary": "Current session",

‎docs/openapi.json‎

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,27 +1342,48 @@
13421342
},
13431343
"GetMeResponse": {
13441344
"properties": {
1345-
"email": {
1346-
"description": "User email from the ID token when connected; `\"default\"` when anonymous.",
1345+
"is_admin": {
1346+
"description": "Whether the caller has admin privileges.",
1347+
"type": "boolean"
1348+
},
1349+
"subject": {
1350+
"$ref": "#/components/schemas/GetMeSubject"
1351+
},
1352+
"tenant_id": {
1353+
"description": "Tenant scope for the authenticated caller.",
1354+
"type": "string"
1355+
}
1356+
},
1357+
"required": [
1358+
"tenant_id",
1359+
"subject",
1360+
"is_admin"
1361+
],
1362+
"type": "object"
1363+
},
1364+
"GetMeSubject": {
1365+
"properties": {
1366+
"display_name": {
1367+
"description": "Human-readable name for the caller.",
13471368
"type": "string"
13481369
},
1349-
"role": {
1350-
"description": "Caller role.",
1370+
"id": {
1371+
"description": "Stable subject identifier for the caller.",
13511372
"type": "string"
13521373
},
13531374
"type": {
1354-
"description": "Session kind: `default` when no valid OIDC session; `oidc-connected` after a successful browser login.",
1375+
"description": "Subject kind: interactive user or virtual account.",
13551376
"enum": [
1356-
"default",
1357-
"oidc-connected"
1377+
"user",
1378+
"virtualaccount"
13581379
],
13591380
"type": "string"
13601381
}
13611382
},
13621383
"required": [
1384+
"id",
13631385
"type",
1364-
"email",
1365-
"role"
1386+
"display_name"
13661387
],
13671388
"type": "object"
13681389
},
@@ -4823,14 +4844,14 @@
48234844
"securitySchemes": {
48244845
"BearerAuth": {
48254846
"bearerFormat": "JWT",
4826-
"description": "ID token (`Authorization: Bearer <id_token>`). Required on protected routes. Browser sessions may use the HttpOnly `id_token` cookie instead.",
4847+
"description": "Caller credential (`Authorization: Bearer <token>`). Required on protected routes when auth is enabled. Browser sessions may use the HttpOnly `id_token` or `accessToken` cookie instead.",
48274848
"scheme": "bearer",
48284849
"type": "http"
48294850
}
48304851
}
48314852
},
48324853
"info": {
4833-
"description": "HTTP API for the TrueForge agent server (`/api/v1`). Interactive docs are served at `/api/v1/docs` (OpenAPI JSON at `/api/v1/openapi.json`).\n\n**Authentication:** Standalone deployments (no OIDC) accept requests without credentials — middleware stamps a local default user. When OIDC is configured, protected routes require a valid `id_token` cookie or `Authorization: Bearer` ID token. There is no built-in API-key scheme; pass custom headers only if your reverse proxy or IdP layer requires them.\n\nCovers DB-backed sessions, the agent registry, settings catalogs, and model/MCP/skill/sandbox providers.",
4854+
"description": "HTTP API for the TrueForge agent server (`/api/v1`). Interactive docs are served at `/api/v1/docs` (OpenAPI JSON at `/api/v1/openapi.json`).\n\n**Authentication:** Standalone auth accepts requests without credentials — middleware stamps a local default user. When OIDC or TrueFoundry auth is configured, protected routes require a valid cookie or `Authorization: Bearer` token. There is no built-in API-key scheme; pass custom headers only if your reverse proxy or IdP layer requires them.\n\nCovers DB-backed sessions, the agent registry, settings catalogs, and model/MCP/skill/sandbox providers.",
48344855
"title": "TrueForge API",
48354856
"version": "0.2.0-rc.0"
48364857
},
@@ -5529,7 +5550,7 @@
55295550
},
55305551
"/api/v1/auth/me": {
55315552
"get": {
5532-
"description": "Returns the authenticated caller identity. When auth is enabled this requires a valid `id_token` cookie or `Authorization: Bearer` ID token (401 otherwise). When auth is disabled, returns the default identity.",
5553+
"description": "Returns the authenticated caller identity (`tenant_id`, `subject`, `is_admin`). When auth is enabled this requires a valid `id_token` cookie or `Authorization: Bearer` token (401 otherwise). When auth is disabled, returns the standalone default identity.",
55335554
"responses": {
55345555
"200": {
55355556
"content": {
@@ -5539,7 +5560,7 @@
55395560
}
55405561
}
55415562
},
5542-
"description": "Session type and identity for the current request."
5563+
"description": "Caller identity for the current request."
55435564
},
55445565
"401": {
55455566
"content": {
@@ -5549,7 +5570,7 @@
55495570
}
55505571
}
55515572
},
5552-
"description": "Auth is enabled and the request has no valid cookie or Bearer ID token."
5573+
"description": "Auth is enabled and the request has no valid cookie or Bearer token."
55535574
}
55545575
},
55555576
"summary": "Current session",

‎packages/trueforge-sdk/reference.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ await client.agents.delete("agent_id");
341341
<dl>
342342
<dd>
343343

344-
Returns the authenticated caller identity. When auth is enabled this requires a valid `id_token` cookie or `Authorization: Bearer` ID token (401 otherwise). When auth is disabled, returns the default identity.
344+
Returns the authenticated caller identity (`tenant_id`, `subject`, `is_admin`). When auth is enabled this requires a valid `id_token` cookie or `Authorization: Bearer` token (401 otherwise). When auth is disabled, returns the standalone default identity.
345345
</dd>
346346
</dl>
347347
</dd>

‎packages/trueforge-sdk/src/api/resources/auth/client/Client.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class AuthClient {
2323
}
2424

2525
/**
26-
* Returns the authenticated caller identity. When auth is enabled this requires a valid `id_token` cookie or `Authorization: Bearer` ID token (401 otherwise). When auth is disabled, returns the default identity.
26+
* Returns the authenticated caller identity (`tenant_id`, `subject`, `is_admin`). When auth is enabled this requires a valid `id_token` cookie or `Authorization: Bearer` token (401 otherwise). When auth is disabled, returns the standalone default identity.
2727
*
2828
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
2929
*

‎packages/trueforge-sdk/src/api/types/GetMeResponse.ts‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
import type * as TrueForge from "../index.js";
44

55
export interface GetMeResponse {
6-
/** User email from the ID token when connected; `"default"` when anonymous. */
7-
email: string;
8-
/** Caller role. */
9-
role: string;
10-
/** Session kind: `default` when no valid OIDC session; `oidc-connected` after a successful browser login. */
11-
type: TrueForge.GetMeResponseType;
6+
/** Whether the caller has admin privileges. */
7+
isAdmin: boolean;
8+
subject: TrueForge.GetMeSubject;
9+
/** Tenant scope for the authenticated caller. */
10+
tenantId: string;
1211
}

‎packages/trueforge-sdk/src/api/types/GetMeResponseType.ts‎

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// This file was auto-generated by Fern from our API Definition.
2+
3+
import type * as TrueForge from "../index.js";
4+
5+
export interface GetMeSubject {
6+
/** Human-readable name for the caller. */
7+
displayName: string;
8+
/** Stable subject identifier for the caller. */
9+
id: string;
10+
/** Subject kind: interactive user or virtual account. */
11+
type: TrueForge.GetMeSubjectType;
12+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// This file was auto-generated by Fern from our API Definition.
2+
3+
/** Subject kind: interactive user or virtual account. */
4+
export const GetMeSubjectType = {
5+
User: "user",
6+
Virtualaccount: "virtualaccount",
7+
} as const;
8+
export type GetMeSubjectType = (typeof GetMeSubjectType)[keyof typeof GetMeSubjectType];

‎packages/trueforge-sdk/src/api/types/index.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ export * from "./GetCapabilitiesResponse.js";
6161
export * from "./GetMcpServerCatalogResponse.js";
6262
export * from "./GetMcpServerResponse.js";
6363
export * from "./GetMeResponse.js";
64-
export * from "./GetMeResponseType.js";
64+
export * from "./GetMeSubject.js";
65+
export * from "./GetMeSubjectType.js";
6566
export * from "./GetModelProviderCatalogResponse.js";
6667
export * from "./GetModelProviderResponse.js";
6768
export * from "./GetSandboxProviderCatalogResponse.js";

‎packages/trueforge-sdk/src/serialization/types/GetMeResponse.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
import type * as TrueForge from "../../api/index.js";
44
import * as core from "../../core/index.js";
55
import type * as serializers from "../index.js";
6-
import { GetMeResponseType } from "./GetMeResponseType.js";
6+
import { GetMeSubject } from "./GetMeSubject.js";
77

88
export const GetMeResponse: core.serialization.ObjectSchema<serializers.GetMeResponse.Raw, TrueForge.GetMeResponse> =
99
core.serialization.object({
10-
email: core.serialization.string(),
11-
role: core.serialization.string(),
12-
type: GetMeResponseType,
10+
isAdmin: core.serialization.property("is_admin", core.serialization.boolean()),
11+
subject: GetMeSubject,
12+
tenantId: core.serialization.property("tenant_id", core.serialization.string()),
1313
});
1414

1515
export declare namespace GetMeResponse {
1616
export interface Raw {
17-
email: string;
18-
role: string;
19-
type: GetMeResponseType.Raw;
17+
is_admin: boolean;
18+
subject: GetMeSubject.Raw;
19+
tenant_id: string;
2020
}
2121
}

0 commit comments

Comments
 (0)