
    PIi}                     6    d dl mZ d dlmZ 	  G d dee      Zy)    )AbstractObject)AdsInsightsMixinc                       e Zd ZdԈ fd	Z G d dej
                        Z G d d      Z G d d      Z G d d	      Z G d
 d      Z	 G d d      Z
 G d d      Z G d d      Zed        Zi ddddddddddddddddddddddd dd!dd"dd#dd$dd%di d&dd'dd(dd)dd*dd+dd,dd-dd.dd/dd0dd1dd2dd3dd4dd5dd6di d7dd8dd9dd:dd;dd<dd=dd>dd?dd@ddAddBddCddDddEddFddGdi dHddIddJddKddLddMddNddOddPddQddRddSddTddUddVddWdXdYdi dZdd[dXd\dd]dd^dd_dd`ddaddbddcdddddeddfddgddhddiddjdi dkdXdlddmddnddoddpddqddrddsddtdduddvddwddxddyddzdd{di d|dd}dd~dddddddddddddXddddddddddddddddi ddddddddddddddddddddddddddddddddddXi ddXddddddddddddddddddddddddddddddXddi ddXddddddddddddddddddddddddddddddddi ddddddddddddddddddddddddddddΓddΓddΓddΓdddddddҜZedӄ        Z xZS )AdsInsightsc                 F    t         t        |           d| _        || _        y )NT)superr   __init___isAdsInsights_api)selfapi	__class__s     u/var/www/webhook.estador.de/web/meta/bot/venv/lib/python3.12/site-packages/facebook_business/adobjects/adsinsights.pyr	   zAdsInsights.__init__   s    k4)+"	    c                      e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1d0Z2d1Z3d2Z4d3Z5d4Z6d5Z7d6Z8d7Z9d8Z:d9Z;d:Z<d;Z=d<Z>d=Z?d>Z@d?ZAd@ZBdAZCdBZDdCZEdDZFdEZGdFZHdGZIdHZJdIZKdJZLdKZMdLZNdMZOdNZPdOZQdPZRdQZSdRZTdSZUdTZVdUZWdVZXdWZYdXZZdYZ[dZZ\d[Z]d\Z^d]Z_d^Z`d_Zad`ZbdaZcdbZddcZeddZfdeZgdfZhdgZidhZjdiZkdjZldkZmdlZndmZodnZpdoZqdpZrdqZsdrZtdsZudtZvduZwdvZxdwZydxZzdyZ{dzZ|d{Z}d|Z~d}Zd~ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZy)AdsInsights.Fieldaccount_currency
