@selleragent/api-contract 0.5.0 → 0.7.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.
@@ -1567,7 +1567,99 @@ export declare const conversationsProcessInboundEventResponseSchema: z.ZodObject
1567
1567
  reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1568
1568
  }, z.core.$strip>>;
1569
1569
  }, z.core.$strip>;
1570
- export declare const conversationsReplayTranscriptRequestSchema: z.ZodObject<{
1570
+ export declare const conversationReplayJobStatusSchema: z.ZodEnum<{
1571
+ failed: "failed";
1572
+ queued: "queued";
1573
+ running: "running";
1574
+ completed: "completed";
1575
+ cancelled: "cancelled";
1576
+ }>;
1577
+ export declare const conversationReplayJobErrorSchema: z.ZodObject<{
1578
+ code: z.ZodString;
1579
+ message: z.ZodString;
1580
+ details: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1581
+ }, z.core.$strip>;
1582
+ export declare const conversationReplayJobSummarySchema: z.ZodObject<{
1583
+ replayJobId: z.ZodString;
1584
+ status: z.ZodEnum<{
1585
+ failed: "failed";
1586
+ queued: "queued";
1587
+ running: "running";
1588
+ completed: "completed";
1589
+ cancelled: "cancelled";
1590
+ }>;
1591
+ businessProfileSlug: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1592
+ referenceTranscriptId: z.ZodString;
1593
+ familyId: z.ZodString;
1594
+ referenceConversationId: z.ZodString;
1595
+ workflowRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1596
+ conversationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1597
+ channelKind: z.ZodEnum<{
1598
+ telegram: "telegram";
1599
+ telegram_business: "telegram_business";
1600
+ local_playground: "local_playground";
1601
+ web_chat: "web_chat";
1602
+ manual: "manual";
1603
+ }>;
1604
+ channelAccountId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1605
+ conversationThreadRef: z.ZodString;
1606
+ externalUserId: z.ZodString;
1607
+ displayName: z.ZodString;
1608
+ totalBursts: z.ZodNumber;
1609
+ completedBursts: z.ZodNumber;
1610
+ replayedCustomerTurnCount: z.ZodNumber;
1611
+ generatedCompanyTurnCount: z.ZodNumber;
1612
+ lastError: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1613
+ code: z.ZodString;
1614
+ message: z.ZodString;
1615
+ details: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1616
+ }, z.core.$strip>>>;
1617
+ createdAt: z.ZodString;
1618
+ startedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1619
+ updatedAt: z.ZodString;
1620
+ completedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1621
+ cancelledAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1622
+ }, z.core.$strip>;
1623
+ export declare const conversationReplayJobRecordSchema: z.ZodObject<{
1624
+ replayJobId: z.ZodString;
1625
+ status: z.ZodEnum<{
1626
+ failed: "failed";
1627
+ queued: "queued";
1628
+ running: "running";
1629
+ completed: "completed";
1630
+ cancelled: "cancelled";
1631
+ }>;
1632
+ businessProfileSlug: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1633
+ referenceTranscriptId: z.ZodString;
1634
+ familyId: z.ZodString;
1635
+ referenceConversationId: z.ZodString;
1636
+ workflowRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1637
+ conversationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1638
+ channelKind: z.ZodEnum<{
1639
+ telegram: "telegram";
1640
+ telegram_business: "telegram_business";
1641
+ local_playground: "local_playground";
1642
+ web_chat: "web_chat";
1643
+ manual: "manual";
1644
+ }>;
1645
+ channelAccountId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1646
+ conversationThreadRef: z.ZodString;
1647
+ externalUserId: z.ZodString;
1648
+ displayName: z.ZodString;
1649
+ totalBursts: z.ZodNumber;
1650
+ completedBursts: z.ZodNumber;
1651
+ replayedCustomerTurnCount: z.ZodNumber;
1652
+ generatedCompanyTurnCount: z.ZodNumber;
1653
+ lastError: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1654
+ code: z.ZodString;
1655
+ message: z.ZodString;
1656
+ details: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1657
+ }, z.core.$strip>>>;
1658
+ createdAt: z.ZodString;
1659
+ startedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1660
+ updatedAt: z.ZodString;
1661
+ completedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1662
+ cancelledAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1571
1663
  transcript: z.ZodObject<{
1572
1664
  schema_version: z.ZodLiteral<1>;
1573
1665
  kind: z.ZodLiteral<"sa_conversation">;
@@ -1718,512 +1810,262 @@ export declare const conversationsReplayTranscriptRequestSchema: z.ZodObject<{
1718
1810
  imported_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1719
1811
  }, z.core.$strip>>;
1720
1812
  }, z.core.$strip>;
