@company-semantics/contracts 0.119.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.
@@ -349,9 +349,8 @@ export interface paths {
349
349
  get?: never;
350
350
  put?: never;
351
351
  /**
352
- * AI chat endpoint
353
- * @description Streaming chat endpoint using Server-Sent Events (SSE).
354
- * 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.
355
354
  */
356
355
  post: operations["postAiChat"];
357
356
  delete?: never;
@@ -1474,18 +1473,10 @@ export interface paths {
1474
1473
  path?: never;
1475
1474
  cookie?: never;
1476
1475
  };
1477
- /**
1478
- * List user's saved chats
1479
- * @description Returns a list of chat summaries for the authenticated user in their current org.
1480
- * Ordered by updatedAt descending (newest first).
1481
- */
1476
+ /** List user's saved chats */
1482
1477
  get: operations["listChats"];
1483
1478
  put?: never;
1484
- /**
1485
- * Create/save a new chat
1486
- * @description Creates a new chat with initial messages.
1487
- * interactionId must be unique within the org.
1488
- */
1479
+ /** Create/save a new chat */
1489
1480
  post: operations["createChat"];
1490
1481
  delete?: never;
1491
1482
  options?: never;
@@ -1500,11 +1491,7 @@ export interface paths {
1500
1491
  path?: never;
1501
1492
  cookie?: never;
1502
1493
  };
1503
- /**
1504
- * Look up chat ID by client interaction ID
1505
- * @description Returns the chat ID associated with a client-generated interaction ID.
1506
- * Used to resolve optimistically-created chats.
1507
- */
1494
+ /** Look up chat ID by client interaction ID */
1508
1495
  get: operations["getChatByInteraction"];
1509
1496
  put?: never;
1510
1497
  post?: never;
@@ -1521,27 +1508,15 @@ export interface paths {
1521
1508
  path?: never;
1522
1509
  cookie?: never;
1523
1510
  };
1524
- /**
1525
- * Get chat with messages
1526
- * @description Returns a chat with all its messages.
1527
- * Only the chat owner can access their chats.
1528
- */
1511
+ /** Get chat with messages */
1529
1512
  get: operations["getChat"];
1530
1513
  put?: never;
1531
1514
  post?: never;
1532
- /**
1533
- * Delete a chat
1534
- * @description Deletes a chat and all its messages (cascade).
1535
- * Only the chat owner can delete their chats.
1536
- */
1515
+ /** Delete a chat */
1537
1516
  delete: operations["deleteChat"];
1538
1517
  options?: never;
1539
1518
  head?: never;
1540
- /**
1541
- * Update chat title
1542
- * @description Updates the title of an existing chat.
1543
- * Only the chat owner can update their chats.
1544
- */
1519
+ /** Update chat title */
1545
1520
  patch: operations["updateChat"];
1546
1521
  trace?: never;
1547
1522
  };
@@ -1554,11 +1529,7 @@ export interface paths {
1554
1529
  };
1555
1530
  get?: never;
1556
1531
  put?: never;
1557
- /**
1558
- * Append messages to chat
1559
- * @description Appends new messages to an existing chat.
1560
- * Sequence numbers are auto-assigned starting from the current max + 1.
1561
- */
1532
+ /** Append messages to chat */
1562
1533
  post: operations["appendMessages"];
1563
1534
  delete?: never;
1564
1535
  options?: never;
