@thinkai/tai-api-contract 2.136.0 → 2.138.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.
@@ -4147,7 +4147,7 @@ export interface paths {
4147
4147
  };
4148
4148
  /**
4149
4149
  * Ingest / backfill data coverage
4150
- * @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. Requires workspace membership. Disconnected sources are omitted.
4150
+ * @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. `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.
4151
4151
  */
4152
4152
  get: operations["getWorkspaceIngestCoverage"];
4153
4153
  put?: never;
@@ -4178,6 +4178,26 @@ export interface paths {
4178
4178
  patch?: never;
4179
4179
  trace?: never;
4180
4180
  };
4181
+ "/workspaces/{workspaceId}/ingest/productivity/catch-up": {
4182
+ parameters: {
4183
+ query?: never;
4184
+ header?: never;
4185
+ path?: never;
4186
+ cookie?: never;
4187
+ };
4188
+ get?: never;
4189
+ put?: never;
4190
+ /**
4191
+ * Queue productivity catch-up from last fetch to now
4192
+ * @description Workspace admin (or platform admin) queues incremental productivity catch-up while phase is `complete`. Sets `productivity_incremental_requested_at` only; does not set `productivity_sync_requested_at` or change phase. Members receive 403.
4193
+ */
4194
+ post: operations["catchUpWorkspaceProductivityIngest"];
4195
+ delete?: never;
4196
+ options?: never;
4197
+ head?: never;
4198
+ patch?: never;
4199
+ trace?: never;
4200
+ };
4181
4201
  "/workspaces/{workspaceId}/ingest-runs": {
4182
4202
  parameters: {
4183
4203
  query?: never;
@@ -8188,6 +8208,12 @@ export interface components {
8188
8208
  /** @description True when the slug was already pending; no second run row. */
8189
8209
  alreadyQueued?: boolean;
8190
8210
  };
8211
+ ProductivityCatchUpResponseDto: {
8212
+ /** @enum {boolean} */
8213
+ ok: true;
8214
+ /** @description True when productivity_incremental_requested_at is already set; no second queue stamp. */
8215
+ alreadyQueued?: boolean;
8216
+ };
8191
8217
  /** @description Latest depth scan read from stored activity. `capturePercent` is the minimum existing capture ratio over that scan's repo checks with a GitHub merge count, or null when none qualify. */
8192
8218
  IngestCoverageProductivityDepthScanDto: {
8193
8219
  /** Format: date-time */
@@ -8257,6 +8283,12 @@ export interface components {
8257
8283
  provider?: string;
8258
8284
  /** @enum {string} */
8259
8285
  syncStatus?: "ok" | "error" | "never";
8286
+ /** @description Monitoring meta issue count. Null for HRIS and when the stored count is unset. */
8287
+ issueCount?: number | null;
8288
+ /** @description Monitoring meta deployment count. Null for HRIS and when the stored count is unset. */
8289
+ deploymentCount?: number | null;
8290
+ /** @description Monitoring meta event count. Null for HRIS and when the stored count is unset. */
8291
+ eventCount?: number | null;
8260
8292
  };
8261
8293
  IngestCoveragePipelineDto: {
8262
8294
  id: string;
@@ -8275,6 +8307,11 @@ export interface components {
8275
8307
  lastAttemptAt?: string | null;
8276
8308
  lastErrorKind?: string | null;
8277
8309
  lastErrorMessage?: string | null;
8310
+ /**
8311
+ * Format: date-time
8312
+ * @description Scheduled poll instant. Set for ai_usage (next weekly workspace slot), hris, and monitoring (last attempt plus the worker interval, including when that instant is already past). Null for productivity_github and sdlc_github, when the sync worker is disabled, or when lastAttemptAt is null. Not an ETA and not advanced to now when the worker is late.
8313
+ */
8314
+ nextScheduledAt?: string | null;
8278
8315
  /** Format: int64 */
8279
8316
  staleForMs?: number | null;
8280
8317
  isStale: boolean;
@@ -10495,6 +10532,7 @@ export type IngestCoverageGapDto = components['schemas']['IngestCoverageGapDto']
10495
10532
  export type IngestCoverageLastRunDto = components['schemas']['IngestCoverageLastRunDto'];
10496
10533
  export type IngestCoverageProductivityRepoDto = components['schemas']['IngestCoverageProductivityRepoDto'];
10497
10534
  export type ProductivityRepoRetryResponseDto = components['schemas']['ProductivityRepoRetryResponseDto'];
10535
+ export type ProductivityCatchUpResponseDto = components['schemas']['ProductivityCatchUpResponseDto'];
10498
10536
  export type IngestCoverageProductivityDepthScanDto = components['schemas']['IngestCoverageProductivityDepthScanDto'];
10499
10537
  export type IngestCoverageProductivityWeekReconcileDto = components['schemas']['IngestCoverageProductivityWeekReconcileDto'];
10500
10538
  export type IngestCoverageProductivitySelfHealDto = components['schemas']['IngestCoverageProductivitySelfHealDto'];
@@ -21265,6 +21303,48 @@ export interface operations {
21265
21303
  };
21266
21304
  };
21267
21305
  };
21306
+ catchUpWorkspaceProductivityIngest: {
21307
+ parameters: {
21308
+ query?: never;
21309
+ header?: never;
21310
+ path: {
21311
+ workspaceId: components["parameters"]["WorkspaceId"];
21312
+ };
21313
+ cookie?: never;
21314
+ };
21315
+ requestBody?: never;
21316
+ responses: {
21317
+ /** @description Catch-up accepted */
21318
+ 200: {
21319
+ headers: {
21320
+ [name: string]: unknown;
21321
+ };
21322
+ content: {
21323
+ "application/json": components["schemas"]["ProductivityCatchUpResponseDto"];
21324
+ };
21325
+ };
21326
+ 401: components["responses"]["Unauthorized"];
21327
+ 403: components["responses"]["Forbidden"];
21328
+ /** @description Productivity not connected */
21329
+ 404: {
21330
+ headers: {
21331
+ [name: string]: unknown;
21332
+ };
21333
+ content: {
21334
+ "application/json": components["schemas"]["ErrorMessageDto"];
21335
+ };
21336
+ };
21337
+ /** @description Backfill in progress (phase recent or historical) */
21338
+ 409: {
21339
+ headers: {
21340
+ [name: string]: unknown;
21341
+ };
21342
+ content: {
21343
+ "application/json": components["schemas"]["ErrorMessageDto"];
21344
+ };
21345
+ };
21346
+ };
21347
+ };
21268
21348
  getWorkspaceIngestRuns: {
21269
21349
  parameters: {
21270
21350
  query?: {