@company-semantics/contracts 0.118.0 → 0.120.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.
@@ -56,13 +56,8 @@ export interface paths {
56
56
  };
57
57
  get?: never;
58
58
  put?: never;
59
- /**
60
- * Start passwordless auth flow
61
- * @description Initiates passwordless authentication by generating and sending an OTP to the provided email.
62
- * Rate limited per email (3/15min) and per IP (20/hour).
63
- * If the user's org requires SSO, returns SSO_REQUIRED error with redirect info.
64
- */
65
- post: operations["startAuth"];
59
+ /** Start passwordless auth flow */
60
+ post: operations["authStart"];
66
61
  delete?: never;
67
62
  options?: never;
68
63
  head?: never;
@@ -78,12 +73,7 @@ export interface paths {
78
73
  };
79
74
  get?: never;
80
75
  put?: never;
81
- /**
82
- * Verify OTP and create session
83
- * @description Verifies the OTP code and creates a session.
84
- * Sets an httpOnly session cookie on success.
85
- * Rate limited per email (5/10min) and per IP (20/hour).
86
- */
76
+ /** Verify OTP and create session */
87
77
  post: operations["verifyAuth"];
88
78
  delete?: never;
89
79
  options?: never;
@@ -100,12 +90,7 @@ export interface paths {
100
90
  };
101
91
  get?: never;
102
92
  put?: never;
103
- /**
104
- * Revoke session and clear cookie
105
- * @description Revokes the current session and clears the session cookie.
106
- * Safe to call without auth (clears cookie regardless).
107
- * Requires X-Requested-With header for CSRF protection.
108
- */
93
+ /** Revoke session and clear cookie */
109
94
  post: operations["logout"];
110
95
  delete?: never;
111
96
  options?: never;
@@ -120,11 +105,7 @@ export interface paths {
120
105
  path?: never;
121
106
  cookie?: never;
122
107
  };
123
- /**
124
- * Get current authenticated user
125
- * @description Returns the current user's authentication info.
126
- * Requires valid session cookie.
127
- */
108
+ /** Get current authenticated user */
128
109
  get: operations["getAuthMe"];
129
110
  put?: never;
130
111
  post?: never;
@@ -141,11 +122,7 @@ export interface paths {
141
122
  path?: never;
142
123
  cookie?: never;
143
124
  };
144
- /**
145
- * Initiate SSO flow for organization
146
- * @description Initiates SSO flow for an organization.
147
- * Validates org exists and has SSO configured, generates state token, and redirects to IdP.
148
- */
125
+ /** Initiate SSO flow for organization */
149
126
  get: operations["initiateSso"];
150
127
  put?: never;
151
128
  post?: never;
@@ -162,20 +139,10 @@ export interface paths {
162
139
  path?: never;
163
140
  cookie?: never;
164
141
  };
165
- /**
166
- * OIDC callback endpoint
167
- * @description Handles OIDC callback from identity providers.
168
- * Validates state, exchanges code for tokens, creates session.
169
- * Redirects to return URL or login page on error.
170
- */
142
+ /** OIDC callback endpoint */
171
143
  get: operations["handleOidcCallback"];
172
144
  put?: never;
173
- /**
174
- * SAML callback endpoint
175
- * @description Handles SAML callback from identity providers.
176
- * Validates RelayState, processes SAML assertion, creates session.
177
- * Redirects to return URL or login page on error.
178
- */
145
+ /** SAML callback endpoint */
179
146
  post: operations["handleSamlCallback"];
180
147
  delete?: never;
181
148
  options?: never;
@@ -190,11 +157,7 @@ export interface paths {
190
157
  path?: never;
191
158
  cookie?: never;
192
159
  };
193
- /**
194
- * Get current user and org context
195
- * @description Returns the current user's identity fields and organization context.
196
- * Identity is resolved via request context (DEV_ORG_ID in dev, session in production).
197
- */
160
+ /** Get current user and org context */
198
161
  get: operations["getCurrentUser"];
199
162
  put?: never;
200
163
  post?: never;
@@ -217,12 +180,7 @@ export interface paths {
217
180
  delete?: never;
218
181
  options?: never;
219
182
  head?: never;
220
- /**
221
- * Update current user's profile
222
- * @description Updates the current user's name fields.
223
- * At least one field must be provided.
224
- * displayName is computed at read time and cannot be set directly.
225
- */
183
+ /** Update current user profile */
226
184
  patch: operations["updateUserProfile"];
227
185
  trace?: never;
228
186
  };
@@ -317,11 +275,7 @@ export interface paths {
317
275
  };
318
276
  get?: never;
319
277
  put?: never;
320
- /**
321
- * Resync user avatar from Slack
322
- * @description Manually resync the current user's avatar from their Slack profile.
323
- * Requires user to have a linked Slack identity and the org to have an active Slack connection.
324
- */
278
+ /** Resync Slack avatar */
325
279
  post: operations["resyncSlackAvatar"];
326
280
  delete?: never;
327
281
  options?: never;
@@ -336,11 +290,7 @@ export interface paths {
336
290
  path?: never;
337
291
  cookie?: never;
338
292
  };
339
- /**
340
- * Initiate OAuth flow
341
- * @description Creates a pending connection and redirects to the OAuth provider's consent screen.
342
- * Replaces raw OAuth URLs with first-party redirect for trust and tracking.
343
- */
293
+ /** Initiate OAuth flow */
344
294
  get: operations["initiateOAuth"];
345
295
  put?: never;
346
296
  post?: never;
@@ -357,12 +307,7 @@ export interface paths {
357
307
  path?: never;
358
308
  cookie?: never;
359
309
  };
360
- /**
361
- * OAuth callback handler
362
- * @description Handles the OAuth callback from providers.
363
- * Verifies state, exchanges code for tokens, stores encrypted tokens.
364
- * Returns HTML success or error page.
365
- */
310
+ /** OAuth callback handler */
366
311
  get: operations["handleOAuthCallback"];
367
312
  put?: never;
368
313
  post?: never;
@@ -404,9 +349,8 @@ export interface paths {
404
349
  get?: never;
405
350
  put?: never;
406
351
  /**
407
- * AI chat endpoint
408
- * @description Streaming chat endpoint using Server-Sent Events (SSE).
409
- * Returns x-vercel-ai-ui-message-stream header for AI SDK compatibility.
352
+ * Send a chat message and receive a streaming AI response
353
+ * @description Streaming AI chat endpoint. x-streaming: true. Returns a text/event-stream using the Vercel AI SDK UI message stream protocol.
410
354
  */
411
355
  post: operations["postAiChat"];
412
356
  delete?: never;
@@ -1529,18 +1473,10 @@ export interface paths {
1529
1473
  path?: never;
1530
1474
  cookie?: never;
1531
1475
  };
1532
- /**
1533
- * List user's saved chats
1534
- * @description Returns a list of chat summaries for the authenticated user in their current org.
1535
- * Ordered by updatedAt descending (newest first).
1536
- */
1476
+ /** List user's saved chats */
1537
1477
  get: operations["listChats"];
1538
1478
  put?: never;
1539
- /**
1540
- * Create/save a new chat
1541
- * @description Creates a new chat with initial messages.
1542
- * interactionId must be unique within the org.
1543
- */
1479
+ /** Create/save a new chat */
1544
1480
  post: operations["createChat"];
1545
1481
  delete?: never;
1546
1482
  options?: never;
@@ -1555,11 +1491,7 @@ export interface paths {
1555
1491
  path?: never;
1556
1492
  cookie?: never;
1557
1493
  };
1558
- /**
1559
- * Look up chat ID by client interaction ID
1560
- * @description Returns the chat ID associated with a client-generated interaction ID.
1561
- * Used to resolve optimistically-created chats.
1562
- */
1494
+ /** Look up chat ID by client interaction ID */
1563
1495
  get: operations["getChatByInteraction"];
1564
1496
  put?: never;
1565
1497
  post?: never;
@@ -1576,27 +1508,15 @@ export interface paths {
1576
1508
  path?: never;
1577
1509
  cookie?: never;
1578
1510
  };
1579
- /**
1580
- * Get chat with messages
1581
- * @description Returns a chat with all its messages.
1582
- * Only the chat owner can access their chats.
1583
- */
1511
+ /** Get chat with messages */
1584
1512
  get: operations["getChat"];
1585
1513
  put?: never;
1586
1514
  post?: never;
1587
- /**
1588
- * Delete a chat
1589
- * @description Deletes a chat and all its messages (cascade).
1590
- * Only the chat owner can delete their chats.
1591
- */
1515
+ /** Delete a chat */
1592
1516
  delete: operations["deleteChat"];
1593
1517
  options?: never;
1594
1518
  head?: never;
1595
- /**
1596
- * Update chat title
1597
- * @description Updates the title of an existing chat.
1598
- * Only the chat owner can update their chats.
1599
- */
1519
+ /** Update chat title */
1600
1520
  patch: operations["updateChat"];
1601
1521
  trace?: never;
1602
1522
  };
