@superinterface/server 1.0.25 → 1.0.26

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 (266) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/eslint/.cache_btwyo7 +1 -1
  5. package/.next/fallback-build-manifest.json +2 -2
  6. package/.next/server/app/_not-found.html +1 -1
  7. package/.next/server/app/_not-found.rsc +1 -1
  8. package/.next/server/app/api/api-keys/[apiKeyId]/route.js +1 -1
  9. package/.next/server/app/api/api-keys/[apiKeyId]/route.js.nft.json +1 -1
  10. package/.next/server/app/api/api-keys/route.js +1 -1
  11. package/.next/server/app/api/api-keys/route.js.nft.json +1 -1
  12. package/.next/server/app/api/assistants/[assistantId]/functions/[functionId]/route.js +1 -1
  13. package/.next/server/app/api/assistants/[assistantId]/functions/[functionId]/route.js.nft.json +1 -1
  14. package/.next/server/app/api/assistants/[assistantId]/functions/route.js +1 -1
  15. package/.next/server/app/api/assistants/[assistantId]/functions/route.js.nft.json +1 -1
  16. package/.next/server/app/api/assistants/[assistantId]/initial-messages/route.js +1 -1
  17. package/.next/server/app/api/assistants/[assistantId]/initial-messages/route.js.nft.json +1 -1
  18. package/.next/server/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/route.js +1 -1
  19. package/.next/server/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/route.js.nft.json +1 -1
  20. package/.next/server/app/api/assistants/[assistantId]/mcp-servers/route.js +1 -1
  21. package/.next/server/app/api/assistants/[assistantId]/mcp-servers/route.js.nft.json +1 -1
  22. package/.next/server/app/api/assistants/[assistantId]/route.js +1 -1
  23. package/.next/server/app/api/assistants/[assistantId]/route.js.nft.json +1 -1
  24. package/.next/server/app/api/assistants/route.js +1 -1
  25. package/.next/server/app/api/assistants/route.js.nft.json +1 -1
  26. package/.next/server/app/api/files/[fileId]/contents/route.js +1 -1
  27. package/.next/server/app/api/files/[fileId]/contents/route.js.nft.json +1 -1
  28. package/.next/server/app/api/files/route.js +1 -1
  29. package/.next/server/app/api/files/route.js.nft.json +1 -1
  30. package/.next/server/app/api/messages/route.js +1 -1
  31. package/.next/server/app/api/messages/route.js.nft.json +1 -1
  32. package/.next/server/app/api/providers/[modelProviderId]/assistants/route.js +1 -1
  33. package/.next/server/app/api/providers/[modelProviderId]/assistants/route.js.nft.json +1 -1
  34. package/.next/server/app/api/providers/[modelProviderId]/models/route.js +1 -1
  35. package/.next/server/app/api/providers/[modelProviderId]/models/route.js.nft.json +1 -1
  36. package/.next/server/app/api/providers/[modelProviderId]/route.js +1 -1
  37. package/.next/server/app/api/providers/[modelProviderId]/route.js.nft.json +1 -1
  38. package/.next/server/app/api/providers/route.js +1 -1
  39. package/.next/server/app/api/providers/route.js.nft.json +1 -1
  40. package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
  41. package/.next/server/app/api/tasks/[taskId]/route.js.nft.json +1 -1
  42. package/.next/server/app/api/tasks/callback/route.js +1 -1
  43. package/.next/server/app/api/tasks/callback/route.js.nft.json +1 -1
  44. package/.next/server/app/api/tasks/route.js +1 -1
  45. package/.next/server/app/api/tasks/route.js.nft.json +1 -1
  46. package/.next/server/app/api/threads/runs/submit-client-tool-outputs/route.js +1 -1
  47. package/.next/server/app/api/threads/runs/submit-client-tool-outputs/route.js.nft.json +1 -1
  48. package/.next/server/app/api/workspaces/[workspaceId]/route.js +1 -1
  49. package/.next/server/app/api/workspaces/[workspaceId]/route.js.nft.json +1 -1
  50. package/.next/server/app/api/workspaces/route.js +1 -1
  51. package/.next/server/app/api/workspaces/route.js.nft.json +1 -1
  52. package/.next/server/app/index.html +1 -1
  53. package/.next/server/app/index.rsc +1 -1
  54. package/.next/server/chunks/[root-of-the-server]__0c1bc5ed._.js +1 -1
  55. package/.next/server/chunks/[root-of-the-server]__0c1bc5ed._.js.map +1 -1
  56. package/.next/server/chunks/[root-of-the-server]__25ee13bc._.js +1 -1
  57. package/.next/server/chunks/[root-of-the-server]__25ee13bc._.js.map +1 -1
  58. package/.next/server/chunks/[root-of-the-server]__2945c9e9._.js +1 -1
  59. package/.next/server/chunks/[root-of-the-server]__2945c9e9._.js.map +1 -1
  60. package/.next/server/chunks/[root-of-the-server]__29635e8e._.js +1 -1
  61. package/.next/server/chunks/[root-of-the-server]__29635e8e._.js.map +1 -1
  62. package/.next/server/chunks/[root-of-the-server]__315f084a._.js +1 -1
  63. package/.next/server/chunks/[root-of-the-server]__315f084a._.js.map +1 -1
  64. package/.next/server/chunks/[root-of-the-server]__40ab45eb._.js +1 -1
  65. package/.next/server/chunks/[root-of-the-server]__40ab45eb._.js.map +1 -1
  66. package/.next/server/chunks/[root-of-the-server]__441cee00._.js +1 -1
  67. package/.next/server/chunks/[root-of-the-server]__441cee00._.js.map +1 -1
  68. package/.next/server/chunks/[root-of-the-server]__464a4377._.js +1 -1
  69. package/.next/server/chunks/[root-of-the-server]__464a4377._.js.map +1 -1
  70. package/.next/server/chunks/[root-of-the-server]__47b17fad._.js +38 -0
  71. package/.next/server/chunks/[root-of-the-server]__47b17fad._.js.map +1 -0
  72. package/.next/server/chunks/[root-of-the-server]__4e536bc0._.js +1 -1
  73. package/.next/server/chunks/[root-of-the-server]__4e536bc0._.js.map +1 -1
  74. package/.next/server/chunks/[root-of-the-server]__583a7f1c._.js +1 -1
  75. package/.next/server/chunks/[root-of-the-server]__583a7f1c._.js.map +1 -1
  76. package/.next/server/chunks/[root-of-the-server]__5abf1160._.js +1 -1
  77. package/.next/server/chunks/[root-of-the-server]__5abf1160._.js.map +1 -1
  78. package/.next/server/chunks/[root-of-the-server]__5d09614a._.js +1 -1
  79. package/.next/server/chunks/[root-of-the-server]__5d09614a._.js.map +1 -1
  80. package/.next/server/chunks/[root-of-the-server]__62d958e7._.js +1 -1
  81. package/.next/server/chunks/[root-of-the-server]__62d958e7._.js.map +1 -1
  82. package/.next/server/chunks/[root-of-the-server]__676affb1._.js +1 -1
  83. package/.next/server/chunks/[root-of-the-server]__676affb1._.js.map +1 -1
  84. package/.next/server/chunks/[root-of-the-server]__83461316._.js +1 -1
  85. package/.next/server/chunks/[root-of-the-server]__83461316._.js.map +1 -1
  86. package/.next/server/chunks/[root-of-the-server]__9a611d42._.js +1 -1
  87. package/.next/server/chunks/[root-of-the-server]__9a611d42._.js.map +1 -1
  88. package/.next/server/chunks/[root-of-the-server]__a878c913._.js +1 -1
  89. package/.next/server/chunks/[root-of-the-server]__a878c913._.js.map +1 -1
  90. package/.next/server/chunks/[root-of-the-server]__b10ec83e._.js +1 -1
  91. package/.next/server/chunks/[root-of-the-server]__b10ec83e._.js.map +1 -1
  92. package/.next/server/chunks/[root-of-the-server]__c1629392._.js +1 -1
  93. package/.next/server/chunks/[root-of-the-server]__c1629392._.js.map +1 -1
  94. package/.next/server/chunks/[root-of-the-server]__eb816e13._.js +1 -1
  95. package/.next/server/chunks/[root-of-the-server]__eb816e13._.js.map +1 -1
  96. package/.next/server/chunks/[root-of-the-server]__f6f61507._.js +38 -0
  97. package/.next/server/chunks/[root-of-the-server]__f6f61507._.js.map +1 -0
  98. package/.next/server/chunks/c4f00_next_dist_esm_build_templates_app-route_cb746cf4.js +1 -1
  99. package/.next/server/chunks/c4f00_next_dist_esm_build_templates_app-route_cb746cf4.js.map +1 -1
  100. package/.next/server/chunks/c4f00_next_dist_esm_build_templates_app-route_f952d9ab.js +1 -1
  101. package/.next/server/chunks/c4f00_next_dist_esm_build_templates_app-route_f952d9ab.js.map +1 -1
  102. package/.next/server/functions-config-manifest.json +1 -8
  103. package/.next/server/pages/404.html +1 -1
  104. package/.next/server/pages/500.html +1 -1
  105. package/.next/trace +1 -1
  106. package/dist/app/api/api-keys/[apiKeyId]/buildRoute.d.ts +52 -0
  107. package/dist/app/api/api-keys/[apiKeyId]/buildRoute.d.ts.map +1 -0
  108. package/dist/app/api/api-keys/[apiKeyId]/buildRoute.js +121 -0
  109. package/dist/app/api/api-keys/[apiKeyId]/route.d.ts +10 -21
  110. package/dist/app/api/api-keys/[apiKeyId]/route.d.ts.map +1 -1
  111. package/dist/app/api/api-keys/[apiKeyId]/route.js +6 -125
  112. package/dist/app/api/api-keys/buildRoute.d.ts +32 -0
  113. package/dist/app/api/api-keys/buildRoute.d.ts.map +1 -0
  114. package/dist/app/api/api-keys/buildRoute.js +104 -0
  115. package/dist/app/api/api-keys/builders.d.ts +31 -0
  116. package/dist/app/api/api-keys/builders.d.ts.map +1 -0
  117. package/dist/app/api/api-keys/builders.js +109 -0
  118. package/dist/app/api/api-keys/route.d.ts +5 -13
  119. package/dist/app/api/api-keys/route.d.ts.map +1 -1
  120. package/dist/app/api/api-keys/route.js +8 -108
  121. package/dist/app/api/assistants/[assistantId]/buildRoute.d.ts +120 -0
  122. package/dist/app/api/assistants/[assistantId]/buildRoute.d.ts.map +1 -0
  123. package/dist/app/api/assistants/[assistantId]/buildRoute.js +226 -0
  124. package/dist/app/api/assistants/[assistantId]/functions/[functionId]/buildRoute.d.ts +167 -0
  125. package/dist/app/api/assistants/[assistantId]/functions/[functionId]/buildRoute.d.ts.map +1 -0
  126. package/dist/app/api/assistants/[assistantId]/functions/[functionId]/buildRoute.js +184 -0
  127. package/dist/app/api/assistants/[assistantId]/functions/[functionId]/route.d.ts +10 -21
  128. package/dist/app/api/assistants/[assistantId]/functions/[functionId]/route.d.ts.map +1 -1
  129. package/dist/app/api/assistants/[assistantId]/functions/[functionId]/route.js +6 -191
  130. package/dist/app/api/assistants/[assistantId]/functions/buildRoute.d.ts +114 -0
  131. package/dist/app/api/assistants/[assistantId]/functions/buildRoute.d.ts.map +1 -0
  132. package/dist/app/api/assistants/[assistantId]/functions/buildRoute.js +117 -0
  133. package/dist/app/api/assistants/[assistantId]/functions/route.d.ts +7 -15
  134. package/dist/app/api/assistants/[assistantId]/functions/route.d.ts.map +1 -1
  135. package/dist/app/api/assistants/[assistantId]/functions/route.js +5 -122
  136. package/dist/app/api/assistants/[assistantId]/initial-messages/buildRoute.d.ts +40 -0
  137. package/dist/app/api/assistants/[assistantId]/initial-messages/buildRoute.d.ts.map +1 -0
  138. package/dist/app/api/assistants/[assistantId]/initial-messages/buildRoute.js +85 -0
  139. package/dist/app/api/assistants/[assistantId]/initial-messages/route.d.ts +7 -15
  140. package/dist/app/api/assistants/[assistantId]/initial-messages/route.d.ts.map +1 -1
  141. package/dist/app/api/assistants/[assistantId]/initial-messages/route.js +5 -90
  142. package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/buildRoute.d.ts +89 -0
  143. package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/buildRoute.d.ts.map +1 -0
  144. package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/buildRoute.js +167 -0
  145. package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/route.d.ts +10 -21
  146. package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/route.d.ts.map +1 -1
  147. package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/route.js +6 -174
  148. package/dist/app/api/assistants/[assistantId]/mcp-servers/buildRoute.d.ts +62 -0
  149. package/dist/app/api/assistants/[assistantId]/mcp-servers/buildRoute.d.ts.map +1 -0
  150. package/dist/app/api/assistants/[assistantId]/mcp-servers/buildRoute.js +115 -0
  151. package/dist/app/api/assistants/[assistantId]/mcp-servers/route.d.ts +7 -15
  152. package/dist/app/api/assistants/[assistantId]/mcp-servers/route.d.ts.map +1 -1
  153. package/dist/app/api/assistants/[assistantId]/mcp-servers/route.js +5 -120
  154. package/dist/app/api/assistants/[assistantId]/route.d.ts +11 -22
  155. package/dist/app/api/assistants/[assistantId]/route.d.ts.map +1 -1
  156. package/dist/app/api/assistants/[assistantId]/route.js +6 -233
  157. package/dist/app/api/assistants/buildRoute.d.ts +121 -0
  158. package/dist/app/api/assistants/buildRoute.d.ts.map +1 -0
  159. package/dist/app/api/assistants/buildRoute.js +144 -0
  160. package/dist/app/api/assistants/route.d.ts +7 -13
  161. package/dist/app/api/assistants/route.d.ts.map +1 -1
  162. package/dist/app/api/assistants/route.js +6 -148
  163. package/dist/app/api/files/[fileId]/contents/buildRoute.d.ts +18 -0
  164. package/dist/app/api/files/[fileId]/contents/buildRoute.d.ts.map +1 -0
  165. package/dist/app/api/files/[fileId]/contents/buildRoute.js +81 -0
  166. package/dist/app/api/files/[fileId]/contents/route.d.ts +3 -13
  167. package/dist/app/api/files/[fileId]/contents/route.d.ts.map +1 -1
  168. package/dist/app/api/files/[fileId]/contents/route.js +4 -84
  169. package/dist/app/api/files/buildRoute.d.ts +14 -0
  170. package/dist/app/api/files/buildRoute.d.ts.map +1 -0
  171. package/dist/app/api/files/buildRoute.js +88 -0
  172. package/dist/app/api/files/route.d.ts +4 -10
  173. package/dist/app/api/files/route.d.ts.map +1 -1
  174. package/dist/app/api/files/route.js +4 -91
  175. package/dist/app/api/messages/buildRoute.d.ts +34 -0
  176. package/dist/app/api/messages/buildRoute.d.ts.map +1 -0
  177. package/dist/app/api/messages/buildRoute.js +607 -0
  178. package/dist/app/api/messages/lib/initialMessagesResponse.d.ts.map +1 -1
  179. package/dist/app/api/messages/lib/initialMessagesResponse.js +1 -1
  180. package/dist/app/api/messages/route.d.ts +10 -22
  181. package/dist/app/api/messages/route.d.ts.map +1 -1
  182. package/dist/app/api/messages/route.js +6 -612
  183. package/dist/app/api/providers/[modelProviderId]/assistants/buildRoute.d.ts +24 -0
  184. package/dist/app/api/providers/[modelProviderId]/assistants/buildRoute.d.ts.map +1 -0
  185. package/dist/app/api/providers/[modelProviderId]/assistants/buildRoute.js +43 -0
  186. package/dist/app/api/providers/[modelProviderId]/assistants/route.d.ts +4 -9
  187. package/dist/app/api/providers/[modelProviderId]/assistants/route.d.ts.map +1 -1
  188. package/dist/app/api/providers/[modelProviderId]/assistants/route.js +4 -46
  189. package/dist/app/api/providers/[modelProviderId]/buildRoute.d.ts +61 -0
  190. package/dist/app/api/providers/[modelProviderId]/buildRoute.d.ts.map +1 -0
  191. package/dist/app/api/providers/[modelProviderId]/buildRoute.js +134 -0
  192. package/dist/app/api/providers/[modelProviderId]/models/buildRoute.d.ts +19 -0
  193. package/dist/app/api/providers/[modelProviderId]/models/buildRoute.d.ts.map +1 -0
  194. package/dist/app/api/providers/[modelProviderId]/models/buildRoute.js +43 -0
  195. package/dist/app/api/providers/[modelProviderId]/models/route.d.ts +4 -9
  196. package/dist/app/api/providers/[modelProviderId]/models/route.d.ts.map +1 -1
  197. package/dist/app/api/providers/[modelProviderId]/models/route.js +4 -46
  198. package/dist/app/api/providers/[modelProviderId]/route.d.ts +10 -21
  199. package/dist/app/api/providers/[modelProviderId]/route.d.ts.map +1 -1
  200. package/dist/app/api/providers/[modelProviderId]/route.js +6 -141
  201. package/dist/app/api/providers/buildRoute.d.ts +38 -0
  202. package/dist/app/api/providers/buildRoute.d.ts.map +1 -0
  203. package/dist/app/api/providers/buildRoute.js +75 -0
  204. package/dist/app/api/providers/route.d.ts +5 -13
  205. package/dist/app/api/providers/route.d.ts.map +1 -1
  206. package/dist/app/api/providers/route.js +5 -80
  207. package/dist/app/api/tasks/[taskId]/buildRoute.d.ts +19 -0
  208. package/dist/app/api/tasks/[taskId]/buildRoute.d.ts.map +1 -0
  209. package/dist/app/api/tasks/[taskId]/buildRoute.js +125 -0
  210. package/dist/app/api/tasks/[taskId]/route.d.ts +7 -57
  211. package/dist/app/api/tasks/[taskId]/route.d.ts.map +1 -1
  212. package/dist/app/api/tasks/[taskId]/route.js +6 -144
  213. package/dist/app/api/tasks/buildRoute.d.ts +36 -0
  214. package/dist/app/api/tasks/buildRoute.d.ts.map +1 -0
  215. package/dist/app/api/tasks/buildRoute.js +85 -0
  216. package/dist/app/api/tasks/callback/buildRoute.d.ts +6 -0
  217. package/dist/app/api/tasks/callback/buildRoute.d.ts.map +1 -0
  218. package/dist/app/api/tasks/callback/buildRoute.js +244 -0
  219. package/dist/app/api/tasks/callback/route.d.ts +2 -1
  220. package/dist/app/api/tasks/callback/route.d.ts.map +1 -1
  221. package/dist/app/api/tasks/callback/route.js +4 -244
  222. package/dist/app/api/tasks/route.d.ts +5 -13
  223. package/dist/app/api/tasks/route.d.ts.map +1 -1
  224. package/dist/app/api/tasks/route.js +5 -90
  225. package/dist/app/api/threads/runs/submit-client-tool-outputs/buildRoute.d.ts +10 -0
  226. package/dist/app/api/threads/runs/submit-client-tool-outputs/buildRoute.d.ts.map +1 -0
  227. package/dist/app/api/threads/runs/submit-client-tool-outputs/buildRoute.js +36 -0
  228. package/dist/app/api/threads/runs/submit-client-tool-outputs/route.d.ts +2 -7
  229. package/dist/app/api/threads/runs/submit-client-tool-outputs/route.d.ts.map +1 -1
  230. package/dist/app/api/threads/runs/submit-client-tool-outputs/route.js +3 -37
  231. package/dist/app/api/workspaces/[workspaceId]/buildRoute.d.ts +16 -0
  232. package/dist/app/api/workspaces/[workspaceId]/buildRoute.d.ts.map +1 -0
  233. package/dist/app/api/workspaces/[workspaceId]/buildRoute.js +89 -0
  234. package/dist/app/api/workspaces/[workspaceId]/route.d.ts +5 -31
  235. package/dist/app/api/workspaces/[workspaceId]/route.d.ts.map +1 -1
  236. package/dist/app/api/workspaces/[workspaceId]/route.js +5 -89
  237. package/dist/app/api/workspaces/buildRoute.d.ts +42 -0
  238. package/dist/app/api/workspaces/buildRoute.d.ts.map +1 -0
  239. package/dist/app/api/workspaces/buildRoute.js +78 -0
  240. package/dist/app/api/workspaces/route.d.ts +7 -27
  241. package/dist/app/api/workspaces/route.d.ts.map +1 -1
  242. package/dist/app/api/workspaces/route.js +6 -82
  243. package/dist/lib/functions/functionSchema.d.ts +56 -56
  244. package/dist/lib/functions/handleFunction/getFunction.d.ts +4 -4
  245. package/dist/lib/mcpServers/mcpServerSchema.d.ts +20 -20
  246. package/dist/lib/prisma/index.d.ts +2 -5
  247. package/dist/lib/prisma/index.d.ts.map +1 -1
  248. package/dist/lib/prisma/index.js +6 -78
  249. package/package.json +4 -12
  250. package/.next/server/chunks/[root-of-the-server]__228bff78._.js +0 -38
  251. package/.next/server/chunks/[root-of-the-server]__228bff78._.js.map +0 -1
  252. package/.next/server/chunks/[root-of-the-server]__3307123c._.js +0 -38
  253. package/.next/server/chunks/[root-of-the-server]__3307123c._.js.map +0 -1
  254. package/.next/server/chunks/[root-of-the-server]__50c5f12c._.js +0 -38
  255. package/.next/server/chunks/[root-of-the-server]__50c5f12c._.js.map +0 -1
  256. package/.next/server/chunks/[root-of-the-server]__6b8ba839._.js +0 -38
  257. package/.next/server/chunks/[root-of-the-server]__6b8ba839._.js.map +0 -1
  258. package/.next/server/chunks/[root-of-the-server]__e7819e95._.js +0 -38
  259. package/.next/server/chunks/[root-of-the-server]__e7819e95._.js.map +0 -1
  260. package/.next/server/chunks/[root-of-the-server]__f0dfab03._.js +0 -38
  261. package/.next/server/chunks/[root-of-the-server]__f0dfab03._.js.map +0 -1
  262. package/.next/server/chunks/[root-of-the-server]__ff90af03._.js +0 -38
  263. package/.next/server/chunks/[root-of-the-server]__ff90af03._.js.map +0 -1
  264. /package/.next/static/{jt8inwg6nWaLQZ4qpiSJ- → KhKDqyqUf75vkMRrXaWJf}/_buildManifest.js +0 -0
  265. /package/.next/static/{jt8inwg6nWaLQZ4qpiSJ- → KhKDqyqUf75vkMRrXaWJf}/_clientMiddlewareManifest.json +0 -0
  266. /package/.next/static/{jt8inwg6nWaLQZ4qpiSJ- → KhKDqyqUf75vkMRrXaWJf}/_ssgManifest.js +0 -0
