From 454232600b4504cb3dafa5a1759994708e70e1aa Mon Sep 17 00:00:00 2001 From: Dmytro Krasun Date: Tue, 27 Feb 2024 13:45:55 +0200 Subject: [PATCH] add omit_background option --- package.json | 2 +- src/main.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6c0b489..36716f5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "screenshotone-validations", "homepage": "https://screenshotone.com", - "version": "1.0.19", + "version": "1.0.20", "description": "Validation schemes for the ScreenshotOne API requests.", "repository": { "type": "git", diff --git a/src/main.ts b/src/main.ts index a13f6da..5b90e0a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -383,6 +383,12 @@ const animateScheme = withHtmlOrUrlOrMarkdownRequired .default("mp4"), duration: Joi.number().min(1).max(30).default(5), + omit_background: Joi.when("format", { + is: Joi.valid("mov"), + then: Joi.boolean().default(false), + otherwise: Joi.forbidden(), + }), + width: Joi.number().integer().optional(), height: Joi.number().integer().optional(), aspect_ratio: Joi.string() @@ -412,7 +418,7 @@ const animateScheme = withHtmlOrUrlOrMarkdownRequired then: Joi.number().integer().optional(), otherwise: Joi.forbidden(), }), - + scroll_easing: Joi.string() .trim() .lowercase()