@@ -1609,11 +1529,7 @@ export interface paths {
1609
1529
  };
1610
1530
  get?: never;
1611
1531
  put?: never;
1612
- /**
1613
- * Append messages to chat
1614
- * @description Appends new messages to an existing chat.
1615
- * Sequence numbers are auto-assigned starting from the current max + 1.
1616
- */
1532
+ /** Append messages to chat */
1617
1533
  post: operations["appendMessages"];
1618
1534
  delete?: never;
1619
1535
  options?: never;
@@ -1631,11 +1547,7 @@ export interface paths {
1631
1547
  get?: never;
1632
1548
  put?: never;
1633
1549
  post?: never;
1634
- /**
1635
- * Delete a single message
1636
- * @description Deletes a single message from a chat.
1637
- * Only the chat owner can delete messages from their chats.
1638
- */
1550
+ /** Delete a single message */
1639
1551
  delete: operations["deleteMessage"];
1640
1552
  options?: never;
1641
1553
  head?: never;
@@ -1651,13 +1563,7 @@ export interface paths {
1651
1563
  };
1652
1564
  get?: never;
1653
1565
  put?: never;
1654
- /**
1655
- * Generate title for chat
1656
- * @description Triggers LLM-based title generation for a chat.
1657
- * Respects title generation invariants:
1658
- * - INV-TITLE-2: Skips if titleSource === 'manual'
1659
- * - INV-TITLE-3: Skips if titleGeneratedAt !== null
1660
- */
1566
+ /** Generate title for chat */
1661
1567
  post: operations["generateChatTitle"];
1662
1568
  delete?: never;
1663
1569
  options?: never;
@@ -1674,15 +1580,9 @@ export interface paths {
1674
1580
  };
1675
1581
  get?: never;
1676
1582
  put?: never;
1677
- /**
1678
- * Pin a chat
1679
- * @description Pins a chat to keep it at the top of the list.
1680
- */
1583
+ /** Pin a chat */
1681
1584
  post: operations["pinChat"];
1682
- /**
1683
- * Unpin a chat
1684
- * @description Removes the pinned status from a chat.
1685
- */
1585
+ /** Unpin a chat */
1686
1586
  delete: operations["unpinChat"];
1687
1587
  options?: never;
1688
1588
  head?: never;
@@ -1697,10 +1597,8 @@ export interface paths {
1697
1597
  cookie?: never;
1698
1598
  };
1699
1599
  /**
1700
- * Subscribe to real-time chat updates
1701
- * @description Server-Sent Events endpoint for real-time chat updates.
1702
- * Emits invalidation events when chats are created, updated, or deleted.
1703
- * Clients should invalidate their cache and refetch on event receipt.
1600
+ * Stream chat update events via SSE
1601
+ * @description Server-Sent Events stream for real-time chat updates. x-streaming: true. Event payloads conform to ChatSseEventSchema.
1704
1602
  */
1705
1603
  get: operations["chatEvents"];
1706
1604
  put?: never;
@@ -1718,18 +1616,10 @@ export interface paths {
1718
1616
  path?: never;
1719
1617
  cookie?: never;
1720
1618
  };
1721
- /**
1722
- * List shares for a chat
1723
- * @description Returns all active (non-revoked) shares for a chat.
1724
- * Only the chat owner can list shares.
1725
- */
1619
+ /** List all active shares for a chat */
1726
1620
  get: operations["listShares"];
1727
1621
  put?: never;
1728
- /**
1729
- * Create share with snapshot
1730
- * @description Creates a share for a chat, capturing current message count as the snapshot boundary.
1731
- * Only the chat owner can create shares.
1732
- */
1622
+ /** Create a share for a chat */
1733
1623
  post: operations["createShare"];
1734
1624
  delete?: never;
1735
1625
  options?: never;
@@ -1747,19 +1637,11 @@ export interface paths {
1747
1637
  get?: never;
1748
1638
  put?: never;
1749
1639
  post?: never;
1750
- /**
1751
- * Revoke a share
1752
- * @description Revokes a share by setting revokedAt timestamp (soft delete).
1753
- * Only the chat owner can revoke shares.
1754
- */
1640
+ /** Revoke a share */
1755
1641
  delete: operations["revokeShare"];
1756
1642
  options?: never;
1757
1643
  head?: never;
1758
- /**
1759
- * Update share visibility
1760
- * @description Updates a share's visibility or refreshes the snapshot boundary.
1761
- * Only the chat owner can update shares.
1762
- */
1644
+ /** Update a share's visibility or refresh snapshot */
1763
1645
  patch: operations["updateShare"];
1764
1646
  trace?: never;
1765
1647
  };
@@ -1770,14 +1652,8 @@ export interface paths {
1770
1652
  path?: never;
1771
1653
  cookie?: never;
1772
1654
  };
1773
- /**
1774
- * View shared chat (public)
1775
- * @description View a shared chat using its token.
1776
- * Public shares are accessible to anyone with the token.
1777
- * Private shares require authentication as the chat owner.
1778
- * Returns 404 for invalid tokens, revoked shares, or unauthorized access (never leaks reason).
1779
- */
1780
- get: operations["viewSharedChat"];
1655
+ /** View a shared chat by token */
1656
+ get: operations["getSharedView"];
1781
1657
  put?: never;
1782
1658
  post?: never;
1783
1659
  delete?: never;
@@ -2352,46 +2228,45 @@ export interface components {
2352
2228
  MeResponse: {
2353
2229
  /** Format: uuid */
2354
2230
  userId: string;
2355
- /** Format: email */
2356
2231
  email: string;
2357
2232
  fullName: string;
2358
- preferredName?: string | null;
2359
- /** @description Computed at read time (preferredName ?? fullName) */
2233
+ preferredName: string | null;
2360
2234
  displayName: string;
2361
2235
  /** @enum {string} */
2362
2236
  nameSource: "self" | "sso";
2363
2237
  nameEditable: boolean;
2364
2238
  primaryDepartmentId: string | null;
2365
2239
  slackUserId: string | null;
2366
- avatar: components["schemas"]["ResolvedAvatar"];
2240
+ avatar: {
2241
+ /** @enum {string} */
2242
+ source: "slack" | "initials";
2243
+ url?: string;
2244
+ initials: string;
2245
+ };
2367
2246
  /** Format: uuid */
2368
2247
  orgId: string;
2369
2248
  orgName: string | null;
2370
2249
  orgSlug: string;
2371
- /** @enum {string} */
2372
- plan: "free" | "pro" | "enterprise";
2250
+ plan: string;
2373
2251
  hasMultipleOrgs: boolean;
2374
2252
  isInternalAdmin: boolean;
2375
2253
  };
2376
- /** @description At least one field must be provided */
2377
2254
  ProfileUpdateRequest: {
2378
- firstName?: string;
2379
- lastName?: string | null;
2380
2255
  fullName?: string;
2381
- /** @description Cannot contain control characters, newlines, or quotes */
2382
2256
  preferredName?: string | null;
2257
+ primaryDepartmentId?: string | null;
2383
2258
  };
2384
2259
  ProfileUpdateResponse: {
2385
2260
  /** @constant */
2386
2261
  success: true;
2387
2262
  user: {
2388
- /** Format: uuid */
2389
2263
  id: string;
2390
- firstName: string;
2391
- lastName?: string | null;
2392
2264
  fullName: string;
2393
- preferredName?: string | null;
2265
+ preferredName: string | null;
2394
2266
  displayName: string;
2267
+ /** @enum {string} */
2268
+ nameSource: "self" | "sso";
2269
+ primaryDepartmentId: string | null;
2395
2270
  };
2396
2271
  };
2397
2272
  ResyncSlackLogoResponse: {
@@ -2569,13 +2444,27 @@ export interface components {
2569
2444
  createdAt: string;
2570
2445
  };
2571
2446
  ChatWithMessages: {
2572
- chat: components["schemas"]["Chat"];
2573
- messages: components["schemas"]["ChatMessage"][];
2447
+ id: string;
2448
+ title: string | null;
2449
+ messageCount: number;
2450
+ /** Format: date-time */
2451
+ createdAt: string;
2452
+ /** Format: date-time */
2453
+ updatedAt: string;
2454
+ isShared: boolean;
2455
+ pinnedAt: string | null;
2456
+ titleSource: ("auto" | "manual") | null;
2457
+ titleGeneratedAt: string | null;
2574
2458
  };
2575
2459
  CreateChatRequest: {
2576
2460
  title: string;
2577
2461
  interactionId: string;
2578
- messages: components["schemas"]["NewMessage"][];
2462
+ messages: {
2463
+ /** @enum {string} */
2464
+ role: "user" | "assistant";
2465
+ content: string;
2466
+ parts?: unknown[];
2467
+ }[];
2579
2468
  };
2580
2469
  NewMessage: {
2581
2470
  /** @enum {string} */
@@ -2587,16 +2476,19 @@ export interface components {
2587
2476
  title: string;
2588
2477
  };
2589
2478
  AppendMessagesRequest: {
2590
- messages: components["schemas"]["NewMessage"][];
2479
+ messages: {
2480
+ /** @enum {string} */
2481
+ role: "user" | "assistant";
2482
+ content: string;
2483
+ parts?: unknown[];
2484
+ }[];
2591
2485
  };
2592
2486
  SuccessResponse: {
2593
2487
  /** @constant */
2594
2488
  success: true;
2595
2489
  };
2596
2490
  GenerateTitleResponse: {
2597
- /** @description The chat title (generated or existing) */
2598
2491
  title: string;
2599
- /** @description Whether title was newly generated (false if guards blocked) */
2600
2492
  isAutoGenerated: boolean;
2601
2493
  };
2602
2494
  /** @enum {string} */
@@ -2618,22 +2510,29 @@ export interface components {
2618
2510
  revokedAt?: string | null;
2619
2511
  };
2620
2512
  CreateShareRequest: {
2621
- visibility: components["schemas"]["ChatVisibility"];
2513
+ /** @enum {string} */
2514
+ visibility: "public" | "private";
2622
2515
  /** Format: email */
2623
2516
  recipientEmail?: string;
2624
2517
  };
2625
2518
  UpdateShareRequest: {
2626
- visibility?: components["schemas"]["ChatVisibility"];
2519
+ /** @enum {string} */
2520
+ visibility?: "public" | "private";
2627
2521
  updateSnapshot?: boolean;
2628
2522
  };
2629
2523
  SharedChatView: {
2630
- /** Format: uuid */
2631
- chatId: string;
2632
2524
  title: string;
2633
- messages: components["schemas"]["ChatMessage"][];
2525
+ messages: {
2526
+ /** @enum {string} */
2527
+ role: "user" | "assistant";
2528
+ content: string;
2529
+ parts?: unknown[];
2530
+ }[];
2634
2531
  /** Format: date-time */
2635
2532
  sharedAt: string;
2636
- visibility: components["schemas"]["ChatVisibility"];
2533
+ sharedByName: string;
2534
+ /** @enum {string} */
2535
+ visibility: "private" | "public";
2637
2536
  };
2638
2537
  OrgBudgetConfig: {
2639
2538
  enabled: boolean;
@@ -2906,25 +2805,47 @@ export interface components {
2906
2805
  truncated: boolean;
2907
2806
  };
2908
2807
  AuthStartRequest: {
2909
- /**
2910
- * Format: email
2911
- * @description Email address for OTP delivery
2912
- */
2808
+ /** Format: email */
2913
2809
  email: string;
2914
2810
  };
2915
2811
  AuthStartResponse: {
2916
2812
  /** @constant */
2917
- ok: true;
2813
+ mode: "otp";
2814
+ devOtp?: string;
2815
+ } | {
2816
+ /** @constant */
2817
+ mode: "sso";
2818
+ providers: string[];
2819
+ redirectUrl: string;
2820
+ } | {
2821
+ /** @constant */
2822
+ mode: "hybrid";
2823
+ providers: string[];
2824
+ redirectUrl: string;
2825
+ /** @constant */
2826
+ otpAllowed: true;
2827
+ devOtp?: string;
2918
2828
  };
2919
2829
  AuthVerifyRequest: {
2920
2830
  /** Format: email */
2921
2831
  email: string;
2922
- /** @description 6-digit OTP code */
2923
2832
  code: string;
2833
+ inviteToken?: string;
2924
2834
  };
2925
2835
  AuthVerifyResponse: {
2836
+ /** @constant */
2837
+ success: true;
2926
2838
  /** @constant */
2927
2839
  ok: true;
2840
+ } | {
2841
+ /** @constant */
2842
+ success: true;
2843
+ /** @constant */
2844
+ ok: true;
2845
+ /** @constant */
2846
+ acceptedInvite: true;
2847
+ orgId: string;
2848
+ role: string;
2928
2849
  };
2929
2850
  OkResponse: {
2930
2851
  /** @constant */
@@ -2952,9 +2873,7 @@ export interface components {
2952
2873
  orgSlug: string;
2953
2874
  };
2954
2875
  SamlCallbackRequest: {
2955
- /** @description Base64-encoded SAML assertion */
2956
2876
  SAMLResponse: string;
2957
- /** @description State token for CSRF protection */
2958
2877
  RelayState: string;
2959
2878
  };
2960
2879
  InitiateTransferRequest: {
@@ -3409,6 +3328,180 @@ export interface components {
3409
3328
  /** @description Organization name (present when invite is valid) */
3410
3329
  orgName?: string;
3411
3330
  };
3331
+ LogoutResponse: {
3332
+ /** @constant */
3333
+ success: true;
3334
+ /** @constant */
3335
+ ok: true;
3336
+ };
3337
+ ChatListResponse: {
3338
+ chats: {
3339
+ id: string;
3340
+ title: string | null;
3341
+ messageCount: number;
3342
+ /** Format: date-time */
3343
+ createdAt: string;
3344
+ /** Format: date-time */
3345
+ updatedAt: string;
3346
+ isShared: boolean;
3347
+ pinnedAt: string | null;
3348
+ titleSource: ("auto" | "manual") | null;
3349
+ titleGeneratedAt: string | null;
3350
+ }[];
3351
+ };
3352
+ CreateChatResponse: {
3353
+ chat: {
3354
+ id: string;
3355
+ title: string | null;
3356
+ messageCount: number;
3357
+ /** Format: date-time */
3358
+ createdAt: string;
3359
+ /** Format: date-time */
3360
+ updatedAt: string;
3361
+ isShared: boolean;
3362
+ pinnedAt: string | null;
3363
+ titleSource: ("auto" | "manual") | null;
3364
+ titleGeneratedAt: string | null;
3365
+ };
3366
+ };
3367
+ ChatByInteractionResponse: {
3368
+ chatId: string;
3369
+ };
3370
+ CreateShareResponse: {
3371
+ share: {
3372
+ id: string;
3373
+ chatId: string;
3374
+ token: string;
3375
+ /** @enum {string} */
3376
+ visibility: "private" | "public";
3377
+ shareUrl: string;
3378
+ messageCountAtShare: number;
3379
+ titleAtShare: string;
3380
+ /** Format: date-time */
3381
+ createdAt: string;
3382
+ createdByName: string;
3383
+ isRevoked: boolean;
3384
+ };
3385
+ shareUrl: string;
3386
+ };
3387
+ ListSharesResponse: {
3388
+ shares: {
3389
+ id: string;
3390
+ chatId: string;
3391
+ token: string;
3392
+ /** @enum {string} */
3393
+ visibility: "private" | "public";
3394
+ shareUrl: string;
3395
+ messageCountAtShare: number;
3396
+ titleAtShare: string;
3397
+ /** Format: date-time */
3398
+ createdAt: string;
3399
+ createdByName: string;
3400
+ isRevoked: boolean;
3401
+ }[];
3402
+ };
3403
+ UpdateShareResponse: {
3404
+ share: {
3405
+ id: string;
3406
+ chatId: string;
3407
+ token: string;
3408
+ /** @enum {string} */
3409
+ visibility: "private" | "public";
3410
+ shareUrl: string;
3411
+ messageCountAtShare: number;
3412
+ titleAtShare: string;
3413
+ /** Format: date-time */
3414
+ createdAt: string;
3415
+ createdByName: string;
3416
+ isRevoked: boolean;
3417
+ };
3418
+ };
3419
+ ChatSuccessResponse: {
3420
+ /** @constant */
3421
+ success: true;
3422
+ };
3423
+ ChatSseEvent: {
3424
+ /** @constant */
3425
+ v: 1;
3426
+ /** Format: date-time */
3427
+ timestamp: string;
3428
+ eventId?: string;
3429
+ /** @constant */
3430
+ type: "chat.created";
3431
+ data: {
3432
+ chatId: string;
3433
+ interactionId?: string;
3434
+ title: string;
3435
+ /** @enum {string} */
3436
+ titleSource: "auto" | "manual";
3437
+ pinnedAt: string | null;
3438
+ messageCount: number;
3439
+ /** Format: date-time */
3440
+ createdAt: string;
3441
+ /** Format: date-time */
3442
+ updatedAt: string;
3443
+ isShared: boolean;
3444
+ };
3445
+ } | {
3446
+ /** @constant */
3447
+ v: 1;
3448
+ /** Format: date-time */
3449
+ timestamp: string;
3450
+ eventId?: string;
3451
+ /** @constant */
3452
+ type: "chat.updated";
3453
+ data: {
3454
+ chatId: string;
3455
+ title: string;
3456
+ titleSource: ("auto" | "manual") | null;
3457
+ titleGeneratedAt: string | null;
3458
+ pinnedAt: string | null;
3459
+ messageCount: number;
3460
+ /** Format: date-time */
3461
+ createdAt: string;
3462
+ /** Format: date-time */
3463
+ updatedAt: string;
3464
+ isShared: boolean;
3465
+ };
3466
+ changed: ("title" | "titleSource" | "pinnedAt")[];
3467
+ } | {
3468
+ /** @constant */
3469
+ v: 1;
3470
+ /** Format: date-time */
3471
+ timestamp: string;
3472
+ eventId?: string;
3473
+ /** @constant */
3474
+ type: "chat.deleted";
3475
+ data: {
3476
+ chatId: string;
3477
+ };
3478
+ } | {
3479
+ /** @constant */
3480
+ v: 1;
3481
+ /** Format: date-time */
3482
+ timestamp: string;
3483
+ eventId?: string;
3484
+ /** @constant */
3485
+ type: "invalidate.chat";
3486
+ chatId: string;
3487
+ /** @enum {string} */
3488
+ reason: "external-mutation" | "bulk-operation" | "sync-required";
3489
+ } | {
3490
+ /** @constant */
3491
+ v: 1;
3492
+ /** Format: date-time */
3493
+ timestamp: string;
3494
+ eventId?: string;
3495
+ /** @constant */
3496
+ type: "invalidate.chat-list";
3497
+ /** @enum {string} */
3498
+ reason: "external-mutation" | "bulk-operation" | "sync-required";
3499
+ };
3500
+ AiChatRequest: {
3501
+ messages: unknown[];
3502
+ id?: string;
3503
+ runtimeProfile?: string;
3504
+ };
3412
3505
  };
3413
3506
  responses: never;
3414
3507
  parameters: never;
@@ -3458,7 +3551,7 @@ export interface operations {
3458
3551
  };
3459
3552
  };
3460
3553
  };
3461
- startAuth: {
3554
+ authStart: {
3462
3555
  parameters: {
3463
3556
  query?: never;
3464
3557
  header?: never;
@@ -3471,7 +3564,7 @@ export interface operations {
3471
3564
  };
3472
3565
  };
3473
3566
  responses: {
3474
- /** @description OTP sent successfully */
3567
+ /** @description Auth mode resolved; OTP sent when applicable */
3475
3568
  200: {
3476
3569
  headers: {
3477
3570
  [name: string]: unknown;
@@ -3480,33 +3573,6 @@ export interface operations {
3480
3573
  "application/json": components["schemas"]["AuthStartResponse"];
3481
3574
  };
3482
3575
  };
3483
- /** @description Validation error (invalid email format) */
3484
- 400: {
3485
- headers: {
3486
- [name: string]: unknown;
3487
- };
3488
- content: {
3489
- "application/json": components["schemas"]["ErrorResponse"];
3490
- };
3491
- };
3492
- /** @description SSO required for this user's organization */
3493
- 409: {
3494
- headers: {
3495
- [name: string]: unknown;
3496
- };
3497
- content: {
3498
- "application/json": components["schemas"]["SSORequiredErrorResponse"];
3499
- };
3500
- };
3501
- /** @description Rate limit exceeded */
3502
- 429: {
3503
- headers: {
3504
- [name: string]: unknown;
3505
- };
3506
- content: {
3507
- "application/json": components["schemas"]["ErrorResponse"];
3508
- };
3509
- };
3510
3576
  };
3511
3577
  };
3512
3578
  verifyAuth: {
@@ -3522,7 +3588,7 @@ export interface operations {
3522
3588
  };
3523
3589
  };
3524
3590
  responses: {
3525
- /** @description Authentication successful, session cookie set */
3591
+ /** @description Session created; cookie set */
3526
3592
  200: {
3527
3593
  headers: {
3528
3594
  [name: string]: unknown;
@@ -3531,24 +3597,6 @@ export interface operations {
3531
3597
  "application/json": components["schemas"]["AuthVerifyResponse"];
3532
3598
  };
3533
3599
  };
3534
- /** @description Validation error or invalid/expired OTP */
3535
- 400: {
3536
- headers: {
3537
- [name: string]: unknown;
3538
- };
3539
- content: {
3540
- "application/json": components["schemas"]["OTPErrorResponse"];
3541
- };
3542
- };
3543
- /** @description Rate limit exceeded */
3544
- 429: {
3545
- headers: {
3546
- [name: string]: unknown;
3547
- };
3548
- content: {
3549
- "application/json": components["schemas"]["ErrorResponse"];
3550
- };
3551
- };
3552
3600
  };
3553
3601
  };
3554
3602
  logout: {
@@ -3560,22 +3608,13 @@ export interface operations {
3560
3608
  };
3561
3609
  requestBody?: never;
3562
3610
  responses: {
3563
- /** @description Session revoked successfully */
3611
+ /** @description Session revoked; cookie cleared */
3564
3612
  200: {
3565
3613
  headers: {
3566
3614
  [name: string]: unknown;
3567
3615
  };
3568
3616
  content: {
3569
- "application/json": components["schemas"]["OkResponse"];
3570
- };
3571
- };
3572
- /** @description Missing CSRF header */
3573
- 403: {
3574
- headers: {
3575
- [name: string]: unknown;
3576
- };
3577
- content: {
3578
- "application/json": components["schemas"]["ErrorResponse"];
3617
+ "application/json": components["schemas"]["LogoutResponse"];
3579
3618
  };
3580
3619
  };
3581
3620
  };
@@ -3594,32 +3633,17 @@ export interface operations {
3594
3633
  headers: {
3595
3634
  [name: string]: unknown;
3596
3635
  };
3597
- content: {
3598
- "application/json": components["schemas"]["AuthMeResponse"];
3599
- };
3600
- };
3601
- /** @description Not authenticated */
3602
- 401: {
3603
- headers: {
3604
- [name: string]: unknown;
3605
- };
3606
- content: {
3607
- "application/json": components["schemas"]["ErrorResponse"];
3608
- };
3636
+ content?: never;
3609
3637
  };
3610
3638
  };
3611
3639
  };
3612
3640
  initiateSso: {
3613
3641
  parameters: {
3614
3642
  query?: {
3615
- /** @description URL to redirect after successful auth (validated against allowlist) */
3616
3643
  return_to?: string;
3617
3644
  };
3618
3645
  header?: never;
3619
- path: {
3620
- /** @description Organization slug */
3621
- orgSlug: string;
3622
- };
3646
+ path?: never;
3623
3647
  cookie?: never;
3624
3648
  };
3625
3649
  requestBody?: never;
@@ -3627,42 +3651,18 @@ export interface operations {
3627
3651
  /** @description Redirect to identity provider */
3628
3652
  302: {
3629
3653
  headers: {
3630
- /** @description Identity provider authorization URL */
3631
- Location?: string;
3632
3654
  [name: string]: unknown;
3633
3655
  };
3634
3656
  content?: never;
3635
3657
  };
3636
- /** @description SSO not configured for organization */
3637
- 400: {
3638
- headers: {
3639
- [name: string]: unknown;
3640
- };
3641
- content: {
3642
- "application/json": components["schemas"]["ErrorResponse"];
3643
- };
3644
- };
3645
- /** @description Organization not found */
3646
- 404: {
3647
- headers: {
3648
- [name: string]: unknown;
3649
- };
3650
- content: {
3651
- "application/json": components["schemas"]["ErrorResponse"];
3652
- };
3653
- };
3654
3658
  };
3655
3659
  };
3656
3660
  handleOidcCallback: {
3657
3661
  parameters: {
3658
3662
  query?: {
3659
- /** @description Authorization code from IdP */
3660
3663
  code?: string;
3661
- /** @description State token for CSRF protection */
3662
3664
  state?: string;
3663
- /** @description Error code if auth failed at IdP */
3664
3665
  error?: string;
3665
- /** @description Human-readable error description */
3666
3666
  error_description?: string;
3667
3667
  };
3668
3668
  header?: never;
@@ -3674,20 +3674,10 @@ export interface operations {
3674
3674
  /** @description Redirect to return URL or login page */
3675
3675
  302: {
3676
3676
  headers: {
3677
- Location?: string;
3678
3677
  [name: string]: unknown;
3679
3678
  };
3680
3679
  content?: never;
3681
3680
  };
3682
- /** @description Invalid callback parameters */
3683
- 400: {
3684
- headers: {
3685
- [name: string]: unknown;
3686
- };
3687
- content: {
3688
- "application/json": components["schemas"]["ErrorResponse"];
3689
- };
3690
- };
3691
3681
  };
3692
3682
  };
3693
3683
  handleSamlCallback: {
@@ -3706,20 +3696,10 @@ export interface operations {
3706
3696
  /** @description Redirect to return URL or login page */
3707
3697
  302: {
3708
3698
  headers: {
3709
- Location?: string;
3710
3699
  [name: string]: unknown;
3711
3700
  };
3712
3701
  content?: never;
3713
3702
  };
3714
- /** @description Invalid callback parameters */
3715
- 400: {
3716
- headers: {
3717
- [name: string]: unknown;
3718
- };
3719
- content: {
3720
- "application/json": components["schemas"]["ErrorResponse"];
3721
- };
3722
- };
3723
3703
  };
3724
3704
  };
3725
3705
  getCurrentUser: {
@@ -3740,24 +3720,6 @@ export interface operations {
3740
3720
  "application/json": components["schemas"]["MeResponse"];
3741
3721
  };
3742
3722
  };
3743
- /** @description User or organization not found */
3744
- 404: {
3745
- headers: {
3746
- [name: string]: unknown;
3747
- };
3748
- content: {
3749
- "application/json": components["schemas"]["ErrorResponse"];
3750
- };
3751
- };
3752
- /** @description Configuration error (e.g., missing DEV_ORG_ID) */
3753
- 500: {
3754
- headers: {
3755
- [name: string]: unknown;
3756
- };
3757
- content: {
3758
- "application/json": components["schemas"]["ErrorResponse"];
3759
- };
3760
- };
3761
3723
  };
3762
3724
  };
3763
3725
  updateUserProfile: {
@@ -3782,24 +3744,6 @@ export interface operations {
3782
3744
  "application/json": components["schemas"]["ProfileUpdateResponse"];
3783
3745
  };
3784
3746
  };
3785
- /** @description Validation error */
3786
- 400: {
3787
- headers: {
3788
- [name: string]: unknown;
3789
- };
3790
- content: {
3791
- "application/json": components["schemas"]["ValidationErrorResponse"];
3792
- };
3793
- };
3794
- /** @description User not found */
3795
- 404: {
3796
- headers: {
3797
- [name: string]: unknown;
3798
- };
3799
- content: {
3800
- "application/json": components["schemas"]["ErrorResponse"];
3801
- };
3802
- };
3803
3747
  };
3804
3748
  };
3805
3749
  listUserOrgs: {
@@ -3969,124 +3913,55 @@ export interface operations {
3969
3913
  headers: {
3970
3914
  [name: string]: unknown;
3971
3915
  };
3972
- content: {
3973
- "application/json": components["schemas"]["ResyncSlackAvatarResponse"];
3974
- };
3975
- };
3976
- /** @description Not authenticated */
3977
- 401: {
3978
- headers: {
3979
- [name: string]: unknown;
3980
- };
3981
- content: {
3982
- "application/json": components["schemas"]["ErrorResponse"];
3983
- };
3984
- };
3985
- /** @description User not found */
3986
- 404: {
3987
- headers: {
3988
- [name: string]: unknown;
3989
- };
3990
- content: {
3991
- "application/json": components["schemas"]["ErrorResponse"];
3992
- };
3993
- };
3994
- /** @description Rate limit exceeded */
3995
- 429: {
3996
- headers: {
3997
- [name: string]: unknown;
3998
- };
3999
- content: {
4000
- "application/json": components["schemas"]["ErrorResponse"];
4001
- };
3916
+ content?: never;
4002
3917
  };
4003
3918
  };
4004
3919
  };
4005
3920
  initiateOAuth: {
4006
3921
  parameters: {
4007
- query?: {
4008
- /**
4009
- * @deprecated
4010
- * @description DEPRECATED: Organization ID derived from session.
4011
- * Query parameter accepted only in dev mode for backwards compatibility.
4012
- * Production: orgId is always derived from authenticated session.
4013
- */
4014
- orgId?: string;
4015
- };
3922
+ query?: never;
4016
3923
  header?: never;
4017
- path: {
4018
- provider: components["schemas"]["OAuthProvider"];
4019
- };
3924
+ path?: never;
4020
3925
  cookie?: never;
4021
3926
  };
4022
3927
  requestBody?: never;
4023
3928
  responses: {
4024
- /** @description Redirect to OAuth provider */
3929
+ /** @description Redirect to OAuth provider consent screen */
4025
3930
  302: {
4026
3931
  headers: {
4027
- /** @description OAuth provider authorization URL */
4028
- Location?: string;
4029
3932
  [name: string]: unknown;
4030
3933
  };
4031
3934
  content?: never;
4032
3935
  };
4033
- /** @description Invalid provider or missing/invalid orgId */
4034
- 400: {
4035
- headers: {
4036
- [name: string]: unknown;
4037
- };
4038
- content: {
4039
- "application/json": components["schemas"]["ErrorResponse"];
4040
- };
4041
- };
4042
- /** @description OAuth initialization failed */
4043
- 500: {
4044
- headers: {
4045
- [name: string]: unknown;
4046
- };
4047
- content: {
4048
- "application/json": components["schemas"]["ErrorResponse"];
4049
- };
4050
- };
4051
3936
  };
4052
3937
  };
4053
3938
  handleOAuthCallback: {
4054
3939
  parameters: {
4055
3940
  query?: {
4056
- /** @description Authorization code from provider */
4057
3941
  code?: string;
4058
- /** @description State token for CSRF protection */
4059
3942
  state?: string;
4060
- /** @description Error code from provider (if authorization denied) */
4061
3943
  error?: string;
4062
- /** @description Human-readable error description from provider */
4063
3944
  error_description?: string;
4064
3945
  };
4065
3946
  header?: never;
4066
- path: {
4067
- provider: components["schemas"]["OAuthProvider"];
4068
- };
3947
+ path?: never;
4069
3948
  cookie?: never;
4070
3949
  };
4071
3950
  requestBody?: never;
4072
3951
  responses: {
4073
- /** @description Authorization successful (HTML page) */
3952
+ /** @description HTML success or error page (for popup flows) */
4074
3953
  200: {
4075
3954
  headers: {
4076
3955
  [name: string]: unknown;
4077
3956
  };
4078
- content: {
4079
- "text/html": string;
4080
- };
3957
+ content?: never;
4081
3958
  };
4082
- /** @description Authorization failed or invalid request (HTML page) */
4083
- 400: {
3959
+ /** @description Redirect to return URL on success */
3960
+ 302: {
4084
3961
  headers: {
4085
3962
  [name: string]: unknown;
4086
3963
  };
4087
- content: {
4088
- "text/html": string;
4089
- };
3964
+ content?: never;
4090
3965
  };
4091
3966
  };
4092
3967
  };
@@ -4119,20 +3994,16 @@ export interface operations {
4119
3994
  };
4120
3995
  requestBody: {
4121
3996
  content: {
4122
- "application/json": components["schemas"]["ChatRequest"];
3997
+ "application/json": components["schemas"]["AiChatRequest"];
4123
3998
  };
4124
3999
  };
4125
4000
  responses: {
4126
- /** @description SSE stream of chat responses */
4001
+ /** @description AI chat stream (text/event-stream). Uses x-vercel-ai-ui-message-stream: v1. */
4127
4002
  200: {
4128
4003
  headers: {
4129
- /** @description AI SDK stream protocol version */
4130
- "x-vercel-ai-ui-message-stream"?: "v1";
4131
4004
  [name: string]: unknown;
4132
4005
  };
4133
- content: {
4134
- "text/event-stream": string;
4135
- };
4006
+ content?: never;
4136
4007
  };
4137
4008
  };
4138
4009
  };
@@ -6633,10 +6504,10 @@ export interface operations {
6633
6504
  listChats: {
6634
6505
  parameters: {
6635
6506
  query?: {
6636
- search?: string;
6637
6507
  limit?: number;
6638
6508
  offset?: number;
6639
- includePinned?: boolean;
6509
+ search?: string;
6510
+ includePinned?: "true" | "false";
6640
6511
  };
6641
6512
  header?: never;
6642
6513
  path?: never;
@@ -6650,18 +6521,7 @@ export interface operations {
6650
6521
  [name: string]: unknown;
6651
6522
  };
6652
6523
  content: {
6653
- "application/json": {
6654
- chats: components["schemas"]["ChatSummary"][];
6655
- };
6656
- };
6657
- };
6658
- /** @description Not authenticated */
6659
- 401: {
6660
- headers: {
6661
- [name: string]: unknown;
6662
- };
6663
- content: {
6664
- "application/json": components["schemas"]["ErrorResponse"];
6524
+ "application/json": components["schemas"]["ChatListResponse"];
6665
6525
  };
6666
6526
  };
6667
6527
  };
@@ -6685,27 +6545,7 @@ export interface operations {
6685
6545
  [name: string]: unknown;
6686
6546
  };
6687
6547
  content: {
6688
- "application/json": {
6689
- chat: components["schemas"]["Chat"];
6690
- };
6691
- };
6692
- };
6693
- /** @description Missing required fields */
6694
- 400: {
6695
- headers: {
6696
- [name: string]: unknown;
6697
- };
6698
- content: {
6699
- "application/json": components["schemas"]["ErrorResponse"];
6700
- };
6701
- };
6702
- /** @description Not authenticated */
6703
- 401: {
6704
- headers: {
6705
- [name: string]: unknown;
6706
- };
6707
- content: {
6708
- "application/json": components["schemas"]["ErrorResponse"];
6548
+ "application/json": components["schemas"]["CreateChatResponse"];
6709
6549
  };
6710
6550
  };
6711
6551
  };
