@thinkai/tai-api-contract 2.108.0 → 2.110.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.
@@ -1,7 +1,7 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: ThinkAI API
4
- version: 2.108.0
4
+ version: 2.110.0
5
5
  description: >
6
6
  Contract surface for the AI Driven SDLC backend used by ThinkAI.
7
7
  Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
@@ -8300,8 +8300,12 @@ paths:
8300
8300
  `persons` and `errors`. Does not persist to `spa_org_chart` or `org_chart`. The SPA
8301
8301
  derives teams client-side and saves the org structure via `POST /workspaces/{workspaceId}/org-chart`.
8302
8302
  Required columns: employee_id, name, email, title, department, team, manager_id, location.
8303
- Optional: github_username (GitHub login for productivity ingest). Saving the SPA snapshot
8304
- also materializes a scoring `org_chart` tree for team/person metrics when import members are present.
8303
+ Optional: github_username (GitHub login for productivity ingest), bitbucket_nickname,
8304
+ bitbucket_uuid, alternate_emails (comma-separated alternate work emails for AI tool spend
8305
+ attribution). Saving the SPA snapshot also materializes a scoring `org_chart` tree for
8306
+ team/person metrics when import members are present. Parse-only responses may include
8307
+ duplicateEmailWarnings, identityEmailPreview (cross-check against connected AI tool seat
8308
+ rosters), and importWarnings when roster preview is unavailable.
8305
8309
  operationId: postOrgChartImport
8306
8310
  parameters:
8307
8311
  - $ref: "#/components/parameters/WorkspaceId"
@@ -9811,6 +9815,59 @@ components:
9811
9815
  bitbucketUuid:
9812
9816
  type: string
9813
9817
  description: Bitbucket account UUID (e.g. "{aeefb6b0-...}") to attribute merged PRs and reviews to this person in productivity ingest. Preferred over bitbucketNickname — Bitbucket PR payloads expose a stable uuid but not nickname. Resolves to the same person_id (email) as githubUsername.
9818
+ alternateEmails:
9819
+ type: string
9820
+ description: Optional comma-separated work emails that map to the same person for AI tool spend/usage (mirrors multi-login github_username). Primary email remains canonical person_id.
9821
+
9822
+ OrgChartEmailOwnershipDto:
9823
+ type: object
9824
+ additionalProperties: false
9825
+ required: [email, employeeId, name, isPrimary]
9826
+ properties:
9827
+ email:
9828
+ type: string
9829
+ employeeId:
9830
+ type: string
9831
+ name:
9832
+ type: string
9833
+ isPrimary:
9834
+ type: boolean
9835
+
9836
+ OrgChartEmailDuplicateDto:
9837
+ type: object
9838
+ additionalProperties: false
9839
+ required: [email, owners]
9840
+ properties:
9841
+ email:
9842
+ type: string
9843
+ owners:
9844
+ type: array
9845
+ items:
9846
+ $ref: "#/components/schemas/OrgChartEmailOwnershipDto"
9847
+
9848
+ OrgChartIdentityEmailPreviewDto:
9849
+ type: object
9850
+ additionalProperties: false
9851
+ required: [employeeId, name, primaryEmail, alternateEmails, rosterMatches, warnings]
9852
+ properties:
9853
+ employeeId:
9854
+ type: string
9855
+ name:
9856
+ type: string
9857
+ primaryEmail:
9858
+ type: string
9859
+ alternateEmails:
9860
+ type: array
9861
+ items:
9862
+ type: string
9863
+ rosterMatches:
9864
+ type: array
9865
+ items:
9866
+ type: string
9867
+ warnings:
9868
+ type: array
9869
+ items:
9870
+ type: string
9814
9871
 
9815
9872
  UpdateMyOrgChartMemberBodyDto:
9816
9873
  type: object
@@ -9832,6 +9889,9 @@ components:
9832
9889
  type: string
9833
9890
  bitbucketUuid:
9834
9891
  type: string
9892
+ alternateEmails:
9893
+ type: string
9894
+ description: Comma-separated alternate work emails for AI tool attribution.
9835
9895
 
9836
9896
  OrgChartImportResultDto:
9837
9897
  type: object
