/** * Shared constants for meta-ads CLI */ /** * Conversion action types in priority order. * Used for extracting the primary result from insights. * Higher priority actions (purchases, leads) are checked first. */ export declare const CONVERSION_ACTIONS: readonly ["purchase", "lead", "complete_registration", "subscribe", "add_to_cart", "initiate_checkout", "app_install", "link_click", "landing_page_view"]; export type ConversionAction = typeof CONVERSION_ACTIONS[number]; /** * Date presets supported by Meta API */ export declare const DATE_PRESETS: readonly ["today", "yesterday", "this_month", "last_month", "this_quarter", "maximum", "data_maximum", "last_3d", "last_7d", "last_14d", "last_28d", "last_30d", "last_90d", "last_week_mon_sun", "last_week_sun_sat", "last_quarter", "last_year", "this_week_mon_today", "this_week_sun_today", "this_year"]; export type DatePreset = typeof DATE_PRESETS[number]; /** * Map campaign objectives to their primary conversion action */ export declare const OBJECTIVE_TO_ACTION: Record; /** * Calculate date range for "previous_Xd" comparison periods. * For example, if current period is last_7d, previous_7d should be * the 7 days before that (days 8-14 ago). */ export declare function calculatePreviousPeriod(currentPreset: string): { since: string; until: string; } | null; /** * Parse a compare string and return the appropriate date ranges/presets. * Supports formats: * - "last_7d:previous_7d" - last 7 days vs the 7 days before that * - "last_7d:last_14d" - (legacy, but overlaps - will warn) */ /** * Video fields for insights API */ export declare const VIDEO_FIELDS: readonly ["video_play_actions", "video_thruplay_watched_actions", "video_p25_watched_actions", "video_p50_watched_actions", "video_p75_watched_actions", "video_p100_watched_actions"]; /** * Extract value from video action array. * Video actions are returned as arrays with a single object containing the total. */ export declare function getVideoActionValue(actions: { action_type: string; value: string; }[] | undefined): number; export declare function parseComparePresets(compareStr: string): { current: { preset?: string; dateRange?: { since: string; until: string; }; }; previous: { preset?: string; dateRange?: { since: string; until: string; }; }; warning?: string; }; //# sourceMappingURL=constants.d.ts.map