@@ -6714,10 +6554,7 @@ export interface operations {
6714
6554
  parameters: {
6715
6555
  query?: never;
6716
6556
  header?: never;
6717
- path: {
6718
- /** @description Client-generated interaction ID */
6719
- interactionId: string;
6720
- };
6557
+ path?: never;
6721
6558
  cookie?: never;
6722
6559
  };
6723
6560
  requestBody?: never;
@@ -6728,28 +6565,7 @@ export interface operations {
6728
6565
  [name: string]: unknown;
6729
6566
  };
6730
6567
  content: {
6731
- "application/json": {
6732
- /** Format: uuid */
6733
- chatId: string;
6734
- };
6735
- };
6736
- };
6737
- /** @description Not authenticated */
6738
- 401: {
6739
- headers: {
6740
- [name: string]: unknown;
6741
- };
6742
- content: {
6743
- "application/json": components["schemas"]["ErrorResponse"];
6744
- };
6745
- };
6746
- /** @description Chat not found for this interaction ID */
6747
- 404: {
6748
- headers: {
6749
- [name: string]: unknown;
6750
- };
6751
- content: {
6752
- "application/json": components["schemas"]["ErrorResponse"];
6568
+ "application/json": components["schemas"]["ChatByInteractionResponse"];
6753
6569
  };
6754
6570
  };
