@thinkai/tai-api-contract 2.135.0 → 2.137.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;
@@ -4158,6 +4158,26 @@ export interface paths {
4158
4158
  patch?: never;
4159
4159
  trace?: never;
4160
4160
  };
4161
+ "/workspaces/{workspaceId}/ingest/productivity/repos/{slug}/retry": {
4162
+ parameters: {
4163
+ query?: never;
4164
+ header?: never;
4165
+ path?: never;
4166
+ cookie?: never;
4167
+ };
4168
+ get?: never;
4169
+ put?: never;
4170
+ /**
4171
+ * Retry productivity ingest for one repository
4172
+ * @description Workspace admin (or platform admin) re-queues a failed or non-benign-skipped productivity GitHub repo. Does not call GitHub on the request. Creates one `in_progress` ingest-run row when newly queued. Members receive 403.
4173
+ */
4174
+ post: operations["retryWorkspaceProductivityRepo"];
4175
+ delete?: never;
4176
+ options?: never;
4177
+ head?: never;
4178
+ patch?: never;
4179
+ trace?: never;
4180
+ };
4161
4181
  "/workspaces/{workspaceId}/ingest-runs": {
4162
4182
  parameters: {
4163
4183
  query?: never;
@@ -8154,6 +8174,19 @@ export interface components {
8154
8174
  missingWeeks?: number | null;
8155
8175
  gaps?: components["schemas"]["IngestCoverageGapDto"][];
8156
8176
  lastErrorKind?: string | null;
8177
+ /** @description True when queueStatus is failed, or skipped with a non-benign reason. Benign skips are empty_repo, archived, and no_merged_prs_in_window. */
8178
+ retryable?: boolean;
8179
+ };
8180
+ ProductivityRepoRetryResponseDto: {
8181
+ /** @enum {boolean} */
8182
+ ok: true;
8183
+ /**
8184
+ * Format: uuid
8185
+ * @description Present when a new in_progress ingest run row was created.
8186
+ */
8187
+ runId?: string;
8188
+ /** @description True when the slug was already pending; no second run row. */
8189
+ alreadyQueued?: boolean;
8157
8190
  };
8158
8191
  /** @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. */
8159
8192
  IngestCoverageProductivityDepthScanDto: {
@@ -8224,6 +8257,12 @@ export interface components {
8224
8257
  provider?: string;
8225
8258
  /** @enum {string} */
8226
8259
  syncStatus?: "ok" | "error" | "never";
8260
+ /** @description Monitoring meta issue count. Null for HRIS and when the stored count is unset. */
8261
+ issueCount?: number | null;
8262
+ /** @description Monitoring meta deployment count. Null for HRIS and when the stored count is unset. */
8263
+ deploymentCount?: number | null;
8264
+ /** @description Monitoring meta event count. Null for HRIS and when the stored count is unset. */
8265
+ eventCount?: number | null;
8227
8266
  };
8228
8267
  IngestCoveragePipelineDto: {
8229
8268
  id: string;
@@ -8242,6 +8281,11 @@ export interface components {
8242
8281
  lastAttemptAt?: string | null;
8243
8282
  lastErrorKind?: string | null;
8244
8283
  lastErrorMessage?: string | null;
8284
+ /**
8285
+ * Format: date-time
8286
+ * @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.
8287
+ */
8288
+ nextScheduledAt?: string | null;
8245
8289
  /** Format: int64 */
8246
8290
  staleForMs?: number | null;
8247
8291
  isStale: boolean;
@@ -10461,6 +10505,7 @@ export type WorkspaceAbsenceListDto = components['schemas']['WorkspaceAbsenceLis
10461
10505
  export type IngestCoverageGapDto = components['schemas']['IngestCoverageGapDto'];
10462
10506
  export type IngestCoverageLastRunDto = components['schemas']['IngestCoverageLastRunDto'];
10463
10507
  export type IngestCoverageProductivityRepoDto = components['schemas']['IngestCoverageProductivityRepoDto'];
10508
+ export type ProductivityRepoRetryResponseDto = components['schemas']['ProductivityRepoRetryResponseDto'];
10464
10509
  export type IngestCoverageProductivityDepthScanDto = components['schemas']['IngestCoverageProductivityDepthScanDto'];
10465
10510
  export type IngestCoverageProductivityWeekReconcileDto = components['schemas']['IngestCoverageProductivityWeekReconcileDto'];
10466
10511
  export type IngestCoverageProductivitySelfHealDto = components['schemas']['IngestCoverageProductivitySelfHealDto'];
@@ -21187,6 +21232,50 @@ export interface operations {
21187
21232
  403: components["responses"]["Forbidden"];
21188
21233
  };
21189
21234
  };
21235
+ retryWorkspaceProductivityRepo: {
21236
+ parameters: {
21237
+ query?: never;
21238
+ header?: never;
21239
+ path: {
21240
+ workspaceId: components["parameters"]["WorkspaceId"];
21241
+ /** @description GitHub repo slug (owner/name). Match is case-insensitive. */
21242
+ slug: string;
21243
+ };
21244
+ cookie?: never;
21245
+ };
21246
+ requestBody?: never;
21247
+ responses: {
21248
+ /** @description Retry accepted */
21249
+ 200: {
21250
+ headers: {
21251
+ [name: string]: unknown;
21252
+ };
21253
+ content: {
21254
+ "application/json": components["schemas"]["ProductivityRepoRetryResponseDto"];
21255
+ };
21256
+ };
21257
+ 401: components["responses"]["Unauthorized"];
21258
+ 403: components["responses"]["Forbidden"];
21259
+ /** @description Unknown slug or productivity not connected */
21260
+ 404: {
21261
+ headers: {
21262
+ [name: string]: unknown;
21263
+ };
21264
+ content: {
21265
+ "application/json": components["schemas"]["ErrorMessageDto"];
21266
+ };
21267
+ };
21268
+ /** @description Lock held, backfill in progress, or retry not applicable */
21269
+ 409: {
21270
+ headers: {
21271
+ [name: string]: unknown;
21272
+ };
21273
+ content: {
21274
+ "application/json": components["schemas"]["ErrorMessageDto"];
21275
+ };
21276
+ };
21277
+ };
21278
+ };
21190
21279
  getWorkspaceIngestRuns: {
21191
21280
  parameters: {
21192
21281
  query?: {