@soat/sdk 0.1.1 → 0.3.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.
package/dist/index.d.ts CHANGED
@@ -233,6 +233,58 @@ interface paths {
233
233
  patch?: never;
234
234
  trace?: never;
235
235
  };
236
+ "/ai-providers": {
237
+ parameters: {
238
+ query?: never;
239
+ header?: never;
240
+ path?: never;
241
+ cookie?: never;
242
+ };
243
+ /**
244
+ * List AI providers
245
+ * @description Returns a list of AI provider configurations for a project
246
+ */
247
+ get: operations["listAiProviders"];
248
+ put?: never;
249
+ /**
250
+ * Create an AI provider
251
+ * @description Creates a new LLM provider configuration
252
+ */
253
+ post: operations["createAiProvider"];
254
+ delete?: never;
255
+ options?: never;
256
+ head?: never;
257
+ patch?: never;
258
+ trace?: never;
259
+ };
260
+ "/ai-providers/{aiProviderId}": {
261
+ parameters: {
262
+ query?: never;
263
+ header?: never;
264
+ path?: never;
265
+ cookie?: never;
266
+ };
267
+ /**
268
+ * Get an AI provider
269
+ * @description Returns a specific AI provider configuration
270
+ */
271
+ get: operations["getAiProvider"];
272
+ put?: never;
273
+ post?: never;
274
+ /**
275
+ * Delete an AI provider
276
+ * @description Deletes an AI provider configuration
277
+ */
278
+ delete: operations["deleteAiProvider"];
279
+ options?: never;
280
+ head?: never;
281
+ /**
282
+ * Update an AI provider
283
+ * @description Updates an AI provider configuration
284
+ */
285
+ patch: operations["updateAiProvider"];
286
+ trace?: never;
287
+ };
236
288
  "/chats": {
237
289
  parameters: {
238
290
  query?: never;
@@ -636,6 +688,318 @@ interface paths {
636
688
  patch: operations["updateFileMetadata"];
637
689
  trace?: never;
638
690
  };
691
+ "/project-keys": {
692
+ parameters: {
693
+ query?: never;
694
+ header?: never;
695
+ path?: never;
696
+ cookie?: never;
697
+ };
698
+ get?: never;
699
+ put?: never;
700
+ /**
701
+ * Create a project key
702
+ * @description Creates a new API key for programmatic access to a project
703
+ */
704
+ post: operations["createProjectKey"];
705
+ delete?: never;
706
+ options?: never;
707
+ head?: never;
708
+ patch?: never;
709
+ trace?: never;
710
+ };
711
+ "/project-keys/{id}": {
712
+ parameters: {
713
+ query?: never;
714
+ header?: never;
715
+ path?: never;
716
+ cookie?: never;
717
+ };
718
+ /**
719
+ * Get a project key
720
+ * @description Returns details of a project key
721
+ */
722
+ get: operations["getProjectKey"];
723
+ /**
724
+ * Update a project key
725
+ * @description Updates an existing project key's policy
726
+ */
727
+ put: operations["updateProjectKey"];
728
+ post?: never;
729
+ /**
730
+ * Delete a project key
731
+ * @description Deletes a project key
732
+ */
733
+ delete: operations["deleteProjectKey"];
734
+ options?: never;
735
+ head?: never;
736
+ patch?: never;
737
+ trace?: never;
738
+ };
739
+ "/projects": {
740
+ parameters: {
741
+ query?: never;
742
+ header?: never;
743
+ path?: never;
744
+ cookie?: never;
745
+ };
746
+ get?: never;
747
+ put?: never;
748
+ /**
749
+ * Create a project
750
+ * @description Creates a new project. Requires admin role.
751
+ */
752
+ post: operations["createProject"];
753
+ delete?: never;
754
+ options?: never;
755
+ head?: never;
756
+ patch?: never;
757
+ trace?: never;
758
+ };
759
+ "/projects/{projectId}/policies": {
760
+ parameters: {
761
+ query?: never;
762
+ header?: never;
763
+ path?: never;
764
+ cookie?: never;
765
+ };
766
+ /**
767
+ * List project policies
768
+ * @description Returns a list of policies for a project
769
+ */
770
+ get: operations["listProjectPolicies"];
771
+ put?: never;
772
+ /**
773
+ * Create a project policy
774
+ * @description Creates a new policy for a project. Requires admin role.
775
+ */
776
+ post: operations["createProjectPolicy"];
777
+ delete?: never;
778
+ options?: never;
779
+ head?: never;
780
+ patch?: never;
781
+ trace?: never;
782
+ };
783
+ "/projects/{projectId}/policies/{policyId}": {
784
+ parameters: {
785
+ query?: never;
786
+ header?: never;
787
+ path?: never;
788
+ cookie?: never;
789
+ };
790
+ /**
791
+ * Get a project policy
792
+ * @description Returns a specific policy
793
+ */
794
+ get: operations["getProjectPolicy"];
795
+ /**
796
+ * Update a project policy
797
+ * @description Updates an existing policy. Requires admin role.
798
+ */
799
+ put: operations["updateProjectPolicy"];
800
+ post?: never;
801
+ delete?: never;
802
+ options?: never;
803
+ head?: never;
804
+ patch?: never;
805
+ trace?: never;
806
+ };
807
+ "/secrets": {
808
+ parameters: {
809
+ query?: never;
810
+ header?: never;
811
+ path?: never;
812
+ cookie?: never;
813
+ };
814
+ /**
815
+ * List secrets
816
+ * @description Returns a list of secrets for a project
817
+ */
818
+ get: operations["listSecrets"];
819
+ put?: never;
820
+ /**
821
+ * Create a secret
822
+ * @description Creates a new encrypted secret in a project
823
+ */
824
+ post: operations["createSecret"];
825
+ delete?: never;
826
+ options?: never;
827
+ head?: never;
828
+ patch?: never;
829
+ trace?: never;
830
+ };
831
+ "/secrets/{secretId}": {
832
+ parameters: {
833
+ query?: never;
834
+ header?: never;
835
+ path?: never;
836
+ cookie?: never;
837
+ };
838
+ /**
839
+ * Get a secret
840
+ * @description Returns a specific secret
841
+ */
842
+ get: operations["getSecret"];
843
+ put?: never;
844
+ post?: never;
845
+ /**
846
+ * Delete a secret
847
+ * @description Deletes a secret
848
+ */
849
+ delete: operations["deleteSecret"];
850
+ options?: never;
851
+ head?: never;
852
+ /**
853
+ * Update a secret
854
+ * @description Updates a secret's name and/or value
855
+ */
856
+ patch: operations["updateSecret"];
857
+ trace?: never;
858
+ };
859
+ "/agents/{agentId}/sessions": {
860
+ parameters: {
861
+ query?: never;
862
+ header?: never;
863
+ path?: never;
864
+ cookie?: never;
865
+ };
866
+ /**
867
+ * List sessions
868
+ * @description Returns sessions for the specified agent, optionally filtered by actorId and status.
869
+ */
870
+ get: operations["listSessions"];
871
+ put?: never;
872
+ /**
873
+ * Create a session
874
+ * @description Creates a new session for the specified agent. Internally creates a conversation and two actors (agent + user) so the caller only needs this single call to start interacting with the agent.
875
+ */
876
+ post: operations["createSession"];
877
+ delete?: never;
878
+ options?: never;
879
+ head?: never;
880
+ patch?: never;
881
+ trace?: never;
882
+ };
883
+ "/agents/{agentId}/sessions/{sessionId}": {
884
+ parameters: {
885
+ query?: never;
886
+ header?: never;
887
+ path?: never;
888
+ cookie?: never;
889
+ };
890
+ /**
891
+ * Get a session
892
+ * @description Returns details of a single session.
893
+ */
894
+ get: operations["getSession"];
895
+ put?: never;
896
+ post?: never;
897
+ /**
898
+ * Delete a session
899
+ * @description Deletes the session and its underlying conversation and actors.
900
+ */
901
+ delete: operations["deleteSession"];
902
+ options?: never;
903
+ head?: never;
904
+ /**
905
+ * Update a session
906
+ * @description Updates the session name and/or status.
907
+ */
908
+ patch: operations["updateSession"];
909
+ trace?: never;
910
+ };
911
+ "/agents/{agentId}/sessions/{sessionId}/messages": {
912
+ parameters: {
913
+ query?: never;
914
+ header?: never;
915
+ path?: never;
916
+ cookie?: never;
917
+ };
918
+ /**
919
+ * List session messages
920
+ * @description Returns messages in the session with simplified roles (user/assistant) instead of raw actor IDs.
921
+ */
922
+ get: operations["listSessionMessages"];
923
+ put?: never;
924
+ /**
925
+ * Add a user message
926
+ * @description Saves a user message to the session. When autoGenerate is enabled on the session and no generation is currently in progress, generation is triggered automatically and the response mirrors GenerateSessionResponse. Otherwise returns the saved user message.
927
+ */
928
+ post: operations["addSessionMessage"];
929
+ delete?: never;
930
+ options?: never;
931
+ head?: never;
932
+ patch?: never;
933
+ trace?: never;
934
+ };
935
+ "/agents/{agentId}/sessions/{sessionId}/generate": {
936
+ parameters: {
937
+ query?: never;
938
+ header?: never;
939
+ path?: never;
940
+ cookie?: never;
941
+ };
942
+ get?: never;
943
+ put?: never;
944
+ /**
945
+ * Trigger agent generation
946
+ * @description Triggers the agent to generate a response based on the current conversation. Returns the assistant reply or a requires_action status if the agent needs client tool outputs. Pass ?async=true for a 202 accepted response when you do not need to wait for the result.
947
+ */
948
+ post: operations["generateSessionResponse"];
949
+ delete?: never;
950
+ options?: never;
951
+ head?: never;
952
+ patch?: never;
953
+ trace?: never;
954
+ };
955
+ "/agents/{agentId}/sessions/{sessionId}/tool-outputs": {
956
+ parameters: {
957
+ query?: never;
958
+ header?: never;
959
+ path?: never;
960
+ cookie?: never;
961
+ };
962
+ get?: never;
963
+ put?: never;
964
+ /**
965
+ * Submit tool outputs
966
+ * @description Submits client tool outputs for a generation that returned requires_action. The agent continues its loop and returns the final or next requires_action result.
967
+ */
968
+ post: operations["submitSessionToolOutputs"];
969
+ delete?: never;
970
+ options?: never;
971
+ head?: never;
972
+ patch?: never;
973
+ trace?: never;
974
+ };
975
+ "/agents/{agentId}/sessions/{sessionId}/tags": {
976
+ parameters: {
977
+ query?: never;
978
+ header?: never;
979
+ path?: never;
980
+ cookie?: never;
981
+ };
982
+ /**
983
+ * Get session tags
984
+ * @description Returns the session's tags object.
985
+ */
986
+ get: operations["getSessionTags"];
987
+ /**
988
+ * Replace session tags
989
+ * @description Replaces all tags on the session.
990
+ */
991
+ put: operations["replaceSessionTags"];
992
+ post?: never;
993
+ delete?: never;
994
+ options?: never;
995
+ head?: never;
996
+ /**
997
+ * Merge session tags
998
+ * @description Merges the provided tags into the session's existing tags.
999
+ */
1000
+ patch: operations["mergeSessionTags"];
1001
+ trace?: never;
1002
+ };
639
1003
  "/users": {
640
1004
  parameters: {
641
1005
  query?: never;
@@ -700,6 +1064,94 @@ interface paths {
700
1064
  patch?: never;
701
1065
  trace?: never;
702
1066
  };
1067
+ "/projects/{projectId}/webhooks": {
1068
+ parameters: {
1069
+ query?: never;
1070
+ header?: never;
1071
+ path?: never;
1072
+ cookie?: never;
1073
+ };
1074
+ /** List webhooks for a project */
1075
+ get: operations["listWebhooks"];
1076
+ put?: never;
1077
+ /** Create a webhook */
1078
+ post: operations["createWebhook"];
1079
+ delete?: never;
1080
+ options?: never;
1081
+ head?: never;
1082
+ patch?: never;
1083
+ trace?: never;
1084
+ };
1085
+ "/projects/{projectId}/webhooks/{webhookId}": {
1086
+ parameters: {
1087
+ query?: never;
1088
+ header?: never;
1089
+ path?: never;
1090
+ cookie?: never;
1091
+ };
1092
+ /** Get a webhook */
1093
+ get: operations["getWebhook"];
1094
+ /** Update a webhook */
1095
+ put: operations["updateWebhook"];
1096
+ post?: never;
1097
+ /** Delete a webhook */
1098
+ delete: operations["deleteWebhook"];
1099
+ options?: never;
1100
+ head?: never;
1101
+ patch?: never;
1102
+ trace?: never;
1103
+ };
1104
+ "/projects/{projectId}/webhooks/{webhookId}/deliveries": {
1105
+ parameters: {
1106
+ query?: never;
1107
+ header?: never;
1108
+ path?: never;
1109
+ cookie?: never;
1110
+ };
1111
+ /** List deliveries for a webhook */
1112
+ get: operations["listWebhookDeliveries"];
1113
+ put?: never;
1114
+ post?: never;
1115
+ delete?: never;
1116
+ options?: never;
1117
+ head?: never;
1118
+ patch?: never;
1119
+ trace?: never;
1120
+ };
1121
+ "/projects/{projectId}/webhooks/{webhookId}/deliveries/{deliveryId}": {
1122
+ parameters: {
1123
+ query?: never;
1124
+ header?: never;
1125
+ path?: never;
1126
+ cookie?: never;
1127
+ };
1128
+ /** Get a delivery */
1129
+ get: operations["getWebhookDelivery"];
1130
+ put?: never;
1131
+ post?: never;
1132
+ delete?: never;
1133
+ options?: never;
1134
+ head?: never;
1135
+ patch?: never;
1136
+ trace?: never;
1137
+ };
1138
+ "/projects/{projectId}/webhooks/{webhookId}/rotate-secret": {
1139
+ parameters: {
1140
+ query?: never;
1141
+ header?: never;
1142
+ path?: never;
1143
+ cookie?: never;
1144
+ };
1145
+ get?: never;
1146
+ put?: never;
1147
+ /** Rotate webhook secret */
1148
+ post: operations["rotateWebhookSecret"];
1149
+ delete?: never;
1150
+ options?: never;
1151
+ head?: never;
1152
+ patch?: never;
1153
+ trace?: never;
1154
+ };
703
1155
  }
704
1156
  interface components {
705
1157
  schemas: {
@@ -899,6 +1351,10 @@ interface components {
899
1351
  * @default 10
900
1352
  */
901
1353
  maxCallDepth: number;
1354
+ /** @description Key-value pairs injected as context headers into all tool call requests made during this generation. */
1355
+ toolContext?: {
1356
+ [key: string]: string;
1357
+ } | null;
902
1358
  };
903
1359
  SubmitToolOutputsRequest: {
904
1360
  toolOutputs: {
@@ -1114,6 +1570,11 @@ interface components {
1114
1570
  * @description Last update timestamp
1115
1571
  */
1116
1572
  updatedAt?: string;
1573
+ /**
1574
+ * @description Actor ID associated with this conversation
1575
+ * @example act_V1StGXR8Z5jdHi6B
1576
+ */
1577
+ actorId?: string | null;
1117
1578
  };
1118
1579
  ConversationMessageRecord: {
1119
1580
  /**
@@ -1131,6 +1592,18 @@ interface components {
1131
1592
  * @example 0
1132
1593
  */
1133
1594
  position?: number;
1595
+ /**
1596
+ * @description Optional structured metadata attached to the message
1597
+ * @example {
1598
+ * "phone": "5511999998888",
1599
+ * "channel": "whatsapp"
1600
+ * }
1601
+ */
1602
+ metadata?: {
1603
+ [key: string]: unknown;
1604
+ } | null;
1605
+ /** @description Full text content of the message */
1606
+ content?: string | null;
1134
1607
  };
1135
1608
  ConversationActorRecord: {
1136
1609
  /**
@@ -1169,6 +1642,52 @@ interface components {
1169
1642
  */
1170
1643
  updatedAt?: string;
1171
1644
  };
1645
+ GenerateConversationMessageResponse: {
1646
+ /**
1647
+ * @description Indicates generation finished successfully.
1648
+ * @enum {string}
1649
+ */
1650
+ status: "completed";
1651
+ /**
1652
+ * @description The AI-generated text of the reply. This is the canonical field for the assistant's response text.
1653
+ * @example Hello! How can I help you today?
1654
+ */
1655
+ content: string;
1656
+ message: components["schemas"]["ConversationMessageRecord"];
1657
+ /**
1658
+ * @description ID of the underlying generation record.
1659
+ * @example gen_V1StGXR8Z5jdHi6B
1660
+ */
1661
+ generationId: string;
1662
+ /**
1663
+ * @description Trace ID for observability.
1664
+ * @example trc_V1StGXR8Z5jdHi6B
1665
+ */
1666
+ traceId: string;
1667
+ /**
1668
+ * @description Model used for generation.
1669
+ * @example gpt-4o
1670
+ */
1671
+ model?: string;
1672
+ } | {
1673
+ /**
1674
+ * @description Indicates the agent requires tool-call outputs before it can produce a reply. No message is persisted yet.
1675
+ * @enum {string}
1676
+ */
1677
+ status: "requires_action";
1678
+ /**
1679
+ * @description ID of the paused generation. Pass to the tool-outputs endpoint.
1680
+ * @example gen_V1StGXR8Z5jdHi6B
1681
+ */
1682
+ generationId: string;
1683
+ /**
1684
+ * @description Trace ID for observability.
1685
+ * @example trc_V1StGXR8Z5jdHi6B
1686
+ */
1687
+ traceId: string;
1688
+ /** @description Tool-call information the client must resolve. */
1689
+ requiredAction: Record<string, never>;
1690
+ };
1172
1691
  DocumentRecord: {
1173
1692
  /**
1174
1693
  * @description Document ID
@@ -1254,6 +1773,186 @@ interface components {
1254
1773
  */
1255
1774
  updatedAt?: string;
1256
1775
  };
1776
+ SessionRecord: {
1777
+ /**
1778
+ * @description Session public ID
1779
+ * @example sess_V1StGXR8Z5jdHi6B
1780
+ */
1781
+ id?: string;
1782
+ /**
1783
+ * @description Agent public ID
1784
+ * @example agt_V1StGXR8Z5jdHi6B
1785
+ */
1786
+ agentId?: string;
1787
+ /**
1788
+ * @description Underlying conversation public ID
1789
+ * @example conv_V1StGXR8Z5jdHi6B
1790
+ */
1791
+ conversationId?: string;
1792
+ /**
1793
+ * @example open
1794
+ * @enum {string}
1795
+ */
1796
+ status?: "open" | "closed";
1797
+ /** @example Support chat */
1798
+ name?: string | null;
1799
+ /**
1800
+ * @description Public ID of the user actor
1801
+ * @example actr_V1StGXR8Z5jdHi6B
1802
+ */
1803
+ actorId?: string | null;
1804
+ tags?: {
1805
+ [key: string]: string;
1806
+ };
1807
+ /**
1808
+ * @description When true, automatically triggers generation after each user message (if no generation is in progress).
1809
+ * @default false
1810
+ */
1811
+ autoGenerate: boolean;
1812
+ /**
1813
+ * Format: date-time
1814
+ * @description Timestamp when the current generation started, or null if not generating.
1815
+ */
1816
+ generatingAt?: string | null;
1817
+ /** Format: date-time */
1818
+ createdAt?: string;
1819
+ /** Format: date-time */
1820
+ updatedAt?: string;
1821
+ /** @description Key-value pairs injected as context headers into all tool call requests made during this session. */
1822
+ toolContext?: {
1823
+ [key: string]: string;
1824
+ } | null;
1825
+ };
1826
+ SessionMessage: {
1827
+ /** @enum {string} */
1828
+ role?: "user" | "assistant" | "unknown";
1829
+ content?: string;
1830
+ documentId?: string | null;
1831
+ position?: number;
1832
+ metadata?: Record<string, never> | null;
1833
+ };
1834
+ CreateSessionRequest: {
1835
+ /**
1836
+ * @description Optional session name
1837
+ * @example Support chat
1838
+ */
1839
+ name?: string;
1840
+ /**
1841
+ * @description Optional public ID of an existing actor to use as the user actor
1842
+ * @example actr_V1StGXR8Z5jdHi6B
1843
+ */
1844
+ actorId?: string;
1845
+ /**
1846
+ * @description When true, automatically triggers generation after each user message.
1847
+ * @default false
1848
+ */
1849
+ autoGenerate: boolean;
1850
+ /** @description Key-value pairs injected as context headers into all tool call requests made during this session. */
1851
+ toolContext?: {
1852
+ [key: string]: string;
1853
+ } | null;
1854
+ };
1855
+ UpdateSessionRequest: {
1856
+ /** @description Session name (set to null to clear) */
1857
+ name?: string | null;
1858
+ /**
1859
+ * @description Session status
1860
+ * @enum {string}
1861
+ */
1862
+ status?: "open" | "closed";
1863
+ /** @description Enable or disable automatic generation after user messages. */
1864
+ autoGenerate?: boolean;
1865
+ /** @description Key-value pairs injected as context headers into all tool call requests made during this session. */
1866
+ toolContext?: {
1867
+ [key: string]: string;
1868
+ } | null;
1869
+ };
1870
+ AddSessionMessageRequest: {
1871
+ /**
1872
+ * @description User message text
1873
+ * @example Hello, how can I deploy my app?
1874
+ */
1875
+ message: string;
1876
+ /** @description Key-value pairs injected as context headers into all tool call requests made during this generation. */
1877
+ toolContext?: {
1878
+ [key: string]: string;
1879
+ } | null;
1880
+ };
1881
+ AddSessionMessageResponse: {
1882
+ /** @enum {string} */
1883
+ role?: "user";
1884
+ content?: string;
1885
+ } | components["schemas"]["GenerateSessionResponse"];
1886
+ GenerateSessionRequest: {
1887
+ /**
1888
+ * @description Optional model override
1889
+ * @example gpt-4o
1890
+ */
1891
+ model?: string;
1892
+ /** @description Key-value pairs injected as context headers into all tool call requests made during this generation. */
1893
+ toolContext?: {
1894
+ [key: string]: string;
1895
+ } | null;
1896
+ };
1897
+ GenerateSessionResponse: {
1898
+ /** @enum {string} */
1899
+ status?: "completed" | "requires_action";
1900
+ message?: {
1901
+ role?: string;
1902
+ content?: string;
1903
+ model?: string;
1904
+ };
1905
+ generationId?: string;
1906
+ traceId?: string;
1907
+ /** @description Present when status is requires_action */
1908
+ requiredAction?: {
1909
+ toolCalls?: {
1910
+ id?: string;
1911
+ name?: string;
1912
+ arguments?: Record<string, never>;
1913
+ }[];
1914
+ };
1915
+ };
1916
+ SendSessionMessageRequest: {
1917
+ /**
1918
+ * @description User message text
1919
+ * @example Hello, how can I deploy my app?
1920
+ */
1921
+ message: string;
1922
+ /**
1923
+ * @description Optional model override
1924
+ * @example gpt-4o
1925
+ */
1926
+ model?: string;
1927
+ };
1928
+ SendSessionMessageResponse: {
1929
+ /** @enum {string} */
1930
+ status?: "completed" | "requires_action";
1931
+ message?: {
1932
+ role?: string;
1933
+ content?: string;
1934
+ model?: string;
1935
+ };
1936
+ generationId?: string;
1937
+ traceId?: string;
1938
+ /** @description Present when status is requires_action */
1939
+ requiredAction?: {
1940
+ toolCalls?: {
1941
+ id?: string;
1942
+ name?: string;
1943
+ arguments?: Record<string, never>;
1944
+ }[];
1945
+ };
1946
+ };
1947
+ SubmitSessionToolOutputsRequest: {
1948
+ /** @description The generation ID from the requires_action response */
1949
+ generationId: string;
1950
+ toolOutputs: {
1951
+ toolCallId: string;
1952
+ /** @description The tool output value */
1953
+ output: unknown;
1954
+ }[];
1955
+ };
1257
1956
  UserRecord: {
1258
1957
  /**
1259
1958
  * @description Public user ID (usr_ prefix)
@@ -1278,6 +1977,60 @@ interface components {
1278
1977
  */
1279
1978
  updatedAt?: string;
1280
1979
  };
1980
+ Webhook: {
1981
+ id?: string;
1982
+ projectId?: string;
1983
+ policyId?: string | null;
1984
+ name?: string;
1985
+ description?: string | null;
1986
+ url?: string;
1987
+ events?: string[];
1988
+ active?: boolean;
1989
+ /** Format: date-time */
1990
+ createdAt?: string;
1991
+ /** Format: date-time */
1992
+ updatedAt?: string;
1993
+ };
1994
+ WebhookWithSecret: components["schemas"]["Webhook"] & {
1995
+ secret?: string;
1996
+ };
1997
+ CreateWebhookRequest: {
1998
+ name: string;
1999
+ description?: string;
2000
+ url: string;
2001
+ events: string[];
2002
+ policyId?: string;
2003
+ };
2004
+ UpdateWebhookRequest: {
2005
+ name?: string;
2006
+ description?: string;
2007
+ url?: string;
2008
+ events?: string[];
2009
+ active?: boolean;
2010
+ policyId?: string | null;
2011
+ };
2012
+ Delivery: {
2013
+ id?: string;
2014
+ eventType?: string;
2015
+ payload?: Record<string, never>;
2016
+ /** @enum {string} */
2017
+ status?: "pending" | "success" | "failed";
2018
+ statusCode?: number | null;
2019
+ attempts?: number;
2020
+ /** Format: date-time */
2021
+ lastAttemptAt?: string | null;
2022
+ responseBody?: string | null;
2023
+ /** Format: date-time */
2024
+ createdAt?: string;
2025
+ /** Format: date-time */
2026
+ updatedAt?: string;
2027
+ };
2028
+ DeliveryListResponse: {
2029
+ data?: components["schemas"]["Delivery"][];
2030
+ total?: number;
2031
+ limit?: number;
2032
+ offset?: number;
2033
+ };
1281
2034
  };
1282
2035
  responses: {
1283
2036
  /** @description Authentication required */
@@ -1299,8 +2052,22 @@ interface components {
1299
2052
  "application/json": components["schemas"]["ErrorResponse"];
1300
2053
  };
1301
2054
  };
2055
+ /** @description Not found */
2056
+ NotFound: {
2057
+ headers: {
2058
+ [name: string]: unknown;
2059
+ };
2060
+ content: {
2061
+ "application/json": components["schemas"]["ErrorResponse"];
2062
+ };
2063
+ };
2064
+ };
2065
+ parameters: {
2066
+ /** @description Agent public ID */
2067
+ AgentId: string;
2068
+ /** @description Session public ID */
2069
+ SessionId: string;
1302
2070
  };
1303
- parameters: never;
1304
2071
  requestBodies: never;
1305
2072
  headers: never;
1306
2073
  pathItems: never;
@@ -1372,7 +2139,7 @@ interface operations {
1372
2139
  */
1373
2140
  type?: string;
1374
2141
  /**
1375
- * @description Optional external identifier (e.g. WhatsApp phone number). Must be unique within a project.
2142
+ * @description Optional external identifier (e.g. WhatsApp phone number). If provided and an actor with this externalId already exists in the project, the existing actor is returned (idempotent — 200 OK).
1376
2143
  * @example +15551234567
1377
2144
  */
1378
2145
  externalId?: string;
@@ -1380,6 +2147,15 @@ interface operations {
1380
2147
  };
1381
2148
  };
1382
2149
  responses: {
2150
+ /** @description Actor already exists — returned when externalId matches an existing actor in this project (idempotent) */
2151
+ 200: {
2152
+ headers: {
2153
+ [name: string]: unknown;
2154
+ };
2155
+ content: {
2156
+ "application/json": components["schemas"]["ActorRecord"];
2157
+ };
2158
+ };
1383
2159
  /** @description Actor created */
1384
2160
  201: {
1385
2161
  headers: {
@@ -2223,11 +2999,15 @@ interface operations {
2223
2999
  };
2224
3000
  };
2225
3001
  };
2226
- listChats: {
3002
+ listAiProviders: {
2227
3003
  parameters: {
2228
3004
  query?: {
2229
- /** @description Project public ID to filter by */
3005
+ /** @description Project ID (required if not using project key auth) */
2230
3006
  projectId?: string;
3007
+ /** @description Number of results per page */
3008
+ limit?: number;
3009
+ /** @description Number of results to skip */
3010
+ offset?: number;
2231
3011
  };
2232
3012
  header?: never;
2233
3013
  path?: never;
@@ -2235,13 +3015,22 @@ interface operations {
2235
3015
  };
2236
3016
  requestBody?: never;
2237
3017
  responses: {
2238
- /** @description List of chats */
3018
+ /** @description List of AI providers */
2239
3019
  200: {
2240
3020
  headers: {
2241
3021
  [name: string]: unknown;
2242
3022
  };
2243
3023
  content: {
2244
- "application/json": components["schemas"]["Chat"][];
3024
+ "application/json": {
3025
+ id?: string;
3026
+ name?: string;
3027
+ /** @enum {string} */
3028
+ provider?: "openai" | "anthropic" | "google" | "cohere" | "mistral";
3029
+ defaultModel?: string;
3030
+ projectId?: string;
3031
+ /** Format: date-time */
3032
+ createdAt?: string;
3033
+ }[];
2245
3034
  };
2246
3035
  };
2247
3036
  /** @description Unauthorized */
@@ -2249,22 +3038,25 @@ interface operations {
2249
3038
  headers: {
2250
3039
  [name: string]: unknown;
2251
3040
  };
2252
- content: {
2253
- "application/json": components["schemas"]["ErrorResponse"];
2254
- };
3041
+ content?: never;
2255
3042
  };
2256
3043
  /** @description Forbidden */
2257
3044
  403: {
2258
3045
  headers: {
2259
3046
  [name: string]: unknown;
2260
3047
  };
2261
- content: {
2262
- "application/json": components["schemas"]["ErrorResponse"];
3048
+ content?: never;
3049
+ };
3050
+ /** @description Internal server error */
3051
+ 500: {
3052
+ headers: {
3053
+ [name: string]: unknown;
2263
3054
  };
3055
+ content?: never;
2264
3056
  };
2265
3057
  };
2266
3058
  };
2267
- createChat: {
3059
+ createAiProvider: {
2268
3060
  parameters: {
2269
3061
  query?: never;
2270
3062
  header?: never;
@@ -2273,18 +3065,306 @@ interface operations {
2273
3065
  };
2274
3066
  requestBody: {
2275
3067
  content: {
2276
- "application/json": components["schemas"]["CreateChatRequest"];
2277
- };
2278
- };
2279
- responses: {
2280
- /** @description Chat created */
2281
- 201: {
2282
- headers: {
2283
- [name: string]: unknown;
2284
- };
2285
- content: {
2286
- "application/json": components["schemas"]["Chat"];
2287
- };
3068
+ "application/json": {
3069
+ /**
3070
+ * @description Project ID (required if not using project key auth)
3071
+ * @example proj_V1StGXR8Z5jdHi6B
3072
+ */
3073
+ projectId?: string;
3074
+ /**
3075
+ * @description Provider configuration name
3076
+ * @example OpenAI Production
3077
+ */
3078
+ name: string;
3079
+ /**
3080
+ * @description LLM provider
3081
+ * @example openai
3082
+ * @enum {string}
3083
+ */
3084
+ provider: "openai" | "anthropic" | "google" | "cohere" | "mistral";
3085
+ /**
3086
+ * @description Default model to use
3087
+ * @example gpt-4
3088
+ */
3089
+ defaultModel: string;
3090
+ /**
3091
+ * @description Secret ID containing API credentials
3092
+ * @example secret_V1StGXR8Z5jdHi6B
3093
+ */
3094
+ secretId?: string;
3095
+ /** @description Custom base URL for the provider */
3096
+ baseUrl?: string;
3097
+ /** @description Additional provider-specific configuration */
3098
+ config?: Record<string, never>;
3099
+ };
3100
+ };
3101
+ };
3102
+ responses: {
3103
+ /** @description AI provider created successfully */
3104
+ 201: {
3105
+ headers: {
3106
+ [name: string]: unknown;
3107
+ };
3108
+ content: {
3109
+ "application/json": {
3110
+ id?: string;
3111
+ name?: string;
3112
+ provider?: string;
3113
+ defaultModel?: string;
3114
+ projectId?: string;
3115
+ /** Format: date-time */
3116
+ createdAt?: string;
3117
+ };
3118
+ };
3119
+ };
3120
+ /** @description Bad request (invalid provider or missing fields) */
3121
+ 400: {
3122
+ headers: {
3123
+ [name: string]: unknown;
3124
+ };
3125
+ content?: never;
3126
+ };
3127
+ /** @description Unauthorized */
3128
+ 401: {
3129
+ headers: {
3130
+ [name: string]: unknown;
3131
+ };
3132
+ content?: never;
3133
+ };
3134
+ /** @description Forbidden */
3135
+ 403: {
3136
+ headers: {
3137
+ [name: string]: unknown;
3138
+ };
3139
+ content?: never;
3140
+ };
3141
+ /** @description Internal server error */
3142
+ 500: {
3143
+ headers: {
3144
+ [name: string]: unknown;
3145
+ };
3146
+ content?: never;
3147
+ };
3148
+ };
3149
+ };
3150
+ getAiProvider: {
3151
+ parameters: {
3152
+ query?: never;
3153
+ header?: never;
3154
+ path: {
3155
+ /** @description AI Provider ID */
3156
+ aiProviderId: string;
3157
+ };
3158
+ cookie?: never;
3159
+ };
3160
+ requestBody?: never;
3161
+ responses: {
3162
+ /** @description AI provider details */
3163
+ 200: {
3164
+ headers: {
3165
+ [name: string]: unknown;
3166
+ };
3167
+ content: {
3168
+ "application/json": {
3169
+ id?: string;
3170
+ name?: string;
3171
+ provider?: string;
3172
+ defaultModel?: string;
3173
+ projectId?: string;
3174
+ secretId?: string;
3175
+ baseUrl?: string;
3176
+ config?: Record<string, never>;
3177
+ /** Format: date-time */
3178
+ createdAt?: string;
3179
+ };
3180
+ };
3181
+ };
3182
+ /** @description Unauthorized */
3183
+ 401: {
3184
+ headers: {
3185
+ [name: string]: unknown;
3186
+ };
3187
+ content?: never;
3188
+ };
3189
+ /** @description Forbidden */
3190
+ 403: {
3191
+ headers: {
3192
+ [name: string]: unknown;
3193
+ };
3194
+ content?: never;
3195
+ };
3196
+ /** @description AI provider not found */
3197
+ 404: {
3198
+ headers: {
3199
+ [name: string]: unknown;
3200
+ };
3201
+ content?: never;
3202
+ };
3203
+ };
3204
+ };
3205
+ deleteAiProvider: {
3206
+ parameters: {
3207
+ query?: never;
3208
+ header?: never;
3209
+ path: {
3210
+ /** @description AI Provider ID */
3211
+ aiProviderId: string;
3212
+ };
3213
+ cookie?: never;
3214
+ };
3215
+ requestBody?: never;
3216
+ responses: {
3217
+ /** @description AI provider deleted successfully */
3218
+ 200: {
3219
+ headers: {
3220
+ [name: string]: unknown;
3221
+ };
3222
+ content?: never;
3223
+ };
3224
+ /** @description Unauthorized */
3225
+ 401: {
3226
+ headers: {
3227
+ [name: string]: unknown;
3228
+ };
3229
+ content?: never;
3230
+ };
3231
+ /** @description Forbidden */
3232
+ 403: {
3233
+ headers: {
3234
+ [name: string]: unknown;
3235
+ };
3236
+ content?: never;
3237
+ };
3238
+ /** @description AI provider not found */
3239
+ 404: {
3240
+ headers: {
3241
+ [name: string]: unknown;
3242
+ };
3243
+ content?: never;
3244
+ };
3245
+ };
3246
+ };
3247
+ updateAiProvider: {
3248
+ parameters: {
3249
+ query?: never;
3250
+ header?: never;
3251
+ path: {
3252
+ /** @description AI Provider ID */
3253
+ aiProviderId: string;
3254
+ };
3255
+ cookie?: never;
3256
+ };
3257
+ requestBody: {
3258
+ content: {
3259
+ "application/json": {
3260
+ name?: string;
3261
+ defaultModel?: string;
3262
+ secretId?: string;
3263
+ baseUrl?: string;
3264
+ config?: Record<string, never>;
3265
+ };
3266
+ };
3267
+ };
3268
+ responses: {
3269
+ /** @description AI provider updated successfully */
3270
+ 200: {
3271
+ headers: {
3272
+ [name: string]: unknown;
3273
+ };
3274
+ content?: never;
3275
+ };
3276
+ /** @description Bad request */
3277
+ 400: {
3278
+ headers: {
3279
+ [name: string]: unknown;
3280
+ };
3281
+ content?: never;
3282
+ };
3283
+ /** @description Unauthorized */
3284
+ 401: {
3285
+ headers: {
3286
+ [name: string]: unknown;
3287
+ };
3288
+ content?: never;
3289
+ };
3290
+ /** @description Forbidden */
3291
+ 403: {
3292
+ headers: {
3293
+ [name: string]: unknown;
3294
+ };
3295
+ content?: never;
3296
+ };
3297
+ /** @description AI provider not found */
3298
+ 404: {
3299
+ headers: {
3300
+ [name: string]: unknown;
3301
+ };
3302
+ content?: never;
3303
+ };
3304
+ };
3305
+ };
3306
+ listChats: {
3307
+ parameters: {
3308
+ query?: {
3309
+ /** @description Project public ID to filter by */
3310
+ projectId?: string;
3311
+ };
3312
+ header?: never;
3313
+ path?: never;
3314
+ cookie?: never;
3315
+ };
3316
+ requestBody?: never;
3317
+ responses: {
3318
+ /** @description List of chats */
3319
+ 200: {
3320
+ headers: {
3321
+ [name: string]: unknown;
3322
+ };
3323
+ content: {
3324
+ "application/json": components["schemas"]["Chat"][];
3325
+ };
3326
+ };
3327
+ /** @description Unauthorized */
3328
+ 401: {
3329
+ headers: {
3330
+ [name: string]: unknown;
3331
+ };
3332
+ content: {
3333
+ "application/json": components["schemas"]["ErrorResponse"];
3334
+ };
3335
+ };
3336
+ /** @description Forbidden */
3337
+ 403: {
3338
+ headers: {
3339
+ [name: string]: unknown;
3340
+ };
3341
+ content: {
3342
+ "application/json": components["schemas"]["ErrorResponse"];
3343
+ };
3344
+ };
3345
+ };
3346
+ };
3347
+ createChat: {
3348
+ parameters: {
3349
+ query?: never;
3350
+ header?: never;
3351
+ path?: never;
3352
+ cookie?: never;
3353
+ };
3354
+ requestBody: {
3355
+ content: {
3356
+ "application/json": components["schemas"]["CreateChatRequest"];
3357
+ };
3358
+ };
3359
+ responses: {
3360
+ /** @description Chat created */
3361
+ 201: {
3362
+ headers: {
3363
+ [name: string]: unknown;
3364
+ };
3365
+ content: {
3366
+ "application/json": components["schemas"]["Chat"];
3367
+ };
2288
3368
  };
2289
3369
  /** @description Bad Request */
2290
3370
  400: {
@@ -2572,6 +3652,13 @@ interface operations {
2572
3652
  * @enum {string}
2573
3653
  */
2574
3654
  status?: "open" | "closed";
3655
+ /** @description Optional name for the conversation */
3656
+ name?: string | null;
3657
+ /**
3658
+ * @description Actor ID to associate with this conversation
3659
+ * @example act_V1StGXR8Z5jdHi6B
3660
+ */
3661
+ actorId?: string | null;
2575
3662
  };
2576
3663
  };
2577
3664
  };
@@ -2859,6 +3946,16 @@ interface operations {
2859
3946
  * @example 0
2860
3947
  */
2861
3948
  position?: number;
3949
+ /**
3950
+ * @description Optional structured metadata to attach to the message (e.g. phone number, channel). Stored as-is and injected into the AI prompt context.
3951
+ * @example {
3952
+ * "phone": "5511999998888",
3953
+ * "channel": "whatsapp"
3954
+ * }
3955
+ */
3956
+ metadata?: {
3957
+ [key: string]: unknown;
3958
+ } | null;
2862
3959
  };
2863
3960
  };
2864
3961
  };
@@ -2928,6 +4025,10 @@ interface operations {
2928
4025
  model?: string;
2929
4026
  /** @description If true, stream tokens via SSE. NOT IMPLEMENTED in v1 — returns 501. */
2930
4027
  stream?: boolean;
4028
+ /** @description Key-value pairs injected as context headers into all tool call requests made during this generation. */
4029
+ toolContext?: {
4030
+ [key: string]: string;
4031
+ } | null;
2931
4032
  };
2932
4033
  };
2933
4034
  };
@@ -2938,7 +4039,7 @@ interface operations {
2938
4039
  [name: string]: unknown;
2939
4040
  };
2940
4041
  content: {
2941
- "application/json": Record<string, never>;
4042
+ "application/json": components["schemas"]["GenerateConversationMessageResponse"];
2942
4043
  };
2943
4044
  };
2944
4045
  /** @description Invalid request */
@@ -3657,169 +4758,1714 @@ interface operations {
3657
4758
  };
3658
4759
  };
3659
4760
  };
3660
- listUsers: {
4761
+ createProjectKey: {
3661
4762
  parameters: {
3662
4763
  query?: never;
3663
4764
  header?: never;
3664
4765
  path?: never;
3665
4766
  cookie?: never;
3666
4767
  };
3667
- requestBody?: never;
3668
- responses: {
3669
- /** @description List of users returned successfully */
3670
- 200: {
3671
- headers: {
3672
- [name: string]: unknown;
3673
- };
4768
+ requestBody: {
4769
+ content: {
4770
+ "application/json": {
4771
+ /**
4772
+ * @description Project ID
4773
+ * @example proj_V1StGXR8Z5jdHi6B
4774
+ */
4775
+ projectId: string;
4776
+ /**
4777
+ * @description Policy ID that determines the key's permissions
4778
+ * @example policy_abc123
4779
+ */
4780
+ policyId: string;
4781
+ /**
4782
+ * @description Key name for identification
4783
+ * @example CI/CD Pipeline
4784
+ */
4785
+ name: string;
4786
+ };
4787
+ };
4788
+ };
4789
+ responses: {
4790
+ /** @description Project key created successfully */
4791
+ 201: {
4792
+ headers: {
4793
+ [name: string]: unknown;
4794
+ };
3674
4795
  content: {
3675
- "application/json": components["schemas"]["UserRecord"][];
4796
+ "application/json": {
4797
+ /**
4798
+ * @description The API key ID (to use as bearer token)
4799
+ * @example SDK_V1StGXR8Z5jdHi6B
4800
+ */
4801
+ id?: string;
4802
+ name?: string;
4803
+ projectId?: string;
4804
+ /** Format: date-time */
4805
+ createdAt?: string;
4806
+ };
4807
+ };
4808
+ };
4809
+ /** @description Bad request (missing fields, invalid project/policy) */
4810
+ 400: {
4811
+ headers: {
4812
+ [name: string]: unknown;
4813
+ };
4814
+ content?: never;
4815
+ };
4816
+ /** @description Unauthorized */
4817
+ 401: {
4818
+ headers: {
4819
+ [name: string]: unknown;
4820
+ };
4821
+ content?: never;
4822
+ };
4823
+ /** @description Forbidden (not a project member) */
4824
+ 403: {
4825
+ headers: {
4826
+ [name: string]: unknown;
3676
4827
  };
4828
+ content?: never;
3677
4829
  };
3678
4830
  /** @description Internal server error */
3679
4831
  500: {
4832
+ headers: {
4833
+ [name: string]: unknown;
4834
+ };
4835
+ content?: never;
4836
+ };
4837
+ };
4838
+ };
4839
+ getProjectKey: {
4840
+ parameters: {
4841
+ query?: never;
4842
+ header?: never;
4843
+ path: {
4844
+ /** @description Project key ID */
4845
+ id: string;
4846
+ };
4847
+ cookie?: never;
4848
+ };
4849
+ requestBody?: never;
4850
+ responses: {
4851
+ /** @description Project key details */
4852
+ 200: {
3680
4853
  headers: {
3681
4854
  [name: string]: unknown;
3682
4855
  };
3683
4856
  content: {
3684
- "application/json": components["schemas"]["ErrorResponse"];
4857
+ "application/json": {
4858
+ id?: string;
4859
+ name?: string;
4860
+ projectId?: string;
4861
+ /** Format: date-time */
4862
+ createdAt?: string;
4863
+ };
4864
+ };
4865
+ };
4866
+ /** @description Unauthorized */
4867
+ 401: {
4868
+ headers: {
4869
+ [name: string]: unknown;
4870
+ };
4871
+ content?: never;
4872
+ };
4873
+ /** @description Forbidden (not the key owner) */
4874
+ 403: {
4875
+ headers: {
4876
+ [name: string]: unknown;
4877
+ };
4878
+ content?: never;
4879
+ };
4880
+ /** @description Project key not found */
4881
+ 404: {
4882
+ headers: {
4883
+ [name: string]: unknown;
3685
4884
  };
4885
+ content?: never;
3686
4886
  };
3687
4887
  };
3688
4888
  };
3689
- createUser: {
4889
+ updateProjectKey: {
3690
4890
  parameters: {
3691
4891
  query?: never;
3692
4892
  header?: never;
3693
- path?: never;
4893
+ path: {
4894
+ /** @description Project key ID */
4895
+ id: string;
4896
+ };
3694
4897
  cookie?: never;
3695
4898
  };
3696
4899
  requestBody: {
3697
4900
  content: {
3698
4901
  "application/json": {
3699
- /** @example johndoe */
3700
- username: string;
3701
- /**
3702
- * Format: password
3703
- * @example supersecret
3704
- */
3705
- password: string;
3706
- /**
3707
- * @example user
3708
- * @enum {string}
3709
- */
3710
- role?: "admin" | "user";
4902
+ /** @description New policy ID */
4903
+ policyId: string;
3711
4904
  };
3712
4905
  };
3713
4906
  };
3714
4907
  responses: {
3715
- /** @description User created successfully */
3716
- 201: {
4908
+ /** @description Project key updated successfully */
4909
+ 200: {
3717
4910
  headers: {
3718
4911
  [name: string]: unknown;
3719
4912
  };
3720
- content: {
3721
- "application/json": components["schemas"]["UserRecord"];
4913
+ content?: never;
4914
+ };
4915
+ /** @description Bad request (invalid policy) */
4916
+ 400: {
4917
+ headers: {
4918
+ [name: string]: unknown;
3722
4919
  };
4920
+ content?: never;
3723
4921
  };
3724
- /** @description Internal server error */
3725
- 500: {
4922
+ /** @description Unauthorized */
4923
+ 401: {
3726
4924
  headers: {
3727
4925
  [name: string]: unknown;
3728
4926
  };
3729
- content: {
3730
- "application/json": components["schemas"]["ErrorResponse"];
4927
+ content?: never;
4928
+ };
4929
+ /** @description Forbidden (not the key owner) */
4930
+ 403: {
4931
+ headers: {
4932
+ [name: string]: unknown;
4933
+ };
4934
+ content?: never;
4935
+ };
4936
+ /** @description Project key not found */
4937
+ 404: {
4938
+ headers: {
4939
+ [name: string]: unknown;
3731
4940
  };
4941
+ content?: never;
3732
4942
  };
3733
4943
  };
3734
4944
  };
3735
- getUser: {
4945
+ deleteProjectKey: {
3736
4946
  parameters: {
3737
4947
  query?: never;
3738
4948
  header?: never;
3739
4949
  path: {
3740
- /** @description User ID */
4950
+ /** @description Project key ID */
3741
4951
  id: string;
3742
4952
  };
3743
4953
  cookie?: never;
3744
4954
  };
3745
4955
  requestBody?: never;
3746
4956
  responses: {
3747
- /** @description User found */
4957
+ /** @description Project key deleted successfully */
3748
4958
  200: {
3749
4959
  headers: {
3750
4960
  [name: string]: unknown;
3751
4961
  };
3752
- content: {
3753
- "application/json": components["schemas"]["UserRecord"];
4962
+ content?: never;
4963
+ };
4964
+ /** @description Unauthorized */
4965
+ 401: {
4966
+ headers: {
4967
+ [name: string]: unknown;
4968
+ };
4969
+ content?: never;
4970
+ };
4971
+ /** @description Forbidden (not the key owner) */
4972
+ 403: {
4973
+ headers: {
4974
+ [name: string]: unknown;
3754
4975
  };
4976
+ content?: never;
3755
4977
  };
3756
- /** @description User not found */
4978
+ /** @description Project key not found */
3757
4979
  404: {
4980
+ headers: {
4981
+ [name: string]: unknown;
4982
+ };
4983
+ content?: never;
4984
+ };
4985
+ };
4986
+ };
4987
+ createProject: {
4988
+ parameters: {
4989
+ query?: never;
4990
+ header?: never;
4991
+ path?: never;
4992
+ cookie?: never;
4993
+ };
4994
+ requestBody: {
4995
+ content: {
4996
+ "application/json": {
4997
+ /** @example My Project */
4998
+ name: string;
4999
+ };
5000
+ };
5001
+ };
5002
+ responses: {
5003
+ /** @description Project created successfully */
5004
+ 201: {
3758
5005
  headers: {
3759
5006
  [name: string]: unknown;
3760
5007
  };
3761
5008
  content: {
3762
- "application/json": components["schemas"]["ErrorResponse"];
5009
+ "application/json": {
5010
+ /** @example proj_V1StGXR8Z5jdHi6B */
5011
+ id?: string;
5012
+ name?: string;
5013
+ /** Format: date-time */
5014
+ createdAt?: string;
5015
+ };
5016
+ };
5017
+ };
5018
+ /** @description Unauthorized */
5019
+ 401: {
5020
+ headers: {
5021
+ [name: string]: unknown;
5022
+ };
5023
+ content?: never;
5024
+ };
5025
+ /** @description Forbidden (non-admin user) */
5026
+ 403: {
5027
+ headers: {
5028
+ [name: string]: unknown;
3763
5029
  };
5030
+ content?: never;
3764
5031
  };
3765
5032
  /** @description Internal server error */
3766
5033
  500: {
5034
+ headers: {
5035
+ [name: string]: unknown;
5036
+ };
5037
+ content?: never;
5038
+ };
5039
+ };
5040
+ };
5041
+ listProjectPolicies: {
5042
+ parameters: {
5043
+ query?: never;
5044
+ header?: never;
5045
+ path: {
5046
+ /** @description Project ID */
5047
+ projectId: string;
5048
+ };
5049
+ cookie?: never;
5050
+ };
5051
+ requestBody?: never;
5052
+ responses: {
5053
+ /** @description List of policies */
5054
+ 200: {
3767
5055
  headers: {
3768
5056
  [name: string]: unknown;
3769
5057
  };
3770
5058
  content: {
3771
- "application/json": components["schemas"]["ErrorResponse"];
5059
+ "application/json": {
5060
+ id?: string;
5061
+ name?: string;
5062
+ description?: string;
5063
+ }[];
5064
+ };
5065
+ };
5066
+ /** @description Unauthorized */
5067
+ 401: {
5068
+ headers: {
5069
+ [name: string]: unknown;
5070
+ };
5071
+ content?: never;
5072
+ };
5073
+ /** @description Forbidden */
5074
+ 403: {
5075
+ headers: {
5076
+ [name: string]: unknown;
5077
+ };
5078
+ content?: never;
5079
+ };
5080
+ /** @description Project not found */
5081
+ 404: {
5082
+ headers: {
5083
+ [name: string]: unknown;
3772
5084
  };
5085
+ content?: never;
3773
5086
  };
3774
5087
  };
3775
5088
  };
3776
- bootstrapUser: {
5089
+ createProjectPolicy: {
3777
5090
  parameters: {
3778
5091
  query?: never;
3779
5092
  header?: never;
3780
- path?: never;
5093
+ path: {
5094
+ /** @description Project ID */
5095
+ projectId: string;
5096
+ };
3781
5097
  cookie?: never;
3782
5098
  };
3783
5099
  requestBody: {
3784
5100
  content: {
3785
5101
  "application/json": {
3786
- /** @example admin */
3787
- username: string;
5102
+ /** @example Editor */
5103
+ name: string;
5104
+ description?: string;
3788
5105
  /**
3789
- * Format: password
3790
- * @example supersecret
5106
+ * @example [
5107
+ * "files:ListFiles",
5108
+ * "files:CreateFile"
5109
+ * ]
3791
5110
  */
3792
- password: string;
5111
+ permissions: string[];
5112
+ notPermissions?: string[];
3793
5113
  };
3794
5114
  };
3795
5115
  };
3796
5116
  responses: {
3797
- /** @description Admin user created successfully */
5117
+ /** @description Policy created successfully */
3798
5118
  201: {
3799
5119
  headers: {
3800
5120
  [name: string]: unknown;
3801
5121
  };
3802
- content: {
3803
- "application/json": components["schemas"]["UserRecord"];
3804
- };
5122
+ content?: never;
3805
5123
  };
3806
- /** @description Users already exist */
3807
- 409: {
5124
+ /** @description Bad request */
5125
+ 400: {
3808
5126
  headers: {
3809
5127
  [name: string]: unknown;
3810
5128
  };
3811
- content: {
3812
- "application/json": components["schemas"]["ErrorResponse"];
5129
+ content?: never;
5130
+ };
5131
+ /** @description Unauthorized */
5132
+ 401: {
5133
+ headers: {
5134
+ [name: string]: unknown;
3813
5135
  };
5136
+ content?: never;
3814
5137
  };
3815
- /** @description Internal server error */
3816
- 500: {
5138
+ /** @description Forbidden */
5139
+ 403: {
3817
5140
  headers: {
3818
5141
  [name: string]: unknown;
3819
5142
  };
3820
- content: {
3821
- "application/json": components["schemas"]["ErrorResponse"];
5143
+ content?: never;
5144
+ };
5145
+ /** @description Project not found */
5146
+ 404: {
5147
+ headers: {
5148
+ [name: string]: unknown;
3822
5149
  };
5150
+ content?: never;
5151
+ };
5152
+ };
5153
+ };
5154
+ getProjectPolicy: {
5155
+ parameters: {
5156
+ query?: never;
5157
+ header?: never;
5158
+ path: {
5159
+ projectId: string;
5160
+ policyId: string;
5161
+ };
5162
+ cookie?: never;
5163
+ };
5164
+ requestBody?: never;
5165
+ responses: {
5166
+ /** @description Policy details */
5167
+ 200: {
5168
+ headers: {
5169
+ [name: string]: unknown;
5170
+ };
5171
+ content?: never;
5172
+ };
5173
+ /** @description Unauthorized */
5174
+ 401: {
5175
+ headers: {
5176
+ [name: string]: unknown;
5177
+ };
5178
+ content?: never;
5179
+ };
5180
+ /** @description Forbidden */
5181
+ 403: {
5182
+ headers: {
5183
+ [name: string]: unknown;
5184
+ };
5185
+ content?: never;
5186
+ };
5187
+ /** @description Policy not found */
5188
+ 404: {
5189
+ headers: {
5190
+ [name: string]: unknown;
5191
+ };
5192
+ content?: never;
5193
+ };
5194
+ };
5195
+ };
5196
+ updateProjectPolicy: {
5197
+ parameters: {
5198
+ query?: never;
5199
+ header?: never;
5200
+ path: {
5201
+ projectId: string;
5202
+ policyId: string;
5203
+ };
5204
+ cookie?: never;
5205
+ };
5206
+ requestBody: {
5207
+ content: {
5208
+ "application/json": {
5209
+ name?: string;
5210
+ description?: string;
5211
+ document?: Record<string, never>;
5212
+ };
5213
+ };
5214
+ };
5215
+ responses: {
5216
+ /** @description Policy updated successfully */
5217
+ 200: {
5218
+ headers: {
5219
+ [name: string]: unknown;
5220
+ };
5221
+ content?: never;
5222
+ };
5223
+ /** @description Bad request */
5224
+ 400: {
5225
+ headers: {
5226
+ [name: string]: unknown;
5227
+ };
5228
+ content?: never;
5229
+ };
5230
+ /** @description Unauthorized */
5231
+ 401: {
5232
+ headers: {
5233
+ [name: string]: unknown;
5234
+ };
5235
+ content?: never;
5236
+ };
5237
+ /** @description Forbidden */
5238
+ 403: {
5239
+ headers: {
5240
+ [name: string]: unknown;
5241
+ };
5242
+ content?: never;
5243
+ };
5244
+ /** @description Policy not found */
5245
+ 404: {
5246
+ headers: {
5247
+ [name: string]: unknown;
5248
+ };
5249
+ content?: never;
5250
+ };
5251
+ };
5252
+ };
5253
+ listSecrets: {
5254
+ parameters: {
5255
+ query?: {
5256
+ /** @description Project ID (required if not using project key auth) */
5257
+ projectId?: string;
5258
+ /** @description Number of results per page */
5259
+ limit?: number;
5260
+ /** @description Number of results to skip */
5261
+ offset?: number;
5262
+ };
5263
+ header?: never;
5264
+ path?: never;
5265
+ cookie?: never;
5266
+ };
5267
+ requestBody?: never;
5268
+ responses: {
5269
+ /** @description List of secrets */
5270
+ 200: {
5271
+ headers: {
5272
+ [name: string]: unknown;
5273
+ };
5274
+ content: {
5275
+ "application/json": {
5276
+ id?: string;
5277
+ name?: string;
5278
+ projectId?: string;
5279
+ /** Format: date-time */
5280
+ createdAt?: string;
5281
+ }[];
5282
+ };
5283
+ };
5284
+ /** @description Unauthorized */
5285
+ 401: {
5286
+ headers: {
5287
+ [name: string]: unknown;
5288
+ };
5289
+ content?: never;
5290
+ };
5291
+ /** @description Forbidden */
5292
+ 403: {
5293
+ headers: {
5294
+ [name: string]: unknown;
5295
+ };
5296
+ content?: never;
5297
+ };
5298
+ /** @description Internal server error */
5299
+ 500: {
5300
+ headers: {
5301
+ [name: string]: unknown;
5302
+ };
5303
+ content?: never;
5304
+ };
5305
+ };
5306
+ };
5307
+ createSecret: {
5308
+ parameters: {
5309
+ query?: never;
5310
+ header?: never;
5311
+ path?: never;
5312
+ cookie?: never;
5313
+ };
5314
+ requestBody: {
5315
+ content: {
5316
+ "application/json": {
5317
+ /**
5318
+ * @description Project ID (required if not using project key auth)
5319
+ * @example proj_V1StGXR8Z5jdHi6B
5320
+ */
5321
+ projectId?: string;
5322
+ /**
5323
+ * @description Secret name
5324
+ * @example DATABASE_PASSWORD
5325
+ */
5326
+ name: string;
5327
+ /**
5328
+ * @description Secret value (will be encrypted)
5329
+ * @example supersecretpassword
5330
+ */
5331
+ value: string;
5332
+ };
5333
+ };
5334
+ };
5335
+ responses: {
5336
+ /** @description Secret created successfully */
5337
+ 201: {
5338
+ headers: {
5339
+ [name: string]: unknown;
5340
+ };
5341
+ content: {
5342
+ "application/json": {
5343
+ id?: string;
5344
+ name?: string;
5345
+ projectId?: string;
5346
+ /** Format: date-time */
5347
+ createdAt?: string;
5348
+ };
5349
+ };
5350
+ };
5351
+ /** @description Bad request (missing required fields) */
5352
+ 400: {
5353
+ headers: {
5354
+ [name: string]: unknown;
5355
+ };
5356
+ content?: never;
5357
+ };
5358
+ /** @description Unauthorized */
5359
+ 401: {
5360
+ headers: {
5361
+ [name: string]: unknown;
5362
+ };
5363
+ content?: never;
5364
+ };
5365
+ /** @description Forbidden */
5366
+ 403: {
5367
+ headers: {
5368
+ [name: string]: unknown;
5369
+ };
5370
+ content?: never;
5371
+ };
5372
+ /** @description Internal server error */
5373
+ 500: {
5374
+ headers: {
5375
+ [name: string]: unknown;
5376
+ };
5377
+ content?: never;
5378
+ };
5379
+ };
5380
+ };
5381
+ getSecret: {
5382
+ parameters: {
5383
+ query?: never;
5384
+ header?: never;
5385
+ path: {
5386
+ /** @description Secret ID */
5387
+ secretId: string;
5388
+ };
5389
+ cookie?: never;
5390
+ };
5391
+ requestBody?: never;
5392
+ responses: {
5393
+ /** @description Secret details */
5394
+ 200: {
5395
+ headers: {
5396
+ [name: string]: unknown;
5397
+ };
5398
+ content: {
5399
+ "application/json": {
5400
+ id?: string;
5401
+ name?: string;
5402
+ /** @description Decrypted secret value */
5403
+ value?: string;
5404
+ projectId?: string;
5405
+ /** Format: date-time */
5406
+ createdAt?: string;
5407
+ };
5408
+ };
5409
+ };
5410
+ /** @description Unauthorized */
5411
+ 401: {
5412
+ headers: {
5413
+ [name: string]: unknown;
5414
+ };
5415
+ content?: never;
5416
+ };
5417
+ /** @description Forbidden */
5418
+ 403: {
5419
+ headers: {
5420
+ [name: string]: unknown;
5421
+ };
5422
+ content?: never;
5423
+ };
5424
+ /** @description Secret not found */
5425
+ 404: {
5426
+ headers: {
5427
+ [name: string]: unknown;
5428
+ };
5429
+ content?: never;
5430
+ };
5431
+ };
5432
+ };
5433
+ deleteSecret: {
5434
+ parameters: {
5435
+ query?: never;
5436
+ header?: never;
5437
+ path: {
5438
+ /** @description Secret ID */
5439
+ secretId: string;
5440
+ };
5441
+ cookie?: never;
5442
+ };
5443
+ requestBody?: never;
5444
+ responses: {
5445
+ /** @description Secret deleted successfully */
5446
+ 200: {
5447
+ headers: {
5448
+ [name: string]: unknown;
5449
+ };
5450
+ content?: never;
5451
+ };
5452
+ /** @description Unauthorized */
5453
+ 401: {
5454
+ headers: {
5455
+ [name: string]: unknown;
5456
+ };
5457
+ content?: never;
5458
+ };
5459
+ /** @description Forbidden */
5460
+ 403: {
5461
+ headers: {
5462
+ [name: string]: unknown;
5463
+ };
5464
+ content?: never;
5465
+ };
5466
+ /** @description Secret not found */
5467
+ 404: {
5468
+ headers: {
5469
+ [name: string]: unknown;
5470
+ };
5471
+ content?: never;
5472
+ };
5473
+ };
5474
+ };
5475
+ updateSecret: {
5476
+ parameters: {
5477
+ query?: never;
5478
+ header?: never;
5479
+ path: {
5480
+ /** @description Secret ID */
5481
+ secretId: string;
5482
+ };
5483
+ cookie?: never;
5484
+ };
5485
+ requestBody: {
5486
+ content: {
5487
+ "application/json": {
5488
+ /** @description New secret name */
5489
+ name?: string;
5490
+ /** @description New secret value */
5491
+ value?: string;
5492
+ };
5493
+ };
5494
+ };
5495
+ responses: {
5496
+ /** @description Secret updated successfully */
5497
+ 200: {
5498
+ headers: {
5499
+ [name: string]: unknown;
5500
+ };
5501
+ content?: never;
5502
+ };
5503
+ /** @description Bad request */
5504
+ 400: {
5505
+ headers: {
5506
+ [name: string]: unknown;
5507
+ };
5508
+ content?: never;
5509
+ };
5510
+ /** @description Unauthorized */
5511
+ 401: {
5512
+ headers: {
5513
+ [name: string]: unknown;
5514
+ };
5515
+ content?: never;
5516
+ };
5517
+ /** @description Forbidden */
5518
+ 403: {
5519
+ headers: {
5520
+ [name: string]: unknown;
5521
+ };
5522
+ content?: never;
5523
+ };
5524
+ /** @description Secret not found */
5525
+ 404: {
5526
+ headers: {
5527
+ [name: string]: unknown;
5528
+ };
5529
+ content?: never;
5530
+ };
5531
+ };
5532
+ };
5533
+ listSessions: {
5534
+ parameters: {
5535
+ query?: {
5536
+ /** @description Filter by actor public ID */
5537
+ actorId?: string;
5538
+ /** @description Filter by session status (open or closed) */
5539
+ status?: "open" | "closed";
5540
+ limit?: number;
5541
+ offset?: number;
5542
+ };
5543
+ header?: never;
5544
+ path: {
5545
+ /** @description Agent public ID */
5546
+ agentId: components["parameters"]["AgentId"];
5547
+ };
5548
+ cookie?: never;
5549
+ };
5550
+ requestBody?: never;
5551
+ responses: {
5552
+ /** @description Paginated list of sessions */
5553
+ 200: {
5554
+ headers: {
5555
+ [name: string]: unknown;
5556
+ };
5557
+ content: {
5558
+ "application/json": {
5559
+ data?: components["schemas"]["SessionRecord"][];
5560
+ total?: number;
5561
+ limit?: number;
5562
+ offset?: number;
5563
+ };
5564
+ };
5565
+ };
5566
+ 401: components["responses"]["Unauthorized"];
5567
+ 403: components["responses"]["Forbidden"];
5568
+ 404: components["responses"]["NotFound"];
5569
+ };
5570
+ };
5571
+ createSession: {
5572
+ parameters: {
5573
+ query?: never;
5574
+ header?: never;
5575
+ path: {
5576
+ /** @description Agent public ID */
5577
+ agentId: components["parameters"]["AgentId"];
5578
+ };
5579
+ cookie?: never;
5580
+ };
5581
+ requestBody?: {
5582
+ content: {
5583
+ "application/json": components["schemas"]["CreateSessionRequest"];
5584
+ };
5585
+ };
5586
+ responses: {
5587
+ /** @description Session created */
5588
+ 201: {
5589
+ headers: {
5590
+ [name: string]: unknown;
5591
+ };
5592
+ content: {
5593
+ "application/json": components["schemas"]["SessionRecord"];
5594
+ };
5595
+ };
5596
+ 401: components["responses"]["Unauthorized"];
5597
+ 403: components["responses"]["Forbidden"];
5598
+ 404: components["responses"]["NotFound"];
5599
+ };
5600
+ };
5601
+ getSession: {
5602
+ parameters: {
5603
+ query?: never;
5604
+ header?: never;
5605
+ path: {
5606
+ /** @description Agent public ID */
5607
+ agentId: components["parameters"]["AgentId"];
5608
+ /** @description Session public ID */
5609
+ sessionId: components["parameters"]["SessionId"];
5610
+ };
5611
+ cookie?: never;
5612
+ };
5613
+ requestBody?: never;
5614
+ responses: {
5615
+ /** @description Session details */
5616
+ 200: {
5617
+ headers: {
5618
+ [name: string]: unknown;
5619
+ };
5620
+ content: {
5621
+ "application/json": components["schemas"]["SessionRecord"];
5622
+ };
5623
+ };
5624
+ 401: components["responses"]["Unauthorized"];
5625
+ 403: components["responses"]["Forbidden"];
5626
+ 404: components["responses"]["NotFound"];
5627
+ };
5628
+ };
5629
+ deleteSession: {
5630
+ parameters: {
5631
+ query?: never;
5632
+ header?: never;
5633
+ path: {
5634
+ /** @description Agent public ID */
5635
+ agentId: components["parameters"]["AgentId"];
5636
+ /** @description Session public ID */
5637
+ sessionId: components["parameters"]["SessionId"];
5638
+ };
5639
+ cookie?: never;
5640
+ };
5641
+ requestBody?: never;
5642
+ responses: {
5643
+ /** @description Session deleted */
5644
+ 204: {
5645
+ headers: {
5646
+ [name: string]: unknown;
5647
+ };
5648
+ content?: never;
5649
+ };
5650
+ 401: components["responses"]["Unauthorized"];
5651
+ 403: components["responses"]["Forbidden"];
5652
+ 404: components["responses"]["NotFound"];
5653
+ };
5654
+ };
5655
+ updateSession: {
5656
+ parameters: {
5657
+ query?: never;
5658
+ header?: never;
5659
+ path: {
5660
+ /** @description Agent public ID */
5661
+ agentId: components["parameters"]["AgentId"];
5662
+ /** @description Session public ID */
5663
+ sessionId: components["parameters"]["SessionId"];
5664
+ };
5665
+ cookie?: never;
5666
+ };
5667
+ requestBody?: {
5668
+ content: {
5669
+ "application/json": components["schemas"]["UpdateSessionRequest"];
5670
+ };
5671
+ };
5672
+ responses: {
5673
+ /** @description Updated session */
5674
+ 200: {
5675
+ headers: {
5676
+ [name: string]: unknown;
5677
+ };
5678
+ content: {
5679
+ "application/json": components["schemas"]["SessionRecord"];
5680
+ };
5681
+ };
5682
+ 401: components["responses"]["Unauthorized"];
5683
+ 403: components["responses"]["Forbidden"];
5684
+ 404: components["responses"]["NotFound"];
5685
+ };
5686
+ };
5687
+ listSessionMessages: {
5688
+ parameters: {
5689
+ query?: {
5690
+ limit?: number;
5691
+ offset?: number;
5692
+ };
5693
+ header?: never;
5694
+ path: {
5695
+ /** @description Agent public ID */
5696
+ agentId: components["parameters"]["AgentId"];
5697
+ /** @description Session public ID */
5698
+ sessionId: components["parameters"]["SessionId"];
5699
+ };
5700
+ cookie?: never;
5701
+ };
5702
+ requestBody?: never;
5703
+ responses: {
5704
+ /** @description Paginated list of messages */
5705
+ 200: {
5706
+ headers: {
5707
+ [name: string]: unknown;
5708
+ };
5709
+ content: {
5710
+ "application/json": {
5711
+ data?: components["schemas"]["SessionMessage"][];
5712
+ total?: number;
5713
+ limit?: number;
5714
+ offset?: number;
5715
+ };
5716
+ };
5717
+ };
5718
+ 401: components["responses"]["Unauthorized"];
5719
+ 403: components["responses"]["Forbidden"];
5720
+ 404: components["responses"]["NotFound"];
5721
+ };
5722
+ };
5723
+ addSessionMessage: {
5724
+ parameters: {
5725
+ query?: never;
5726
+ header?: never;
5727
+ path: {
5728
+ /** @description Agent public ID */
5729
+ agentId: components["parameters"]["AgentId"];
5730
+ /** @description Session public ID */
5731
+ sessionId: components["parameters"]["SessionId"];
5732
+ };
5733
+ cookie?: never;
5734
+ };
5735
+ requestBody: {
5736
+ content: {
5737
+ "application/json": components["schemas"]["AddSessionMessageRequest"];
5738
+ };
5739
+ };
5740
+ responses: {
5741
+ /** @description User message saved */
5742
+ 201: {
5743
+ headers: {
5744
+ [name: string]: unknown;
5745
+ };
5746
+ content: {
5747
+ "application/json": components["schemas"]["AddSessionMessageResponse"];
5748
+ };
5749
+ };
5750
+ 401: components["responses"]["Unauthorized"];
5751
+ 403: components["responses"]["Forbidden"];
5752
+ 404: components["responses"]["NotFound"];
5753
+ };
5754
+ };
5755
+ generateSessionResponse: {
5756
+ parameters: {
5757
+ query?: {
5758
+ /** @description When true, generation runs in the background and 202 is returned immediately */
5759
+ async?: boolean;
5760
+ };
5761
+ header?: never;
5762
+ path: {
5763
+ /** @description Agent public ID */
5764
+ agentId: components["parameters"]["AgentId"];
5765
+ /** @description Session public ID */
5766
+ sessionId: components["parameters"]["SessionId"];
5767
+ };
5768
+ cookie?: never;
5769
+ };
5770
+ requestBody?: {
5771
+ content: {
5772
+ "application/json": components["schemas"]["GenerateSessionRequest"];
5773
+ };
5774
+ };
5775
+ responses: {
5776
+ /** @description Agent reply or requires_action */
5777
+ 200: {
5778
+ headers: {
5779
+ [name: string]: unknown;
5780
+ };
5781
+ content: {
5782
+ "application/json": components["schemas"]["GenerateSessionResponse"];
5783
+ };
5784
+ };
5785
+ /** @description Generation accepted (async mode) */
5786
+ 202: {
5787
+ headers: {
5788
+ [name: string]: unknown;
5789
+ };
5790
+ content: {
5791
+ "application/json": {
5792
+ /** @enum {string} */
5793
+ status?: "accepted";
5794
+ sessionId?: string;
5795
+ };
5796
+ };
5797
+ };
5798
+ 401: components["responses"]["Unauthorized"];
5799
+ 403: components["responses"]["Forbidden"];
5800
+ 404: components["responses"]["NotFound"];
5801
+ /** @description Generation already in progress */
5802
+ 409: {
5803
+ headers: {
5804
+ [name: string]: unknown;
5805
+ };
5806
+ content: {
5807
+ "application/json": components["schemas"]["ErrorResponse"];
5808
+ };
5809
+ };
5810
+ };
5811
+ };
5812
+ submitSessionToolOutputs: {
5813
+ parameters: {
5814
+ query?: never;
5815
+ header?: never;
5816
+ path: {
5817
+ /** @description Agent public ID */
5818
+ agentId: components["parameters"]["AgentId"];
5819
+ /** @description Session public ID */
5820
+ sessionId: components["parameters"]["SessionId"];
5821
+ };
5822
+ cookie?: never;
5823
+ };
5824
+ requestBody: {
5825
+ content: {
5826
+ "application/json": components["schemas"]["SubmitSessionToolOutputsRequest"];
5827
+ };
5828
+ };
5829
+ responses: {
5830
+ /** @description Generation result */
5831
+ 200: {
5832
+ headers: {
5833
+ [name: string]: unknown;
5834
+ };
5835
+ content: {
5836
+ "application/json": components["schemas"]["SendSessionMessageResponse"];
5837
+ };
5838
+ };
5839
+ 401: components["responses"]["Unauthorized"];
5840
+ 403: components["responses"]["Forbidden"];
5841
+ 404: components["responses"]["NotFound"];
5842
+ };
5843
+ };
5844
+ getSessionTags: {
5845
+ parameters: {
5846
+ query?: never;
5847
+ header?: never;
5848
+ path: {
5849
+ /** @description Agent public ID */
5850
+ agentId: components["parameters"]["AgentId"];
5851
+ /** @description Session public ID */
5852
+ sessionId: components["parameters"]["SessionId"];
5853
+ };
5854
+ cookie?: never;
5855
+ };
5856
+ requestBody?: never;
5857
+ responses: {
5858
+ /** @description Session tags */
5859
+ 200: {
5860
+ headers: {
5861
+ [name: string]: unknown;
5862
+ };
5863
+ content: {
5864
+ "application/json": {
5865
+ [key: string]: string;
5866
+ };
5867
+ };
5868
+ };
5869
+ 401: components["responses"]["Unauthorized"];
5870
+ 403: components["responses"]["Forbidden"];
5871
+ 404: components["responses"]["NotFound"];
5872
+ };
5873
+ };
5874
+ replaceSessionTags: {
5875
+ parameters: {
5876
+ query?: never;
5877
+ header?: never;
5878
+ path: {
5879
+ /** @description Agent public ID */
5880
+ agentId: components["parameters"]["AgentId"];
5881
+ /** @description Session public ID */
5882
+ sessionId: components["parameters"]["SessionId"];
5883
+ };
5884
+ cookie?: never;
5885
+ };
5886
+ requestBody: {
5887
+ content: {
5888
+ "application/json": {
5889
+ [key: string]: string;
5890
+ };
5891
+ };
5892
+ };
5893
+ responses: {
5894
+ /** @description Updated tags */
5895
+ 200: {
5896
+ headers: {
5897
+ [name: string]: unknown;
5898
+ };
5899
+ content: {
5900
+ "application/json": {
5901
+ [key: string]: string;
5902
+ };
5903
+ };
5904
+ };
5905
+ 401: components["responses"]["Unauthorized"];
5906
+ 403: components["responses"]["Forbidden"];
5907
+ 404: components["responses"]["NotFound"];
5908
+ };
5909
+ };
5910
+ mergeSessionTags: {
5911
+ parameters: {
5912
+ query?: never;
5913
+ header?: never;
5914
+ path: {
5915
+ /** @description Agent public ID */
5916
+ agentId: components["parameters"]["AgentId"];
5917
+ /** @description Session public ID */
5918
+ sessionId: components["parameters"]["SessionId"];
5919
+ };
5920
+ cookie?: never;
5921
+ };
5922
+ requestBody: {
5923
+ content: {
5924
+ "application/json": {
5925
+ [key: string]: string;
5926
+ };
5927
+ };
5928
+ };
5929
+ responses: {
5930
+ /** @description Updated tags */
5931
+ 200: {
5932
+ headers: {
5933
+ [name: string]: unknown;
5934
+ };
5935
+ content: {
5936
+ "application/json": {
5937
+ [key: string]: string;
5938
+ };
5939
+ };
5940
+ };
5941
+ 401: components["responses"]["Unauthorized"];
5942
+ 403: components["responses"]["Forbidden"];
5943
+ 404: components["responses"]["NotFound"];
5944
+ };
5945
+ };
5946
+ listUsers: {
5947
+ parameters: {
5948
+ query?: never;
5949
+ header?: never;
5950
+ path?: never;
5951
+ cookie?: never;
5952
+ };
5953
+ requestBody?: never;
5954
+ responses: {
5955
+ /** @description List of users returned successfully */
5956
+ 200: {
5957
+ headers: {
5958
+ [name: string]: unknown;
5959
+ };
5960
+ content: {
5961
+ "application/json": components["schemas"]["UserRecord"][];
5962
+ };
5963
+ };
5964
+ /** @description Internal server error */
5965
+ 500: {
5966
+ headers: {
5967
+ [name: string]: unknown;
5968
+ };
5969
+ content: {
5970
+ "application/json": components["schemas"]["ErrorResponse"];
5971
+ };
5972
+ };
5973
+ };
5974
+ };
5975
+ createUser: {
5976
+ parameters: {
5977
+ query?: never;
5978
+ header?: never;
5979
+ path?: never;
5980
+ cookie?: never;
5981
+ };
5982
+ requestBody: {
5983
+ content: {
5984
+ "application/json": {
5985
+ /** @example johndoe */
5986
+ username: string;
5987
+ /**
5988
+ * Format: password
5989
+ * @example supersecret
5990
+ */
5991
+ password: string;
5992
+ /**
5993
+ * @example user
5994
+ * @enum {string}
5995
+ */
5996
+ role?: "admin" | "user";
5997
+ };
5998
+ };
5999
+ };
6000
+ responses: {
6001
+ /** @description User created successfully */
6002
+ 201: {
6003
+ headers: {
6004
+ [name: string]: unknown;
6005
+ };
6006
+ content: {
6007
+ "application/json": components["schemas"]["UserRecord"];
6008
+ };
6009
+ };
6010
+ /** @description Internal server error */
6011
+ 500: {
6012
+ headers: {
6013
+ [name: string]: unknown;
6014
+ };
6015
+ content: {
6016
+ "application/json": components["schemas"]["ErrorResponse"];
6017
+ };
6018
+ };
6019
+ };
6020
+ };
6021
+ getUser: {
6022
+ parameters: {
6023
+ query?: never;
6024
+ header?: never;
6025
+ path: {
6026
+ /** @description User ID */
6027
+ id: string;
6028
+ };
6029
+ cookie?: never;
6030
+ };
6031
+ requestBody?: never;
6032
+ responses: {
6033
+ /** @description User found */
6034
+ 200: {
6035
+ headers: {
6036
+ [name: string]: unknown;
6037
+ };
6038
+ content: {
6039
+ "application/json": components["schemas"]["UserRecord"];
6040
+ };
6041
+ };
6042
+ /** @description User not found */
6043
+ 404: {
6044
+ headers: {
6045
+ [name: string]: unknown;
6046
+ };
6047
+ content: {
6048
+ "application/json": components["schemas"]["ErrorResponse"];
6049
+ };
6050
+ };
6051
+ /** @description Internal server error */
6052
+ 500: {
6053
+ headers: {
6054
+ [name: string]: unknown;
6055
+ };
6056
+ content: {
6057
+ "application/json": components["schemas"]["ErrorResponse"];
6058
+ };
6059
+ };
6060
+ };
6061
+ };
6062
+ bootstrapUser: {
6063
+ parameters: {
6064
+ query?: never;
6065
+ header?: never;
6066
+ path?: never;
6067
+ cookie?: never;
6068
+ };
6069
+ requestBody: {
6070
+ content: {
6071
+ "application/json": {
6072
+ /** @example admin */
6073
+ username: string;
6074
+ /**
6075
+ * Format: password
6076
+ * @example supersecret
6077
+ */
6078
+ password: string;
6079
+ };
6080
+ };
6081
+ };
6082
+ responses: {
6083
+ /** @description Admin user created successfully */
6084
+ 201: {
6085
+ headers: {
6086
+ [name: string]: unknown;
6087
+ };
6088
+ content: {
6089
+ "application/json": components["schemas"]["UserRecord"];
6090
+ };
6091
+ };
6092
+ /** @description Users already exist */
6093
+ 409: {
6094
+ headers: {
6095
+ [name: string]: unknown;
6096
+ };
6097
+ content: {
6098
+ "application/json": components["schemas"]["ErrorResponse"];
6099
+ };
6100
+ };
6101
+ /** @description Internal server error */
6102
+ 500: {
6103
+ headers: {
6104
+ [name: string]: unknown;
6105
+ };
6106
+ content: {
6107
+ "application/json": components["schemas"]["ErrorResponse"];
6108
+ };
6109
+ };
6110
+ };
6111
+ };
6112
+ listWebhooks: {
6113
+ parameters: {
6114
+ query?: never;
6115
+ header?: never;
6116
+ path: {
6117
+ projectId: string;
6118
+ };
6119
+ cookie?: never;
6120
+ };
6121
+ requestBody?: never;
6122
+ responses: {
6123
+ /** @description A list of webhooks */
6124
+ 200: {
6125
+ headers: {
6126
+ [name: string]: unknown;
6127
+ };
6128
+ content: {
6129
+ "application/json": components["schemas"]["Webhook"][];
6130
+ };
6131
+ };
6132
+ /** @description Unauthorized */
6133
+ 401: {
6134
+ headers: {
6135
+ [name: string]: unknown;
6136
+ };
6137
+ content?: never;
6138
+ };
6139
+ /** @description Forbidden */
6140
+ 403: {
6141
+ headers: {
6142
+ [name: string]: unknown;
6143
+ };
6144
+ content?: never;
6145
+ };
6146
+ };
6147
+ };
6148
+ createWebhook: {
6149
+ parameters: {
6150
+ query?: never;
6151
+ header?: never;
6152
+ path: {
6153
+ projectId: string;
6154
+ };
6155
+ cookie?: never;
6156
+ };
6157
+ requestBody: {
6158
+ content: {
6159
+ "application/json": components["schemas"]["CreateWebhookRequest"];
6160
+ };
6161
+ };
6162
+ responses: {
6163
+ /** @description Webhook created */
6164
+ 201: {
6165
+ headers: {
6166
+ [name: string]: unknown;
6167
+ };
6168
+ content: {
6169
+ "application/json": components["schemas"]["WebhookWithSecret"];
6170
+ };
6171
+ };
6172
+ /** @description Bad request */
6173
+ 400: {
6174
+ headers: {
6175
+ [name: string]: unknown;
6176
+ };
6177
+ content?: never;
6178
+ };
6179
+ /** @description Unauthorized */
6180
+ 401: {
6181
+ headers: {
6182
+ [name: string]: unknown;
6183
+ };
6184
+ content?: never;
6185
+ };
6186
+ /** @description Forbidden */
6187
+ 403: {
6188
+ headers: {
6189
+ [name: string]: unknown;
6190
+ };
6191
+ content?: never;
6192
+ };
6193
+ };
6194
+ };
6195
+ getWebhook: {
6196
+ parameters: {
6197
+ query?: never;
6198
+ header?: never;
6199
+ path: {
6200
+ projectId: string;
6201
+ webhookId: string;
6202
+ };
6203
+ cookie?: never;
6204
+ };
6205
+ requestBody?: never;
6206
+ responses: {
6207
+ /** @description Webhook details */
6208
+ 200: {
6209
+ headers: {
6210
+ [name: string]: unknown;
6211
+ };
6212
+ content: {
6213
+ "application/json": components["schemas"]["Webhook"];
6214
+ };
6215
+ };
6216
+ /** @description Unauthorized */
6217
+ 401: {
6218
+ headers: {
6219
+ [name: string]: unknown;
6220
+ };
6221
+ content?: never;
6222
+ };
6223
+ /** @description Forbidden */
6224
+ 403: {
6225
+ headers: {
6226
+ [name: string]: unknown;
6227
+ };
6228
+ content?: never;
6229
+ };
6230
+ /** @description Webhook not found */
6231
+ 404: {
6232
+ headers: {
6233
+ [name: string]: unknown;
6234
+ };
6235
+ content?: never;
6236
+ };
6237
+ };
6238
+ };
6239
+ updateWebhook: {
6240
+ parameters: {
6241
+ query?: never;
6242
+ header?: never;
6243
+ path: {
6244
+ projectId: string;
6245
+ webhookId: string;
6246
+ };
6247
+ cookie?: never;
6248
+ };
6249
+ requestBody: {
6250
+ content: {
6251
+ "application/json": components["schemas"]["UpdateWebhookRequest"];
6252
+ };
6253
+ };
6254
+ responses: {
6255
+ /** @description Webhook updated */
6256
+ 200: {
6257
+ headers: {
6258
+ [name: string]: unknown;
6259
+ };
6260
+ content: {
6261
+ "application/json": components["schemas"]["Webhook"];
6262
+ };
6263
+ };
6264
+ /** @description Bad request */
6265
+ 400: {
6266
+ headers: {
6267
+ [name: string]: unknown;
6268
+ };
6269
+ content?: never;
6270
+ };
6271
+ /** @description Unauthorized */
6272
+ 401: {
6273
+ headers: {
6274
+ [name: string]: unknown;
6275
+ };
6276
+ content?: never;
6277
+ };
6278
+ /** @description Forbidden */
6279
+ 403: {
6280
+ headers: {
6281
+ [name: string]: unknown;
6282
+ };
6283
+ content?: never;
6284
+ };
6285
+ /** @description Webhook not found */
6286
+ 404: {
6287
+ headers: {
6288
+ [name: string]: unknown;
6289
+ };
6290
+ content?: never;
6291
+ };
6292
+ };
6293
+ };
6294
+ deleteWebhook: {
6295
+ parameters: {
6296
+ query?: never;
6297
+ header?: never;
6298
+ path: {
6299
+ projectId: string;
6300
+ webhookId: string;
6301
+ };
6302
+ cookie?: never;
6303
+ };
6304
+ requestBody?: never;
6305
+ responses: {
6306
+ /** @description Webhook deleted */
6307
+ 204: {
6308
+ headers: {
6309
+ [name: string]: unknown;
6310
+ };
6311
+ content?: never;
6312
+ };
6313
+ /** @description Unauthorized */
6314
+ 401: {
6315
+ headers: {
6316
+ [name: string]: unknown;
6317
+ };
6318
+ content?: never;
6319
+ };
6320
+ /** @description Forbidden */
6321
+ 403: {
6322
+ headers: {
6323
+ [name: string]: unknown;
6324
+ };
6325
+ content?: never;
6326
+ };
6327
+ /** @description Webhook not found */
6328
+ 404: {
6329
+ headers: {
6330
+ [name: string]: unknown;
6331
+ };
6332
+ content?: never;
6333
+ };
6334
+ };
6335
+ };
6336
+ listWebhookDeliveries: {
6337
+ parameters: {
6338
+ query?: {
6339
+ limit?: number;
6340
+ offset?: number;
6341
+ };
6342
+ header?: never;
6343
+ path: {
6344
+ projectId: string;
6345
+ webhookId: string;
6346
+ };
6347
+ cookie?: never;
6348
+ };
6349
+ requestBody?: never;
6350
+ responses: {
6351
+ /** @description A list of deliveries */
6352
+ 200: {
6353
+ headers: {
6354
+ [name: string]: unknown;
6355
+ };
6356
+ content: {
6357
+ "application/json": components["schemas"]["DeliveryListResponse"];
6358
+ };
6359
+ };
6360
+ /** @description Unauthorized */
6361
+ 401: {
6362
+ headers: {
6363
+ [name: string]: unknown;
6364
+ };
6365
+ content?: never;
6366
+ };
6367
+ /** @description Forbidden */
6368
+ 403: {
6369
+ headers: {
6370
+ [name: string]: unknown;
6371
+ };
6372
+ content?: never;
6373
+ };
6374
+ /** @description Webhook not found */
6375
+ 404: {
6376
+ headers: {
6377
+ [name: string]: unknown;
6378
+ };
6379
+ content?: never;
6380
+ };
6381
+ };
6382
+ };
6383
+ getWebhookDelivery: {
6384
+ parameters: {
6385
+ query?: never;
6386
+ header?: never;
6387
+ path: {
6388
+ projectId: string;
6389
+ webhookId: string;
6390
+ deliveryId: string;
6391
+ };
6392
+ cookie?: never;
6393
+ };
6394
+ requestBody?: never;
6395
+ responses: {
6396
+ /** @description Delivery details */
6397
+ 200: {
6398
+ headers: {
6399
+ [name: string]: unknown;
6400
+ };
6401
+ content: {
6402
+ "application/json": components["schemas"]["Delivery"];
6403
+ };
6404
+ };
6405
+ /** @description Unauthorized */
6406
+ 401: {
6407
+ headers: {
6408
+ [name: string]: unknown;
6409
+ };
6410
+ content?: never;
6411
+ };
6412
+ /** @description Forbidden */
6413
+ 403: {
6414
+ headers: {
6415
+ [name: string]: unknown;
6416
+ };
6417
+ content?: never;
6418
+ };
6419
+ /** @description Delivery not found */
6420
+ 404: {
6421
+ headers: {
6422
+ [name: string]: unknown;
6423
+ };
6424
+ content?: never;
6425
+ };
6426
+ };
6427
+ };
6428
+ rotateWebhookSecret: {
6429
+ parameters: {
6430
+ query?: never;
6431
+ header?: never;
6432
+ path: {
6433
+ projectId: string;
6434
+ webhookId: string;
6435
+ };
6436
+ cookie?: never;
6437
+ };
6438
+ requestBody?: never;
6439
+ responses: {
6440
+ /** @description Secret rotated */
6441
+ 200: {
6442
+ headers: {
6443
+ [name: string]: unknown;
6444
+ };
6445
+ content: {
6446
+ "application/json": components["schemas"]["WebhookWithSecret"];
6447
+ };
6448
+ };
6449
+ /** @description Unauthorized */
6450
+ 401: {
6451
+ headers: {
6452
+ [name: string]: unknown;
6453
+ };
6454
+ content?: never;
6455
+ };
6456
+ /** @description Forbidden */
6457
+ 403: {
6458
+ headers: {
6459
+ [name: string]: unknown;
6460
+ };
6461
+ content?: never;
6462
+ };
6463
+ /** @description Webhook not found */
6464
+ 404: {
6465
+ headers: {
6466
+ [name: string]: unknown;
6467
+ };
6468
+ content?: never;
3823
6469
  };
3824
6470
  };
3825
6471
  };