@phantomstudios/ft-lib
Version:
A collection of Javascript UI & tracking utils for FT sites
76 lines • 2.48 kB
TypeScript
import { InferType, ValidationError } from "yup";
declare const configSchema: import("yup").ObjectSchema<{
product: string | undefined;
url: string;
feature: string;
author: string;
sponsor: string;
articleName: string;
videoName: string;
videoType: string;
hasVideo: boolean | null | undefined;
primaryTopic: string;
secondaryTopic: string;
advertiserIndustry: string;
app: string;
publishDate: string | null;
isBranded: boolean;
contentType: string;
campaign: string;
server: any;
title: string;
adbook_campaign_id: string;
source_id: string | undefined;
wordCount: number | undefined;
commercial_product: string;
}, import("yup").AnyObject, {
product: undefined;
url: undefined;
feature: undefined;
author: "";
sponsor: "";
articleName: "";
videoName: "";
videoType: "";
hasVideo: undefined;
primaryTopic: "";
secondaryTopic: "";
advertiserIndustry: "";
app: undefined;
publishDate: "";
isBranded: undefined;
contentType: "";
campaign: "";
server: any;
title: "";
adbook_campaign_id: "";
source_id: undefined;
wordCount: undefined;
commercial_product: "ft";
}, "">;
declare const origamiEventSchema: import("yup").ObjectSchema<{
category: string;
action: string;
app: import("yup").Maybe<string | null | undefined>;
product: import("yup").Maybe<string | null | undefined>;
source: import("yup").Maybe<string | null | undefined>;
meta: import("yup").Maybe<{} | null | undefined>;
duration: import("yup").Maybe<number | null | undefined>;
progress: import("yup").Maybe<number | null | undefined>;
}, import("yup").AnyObject, {
category: undefined;
action: undefined;
app: undefined;
product: undefined;
source: undefined;
meta: undefined;
duration: undefined;
progress: undefined;
}, "">;
export type ConfigType = InferType<typeof configSchema>;
export type OrigamiEventType = InferType<typeof origamiEventSchema>;
export declare const parseConfig: (config: ConfigType, disableAppFormatTransform: boolean) => ConfigType;
export declare const validateConfig: (config: ConfigType, disableAppFormatTransform: boolean, logValidationErrors: boolean) => ValidationError[] | undefined;
export declare const validateOrigamiEvent: (config: OrigamiEventType) => ValidationError[] | undefined;
export {};
//# sourceMappingURL=yupValidator.d.ts.map