account_idaccount_nameaction_valuesactionsad_click_actionsad_idad_impression_actionsad_name	adset_endadset_id
adset_nameadset_startage_targeting#anchor_events_performance_indicatorattribution_settingauction_bidauction_competitivenessauction_max_competitor_bid"average_purchases_conversion_valuebuying_typecampaign_idcampaign_namecanvas_avg_view_percentcanvas_avg_view_timecatalog_segment_actionscatalog_segment_value*catalog_segment_value_mobile_purchase_roas(catalog_segment_value_omni_purchase_roas+catalog_segment_value_website_purchase_roasclicksconversion_lead_rateconversion_leadsconversion_rate_rankingconversion_valuesconversions5converted_product_app_custom_event_fb_mobile_purchase;converted_product_app_custom_event_fb_mobile_purchase_value"converted_product_offline_purchase(converted_product_offline_purchase_valueconverted_product_omni_purchase&converted_product_omni_purchase_valuesconverted_product_quantityconverted_product_value(converted_product_website_pixel_purchase.converted_product_website_pixel_purchase_value>converted_promoted_product_app_custom_event_fb_mobile_purchaseDconverted_promoted_product_app_custom_event_fb_mobile_purchase_value+converted_promoted_product_offline_purchase1converted_promoted_product_offline_purchase_value(converted_promoted_product_omni_purchase/converted_promoted_product_omni_purchase_values#converted_promoted_product_quantity converted_promoted_product_value1converted_promoted_product_website_pixel_purchase7converted_promoted_product_website_pixel_purchase_valuecost_per_15_sec_video_view$cost_per_2_sec_continuous_video_viewcost_per_action_typecost_per_ad_clickcost_per_conversioncost_per_conversion_leadcost_per_dda_countby_convscost_per_estimated_ad_recallerscost_per_inline_link_clickcost_per_inline_post_engagementcost_per_objective_result#cost_per_one_thousand_ad_impressioncost_per_outbound_clickcost_per_resultcost_per_thruplaycost_per_unique_action_typecost_per_unique_clickcost_per_unique_conversion!cost_per_unique_inline_link_clickcost_per_unique_outbound_clickcpccpmcppcreated_timecreative_media_typectr
date_start	date_stopdda_countby_convsdda_resultsengagement_rate_rankingestimated_ad_recall_rate$estimated_ad_recall_rate_lower_bound$estimated_ad_recall_rate_upper_boundestimated_ad_recallers"estimated_ad_recallers_lower_bound"estimated_ad_recallers_upper_bound	frequencyfull_view_impressionsfull_view_reachgender_targetingimpressionsinline_link_click_ctrinline_link_clicksinline_post_engagement&instagram_upcoming_event_reminders_set!instant_experience_clicks_to_open"instant_experience_clicks_to_start"instant_experience_outbound_clicksinteractive_component_taplabels(landing_page_view_actions_per_link_click landing_page_view_per_link_click#landing_page_view_per_purchase_ratelink_clicks_per_resultslocation'marketing_messages_click_rate_benchmark%marketing_messages_cost_per_delivered*marketing_messages_cost_per_link_btn_clickmarketing_messages_delivered marketing_messages_delivery_rate!marketing_messages_link_btn_click&marketing_messages_link_btn_click_rate"marketing_messages_media_view_rate,marketing_messages_phone_call_btn_click_rate(marketing_messages_quick_reply_btn_click-marketing_messages_quick_reply_btn_click_ratemarketing_messages_readmarketing_messages_read_rate&marketing_messages_read_rate_benchmarkmarketing_messages_sentmarketing_messages_spend!marketing_messages_spend_currency&marketing_messages_website_add_to_cart,marketing_messages_website_initiate_checkout#marketing_messages_website_purchase*marketing_messages_website_purchase_valuesmobile_app_purchase_roas	objectiveobjective_result_rateobjective_results5onsite_conversion_messaging_detected_purchase_dedupedoptimization_goaloutbound_clicksoutbound_clicks_ctrplace_page_nameproduct_group_retailer_idproduct_retailer_idproduct_viewspurchase_per_landing_page_viewpurchase_roaspurchases_per_link_click'qualifying_question_qualify_answer_ratequality_rankingreachresult_rate#result_values_performance_indicatorresultsshops_assisted_purchasessocial_spendspendtotal_card_viewtotal_postbackstotal_postbacks_detailedtotal_postbacks_detailed_v4unique_actionsunique_clicksunique_conversions
unique_ctrunique_inline_link_click_ctrunique_inline_link_clicksunique_link_clicks_ctrunique_outbound_clicksunique_outbound_clicks_ctr-unique_video_continuous_2_sec_watched_actionsunique_video_view_15_secupdated_timevideo_15_sec_watched_actionsvideo_30_sec_watched_actionsvideo_avg_time_watched_actions&video_continuous_2_sec_watched_actionsvideo_p100_watched_actionsvideo_p25_watched_actionsvideo_p50_watched_actionsvideo_p75_watched_actionsvideo_p95_watched_actionsvideo_play_actionsvideo_play_curve_actions%video_play_retention_0_to_15s_actions&video_play_retention_20_to_60s_actions"video_play_retention_graph_actionsvideo_thruplay_watched_actionsvideo_time_watched_actionsvideo_view_per_impressionwebsite_ctrwebsite_purchase_roaswish_bidN)__name__
__module____qualname__r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r   r   Fieldr      sb   -!
%'- 7	!
#'.S+3#";%A"-Q*##'";5"; 75a23]06c35-";/#@w= GDC-Q*3]0*K'1Y.%A"";3]09i6 JJF PVL6c3<o93]0:k7.S++M(<o9B{?%A"/U,5/3#= %A"*K'%A"*K'$?!.S+";+/&C# 7%A",O))I&%3!
	/#";#= /U,/U,!9-Q*-Q*	 7+-# 71!91Y.,O)-Q*-Q*$?!3]0+M(.S+";2[/0W-5a2'E$+M(,O)1Y.-Q*7e43]08g5";'E$1Y.";#= ,O)1Y.7e4.S+5a2#= 	 7/@w=/+3+$?!3')I&'#= 2[/+#.S+#= %++#= &C#)'1!
'E$$?!!9!9%A"8g5#= %'E$'E$)I&1Y.%A"$?!$?!$?!$?!1#= 0W-1Y.-Q*)I&%A"$?!# 7r   r   c                   X    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZy)$AdsInsights.ActionAttributionWindows1d_click1d_ev1d_view	28d_click28d_view28d_view_all_conversions28d_view_first_conversion7d_click7d_view7d_view_all_conversions7d_view_first_conversionddadefault
skan_clickskan_click_second_postbackskan_click_third_postback	skan_viewskan_view_second_postbackskan_view_third_postbackN)r   r   r   value_1d_clickvalue_1d_evvalue_1d_viewvalue_28d_clickvalue_28d_viewvalue_28d_view_all_conversionsvalue_28d_view_first_conversionvalue_7d_clickvalue_7d_viewvalue_7d_view_all_conversionsvalue_7d_view_first_conversionr   value_defaultr   r   r   r   r   r   r   r   r   ActionAttributionWindowsr      si    #!%#)C&*E'#!(A%)C&!!
%A"$?!	$?!#= r   r   c                   H    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZy)AdsInsights.ActionBreakdownsaction_canvas_component_nameaction_carousel_card_idaction_carousel_card_nameaction_destinationaction_deviceaction_reactionaction_target_idaction_typeaction_video_soundaction_video_typeconversion_destinationmatched_persona_idmatched_persona_namesignal_source_bucketstandard_event_content_typeNr   r   r   r   r   r   r   r  r  r  r  r  r  r  r  r	  r
  r  r   r   r   ActionBreakdownsr      Y    'E$";$?!1'+-#1/!9155&C#r   r  c                       e Zd ZdZdZdZdZy)AdsInsights.ActionReportTime
