import { ITrackParams } from '@jolibox/types'; import { canIUse } from './can-i-use'; import { createCommands } from '@jolibox/common'; const commands = createCommands(); export async function track(params: ITrackParams) { if (!canIUse('track')) { return { code: 'FAILURE' as ResponseType, message: '[Jolibox SDK] track is not supported in this platform' }; } return await commands.executeCommand('API.track', params); }