@superinterface/server 1.0.25 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/eslint/.cache_btwyo7 +1 -1
- package/.next/fallback-build-manifest.json +2 -2
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/api/api-keys/[apiKeyId]/route.js +1 -1
- package/.next/server/app/api/api-keys/[apiKeyId]/route.js.nft.json +1 -1
- package/.next/server/app/api/api-keys/route.js +1 -1
- package/.next/server/app/api/api-keys/route.js.nft.json +1 -1
- package/.next/server/app/api/assistants/[assistantId]/functions/[functionId]/route.js +1 -1
- package/.next/server/app/api/assistants/[assistantId]/functions/[functionId]/route.js.nft.json +1 -1
- package/.next/server/app/api/assistants/[assistantId]/functions/route.js +1 -1
- package/.next/server/app/api/assistants/[assistantId]/functions/route.js.nft.json +1 -1
- package/.next/server/app/api/assistants/[assistantId]/initial-messages/route.js +1 -1
- package/.next/server/app/api/assistants/[assistantId]/initial-messages/route.js.nft.json +1 -1
- package/.next/server/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/route.js +1 -1
- package/.next/server/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/route.js.nft.json +1 -1
- package/.next/server/app/api/assistants/[assistantId]/mcp-servers/route.js +1 -1
- package/.next/server/app/api/assistants/[assistantId]/mcp-servers/route.js.nft.json +1 -1
- package/.next/server/app/api/assistants/[assistantId]/route.js +1 -1
- package/.next/server/app/api/assistants/[assistantId]/route.js.nft.json +1 -1
- package/.next/server/app/api/assistants/route.js +1 -1
- package/.next/server/app/api/assistants/route.js.nft.json +1 -1
- package/.next/server/app/api/files/[fileId]/contents/route.js +1 -1
- package/.next/server/app/api/files/[fileId]/contents/route.js.nft.json +1 -1
- package/.next/server/app/api/files/route.js +1 -1
- package/.next/server/app/api/files/route.js.nft.json +1 -1
- package/.next/server/app/api/messages/route.js +1 -1
- package/.next/server/app/api/messages/route.js.nft.json +1 -1
- package/.next/server/app/api/providers/[modelProviderId]/assistants/route.js +1 -1
- package/.next/server/app/api/providers/[modelProviderId]/assistants/route.js.nft.json +1 -1
- package/.next/server/app/api/providers/[modelProviderId]/models/route.js +1 -1
- package/.next/server/app/api/providers/[modelProviderId]/models/route.js.nft.json +1 -1
- package/.next/server/app/api/providers/[modelProviderId]/route.js +1 -1
- package/.next/server/app/api/providers/[modelProviderId]/route.js.nft.json +1 -1
- package/.next/server/app/api/providers/route.js +1 -1
- package/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
- package/.next/server/app/api/tasks/[taskId]/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/callback/route.js +1 -1
- package/.next/server/app/api/tasks/callback/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/route.js +1 -1
- package/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/threads/runs/submit-client-tool-outputs/route.js +1 -1
- package/.next/server/app/api/threads/runs/submit-client-tool-outputs/route.js.nft.json +1 -1
- package/.next/server/app/api/workspaces/[workspaceId]/route.js +1 -1
- package/.next/server/app/api/workspaces/[workspaceId]/route.js.nft.json +1 -1
- package/.next/server/app/api/workspaces/route.js +1 -1
- package/.next/server/app/api/workspaces/route.js.nft.json +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +1 -1
- package/.next/server/chunks/[root-of-the-server]__0c1bc5ed._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0c1bc5ed._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__25ee13bc._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__25ee13bc._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__2945c9e9._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__2945c9e9._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__29635e8e._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__29635e8e._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__315f084a._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__315f084a._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__40ab45eb._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__40ab45eb._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__441cee00._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__441cee00._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__464a4377._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__464a4377._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__47b17fad._.js +38 -0
- package/.next/server/chunks/[root-of-the-server]__47b17fad._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__4e536bc0._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__4e536bc0._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__583a7f1c._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__583a7f1c._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__5abf1160._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__5abf1160._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__5d09614a._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__5d09614a._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__62d958e7._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__62d958e7._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__676affb1._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__676affb1._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__83461316._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__83461316._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__9a611d42._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__9a611d42._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__a878c913._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__a878c913._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__b10ec83e._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__b10ec83e._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__c1629392._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__c1629392._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__eb816e13._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__eb816e13._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__f6f61507._.js +38 -0
- package/.next/server/chunks/[root-of-the-server]__f6f61507._.js.map +1 -0
- package/.next/server/chunks/c4f00_next_dist_esm_build_templates_app-route_cb746cf4.js +1 -1
- package/.next/server/chunks/c4f00_next_dist_esm_build_templates_app-route_cb746cf4.js.map +1 -1
- package/.next/server/chunks/c4f00_next_dist_esm_build_templates_app-route_f952d9ab.js +1 -1
- package/.next/server/chunks/c4f00_next_dist_esm_build_templates_app-route_f952d9ab.js.map +1 -1
- package/.next/server/functions-config-manifest.json +1 -8
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/trace +1 -1
- package/dist/app/api/api-keys/[apiKeyId]/buildRoute.d.ts +52 -0
- package/dist/app/api/api-keys/[apiKeyId]/buildRoute.d.ts.map +1 -0
- package/dist/app/api/api-keys/[apiKeyId]/buildRoute.js +121 -0
- package/dist/app/api/api-keys/[apiKeyId]/route.d.ts +10 -21
- package/dist/app/api/api-keys/[apiKeyId]/route.d.ts.map +1 -1
- package/dist/app/api/api-keys/[apiKeyId]/route.js +6 -125
- package/dist/app/api/api-keys/buildRoute.d.ts +32 -0
- package/dist/app/api/api-keys/buildRoute.d.ts.map +1 -0
- package/dist/app/api/api-keys/buildRoute.js +104 -0
- package/dist/app/api/api-keys/builders.d.ts +31 -0
- package/dist/app/api/api-keys/builders.d.ts.map +1 -0
- package/dist/app/api/api-keys/builders.js +109 -0
- package/dist/app/api/api-keys/route.d.ts +5 -13
- package/dist/app/api/api-keys/route.d.ts.map +1 -1
- package/dist/app/api/api-keys/route.js +8 -108
- package/dist/app/api/assistants/[assistantId]/buildRoute.d.ts +120 -0
- package/dist/app/api/assistants/[assistantId]/buildRoute.d.ts.map +1 -0
- package/dist/app/api/assistants/[assistantId]/buildRoute.js +226 -0
- package/dist/app/api/assistants/[assistantId]/functions/[functionId]/buildRoute.d.ts +167 -0
- package/dist/app/api/assistants/[assistantId]/functions/[functionId]/buildRoute.d.ts.map +1 -0
- package/dist/app/api/assistants/[assistantId]/functions/[functionId]/buildRoute.js +184 -0
- package/dist/app/api/assistants/[assistantId]/functions/[functionId]/route.d.ts +10 -21
- package/dist/app/api/assistants/[assistantId]/functions/[functionId]/route.d.ts.map +1 -1
- package/dist/app/api/assistants/[assistantId]/functions/[functionId]/route.js +6 -191
- package/dist/app/api/assistants/[assistantId]/functions/buildRoute.d.ts +114 -0
- package/dist/app/api/assistants/[assistantId]/functions/buildRoute.d.ts.map +1 -0
- package/dist/app/api/assistants/[assistantId]/functions/buildRoute.js +117 -0
- package/dist/app/api/assistants/[assistantId]/functions/route.d.ts +7 -15
- package/dist/app/api/assistants/[assistantId]/functions/route.d.ts.map +1 -1
- package/dist/app/api/assistants/[assistantId]/functions/route.js +5 -122
- package/dist/app/api/assistants/[assistantId]/initial-messages/buildRoute.d.ts +40 -0
- package/dist/app/api/assistants/[assistantId]/initial-messages/buildRoute.d.ts.map +1 -0
- package/dist/app/api/assistants/[assistantId]/initial-messages/buildRoute.js +85 -0
- package/dist/app/api/assistants/[assistantId]/initial-messages/route.d.ts +7 -15
- package/dist/app/api/assistants/[assistantId]/initial-messages/route.d.ts.map +1 -1
- package/dist/app/api/assistants/[assistantId]/initial-messages/route.js +5 -90
- package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/buildRoute.d.ts +89 -0
- package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/buildRoute.d.ts.map +1 -0
- package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/buildRoute.js +167 -0
- package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/route.d.ts +10 -21
- package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/route.d.ts.map +1 -1
- package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/route.js +6 -174
- package/dist/app/api/assistants/[assistantId]/mcp-servers/buildRoute.d.ts +62 -0
- package/dist/app/api/assistants/[assistantId]/mcp-servers/buildRoute.d.ts.map +1 -0
- package/dist/app/api/assistants/[assistantId]/mcp-servers/buildRoute.js +115 -0
- package/dist/app/api/assistants/[assistantId]/mcp-servers/route.d.ts +7 -15
- package/dist/app/api/assistants/[assistantId]/mcp-servers/route.d.ts.map +1 -1
- package/dist/app/api/assistants/[assistantId]/mcp-servers/route.js +5 -120
- package/dist/app/api/assistants/[assistantId]/route.d.ts +11 -22
- package/dist/app/api/assistants/[assistantId]/route.d.ts.map +1 -1
- package/dist/app/api/assistants/[assistantId]/route.js +6 -233
- package/dist/app/api/assistants/buildRoute.d.ts +121 -0
- package/dist/app/api/assistants/buildRoute.d.ts.map +1 -0
- package/dist/app/api/assistants/buildRoute.js +144 -0
- package/dist/app/api/assistants/route.d.ts +7 -13
- package/dist/app/api/assistants/route.d.ts.map +1 -1
- package/dist/app/api/assistants/route.js +6 -148
- package/dist/app/api/files/[fileId]/contents/buildRoute.d.ts +18 -0
- package/dist/app/api/files/[fileId]/contents/buildRoute.d.ts.map +1 -0
- package/dist/app/api/files/[fileId]/contents/buildRoute.js +81 -0
- package/dist/app/api/files/[fileId]/contents/route.d.ts +3 -13
- package/dist/app/api/files/[fileId]/contents/route.d.ts.map +1 -1
- package/dist/app/api/files/[fileId]/contents/route.js +4 -84
- package/dist/app/api/files/buildRoute.d.ts +14 -0
- package/dist/app/api/files/buildRoute.d.ts.map +1 -0
- package/dist/app/api/files/buildRoute.js +88 -0
- package/dist/app/api/files/route.d.ts +4 -10
- package/dist/app/api/files/route.d.ts.map +1 -1
- package/dist/app/api/files/route.js +4 -91
- package/dist/app/api/messages/buildRoute.d.ts +34 -0
- package/dist/app/api/messages/buildRoute.d.ts.map +1 -0
- package/dist/app/api/messages/buildRoute.js +607 -0
- package/dist/app/api/messages/lib/initialMessagesResponse.d.ts.map +1 -1
- package/dist/app/api/messages/lib/initialMessagesResponse.js +1 -1
- package/dist/app/api/messages/route.d.ts +10 -22
- package/dist/app/api/messages/route.d.ts.map +1 -1
- package/dist/app/api/messages/route.js +6 -612
- package/dist/app/api/providers/[modelProviderId]/assistants/buildRoute.d.ts +24 -0
- package/dist/app/api/providers/[modelProviderId]/assistants/buildRoute.d.ts.map +1 -0
- package/dist/app/api/providers/[modelProviderId]/assistants/buildRoute.js +43 -0
- package/dist/app/api/providers/[modelProviderId]/assistants/route.d.ts +4 -9
- package/dist/app/api/providers/[modelProviderId]/assistants/route.d.ts.map +1 -1
- package/dist/app/api/providers/[modelProviderId]/assistants/route.js +4 -46
- package/dist/app/api/providers/[modelProviderId]/buildRoute.d.ts +61 -0
- package/dist/app/api/providers/[modelProviderId]/buildRoute.d.ts.map +1 -0
- package/dist/app/api/providers/[modelProviderId]/buildRoute.js +134 -0
- package/dist/app/api/providers/[modelProviderId]/models/buildRoute.d.ts +19 -0
- package/dist/app/api/providers/[modelProviderId]/models/buildRoute.d.ts.map +1 -0
- package/dist/app/api/providers/[modelProviderId]/models/buildRoute.js +43 -0
- package/dist/app/api/providers/[modelProviderId]/models/route.d.ts +4 -9
- package/dist/app/api/providers/[modelProviderId]/models/route.d.ts.map +1 -1
- package/dist/app/api/providers/[modelProviderId]/models/route.js +4 -46
- package/dist/app/api/providers/[modelProviderId]/route.d.ts +10 -21
- package/dist/app/api/providers/[modelProviderId]/route.d.ts.map +1 -1
- package/dist/app/api/providers/[modelProviderId]/route.js +6 -141
- package/dist/app/api/providers/buildRoute.d.ts +38 -0
- package/dist/app/api/providers/buildRoute.d.ts.map +1 -0
- package/dist/app/api/providers/buildRoute.js +75 -0
- package/dist/app/api/providers/route.d.ts +5 -13
- package/dist/app/api/providers/route.d.ts.map +1 -1
- package/dist/app/api/providers/route.js +5 -80
- package/dist/app/api/tasks/[taskId]/buildRoute.d.ts +19 -0
- package/dist/app/api/tasks/[taskId]/buildRoute.d.ts.map +1 -0
- package/dist/app/api/tasks/[taskId]/buildRoute.js +125 -0
- package/dist/app/api/tasks/[taskId]/route.d.ts +7 -57
- package/dist/app/api/tasks/[taskId]/route.d.ts.map +1 -1
- package/dist/app/api/tasks/[taskId]/route.js +6 -144
- package/dist/app/api/tasks/buildRoute.d.ts +36 -0
- package/dist/app/api/tasks/buildRoute.d.ts.map +1 -0
- package/dist/app/api/tasks/buildRoute.js +85 -0
- package/dist/app/api/tasks/callback/buildRoute.d.ts +6 -0
- package/dist/app/api/tasks/callback/buildRoute.d.ts.map +1 -0
- package/dist/app/api/tasks/callback/buildRoute.js +244 -0
- package/dist/app/api/tasks/callback/route.d.ts +2 -1
- package/dist/app/api/tasks/callback/route.d.ts.map +1 -1
- package/dist/app/api/tasks/callback/route.js +4 -244
- package/dist/app/api/tasks/route.d.ts +5 -13
- package/dist/app/api/tasks/route.d.ts.map +1 -1
- package/dist/app/api/tasks/route.js +5 -90
- package/dist/app/api/threads/runs/submit-client-tool-outputs/buildRoute.d.ts +10 -0
- package/dist/app/api/threads/runs/submit-client-tool-outputs/buildRoute.d.ts.map +1 -0
- package/dist/app/api/threads/runs/submit-client-tool-outputs/buildRoute.js +36 -0
- package/dist/app/api/threads/runs/submit-client-tool-outputs/route.d.ts +2 -7
- package/dist/app/api/threads/runs/submit-client-tool-outputs/route.d.ts.map +1 -1
- package/dist/app/api/threads/runs/submit-client-tool-outputs/route.js +3 -37
- package/dist/app/api/workspaces/[workspaceId]/buildRoute.d.ts +16 -0
- package/dist/app/api/workspaces/[workspaceId]/buildRoute.d.ts.map +1 -0
- package/dist/app/api/workspaces/[workspaceId]/buildRoute.js +89 -0
- package/dist/app/api/workspaces/[workspaceId]/route.d.ts +5 -31
- package/dist/app/api/workspaces/[workspaceId]/route.d.ts.map +1 -1
- package/dist/app/api/workspaces/[workspaceId]/route.js +5 -89
- package/dist/app/api/workspaces/buildRoute.d.ts +42 -0
- package/dist/app/api/workspaces/buildRoute.d.ts.map +1 -0
- package/dist/app/api/workspaces/buildRoute.js +78 -0
- package/dist/app/api/workspaces/route.d.ts +7 -27
- package/dist/app/api/workspaces/route.d.ts.map +1 -1
- package/dist/app/api/workspaces/route.js +6 -82
- package/dist/lib/functions/functionSchema.d.ts +56 -56
- package/dist/lib/functions/handleFunction/getFunction.d.ts +4 -4
- package/dist/lib/mcpServers/mcpServerSchema.d.ts +20 -20
- package/dist/lib/prisma/index.d.ts +1 -9
- package/dist/lib/prisma/index.d.ts.map +1 -1
- package/dist/lib/prisma/index.js +10 -78
- package/package.json +4 -12
- package/.next/server/chunks/[root-of-the-server]__228bff78._.js +0 -38
- package/.next/server/chunks/[root-of-the-server]__228bff78._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__3307123c._.js +0 -38
- package/.next/server/chunks/[root-of-the-server]__3307123c._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__50c5f12c._.js +0 -38
- package/.next/server/chunks/[root-of-the-server]__50c5f12c._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__6b8ba839._.js +0 -38
- package/.next/server/chunks/[root-of-the-server]__6b8ba839._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__e7819e95._.js +0 -38
- package/.next/server/chunks/[root-of-the-server]__e7819e95._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__f0dfab03._.js +0 -38
- package/.next/server/chunks/[root-of-the-server]__f0dfab03._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__ff90af03._.js +0 -38
- package/.next/server/chunks/[root-of-the-server]__ff90af03._.js.map +0 -1
- /package/.next/static/{jt8inwg6nWaLQZ4qpiSJ- → iaWEclnh6aHcuw0CBnWpA}/_buildManifest.js +0 -0
- /package/.next/static/{jt8inwg6nWaLQZ4qpiSJ- → iaWEclnh6aHcuw0CBnWpA}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{jt8inwg6nWaLQZ4qpiSJ- → iaWEclnh6aHcuw0CBnWpA}/_ssgManifest.js +0 -0
|
@@ -1,82 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { getOrganizationApiKey } from '../../../lib/organizationApiKeys/getOrganizationApiKey';
|
|
8
|
-
const createWorkspaceSchema = z.object({
|
|
9
|
-
name: z.string().optional(),
|
|
10
|
-
});
|
|
11
|
-
export const buildGET = ({ prisma: providedPrisma } = {}) => async () => {
|
|
12
|
-
const prisma = resolvePrisma(providedPrisma);
|
|
13
|
-
const headersList = await headers();
|
|
14
|
-
const authorization = headersList.get('authorization');
|
|
15
|
-
if (!authorization) {
|
|
16
|
-
return NextResponse.json({ error: 'No authorization header found' }, { status: 400 });
|
|
17
|
-
}
|
|
18
|
-
const organizationApiKey = await getOrganizationApiKey({
|
|
19
|
-
authorization,
|
|
20
|
-
prisma,
|
|
21
|
-
});
|
|
22
|
-
if (!organizationApiKey) {
|
|
23
|
-
return NextResponse.json({ error: 'Invalid organization api key' }, { status: 400 });
|
|
24
|
-
}
|
|
25
|
-
const workspaces = await prisma.workspace.findMany({
|
|
26
|
-
where: {
|
|
27
|
-
organizationId: organizationApiKey.organizationId,
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
return NextResponse.json({
|
|
31
|
-
workspaces: workspaces.map((workspace) => serializeApiWorkspace({ workspace })),
|
|
32
|
-
}, { headers: cacheHeaders });
|
|
33
|
-
};
|
|
34
|
-
export const GET = ((...args) => buildGET()(...args));
|
|
35
|
-
export const buildPOST = ({ prisma: providedPrisma, createWorkspace = ({ parsedData, organization, prisma, }) => {
|
|
36
|
-
var _a;
|
|
37
|
-
return prisma.workspace.create({
|
|
38
|
-
data: {
|
|
39
|
-
name: (_a = parsedData.name) !== null && _a !== void 0 ? _a : '',
|
|
40
|
-
organizationId: organization.id,
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
}, } = {}) => async (request) => {
|
|
44
|
-
const prisma = resolvePrisma(providedPrisma);
|
|
45
|
-
const headersList = await headers();
|
|
46
|
-
const authorization = headersList.get('authorization');
|
|
47
|
-
if (!authorization) {
|
|
48
|
-
return NextResponse.json({ error: 'No authorization header found' }, { status: 400 });
|
|
49
|
-
}
|
|
50
|
-
const organizationApiKey = await getOrganizationApiKey({
|
|
51
|
-
authorization,
|
|
52
|
-
prisma,
|
|
53
|
-
});
|
|
54
|
-
if (!organizationApiKey) {
|
|
55
|
-
return NextResponse.json({ error: 'Invalid organization api key' }, { status: 400 });
|
|
56
|
-
}
|
|
57
|
-
const body = await request.json();
|
|
58
|
-
const parsed = createWorkspaceSchema.safeParse(body);
|
|
59
|
-
if (!parsed.success) {
|
|
60
|
-
return NextResponse.json({ error: 'Invalid payload' }, { status: 400 });
|
|
61
|
-
}
|
|
62
|
-
const organization = await prisma.organization.findUnique({
|
|
63
|
-
where: {
|
|
64
|
-
id: organizationApiKey.organizationId,
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
if (!organization) {
|
|
68
|
-
return NextResponse.json({ error: 'Organization not found' }, { status: 404 });
|
|
69
|
-
}
|
|
70
|
-
const workspace = await createWorkspace({
|
|
71
|
-
parsedData: parsed.data,
|
|
72
|
-
organization,
|
|
73
|
-
prisma,
|
|
74
|
-
});
|
|
75
|
-
return NextResponse.json({
|
|
76
|
-
workspace: serializeApiWorkspace({ workspace }),
|
|
77
|
-
}, { headers: cacheHeaders });
|
|
78
|
-
};
|
|
79
|
-
export const POST = ((...args) => buildPOST({})(...args));
|
|
80
|
-
export const OPTIONS = () => NextResponse.json({}, {
|
|
81
|
-
headers: cacheHeaders,
|
|
82
|
-
});
|
|
1
|
+
import { prisma } from '../../../lib/prisma';
|
|
2
|
+
import { buildGET, buildOPTIONS, buildPOST, createWorkspaceSchema, } from './buildRoute';
|
|
3
|
+
export { createWorkspaceSchema };
|
|
4
|
+
export const GET = buildGET({ prisma });
|
|
5
|
+
export const POST = buildPOST({ prisma });
|
|
6
|
+
export const OPTIONS = buildOPTIONS();
|
|
@@ -26,14 +26,14 @@ export declare const baseSchema: z.ZodObject<{
|
|
|
26
26
|
headers: z.ZodEffects<z.ZodString, string, string>;
|
|
27
27
|
body: z.ZodEffects<z.ZodString, string, string>;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
headers: string;
|
|
29
30
|
url: string;
|
|
30
31
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
31
|
-
headers: string;
|
|
32
32
|
body: string;
|
|
33
33
|
}, {
|
|
34
|
+
headers: string;
|
|
34
35
|
url: string;
|
|
35
36
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
36
|
-
headers: string;
|
|
37
37
|
body: string;
|
|
38
38
|
}>>>;
|
|
39
39
|
firecrawlHandler: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -46,12 +46,12 @@ export declare const baseSchema: z.ZodObject<{
|
|
|
46
46
|
apiKey: z.ZodString;
|
|
47
47
|
body: z.ZodEffects<z.ZodString, string, string>;
|
|
48
48
|
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
50
49
|
apiKey: string;
|
|
50
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
51
51
|
body: string;
|
|
52
52
|
}, {
|
|
53
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
54
53
|
apiKey: string;
|
|
54
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
55
55
|
body: string;
|
|
56
56
|
}>>>;
|
|
57
57
|
assistantHandler: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -69,13 +69,13 @@ export declare const baseSchema: z.ZodObject<{
|
|
|
69
69
|
apiKey: z.ZodString;
|
|
70
70
|
body: z.ZodEffects<z.ZodString, string, string>;
|
|
71
71
|
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
type: "RUN";
|
|
73
72
|
apiKey: string;
|
|
73
|
+
type: "RUN";
|
|
74
74
|
body: string;
|
|
75
75
|
identifier: string;
|
|
76
76
|
}, {
|
|
77
|
-
type: "RUN";
|
|
78
77
|
apiKey: string;
|
|
78
|
+
type: "RUN";
|
|
79
79
|
body: string;
|
|
80
80
|
identifier: string;
|
|
81
81
|
}>>>;
|
|
@@ -86,12 +86,12 @@ export declare const baseSchema: z.ZodObject<{
|
|
|
86
86
|
name: z.ZodString;
|
|
87
87
|
arguments: z.ZodEffects<z.ZodString, string, string>;
|
|
88
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
|
-
name: string;
|
|
90
89
|
type: "FUNCTION";
|
|
90
|
+
name: string;
|
|
91
91
|
arguments: string;
|
|
92
92
|
}, {
|
|
93
|
-
name: string;
|
|
94
93
|
type: "FUNCTION";
|
|
94
|
+
name: string;
|
|
95
95
|
arguments: string;
|
|
96
96
|
}>>>;
|
|
97
97
|
createTaskHandler: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -128,8 +128,8 @@ export declare const baseSchema: z.ZodObject<{
|
|
|
128
128
|
assistantId: string;
|
|
129
129
|
} | null | undefined;
|
|
130
130
|
clientToolHandler?: {
|
|
131
|
-
name: string;
|
|
132
131
|
type: "FUNCTION";
|
|
132
|
+
name: string;
|
|
133
133
|
arguments: string;
|
|
134
134
|
} | null | undefined;
|
|
135
135
|
createTaskHandler?: {
|
|
@@ -139,23 +139,23 @@ export declare const baseSchema: z.ZodObject<{
|
|
|
139
139
|
keyTemplate: string;
|
|
140
140
|
} | null | undefined;
|
|
141
141
|
firecrawlHandler?: {
|
|
142
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
143
142
|
apiKey: string;
|
|
143
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
144
144
|
body: string;
|
|
145
145
|
} | null | undefined;
|
|
146
146
|
listTasksHandler?: {
|
|
147
147
|
keyTemplate: string;
|
|
148
148
|
} | null | undefined;
|
|
149
149
|
replicateHandler?: {
|
|
150
|
-
type: "RUN";
|
|
151
150
|
apiKey: string;
|
|
151
|
+
type: "RUN";
|
|
152
152
|
body: string;
|
|
153
153
|
identifier: string;
|
|
154
154
|
} | null | undefined;
|
|
155
155
|
requestHandler?: {
|
|
156
|
+
headers: string;
|
|
156
157
|
url: string;
|
|
157
158
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
158
|
-
headers: string;
|
|
159
159
|
body: string;
|
|
160
160
|
} | null | undefined;
|
|
161
161
|
updateTaskHandler?: {
|
|
@@ -167,8 +167,8 @@ export declare const baseSchema: z.ZodObject<{
|
|
|
167
167
|
assistantId: string;
|
|
168
168
|
} | null | undefined;
|
|
169
169
|
clientToolHandler?: {
|
|
170
|
-
name: string;
|
|
171
170
|
type: "FUNCTION";
|
|
171
|
+
name: string;
|
|
172
172
|
arguments: string;
|
|
173
173
|
} | null | undefined;
|
|
174
174
|
createTaskHandler?: {
|
|
@@ -178,23 +178,23 @@ export declare const baseSchema: z.ZodObject<{
|
|
|
178
178
|
keyTemplate: string;
|
|
179
179
|
} | null | undefined;
|
|
180
180
|
firecrawlHandler?: {
|
|
181
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
182
181
|
apiKey: string;
|
|
182
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
183
183
|
body: string;
|
|
184
184
|
} | null | undefined;
|
|
185
185
|
listTasksHandler?: {
|
|
186
186
|
keyTemplate: string;
|
|
187
187
|
} | null | undefined;
|
|
188
188
|
replicateHandler?: {
|
|
189
|
-
type: "RUN";
|
|
190
189
|
apiKey: string;
|
|
190
|
+
type: "RUN";
|
|
191
191
|
body: string;
|
|
192
192
|
identifier: string;
|
|
193
193
|
} | null | undefined;
|
|
194
194
|
requestHandler?: {
|
|
195
|
+
headers: string;
|
|
195
196
|
url: string;
|
|
196
197
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
197
|
-
headers: string;
|
|
198
198
|
body: string;
|
|
199
199
|
} | null | undefined;
|
|
200
200
|
updateTaskHandler?: {
|
|
@@ -208,8 +208,8 @@ export declare const baseSchema: z.ZodObject<{
|
|
|
208
208
|
assistantId: string;
|
|
209
209
|
} | null | undefined;
|
|
210
210
|
clientToolHandler?: {
|
|
211
|
-
name: string;
|
|
212
211
|
type: "FUNCTION";
|
|
212
|
+
name: string;
|
|
213
213
|
arguments: string;
|
|
214
214
|
} | null | undefined;
|
|
215
215
|
createTaskHandler?: {
|
|
@@ -219,23 +219,23 @@ export declare const baseSchema: z.ZodObject<{
|
|
|
219
219
|
keyTemplate: string;
|
|
220
220
|
} | null | undefined;
|
|
221
221
|
firecrawlHandler?: {
|
|
222
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
223
222
|
apiKey: string;
|
|
223
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
224
224
|
body: string;
|
|
225
225
|
} | null | undefined;
|
|
226
226
|
listTasksHandler?: {
|
|
227
227
|
keyTemplate: string;
|
|
228
228
|
} | null | undefined;
|
|
229
229
|
replicateHandler?: {
|
|
230
|
-
type: "RUN";
|
|
231
230
|
apiKey: string;
|
|
231
|
+
type: "RUN";
|
|
232
232
|
body: string;
|
|
233
233
|
identifier: string;
|
|
234
234
|
} | null | undefined;
|
|
235
235
|
requestHandler?: {
|
|
236
|
+
headers: string;
|
|
236
237
|
url: string;
|
|
237
238
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
238
|
-
headers: string;
|
|
239
239
|
body: string;
|
|
240
240
|
} | null | undefined;
|
|
241
241
|
updateTaskHandler?: {
|
|
@@ -250,8 +250,8 @@ export declare const baseSchema: z.ZodObject<{
|
|
|
250
250
|
assistantId: string;
|
|
251
251
|
} | null | undefined;
|
|
252
252
|
clientToolHandler?: {
|
|
253
|
-
name: string;
|
|
254
253
|
type: "FUNCTION";
|
|
254
|
+
name: string;
|
|
255
255
|
arguments: string;
|
|
256
256
|
} | null | undefined;
|
|
257
257
|
createTaskHandler?: {
|
|
@@ -261,23 +261,23 @@ export declare const baseSchema: z.ZodObject<{
|
|
|
261
261
|
keyTemplate: string;
|
|
262
262
|
} | null | undefined;
|
|
263
263
|
firecrawlHandler?: {
|
|
264
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
265
264
|
apiKey: string;
|
|
265
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
266
266
|
body: string;
|
|
267
267
|
} | null | undefined;
|
|
268
268
|
listTasksHandler?: {
|
|
269
269
|
keyTemplate: string;
|
|
270
270
|
} | null | undefined;
|
|
271
271
|
replicateHandler?: {
|
|
272
|
-
type: "RUN";
|
|
273
272
|
apiKey: string;
|
|
273
|
+
type: "RUN";
|
|
274
274
|
body: string;
|
|
275
275
|
identifier: string;
|
|
276
276
|
} | null | undefined;
|
|
277
277
|
requestHandler?: {
|
|
278
|
+
headers: string;
|
|
278
279
|
url: string;
|
|
279
280
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
280
|
-
headers: string;
|
|
281
281
|
body: string;
|
|
282
282
|
} | null | undefined;
|
|
283
283
|
updateTaskHandler?: {
|
|
@@ -312,14 +312,14 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
312
312
|
headers: z.ZodEffects<z.ZodString, string, string>;
|
|
313
313
|
body: z.ZodEffects<z.ZodString, string, string>;
|
|
314
314
|
}, "strip", z.ZodTypeAny, {
|
|
315
|
+
headers: string;
|
|
315
316
|
url: string;
|
|
316
317
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
317
|
-
headers: string;
|
|
318
318
|
body: string;
|
|
319
319
|
}, {
|
|
320
|
+
headers: string;
|
|
320
321
|
url: string;
|
|
321
322
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
322
|
-
headers: string;
|
|
323
323
|
body: string;
|
|
324
324
|
}>>>;
|
|
325
325
|
firecrawlHandler: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -332,12 +332,12 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
332
332
|
apiKey: z.ZodString;
|
|
333
333
|
body: z.ZodEffects<z.ZodString, string, string>;
|
|
334
334
|
}, "strip", z.ZodTypeAny, {
|
|
335
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
336
335
|
apiKey: string;
|
|
336
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
337
337
|
body: string;
|
|
338
338
|
}, {
|
|
339
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
340
339
|
apiKey: string;
|
|
340
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
341
341
|
body: string;
|
|
342
342
|
}>>>;
|
|
343
343
|
assistantHandler: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -355,13 +355,13 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
355
355
|
apiKey: z.ZodString;
|
|
356
356
|
body: z.ZodEffects<z.ZodString, string, string>;
|
|
357
357
|
}, "strip", z.ZodTypeAny, {
|
|
358
|
-
type: "RUN";
|
|
359
358
|
apiKey: string;
|
|
359
|
+
type: "RUN";
|
|
360
360
|
body: string;
|
|
361
361
|
identifier: string;
|
|
362
362
|
}, {
|
|
363
|
-
type: "RUN";
|
|
364
363
|
apiKey: string;
|
|
364
|
+
type: "RUN";
|
|
365
365
|
body: string;
|
|
366
366
|
identifier: string;
|
|
367
367
|
}>>>;
|
|
@@ -372,12 +372,12 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
372
372
|
name: z.ZodString;
|
|
373
373
|
arguments: z.ZodEffects<z.ZodString, string, string>;
|
|
374
374
|
}, "strip", z.ZodTypeAny, {
|
|
375
|
-
name: string;
|
|
376
375
|
type: "FUNCTION";
|
|
376
|
+
name: string;
|
|
377
377
|
arguments: string;
|
|
378
378
|
}, {
|
|
379
|
-
name: string;
|
|
380
379
|
type: "FUNCTION";
|
|
380
|
+
name: string;
|
|
381
381
|
arguments: string;
|
|
382
382
|
}>>>;
|
|
383
383
|
createTaskHandler: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -414,8 +414,8 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
414
414
|
assistantId: string;
|
|
415
415
|
} | null | undefined;
|
|
416
416
|
clientToolHandler?: {
|
|
417
|
-
name: string;
|
|
418
417
|
type: "FUNCTION";
|
|
418
|
+
name: string;
|
|
419
419
|
arguments: string;
|
|
420
420
|
} | null | undefined;
|
|
421
421
|
createTaskHandler?: {
|
|
@@ -425,23 +425,23 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
425
425
|
keyTemplate: string;
|
|
426
426
|
} | null | undefined;
|
|
427
427
|
firecrawlHandler?: {
|
|
428
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
429
428
|
apiKey: string;
|
|
429
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
430
430
|
body: string;
|
|
431
431
|
} | null | undefined;
|
|
432
432
|
listTasksHandler?: {
|
|
433
433
|
keyTemplate: string;
|
|
434
434
|
} | null | undefined;
|
|
435
435
|
replicateHandler?: {
|
|
436
|
-
type: "RUN";
|
|
437
436
|
apiKey: string;
|
|
437
|
+
type: "RUN";
|
|
438
438
|
body: string;
|
|
439
439
|
identifier: string;
|
|
440
440
|
} | null | undefined;
|
|
441
441
|
requestHandler?: {
|
|
442
|
+
headers: string;
|
|
442
443
|
url: string;
|
|
443
444
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
444
|
-
headers: string;
|
|
445
445
|
body: string;
|
|
446
446
|
} | null | undefined;
|
|
447
447
|
updateTaskHandler?: {
|
|
@@ -453,8 +453,8 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
453
453
|
assistantId: string;
|
|
454
454
|
} | null | undefined;
|
|
455
455
|
clientToolHandler?: {
|
|
456
|
-
name: string;
|
|
457
456
|
type: "FUNCTION";
|
|
457
|
+
name: string;
|
|
458
458
|
arguments: string;
|
|
459
459
|
} | null | undefined;
|
|
460
460
|
createTaskHandler?: {
|
|
@@ -464,23 +464,23 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
464
464
|
keyTemplate: string;
|
|
465
465
|
} | null | undefined;
|
|
466
466
|
firecrawlHandler?: {
|
|
467
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
468
467
|
apiKey: string;
|
|
468
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
469
469
|
body: string;
|
|
470
470
|
} | null | undefined;
|
|
471
471
|
listTasksHandler?: {
|
|
472
472
|
keyTemplate: string;
|
|
473
473
|
} | null | undefined;
|
|
474
474
|
replicateHandler?: {
|
|
475
|
-
type: "RUN";
|
|
476
475
|
apiKey: string;
|
|
476
|
+
type: "RUN";
|
|
477
477
|
body: string;
|
|
478
478
|
identifier: string;
|
|
479
479
|
} | null | undefined;
|
|
480
480
|
requestHandler?: {
|
|
481
|
+
headers: string;
|
|
481
482
|
url: string;
|
|
482
483
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
483
|
-
headers: string;
|
|
484
484
|
body: string;
|
|
485
485
|
} | null | undefined;
|
|
486
486
|
updateTaskHandler?: {
|
|
@@ -494,8 +494,8 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
494
494
|
assistantId: string;
|
|
495
495
|
} | null | undefined;
|
|
496
496
|
clientToolHandler?: {
|
|
497
|
-
name: string;
|
|
498
497
|
type: "FUNCTION";
|
|
498
|
+
name: string;
|
|
499
499
|
arguments: string;
|
|
500
500
|
} | null | undefined;
|
|
501
501
|
createTaskHandler?: {
|
|
@@ -505,23 +505,23 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
505
505
|
keyTemplate: string;
|
|
506
506
|
} | null | undefined;
|
|
507
507
|
firecrawlHandler?: {
|
|
508
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
509
508
|
apiKey: string;
|
|
509
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
510
510
|
body: string;
|
|
511
511
|
} | null | undefined;
|
|
512
512
|
listTasksHandler?: {
|
|
513
513
|
keyTemplate: string;
|
|
514
514
|
} | null | undefined;
|
|
515
515
|
replicateHandler?: {
|
|
516
|
-
type: "RUN";
|
|
517
516
|
apiKey: string;
|
|
517
|
+
type: "RUN";
|
|
518
518
|
body: string;
|
|
519
519
|
identifier: string;
|
|
520
520
|
} | null | undefined;
|
|
521
521
|
requestHandler?: {
|
|
522
|
+
headers: string;
|
|
522
523
|
url: string;
|
|
523
524
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
524
|
-
headers: string;
|
|
525
525
|
body: string;
|
|
526
526
|
} | null | undefined;
|
|
527
527
|
updateTaskHandler?: {
|
|
@@ -536,8 +536,8 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
536
536
|
assistantId: string;
|
|
537
537
|
} | null | undefined;
|
|
538
538
|
clientToolHandler?: {
|
|
539
|
-
name: string;
|
|
540
539
|
type: "FUNCTION";
|
|
540
|
+
name: string;
|
|
541
541
|
arguments: string;
|
|
542
542
|
} | null | undefined;
|
|
543
543
|
createTaskHandler?: {
|
|
@@ -547,23 +547,23 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
547
547
|
keyTemplate: string;
|
|
548
548
|
} | null | undefined;
|
|
549
549
|
firecrawlHandler?: {
|
|
550
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
551
550
|
apiKey: string;
|
|
551
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
552
552
|
body: string;
|
|
553
553
|
} | null | undefined;
|
|
554
554
|
listTasksHandler?: {
|
|
555
555
|
keyTemplate: string;
|
|
556
556
|
} | null | undefined;
|
|
557
557
|
replicateHandler?: {
|
|
558
|
-
type: "RUN";
|
|
559
558
|
apiKey: string;
|
|
559
|
+
type: "RUN";
|
|
560
560
|
body: string;
|
|
561
561
|
identifier: string;
|
|
562
562
|
} | null | undefined;
|
|
563
563
|
requestHandler?: {
|
|
564
|
+
headers: string;
|
|
564
565
|
url: string;
|
|
565
566
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
566
|
-
headers: string;
|
|
567
567
|
body: string;
|
|
568
568
|
} | null | undefined;
|
|
569
569
|
updateTaskHandler?: {
|
|
@@ -578,8 +578,8 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
578
578
|
assistantId: string;
|
|
579
579
|
} | null | undefined;
|
|
580
580
|
clientToolHandler?: {
|
|
581
|
-
name: string;
|
|
582
581
|
type: "FUNCTION";
|
|
582
|
+
name: string;
|
|
583
583
|
arguments: string;
|
|
584
584
|
} | null | undefined;
|
|
585
585
|
createTaskHandler?: {
|
|
@@ -589,23 +589,23 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
589
589
|
keyTemplate: string;
|
|
590
590
|
} | null | undefined;
|
|
591
591
|
firecrawlHandler?: {
|
|
592
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
593
592
|
apiKey: string;
|
|
593
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
594
594
|
body: string;
|
|
595
595
|
} | null | undefined;
|
|
596
596
|
listTasksHandler?: {
|
|
597
597
|
keyTemplate: string;
|
|
598
598
|
} | null | undefined;
|
|
599
599
|
replicateHandler?: {
|
|
600
|
-
type: "RUN";
|
|
601
600
|
apiKey: string;
|
|
601
|
+
type: "RUN";
|
|
602
602
|
body: string;
|
|
603
603
|
identifier: string;
|
|
604
604
|
} | null | undefined;
|
|
605
605
|
requestHandler?: {
|
|
606
|
+
headers: string;
|
|
606
607
|
url: string;
|
|
607
608
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
608
|
-
headers: string;
|
|
609
609
|
body: string;
|
|
610
610
|
} | null | undefined;
|
|
611
611
|
updateTaskHandler?: {
|
|
@@ -620,8 +620,8 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
620
620
|
assistantId: string;
|
|
621
621
|
} | null | undefined;
|
|
622
622
|
clientToolHandler?: {
|
|
623
|
-
name: string;
|
|
624
623
|
type: "FUNCTION";
|
|
624
|
+
name: string;
|
|
625
625
|
arguments: string;
|
|
626
626
|
} | null | undefined;
|
|
627
627
|
createTaskHandler?: {
|
|
@@ -631,23 +631,23 @@ export declare const functionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
631
631
|
keyTemplate: string;
|
|
632
632
|
} | null | undefined;
|
|
633
633
|
firecrawlHandler?: {
|
|
634
|
-
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
635
634
|
apiKey: string;
|
|
635
|
+
type: "SCRAPE" | "CRAWL" | "EXTRACT" | "SEARCH";
|
|
636
636
|
body: string;
|
|
637
637
|
} | null | undefined;
|
|
638
638
|
listTasksHandler?: {
|
|
639
639
|
keyTemplate: string;
|
|
640
640
|
} | null | undefined;
|
|
641
641
|
replicateHandler?: {
|
|
642
|
-
type: "RUN";
|
|
643
642
|
apiKey: string;
|
|
643
|
+
type: "RUN";
|
|
644
644
|
body: string;
|
|
645
645
|
identifier: string;
|
|
646
646
|
} | null | undefined;
|
|
647
647
|
requestHandler?: {
|
|
648
|
+
headers: string;
|
|
648
649
|
url: string;
|
|
649
650
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
650
|
-
headers: string;
|
|
651
651
|
body: string;
|
|
652
652
|
} | null | undefined;
|
|
653
653
|
updateTaskHandler?: {
|
|
@@ -33,9 +33,9 @@ export declare const getFunction: ({ assistant, toolCall, }: {
|
|
|
33
33
|
handlerId: string;
|
|
34
34
|
} | null;
|
|
35
35
|
clientToolHandler: {
|
|
36
|
-
name: string;
|
|
37
36
|
id: string;
|
|
38
37
|
type: import("@prisma/client").$Enums.ClientToolHandlerType;
|
|
38
|
+
name: string;
|
|
39
39
|
createdAt: Date;
|
|
40
40
|
updatedAt: Date;
|
|
41
41
|
handlerId: string;
|
|
@@ -56,11 +56,11 @@ export declare const getFunction: ({ assistant, toolCall, }: {
|
|
|
56
56
|
keyTemplate: string;
|
|
57
57
|
} | null;
|
|
58
58
|
firecrawlHandler: {
|
|
59
|
+
apiKey: string;
|
|
59
60
|
id: string;
|
|
60
61
|
type: import("@prisma/client").$Enums.FirecrawlHandlerType;
|
|
61
62
|
createdAt: Date;
|
|
62
63
|
updatedAt: Date;
|
|
63
|
-
apiKey: string;
|
|
64
64
|
handlerId: string;
|
|
65
65
|
body: PrismaJson.FirecrawlHandlerBody;
|
|
66
66
|
} | null;
|
|
@@ -72,11 +72,11 @@ export declare const getFunction: ({ assistant, toolCall, }: {
|
|
|
72
72
|
keyTemplate: string;
|
|
73
73
|
} | null;
|
|
74
74
|
replicateHandler: {
|
|
75
|
+
apiKey: string;
|
|
75
76
|
id: string;
|
|
76
77
|
type: import("@prisma/client").$Enums.ReplicateHandlerType;
|
|
77
78
|
createdAt: Date;
|
|
78
79
|
updatedAt: Date;
|
|
79
|
-
apiKey: string;
|
|
80
80
|
handlerId: string;
|
|
81
81
|
body: PrismaJson.ReplicateHandlerBody;
|
|
82
82
|
identifier: string;
|
|
@@ -85,10 +85,10 @@ export declare const getFunction: ({ assistant, toolCall, }: {
|
|
|
85
85
|
id: string;
|
|
86
86
|
createdAt: Date;
|
|
87
87
|
updatedAt: Date;
|
|
88
|
+
headers: PrismaJson.RequestHandlerHeaders;
|
|
88
89
|
handlerId: string;
|
|
89
90
|
url: string;
|
|
90
91
|
method: import("@prisma/client").$Enums.MethodType;
|
|
91
|
-
headers: PrismaJson.RequestHandlerHeaders;
|
|
92
92
|
body: PrismaJson.RequestHandlerBody;
|
|
93
93
|
} | null;
|
|
94
94
|
updateTaskHandler: {
|