Skip to content

Commit

Permalink
Auto-generated nodejs SDK code update
Browse files Browse the repository at this point in the history
Summary: ignore-conflict-markers

Reviewed By: stcheng

Differential Revision: D56033437

fbshipit-source-id: 31e26dedadc1cce02c98f3f01a9390e8935d5431
  • Loading branch information
generatedunixname89002005295453 authored and facebook-github-bot committed Apr 15, 2024
1 parent 28624de commit 9ada43b
Show file tree
Hide file tree
Showing 43 changed files with 203 additions and 129 deletions.
4 changes: 2 additions & 2 deletions examples/ad_account_ad_sets_post_ad_set_create_cpa.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ params = {
'name' : 'A CPA Ad Set',
'campaign_id' : '<adCampaignLinkClicksID>',
'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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ params = {
'name' : 'A CPA Ad Set optimized for App Events',
'campaign_id' : '<adCampaignAppInstallsID>',
'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',
Expand Down
4 changes: 2 additions & 2 deletions examples/ad_account_ad_sets_post_create_ad_set.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' : '<adCampaignLinkClicksID>',
'bid_amount' : '500',
'billing_event' : 'IMPRESSIONS',
Expand Down
4 changes: 2 additions & 2 deletions examples/ad_account_ad_sets_post_daily_budget20.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' : '<adCampaignLinkClicksID>',
'bid_amount' : '100',
'billing_event' : 'LINK_CLICKS',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' : '<adCampaignLinkClicksID>',
'bid_amount' : '100',
'billing_event' : 'LINK_CLICKS',
Expand Down
4 changes: 2 additions & 2 deletions examples/ad_account_ad_sets_post_optimize_post_engagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' : '<adCampaignLinkClicksID>',
'bid_amount' : '500',
'billing_event' : 'IMPRESSIONS',
Expand Down
2 changes: 1 addition & 1 deletion examples/adgroup_leads_edge_adgroup_leads_filtered.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/ads_pixel_events_post.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 1 addition & 2 deletions src/bundle.es6
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down
3 changes: 1 addition & 2 deletions src/globals.es6
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down
5 changes: 5 additions & 0 deletions src/objects/ad-account-ad-volume.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions src/objects/ad-account-targeting-unified.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
33 changes: 33 additions & 0 deletions src/objects/ad-account.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -256,6 +258,7 @@ export default class AdAccount extends AbstractCrudObject {
claim: 'CLAIM',
custom: 'CUSTOM',
engagement: 'ENGAGEMENT',
exclusion: 'EXCLUSION',
fox: 'FOX',
lookalike: 'LOOKALIKE',
managed: 'MANAGED',
Expand Down Expand Up @@ -755,6 +758,16 @@ export default class AdAccount extends AbstractCrudObject {
);
}

getAudienceFunnel (fields: Array<string>, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> {
return this.getEdge(
AbstractObject,
fields,
params,
fetchFirstPage,
'/audience_funnel'
);
}

createBlockListDraft (fields: Array<string>, params: Object = {}, pathOverride?: ?string = null): Promise<AdAccount> {
return this.createEdge(
'/block_list_drafts',
Expand Down Expand Up @@ -852,6 +865,16 @@ export default class AdAccount extends AbstractCrudObject {
);
}

getCpaGuidance (fields: Array<string>, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> {
return this.getEdge(
AbstractObject,
fields,
params,
fetchFirstPage,
'/cpa_guidance'
);
}

getCustomAudiences (fields: Array<string>, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> {
return this.getEdge(
CustomAudience,
Expand Down Expand Up @@ -1256,6 +1279,16 @@ export default class AdAccount extends AbstractCrudObject {
);
}

getValueAdjustmentRuleCollections (fields: Array<string>, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> {
return this.getEdge(
AbstractObject,
fields,
params,
fetchFirstPage,
'/value_adjustment_rule_collections'
);
}

getValueAdjustmentRules (fields: Array<string>, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> {
return this.getEdge(
AbstractObject,
Expand Down
1 change: 1 addition & 0 deletions src/objects/ad-activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
});
}
Expand Down
8 changes: 8 additions & 0 deletions src/objects/ad-asset-feed-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down
4 changes: 4 additions & 0 deletions src/objects/ad-creative-features-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
7 changes: 7 additions & 0 deletions src/objects/ad-creative-link-data-call-to-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down
1 change: 1 addition & 0 deletions src/objects/ad-creative-link-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
});
}
Expand Down
1 change: 1 addition & 0 deletions src/objects/ad-creative-sourcing-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
});
}

Expand Down
Loading

0 comments on commit 9ada43b

Please sign in to comment.