@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,109 +1,9 @@
1
- import { headers } from 'next/headers';
2
- import { ApiKeyType } from '@prisma/client';
3
- import { NextResponse } from 'next/server';
4
- import { z } from 'zod';
5
- import { cacheHeaders } from '../../../lib/cache/cacheHeaders';
6
- import { resolvePrisma } from '../../../lib/prisma';
7
- import { serializeApiKey } from '../../../lib/apiKeys/serializeApiKey';
8
- import { getApiKey } from '../../../lib/apiKeys/getApiKey';
9
- import { getOrganizationApiKey } from '../../../lib/organizationApiKeys/getOrganizationApiKey';
10
- export const buildGET = ({ prisma: providedPrisma } = {}) => async () => {
11
- const prisma = resolvePrisma(providedPrisma);
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 apiKeys = await prisma.apiKey.findMany({
26
- where: {
27
- type: ApiKeyType.PUBLIC,
28
- workspaceId: privateApiKey.workspaceId,
29
- },
30
- });
31
- return NextResponse.json({
32
- apiKeys: apiKeys.map((apiKey) => serializeApiKey({ apiKey })),
33
- }, { headers: cacheHeaders });
34
- };
35
- export const GET = ((...args) => buildGET()(...args));
36
- export const buildPOST = ({ prisma: providedPrisma } = {}) => async (request) => {
37
- const prisma = resolvePrisma(providedPrisma);
38
- const headersList = await headers();
39
- const authorization = headersList.get('authorization');
40
- if (!authorization) {
41
- return NextResponse.json({ error: 'No authorization header found' }, { status: 400 });
42
- }
43
- const body = await request.json().catch(() => null);
44
- const organizationApiKey = await getOrganizationApiKey({
45
- authorization,
46
- prisma,
47
- });
48
- if (organizationApiKey) {
49
- const createSchemaOrganizationApiKey = z.object({
50
- name: z.string().min(1).optional(),
51
- type: z.nativeEnum(ApiKeyType),
52
- workspaceId: z.string().min(1).optional(),
53
- });
54
- const parsedOrganizationApiKey = createSchemaOrganizationApiKey.safeParse(body);
55
- if (!parsedOrganizationApiKey.success) {
56
- return NextResponse.json({ error: 'Invalid body' }, { status: 400 });
57
- }
58
- const workspace = await prisma.workspace.findUnique({
59
- where: {
60
- id: parsedOrganizationApiKey.data.workspaceId,
61
- organizationId: organizationApiKey.organizationId,
62
- },
63
- });
64
- if (!workspace) {
65
- return NextResponse.json({ error: 'Invalid workspace' }, { status: 400 });
66
- }
67
- const apiKey = await prisma.apiKey.create({
68
- data: {
69
- type: parsedOrganizationApiKey.data.type,
70
- name: parsedOrganizationApiKey.data.name,
71
- workspaceId: workspace.id,
72
- },
73
- });
74
- return NextResponse.json({
75
- apiKey: serializeApiKey({ apiKey }),
76
- }, { headers: cacheHeaders });
77
- }
78
- const privateApiKey = await getApiKey({
79
- type: ApiKeyType.PRIVATE,
80
- authorization,
81
- prisma,
82
- });
83
- if (!privateApiKey) {
84
- return NextResponse.json({ error: 'Invalid api key' }, { status: 400 });
85
- }
86
- const createSchema = z.object({
87
- name: z.string().min(1).optional(),
88
- });
89
- const parsed = createSchema.safeParse(body);
90
- if (!parsed.success) {
91
- return NextResponse.json({ error: 'Invalid body' }, { status: 400 });
92
- }
93
- const { name } = parsed.data;
94
- const workspaceId = privateApiKey.workspaceId;
95
- const apiKey = await prisma.apiKey.create({
96
- data: {
97
- type: ApiKeyType.PUBLIC,
98
- name,
99
- workspaceId,
100
- },
101
- });
102
- return NextResponse.json({
103
- apiKey: serializeApiKey({ apiKey }),
104
- }, { headers: cacheHeaders });
105
- };
106
- export const POST = ((...args) => buildPOST()(...args));
107
- export const OPTIONS = () => NextResponse.json({}, {
108
- headers: cacheHeaders,
1
+ import { prisma } from '../../../lib/prisma';
2
+ import { buildGET, buildPOST, buildOPTIONS } from './buildRoute';
3
+ export const GET = buildGET({
4
+ prisma,
109
5
  });
6
+ export const POST = buildPOST({
7
+ prisma,
8
+ });
9
+ export const OPTIONS = buildOPTIONS();
@@ -0,0 +1,120 @@
1
+ import { type NextRequest, NextResponse } from 'next/server';
2
+ import { type PrismaClient } from '@prisma/client';
3
+ type RouteProps = {
4
+ params: Promise<{
5
+ assistantId: string;
6
+ }>;
7
+ };
8
+ export declare const buildGET: ({ prisma }: {
9
+ prisma: PrismaClient;
10
+ }) => (request: NextRequest, props: RouteProps) => Promise<NextResponse<{
11
+ error: string;
12
+ }> | NextResponse<{
13
+ assistant: {
14
+ id: string;
15
+ storageProviderType: import("@prisma/client").$Enums.StorageProviderType;
16
+ storageProviderAssistantId: string | null;
17
+ modelProviderId: string;
18
+ model: string;
19
+ name: string;
20
+ description: string;
21
+ instructions: string;
22
+ codeInterpreterEnabled: boolean;
23
+ fileSearchEnabled: boolean;
24
+ createdAt: string;
25
+ updatedAt: string;
26
+ avatar: {
27
+ type: import("@prisma/client").$Enums.AvatarType;
28
+ imageAvatar: {
29
+ url: string;
30
+ } | null;
31
+ iconAvatar: {
32
+ name: import("@prisma/client").$Enums.IconAvatarName;
33
+ } | null;
34
+ };
35
+ };
36
+ }> | NextResponse<{
37
+ assistant: {
38
+ id: string;
39
+ name: string;
40
+ description: string;
41
+ theme: {
42
+ accentColor: "gray" | "gold" | "bronze" | "brown" | "yellow" | "amber" | "orange" | "tomato" | "red" | "ruby" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "indigo" | "blue" | "cyan" | "teal" | "jade" | "green" | "grass" | "lime" | "mint" | "sky";
43
+ grayColor: "auto" | "gray" | "mauve" | "slate" | "sage" | "olive" | "sand";
44
+ appearance: "inherit" | "light" | "dark";
45
+ radius: "small" | "none" | "medium" | "large" | "full";
46
+ scaling: "90%" | "95%" | "100%" | "105%" | "110%";
47
+ panelBackground: "solid";
48
+ };
49
+ avatar: {
50
+ type: import("@prisma/client").$Enums.AvatarType;
51
+ imageAvatar: {
52
+ url: string;
53
+ } | null;
54
+ iconAvatar: {
55
+ name: import("@prisma/client").$Enums.IconAvatarName;
56
+ } | null;
57
+ };
58
+ };
59
+ }>>;
60
+ export declare const buildPATCH: ({ prisma }: {
61
+ prisma: PrismaClient;
62
+ }) => (request: NextRequest, props: RouteProps) => Promise<NextResponse<{
63
+ error: string;
64
+ }> | NextResponse<{
65
+ assistant: {
66
+ id: string;
67
+ storageProviderType: import("@prisma/client").$Enums.StorageProviderType;
68
+ storageProviderAssistantId: string | null;
69
+ modelProviderId: string;
70
+ model: string;
71
+ name: string;
72
+ description: string;
73
+ instructions: string;
74
+ codeInterpreterEnabled: boolean;
75
+ fileSearchEnabled: boolean;
76
+ createdAt: string;
77
+ updatedAt: string;
78
+ avatar: {
79
+ type: import("@prisma/client").$Enums.AvatarType;
80
+ imageAvatar: {
81
+ url: string;
82
+ } | null;
83
+ iconAvatar: {
84
+ name: import("@prisma/client").$Enums.IconAvatarName;
85
+ } | null;
86
+ };
87
+ };
88
+ }>>;
89
+ export declare const buildDELETE: ({ prisma }: {
90
+ prisma: PrismaClient;
91
+ }) => (_request: NextRequest, props: RouteProps) => Promise<NextResponse<{
92
+ error: string;
93
+ }> | NextResponse<{
94
+ assistant: {
95
+ id: string;
96
+ storageProviderType: import("@prisma/client").$Enums.StorageProviderType;
97
+ storageProviderAssistantId: string | null;
98
+ modelProviderId: string;
99
+ model: string;
100
+ name: string;
101
+ description: string;
102
+ instructions: string;
103
+ codeInterpreterEnabled: boolean;
104
+ fileSearchEnabled: boolean;
105
+ createdAt: string;
106
+ updatedAt: string;
107
+ avatar: {
108
+ type: import("@prisma/client").$Enums.AvatarType;
109
+ imageAvatar: {
110
+ url: string;
111
+ } | null;
112
+ iconAvatar: {
113
+ name: import("@prisma/client").$Enums.IconAvatarName;
114
+ } | null;
115
+ };
116
+ };
117
+ }>>;
118
+ export declare const buildOPTIONS: () => () => NextResponse<{}>;
119
+ export {};
120
+ //# sourceMappingURL=buildRoute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildRoute.d.ts","sourceRoot":"","sources":["../../../../../src/app/api/assistants/[assistantId]/buildRoute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAA;AASvB,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,OAAO,CAAC;QACd,WAAW,EAAE,MAAM,CAAA;KACpB,CAAC,CAAA;CACH,CAAA;AAED,eAAO,MAAM,QAAQ,GAClB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2F7C,CAAA;AAEH,eAAO,MAAM,UAAU,GACpB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;GAqJ7C,CAAA;AAEH,eAAO,MAAM,WAAW,GACrB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,UAAU,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;GAuD9C,CAAA;AAEH,eAAO,MAAM,YAAY,8BAMtB,CAAA"}
@@ -0,0 +1,226 @@
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 { serializeAssistant } from '../../../../lib/assistants/serializeAssistant';
6
+ import { serializeApiAssistant } from '../../../../lib/assistants/serializeApiAssistant';
7
+ import { headers } from 'next/headers';
8
+ import { z } from 'zod';
9
+ import { getApiKey } from '../../../../lib/apiKeys/getApiKey';
10
+ export const buildGET = ({ prisma }) => async (request, props) => {
11
+ const params = await props.params;
12
+ const { assistantId } = params;
13
+ const headersList = await headers();
14
+ const authorization = headersList.get('authorization');
15
+ if (authorization) {
16
+ const privateApiKey = await getApiKey({
17
+ authorization,
18
+ type: ApiKeyType.PRIVATE,
19
+ prisma,
20
+ });
21
+ if (!privateApiKey) {
22
+ return NextResponse.json({ error: 'Invalid api key' }, { status: 400 });
23
+ }
24
+ const assistant = await prisma.assistant.findUnique({
25
+ where: {
26
+ id: assistantId,
27
+ workspaceId: privateApiKey.workspaceId,
28
+ },
29
+ include: {
30
+ tools: true,
31
+ avatar: {
32
+ include: {
33
+ imageAvatar: true,
34
+ iconAvatar: true,
35
+ },
36
+ },
37
+ },
38
+ });
39
+ if (!assistant) {
40
+ return NextResponse.json({ error: 'No assistant found' }, { status: 400 });
41
+ }
42
+ return NextResponse.json({
43
+ assistant: serializeApiAssistant({ assistant }),
44
+ }, { headers: cacheHeaders });
45
+ }
46
+ const workspaceAccessWhere = await getWorkspaceAccessWhere({
47
+ publicApiKey: request.nextUrl.searchParams.get('publicApiKey'),
48
+ prisma,
49
+ });
50
+ if (!workspaceAccessWhere) {
51
+ return NextResponse.json({ error: 'Invalid api key' }, { status: 400 });
52
+ }
53
+ if (!assistantId) {
54
+ return NextResponse.json({ error: 'No assistant id found' }, { status: 400 });
55
+ }
56
+ const assistant = await prisma.assistant.findFirst({
57
+ where: {
58
+ id: assistantId,
59
+ workspace: workspaceAccessWhere,
60
+ },
61
+ include: {
62
+ avatar: {
63
+ include: {
64
+ imageAvatar: true,
65
+ iconAvatar: true,
66
+ },
67
+ },
68
+ },
69
+ });
70
+ if (!assistant) {
71
+ return NextResponse.json({ error: 'No assistant found' }, { status: 400 });
72
+ }
73
+ return NextResponse.json({
74
+ assistant: serializeAssistant({ assistant }),
75
+ }, { headers: cacheHeaders });
76
+ };
77
+ export const buildPATCH = ({ prisma }) => async (request, props) => {
78
+ const params = await props.params;
79
+ const { assistantId } = params;
80
+ const headersList = await headers();
81
+ const authorization = headersList.get('authorization');
82
+ if (!authorization) {
83
+ return NextResponse.json({ error: 'No authorization header found' }, { status: 400 });
84
+ }
85
+ const privateApiKey = await getApiKey({
86
+ authorization,
87
+ type: ApiKeyType.PRIVATE,
88
+ prisma,
89
+ });
90
+ if (!privateApiKey) {
91
+ return NextResponse.json({ error: 'Invalid api key' }, { status: 400 });
92
+ }
93
+ const updateSchema = z
94
+ .object({
95
+ storageProviderType: z.nativeEnum(StorageProviderType).optional(),
96
+ storageProviderAssistantId: z.string().nullable().optional(),
97
+ modelProviderId: z.string().optional(),
98
+ model: z.string().optional(),
99
+ name: z.string().optional(),
100
+ description: z.string().optional(),
101
+ instructions: z.string().optional(),
102
+ codeInterpreterEnabled: z.boolean().optional(),
103
+ fileSearchEnabled: z.boolean().optional(),
104
+ })
105
+ .superRefine((data, ctx) => {
106
+ if (!data.storageProviderType)
107
+ return;
108
+ if (data.storageProviderType ===
109
+ StorageProviderType.SUPERINTERFACE_CLOUD &&
110
+ data.storageProviderAssistantId) {
111
+ ctx.addIssue({
112
+ code: z.ZodIssueCode.custom,
113
+ message: 'storageProviderAssistantId should not be provided for SUPERINTERFACE_CLOUD',
114
+ path: ['storageProviderAssistantId'],
115
+ });
116
+ }
117
+ if (data.storageProviderType !==
118
+ StorageProviderType.SUPERINTERFACE_CLOUD &&
119
+ !data.storageProviderAssistantId) {
120
+ ctx.addIssue({
121
+ code: z.ZodIssueCode.custom,
122
+ message: 'storageProviderAssistantId is required for this storage provider',
123
+ path: ['storageProviderAssistantId'],
124
+ });
125
+ }
126
+ });
127
+ const parseResult = updateSchema.safeParse(await request.json());
128
+ if (!parseResult.success) {
129
+ return NextResponse.json({
130
+ error: 'Invalid body: ' + parseResult.error.message,
131
+ }, { status: 400 });
132
+ }
133
+ const { storageProviderType, storageProviderAssistantId, modelProviderId, model, name, description, instructions, codeInterpreterEnabled, fileSearchEnabled, } = parseResult.data;
134
+ const data = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (storageProviderType !== undefined && { storageProviderType })), (storageProviderAssistantId !== undefined && {
135
+ openaiAssistantId: storageProviderAssistantId,
136
+ })), (modelProviderId !== undefined && {
137
+ modelProvider: { connect: { id: modelProviderId } },
138
+ })), (model !== undefined && { modelSlug: model })), (name !== undefined && { name })), (description !== undefined && { description })), (instructions !== undefined && { instructions })), { tools: {
139
+ create: [
140
+ ...(codeInterpreterEnabled === true
141
+ ? [
142
+ {
143
+ type: ToolType.CODE_INTERPRETER,
144
+ codeInterpreterTool: { create: {} },
145
+ },
146
+ ]
147
+ : []),
148
+ ...(fileSearchEnabled === true
149
+ ? [{ type: ToolType.FILE_SEARCH, fileSearchTool: { create: {} } }]
150
+ : []),
151
+ ],
152
+ deleteMany: [
153
+ ...(codeInterpreterEnabled === false
154
+ ? [{ assistantId, type: ToolType.CODE_INTERPRETER }]
155
+ : []),
156
+ ...(fileSearchEnabled === false
157
+ ? [{ assistantId, type: ToolType.FILE_SEARCH }]
158
+ : []),
159
+ ],
160
+ } });
161
+ const assistant = await prisma.assistant.update({
162
+ where: {
163
+ id: assistantId,
164
+ workspaceId: privateApiKey.workspaceId,
165
+ },
166
+ data,
167
+ include: {
168
+ tools: true,
169
+ avatar: {
170
+ include: {
171
+ imageAvatar: true,
172
+ iconAvatar: true,
173
+ },
174
+ },
175
+ },
176
+ });
177
+ return NextResponse.json({
178
+ assistant: serializeApiAssistant({ assistant }),
179
+ }, { headers: cacheHeaders });
180
+ };
181
+ export const buildDELETE = ({ prisma }) => async (_request, props) => {
182
+ const params = await props.params;
183
+ const { assistantId } = params;
184
+ const headersList = await headers();
185
+ const authorization = headersList.get('authorization');
186
+ if (!authorization) {
187
+ return NextResponse.json({ error: 'No authorization header found' }, { status: 400 });
188
+ }
189
+ const privateApiKey = await getApiKey({
190
+ authorization,
191
+ type: ApiKeyType.PRIVATE,
192
+ prisma,
193
+ });
194
+ if (!privateApiKey) {
195
+ return NextResponse.json({ error: 'Invalid api key' }, { status: 400 });
196
+ }
197
+ const assistant = await prisma.assistant.findFirst({
198
+ where: {
199
+ id: assistantId,
200
+ workspaceId: privateApiKey.workspaceId,
201
+ },
202
+ include: {
203
+ tools: true,
204
+ avatar: {
205
+ include: {
206
+ imageAvatar: true,
207
+ iconAvatar: true,
208
+ },
209
+ },
210
+ },
211
+ });
212
+ if (!assistant) {
213
+ return NextResponse.json({ error: 'No assistant found' }, { status: 400 });
214
+ }
215
+ await prisma.assistant.delete({
216
+ where: {
217
+ id: assistant.id,
218
+ },
219
+ });
220
+ return NextResponse.json({
221
+ assistant: serializeApiAssistant({ assistant }),
222
+ }, { headers: cacheHeaders });
223
+ };
224
+ export const buildOPTIONS = () => () => NextResponse.json({}, {
225
+ headers: cacheHeaders,
226
+ });
@@ -0,0 +1,167 @@
1
+ import { type PrismaClient } from '@prisma/client';
2
+ import { NextResponse, type NextRequest } from 'next/server';
3
+ type RouteProps = {
4
+ params: Promise<{
5
+ assistantId: string;
6
+ functionId: string;
7
+ }>;
8
+ };
9
+ export declare const buildGET: ({ prisma }: {
10
+ prisma: PrismaClient;
11
+ }) => (_request: NextRequest, props: RouteProps) => Promise<NextResponse<{
12
+ error: string;
13
+ }> | NextResponse<{
14
+ function: {
15
+ id: string;
16
+ openapiSpec: PrismaJson.OpenapiSpec;
17
+ handler: {
18
+ deleteTaskHandler?: {
19
+ keyTemplate: string;
20
+ } | undefined;
21
+ updateTaskHandler?: {
22
+ keyTemplate: string;
23
+ } | undefined;
24
+ createTaskHandler?: {
25
+ keyTemplate: string;
26
+ } | undefined;
27
+ listTasksHandler?: {
28
+ keyTemplate: string;
29
+ } | undefined;
30
+ assistantHandler?: {
31
+ assistantId: string;
32
+ } | undefined;
33
+ clientToolHandler?: {
34
+ type: "FUNCTION";
35
+ name: string;
36
+ arguments: PrismaJson.ClientToolHandlerArguments;
37
+ } | undefined;
38
+ replicateHandler?: {
39
+ type: "RUN";
40
+ apiKey: string;
41
+ identifier: string;
42
+ body: PrismaJson.ReplicateHandlerBody;
43
+ } | undefined;
44
+ firecrawlHandler?: {
45
+ type: import("@prisma/client").$Enums.FirecrawlHandlerType;
46
+ apiKey: string;
47
+ body: PrismaJson.FirecrawlHandlerBody;
48
+ } | undefined;
49
+ requestHandler?: {
50
+ url: string;
51
+ method: import("@prisma/client").$Enums.MethodType;
52
+ headers: PrismaJson.RequestHandlerHeaders;
53
+ body: PrismaJson.RequestHandlerBody;
54
+ } | undefined;
55
+ type: import("@prisma/client").$Enums.HandlerType;
56
+ };
57
+ createdAt: string;
58
+ updatedAt: string;
59
+ };
60
+ }>>;
61
+ export declare const buildPATCH: ({ prisma }: {
62
+ prisma: PrismaClient;
63
+ }) => (request: NextRequest, props: RouteProps) => Promise<NextResponse<{
64
+ error: string;
65
+ }> | NextResponse<{
66
+ function: {
67
+ id: string;
68
+ openapiSpec: PrismaJson.OpenapiSpec;
69
+ handler: {
70
+ deleteTaskHandler?: {
71
+ keyTemplate: string;
72
+ } | undefined;
73
+ updateTaskHandler?: {
74
+ keyTemplate: string;
75
+ } | undefined;
76
+ createTaskHandler?: {
77
+ keyTemplate: string;
78
+ } | undefined;
79
+ listTasksHandler?: {
80
+ keyTemplate: string;
81
+ } | undefined;
82
+ assistantHandler?: {
83
+ assistantId: string;
84
+ } | undefined;
85
+ clientToolHandler?: {
86
+ type: "FUNCTION";
87
+ name: string;
88
+ arguments: PrismaJson.ClientToolHandlerArguments;
89
+ } | undefined;
90
+ replicateHandler?: {
91
+ type: "RUN";
92
+ apiKey: string;
93
+ identifier: string;
94
+ body: PrismaJson.ReplicateHandlerBody;
95
+ } | undefined;
96
+ firecrawlHandler?: {
97
+ type: import("@prisma/client").$Enums.FirecrawlHandlerType;
98
+ apiKey: string;
99
+ body: PrismaJson.FirecrawlHandlerBody;
100
+ } | undefined;
101
+ requestHandler?: {
102
+ url: string;
103
+ method: import("@prisma/client").$Enums.MethodType;
104
+ headers: PrismaJson.RequestHandlerHeaders;
105
+ body: PrismaJson.RequestHandlerBody;
106
+ } | undefined;
107
+ type: import("@prisma/client").$Enums.HandlerType;
108
+ };
109
+ createdAt: string;
110
+ updatedAt: string;
111
+ };
112
+ }>>;
113
+ export declare const buildDELETE: ({ prisma }: {
114
+ prisma: PrismaClient;
115
+ }) => (_request: NextRequest, props: RouteProps) => Promise<NextResponse<{
116
+ error: string;
117
+ }> | NextResponse<{
118
+ mcpServer: {
119
+ id: string;
120
+ openapiSpec: PrismaJson.OpenapiSpec;
121
+ handler: {
122
+ deleteTaskHandler?: {
123
+ keyTemplate: string;
124
+ } | undefined;
125
+ updateTaskHandler?: {
126
+ keyTemplate: string;
127
+ } | undefined;
128
+ createTaskHandler?: {
129
+ keyTemplate: string;
130
+ } | undefined;
131
+ listTasksHandler?: {
132
+ keyTemplate: string;
133
+ } | undefined;
134
+ assistantHandler?: {
135
+ assistantId: string;
136
+ } | undefined;
137
+ clientToolHandler?: {
138
+ type: "FUNCTION";
139
+ name: string;
140
+ arguments: PrismaJson.ClientToolHandlerArguments;
141
+ } | undefined;
142
+ replicateHandler?: {
143
+ type: "RUN";
144
+ apiKey: string;
145
+ identifier: string;
146
+ body: PrismaJson.ReplicateHandlerBody;
147
+ } | undefined;
148
+ firecrawlHandler?: {
149
+ type: import("@prisma/client").$Enums.FirecrawlHandlerType;
150
+ apiKey: string;
151
+ body: PrismaJson.FirecrawlHandlerBody;
152
+ } | undefined;
153
+ requestHandler?: {
154
+ url: string;
155
+ method: import("@prisma/client").$Enums.MethodType;
156
+ headers: PrismaJson.RequestHandlerHeaders;
157
+ body: PrismaJson.RequestHandlerBody;
158
+ } | undefined;
159
+ type: import("@prisma/client").$Enums.HandlerType;
160
+ };
161
+ createdAt: string;
162
+ updatedAt: string;
163
+ };
164
+ }>>;
165
+ export declare const buildOPTIONS: () => () => NextResponse<{}>;
166
+ export {};
167
+ //# sourceMappingURL=buildRoute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildRoute.d.ts","sourceRoot":"","sources":["../../../../../../../src/app/api/assistants/[assistantId]/functions/[functionId]/buildRoute.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AAQ5D,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC7D,CAAA;AA0BD,eAAO,MAAM,QAAQ,GAClB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,UAAU,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4D9C,CAAA;AAEH,eAAO,MAAM,UAAU,GACpB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6E7C,CAAA;AAEH,eAAO,MAAM,WAAW,GACrB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,UAAU,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgE9C,CAAA;AAEH,eAAO,MAAM,YAAY,8BAMtB,CAAA"}