6755
6571
  };
@@ -6758,10 +6574,7 @@ export interface operations {
6758
6574
  parameters: {
6759
6575
  query?: never;
6760
6576
  header?: never;
6761
- path: {
6762
- /** @description Chat ID (UUID) */
6763
- id: string;
6764
- };
6577
+ path?: never;
6765
6578
  cookie?: never;
6766
6579
  };
6767
6580
  requestBody?: never;
@@ -6775,34 +6588,13 @@ export interface operations {
6775
6588
  "application/json": components["schemas"]["ChatWithMessages"];
6776
6589
  };
6777
6590
  };
6778
- /** @description Not authenticated */
6779
- 401: {
6780
- headers: {
6781
- [name: string]: unknown;
6782
- };
6783
- content: {
6784
- "application/json": components["schemas"]["ErrorResponse"];
6785
- };
6786
- };
6787
- /** @description Chat not found or access denied */
6788
- 404: {
6789
- headers: {
6790
- [name: string]: unknown;
6791
- };
6792
- content: {
6793
- "application/json": components["schemas"]["ErrorResponse"];
6794
- };
6795
- };
6796
6591
  };
6797
6592
  };
6798
6593
  deleteChat: {
6799
6594
  parameters: {
6800
6595
  query?: never;
6801
6596
  header?: never;
6802
- path: {
6803
- /** @description Chat ID (UUID) */
6804
- id: string;
6805
- };
6597
+ path?: never;
6806
6598
  cookie?: never;
6807
6599
  };
6808
6600
  requestBody?: never;
@@ -6816,34 +6608,13 @@ export interface operations {
6816
6608
  "application/json": components["schemas"]["SuccessResponse"];
6817
6609
  };
6818
6610
  };
