feat: botid enabled on api/book/event api route (#24207)

* wip

* WIP

* restore event

* testing without instrument client

* Add conditional for botID init

* Bump BotID version + pass in header

* botID yarn lock changes

* feat: Add feature flag checks + tidy up into service

* rely on env var also

* use eventType repo instead of passing in prisma

* remove slug from audit

* rename botId feature to botid

* add unit tests for bot service
This commit is contained in:
sean-brydon authored and GitHub committed 2025-10-06 11:16:13 +01:00
1 parent f3269a3ddf
commit 7799b191ec
14 files changed
+340

No files matched your search

+6
View File
@@ -1,6 +1,7 @@
require("dotenv").config({ path: "../../.env" });
const englishTranslation = require("./public/static/locales/en/common.json");
const { withAxiom } = require("next-axiom");
const { withBotId } = require("botid/next/config");
const { version } = require("./package.json");
const { PrismaPlugin } = require("@prisma/nextjs-monorepo-workaround-plugin");
const {
@@ -117,6 +118,11 @@ if (process.env.ANALYZE === "true") {
}
plugins.push(withAxiom);
if (process.env.NEXT_PUBLIC_VERCEL_USE_BOTID_IN_BOOKER === "1") {
plugins.push(withBotId);
}
const orgDomainMatcherConfig = {
root: nextJsOrgRewriteConfig.disableRootPathRewrite
? null