@getlatedev/node 0.2.1089 → 0.2.1091
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 +211 -12
- package/dist/index.d.ts +211 -12
- 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 +42 -1
- package/src/generated/types.gen.ts +210 -11
|
@@ -1635,7 +1635,7 @@ export type AnalyticsDeltaEntry = {
|
|
|
1635
1635
|
clicks: number;
|
|
1636
1636
|
views: number;
|
|
1637
1637
|
/**
|
|
1638
|
-
* Follows attributed to this post (Instagram)
|
|
1638
|
+
* Follows attributed to this post (Instagram feed and stories, Facebook Reels, TikTok business lane)
|
|
1639
1639
|
*/
|
|
1640
1640
|
follows: number;
|
|
1641
1641
|
/**
|
|
@@ -8889,7 +8889,7 @@ export type PostAnalytics = {
|
|
|
8889
8889
|
clicks?: number;
|
|
8890
8890
|
views?: number;
|
|
8891
8891
|
/**
|
|
8892
|
-
* Instagram feed posts and stories
|
|
8892
|
+
* Accounts that started following from this post. Instagram feed posts and stories (organic follows), Facebook Reels (Meta post_video_followers) and the TikTok business lane. Null on Instagram Reels and non-Reels video and on Facebook posts that are not Reels, where Meta does not expose this metric for the media. 0 for other platforms.
|
|
8893
8893
|
*/
|
|
8894
8894
|
follows?: (number) | null;
|
|
8895
8895
|
/**
|
|
@@ -16690,9 +16690,9 @@ export type GetPostTimelineResponse = ({
|
|
|
16690
16690
|
*/
|
|
16691
16691
|
views?: number;
|
|
16692
16692
|
/**
|
|
16693
|
-
* Follows attributed to the post on this date (Instagram feed and stories, TikTok business lane); 0
|
|
16693
|
+
* Follows attributed to the post on this date (Instagram feed and stories, Facebook Reels, TikTok business lane). Null on Instagram Reels and video and on Facebook posts that are not Reels, where Meta has no follows metric; 0 on other platforms.
|
|
16694
16694
|
*/
|
|
16695
|
-
follows?: number;
|
|
16695
|
+
follows?: (number) | null;
|
|
16696
16696
|
/**
|
|
16697
16697
|
* TikTok business lane: share of viewers who watched to the end on this date, 0 to 1; 0 elsewhere
|
|
16698
16698
|
*/
|
|
@@ -40043,6 +40043,10 @@ export type ListAdSetsData = {
|
|
|
40043
40043
|
* Account ID
|
|
40044
40044
|
*/
|
|
40045
40045
|
accountId?: string;
|
|
40046
|
+
/**
|
|
40047
|
+
* Platform ad account id (Meta act_<n>). Lists every synced ad set of that ad account; no campaignId needed.
|
|
40048
|
+
*/
|
|
40049
|
+
adAccountId?: string;
|
|
40046
40050
|
/**
|
|
40047
40051
|
* Platform ad set ID
|
|
40048
40052
|
*/
|
|
@@ -40101,12 +40105,14 @@ export type ListAdSetsResponse = ({
|
|
|
40101
40105
|
endDate?: string;
|
|
40102
40106
|
} | null;
|
|
40103
40107
|
/**
|
|
40104
|
-
* The audience this ad set delivers to, as the platform reports it
|
|
40105
|
-
*
|
|
40108
|
+
* The audience this ad set delivers to, as the platform reports it at the last sync.
|
|
40109
|
+
* LinkedIn and Meta; null for every other platform and for ad sets not yet re-synced.
|
|
40106
40110
|
*
|
|
40107
|
-
*
|
|
40108
|
-
* can be read, edited and sent
|
|
40109
|
-
*
|
|
40111
|
+
* On Meta it is the ad set's `targeting` verbatim (snake_case: geo_locations,
|
|
40112
|
+
* age_min, custom_audiences, flexible_spec, ...), so it can be read, edited and sent
|
|
40113
|
+
* back as is. On LinkedIn `include` and `exclude` (below) are the campaign's
|
|
40114
|
+
* `targetingCriteria` verbatim, without reconstructing them from our normalized
|
|
40115
|
+
* targeting spec.
|
|
40110
40116
|
*
|
|
40111
40117
|
*/
|
|
40112
40118
|
targeting?: {
|
|
@@ -40130,6 +40136,7 @@ export type ListAdSetsResponse = ({
|
|
|
40130
40136
|
* Whether the campaign may deliver on the LinkedIn Audience Network, off LinkedIn itself.
|
|
40131
40137
|
*/
|
|
40132
40138
|
offsiteDeliveryEnabled?: boolean;
|
|
40139
|
+
[key: string]: unknown | boolean;
|
|
40133
40140
|
} | null;
|
|
40134
40141
|
isExternal?: (boolean) | null;
|
|
40135
40142
|
platformCreatedAt?: (string) | null;
|
|
@@ -40138,13 +40145,27 @@ export type ListAdSetsResponse = ({
|
|
|
40138
40145
|
*/
|
|
40139
40146
|
statusReadAt?: (string) | null;
|
|
40140
40147
|
/**
|
|
40141
|
-
*
|
|
40148
|
+
* The ad set's optimization goal as last synced, in the platform's own enum (Meta `optimization_goal`, for example OFFSITE_CONVERSIONS or LINK_CLICKS). On TikTok with `live=true`, rows read live carry the ad group's `optimization_goal` exactly as TikTok's adgroup/get returns it now (for example ENGAGED_VIEW, ENGAGED_VIEW_FIFTEEN, CLICK, CONVERT).
|
|
40142
40149
|
*/
|
|
40143
40150
|
optimizationGoal?: (string) | null;
|
|
40144
40151
|
/**
|
|
40145
|
-
*
|
|
40152
|
+
* The ad set's billing event as last synced, where the platform reports one. On TikTok with `live=true`, rows read live carry the ad group's `billing_event` exactly as TikTok's adgroup/get returns it now (for example CPV, CPC, OCPM).
|
|
40146
40153
|
*/
|
|
40147
40154
|
billingEvent?: (string) | null;
|
|
40155
|
+
/**
|
|
40156
|
+
* The bid strategy as last synced, in the platform's own enum (Meta `bid_strategy`, for example LOWEST_COST_WITHOUT_CAP, COST_CAP). On Meta under a campaign budget this is the campaign's strategy.
|
|
40157
|
+
*/
|
|
40158
|
+
bidStrategy?: (string) | null;
|
|
40159
|
+
/**
|
|
40160
|
+
* Bid cap or cost target in whole units of `currency`, as last synced. Null when the strategy has none.
|
|
40161
|
+
*/
|
|
40162
|
+
bidAmount?: (number) | null;
|
|
40163
|
+
/**
|
|
40164
|
+
* Meta only. The ad set's `promoted_object` verbatim (snake_case, for example pixel_id + custom_event_type, page_id, application_id), as last synced from its most recent ad. Null on other platforms and on an ad set with no ad yet; GET /v1/ads/accounts/live reads it live for every ad set.
|
|
40165
|
+
*/
|
|
40166
|
+
promotedObject?: {
|
|
40167
|
+
[key: string]: unknown;
|
|
40168
|
+
} | null;
|
|
40148
40169
|
/**
|
|
40149
40170
|
* TikTok only, only with `live=true` and only on rows read live. TikTok's adgroup/get record verbatim (snake_case, TikTok's own names and enums): operation_status, optimization_goal, optimization_event, billing_event, bid_type, bid_price, budget, budget_mode, pacing, schedule_type, schedule_start_time, schedule_end_time, dayparting, placement_type, placements, location_ids, age_groups, gender, languages, interest_category_ids, interest_keyword_ids, actions, audience_ids, excluded_audience_ids, operating_systems, frequency, frequency_schedule, smart_audience_enabled, smart_interest_behavior_enabled. schedule_start_time and schedule_end_time are UTC wall clocks (YYYY-MM-DD HH:MM:SS). location_ids holds TikTok's native location ids (GeoNames ids for countries); GET /v1/ads/targeting/search?dimension=geo returns them as `platformId` on country results. Plus advertiser_currency and advertiser_timezone from TikTok's advertiser/info. A field TikTok does not return is absent.
|
|
40150
40171
|
*/
|
|
@@ -44466,6 +44487,184 @@ export type GetAdAccountFinanceResponse = ({
|
|
|
44466
44487
|
|
|
44467
44488
|
export type GetAdAccountFinanceError = (unknown | ErrorResponse);
|
|
44468
44489
|
|
|
44490
|
+
export type GetAdAccountLiveEntitiesData = {
|
|
44491
|
+
query: {
|
|
44492
|
+
/**
|
|
44493
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
44494
|
+
*/
|
|
44495
|
+
accountId: string;
|
|
44496
|
+
/**
|
|
44497
|
+
* Meta ad account id (act_<n>).
|
|
44498
|
+
*/
|
|
44499
|
+
adAccountId: string;
|
|
44500
|
+
/**
|
|
44501
|
+
* Cursor from `paging.campaigns.after` or `paging.adSets.after` of a previous response. Requires `level`.
|
|
44502
|
+
*/
|
|
44503
|
+
after?: string;
|
|
44504
|
+
/**
|
|
44505
|
+
* Read only one level. Required with `after`. Both levels are read when omitted.
|
|
44506
|
+
*/
|
|
44507
|
+
level?: 'campaign' | 'adSet';
|
|
44508
|
+
/**
|
|
44509
|
+
* Maximum rows per level in this response.
|
|
44510
|
+
*/
|
|
44511
|
+
limit?: number;
|
|
44512
|
+
/**
|
|
44513
|
+
* Comma-separated Meta `effective_status` values to keep: ACTIVE, PAUSED, IN_PROCESS,
|
|
44514
|
+
* WITH_ISSUES, DELETED, ARCHIVED, and CAMPAIGN_PAUSED (ad sets only; the campaigns level
|
|
44515
|
+
* ignores it). Defaults to every status except DELETED and ARCHIVED. An unknown value is a 400.
|
|
44516
|
+
*/
|
|
44517
|
+
status?: string;
|
|
44518
|
+
};
|
|
44519
|
+
};
|
|
44520
|
+
|
|
44521
|
+
export type GetAdAccountLiveEntitiesResponse = ({
|
|
44522
|
+
accountId?: string;
|
|
44523
|
+
adAccountId?: string;
|
|
44524
|
+
platform?: 'facebook';
|
|
44525
|
+
/**
|
|
44526
|
+
* ISO 4217 code every budget and bid amount is expressed in.
|
|
44527
|
+
*/
|
|
44528
|
+
currency?: string;
|
|
44529
|
+
/**
|
|
44530
|
+
* When Meta was read.
|
|
44531
|
+
*/
|
|
44532
|
+
readAt?: string;
|
|
44533
|
+
/**
|
|
44534
|
+
* Absent when `level=adSet`.
|
|
44535
|
+
*/
|
|
44536
|
+
campaigns?: Array<{
|
|
44537
|
+
platformCampaignId?: string;
|
|
44538
|
+
campaignName?: (string) | null;
|
|
44539
|
+
/**
|
|
44540
|
+
* Meta `effective_status`, for example ACTIVE, PAUSED, WITH_ISSUES.
|
|
44541
|
+
*/
|
|
44542
|
+
platformCampaignStatus?: (string) | null;
|
|
44543
|
+
/**
|
|
44544
|
+
* Meta `status`: the campaign's own switch (ACTIVE, PAUSED, DELETED, ARCHIVED).
|
|
44545
|
+
*/
|
|
44546
|
+
configuredStatus?: (string) | null;
|
|
44547
|
+
/**
|
|
44548
|
+
* Zernio's normalized status (active, paused, ...), derived from `platformCampaignStatus`.
|
|
44549
|
+
*/
|
|
44550
|
+
status?: string;
|
|
44551
|
+
/**
|
|
44552
|
+
* The campaign budget, same shape as the synced rows. Null when the budget lives on the ad sets.
|
|
44553
|
+
*/
|
|
44554
|
+
budget?: {
|
|
44555
|
+
amount?: number;
|
|
44556
|
+
type?: 'daily' | 'lifetime';
|
|
44557
|
+
} | null;
|
|
44558
|
+
/**
|
|
44559
|
+
* Meta `daily_budget` in whole units of `currency`.
|
|
44560
|
+
*/
|
|
44561
|
+
dailyBudget?: (number) | null;
|
|
44562
|
+
/**
|
|
44563
|
+
* Meta `lifetime_budget` in whole units of `currency`.
|
|
44564
|
+
*/
|
|
44565
|
+
lifetimeBudget?: (number) | null;
|
|
44566
|
+
/**
|
|
44567
|
+
* Meta `budget_remaining` in whole units of `currency`. Null when the campaign has no budget of its own.
|
|
44568
|
+
*/
|
|
44569
|
+
budgetRemaining?: (number) | null;
|
|
44570
|
+
/**
|
|
44571
|
+
* Campaign spending limit (Meta `spend_cap`) in whole units of `currency`. Null when none is set.
|
|
44572
|
+
*/
|
|
44573
|
+
spendCap?: (number) | null;
|
|
44574
|
+
/**
|
|
44575
|
+
* Meta `bid_strategy`, set on campaigns with a campaign budget.
|
|
44576
|
+
*/
|
|
44577
|
+
bidStrategy?: (string) | null;
|
|
44578
|
+
}>;
|
|
44579
|
+
/**
|
|
44580
|
+
* Absent when `level=campaign`.
|
|
44581
|
+
*/
|
|
44582
|
+
adSets?: Array<{
|
|
44583
|
+
platformAdSetId?: string;
|
|
44584
|
+
adSetName?: (string) | null;
|
|
44585
|
+
platformCampaignId?: (string) | null;
|
|
44586
|
+
/**
|
|
44587
|
+
* Meta `effective_status`, for example ACTIVE, PAUSED, CAMPAIGN_PAUSED.
|
|
44588
|
+
*/
|
|
44589
|
+
platformAdSetStatus?: (string) | null;
|
|
44590
|
+
/**
|
|
44591
|
+
* Meta `status`: the ad set's own switch.
|
|
44592
|
+
*/
|
|
44593
|
+
configuredStatus?: (string) | null;
|
|
44594
|
+
/**
|
|
44595
|
+
* Zernio's normalized status, derived from `platformAdSetStatus`.
|
|
44596
|
+
*/
|
|
44597
|
+
status?: string;
|
|
44598
|
+
/**
|
|
44599
|
+
* The ad set budget, same shape as the synced rows. Null under a campaign budget.
|
|
44600
|
+
*/
|
|
44601
|
+
budget?: {
|
|
44602
|
+
amount?: number;
|
|
44603
|
+
type?: 'daily' | 'lifetime';
|
|
44604
|
+
} | null;
|
|
44605
|
+
/**
|
|
44606
|
+
* Meta `daily_budget` in whole units of `currency`.
|
|
44607
|
+
*/
|
|
44608
|
+
dailyBudget?: (number) | null;
|
|
44609
|
+
/**
|
|
44610
|
+
* Meta `lifetime_budget` in whole units of `currency`.
|
|
44611
|
+
*/
|
|
44612
|
+
lifetimeBudget?: (number) | null;
|
|
44613
|
+
/**
|
|
44614
|
+
* Meta `budget_remaining` in whole units of `currency`. Null when the ad set has no budget of its own.
|
|
44615
|
+
*/
|
|
44616
|
+
budgetRemaining?: (number) | null;
|
|
44617
|
+
/**
|
|
44618
|
+
* Meta `bid_strategy`.
|
|
44619
|
+
*/
|
|
44620
|
+
bidStrategy?: (string) | null;
|
|
44621
|
+
/**
|
|
44622
|
+
* Meta `bid_amount` (bid cap or cost target) in whole units of `currency`. Null when the strategy has none.
|
|
44623
|
+
*/
|
|
44624
|
+
bidAmount?: (number) | null;
|
|
44625
|
+
/**
|
|
44626
|
+
* Meta `optimization_goal`.
|
|
44627
|
+
*/
|
|
44628
|
+
optimizationGoal?: (string) | null;
|
|
44629
|
+
/**
|
|
44630
|
+
* Meta `billing_event`.
|
|
44631
|
+
*/
|
|
44632
|
+
billingEvent?: (string) | null;
|
|
44633
|
+
/**
|
|
44634
|
+
* Meta `promoted_object` verbatim (snake_case).
|
|
44635
|
+
*/
|
|
44636
|
+
promotedObject?: {
|
|
44637
|
+
[key: string]: unknown;
|
|
44638
|
+
} | null;
|
|
44639
|
+
/**
|
|
44640
|
+
* Meta `targeting` verbatim (snake_case), as Meta returns it now.
|
|
44641
|
+
*/
|
|
44642
|
+
targeting?: {
|
|
44643
|
+
[key: string]: unknown;
|
|
44644
|
+
} | null;
|
|
44645
|
+
schedule?: {
|
|
44646
|
+
startDate?: string;
|
|
44647
|
+
/**
|
|
44648
|
+
* Absent when the ad set runs until it is stopped.
|
|
44649
|
+
*/
|
|
44650
|
+
endDate?: string;
|
|
44651
|
+
} | null;
|
|
44652
|
+
}>;
|
|
44653
|
+
/**
|
|
44654
|
+
* One entry per level read. `after` is null on the last page.
|
|
44655
|
+
*/
|
|
44656
|
+
paging?: {
|
|
44657
|
+
campaigns?: {
|
|
44658
|
+
after?: (string) | null;
|
|
44659
|
+
};
|
|
44660
|
+
adSets?: {
|
|
44661
|
+
after?: (string) | null;
|
|
44662
|
+
};
|
|
44663
|
+
};
|
|
44664
|
+
});
|
|
44665
|
+
|
|
44666
|
+
export type GetAdAccountLiveEntitiesError = (ErrorResponse | unknown);
|
|
44667
|
+
|
|
44469
44668
|
export type CreateAdAccountData = {
|
|
44470
44669
|
body: {
|
|
44471
44670
|
/**
|