6819
- /** @description Not authenticated */
6820
- 401: {
6821
- headers: {
6822
- [name: string]: unknown;
6823
- };
6824
- content: {
6825
- "application/json": components["schemas"]["ErrorResponse"];
6826
- };
6827
- };
6828
- /** @description Chat not found or access denied */
6829
- 404: {
6830
- headers: {
6831
- [name: string]: unknown;
6832
- };
6833
- content: {
6834
- "application/json": components["schemas"]["ErrorResponse"];
6835
- };
6836
- };
6837
6611
  };
6838
6612
  };
6839
6613
  updateChat: {
6840
6614
  parameters: {
6841
6615
  query?: never;
6842
6616
  header?: never;
6843
- path: {
6844
- /** @description Chat ID (UUID) */
6845
- id: string;
6846
- };
6617
+ path?: never;
6847
6618
  cookie?: never;
6848
6619
  };
6849
6620
  requestBody: {
@@ -6861,43 +6632,13 @@ export interface operations {
6861
6632
  "application/json": components["schemas"]["SuccessResponse"];
6862
6633
  };
6863
6634
  };
6864
- /** @description Missing title */
6865
- 400: {
6866
- headers: {
6867
- [name: string]: unknown;
6868
- };
6869
- content: {
6870
- "application/json": components["schemas"]["ErrorResponse"];
6871
- };
6872
- };
6873
- /** @description Not authenticated */
6874
- 401: {
6875
- headers: {
6876
- [name: string]: unknown;
6877
- };
6878
- content: {
6879
- "application/json": components["schemas"]["ErrorResponse"];
6880
- };
6881
- };
6882
- /** @description Chat not found or access denied */
6883
- 404: {
6884
- headers: {
6885
- [name: string]: unknown;
6886
- };
6887
- content: {
6888
- "application/json": components["schemas"]["ErrorResponse"];
6889
- };
6890
- };
6891
6635
  };
