From 6a11d9996c9c741371082210ac9745a8d7f9cf3d Mon Sep 17 00:00:00 2001 From: nd0ut Date: Tue, 13 Sep 2022 18:11:26 +0300 Subject: [PATCH] chore: use snake case to pass addon params --- packages/rest-client/src/api/addons/executeAddon.test.ts | 6 ++++-- packages/rest-client/src/types/AddonParams.ts | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/rest-client/src/api/addons/executeAddon.test.ts b/packages/rest-client/src/api/addons/executeAddon.test.ts index f2de4daba..ce02e4bbb 100644 --- a/packages/rest-client/src/api/addons/executeAddon.test.ts +++ b/packages/rest-client/src/api/addons/executeAddon.test.ts @@ -15,9 +15,11 @@ describe('executeAddon', () => { const response = await executeAddon( { - addonName: AddonName.AWS_REKOGNITION_DETECT_LABELS, + addonName: AddonName.UC_CLAMAV_VIRUS_SCAN, target: copy.result.uuid, - params: undefined + params: { + purge_infected: false + } }, testSettings ) diff --git a/packages/rest-client/src/types/AddonParams.ts b/packages/rest-client/src/types/AddonParams.ts index e970a96da..6604a6e34 100644 --- a/packages/rest-client/src/types/AddonParams.ts +++ b/packages/rest-client/src/types/AddonParams.ts @@ -1,17 +1,17 @@ import { AddonName } from './AddonName' export type AddonUcClamavVirusScanParams = { - purgeInfected: boolean + purge_infected: boolean } export type AddonAwsRekognitionDetectLabelsParams = undefined export type AddonRemoveBgParams = { crop?: boolean - cropMargin?: string + crop_margin?: string scale?: string - addShadow?: boolean - typeLevel?: 'none' | '1' | '2' | 'latest' + add_shadow?: boolean + type_level?: 'none' | '1' | '2' | 'latest' type?: 'auto' | 'person' | 'product' | 'car' semitransparency?: boolean channels?: 'rgba' | 'alpha'