Spaces:
Sleeping
Sleeping
Download apps/api/src/services/webhook/index.ts from s-eto-hub/firecrawl-api: direct link, hf CLI and curl.
- Browser
- Download file 808 Bytes
-
https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/api/src/services/webhook/index.ts
- Command line
-
hf download hf://spaces/s-eto-hub/firecrawl-api/apps/api/src/services/webhook/index.ts
-
curl -L -o index.ts https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/api/src/services/webhook/index.ts
808 Bytes
| import { logger as _logger } from "../../lib/logger"; | |
| import { getWebhookConfig } from "./config"; | |
| import { WebhookConfig } from "./types"; | |
| import { WebhookSender } from "./delivery"; | |
| export async function createWebhookSender(params: { | |
| teamId: string; | |
| jobId: string; | |
| webhook?: WebhookConfig; | |
| v0: boolean; | |
| }): Promise<WebhookSender | null> { | |
| const config = await getWebhookConfig( | |
| params.teamId, | |
| params.jobId, | |
| params.webhook, | |
| ); | |
| if (!config) { | |
| return null; | |
| } | |
| return new WebhookSender(config.config, config.secret, { | |
| teamId: params.teamId, | |
| jobId: params.jobId, | |
| v0: params.v0, | |
| }); | |
| } | |
| export { | |
| getWebhookInsertQueueLength, | |
| processWebhookInsertJobs, | |
| } from "./delivery"; | |
| export { WebhookEvent } from "./types"; | |
| export { shutdownWebhookQueue } from "./queue"; | |