diff --git a/src/schemas/nightbot.ts b/src/schemas/nightbot.ts new file mode 100644 index 0000000..c9f5996 --- /dev/null +++ b/src/schemas/nightbot.ts @@ -0,0 +1,21 @@ +import Joi from "joi"; + +export const nightbotCustomHeadersSchema = Joi.object({ + "nightbot-response-url": Joi + .string() + .uri({ scheme: `https` }) + .optional(), + "nightbot-user": Joi + .string() + .optional(), + "nightbot-channel": Joi + .string() + .optional(), +}) +.and( + "nightbot-response-url", + "nightbot-user", + "nightbot-channel", +) +.meta({ className: `nightbotCustomHeaders` }) +.description(`The custom headers Nightbot makes requests with`); \ No newline at end of file