sarvam-agents-client 0.1.2 → 0.2.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.
Files changed (298) hide show
  1. package/README.md +15 -0
  2. package/dist/apis/AgentConversationsApi.d.ts +44 -1
  3. package/dist/apis/AgentConversationsApi.js +104 -1
  4. package/dist/apis/AgentsApi.d.ts +77 -5
  5. package/dist/apis/AgentsApi.js +163 -5
  6. package/dist/apis/AppsApi.d.ts +43 -1
  7. package/dist/apis/AppsApi.js +108 -0
  8. package/dist/apis/ArtifactsApi.d.ts +31 -1
  9. package/dist/apis/ArtifactsApi.js +82 -0
  10. package/dist/apis/CustomAPIsApi.d.ts +124 -0
  11. package/dist/apis/CustomAPIsApi.js +305 -0
  12. package/dist/apis/ModelsApi.d.ts +26 -0
  13. package/dist/apis/ModelsApi.js +52 -0
  14. package/dist/apis/index.d.ts +2 -0
  15. package/dist/apis/index.js +2 -0
  16. package/dist/compose/agent.d.ts +40 -0
  17. package/dist/compose/agent.js +191 -0
  18. package/dist/compose/deploy.d.ts +30 -0
  19. package/dist/compose/deploy.js +146 -0
  20. package/dist/compose/errors.d.ts +48 -0
  21. package/dist/compose/errors.js +68 -0
  22. package/dist/compose/events.d.ts +63 -0
  23. package/dist/compose/events.js +100 -0
  24. package/dist/compose/fingerprint.d.ts +6 -0
  25. package/dist/compose/fingerprint.js +83 -0
  26. package/dist/compose/index.d.ts +13 -0
  27. package/dist/compose/index.js +33 -0
  28. package/dist/compose/run.d.ts +100 -0
  29. package/dist/compose/run.js +536 -0
  30. package/dist/compose/runState.d.ts +26 -0
  31. package/dist/compose/runState.js +79 -0
  32. package/dist/compose/settingsTransport.d.ts +24 -0
  33. package/dist/compose/settingsTransport.js +280 -0
  34. package/dist/compose/tools.d.ts +17 -0
  35. package/dist/compose/tools.js +29 -0
  36. package/dist/compose/transport.d.ts +34 -0
  37. package/dist/compose/transport.js +2 -0
  38. package/dist/esm/apis/AgentConversationsApi.d.ts +44 -1
  39. package/dist/esm/apis/AgentConversationsApi.js +104 -1
  40. package/dist/esm/apis/AgentsApi.d.ts +77 -5
  41. package/dist/esm/apis/AgentsApi.js +163 -5
  42. package/dist/esm/apis/AppsApi.d.ts +43 -1
  43. package/dist/esm/apis/AppsApi.js +109 -1
  44. package/dist/esm/apis/ArtifactsApi.d.ts +31 -1
  45. package/dist/esm/apis/ArtifactsApi.js +83 -1
  46. package/dist/esm/apis/CustomAPIsApi.d.ts +124 -0
  47. package/dist/esm/apis/CustomAPIsApi.js +301 -0
  48. package/dist/esm/apis/ModelsApi.d.ts +26 -0
  49. package/dist/esm/apis/ModelsApi.js +48 -0
  50. package/dist/esm/apis/index.d.ts +2 -0
  51. package/dist/esm/apis/index.js +2 -0
  52. package/dist/esm/compose/agent.d.ts +40 -0
  53. package/dist/esm/compose/agent.js +187 -0
  54. package/dist/esm/compose/deploy.d.ts +30 -0
  55. package/dist/esm/compose/deploy.js +137 -0
  56. package/dist/esm/compose/errors.d.ts +48 -0
  57. package/dist/esm/compose/errors.js +53 -0
  58. package/dist/esm/compose/events.d.ts +63 -0
  59. package/dist/esm/compose/events.js +97 -0
  60. package/dist/esm/compose/fingerprint.d.ts +6 -0
  61. package/dist/esm/compose/fingerprint.js +78 -0
  62. package/dist/esm/compose/index.d.ts +13 -0
  63. package/dist/esm/compose/index.js +8 -0
  64. package/dist/esm/compose/run.d.ts +100 -0
  65. package/dist/esm/compose/run.js +530 -0
  66. package/dist/esm/compose/runState.d.ts +26 -0
  67. package/dist/esm/compose/runState.js +75 -0
  68. package/dist/esm/compose/settingsTransport.d.ts +24 -0
  69. package/dist/esm/compose/settingsTransport.js +276 -0
  70. package/dist/esm/compose/tools.d.ts +17 -0
  71. package/dist/esm/compose/tools.js +19 -0
  72. package/dist/esm/compose/transport.d.ts +34 -0
  73. package/dist/esm/compose/transport.js +1 -0
  74. package/dist/esm/models/AgentChannelRef.d.ts +1 -0
  75. package/dist/esm/models/AgentChannelRef.js +2 -1
  76. package/dist/esm/models/AgentConversationDetail.d.ts +15 -2
  77. package/dist/esm/models/AgentConversationDetail.js +6 -4
  78. package/dist/esm/models/AgentConversationView.d.ts +11 -5
  79. package/dist/esm/models/AgentConversationView.js +4 -4
  80. package/dist/esm/models/AgentCreate.d.ts +8 -0
  81. package/dist/esm/models/AgentCreate.js +2 -0
  82. package/dist/esm/models/AgentCustomApiList.d.ts +33 -0
  83. package/dist/esm/models/AgentCustomApiList.js +44 -0
  84. package/dist/esm/models/AgentResource.d.ts +14 -0
  85. package/dist/esm/models/AgentResource.js +4 -0
  86. package/dist/esm/models/AgentSettingsResponse.d.ts +53 -0
  87. package/dist/esm/models/AgentSettingsResponse.js +52 -0
  88. package/dist/esm/models/AgentUpdate.d.ts +8 -0
  89. package/dist/esm/models/AgentUpdate.js +2 -0
  90. package/dist/esm/models/AppAccountView.d.ts +88 -0
  91. package/dist/esm/models/AppAccountView.js +79 -0
  92. package/dist/esm/models/AppAccountsView.d.ts +66 -0
  93. package/dist/esm/models/AppAccountsView.js +60 -0
  94. package/dist/esm/models/AppResource.d.ts +36 -0
  95. package/dist/esm/models/AppResource.js +12 -0
  96. package/dist/esm/models/AppResourceCheckView.d.ts +74 -0
  97. package/dist/esm/models/AppResourceCheckView.js +63 -0
  98. package/dist/esm/models/AppResourceView.d.ts +68 -0
  99. package/dist/esm/models/AppResourceView.js +67 -0
  100. package/dist/esm/models/AppResourcesView.d.ts +54 -0
  101. package/dist/esm/models/AppResourcesView.js +56 -0
  102. package/dist/esm/models/AppToolsResponse.d.ts +14 -0
  103. package/dist/esm/models/AppToolsResponse.js +4 -0
  104. package/dist/esm/models/AppView.d.ts +42 -0
  105. package/dist/esm/models/AppView.js +14 -0
  106. package/dist/esm/models/ArtifactVersionResponse.d.ts +94 -0
  107. package/dist/esm/models/ArtifactVersionResponse.js +80 -0
  108. package/dist/esm/models/AttachedAgent.d.ts +44 -0
  109. package/dist/esm/models/AttachedAgent.js +49 -0
  110. package/dist/esm/models/Auth.d.ts +30 -0
  111. package/dist/esm/models/Auth.js +52 -0
  112. package/dist/esm/models/BindCustomApiBody.d.ts +32 -0
  113. package/dist/esm/models/BindCustomApiBody.js +43 -0
  114. package/dist/esm/models/ConversationArtifact.d.ts +14 -0
  115. package/dist/esm/models/ConversationArtifact.js +9 -0
  116. package/dist/esm/models/CustomApi.d.ts +102 -0
  117. package/dist/esm/models/CustomApi.js +90 -0
  118. package/dist/esm/models/CustomApiBasicAuth.d.ts +51 -0
  119. package/dist/esm/models/CustomApiBasicAuth.js +57 -0
  120. package/dist/esm/models/CustomApiBearerAuth.d.ts +45 -0
  121. package/dist/esm/models/CustomApiBearerAuth.js +53 -0
  122. package/dist/esm/models/CustomApiCreate.d.ts +57 -0
  123. package/dist/esm/models/CustomApiCreate.js +56 -0
  124. package/dist/esm/models/CustomApiHeader.d.ts +44 -0
  125. package/dist/esm/models/CustomApiHeader.js +47 -0
  126. package/dist/esm/models/CustomApiHeadersAuth.d.ts +46 -0
  127. package/dist/esm/models/CustomApiHeadersAuth.js +54 -0
  128. package/dist/esm/models/CustomApiList.d.ts +64 -0
  129. package/dist/esm/models/CustomApiList.js +64 -0
  130. package/dist/esm/models/CustomApiName.d.ts +44 -0
  131. package/dist/esm/models/CustomApiName.js +49 -0
  132. package/dist/esm/models/CustomApiUpdate.d.ts +58 -0
  133. package/dist/esm/models/CustomApiUpdate.js +50 -0
  134. package/dist/esm/models/CustomApiUpdateAuth.d.ts +30 -0
  135. package/dist/esm/models/CustomApiUpdateAuth.js +52 -0
  136. package/dist/esm/models/ErrorDetailItem.d.ts +5 -0
  137. package/dist/esm/models/ListModels403Response.d.ts +23 -0
  138. package/dist/esm/models/ListModels403Response.js +45 -0
  139. package/dist/esm/models/ModelEndpointView.d.ts +38 -0
  140. package/dist/esm/models/ModelEndpointView.js +45 -0
  141. package/dist/esm/models/ModelView.d.ts +69 -0
  142. package/dist/esm/models/ModelView.js +56 -0
  143. package/dist/esm/models/ModelsResponse.d.ts +33 -0
  144. package/dist/esm/models/ModelsResponse.js +44 -0
  145. package/dist/esm/models/SettingsIssueView.d.ts +44 -0
  146. package/dist/esm/models/SettingsIssueView.js +51 -0
  147. package/dist/esm/models/VersionCommitBody.d.ts +44 -0
  148. package/dist/esm/models/VersionCommitBody.js +51 -0
  149. package/dist/esm/models/VersionUploadUrlBody.d.ts +32 -0
  150. package/dist/esm/models/VersionUploadUrlBody.js +43 -0
  151. package/dist/esm/models/index.d.ts +28 -0
  152. package/dist/esm/models/index.js +28 -0
  153. package/dist/models/AgentChannelRef.d.ts +1 -0
  154. package/dist/models/AgentChannelRef.js +2 -1
  155. package/dist/models/AgentConversationDetail.d.ts +15 -2
  156. package/dist/models/AgentConversationDetail.js +6 -4
  157. package/dist/models/AgentConversationView.d.ts +11 -5
  158. package/dist/models/AgentConversationView.js +4 -4
  159. package/dist/models/AgentCreate.d.ts +8 -0
  160. package/dist/models/AgentCreate.js +2 -0
  161. package/dist/models/AgentCustomApiList.d.ts +33 -0
  162. package/dist/models/AgentCustomApiList.js +51 -0
  163. package/dist/models/AgentResource.d.ts +14 -0
  164. package/dist/models/AgentResource.js +4 -0
  165. package/dist/models/AgentSettingsResponse.d.ts +53 -0
  166. package/dist/models/AgentSettingsResponse.js +59 -0
  167. package/dist/models/AgentUpdate.d.ts +8 -0
  168. package/dist/models/AgentUpdate.js +2 -0
  169. package/dist/models/AppAccountView.d.ts +88 -0
  170. package/dist/models/AppAccountView.js +87 -0
  171. package/dist/models/AppAccountsView.d.ts +66 -0
  172. package/dist/models/AppAccountsView.js +68 -0
  173. package/dist/models/AppResource.d.ts +36 -0
  174. package/dist/models/AppResource.js +12 -0
  175. package/dist/models/AppResourceCheckView.d.ts +74 -0
  176. package/dist/models/AppResourceCheckView.js +71 -0
  177. package/dist/models/AppResourceView.d.ts +68 -0
  178. package/dist/models/AppResourceView.js +74 -0
  179. package/dist/models/AppResourcesView.d.ts +54 -0
  180. package/dist/models/AppResourcesView.js +64 -0
  181. package/dist/models/AppToolsResponse.d.ts +14 -0
  182. package/dist/models/AppToolsResponse.js +4 -0
  183. package/dist/models/AppView.d.ts +42 -0
  184. package/dist/models/AppView.js +14 -0
  185. package/dist/models/ArtifactVersionResponse.d.ts +94 -0
  186. package/dist/models/ArtifactVersionResponse.js +88 -0
  187. package/dist/models/AttachedAgent.d.ts +44 -0
  188. package/dist/models/AttachedAgent.js +56 -0
  189. package/dist/models/Auth.d.ts +30 -0
  190. package/dist/models/Auth.js +58 -0
  191. package/dist/models/BindCustomApiBody.d.ts +32 -0
  192. package/dist/models/BindCustomApiBody.js +50 -0
  193. package/dist/models/ConversationArtifact.d.ts +14 -0
  194. package/dist/models/ConversationArtifact.js +10 -0
  195. package/dist/models/CustomApi.d.ts +102 -0
  196. package/dist/models/CustomApi.js +98 -0
  197. package/dist/models/CustomApiBasicAuth.d.ts +51 -0
  198. package/dist/models/CustomApiBasicAuth.js +65 -0
  199. package/dist/models/CustomApiBearerAuth.d.ts +45 -0
  200. package/dist/models/CustomApiBearerAuth.js +61 -0
  201. package/dist/models/CustomApiCreate.d.ts +57 -0
  202. package/dist/models/CustomApiCreate.js +63 -0
  203. package/dist/models/CustomApiHeader.d.ts +44 -0
  204. package/dist/models/CustomApiHeader.js +54 -0
  205. package/dist/models/CustomApiHeadersAuth.d.ts +46 -0
  206. package/dist/models/CustomApiHeadersAuth.js +62 -0
  207. package/dist/models/CustomApiList.d.ts +64 -0
  208. package/dist/models/CustomApiList.js +71 -0
  209. package/dist/models/CustomApiName.d.ts +44 -0
  210. package/dist/models/CustomApiName.js +56 -0
  211. package/dist/models/CustomApiUpdate.d.ts +58 -0
  212. package/dist/models/CustomApiUpdate.js +57 -0
  213. package/dist/models/CustomApiUpdateAuth.d.ts +30 -0
  214. package/dist/models/CustomApiUpdateAuth.js +58 -0
  215. package/dist/models/ErrorDetailItem.d.ts +5 -0
  216. package/dist/models/ListModels403Response.d.ts +23 -0
  217. package/dist/models/ListModels403Response.js +51 -0
  218. package/dist/models/ModelEndpointView.d.ts +38 -0
  219. package/dist/models/ModelEndpointView.js +52 -0
  220. package/dist/models/ModelView.d.ts +69 -0
  221. package/dist/models/ModelView.js +63 -0
  222. package/dist/models/ModelsResponse.d.ts +33 -0
  223. package/dist/models/ModelsResponse.js +51 -0
  224. package/dist/models/SettingsIssueView.d.ts +44 -0
  225. package/dist/models/SettingsIssueView.js +58 -0
  226. package/dist/models/VersionCommitBody.d.ts +44 -0
  227. package/dist/models/VersionCommitBody.js +58 -0
  228. package/dist/models/VersionUploadUrlBody.d.ts +32 -0
  229. package/dist/models/VersionUploadUrlBody.js +50 -0
  230. package/dist/models/index.d.ts +28 -0
  231. package/dist/models/index.js +28 -0
  232. package/package.json +15 -2
  233. package/src/apis/AgentConversationsApi.ts +172 -3
  234. package/src/apis/AgentsApi.ts +242 -7
  235. package/src/apis/AppsApi.ts +174 -3
  236. package/src/apis/ArtifactsApi.ts +144 -0
  237. package/src/apis/ClarifyApi.ts +3 -3
  238. package/src/apis/CollectionsApi.ts +3 -3
  239. package/src/apis/ConversationsApi.ts +3 -3
  240. package/src/apis/CronsApi.ts +3 -3
  241. package/src/apis/CustomAPIsApi.ts +471 -0
  242. package/src/apis/MessagesApi.ts +3 -3
  243. package/src/apis/ModelsApi.ts +70 -0
  244. package/src/apis/QueueApi.ts +3 -3
  245. package/src/apis/ResponsesApi.ts +3 -3
  246. package/src/apis/SkillsApi.ts +3 -3
  247. package/src/apis/index.ts +2 -0
  248. package/src/compose/agent.ts +223 -0
  249. package/src/compose/deploy.ts +168 -0
  250. package/src/compose/errors.ts +66 -0
  251. package/src/compose/events.ts +122 -0
  252. package/src/compose/fingerprint.ts +74 -0
  253. package/src/compose/index.ts +13 -0
  254. package/src/compose/run.ts +601 -0
  255. package/src/compose/runState.ts +95 -0
  256. package/src/compose/settingsTransport.ts +299 -0
  257. package/src/compose/tools.ts +27 -0
  258. package/src/compose/transport.ts +48 -0
  259. package/src/models/AgentChannelRef.ts +2 -1
  260. package/src/models/AgentConversationDetail.ts +21 -5
  261. package/src/models/AgentConversationView.ts +15 -8
  262. package/src/models/AgentCreate.ts +8 -0
  263. package/src/models/AgentCustomApiList.ts +74 -0
  264. package/src/models/AgentResource.ts +16 -0
  265. package/src/models/AgentSettingsResponse.ts +99 -0
  266. package/src/models/AgentUpdate.ts +8 -0
  267. package/src/models/AppAccountView.ts +143 -0
  268. package/src/models/AppAccountsView.ts +118 -0
  269. package/src/models/AppResource.ts +48 -0
  270. package/src/models/AppResourceCheckView.ts +117 -0
  271. package/src/models/AppResourceView.ts +120 -0
  272. package/src/models/AppResourcesView.ts +102 -0
  273. package/src/models/AppToolsResponse.ts +16 -0
  274. package/src/models/AppView.ts +56 -0
  275. package/src/models/ArtifactVersionResponse.ts +155 -0
  276. package/src/models/AttachedAgent.ts +83 -0
  277. package/src/models/Auth.ts +84 -0
  278. package/src/models/BindCustomApiBody.ts +66 -0
  279. package/src/models/ConversationArtifact.ts +19 -0
  280. package/src/models/CustomApi.ts +175 -0
  281. package/src/models/CustomApiBasicAuth.ts +94 -0
  282. package/src/models/CustomApiBearerAuth.ts +85 -0
  283. package/src/models/CustomApiCreate.ts +108 -0
  284. package/src/models/CustomApiHeader.ts +82 -0
  285. package/src/models/CustomApiHeadersAuth.ts +93 -0
  286. package/src/models/CustomApiList.ts +120 -0
  287. package/src/models/CustomApiName.ts +83 -0
  288. package/src/models/CustomApiUpdate.ts +106 -0
  289. package/src/models/CustomApiUpdateAuth.ts +84 -0
  290. package/src/models/ErrorDetailItem.ts +5 -0
  291. package/src/models/ListModels403Response.ts +73 -0
  292. package/src/models/ModelEndpointView.ts +74 -0
  293. package/src/models/ModelView.ts +122 -0
  294. package/src/models/ModelsResponse.ts +74 -0
  295. package/src/models/SettingsIssueView.ts +84 -0
  296. package/src/models/VersionCommitBody.ts +84 -0
  297. package/src/models/VersionUploadUrlBody.ts +66 -0
  298. package/src/models/index.ts +28 -0