@@ -1576,11 +1547,7 @@ export interface paths {
1576
1547
  get?: never;
1577
1548
  put?: never;
1578
1549
  post?: never;
1579
- /**
1580
- * Delete a single message
1581
- * @description Deletes a single message from a chat.
1582
- * Only the chat owner can delete messages from their chats.
1583
- */
1550
+ /** Delete a single message */
1584
1551
  delete: operations["deleteMessage"];
1585
1552
  options?: never;
1586
1553
  head?: never;
@@ -1596,13 +1563,7 @@ export interface paths {
1596
1563
  };
1597
1564
  get?: never;
1598
1565
  put?: never;
1599
- /**
1600
- * Generate title for chat
1601
- * @description Triggers LLM-based title generation for a chat.
1602
- * Respects title generation invariants:
1603
- * - INV-TITLE-2: Skips if titleSource === 'manual'
1604
- * - INV-TITLE-3: Skips if titleGeneratedAt !== null
1605
- */
1566
+ /** Generate title for chat */
1606
1567
  post: operations["generateChatTitle"];
1607
1568
  delete?: never;
1608
1569
  options?: never;
@@ -1619,15 +1580,9 @@ export interface paths {
1619
1580
  };
1620
1581
  get?: never;
1621
1582
  put?: never;
1622
- /**
1623
- * Pin a chat
1624
- * @description Pins a chat to keep it at the top of the list.
1625
- */
1583
+ /** Pin a chat */
1626
1584
  post: operations["pinChat"];
1627
- /**
1628
- * Unpin a chat
1629
- * @description Removes the pinned status from a chat.
1630
- */
1585
+ /** Unpin a chat */
1631
1586
  delete: operations["unpinChat"];
1632
1587
  options?: never;
1633
1588
  head?: never;
@@ -1642,10 +1597,8 @@ export interface paths {
1642
1597
  cookie?: never;
1643
1598
  };
1644
1599
  /**
1645
- * Subscribe to real-time chat updates
1646
- * @description Server-Sent Events endpoint for real-time chat updates.
1647
- * Emits invalidation events when chats are created, updated, or deleted.
1648
- * 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.
1649
1602
  */
1650
1603
  get: operations["chatEvents"];
1651
1604
  put?: never;
@@ -1663,18 +1616,10 @@ export interface paths {
1663
1616
  path?: never;
1664
1617
  cookie?: never;
1665
1618
  };
1666
- /**
1667
- * List shares for a chat
1668
- * @description Returns all active (non-revoked) shares for a chat.
1669
- * Only the chat owner can list shares.
1670
- */
1619
+ /** List all active shares for a chat */
1671
1620
  get: operations["listShares"];
1672
1621
  put?: never;
1673
- /**
1674
- * Create share with snapshot
1675
- * @description Creates a share for a chat, capturing current message count as the snapshot boundary.
1676
- * Only the chat owner can create shares.
1677
- */
1622
+ /** Create a share for a chat */
1678
1623
  post: operations["createShare"];
1679
1624
  delete?: never;
1680
1625
  options?: never;
@@ -1692,19 +1637,11 @@ export interface paths {
1692
1637
  get?: never;
1693
1638
  put?: never;
1694
1639
  post?: never;
1695
- /**
1696
- * Revoke a share
1697
- * @description Revokes a share by setting revokedAt timestamp (soft delete).
1698
- * Only the chat owner can revoke shares.
1699
- */
1640
+ /** Revoke a share */
1700
1641
  delete: operations["revokeShare"];
1701
1642
  options?: never;
1702
1643
  head?: never;
1703
- /**
1704
- * Update share visibility
1705
- * @description Updates a share's visibility or refreshes the snapshot boundary.
1706
- * Only the chat owner can update shares.
1707
- */
1644
+ /** Update a share's visibility or refresh snapshot */
1708
1645
  patch: operations["updateShare"];
1709
1646
  trace?: never;
1710
1647
  };
@@ -1715,14 +1652,8 @@ export interface paths {
1715
1652
  path?: never;
1716
1653
  cookie?: never;
1717
1654
  };
1718
- /**
1719
- * View shared chat (public)
1720
- * @description View a shared chat using its token.
1721
- * Public shares are accessible to anyone with the token.
1722
- * Private shares require authentication as the chat owner.
1723
- * Returns 404 for invalid tokens, revoked shares, or unauthorized access (never leaks reason).
1724
- */
1725
- get: operations["viewSharedChat"];
1655
+ /** View a shared chat by token */
1656
+ get: operations["getSharedView"];
1726
1657
  put?: never;
1727
1658
  post?: never;
1728
1659
  delete?: never;
@@ -2513,13 +2444,27 @@ export interface components {
2513
2444
  createdAt: string;
2514
2445
  };
2515
2446
  ChatWithMessages: {
2516
- chat: components["schemas"]["Chat"];
2517
- 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;
2518
2458
  };
2519
2459
  CreateChatRequest: {
2520
2460
  title: string;
2521
2461
  interactionId: string;
2522
- messages: components["schemas"]["NewMessage"][];
2462
+ messages: {
2463
+ /** @enum {string} */
2464
+ role: "user" | "assistant";
2465
+ content: string;
2466
+ parts?: unknown[];
2467
+ }[];
2523
2468
  };
2524
2469
  NewMessage: {
2525
2470
  /** @enum {string} */
@@ -2531,16 +2476,19 @@ export interface components {
2531
2476
  title: string;
2532
2477
  };
2533
2478
  AppendMessagesRequest: {
2534
- messages: components["schemas"]["NewMessage"][];
2479
+ messages: {
2480
+ /** @enum {string} */
2481
+ role: "user" | "assistant";
2482
+ content: string;
2483
+ parts?: unknown[];
2484
+ }[];
2535
2485
  };
2536
2486
  SuccessResponse: {
2537
2487
  /** @constant */
2538
2488
  success: true;
2539
2489
  };
2540
2490
  GenerateTitleResponse: {
2541
- /** @description The chat title (generated or existing) */
2542
2491
  title: string;
2543
- /** @description Whether title was newly generated (false if guards blocked) */
2544
2492
  isAutoGenerated: boolean;
2545
2493
  };
2546
2494
  /** @enum {string} */
@@ -2562,22 +2510,29 @@ export interface components {
2562
2510
  revokedAt?: string | null;
2563
2511
  };
2564
2512
  CreateShareRequest: {
2565
- visibility: components["schemas"]["ChatVisibility"];
2513
+ /** @enum {string} */
2514
+ visibility: "public" | "private";
2566
2515
  /** Format: email */
2567
2516
  recipientEmail?: string;
2568
2517
  };
2569
2518
  UpdateShareRequest: {
2570
- visibility?: components["schemas"]["ChatVisibility"];
2519
+ /** @enum {string} */
2520
+ visibility?: "public" | "private";
2571
2521
  updateSnapshot?: boolean;
2572
2522
  };
2573
2523
  SharedChatView: {
2574
- /** Format: uuid */
2575
- chatId: string;
2576
2524
  title: string;
2577
- messages: components["schemas"]["ChatMessage"][];
2525
+ messages: {
2526
+ /** @enum {string} */
2527
+ role: "user" | "assistant";
2528
+ content: string;
2529
+ parts?: unknown[];
2530
+ }[];
2578
2531
  /** Format: date-time */
2579
2532
  sharedAt: string;
2580
- visibility: components["schemas"]["ChatVisibility"];
2533
+ sharedByName: string;
2534
+ /** @enum {string} */
2535
+ visibility: "private" | "public";
2581
2536
  };
2582
2537
  OrgBudgetConfig: {
2583
2538
  enabled: boolean;
@@ -3379,6 +3334,174 @@ export interface components {
3379
3334
  /** @constant */
3380
3335
  ok: true;
3381
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
+ };
3382
3505
  };
3383
3506
  responses: never;
3384
3507
  parameters: never;
@@ -3871,20 +3994,16 @@ export interface operations {
3871
3994
  };
3872
3995
  requestBody: {
3873
3996
  content: {
3874
- "application/json": components["schemas"]["ChatRequest"];
3997
+ "application/json": components["schemas"]["AiChatRequest"];
3875
3998
  };
3876
3999
  };
3877
4000
  responses: {
3878
- /** @description SSE stream of chat responses */
4001
+ /** @description AI chat stream (text/event-stream). Uses x-vercel-ai-ui-message-stream: v1. */
3879
4002
  200: {
3880
4003
  headers: {
3881
- /** @description AI SDK stream protocol version */
3882
- "x-vercel-ai-ui-message-stream"?: "v1";
3883
4004
  [name: string]: unknown;
3884
4005
  };
3885
- content: {
3886
- "text/event-stream": string;
3887
- };
4006
+ content?: never;
3888
4007
  };
3889
4008
  };
3890
4009
  };
@@ -6385,10 +6504,10 @@ export interface operations {
6385
6504
  listChats: {
6386
6505
  parameters: {
6387
6506
  query?: {
6388
- search?: string;
6389
6507
  limit?: number;
6390
6508
  offset?: number;
6391
- includePinned?: boolean;
6509
+ search?: string;
6510
+ includePinned?: "true" | "false";
6392
6511
  };
6393
6512
  header?: never;
6394
6513
  path?: never;
@@ -6402,18 +6521,7 @@ export interface operations {
6402
6521
  [name: string]: unknown;
6403
6522
  };
6404
6523
  content: {
6405
- "application/json": {
6406
- chats: components["schemas"]["ChatSummary"][];
6407
- };
6408
- };
6409
- };
6410
- /** @description Not authenticated */
6411
- 401: {
6412
- headers: {
6413
- [name: string]: unknown;
6414
- };
6415
- content: {
6416
- "application/json": components["schemas"]["ErrorResponse"];
6524
+ "application/json": components["schemas"]["ChatListResponse"];
6417
6525
  };
6418
6526
  };
6419
6527
  };
@@ -6437,27 +6545,7 @@ export interface operations {
6437
6545
  [name: string]: unknown;
6438
6546
  };
6439
6547
  content: {
6440
- "application/json": {
6441
- chat: components["schemas"]["Chat"];
6442
- };
6443
- };
6444
- };
6445
- /** @description Missing required fields */
6446
- 400: {
6447
- headers: {
6448
- [name: string]: unknown;
6449
- };
6450
- content: {
6451
- "application/json": components["schemas"]["ErrorResponse"];
6452
- };
6453
- };
6454
- /** @description Not authenticated */
6455
- 401: {
6456
- headers: {
6457
- [name: string]: unknown;
6458
- };
6459
- content: {
6460
- "application/json": components["schemas"]["ErrorResponse"];
6548
+ "application/json": components["schemas"]["CreateChatResponse"];
6461
6549
  };
6462
6550
  };
6463
6551
  };