conversion
impressionlifetimemixedN)r   r   r   r  r  r  r  r   r   r   ActionReportTimer    s    !
!
r   r  c                   T   e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1d0Z2d1Z3d2Z4d3Z5d4Z6d5Z7d6Z8d7Z9d8Z:d9Z;d:Z<d;Z=d<Z>d=Z?d>Z@d?ZAd@ZBdAZCdBZDdCZEdDZFdEZGdFZHdGZIdHZJdIZKdJZLdKZMdLZNdMZOdNZPdOZQdPZRdQZSdRZTyS)TAdsInsights.Breakdownsad_extension_domainad_extension_urlad_format_assetageapp_id
body_assetbreakdown_ad_objectivebreakdown_reporting_ad_idcall_to_action_assetcoarse_conversion_valuecomscore_marketr  countrycreative_automation_asset_idcreative_relaxation_asset_type crm_advertiser_l12_territory_idscrm_advertiser_subvertical_idcrm_advertiser_vertical_idcrm_ult_advertiser_iddescription_assetdevice_platformdmafidelity_typeflexible_format_asset_typefrequency_valuegen_ai_asset_typegender/hourly_stats_aggregated_by_advertiser_time_zone-hourly_stats_aggregated_by_audience_time_zonehsidimage_assetimpression_device'impression_view_time_advertiser_hour_v2is_auto_advanceis_conversion_id_modeledis_rendered_as_delayed_skip_adlanding_destinationlink_url_assetmarketing_messages_btn_namemdsa_landing_destinationmedia_asset_urlmedia_creatormedia_destination_urlmedia_formatmedia_origin_urlmedia_text_content
media_typemmmplace_page_idplatform_positionpostback_sequence_indexproduct_brand_breakdownproduct_category_breakdown product_custom_label_0_breakdown product_custom_label_1_breakdown product_custom_label_2_breakdown product_custom_label_3_breakdown product_custom_label_4_breakdown"product_group_content_id_breakdownproduct_group_id
product_idproduct_set_id_breakdownpublisher_platform
redownloadregionrta_ugc_topicrule_set_idrule_set_namer
  skan_campaign_idskan_conversion_idskan_versionsot_attribution_model_typesot_attribution_windowsot_channelsot_event_type