@@ -0,0 +1,120 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sarvam Agents API
5
+ * Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: support@sarvam.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { CustomApi } from './CustomApi.js';
17
+ import {
18
+ CustomApiFromJSON,
19
+ CustomApiFromJSONTyped,
20
+ CustomApiToJSON,
21
+ CustomApiToJSONTyped,
22
+ } from './CustomApi.js';
23
+
24
+ /**
25
+ * One page, in the v2 list envelope (``EntityList`` without
26
+ * ``entityType``: Custom APIs are not a catalog entity).
27
+ * @export
28
+ * @interface CustomApiList
29
+ */
30
+ export interface CustomApiList {
31
+ /**
32
+ *
33
+ * @type {Array<CustomApi>}
34
+ * @memberof CustomApiList
35
+ */
36
+ data: Array<CustomApi>;
37
+ /**
38
+ *
39
+ * @type {number}
40
+ * @memberof CustomApiList
41
+ */
42
+ total: number;
43
+ /**
44
+ *
45
+ * @type {number}
46
+ * @memberof CustomApiList
47
+ */
48
+ limit: number;
49
+ /**
50
+ *
51
+ * @type {number}
52
+ * @memberof CustomApiList
53
+ */
54
+ offset: number;
55
+ /**
56
+ *
57
+ * @type {boolean}
58
+ * @memberof CustomApiList
59
+ */
60
+ hasMore: boolean;
61
+ /**
62
+ *
63
+ * @type {number}
64
+ * @memberof CustomApiList
65
+ */
66
+ enabledCount: number;
67
+ }
68
+
69
+ /**
70
+ * Check if a given object implements the CustomApiList interface.
71
+ */
72
+ export function instanceOfCustomApiList(value: object): value is CustomApiList {
73
+ if (!('data' in value) || value['data'] === undefined) return false;
74
+ if (!('total' in value) || value['total'] === undefined) return false;
75
+ if (!('limit' in value) || value['limit'] === undefined) return false;
76
+ if (!('offset' in value) || value['offset'] === undefined) return false;
77
+ if (!('hasMore' in value) || value['hasMore'] === undefined) return false;
78
+ if (!('enabledCount' in value) || value['enabledCount'] === undefined) return false;
79
+ return true;
80
+ }
81
+
82
+ export function CustomApiListFromJSON(json: any): CustomApiList {
83
+ return CustomApiListFromJSONTyped(json, false);
84
+ }
85
+
86
+ export function CustomApiListFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomApiList {
87
+ if (json == null) {
88
+ return json;
89
+ }
90
+ return {
91
+
92
+ 'data': ((json['data'] as Array<any>).map(CustomApiFromJSON)),
93
+ 'total': json['total'],
94
+ 'limit': json['limit'],
95
+ 'offset': json['offset'],
96
+ 'hasMore': json['hasMore'],
97
+ 'enabledCount': json['enabledCount'],
98
+ };
99
+ }
100
+
101
+ export function CustomApiListToJSON(json: any): CustomApiList {
102
+ return CustomApiListToJSONTyped(json, false);
103
+ }
104
+
105
+ export function CustomApiListToJSONTyped(value?: CustomApiList | null, ignoreDiscriminator: boolean = false): any {
106
+ if (value == null) {
107
+ return value;
108
+ }
109
+
110
+ return {
111
+
112
+ 'data': ((value['data'] as Array<any>).map(CustomApiToJSON)),
113
+ 'total': value['total'],
114
+ 'limit': value['limit'],
115
+ 'offset': value['offset'],
116
+ 'hasMore': value['hasMore'],
117
+ 'enabledCount': value['enabledCount'],
118
+ };
119
+ }
120
+
@@ -0,0 +1,83 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sarvam Agents API
5
+ * Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: support@sarvam.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ /**
17
+ * What an agent's viewers see of an attached API: its name, nothing else.
18
+ * @export
19
+ * @interface CustomApiName
20
+ */
21
+ export interface CustomApiName {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof CustomApiName
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof CustomApiName
32
+ */
33
+ name: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof CustomApiName
38
+ */
39
+ host?: string | null;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the CustomApiName interface.
44
+ */
45
+ export function instanceOfCustomApiName(value: object): value is CustomApiName {
46
+ if (!('id' in value) || value['id'] === undefined) return false;
47
+ if (!('name' in value) || value['name'] === undefined) return false;
48
+ return true;
49
+ }
50
+
51
+ export function CustomApiNameFromJSON(json: any): CustomApiName {
52
+ return CustomApiNameFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function CustomApiNameFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomApiName {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'id': json['id'],
62
+ 'name': json['name'],
63
+ 'host': json['host'] == null ? undefined : json['host'],
64
+ };
65
+ }
66
+
67
+ export function CustomApiNameToJSON(json: any): CustomApiName {
68
+ return CustomApiNameToJSONTyped(json, false);
69
+ }
70
+
71
+ export function CustomApiNameToJSONTyped(value?: CustomApiName | null, ignoreDiscriminator: boolean = false): any {
72
+ if (value == null) {
73
+ return value;
74
+ }
75
+
76
+ return {
77
+
78
+ 'id': value['id'],
79
+ 'name': value['name'],
80
+ 'host': value['host'],
81
+ };
82
+ }
83
+
@@ -0,0 +1,106 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sarvam Agents API
5
+ * Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: support@sarvam.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { CustomApiUpdateAuth } from './CustomApiUpdateAuth.js';
17
+ import {
18
+ CustomApiUpdateAuthFromJSON,
19
+ CustomApiUpdateAuthFromJSONTyped,
20
+ CustomApiUpdateAuthToJSON,
21
+ CustomApiUpdateAuthToJSONTyped,
22
+ } from './CustomApiUpdateAuth.js';
23
+
24
+ /**
25
+ * Every field optional. ``auth`` replaces the credentials (and the auth
26
+ * type) whole; omit it to keep them. Attachments are kept either way.
27
+ * @export
28
+ * @interface CustomApiUpdate
29
+ */
30
+ export interface CustomApiUpdate {
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof CustomApiUpdate
35
+ */
36
+ name?: string | null;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof CustomApiUpdate
41
+ */
42
+ description?: string | null;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof CustomApiUpdate
47
+ */
48
+ host?: string | null;
49
+ /**
50
+ *
51
+ * @type {CustomApiUpdateAuth}
52
+ * @memberof CustomApiUpdate
53
+ */
54
+ auth?: CustomApiUpdateAuth | null;
55
+ /**
56
+ *
57
+ * @type {boolean}
58
+ * @memberof CustomApiUpdate
59
+ */
60
+ enabledForChats?: boolean | null;
61
+ }
62
+
63
+ /**
64
+ * Check if a given object implements the CustomApiUpdate interface.
65
+ */
66
+ export function instanceOfCustomApiUpdate(value: object): value is CustomApiUpdate {
67
+ return true;
68
+ }
69
+
70
+ export function CustomApiUpdateFromJSON(json: any): CustomApiUpdate {
71
+ return CustomApiUpdateFromJSONTyped(json, false);
72
+ }
73
+
74
+ export function CustomApiUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomApiUpdate {
75
+ if (json == null) {
76
+ return json;
77
+ }
78
+ return {
79
+
80
+ 'name': json['name'] == null ? undefined : json['name'],
81
+ 'description': json['description'] == null ? undefined : json['description'],
82
+ 'host': json['host'] == null ? undefined : json['host'],
83
+ 'auth': json['auth'] == null ? undefined : CustomApiUpdateAuthFromJSON(json['auth']),
84
+ 'enabledForChats': json['enabledForChats'] == null ? undefined : json['enabledForChats'],
85
+ };
86
+ }
87
+
88
+ export function CustomApiUpdateToJSON(json: any): CustomApiUpdate {
89
+ return CustomApiUpdateToJSONTyped(json, false);
90
+ }
91
+
92
+ export function CustomApiUpdateToJSONTyped(value?: CustomApiUpdate | null, ignoreDiscriminator: boolean = false): any {
93
+ if (value == null) {
94
+ return value;
95
+ }
96
+
97
+ return {
98
+
99
+ 'name': value['name'],
100
+ 'description': value['description'],
101
+ 'host': value['host'],
102
+ 'auth': CustomApiUpdateAuthToJSON(value['auth']),
103
+ 'enabledForChats': value['enabledForChats'],
104
+ };
105
+ }
106
+
@@ -0,0 +1,84 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sarvam Agents API
5
+ * Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: support@sarvam.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import type { CustomApiBasicAuth } from './CustomApiBasicAuth.js';
16
+ import {
17
+ instanceOfCustomApiBasicAuth,
18
+ CustomApiBasicAuthFromJSON,
19
+ CustomApiBasicAuthFromJSONTyped,
20
+ CustomApiBasicAuthToJSON,
21
+ } from './CustomApiBasicAuth.js';
22
+ import type { CustomApiBearerAuth } from './CustomApiBearerAuth.js';
23
+ import {
24
+ instanceOfCustomApiBearerAuth,
25
+ CustomApiBearerAuthFromJSON,
26
+ CustomApiBearerAuthFromJSONTyped,
27
+ CustomApiBearerAuthToJSON,
28
+ } from './CustomApiBearerAuth.js';
29
+ import type { CustomApiHeadersAuth } from './CustomApiHeadersAuth.js';
30
+ import {
31
+ instanceOfCustomApiHeadersAuth,
32
+ CustomApiHeadersAuthFromJSON,
33
+ CustomApiHeadersAuthFromJSONTyped,
34
+ CustomApiHeadersAuthToJSON,
35
+ } from './CustomApiHeadersAuth.js';
36
+
37
+ /**
38
+ * @type CustomApiUpdateAuth
39
+ *
40
+ * @export
41
+ */
42
+ export type CustomApiUpdateAuth = { type: 'basic' } & CustomApiBasicAuth | { type: 'bearer' } & CustomApiBearerAuth | { type: 'headers' } & CustomApiHeadersAuth;
43
+
44
+ export function CustomApiUpdateAuthFromJSON(json: any): CustomApiUpdateAuth {
45
+ return CustomApiUpdateAuthFromJSONTyped(json, false);
46
+ }
47
+
48
+ export function CustomApiUpdateAuthFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomApiUpdateAuth {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ switch (json['type']) {
53
+ case 'basic':
54
+ return Object.assign({}, CustomApiBasicAuthFromJSONTyped(json, true), { type: 'basic' } as const);
55
+ case 'bearer':
56
+ return Object.assign({}, CustomApiBearerAuthFromJSONTyped(json, true), { type: 'bearer' } as const);
57
+ case 'headers':
58
+ return Object.assign({}, CustomApiHeadersAuthFromJSONTyped(json, true), { type: 'headers' } as const);
59
+ default:
60
+ throw new Error(`No variant of CustomApiUpdateAuth exists with 'type=${json['type']}'`);
61
+ }
62
+ }
63
+
64
+ export function CustomApiUpdateAuthToJSON(json: any): any {
65
+ return CustomApiUpdateAuthToJSONTyped(json, false);
66
+ }
67
+
68
+ export function CustomApiUpdateAuthToJSONTyped(value?: CustomApiUpdateAuth | null, ignoreDiscriminator: boolean = false): any {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+ switch (value['type']) {
73
+ case 'basic':
74
+ return Object.assign({}, CustomApiBasicAuthToJSON(value), { type: 'basic' } as const);
75
+ case 'bearer':
76
+ return Object.assign({}, CustomApiBearerAuthToJSON(value), { type: 'bearer' } as const);
77
+ case 'headers':
78
+ return Object.assign({}, CustomApiHeadersAuthToJSON(value), { type: 'headers' } as const);
79
+ default:
80
+ throw new Error(`No variant of CustomApiUpdateAuth exists with 'type=${value['type']}'`);
81
+ }
82
+
83
+ }
84
+
@@ -50,6 +50,11 @@ import {
50
50
  * (EntityType vocab: skill|app|collection), ``currentScope`` and
51
51
  * ``requiredScope`` (FE scope vocab) — drive the publish-first-then-attach
52
52
  * flow.
53
+ * - ``AGENT_NOT_DEPLOYED`` (409 on an ``origin=managed_agents`` conversation
54
+ * or turn): carries ``agentId``.
55
+ * - ``SERVICE_TOKEN_EXISTS`` (409 on ``POST /v1/service-tokens``): carries
56
+ * ``tokenId`` and ``tokenPrefix`` of the caller's live token, when it still
57
+ * exists at the time of the read.
53
58
  *
54
59
  * ``extra="allow"``: entries from other producers (request-validation
55
60
  * errors, quota facts) ride in the same list with their own keys, so every
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sarvam Agents API
5
+ * Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: support@sarvam.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import type { ChatError } from './ChatError.js';
16
+ import {
17
+ instanceOfChatError,
18
+ ChatErrorFromJSON,
19
+ ChatErrorFromJSONTyped,
20
+ ChatErrorToJSON,
21
+ } from './ChatError.js';
22
+ import type { ProductGateWaitlisted } from './ProductGateWaitlisted.js';
23
+ import {
24
+ instanceOfProductGateWaitlisted,
25
+ ProductGateWaitlistedFromJSON,
26
+ ProductGateWaitlistedFromJSONTyped,
27
+ ProductGateWaitlistedToJSON,
28
+ } from './ProductGateWaitlisted.js';
29
+
30
+ /**
31
+ * @type ListModels403Response
32
+ *
33
+ * @export
34
+ */
35
+ export type ListModels403Response = ChatError | ProductGateWaitlisted;
36
+
37
+ export function ListModels403ResponseFromJSON(json: any): ListModels403Response {
38
+ return ListModels403ResponseFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function ListModels403ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListModels403Response {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ if (instanceOfChatError(json)) {
46
+ return ChatErrorFromJSONTyped(json, true);
47
+ }
48
+ if (instanceOfProductGateWaitlisted(json)) {
49
+ return ProductGateWaitlistedFromJSONTyped(json, true);
50
+ }
51
+
52
+ return {} as any;
53
+ }
54
+
55
+ export function ListModels403ResponseToJSON(json: any): any {
56
+ return ListModels403ResponseToJSONTyped(json, false);
57
+ }
58
+
59
+ export function ListModels403ResponseToJSONTyped(value?: ListModels403Response | null, ignoreDiscriminator: boolean = false): any {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+
64
+ if (instanceOfChatError(value)) {
65
+ return ChatErrorToJSON(value as ChatError);
66
+ }
67
+ if (instanceOfProductGateWaitlisted(value)) {
68
+ return ProductGateWaitlistedToJSON(value as ProductGateWaitlisted);
69
+ }
70
+
71
+ return {};
72
+ }
73
+
@@ -0,0 +1,74 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sarvam Agents API
5
+ * Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: support@sarvam.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ModelEndpointView
20
+ */
21
+ export interface ModelEndpointView {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ModelEndpointView
26
+ */
27
+ name: string;
28
+ /**
29
+ *
30
+ * @type {boolean}
31
+ * @memberof ModelEndpointView
32
+ */
33
+ isDefault?: boolean;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ModelEndpointView interface.
38
+ */
39
+ export function instanceOfModelEndpointView(value: object): value is ModelEndpointView {
40
+ if (!('name' in value) || value['name'] === undefined) return false;
41
+ return true;
42
+ }
43
+
44
+ export function ModelEndpointViewFromJSON(json: any): ModelEndpointView {
45
+ return ModelEndpointViewFromJSONTyped(json, false);
46
+ }
47
+
48
+ export function ModelEndpointViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelEndpointView {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ return {
53
+
54
+ 'name': json['name'],
55
+ 'isDefault': json['isDefault'] == null ? undefined : json['isDefault'],
56
+ };
57
+ }
58
+
59
+ export function ModelEndpointViewToJSON(json: any): ModelEndpointView {
60
+ return ModelEndpointViewToJSONTyped(json, false);
61
+ }
62
+
63
+ export function ModelEndpointViewToJSONTyped(value?: ModelEndpointView | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'name': value['name'],
71
+ 'isDefault': value['isDefault'],
72
+ };
73
+ }
74
+
@@ -0,0 +1,122 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sarvam Agents API
5
+ * Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: support@sarvam.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { ModelEndpointView } from './ModelEndpointView.js';
17
+ import {
18
+ ModelEndpointViewFromJSON,
19
+ ModelEndpointViewFromJSONTyped,
20
+ ModelEndpointViewToJSON,
21
+ ModelEndpointViewToJSONTyped,
22
+ } from './ModelEndpointView.js';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ModelView
28
+ */
29
+ export interface ModelView {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ModelView
34
+ */
35
+ name: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof ModelView
40
+ */
41
+ displayName?: string | null;
42
+ /**
43
+ *
44
+ * @type {Array<ModelEndpointView>}
45
+ * @memberof ModelView
46
+ */
47
+ endpoints?: Array<ModelEndpointView>;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof ModelView
52
+ */
53
+ contextWindow?: number | null;
54
+ /**
55
+ *
56
+ * @type {boolean}
57
+ * @memberof ModelView
58
+ */
59
+ supportsVision?: boolean | null;
60
+ /**
61
+ *
62
+ * @type {boolean}
63
+ * @memberof ModelView
64
+ */
65
+ supportsStructuredOutput?: boolean | null;
66
+ /**
67
+ *
68
+ * @type {Array<string>}
69
+ * @memberof ModelView
70
+ */
71
+ reasoningLevels?: Array<string> | null;
72
+ }
73
+
74
+ /**
75
+ * Check if a given object implements the ModelView interface.
76
+ */
77
+ export function instanceOfModelView(value: object): value is ModelView {
78
+ if (!('name' in value) || value['name'] === undefined) return false;
79
+ return true;
80
+ }
81
+
82
+ export function ModelViewFromJSON(json: any): ModelView {
83
+ return ModelViewFromJSONTyped(json, false);
84
+ }
85
+
86
+ export function ModelViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelView {
87
+ if (json == null) {
88
+ return json;
89
+ }
90
+ return {
91
+
92
+ 'name': json['name'],
93
+ 'displayName': json['displayName'] == null ? undefined : json['displayName'],
94
+ 'endpoints': json['endpoints'] == null ? undefined : ((json['endpoints'] as Array<any>).map(ModelEndpointViewFromJSON)),
95
+ 'contextWindow': json['contextWindow'] == null ? undefined : json['contextWindow'],
96
+ 'supportsVision': json['supportsVision'] == null ? undefined : json['supportsVision'],
97
+ 'supportsStructuredOutput': json['supportsStructuredOutput'] == null ? undefined : json['supportsStructuredOutput'],
98
+ 'reasoningLevels': json['reasoningLevels'] == null ? undefined : json['reasoningLevels'],
99
+ };
100
+ }
101
+
102
+ export function ModelViewToJSON(json: any): ModelView {
103
+ return ModelViewToJSONTyped(json, false);
104
+ }
105
+
106
+ export function ModelViewToJSONTyped(value?: ModelView | null, ignoreDiscriminator: boolean = false): any {
107
+ if (value == null) {
108
+ return value;
109
+ }
110
+
111
+ return {
112
+
113
+ 'name': value['name'],
114
+ 'displayName': value['displayName'],
115
+ 'endpoints': value['endpoints'] == null ? undefined : ((value['endpoints'] as Array<any>).map(ModelEndpointViewToJSON)),
116
+ 'contextWindow': value['contextWindow'],
117
+ 'supportsVision': value['supportsVision'],
118
+ 'supportsStructuredOutput': value['supportsStructuredOutput'],
119
+ 'reasoningLevels': value['reasoningLevels'],
120
+ };
121
+ }
122
+