@@ -9851,6 +9911,21 @@ components:
9851
9911
  description: Parse-only preview of identity rows that would not match HRIS persons
9852
9912
  items:
9853
9913
  $ref: "#/components/schemas/OrgChartUnmatchedIdentitySampleDto"
9914
+ duplicateEmailWarnings:
9915
+ type: array
9916
+ description: Emails claimed by more than one org-chart row (primary or alternate)
9917
+ items:
9918
+ $ref: "#/components/schemas/OrgChartEmailDuplicateDto"
9919
+ identityEmailPreview:
9920
+ type: array
9921
+ description: Cross-check of primary and alternate emails against connected AI tool seat rosters
9922
+ items:
9923
+ $ref: "#/components/schemas/OrgChartIdentityEmailPreviewDto"
9924
+ importWarnings:
9925
+ type: array
9926
+ description: Non-fatal import advisories (for example when AI tool roster preview could not be loaded)
9927
+ items:
9928
+ type: string
9854
9929
 
9855
9930
  OrgChartSaveResultDto:
9856
9931
  type: object
@@ -16494,7 +16569,8 @@ components:
16494
16569
  PreferencesDto:
16495
16570
  type: object
16496
16571
  additionalProperties: false
16497
- required: [theme, sidebarCollapsed, timezone, dataRefreshInterval, notifications]
16572
+ required:
16573
+ [theme, sidebarCollapsed, timezone, dataRefreshInterval, notifications, buddyEnabled]
16498
16574
  properties:
16499
16575
  theme:
16500
16576
  $ref: "#/components/schemas/ThemePreference"
@@ -16507,6 +16583,12 @@ components:
16507
16583
  $ref: "#/components/schemas/DataRefreshInterval"
16508
16584
  notifications:
16509
16585
  $ref: "#/components/schemas/NotificationPreferencesDto"
16586
+ buddyEnabled:
16587
+ type: boolean
16588
+ default: false
16589
+ description: >
16590
+ When true, show the ThinkAI Buddy mascot. Default and missing stored
16591
+ values are false (opt-in only).
16510
16592
 
16511
16593
  ValidationIssueDto:
16512
16594
  type: object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.108.0",
3
+ "version": "2.110.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3358,7 +3358,7 @@ export interface paths {
3358
3358
  put?: never;
3359
3359
  /**
3360
3360
  * Import org chart from Supabase storage path
3361
- * @description Parse-only. Downloads the CSV at `storagePath` from the `org-charts` bucket and returns `persons` and `errors`. Does not persist to `spa_org_chart` or `org_chart`. The SPA derives teams client-side and saves the org structure via `POST /workspaces/{workspaceId}/org-chart`. Required columns: employee_id, name, email, title, department, team, manager_id, location. Optional: github_username (GitHub login for productivity ingest). Saving the SPA snapshot also materializes a scoring `org_chart` tree for team/person metrics when import members are present.
3361
+ * @description Parse-only. Downloads the CSV at `storagePath` from the `org-charts` bucket and returns `persons` and `errors`. Does not persist to `spa_org_chart` or `org_chart`. The SPA derives teams client-side and saves the org structure via `POST /workspaces/{workspaceId}/org-chart`. Required columns: employee_id, name, email, title, department, team, manager_id, location. Optional: github_username (GitHub login for productivity ingest), bitbucket_nickname, bitbucket_uuid, alternate_emails (comma-separated alternate work emails for AI tool spend attribution). Saving the SPA snapshot also materializes a scoring `org_chart` tree for team/person metrics when import members are present. Parse-only responses may include duplicateEmailWarnings, identityEmailPreview (cross-check against connected AI tool seat rosters), and importWarnings when roster preview is unavailable.
3362
3362
  */
3363
3363
  post: operations["postOrgChartImport"];
3364
3364
  delete?: never;
