@getlatedev/node 0.2.389 → 0.2.390
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 +5 -0
- package/dist/index.d.mts +212 -8
- package/dist/index.d.ts +212 -8
- package/dist/index.js +36 -1
- package/dist/index.mjs +36 -1
- package/package.json +1 -1
- package/src/client.ts +10 -0
- package/src/generated/sdk.gen.ts +71 -1
- package/src/generated/types.gen.ts +221 -7
|
@@ -23708,6 +23708,38 @@ export type DuplicateAdCampaignError = (unknown | {
|
|
|
23708
23708
|
error?: string;
|
|
23709
23709
|
});
|
|
23710
23710
|
|
|
23711
|
+
export type GetAdSetDetailsData = {
|
|
23712
|
+
path: {
|
|
23713
|
+
/**
|
|
23714
|
+
* Meta ad set id (platformAdSetId).
|
|
23715
|
+
*/
|
|
23716
|
+
adSetId: string;
|
|
23717
|
+
};
|
|
23718
|
+
query: {
|
|
23719
|
+
/**
|
|
23720
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
23721
|
+
*/
|
|
23722
|
+
accountId: string;
|
|
23723
|
+
/**
|
|
23724
|
+
* Comma-separated Graph field override (supports nested {} projections).
|
|
23725
|
+
*/
|
|
23726
|
+
fields?: string;
|
|
23727
|
+
};
|
|
23728
|
+
};
|
|
23729
|
+
|
|
23730
|
+
export type GetAdSetDetailsResponse = ({
|
|
23731
|
+
/**
|
|
23732
|
+
* Raw Meta ad set; keys are the requested Graph fields.
|
|
23733
|
+
*/
|
|
23734
|
+
adSet?: {
|
|
23735
|
+
[key: string]: unknown;
|
|
23736
|
+
};
|
|
23737
|
+
});
|
|
23738
|
+
|
|
23739
|
+
export type GetAdSetDetailsError = (unknown | {
|
|
23740
|
+
error?: string;
|
|
23741
|
+
});
|
|
23742
|
+
|
|
23711
23743
|
export type UpdateAdSetData = {
|
|
23712
23744
|
body: {
|
|
23713
23745
|
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
@@ -24708,6 +24740,145 @@ export type ListAdsBusinessCentersError = ({
|
|
|
24708
24740
|
error?: string;
|
|
24709
24741
|
} | unknown);
|
|
24710
24742
|
|
|
24743
|
+
export type GetAdsActivityLogData = {
|
|
24744
|
+
query: {
|
|
24745
|
+
/**
|
|
24746
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
24747
|
+
*/
|
|
24748
|
+
accountId: string;
|
|
24749
|
+
/**
|
|
24750
|
+
* Meta ad account id (act_<n>).
|
|
24751
|
+
*/
|
|
24752
|
+
adAccountId: string;
|
|
24753
|
+
/**
|
|
24754
|
+
* Cursor from paging.after of the previous page.
|
|
24755
|
+
*/
|
|
24756
|
+
after?: string;
|
|
24757
|
+
/**
|
|
24758
|
+
* Rows per page
|
|
24759
|
+
*/
|
|
24760
|
+
limit?: number;
|
|
24761
|
+
/**
|
|
24762
|
+
* Client-side filter to one Meta object id (campaign, ad set or ad).
|
|
24763
|
+
*/
|
|
24764
|
+
objectId?: string;
|
|
24765
|
+
/**
|
|
24766
|
+
* Start of range (YYYY-MM-DD).
|
|
24767
|
+
*/
|
|
24768
|
+
since?: string;
|
|
24769
|
+
/**
|
|
24770
|
+
* End of range (YYYY-MM-DD).
|
|
24771
|
+
*/
|
|
24772
|
+
until?: string;
|
|
24773
|
+
};
|
|
24774
|
+
};
|
|
24775
|
+
|
|
24776
|
+
export type GetAdsActivityLogResponse = ({
|
|
24777
|
+
adAccountId?: string;
|
|
24778
|
+
data?: Array<{
|
|
24779
|
+
[key: string]: unknown;
|
|
24780
|
+
}>;
|
|
24781
|
+
paging?: {
|
|
24782
|
+
/**
|
|
24783
|
+
* Cursor for the next page; null when exhausted.
|
|
24784
|
+
*/
|
|
24785
|
+
after?: (string) | null;
|
|
24786
|
+
};
|
|
24787
|
+
});
|
|
24788
|
+
|
|
24789
|
+
export type GetAdsActivityLogError = (unknown | {
|
|
24790
|
+
error?: string;
|
|
24791
|
+
});
|
|
24792
|
+
|
|
24793
|
+
export type ListAdStudiesData = {
|
|
24794
|
+
query: {
|
|
24795
|
+
/**
|
|
24796
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
24797
|
+
*/
|
|
24798
|
+
accountId: string;
|
|
24799
|
+
/**
|
|
24800
|
+
* Meta ad account id (act_<n>).
|
|
24801
|
+
*/
|
|
24802
|
+
adAccountId: string;
|
|
24803
|
+
/**
|
|
24804
|
+
* Cursor from paging.after of the previous page.
|
|
24805
|
+
*/
|
|
24806
|
+
after?: string;
|
|
24807
|
+
/**
|
|
24808
|
+
* Comma-separated Graph field override (supports nested {} projections).
|
|
24809
|
+
*/
|
|
24810
|
+
fields?: string;
|
|
24811
|
+
/**
|
|
24812
|
+
* Rows per page
|
|
24813
|
+
*/
|
|
24814
|
+
limit?: number;
|
|
24815
|
+
};
|
|
24816
|
+
};
|
|
24817
|
+
|
|
24818
|
+
export type ListAdStudiesResponse = ({
|
|
24819
|
+
adAccountId?: string;
|
|
24820
|
+
data?: Array<{
|
|
24821
|
+
[key: string]: unknown;
|
|
24822
|
+
}>;
|
|
24823
|
+
paging?: {
|
|
24824
|
+
/**
|
|
24825
|
+
* Cursor for the next page; null when exhausted.
|
|
24826
|
+
*/
|
|
24827
|
+
after?: (string) | null;
|
|
24828
|
+
};
|
|
24829
|
+
});
|
|
24830
|
+
|
|
24831
|
+
export type ListAdStudiesError = (unknown | {
|
|
24832
|
+
error?: string;
|
|
24833
|
+
});
|
|
24834
|
+
|
|
24835
|
+
export type GetAdAccountFinanceData = {
|
|
24836
|
+
query: {
|
|
24837
|
+
/**
|
|
24838
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
24839
|
+
*/
|
|
24840
|
+
accountId: string;
|
|
24841
|
+
/**
|
|
24842
|
+
* Meta ad account id (act_<n>).
|
|
24843
|
+
*/
|
|
24844
|
+
adAccountId: string;
|
|
24845
|
+
};
|
|
24846
|
+
};
|
|
24847
|
+
|
|
24848
|
+
export type GetAdAccountFinanceResponse = ({
|
|
24849
|
+
adAccountId?: string;
|
|
24850
|
+
/**
|
|
24851
|
+
* ISO 4217 code all money values are expressed in.
|
|
24852
|
+
*/
|
|
24853
|
+
currency?: string;
|
|
24854
|
+
/**
|
|
24855
|
+
* Outstanding/prepaid balance in whole currency units.
|
|
24856
|
+
*/
|
|
24857
|
+
balance?: number;
|
|
24858
|
+
/**
|
|
24859
|
+
* Lifetime amount spent in whole currency units.
|
|
24860
|
+
*/
|
|
24861
|
+
amountSpent?: number;
|
|
24862
|
+
/**
|
|
24863
|
+
* Account spend cap; null when none is set.
|
|
24864
|
+
*/
|
|
24865
|
+
spendCap?: (number) | null;
|
|
24866
|
+
fundingSource?: {
|
|
24867
|
+
/**
|
|
24868
|
+
* Human-readable payment method, e.g. 'Mastercard *4985'.
|
|
24869
|
+
*/
|
|
24870
|
+
displayString?: string;
|
|
24871
|
+
/**
|
|
24872
|
+
* Meta funding source type code.
|
|
24873
|
+
*/
|
|
24874
|
+
type?: number;
|
|
24875
|
+
} | null;
|
|
24876
|
+
});
|
|
24877
|
+
|
|
24878
|
+
export type GetAdAccountFinanceError = (unknown | {
|
|
24879
|
+
error?: string;
|
|
24880
|
+
});
|
|
24881
|
+
|
|
24711
24882
|
export type ListAdAccountsData = {
|
|
24712
24883
|
query: {
|
|
24713
24884
|
/**
|
|
@@ -25010,7 +25181,7 @@ export type BoostPostData = {
|
|
|
25010
25181
|
/**
|
|
25011
25182
|
* Meta only. Required for housing, employment, credit, or political ads.
|
|
25012
25183
|
*/
|
|
25013
|
-
specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS')>;
|
|
25184
|
+
specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ISSUES_ELECTIONS_POLITICS' | 'ONLINE_GAMBLING_AND_GAMING')>;
|
|
25014
25185
|
/**
|
|
25015
25186
|
* TikTok-only. Custom destination URL for the Spark Ad. Without this, TikTok
|
|
25016
25187
|
* Spark Ads have no clickable destination — required for traffic / conversion
|
|
@@ -25172,7 +25343,7 @@ export type CreateStandaloneAdData = {
|
|
|
25172
25343
|
/**
|
|
25173
25344
|
* Required on legacy + attach shapes for Meta. Honoured on TikTok (passes through to the Spark Ad creative's `call_to_action`) and on LinkedIn (the CTA button on the ad; defaults to LEARN_MORE when `linkUrl` is set). LinkedIn accepts: LEARN_MORE, SIGN_UP, DOWNLOAD, SUBSCRIBE, REGISTER, JOIN, ATTEND, REQUEST_DEMO, VIEW_QUOTE, APPLY, SEE_MORE, SHOP_NOW, BUY_NOW. Ignored by Google, Pinterest, and X/Twitter.
|
|
25174
25345
|
*/
|
|
25175
|
-
callToAction?: 'LEARN_MORE' | 'SHOP_NOW' | 'SIGN_UP' | 'BOOK_TRAVEL' | 'CONTACT_US' | 'DOWNLOAD' | 'GET_OFFER' | 'GET_QUOTE' | 'SUBSCRIBE' | 'WATCH_MORE' | 'REGISTER' | 'JOIN' | 'ATTEND' | 'REQUEST_DEMO' | 'VIEW_QUOTE' | 'APPLY' | 'SEE_MORE' | 'BUY_NOW';
|
|
25346
|
+
callToAction?: 'LEARN_MORE' | 'SHOP_NOW' | 'SIGN_UP' | 'BOOK_TRAVEL' | 'CONTACT_US' | 'DOWNLOAD' | 'GET_OFFER' | 'GET_QUOTE' | 'SUBSCRIBE' | 'WATCH_MORE' | 'ADD_TO_CART' | 'APPLY_NOW' | 'BOOK_NOW' | 'BUY_TICKETS' | 'DONATE' | 'DONATE_NOW' | 'GET_DIRECTIONS' | 'GET_SHOWTIMES' | 'LISTEN_NOW' | 'ORDER_NOW' | 'PLAY_GAME' | 'REQUEST_TIME' | 'SEE_MENU' | 'START_ORDER' | 'INSTALL_MOBILE_APP' | 'USE_APP' | 'REGISTER' | 'JOIN' | 'ATTEND' | 'REQUEST_DEMO' | 'VIEW_QUOTE' | 'APPLY' | 'SEE_MORE' | 'BUY_NOW';
|
|
25176
25347
|
/**
|
|
25177
25348
|
* Required on legacy + attach shapes (skip for multi-creative). On LinkedIn it's the ad's destination URL; required for `traffic` ads, optional for `engagement` / `awareness`. NOT required when `goal` is `lead_generation` (the ad opens a Lead Gen form instead of a destination). On LinkedIn, `imageUrl` + `linkUrl` publishes an ARTICLE-content creative; this is LinkedIn's article ad format, with the image as thumbnail and `longHeadline` as description.
|
|
25178
25349
|
*/
|
|
@@ -25241,7 +25412,7 @@ export type CreateStandaloneAdData = {
|
|
|
25241
25412
|
thumbnailUrl?: string;
|
|
25242
25413
|
};
|
|
25243
25414
|
linkUrl: string;
|
|
25244
|
-
callToAction: 'LEARN_MORE' | 'SHOP_NOW' | 'SIGN_UP' | 'BOOK_TRAVEL' | 'CONTACT_US' | 'DOWNLOAD' | 'GET_OFFER' | 'GET_QUOTE' | 'SUBSCRIBE' | 'WATCH_MORE';
|
|
25415
|
+
callToAction: 'LEARN_MORE' | 'SHOP_NOW' | 'SIGN_UP' | 'BOOK_TRAVEL' | 'CONTACT_US' | 'DOWNLOAD' | 'GET_OFFER' | 'GET_QUOTE' | 'SUBSCRIBE' | 'WATCH_MORE' | 'ADD_TO_CART' | 'APPLY_NOW' | 'BOOK_NOW' | 'BUY_TICKETS' | 'DONATE' | 'DONATE_NOW' | 'GET_DIRECTIONS' | 'GET_SHOWTIMES' | 'LISTEN_NOW' | 'ORDER_NOW' | 'PLAY_GAME' | 'REQUEST_TIME' | 'SEE_MENU' | 'START_ORDER' | 'INSTALL_MOBILE_APP' | 'USE_APP';
|
|
25245
25416
|
}>;
|
|
25246
25417
|
/**
|
|
25247
25418
|
* Meta-only. When present, switches to the attach shape: adds
|
|
@@ -25463,7 +25634,7 @@ export type CreateStandaloneAdData = {
|
|
|
25463
25634
|
* category disables income/zip targeting on Meta.
|
|
25464
25635
|
*
|
|
25465
25636
|
*/
|
|
25466
|
-
specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS')>;
|
|
25637
|
+
specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ISSUES_ELECTIONS_POLITICS' | 'ONLINE_GAMBLING_AND_GAMING')>;
|
|
25467
25638
|
/**
|
|
25468
25639
|
* Required for lifetime budgets
|
|
25469
25640
|
*/
|
|
@@ -25517,7 +25688,7 @@ export type CreateStandaloneAdData = {
|
|
|
25517
25688
|
/**
|
|
25518
25689
|
* CTA-button variations. Required.
|
|
25519
25690
|
*/
|
|
25520
|
-
callToActionTypes?: Array<('LEARN_MORE' | 'SHOP_NOW' | 'SIGN_UP' | 'BOOK_TRAVEL' | 'CONTACT_US' | 'DOWNLOAD' | 'GET_OFFER' | 'GET_QUOTE' | 'SUBSCRIBE' | 'WATCH_MORE' | 'REGISTER' | 'JOIN' | 'ATTEND' | 'REQUEST_DEMO' | 'VIEW_QUOTE' | 'APPLY' | 'SEE_MORE' | 'BUY_NOW')>;
|
|
25691
|
+
callToActionTypes?: Array<('LEARN_MORE' | 'SHOP_NOW' | 'SIGN_UP' | 'BOOK_TRAVEL' | 'CONTACT_US' | 'DOWNLOAD' | 'GET_OFFER' | 'GET_QUOTE' | 'SUBSCRIBE' | 'WATCH_MORE' | 'ADD_TO_CART' | 'APPLY_NOW' | 'BOOK_NOW' | 'BUY_TICKETS' | 'DONATE' | 'DONATE_NOW' | 'GET_DIRECTIONS' | 'GET_SHOWTIMES' | 'LISTEN_NOW' | 'ORDER_NOW' | 'PLAY_GAME' | 'REQUEST_TIME' | 'SEE_MENU' | 'START_ORDER' | 'INSTALL_MOBILE_APP' | 'USE_APP' | 'REGISTER' | 'JOIN' | 'ATTEND' | 'REQUEST_DEMO' | 'VIEW_QUOTE' | 'APPLY' | 'SEE_MORE' | 'BUY_NOW')>;
|
|
25521
25692
|
/**
|
|
25522
25693
|
* Asset-feed ad format. Defaults to SINGLE_IMAGE.
|
|
25523
25694
|
*/
|
|
@@ -26094,6 +26265,45 @@ export type CreateTestLeadError = ({
|
|
|
26094
26265
|
error?: string;
|
|
26095
26266
|
});
|
|
26096
26267
|
|
|
26268
|
+
export type UploadAdImageData = {
|
|
26269
|
+
body: {
|
|
26270
|
+
/**
|
|
26271
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
26272
|
+
*/
|
|
26273
|
+
accountId: string;
|
|
26274
|
+
/**
|
|
26275
|
+
* Meta ad account id (act_<n>).
|
|
26276
|
+
*/
|
|
26277
|
+
adAccountId: string;
|
|
26278
|
+
/**
|
|
26279
|
+
* Raw base64 image bytes, or a full data URL (the data:image/...;base64, prefix is stripped).
|
|
26280
|
+
*/
|
|
26281
|
+
imageBase64: string;
|
|
26282
|
+
/**
|
|
26283
|
+
* Optional filename shown in Meta's image library. Defaults to ad_image.jpg.
|
|
26284
|
+
*/
|
|
26285
|
+
filename?: string;
|
|
26286
|
+
};
|
|
26287
|
+
};
|
|
26288
|
+
|
|
26289
|
+
export type UploadAdImageResponse = ({
|
|
26290
|
+
adAccountId?: string;
|
|
26291
|
+
image?: {
|
|
26292
|
+
/**
|
|
26293
|
+
* Meta image hash, reusable wherever image_hash is accepted.
|
|
26294
|
+
*/
|
|
26295
|
+
hash?: string;
|
|
26296
|
+
/**
|
|
26297
|
+
* Meta-hosted image URL; usable as imageUrl on the create endpoints.
|
|
26298
|
+
*/
|
|
26299
|
+
url?: string;
|
|
26300
|
+
};
|
|
26301
|
+
});
|
|
26302
|
+
|
|
26303
|
+
export type UploadAdImageError = (unknown | {
|
|
26304
|
+
error?: string;
|
|
26305
|
+
});
|
|
26306
|
+
|
|
26097
26307
|
export type SearchAdInterestsData = {
|
|
26098
26308
|
query: {
|
|
26099
26309
|
/**
|
|
@@ -26741,8 +26951,12 @@ export type SendConversionsData = {
|
|
|
26741
26951
|
testCode?: string;
|
|
26742
26952
|
/**
|
|
26743
26953
|
* Batch-level user consent. Required by Google for EEA/UK
|
|
26744
|
-
* events under the Feb 2026 restrictions.
|
|
26745
|
-
*
|
|
26954
|
+
* events under the Feb 2026 restrictions. On Meta, any
|
|
26955
|
+
* DENIED flag enables Limited Data Use on every event in
|
|
26956
|
+
* the batch (data_processing_options ["LDU"] with
|
|
26957
|
+
* geolocation, country 0 / state 0); GRANTED or absent
|
|
26958
|
+
* consent sends events with Meta's default processing.
|
|
26959
|
+
* Ignored by LinkedIn.
|
|
26746
26960
|
*
|
|
26747
26961
|
*/
|
|
26748
26962
|
consent?: {
|