6892
6636
  };
6893
6637
  appendMessages: {
6894
6638
  parameters: {
6895
6639
  query?: never;
6896
6640
  header?: never;
6897
- path: {
6898
- /** @description Chat ID (UUID) */
6899
- id: string;
6900
- };
6641
+ path?: never;
6901
6642
  cookie?: never;
6902
6643
  };
6903
6644
  requestBody: {
@@ -6915,45 +6656,13 @@ export interface operations {
6915
6656
  "application/json": components["schemas"]["SuccessResponse"];
6916
6657
  };
6917
6658
  };
6918
- /** @description Missing messages array */
6919
- 400: {
6920
- headers: {
6921
- [name: string]: unknown;
6922
- };
6923
- content: {
6924
- "application/json": components["schemas"]["ErrorResponse"];
6925
- };
6926
- };
6927
- /** @description Not authenticated */
6928
- 401: {
6929
- headers: {
6930
- [name: string]: unknown;
6931
- };
6932
- content: {
6933
- "application/json": components["schemas"]["ErrorResponse"];
6934
- };
6935
- };
6936
- /** @description Chat not found or access denied */
6937
- 404: {
6938
- headers: {
6939
- [name: string]: unknown;
6940
- };
6941
- content: {
6942
- "application/json": components["schemas"]["ErrorResponse"];
6943
- };
6944
- };
6945
6659
  };
