@thinkai/tai-api-contract 2.42.0 → 2.43.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 +107 -0
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +109 -1
- package/package.json +1 -1
- package/src/generated/openapi.ts +107 -0
package/openapi/openapi.yaml
CHANGED
|
@@ -1355,6 +1355,61 @@ paths:
|
|
|
1355
1355
|
"404":
|
|
1356
1356
|
description: Workspace does not exist or malformed workspaceId
|
|
1357
1357
|
|
|
1358
|
+
/workspaces/{workspaceId}/insights/persons/{personId}/erase:
|
|
1359
|
+
post:
|
|
1360
|
+
tags: [Workspace]
|
|
1361
|
+
summary: Erase person-level insights data (workspace admin)
|
|
1362
|
+
description: >
|
|
1363
|
+
Workspace admin only. Deletes or anonymizes a person's developer-insights rows
|
|
1364
|
+
for the workspace: org-chart node, person-scope dashboard metrics, AI-tool fact rows,
|
|
1365
|
+
HRIS absences, and readiness run requester linkage. Granular categories default to
|
|
1366
|
+
all enabled when the body is omitted. `personId` is the org-chart `person_id`
|
|
1367
|
+
(typically work email); URL-encode the path segment (e.g. `alice%40example.com`).
|
|
1368
|
+
operationId: eraseInsightsPerson
|
|
1369
|
+
parameters:
|
|
1370
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
1371
|
+
- name: personId
|
|
1372
|
+
in: path
|
|
1373
|
+
required: true
|
|
1374
|
+
description: Org-chart person_id (URL-encoded when it contains `@`).
|
|
1375
|
+
schema:
|
|
1376
|
+
type: string
|
|
1377
|
+
requestBody:
|
|
1378
|
+
required: false
|
|
1379
|
+
content:
|
|
1380
|
+
application/json:
|
|
1381
|
+
schema:
|
|
1382
|
+
$ref: "#/components/schemas/EraseInsightsPersonBodyDto"
|
|
1383
|
+
example:
|
|
1384
|
+
orgChart: true
|
|
1385
|
+
dashboardMetrics: true
|
|
1386
|
+
aiToolData: true
|
|
1387
|
+
absences: true
|
|
1388
|
+
readinessAnonymize: true
|
|
1389
|
+
responses:
|
|
1390
|
+
"200":
|
|
1391
|
+
description: Person data erased or anonymized
|
|
1392
|
+
content:
|
|
1393
|
+
application/json:
|
|
1394
|
+
schema:
|
|
1395
|
+
$ref: "#/components/schemas/EraseInsightsPersonResultDto"
|
|
1396
|
+
"400":
|
|
1397
|
+
description: Invalid body or personId
|
|
1398
|
+
content:
|
|
1399
|
+
application/json:
|
|
1400
|
+
schema:
|
|
1401
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
1402
|
+
"401":
|
|
1403
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1404
|
+
"403":
|
|
1405
|
+
$ref: "#/components/responses/Forbidden"
|
|
1406
|
+
"404":
|
|
1407
|
+
description: Workspace not found, malformed workspaceId, or person not in org chart
|
|
1408
|
+
content:
|
|
1409
|
+
application/json:
|
|
1410
|
+
schema:
|
|
1411
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
1412
|
+
|
|
1358
1413
|
/workspaces/{workspaceId}/insights/ai-usage-spend/aggregated-teams:
|
|
1359
1414
|
get:
|
|
1360
1415
|
tags: [Workspace]
|
|
@@ -5750,6 +5805,52 @@ components:
|
|
|
5750
5805
|
type: string
|
|
5751
5806
|
enum: [admin, editor, viewer]
|
|
5752
5807
|
|
|
5808
|
+
EraseInsightsPersonBodyDto:
|
|
5809
|
+
type: object
|
|
5810
|
+
description: >
|
|
5811
|
+
Granular person erasure categories. All default to true when omitted.
|
|
5812
|
+
properties:
|
|
5813
|
+
orgChart:
|
|
5814
|
+
type: boolean
|
|
5815
|
+
description: Remove the person node from `tai_workspace_config.org_chart`.
|
|
5816
|
+
dashboardMetrics:
|
|
5817
|
+
type: boolean
|
|
5818
|
+
description: Delete person-scope rows in `tai_workspace_dashboard_metrics`.
|
|
5819
|
+
aiToolData:
|
|
5820
|
+
type: boolean
|
|
5821
|
+
description: Delete AI-tool seats and fact rows keyed to the person.
|
|
5822
|
+
absences:
|
|
5823
|
+
type: boolean
|
|
5824
|
+
description: Delete HRIS absence rows for the person's email.
|
|
5825
|
+
readinessAnonymize:
|
|
5826
|
+
type: boolean
|
|
5827
|
+
description: Clear `requested_by_user_id` on readiness runs for matching app users.
|
|
5828
|
+
|
|
5829
|
+
EraseInsightsPersonResultDto:
|
|
5830
|
+
type: object
|
|
5831
|
+
required:
|
|
5832
|
+
- deleted
|
|
5833
|
+
- aiToolRowsDeleted
|
|
5834
|
+
- absencesDeleted
|
|
5835
|
+
- readinessRunsAnonymized
|
|
5836
|
+
- auditEntriesAnonymized
|
|
5837
|
+
properties:
|
|
5838
|
+
deleted:
|
|
5839
|
+
type: boolean
|
|
5840
|
+
enum: [true]
|
|
5841
|
+
aiToolRowsDeleted:
|
|
5842
|
+
type: integer
|
|
5843
|
+
minimum: 0
|
|
5844
|
+
absencesDeleted:
|
|
5845
|
+
type: integer
|
|
5846
|
+
minimum: 0
|
|
5847
|
+
readinessRunsAnonymized:
|
|
5848
|
+
type: integer
|
|
5849
|
+
minimum: 0
|
|
5850
|
+
auditEntriesAnonymized:
|
|
5851
|
+
type: integer
|
|
5852
|
+
minimum: 0
|
|
5853
|
+
|
|
5753
5854
|
OrgChartNodeDto:
|
|
5754
5855
|
type: object
|
|
5755
5856
|
additionalProperties: false
|
|
@@ -9912,6 +10013,11 @@ components:
|
|
|
9912
10013
|
type: string
|
|
9913
10014
|
enum: [light, dark, system]
|
|
9914
10015
|
|
|
10016
|
+
DataRefreshInterval:
|
|
10017
|
+
type: string
|
|
10018
|
+
enum: [off, 1m, 5m, 10m]
|
|
10019
|
+
description: User-configured dashboard background refresh cadence.
|
|
10020
|
+
|
|
9915
10021
|
NotificationPreferencesDto:
|
|
9916
10022
|
type: object
|
|
9917
10023
|
additionalProperties: false
|
|
@@ -9933,7 +10039,7 @@ components:
|
|
|
9933
10039
|
PreferencesDto:
|
|
9934
10040
|
type: object
|
|
9935
10041
|
additionalProperties: false
|
|
9936
|
-
required: [theme, sidebarCollapsed, timezone, notifications]
|
|
10042
|
+
required: [theme, sidebarCollapsed, timezone, dataRefreshInterval, notifications]
|
|
9937
10043
|
properties:
|
|
9938
10044
|
theme:
|
|
9939
10045
|
$ref: "#/components/schemas/ThemePreference"
|
|
@@ -9942,6 +10048,8 @@ components:
|
|
|
9942
10048
|
timezone:
|
|
9943
10049
|
type: string
|
|
9944
10050
|
description: IANA timezone name
|
|
10051
|
+
dataRefreshInterval:
|
|
10052
|
+
$ref: "#/components/schemas/DataRefreshInterval"
|
|
9945
10053
|
notifications:
|
|
9946
10054
|
$ref: "#/components/schemas/NotificationPreferencesDto"
|
|
9947
10055
|
|
package/package.json
CHANGED
package/src/generated/openapi.ts
CHANGED
|
@@ -446,6 +446,26 @@ export interface paths {
|
|
|
446
446
|
patch?: never;
|
|
447
447
|
trace?: never;
|
|
448
448
|
};
|
|
449
|
+
"/workspaces/{workspaceId}/insights/persons/{personId}/erase": {
|
|
450
|
+
parameters: {
|
|
451
|
+
query?: never;
|
|
452
|
+
header?: never;
|
|
453
|
+
path?: never;
|
|
454
|
+
cookie?: never;
|
|
455
|
+
};
|
|
456
|
+
get?: never;
|
|
457
|
+
put?: never;
|
|
458
|
+
/**
|
|
459
|
+
* Erase person-level insights data (workspace admin)
|
|
460
|
+
* @description Workspace admin only. Deletes or anonymizes a person's developer-insights rows for the workspace: org-chart node, person-scope dashboard metrics, AI-tool fact rows, HRIS absences, and readiness run requester linkage. Granular categories default to all enabled when the body is omitted. `personId` is the org-chart `person_id` (typically work email); URL-encode the path segment (e.g. `alice%40example.com`).
|
|
461
|
+
*/
|
|
462
|
+
post: operations["eraseInsightsPerson"];
|
|
463
|
+
delete?: never;
|
|
464
|
+
options?: never;
|
|
465
|
+
head?: never;
|
|
466
|
+
patch?: never;
|
|
467
|
+
trace?: never;
|
|
468
|
+
};
|
|
449
469
|
"/workspaces/{workspaceId}/insights/ai-usage-spend/aggregated-teams": {
|
|
450
470
|
parameters: {
|
|
451
471
|
query?: never;
|
|
@@ -2205,6 +2225,27 @@ export interface components {
|
|
|
2205
2225
|
/** @enum {string} */
|
|
2206
2226
|
role: "admin" | "editor" | "viewer";
|
|
2207
2227
|
};
|
|
2228
|
+
/** @description Granular person erasure categories. All default to true when omitted. */
|
|
2229
|
+
EraseInsightsPersonBodyDto: {
|
|
2230
|
+
/** @description Remove the person node from `tai_workspace_config.org_chart`. */
|
|
2231
|
+
orgChart?: boolean;
|
|
2232
|
+
/** @description Delete person-scope rows in `tai_workspace_dashboard_metrics`. */
|
|
2233
|
+
dashboardMetrics?: boolean;
|
|
2234
|
+
/** @description Delete AI-tool seats and fact rows keyed to the person. */
|
|
2235
|
+
aiToolData?: boolean;
|
|
2236
|
+
/** @description Delete HRIS absence rows for the person's email. */
|
|
2237
|
+
absences?: boolean;
|
|
2238
|
+
/** @description Clear `requested_by_user_id` on readiness runs for matching app users. */
|
|
2239
|
+
readinessAnonymize?: boolean;
|
|
2240
|
+
};
|
|
2241
|
+
EraseInsightsPersonResultDto: {
|
|
2242
|
+
/** @enum {boolean} */
|
|
2243
|
+
deleted: true;
|
|
2244
|
+
aiToolRowsDeleted: number;
|
|
2245
|
+
absencesDeleted: number;
|
|
2246
|
+
readinessRunsAnonymized: number;
|
|
2247
|
+
auditEntriesAnonymized: number;
|
|
2248
|
+
};
|
|
2208
2249
|
OrgChartNodeDto: {
|
|
2209
2250
|
id: string;
|
|
2210
2251
|
name: string;
|
|
@@ -4059,6 +4100,11 @@ export interface components {
|
|
|
4059
4100
|
} | unknown | unknown;
|
|
4060
4101
|
/** @enum {string} */
|
|
4061
4102
|
ThemePreference: "light" | "dark" | "system";
|
|
4103
|
+
/**
|
|
4104
|
+
* @description User-configured dashboard background refresh cadence.
|
|
4105
|
+
* @enum {string}
|
|
4106
|
+
*/
|
|
4107
|
+
DataRefreshInterval: "off" | "1m" | "5m" | "10m";
|
|
4062
4108
|
NotificationPreferencesDto: {
|
|
4063
4109
|
/** @description Sync/health status notifications. */
|
|
4064
4110
|
status: boolean;
|
|
@@ -4074,6 +4120,7 @@ export interface components {
|
|
|
4074
4120
|
sidebarCollapsed: boolean;
|
|
4075
4121
|
/** @description IANA timezone name */
|
|
4076
4122
|
timezone: string;
|
|
4123
|
+
dataRefreshInterval: components["schemas"]["DataRefreshInterval"];
|
|
4077
4124
|
notifications: components["schemas"]["NotificationPreferencesDto"];
|
|
4078
4125
|
};
|
|
4079
4126
|
ValidationIssueDto: {
|
|
@@ -4562,6 +4609,8 @@ export type TeamMemberDto = components['schemas']['TeamMemberDto'];
|
|
|
4562
4609
|
export type TeamMemberListDto = components['schemas']['TeamMemberListDto'];
|
|
4563
4610
|
export type InviteTeamMemberBodyDto = components['schemas']['InviteTeamMemberBodyDto'];
|
|
4564
4611
|
export type UpdateTeamMemberRoleBodyDto = components['schemas']['UpdateTeamMemberRoleBodyDto'];
|
|
4612
|
+
export type EraseInsightsPersonBodyDto = components['schemas']['EraseInsightsPersonBodyDto'];
|
|
4613
|
+
export type EraseInsightsPersonResultDto = components['schemas']['EraseInsightsPersonResultDto'];
|
|
4565
4614
|
export type OrgChartNodeDto = components['schemas']['OrgChartNodeDto'];
|
|
4566
4615
|
export type OrgChartTreeNodeDto = components['schemas']['OrgChartTreeNodeDto'];
|
|
4567
4616
|
export type ScoringOrgChartDto = components['schemas']['ScoringOrgChartDto'];
|
|
@@ -4740,6 +4789,7 @@ export type JourneyStepId = components['schemas']['JourneyStepId'];
|
|
|
4740
4789
|
export type JourneyProgressDto = components['schemas']['JourneyProgressDto'];
|
|
4741
4790
|
export type JourneyProgressUpdateDto = components['schemas']['JourneyProgressUpdateDto'];
|
|
4742
4791
|
export type ThemePreference = components['schemas']['ThemePreference'];
|
|
4792
|
+
export type DataRefreshInterval = components['schemas']['DataRefreshInterval'];
|
|
4743
4793
|
export type NotificationPreferencesDto = components['schemas']['NotificationPreferencesDto'];
|
|
4744
4794
|
export type PreferencesDto = components['schemas']['PreferencesDto'];
|
|
4745
4795
|
export type ValidationIssueDto = components['schemas']['ValidationIssueDto'];
|
|
@@ -5977,6 +6027,63 @@ export interface operations {
|
|
|
5977
6027
|
};
|
|
5978
6028
|
};
|
|
5979
6029
|
};
|
|
6030
|
+
eraseInsightsPerson: {
|
|
6031
|
+
parameters: {
|
|
6032
|
+
query?: never;
|
|
6033
|
+
header?: never;
|
|
6034
|
+
path: {
|
|
6035
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
6036
|
+
/** @description Org-chart person_id (URL-encoded when it contains `@`). */
|
|
6037
|
+
personId: string;
|
|
6038
|
+
};
|
|
6039
|
+
cookie?: never;
|
|
6040
|
+
};
|
|
6041
|
+
requestBody?: {
|
|
6042
|
+
content: {
|
|
6043
|
+
/**
|
|
6044
|
+
* @example {
|
|
6045
|
+
* "orgChart": true,
|
|
6046
|
+
* "dashboardMetrics": true,
|
|
6047
|
+
* "aiToolData": true,
|
|
6048
|
+
* "absences": true,
|
|
6049
|
+
* "readinessAnonymize": true
|
|
6050
|
+
* }
|
|
6051
|
+
*/
|
|
6052
|
+
"application/json": components["schemas"]["EraseInsightsPersonBodyDto"];
|
|
6053
|
+
};
|
|
6054
|
+
};
|
|
6055
|
+
responses: {
|
|
6056
|
+
/** @description Person data erased or anonymized */
|
|
6057
|
+
200: {
|
|
6058
|
+
headers: {
|
|
6059
|
+
[name: string]: unknown;
|
|
6060
|
+
};
|
|
6061
|
+
content: {
|
|
6062
|
+
"application/json": components["schemas"]["EraseInsightsPersonResultDto"];
|
|
6063
|
+
};
|
|
6064
|
+
};
|
|
6065
|
+
/** @description Invalid body or personId */
|
|
6066
|
+
400: {
|
|
6067
|
+
headers: {
|
|
6068
|
+
[name: string]: unknown;
|
|
6069
|
+
};
|
|
6070
|
+
content: {
|
|
6071
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
6072
|
+
};
|
|
6073
|
+
};
|
|
6074
|
+
401: components["responses"]["Unauthorized"];
|
|
6075
|
+
403: components["responses"]["Forbidden"];
|
|
6076
|
+
/** @description Workspace not found, malformed workspaceId, or person not in org chart */
|
|
6077
|
+
404: {
|
|
6078
|
+
headers: {
|
|
6079
|
+
[name: string]: unknown;
|
|
6080
|
+
};
|
|
6081
|
+
content: {
|
|
6082
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
6083
|
+
};
|
|
6084
|
+
};
|
|
6085
|
+
};
|
|
6086
|
+
};
|
|
5980
6087
|
getAiUsageSpendAggregatedTeams: {
|
|
5981
6088
|
parameters: {
|
|
5982
6089
|
query?: {
|