@getlatedev/node 0.2.1750 → 0.2.1751
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 +87 -1
- package/dist/index.d.ts +87 -1
- package/dist/index.js +8 -1
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
- package/src/client.ts +2 -0
- package/src/generated/sdk.gen.ts +14 -1
- package/src/generated/types.gen.ts +90 -0
|
@@ -2958,6 +2958,48 @@ export type startMinute = 0 | 15 | 30 | 45;
|
|
|
2958
2958
|
|
|
2959
2959
|
export type endMinute = 0 | 15 | 30 | 45;
|
|
2960
2960
|
|
|
2961
|
+
export type AdSetMetricRow = {
|
|
2962
|
+
platform: string;
|
|
2963
|
+
adAccountId: string;
|
|
2964
|
+
campaignId: (string) | null;
|
|
2965
|
+
adSetId: string;
|
|
2966
|
+
/**
|
|
2967
|
+
* The ad set name. null before its first sync.
|
|
2968
|
+
*/
|
|
2969
|
+
name: (string) | null;
|
|
2970
|
+
/**
|
|
2971
|
+
* The ad account currency every money metric of this ad set is in. Ad sets of different ad accounts are never summed together.
|
|
2972
|
+
*/
|
|
2973
|
+
currency: (string) | null;
|
|
2974
|
+
/**
|
|
2975
|
+
* Only the asked metrics, summed over every ad of the ad set with rates recomputed from the sums. reach is deduplicated across the range for Meta and TikTok when the platform returns it.
|
|
2976
|
+
*/
|
|
2977
|
+
metrics: (AdMetrics);
|
|
2978
|
+
/**
|
|
2979
|
+
* With granularity=day, one point per day with delivery, each carrying date and the asked metrics.
|
|
2980
|
+
*/
|
|
2981
|
+
daily?: Array<(AdMetrics & {
|
|
2982
|
+
date: string;
|
|
2983
|
+
})>;
|
|
2984
|
+
/**
|
|
2985
|
+
* When the newest daily row of the ad set was synced.
|
|
2986
|
+
*/
|
|
2987
|
+
lastSyncedAt: (string) | null;
|
|
2988
|
+
};
|
|
2989
|
+
|
|
2990
|
+
export type AdSetMetricsResponse = {
|
|
2991
|
+
data: Array<AdSetMetricRow>;
|
|
2992
|
+
pagination: MetricsPagination;
|
|
2993
|
+
meta: ({
|
|
2994
|
+
fromDate: string;
|
|
2995
|
+
toDate: string;
|
|
2996
|
+
/**
|
|
2997
|
+
* With adSetId, asked ids that are not ad sets the caller can see.
|
|
2998
|
+
*/
|
|
2999
|
+
missingIds?: Array<(string)>;
|
|
3000
|
+
} & MetricsFreshness);
|
|
3001
|
+
};
|
|
3002
|
+
|
|
2961
3003
|
export type AdsListResponse = {
|
|
2962
3004
|
ads?: Array<Ad>;
|
|
2963
3005
|
pagination?: Pagination;
|
|
@@ -32582,6 +32624,54 @@ export type GetCampaignMetricsError = (ErrorResponse | (ErrorResponse & {
|
|
|
32582
32624
|
};
|
|
32583
32625
|
}));
|
|
32584
32626
|
|
|
32627
|
+
export type GetAdSetMetricsData = {
|
|
32628
|
+
query: {
|
|
32629
|
+
/**
|
|
32630
|
+
* Comma-separated platform ad set ids, up to 100. Send adSetId or campaignId.
|
|
32631
|
+
*/
|
|
32632
|
+
adSetId?: string;
|
|
32633
|
+
/**
|
|
32634
|
+
* One platform campaign id, for its ad sets. Send adSetId or campaignId.
|
|
32635
|
+
*/
|
|
32636
|
+
campaignId?: string;
|
|
32637
|
+
/**
|
|
32638
|
+
* With campaignId, pagination.nextCursor of the previous page, sent with the same query.
|
|
32639
|
+
*/
|
|
32640
|
+
cursor?: string;
|
|
32641
|
+
/**
|
|
32642
|
+
* First day, inclusive.
|
|
32643
|
+
*/
|
|
32644
|
+
fromDate: string;
|
|
32645
|
+
/**
|
|
32646
|
+
* day adds one point per day to each ad set.
|
|
32647
|
+
*/
|
|
32648
|
+
granularity?: 'total' | 'day';
|
|
32649
|
+
/**
|
|
32650
|
+
* With campaignId, ad sets per page, 50 by default, 100 at most.
|
|
32651
|
+
*/
|
|
32652
|
+
limit?: number;
|
|
32653
|
+
/**
|
|
32654
|
+
* Comma-separated delivery metrics, as GET /v1/metrics/catalog?entity=ad-sets lists them (spend, impressions, reach, clicks, ctr, cpc, cpm, conversions, roas...).
|
|
32655
|
+
*/
|
|
32656
|
+
metrics: string;
|
|
32657
|
+
/**
|
|
32658
|
+
* Last day, inclusive. The range is at most 400 days.
|
|
32659
|
+
*/
|
|
32660
|
+
toDate: string;
|
|
32661
|
+
};
|
|
32662
|
+
};
|
|
32663
|
+
|
|
32664
|
+
export type GetAdSetMetricsResponse = (AdSetMetricsResponse);
|
|
32665
|
+
|
|
32666
|
+
export type GetAdSetMetricsError = (ErrorResponse | (ErrorResponse & {
|
|
32667
|
+
details?: {
|
|
32668
|
+
scope?: 'post-analytics' | 'account-insights' | 'ad-analytics' | 'campaign-analytics' | 'account_route' | 'team_budget' | 'in_flight';
|
|
32669
|
+
limit?: number;
|
|
32670
|
+
window?: string;
|
|
32671
|
+
retryAfterSeconds?: number;
|
|
32672
|
+
};
|
|
32673
|
+
}));
|
|
32674
|
+
|
|
32585
32675
|
export type GetAdAccountMetricsData = {
|
|
32586
32676
|
query: {
|
|
32587
32677
|
/**
|