@@ -6466,10 +6554,7 @@ export interface operations {
6466
6554
  parameters: {
6467
6555
  query?: never;
6468
6556
  header?: never;
6469
- path: {
6470
- /** @description Client-generated interaction ID */
6471
- interactionId: string;
6472
- };
6557
+ path?: never;
6473
6558
  cookie?: never;
6474
6559
  };
6475
6560
  requestBody?: never;
@@ -6480,28 +6565,7 @@ export interface operations {
6480
6565
  [name: string]: unknown;
6481
6566
  };
6482
6567
  content: {
6483
- "application/json": {
6484
- /** Format: uuid */
6485
- chatId: string;
6486
- };
6487
- };
6488
- };
6489
- /** @description Not authenticated */
6490
- 401: {
6491
- headers: {
6492
- [name: string]: unknown;
6493
- };
6494
- content: {
6495
- "application/json": components["schemas"]["ErrorResponse"];
6496
- };
6497
- };
6498
- /** @description Chat not found for this interaction ID */
6499
- 404: {
6500
- headers: {
6501
- [name: string]: unknown;
6502
- };
6503
- content: {
6504
- "application/json": components["schemas"]["ErrorResponse"];
6568
+ "application/json": components["schemas"]["ChatByInteractionResponse"];
6505
6569
  };
6506
6570
  };