@@ -1,120 +1,5 @@
1
- import { NextResponse } from 'next/server';
2
- import { ApiKeyType, TransportType } from '@prisma/client';
3
- import { headers } from 'next/headers';
4
- import { cacheHeaders } from '../../../../../lib/cache/cacheHeaders';
5
- import { resolvePrisma } from '../../../../../lib/prisma';
6
- import { getApiKey } from '../../../../../lib/apiKeys/getApiKey';
7
- import { serializeApiMcpServer } from '../../../../../lib/mcpServers/serializeApiMcpServer';
8
- import { mcpServerSchema } from '../../../../../lib/mcpServers/mcpServerSchema';
9
- export const buildGET = ({ prisma: providedPrisma } = {}) => async (_request, props) => {
10
- const prisma = resolvePrisma(providedPrisma);
11
- const { assistantId } = await props.params;
12
- const headersList = await headers();
13
- const authorization = headersList.get('authorization');
14
- if (!authorization) {
15
- return NextResponse.json({ error: 'No authorization header found' }, { status: 400 });
16
- }
17
- const privateApiKey = await getApiKey({
18
- type: ApiKeyType.PRIVATE,
19
- authorization,
20
- prisma,
21
- });
22
- if (!privateApiKey) {
23
- return NextResponse.json({ error: 'Invalid api key' }, { status: 400 });
24
- }
25
- const assistant = await prisma.assistant.findFirst({
26
- where: {
27
- id: assistantId,
28
- workspaceId: privateApiKey.workspaceId,
29
- },
30
- include: {
31
- mcpServers: {
32
- include: {
33
- stdioTransport: true,
34
- sseTransport: true,
35
- httpTransport: true,
36
- },
37
- orderBy: {
38
- createdAt: 'desc',
39
- },
40
- },
41
- },
42
- });
43
- if (!assistant) {
44
- return NextResponse.json({ error: 'No assistant found' }, { status: 400 });
45
- }
46
- return NextResponse.json({
47
- mcpServers: assistant.mcpServers.map((mcpServer) => serializeApiMcpServer({
48
- mcpServer,
49
- })),
50
- }, { headers: cacheHeaders });
51
- };
52
- export const GET = ((...args) => buildGET()(...args));
53
- export const buildPOST = ({ prisma: providedPrisma } = {}) => async (request, props) => {
54
- const prisma = resolvePrisma(providedPrisma);
55
- const { assistantId } = await props.params;
56
- const headersList = await headers();
57
- const authorization = headersList.get('authorization');
58
- if (!authorization) {
59
- return NextResponse.json({ error: 'No authorization header found' }, { status: 400 });
60
- }
61
- const privateApiKey = await getApiKey({
62
- authorization,
63
- type: ApiKeyType.PRIVATE,
64
- prisma,
65
- });
66
- if (!privateApiKey) {
67
- return NextResponse.json({ error: 'Invalid api key' }, { status: 400 });
68
- }
69
- const body = await request.json();
70
- const parsed = mcpServerSchema.safeParse(body);
71
- if (!parsed.success) {
72
- return NextResponse.json({ error: 'Invalid payload' }, { status: 400 });
73
- }
74
- const { transportType, sseTransport, httpTransport } = parsed.data;
75
- const workspaceId = privateApiKey.workspaceId;
76
- const assistant = await prisma.assistant.findFirst({
77
- where: { id: assistantId, workspaceId },
78
- });
79
- if (!assistant) {
80
- return NextResponse.json({ error: 'No assistant found' }, { status: 400 });
81
- }
82
- const mcpServer = await prisma.mcpServer.create({
83
- data: Object.assign(Object.assign(Object.assign({ transportType }, (transportType === TransportType.SSE
84
- ? {
85
- sseTransport: {
86
- create: {
87
- url: sseTransport.url,
88
- headers: JSON.parse(sseTransport.headers),
89
- },
90
- },
91
- }
92
- : {})), (transportType === TransportType.HTTP
93
- ? {
94
- httpTransport: {
95
- create: {
96
- url: httpTransport.url,
97
- headers: JSON.parse(httpTransport.headers),
98
- },
99
- },
100
- }
101
- : {})), { assistant: {
102
- connect: {
103
- id: assistantId,
104
- workspaceId,
105
- },
106
- } }),
107
- include: {
108
- stdioTransport: true,
109
- sseTransport: true,
110
- httpTransport: true,
111
- },
112
- });
113
- return NextResponse.json({
114
- mcpServer: serializeApiMcpServer({ mcpServer }),
115
- }, { headers: cacheHeaders });
116
- };
117
- export const POST = ((...args) => buildPOST()(...args));
118
- export const OPTIONS = () => NextResponse.json({}, {
119
- headers: cacheHeaders,
120
- });
1
+ import { prisma } from '../../../../../lib/prisma';
2
+ import { buildGET, buildOPTIONS, buildPOST, } from './buildRoute';
3
+ export const GET = buildGET({ prisma });
4
+ export const POST = buildPOST({ prisma });
5
+ export const OPTIONS = buildOPTIONS();
@@ -1,14 +1,10 @@
1
- import { type NextRequest, NextResponse } from 'next/server';
2
- import { type PrismaClient } from '@prisma/client';
3
- export declare const buildGET: ({ prisma: providedPrisma }?: {
4
- prisma?: PrismaClient;
5
- }) => (request: NextRequest, props: {
1
+ export declare const GET: (request: import("next/server").NextRequest, props: {
6
2
  params: Promise<{
7
3
  assistantId: string;
8
4
  }>;
9
- }) => Promise<NextResponse<{
5
+ }) => Promise<import("next/server").NextResponse<{
10
6
  error: string;
11
- }> | NextResponse<{
7
+ }> | import("next/server").NextResponse<{
12
8
  assistant: {
13
9
  id: string;
14
10
  storageProviderType: import("@prisma/client").$Enums.StorageProviderType;
@@ -32,7 +28,7 @@ export declare const buildGET: ({ prisma: providedPrisma }?: {
32
28
  } | null;
33
29
  };
34
30
  };
35
- }> | NextResponse<{
31
+ }> | import("next/server").NextResponse<{
36
32
  assistant: {
37
33
  id: string;
38
34
  name: string;
@@ -56,16 +52,13 @@ export declare const buildGET: ({ prisma: providedPrisma }?: {
56
52
  };
57
53
  };
58
54
  }>>;
59
- export declare const GET: ReturnType<typeof buildGET>;
60
- export declare const buildPATCH: ({ prisma: providedPrisma }?: {
61
- prisma?: PrismaClient;
62
- }) => (request: NextRequest, props: {
55
+ export declare const PATCH: (request: import("next/server").NextRequest, props: {
63
56
  params: Promise<{
64
57
  assistantId: string;
65
58
  }>;
66
- }) => Promise<NextResponse<{
59
+ }) => Promise<import("next/server").NextResponse<{
67
60
  error: string;
68
- }> | NextResponse<{
61
+ }> | import("next/server").NextResponse<{
69
62
  assistant: {
70
63
  id: string;
71
64
  storageProviderType: import("@prisma/client").$Enums.StorageProviderType;
@@ -90,16 +83,13 @@ export declare const buildPATCH: ({ prisma: providedPrisma }?: {
90
83
  };
91
84
  };
92
85
  }>>;
93
- export declare const PATCH: ReturnType<typeof buildPATCH>;
94
- export declare const buildDELETE: ({ prisma: providedPrisma }?: {
95
- prisma?: PrismaClient;
96
- }) => (request: NextRequest, props: {
86
+ export declare const DELETE: (_request: import("next/server").NextRequest, props: {
97
87
  params: Promise<{
98
88
  assistantId: string;
99
89
  }>;
100
- }) => Promise<NextResponse<{
90
+ }) => Promise<import("next/server").NextResponse<{
101
91
  error: string;
102
- }> | NextResponse<{
92
+ }> | import("next/server").NextResponse<{
103
93
  assistant: {
104
94
  id: string;
105
95
  storageProviderType: import("@prisma/client").$Enums.StorageProviderType;
@@ -124,6 +114,5 @@ export declare const buildDELETE: ({ prisma: providedPrisma }?: {
124
114
  };
125
115
  };
126
116
  }>>;
127
- export declare const DELETE: ReturnType<typeof buildDELETE>;
128
- export declare const OPTIONS: () => NextResponse<{}>;
117
+ export declare const OPTIONS: () => import("next/server").NextResponse<{}>;
129
118
  //# sourceMappingURL=route.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../src/app/api/assistants/[assistantId]/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAA;AAUvB,eAAO,MAAM,QAAQ,GAClB,6BAA4B;IAAE,MAAM,CAAC,EAAE,YAAY,CAAA;CAAO,MAEzD,SAAS,WAAW,EACpB,OAAO;IACL,MAAM,EAAE,OAAO,CAAC;QACd,WAAW,EAAE,MAAM,CAAA;KACpB,CAAC,CAAA;CACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FF,CAAA;AAEH,eAAO,MAAM,GAAG,EACU,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAA;AAErD,eAAO,MAAM,UAAU,GACpB,6BAA4B;IAAE,MAAM,CAAC,EAAE,YAAY,CAAA;CAAO,MAEzD,SAAS,WAAW,EACpB,OAAO;IACL,MAAM,EAAE,OAAO,CAAC;QACd,WAAW,EAAE,MAAM,CAAA;KACpB,CAAC,CAAA;CACH;;;;;;;;;;;;;;;;;;;;;;;;;;GAuJF,CAAA;AAEH,eAAO,MAAM,KAAK,EACU,UAAU,CAAC,OAAO,UAAU,CAAC,CAAA;AAEzD,eAAO,MAAM,WAAW,GACrB,6BAA4B;IAAE,MAAM,CAAC,EAAE,YAAY,CAAA;CAAO,MAEzD,SAAS,WAAW,EACpB,OAAO;IACL,MAAM,EAAE,OAAO,CAAC;QACd,WAAW,EAAE,MAAM,CAAA;KACpB,CAAC,CAAA;CACH;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDF,CAAA;AAEH,eAAO,MAAM,MAAM,EACU,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA;AAE3D,eAAO,MAAM,OAAO,wBAMjB,CAAA"}
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../src/app/api/assistants/[assistantId]/route.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAuB,CAAA;AAEvC,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyB,CAAA;AAE3C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA0B,CAAA;AAE7C,eAAO,MAAM,OAAO,8CAAiB,CAAA"}
@@ -1,233 +1,6 @@
1
- import { NextResponse } from 'next/server';
2
- import { StorageProviderType, ApiKeyType, ToolType, } from '@prisma/client';
3
- import { cacheHeaders } from '../../../../lib/cache/cacheHeaders';
4
- import { workspaceAccessWhere as getWorkspaceAccessWhere } from '../../../../lib/apiKeys/workspaceAccessWhere';
5
- import { resolvePrisma } from '../../../../lib/prisma';
6
- import { serializeAssistant } from '../../../../lib/assistants/serializeAssistant';
7
- import { serializeApiAssistant } from '../../../../lib/assistants/serializeApiAssistant';
8
- import { headers } from 'next/headers';
9
- import { z } from 'zod';
10
- import { getApiKey } from '../../../../lib/apiKeys/getApiKey';
11
- export const buildGET = ({ prisma: providedPrisma } = {}) => async (request, props) => {
12
- const prisma = resolvePrisma(providedPrisma);
13
- const params = await props.params;
14
- const { assistantId } = params;
15
- const headersList = await headers();
16
- const authorization = headersList.get('authorization');
17
- if (authorization) {
18
- const privateApiKey = await getApiKey({
19
- authorization,
20
- type: ApiKeyType.PRIVATE,
21
- prisma,
22
- });
23
- if (!privateApiKey) {
24
- return NextResponse.json({ error: 'Invalid api key' }, { status: 400 });
25
- }
26
- const assistant = await prisma.assistant.findUnique({
27
- where: {
28
- id: assistantId,
29
- workspaceId: privateApiKey.workspaceId,
30
- },
31
- include: {
32
- tools: true,
33
- avatar: {
34
- include: {
35
- imageAvatar: true,
36
- iconAvatar: true,
37
- },
38
- },
39
- },
40
- });
41
- if (!assistant) {
42
- return NextResponse.json({ error: 'No assistant found' }, { status: 400 });
43
- }
44
- return NextResponse.json({
45
- assistant: serializeApiAssistant({ assistant }),
46
- }, { headers: cacheHeaders });
47
- }
48
- const workspaceAccessWhere = await getWorkspaceAccessWhere({
49
- publicApiKey: request.nextUrl.searchParams.get('publicApiKey'),
50
- prisma,
51
- });
52
- if (!workspaceAccessWhere) {
53
- return NextResponse.json({ error: 'Invalid api key' }, { status: 400 });
54
- }
55
- if (!assistantId) {
56
- return NextResponse.json({ error: 'No assistant id found' }, { status: 400 });
57
- }
58
- const assistant = await prisma.assistant.findFirst({
59
- where: {
60
- id: assistantId,
61
- workspace: workspaceAccessWhere,
62
- },
63
- include: {
64
- avatar: {
65
- include: {
66
- imageAvatar: true,
67
- iconAvatar: true,
68
- },
69
- },
70
- },
71
- });
72
- if (!assistant) {
73
- return NextResponse.json({ error: 'No assistant found' }, { status: 400 });
74
- }
75
- return NextResponse.json({
76
- assistant: serializeAssistant({ assistant }),
77
- }, { headers: cacheHeaders });
78
- };
79
- export const GET = ((...args) => buildGET()(...args));
80
- export const buildPATCH = ({ prisma: providedPrisma } = {}) => async (request, props) => {
81
- const prisma = resolvePrisma(providedPrisma);
82
- const params = await props.params;
83
- const { assistantId } = params;
84
- const headersList = await headers();
85
- const authorization = headersList.get('authorization');
86
- if (!authorization) {
87
- return NextResponse.json({ error: 'No authorization header found' }, { status: 400 });
88
- }
89
- const privateApiKey = await getApiKey({
90
- authorization,
91
- type: ApiKeyType.PRIVATE,
92
- prisma,
93
- });
94
- if (!privateApiKey) {
95
- return NextResponse.json({ error: 'Invalid api key' }, { status: 400 });
96
- }
97
- const updateSchema = z
98
- .object({
99
- storageProviderType: z.nativeEnum(StorageProviderType).optional(),
100
- storageProviderAssistantId: z.string().nullable().optional(),
101
- modelProviderId: z.string().optional(),
102
- model: z.string().optional(),
103
- name: z.string().optional(),
104
- description: z.string().optional(),
105
- instructions: z.string().optional(),
106
- codeInterpreterEnabled: z.boolean().optional(),
107
- fileSearchEnabled: z.boolean().optional(),
108
- })
109
- .superRefine((data, ctx) => {
110
- if (!data.storageProviderType)
111
- return;
112
- if (data.storageProviderType ===
113
- StorageProviderType.SUPERINTERFACE_CLOUD &&
114
- data.storageProviderAssistantId) {
115
- ctx.addIssue({
116
- code: z.ZodIssueCode.custom,
117
- message: 'storageProviderAssistantId should not be provided for SUPERINTERFACE_CLOUD',
118
- path: ['storageProviderAssistantId'],
119
- });
120
- }
121
- if (data.storageProviderType !==
122
- StorageProviderType.SUPERINTERFACE_CLOUD &&
123
- !data.storageProviderAssistantId) {
124
- ctx.addIssue({
125
- code: z.ZodIssueCode.custom,
126
- message: 'storageProviderAssistantId is required for this storage provider',
127
- path: ['storageProviderAssistantId'],
128
- });
129
- }
130
- });
131
- const parseResult = updateSchema.safeParse(await request.json());
132
- if (!parseResult.success) {
133
- return NextResponse.json({
134
- error: 'Invalid body: ' + parseResult.error.message,
135
- }, { status: 400 });
136
- }
137
- const { storageProviderType, storageProviderAssistantId, modelProviderId, model, name, description, instructions, codeInterpreterEnabled, fileSearchEnabled, } = parseResult.data;
138
- const data = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (storageProviderType !== undefined && { storageProviderType })), (storageProviderAssistantId !== undefined && {
139
- openaiAssistantId: storageProviderAssistantId,
140
- })), (modelProviderId !== undefined && {
141
- modelProvider: { connect: { id: modelProviderId } },
142
- })), (model !== undefined && { modelSlug: model })), (name !== undefined && { name })), (description !== undefined && { description })), (instructions !== undefined && { instructions })), { tools: {
143
- create: [
144
- ...(codeInterpreterEnabled === true
145
- ? [
146
- {
147
- type: ToolType.CODE_INTERPRETER,
148
- codeInterpreterTool: { create: {} },
149
- },
150
- ]
151
- : []),
152
- ...(fileSearchEnabled === true
153
- ? [{ type: ToolType.FILE_SEARCH, fileSearchTool: { create: {} } }]
154
- : []),
155
- ],
156
- deleteMany: [
157
- ...(codeInterpreterEnabled === false
158
- ? [{ assistantId, type: ToolType.CODE_INTERPRETER }]
159
- : []),
160
- ...(fileSearchEnabled === false
161
- ? [{ assistantId, type: ToolType.FILE_SEARCH }]
162
- : []),
163
- ],
164
- } });
165
- const assistant = await prisma.assistant.update({
166
- where: {
167
- id: assistantId,
168
- workspaceId: privateApiKey.workspaceId,
169
- },
170
- data,
171
- include: {
172
- tools: true,
173
- avatar: {
174
- include: {
175
- imageAvatar: true,
176
- iconAvatar: true,
177
- },
178
- },
179
- },
180
- });
181
- return NextResponse.json({
182
- assistant: serializeApiAssistant({ assistant }),
183
- }, { headers: cacheHeaders });
184
- };
185
- export const PATCH = ((...args) => buildPATCH()(...args));
186
- export const buildDELETE = ({ prisma: providedPrisma } = {}) => async (request, props) => {
187
- const prisma = resolvePrisma(providedPrisma);
188
- const params = await props.params;
189
- const { assistantId } = params;
190
- const headersList = await headers();
191
- const authorization = headersList.get('authorization');
192
- if (!authorization) {
193
- return NextResponse.json({ error: 'No authorization header found' }, { status: 400 });
194
- }
195
- const privateApiKey = await getApiKey({
196
- authorization,
197
- type: ApiKeyType.PRIVATE,
198
- prisma,
199
- });
200
- if (!privateApiKey) {
201
- return NextResponse.json({ error: 'Invalid api key' }, { status: 400 });
202
- }
203
- const assistant = await prisma.assistant.findFirst({
204
- where: {
205
- id: assistantId,
206
- workspaceId: privateApiKey.workspaceId,
207
- },
208
- include: {
209
- tools: true,
210
- avatar: {
211
- include: {
212
- imageAvatar: true,
213
- iconAvatar: true,
214
- },
215
- },
216
- },
217
- });
218
- if (!assistant) {
219
- return NextResponse.json({ error: 'No assistant found' }, { status: 400 });
220
- }
221
- await prisma.assistant.delete({
222
- where: {
223
- id: assistant.id,
224
- },
225
- });
226
- return NextResponse.json({
227
- assistant: serializeApiAssistant({ assistant }),
228
- }, { headers: cacheHeaders });
229
- };
230
- export const DELETE = ((...args) => buildDELETE()(...args));
231
- export const OPTIONS = () => NextResponse.json({}, {
232
- headers: cacheHeaders,
233
- });
1
+ import { prisma } from '../../../../lib/prisma';
2
+ import { buildDELETE, buildGET, buildOPTIONS, buildPATCH, } from './buildRoute';
3
+ export const GET = buildGET({ prisma });
4
+ export const PATCH = buildPATCH({ prisma });
5
+ export const DELETE = buildDELETE({ prisma });
6
+ export const OPTIONS = buildOPTIONS();
@@ -0,0 +1,121 @@
1
+ import { type PrismaClient } from '@prisma/client';
2
+ import { NextResponse } from 'next/server';
3
+ import { z } from 'zod';
4
+ declare const createAssistantSchema: z.ZodEffects<z.ZodObject<{
5
+ storageProviderType: z.ZodNativeEnum<{
6
+ OPENAI: "OPENAI";
7
+ AZURE_OPENAI: "AZURE_OPENAI";
8
+ SUPERINTERFACE_CLOUD: "SUPERINTERFACE_CLOUD";
9
+ OPENAI_RESPONSES: "OPENAI_RESPONSES";
10
+ AZURE_OPENAI_RESPONSES: "AZURE_OPENAI_RESPONSES";
11
+ }>;
12
+ storageProviderAssistantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ modelProviderId: z.ZodString;
14
+ model: z.ZodString;
15
+ name: z.ZodOptional<z.ZodString>;
16
+ description: z.ZodDefault<z.ZodOptional<z.ZodString>>;
17
+ instructions: z.ZodDefault<z.ZodOptional<z.ZodString>>;
18
+ codeInterpreterEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
19
+ fileSearchEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ model: string;
22
+ instructions: string;
23
+ description: string;
24
+ modelProviderId: string;
25
+ storageProviderType: "OPENAI" | "AZURE_OPENAI" | "SUPERINTERFACE_CLOUD" | "OPENAI_RESPONSES" | "AZURE_OPENAI_RESPONSES";
26
+ codeInterpreterEnabled: boolean;
27
+ fileSearchEnabled: boolean;
28
+ name?: string | undefined;
29
+ storageProviderAssistantId?: string | null | undefined;
30
+ }, {
31
+ model: string;
32
+ modelProviderId: string;
33
+ storageProviderType: "OPENAI" | "AZURE_OPENAI" | "SUPERINTERFACE_CLOUD" | "OPENAI_RESPONSES" | "AZURE_OPENAI_RESPONSES";
34
+ name?: string | undefined;
35
+ instructions?: string | undefined;
36
+ description?: string | undefined;
37
+ storageProviderAssistantId?: string | null | undefined;
38
+ codeInterpreterEnabled?: boolean | undefined;
39
+ fileSearchEnabled?: boolean | undefined;
40
+ }>, {
41
+ model: string;
42
+ instructions: string;
43
+ description: string;
44
+ modelProviderId: string;
45
+ storageProviderType: "OPENAI" | "AZURE_OPENAI" | "SUPERINTERFACE_CLOUD" | "OPENAI_RESPONSES" | "AZURE_OPENAI_RESPONSES";
46
+ codeInterpreterEnabled: boolean;
47
+ fileSearchEnabled: boolean;
48
+ name?: string | undefined;
49
+ storageProviderAssistantId?: string | null | undefined;
50
+ }, {
51
+ model: string;
52
+ modelProviderId: string;
53
+ storageProviderType: "OPENAI" | "AZURE_OPENAI" | "SUPERINTERFACE_CLOUD" | "OPENAI_RESPONSES" | "AZURE_OPENAI_RESPONSES";
54
+ name?: string | undefined;
55
+ instructions?: string | undefined;
56
+ description?: string | undefined;
57
+ storageProviderAssistantId?: string | null | undefined;
58
+ codeInterpreterEnabled?: boolean | undefined;
59
+ fileSearchEnabled?: boolean | undefined;
60
+ }>;
61
+ export declare const buildGET: ({ prisma }: {
62
+ prisma: PrismaClient;
63
+ }) => () => Promise<NextResponse<{
64
+ error: string;
65
+ }> | NextResponse<{
66
+ assistants: {
67
+ id: string;
68
+ storageProviderType: import("@prisma/client").$Enums.StorageProviderType;
69
+ storageProviderAssistantId: string | null;
70
+ modelProviderId: string;
71
+ model: string;
72
+ name: string;
73
+ description: string;
74
+ instructions: string;
75
+ codeInterpreterEnabled: boolean;
76
+ fileSearchEnabled: boolean;
77
+ createdAt: string;
78
+ updatedAt: string;
79
+ avatar: {
80
+ type: import("@prisma/client").$Enums.AvatarType;
81
+ imageAvatar: {
82
+ url: string;
83
+ } | null;
84
+ iconAvatar: {
85
+ name: import("@prisma/client").$Enums.IconAvatarName;
86
+ } | null;
87
+ };
88
+ }[];
89
+ }>>;
90
+ export declare const buildPOST: ({ prisma }: {
91
+ prisma: PrismaClient;
92
+ }) => (request: Request) => Promise<NextResponse<{
93
+ error: string;
94
+ }> | NextResponse<{
95
+ assistant: {
96
+ id: string;
97
+ storageProviderType: import("@prisma/client").$Enums.StorageProviderType;
98
+ storageProviderAssistantId: string | null;
99
+ modelProviderId: string;
100
+ model: string;
101
+ name: string;
102
+ description: string;
103
+ instructions: string;
104
+ codeInterpreterEnabled: boolean;
105
+ fileSearchEnabled: boolean;
106
+ createdAt: string;
107
+ updatedAt: string;
108
+ avatar: {
109
+ type: import("@prisma/client").$Enums.AvatarType;
110
+ imageAvatar: {
111
+ url: string;
112
+ } | null;
113
+ iconAvatar: {
114
+ name: import("@prisma/client").$Enums.IconAvatarName;
115
+ } | null;
116
+ };
117
+ };
118
+ }>>;
119
+ export declare const buildOPTIONS: () => () => NextResponse<{}>;
120
+ export { createAssistantSchema };
121
+ //# sourceMappingURL=buildRoute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildRoute.d.ts","sourceRoot":"","sources":["../../../../src/app/api/assistants/buildRoute.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCvB,CAAA;AAEJ,eAAO,MAAM,QAAQ,GAClB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CpC,CAAA;AAEH,eAAO,MAAM,SAAS,GACnB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;GAiGtB,CAAA;AAEH,eAAO,MAAM,YAAY,8BAMtB,CAAA;AAEH,OAAO,EAAE,qBAAqB,EAAE,CAAA"}