sarvam-agents-client 0.1.2 → 0.2.1

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 (303) 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 +44 -0
  17. package/dist/compose/agent.js +222 -0
  18. package/dist/compose/builtins.d.ts +4 -0
  19. package/dist/compose/builtins.js +22 -0
  20. package/dist/compose/deploy.d.ts +30 -0
  21. package/dist/compose/deploy.js +146 -0
  22. package/dist/compose/errors.d.ts +48 -0
  23. package/dist/compose/errors.js +68 -0
  24. package/dist/compose/events.d.ts +63 -0
  25. package/dist/compose/events.js +100 -0
  26. package/dist/compose/fingerprint.d.ts +6 -0
  27. package/dist/compose/fingerprint.js +83 -0
  28. package/dist/compose/index.d.ts +13 -0
  29. package/dist/compose/index.js +33 -0
  30. package/dist/compose/run.d.ts +100 -0
  31. package/dist/compose/run.js +536 -0
  32. package/dist/compose/runState.d.ts +26 -0
  33. package/dist/compose/runState.js +79 -0
  34. package/dist/compose/settingsTransport.d.ts +24 -0
  35. package/dist/compose/settingsTransport.js +280 -0
  36. package/dist/compose/tools.d.ts +17 -0
  37. package/dist/compose/tools.js +44 -0
  38. package/dist/compose/transport.d.ts +34 -0
  39. package/dist/compose/transport.js +2 -0
  40. package/dist/esm/apis/AgentConversationsApi.d.ts +44 -1
  41. package/dist/esm/apis/AgentConversationsApi.js +104 -1
  42. package/dist/esm/apis/AgentsApi.d.ts +77 -5
  43. package/dist/esm/apis/AgentsApi.js +163 -5
  44. package/dist/esm/apis/AppsApi.d.ts +43 -1
  45. package/dist/esm/apis/AppsApi.js +109 -1
  46. package/dist/esm/apis/ArtifactsApi.d.ts +31 -1
  47. package/dist/esm/apis/ArtifactsApi.js +83 -1
  48. package/dist/esm/apis/CustomAPIsApi.d.ts +124 -0
  49. package/dist/esm/apis/CustomAPIsApi.js +301 -0
  50. package/dist/esm/apis/ModelsApi.d.ts +26 -0
  51. package/dist/esm/apis/ModelsApi.js +48 -0
  52. package/dist/esm/apis/index.d.ts +2 -0
  53. package/dist/esm/apis/index.js +2 -0
  54. package/dist/esm/compose/agent.d.ts +44 -0
  55. package/dist/esm/compose/agent.js +218 -0
  56. package/dist/esm/compose/builtins.d.ts +4 -0
  57. package/dist/esm/compose/builtins.js +18 -0
  58. package/dist/esm/compose/deploy.d.ts +30 -0
  59. package/dist/esm/compose/deploy.js +137 -0
  60. package/dist/esm/compose/errors.d.ts +48 -0
  61. package/dist/esm/compose/errors.js +53 -0
  62. package/dist/esm/compose/events.d.ts +63 -0
  63. package/dist/esm/compose/events.js +97 -0
  64. package/dist/esm/compose/fingerprint.d.ts +6 -0
  65. package/dist/esm/compose/fingerprint.js +78 -0
  66. package/dist/esm/compose/index.d.ts +13 -0
  67. package/dist/esm/compose/index.js +8 -0
  68. package/dist/esm/compose/run.d.ts +100 -0
  69. package/dist/esm/compose/run.js +530 -0
  70. package/dist/esm/compose/runState.d.ts +26 -0
  71. package/dist/esm/compose/runState.js +75 -0
  72. package/dist/esm/compose/settingsTransport.d.ts +24 -0
  73. package/dist/esm/compose/settingsTransport.js +276 -0
  74. package/dist/esm/compose/tools.d.ts +17 -0
  75. package/dist/esm/compose/tools.js +34 -0
  76. package/dist/esm/compose/transport.d.ts +34 -0
  77. package/dist/esm/compose/transport.js +1 -0
  78. package/dist/esm/models/AgentChannelRef.d.ts +1 -0
  79. package/dist/esm/models/AgentChannelRef.js +2 -1
  80. package/dist/esm/models/AgentConversationDetail.d.ts +15 -2
  81. package/dist/esm/models/AgentConversationDetail.js +6 -4
  82. package/dist/esm/models/AgentConversationView.d.ts +11 -5
  83. package/dist/esm/models/AgentConversationView.js +4 -4
  84. package/dist/esm/models/AgentCreate.d.ts +8 -0
  85. package/dist/esm/models/AgentCreate.js +2 -0
  86. package/dist/esm/models/AgentCustomApiList.d.ts +33 -0
  87. package/dist/esm/models/AgentCustomApiList.js +44 -0
  88. package/dist/esm/models/AgentResource.d.ts +14 -0
  89. package/dist/esm/models/AgentResource.js +4 -0
  90. package/dist/esm/models/AgentSettingsResponse.d.ts +53 -0
  91. package/dist/esm/models/AgentSettingsResponse.js +52 -0
  92. package/dist/esm/models/AgentUpdate.d.ts +8 -0
  93. package/dist/esm/models/AgentUpdate.js +2 -0
  94. package/dist/esm/models/AppAccountView.d.ts +88 -0
  95. package/dist/esm/models/AppAccountView.js +79 -0
  96. package/dist/esm/models/AppAccountsView.d.ts +66 -0
  97. package/dist/esm/models/AppAccountsView.js +60 -0
  98. package/dist/esm/models/AppResource.d.ts +36 -0
  99. package/dist/esm/models/AppResource.js +12 -0
  100. package/dist/esm/models/AppResourceCheckView.d.ts +74 -0
  101. package/dist/esm/models/AppResourceCheckView.js +63 -0
  102. package/dist/esm/models/AppResourceView.d.ts +68 -0
  103. package/dist/esm/models/AppResourceView.js +67 -0
  104. package/dist/esm/models/AppResourcesView.d.ts +54 -0
  105. package/dist/esm/models/AppResourcesView.js +56 -0
  106. package/dist/esm/models/AppToolsResponse.d.ts +14 -0
  107. package/dist/esm/models/AppToolsResponse.js +4 -0
  108. package/dist/esm/models/AppView.d.ts +42 -0
  109. package/dist/esm/models/AppView.js +14 -0
  110. package/dist/esm/models/ArtifactVersionResponse.d.ts +94 -0
  111. package/dist/esm/models/ArtifactVersionResponse.js +80 -0
  112. package/dist/esm/models/AttachedAgent.d.ts +44 -0
  113. package/dist/esm/models/AttachedAgent.js +49 -0
  114. package/dist/esm/models/Auth.d.ts +30 -0
  115. package/dist/esm/models/Auth.js +52 -0
  116. package/dist/esm/models/BindCustomApiBody.d.ts +32 -0
  117. package/dist/esm/models/BindCustomApiBody.js +43 -0
  118. package/dist/esm/models/ConversationArtifact.d.ts +14 -0
  119. package/dist/esm/models/ConversationArtifact.js +9 -0
  120. package/dist/esm/models/CustomApi.d.ts +102 -0
  121. package/dist/esm/models/CustomApi.js +90 -0
  122. package/dist/esm/models/CustomApiBasicAuth.d.ts +51 -0
  123. package/dist/esm/models/CustomApiBasicAuth.js +57 -0
  124. package/dist/esm/models/CustomApiBearerAuth.d.ts +45 -0
  125. package/dist/esm/models/CustomApiBearerAuth.js +53 -0
  126. package/dist/esm/models/CustomApiCreate.d.ts +57 -0
  127. package/dist/esm/models/CustomApiCreate.js +56 -0
  128. package/dist/esm/models/CustomApiHeader.d.ts +44 -0
  129. package/dist/esm/models/CustomApiHeader.js +47 -0
  130. package/dist/esm/models/CustomApiHeadersAuth.d.ts +46 -0
  131. package/dist/esm/models/CustomApiHeadersAuth.js +54 -0
  132. package/dist/esm/models/CustomApiList.d.ts +64 -0
  133. package/dist/esm/models/CustomApiList.js +64 -0
  134. package/dist/esm/models/CustomApiName.d.ts +44 -0
  135. package/dist/esm/models/CustomApiName.js +49 -0
  136. package/dist/esm/models/CustomApiUpdate.d.ts +58 -0
  137. package/dist/esm/models/CustomApiUpdate.js +50 -0
  138. package/dist/esm/models/CustomApiUpdateAuth.d.ts +30 -0
  139. package/dist/esm/models/CustomApiUpdateAuth.js +52 -0
  140. package/dist/esm/models/ErrorDetailItem.d.ts +5 -0
  141. package/dist/esm/models/ListModels403Response.d.ts +23 -0
  142. package/dist/esm/models/ListModels403Response.js +45 -0
  143. package/dist/esm/models/ModelEndpointView.d.ts +38 -0
  144. package/dist/esm/models/ModelEndpointView.js +45 -0
  145. package/dist/esm/models/ModelView.d.ts +69 -0
  146. package/dist/esm/models/ModelView.js +56 -0
  147. package/dist/esm/models/ModelsResponse.d.ts +33 -0
  148. package/dist/esm/models/ModelsResponse.js +44 -0
  149. package/dist/esm/models/SettingsIssueView.d.ts +44 -0
  150. package/dist/esm/models/SettingsIssueView.js +51 -0
  151. package/dist/esm/models/VersionCommitBody.d.ts +44 -0
  152. package/dist/esm/models/VersionCommitBody.js +51 -0
  153. package/dist/esm/models/VersionUploadUrlBody.d.ts +32 -0
  154. package/dist/esm/models/VersionUploadUrlBody.js +43 -0
  155. package/dist/esm/models/index.d.ts +28 -0
  156. package/dist/esm/models/index.js +28 -0
  157. package/dist/models/AgentChannelRef.d.ts +1 -0
  158. package/dist/models/AgentChannelRef.js +2 -1
  159. package/dist/models/AgentConversationDetail.d.ts +15 -2
  160. package/dist/models/AgentConversationDetail.js +6 -4
  161. package/dist/models/AgentConversationView.d.ts +11 -5
  162. package/dist/models/AgentConversationView.js +4 -4
  163. package/dist/models/AgentCreate.d.ts +8 -0
  164. package/dist/models/AgentCreate.js +2 -0
  165. package/dist/models/AgentCustomApiList.d.ts +33 -0
  166. package/dist/models/AgentCustomApiList.js +51 -0
  167. package/dist/models/AgentResource.d.ts +14 -0
  168. package/dist/models/AgentResource.js +4 -0
  169. package/dist/models/AgentSettingsResponse.d.ts +53 -0
  170. package/dist/models/AgentSettingsResponse.js +59 -0
  171. package/dist/models/AgentUpdate.d.ts +8 -0
  172. package/dist/models/AgentUpdate.js +2 -0
  173. package/dist/models/AppAccountView.d.ts +88 -0
  174. package/dist/models/AppAccountView.js +87 -0
  175. package/dist/models/AppAccountsView.d.ts +66 -0
  176. package/dist/models/AppAccountsView.js +68 -0
  177. package/dist/models/AppResource.d.ts +36 -0
  178. package/dist/models/AppResource.js +12 -0
  179. package/dist/models/AppResourceCheckView.d.ts +74 -0
  180. package/dist/models/AppResourceCheckView.js +71 -0
  181. package/dist/models/AppResourceView.d.ts +68 -0
  182. package/dist/models/AppResourceView.js +74 -0
  183. package/dist/models/AppResourcesView.d.ts +54 -0
  184. package/dist/models/AppResourcesView.js +64 -0
  185. package/dist/models/AppToolsResponse.d.ts +14 -0
  186. package/dist/models/AppToolsResponse.js +4 -0
  187. package/dist/models/AppView.d.ts +42 -0
  188. package/dist/models/AppView.js +14 -0
  189. package/dist/models/ArtifactVersionResponse.d.ts +94 -0
  190. package/dist/models/ArtifactVersionResponse.js +88 -0
  191. package/dist/models/AttachedAgent.d.ts +44 -0
  192. package/dist/models/AttachedAgent.js +56 -0
  193. package/dist/models/Auth.d.ts +30 -0
  194. package/dist/models/Auth.js +58 -0
  195. package/dist/models/BindCustomApiBody.d.ts +32 -0
  196. package/dist/models/BindCustomApiBody.js +50 -0
  197. package/dist/models/ConversationArtifact.d.ts +14 -0
  198. package/dist/models/ConversationArtifact.js +10 -0
  199. package/dist/models/CustomApi.d.ts +102 -0
  200. package/dist/models/CustomApi.js +98 -0
  201. package/dist/models/CustomApiBasicAuth.d.ts +51 -0
  202. package/dist/models/CustomApiBasicAuth.js +65 -0
  203. package/dist/models/CustomApiBearerAuth.d.ts +45 -0
  204. package/dist/models/CustomApiBearerAuth.js +61 -0
  205. package/dist/models/CustomApiCreate.d.ts +57 -0
  206. package/dist/models/CustomApiCreate.js +63 -0
  207. package/dist/models/CustomApiHeader.d.ts +44 -0
  208. package/dist/models/CustomApiHeader.js +54 -0
  209. package/dist/models/CustomApiHeadersAuth.d.ts +46 -0
  210. package/dist/models/CustomApiHeadersAuth.js +62 -0
  211. package/dist/models/CustomApiList.d.ts +64 -0
  212. package/dist/models/CustomApiList.js +71 -0
  213. package/dist/models/CustomApiName.d.ts +44 -0
  214. package/dist/models/CustomApiName.js +56 -0
  215. package/dist/models/CustomApiUpdate.d.ts +58 -0
  216. package/dist/models/CustomApiUpdate.js +57 -0
  217. package/dist/models/CustomApiUpdateAuth.d.ts +30 -0
  218. package/dist/models/CustomApiUpdateAuth.js +58 -0
  219. package/dist/models/ErrorDetailItem.d.ts +5 -0
  220. package/dist/models/ListModels403Response.d.ts +23 -0
  221. package/dist/models/ListModels403Response.js +51 -0
  222. package/dist/models/ModelEndpointView.d.ts +38 -0
  223. package/dist/models/ModelEndpointView.js +52 -0
  224. package/dist/models/ModelView.d.ts +69 -0
  225. package/dist/models/ModelView.js +63 -0
  226. package/dist/models/ModelsResponse.d.ts +33 -0
  227. package/dist/models/ModelsResponse.js +51 -0
  228. package/dist/models/SettingsIssueView.d.ts +44 -0
  229. package/dist/models/SettingsIssueView.js +58 -0
  230. package/dist/models/VersionCommitBody.d.ts +44 -0
  231. package/dist/models/VersionCommitBody.js +58 -0
  232. package/dist/models/VersionUploadUrlBody.d.ts +32 -0
  233. package/dist/models/VersionUploadUrlBody.js +50 -0
  234. package/dist/models/index.d.ts +28 -0
  235. package/dist/models/index.js +28 -0
  236. package/package.json +15 -2
  237. package/src/apis/AgentConversationsApi.ts +172 -3
  238. package/src/apis/AgentsApi.ts +242 -7
  239. package/src/apis/AppsApi.ts +174 -3
  240. package/src/apis/ArtifactsApi.ts +144 -0
  241. package/src/apis/ClarifyApi.ts +3 -3
  242. package/src/apis/CollectionsApi.ts +3 -3
  243. package/src/apis/ConversationsApi.ts +3 -3
  244. package/src/apis/CronsApi.ts +3 -3
  245. package/src/apis/CustomAPIsApi.ts +471 -0
  246. package/src/apis/MessagesApi.ts +3 -3
  247. package/src/apis/ModelsApi.ts +70 -0
  248. package/src/apis/QueueApi.ts +3 -3
  249. package/src/apis/ResponsesApi.ts +3 -3
  250. package/src/apis/SkillsApi.ts +3 -3
  251. package/src/apis/index.ts +2 -0
  252. package/src/compose/agent.ts +254 -0
  253. package/src/compose/builtins.ts +19 -0
  254. package/src/compose/deploy.ts +168 -0
  255. package/src/compose/errors.ts +66 -0
  256. package/src/compose/events.ts +122 -0
  257. package/src/compose/fingerprint.ts +74 -0
  258. package/src/compose/index.ts +13 -0
  259. package/src/compose/run.ts +601 -0
  260. package/src/compose/runState.ts +95 -0
  261. package/src/compose/settingsTransport.ts +299 -0
  262. package/src/compose/tools.ts +42 -0
  263. package/src/compose/transport.ts +48 -0
  264. package/src/models/AgentChannelRef.ts +2 -1
  265. package/src/models/AgentConversationDetail.ts +21 -5
  266. package/src/models/AgentConversationView.ts +15 -8
  267. package/src/models/AgentCreate.ts +8 -0
  268. package/src/models/AgentCustomApiList.ts +74 -0
  269. package/src/models/AgentResource.ts +16 -0
  270. package/src/models/AgentSettingsResponse.ts +99 -0
  271. package/src/models/AgentUpdate.ts +8 -0
  272. package/src/models/AppAccountView.ts +143 -0
  273. package/src/models/AppAccountsView.ts +118 -0
  274. package/src/models/AppResource.ts +48 -0
  275. package/src/models/AppResourceCheckView.ts +117 -0
  276. package/src/models/AppResourceView.ts +120 -0
  277. package/src/models/AppResourcesView.ts +102 -0
  278. package/src/models/AppToolsResponse.ts +16 -0
  279. package/src/models/AppView.ts +56 -0
  280. package/src/models/ArtifactVersionResponse.ts +155 -0
  281. package/src/models/AttachedAgent.ts +83 -0
  282. package/src/models/Auth.ts +84 -0
  283. package/src/models/BindCustomApiBody.ts +66 -0
  284. package/src/models/ConversationArtifact.ts +19 -0
  285. package/src/models/CustomApi.ts +175 -0
  286. package/src/models/CustomApiBasicAuth.ts +94 -0
  287. package/src/models/CustomApiBearerAuth.ts +85 -0
  288. package/src/models/CustomApiCreate.ts +108 -0
  289. package/src/models/CustomApiHeader.ts +82 -0
  290. package/src/models/CustomApiHeadersAuth.ts +93 -0
  291. package/src/models/CustomApiList.ts +120 -0
  292. package/src/models/CustomApiName.ts +83 -0
  293. package/src/models/CustomApiUpdate.ts +106 -0
  294. package/src/models/CustomApiUpdateAuth.ts +84 -0
  295. package/src/models/ErrorDetailItem.ts +5 -0
  296. package/src/models/ListModels403Response.ts +73 -0
  297. package/src/models/ModelEndpointView.ts +74 -0
  298. package/src/models/ModelView.ts +122 -0
  299. package/src/models/ModelsResponse.ts +74 -0
  300. package/src/models/SettingsIssueView.ts +84 -0
  301. package/src/models/VersionCommitBody.ts +84 -0
  302. package/src/models/VersionUploadUrlBody.ts +66 -0
  303. package/src/models/index.ts +28 -0