sot_sourcer  title_assetuser_persona_iduser_persona_namevideo_assetN)Ur   r   r   r  r  r  r  r  r  r  r  r   r!  r"  r  r#  r$  r%  r&  r'  r(  r)  r*  r+  r,  r-  r.  r/  r0  r1  r2  r3  r4  r5  r6  r7  r8  r9  r:  r;  r<  r=  r>  r?  r@  rA  rB  rC  rD  rE  rF  rG  rH  rI  rJ  rK  rL  rM  rN  rO  rP  rQ  rR  rS  rT  rU  rV  rW  rX  rY  rZ  r
  r[  r\  r]  r^  r_  r`  ra  rb  r  rc  rd  re  rf  r   r   r   
Breakdownsr    s   3-+!
!9$?!5";+!9'E$)I&+M((G%%A" 7/+'%A"+/:k78g5#/2[/+#= )I&3)&C##= +' 7%-1!
'/";";%A"+M(+M(+M(+M(+M(-Q*-!
#= 1!
'#'5-1%%A"!9#)!
&C##+/#r   rg  c                   \    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZdZy)AdsInsights.DatePresetdata_maximumlast_14dlast_28dlast_30dlast_3dlast_7dlast_90d
last_monthlast_quarterlast_week_mon_sunlast_week_sun_sat	last_yearmaximum
this_monththis_quarterthis_week_mon_todaythis_week_sun_today	this_yeartoday	yesterdayN)r   r   r   rj  rk  rl  rm  rn  ro  rp  rq  rr  rs  rt  ru  rv  rw  rx  ry  rz  r{  r|  r}  r   r   r   
DatePresetri  _  sj    %!
%//	!
%33		r   r~  c                       e Zd ZdZdZdZdZy)AdsInsights.LevelaccountadadsetcampaignN)r   r   r   r  r  r  r  r   r   r   Levelr  u  s    r   r  c                   H    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZy)#AdsInsights.SummaryActionBreakdownsr   r   r   r   r  r  r  r  r  r  r  r  r	  r
  r  Nr  r   r   r   SummaryActionBreakdownsr  {  r  r   r  c                      y)Ninsightsr   )clss    r   get_endpointzAdsInsights.get_endpoint  s    r   r   stringr   r   r   zlist<AdsActionStats>r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   zlist<Object>rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   zlist<AdsHistogramStats>r   r   r   )r   r   r   r   r   r   c                 d   i }t         j                  j                  j                         |d<   t         j                  j                  j                         |d<   t         j
                  j                  j                         |d<   t         j                  j                  j                         |d<   t         j                  j                  j                         |d<   t         j                  j                  j                         |d<   t         j                  j                  j                         |d<   |S )Nr   r  r  rg  r~  r  r  )
r   r   __dict__valuesr  r  rg  r~  r  r  )r  field_enum_infos     r   _get_field_enum_infoz AdsInsights._get_field_enum_infoT  s    6A6Z6Z6c6c6j6j6l23.9.J.J.S.S.Z.Z.\*+.9.J.J.S.S.Z.Z.\*+(3(>(>(G(G(N(N(P%(3(>(>(G(G(N(N(P%#.#4#4#=#=#D#D#F 5@5X5X5a5a5h5h5j12r   )N)r   r   r   r	   r   r   r   r  r  rg  r~  r  r  classmethodr  _field_typesr  __classcell__)r   s   @r   r   r      s   

A$$ AF> >*D D" R$ R$h   , D D$  BHBhB 	B 	/	B
 	)B 	2B 	B 	 !7B 	8B 	XB 	HB 	hB 	xB 	B 	.xB  	x!B" 	x#B$ 	"8%B& 	%h'B( 	-.D)B* 	x+B, 	x-B. 	/B0 	"81B2 	3B4 	"#95B6 	 !77B8 	56L9B: 	34J;B< 	67M=B> 	(?B@ 	 6ABB 	2CBD 	"8EBF 	3GBH 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