From 9ada43b6433ec7dea4b89217930a5c65c81de4c9 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005295453 Date: Mon, 15 Apr 2024 11:21:37 -0700 Subject: [PATCH] Auto-generated nodejs SDK code update Summary: ignore-conflict-markers Reviewed By: stcheng Differential Revision: D56033437 fbshipit-source-id: 31e26dedadc1cce02c98f3f01a9390e8935d5431 --- ..._account_ad_sets_post_ad_set_create_cpa.js | 4 +- ..._sets_post_ad_set_create_cpa_app_events.js | 4 +- .../ad_account_ad_sets_post_create_ad_set.js | 4 +- .../ad_account_ad_sets_post_daily_budget20.js | 4 +- ...post_lifetime_budget200_duration10_days.js | 4 +- ...t_ad_sets_post_optimize_post_engagement.js | 4 +- ...group_leads_edge_adgroup_leads_filtered.js | 2 +- examples/ads_pixel_events_post.js | 2 +- package.json | 2 +- src/api.js | 2 +- src/bundle.es6 | 3 +- src/globals.es6 | 3 +- src/objects/ad-account-ad-volume.js | 5 +++ src/objects/ad-account-targeting-unified.js | 1 + src/objects/ad-account.js | 33 ++++++++++++++ src/objects/ad-activity.js | 1 + src/objects/ad-asset-feed-spec.js | 8 ++++ src/objects/ad-creative-features-spec.js | 4 ++ .../ad-creative-link-data-call-to-action.js | 7 +++ src/objects/ad-creative-link-data.js | 1 + src/objects/ad-creative-sourcing-spec.js | 1 + src/objects/ad-creative.js | 7 +++ src/objects/ad-preview.js | 3 ++ src/objects/ad-set.js | 1 + src/objects/ads-pixel.js | 10 ----- src/objects/application.js | 11 ----- src/objects/commerce-merchant-settings.js | 21 --------- src/objects/commerce-order.js | 14 +++++- src/objects/custom-audience.js | 2 + src/objects/destination.js | 1 + src/objects/flight.js | 1 + src/objects/hotel.js | 1 + src/objects/ig-upcoming-event.js | 45 +++++++++++++++++++ src/objects/instagram-user.js | 13 +++++- src/objects/local-service-business.js | 1 + src/objects/page-commerce-eligibility.js | 26 ----------- src/objects/page.js | 13 +----- src/objects/product-catalog.js | 10 +++++ src/objects/product-item.js | 1 + ...rgeting-geo-location-location-expansion.js | 25 ----------- src/objects/targeting-geo-location.js | 1 - src/objects/whats-app-business-account.js | 11 ++++- ...-partner-client-verification-submission.js | 15 +++++++ 43 files changed, 203 insertions(+), 129 deletions(-) create mode 100644 src/objects/ig-upcoming-event.js delete mode 100644 src/objects/page-commerce-eligibility.js delete mode 100644 src/objects/targeting-geo-location-location-expansion.js diff --git a/examples/ad_account_ad_sets_post_ad_set_create_cpa.js b/examples/ad_account_ad_sets_post_ad_set_create_cpa.js index 0761f29e..40f5469f 100644 --- a/examples/ad_account_ad_sets_post_ad_set_create_cpa.js +++ b/examples/ad_account_ad_sets_post_ad_set_create_cpa.js @@ -36,8 +36,8 @@ params = { 'name' : 'A CPA Ad Set', 'campaign_id' : '', 'daily_budget' : '5000', - 'start_time' : '2024-03-20T14:31:58-0700', - 'end_time' : '2024-03-27T14:31:58-0700', + 'start_time' : '2024-04-08T11:26:05-0700', + 'end_time' : '2024-04-15T11:26:05-0700', 'billing_event' : 'IMPRESSIONS', 'optimization_goal' : 'REACH', 'bid_amount' : '1000', diff --git a/examples/ad_account_ad_sets_post_ad_set_create_cpa_app_events.js b/examples/ad_account_ad_sets_post_ad_set_create_cpa_app_events.js index 93c381c5..a29b78fc 100644 --- a/examples/ad_account_ad_sets_post_ad_set_create_cpa_app_events.js +++ b/examples/ad_account_ad_sets_post_ad_set_create_cpa_app_events.js @@ -36,8 +36,8 @@ params = { 'name' : 'A CPA Ad Set optimized for App Events', 'campaign_id' : '', 'daily_budget' : '300', - 'start_time' : '2024-03-20T14:32:42-0700', - 'end_time' : '2024-03-27T14:32:42-0700', + 'start_time' : '2024-04-08T11:26:49-0700', + 'end_time' : '2024-04-15T11:26:49-0700', 'billing_event' : 'IMPRESSIONS', 'optimization_goal' : 'OFFSITE_CONVERSIONS', 'bid_amount' : '100', diff --git a/examples/ad_account_ad_sets_post_create_ad_set.js b/examples/ad_account_ad_sets_post_create_ad_set.js index 39eb25bd..a640890e 100644 --- a/examples/ad_account_ad_sets_post_create_ad_set.js +++ b/examples/ad_account_ad_sets_post_create_ad_set.js @@ -35,8 +35,8 @@ fields = [ params = { 'name' : 'My First AdSet', 'lifetime_budget' : '20000', - 'start_time' : '2024-03-20T14:31:13-0700', - 'end_time' : '2024-03-27T14:31:13-0700', + 'start_time' : '2024-04-08T11:25:19-0700', + 'end_time' : '2024-04-15T11:25:19-0700', 'campaign_id' : '', 'bid_amount' : '500', 'billing_event' : 'IMPRESSIONS', diff --git a/examples/ad_account_ad_sets_post_daily_budget20.js b/examples/ad_account_ad_sets_post_daily_budget20.js index 62be563b..757294b4 100644 --- a/examples/ad_account_ad_sets_post_daily_budget20.js +++ b/examples/ad_account_ad_sets_post_daily_budget20.js @@ -35,8 +35,8 @@ fields = [ params = { 'name' : 'My First Adset', 'daily_budget' : '2000', - 'start_time' : '2024-03-13T14:32:15-0700', - 'end_time' : '2024-03-20T14:32:15-0700', + 'start_time' : '2024-04-01T11:26:23-0700', + 'end_time' : '2024-04-08T11:26:23-0700', 'campaign_id' : '', 'bid_amount' : '100', 'billing_event' : 'LINK_CLICKS', diff --git a/examples/ad_account_ad_sets_post_lifetime_budget200_duration10_days.js b/examples/ad_account_ad_sets_post_lifetime_budget200_duration10_days.js index 0f9ec88d..2cc05f37 100644 --- a/examples/ad_account_ad_sets_post_lifetime_budget200_duration10_days.js +++ b/examples/ad_account_ad_sets_post_lifetime_budget200_duration10_days.js @@ -35,8 +35,8 @@ fields = [ params = { 'name' : 'My First Adset', 'lifetime_budget' : '20000', - 'start_time' : '2024-03-13T14:32:24-0700', - 'end_time' : '2024-03-23T14:32:24-0700', + 'start_time' : '2024-04-01T11:26:32-0700', + 'end_time' : '2024-04-11T11:26:32-0700', 'campaign_id' : '', 'bid_amount' : '100', 'billing_event' : 'LINK_CLICKS', diff --git a/examples/ad_account_ad_sets_post_optimize_post_engagement.js b/examples/ad_account_ad_sets_post_optimize_post_engagement.js index 165da670..fe2281e5 100644 --- a/examples/ad_account_ad_sets_post_optimize_post_engagement.js +++ b/examples/ad_account_ad_sets_post_optimize_post_engagement.js @@ -35,8 +35,8 @@ fields = [ params = { 'name' : 'My First Adset', 'lifetime_budget' : '20000', - 'start_time' : '2024-03-13T14:32:33-0700', - 'end_time' : '2024-03-23T14:32:33-0700', + 'start_time' : '2024-04-01T11:26:40-0700', + 'end_time' : '2024-04-11T11:26:40-0700', 'campaign_id' : '', 'bid_amount' : '500', 'billing_event' : 'IMPRESSIONS', diff --git a/examples/adgroup_leads_edge_adgroup_leads_filtered.js b/examples/adgroup_leads_edge_adgroup_leads_filtered.js index 98a2550f..c304a297 100644 --- a/examples/adgroup_leads_edge_adgroup_leads_filtered.js +++ b/examples/adgroup_leads_edge_adgroup_leads_filtered.js @@ -33,7 +33,7 @@ let fields, params; fields = [ ]; params = { - 'filtering' : [{'field':'time_created','operator':'GREATER_THAN','value':1681144509}], + 'filtering' : [{'field':'time_created','operator':'GREATER_THAN','value':1711391704}], }; const leadss = (new Ad(id)).getLeads( fields, diff --git a/examples/ads_pixel_events_post.js b/examples/ads_pixel_events_post.js index c7139c24..8ff72c7e 100644 --- a/examples/ads_pixel_events_post.js +++ b/examples/ads_pixel_events_post.js @@ -32,7 +32,7 @@ let fields, params; fields = [ ]; params = { - 'data' : [{'event_name':'PageView','event_time':1681748568,'user_data':{'fbc':'fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890','fbp':'fb.1.1558571054389.1098115397','em':'309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd'}}], + 'data' : [{'event_name':'PageView','event_time':1711995835,'user_data':{'fbc':'fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890','fbp':'fb.1.1558571054389.1098115397','em':'309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd'}}], }; const events = (new AdsPixel(id)).createEvent( fields, diff --git a/package.json b/package.json index c11b1039..8ce4b56c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "facebook-nodejs-business-sdk", - "version": "19.0.2", + "version": "19.0.3", "description": "SDK for the Facebook Marketing API in Javascript and Node.js", "author": "Facebook", "maintainers": [ diff --git a/src/api.js b/src/api.js index 792cb9a7..0401a71c 100644 --- a/src/api.js +++ b/src/api.js @@ -24,7 +24,7 @@ export default class FacebookAdsApi { return 'v19.0'; } static get SDK_VERSION(): string { - return '19.0.2'; + return '19.0.3'; } static get GRAPH(): string { return 'https://graph.facebook.com'; diff --git a/src/bundle.es6 b/src/bundle.es6 index 7ba9641b..e40cd064 100644 --- a/src/bundle.es6 +++ b/src/bundle.es6 @@ -310,6 +310,7 @@ export { default as IGShoppingProductAppeal } from './../src/objects/ig-shopping export { default as IGShoppingReviewStatus } from './../src/objects/ig-shopping-review-status'; export { default as IGShoppingReviewStatusOnsiteEligibility } from './../src/objects/ig-shopping-review-status-onsite-eligibility'; export { default as IGShoppingReviewStatusReasonWithHelpMessage } from './../src/objects/ig-shopping-review-status-reason-with-help-message'; +export { default as IGUpcomingEvent } from './../src/objects/ig-upcoming-event'; export { default as IGUser } from './../src/objects/ig-user'; 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'; @@ -385,7 +386,6 @@ export { default as PageAboutStoryComposedBlockInlineStyle } from './../src/obje export { default as PageCallToAction } from './../src/objects/page-call-to-action'; export { default as PageCategory } from './../src/objects/page-category'; export { default as PageChangeProposal } from './../src/objects/page-change-proposal'; -export { default as PageCommerceEligibility } from './../src/objects/page-commerce-eligibility'; export { default as PageParking } from './../src/objects/page-parking'; export { default as PagePaymentOptions } from './../src/objects/page-payment-options'; export { default as PagePost } from './../src/objects/page-post'; @@ -483,7 +483,6 @@ export { default as TargetingGeoLocationCustomLocation } from './../src/objects/ export { default as TargetingGeoLocationElectoralDistrict } from './../src/objects/targeting-geo-location-electoral-district'; export { default as TargetingGeoLocationGeoEntities } from './../src/objects/targeting-geo-location-geo-entities'; export { default as TargetingGeoLocationLocationCluster } from './../src/objects/targeting-geo-location-location-cluster'; -export { default as TargetingGeoLocationLocationExpansion } from './../src/objects/targeting-geo-location-location-expansion'; export { default as TargetingGeoLocationMarket } from './../src/objects/targeting-geo-location-market'; export { default as TargetingGeoLocationPlace } from './../src/objects/targeting-geo-location-place'; export { default as TargetingGeoLocationPoliticalDistrict } from './../src/objects/targeting-geo-location-political-district'; diff --git a/src/globals.es6 b/src/globals.es6 index 1f875c46..a60bb1a1 100644 --- a/src/globals.es6 +++ b/src/globals.es6 @@ -286,6 +286,7 @@ import './../src/objects/ig-shopping-product-appeal'; import './../src/objects/ig-shopping-review-status'; import './../src/objects/ig-shopping-review-status-onsite-eligibility'; import './../src/objects/ig-shopping-review-status-reason-with-help-message'; +import './../src/objects/ig-upcoming-event'; import './../src/objects/ig-user'; import './../src/objects/ig-video-copyright-check-matches-information'; import './../src/objects/ig-video-copyright-check-status'; @@ -361,7 +362,6 @@ import './../src/objects/page-about-story-composed-block-inline-style'; import './../src/objects/page-call-to-action'; import './../src/objects/page-category'; import './../src/objects/page-change-proposal'; -import './../src/objects/page-commerce-eligibility'; import './../src/objects/page-parking'; import './../src/objects/page-payment-options'; import './../src/objects/page-post'; @@ -459,7 +459,6 @@ import './../src/objects/targeting-geo-location-custom-location'; import './../src/objects/targeting-geo-location-electoral-district'; import './../src/objects/targeting-geo-location-geo-entities'; import './../src/objects/targeting-geo-location-location-cluster'; -import './../src/objects/targeting-geo-location-location-expansion'; import './../src/objects/targeting-geo-location-market'; import './../src/objects/targeting-geo-location-place'; import './../src/objects/targeting-geo-location-political-district'; diff --git a/src/objects/ad-account-ad-volume.js b/src/objects/ad-account-ad-volume.js index a4c3aa27..fecdc616 100644 --- a/src/objects/ad-account-ad-volume.js +++ b/src/objects/ad-account-ad-volume.js @@ -62,6 +62,7 @@ export default class AdAccountAdVolume extends AbstractCrudObject { asc_budget_optimization: 'ASC_BUDGET_OPTIMIZATION', asc_budget_optimization_pfr: 'ASC_BUDGET_OPTIMIZATION_PFR', asc_creation_package: 'ASC_CREATION_PACKAGE', + asc_fragmentation_v2: 'ASC_FRAGMENTATION_V2', aspect_ratio: 'ASPECT_RATIO', atleast_6_placements: 'ATLEAST_6_PLACEMENTS', auction_overlap: 'AUCTION_OVERLAP', @@ -79,6 +80,7 @@ export default class AdAccountAdVolume extends AbstractCrudObject { capi_performance_match_key: 'CAPI_PERFORMANCE_MATCH_KEY', capi_performance_match_key_v2: 'CAPI_PERFORMANCE_MATCH_KEY_V2', cash_rewards_opt_in: 'CASH_REWARDS_OPT_IN', + connected_sources: 'CONNECTED_SOURCES', connect_facebook_page_to_instagram: 'CONNECT_FACEBOOK_PAGE_TO_INSTAGRAM', connect_facebook_page_to_whatsapp: 'CONNECT_FACEBOOK_PAGE_TO_WHATSAPP', conversion_lead_ads: 'CONVERSION_LEAD_ADS', @@ -98,8 +100,10 @@ export default class AdAccountAdVolume extends AbstractCrudObject { creator_ads_pa_conversion: 'CREATOR_ADS_PA_CONVERSION', cta: 'CTA', ctx_budget_optimization: 'CTX_BUDGET_OPTIMIZATION', + ctx_creation_package: 'CTX_CREATION_PACKAGE', ctx_guidance: 'CTX_GUIDANCE', da_advantage_plus_creative_info_labels: 'DA_ADVANTAGE_PLUS_CREATIVE_INFO_LABELS', + da_duplication_product_tags: 'DA_DUPLICATION_PRODUCT_TAGS', dead_link: 'DEAD_LINK', dynamic_advantage_campaign_budget: 'DYNAMIC_ADVANTAGE_CAMPAIGN_BUDGET', ecosystem_bid_reduce_l1_cardinality: 'ECOSYSTEM_BID_REDUCE_L1_CARDINALITY', @@ -130,6 +134,7 @@ export default class AdAccountAdVolume extends AbstractCrudObject { pfr_l1_inline_mmt: 'PFR_L1_INLINE_MMT', predictive_creative_limited: 'PREDICTIVE_CREATIVE_LIMITED', predictive_creative_limited_hourly: 'PREDICTIVE_CREATIVE_LIMITED_HOURLY', + preparing_status: 'PREPARING_STATUS', rapid_learning_limited: 'RAPID_LEARNING_LIMITED', rapid_learning_phase: 'RAPID_LEARNING_PHASE', reels_duplication_upsell: 'REELS_DUPLICATION_UPSELL', diff --git a/src/objects/ad-account-targeting-unified.js b/src/objects/ad-account-targeting-unified.js index 12e2236d..650d573f 100644 --- a/src/objects/ad-account-targeting-unified.js +++ b/src/objects/ad-account-targeting-unified.js @@ -430,6 +430,7 @@ export default class AdAccountTargetingUnified extends AbstractCrudObject { location_categories: 'location_categories', location_cluster_ids: 'location_cluster_ids', location_expansion: 'location_expansion', + marketing_message_channels: 'marketing_message_channels', marketing_message_targeting: 'marketing_message_targeting', marketplace_product_categories: 'marketplace_product_categories', messenger_positions: 'messenger_positions', diff --git a/src/objects/ad-account.js b/src/objects/ad-account.js index 385ebee5..bd7f93b0 100644 --- a/src/objects/ad-account.js +++ b/src/objects/ad-account.js @@ -78,6 +78,7 @@ export default class AdAccount extends AbstractCrudObject { amount_spent: 'amount_spent', attribution_spec: 'attribution_spec', balance: 'balance', + brand_safety_content_filter_levels: 'brand_safety_content_filter_levels', business: 'business', business_city: 'business_city', business_country_code: 'business_country_code', @@ -236,6 +237,7 @@ export default class AdAccount extends AbstractCrudObject { automotive_model: 'AUTOMOTIVE_MODEL', destination: 'DESTINATION', flight: 'FLIGHT', + generic: 'GENERIC', home_listing: 'HOME_LISTING', hotel: 'HOTEL', job: 'JOB', @@ -256,6 +258,7 @@ export default class AdAccount extends AbstractCrudObject { claim: 'CLAIM', custom: 'CUSTOM', engagement: 'ENGAGEMENT', + exclusion: 'EXCLUSION', fox: 'FOX', lookalike: 'LOOKALIKE', managed: 'MANAGED', @@ -755,6 +758,16 @@ export default class AdAccount extends AbstractCrudObject { ); } + getAudienceFunnel (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { + return this.getEdge( + AbstractObject, + fields, + params, + fetchFirstPage, + '/audience_funnel' + ); + } + createBlockListDraft (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { return this.createEdge( '/block_list_drafts', @@ -852,6 +865,16 @@ export default class AdAccount extends AbstractCrudObject { ); } + getCpaGuidance (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { + return this.getEdge( + AbstractObject, + fields, + params, + fetchFirstPage, + '/cpa_guidance' + ); + } + getCustomAudiences (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { return this.getEdge( CustomAudience, @@ -1256,6 +1279,16 @@ export default class AdAccount extends AbstractCrudObject { ); } + getValueAdjustmentRuleCollections (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { + return this.getEdge( + AbstractObject, + fields, + params, + fetchFirstPage, + '/value_adjustment_rule_collections' + ); + } + getValueAdjustmentRules (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { return this.getEdge( AbstractObject, diff --git a/src/objects/ad-activity.js b/src/objects/ad-activity.js index ec053f7f..8f4acc7b 100644 --- a/src/objects/ad-activity.js +++ b/src/objects/ad-activity.js @@ -116,6 +116,7 @@ export default class AdActivity extends AbstractCrudObject { update_campaign_name: 'update_campaign_name', update_campaign_run_status: 'update_campaign_run_status', update_campaign_schedule: 'update_campaign_schedule', + update_campaign_value_adjustment_rule: 'update_campaign_value_adjustment_rule', update_delivery_type_cross_level_shift: 'update_delivery_type_cross_level_shift', }); } diff --git a/src/objects/ad-asset-feed-spec.js b/src/objects/ad-asset-feed-spec.js index 06b9aa2b..1b960424 100644 --- a/src/objects/ad-asset-feed-spec.js +++ b/src/objects/ad-asset-feed-spec.js @@ -36,6 +36,7 @@ export default class AdAssetFeedSpec extends AbstractCrudObject { message_extensions: 'message_extensions', onsite_destinations: 'onsite_destinations', optimization_type: 'optimization_type', + promotional_metadata: 'promotional_metadata', reasons_to_shop: 'reasons_to_shop', shops_bundle: 'shops_bundle', titles: 'titles', @@ -47,15 +48,20 @@ export default class AdAssetFeedSpec extends AbstractCrudObject { return Object.freeze({ add_to_cart: 'ADD_TO_CART', apply_now: 'APPLY_NOW', + ask_about_services: 'ASK_ABOUT_SERVICES', + ask_for_more_info: 'ASK_FOR_MORE_INFO', audio_call: 'AUDIO_CALL', + book_a_consultation: 'BOOK_A_CONSULTATION', book_now: 'BOOK_NOW', book_travel: 'BOOK_TRAVEL', buy: 'BUY', buy_now: 'BUY_NOW', buy_tickets: 'BUY_TICKETS', + buy_via_message: 'BUY_VIA_MESSAGE', call: 'CALL', call_me: 'CALL_ME', call_now: 'CALL_NOW', + chat_with_us: 'CHAT_WITH_US', confirm: 'CONFIRM', contact: 'CONTACT', contact_us: 'CONTACT_US', @@ -68,6 +74,7 @@ export default class AdAssetFeedSpec extends AbstractCrudObject { follow_news_storyline: 'FOLLOW_NEWS_STORYLINE', follow_page: 'FOLLOW_PAGE', follow_user: 'FOLLOW_USER', + get_a_quote: 'GET_A_QUOTE', get_directions: 'GET_DIRECTIONS', get_offer: 'GET_OFFER', get_offer_view: 'GET_OFFER_VIEW', @@ -83,6 +90,7 @@ export default class AdAssetFeedSpec extends AbstractCrudObject { like_page: 'LIKE_PAGE', listen_music: 'LISTEN_MUSIC', listen_now: 'LISTEN_NOW', + make_an_appointment: 'MAKE_AN_APPOINTMENT', message_page: 'MESSAGE_PAGE', mobile_download: 'MOBILE_DOWNLOAD', no_button: 'NO_BUTTON', diff --git a/src/objects/ad-creative-features-spec.js b/src/objects/ad-creative-features-spec.js index 09444c23..30d3ac2e 100644 --- a/src/objects/ad-creative-features-spec.js +++ b/src/objects/ad-creative-features-spec.js @@ -19,8 +19,11 @@ export default class AdCreativeFeaturesSpec extends AbstractCrudObject { static get Fields (): Object { return Object.freeze({ advantage_plus_creative: 'advantage_plus_creative', + app_highlights: 'app_highlights', audio: 'audio', carousel_to_video: 'carousel_to_video', + catalog_feed_tag: 'catalog_feed_tag', + customize_product_recommendation: 'customize_product_recommendation', cv_transformation: 'cv_transformation', description_automation: 'description_automation', dha_optimization: 'dha_optimization', @@ -39,6 +42,7 @@ export default class AdCreativeFeaturesSpec extends AbstractCrudObject { product_metadata_automation: 'product_metadata_automation', product_tags: 'product_tags', profile_card: 'profile_card', + site_extensions: 'site_extensions', standard_enhancements: 'standard_enhancements', standard_enhancements_catalog: 'standard_enhancements_catalog', text_generation: 'text_generation', diff --git a/src/objects/ad-creative-link-data-call-to-action.js b/src/objects/ad-creative-link-data-call-to-action.js index cc9c0ffe..86284c92 100644 --- a/src/objects/ad-creative-link-data-call-to-action.js +++ b/src/objects/ad-creative-link-data-call-to-action.js @@ -27,15 +27,20 @@ export default class AdCreativeLinkDataCallToAction extends AbstractCrudObject { return Object.freeze({ add_to_cart: 'ADD_TO_CART', apply_now: 'APPLY_NOW', + ask_about_services: 'ASK_ABOUT_SERVICES', + ask_for_more_info: 'ASK_FOR_MORE_INFO', audio_call: 'AUDIO_CALL', + book_a_consultation: 'BOOK_A_CONSULTATION', book_now: 'BOOK_NOW', book_travel: 'BOOK_TRAVEL', buy: 'BUY', buy_now: 'BUY_NOW', buy_tickets: 'BUY_TICKETS', + buy_via_message: 'BUY_VIA_MESSAGE', call: 'CALL', call_me: 'CALL_ME', call_now: 'CALL_NOW', + chat_with_us: 'CHAT_WITH_US', confirm: 'CONFIRM', contact: 'CONTACT', contact_us: 'CONTACT_US', @@ -48,6 +53,7 @@ export default class AdCreativeLinkDataCallToAction extends AbstractCrudObject { follow_news_storyline: 'FOLLOW_NEWS_STORYLINE', follow_page: 'FOLLOW_PAGE', follow_user: 'FOLLOW_USER', + get_a_quote: 'GET_A_QUOTE', get_directions: 'GET_DIRECTIONS', get_offer: 'GET_OFFER', get_offer_view: 'GET_OFFER_VIEW', @@ -63,6 +69,7 @@ export default class AdCreativeLinkDataCallToAction extends AbstractCrudObject { like_page: 'LIKE_PAGE', listen_music: 'LISTEN_MUSIC', listen_now: 'LISTEN_NOW', + make_an_appointment: 'MAKE_AN_APPOINTMENT', message_page: 'MESSAGE_PAGE', mobile_download: 'MOBILE_DOWNLOAD', no_button: 'NO_BUTTON', diff --git a/src/objects/ad-creative-link-data.js b/src/objects/ad-creative-link-data.js index 0ff01df8..252f4350 100644 --- a/src/objects/ad-creative-link-data.js +++ b/src/objects/ad-creative-link-data.js @@ -61,6 +61,7 @@ export default class AdCreativeLinkData extends AbstractCrudObject { carousel_images_multi_items: 'carousel_images_multi_items', carousel_images_single_item: 'carousel_images_single_item', carousel_slideshows: 'carousel_slideshows', + collection_video: 'collection_video', single_image: 'single_image', }); } diff --git a/src/objects/ad-creative-sourcing-spec.js b/src/objects/ad-creative-sourcing-spec.js index 6d85e68f..de39a983 100644 --- a/src/objects/ad-creative-sourcing-spec.js +++ b/src/objects/ad-creative-sourcing-spec.js @@ -21,6 +21,7 @@ export default class AdCreativeSourcingSpec extends AbstractCrudObject { associated_product_set_id: 'associated_product_set_id', promotion_metadata_spec: 'promotion_metadata_spec', site_links_spec: 'site_links_spec', + source_url: 'source_url', }); } diff --git a/src/objects/ad-creative.js b/src/objects/ad-creative.js index 9affd373..601d2e71 100644 --- a/src/objects/ad-creative.js +++ b/src/objects/ad-creative.js @@ -95,15 +95,20 @@ export default class AdCreative extends AbstractCrudObject { return Object.freeze({ add_to_cart: 'ADD_TO_CART', apply_now: 'APPLY_NOW', + ask_about_services: 'ASK_ABOUT_SERVICES', + ask_for_more_info: 'ASK_FOR_MORE_INFO', audio_call: 'AUDIO_CALL', + book_a_consultation: 'BOOK_A_CONSULTATION', book_now: 'BOOK_NOW', book_travel: 'BOOK_TRAVEL', buy: 'BUY', buy_now: 'BUY_NOW', buy_tickets: 'BUY_TICKETS', + buy_via_message: 'BUY_VIA_MESSAGE', call: 'CALL', call_me: 'CALL_ME', call_now: 'CALL_NOW', + chat_with_us: 'CHAT_WITH_US', confirm: 'CONFIRM', contact: 'CONTACT', contact_us: 'CONTACT_US', @@ -116,6 +121,7 @@ export default class AdCreative extends AbstractCrudObject { follow_news_storyline: 'FOLLOW_NEWS_STORYLINE', follow_page: 'FOLLOW_PAGE', follow_user: 'FOLLOW_USER', + get_a_quote: 'GET_A_QUOTE', get_directions: 'GET_DIRECTIONS', get_offer: 'GET_OFFER', get_offer_view: 'GET_OFFER_VIEW', @@ -131,6 +137,7 @@ export default class AdCreative extends AbstractCrudObject { like_page: 'LIKE_PAGE', listen_music: 'LISTEN_MUSIC', listen_now: 'LISTEN_NOW', + make_an_appointment: 'MAKE_AN_APPOINTMENT', message_page: 'MESSAGE_PAGE', mobile_download: 'MOBILE_DOWNLOAD', no_button: 'NO_BUTTON', diff --git a/src/objects/ad-preview.js b/src/objects/ad-preview.js index a41528c2..b5ecf7ab 100644 --- a/src/objects/ad-preview.js +++ b/src/objects/ad-preview.js @@ -60,9 +60,11 @@ export default class AdPreview extends AbstractCrudObject { instant_article_recirculation_ad: 'INSTANT_ARTICLE_RECIRCULATION_AD', instant_article_standard: 'INSTANT_ARTICLE_STANDARD', instream_banner_desktop: 'INSTREAM_BANNER_DESKTOP', + instream_banner_fullscreen_mobile: 'INSTREAM_BANNER_FULLSCREEN_MOBILE', instream_banner_immersive_mobile: 'INSTREAM_BANNER_IMMERSIVE_MOBILE', instream_banner_mobile: 'INSTREAM_BANNER_MOBILE', instream_video_desktop: 'INSTREAM_VIDEO_DESKTOP', + instream_video_fullscreen_mobile: 'INSTREAM_VIDEO_FULLSCREEN_MOBILE', instream_video_image: 'INSTREAM_VIDEO_IMAGE', instream_video_immersive_mobile: 'INSTREAM_VIDEO_IMMERSIVE_MOBILE', instream_video_mobile: 'INSTREAM_VIDEO_MOBILE', @@ -80,6 +82,7 @@ export default class AdPreview extends AbstractCrudObject { mobile_native: 'MOBILE_NATIVE', right_column_standard: 'RIGHT_COLUMN_STANDARD', suggested_video_desktop: 'SUGGESTED_VIDEO_DESKTOP', + suggested_video_fullscreen_mobile: 'SUGGESTED_VIDEO_FULLSCREEN_MOBILE', suggested_video_immersive_mobile: 'SUGGESTED_VIDEO_IMMERSIVE_MOBILE', suggested_video_mobile: 'SUGGESTED_VIDEO_MOBILE', watch_feed_home: 'WATCH_FEED_HOME', diff --git a/src/objects/ad-set.js b/src/objects/ad-set.js index 8df5fe87..ff34108f 100644 --- a/src/objects/ad-set.js +++ b/src/objects/ad-set.js @@ -79,6 +79,7 @@ export default class AdSet extends AbstractCrudObject { promoted_object: 'promoted_object', recommendations: 'recommendations', recurring_budget_semantics: 'recurring_budget_semantics', + regional_regulation_identities: 'regional_regulation_identities', review_feedback: 'review_feedback', rf_prediction_id: 'rf_prediction_id', source_adset: 'source_adset', diff --git a/src/objects/ads-pixel.js b/src/objects/ads-pixel.js index 8e719652..adf32f7f 100644 --- a/src/objects/ads-pixel.js +++ b/src/objects/ads-pixel.js @@ -255,16 +255,6 @@ export default class AdsPixel extends AbstractCrudObject { ); } - createTelemetry (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { - return this.createEdge( - '/telemetry', - fields, - params, - null, - pathOverride, - ); - } - get (fields: Array, params: Object = {}): AdsPixel { // $FlowFixMe : Support Generic Types diff --git a/src/objects/application.js b/src/objects/application.js index 0afc4b77..974530be 100644 --- a/src/objects/application.js +++ b/src/objects/application.js @@ -18,7 +18,6 @@ import Business from './business'; import Group from './group'; import AdAccount from './ad-account'; import DACheck from './da-check'; -import Event from './event'; import NullNode from './null-node'; /** @@ -505,16 +504,6 @@ export default class Application extends AbstractCrudObject { ); } - getEvents (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { - return this.getEdge( - Event, - fields, - params, - fetchFirstPage, - '/events' - ); - } - getIapPurchases (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { return this.getEdge( AbstractObject, diff --git a/src/objects/commerce-merchant-settings.js b/src/objects/commerce-merchant-settings.js index 25ebb8fa..b0e4dd35 100644 --- a/src/objects/commerce-merchant-settings.js +++ b/src/objects/commerce-merchant-settings.js @@ -51,7 +51,6 @@ export default class CommerceMerchantSettings extends AbstractCrudObject { supported_card_types: 'supported_card_types', terms: 'terms', terms_url_by_locale: 'terms_url_by_locale', - whatsapp_channel: 'whatsapp_channel', }); } @@ -136,16 +135,6 @@ export default class CommerceMerchantSettings extends AbstractCrudObject { ); } - getSellerIssues (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { - return this.getEdge( - AbstractObject, - fields, - params, - fetchFirstPage, - '/seller_issues' - ); - } - getSetupStatus (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { return this.getEdge( CommerceMerchantSettingsSetupStatus, @@ -196,16 +185,6 @@ export default class CommerceMerchantSettings extends AbstractCrudObject { ); } - createWhatsappChannel (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { - return this.createEdge( - '/whatsapp_channel', - fields, - params, - null, - pathOverride, - ); - } - get (fields: Array, params: Object = {}): CommerceMerchantSettings { // $FlowFixMe : Support Generic Types diff --git a/src/objects/commerce-order.js b/src/objects/commerce-order.js index 3f8c2455..3c02aae8 100644 --- a/src/objects/commerce-order.js +++ b/src/objects/commerce-order.js @@ -100,9 +100,9 @@ export default class CommerceOrder extends AbstractCrudObject { ); } - createFulfillOrder (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { + createItemUpdate (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { return this.createEdge( - '/fulfill_order', + '/item_updates', fields, params, CommerceOrder, @@ -220,6 +220,16 @@ 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.js b/src/objects/custom-audience.js index 76592e68..a2738f8f 100644 --- a/src/objects/custom-audience.js +++ b/src/objects/custom-audience.js @@ -84,6 +84,7 @@ export default class CustomAudience extends AbstractCrudObject { automotive_model: 'AUTOMOTIVE_MODEL', destination: 'DESTINATION', flight: 'FLIGHT', + generic: 'GENERIC', home_listing: 'HOME_LISTING', hotel: 'HOTEL', job: 'JOB', @@ -111,6 +112,7 @@ export default class CustomAudience extends AbstractCrudObject { claim: 'CLAIM', custom: 'CUSTOM', engagement: 'ENGAGEMENT', + exclusion: 'EXCLUSION', fox: 'FOX', lookalike: 'LOOKALIKE', managed: 'MANAGED', diff --git a/src/objects/destination.js b/src/objects/destination.js index ba1ff3ed..a1eb0463 100644 --- a/src/objects/destination.js +++ b/src/objects/destination.js @@ -35,6 +35,7 @@ export default class Destination extends AbstractCrudObject { price: 'price', price_change: 'price_change', sanitized_images: 'sanitized_images', + tags: 'tags', types: 'types', unit_price: 'unit_price', url: 'url', diff --git a/src/objects/flight.js b/src/objects/flight.js index d0c2f693..bc7076e5 100644 --- a/src/objects/flight.js +++ b/src/objects/flight.js @@ -38,6 +38,7 @@ export default class Flight extends AbstractCrudObject { origin_city: 'origin_city', price: 'price', sanitized_images: 'sanitized_images', + tags: 'tags', unit_price: 'unit_price', url: 'url', visibility: 'visibility', diff --git a/src/objects/hotel.js b/src/objects/hotel.js index e40a4815..39e59fc9 100644 --- a/src/objects/hotel.js +++ b/src/objects/hotel.js @@ -43,6 +43,7 @@ export default class Hotel extends AbstractCrudObject { sale_price: 'sale_price', sanitized_images: 'sanitized_images', star_rating: 'star_rating', + tags: 'tags', unit_price: 'unit_price', url: 'url', visibility: 'visibility', diff --git a/src/objects/ig-upcoming-event.js b/src/objects/ig-upcoming-event.js new file mode 100644 index 00000000..83267d6c --- /dev/null +++ b/src/objects/ig-upcoming-event.js @@ -0,0 +1,45 @@ + /* + * 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'; + +/** + * IGUpcomingEvent + * @extends AbstractCrudObject + * @see {@link https://developers.facebook.com/docs/marketing-api/} + */ +export default class IGUpcomingEvent extends AbstractCrudObject { + static get Fields (): Object { + return Object.freeze({ + end_time: 'end_time', + id: 'id', + start_time: 'start_time', + title: 'title', + }); + } + + + + get (fields: Array, params: Object = {}): IGUpcomingEvent { + // $FlowFixMe : Support Generic Types + return this.read( + fields, + params + ); + } + + // $FlowFixMe : Support Generic Types + update (fields: Array, params: Object = {}): IGUpcomingEvent { + // $FlowFixMe : Support Generic Types + return super.update( + params + ); + } +} diff --git a/src/objects/instagram-user.js b/src/objects/instagram-user.js index 5b75c083..400f584b 100644 --- a/src/objects/instagram-user.js +++ b/src/objects/instagram-user.js @@ -13,6 +13,7 @@ import AbstractObject from './../abstract-object'; import Cursor from './../cursor'; import Business from './business'; import AdAccount from './ad-account'; +import IGUpcomingEvent from './ig-upcoming-event'; /** * InstagramUser @@ -79,7 +80,7 @@ export default class InstagramUser extends AbstractCrudObject { getUpcomingEvents (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { return this.getEdge( - AbstractObject, + IGUpcomingEvent, fields, params, fetchFirstPage, @@ -87,6 +88,16 @@ export default class InstagramUser extends AbstractCrudObject { ); } + createUpcomingEvent (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { + return this.createEdge( + '/upcoming_events', + fields, + params, + IGUpcomingEvent, + pathOverride, + ); + } + get (fields: Array, params: Object = {}): InstagramUser { // $FlowFixMe : Support Generic Types diff --git a/src/objects/local-service-business.js b/src/objects/local-service-business.js index 932c502b..7286dbb8 100644 --- a/src/objects/local-service-business.js +++ b/src/objects/local-service-business.js @@ -54,6 +54,7 @@ export default class LocalServiceBusiness extends AbstractCrudObject { retailer_category: 'retailer_category', sanitized_images: 'sanitized_images', size: 'size', + tags: 'tags', title: 'title', unit_price: 'unit_price', url: 'url', diff --git a/src/objects/page-commerce-eligibility.js b/src/objects/page-commerce-eligibility.js deleted file mode 100644 index e854c7fc..00000000 --- a/src/objects/page-commerce-eligibility.js +++ /dev/null @@ -1,26 +0,0 @@ - /* - * 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'; - -/** - * PageCommerceEligibility - * @extends AbstractCrudObject - * @see {@link https://developers.facebook.com/docs/marketing-api/} - */ -export default class PageCommerceEligibility extends AbstractCrudObject { - static get Fields (): Object { - return Object.freeze({ - offsite: 'offsite', - onsite: 'onsite', - }); - } - -} diff --git a/src/objects/page.js b/src/objects/page.js index 63ede413..8807e0a9 100644 --- a/src/objects/page.js +++ b/src/objects/page.js @@ -21,7 +21,6 @@ import PageCallToAction from './page-call-to-action'; import CanvasBodyElement from './canvas-body-element'; import Canvas from './canvas'; import ChatPlugin from './chat-plugin'; -import PageCommerceEligibility from './page-commerce-eligibility'; import CommerceMerchantSettings from './commerce-merchant-settings'; import CommerceOrder from './commerce-order'; import CommercePayout from './commerce-payout'; @@ -138,6 +137,7 @@ export default class Page extends AbstractCrudObject { is_community_page: 'is_community_page', is_eligible_for_branded_content: 'is_eligible_for_branded_content', is_eligible_for_disable_connect_ig_btn_for_non_page_admin_am_web: 'is_eligible_for_disable_connect_ig_btn_for_non_page_admin_am_web', + is_eligible_for_live_boosting_expansion: 'is_eligible_for_live_boosting_expansion', is_messenger_bot_get_started_enabled: 'is_messenger_bot_get_started_enabled', is_messenger_platform_bot: 'is_messenger_platform_bot', is_owned: 'is_owned', @@ -610,6 +610,7 @@ export default class Page extends AbstractCrudObject { publisher_subscriptions: 'publisher_subscriptions', ratings: 'ratings', registration: 'registration', + response_feedback: 'response_feedback', send_cart: 'send_cart', standby: 'standby', user_action: 'user_action', @@ -860,16 +861,6 @@ export default class Page extends AbstractCrudObject { ); } - getCommerceEligibility (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { - return this.getEdge( - PageCommerceEligibility, - fields, - params, - fetchFirstPage, - '/commerce_eligibility' - ); - } - getCommerceMerchantSettings (fields: Array, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { return this.getEdge( CommerceMerchantSettings, diff --git a/src/objects/product-catalog.js b/src/objects/product-catalog.js index 8e39aae3..68946e37 100644 --- a/src/objects/product-catalog.js +++ b/src/objects/product-catalog.js @@ -600,6 +600,16 @@ export default class ProductCatalog extends AbstractCrudObject { ); } + createVersionItemsBatch (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { + return this.createEdge( + '/version_items_batch', + fields, + params, + ProductCatalog, + pathOverride, + ); + } + // $FlowFixMe : Support Generic Types delete (fields: Array, params: Object = {}): AbstractObject { // $FlowFixMe : Support Generic Types diff --git a/src/objects/product-item.js b/src/objects/product-item.js index 8c7691d9..50e1ef85 100644 --- a/src/objects/product-item.js +++ b/src/objects/product-item.js @@ -426,6 +426,7 @@ export default class ProductItem extends AbstractCrudObject { empty_title: 'EMPTY_TITLE', external_merchant_id_mismatch: 'EXTERNAL_MERCHANT_ID_MISMATCH', generic_invalid_field: 'GENERIC_INVALID_FIELD', + groups_disabled_by_user: 'GROUPS_DISABLED_BY_USER', hidden_until_product_launch: 'HIDDEN_UNTIL_PRODUCT_LAUNCH', image_fetch_failed: 'IMAGE_FETCH_FAILED', image_fetch_failed_bad_gateway: 'IMAGE_FETCH_FAILED_BAD_GATEWAY', diff --git a/src/objects/targeting-geo-location-location-expansion.js b/src/objects/targeting-geo-location-location-expansion.js deleted file mode 100644 index 59006c80..00000000 --- a/src/objects/targeting-geo-location-location-expansion.js +++ /dev/null @@ -1,25 +0,0 @@ - /* - * 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'; - -/** - * TargetingGeoLocationLocationExpansion - * @extends AbstractCrudObject - * @see {@link https://developers.facebook.com/docs/marketing-api/} - */ -export default class TargetingGeoLocationLocationExpansion extends AbstractCrudObject { - static get Fields (): Object { - return Object.freeze({ - allowed: 'allowed', - }); - } - -} diff --git a/src/objects/targeting-geo-location.js b/src/objects/targeting-geo-location.js index 363da015..90f7bc80 100644 --- a/src/objects/targeting-geo-location.js +++ b/src/objects/targeting-geo-location.js @@ -26,7 +26,6 @@ export default class TargetingGeoLocation extends AbstractCrudObject { geo_markets: 'geo_markets', large_geo_areas: 'large_geo_areas', location_cluster_ids: 'location_cluster_ids', - location_expansion: 'location_expansion', location_types: 'location_types', medium_geo_areas: 'medium_geo_areas', metro_areas: 'metro_areas', diff --git a/src/objects/whats-app-business-account.js b/src/objects/whats-app-business-account.js index df7ee2a1..60ff3f91 100644 --- a/src/objects/whats-app-business-account.js +++ b/src/objects/whats-app-business-account.js @@ -67,7 +67,6 @@ export default class WhatsAppBusinessAccount extends AbstractCrudObject { } static get SubCategory (): Object { return Object.freeze({ - custom: 'CUSTOM', order_details: 'ORDER_DETAILS', order_status: 'ORDER_STATUS', }); @@ -264,6 +263,16 @@ export default class WhatsAppBusinessAccount extends AbstractCrudObject { ); } + createSetOboMobilityIntent (fields: Array, params: Object = {}, pathOverride?: ?string = null): Promise { + return this.createEdge( + '/set_obo_mobility_intent', + fields, + params, + null, + pathOverride, + ); + } + deleteSubscribedApps (params: Object = {}): Promise<*> { return super.deleteEdge( '/subscribed_apps', 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 2b5fd5ac..dc1222fd 100644 --- a/src/objects/whats-app-business-partner-client-verification-submission.js +++ b/src/objects/whats-app-business-partner-client-verification-submission.js @@ -28,4 +28,19 @@ export default class WhatsAppBusinessPartnerClientVerificationSubmission extends }); } + static get RejectionReasons (): Object { + return Object.freeze({ + address_not_matching: 'ADDRESS_NOT_MATCHING', + legal_name_not_matching: 'LEGAL_NAME_NOT_MATCHING', + none: 'NONE', + website_not_matching: 'WEBSITE_NOT_MATCHING', + }); + } + static get VerificationStatus (): Object { + return Object.freeze({ + approved: 'APPROVED', + failed: 'FAILED', + pending: 'PENDING', + }); + } }