@getlatedev/node 0.2.580 → 0.2.582
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/dist/index.d.mts +53 -9
- package/dist/index.d.ts +53 -9
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +31 -2
- package/src/generated/types.gen.ts +53 -9
package/dist/index.d.mts
CHANGED
|
@@ -4051,6 +4051,9 @@ type ExternalPostSummary = {
|
|
|
4051
4051
|
views?: number;
|
|
4052
4052
|
reach?: number;
|
|
4053
4053
|
impressions?: number;
|
|
4054
|
+
/**
|
|
4055
|
+
* Percentage, rounded to 2 decimals. Same definition as PostAnalytics.engagementRate: (likes + comments + shares + saves) / (impressions or reach or views) * 100, where the denominator is the first of the three that is non-zero. Clicks and follows are never counted.
|
|
4056
|
+
*/
|
|
4054
4057
|
engagementRate?: number;
|
|
4055
4058
|
/**
|
|
4056
4059
|
* When these metrics were last refreshed
|
|
@@ -5329,7 +5332,7 @@ type LinkedInAggregateAnalyticsTotalResponse = {
|
|
|
5329
5332
|
*/
|
|
5330
5333
|
sends?: number;
|
|
5331
5334
|
/**
|
|
5332
|
-
* Overall engagement rate as percentage
|
|
5335
|
+
* Overall engagement rate, as a percentage rounded to 2 decimals: (reactions + comments + shares + saves + sends) / impressions * 100. Clicks are not counted, and there is no fallback denominator, so this is 0 whenever impressions is 0. This is NOT the same formula as PostAnalytics.engagementRate on GET /v1/analytics.
|
|
5333
5336
|
*/
|
|
5334
5337
|
engagementRate?: number;
|
|
5335
5338
|
};
|
|
@@ -5669,6 +5672,9 @@ type PostAnalytics = {
|
|
|
5669
5672
|
* Video length in seconds. Currently Instagram Reels only; combine with igReelsAvgWatchTime (ms) to estimate retention. Null when unknown (other platforms, non-video media, or when Instagram does not expose the media URL, e.g. reels with copyrighted audio).
|
|
5670
5673
|
*/
|
|
5671
5674
|
videoDurationSeconds?: (number) | null;
|
|
5675
|
+
/**
|
|
5676
|
+
* Percentage, rounded to 2 decimals: (likes + comments + shares + saves) / (impressions or reach or views) * 100. Clicks and follows are never counted. The denominator is the FIRST of impressions, reach, views that is non-zero, so it is not the same basis on every post: a post with impressions divides by impressions, one without falls back to reach, then to views. If you need a single consistent basis (e.g. interactions / reach), compute it from the raw fields above. The engagementRate on the LinkedIn account endpoints is a different formula.
|
|
5677
|
+
*/
|
|
5672
5678
|
engagementRate?: number;
|
|
5673
5679
|
lastUpdated?: string;
|
|
5674
5680
|
};
|
|
@@ -15236,7 +15242,7 @@ type GetLinkedInPostAnalyticsResponse = ({
|
|
|
15236
15242
|
*/
|
|
15237
15243
|
views?: number;
|
|
15238
15244
|
/**
|
|
15239
|
-
* Engagement rate as percentage
|
|
15245
|
+
* Engagement rate, as a percentage rounded to 2 decimals: (likes + comments + shares + clicks + saves + sends) / impressions * 100. Unlike PostAnalytics.engagementRate on GET /v1/analytics, this one DOES count clicks and has no fallback denominator, so it is 0 whenever impressions is 0. For organization accounts the value is the rate LinkedIn returns, not one computed here.
|
|
15240
15246
|
*/
|
|
15241
15247
|
engagementRate?: number;
|
|
15242
15248
|
};
|
|
@@ -27453,18 +27459,21 @@ type UpdateAdCampaignStatusData = {
|
|
|
27453
27459
|
};
|
|
27454
27460
|
type UpdateAdCampaignStatusResponse = ({
|
|
27455
27461
|
/**
|
|
27456
|
-
*
|
|
27462
|
+
* The status written to the campaign
|
|
27463
|
+
*/
|
|
27464
|
+
status?: 'active' | 'paused';
|
|
27465
|
+
/**
|
|
27466
|
+
* Number of ads whose own stored status changed too. 0 is normal on a resume whose ads are all awaiting the platform.
|
|
27457
27467
|
*/
|
|
27458
27468
|
updated?: number;
|
|
27459
27469
|
/**
|
|
27460
|
-
* Number of ads
|
|
27470
|
+
* Number of ads whose own status was left as it was
|
|
27461
27471
|
*/
|
|
27462
27472
|
skipped?: number;
|
|
27463
|
-
skippedReasons?: Array<(string)>;
|
|
27464
27473
|
/**
|
|
27465
|
-
*
|
|
27474
|
+
* Why each group of ads was skipped
|
|
27466
27475
|
*/
|
|
27467
|
-
|
|
27476
|
+
skippedReasons?: Array<(string)>;
|
|
27468
27477
|
});
|
|
27469
27478
|
type UpdateAdCampaignStatusError = (unknown | {
|
|
27470
27479
|
error?: string;
|
|
@@ -27774,7 +27783,7 @@ type UpdateAdSetData = {
|
|
|
27774
27783
|
type?: 'daily' | 'lifetime';
|
|
27775
27784
|
};
|
|
27776
27785
|
/**
|
|
27777
|
-
* Omit if not toggling delivery state
|
|
27786
|
+
* Writes the ad set's own on/off switch (Meta: `configured_status`) on Meta and LinkedIn, whatever delivery status its ads report. Omit if not toggling delivery state.
|
|
27778
27787
|
*/
|
|
27779
27788
|
status?: 'active' | 'paused';
|
|
27780
27789
|
/**
|
|
@@ -27879,9 +27888,26 @@ type UpdateAdSetData = {
|
|
|
27879
27888
|
type UpdateAdSetResponse = ({
|
|
27880
27889
|
budget?: AdBudget;
|
|
27881
27890
|
budgetLevel?: 'adset';
|
|
27891
|
+
/**
|
|
27892
|
+
* The status written to the ad set. Absent when nothing was written (see statusMessage).
|
|
27893
|
+
*/
|
|
27882
27894
|
status?: 'active' | 'paused';
|
|
27895
|
+
/**
|
|
27896
|
+
* Number of ads whose own stored status changed alongside the ad set switch
|
|
27897
|
+
*/
|
|
27883
27898
|
statusUpdated?: number;
|
|
27899
|
+
/**
|
|
27900
|
+
* Number of ads whose own status was left as it was
|
|
27901
|
+
*/
|
|
27884
27902
|
statusSkipped?: number;
|
|
27903
|
+
/**
|
|
27904
|
+
* Why each group of ads was skipped
|
|
27905
|
+
*/
|
|
27906
|
+
statusSkippedReasons?: Array<(string)>;
|
|
27907
|
+
/**
|
|
27908
|
+
* Present only where the platform has no ad-set switch and no child ad was actionable; `status` is then absent because nothing was written
|
|
27909
|
+
*/
|
|
27910
|
+
statusMessage?: string;
|
|
27885
27911
|
bidStrategy?: BidStrategy;
|
|
27886
27912
|
bidAmount?: (number) | null;
|
|
27887
27913
|
roasAverageFloor?: (number) | null;
|
|
@@ -27905,8 +27931,26 @@ type UpdateAdSetStatusData = {
|
|
|
27905
27931
|
};
|
|
27906
27932
|
};
|
|
27907
27933
|
type UpdateAdSetStatusResponse = ({
|
|
27934
|
+
/**
|
|
27935
|
+
* The status written to the ad set. Absent when nothing was written (see message).
|
|
27936
|
+
*/
|
|
27937
|
+
status?: 'active' | 'paused';
|
|
27938
|
+
/**
|
|
27939
|
+
* Number of ads whose own stored status changed too. 0 is normal on a resume whose ads are all awaiting the platform.
|
|
27940
|
+
*/
|
|
27908
27941
|
updated?: number;
|
|
27942
|
+
/**
|
|
27943
|
+
* Number of ads whose own status was left as it was
|
|
27944
|
+
*/
|
|
27909
27945
|
skipped?: number;
|
|
27946
|
+
/**
|
|
27947
|
+
* Why each group of ads was skipped
|
|
27948
|
+
*/
|
|
27949
|
+
skippedReasons?: Array<(string)>;
|
|
27950
|
+
/**
|
|
27951
|
+
* Present only where the platform has no ad-set switch and no child ad was actionable
|
|
27952
|
+
*/
|
|
27953
|
+
message?: string;
|
|
27910
27954
|
});
|
|
27911
27955
|
type UpdateAdSetStatusError = (unknown | {
|
|
27912
27956
|
error?: string;
|
|
@@ -30031,7 +30075,7 @@ type CreateStandaloneAdData = {
|
|
|
30031
30075
|
*/
|
|
30032
30076
|
budgetType?: 'daily' | 'lifetime';
|
|
30033
30077
|
/**
|
|
30034
|
-
* Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused
|
|
30078
|
+
* Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/{campaignId}/status with `active` brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: `existingCampaignId` (that campaign may be running and is never touched) or `campaignStatus: ACTIVE`. On TikTok the whole campaign > ad group > ad hierarchy stays paused.
|
|
30035
30079
|
*/
|
|
30036
30080
|
status?: 'ACTIVE' | 'PAUSED';
|
|
30037
30081
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -4051,6 +4051,9 @@ type ExternalPostSummary = {
|
|
|
4051
4051
|
views?: number;
|
|
4052
4052
|
reach?: number;
|
|
4053
4053
|
impressions?: number;
|
|
4054
|
+
/**
|
|
4055
|
+
* Percentage, rounded to 2 decimals. Same definition as PostAnalytics.engagementRate: (likes + comments + shares + saves) / (impressions or reach or views) * 100, where the denominator is the first of the three that is non-zero. Clicks and follows are never counted.
|
|
4056
|
+
*/
|
|
4054
4057
|
engagementRate?: number;
|
|
4055
4058
|
/**
|
|
4056
4059
|
* When these metrics were last refreshed
|
|
@@ -5329,7 +5332,7 @@ type LinkedInAggregateAnalyticsTotalResponse = {
|
|
|
5329
5332
|
*/
|
|
5330
5333
|
sends?: number;
|
|
5331
5334
|
/**
|
|
5332
|
-
* Overall engagement rate as percentage
|
|
5335
|
+
* Overall engagement rate, as a percentage rounded to 2 decimals: (reactions + comments + shares + saves + sends) / impressions * 100. Clicks are not counted, and there is no fallback denominator, so this is 0 whenever impressions is 0. This is NOT the same formula as PostAnalytics.engagementRate on GET /v1/analytics.
|
|
5333
5336
|
*/
|
|
5334
5337
|
engagementRate?: number;
|
|
5335
5338
|
};
|
|
@@ -5669,6 +5672,9 @@ type PostAnalytics = {
|
|
|
5669
5672
|
* Video length in seconds. Currently Instagram Reels only; combine with igReelsAvgWatchTime (ms) to estimate retention. Null when unknown (other platforms, non-video media, or when Instagram does not expose the media URL, e.g. reels with copyrighted audio).
|
|
5670
5673
|
*/
|
|
5671
5674
|
videoDurationSeconds?: (number) | null;
|
|
5675
|
+
/**
|
|
5676
|
+
* Percentage, rounded to 2 decimals: (likes + comments + shares + saves) / (impressions or reach or views) * 100. Clicks and follows are never counted. The denominator is the FIRST of impressions, reach, views that is non-zero, so it is not the same basis on every post: a post with impressions divides by impressions, one without falls back to reach, then to views. If you need a single consistent basis (e.g. interactions / reach), compute it from the raw fields above. The engagementRate on the LinkedIn account endpoints is a different formula.
|
|
5677
|
+
*/
|
|
5672
5678
|
engagementRate?: number;
|
|
5673
5679
|
lastUpdated?: string;
|
|
5674
5680
|
};
|
|
@@ -15236,7 +15242,7 @@ type GetLinkedInPostAnalyticsResponse = ({
|
|
|
15236
15242
|
*/
|
|
15237
15243
|
views?: number;
|
|
15238
15244
|
/**
|
|
15239
|
-
* Engagement rate as percentage
|
|
15245
|
+
* Engagement rate, as a percentage rounded to 2 decimals: (likes + comments + shares + clicks + saves + sends) / impressions * 100. Unlike PostAnalytics.engagementRate on GET /v1/analytics, this one DOES count clicks and has no fallback denominator, so it is 0 whenever impressions is 0. For organization accounts the value is the rate LinkedIn returns, not one computed here.
|
|
15240
15246
|
*/
|
|
15241
15247
|
engagementRate?: number;
|
|
15242
15248
|
};
|
|
@@ -27453,18 +27459,21 @@ type UpdateAdCampaignStatusData = {
|
|
|
27453
27459
|
};
|
|
27454
27460
|
type UpdateAdCampaignStatusResponse = ({
|
|
27455
27461
|
/**
|
|
27456
|
-
*
|
|
27462
|
+
* The status written to the campaign
|
|
27463
|
+
*/
|
|
27464
|
+
status?: 'active' | 'paused';
|
|
27465
|
+
/**
|
|
27466
|
+
* Number of ads whose own stored status changed too. 0 is normal on a resume whose ads are all awaiting the platform.
|
|
27457
27467
|
*/
|
|
27458
27468
|
updated?: number;
|
|
27459
27469
|
/**
|
|
27460
|
-
* Number of ads
|
|
27470
|
+
* Number of ads whose own status was left as it was
|
|
27461
27471
|
*/
|
|
27462
27472
|
skipped?: number;
|
|
27463
|
-
skippedReasons?: Array<(string)>;
|
|
27464
27473
|
/**
|
|
27465
|
-
*
|
|
27474
|
+
* Why each group of ads was skipped
|
|
27466
27475
|
*/
|
|
27467
|
-
|
|
27476
|
+
skippedReasons?: Array<(string)>;
|
|
27468
27477
|
});
|
|
27469
27478
|
type UpdateAdCampaignStatusError = (unknown | {
|
|
27470
27479
|
error?: string;
|
|
@@ -27774,7 +27783,7 @@ type UpdateAdSetData = {
|
|
|
27774
27783
|
type?: 'daily' | 'lifetime';
|
|
27775
27784
|
};
|
|
27776
27785
|
/**
|
|
27777
|
-
* Omit if not toggling delivery state
|
|
27786
|
+
* Writes the ad set's own on/off switch (Meta: `configured_status`) on Meta and LinkedIn, whatever delivery status its ads report. Omit if not toggling delivery state.
|
|
27778
27787
|
*/
|
|
27779
27788
|
status?: 'active' | 'paused';
|
|
27780
27789
|
/**
|
|
@@ -27879,9 +27888,26 @@ type UpdateAdSetData = {
|
|
|
27879
27888
|
type UpdateAdSetResponse = ({
|
|
27880
27889
|
budget?: AdBudget;
|
|
27881
27890
|
budgetLevel?: 'adset';
|
|
27891
|
+
/**
|
|
27892
|
+
* The status written to the ad set. Absent when nothing was written (see statusMessage).
|
|
27893
|
+
*/
|
|
27882
27894
|
status?: 'active' | 'paused';
|
|
27895
|
+
/**
|
|
27896
|
+
* Number of ads whose own stored status changed alongside the ad set switch
|
|
27897
|
+
*/
|
|
27883
27898
|
statusUpdated?: number;
|
|
27899
|
+
/**
|
|
27900
|
+
* Number of ads whose own status was left as it was
|
|
27901
|
+
*/
|
|
27884
27902
|
statusSkipped?: number;
|
|
27903
|
+
/**
|
|
27904
|
+
* Why each group of ads was skipped
|
|
27905
|
+
*/
|
|
27906
|
+
statusSkippedReasons?: Array<(string)>;
|
|
27907
|
+
/**
|
|
27908
|
+
* Present only where the platform has no ad-set switch and no child ad was actionable; `status` is then absent because nothing was written
|
|
27909
|
+
*/
|
|
27910
|
+
statusMessage?: string;
|
|
27885
27911
|
bidStrategy?: BidStrategy;
|
|
27886
27912
|
bidAmount?: (number) | null;
|
|
27887
27913
|
roasAverageFloor?: (number) | null;
|
|
@@ -27905,8 +27931,26 @@ type UpdateAdSetStatusData = {
|
|
|
27905
27931
|
};
|
|
27906
27932
|
};
|
|
27907
27933
|
type UpdateAdSetStatusResponse = ({
|
|
27934
|
+
/**
|
|
27935
|
+
* The status written to the ad set. Absent when nothing was written (see message).
|
|
27936
|
+
*/
|
|
27937
|
+
status?: 'active' | 'paused';
|
|
27938
|
+
/**
|
|
27939
|
+
* Number of ads whose own stored status changed too. 0 is normal on a resume whose ads are all awaiting the platform.
|
|
27940
|
+
*/
|
|
27908
27941
|
updated?: number;
|
|
27942
|
+
/**
|
|
27943
|
+
* Number of ads whose own status was left as it was
|
|
27944
|
+
*/
|
|
27909
27945
|
skipped?: number;
|
|
27946
|
+
/**
|
|
27947
|
+
* Why each group of ads was skipped
|
|
27948
|
+
*/
|
|
27949
|
+
skippedReasons?: Array<(string)>;
|
|
27950
|
+
/**
|
|
27951
|
+
* Present only where the platform has no ad-set switch and no child ad was actionable
|
|
27952
|
+
*/
|
|
27953
|
+
message?: string;
|
|
27910
27954
|
});
|
|
27911
27955
|
type UpdateAdSetStatusError = (unknown | {
|
|
27912
27956
|
error?: string;
|
|
@@ -30031,7 +30075,7 @@ type CreateStandaloneAdData = {
|
|
|
30031
30075
|
*/
|
|
30032
30076
|
budgetType?: 'daily' | 'lifetime';
|
|
30033
30077
|
/**
|
|
30034
|
-
* Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused
|
|
30078
|
+
* Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/{campaignId}/status with `active` brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: `existingCampaignId` (that campaign may be running and is never touched) or `campaignStatus: ACTIVE`. On TikTok the whole campaign > ad group > ad hierarchy stays paused.
|
|
30035
30079
|
*/
|
|
30036
30080
|
status?: 'ACTIVE' | 'PAUSED';
|
|
30037
30081
|
/**
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
36
36
|
// package.json
|
|
37
37
|
var package_default = {
|
|
38
38
|
name: "@getlatedev/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.582",
|
|
40
40
|
description: "The official Node.js library for the Zernio API",
|
|
41
41
|
main: "dist/index.js",
|
|
42
42
|
module: "dist/index.mjs",
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5
5
|
// package.json
|
|
6
6
|
var package_default = {
|
|
7
7
|
name: "@getlatedev/node",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.582",
|
|
9
9
|
description: "The official Node.js library for the Zernio API",
|
|
10
10
|
main: "dist/index.js",
|
|
11
11
|
module: "dist/index.mjs",
|
package/package.json
CHANGED
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -7109,8 +7109,20 @@ export const createAdCampaign = <ThrowOnError extends boolean = false>(options:
|
|
|
7109
7109
|
|
|
7110
7110
|
/**
|
|
7111
7111
|
* Pause or resume a campaign
|
|
7112
|
-
*
|
|
7113
|
-
*
|
|
7112
|
+
* Writes the campaign's own on/off switch, then lets the platform cascade delivery to its ad sets and ads.
|
|
7113
|
+
* Makes one platform API call, not one per ad.
|
|
7114
|
+
*
|
|
7115
|
+
* The switch is always written, whatever delivery status the ads underneath report: an ad still in review
|
|
7116
|
+
* does not block resuming its campaign. The echoed `status` is the confirmation that it landed.
|
|
7117
|
+
*
|
|
7118
|
+
* `updated` / `skipped` describe only the ads whose own stored status CHANGED alongside it, so
|
|
7119
|
+
* `updated: 0` is a normal successful response, not a no-op. Ads are skipped when they are in a terminal
|
|
7120
|
+
* status (rejected, completed, cancelled), already in the target state, or switched on but not yet
|
|
7121
|
+
* delivering — the last group keeps its `pending_review` / `error` status until the platform reports what
|
|
7122
|
+
* it became. `skippedReasons` names which case applies.
|
|
7123
|
+
*
|
|
7124
|
+
* On Meta this flips the campaign only. An ad set paused in its own right stays paused, so pair this with
|
|
7125
|
+
* PUT /v1/ads/ad-sets/{adSetId}/status when you also need the ad set switched back on.
|
|
7114
7126
|
*
|
|
7115
7127
|
*/
|
|
7116
7128
|
export const updateAdCampaignStatus = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAdCampaignStatusData, ThrowOnError>) => {
|
|
@@ -7328,6 +7340,23 @@ export const updateAdSet = <ThrowOnError extends boolean = false>(options: Optio
|
|
|
7328
7340
|
* status toggle and prefer a symmetric URL to
|
|
7329
7341
|
* /v1/ads/campaigns/{campaignId}/status.
|
|
7330
7342
|
*
|
|
7343
|
+
* On Meta and LinkedIn this writes the ad set's own on/off switch
|
|
7344
|
+
* (Meta: `configured_status`), whatever delivery status its ads report —
|
|
7345
|
+
* an ad still in review does not block resuming its ad set. The echoed
|
|
7346
|
+
* `status` is the confirmation that it landed. Where the platform has no
|
|
7347
|
+
* ad-set switch (TikTok and others) the toggle is emulated by flipping the
|
|
7348
|
+
* child ads; a call with no actionable ad then writes nothing and returns a
|
|
7349
|
+
* `message` with no `status`.
|
|
7350
|
+
*
|
|
7351
|
+
* `updated` / `skipped` describe only the ads whose own stored status
|
|
7352
|
+
* CHANGED alongside the switch, so `updated: 0` is a normal successful
|
|
7353
|
+
* response. See `skippedReasons` for which of the three cases applies
|
|
7354
|
+
* (terminal, already in the target state, or switched on but not yet
|
|
7355
|
+
* delivering).
|
|
7356
|
+
*
|
|
7357
|
+
* A campaign created paused needs its campaign resumed as well: pair this
|
|
7358
|
+
* with PUT /v1/ads/campaigns/{campaignId}/status.
|
|
7359
|
+
*
|
|
7331
7360
|
*/
|
|
7332
7361
|
export const updateAdSetStatus = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAdSetStatusData, ThrowOnError>) => {
|
|
7333
7362
|
return (options?.client ?? client).put<UpdateAdSetStatusResponse, UpdateAdSetStatusError, ThrowOnError>({
|
|
@@ -2852,6 +2852,9 @@ export type ExternalPostSummary = {
|
|
|
2852
2852
|
views?: number;
|
|
2853
2853
|
reach?: number;
|
|
2854
2854
|
impressions?: number;
|
|
2855
|
+
/**
|
|
2856
|
+
* Percentage, rounded to 2 decimals. Same definition as PostAnalytics.engagementRate: (likes + comments + shares + saves) / (impressions or reach or views) * 100, where the denominator is the first of the three that is non-zero. Clicks and follows are never counted.
|
|
2857
|
+
*/
|
|
2855
2858
|
engagementRate?: number;
|
|
2856
2859
|
/**
|
|
2857
2860
|
* When these metrics were last refreshed
|
|
@@ -4174,7 +4177,7 @@ export type LinkedInAggregateAnalyticsTotalResponse = {
|
|
|
4174
4177
|
*/
|
|
4175
4178
|
sends?: number;
|
|
4176
4179
|
/**
|
|
4177
|
-
* Overall engagement rate as percentage
|
|
4180
|
+
* Overall engagement rate, as a percentage rounded to 2 decimals: (reactions + comments + shares + saves + sends) / impressions * 100. Clicks are not counted, and there is no fallback denominator, so this is 0 whenever impressions is 0. This is NOT the same formula as PostAnalytics.engagementRate on GET /v1/analytics.
|
|
4178
4181
|
*/
|
|
4179
4182
|
engagementRate?: number;
|
|
4180
4183
|
};
|
|
@@ -4538,6 +4541,9 @@ export type PostAnalytics = {
|
|
|
4538
4541
|
* Video length in seconds. Currently Instagram Reels only; combine with igReelsAvgWatchTime (ms) to estimate retention. Null when unknown (other platforms, non-video media, or when Instagram does not expose the media URL, e.g. reels with copyrighted audio).
|
|
4539
4542
|
*/
|
|
4540
4543
|
videoDurationSeconds?: (number) | null;
|
|
4544
|
+
/**
|
|
4545
|
+
* Percentage, rounded to 2 decimals: (likes + comments + shares + saves) / (impressions or reach or views) * 100. Clicks and follows are never counted. The denominator is the FIRST of impressions, reach, views that is non-zero, so it is not the same basis on every post: a post with impressions divides by impressions, one without falls back to reach, then to views. If you need a single consistent basis (e.g. interactions / reach), compute it from the raw fields above. The engagementRate on the LinkedIn account endpoints is a different formula.
|
|
4546
|
+
*/
|
|
4541
4547
|
engagementRate?: number;
|
|
4542
4548
|
lastUpdated?: string;
|
|
4543
4549
|
};
|
|
@@ -14668,7 +14674,7 @@ export type GetLinkedInPostAnalyticsResponse = ({
|
|
|
14668
14674
|
*/
|
|
14669
14675
|
views?: number;
|
|
14670
14676
|
/**
|
|
14671
|
-
* Engagement rate as percentage
|
|
14677
|
+
* Engagement rate, as a percentage rounded to 2 decimals: (likes + comments + shares + clicks + saves + sends) / impressions * 100. Unlike PostAnalytics.engagementRate on GET /v1/analytics, this one DOES count clicks and has no fallback denominator, so it is 0 whenever impressions is 0. For organization accounts the value is the rate LinkedIn returns, not one computed here.
|
|
14672
14678
|
*/
|
|
14673
14679
|
engagementRate?: number;
|
|
14674
14680
|
};
|
|
@@ -27826,18 +27832,21 @@ export type UpdateAdCampaignStatusData = {
|
|
|
27826
27832
|
|
|
27827
27833
|
export type UpdateAdCampaignStatusResponse = ({
|
|
27828
27834
|
/**
|
|
27829
|
-
*
|
|
27835
|
+
* The status written to the campaign
|
|
27836
|
+
*/
|
|
27837
|
+
status?: 'active' | 'paused';
|
|
27838
|
+
/**
|
|
27839
|
+
* Number of ads whose own stored status changed too. 0 is normal on a resume whose ads are all awaiting the platform.
|
|
27830
27840
|
*/
|
|
27831
27841
|
updated?: number;
|
|
27832
27842
|
/**
|
|
27833
|
-
* Number of ads
|
|
27843
|
+
* Number of ads whose own status was left as it was
|
|
27834
27844
|
*/
|
|
27835
27845
|
skipped?: number;
|
|
27836
|
-
skippedReasons?: Array<(string)>;
|
|
27837
27846
|
/**
|
|
27838
|
-
*
|
|
27847
|
+
* Why each group of ads was skipped
|
|
27839
27848
|
*/
|
|
27840
|
-
|
|
27849
|
+
skippedReasons?: Array<(string)>;
|
|
27841
27850
|
});
|
|
27842
27851
|
|
|
27843
27852
|
export type UpdateAdCampaignStatusError = (unknown | {
|
|
@@ -28170,7 +28179,7 @@ export type UpdateAdSetData = {
|
|
|
28170
28179
|
type?: 'daily' | 'lifetime';
|
|
28171
28180
|
};
|
|
28172
28181
|
/**
|
|
28173
|
-
* Omit if not toggling delivery state
|
|
28182
|
+
* Writes the ad set's own on/off switch (Meta: `configured_status`) on Meta and LinkedIn, whatever delivery status its ads report. Omit if not toggling delivery state.
|
|
28174
28183
|
*/
|
|
28175
28184
|
status?: 'active' | 'paused';
|
|
28176
28185
|
/**
|
|
@@ -28276,9 +28285,26 @@ export type UpdateAdSetData = {
|
|
|
28276
28285
|
export type UpdateAdSetResponse = ({
|
|
28277
28286
|
budget?: AdBudget;
|
|
28278
28287
|
budgetLevel?: 'adset';
|
|
28288
|
+
/**
|
|
28289
|
+
* The status written to the ad set. Absent when nothing was written (see statusMessage).
|
|
28290
|
+
*/
|
|
28279
28291
|
status?: 'active' | 'paused';
|
|
28292
|
+
/**
|
|
28293
|
+
* Number of ads whose own stored status changed alongside the ad set switch
|
|
28294
|
+
*/
|
|
28280
28295
|
statusUpdated?: number;
|
|
28296
|
+
/**
|
|
28297
|
+
* Number of ads whose own status was left as it was
|
|
28298
|
+
*/
|
|
28281
28299
|
statusSkipped?: number;
|
|
28300
|
+
/**
|
|
28301
|
+
* Why each group of ads was skipped
|
|
28302
|
+
*/
|
|
28303
|
+
statusSkippedReasons?: Array<(string)>;
|
|
28304
|
+
/**
|
|
28305
|
+
* Present only where the platform has no ad-set switch and no child ad was actionable; `status` is then absent because nothing was written
|
|
28306
|
+
*/
|
|
28307
|
+
statusMessage?: string;
|
|
28282
28308
|
bidStrategy?: BidStrategy;
|
|
28283
28309
|
bidAmount?: (number) | null;
|
|
28284
28310
|
roasAverageFloor?: (number) | null;
|
|
@@ -28305,8 +28331,26 @@ export type UpdateAdSetStatusData = {
|
|
|
28305
28331
|
};
|
|
28306
28332
|
|
|
28307
28333
|
export type UpdateAdSetStatusResponse = ({
|
|
28334
|
+
/**
|
|
28335
|
+
* The status written to the ad set. Absent when nothing was written (see message).
|
|
28336
|
+
*/
|
|
28337
|
+
status?: 'active' | 'paused';
|
|
28338
|
+
/**
|
|
28339
|
+
* Number of ads whose own stored status changed too. 0 is normal on a resume whose ads are all awaiting the platform.
|
|
28340
|
+
*/
|
|
28308
28341
|
updated?: number;
|
|
28342
|
+
/**
|
|
28343
|
+
* Number of ads whose own status was left as it was
|
|
28344
|
+
*/
|
|
28309
28345
|
skipped?: number;
|
|
28346
|
+
/**
|
|
28347
|
+
* Why each group of ads was skipped
|
|
28348
|
+
*/
|
|
28349
|
+
skippedReasons?: Array<(string)>;
|
|
28350
|
+
/**
|
|
28351
|
+
* Present only where the platform has no ad-set switch and no child ad was actionable
|
|
28352
|
+
*/
|
|
28353
|
+
message?: string;
|
|
28310
28354
|
});
|
|
28311
28355
|
|
|
28312
28356
|
export type UpdateAdSetStatusError = (unknown | {
|
|
@@ -30568,7 +30612,7 @@ export type CreateStandaloneAdData = {
|
|
|
30568
30612
|
*/
|
|
30569
30613
|
budgetType?: 'daily' | 'lifetime';
|
|
30570
30614
|
/**
|
|
30571
|
-
* Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused
|
|
30615
|
+
* Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/{campaignId}/status with `active` brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: `existingCampaignId` (that campaign may be running and is never touched) or `campaignStatus: ACTIVE`. On TikTok the whole campaign > ad group > ad hierarchy stays paused.
|
|
30572
30616
|
*/
|
|
30573
30617
|
status?: 'ACTIVE' | 'PAUSED';
|
|
30574
30618
|
/**
|