@zernio/node 0.2.765 → 0.2.767
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.d.mts +165 -13
- package/dist/index.d.ts +165 -13
- package/dist/index.js +10 -1
- package/dist/index.mjs +10 -1
- package/package.json +1 -1
- package/src/client.ts +4 -0
- package/src/generated/sdk.gen.ts +22 -4
- package/src/generated/types.gen.ts +163 -9
|
@@ -5770,6 +5770,123 @@ export type MetaInstagramIdentityRef = {
|
|
|
5770
5770
|
profilePictureUrl?: string;
|
|
5771
5771
|
};
|
|
5772
5772
|
|
|
5773
|
+
/**
|
|
5774
|
+
* A Meta Lead Gen form as Graph returns it, in Meta's own snake_case. Read through GET /v1/ads/lead-forms/{formId}. Every setting POST /v1/ads/lead-forms writes is present here, so a form can be diffed against what was created and drift from edits made in Meta's form builder is detectable. A compound field is omitted entirely when the form has no value for it, and `fields` narrows the selection.
|
|
5775
|
+
*
|
|
5776
|
+
*/
|
|
5777
|
+
export type MetaLeadForm = {
|
|
5778
|
+
id?: string;
|
|
5779
|
+
name?: string;
|
|
5780
|
+
/**
|
|
5781
|
+
* One of ACTIVE, ARCHIVED, DELETED or DRAFT.
|
|
5782
|
+
*/
|
|
5783
|
+
status?: string;
|
|
5784
|
+
locale?: string;
|
|
5785
|
+
created_time?: string;
|
|
5786
|
+
/**
|
|
5787
|
+
* Owning Facebook Page. A form on any other Page is a 404, whether read or archived.
|
|
5788
|
+
*/
|
|
5789
|
+
page_id?: string;
|
|
5790
|
+
leads_count?: number;
|
|
5791
|
+
organic_leads_count?: number;
|
|
5792
|
+
/**
|
|
5793
|
+
* Leads Meta has aged out of the retention window.
|
|
5794
|
+
*/
|
|
5795
|
+
expired_leads_count?: number;
|
|
5796
|
+
privacy_policy_url?: string;
|
|
5797
|
+
follow_up_action_url?: string;
|
|
5798
|
+
follow_up_action_text?: string;
|
|
5799
|
+
question_page_custom_headline?: string;
|
|
5800
|
+
is_optimized_for_quality?: boolean;
|
|
5801
|
+
block_display_for_non_targeted_viewer?: boolean;
|
|
5802
|
+
/**
|
|
5803
|
+
* Whether the form can also be submitted from an organic Page post.
|
|
5804
|
+
*/
|
|
5805
|
+
allow_organic_lead?: boolean;
|
|
5806
|
+
/**
|
|
5807
|
+
* Custom key/value pairs attached to every lead of this form.
|
|
5808
|
+
*/
|
|
5809
|
+
tracking_parameters?: Array<{
|
|
5810
|
+
key?: string;
|
|
5811
|
+
value?: string;
|
|
5812
|
+
}>;
|
|
5813
|
+
/**
|
|
5814
|
+
* Privacy policy and custom disclaimer as Meta stores them.
|
|
5815
|
+
*/
|
|
5816
|
+
legal_content?: {
|
|
5817
|
+
id?: string;
|
|
5818
|
+
privacy_policy?: {
|
|
5819
|
+
url?: string;
|
|
5820
|
+
link_text?: string;
|
|
5821
|
+
};
|
|
5822
|
+
/**
|
|
5823
|
+
* Set in Meta form builder only; there is no create parameter for it.
|
|
5824
|
+
*/
|
|
5825
|
+
custom_disclaimer?: {
|
|
5826
|
+
[key: string]: unknown;
|
|
5827
|
+
};
|
|
5828
|
+
};
|
|
5829
|
+
context_card?: {
|
|
5830
|
+
id?: string;
|
|
5831
|
+
title?: string;
|
|
5832
|
+
style?: 'LIST_STYLE' | 'PARAGRAPH_STYLE';
|
|
5833
|
+
content?: Array<(string)>;
|
|
5834
|
+
button_text?: string;
|
|
5835
|
+
cover_photo?: {
|
|
5836
|
+
id?: string;
|
|
5837
|
+
};
|
|
5838
|
+
};
|
|
5839
|
+
/**
|
|
5840
|
+
* The form's single ending page, mirroring the thankYou* create fields. Meta has exactly one per form; there is no multiple-ending-page API (thank_you_pages and ending_pages are not Graph fields).
|
|
5841
|
+
*
|
|
5842
|
+
*/
|
|
5843
|
+
thank_you_page?: {
|
|
5844
|
+
id?: string;
|
|
5845
|
+
title?: string;
|
|
5846
|
+
body?: string;
|
|
5847
|
+
button_text?: string;
|
|
5848
|
+
button_type?: string;
|
|
5849
|
+
website_url?: string;
|
|
5850
|
+
enable_messenger?: boolean;
|
|
5851
|
+
status?: string;
|
|
5852
|
+
lead_gen_use_case?: string;
|
|
5853
|
+
business_phone_number?: string;
|
|
5854
|
+
country_code?: string;
|
|
5855
|
+
};
|
|
5856
|
+
questions?: Array<{
|
|
5857
|
+
id?: string;
|
|
5858
|
+
key?: string;
|
|
5859
|
+
label?: string;
|
|
5860
|
+
/**
|
|
5861
|
+
* EMAIL, PHONE, FULL_NAME, CUSTOM, ...
|
|
5862
|
+
*/
|
|
5863
|
+
type?: string;
|
|
5864
|
+
inline_context?: string;
|
|
5865
|
+
options?: Array<{
|
|
5866
|
+
key?: string;
|
|
5867
|
+
value?: string;
|
|
5868
|
+
}>;
|
|
5869
|
+
/**
|
|
5870
|
+
* READ-ONLY. Conditional logic can only be authored in Meta form builder; Meta has no create parameter for it.
|
|
5871
|
+
*/
|
|
5872
|
+
conditional_questions_group_id?: string;
|
|
5873
|
+
/**
|
|
5874
|
+
* READ-ONLY. Which answers reveal the conditional group.
|
|
5875
|
+
*/
|
|
5876
|
+
conditional_questions_choices?: Array<{
|
|
5877
|
+
[key: string]: unknown;
|
|
5878
|
+
}>;
|
|
5879
|
+
/**
|
|
5880
|
+
* READ-ONLY. Questions revealed by the conditional group.
|
|
5881
|
+
*/
|
|
5882
|
+
dependent_conditional_questions?: Array<{
|
|
5883
|
+
[key: string]: unknown;
|
|
5884
|
+
}>;
|
|
5885
|
+
}>;
|
|
5886
|
+
};
|
|
5887
|
+
|
|
5888
|
+
export type style = 'LIST_STYLE' | 'PARAGRAPH_STYLE';
|
|
5889
|
+
|
|
5773
5890
|
/**
|
|
5774
5891
|
* Not supported. Meta validates creative_sourcing_spec.promotion_metadata_spec on the create call and then discards it, so a Promotion set through the Marketing API never reaches the creative. Any object is rejected with 400 invalid_field_value. Send null or omit the field, and set the Promotion on the ad in Ads Manager. Verified on 2026-09-11 across Graph v19.0 to v25.0 and every write path.
|
|
5775
5892
|
*/
|
|
@@ -10916,7 +11033,7 @@ export type XArticleInlineStyleRange = {
|
|
|
10916
11033
|
style: 'bold' | 'italic' | 'strikethrough';
|
|
10917
11034
|
};
|
|
10918
11035
|
|
|
10919
|
-
export type
|
|
11036
|
+
export type style2 = 'bold' | 'italic' | 'strikethrough';
|
|
10920
11037
|
|
|
10921
11038
|
export type XArticleTextRange = {
|
|
10922
11039
|
/**
|
|
@@ -32771,6 +32888,38 @@ export type GetCampaignBiddingError = (unknown | {
|
|
|
32771
32888
|
error?: string;
|
|
32772
32889
|
} | ErrorResponse);
|
|
32773
32890
|
|
|
32891
|
+
export type GetAdCampaignDetailsData = {
|
|
32892
|
+
path: {
|
|
32893
|
+
/**
|
|
32894
|
+
* Meta campaign id (platformCampaignId).
|
|
32895
|
+
*/
|
|
32896
|
+
campaignId: string;
|
|
32897
|
+
};
|
|
32898
|
+
query: {
|
|
32899
|
+
/**
|
|
32900
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
32901
|
+
*/
|
|
32902
|
+
accountId: string;
|
|
32903
|
+
/**
|
|
32904
|
+
* Comma-separated Graph field override. Supports nested {} projections and Graph field modifiers.
|
|
32905
|
+
*/
|
|
32906
|
+
fields?: string;
|
|
32907
|
+
};
|
|
32908
|
+
};
|
|
32909
|
+
|
|
32910
|
+
export type GetAdCampaignDetailsResponse = ({
|
|
32911
|
+
/**
|
|
32912
|
+
* Raw Meta campaign; keys are the requested Graph fields.
|
|
32913
|
+
*/
|
|
32914
|
+
campaign?: {
|
|
32915
|
+
[key: string]: unknown;
|
|
32916
|
+
};
|
|
32917
|
+
});
|
|
32918
|
+
|
|
32919
|
+
export type GetAdCampaignDetailsError = (ErrorResponse | {
|
|
32920
|
+
error?: string;
|
|
32921
|
+
} | unknown);
|
|
32922
|
+
|
|
32774
32923
|
export type UpdateAdCampaignData = {
|
|
32775
32924
|
body: {
|
|
32776
32925
|
/**
|
|
@@ -38517,7 +38666,7 @@ export type ListLeadsError = (ErrorResponse | {
|
|
|
38517
38666
|
export type ListLeadFormsData = {
|
|
38518
38667
|
query: {
|
|
38519
38668
|
/**
|
|
38520
|
-
* Connected
|
|
38669
|
+
* Connected Meta ads, Facebook or LinkedIn ads account ID. A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
|
|
38521
38670
|
*/
|
|
38522
38671
|
accountId: string;
|
|
38523
38672
|
/**
|
|
@@ -38740,22 +38889,27 @@ export type GetLeadFormData = {
|
|
|
38740
38889
|
};
|
|
38741
38890
|
query: {
|
|
38742
38891
|
/**
|
|
38743
|
-
* Connected facebook or linkedin ads account id (selects the platform).
|
|
38892
|
+
* Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
|
|
38744
38893
|
*/
|
|
38745
38894
|
accountId: string;
|
|
38895
|
+
/**
|
|
38896
|
+
* Meta only. A Graph field selection passed through verbatim to GET /{form-id}, replacing the default projection, so fields Meta adds later are reachable without an API change. Field names, commas and {} expansion only; anything else (Graph field modifiers such as .limit(), or characters that could open another query parameter) is a 400. Ownership of the form is verified before the selection runs, so this cannot reach any Page but the one accountId manages. Unknown field names are rejected by Meta as a 400.
|
|
38897
|
+
*
|
|
38898
|
+
*/
|
|
38899
|
+
fields?: string;
|
|
38746
38900
|
};
|
|
38747
38901
|
};
|
|
38748
38902
|
|
|
38749
38903
|
export type GetLeadFormResponse = ({
|
|
38750
38904
|
status?: string;
|
|
38751
|
-
form?: {
|
|
38752
|
-
|
|
38753
|
-
|
|
38905
|
+
form?: (MetaLeadForm | {
|
|
38906
|
+
[key: string]: unknown;
|
|
38907
|
+
});
|
|
38754
38908
|
});
|
|
38755
38909
|
|
|
38756
38910
|
export type GetLeadFormError = (ErrorResponse | {
|
|
38757
38911
|
error?: string;
|
|
38758
|
-
});
|
|
38912
|
+
} | unknown);
|
|
38759
38913
|
|
|
38760
38914
|
export type ArchiveLeadFormData = {
|
|
38761
38915
|
path: {
|
|
@@ -38766,7 +38920,7 @@ export type ArchiveLeadFormData = {
|
|
|
38766
38920
|
};
|
|
38767
38921
|
query: {
|
|
38768
38922
|
/**
|
|
38769
|
-
* Connected facebook or linkedin ads account id (selects the platform).
|
|
38923
|
+
* Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
|
|
38770
38924
|
*/
|
|
38771
38925
|
accountId: string;
|
|
38772
38926
|
};
|
|
@@ -38780,7 +38934,7 @@ export type ArchiveLeadFormResponse = ({
|
|
|
38780
38934
|
|
|
38781
38935
|
export type ArchiveLeadFormError = (ErrorResponse | {
|
|
38782
38936
|
error?: string;
|
|
38783
|
-
});
|
|
38937
|
+
} | unknown);
|
|
38784
38938
|
|
|
38785
38939
|
export type ListFormLeadsData = {
|
|
38786
38940
|
path: {
|