@thinkai/tai-api-contract 2.115.0 → 2.116.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.115.0
4
+ version: 2.116.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}/...`.
@@ -1537,6 +1537,75 @@ paths:
1537
1537
  schema:
1538
1538
  $ref: "#/components/schemas/ErrorMessageDto"
1539
1539
 
1540
+ /workspaces/{workspaceId}/ai-email-aliases:
1541
+ get:
1542
+ tags: [Workspace]
1543
+ summary: Get workspace email aliases for people not on the org chart
1544
+ description: >
1545
+ Returns workspace-level mappings from alternate work emails to a canonical email
1546
+ (same behaviour as org-chart `alternate_emails`, without adding org-chart members).
1547
+ Empty `aliases` array when unset. Member-level read access.
1548
+ operationId: getWorkspaceAiEmailAliases
1549
+ parameters:
1550
+ - $ref: "#/components/parameters/WorkspaceId"
1551
+ responses:
1552
+ "200":
1553
+ description: Current alias mappings (may be empty)
1554
+ content:
1555
+ application/json:
1556
+ schema:
1557
+ $ref: "#/components/schemas/AiEmailAliasesDto"
1558
+ "401":
1559
+ $ref: "#/components/responses/Unauthorized"
1560
+ "403":
1561
+ $ref: "#/components/responses/Forbidden"
1562
+ "404":
1563
+ description: Workspace does not exist or malformed workspaceId
1564
+ content:
1565
+ application/json:
1566
+ schema:
1567
+ $ref: "#/components/schemas/ErrorMessageDto"
1568
+ put:
1569
+ tags: [Workspace]
1570
+ summary: Set workspace email aliases for people not on the org chart
1571
+ description: >
1572
+ Full-replace workspace-level email alias mappings (e.g.
1573
+ `jane.doe.contractor@example.com` → `jane.doe@example.com`). Same effect as
1574
+ `alternate_emails` on an org row. Does not add org-chart members.
1575
+ `PUT { aliases: [] }` clears all aliases. Requires workspace **admin**.
1576
+ operationId: putWorkspaceAiEmailAliases
1577
+ parameters:
1578
+ - $ref: "#/components/parameters/WorkspaceId"
1579
+ requestBody:
1580
+ required: true
1581
+ content:
1582
+ application/json:
1583
+ schema:
1584
+ $ref: "#/components/schemas/AiEmailAliasesDto"
1585
+ responses:
1586
+ "204":
1587
+ description: Aliases persisted (or cleared).
1588
+ "400":
1589
+ description: Invalid payload
1590
+ content:
1591
+ application/json:
1592
+ schema:
1593
+ $ref: "#/components/schemas/ErrorMessageDto"
1594
+ "401":
1595
+ $ref: "#/components/responses/Unauthorized"
1596
+ "403":
1597
+ description: Forbidden — workspace admin required
1598
+ content:
1599
+ application/json:
1600
+ schema:
1601
+ $ref: "#/components/schemas/ErrorMessageDto"
1602
+ "404":
1603
+ description: Workspace does not exist or malformed workspaceId
1604
+ content:
1605
+ application/json:
1606
+ schema:
1607
+ $ref: "#/components/schemas/ErrorMessageDto"
1608
+
1540
1609
  /workspaces/{workspaceId}/productivity-targets:
1541
1610
  get:
1542
1611
  tags: [Workspace]
@@ -11171,6 +11240,32 @@ components:
11171
11240
  maximum: 10000
11172
11241
  description: Ceiling — stay at or below this many CI failures per engineer per week. `0` is valid.
11173
11242
 
11243
+ AiEmailAliasEntryDto:
11244
+ type: object
11245
+ required: [canonicalEmail, aliasEmail]
11246
+ additionalProperties: false
11247
+ properties:
11248
+ canonicalEmail:
11249
+ type: string
11250
+ format: email
11251
+ description: Canonical identity for AI tool attribution (person_id target).
11252
+ aliasEmail:
11253
+ type: string
11254
+ format: email
11255
+ description: Alternate Claude/Cursor login email mapped to canonicalEmail.
11256
+
11257
+ AiEmailAliasesDto:
11258
+ type: object
11259
+ required: [aliases]
11260
+ additionalProperties: false
11261
+ properties:
11262
+ aliases:
11263
+ type: array
11264
+ maxItems: 5000
11265
+ items:
11266
+ $ref: "#/components/schemas/AiEmailAliasEntryDto"
11267
+ description: Workspace-level alias mappings (empty array when unset).
11268
+
11174
11269
  TestConnectionResponseDto:
11175
11270
  type: object
11176
11271
  required: [success]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.115.0",
3
+ "version": "2.116.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -582,6 +582,30 @@ export interface paths {
582
582
  patch?: never;
583
583
  trace?: never;
584
584
  };
585
+ "/workspaces/{workspaceId}/ai-email-aliases": {
586
+ parameters: {
587
+ query?: never;
588
+ header?: never;
589
+ path?: never;
590
+ cookie?: never;
591
+ };
592
+ /**
593
+ * Get workspace email aliases for people not on the org chart
594
+ * @description Returns workspace-level mappings from alternate work emails to a canonical email (same behaviour as org-chart `alternate_emails`, without adding org-chart members). Empty `aliases` array when unset. Member-level read access.
595
+ */
596
+ get: operations["getWorkspaceAiEmailAliases"];
597
+ /**
598
+ * Set workspace email aliases for people not on the org chart
599
+ * @description Full-replace workspace-level email alias mappings (e.g. `jane.doe.contractor@example.com` → `jane.doe@example.com`). Same effect as `alternate_emails` on an org row. Does not add org-chart members. `PUT { aliases: [] }` clears all aliases. Requires workspace **admin**.
600
+ */
601
+ put: operations["putWorkspaceAiEmailAliases"];
602
+ post?: never;
603
+ delete?: never;
604
+ options?: never;
605
+ head?: never;
606
+ patch?: never;
607
+ trace?: never;
608
+ };
585
609
  "/workspaces/{workspaceId}/productivity-targets": {
586
610
  parameters: {
587
611
  query?: never;
@@ -4552,6 +4576,22 @@ export interface components {
4552
4576
  /** @description Ceiling — stay at or below this many CI failures per engineer per week. `0` is valid. */
4553
4577
  ciFailuresPerEngineerPerWeek?: number | null;
4554
4578
  };
4579
+ AiEmailAliasEntryDto: {
4580
+ /**
4581
+ * Format: email
4582
+ * @description Canonical identity for AI tool attribution (person_id target).
4583
+ */
4584
+ canonicalEmail: string;
4585
+ /**
4586
+ * Format: email
4587
+ * @description Alternate Claude/Cursor login email mapped to canonicalEmail.
4588
+ */
4589
+ aliasEmail: string;
4590
+ };
4591
+ AiEmailAliasesDto: {
4592
+ /** @description Workspace-level alias mappings (empty array when unset). */
4593
+ aliases: components["schemas"]["AiEmailAliasEntryDto"][];
4594
+ };
4555
4595
  TestConnectionResponseDto: {
4556
4596
  success: boolean;
4557
4597
  /** @description Machine-readable failure code when success=false (e.g. invalid_token, zenhr_sync_in_progress when ZenHR OAuth refresh is contended). */
@@ -9079,6 +9119,8 @@ export type DeliveryRoleConfigDto = components['schemas']['DeliveryRoleConfigDto
9079
9119
  export type RepoDeliveryOverrideDto = components['schemas']['RepoDeliveryOverrideDto'];
9080
9120
  export type DeliveryTopologyDto = components['schemas']['DeliveryTopologyDto'];
9081
9121
  export type ProductivityTargetsDto = components['schemas']['ProductivityTargetsDto'];
9122
+ export type AiEmailAliasEntryDto = components['schemas']['AiEmailAliasEntryDto'];
9123
+ export type AiEmailAliasesDto = components['schemas']['AiEmailAliasesDto'];
9082
9124
  export type TestConnectionResponseDto = components['schemas']['TestConnectionResponseDto'];
9083
9125
  export type CursorKeyUsageDto = components['schemas']['CursorKeyUsageDto'];
9084
9126
  export type AiToolSeatDto = components['schemas']['AiToolSeatDto'];
@@ -11102,6 +11144,91 @@ export interface operations {
11102
11144
  };
11103
11145
  };
11104
11146
  };
11147
+ getWorkspaceAiEmailAliases: {
11148
+ parameters: {
11149
+ query?: never;
11150
+ header?: never;
11151
+ path: {
11152
+ workspaceId: components["parameters"]["WorkspaceId"];
11153
+ };
11154
+ cookie?: never;
11155
+ };
11156
+ requestBody?: never;
11157
+ responses: {
11158
+ /** @description Current alias mappings (may be empty) */
11159
+ 200: {
11160
+ headers: {
11161
+ [name: string]: unknown;
11162
+ };
11163
+ content: {
11164
+ "application/json": components["schemas"]["AiEmailAliasesDto"];
11165
+ };
11166
+ };
11167
+ 401: components["responses"]["Unauthorized"];
11168
+ 403: components["responses"]["Forbidden"];
11169
+ /** @description Workspace does not exist or malformed workspaceId */
11170
+ 404: {
11171
+ headers: {
11172
+ [name: string]: unknown;
11173
+ };
11174
+ content: {
11175
+ "application/json": components["schemas"]["ErrorMessageDto"];
11176
+ };
11177
+ };
11178
+ };
11179
+ };
11180
+ putWorkspaceAiEmailAliases: {
11181
+ parameters: {
11182
+ query?: never;
11183
+ header?: never;
11184
+ path: {
11185
+ workspaceId: components["parameters"]["WorkspaceId"];
11186
+ };
11187
+ cookie?: never;
11188
+ };
11189
+ requestBody: {
11190
+ content: {
11191
+ "application/json": components["schemas"]["AiEmailAliasesDto"];
11192
+ };
11193
+ };
11194
+ responses: {
11195
+ /** @description Aliases persisted (or cleared). */
11196
+ 204: {
11197
+ headers: {
11198
+ [name: string]: unknown;
11199
+ };
11200
+ content?: never;
11201
+ };
11202
+ /** @description Invalid payload */
11203
+ 400: {
11204
+ headers: {
11205
+ [name: string]: unknown;
11206
+ };
11207
+ content: {
11208
+ "application/json": components["schemas"]["ErrorMessageDto"];
11209
+ };
11210
+ };
11211
+ 401: components["responses"]["Unauthorized"];
11212
+ /** @description Forbidden — workspace admin required */
11213
+ 403: {
11214
+ headers: {
11215
+ [name: string]: unknown;
11216
+ };
11217
+ content: {
11218
+ "application/json": components["schemas"]["ErrorMessageDto"];
11219
+ };
11220
+ };
11221
+ /** @description Workspace does not exist or malformed workspaceId */
11222
+ 404: {
11223
+ headers: {
11224
+ [name: string]: unknown;
11225
+ };
11226
+ content: {
11227
+ "application/json": components["schemas"]["ErrorMessageDto"];
11228
+ };
11229
+ };
11230
+ };
11231
+ };
11105
11232
  getWorkspaceProductivityTargets: {
11106
11233
  parameters: {
11107
11234
  query?: never;