1721
- businessProfileSlug: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1722
- channelKind: z.ZodDefault<z.ZodEnum<{
1723
- telegram: "telegram";
1724
- telegram_business: "telegram_business";
1725
- local_playground: "local_playground";
1726
- web_chat: "web_chat";
1727
- manual: "manual";
1728
- }>>;
1729
- channelAccountId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1730
- conversationThreadRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1731
- externalUserId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1732
- displayName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1733
1813
  }, z.core.$strip>;
1734
- export declare const conversationsReplayTranscriptResponseSchema: z.ZodObject<{
1735
- context: z.ZodObject<{
1814
+ export declare const conversationsReplayTranscriptRequestSchema: z.ZodObject<{
1815
+ transcript: z.ZodObject<{
1816
+ schema_version: z.ZodLiteral<1>;
1817
+ kind: z.ZodLiteral<"sa_conversation">;
1818
+ business_slug: z.ZodString;
1819
+ profile_version: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1736
1820
  conversation: z.ZodObject<{
1737
1821
  conversationId: z.ZodString;
1738
- customerId: z.ZodString;
1739
- status: z.ZodEnum<{
1740
- active: "active";
1741
- paused: "paused";
1742
- handed_off: "handed_off";
1743
- archived: "archived";
1744
- }>;
1745
- channelKind: z.ZodEnum<{
1746
- telegram: "telegram";
1747
- telegram_business: "telegram_business";
1748
- local_playground: "local_playground";
1749
- web_chat: "web_chat";
1750
- manual: "manual";
1751
- }>;
1752
- channelThreadRef: z.ZodString;
1753
- ownershipMode: z.ZodEnum<{
1754
- ai: "ai";
1755
- human: "human";
1756
- hybrid: "hybrid";
1757
- }>;
1758
- assistMode: z.ZodEnum<{
1759
- off: "off";
1760
- draft_only: "draft_only";
1761
- review_only: "review_only";
1762
- draft_and_review: "draft_and_review";
1763
- }>;
1764
- sendMode: z.ZodEnum<{
1765
- operator_only: "operator_only";
1766
- operator_approve: "operator_approve";
1767
- ai_auto: "ai_auto";
1768
- }>;
1769
- activeDealId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1770
- activeCartId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1771
- currentSummaryId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1772
- title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1773
- businessConnection: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1774
- businessConnectionId: z.ZodString;
1775
- businessAccountUserId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1776
- userChatId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1777
- canReply: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
1778
- status: z.ZodDefault<z.ZodEnum<{
1779
- active: "active";
1780
- disabled: "disabled";
1781
- }>>;
1782
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1783
- updatedAt: z.ZodString;
1784
- }, z.core.$strip>>>;
1785
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1786
- createdAt: z.ZodString;
1787
- updatedAt: z.ZodString;
1822
+ channel: z.ZodString;
1823
+ threadRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1824
+ source: z.ZodObject<{
1825
+ type: z.ZodEnum<{
1826
+ exported_live_conversation: "exported_live_conversation";
1827
+ scenario_fixture: "scenario_fixture";
1828
+ manual_file: "manual_file";
1829
+ telegram_export_html: "telegram_export_html";
1830
+ }>;
1831
+ environment: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1832
+ exportedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1833
+ }, z.core.$strip>;
1788
1834
  }, z.core.$strip>;
1789
- messages: z.ZodArray<z.ZodObject<{
1790
- messageId: z.ZodString;
1791
- conversationId: z.ZodString;
1792
- authorKind: z.ZodEnum<{
1793
- ai: "ai";
1835
+ participants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1836
+ id: z.ZodString;
1837
+ role: z.ZodEnum<{
1794
1838
  customer: "customer";
1795
- operator: "operator";
1796
1839
  system: "system";
1840
+ company: "company";
1797
1841
  }>;
1798
- deliveryKind: z.ZodEnum<{
1799
- inbound: "inbound";
1800
- outbound: "outbound";
1842
+ actorMode: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
1843
+ hybrid: "hybrid";
1844
+ operator: "operator";
1845
+ bot: "bot";
1846
+ }>>>;
1847
+ label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1848
+ }, z.core.$strip>>>;
1849
+ turns: z.ZodDefault<z.ZodArray<z.ZodObject<{
1850
+ turnId: z.ZodString;
1851
+ actorId: z.ZodString;
1852
+ actorRole: z.ZodEnum<{
1853
+ customer: "customer";
1854
+ system: "system";
1855
+ company: "company";
1801
1856
  }>;
1802
- channelMessageRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1803
- text: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1804
- attachments: z.ZodArray<z.ZodObject<{
1805
- attachmentId: z.ZodString;
1806
- conversationId: z.ZodString;
1807
- messageId: z.ZodString;
1857
+ actorMode: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
1858
+ hybrid: "hybrid";
1859
+ operator: "operator";
1860
+ bot: "bot";
1861
+ }>>>;
1862
+ external_message_ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1863
+ reply_to_turn_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1864
+ reply_to_external_message_ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1865
+ timestamp: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1866
+ text: z.ZodString;
1867
+ attachments: z.ZodDefault<z.ZodArray<z.ZodObject<{
1808
1868
  kind: z.ZodEnum<{
1809
1869
  photo: "photo";
1810
1870
  document: "document";
1811
1871
  audio: "audio";
1812
1872
  video: "video";
1813
1873
  other: "other";
1874
+ sticker: "sticker";
1814
1875
  }>;
1815
- mimeType: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1816
- sizeBytes: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1817
- storageRef: z.ZodString;
1818
- sourceRef: z.ZodString;
1876
+ title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1877
+ description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1878
+ status: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1879
+ source_ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1880
+ storage_ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1881
+ mime_type: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1882
+ size_bytes: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1883
+ included: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
1819
1884
  metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1820
- createdAt: z.ZodString;
1821
- }, z.core.$strip>>;
1822
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1823
- createdAt: z.ZodString;
1824
- }, z.core.$strip>>;
1825
- events: z.ZodArray<z.ZodObject<{
1826
- eventId: z.ZodString;
1827
- conversationId: z.ZodString;
1828
- eventType: z.ZodEnum<{
1829
- "message.received": "message.received";
1830
- "message.sent": "message.sent";
1831
- "message.edited": "message.edited";
1832
- "message.deleted": "message.deleted";
1833
- "attachments.normalized": "attachments.normalized";
1834
- "conversation.created": "conversation.created";
1835
- "conversation.linked": "conversation.linked";
1836
- "business.connection.updated": "business.connection.updated";
1837
- "ownership.changed": "ownership.changed";
1838
- "handoff.started": "handoff.started";
1839
- "handoff.released": "handoff.released";
1840
- "operator.note.added": "operator.note.added";
1841
- "channel.outbound.skipped": "channel.outbound.skipped";
1842
- "channel.outbound.sent": "channel.outbound.sent";
1843
- "channel.outbound.failed": "channel.outbound.failed";
1844
- "followup.classified": "followup.classified";
1845
- "followup.task.scheduled": "followup.task.scheduled";
1846
- "followup.task.completed": "followup.task.completed";
1847
- "followup.task.cancelled": "followup.task.cancelled";
1848
- "runtime.decision.recorded": "runtime.decision.recorded";
1849
- "runtime.validation.blocked": "runtime.validation.blocked";
1850
- "assist.draft.generated": "assist.draft.generated";
1851
- "assist.review.generated": "assist.review.generated";
1885
+ }, z.core.$strip>>>;
1886
+ }, z.core.$strip>>>;
1887
+ context: z.ZodObject<{
1888
+ domainNote: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1889
+ stateSummary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1890
+ packedContextSummary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1891
+ historicalSummaries: z.ZodDefault<z.ZodArray<z.ZodObject<{
1892
+ summaryRef: z.ZodString;
1893
+ summaryText: z.ZodString;
1894
+ knownFacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
1895
+ productsMentioned: z.ZodDefault<z.ZodArray<z.ZodString>>;
1896
+ customerGoals: z.ZodDefault<z.ZodArray<z.ZodString>>;
1897
+ }, z.core.$strip>>>;
1898
+ traceRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
1899
+ ref: z.ZodString;
1900
+ label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1901
+ }, z.core.$strip>>>;
1902
+ }, z.core.$strip>;
1903
+ coverage: z.ZodOptional<z.ZodObject<{
1904
+ mode: z.ZodEnum<{
1905
+ full: "full";
1906
+ packed: "packed";
1907
+ excerpt: "excerpt";
1908
+ raw_full: "raw_full";
1852
1909
  }>;
1853
- title: z.ZodString;
1854
- actorKind: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
1855
- ai: "ai";
1856
- customer: "customer";
1857
- operator: "operator";
1858
- system: "system";
1859
- }>>>;
1860
- createdAt: z.ZodString;
1861
- payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1910
+ note: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1862
1911
  }, z.core.$strip>>;
1863
- timeline: z.ZodArray<z.ZodObject<{
1864
- entryId: z.ZodString;
1865
- conversationId: z.ZodString;
1866
- entryKind: z.ZodEnum<{
1867
- message: "message";
1868
- event: "event";
1869
- }>;
1870
- occurredAt: z.ZodString;
1871
- title: z.ZodString;
1872
- actorKind: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
1873
- ai: "ai";
1874
- customer: "customer";
1875
- operator: "operator";
1876
- system: "system";
1912
+ focus: z.ZodOptional<z.ZodObject<{
1913
+ customer_turn_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1914
+ company_turn_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1915
+ }, z.core.$strip>>;
1916
+ profile_provenance: z.ZodOptional<z.ZodObject<{
1917
+ version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1918
+ version_number: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1919
+ repository_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1920
+ commit_sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1921
+ }, z.core.$strip>>;
1922
+ lineage: z.ZodOptional<z.ZodObject<{
1923
+ transcript_id: z.ZodString;
1924
+ family_id: z.ZodString;
1925
+ run_kind: z.ZodDefault<z.ZodEnum<{
1926
+ reference: "reference";
1927
+ replay: "replay";
1928
+ live_export: "live_export";
1929
+ }>>;
1930
+ actor_mode: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
1931
+ hybrid: "hybrid";
1932
+ operator: "operator";
1933
+ bot: "bot";
1877
1934
  }>>>;
1878
- textPreview: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1879
- messageId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1880
- eventId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1881
- attachmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
1882
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1935
+ based_on_transcript_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1936
+ based_on_conversation_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1883
1937
  }, z.core.$strip>>;
1884
- assistArtifacts: z.ZodArray<z.ZodObject<{
1885
- artifactId: z.ZodString;
1886
- conversationId: z.ZodString;
1887
- targetEntityKind: z.ZodEnum<{
1888
- message: "message";
1889
- assist_artifact: "assist_artifact";
1890
- }>;
1891
- targetEntityId: z.ZodString;
1892
- kind: z.ZodEnum<{
1893
- reply_draft: "reply_draft";
1894
- message_review: "message_review";
1895
- }>;
1896
- status: z.ZodEnum<{
1897
- active: "active";
1898
- viewed: "viewed";
1899
- accepted: "accepted";
1900
- dismissed: "dismissed";
1901
- superseded: "superseded";
1902
- }>;
1903
- textPreview: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1904
- outputJson: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1905
- traceId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1906
- provider: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1907
- modelId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1908
- promptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1909
- promptVersion: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1910
- promptHash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1911
- attemptNumber: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1912
- createdAt: z.ZodString;
1913
- supersededAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1938
+ runtime_provenance: z.ZodOptional<z.ZodObject<{
1939
+ environment: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1940
+ api_base_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1941
+ profile_repository_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1942
+ profile_commit_sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1943
+ profile_branch_name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1944
+ profile_has_tracked_changes: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
1945
+ platform_commit_sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1946
+ catalog_commit_sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1947
+ rules_commit_sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1948
+ prompt_catalog_commit_sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1914
1949
  }, z.core.$strip>>;
1915
- decisionTraces: z.ZodDefault<z.ZodArray<z.ZodObject<{
1916
- traceId: z.ZodString;
1917
- conversationId: z.ZodString;
1918
- sourceMessageId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1919
- mode: z.ZodEnum<{
1920
- reply: "reply";
1921
- draft: "draft";
1922
- review: "review";
1923
- }>;
1924
- status: z.ZodEnum<{
1925
- applied: "applied";
1926
- blocked: "blocked";
1950
+ import_provenance: z.ZodOptional<z.ZodObject<{
1951
+ provider: z.ZodEnum<{
1952
+ telegram: "telegram";
1927
1953
  }>;
1928
- generationMode: z.ZodEnum<{
1929
- heuristic: "heuristic";
1930
- model: "model";
1954
+ format: z.ZodEnum<{
1955
+ html_export: "html_export";
1931
1956
  }>;
1932
- provider: z.ZodString;
1933
- modelId: z.ZodString;
1934
- promptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1935
- promptVersion: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1936
- promptHash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1937
- finishReason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1938
- usage: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1939
- inputTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1940
- outputTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1941
- totalTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1942
- }, z.core.$strip>>>;
1943
- latencyMs: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1944
- attemptNumber: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1945
- priorAttemptNumber: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1946
- selectedStrategyId: z.ZodString;
1947
- candidateStrategyIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
1948
- retrievedDocs: z.ZodDefault<z.ZodArray<z.ZodObject<{
1949
- docId: z.ZodString;
1950
- kind: z.ZodEnum<{
1951
- strategy: "strategy";
1952
- product: "product";
1953
- policy: "policy";
1954
- example: "example";
1955
- }>;
1956
- title: z.ZodString;
1957
- score: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1958
- }, z.core.$strip>>>;
1959
- decisionEnvelope: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1960
- reply: z.ZodObject<{
1961
- text: z.ZodString;
1962
- tone: z.ZodDefault<z.ZodEnum<{
1963
- concise: "concise";
1964
- standard: "standard";
1965
- }>>;
1966
- channelHints: z.ZodDefault<z.ZodArray<z.ZodString>>;
1967
- }, z.core.$strip>;
1968
- outboundPlan: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1969
- planId: z.ZodString;
1970
- conversationId: z.ZodString;
1971
- basedOnCustomerMessageId: z.ZodString;
1972
- kind: z.ZodEnum<{
1973
- draft_outbound_plan: "draft_outbound_plan";
1974
- final_outbound_plan: "final_outbound_plan";
1975
- }>;
1976
- steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1977
- stepId: z.ZodString;
1978
- sequence: z.ZodNumber;
1979
- type: z.ZodLiteral<"send_text">;
1980
- text: z.ZodString;
1981
- }, z.core.$strip>, z.ZodObject<{
1982
- stepId: z.ZodString;
1983
- sequence: z.ZodNumber;
1984
- type: z.ZodLiteral<"send_media">;
1985
- assetId: z.ZodString;
1986
- caption: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1987
- }, z.core.$strip>, z.ZodObject<{
1988
- stepId: z.ZodString;
1989
- sequence: z.ZodNumber;
1990
- type: z.ZodLiteral<"send_media_group">;
1991
- assetIds: z.ZodArray<z.ZodString>;
1992
- caption: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1993
- }, z.core.$strip>, z.ZodObject<{
1994
- stepId: z.ZodString;
1995
- sequence: z.ZodNumber;
1996
- type: z.ZodLiteral<"send_document">;
1997
- assetId: z.ZodString;
1998
- caption: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1999
- }, z.core.$strip>, z.ZodObject<{
2000
- stepId: z.ZodString;
2001
- sequence: z.ZodNumber;
2002
- type: z.ZodLiteral<"send_link">;
2003
- assetId: z.ZodString;
2004
- text: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2005
- }, z.core.$strip>], "type">>;
2006
- }, z.core.$strip>>>;
2007
- classification: z.ZodObject<{
2008
- primaryIntent: z.ZodString;
2009
- secondaryIntents: z.ZodDefault<z.ZodArray<z.ZodString>>;
2010
- readiness: z.ZodEnum<{
2011
- low: "low";
2012
- medium: "medium";
2013
- high: "high";
2014
- }>;
2015
- emotion: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2016
- confidence: z.ZodNumber;
2017
- riskFlags: z.ZodDefault<z.ZodArray<z.ZodString>>;
2018
- }, z.core.$strip>;
2019
- strategy: z.ZodObject<{
2020
- selectedId: z.ZodString;
2021
- candidateIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
2022
- rationaleSummary: z.ZodString;
2023
- forbiddenMoves: z.ZodDefault<z.ZodArray<z.ZodString>>;
2024
- }, z.core.$strip>;
2025
- statePatch: z.ZodDefault<z.ZodObject<{
2026
- conversation: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2027
- commercial: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2028
- memory: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2029
- }, z.core.$strip>>;
2030
- cartPatch: z.ZodOptional<z.ZodObject<{
2031
- operations: z.ZodDefault<z.ZodArray<z.ZodObject<{
2032
- type: z.ZodEnum<{
2033
- ensure_base_product: "ensure_base_product";
2034
- attach_product: "attach_product";
2035
- }>;
2036
- payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2037
- }, z.core.$strip>>>;
2038
- }, z.core.$strip>>;
2039
- actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
2040
- type: z.ZodEnum<{
2041
- none: "none";
2042
- "commerce.create_cart": "commerce.create_cart";
2043
- "commerce.sync_cart": "commerce.sync_cart";
2044
- "commerce.quote_deal": "commerce.quote_deal";
2045
- "handoff.request": "handoff.request";
2046
- "followup.schedule": "followup.schedule";
2047
- }>;
2048
- payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2049
- }, z.core.$strip>>>;
2050
- followUp: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2051
- needed: z.ZodBoolean;
2052
- class: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2053
- suggestedDelayMinutes: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2054
- }, z.core.$strip>>>;
2055
- handoff: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2056
- needed: z.ZodBoolean;
2057
- reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2058
- priority: z.ZodDefault<z.ZodEnum<{
2059
- normal: "normal";
2060
- urgent: "urgent";
2061
- }>>;
2062
- }, z.core.$strip>>>;
2063
- }, z.core.$strip>>>;
2064
- turnAnalysis: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2065
- output: z.ZodObject<{
2066
- classification: z.ZodObject<{
2067
- primaryIntent: z.ZodString;
2068
- secondaryIntents: z.ZodDefault<z.ZodArray<z.ZodString>>;
2069
- readiness: z.ZodEnum<{
2070
- low: "low";
2071
- medium: "medium";
2072
- high: "high";
2073
- }>;
2074
- emotion: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2075
- confidence: z.ZodNumber;
2076
- riskFlags: z.ZodDefault<z.ZodArray<z.ZodString>>;
2077
- }, z.core.$strip>;
2078
- strategy: z.ZodObject<{
2079
- selectedId: z.ZodString;
2080
- candidateIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
2081
- rationaleSummary: z.ZodString;
2082
- }, z.core.$strip>;
2083
- customerGoal: z.ZodString;
2084
- relevantProductCodes: z.ZodDefault<z.ZodArray<z.ZodString>>;
2085
- relevantPolicyIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
2086
- missingFacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
2087
- handoffSuggested: z.ZodObject<{
2088
- needed: z.ZodBoolean;
2089
- reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2090
- priority: z.ZodDefault<z.ZodEnum<{
2091
- normal: "normal";
2092
- urgent: "urgent";
2093
- }>>;
2094
- }, z.core.$strip>;
2095
- replyGoal: z.ZodString;
2096
- }, z.core.$strip>;
2097
- promptMeta: z.ZodObject<{
2098
- promptId: z.ZodString;
2099
- family: z.ZodString;
2100
- stage: z.ZodString;
2101
- semanticVersion: z.ZodString;
2102
- renderedHash: z.ZodString;
2103
- }, z.core.$strip>;
2104
- validationIssues: z.ZodDefault<z.ZodArray<z.ZodString>>;
2105
- generationMode: z.ZodEnum<{
2106
- heuristic: "heuristic";
2107
- model: "model";
2108
- }>;
2109
- }, z.core.$strip>>>;
2110
- decisionStage: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2111
- promptMeta: z.ZodObject<{
2112
- promptId: z.ZodString;
2113
- family: z.ZodString;
2114
- stage: z.ZodString;
2115
- semanticVersion: z.ZodString;
2116
- renderedHash: z.ZodString;
2117
- }, z.core.$strip>;
2118
- validationIssues: z.ZodDefault<z.ZodArray<z.ZodString>>;
2119
- generationMode: z.ZodEnum<{
2120
- heuristic: "heuristic";
2121
- model: "model";
2122
- }>;
2123
- protocolResponseKind: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2124
- mediaProfileVersionId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2125
- mediaProfileVersionNumber: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2126
- mediaDiscovery: z.ZodDefault<z.ZodArray<z.ZodObject<{
2127
- requestKind: z.ZodEnum<{
2128
- request_media_folders: "request_media_folders";
2129
- request_media_folder_contents: "request_media_folder_contents";
2130
- }>;
2131
- status: z.ZodEnum<{
2132
- served: "served";
2133
- rejected: "rejected";
2134
- }>;
2135
- reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2136
- topicHint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2137
- desiredKinds: z.ZodDefault<z.ZodArray<z.ZodEnum<{
2138
- document: "document";
2139
- image: "image";
2140
- link: "link";
2141
- deck: "deck";
2142
- }>>>;
2143
- folderKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2144
- requestedLimit: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2145
- returnedFolderKeys: z.ZodDefault<z.ZodArray<z.ZodString>>;
2146
- returnedAssetIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
2147
- registryVersionId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2148
- registryVersionNumber: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2149
- errorMessage: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2150
- }, z.core.$strip>>>;
2151
- }, z.core.$strip>>>;
2152
- generationAttempts: z.ZodDefault<z.ZodArray<z.ZodObject<{
2153
- stage: z.ZodEnum<{
2154
- turn_analyze: "turn_analyze";
2155
- turn_decide: "turn_decide";
2156
- review_artifact: "review_artifact";
2157
- review_message: "review_message";
2158
- }>;
2159
- attemptNumber: z.ZodNumber;
2160
- attemptKind: z.ZodEnum<{
2161
- initial: "initial";
2162
- corrective_retry: "corrective_retry";
2163
- }>;
2164
- status: z.ZodEnum<{
2165
- failed: "failed";
2166
- succeeded: "succeeded";
2167
- }>;
2168
- promptMeta: z.ZodObject<{
2169
- promptId: z.ZodString;
2170
- family: z.ZodString;
2171
- stage: z.ZodString;
2172
- semanticVersion: z.ZodString;
2173
- renderedHash: z.ZodString;
2174
- }, z.core.$strip>;
2175
- provider: z.ZodString;
2176
- modelId: z.ZodString;
2177
- finishReason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2178
- usage: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2179
- inputTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2180
- outputTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2181
- totalTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2182
- }, z.core.$strip>>>;
2183
- latencyMs: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2184
- retryContext: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2185
- priorAttemptNumber: z.ZodNumber;
2186
- errorSummary: z.ZodString;
2187
- validationIssues: z.ZodDefault<z.ZodArray<z.ZodString>>;
2188
- }, z.core.$strip>>>;
2189
- validationIssues: z.ZodDefault<z.ZodArray<z.ZodString>>;
2190
- errorSummary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2191
- }, z.core.$strip>>>;
2192
- historyPacking: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2193
- rawCharacterBudget: z.ZodNumber;
2194
- recentRawCharacterCount: z.ZodNumber;
2195
- overflowCharacterCount: z.ZodNumber;
2196
- segmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
2197
- summaryIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
2198
- }, z.core.$strip>>>;
2199
- reviewOutput: z.ZodDefault<z.ZodNullable<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
2200
- validationIssues: z.ZodDefault<z.ZodArray<z.ZodString>>;
2201
- actionOutcomes: z.ZodDefault<z.ZodArray<z.ZodObject<{
2202
- actionType: z.ZodEnum<{
2203
- none: "none";
2204
- "commerce.create_cart": "commerce.create_cart";
2205
- "commerce.sync_cart": "commerce.sync_cart";
2206
- "commerce.quote_deal": "commerce.quote_deal";
2207
- "handoff.request": "handoff.request";
2208
- "followup.schedule": "followup.schedule";
2209
- }>;
2210
- status: z.ZodEnum<{
2211
- skipped: "skipped";
2212
- blocked: "blocked";
2213
- executed: "executed";
2214
- }>;
2215
- summary: z.ZodString;
2216
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2217
- }, z.core.$strip>>>;
2218
- createdAt: z.ZodString;
1957
+ dataset_id: z.ZodString;
1958
+ dataset_label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1959
+ chat_folder: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1960
+ source_relative_path: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1961
+ chat_title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1962
+ imported_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1963
+ }, z.core.$strip>>;
1964
+ }, z.core.$strip>;
1965
+ businessProfileSlug: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1966
+ channelKind: z.ZodDefault<z.ZodEnum<{
1967
+ telegram: "telegram";
1968
+ telegram_business: "telegram_business";
1969
+ local_playground: "local_playground";
1970
+ web_chat: "web_chat";
1971
+ manual: "manual";
1972
+ }>>;
1973
+ channelAccountId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1974
+ conversationThreadRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1975
+ externalUserId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1976
+ displayName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1977
+ }, z.core.$strip>;
1978
+ export declare const conversationsReplayTranscriptResponseSchema: z.ZodObject<{
1979
+ job: z.ZodObject<{
1980
+ replayJobId: z.ZodString;
1981
+ status: z.ZodEnum<{
1982
+ failed: "failed";
1983
+ queued: "queued";
1984
+ running: "running";
1985
+ completed: "completed";
1986
+ cancelled: "cancelled";
1987
+ }>;
1988
+ businessProfileSlug: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1989
+ referenceTranscriptId: z.ZodString;
1990
+ familyId: z.ZodString;
1991
+ referenceConversationId: z.ZodString;
1992
+ workflowRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1993
+ conversationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1994
+ channelKind: z.ZodEnum<{
1995
+ telegram: "telegram";
1996
+ telegram_business: "telegram_business";
1997
+ local_playground: "local_playground";
1998
+ web_chat: "web_chat";
1999
+ manual: "manual";
2000
+ }>;
2001
+ channelAccountId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2002
+ conversationThreadRef: z.ZodString;
2003
+ externalUserId: z.ZodString;
2004
+ displayName: z.ZodString;
2005
+ totalBursts: z.ZodNumber;
2006
+ completedBursts: z.ZodNumber;
2007
+ replayedCustomerTurnCount: z.ZodNumber;
2008
+ generatedCompanyTurnCount: z.ZodNumber;
2009
+ lastError: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2010
+ code: z.ZodString;
2011
+ message: z.ZodString;
2012
+ details: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2219
2013
  }, z.core.$strip>>>;
2014
+ createdAt: z.ZodString;
2015
+ startedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2016
+ updatedAt: z.ZodString;
2017
+ completedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2018
+ cancelledAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2220
2019
  }, z.core.$strip>;
