Spaces:
Sleeping
Sleeping
File size: 808 Bytes
097eaf0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 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";
|