@@ -3905,6 +3905,26 @@ export interface components {
3905
3905
  bitbucketNickname?: string;
3906
3906
  /** @description Bitbucket account UUID (e.g. "{aeefb6b0-...}") to attribute merged PRs and reviews to this person in productivity ingest. Preferred over bitbucketNickname — Bitbucket PR payloads expose a stable uuid but not nickname. Resolves to the same person_id (email) as githubUsername. */
3907
3907
  bitbucketUuid?: string;
3908
+ /** @description Optional comma-separated work emails that map to the same person for AI tool spend/usage (mirrors multi-login github_username). Primary email remains canonical person_id. */
3909
+ alternateEmails?: string;
3910
+ };
3911
+ OrgChartEmailOwnershipDto: {
3912
+ email: string;
3913
+ employeeId: string;
3914
+ name: string;
3915
+ isPrimary: boolean;
3916
+ };
3917
+ OrgChartEmailDuplicateDto: {
3918
+ email: string;
3919
+ owners: components["schemas"]["OrgChartEmailOwnershipDto"][];
3920
+ };
3921
+ OrgChartIdentityEmailPreviewDto: {
3922
+ employeeId: string;
3923
+ name: string;
3924
+ primaryEmail: string;
3925
+ alternateEmails: string[];
3926
+ rosterMatches: string[];
3927
+ warnings: string[];
3908
3928
  };
3909
3929
  UpdateMyOrgChartMemberBodyDto: {
3910
3930
  name?: string;
@@ -3915,12 +3935,20 @@ export interface components {
3915
3935
  githubUsername?: string;
3916
3936
  bitbucketNickname?: string;
3917
3937
  bitbucketUuid?: string;
3938
+ /** @description Comma-separated alternate work emails for AI tool attribution. */
3939
+ alternateEmails?: string;
3918
3940
  };
3919
3941
  OrgChartImportResultDto: {
3920
3942
  persons: components["schemas"]["OrgChartPersonDto"][];
3921
3943
  errors: string[];
3922
3944
  /** @description Parse-only preview of identity rows that would not match HRIS persons */
3923
3945
  unmatchedPreview?: components["schemas"]["OrgChartUnmatchedIdentitySampleDto"][];
3946
+ /** @description Emails claimed by more than one org-chart row (primary or alternate) */
3947
+ duplicateEmailWarnings?: components["schemas"]["OrgChartEmailDuplicateDto"][];
3948
+ /** @description Cross-check of primary and alternate emails against connected AI tool seat rosters */
3949
+ identityEmailPreview?: components["schemas"]["OrgChartIdentityEmailPreviewDto"][];
3950
+ /** @description Non-fatal import advisories (for example when AI tool roster preview could not be loaded) */
3951
+ importWarnings?: string[];
3924
3952
  };
3925
3953
  OrgChartSaveResultDto: {
3926
3954
  ok: boolean;
@@ -7052,6 +7080,11 @@ export interface components {
7052
7080
  timezone: string;
7053
7081
  dataRefreshInterval: components["schemas"]["DataRefreshInterval"];
7054
7082
  notifications: components["schemas"]["NotificationPreferencesDto"];
7083
+ /**
7084
+ * @description When true, show the ThinkAI Buddy mascot. Default and missing stored values are false (opt-in only).
7085
+ * @default false
7086
+ */
7087
+ buddyEnabled: boolean;
7055
7088
  };
7056
7089
  ValidationIssueDto: {
7057
7090
  path: (string | number)[];
@@ -8570,6 +8603,9 @@ export type OrgChartTreeNodeDto = components['schemas']['OrgChartTreeNodeDto'];
8570
8603
  export type ScoringOrgChartDto = components['schemas']['ScoringOrgChartDto'];
8571
8604
  export type OrgChartDto = components['schemas']['OrgChartDto'];
8572
8605
  export type OrgChartPersonDto = components['schemas']['OrgChartPersonDto'];
8606
+ export type OrgChartEmailOwnershipDto = components['schemas']['OrgChartEmailOwnershipDto'];
8607
+ export type OrgChartEmailDuplicateDto = components['schemas']['OrgChartEmailDuplicateDto'];
8608
+ export type OrgChartIdentityEmailPreviewDto = components['schemas']['OrgChartIdentityEmailPreviewDto'];
8573
8609
  export type UpdateMyOrgChartMemberBodyDto = components['schemas']['UpdateMyOrgChartMemberBodyDto'];
8574
8610
  export type OrgChartImportResultDto = components['schemas']['OrgChartImportResultDto'];
8575
8611
  export type OrgChartSaveResultDto = components['schemas']['OrgChartSaveResultDto'];