6946
6660
  };
6947
6661
  deleteMessage: {
6948
6662
  parameters: {
6949
6663
  query?: never;
6950
6664
  header?: never;
6951
- path: {
6952
- /** @description Chat ID (UUID) */
6953
- id: string;
6954
- /** @description Message ID (UUID) */
6955
- messageId: string;
6956
- };
6665
+ path?: never;
6957
6666
  cookie?: never;
6958
6667
  };
6959
6668
  requestBody?: never;
@@ -6967,34 +6676,13 @@ export interface operations {
6967
6676
  "application/json": components["schemas"]["SuccessResponse"];
6968
6677
  };
6969
6678
  };
6970
- /** @description Not authenticated */
6971
- 401: {
6972
- headers: {
6973
- [name: string]: unknown;
6974
- };
6975
- content: {
6976
- "application/json": components["schemas"]["ErrorResponse"];
6977
- };
6978
- };
6979
- /** @description Chat or message not found */
6980
- 404: {
6981
- headers: {
6982
- [name: string]: unknown;
6983
- };
6984
- content: {
6985
- "application/json": components["schemas"]["ErrorResponse"];
6986
- };
6987
- };
6988
6679
  };
6989
6680
  };
6990
6681
  generateChatTitle: {
6991
6682
  parameters: {
6992
6683
  query?: never;
6993
6684
  header?: never;
6994
- path: {
6995
- /** @description Chat ID (UUID) */
6996
- id: string;
6997
- };
6685
+ path?: never;
6998
6686
  cookie?: never;
6999
6687
  };
7000
6688
  requestBody?: never;
@@ -7008,34 +6696,13 @@ export interface operations {
7008
6696
  "application/json": components["schemas"]["GenerateTitleResponse"];
7009
6697
  };
7010
6698
  };
7011
- /** @description Not authenticated */
7012
- 401: {
7013
- headers: {
7014
- [name: string]: unknown;
7015
- };
7016
- content: {
7017
- "application/json": components["schemas"]["ErrorResponse"];
7018
- };
7019
- };
7020
- /** @description Chat not found or access denied */
7021
- 404: {
7022
- headers: {
7023
- [name: string]: unknown;
7024
- };
7025
- content: {
7026
- "application/json": components["schemas"]["ErrorResponse"];
7027
- };
7028
- };
7029
6699
  };
7030
6700
  };
7031
6701
  pinChat: {
7032
6702
  parameters: {
7033
6703
  query?: never;
7034
6704
  header?: never;
7035
- path: {
7036
- /** @description Chat ID (UUID) */
7037
- id: string;
7038
- };
6705
+ path?: never;
7039
6706
  cookie?: never;
7040
6707
  };
7041
6708
  requestBody?: never;
@@ -7049,34 +6716,13 @@ export interface operations {
7049
6716
  "application/json": components["schemas"]["SuccessResponse"];
7050
6717
  };
7051
6718
  };
7052
- /** @description Not authenticated */
7053
- 401: {
7054
- headers: {
7055
- [name: string]: unknown;
7056
- };
7057
- content: {
7058
- "application/json": components["schemas"]["ErrorResponse"];
7059
- };
7060
- };
7061
- /** @description Chat not found or access denied */
7062
- 404: {
7063
- headers: {
7064
- [name: string]: unknown;
7065
- };
7066
- content: {
7067
- "application/json": components["schemas"]["ErrorResponse"];
7068
- };
7069
- };
7070
6719
  };
7071
6720
  };
7072
6721
  unpinChat: {
7073
6722
  parameters: {
7074
6723
  query?: never;
7075
6724
  header?: never;
7076
- path: {
7077
- /** @description Chat ID (UUID) */
7078
- id: string;
7079
- };
6725
+ path?: never;
7080
6726
  cookie?: never;
7081
6727
  };
7082
6728
  requestBody?: never;
@@ -7090,24 +6736,6 @@ export interface operations {
7090
6736
  "application/json": components["schemas"]["SuccessResponse"];
7091
6737
  };
7092
6738
  };
7093
- /** @description Not authenticated */
7094
- 401: {
7095
- headers: {
7096
- [name: string]: unknown;
7097
- };
7098
- content: {
7099
- "application/json": components["schemas"]["ErrorResponse"];
7100
- };
7101
- };
7102
- /** @description Chat not found or access denied */
7103
- 404: {
7104
- headers: {
7105
- [name: string]: unknown;
7106
- };
7107
- content: {
7108
- "application/json": components["schemas"]["ErrorResponse"];
7109
- };
7110
- };
7111
6739
  };
7112
6740
  };
