@walkeros/web-destination-meta
Version:
Meta pixel web destination for walkerOS
54 lines (49 loc) • 2.05 kB
text/typescript
import { Destination as Destination$1, Mapping as Mapping$1 } from '@walkeros/core';
import { DestinationWeb } from '@walkeros/web-core';
declare global {
interface Window {
_fbq?: facebook.Pixel.Event;
fbq?: facebook.Pixel.Event;
}
}
interface Settings {
pixelId: string;
}
type InitSettings = Partial<Settings>;
interface Mapping {
track?: StandardEventNames;
trackCustom?: string;
}
interface Env extends DestinationWeb.Env {
window: {
fbq: facebook.Pixel.Event;
_fbq?: facebook.Pixel.Event;
};
document: {
createElement: (tagName: string) => Element;
head: {
appendChild: (node: unknown) => void;
};
};
}
type Types = Destination$1.Types<Settings, Mapping, Env, InitSettings>;
type Destination = DestinationWeb.Destination<Types>;
type Config = DestinationWeb.Config<Types>;
type Rule = Mapping$1.Rule<Mapping>;
type Rules = Mapping$1.Rules<Rule>;
type StandardEventNames = 'PageView' | 'AddPaymentInfo' | 'AddToCart' | 'AddToWishlist' | 'CompleteRegistration' | 'Contact' | 'CustomizeProduct' | 'Donate' | 'FindLocation' | 'InitiateCheckout' | 'Lead' | 'Purchase' | 'Schedule' | 'Search' | 'StartTrial' | 'SubmitApplication' | 'Subscribe' | 'ViewContent' | string;
type index_Config = Config;
type index_Destination = Destination;
type index_Env = Env;
type index_InitSettings = InitSettings;
type index_Mapping = Mapping;
type index_Rule = Rule;
type index_Rules = Rules;
type index_Settings = Settings;
type index_StandardEventNames = StandardEventNames;
type index_Types = Types;
declare namespace index {
export type { index_Config as Config, index_Destination as Destination, index_Env as Env, index_InitSettings as InitSettings, index_Mapping as Mapping, index_Rule as Rule, index_Rules as Rules, index_Settings as Settings, index_StandardEventNames as StandardEventNames, index_Types as Types };
}
declare const destinationMeta: Destination;
export { index as DestinationMeta, destinationMeta as default, destinationMeta };