6507
6571
  };
@@ -6510,10 +6574,7 @@ export interface operations {
6510
6574
  parameters: {
6511
6575
  query?: never;
6512
6576
  header?: never;
6513
- path: {
6514
- /** @description Chat ID (UUID) */
6515
- id: string;
6516
- };
6577
+ path?: never;
6517
6578
  cookie?: never;
6518
6579
  };
6519
6580
  requestBody?: never;
@@ -6527,34 +6588,13 @@ export interface operations {
6527
6588
  "application/json": components["schemas"]["ChatWithMessages"];
6528
6589
  };
6529
6590
  };
6530
- /** @description Not authenticated */
6531
- 401: {
6532
- headers: {
6533
- [name: string]: unknown;
6534
- };
6535
- content: {
6536
- "application/json": components["schemas"]["ErrorResponse"];
6537
- };
6538
- };
6539
- /** @description Chat not found or access denied */
6540
- 404: {
6541
- headers: {
6542
- [name: string]: unknown;
6543
- };
6544
- content: {
6545
- "application/json": components["schemas"]["ErrorResponse"];
6546
- };
6547
- };
6548
6591
  };
6549
6592
  };
6550
6593
  deleteChat: {
6551
6594
  parameters: {
6552
6595
  query?: never;
6553
6596
  header?: never;
6554
- path: {
6555
- /** @description Chat ID (UUID) */
6556
- id: string;
6557
- };
6597
+ path?: never;
6558
6598
  cookie?: never;
6559
6599
  };
6560
6600
  requestBody?: never;
@@ -6568,34 +6608,13 @@ export interface operations {
6568
6608
  "application/json": components["schemas"]["SuccessResponse"];
6569
6609
  };
6570
6610
  };
