import { DetailedSpec } from '../targeting/interfaces/targeting-spec-detailed.interface'; export interface Key { key: string; name?: string; } export interface City { key: string; radius?: number; distance_unit?: 'mile' | 'kilometer'; } export interface CustomLocation { latitude?: number; longitude?: number; /** * Descriptive name for the address. This can be used in conjunction with * the `latitude` and `longitude` values for geo location targeting even when * the `address_string` is not provided */ name?: string; /** * Radius around the latitude/longitude, expressed in miles unless set in the distance_unit field. * The limits of the radius are 0.62 to 50 miles, or 1 to 80 kilometers. */ radius?: number; /** * Optional value of kilometer or mile, defaults to mile */ distance_unit?: 'mile' | 'kilometer'; /** * Address corresponding to the latitude/longitude. e.g. 1601 Willow Rd, Menlo Park, CA. * The suggested address format is: street number street name, city, state/province, country. * Please do not include the postal code in the address_string. */ address_string?: string; } export declare enum gender { 'men' = 1, 'women' = 2 } export interface GendersSpec { genders?: Array | null; } export interface LocalesSpec { locales?: Array; } export interface AgeSpec { /** * Minimum age. If used, must be 13 or higher. If omitted, will default to 18 */ age_min?: number; /** * Maximum age. If used, must be 65 or lower. */ age_max?: number; } export declare const ageInitial: { age_min: number; age_max: number; }; /** * Possible values are: * * `recent`: People whose most recent location is the selected area, as determined by information from their * mobile device. This value is not available when excluding location types. * * `home`: People whose stated location from their Facebook profile “current city” is within that location. * This is also validated by IP address and aggregated information from their friends’ stated profile locations. * * `travel_in`: People whose most recent location is the selected area, as determined by information from their mobile * device, and are more than 100 miles away from their stated current city from their Facebook profiles. * This value is not available when excluding location types. */ export declare type LocationTypeValue = 'recent' | 'home' | 'travel_in'; export declare type CountryGroup = 'worldwide' | 'africa' | 'south_america' | 'central_america' | 'caribbean' | 'north_america' | 'europe' | 'asia' | 'oceania' | 'eea' | 'nafta' | 'afta' | 'mercosur' | 'gcc' | 'apec' | 'cisfta'; /** * Describe properties of targeting spec for geo locations * @see https://developers.facebook.com/docs/marketing-api/targeting-specs/v2.7#location */ export interface GeoSpec { /** * Values for country targeting. It must be an array of country codes. * @see https://developers.facebook.com/docs/reference/ads-api/get-autocomplete-data/#countries * @example * 'countries': ['RU'] */ countries?: Array; /** * State, province, or region. To get the available values. Limit: 200 regions. * @see https://developers.facebook.com/docs/reference/ads-api/get-autocomplete-data/#regions * @example * 'regions': [{'key':'3847'}] */ regions?: Array; /** * Specify the key, radius & distance_unit. For the key values, see targeting search API. * `radius` is a number around cities, limits are 10 to 50 miles or 17 to 80 kilometers. * `distance_unit` is mile or kilometer. Limit: 250 cities. * @see https://developers.facebook.com/docs/reference/ads-api/get-autocomplete-data/#cities * @example * 'cities': [{'key':'2430536', 'radius':12, 'distance_unit':'mile'}] */ cities?: Array; /** * Zip Codes for targeting. Limit: 2500 Zips * @see https://developers.facebook.com/docs/reference/ads-api/get-autocomplete-data/#zipcode * @example * 'zips':[{'key':'US:94304'},{'key':'US:00501'}] */ zips?: Array; /** * Available in all objectives. * It requires you to specify an exact location in latitude/longitude or specify an address * line as the center of your targeted area. You also need to specify a `radius` for your location, * limits from .62 to 50 miles, or 1 to 80 kilometers. `distance_unit` can be in miles or kilometers. * The default `distance_unit` is mile. Limit: 200 addresses. * Note that PO Box is not supported in the address_string. Only the physical address can be passed. * @example * 'custom_locations':[ * {'address_string': '1601 Willow Road, Menlo Park, CA', 'radius': 5}, * {'latitude': 36, 'longitude': -121.0, 'radius': 5, 'distance_unit': 'kilometer'} * ] */ custom_locations?: Array; /** * Specify the key for the market. We support all designated market areas (DMA) and the key * is in the format “DMA:501”. The DMA code can be retrieved from the * {@link https://developers.facebook.com/docs/marketing-api/targeting-search|Targeting Search} endpoint * by querying by the name of the DMA. Limit: 2500 * @example * 'geo_markets':[{'key': 'DMA:501', 'name': 'New York'},{'key': 'DMA:543', 'name': 'Springfield-Holyoke'}] */ geo_markets?: Array; /** * Specify the key for electoral districts. * The district key can be retrieved from the * [Targeting Search API]{@link https://developers.facebook.com/docs/marketing-api/targeting-search#electoral}. * @example * 'electoral_districts':[{'key':'US:AK00'},{'key':'US:CA01'},{'key':'US:NY14'}] */ electoral_district?: Array; /** * Please Note: * If location_types is not specified, the default value is ['home']. * `travel_in` cannot be used with other values in the location_types. * If you want to target “everyone in this location”, you need to add both * recent and home in the location_types field. * * @example * 'location_types':['recent', 'home'] * 'location_types':['travel_in'] */ location_types?: Array; /** * Values for targeting countries in global geographical regions and free trade areas. * It must be an array of country group codes. * @example * 'country_groups': ['asia','mercosur'] */ country_groups?: Array; } export declare const geoSpecInitial: { 'location_types': LocationTypeValue[]; 'countries': string[]; }; export interface TargetingSpec extends DetailedSpec, GendersSpec, AgeSpec, LocalesSpec { geo_locations?: GeoSpec; excluded_geo_locations?: GeoSpec; } export declare const targetingSpecInitial: TargetingSpec; export declare type Id = number; export interface SelectedItem { id: Id; name?: string; } export declare enum relationshipStatuses { 'single' = 1, 'in_relationship' = 2, 'married' = 3, 'engaged' = 4, 'not specified' = 6, 'in a civil union' = 7, 'in a domestic partnership' = 8, 'In an open relationship' = 9, 'It is complicated' = 10, 'Separated' = 11, 'Divorced' = 12, 'Widowed' = 13 } export declare enum InterestedIn { 'men' = 1, 'women' = 2, 'men and women' = 3, 'not specified' = 4 } export declare enum EducationStatuses { 'HIGH_SCHOOL' = 1, 'UNDERGRAD' = 2, 'ALUM' = 3, 'HIGH_SCHOOL_GRAD' = 4, 'SOME_COLLEGE' = 5, 'ASSOCIATE_DEGREE' = 6, 'IN_GRAD_SCHOOL' = 7, 'SOME_GRAD_SCHOOL' = 8, 'MASTER_DEGREE' = 9, 'PROFESSIONAL_DEGREE' = 10, 'DOCTORATE_DEGREE' = 11, 'UNSPECIFIED' = 12, 'SOME_HIGH_SCHOOL' = 13 }