@thinkai/tai-api-contract 2.194.0 → 2.195.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -464,6 +464,27 @@ export interface paths {
|
|
|
464
464
|
patch?: never;
|
|
465
465
|
trace?: never;
|
|
466
466
|
};
|
|
467
|
+
"/admin/jobs-session": {
|
|
468
|
+
parameters: {
|
|
469
|
+
query?: never;
|
|
470
|
+
header?: never;
|
|
471
|
+
path?: never;
|
|
472
|
+
cookie?: never;
|
|
473
|
+
};
|
|
474
|
+
get?: never;
|
|
475
|
+
put?: never;
|
|
476
|
+
/**
|
|
477
|
+
* Mint HttpOnly cookie for /admin/jobs dashboard access
|
|
478
|
+
* @description Platform admins only. Copies the caller's Bearer JWT into an HttpOnly `tai_admin_jobs` cookie (`Path=/admin/`, `SameSite=Lax`, `Secure` when HTTPS/prod, `Max-Age` 1 hour) so browser navigations and admin-SPA iframes can authenticate to `/admin/jobs*` without an `Authorization` header on every request.
|
|
479
|
+
* Requires a Bearer JWT from an email on `PLATFORM_ADMIN_EMAILS`. The cookie is only accepted as a Bearer substitute on `/admin/jobs*` paths by the API auth preHandler. The mounted `@pg-boss/dashboard` HTML surface is not part of this contract.
|
|
480
|
+
*/
|
|
481
|
+
post: operations["adminCreateJobsSession"];
|
|
482
|
+
delete?: never;
|
|
483
|
+
options?: never;
|
|
484
|
+
head?: never;
|
|
485
|
+
patch?: never;
|
|
486
|
+
trace?: never;
|
|
487
|
+
};
|
|
467
488
|
"/admin/platform/banner": {
|
|
468
489
|
parameters: {
|
|
469
490
|
query?: never;
|
|
@@ -15388,6 +15409,71 @@ export interface operations {
|
|
|
15388
15409
|
};
|
|
15389
15410
|
};
|
|
15390
15411
|
};
|
|
15412
|
+
adminCreateJobsSession: {
|
|
15413
|
+
parameters: {
|
|
15414
|
+
query?: never;
|
|
15415
|
+
header?: never;
|
|
15416
|
+
path?: never;
|
|
15417
|
+
cookie?: never;
|
|
15418
|
+
};
|
|
15419
|
+
requestBody?: never;
|
|
15420
|
+
responses: {
|
|
15421
|
+
/** @description Session cookie set (Set-Cookie with tai_admin_jobs). */
|
|
15422
|
+
204: {
|
|
15423
|
+
headers: {
|
|
15424
|
+
/** @description HttpOnly jobs session cookie with the caller's JWT value, Path=/admin/, SameSite=Lax, Max-Age=3600, Secure when applicable. */
|
|
15425
|
+
"Set-Cookie"?: string;
|
|
15426
|
+
[name: string]: unknown;
|
|
15427
|
+
};
|
|
15428
|
+
content?: never;
|
|
15429
|
+
};
|
|
15430
|
+
/** @description Missing or non-Bearer Authorization (no JWT to put in the cookie). */
|
|
15431
|
+
401: {
|
|
15432
|
+
headers: {
|
|
15433
|
+
[name: string]: unknown;
|
|
15434
|
+
};
|
|
15435
|
+
content: {
|
|
15436
|
+
/**
|
|
15437
|
+
* @example {
|
|
15438
|
+
* "error": "Unauthorized",
|
|
15439
|
+
* "code": "unauthorized"
|
|
15440
|
+
* }
|
|
15441
|
+
*/
|
|
15442
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
15443
|
+
};
|
|
15444
|
+
};
|
|
15445
|
+
/** @description Caller is not a platform admin. */
|
|
15446
|
+
403: {
|
|
15447
|
+
headers: {
|
|
15448
|
+
[name: string]: unknown;
|
|
15449
|
+
};
|
|
15450
|
+
content: {
|
|
15451
|
+
/**
|
|
15452
|
+
* @example {
|
|
15453
|
+
* "error": "Forbidden",
|
|
15454
|
+
* "code": "forbidden"
|
|
15455
|
+
* }
|
|
15456
|
+
*/
|
|
15457
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
15458
|
+
};
|
|
15459
|
+
};
|
|
15460
|
+
/** @description Jobs dashboard unavailable (`JOBS_PG_BOSS_ENABLED=false` or readiness DB URL missing). */
|
|
15461
|
+
503: {
|
|
15462
|
+
headers: {
|
|
15463
|
+
[name: string]: unknown;
|
|
15464
|
+
};
|
|
15465
|
+
content: {
|
|
15466
|
+
/**
|
|
15467
|
+
* @example {
|
|
15468
|
+
* "error": "Jobs dashboard unavailable",
|
|
15469
|
+
* "code": "jobs_dashboard_unavailable"
|
|
15470
|
+
* }
|
|
15471
|
+
*/
|
|
15472
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
15473
|
+
};
|
|
15474
|
+
};
|
|
15475
|
+
};
|
|
15476
|
+
};
|
|
15391
15477
|
adminGetPlatformBanner: {
|
|
15392
15478
|
parameters: {
|
|
15393
15479
|
query?: never;
|