6571
- /** @description Not authenticated */
6572
- 401: {
6573
- headers: {
6574
- [name: string]: unknown;
6575
- };
6576
- content: {
6577
- "application/json": components["schemas"]["ErrorResponse"];
6578
- };
6579
- };
6580
- /** @description Chat not found or access denied */
6581
- 404: {
6582
- headers: {
6583
- [name: string]: unknown;
6584
- };
6585
- content: {
6586
- "application/json": components["schemas"]["ErrorResponse"];
6587
- };
6588
- };
6589
6611
  };
6590
6612
  };
6591
6613
  updateChat: {
6592
6614
  parameters: {
6593
6615
  query?: never;
6594
6616
  header?: never;
6595
- path: {
6596
- /** @description Chat ID (UUID) */
6597
- id: string;
6598
- };
6617
+ path?: never;
6599
6618
  cookie?: never;
6600
6619
  };
6601
6620
  requestBody: {
@@ -6613,43 +6632,13 @@ export interface operations {
6613
6632
  "application/json": components["schemas"]["SuccessResponse"];
6614
6633
  };
6615
6634
  };
6616
- /** @description Missing title */
6617
- 400: {
6618
- headers: {
6619
- [name: string]: unknown;
6620
- };
6621
- content: {
6622
- "application/json": components["schemas"]["ErrorResponse"];
6623
- };
6624
- };
6625
- /** @description Not authenticated */
6626
- 401: {
6627
- headers: {
6628
- [name: string]: unknown;
6629
- };
6630
- content: {
6631
- "application/json": components["schemas"]["ErrorResponse"];
6632
- };
6633
- };
6634
- /** @description Chat not found or access denied */
6635
- 404: {
6636
- headers: {
6637
- [name: string]: unknown;
6638
- };
6639
- content: {
6640
- "application/json": components["schemas"]["ErrorResponse"];
6641
- };
6642
- };
6643
6635
  };
6644
6636
  };
6645
6637
  appendMessages: {
6646
6638
  parameters: {
6647
6639
  query?: never;
6648
6640
  header?: never;
6649
- path: {
6650
- /** @description Chat ID (UUID) */
6651
- id: string;
6652
- };
6641
+ path?: never;
6653
6642
  cookie?: never;
6654
6643
  };
6655
6644
  requestBody: {
@@ -6667,45 +6656,13 @@ export interface operations {
6667
6656
  "application/json": components["schemas"]["SuccessResponse"];
6668
6657
  };
6669
6658
  };
6670
- /** @description Missing messages array */
6671
- 400: {
6672
- headers: {
6673
- [name: string]: unknown;
6674
- };
6675
- content: {
6676
- "application/json": components["schemas"]["ErrorResponse"];
6677
- };
6678
- };
6679
- /** @description Not authenticated */
6680
- 401: {
6681
- headers: {
6682
- [name: string]: unknown;
6683
- };
6684
- content: {
6685
- "application/json": components["schemas"]["ErrorResponse"];
6686
- };
6687
- };
6688
- /** @description Chat not found or access denied */
6689
- 404: {
6690
- headers: {
6691
- [name: string]: unknown;
6692
- };
6693
- content: {
6694
- "application/json": components["schemas"]["ErrorResponse"];
6695
- };
6696
- };
6697
6659
  };
6698
6660
  };
6699
6661
  deleteMessage: {
6700
6662
  parameters: {
6701
6663
  query?: never;
6702
6664
  header?: never;
6703
- path: {
6704
- /** @description Chat ID (UUID) */
6705
- id: string;
6706
- /** @description Message ID (UUID) */
6707
- messageId: string;
6708
- };
6665
+ path?: never;
6709
6666
  cookie?: never;
6710
6667
  };
6711
6668
  requestBody?: never;
@@ -6719,34 +6676,13 @@ export interface operations {
6719
6676
  "application/json": components["schemas"]["SuccessResponse"];
6720
6677
  };
6721
6678
  };
