diff --git a/src/api.js b/src/api.js index 37d8bedc..6028d94b 100644 --- a/src/api.js +++ b/src/api.js @@ -24,7 +24,7 @@ export default class FacebookAdsApi { return 'v21.0'; } static get SDK_VERSION(): string { - return '21.0.3'; + return '21.0.4'; } static get GRAPH(): string { return 'https://graph.facebook.com'; diff --git a/src/bundle.es6 b/src/bundle.es6 index 4e73dfbf..6742b417 100644 --- a/src/bundle.es6 +++ b/src/bundle.es6 @@ -311,7 +311,6 @@ export { default as AdvertiserVerificationStatus } from './../src/objects/advert export { default as AgeRange } from './../src/objects/age-range'; export { default as AgencyClientDeclaration } from './../src/objects/agency-client-declaration'; export { default as Album } from './../src/objects/album'; -export { default as AnalyticsCohortQueryResult } from './../src/objects/analytics-cohort-query-result'; export { default as AnalyticsConfig } from './../src/objects/analytics-config'; export { default as AnalyticsEntityUserConfig } from './../src/objects/analytics-entity-user-config'; export { default as AnalyticsFunnelQueryResult } from './../src/objects/analytics-funnel-query-result'; @@ -421,6 +420,7 @@ export { default as CanvasCollectionThumbnail } from './../src/objects/canvas-co export { default as CanvasDynamicSetting } from './../src/objects/canvas-dynamic-setting'; export { default as CanvasPreview } from './../src/objects/canvas-preview'; export { default as CanvasTemplate } from './../src/objects/canvas-template'; +export { default as CatalogAdvertiserInsight } from './../src/objects/catalog-advertiser-insight'; export { default as CatalogBasedTargeting } from './../src/objects/catalog-based-targeting'; export { default as CatalogItemAppLinks } from './../src/objects/catalog-item-app-links'; export { default as CatalogItemChannelsToIntegrityStatus } from './../src/objects/catalog-item-channels-to-integrity-status'; @@ -571,6 +571,7 @@ export { default as IGUpcomingEvent } from './../src/objects/ig-upcoming-event'; export { default as IGUser } from './../src/objects/ig-user'; export { default as IGUserExportForCAM } from './../src/objects/ig-user-export-for-cam'; export { default as IGUserForIGOnlyAPI } from './../src/objects/ig-user-for-ig-only-api'; +export { default as IGUserSubscribedAppsData } from './../src/objects/ig-user-subscribed-apps-data'; export { default as IGVideoCopyrightCheckMatchesInformation } from './../src/objects/ig-video-copyright-check-matches-information'; export { default as IGVideoCopyrightCheckStatus } from './../src/objects/ig-video-copyright-check-status'; export { default as IPObject } from './../src/objects/ip-object'; @@ -623,6 +624,7 @@ export { default as Link } from './../src/objects/link'; export { default as LinkedInstagramAccountData } from './../src/objects/linked-instagram-account-data'; export { default as LiveVideo } from './../src/objects/live-video'; export { default as LiveVideoAdBreakConfig } from './../src/objects/live-video-ad-break-config'; +export { default as LiveVideoAdCampaignConfig } from './../src/objects/live-video-ad-campaign-config'; export { default as LiveVideoError } from './../src/objects/live-video-error'; export { default as LiveVideoInputStream } from './../src/objects/live-video-input-stream'; export { default as LiveVideoRecommendedEncoderSettings } from './../src/objects/live-video-recommended-encoder-settings'; diff --git a/src/globals.es6 b/src/globals.es6 index b8080067..cb640602 100644 --- a/src/globals.es6 +++ b/src/globals.es6 @@ -287,7 +287,6 @@ import './../src/objects/advertiser-verification-status'; import './../src/objects/age-range'; import './../src/objects/agency-client-declaration'; import './../src/objects/album'; -import './../src/objects/analytics-cohort-query-result'; import './../src/objects/analytics-config'; import './../src/objects/analytics-entity-user-config'; import './../src/objects/analytics-funnel-query-result'; @@ -397,6 +396,7 @@ import './../src/objects/canvas-collection-thumbnail'; import './../src/objects/canvas-dynamic-setting'; import './../src/objects/canvas-preview'; import './../src/objects/canvas-template'; +import './../src/objects/catalog-advertiser-insight'; import './../src/objects/catalog-based-targeting'; import './../src/objects/catalog-item-app-links'; import './../src/objects/catalog-item-channels-to-integrity-status'; @@ -547,6 +547,7 @@ import './../src/objects/ig-upcoming-event'; import './../src/objects/ig-user'; import './../src/objects/ig-user-export-for-cam'; import './../src/objects/ig-user-for-ig-only-api'; +import './../src/objects/ig-user-subscribed-apps-data'; import './../src/objects/ig-video-copyright-check-matches-information'; import './../src/objects/ig-video-copyright-check-status'; import './../src/objects/ip-object'; @@ -599,6 +600,7 @@ import './../src/objects/link'; import './../src/objects/linked-instagram-account-data'; import './../src/objects/live-video'; import './../src/objects/live-video-ad-break-config'; +import './../src/objects/live-video-ad-campaign-config'; import './../src/objects/live-video-error'; import './../src/objects/live-video-input-stream'; import './../src/objects/live-video-recommended-encoder-settings'; diff --git a/src/objects/ad-account-ad-volume.js b/src/objects/ad-account-ad-volume.js index 5f6e3cf9..f69283c9 100644 --- a/src/objects/ad-account-ad-volume.js +++ b/src/objects/ad-account-ad-volume.js @@ -37,11 +37,13 @@ export default class AdAccountAdVolume extends AbstractCrudObject { return Object.freeze({ aac_creation_package: 'AAC_CREATION_PACKAGE', ab_test: 'AB_TEST', + account_error: 'ACCOUNT_ERROR', account_needs_credit: 'ACCOUNT_NEEDS_CREDIT', account_spend_limit: 'ACCOUNT_SPEND_LIMIT', account_spend_limit_duplication: 'ACCOUNT_SPEND_LIMIT_DUPLICATION', aco_toggle: 'ACO_TOGGLE', ads_reporting: 'ADS_REPORTING', + ads_status: 'ADS_STATUS', advanced_campaign_budget: 'ADVANCED_CAMPAIGN_BUDGET', advantage_app_campaign: 'ADVANTAGE_APP_CAMPAIGN', advantage_campaign_budget_duplication: 'ADVANTAGE_CAMPAIGN_BUDGET_DUPLICATION', @@ -161,6 +163,7 @@ export default class AdAccountAdVolume extends AbstractCrudObject { high_cost: 'HIGH_COST', historical_benchmark: 'HISTORICAL_BENCHMARK', ig_multi_ads: 'IG_MULTI_ADS', + ig_surfaces_manual_placements: 'IG_SURFACES_MANUAL_PLACEMENTS', landing_page_view: 'LANDING_PAGE_VIEW', landing_page_view_optimization_goal: 'LANDING_PAGE_VIEW_OPTIMIZATION_GOAL', landing_page_view_precreate: 'LANDING_PAGE_VIEW_PRECREATE', @@ -234,6 +237,7 @@ export default class AdAccountAdVolume extends AbstractCrudObject { signals_growth_capi_table: 'SIGNALS_GROWTH_CAPI_TABLE', signals_growth_capi_v2: 'SIGNALS_GROWTH_CAPI_V2', similar_advertiser_budget_recommendation: 'SIMILAR_ADVERTISER_BUDGET_RECOMMENDATION', + site_extensions_duplication: 'SITE_EXTENSIONS_DUPLICATION', six_plus_manual_placements: 'SIX_PLUS_MANUAL_PLACEMENTS', six_plus_placements_duplication: 'SIX_PLUS_PLACEMENTS_DUPLICATION', spend_limit: 'SPEND_LIMIT', diff --git a/src/objects/ad-account-user-settings.js b/src/objects/ad-account-user-settings.js index 9b136ff1..5ad7e6d4 100644 --- a/src/objects/ad-account-user-settings.js +++ b/src/objects/ad-account-user-settings.js @@ -63,6 +63,7 @@ export default class AdAccountUserSettings extends AbstractCrudObject { should_default_instagram_profile_card_optimization: 'should_default_instagram_profile_card_optimization', should_default_text_swapping_optimization: 'should_default_text_swapping_optimization', should_logout_of_3p_sourcing: 'should_logout_of_3p_sourcing', + should_show_shops_ads_metrics_onboarding_tour: 'should_show_shops_ads_metrics_onboarding_tour', show_archived_data: 'show_archived_data', show_text_variation_nux_tooltip: 'show_text_variation_nux_tooltip', syd_campaign_trends_activemetric: 'syd_campaign_trends_activemetric', diff --git a/src/objects/ad-account.js b/src/objects/ad-account.js index f7747471..08b53d5a 100644 --- a/src/objects/ad-account.js +++ b/src/objects/ad-account.js @@ -107,6 +107,7 @@ export default class AdAccount extends AbstractCrudObject { end_advertiser: 'end_advertiser', end_advertiser_name: 'end_advertiser_name', existing_customers: 'existing_customers', + expired_funding_source_details: 'expired_funding_source_details', extended_credit_invoice_group: 'extended_credit_invoice_group', failed_delivery_checks: 'failed_delivery_checks', fb_entity: 'fb_entity', diff --git a/src/objects/ad-asset-feed-spec-link-url.js b/src/objects/ad-asset-feed-spec-link-url.js index b949f026..9b4d2008 100644 --- a/src/objects/ad-asset-feed-spec-link-url.js +++ b/src/objects/ad-asset-feed-spec-link-url.js @@ -22,6 +22,7 @@ export default class AdAssetFeedSpecLinkURL extends AbstractCrudObject { carousel_see_more_url: 'carousel_see_more_url', deeplink_url: 'deeplink_url', display_url: 'display_url', + object_store_urls: 'object_store_urls', url_tags: 'url_tags', website_url: 'website_url', }); diff --git a/src/objects/ad-creative-features-spec.js b/src/objects/ad-creative-features-spec.js index d1b597ee..eac614cf 100644 --- a/src/objects/ad-creative-features-spec.js +++ b/src/objects/ad-creative-features-spec.js @@ -53,6 +53,7 @@ export default class AdCreativeFeaturesSpec extends AbstractCrudObject { media_liquidity_animated_image: 'media_liquidity_animated_image', media_order: 'media_order', media_type_automation: 'media_type_automation', + multi_photo_to_video: 'multi_photo_to_video', pac_relaxation: 'pac_relaxation', product_extensions: 'product_extensions', product_metadata_automation: 'product_metadata_automation', diff --git a/src/objects/ad-creative-link-data.js b/src/objects/ad-creative-link-data.js index 7538fe9a..3ff72505 100644 --- a/src/objects/ad-creative-link-data.js +++ b/src/objects/ad-creative-link-data.js @@ -23,6 +23,7 @@ export default class AdCreativeLinkData extends AbstractCrudObject { app_link_spec: 'app_link_spec', attachment_style: 'attachment_style', automated_product_tags: 'automated_product_tags', + boosted_product_set_id: 'boosted_product_set_id', branded_content_shared_to_sponsor_status: 'branded_content_shared_to_sponsor_status', branded_content_sponsor_page_id: 'branded_content_sponsor_page_id', call_to_action: 'call_to_action', diff --git a/src/objects/ad-creative.js b/src/objects/ad-creative.js index 1fb6d34a..cc8e0d72 100644 --- a/src/objects/ad-creative.js +++ b/src/objects/ad-creative.js @@ -24,6 +24,7 @@ export default class AdCreative extends AbstractCrudObject { return Object.freeze({ account_id: 'account_id', actor_id: 'actor_id', + ad_disclaimer_spec: 'ad_disclaimer_spec', adlabels: 'adlabels', applink_treatment: 'applink_treatment', asset_feed_spec: 'asset_feed_spec', @@ -78,6 +79,7 @@ export default class AdCreative extends AbstractCrudObject { platform_customizations: 'platform_customizations', playable_asset_id: 'playable_asset_id', portrait_customizations: 'portrait_customizations', + product_data: 'product_data', product_set_id: 'product_set_id', recommender_settings: 'recommender_settings', source_instagram_media_id: 'source_instagram_media_id', diff --git a/src/objects/ad-network-analytics-async-query-export.js b/src/objects/ad-network-analytics-async-query-export.js index 51145141..e52df3d4 100644 --- a/src/objects/ad-network-analytics-async-query-export.js +++ b/src/objects/ad-network-analytics-async-query-export.js @@ -18,7 +18,6 @@ import {AbstractCrudObject} from './../abstract-crud-object'; export default class AdNetworkAnalyticsAsyncQueryExport extends AbstractCrudObject { static get Fields (): Object { return Object.freeze({ - error: 'error', export_link: 'export_link', query_id: 'query_id', status: 'status', diff --git a/src/objects/ad-network-analytics-async-query-result.js b/src/objects/ad-network-analytics-async-query-result.js index ed130eb5..b3b70b87 100644 --- a/src/objects/ad-network-analytics-async-query-result.js +++ b/src/objects/ad-network-analytics-async-query-result.js @@ -19,7 +19,6 @@ export default class AdNetworkAnalyticsAsyncQueryResult extends AbstractCrudObje static get Fields (): Object { return Object.freeze({ data: 'data', - error: 'error', omitted_results: 'omitted_results', query_id: 'query_id', results: 'results', diff --git a/src/objects/ad-report-run.js b/src/objects/ad-report-run.js index b9b7ff9b..42a13d5a 100644 --- a/src/objects/ad-report-run.js +++ b/src/objects/ad-report-run.js @@ -23,12 +23,14 @@ export default class AdReportRun extends AbstractCrudObject { return Object.freeze({ account_id: 'account_id', async_percent_completion: 'async_percent_completion', + async_report_url: 'async_report_url', async_status: 'async_status', date_start: 'date_start', date_stop: 'date_stop', emails: 'emails', friendly_name: 'friendly_name', id: 'id', + is_async_export: 'is_async_export', is_bookmarked: 'is_bookmarked', is_running: 'is_running', schedule_id: 'schedule_id', diff --git a/src/objects/ad-rule.js b/src/objects/ad-rule.js index 2aaf7f70..080a09e5 100644 --- a/src/objects/ad-rule.js +++ b/src/objects/ad-rule.js @@ -60,6 +60,7 @@ export default class AdRule extends AbstractCrudObject { am_syd_resolution_flow: 'AM_SYD_RESOLUTION_FLOW', am_syd_resolution_flow_modal: 'AM_SYD_RESOLUTION_FLOW_MODAL', am_table_delivery_column_popover: 'AM_TABLE_DELIVERY_COLUMN_POPOVER', + am_table_more_rules_dropdown: 'AM_TABLE_MORE_RULES_DROPDOWN', am_table_toggle_popover: 'AM_TABLE_TOGGLE_POPOVER', am_toolbar_create_rule_dropdown: 'AM_TOOLBAR_CREATE_RULE_DROPDOWN', pe_campaign_structure_menu: 'PE_CAMPAIGN_STRUCTURE_MENU', diff --git a/src/objects/ad-set.js b/src/objects/ad-set.js index 9c11518a..05b581a0 100644 --- a/src/objects/ad-set.js +++ b/src/objects/ad-set.js @@ -270,6 +270,7 @@ export default class AdSet extends AbstractCrudObject { value_0: '0', value_1: '1', value_2: '2', + value_3: '3', }); } static get TuneForCategory (): Object { diff --git a/src/objects/ads-insights.js b/src/objects/ads-insights.js index 2f002425..dbaf918d 100644 --- a/src/objects/ads-insights.js +++ b/src/objects/ads-insights.js @@ -104,6 +104,12 @@ export default class AdsInsights extends AbstractCrudObject { location: 'location', marketing_messages_cost_per_delivered: 'marketing_messages_cost_per_delivered', marketing_messages_cost_per_link_btn_click: 'marketing_messages_cost_per_link_btn_click', + marketing_messages_delivery_rate: 'marketing_messages_delivery_rate', + marketing_messages_link_btn_click_rate: 'marketing_messages_link_btn_click_rate', + marketing_messages_media_view_rate: 'marketing_messages_media_view_rate', + marketing_messages_phone_call_btn_click_rate: 'marketing_messages_phone_call_btn_click_rate', + marketing_messages_quick_reply_btn_click_rate: 'marketing_messages_quick_reply_btn_click_rate', + marketing_messages_read_rate: 'marketing_messages_read_rate', marketing_messages_spend: 'marketing_messages_spend', marketing_messages_website_purchase_values: 'marketing_messages_website_purchase_values', mobile_app_purchase_roas: 'mobile_app_purchase_roas', @@ -249,6 +255,11 @@ export default class AdsInsights extends AbstractCrudObject { skan_campaign_id: 'skan_campaign_id', skan_conversion_id: 'skan_conversion_id', skan_version: 'skan_version', + sot_attribution_model_type: 'sot_attribution_model_type', + sot_attribution_window: 'sot_attribution_window', + sot_channel: 'sot_channel', + sot_event_type: 'sot_event_type', + sot_source: 'sot_source', standard_event_content_type: 'standard_event_content_type', title_asset: 'title_asset', user_persona_id: 'user_persona_id', diff --git a/src/objects/ads-user-settings.js b/src/objects/ads-user-settings.js index 2d9bbe8d..d4868174 100644 --- a/src/objects/ads-user-settings.js +++ b/src/objects/ads-user-settings.js @@ -37,6 +37,7 @@ export default class AdsUserSettings extends AbstractCrudObject { carousel_to_video_opt_in_status: 'carousel_to_video_opt_in_status', connected_sources_catalog_opt_in_status: 'connected_sources_catalog_opt_in_status', default_creation_mode: 'default_creation_mode', + enhance_cta_text_extraction_opt_in_status: 'enhance_cta_text_extraction_opt_in_status', export_format_default: 'export_format_default', focus_mode_default: 'focus_mode_default', gen_ai_alpha_test_status: 'gen_ai_alpha_test_status', @@ -71,6 +72,8 @@ export default class AdsUserSettings extends AbstractCrudObject { static_ad_product_extensions_opt_in: 'static_ad_product_extensions_opt_in', sticky_setting_after_default_on: 'sticky_setting_after_default_on', syd_campaign_trends_metric: 'syd_campaign_trends_metric', + text_optimizations_text_extraction_opt_in_status: 'text_optimizations_text_extraction_opt_in_status', + text_variations_sticky_opt_in_status: 'text_variations_sticky_opt_in_status', total_coupon_syd_dismissals: 'total_coupon_syd_dismissals', total_coupon_upsell_dismissals: 'total_coupon_upsell_dismissals', url_prefill_removal_timestamp: 'url_prefill_removal_timestamp', diff --git a/src/objects/ads-value-adjustment-rule-collection.js b/src/objects/ads-value-adjustment-rule-collection.js index 76a31bb5..26075bbf 100644 --- a/src/objects/ads-value-adjustment-rule-collection.js +++ b/src/objects/ads-value-adjustment-rule-collection.js @@ -21,6 +21,7 @@ export default class AdsValueAdjustmentRuleCollection extends AbstractCrudObject static get Fields (): Object { return Object.freeze({ id: 'id', + is_default_setting: 'is_default_setting', name: 'name', }); } diff --git a/src/objects/analytics-funnel-query-result.js b/src/objects/analytics-funnel-query-result.js index 30eda9c8..c6ae1da4 100644 --- a/src/objects/analytics-funnel-query-result.js +++ b/src/objects/analytics-funnel-query-result.js @@ -18,8 +18,6 @@ import {AbstractCrudObject} from './../abstract-crud-object'; export default class AnalyticsFunnelQueryResult extends AbstractCrudObject { static get Fields (): Object { return Object.freeze({ - data: 'data', - error: 'error', query_id: 'query_id', status: 'status', }); diff --git a/src/objects/analytics-query-result.js b/src/objects/analytics-query-result.js index 61ee58fe..4d3b6384 100644 --- a/src/objects/analytics-query-result.js +++ b/src/objects/analytics-query-result.js @@ -18,9 +18,6 @@ import {AbstractCrudObject} from './../abstract-crud-object'; export default class AnalyticsQueryResult extends AbstractCrudObject { static get Fields (): Object { return Object.freeze({ - columns: 'columns', - datapoints: 'datapoints', - error: 'error', query_id: 'query_id', status: 'status', }); diff --git a/src/objects/application.js b/src/objects/application.js index 7eff016c..cb11b767 100644 --- a/src/objects/application.js +++ b/src/objects/application.js @@ -72,6 +72,7 @@ export default class Application extends AbstractCrudObject { deauth_callback_url: 'deauth_callback_url', default_share_mode: 'default_share_mode', description: 'description', + enigma_config: 'enigma_config', financial_id: 'financial_id', gdpv4_chrome_custom_tabs_enabled: 'gdpv4_chrome_custom_tabs_enabled', gdpv4_enabled: 'gdpv4_enabled', diff --git a/src/objects/business.js b/src/objects/business.js index a42ef40a..a3ce811c 100644 --- a/src/objects/business.js +++ b/src/objects/business.js @@ -92,6 +92,20 @@ export default class Business extends AbstractCrudObject { }); } + static get VerificationStatus (): Object { + return Object.freeze({ + expired: 'expired', + failed: 'failed', + ineligible: 'ineligible', + not_verified: 'not_verified', + pending: 'pending', + pending_need_more_info: 'pending_need_more_info', + pending_submission: 'pending_submission', + rejected: 'rejected', + revoked: 'revoked', + verified: 'verified', + }); + } static get TwoFactorType (): Object { return Object.freeze({ admin_required: 'admin_required', @@ -677,6 +691,39 @@ export default class Business extends AbstractCrudObject { view_monetization_insights: 'VIEW_MONETIZATION_INSIGHTS', }); } + static get BusinessVertical (): Object { + return Object.freeze({ + adult_products_and_services: 'ADULT_PRODUCTS_AND_SERVICES', + alcohol_and_tobacco: 'ALCOHOL_AND_TOBACCO', + automotive_dealers: 'AUTOMOTIVE_DEALERS', + body_parts_fluids: 'BODY_PARTS_FLUIDS', + business_and_utility: 'BUSINESS_AND_UTILITY', + content_and_apps: 'CONTENT_AND_APPS', + creators_and_celebrities: 'CREATORS_AND_CELEBRITIES', + dating: 'DATING', + drugs: 'DRUGS', + endangered_species: 'ENDANGERED_SPECIES', + firearms: 'FIREARMS', + fraudulent_misleading_offensive: 'FRAUDULENT_MISLEADING_OFFENSIVE', + gambling: 'GAMBLING', + grocery_and_convenience_store: 'GROCERY_AND_CONVENIENCE_STORE', + hazardous_goods_and_materials: 'HAZARDOUS_GOODS_AND_MATERIALS', + home: 'HOME', + home_and_auto_manufacturing: 'HOME_AND_AUTO_MANUFACTURING', + lifestyle: 'LIFESTYLE', + live_non_endangered_species: 'LIVE_NON_ENDANGERED_SPECIES', + loans_debt_collection_bail_bonds: 'LOANS_DEBT_COLLECTION_BAIL_BONDS', + local_events: 'LOCAL_EVENTS', + medical_healthcare: 'MEDICAL_HEALTHCARE', + multilevel_marketing: 'MULTILEVEL_MARKETING', + non_profit_and_religious_orgs: 'NON_PROFIT_AND_RELIGIOUS_ORGS', + professional: 'PROFESSIONAL', + real_virtual_fake_currency: 'REAL_VIRTUAL_FAKE_CURRENCY', + restaurants: 'RESTAURANTS', + retail: 'RETAIL', + transportation_and_accommodation: 'TRANSPORTATION_AND_ACCOMMODATION', + }); + } static get SubverticalV2 (): Object { return Object.freeze({ accounting_and_tax: 'ACCOUNTING_AND_TAX', @@ -1832,6 +1879,16 @@ export default class Business extends AbstractCrudObject { ); } + createSelfCertifyWhatsAppBusiness (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { + return this.createEdge( + '/self_certify_whatsapp_business', + fields, + params, + Business, + pathOverride, + ); + } + createSetupManagedPartnerAdAccount (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { return this.createEdge( '/setup_managed_partner_adaccounts', diff --git a/src/objects/analytics-cohort-query-result.js b/src/objects/catalog-advertiser-insight.js similarity index 70% rename from src/objects/analytics-cohort-query-result.js rename to src/objects/catalog-advertiser-insight.js index 99bdfac2..c50ae1a8 100644 --- a/src/objects/analytics-cohort-query-result.js +++ b/src/objects/catalog-advertiser-insight.js @@ -11,17 +11,15 @@ import {AbstractCrudObject} from './../abstract-crud-object'; /** - * AnalyticsCohortQueryResult + * CatalogAdvertiserInsight * @extends AbstractCrudObject * @see {@link https://developers.facebook.com/docs/marketing-api/} */ -export default class AnalyticsCohortQueryResult extends AbstractCrudObject { +export default class CatalogAdvertiserInsight extends AbstractCrudObject { static get Fields (): Object { return Object.freeze({ - data: 'data', - error: 'error', - query_id: 'query_id', - status: 'status', + category: 'category', + country: 'country', }); } diff --git a/src/objects/catalog-website-onboarding-settings.js b/src/objects/catalog-website-onboarding-settings.js index 87fae000..b135e917 100644 --- a/src/objects/catalog-website-onboarding-settings.js +++ b/src/objects/catalog-website-onboarding-settings.js @@ -19,6 +19,7 @@ export default class CatalogWebsiteOnboardingSettings extends AbstractCrudObject static get Fields (): Object { return Object.freeze({ id: 'id', + quality_band: 'quality_band', status: 'status', }); } diff --git a/src/objects/commerce-order.js b/src/objects/commerce-order.js index dd461a64..fe4c6f81 100644 --- a/src/objects/commerce-order.js +++ b/src/objects/commerce-order.js @@ -222,16 +222,6 @@ export default class CommerceOrder extends AbstractCrudObject { ); } - createUpdate (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { - return this.createEdge( - '/updates', - fields, - params, - CommerceOrder, - pathOverride, - ); - } - get (fields: Array, params: Object = {}): CommerceOrder { // $FlowFixMe : Support Generic Types diff --git a/src/objects/custom-audience-salts.js b/src/objects/custom-audience-salts.js index 870b3e28..6f103aa6 100644 --- a/src/objects/custom-audience-salts.js +++ b/src/objects/custom-audience-salts.js @@ -20,6 +20,8 @@ export default class CustomAudienceSalts extends AbstractCrudObject { return Object.freeze({ app_id: 'app_id', public_key: 'public_key', + salts: 'salts', + user_id: 'user_id', }); } diff --git a/src/objects/destination.js b/src/objects/destination.js index 34f99367..3323e507 100644 --- a/src/objects/destination.js +++ b/src/objects/destination.js @@ -26,6 +26,12 @@ export default class Destination extends AbstractCrudObject { applinks: 'applinks', category_specific_fields: 'category_specific_fields', currency: 'currency', + custom_label_0: 'custom_label_0', + custom_label_1: 'custom_label_1', + custom_label_2: 'custom_label_2', + custom_number_0: 'custom_number_0', + custom_number_1: 'custom_number_1', + custom_number_2: 'custom_number_2', description: 'description', destination_id: 'destination_id', id: 'id', diff --git a/src/objects/event.js b/src/objects/event.js index c1c45328..abcac9ae 100644 --- a/src/objects/event.js +++ b/src/objects/event.js @@ -91,6 +91,7 @@ export default class Event extends AbstractCrudObject { static get OnlineEventFormat (): Object { return Object.freeze({ fb_live: 'fb_live', + horizon_world: 'horizon_world', messenger_room: 'messenger_room', none: 'none', other: 'other', diff --git a/src/objects/extended-credit.js b/src/objects/extended-credit.js index 5404d6ab..4fda5b1b 100644 --- a/src/objects/extended-credit.js +++ b/src/objects/extended-credit.js @@ -105,12 +105,12 @@ export default class ExtendedCredit extends AbstractCrudObject { ); } - createWhatsAppCreditSharingAndAttach (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { + createWhatsAppCreditSharingAndAttach (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { return this.createEdge( '/whatsapp_credit_sharing_and_attach', fields, params, - null, + ExtendedCreditAllocationConfig, pathOverride, ); } diff --git a/src/objects/funding-source-details-coupon.js b/src/objects/funding-source-details-coupon.js index b9acb145..32c0f0c9 100644 --- a/src/objects/funding-source-details-coupon.js +++ b/src/objects/funding-source-details-coupon.js @@ -26,6 +26,7 @@ export default class FundingSourceDetailsCoupon extends AbstractCrudObject { expiration: 'expiration', original_amount: 'original_amount', original_display_amount: 'original_display_amount', + start_date: 'start_date', }); } diff --git a/src/objects/ig-comment.js b/src/objects/ig-comment.js index 6a290518..68975dcd 100644 --- a/src/objects/ig-comment.js +++ b/src/objects/ig-comment.js @@ -23,6 +23,7 @@ export default class IGComment extends AbstractCrudObject { from: 'from', hidden: 'hidden', id: 'id', + legacy_instagram_comment_id: 'legacy_instagram_comment_id', like_count: 'like_count', media: 'media', parent_id: 'parent_id', diff --git a/src/objects/ig-media.js b/src/objects/ig-media.js index 1e7213da..3a4fbb59 100644 --- a/src/objects/ig-media.js +++ b/src/objects/ig-media.js @@ -34,6 +34,7 @@ export default class IGMedia extends AbstractCrudObject { ig_id: 'ig_id', is_comment_enabled: 'is_comment_enabled', is_shared_to_feed: 'is_shared_to_feed', + legacy_instagram_media_id: 'legacy_instagram_media_id', like_count: 'like_count', media_product_type: 'media_product_type', media_type: 'media_type', diff --git a/src/objects/ig-user-subscribed-apps-data.js b/src/objects/ig-user-subscribed-apps-data.js new file mode 100644 index 00000000..6a5b4613 --- /dev/null +++ b/src/objects/ig-user-subscribed-apps-data.js @@ -0,0 +1,26 @@ + /* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under the license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +import {AbstractCrudObject} from './../abstract-crud-object'; + +/** + * IGUserSubscribedAppsData + * @extends AbstractCrudObject + * @see {@link https://developers.facebook.com/docs/marketing-api/} + */ +export default class IGUserSubscribedAppsData extends AbstractCrudObject { + static get Fields (): Object { + return Object.freeze({ + app_id: 'app_id', + subscribed_fields: 'subscribed_fields', + }); + } + +} diff --git a/src/objects/ig-user.js b/src/objects/ig-user.js index b6059b5d..1fc3409b 100644 --- a/src/objects/ig-user.js +++ b/src/objects/ig-user.js @@ -38,6 +38,7 @@ export default class IGUser extends AbstractCrudObject { follows_count: 'follows_count', id: 'id', ig_id: 'ig_id', + legacy_instagram_user_id: 'legacy_instagram_user_id', media_count: 'media_count', mentioned_comment: 'mentioned_comment', mentioned_media: 'mentioned_media', @@ -279,6 +280,16 @@ export default class IGUser extends AbstractCrudObject { ); } + createUpcomingEvent (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { + return this.createEdge( + '/upcoming_events', + fields, + params, + null, + pathOverride, + ); + } + get (fields: Array, params: Object = {}): IGUser { // $FlowFixMe : Support Generic Types diff --git a/src/objects/instagram-carousel.js b/src/objects/instagram-carousel.js index 21b00f34..6a0839fb 100644 --- a/src/objects/instagram-carousel.js +++ b/src/objects/instagram-carousel.js @@ -25,6 +25,7 @@ export default class InstagramCarousel extends AbstractCrudObject { content_type: 'content_type', display_url: 'display_url', id: 'id', + ig_media_id: 'ig_media_id', like_count: 'like_count', owner_instagram_user: 'owner_instagram_user', permalink: 'permalink', diff --git a/src/objects/instagram-comment.js b/src/objects/instagram-comment.js index 194562e0..9bb0149d 100644 --- a/src/objects/instagram-comment.js +++ b/src/objects/instagram-comment.js @@ -23,6 +23,7 @@ export default class InstagramComment extends AbstractCrudObject { comment_type: 'comment_type', created_at: 'created_at', id: 'id', + ig_comment_id: 'ig_comment_id', instagram_comment_id: 'instagram_comment_id', instagram_user: 'instagram_user', mentioned_instagram_users: 'mentioned_instagram_users', diff --git a/src/objects/instagram-insights-result.js b/src/objects/instagram-insights-result.js index 501df1b0..4a97a7e7 100644 --- a/src/objects/instagram-insights-result.js +++ b/src/objects/instagram-insights-result.js @@ -47,21 +47,15 @@ export default class InstagramInsightsResult extends AbstractCrudObject { impressions: 'impressions', likes: 'likes', navigation: 'navigation', - peak_concurrent_viewers: 'peak_concurrent_viewers', plays: 'plays', profile_activity: 'profile_activity', profile_visits: 'profile_visits', - quotes: 'quotes', reach: 'reach', replies: 'replies', - reposts: 'reposts', saved: 'saved', shares: 'shares', - thread_replies: 'thread_replies', - thread_shares: 'thread_shares', total_interactions: 'total_interactions', video_views: 'video_views', - views: 'views', }); } static get Period (): Object { diff --git a/src/objects/instagram-media.js b/src/objects/instagram-media.js index 64e16820..e94206a2 100644 --- a/src/objects/instagram-media.js +++ b/src/objects/instagram-media.js @@ -26,6 +26,7 @@ export default class InstagramMedia extends AbstractCrudObject { display_url: 'display_url', filter_name: 'filter_name', id: 'id', + ig_media_id: 'ig_media_id', latitude: 'latitude', like_count: 'like_count', location: 'location', diff --git a/src/objects/instagram-user.js b/src/objects/instagram-user.js index 7fd3e9be..b196602f 100644 --- a/src/objects/instagram-user.js +++ b/src/objects/instagram-user.js @@ -27,6 +27,7 @@ export default class InstagramUser extends AbstractCrudObject { followed_by_count: 'followed_by_count', has_profile_picture: 'has_profile_picture', id: 'id', + ig_user_id: 'ig_user_id', is_private: 'is_private', is_published: 'is_published', media_count: 'media_count', diff --git a/src/objects/lead-gen-form-preview-details.js b/src/objects/lead-gen-form-preview-details.js index b483dc8e..1670e9fd 100644 --- a/src/objects/lead-gen-form-preview-details.js +++ b/src/objects/lead-gen-form-preview-details.js @@ -20,6 +20,8 @@ export default class LeadGenFormPreviewDetails extends AbstractCrudObject { return Object.freeze({ call_business_text: 'call_business_text', call_to_action_title: 'call_to_action_title', + chat_on_messenger_text: 'chat_on_messenger_text', + chat_on_whatsapp_text: 'chat_on_whatsapp_text', contact_information_text: 'contact_information_text', creatives_overview_default_text: 'creatives_overview_default_text', data_privacy_policy_setting_description: 'data_privacy_policy_setting_description', diff --git a/src/objects/live-video-ad-campaign-config.js b/src/objects/live-video-ad-campaign-config.js new file mode 100644 index 00000000..c7562d69 --- /dev/null +++ b/src/objects/live-video-ad-campaign-config.js @@ -0,0 +1,35 @@ + /* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under the license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +import {AbstractCrudObject} from './../abstract-crud-object'; + +/** + * LiveVideoAdCampaignConfig + * @extends AbstractCrudObject + * @see {@link https://developers.facebook.com/docs/marketing-api/} + */ +export default class LiveVideoAdCampaignConfig extends AbstractCrudObject { + static get Fields (): Object { + return Object.freeze({ + id: 'id', + live_video_ad_type: 'live_video_ad_type', + }); + } + + + + get (fields: Array, params: Object = {}): LiveVideoAdCampaignConfig { + // $FlowFixMe : Support Generic Types + return this.read( + fields, + params + ); + } +} diff --git a/src/objects/messenger-business-template.js b/src/objects/messenger-business-template.js index 9f8ee709..e4dfbd4a 100644 --- a/src/objects/messenger-business-template.js +++ b/src/objects/messenger-business-template.js @@ -32,6 +32,20 @@ export default class MessengerBusinessTemplate extends AbstractCrudObject { }); } + static get Status (): Object { + return Object.freeze({ + approved: 'APPROVED', + archived: 'ARCHIVED', + deleted: 'DELETED', + disabled: 'DISABLED', + in_appeal: 'IN_APPEAL', + limit_exceeded: 'LIMIT_EXCEEDED', + paused: 'PAUSED', + pending: 'PENDING', + pending_deletion: 'PENDING_DELETION', + rejected: 'REJECTED', + }); + } get (fields: Array, params: Object = {}): MessengerBusinessTemplate { @@ -41,4 +55,12 @@ export default class MessengerBusinessTemplate extends AbstractCrudObject { params ); } + + // $FlowFixMe : Support Generic Types + update (fields: Array, params: Object = {}): MessengerBusinessTemplate { + // $FlowFixMe : Support Generic Types + return super.update( + params + ); + } } diff --git a/src/objects/messenger-call-settings.js b/src/objects/messenger-call-settings.js index c93e58cf..0356ab62 100644 --- a/src/objects/messenger-call-settings.js +++ b/src/objects/messenger-call-settings.js @@ -19,6 +19,7 @@ export default class MessengerCallSettings extends AbstractCrudObject { static get Fields (): Object { return Object.freeze({ audio_enabled: 'audio_enabled', + icon_enabled: 'icon_enabled', }); } diff --git a/src/objects/open-bridge-configuration.js b/src/objects/open-bridge-configuration.js index 880ab706..e7b59e95 100644 --- a/src/objects/open-bridge-configuration.js +++ b/src/objects/open-bridge-configuration.js @@ -20,13 +20,20 @@ export default class OpenBridgeConfiguration extends AbstractCrudObject { static get Fields (): Object { return Object.freeze({ active: 'active', + cloud_provider: 'cloud_provider', + cloud_region: 'cloud_region', + destination_id: 'destination_id', endpoint: 'endpoint', fallback_domain: 'fallback_domain', fallback_domain_enabled: 'fallback_domain_enabled', + first_party_domain: 'first_party_domain', host_business_id: 'host_business_id', host_external_id: 'host_external_id', id: 'id', instance_id: 'instance_id', + instance_version: 'instance_version', + is_sgw_instance: 'is_sgw_instance', + partner_name: 'partner_name', pixel_id: 'pixel_id', }); } diff --git a/src/objects/page.js b/src/objects/page.js index 1cd70d73..0b787840 100644 --- a/src/objects/page.js +++ b/src/objects/page.js @@ -42,6 +42,7 @@ import InstagramUser from './instagram-user'; import LeadgenForm from './leadgen-form'; import LiveVideo from './live-video'; import MediaFingerprint from './media-fingerprint'; +import MessengerBusinessTemplate from './messenger-business-template'; import MessagingFeatureReview from './messaging-feature-review'; import MessengerCallSettings from './messenger-call-settings'; import MessengerAdsPartialAutomatedStepList from './messenger-ads-partial-automated-step-list'; @@ -368,47 +369,6 @@ export default class Page extends AbstractCrudObject { view_monetization_insights: 'VIEW_MONETIZATION_INSIGHTS', }); } - static get Alignment (): Object { - return Object.freeze({ - left: 'LEFT', - right: 'RIGHT', - }); - } - static get EntryPointIcon (): Object { - return Object.freeze({ - chat_angular_icon: 'CHAT_ANGULAR_ICON', - chat_round_icon: 'CHAT_ROUND_ICON', - messenger_icon: 'MESSENGER_ICON', - none: 'NONE', - }); - } - static get EntryPointLabel (): Object { - return Object.freeze({ - ask_us: 'ASK_US', - chat: 'CHAT', - help: 'HELP', - none: 'NONE', - }); - } - static get GreetingDialogDisplay (): Object { - return Object.freeze({ - hide: 'HIDE', - show: 'SHOW', - welcome_message: 'WELCOME_MESSAGE', - }); - } - static get GuestChatMode (): Object { - return Object.freeze({ - disabled: 'DISABLED', - enabled: 'ENABLED', - }); - } - static get MobileChatDisplay (): Object { - return Object.freeze({ - app_switch: 'APP_SWITCH', - chat_tab: 'CHAT_TAB', - }); - } static get BackdatedTimeGranularity (): Object { return Object.freeze({ day: 'day', @@ -463,6 +423,11 @@ export default class Page extends AbstractCrudObject { scheduled_recurring: 'SCHEDULED_RECURRING', }); } + static get Category (): Object { + return Object.freeze({ + utility: 'UTILITY', + }); + } static get MessagingType (): Object { return Object.freeze({ message_tag: 'MESSAGE_TAG', @@ -600,7 +565,6 @@ export default class Page extends AbstractCrudObject { messaging_referrals: 'messaging_referrals', mission: 'mission', name: 'name', - otp_verification: 'otp_verification', page_about_story: 'page_about_story', page_change_proposal: 'page_change_proposal', page_upcoming_change: 'page_upcoming_change', @@ -869,16 +833,6 @@ export default class Page extends AbstractCrudObject { ); } - createChatPlugin (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { - return this.createEdge( - '/chat_plugin', - fields, - params, - Page, - pathOverride, - ); - } - getCommerceMerchantSettings (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { return this.getEdge( CommerceMerchantSettings, @@ -1243,6 +1197,33 @@ export default class Page extends AbstractCrudObject { ); } + deleteMessageTemplates (params: Object = {}): Promise<*> { + return super.deleteEdge( + '/message_templates', + params + ); + } + + getMessageTemplates (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { + return this.getEdge( + MessengerBusinessTemplate, + fields, + params, + fetchFirstPage, + '/message_templates' + ); + } + + createMessageTemplate (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { + return this.createEdge( + '/message_templates', + fields, + params, + Page, + pathOverride, + ); + } + createMessage (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { return this.createEdge( '/messages', diff --git a/src/objects/partnership-ads-identity.js b/src/objects/partnership-ads-identity.js index ed30783b..de8a6d9f 100644 --- a/src/objects/partnership-ads-identity.js +++ b/src/objects/partnership-ads-identity.js @@ -18,6 +18,7 @@ import {AbstractCrudObject} from './../abstract-crud-object'; export default class PartnershipAdsIdentity extends AbstractCrudObject { static get Fields (): Object { return Object.freeze({ + is_saved: 'is_saved', post_types: 'post_types', secondary_identities: 'secondary_identities', }); diff --git a/src/objects/product-item.js b/src/objects/product-item.js index b542c8f0..64e3615e 100644 --- a/src/objects/product-item.js +++ b/src/objects/product-item.js @@ -99,6 +99,7 @@ export default class ProductItem extends AbstractCrudObject { start_date: 'start_date', tags: 'tags', url: 'url', + vendor_id: 'vendor_id', video_fetch_status: 'video_fetch_status', visibility: 'visibility', wa_compliance_category: 'wa_compliance_category', @@ -493,6 +494,13 @@ export default class ProductItem extends AbstractCrudObject { item_price_not_positive: 'ITEM_PRICE_NOT_POSITIVE', item_stale_out_of_stock: 'ITEM_STALE_OUT_OF_STOCK', marketplace_disabled_by_user: 'MARKETPLACE_DISABLED_BY_USER', + marketplace_partner_listing_limit_exceeded: 'MARKETPLACE_PARTNER_LISTING_LIMIT_EXCEEDED', + marketplace_partner_not_local_item: 'MARKETPLACE_PARTNER_NOT_LOCAL_ITEM', + marketplace_partner_not_shipped_item: 'MARKETPLACE_PARTNER_NOT_SHIPPED_ITEM', + marketplace_partner_policy_violation: 'MARKETPLACE_PARTNER_POLICY_VIOLATION', + marketplace_partner_rule_listing_limit_exceeded: 'MARKETPLACE_PARTNER_RULE_LISTING_LIMIT_EXCEEDED', + marketplace_partner_seller_banned: 'MARKETPLACE_PARTNER_SELLER_BANNED', + marketplace_partner_seller_not_valid: 'MARKETPLACE_PARTNER_SELLER_NOT_VALID', mini_shops_disabled_by_user: 'MINI_SHOPS_DISABLED_BY_USER', missing_checkout: 'MISSING_CHECKOUT', missing_checkout_currency: 'MISSING_CHECKOUT_CURRENCY', diff --git a/src/objects/reach-frequency-prediction.js b/src/objects/reach-frequency-prediction.js index 0ba112df..23fc68f2 100644 --- a/src/objects/reach-frequency-prediction.js +++ b/src/objects/reach-frequency-prediction.js @@ -84,6 +84,7 @@ export default class ReachFrequencyPrediction extends AbstractCrudObject { optimization_goal: 'optimization_goal', optimization_goal_name: 'optimization_goal_name', pause_periods: 'pause_periods', + percent_reach_at_target_frequency: 'percent_reach_at_target_frequency', placement_breakdown: 'placement_breakdown', placement_breakdown_map: 'placement_breakdown_map', plan_name: 'plan_name', diff --git a/src/objects/regional-regulation-identities.js b/src/objects/regional-regulation-identities.js index e6b4472a..b72f7928 100644 --- a/src/objects/regional-regulation-identities.js +++ b/src/objects/regional-regulation-identities.js @@ -18,6 +18,8 @@ import {AbstractCrudObject} from './../abstract-crud-object'; export default class RegionalRegulationIdentities extends AbstractCrudObject { static get Fields (): Object { return Object.freeze({ + australia_finserv_beneficiary: 'australia_finserv_beneficiary', + australia_finserv_payer: 'australia_finserv_payer', taiwan_finserv_beneficiary: 'taiwan_finserv_beneficiary', taiwan_finserv_payer: 'taiwan_finserv_payer', }); diff --git a/src/objects/user.js b/src/objects/user.js index 465a79bf..ff5349a3 100644 --- a/src/objects/user.js +++ b/src/objects/user.js @@ -64,6 +64,7 @@ export default class User extends AbstractCrudObject { id: 'id', id_for_avatars: 'id_for_avatars', inspirational_people: 'inspirational_people', + instagram_user_self_asset: 'instagram_user_self_asset', install_type: 'install_type', installed: 'installed', is_guest_user: 'is_guest_user', @@ -84,6 +85,7 @@ export default class User extends AbstractCrudObject { profile_pic: 'profile_pic', quotes: 'quotes', relationship_status: 'relationship_status', + religion: 'religion', shared_login_upgrade_required_by: 'shared_login_upgrade_required_by', short_name: 'short_name', significant_other: 'significant_other', diff --git a/src/objects/whats-app-business-account.js b/src/objects/whats-app-business-account.js index 4fd12723..850a0d2c 100644 --- a/src/objects/whats-app-business-account.js +++ b/src/objects/whats-app-business-account.js @@ -49,6 +49,20 @@ export default class WhatsAppBusinessAccount extends AbstractCrudObject { }); } + static get BusinessVerificationStatus (): Object { + return Object.freeze({ + expired: 'expired', + failed: 'failed', + ineligible: 'ineligible', + not_verified: 'not_verified', + pending: 'pending', + pending_need_more_info: 'pending_need_more_info', + pending_submission: 'pending_submission', + rejected: 'rejected', + revoked: 'revoked', + verified: 'verified', + }); + } static get Tasks (): Object { return Object.freeze({ develop: 'DEVELOP', @@ -75,6 +89,12 @@ export default class WhatsAppBusinessAccount extends AbstractCrudObject { order_details: 'ORDER_DETAILS', }); } + static get ParameterFormat (): Object { + return Object.freeze({ + named: 'NAMED', + positional: 'POSITIONAL', + }); + } static get SubCategory (): Object { return Object.freeze({ order_details: 'ORDER_DETAILS', diff --git a/src/objects/whats-app-business-partner-client-verification-submission.js b/src/objects/whats-app-business-partner-client-verification-submission.js index 35e09eb7..f9e83953 100644 --- a/src/objects/whats-app-business-partner-client-verification-submission.js +++ b/src/objects/whats-app-business-partner-client-verification-submission.js @@ -34,6 +34,7 @@ export default class WhatsAppBusinessPartnerClientVerificationSubmission extends business_not_eligible: 'BUSINESS_NOT_ELIGIBLE', legal_name_not_found_in_documents: 'LEGAL_NAME_NOT_FOUND_IN_DOCUMENTS', legal_name_not_matching: 'LEGAL_NAME_NOT_MATCHING', + malformed_documents: 'MALFORMED_DOCUMENTS', none: 'NONE', website_not_matching: 'WEBSITE_NOT_MATCHING', });