@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.
@@ -4206,6 +4206,90 @@ export interface paths {
4206
4206
  patch?: never;
4207
4207
  trace?: never;
4208
4208
  };
4209
+ "/workspaces/{workspaceId}/integrations/teams/install-url": {
4210
+ parameters: {
4211
+ query?: never;
4212
+ header?: never;
4213
+ path?: never;
4214
+ cookie?: never;
4215
+ };
4216
+ /**
4217
+ * Microsoft sign-in URL for Teams notification delivery
4218
+ * @description Workspace **admin** only. Returns the Microsoft authorize URL. State carries the workspace and the signed-in admin. Editor or viewer is `403` `workspace_admin_required`.
4219
+ */
4220
+ get: operations["getWorkspaceTeamsInstallUrl"];
4221
+ put?: never;
4222
+ post?: never;
4223
+ delete?: never;
4224
+ options?: never;
4225
+ head?: never;
4226
+ patch?: never;
4227
+ trace?: never;
4228
+ };
4229
+ "/integrations/teams/callback": {
4230
+ parameters: {
4231
+ query?: never;
4232
+ header?: never;
4233
+ path?: never;
4234
+ cookie?: never;
4235
+ };
4236
+ /**
4237
+ * Finish Teams Microsoft sign-in
4238
+ * @description Public redirect target. The one-time state was minted by a signed-in admin and still requires that user to be a workspace admin. Stores the bot token encrypted and redirects to `{spa}/settings?tab=preferences&chat=teams`.
4239
+ */
4240
+ get: operations["getTeamsIntegrationCallback"];
4241
+ put?: never;
4242
+ post?: never;
4243
+ delete?: never;
4244
+ options?: never;
4245
+ head?: never;
4246
+ patch?: never;
4247
+ trace?: never;
4248
+ };
4249
+ "/workspaces/{workspaceId}/integrations/teams": {
4250
+ parameters: {
4251
+ query?: never;
4252
+ header?: never;
4253
+ path?: never;
4254
+ cookie?: never;
4255
+ };
4256
+ /**
4257
+ * Teams connection status
4258
+ * @description Any workspace member. `{ connected, channelName }`. Never returns the bot token. `channelName` is null until an admin saves a channel.
4259
+ */
4260
+ get: operations["getWorkspaceTeamsConnection"];
4261
+ put?: never;
4262
+ post?: never;
4263
+ /**
4264
+ * Disconnect Teams
4265
+ * @description Workspace **admin** only. Later Message Center posts do not go to Teams. Member chat cells stay unchanged.
4266
+ */
4267
+ delete: operations["deleteWorkspaceTeamsConnection"];
4268
+ options?: never;
4269
+ head?: never;
4270
+ patch?: never;
4271
+ trace?: never;
4272
+ };
4273
+ "/workspaces/{workspaceId}/integrations/teams/channel": {
4274
+ parameters: {
4275
+ query?: never;
4276
+ header?: never;
4277
+ path?: never;
4278
+ cookie?: never;
4279
+ };
4280
+ get?: never;
4281
+ /**
4282
+ * Save the Teams channel for notification posts
4283
+ * @description Workspace **admin** only. Body `{ channelId }`. The channel must be visible to the connected Microsoft account. Until a channel is saved, channel-mode delivery is skipped with `chat_channel_unset`.
4284
+ */
4285
+ put: operations["putWorkspaceTeamsChannel"];
4286
+ post?: never;
4287
+ delete?: never;
4288
+ options?: never;
4289
+ head?: never;
4290
+ patch?: never;
4291
+ trace?: never;
4292
+ };
4209
4293
  "/workspaces/{workspaceId}/integrations/zelt/authorize-url": {
4210
4294
  parameters: {
4211
4295
  query?: never;
@@ -4470,6 +4554,19 @@ export interface paths {
4470
4554
  export type webhooks = Record<string, never>;
4471
4555
  export interface components {
4472
4556
  schemas: {
4557
+ TeamsInstallUrlDto: {
4558
+ /** Format: uri */
4559
+ url: string;
4560
+ };
4561
+ TeamsConnectionDto: {
4562
+ /** @description True after an admin completes Microsoft sign-in. */
4563
+ connected: boolean;
4564
+ /** @description Selected channel display name. Null until an admin saves a channel. */
4565
+ channelName: string | null;
4566
+ };
4567
+ TeamsChannelBodyDto: {
4568
+ channelId: string;
4569
+ };
4473
4570
  ErrorMessageDto: {
4474
4571
  error: string;
4475
4572
  /** @description Machine-readable error code when present (for example `last_admin`). */
@@ -10603,6 +10700,9 @@ export interface components {
10603
10700
  headers: never;
10604
10701
  pathItems: never;
10605
10702
  }
10703
+ export type TeamsInstallUrlDto = components['schemas']['TeamsInstallUrlDto'];
10704
+ export type TeamsConnectionDto = components['schemas']['TeamsConnectionDto'];
10705
+ export type TeamsChannelBodyDto = components['schemas']['TeamsChannelBodyDto'];
10606
10706
  export type ErrorMessageDto = components['schemas']['ErrorMessageDto'];
10607
10707
  export type TeamMemberDto = components['schemas']['TeamMemberDto'];
10608
10708
  export type TeamMemberListDto = components['schemas']['TeamMemberListDto'];
@@ -21976,6 +22076,310 @@ export interface operations {
21976
22076
  403: components["responses"]["Forbidden"];
21977
22077
  };
21978
22078
  };
22079
+ getWorkspaceTeamsInstallUrl: {
22080
+ parameters: {
22081
+ query?: never;
22082
+ header?: never;
22083
+ path: {
22084
+ workspaceId: components["parameters"]["WorkspaceId"];
22085
+ };
22086
+ cookie?: never;
22087
+ };
22088
+ requestBody?: never;
22089
+ responses: {
22090
+ /** @description Authorize URL */
22091
+ 200: {
22092
+ headers: {
22093
+ [name: string]: unknown;
22094
+ };
22095
+ content: {
22096
+ /**
22097
+ * @example {
22098
+ * "url": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=example&state=example-state"
22099
+ * }
22100
+ */
22101
+ "application/json": components["schemas"]["TeamsInstallUrlDto"];
22102
+ };
22103
+ };
22104
+ 401: components["responses"]["Unauthorized"];
22105
+ /** @description Editor or viewer */
22106
+ 403: {
22107
+ headers: {
22108
+ [name: string]: unknown;
22109
+ };
22110
+ content: {
22111
+ /**
22112
+ * @example {
22113
+ * "error": "Forbidden",
22114
+ * "code": "workspace_admin_required"
22115
+ * }
22116
+ */
22117
+ "application/json": components["schemas"]["ErrorMessageDto"];
22118
+ };
22119
+ };
22120
+ /** @description Workspace not found */
22121
+ 404: {
22122
+ headers: {
22123
+ [name: string]: unknown;
22124
+ };
22125
+ content: {
22126
+ /**
22127
+ * @example {
22128
+ * "error": "Not found"
22129
+ * }
22130
+ */
22131
+ "application/json": components["schemas"]["ErrorMessageDto"];
22132
+ };
22133
+ };
22134
+ /** @description Teams app credentials are not configured */
22135
+ 503: {
22136
+ headers: {
22137
+ [name: string]: unknown;
22138
+ };
22139
+ content: {
22140
+ /**
22141
+ * @example {
22142
+ * "error": "Teams sign-in is not configured",
22143
+ * "code": "teams_not_configured"
22144
+ * }
22145
+ */
22146
+ "application/json": components["schemas"]["ErrorMessageDto"];
22147
+ };
22148
+ };
22149
+ };
22150
+ };
22151
+ getTeamsIntegrationCallback: {
22152
+ parameters: {
22153
+ query: {
22154
+ code?: string;
22155
+ state: string;
22156
+ error?: string;
22157
+ };
22158
+ header?: never;
22159
+ path?: never;
22160
+ cookie?: never;
22161
+ };
22162
+ requestBody?: never;
22163
+ responses: {
22164
+ /** @description Redirect to Settings → Preferences */
22165
+ 302: {
22166
+ headers: {
22167
+ Location?: string;
22168
+ [name: string]: unknown;
22169
+ };
22170
+ content?: never;
22171
+ };
22172
+ /** @description SPA origin is not configured */
22173
+ 503: {
22174
+ headers: {
22175
+ [name: string]: unknown;
22176
+ };
22177
+ content: {
22178
+ "application/json": components["schemas"]["ErrorMessageDto"];
22179
+ };
22180
+ };
22181
+ };
22182
+ };
22183
+ getWorkspaceTeamsConnection: {
22184
+ parameters: {
22185
+ query?: never;
22186
+ header?: never;
22187
+ path: {
22188
+ workspaceId: components["parameters"]["WorkspaceId"];
22189
+ };
22190
+ cookie?: never;
22191
+ };
22192
+ requestBody?: never;
22193
+ responses: {
22194
+ /** @description Connection status */
22195
+ 200: {
22196
+ headers: {
22197
+ [name: string]: unknown;
22198
+ };
22199
+ content: {
22200
+ /**
22201
+ * @example {
22202
+ * "connected": true,
22203
+ * "channelName": "General"
22204
+ * }
22205
+ */
22206
+ "application/json": components["schemas"]["TeamsConnectionDto"];
22207
+ };
22208
+ };
22209
+ 401: components["responses"]["Unauthorized"];
22210
+ 403: components["responses"]["Forbidden"];
22211
+ /** @description Workspace not found */
22212
+ 404: {
22213
+ headers: {
22214
+ [name: string]: unknown;
22215
+ };
22216
+ content: {
22217
+ /**
22218
+ * @example {
22219
+ * "error": "Not found"
22220
+ * }
22221
+ */
22222
+ "application/json": components["schemas"]["ErrorMessageDto"];
22223
+ };
22224
+ };
22225
+ };
22226
+ };
22227
+ deleteWorkspaceTeamsConnection: {
22228
+ parameters: {
22229
+ query?: never;
22230
+ header?: never;
22231
+ path: {
22232
+ workspaceId: components["parameters"]["WorkspaceId"];
22233
+ };
22234
+ cookie?: never;
22235
+ };
22236
+ requestBody?: never;
22237
+ responses: {
22238
+ /** @description Disconnected */
22239
+ 204: {
22240
+ headers: {
22241
+ [name: string]: unknown;
22242
+ };
22243
+ content?: never;
22244
+ };
22245
+ 401: components["responses"]["Unauthorized"];
22246
+ /** @description Editor or viewer */
22247
+ 403: {
22248
+ headers: {
22249
+ [name: string]: unknown;
22250
+ };
22251
+ content: {
22252
+ /**
22253
+ * @example {
22254
+ * "error": "Forbidden",
22255
+ * "code": "workspace_admin_required"
22256
+ * }
22257
+ */
22258
+ "application/json": components["schemas"]["ErrorMessageDto"];
22259
+ };
22260
+ };
22261
+ /** @description Workspace not found */
22262
+ 404: {
22263
+ headers: {
22264
+ [name: string]: unknown;
22265
+ };
22266
+ content: {
22267
+ /**
22268
+ * @example {
22269
+ * "error": "Not found"
22270
+ * }
22271
+ */
22272
+ "application/json": components["schemas"]["ErrorMessageDto"];
22273
+ };
22274
+ };
22275
+ };
22276
+ };
22277
+ putWorkspaceTeamsChannel: {
22278
+ parameters: {
22279
+ query?: never;
22280
+ header?: never;
22281
+ path: {
22282
+ workspaceId: components["parameters"]["WorkspaceId"];
22283
+ };
22284
+ cookie?: never;
22285
+ };
22286
+ requestBody: {
22287
+ content: {
22288
+ /**
22289
+ * @example {
22290
+ * "channelId": "19:example@thread.tacv2"
22291
+ * }
22292
+ */
22293
+ "application/json": components["schemas"]["TeamsChannelBodyDto"];
22294
+ };
22295
+ };
22296
+ responses: {
22297
+ /** @description Channel saved */
22298
+ 200: {
22299
+ headers: {
22300
+ [name: string]: unknown;
22301
+ };
22302
+ content: {
22303
+ /**
22304
+ * @example {
22305
+ * "connected": true,
22306
+ * "channelName": "General"
22307
+ * }
22308
+ */
22309
+ "application/json": components["schemas"]["TeamsConnectionDto"];
22310
+ };
22311
+ };
22312
+ /** @description Missing channelId, or the channel was not found */
22313
+ 400: {
22314
+ headers: {
22315
+ [name: string]: unknown;
22316
+ };
22317
+ content: {
22318
+ "application/json": components["schemas"]["ErrorMessageDto"];
22319
+ };
22320
+ };
22321
+ 401: components["responses"]["Unauthorized"];
22322
+ /** @description Editor or viewer */
22323
+ 403: {
22324
+ headers: {
22325
+ [name: string]: unknown;
22326
+ };
22327
+ content: {
22328
+ /**
22329
+ * @example {
22330
+ * "error": "Forbidden",
22331
+ * "code": "workspace_admin_required"
22332
+ * }
22333
+ */
22334
+ "application/json": components["schemas"]["ErrorMessageDto"];
22335
+ };
22336
+ };
22337
+ /** @description Workspace not found */
22338
+ 404: {
22339
+ headers: {
22340
+ [name: string]: unknown;
22341
+ };
22342
+ content: {
22343
+ /**
22344
+ * @example {
22345
+ * "error": "Not found"
22346
+ * }
22347
+ */
22348
+ "application/json": components["schemas"]["ErrorMessageDto"];
22349
+ };
22350
+ };
22351
+ /** @description Teams is not connected */
22352
+ 409: {
22353
+ headers: {
22354
+ [name: string]: unknown;
22355
+ };
22356
+ content: {
22357
+ /**
22358
+ * @example {
22359
+ * "error": "Teams is not connected",
22360
+ * "code": "teams_not_connected"
22361
+ * }
22362
+ */
22363
+ "application/json": components["schemas"]["ErrorMessageDto"];
22364
+ };
22365
+ };
22366
+ /** @description Microsoft Graph rejected the channel lookup */
22367
+ 502: {
22368
+ headers: {
22369
+ [name: string]: unknown;
22370
+ };
22371
+ content: {
22372
+ /**
22373
+ * @example {
22374
+ * "error": "Teams channel lookup failed",
22375
+ * "code": "teams_graph_failed"
22376
+ * }
22377
+ */
22378
+ "application/json": components["schemas"]["ErrorMessageDto"];
22379
+ };
22380
+ };
22381
+ };
22382
+ };
21979
22383
  postWorkspaceZeltAuthorizeUrl: {
21980
22384
  parameters: {
21981
22385
  query?: never;