6722
- /** @description Not authenticated */
6723
- 401: {
6724
- headers: {
6725
- [name: string]: unknown;
6726
- };
6727
- content: {
6728
- "application/json": components["schemas"]["ErrorResponse"];
6729
- };
6730
- };
6731
- /** @description Chat or message not found */
6732
- 404: {
6733
- headers: {
6734
- [name: string]: unknown;
6735
- };
6736
- content: {
6737
- "application/json": components["schemas"]["ErrorResponse"];
6738
- };
6739
- };
6740
6679
  };
6741
6680
  };
6742
6681
  generateChatTitle: {
6743
6682
  parameters: {
6744
6683
  query?: never;
6745
6684
  header?: never;
6746
- path: {
6747
- /** @description Chat ID (UUID) */
6748
- id: string;
6749
- };
6685
+ path?: never;
6750
6686
  cookie?: never;
6751
6687
  };
6752
6688
  requestBody?: never;
@@ -6760,34 +6696,13 @@ export interface operations {
6760
6696
  "application/json": components["schemas"]["GenerateTitleResponse"];
6761
6697
  };
6762
6698
  };
6763
- /** @description Not authenticated */
6764
- 401: {
6765
- headers: {
6766
- [name: string]: unknown;
6767
- };
6768
- content: {
6769
- "application/json": components["schemas"]["ErrorResponse"];
6770
- };
6771
- };
6772
- /** @description Chat not found or access denied */
6773
- 404: {
6774
- headers: {
6775
- [name: string]: unknown;
6776
- };
6777
- content: {
6778
- "application/json": components["schemas"]["ErrorResponse"];
6779
- };
6780
- };
6781
6699
  };
6782
6700
  };
6783
6701
  pinChat: {
6784
6702
  parameters: {
6785
6703
  query?: never;
6786
6704
  header?: never;
6787
- path: {
6788
- /** @description Chat ID (UUID) */
6789
- id: string;
6790
- };
6705
+ path?: never;
6791
6706
  cookie?: never;
6792
6707
  };
6793
6708
  requestBody?: never;
@@ -6801,34 +6716,13 @@ export interface operations {
6801
6716
  "application/json": components["schemas"]["SuccessResponse"];
6802
6717
  };
6803
6718
  };
6804
- /** @description Not authenticated */
6805
- 401: {
6806
- headers: {
6807
- [name: string]: unknown;
6808
- };
6809
- content: {
6810
- "application/json": components["schemas"]["ErrorResponse"];
6811
- };
6812
- };
6813
- /** @description Chat not found or access denied */
6814
- 404: {
6815
- headers: {
6816
- [name: string]: unknown;
6817
- };
6818
- content: {
6819
- "application/json": components["schemas"]["ErrorResponse"];
6820
- };
6821
- };
6822
6719
  };
6823
6720
  };
6824
6721
  unpinChat: {
6825
6722
  parameters: {
6826
6723
  query?: never;
6827
6724
  header?: never;
6828
- path: {
6829
- /** @description Chat ID (UUID) */
6830
- id: string;
6831
- };
6725
+ path?: never;
6832
6726
  cookie?: never;
6833
6727
  };
6834
6728
  requestBody?: never;
@@ -6842,24 +6736,6 @@ export interface operations {
6842
6736
  "application/json": components["schemas"]["SuccessResponse"];
6843
6737
  };
6844
6738
  };
6845
- /** @description Not authenticated */
6846
- 401: {
6847
- headers: {
6848
- [name: string]: unknown;
6849
- };
6850
- content: {
6851
- "application/json": components["schemas"]["ErrorResponse"];
6852
- };
6853
- };
6854
- /** @description Chat not found or access denied */
6855
- 404: {
6856
- headers: {
6857
- [name: string]: unknown;
6858
- };
6859
- content: {
6860
- "application/json": components["schemas"]["ErrorResponse"];
6861
- };
6862
- };
6863
6739
  };
6864
6740
  };
