Spaces:
Sleeping
Sleeping
Download apps/api/src/utils/integration.ts from s-eto-hub/firecrawl-api: direct link, hf CLI and curl.
- Browser
- Download file 746 Bytes
-
https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/api/src/utils/integration.ts
- Command line
-
hf download hf://spaces/s-eto-hub/firecrawl-api/apps/api/src/utils/integration.ts
-
curl -L -o integration.ts https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/api/src/utils/integration.ts
746 Bytes
| import { z } from "zod"; | |
| enum IntegrationEnum { | |
| DIFY = "dify", | |
| ZAPIER = "zapier", | |
| PIPEDREAM = "pipedream", | |
| RAYCAST = "raycast", | |
| LANGCHAIN = "langchain", | |
| CREWAI = "crewai", | |
| LLAMAINDEX = "llamaindex", | |
| N8N = "n8n", | |
| CAMELAI = "camelai", | |
| MAKE = "make", | |
| FLOWISE = "flowise", | |
| METAGPT = "metagpt", | |
| RELEVANCEAI = "relevanceai", | |
| VIASOCKET = "viasocket", | |
| CLI = "cli", | |
| HERMES = "hermes", | |
| } | |
| export const integrationSchema = z | |
| .string() | |
| .refine( | |
| val => | |
| (typeof val === "string" && val.startsWith("_")) || | |
| Object.values(IntegrationEnum).includes(val as any), | |
| { | |
| message: `Invalid enum value. Expected ${Object.values(IntegrationEnum) | |
| .map(v => `'${v}'`) | |
| .join(" | ")}`, | |
| }, | |
| ); | |