@thinkai/tai-api-contract 2.194.0 → 2.196.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.
- package/dist/generated/openapi.d.ts +106 -1
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/openapi/openapi.yaml +92 -2
- package/package.json +1 -1
- package/src/generated/openapi.ts +106 -1
- package/src/index.ts +24 -0
|
@@ -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;
|
|
@@ -5154,7 +5175,7 @@ export interface paths {
|
|
|
5154
5175
|
};
|
|
5155
5176
|
/**
|
|
5156
5177
|
* Ingest / backfill data coverage
|
|
5157
|
-
* @description Read-only snapshot of historical ingest coverage for connected pipelines (productivity GitHub, AI usage/spend per provider, SDLC components, monitoring, HRIS). Aggregates existing watermarks and stored day/week evidence — does not trigger ingest or refresh. Productivity detail may include `selfHeal` (latest depth scan and week reconcile) read from stored activity rows; this GET does not run a scan. `selfHeal` is null when neither event exists. AI usage detail includes spend reconciliation (`spendReconciliationStatus`, `spendDataQuality`, provider and stored cent totals, `spendReconcileCheckedAt`) read from the refresh-status snapshot. This GET does not call Cursor or Claude. Productivity, HR, monitoring, and SDLC pipelines omit those fields. `nextScheduledAt` is the scheduled poll instant for `ai_usage`, `hris`, and `monitoring`. It is null for productivity and SDLC, when that sync worker is disabled, or when there has been no attempt. A past instant means the poll is overdue; it is not moved forward to now and is not an ETA. Monitoring `sync` copies stored `issueCount`, `deploymentCount`, and `eventCount` (null when unset). HRIS leaves those three null. Requires workspace membership. Disconnected sources are omitted.
|
|
5178
|
+
* @description Read-only snapshot of historical ingest coverage for connected pipelines (productivity GitHub, AI usage/spend per provider, SDLC components, monitoring, HRIS). Aggregates existing watermarks and stored day/week evidence — does not trigger ingest or refresh. Every pipeline includes always-present `dataTrust` (`status` + `verificationMethod`) as a unified trust summary derived from existing coverage signals (stale, gaps, productivity `verificationStatus`, AI `spendReconciliationStatus`, pipeline `status`). It does not replace Source verified, Spend matched, or Backfill complete fields. Productivity detail may include `selfHeal` (latest depth scan and week reconcile) read from stored activity rows; this GET does not run a scan. `selfHeal` is null when neither event exists. AI usage detail includes spend reconciliation (`spendReconciliationStatus`, `spendDataQuality`, provider and stored cent totals, `spendReconcileCheckedAt`) read from the refresh-status snapshot. This GET does not call Cursor or Claude. Productivity, HR, monitoring, and SDLC pipelines omit those fields. `nextScheduledAt` is the scheduled poll instant for `ai_usage`, `hris`, and `monitoring`. It is null for productivity and SDLC, when that sync worker is disabled, or when there has been no attempt. A past instant means the poll is overdue; it is not moved forward to now and is not an ETA. Monitoring `sync` copies stored `issueCount`, `deploymentCount`, and `eventCount` (null when unset). HRIS leaves those three null. Requires workspace membership. Disconnected sources are omitted. Insights / Measure / Engineering Health response DTOs do not include `dataTrust`.
|
|
5158
5179
|
*/
|
|
5159
5180
|
get: operations["getWorkspaceIngestCoverage"];
|
|
5160
5181
|
put?: never;
|
|
@@ -10749,6 +10770,21 @@ export interface components {
|
|
|
10749
10770
|
/** @description Monitoring meta event count. Null for HRIS and when the stored count is unset. */
|
|
10750
10771
|
eventCount?: number | null;
|
|
10751
10772
|
};
|
|
10773
|
+
/**
|
|
10774
|
+
* @description Unified data-trust summary for one ingest-coverage pipeline. Derived from existing coverage signals; does not rename Source verified, Spend matched, or Backfill complete.
|
|
10775
|
+
* @enum {string}
|
|
10776
|
+
*/
|
|
10777
|
+
DataTrustStatus: "verified" | "provisional" | "degraded" | "unknown";
|
|
10778
|
+
/**
|
|
10779
|
+
* @description Which check decided `dataTrust.status` (or `none` when no applicable check). When several checks tie, prefer checksum > source_count > calendar_gap > none.
|
|
10780
|
+
* @enum {string}
|
|
10781
|
+
*/
|
|
10782
|
+
DataTrustVerificationMethod: "calendar_gap" | "source_count" | "checksum" | "none";
|
|
10783
|
+
/** @description Always-present Data trust summary on each ingest-coverage pipeline (`GET …/ingest-coverage` only). Additive to Source verified / Spend matched / Backfill complete lines. Derived from existing coverage signals only. Not added to Insights / Measure / Engineering Health response DTOs. */
|
|
10784
|
+
DataTrustDto: {
|
|
10785
|
+
status: components["schemas"]["DataTrustStatus"];
|
|
10786
|
+
verificationMethod: components["schemas"]["DataTrustVerificationMethod"];
|
|
10787
|
+
};
|
|
10752
10788
|
IngestCoveragePipelineDto: {
|
|
10753
10789
|
id: string;
|
|
10754
10790
|
/** @enum {string} */
|
|
@@ -10785,6 +10821,7 @@ export interface components {
|
|
|
10785
10821
|
ai?: components["schemas"]["IngestCoverageAiDetailDto"];
|
|
10786
10822
|
sdlc?: components["schemas"]["IngestCoverageSdlcDetailDto"];
|
|
10787
10823
|
sync?: components["schemas"]["IngestCoverageSyncDetailDto"];
|
|
10824
|
+
dataTrust: components["schemas"]["DataTrustDto"];
|
|
10788
10825
|
};
|
|
10789
10826
|
IngestCoverageDto: {
|
|
10790
10827
|
pipelines: components["schemas"]["IngestCoveragePipelineDto"][];
|
|
@@ -13511,6 +13548,9 @@ export type IngestCoverageAiDetailDto = components['schemas']['IngestCoverageAiD
|
|
|
13511
13548
|
export type IngestCoverageSdlcComponentDto = components['schemas']['IngestCoverageSdlcComponentDto'];
|
|
13512
13549
|
export type IngestCoverageSdlcDetailDto = components['schemas']['IngestCoverageSdlcDetailDto'];
|
|
13513
13550
|
export type IngestCoverageSyncDetailDto = components['schemas']['IngestCoverageSyncDetailDto'];
|
|
13551
|
+
export type DataTrustStatus = components['schemas']['DataTrustStatus'];
|
|
13552
|
+
export type DataTrustVerificationMethod = components['schemas']['DataTrustVerificationMethod'];
|
|
13553
|
+
export type DataTrustDto = components['schemas']['DataTrustDto'];
|
|
13514
13554
|
export type IngestCoveragePipelineDto = components['schemas']['IngestCoveragePipelineDto'];
|
|
13515
13555
|
export type IngestCoverageDto = components['schemas']['IngestCoverageDto'];
|
|
13516
13556
|
export type IngestRunDto = components['schemas']['IngestRunDto'];
|
|
@@ -15388,6 +15428,71 @@ export interface operations {
|
|
|
15388
15428
|
};
|
|
15389
15429
|
};
|
|
15390
15430
|
};
|
|
15431
|
+
adminCreateJobsSession: {
|
|
15432
|
+
parameters: {
|
|
15433
|
+
query?: never;
|
|
15434
|
+
header?: never;
|
|
15435
|
+
path?: never;
|
|
15436
|
+
cookie?: never;
|
|
15437
|
+
};
|
|
15438
|
+
requestBody?: never;
|
|
15439
|
+
responses: {
|
|
15440
|
+
/** @description Session cookie set (Set-Cookie with tai_admin_jobs). */
|
|
15441
|
+
204: {
|
|
15442
|
+
headers: {
|
|
15443
|
+
/** @description HttpOnly jobs session cookie with the caller's JWT value, Path=/admin/, SameSite=Lax, Max-Age=3600, Secure when applicable. */
|
|
15444
|
+
"Set-Cookie"?: string;
|
|
15445
|
+
[name: string]: unknown;
|
|
15446
|
+
};
|
|
15447
|
+
content?: never;
|
|
15448
|
+
};
|
|
15449
|
+
/** @description Missing or non-Bearer Authorization (no JWT to put in the cookie). */
|
|
15450
|
+
401: {
|
|
15451
|
+
headers: {
|
|
15452
|
+
[name: string]: unknown;
|
|
15453
|
+
};
|
|
15454
|
+
content: {
|
|
15455
|
+
/**
|
|
15456
|
+
* @example {
|
|
15457
|
+
* "error": "Unauthorized",
|
|
15458
|
+
* "code": "unauthorized"
|
|
15459
|
+
* }
|
|
15460
|
+
*/
|
|
15461
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
15462
|
+
};
|
|
15463
|
+
};
|
|
15464
|
+
/** @description Caller is not a platform admin. */
|
|
15465
|
+
403: {
|
|
15466
|
+
headers: {
|
|
15467
|
+
[name: string]: unknown;
|
|
15468
|
+
};
|
|
15469
|
+
content: {
|
|
15470
|
+
/**
|
|
15471
|
+
* @example {
|
|
15472
|
+
* "error": "Forbidden",
|
|
15473
|
+
* "code": "forbidden"
|
|
15474
|
+
* }
|
|
15475
|
+
*/
|
|
15476
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
15477
|
+
};
|
|
15478
|
+
};
|
|
15479
|
+
/** @description Jobs dashboard unavailable (`JOBS_PG_BOSS_ENABLED=false` or readiness DB URL missing). */
|
|
15480
|
+
503: {
|
|
15481
|
+
headers: {
|
|
15482
|
+
[name: string]: unknown;
|
|
15483
|
+
};
|
|
15484
|
+
content: {
|
|
15485
|
+
/**
|
|
15486
|
+
* @example {
|
|
15487
|
+
* "error": "Jobs dashboard unavailable",
|
|
15488
|
+
* "code": "jobs_dashboard_unavailable"
|
|
15489
|
+
* }
|
|
15490
|
+
*/
|
|
15491
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
15492
|
+
};
|
|
15493
|
+
};
|
|
15494
|
+
};
|
|
15495
|
+
};
|
|
15391
15496
|
adminGetPlatformBanner: {
|
|
15392
15497
|
parameters: {
|
|
15393
15498
|
query?: never;
|