@thinkai/tai-api-contract 2.150.0 → 2.151.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.150.0
4
+ version: 2.151.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}/...`.
@@ -10249,6 +10249,239 @@ paths:
10249
10249
  "403":
10250
10250
  $ref: "#/components/responses/Forbidden"
10251
10251
 
10252
+ /workspaces/{workspaceId}/integrations/teams/install-url:
10253
+ get:
10254
+ tags: [Integrations, Notifications]
10255
+ summary: Microsoft sign-in URL for Teams notification delivery
10256
+ operationId: getWorkspaceTeamsInstallUrl
10257
+ description: >
10258
+ Workspace **admin** only. Returns the Microsoft authorize URL. State carries the
10259
+ workspace and the signed-in admin. Editor or viewer is `403` `workspace_admin_required`.
10260
+ parameters:
10261
+ - $ref: "#/components/parameters/WorkspaceId"
10262
+ responses:
10263
+ "200":
10264
+ description: Authorize URL
10265
+ content:
10266
+ application/json:
10267
+ schema:
10268
+ $ref: "#/components/schemas/TeamsInstallUrlDto"
10269
+ example:
10270
+ url: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=example&state=example-state"
10271
+ "401":
10272
+ $ref: "#/components/responses/Unauthorized"
10273
+ "403":
10274
+ description: Editor or viewer
10275
+ content:
10276
+ application/json:
10277
+ schema:
10278
+ $ref: "#/components/schemas/ErrorMessageDto"
10279
+ example:
10280
+ error: Forbidden
10281
+ code: workspace_admin_required
10282
+ "404":
10283
+ description: Workspace not found
10284
+ content:
10285
+ application/json:
10286
+ schema:
10287
+ $ref: "#/components/schemas/ErrorMessageDto"
10288
+ example:
10289
+ error: Not found
10290
+ "503":
10291
+ description: Teams app credentials are not configured
10292
+ content:
10293
+ application/json:
10294
+ schema:
10295
+ $ref: "#/components/schemas/ErrorMessageDto"
10296
+ example:
10297
+ error: Teams sign-in is not configured
10298
+ code: teams_not_configured
10299
+
10300
+ /integrations/teams/callback:
10301
+ get:
10302
+ tags: [Integrations, Notifications]
10303
+ summary: Finish Teams Microsoft sign-in
10304
+ operationId: getTeamsIntegrationCallback
10305
+ description: >
10306
+ Public redirect target. The one-time state was minted by a signed-in admin and
10307
+ still requires that user to be a workspace admin. Stores the bot token encrypted
10308
+ and redirects to `{spa}/settings?tab=preferences&chat=teams`.
10309
+ security: []
10310
+ parameters:
10311
+ - name: code
10312
+ in: query
10313
+ schema:
10314
+ type: string
10315
+ - name: state
10316
+ in: query
10317
+ required: true
10318
+ schema:
10319
+ type: string
10320
+ - name: error
10321
+ in: query
10322
+ schema:
10323
+ type: string
10324
+ responses:
10325
+ "302":
10326
+ description: Redirect to Settings → Preferences
10327
+ headers:
10328
+ Location:
10329
+ schema:
10330
+ type: string
10331
+ example: "https://app.example.com/settings?tab=preferences&chat=teams"
10332
+ "503":
10333
+ description: SPA origin is not configured
10334
+ content:
10335
+ application/json:
10336
+ schema:
10337
+ $ref: "#/components/schemas/ErrorMessageDto"
10338
+
10339
+ /workspaces/{workspaceId}/integrations/teams:
10340
+ get:
10341
+ tags: [Integrations, Notifications]
10342
+ summary: Teams connection status
10343
+ operationId: getWorkspaceTeamsConnection
10344
+ description: >
10345
+ Any workspace member. `{ connected, channelName }`. Never returns the bot token.
10346
+ `channelName` is null until an admin saves a channel.
10347
+ parameters:
10348
+ - $ref: "#/components/parameters/WorkspaceId"
10349
+ responses:
10350
+ "200":
10351
+ description: Connection status
10352
+ content:
10353
+ application/json:
10354
+ schema:
10355
+ $ref: "#/components/schemas/TeamsConnectionDto"
10356
+ example:
10357
+ connected: true
10358
+ channelName: General
10359
+ "401":
10360
+ $ref: "#/components/responses/Unauthorized"
10361
+ "403":
10362
+ $ref: "#/components/responses/Forbidden"
10363
+ "404":
10364
+ description: Workspace not found
10365
+ content:
10366
+ application/json:
10367
+ schema:
10368
+ $ref: "#/components/schemas/ErrorMessageDto"
10369
+ example:
10370
+ error: Not found
10371
+ delete:
10372
+ tags: [Integrations, Notifications]
10373
+ summary: Disconnect Teams
10374
+ operationId: deleteWorkspaceTeamsConnection
10375
+ description: >
10376
+ Workspace **admin** only. Later Message Center posts do not go to Teams.
10377
+ Member chat cells stay unchanged.
10378
+ parameters:
10379
+ - $ref: "#/components/parameters/WorkspaceId"
10380
+ responses:
10381
+ "204":
10382
+ description: Disconnected
10383
+ "401":
10384
+ $ref: "#/components/responses/Unauthorized"
10385
+ "403":
10386
+ description: Editor or viewer
10387
+ content:
10388
+ application/json:
10389
+ schema:
10390
+ $ref: "#/components/schemas/ErrorMessageDto"
10391
+ example:
10392
+ error: Forbidden
10393
+ code: workspace_admin_required
10394
+ "404":
10395
+ description: Workspace not found
10396
+ content:
10397
+ application/json:
10398
+ schema:
10399
+ $ref: "#/components/schemas/ErrorMessageDto"
10400
+ example:
10401
+ error: Not found
10402
+
10403
+ /workspaces/{workspaceId}/integrations/teams/channel:
10404
+ put:
10405
+ tags: [Integrations, Notifications]
10406
+ summary: Save the Teams channel for notification posts
10407
+ operationId: putWorkspaceTeamsChannel
10408
+ description: >
10409
+ Workspace **admin** only. Body `{ channelId }`. The channel must be visible to the
10410
+ connected Microsoft account. Until a channel is saved, channel-mode delivery is
10411
+ skipped with `chat_channel_unset`.
10412
+ parameters:
10413
+ - $ref: "#/components/parameters/WorkspaceId"
10414
+ requestBody:
10415
+ required: true
10416
+ content:
10417
+ application/json:
10418
+ schema:
10419
+ $ref: "#/components/schemas/TeamsChannelBodyDto"
10420
+ example:
10421
+ channelId: "19:example@thread.tacv2"
10422
+ responses:
10423
+ "200":
10424
+ description: Channel saved
10425
+ content:
10426
+ application/json:
10427
+ schema:
10428
+ $ref: "#/components/schemas/TeamsConnectionDto"
10429
+ example:
10430
+ connected: true
10431
+ channelName: General
10432
+ "400":
10433
+ description: Missing channelId, or the channel was not found
10434
+ content:
10435
+ application/json:
10436
+ schema:
10437
+ $ref: "#/components/schemas/ErrorMessageDto"
10438
+ examples:
10439
+ invalid:
10440
+ value:
10441
+ error: channelId is required
10442
+ code: invalid_input
10443
+ missing:
10444
+ value:
10445
+ error: Teams channel was not found
10446
+ code: teams_channel_not_found
10447
+ "401":
10448
+ $ref: "#/components/responses/Unauthorized"
10449
+ "403":
10450
+ description: Editor or viewer
10451
+ content:
10452
+ application/json:
10453
+ schema:
10454
+ $ref: "#/components/schemas/ErrorMessageDto"
10455
+ example:
10456
+ error: Forbidden
10457
+ code: workspace_admin_required
10458
+ "404":
10459
+ description: Workspace not found
10460
+ content:
10461
+ application/json:
10462
+ schema:
10463
+ $ref: "#/components/schemas/ErrorMessageDto"
10464
+ example:
10465
+ error: Not found
10466
+ "409":
10467
+ description: Teams is not connected
10468
+ content:
10469
+ application/json:
10470
+ schema:
10471
+ $ref: "#/components/schemas/ErrorMessageDto"
10472
+ example:
10473
+ error: Teams is not connected
10474
+ code: teams_not_connected
10475
+ "502":
10476
+ description: Microsoft Graph rejected the channel lookup
10477
+ content:
10478
+ application/json:
10479
+ schema:
10480
+ $ref: "#/components/schemas/ErrorMessageDto"
10481
+ example:
10482
+ error: Teams channel lookup failed
10483
+ code: teams_graph_failed
10484
+
10252
10485
  /workspaces/{workspaceId}/integrations/zelt/authorize-url:
10253
10486
  post:
10254
10487
  tags: [HRIS, Integrations]
@@ -11261,6 +11494,35 @@ components:
11261
11494
  error: zenhr_sync_in_progress
11262
11495
 
11263
11496
  schemas:
11497
+ TeamsInstallUrlDto:
11498
+ type: object
11499
+ required: [url]
11500
+ properties:
11501
+ url:
11502
+ type: string
11503
+ format: uri
11504
+
11505
+ TeamsConnectionDto:
11506
+ type: object
11507
+ required: [connected, channelName]
11508
+ properties:
11509
+ connected:
11510
+ type: boolean
11511
+ description: True after an admin completes Microsoft sign-in.
11512
+ channelName:
11513
+ type: string
11514
+ nullable: true
11515
+ description: Selected channel display name. Null until an admin saves a channel.
11516
+
11517
+ TeamsChannelBodyDto:
11518
+ type: object
11519
+ required: [channelId]
11520
+ properties:
11521
+ channelId:
11522
+ type: string
11523
+ minLength: 1
11524
+ maxLength: 256
11525
+
11264
11526
  ErrorMessageDto:
11265
11527
  type: object
11266
11528
  required: [error]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.150.0",
3
+ "version": "2.151.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",