@thinkai/tai-api-contract 2.248.0 → 2.250.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 +57 -7
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/openapi/openapi.yaml +140 -9
- package/package.json +1 -1
- package/src/generated/openapi.ts +57 -7
- package/src/index.ts +19 -0
package/src/generated/openapi.ts
CHANGED
|
@@ -2342,7 +2342,7 @@ export interface paths {
|
|
|
2342
2342
|
};
|
|
2343
2343
|
/**
|
|
2344
2344
|
* Test pyramid assessment — per-repo list (paginated)
|
|
2345
|
-
* @description Page of repos with latest classified test-file counts, count-based presence, presence maturity, shape, trend vs the previous pyramid point, coverage overlay, confidence/evidence, layer applicability, and risk signals (`e2eCrossRepoCandidate`, `hotspotCount`).
|
|
2345
|
+
* @description Page of repos with latest classified test-file counts, count-based presence, presence maturity, shape, trend vs the previous pyramid point, coverage overlay, confidence/evidence, layer applicability, and risk signals (`e2eCrossRepoCandidate`, `hotspotCount`). Optional `gapLayer` keeps only repos with an applicable gap on that layer (same semantics as summary `gapsByLayer`). No v1 repo-detail Insights route — link repo names to AF readiness inventory.
|
|
2346
2346
|
*/
|
|
2347
2347
|
get: operations["listInsightsTestPyramidRepos"];
|
|
2348
2348
|
put?: never;
|
|
@@ -2362,7 +2362,7 @@ export interface paths {
|
|
|
2362
2362
|
};
|
|
2363
2363
|
/**
|
|
2364
2364
|
* AI tool integration — paginated member list with usage totals
|
|
2365
|
-
* @description Paginated list of active AI-tool seats enriched with spend, token, and active-day totals for the selected time range. Supports search (by email / display name) and sort (spend_cents_desc
|
|
2365
|
+
* @description Paginated list of active AI-tool seats enriched with spend, token, and active-day totals for the selected time range. Supports search (by email / display name), service-account exclusion (`excludeServiceAccounts`), team scoping (`teamId`, including synthetic `__unattributed__` and `__bots__`), bidirectional sort (`spend_cents_desc`, `spend_cents_asc`, `active_days_desc`, `active_days_asc`, `token_count_desc`, `token_count_asc`, `name_asc`, `name_desc`), and aggregate `totals` over the full filtered list before pagination. Useful for the **Members** tab of the AI tool integration detail page.
|
|
2366
2366
|
*/
|
|
2367
2367
|
get: operations["getAiToolMembers"];
|
|
2368
2368
|
put?: never;
|
|
@@ -5968,7 +5968,7 @@ export interface paths {
|
|
|
5968
5968
|
};
|
|
5969
5969
|
/**
|
|
5970
5970
|
* List absence records
|
|
5971
|
-
* @description Returns time-off/absence records sourced from connected HRIS providers (e.g. Personio) for the given date window. Requires workspace membership.
|
|
5971
|
+
* @description Returns time-off/absence records sourced from connected HRIS providers (e.g. Personio) for the given date window. Requires workspace membership. Optional `limit` pages the result (`1..100`); omit `limit` to receive the full window (activity heatmap callers). Optional `status` and `search` (matches `employeeEmail` and post-redaction `absenceType`) filter before totals. Sensitive absence types are redacted for non-admins before search.
|
|
5972
5972
|
*/
|
|
5973
5973
|
get: operations["listWorkspaceAbsences"];
|
|
5974
5974
|
put?: never;
|
|
@@ -9532,11 +9532,18 @@ export interface components {
|
|
|
9532
9532
|
[key: string]: number;
|
|
9533
9533
|
};
|
|
9534
9534
|
};
|
|
9535
|
+
AiToolMembersTotalsDto: {
|
|
9536
|
+
spendCents: number;
|
|
9537
|
+
tokenCount: number;
|
|
9538
|
+
activeUsers: number;
|
|
9539
|
+
topModel: string | null;
|
|
9540
|
+
};
|
|
9535
9541
|
AiToolMembersListDto: {
|
|
9536
9542
|
members: components["schemas"]["AiToolMemberSummaryDto"][];
|
|
9537
9543
|
total: number;
|
|
9538
9544
|
page: number;
|
|
9539
9545
|
pageSize: number;
|
|
9546
|
+
totals?: components["schemas"]["AiToolMembersTotalsDto"];
|
|
9540
9547
|
};
|
|
9541
9548
|
AiToolTeamSummaryDto: {
|
|
9542
9549
|
teamId: string;
|
|
@@ -12742,6 +12749,16 @@ export interface components {
|
|
|
12742
12749
|
* @description ISO timestamp of the most recent successful HRIS sync, or null if never synced.
|
|
12743
12750
|
*/
|
|
12744
12751
|
syncedAt: string | null;
|
|
12752
|
+
/** @description Count matching the date window after optional status and search filters. */
|
|
12753
|
+
total?: number;
|
|
12754
|
+
/** @description Count in the date window before status and search filters. */
|
|
12755
|
+
windowTotal?: number;
|
|
12756
|
+
/** @description Distinct employeeEmail values across matching records (after filters). */
|
|
12757
|
+
distinctEmployees?: number;
|
|
12758
|
+
/** @description Echo of the requested page size when limit was provided. */
|
|
12759
|
+
limit?: number;
|
|
12760
|
+
/** @description Echo of the requested offset when limit was provided. */
|
|
12761
|
+
offset?: number;
|
|
12745
12762
|
};
|
|
12746
12763
|
IngestCoverageGapDto: {
|
|
12747
12764
|
/** @description Inclusive gap start (ISO date or UTC Monday week start). */
|
|
@@ -15956,6 +15973,8 @@ export interface components {
|
|
|
15956
15973
|
InsightsTestPyramidRepoSort: "repoName" | "totalClassifiedFiles" | "scannedAt" | "maturity";
|
|
15957
15974
|
/** @description Case-insensitive substring filter on repository name. */
|
|
15958
15975
|
InsightsTestPyramidRepoSearch: string;
|
|
15976
|
+
/** @description When set, keep only repos where the layer is applicable and absent (`layerApplicable[gapLayer] && !layerPresent[gapLayer]`), matching summary `gapsByLayer`. Applied with `search` before `total` and pagination. */
|
|
15977
|
+
InsightsTestPyramidGapLayer: "unit" | "integration" | "acceptance_bdd" | "contract" | "e2e";
|
|
15959
15978
|
/** @description Case-insensitive filter on repository name, language, or provider slug. */
|
|
15960
15979
|
ReadinessRepoSearch: string;
|
|
15961
15980
|
/** @description Exact language filter (e.g. `typescript`). */
|
|
@@ -16212,6 +16231,7 @@ export type AiToolDailySeriesDto = components['schemas']['AiToolDailySeriesDto']
|
|
|
16212
16231
|
export type AiToolModelBreakdownItemDto = components['schemas']['AiToolModelBreakdownItemDto'];
|
|
16213
16232
|
export type AiToolModelBreakdownDto = components['schemas']['AiToolModelBreakdownDto'];
|
|
16214
16233
|
export type AiToolMemberSummaryDto = components['schemas']['AiToolMemberSummaryDto'];
|
|
16234
|
+
export type AiToolMembersTotalsDto = components['schemas']['AiToolMembersTotalsDto'];
|
|
16215
16235
|
export type AiToolMembersListDto = components['schemas']['AiToolMembersListDto'];
|
|
16216
16236
|
export type AiToolTeamSummaryDto = components['schemas']['AiToolTeamSummaryDto'];
|
|
16217
16237
|
export type AiToolTeamsListDto = components['schemas']['AiToolTeamsListDto'];
|
|
@@ -16835,6 +16855,7 @@ export type ParameterCodeInsightsRepoSort = components['parameters']['CodeInsigh
|
|
|
16835
16855
|
export type ParameterCodeInsightsRepoSearch = components['parameters']['CodeInsightsRepoSearch'];
|
|
16836
16856
|
export type ParameterInsightsTestPyramidRepoSort = components['parameters']['InsightsTestPyramidRepoSort'];
|
|
16837
16857
|
export type ParameterInsightsTestPyramidRepoSearch = components['parameters']['InsightsTestPyramidRepoSearch'];
|
|
16858
|
+
export type ParameterInsightsTestPyramidGapLayer = components['parameters']['InsightsTestPyramidGapLayer'];
|
|
16838
16859
|
export type ParameterReadinessRepoSearch = components['parameters']['ReadinessRepoSearch'];
|
|
16839
16860
|
export type ParameterReadinessRepoLanguage = components['parameters']['ReadinessRepoLanguage'];
|
|
16840
16861
|
export type ParameterReadinessFixSort = components['parameters']['ReadinessFixSort'];
|
|
@@ -23630,6 +23651,8 @@ export interface operations {
|
|
|
23630
23651
|
order?: components["parameters"]["PaginationOrder"];
|
|
23631
23652
|
/** @description Case-insensitive substring filter on repository name. */
|
|
23632
23653
|
search?: components["parameters"]["InsightsTestPyramidRepoSearch"];
|
|
23654
|
+
/** @description When set, keep only repos where the layer is applicable and absent (`layerApplicable[gapLayer] && !layerPresent[gapLayer]`), matching summary `gapsByLayer`. Applied with `search` before `total` and pagination. */
|
|
23655
|
+
gapLayer?: components["parameters"]["InsightsTestPyramidGapLayer"];
|
|
23633
23656
|
};
|
|
23634
23657
|
header?: never;
|
|
23635
23658
|
path: {
|
|
@@ -23648,7 +23671,7 @@ export interface operations {
|
|
|
23648
23671
|
"application/json": components["schemas"]["InsightsTestPyramidRepoListDto"];
|
|
23649
23672
|
};
|
|
23650
23673
|
};
|
|
23651
|
-
/** @description Invalid pagination or
|
|
23674
|
+
/** @description Invalid pagination, sort, search, or gapLayer query */
|
|
23652
23675
|
400: {
|
|
23653
23676
|
headers: {
|
|
23654
23677
|
[name: string]: unknown;
|
|
@@ -23689,7 +23712,12 @@ export interface operations {
|
|
|
23689
23712
|
page?: number;
|
|
23690
23713
|
pageSize?: number;
|
|
23691
23714
|
search?: string;
|
|
23692
|
-
|
|
23715
|
+
/** @description Sort column and direction. Invalid values fall back to `spend_cents_desc`. */
|
|
23716
|
+
sort?: "spend_cents_desc" | "spend_cents_asc" | "active_days_desc" | "active_days_asc" | "token_count_desc" | "token_count_asc" | "name_asc" | "name_desc";
|
|
23717
|
+
/** @description When `true`, excludes non-human / service-account seats before computing `totals`, `total`, and pagination. */
|
|
23718
|
+
excludeServiceAccounts?: boolean;
|
|
23719
|
+
/** @description Optional org-chart leaf team ID, `__unattributed__` for unmatched non-service seats, or `__bots__` for service-account seats. Unknown team IDs return an empty 200 page. */
|
|
23720
|
+
teamId?: string;
|
|
23693
23721
|
};
|
|
23694
23722
|
header?: never;
|
|
23695
23723
|
path: {
|
|
@@ -32625,6 +32653,14 @@ export interface operations {
|
|
|
32625
32653
|
from?: string;
|
|
32626
32654
|
/** @description End of date window (ISO YYYY-MM-DD). Defaults to 90 days from today. */
|
|
32627
32655
|
to?: string;
|
|
32656
|
+
/** @description Page size (`1..100`). When omitted, the full date window is returned unpaged (still includes `total`, `windowTotal`, and `distinctEmployees`). */
|
|
32657
|
+
limit?: number;
|
|
32658
|
+
/** @description Zero-based offset when `limit` is set. Defaults to 0. */
|
|
32659
|
+
offset?: number;
|
|
32660
|
+
/** @description Filter to absences with this status. */
|
|
32661
|
+
status?: "approved" | "pending" | "rejected";
|
|
32662
|
+
/** @description Case-insensitive substring on `employeeEmail` or post-redaction `absenceType` (max 256 chars). Redaction runs before search so non-admins cannot probe sensitive leave types. */
|
|
32663
|
+
search?: string;
|
|
32628
32664
|
};
|
|
32629
32665
|
header?: never;
|
|
32630
32666
|
path: {
|
|
@@ -32634,7 +32670,7 @@ export interface operations {
|
|
|
32634
32670
|
};
|
|
32635
32671
|
requestBody?: never;
|
|
32636
32672
|
responses: {
|
|
32637
|
-
/** @description Absence list with last sync timestamp */
|
|
32673
|
+
/** @description Absence list with last sync timestamp and optional paging totals */
|
|
32638
32674
|
200: {
|
|
32639
32675
|
headers: {
|
|
32640
32676
|
[name: string]: unknown;
|
|
@@ -32654,12 +32690,26 @@ export interface operations {
|
|
|
32654
32690
|
* "status": "approved"
|
|
32655
32691
|
* }
|
|
32656
32692
|
* ],
|
|
32657
|
-
* "syncedAt": "2025-06-30T08:00:00.000Z"
|
|
32693
|
+
* "syncedAt": "2025-06-30T08:00:00.000Z",
|
|
32694
|
+
* "total": 1,
|
|
32695
|
+
* "windowTotal": 1,
|
|
32696
|
+
* "distinctEmployees": 1,
|
|
32697
|
+
* "limit": 25,
|
|
32698
|
+
* "offset": 0
|
|
32658
32699
|
* }
|
|
32659
32700
|
*/
|
|
32660
32701
|
"application/json": components["schemas"]["WorkspaceAbsenceListDto"];
|
|
32661
32702
|
};
|
|
32662
32703
|
};
|
|
32704
|
+
/** @description Invalid limit, offset, status, or search query */
|
|
32705
|
+
400: {
|
|
32706
|
+
headers: {
|
|
32707
|
+
[name: string]: unknown;
|
|
32708
|
+
};
|
|
32709
|
+
content: {
|
|
32710
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
32711
|
+
};
|
|
32712
|
+
};
|
|
32663
32713
|
401: components["responses"]["Unauthorized"];
|
|
32664
32714
|
403: components["responses"]["Forbidden"];
|
|
32665
32715
|
};
|
package/src/index.ts
CHANGED
|
@@ -1393,6 +1393,16 @@ export interface WorkspaceAbsenceListDto {
|
|
|
1393
1393
|
absences: WorkspaceAbsenceDto[];
|
|
1394
1394
|
/** ISO timestamp of the most recent successful sync, or null if never synced. */
|
|
1395
1395
|
syncedAt: string | null;
|
|
1396
|
+
/** Count matching the date window after optional `status` and `search` filters. */
|
|
1397
|
+
total?: number;
|
|
1398
|
+
/** Count in the date window before `status` / `search` filters. */
|
|
1399
|
+
windowTotal?: number;
|
|
1400
|
+
/** Distinct `employeeEmail` values across matching records (after filters). */
|
|
1401
|
+
distinctEmployees?: number;
|
|
1402
|
+
/** Echo of the requested page size when `limit` was provided. */
|
|
1403
|
+
limit?: number;
|
|
1404
|
+
/** Echo of the requested offset when `limit` was provided. */
|
|
1405
|
+
offset?: number;
|
|
1396
1406
|
}
|
|
1397
1407
|
|
|
1398
1408
|
/** Inclusive missing coverage range (calendar day or UTC Monday week ISO). */
|
|
@@ -2038,12 +2048,21 @@ export interface AiToolMemberSummaryDto {
|
|
|
2038
2048
|
productBreakdownCents?: Record<string, number>;
|
|
2039
2049
|
}
|
|
2040
2050
|
|
|
2051
|
+
/** Aggregate totals over the full filtered member set (before pagination slicing). */
|
|
2052
|
+
export interface AiToolMembersTotalsDto {
|
|
2053
|
+
spendCents: number;
|
|
2054
|
+
tokenCount: number;
|
|
2055
|
+
activeUsers: number;
|
|
2056
|
+
topModel: string | null;
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2041
2059
|
/** Paginated response for GET .../connectors/ai-tool/:provider/members */
|
|
2042
2060
|
export interface AiToolMembersListDto {
|
|
2043
2061
|
members: AiToolMemberSummaryDto[];
|
|
2044
2062
|
total: number;
|
|
2045
2063
|
page: number;
|
|
2046
2064
|
pageSize: number;
|
|
2065
|
+
totals?: AiToolMembersTotalsDto;
|
|
2047
2066
|
}
|
|
2048
2067
|
|
|
2049
2068
|
/** Team-level AI tool usage aggregated from org-chart membership. */
|