7113
6741
  chatEvents: {
@@ -7119,22 +6747,13 @@ export interface operations {
7119
6747
  };
7120
6748
  requestBody?: never;
7121
6749
  responses: {
7122
- /** @description SSE stream established */
6750
+ /** @description SSE event stream (text/event-stream). Event payload: ChatSseEvent. */
7123
6751
  200: {
7124
6752
  headers: {
7125
6753
  [name: string]: unknown;
7126
6754
  };
7127
6755
  content: {
7128
- "text/event-stream": string;
7129
- };
7130
- };
7131
- /** @description Not authenticated */
7132
- 401: {
7133
- headers: {
7134
- [name: string]: unknown;
7135
- };
7136
- content: {
7137
- "application/json": components["schemas"]["ErrorResponse"];
6756
+ "text/event-stream": components["schemas"]["ChatSseEvent"];
7138
6757
  };
7139
6758
  };
7140
6759
  };
@@ -7143,41 +6762,18 @@ export interface operations {
7143
6762
  parameters: {
7144
6763
  query?: never;
7145
6764
  header?: never;
7146
- path: {
7147
- /** @description Chat ID (UUID) */
7148
- chatId: string;
7149
- };
6765
+ path?: never;
7150
6766
  cookie?: never;
7151
6767
  };
7152
6768
  requestBody?: never;
7153
6769
  responses: {
7154
- /** @description List of shares */
6770
+ /** @description List of chat shares */
7155
6771
  200: {
7156
6772
  headers: {
7157
6773
  [name: string]: unknown;
7158
6774
  };
7159
6775
  content: {
7160
- "application/json": {
7161
- shares: components["schemas"]["ChatShareInfo"][];
7162
- };
7163
- };
7164
- };
7165
- /** @description Not authenticated */
7166
- 401: {
7167
- headers: {
7168
- [name: string]: unknown;
7169
- };
7170
- content: {
7171
- "application/json": components["schemas"]["ErrorResponse"];
7172
- };
7173
- };
7174
- /** @description Chat not found or access denied */
7175
- 404: {
7176
- headers: {
7177
- [name: string]: unknown;
7178
- };
7179
- content: {
7180
- "application/json": components["schemas"]["ErrorResponse"];
6776
+ "application/json": components["schemas"]["ListSharesResponse"];
7181
6777
  };
7182
6778
  };
7183
6779
  };
@@ -7186,10 +6782,7 @@ export interface operations {
7186
6782
  parameters: {
7187
6783
  query?: never;
7188
6784
  header?: never;
7189
- path: {
7190
- /** @description Chat ID (UUID) */
7191
- chatId: string;
7192
- };
6785
+ path?: never;
7193
6786
  cookie?: never;
7194
6787
  };
7195
6788
  requestBody: {
@@ -7198,44 +6791,13 @@ export interface operations {
7198
6791
  };
7199
6792
  };
7200
6793
  responses: {
7201
- /** @description Share created */
6794
+ /** @description Share created successfully */
7202
6795
  201: {
7203
6796
  headers: {
7204
6797
  [name: string]: unknown;
7205
6798
  };
7206
6799
  content: {
7207
- "application/json": {
7208
- share: components["schemas"]["ChatShareInfo"];
7209
- /** @description Full URL for accessing the shared chat */
7210
- shareUrl: string;
7211
- };
7212
- };
7213
- };
7214
- /** @description Invalid visibility value */
7215
- 400: {
7216
- headers: {
7217
- [name: string]: unknown;
7218
- };
7219
- content: {
7220
- "application/json": components["schemas"]["ErrorResponse"];
7221
- };
7222
- };
7223
- /** @description Not authenticated */
7224
- 401: {
7225
- headers: {
7226
- [name: string]: unknown;
7227
- };
7228
- content: {
7229
- "application/json": components["schemas"]["ErrorResponse"];
7230
- };
7231
- };
7232
- /** @description Chat not found or access denied */
7233
- 404: {
7234
- headers: {
7235
- [name: string]: unknown;
7236
- };
7237
- content: {
7238
- "application/json": components["schemas"]["ErrorResponse"];
6800
+ "application/json": components["schemas"]["CreateShareResponse"];
7239
6801
  };
7240
6802
  };
7241
6803
  };
@@ -7244,39 +6806,18 @@ export interface operations {
7244
6806
  parameters: {
7245
6807
  query?: never;
7246
6808
  header?: never;
7247
- path: {
7248
- /** @description Share ID (UUID) */
7249
- shareId: string;
7250
- };
6809
+ path?: never;
7251
6810
  cookie?: never;
7252
6811
  };
7253
6812
  requestBody?: never;
7254
6813
  responses: {
7255
- /** @description Share revoked */
6814
+ /** @description Share revoked successfully */
7256
6815
  200: {
7257
6816
  headers: {
7258
6817
  [name: string]: unknown;
7259
6818
  };
7260
6819
  content: {
7261
- "application/json": components["schemas"]["SuccessResponse"];
7262
- };
7263
- };
7264
- /** @description Not authenticated */
7265
- 401: {
7266
- headers: {
7267
- [name: string]: unknown;
7268
- };
7269
- content: {
7270
- "application/json": components["schemas"]["ErrorResponse"];
7271
- };
7272
- };
7273
- /** @description Share not found or access denied */
7274
- 404: {
7275
- headers: {
7276
- [name: string]: unknown;
7277
- };
7278
- content: {
7279
- "application/json": components["schemas"]["ErrorResponse"];
6820
+ "application/json": components["schemas"]["ChatSuccessResponse"];
7280
6821
  };
7281
6822
  };
7282
6823
  };
@@ -7285,10 +6826,7 @@ export interface operations {
7285
6826
  parameters: {
7286
6827
  query?: never;
7287
6828
  header?: never;
7288
- path: {
7289
- /** @description Share ID (UUID) */
7290
- shareId: string;
7291
- };
6829
+ path?: never;
7292
6830
  cookie?: never;
7293
6831
  };
7294
6832
  requestBody: {
@@ -7297,52 +6835,22 @@ export interface operations {
7297
6835
  };
7298
6836
  };
7299
6837
  responses: {
7300
- /** @description Share updated */
6838
+ /** @description Share updated successfully */
7301
6839
  200: {
7302
6840
  headers: {
7303
6841
  [name: string]: unknown;
7304
6842
  };
7305
6843
  content: {
7306
- "application/json": {
7307
- share: components["schemas"]["ChatShareInfo"];
7308
- };
7309
- };
7310
- };
7311
- /** @description Invalid visibility value */
7312
- 400: {
7313
- headers: {
7314
- [name: string]: unknown;
7315
- };
7316
- content: {
7317
- "application/json": components["schemas"]["ErrorResponse"];
7318
- };
7319
- };
7320
- /** @description Not authenticated */
7321
- 401: {
7322
- headers: {
7323
- [name: string]: unknown;
7324
- };
7325
- content: {
7326
- "application/json": components["schemas"]["ErrorResponse"];
7327
- };
7328
- };
7329
- /** @description Share not found or access denied */
7330
- 404: {
7331
- headers: {
7332
- [name: string]: unknown;
7333
- };
7334
- content: {
7335
- "application/json": components["schemas"]["ErrorResponse"];
6844
+ "application/json": components["schemas"]["UpdateShareResponse"];
7336
6845
  };
7337
6846
  };
7338
6847
  };
7339
6848
  };
7340
- viewSharedChat: {
6849
+ getSharedView: {
7341
6850
  parameters: {
7342
6851
  query?: never;
7343
6852
  header?: never;
7344
6853
  path: {
7345
- /** @description Share token (high-entropy capability token) */
7346
6854
  token: string;
7347
6855
  };
7348
6856
  cookie?: never;
@@ -7352,23 +6860,12 @@ export interface operations {
7352
6860
  /** @description Shared chat view */
7353
6861
  200: {
7354
6862
  headers: {
7355
- /** @description Prevents caching to ensure revocation takes effect */
7356
- "Cache-Control"?: "no-store";
7357
6863
  [name: string]: unknown;
7358
6864
  };
7359
6865
  content: {
7360
6866
  "application/json": components["schemas"]["SharedChatView"];
7361
6867
  };
7362
6868
  };
7363
- /** @description Shared chat not found (invalid token, revoked, or unauthorized) */
7364
- 404: {
7365
- headers: {
7366
- [name: string]: unknown;
7367
- };
7368
- content: {
7369
- "application/json": components["schemas"]["ErrorResponse"];
7370
- };
7371
- };
7372
6869
  };
7373
6870
  };
7374
6871
  getCompanyMdTree: {