@@ -18,6 +18,7 @@ import type {
18
18
  AgentCreate,
19
19
  AgentResource,
20
20
  AgentSearchChannel,
21
+ AgentSettingsResponse,
21
22
  AgentTemplateResource,
22
23
  AgentUpdate,
23
24
  ChatError,
@@ -29,7 +30,7 @@ import type {
29
30
  HTTPValidationError,
30
31
  InstructionsBody,
31
32
  InstructionsResponse,
32
- MintUploadUrl403Response,
33
+ ListModels403Response,
33
34
  PageFileNodeView,
34
35
  PublishRequest,
35
36
  Scope,
@@ -41,6 +42,8 @@ import {
41
42
  AgentResourceToJSON,
42
43
  AgentSearchChannelFromJSON,
43
44
  AgentSearchChannelToJSON,
45
+ AgentSettingsResponseFromJSON,
46
+ AgentSettingsResponseToJSON,
44
47
  AgentTemplateResourceFromJSON,
45
48
  AgentTemplateResourceToJSON,
46
49
  AgentUpdateFromJSON,
@@ -63,8 +66,8 @@ import {
63
66
  InstructionsBodyToJSON,
64
67
  InstructionsResponseFromJSON,
65
68
  InstructionsResponseToJSON,
66
- MintUploadUrl403ResponseFromJSON,
67
- MintUploadUrl403ResponseToJSON,
69
+ ListModels403ResponseFromJSON,
70
+ ListModels403ResponseToJSON,
68
71
  PageFileNodeViewFromJSON,
69
72
  PageFileNodeViewToJSON,
70
73
  PublishRequestFromJSON,
@@ -95,6 +98,8 @@ export interface DeployAgentRequest {
95
98
 
96
99
  export interface GetAgentRequest {
97
100
  agentId: string;
101
+ origin?: GetAgentOriginEnum;
102
+ xPanjaOrigin?: GetAgentXPanjaOriginEnum;
98
103
  }
99
104
 
100
105
  export interface GetAgentFileRequest {
@@ -102,6 +107,14 @@ export interface GetAgentFileRequest {
102
107
  filePath: string;
103
108
  }
104
109
 
110
+ export interface GetAgentSettingsRequest {
111
+ agentId: string;
112
+ }
113
+
114
+ export interface GetAgentSettingsSchemaRequest {
115
+ agentId: string;
116
+ }
117
+
105
118
  export interface GetAgentTemplateRequest {
106
119
  templateId: string;
107
120
  }
@@ -142,6 +155,11 @@ export interface ListAgentsRequest {
142
155
  xPanjaOrigin?: ListAgentsXPanjaOriginEnum;
143
156
  }
144
157
 
158
+ export interface PatchAgentSettingsRequest {
159
+ agentId: string;
160
+ body: object;
161
+ }
162
+
145
163
  export interface PublishAgentRequest {
146
164
  agentId: string;
147
165
  publishRequest?: PublishRequest;
@@ -153,6 +171,11 @@ export interface PutAgentFileRequest {
153
171
  fileWriteBody: FileWriteBody;
154
172
  }
155
173
 
174
+ export interface PutAgentSettingsRequest {
175
+ agentId: string;
176
+ body: object;
177
+ }
178
+
156
179
  export interface PutInstructionsRequest {
157
180
  agentId: string;
158
181
  instructionsBody: InstructionsBody;
@@ -368,7 +391,7 @@ export class AgentsApi extends runtime.BaseAPI {
368
391
  }
369
392
 
370
393
  /**
371
- * One agent the caller can see, or 404 (missing and non-visible are indistinguishable).
394
+ * One agent the caller can see, or 404 (missing and non-visible are indistinguishable). ``origin=managed_agents`` is owner-only, matching the managed list: a teammate\'s published agent is a 404 here (not a 403, so the Managed Agents surface never confirms it exists).
372
395
  * Get Agent
373
396
  */
374
397
  async getAgentRaw(requestParameters: GetAgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentResource>> {
@@ -381,8 +404,16 @@ export class AgentsApi extends runtime.BaseAPI {
381
404
 
382
405
  const queryParameters: any = {};
383
406
 
407
+ if (requestParameters['origin'] != null) {
408
+ queryParameters['origin'] = requestParameters['origin'];
409
+ }
410
+
384
411
  const headerParameters: runtime.HTTPHeaders = {};
385
412
 
413
+ if (requestParameters['xPanjaOrigin'] != null) {
414
+ headerParameters['X-Panja-Origin'] = String(requestParameters['xPanjaOrigin']);
415
+ }
416
+
386
417
  if (this.configuration && this.configuration.accessToken) {
387
418
  const token = this.configuration.accessToken;
388
419
  const tokenString = await token("bearerAuth", []);
@@ -402,7 +433,7 @@ export class AgentsApi extends runtime.BaseAPI {
402
433
  }
403
434
 
404
435
  /**
405
- * One agent the caller can see, or 404 (missing and non-visible are indistinguishable).
436
+ * One agent the caller can see, or 404 (missing and non-visible are indistinguishable). ``origin=managed_agents`` is owner-only, matching the managed list: a teammate\'s published agent is a 404 here (not a 403, so the Managed Agents surface never confirms it exists).
406
437
  * Get Agent
407
438
  */
408
439
  async getAgent(requestParameters: GetAgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentResource> {
@@ -458,6 +489,90 @@ export class AgentsApi extends runtime.BaseAPI {
458
489
  return await response.value();
459
490
  }
460
491
 
492
+ /**
493
+ * Get Agent Settings
494
+ */
495
+ async getAgentSettingsRaw(requestParameters: GetAgentSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentSettingsResponse>> {
496
+ if (requestParameters['agentId'] == null) {
497
+ throw new runtime.RequiredError(
498
+ 'agentId',
499
+ 'Required parameter "agentId" was null or undefined when calling getAgentSettings().'
500
+ );
501
+ }
502
+
503
+ const queryParameters: any = {};
504
+
505
+ const headerParameters: runtime.HTTPHeaders = {};
506
+
507
+ if (this.configuration && this.configuration.accessToken) {
508
+ const token = this.configuration.accessToken;
509
+ const tokenString = await token("bearerAuth", []);
510
+
511
+ if (tokenString) {
512
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
513
+ }
514
+ }
515
+ const response = await this.request({
516
+ path: `/v1/agents/{agentId}/settings`.replace(`{${"agentId"}}`, runtime.encodePathParam('agentId', requestParameters['agentId'])),
517
+ method: 'GET',
518
+ headers: headerParameters,
519
+ query: queryParameters,
520
+ }, initOverrides);
521
+
522
+ return new runtime.JSONApiResponse(response, (jsonValue) => AgentSettingsResponseFromJSON(jsonValue));
523
+ }
524
+
525
+ /**
526
+ * Get Agent Settings
527
+ */
528
+ async getAgentSettings(requestParameters: GetAgentSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentSettingsResponse> {
529
+ const response = await this.getAgentSettingsRaw(requestParameters, initOverrides);
530
+ return await response.value();
531
+ }
532
+
533
+ /**
534
+ * JSON Schema of the settings file, with model/endpoint enums from the caller\'s tenant catalog (plain strings when the catalog is empty).
535
+ * Get Agent Settings Schema
536
+ */
537
+ async getAgentSettingsSchemaRaw(requestParameters: GetAgentSettingsSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: any; }>> {
538
+ if (requestParameters['agentId'] == null) {
539
+ throw new runtime.RequiredError(
540
+ 'agentId',
541
+ 'Required parameter "agentId" was null or undefined when calling getAgentSettingsSchema().'
542
+ );
543
+ }
544
+
545
+ const queryParameters: any = {};
546
+
547
+ const headerParameters: runtime.HTTPHeaders = {};
548
+
549
+ if (this.configuration && this.configuration.accessToken) {
550
+ const token = this.configuration.accessToken;
551
+ const tokenString = await token("bearerAuth", []);
552
+
553
+ if (tokenString) {
554
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
555
+ }
556
+ }
557
+ const response = await this.request({
558
+ path: `/v1/agents/{agentId}/settings/schema`.replace(`{${"agentId"}}`, runtime.encodePathParam('agentId', requestParameters['agentId'])),
559
+ method: 'GET',
560
+ headers: headerParameters,
561
+ query: queryParameters,
562
+ }, initOverrides);
563
+
564
+ return new runtime.JSONApiResponse<any>(response);
565
+ }
566
+
567
+ /**
568
+ * JSON Schema of the settings file, with model/endpoint enums from the caller\'s tenant catalog (plain strings when the catalog is empty).
569
+ * Get Agent Settings Schema
570
+ */
571
+ async getAgentSettingsSchema(requestParameters: GetAgentSettingsSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> {
572
+ const response = await this.getAgentSettingsSchemaRaw(requestParameters, initOverrides);
573
+ return await response.value();
574
+ }
575
+
461
576
  /**
462
577
  * One template\'s detail card — the same shape the list returns. 404s for an ordinary agent id: the gateway\'s template route enforces ``is_template=true``, so the gallery detail view can never surface a non-template agent.
463
578
  * Get Agent Template
@@ -688,7 +803,7 @@ export class AgentsApi extends runtime.BaseAPI {
688
803
  }
689
804
 
690
805
  /**
691
- * Flat, scope-filterable agent catalog (contract replaces v1\'s grouped ``GET /v1/agents``; the FE re-groups client-side from each row\'s ``scope``). One gateway call returns the caller\'s full visible set (the triple powers the gateway\'s ``visibility_scope`` clause). We then drop the operator-seeded editor agents, re-apply the visibility predicate (defence in depth — the gateway is identity-agnostic), and apply the ``?scope=``/``q`` filters before counting, so ``total`` is authoritative for the returned set. ``origin=managed_agents`` keeps only managed agents. It always takes the fetch-all path below: the SQL catalog pages at the gateway, which knows nothing about ``managed_agents``, so filtering its page here would return short pages and a wrong ``total``. Catalog-only filters are therefore a 400 with ``origin`` rather than silently ignored.
806
+ * Flat, scope-filterable agent catalog (contract replaces v1\'s grouped ``GET /v1/agents``; the FE re-groups client-side from each row\'s ``scope``). One gateway call returns the caller\'s full visible set (the triple powers the gateway\'s ``visibility_scope`` clause). We then drop the operator-seeded editor agents, re-apply the visibility predicate (defence in depth — the gateway is identity-agnostic), and apply the ``?scope=``/``q`` filters before counting, so ``total`` is authoritative for the returned set. ``origin=managed_agents`` keeps only managed agents the caller owns (:func:`is_owner`). A teammate\'s published managed agent is visible to the caller but its sessions are owner-only, so listing it would only lead to a 403 on the session log. It always takes the fetch-all path below: the SQL catalog pages at the gateway, which knows nothing about ``managed_agents``, so filtering its page here would return short pages and a wrong ``total``. Catalog-only filters are therefore a 400 with ``origin`` rather than silently ignored.
692
807
  * List Agents
693
808
  */
694
809
  async listAgentsRaw(requestParameters: ListAgentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EntityListAgentResource>> {
@@ -763,7 +878,7 @@ export class AgentsApi extends runtime.BaseAPI {
763
878
  }
764
879
 
765
880
  /**
766
- * Flat, scope-filterable agent catalog (contract replaces v1\'s grouped ``GET /v1/agents``; the FE re-groups client-side from each row\'s ``scope``). One gateway call returns the caller\'s full visible set (the triple powers the gateway\'s ``visibility_scope`` clause). We then drop the operator-seeded editor agents, re-apply the visibility predicate (defence in depth — the gateway is identity-agnostic), and apply the ``?scope=``/``q`` filters before counting, so ``total`` is authoritative for the returned set. ``origin=managed_agents`` keeps only managed agents. It always takes the fetch-all path below: the SQL catalog pages at the gateway, which knows nothing about ``managed_agents``, so filtering its page here would return short pages and a wrong ``total``. Catalog-only filters are therefore a 400 with ``origin`` rather than silently ignored.
881
+ * Flat, scope-filterable agent catalog (contract replaces v1\'s grouped ``GET /v1/agents``; the FE re-groups client-side from each row\'s ``scope``). One gateway call returns the caller\'s full visible set (the triple powers the gateway\'s ``visibility_scope`` clause). We then drop the operator-seeded editor agents, re-apply the visibility predicate (defence in depth — the gateway is identity-agnostic), and apply the ``?scope=``/``q`` filters before counting, so ``total`` is authoritative for the returned set. ``origin=managed_agents`` keeps only managed agents the caller owns (:func:`is_owner`). A teammate\'s published managed agent is visible to the caller but its sessions are owner-only, so listing it would only lead to a 403 on the session log. It always takes the fetch-all path below: the SQL catalog pages at the gateway, which knows nothing about ``managed_agents``, so filtering its page here would return short pages and a wrong ``total``. Catalog-only filters are therefore a 400 with ``origin`` rather than silently ignored.
767
882
  * List Agents
768
883
  */
769
884
  async listAgents(requestParameters: ListAgentsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EntityListAgentResource> {
@@ -771,6 +886,59 @@ export class AgentsApi extends runtime.BaseAPI {
771
886
  return await response.value();
772
887
  }
773
888
 
889
+ /**
890
+ * JSON Merge Patch (RFC 7396) onto the latest settings; ``null`` removes a key.
891
+ * Patch Agent Settings
892
+ */
893
+ async patchAgentSettingsRaw(requestParameters: PatchAgentSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentSettingsResponse>> {
894
+ if (requestParameters['agentId'] == null) {
895
+ throw new runtime.RequiredError(
896
+ 'agentId',
897
+ 'Required parameter "agentId" was null or undefined when calling patchAgentSettings().'
898
+ );
899
+ }
900
+
901
+ if (requestParameters['body'] == null) {
902
+ throw new runtime.RequiredError(
903
+ 'body',
904
+ 'Required parameter "body" was null or undefined when calling patchAgentSettings().'
905
+ );
906
+ }
907
+
908
+ const queryParameters: any = {};
909
+
910
+ const headerParameters: runtime.HTTPHeaders = {};
911
+
912
+ headerParameters['Content-Type'] = 'application/json';
913
+
914
+ if (this.configuration && this.configuration.accessToken) {
915
+ const token = this.configuration.accessToken;
916
+ const tokenString = await token("bearerAuth", []);
917
+
918
+ if (tokenString) {
919
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
920
+ }
921
+ }
922
+ const response = await this.request({
923
+ path: `/v1/agents/{agentId}/settings`.replace(`{${"agentId"}}`, runtime.encodePathParam('agentId', requestParameters['agentId'])),
924
+ method: 'PATCH',
925
+ headers: headerParameters,
926
+ query: queryParameters,
927
+ body: requestParameters['body'] as any,
928
+ }, initOverrides);
929
+
930
+ return new runtime.JSONApiResponse(response, (jsonValue) => AgentSettingsResponseFromJSON(jsonValue));
931
+ }
932
+
933
+ /**
934
+ * JSON Merge Patch (RFC 7396) onto the latest settings; ``null`` removes a key.
935
+ * Patch Agent Settings
936
+ */
937
+ async patchAgentSettings(requestParameters: PatchAgentSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentSettingsResponse> {
938
+ const response = await this.patchAgentSettingsRaw(requestParameters, initOverrides);
939
+ return await response.value();
940
+ }
941
+
774
942
  /**
775
943
  * Set the agent\'s audience, cascading owned dependencies gateway-side. Two shapes, one route. With no ``targetScope`` the agent widens exactly one step (user → workspace → organisation) — the original behaviour, kept so existing callers are untouched. With ``targetScope`` it lands on that audience directly, in either direction. Owner-only (checked here for a clean 403 before the gateway call). Gateway 409s (a dependency the caller can\'t widen) surface as ``CHAT_CONFLICT`` with the blocker message. ``targetScope: \"user\"`` is routed to the gateway\'s *unpublish*, not publish: narrowing to private is a different gateway operation (it also heals a legacy null owner), and publish has no ``user`` target at all. Folding it in here rather than making the FE pick an endpoint keeps the share picker a single call for all three options.
776
944
  * Publish Agent
@@ -875,6 +1043,59 @@ export class AgentsApi extends runtime.BaseAPI {
875
1043
  return await response.value();
876
1044
  }
877
1045
 
1046
+ /**
1047
+ * Replace the whole settings object. Body is the settings object itself.
1048
+ * Put Agent Settings
1049
+ */
1050
+ async putAgentSettingsRaw(requestParameters: PutAgentSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentSettingsResponse>> {
1051
+ if (requestParameters['agentId'] == null) {
1052
+ throw new runtime.RequiredError(
1053
+ 'agentId',
1054
+ 'Required parameter "agentId" was null or undefined when calling putAgentSettings().'
1055
+ );
1056
+ }
1057
+
1058
+ if (requestParameters['body'] == null) {
1059
+ throw new runtime.RequiredError(
1060
+ 'body',
1061
+ 'Required parameter "body" was null or undefined when calling putAgentSettings().'
1062
+ );
1063
+ }
1064
+
1065
+ const queryParameters: any = {};
1066
+
1067
+ const headerParameters: runtime.HTTPHeaders = {};
1068
+
1069
+ headerParameters['Content-Type'] = 'application/json';
1070
+
1071
+ if (this.configuration && this.configuration.accessToken) {
1072
+ const token = this.configuration.accessToken;
1073
+ const tokenString = await token("bearerAuth", []);
1074
+
1075
+ if (tokenString) {
1076
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1077
+ }
1078
+ }
1079
+ const response = await this.request({
1080
+ path: `/v1/agents/{agentId}/settings`.replace(`{${"agentId"}}`, runtime.encodePathParam('agentId', requestParameters['agentId'])),
1081
+ method: 'PUT',
1082
+ headers: headerParameters,
1083
+ query: queryParameters,
1084
+ body: requestParameters['body'] as any,
1085
+ }, initOverrides);
1086
+
1087
+ return new runtime.JSONApiResponse(response, (jsonValue) => AgentSettingsResponseFromJSON(jsonValue));
1088
+ }
1089
+
1090
+ /**
1091
+ * Replace the whole settings object. Body is the settings object itself.
1092
+ * Put Agent Settings
1093
+ */
1094
+ async putAgentSettings(requestParameters: PutAgentSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentSettingsResponse> {
1095
+ const response = await this.putAgentSettingsRaw(requestParameters, initOverrides);
1096
+ return await response.value();
1097
+ }
1098
+
878
1099
  /**
879
1100
  * Put Instructions
880
1101
  */
@@ -1098,6 +1319,20 @@ export const CreateAgentXPanjaOriginEnum = {
1098
1319
  ManagedAgents: 'managed_agents'
1099
1320
  } as const;
1100
1321
  export type CreateAgentXPanjaOriginEnum = typeof CreateAgentXPanjaOriginEnum[keyof typeof CreateAgentXPanjaOriginEnum];
1322
+ /**
1323
+ * @export
1324
+ */
1325
+ export const GetAgentOriginEnum = {
1326
+ ManagedAgents: 'managed_agents'
1327
+ } as const;
1328
+ export type GetAgentOriginEnum = typeof GetAgentOriginEnum[keyof typeof GetAgentOriginEnum];
1329
+ /**
1330
+ * @export
1331
+ */
1332
+ export const GetAgentXPanjaOriginEnum = {
1333
+ ManagedAgents: 'managed_agents'
1334
+ } as const;
1335
+ export type GetAgentXPanjaOriginEnum = typeof GetAgentXPanjaOriginEnum[keyof typeof GetAgentXPanjaOriginEnum];
1101
1336
  /**
1102
1337
  * @export
1103
1338
  */
@@ -16,24 +16,33 @@
16
16
  import * as runtime from '../runtime.js';
17
17
  import type {
18
18
  ApiKeyBody,
19
+ AppAccountsView,
19
20
  AppCategory,
20
21
  AppConnectResponse,
22
+ AppResourceCheckView,
23
+ AppResourcesView,
21
24
  AppToolsResponse,
22
25
  ChatError,
23
26
  ConnectBody,
24
27
  EntityListAppResource,
25
28
  HTTPValidationError,
26
- MintUploadUrl403Response,
29
+ ListModels403Response,
27
30
  PageAppView,
28
31
  Scope,
29
32
  } from '../models/index.js';
30
33
  import {
31
34
  ApiKeyBodyFromJSON,
32
35
  ApiKeyBodyToJSON,
36
+ AppAccountsViewFromJSON,
37
+ AppAccountsViewToJSON,
33
38
  AppCategoryFromJSON,
34
39
  AppCategoryToJSON,
35
40
  AppConnectResponseFromJSON,
36
41
  AppConnectResponseToJSON,
42
+ AppResourceCheckViewFromJSON,
43
+ AppResourceCheckViewToJSON,
44
+ AppResourcesViewFromJSON,
45
+ AppResourcesViewToJSON,
37
46
  AppToolsResponseFromJSON,
38
47
  AppToolsResponseToJSON,
39
48
  ChatErrorFromJSON,
@@ -44,8 +53,8 @@ import {
44
53
  EntityListAppResourceToJSON,
45
54
  HTTPValidationErrorFromJSON,
46
55
  HTTPValidationErrorToJSON,
47
- MintUploadUrl403ResponseFromJSON,
48
- MintUploadUrl403ResponseToJSON,
56
+ ListModels403ResponseFromJSON,
57
+ ListModels403ResponseToJSON,
49
58
  PageAppViewFromJSON,
50
59
  PageAppViewToJSON,
51
60
  ScopeFromJSON,
@@ -57,6 +66,12 @@ export interface BindAppRequest {
57
66
  mcpId: string;
58
67
  }
59
68
 
69
+ export interface CheckAppResourceRequest {
70
+ integrationId: string;
71
+ namespace: string;
72
+ name: string;
73
+ }
74
+
60
75
  export interface ConnectAppRequest {
61
76
  integrationId: string;
62
77
  connectBody?: ConnectBody;
@@ -71,10 +86,19 @@ export interface DisconnectAppRequest {
71
86
  integrationId: string;
72
87
  }
73
88
 
89
+ export interface GetAppAccountsRequest {
90
+ integrationId: string;
91
+ }
92
+
74
93
  export interface ListAgentAppsRequest {
75
94
  agentId: string;
76
95
  }
77
96
 
97
+ export interface ListAppResourcesRequest {
98
+ integrationId: string;
99
+ q?: string | null;
100
+ }
101
+
78
102
  export interface ListAppToolsRequest {
79
103
  integrationId: string;
80
104
  }
@@ -145,6 +169,63 @@ export class AppsApi extends runtime.BaseAPI {
145
169
  await this.bindAppRaw(requestParameters, initOverrides);
146
170
  }
147
171
 
172
+ /**
173
+ * Whether the connector can work in ``namespace/name`` for the caller. ``actionUrl`` is the provider page that fixes it: the owner\'s account (select the resource, or send the org an access request) or a new account with the owner preselected. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, not a managed connector, or an invalid namespace/name - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
174
+ * Check App Resource
175
+ */
176
+ async checkAppResourceRaw(requestParameters: CheckAppResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppResourceCheckView>> {
177
+ if (requestParameters['integrationId'] == null) {
178
+ throw new runtime.RequiredError(
179
+ 'integrationId',
180
+ 'Required parameter "integrationId" was null or undefined when calling checkAppResource().'
181
+ );
182
+ }
183
+
184
+ if (requestParameters['namespace'] == null) {
185
+ throw new runtime.RequiredError(
186
+ 'namespace',
187
+ 'Required parameter "namespace" was null or undefined when calling checkAppResource().'
188
+ );
189
+ }
190
+
191
+ if (requestParameters['name'] == null) {
192
+ throw new runtime.RequiredError(
193
+ 'name',
194
+ 'Required parameter "name" was null or undefined when calling checkAppResource().'
195
+ );
196
+ }
197
+
198
+ const queryParameters: any = {};
199
+
200
+ const headerParameters: runtime.HTTPHeaders = {};
201
+
202
+ if (this.configuration && this.configuration.accessToken) {
203
+ const token = this.configuration.accessToken;
204
+ const tokenString = await token("bearerAuth", []);
205
+
206
+ if (tokenString) {
207
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
208
+ }
209
+ }
210
+ const response = await this.request({
211
+ path: `/v1/apps/{integrationId}/resources/{namespace}/{name}`.replace(`{${"integrationId"}}`, runtime.encodePathParam('integrationId', requestParameters['integrationId'])).replace(`{${"namespace"}}`, runtime.encodePathParam('namespace', requestParameters['namespace'])).replace(`{${"name"}}`, runtime.encodePathParam('name', requestParameters['name'])),
212
+ method: 'GET',
213
+ headers: headerParameters,
214
+ query: queryParameters,
215
+ }, initOverrides);
216
+
217
+ return new runtime.JSONApiResponse(response, (jsonValue) => AppResourceCheckViewFromJSON(jsonValue));
218
+ }
219
+
220
+ /**
221
+ * Whether the connector can work in ``namespace/name`` for the caller. ``actionUrl`` is the provider page that fixes it: the owner\'s account (select the resource, or send the org an access request) or a new account with the owner preselected. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, not a managed connector, or an invalid namespace/name - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
222
+ * Check App Resource
223
+ */
224
+ async checkAppResource(requestParameters: CheckAppResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppResourceCheckView> {
225
+ const response = await this.checkAppResourceRaw(requestParameters, initOverrides);
226
+ return await response.value();
227
+ }
228
+
148
229
  /**
149
230
  * Start the OAuth connect flow for a connector. ``integration_id`` accepts either the human slug (``github``, ``composio-notion``) or the MCP ULID (``01MCPGH…``) — the database id. Resolution matches on both (see :func:`_resolve_mcp`). The ULID is the preferred identifier: it is what ``GET /v1/apps`` returns as ``mcpId`` and what ``GET /v2/apps`` returns as ``id``, so a caller that already holds the connector row never needs to resolve a slug.
150
231
  * Connect App
@@ -285,6 +366,49 @@ export class AppsApi extends runtime.BaseAPI {
285
366
  await this.disconnectAppRaw(requestParameters, initOverrides);
286
367
  }
287
368
 
369
+ /**
370
+ * The connected identity and linked accounts for a managed-connector card. Accounts are the ones this connector has that the caller can reach with their own connection. ``addAccountUrl`` adds another account; each account\'s ``manageUrl`` opens the provider page for choosing resources (or, for an org member, requesting access). Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
371
+ * Get App Accounts
372
+ */
373
+ async getAppAccountsRaw(requestParameters: GetAppAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppAccountsView>> {
374
+ if (requestParameters['integrationId'] == null) {
375
+ throw new runtime.RequiredError(
376
+ 'integrationId',
377
+ 'Required parameter "integrationId" was null or undefined when calling getAppAccounts().'
378
+ );
379
+ }
380
+
381
+ const queryParameters: any = {};
382
+
383
+ const headerParameters: runtime.HTTPHeaders = {};
384
+
385
+ if (this.configuration && this.configuration.accessToken) {
386
+ const token = this.configuration.accessToken;
387
+ const tokenString = await token("bearerAuth", []);
388
+
389
+ if (tokenString) {
390
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
391
+ }
392
+ }
393
+ const response = await this.request({
394
+ path: `/v1/apps/{integrationId}/accounts`.replace(`{${"integrationId"}}`, runtime.encodePathParam('integrationId', requestParameters['integrationId'])),
395
+ method: 'GET',
396
+ headers: headerParameters,
397
+ query: queryParameters,
398
+ }, initOverrides);
399
+
400
+ return new runtime.JSONApiResponse(response, (jsonValue) => AppAccountsViewFromJSON(jsonValue));
401
+ }
402
+
403
+ /**
404
+ * The connected identity and linked accounts for a managed-connector card. Accounts are the ones this connector has that the caller can reach with their own connection. ``addAccountUrl`` adds another account; each account\'s ``manageUrl`` opens the provider page for choosing resources (or, for an org member, requesting access). Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
405
+ * Get App Accounts
406
+ */
407
+ async getAppAccounts(requestParameters: GetAppAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppAccountsView> {
408
+ const response = await this.getAppAccountsRaw(requestParameters, initOverrides);
409
+ return await response.value();
410
+ }
411
+
288
412
  /**
289
413
  * List Agent Apps
290
414
  */
@@ -326,6 +450,53 @@ export class AppsApi extends runtime.BaseAPI {
326
450
  return await response.value();
327
451
  }
328
452
 
453
+ /**
454
+ * Resources in the caller\'s linked accounts, filtered by ``q``. Only resources an account covers and the caller can access are listed. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
455
+ * List App Resources
456
+ */
457
+ async listAppResourcesRaw(requestParameters: ListAppResourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppResourcesView>> {
458
+ if (requestParameters['integrationId'] == null) {
459
+ throw new runtime.RequiredError(
460
+ 'integrationId',
461
+ 'Required parameter "integrationId" was null or undefined when calling listAppResources().'
462
+ );
463
+ }
464
+
465
+ const queryParameters: any = {};
466
+
467
+ if (requestParameters['q'] != null) {
468
+ queryParameters['q'] = requestParameters['q'];
469
+ }
470
+
471
+ const headerParameters: runtime.HTTPHeaders = {};
472
+
473
+ if (this.configuration && this.configuration.accessToken) {
474
+ const token = this.configuration.accessToken;
475
+ const tokenString = await token("bearerAuth", []);
476
+
477
+ if (tokenString) {
478
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
479
+ }
480
+ }
481
+ const response = await this.request({
482
+ path: `/v1/apps/{integrationId}/resources`.replace(`{${"integrationId"}}`, runtime.encodePathParam('integrationId', requestParameters['integrationId'])),
483
+ method: 'GET',
484
+ headers: headerParameters,
485
+ query: queryParameters,
486
+ }, initOverrides);
487
+
488
+ return new runtime.JSONApiResponse(response, (jsonValue) => AppResourcesViewFromJSON(jsonValue));
489
+ }
490
+
491
+ /**
492
+ * Resources in the caller\'s linked accounts, filtered by ``q``. Only resources an account covers and the caller can access are listed. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
493
+ * List App Resources
494
+ */
495
+ async listAppResources(requestParameters: ListAppResourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppResourcesView> {
496
+ const response = await this.listAppResourcesRaw(requestParameters, initOverrides);
497
+ return await response.value();
498
+ }
499
+
329
500
  /**
330
501
  * List the MCP tools for one connector. ``integration_id`` accepts the same slug-or-ULID forms as :func:`connect_app`. The FE holds ``AppResource.id`` (the MCP ULID) from ``GET /v2/apps`` and passes it here. Visibility is the catalog list — unknown or out-of-scope ids are a validation error, not a gateway 404, so a caller cannot probe ids they cannot see. Raises: ChatServiceError: - CHAT_VALIDATION: unknown or out-of-scope integration - CHAT_UPSTREAM: gateway / mcp-gateway failure
331
502
  * List App Tools