6865
6741
  chatEvents: {
@@ -6871,22 +6747,13 @@ export interface operations {
6871
6747
  };
6872
6748
  requestBody?: never;
6873
6749
  responses: {
6874
- /** @description SSE stream established */
6750
+ /** @description SSE event stream (text/event-stream). Event payload: ChatSseEvent. */
6875
6751
  200: {
6876
6752
  headers: {
6877
6753
  [name: string]: unknown;
6878
6754
  };
6879
6755
  content: {
6880
- "text/event-stream": string;
6881
- };
6882
- };
6883
- /** @description Not authenticated */
6884
- 401: {
6885
- headers: {
6886
- [name: string]: unknown;
6887
- };
6888
- content: {
6889
- "application/json": components["schemas"]["ErrorResponse"];
6756
+ "text/event-stream": components["schemas"]["ChatSseEvent"];
6890
6757
  };
6891
6758
  };
6892
6759
  };
@@ -6895,41 +6762,18 @@ export interface operations {
6895
6762
  parameters: {
6896
6763
  query?: never;
6897
6764
  header?: never;
6898
- path: {
6899
- /** @description Chat ID (UUID) */
6900
- chatId: string;
6901
- };
6765
+ path?: never;
6902
6766
  cookie?: never;
6903
6767
  };
6904
6768
  requestBody?: never;
6905
6769
  responses: {
6906
- /** @description List of shares */
6770
+ /** @description List of chat shares */
6907
6771
  200: {
6908
6772
  headers: {
6909
6773
  [name: string]: unknown;
6910
6774
  };
6911
6775
  content: {
6912
- "application/json": {
6913
- shares: components["schemas"]["ChatShareInfo"][];
6914
- };
6915
- };
6916
- };
6917
- /** @description Not authenticated */
6918
- 401: {
6919
- headers: {
6920
- [name: string]: unknown;
6921
- };
6922
- content: {
6923
- "application/json": components["schemas"]["ErrorResponse"];
6924
- };
6925
- };
6926
- /** @description Chat not found or access denied */
6927
- 404: {
6928
- headers: {
6929
- [name: string]: unknown;
6930
- };
6931
- content: {
6932
- "application/json": components["schemas"]["ErrorResponse"];
6776
+ "application/json": components["schemas"]["ListSharesResponse"];
6933
6777
  };
6934
6778
  };
6935
6779
  };
@@ -6938,10 +6782,7 @@ export interface operations {
6938
6782
  parameters: {
6939
6783
  query?: never;
6940
6784
  header?: never;
6941
- path: {
6942
- /** @description Chat ID (UUID) */
6943
- chatId: string;
6944
- };
6785
+ path?: never;
6945
6786
  cookie?: never;
6946
6787
  };
6947
6788
  requestBody: {
@@ -6950,44 +6791,13 @@ export interface operations {
6950
6791
  };
6951
6792
  };
6952
6793
  responses: {
6953
- /** @description Share created */
6794
+ /** @description Share created successfully */
6954
6795
  201: {
6955
6796
  headers: {
6956
6797
  [name: string]: unknown;
6957
6798
  };
6958
6799
  content: {
6959
- "application/json": {
6960
- share: components["schemas"]["ChatShareInfo"];
6961
- /** @description Full URL for accessing the shared chat */
6962
- shareUrl: string;
6963
- };
6964
- };
6965
- };
6966
- /** @description Invalid visibility value */
6967
- 400: {
6968
- headers: {
6969
- [name: string]: unknown;
6970
- };
6971
- content: {
6972
- "application/json": components["schemas"]["ErrorResponse"];
6973
- };
6974
- };
6975
- /** @description Not authenticated */
6976
- 401: {
6977
- headers: {
6978
- [name: string]: unknown;
6979
- };
6980
- content: {
6981
- "application/json": components["schemas"]["ErrorResponse"];
6982
- };
6983
- };
6984
- /** @description Chat not found or access denied */
6985
- 404: {
6986
- headers: {
6987
- [name: string]: unknown;
6988
- };
6989
- content: {
6990
- "application/json": components["schemas"]["ErrorResponse"];
6800
+ "application/json": components["schemas"]["CreateShareResponse"];
6991
6801
  };
6992
6802
  };
6993
6803
  };
@@ -6996,39 +6806,18 @@ export interface operations {
6996
6806
  parameters: {
6997
6807
  query?: never;
6998
6808
  header?: never;
6999
- path: {
7000
- /** @description Share ID (UUID) */
7001
- shareId: string;
7002
- };
6809
+ path?: never;
7003
6810
  cookie?: never;
7004
6811
  };
7005
6812
  requestBody?: never;
7006
6813
  responses: {
7007
- /** @description Share revoked */
6814
+ /** @description Share revoked successfully */
7008
6815
  200: {
7009
6816
  headers: {
7010
6817
  [name: string]: unknown;
7011
6818
  };
7012
6819
  content: {
7013
- "application/json": components["schemas"]["SuccessResponse"];
7014
- };
7015
- };
7016
- /** @description Not authenticated */
7017
- 401: {
7018
- headers: {
7019
- [name: string]: unknown;
7020
- };
7021
- content: {
7022
- "application/json": components["schemas"]["ErrorResponse"];
7023
- };
7024
- };
7025
- /** @description Share not found or access denied */
7026
- 404: {
7027
- headers: {
7028
- [name: string]: unknown;
7029
- };
7030
- content: {
7031
- "application/json": components["schemas"]["ErrorResponse"];
6820
+ "application/json": components["schemas"]["ChatSuccessResponse"];
7032
6821
  };
7033
6822
  };
7034
6823
  };
@@ -7037,10 +6826,7 @@ export interface operations {
7037
6826
  parameters: {
7038
6827
  query?: never;
7039
6828
  header?: never;
7040
- path: {
7041
- /** @description Share ID (UUID) */
7042
- shareId: string;
7043
- };
6829
+ path?: never;
7044
6830
  cookie?: never;
7045
6831
  };
7046
6832
  requestBody: {
@@ -7049,52 +6835,22 @@ export interface operations {
7049
6835
  };
7050
6836
  };
7051
6837
  responses: {
7052
- /** @description Share updated */
6838
+ /** @description Share updated successfully */
7053
6839
  200: {
7054
6840
  headers: {
7055
6841
  [name: string]: unknown;
7056
6842
  };
7057
6843
  content: {
7058
- "application/json": {
7059
- share: components["schemas"]["ChatShareInfo"];
7060
- };
7061
- };
7062
- };
7063
- /** @description Invalid visibility value */
7064
- 400: {
7065
- headers: {
7066
- [name: string]: unknown;
7067
- };
7068
- content: {
7069
- "application/json": components["schemas"]["ErrorResponse"];
7070
- };
7071
- };
7072
- /** @description Not authenticated */
7073
- 401: {
7074
- headers: {
7075
- [name: string]: unknown;
7076
- };
7077
- content: {
7078
- "application/json": components["schemas"]["ErrorResponse"];
7079
- };
7080
- };
7081
- /** @description Share not found or access denied */
7082
- 404: {
7083
- headers: {
7084
- [name: string]: unknown;
7085
- };
7086
- content: {
7087
- "application/json": components["schemas"]["ErrorResponse"];
6844
+ "application/json": components["schemas"]["UpdateShareResponse"];
7088
6845
  };
7089
6846
  };
7090
6847
  };
7091
6848
  };
7092
- viewSharedChat: {
6849
+ getSharedView: {
7093
6850
  parameters: {
7094
6851
  query?: never;
7095
6852
  header?: never;
7096
6853
  path: {
7097
- /** @description Share token (high-entropy capability token) */
7098
6854
  token: string;
7099
6855
  };
7100
6856
  cookie?: never;
@@ -7104,23 +6860,12 @@ export interface operations {
7104
6860
  /** @description Shared chat view */
7105
6861
  200: {
7106
6862
  headers: {
7107
- /** @description Prevents caching to ensure revocation takes effect */
7108
- "Cache-Control"?: "no-store";
7109
6863
  [name: string]: unknown;
7110
6864
  };
7111
6865
  content: {
7112
6866
  "application/json": components["schemas"]["SharedChatView"];
7113
6867
  };
7114
6868
  };
7115
- /** @description Shared chat not found (invalid token, revoked, or unauthorized) */
7116
- 404: {
7117
- headers: {
7118
- [name: string]: unknown;
7119
- };
7120
- content: {
7121
- "application/json": components["schemas"]["ErrorResponse"];
7122
- };
7123
- };
7124
6869
  };
7125
6870
  };
7126
6871
  getCompanyMdTree: {