2221
- replayedCustomerTurns: z.ZodNumber;
2222
- generatedCompanyTurns: z.ZodNumber;
2223
- referenceTranscriptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2224
- referenceConversationId: z.ZodString;
2020
+ }, z.core.$strip>;
2021
+ export declare const conversationsGetReplayJobRequestSchema: z.ZodObject<{
2022
+ replayJobId: z.ZodString;
2225
2023
  businessProfileSlug: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2226
2024
  }, z.core.$strip>;
2025
+ export declare const conversationsGetReplayJobResponseSchema: z.ZodObject<{
2026
+ found: z.ZodBoolean;
2027
+ job: z.ZodNullable<z.ZodObject<{
2028
+ replayJobId: z.ZodString;
2029
+ status: z.ZodEnum<{
2030
+ failed: "failed";
2031
+ queued: "queued";
2032
+ running: "running";
2033
+ completed: "completed";
2034
+ cancelled: "cancelled";
2035
+ }>;
2036
+ businessProfileSlug: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2037
+ referenceTranscriptId: z.ZodString;
2038
+ familyId: z.ZodString;
2039
+ referenceConversationId: z.ZodString;
2040
+ workflowRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2041
+ conversationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2042
+ channelKind: z.ZodEnum<{
2043
+ telegram: "telegram";
2044
+ telegram_business: "telegram_business";
2045
+ local_playground: "local_playground";
2046
+ web_chat: "web_chat";
2047
+ manual: "manual";
2048
+ }>;
2049
+ channelAccountId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2050
+ conversationThreadRef: z.ZodString;
2051
+ externalUserId: z.ZodString;
2052
+ displayName: z.ZodString;
2053
+ totalBursts: z.ZodNumber;
2054
+ completedBursts: z.ZodNumber;
2055
+ replayedCustomerTurnCount: z.ZodNumber;
2056
+ generatedCompanyTurnCount: z.ZodNumber;
2057
+ lastError: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2058
+ code: z.ZodString;
2059
+ message: z.ZodString;
2060
+ details: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2061
+ }, z.core.$strip>>>;
2062
+ createdAt: z.ZodString;
2063
+ startedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2064
+ updatedAt: z.ZodString;
2065
+ completedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2066
+ cancelledAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2067
+ }, z.core.$strip>>;
2068
+ }, z.core.$strip>;
2227
2069
  export declare const conversationsGetContextRequestSchema: z.ZodObject<{
2228
2070
  conversationId: z.ZodOptional<z.ZodString>;
2229
2071
  channelKind: z.ZodOptional<z.ZodEnum<{
@@ -2842,4 +2684,10 @@ export type ConversationsListTimelineInput = z.infer<typeof conversationsListTim
2842
2684
  export type ConversationsListTimelineOutput = z.infer<typeof conversationsListTimelineResponseSchema>;
2843
2685
  export type ConversationsReplayTranscriptInput = z.infer<typeof conversationsReplayTranscriptRequestSchema>;
2844
2686
  export type ConversationsReplayTranscriptOutput = z.infer<typeof conversationsReplayTranscriptResponseSchema>;
2687
+ export type ConversationReplayJobStatus = z.infer<typeof conversationReplayJobStatusSchema>;
2688
+ export type ConversationReplayJobError = z.infer<typeof conversationReplayJobErrorSchema>;
2689
+ export type ConversationReplayJobSummary = z.infer<typeof conversationReplayJobSummarySchema>;
2690
+ export type ConversationReplayJobRecord = z.infer<typeof conversationReplayJobRecordSchema>;
2691
+ export type ConversationsGetReplayJobInput = z.infer<typeof conversationsGetReplayJobRequestSchema>;
2692
+ export type ConversationsGetReplayJobOutput = z.infer<typeof conversationsGetReplayJobResponseSchema>;
2845
2693
  //# sourceMappingURL=conversations.d.ts.map