@getlatedev/node 0.2.1414 → 0.2.1415
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 +2 -1
- package/dist/index.d.mts +66 -13
- package/dist/index.d.ts +66 -13
- 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 +22 -4
- package/src/generated/types.gen.ts +67 -13
|
@@ -1754,10 +1754,13 @@ export type status3 = 'done' | 'skipped' | 'failed';
|
|
|
1754
1754
|
export type AdRuleCondition = {
|
|
1755
1755
|
/**
|
|
1756
1756
|
* `ctr` is a percentage. `spend`, `cpc`, `cpm` and `cpa` are in the ad account currency. `reach` and `frequency` use the platform's de-duplicated reach, so they are accepted on Meta and TikTok only.
|
|
1757
|
+
*
|
|
1758
|
+
* `result:<key>` reads one of your own results (see [Campaign results](/guides/campaign-results)), on campaign rules only: the values you sent for the window, or a formula over them and the platform's numbers. A campaign with no value for it never matches.
|
|
1759
|
+
*
|
|
1757
1760
|
*/
|
|
1758
|
-
metric: 'spend' | 'impressions' | 'clicks' | 'conversions' | 'ctr' | 'cpc' | 'cpm' | 'cpa' | 'roas' | 'reach' | 'frequency';
|
|
1761
|
+
metric: ('spend' | 'impressions' | 'clicks' | 'conversions' | 'ctr' | 'cpc' | 'cpm' | 'cpa' | 'roas' | 'reach' | 'frequency' | unknown);
|
|
1759
1762
|
/**
|
|
1760
|
-
* Days in the ad account's own timezone. `last_7d`
|
|
1763
|
+
* Days in the ad account's own timezone. `last_7d` is the 7 full days before today; only `today` reads the day in progress.
|
|
1761
1764
|
*/
|
|
1762
1765
|
window: 'today' | 'yesterday' | 'last_3d' | 'last_7d' | 'last_14d' | 'last_30d';
|
|
1763
1766
|
op: '>' | '>=' | '<' | '<=';
|
|
@@ -1765,12 +1768,7 @@ export type AdRuleCondition = {
|
|
|
1765
1768
|
};
|
|
1766
1769
|
|
|
1767
1770
|
/**
|
|
1768
|
-
*
|
|
1769
|
-
*/
|
|
1770
|
-
export type metric = 'spend' | 'impressions' | 'clicks' | 'conversions' | 'ctr' | 'cpc' | 'cpm' | 'cpa' | 'roas' | 'reach' | 'frequency';
|
|
1771
|
-
|
|
1772
|
-
/**
|
|
1773
|
-
* Days in the ad account's own timezone. `last_7d` includes today.
|
|
1771
|
+
* Days in the ad account's own timezone. `last_7d` is the 7 full days before today; only `today` reads the day in progress.
|
|
1774
1772
|
*/
|
|
1775
1773
|
export type window = 'today' | 'yesterday' | 'last_3d' | 'last_7d' | 'last_14d' | 'last_30d';
|
|
1776
1774
|
|
|
@@ -2295,6 +2293,12 @@ export type learningStatus = 'LEARNING' | 'SUCCESS' | 'FAIL';
|
|
|
2295
2293
|
* Campaign with nested ad sets and rolled-up metrics
|
|
2296
2294
|
*/
|
|
2297
2295
|
export type AdTreeCampaign = {
|
|
2296
|
+
/**
|
|
2297
|
+
* Only with `results=true`. The values you sent for this campaign over the range, plus each formula they allow, by metric key. A metric with no value is absent.
|
|
2298
|
+
*/
|
|
2299
|
+
results?: {
|
|
2300
|
+
[key: string]: (number);
|
|
2301
|
+
};
|
|
2298
2302
|
platformCampaignId?: string;
|
|
2299
2303
|
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit';
|
|
2300
2304
|
campaignName?: string;
|
|
@@ -2445,6 +2449,10 @@ export type AdTreeResponse = {
|
|
|
2445
2449
|
fromDate?: string;
|
|
2446
2450
|
toDate?: string;
|
|
2447
2451
|
};
|
|
2452
|
+
/**
|
|
2453
|
+
* Only with `results=true`. Your metrics and formulas, to label each campaign's `results`.
|
|
2454
|
+
*/
|
|
2455
|
+
resultMetrics?: Array<CampaignResultMetric>;
|
|
2448
2456
|
/**
|
|
2449
2457
|
* Meta only. Present and true while historical data is being backfilled.
|
|
2450
2458
|
*/
|
|
@@ -4462,11 +4470,25 @@ export type CampaignReport = {
|
|
|
4462
4470
|
export type CampaignResultMetric = {
|
|
4463
4471
|
key: string;
|
|
4464
4472
|
label: string;
|
|
4465
|
-
|
|
4473
|
+
/**
|
|
4474
|
+
* How the value reads: `percent` values are already multiplied by 100.
|
|
4475
|
+
*/
|
|
4476
|
+
kind: 'count' | 'money' | 'percent' | 'ratio';
|
|
4466
4477
|
currency: (string) | null;
|
|
4478
|
+
/**
|
|
4479
|
+
* Null for a number you send. For a computed metric, the formula over `spend`, `impressions`, `clicks`, `conversions`, `purchase_value` and the metrics you send, e.g. `spend / revenue * 100`.
|
|
4480
|
+
*/
|
|
4481
|
+
formula: (string) | null;
|
|
4482
|
+
/**
|
|
4483
|
+
* One of the formulas every team has (`cac_percent`, `cost_per_sale`, `cost_per_qualified_lead`, `lead_to_sale`). Setting the same key replaces it for your team.
|
|
4484
|
+
*/
|
|
4485
|
+
builtIn: boolean;
|
|
4467
4486
|
};
|
|
4468
4487
|
|
|
4469
|
-
|
|
4488
|
+
/**
|
|
4489
|
+
* How the value reads: `percent` values are already multiplied by 100.
|
|
4490
|
+
*/
|
|
4491
|
+
export type kind4 = 'count' | 'money' | 'percent' | 'ratio';
|
|
4470
4492
|
|
|
4471
4493
|
export type CampaignSettlement = {
|
|
4472
4494
|
/**
|
|
@@ -6533,7 +6555,7 @@ export type CreatorCampaignEconomicsCpm = {
|
|
|
6533
6555
|
/**
|
|
6534
6556
|
* What the rate pays on. `engagements` counts the `engagementTypes` as each platform reports them, and `minViewsToEarn` then applies to engagements. Fixed once the campaign leaves draft.
|
|
6535
6557
|
*/
|
|
6536
|
-
export type
|
|
6558
|
+
export type metric = 'views' | 'engagements';
|
|
6537
6559
|
|
|
6538
6560
|
export type CreatorCampaignEconomicsPerPost = {
|
|
6539
6561
|
type: 'per_post';
|
|
@@ -10673,7 +10695,7 @@ export type InstagramDemographicsResponse = {
|
|
|
10673
10695
|
note?: string;
|
|
10674
10696
|
};
|
|
10675
10697
|
|
|
10676
|
-
export type
|
|
10698
|
+
export type metric2 = 'follower_demographics' | 'engaged_audience_demographics';
|
|
10677
10699
|
|
|
10678
10700
|
/**
|
|
10679
10701
|
* The timeframe used for demographic data
|
|
@@ -50814,6 +50836,30 @@ export type GetCampaignResultsUploadError = (ErrorResponse | {
|
|
|
50814
50836
|
error?: string;
|
|
50815
50837
|
});
|
|
50816
50838
|
|
|
50839
|
+
export type GetCampaignResultsTotalsData = {
|
|
50840
|
+
query: {
|
|
50841
|
+
/**
|
|
50842
|
+
* Comma-separated platform ad account ids, at most 100. Omit for every ad account your key can see.
|
|
50843
|
+
*/
|
|
50844
|
+
adAccountIds?: string;
|
|
50845
|
+
fromDate: string;
|
|
50846
|
+
/**
|
|
50847
|
+
* Inclusive. At most 400 days after `fromDate`.
|
|
50848
|
+
*/
|
|
50849
|
+
toDate: string;
|
|
50850
|
+
};
|
|
50851
|
+
};
|
|
50852
|
+
|
|
50853
|
+
export type GetCampaignResultsTotalsResponse = ({
|
|
50854
|
+
fromDate: string;
|
|
50855
|
+
toDate: string;
|
|
50856
|
+
totals: {
|
|
50857
|
+
[key: string]: (number);
|
|
50858
|
+
};
|
|
50859
|
+
});
|
|
50860
|
+
|
|
50861
|
+
export type GetCampaignResultsTotalsError = (ErrorResponse);
|
|
50862
|
+
|
|
50817
50863
|
export type ListCampaignResultMetricsResponse = ({
|
|
50818
50864
|
metrics: Array<CampaignResultMetric>;
|
|
50819
50865
|
});
|
|
@@ -50823,11 +50869,15 @@ export type ListCampaignResultMetricsError = (ErrorResponse);
|
|
|
50823
50869
|
export type SetCampaignResultMetricData = {
|
|
50824
50870
|
body: {
|
|
50825
50871
|
label: string;
|
|
50826
|
-
kind: 'count' | 'money';
|
|
50872
|
+
kind: 'count' | 'money' | 'percent' | 'ratio';
|
|
50827
50873
|
/**
|
|
50828
50874
|
* ISO 4217, money metrics only.
|
|
50829
50875
|
*/
|
|
50830
50876
|
currency?: (string) | null;
|
|
50877
|
+
/**
|
|
50878
|
+
* Makes it a computed metric. Null or absent for a number you send.
|
|
50879
|
+
*/
|
|
50880
|
+
formula?: (string) | null;
|
|
50831
50881
|
};
|
|
50832
50882
|
path: {
|
|
50833
50883
|
key: string;
|
|
@@ -52840,6 +52890,10 @@ export type GetAdTreeData = {
|
|
|
52840
52890
|
* Profile ID
|
|
52841
52891
|
*/
|
|
52842
52892
|
profileId?: string;
|
|
52893
|
+
/**
|
|
52894
|
+
* Set to `true` to add your own results (see [Campaign results](/guides/campaign-results)): every campaign gains `results`, the values you sent for the range plus each formula they allow, and the response gains `resultMetrics` to label them.
|
|
52895
|
+
*/
|
|
52896
|
+
results?: boolean;
|
|
52843
52897
|
/**
|
|
52844
52898
|
* Case-insensitive substring match on campaign, ad set and ad names (`_`, `%` and spaces match literally), or an exact platform campaign, ad set or ad id.
|
|
52845
52899
|
*
|