@getlatedev/node 0.2.1211 → 0.2.1213
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 +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +21 -6
- package/src/generated/types.gen.ts +5 -1
package/dist/index.d.mts
CHANGED
|
@@ -49196,9 +49196,13 @@ type UploadAdVideoData = {
|
|
|
49196
49196
|
*/
|
|
49197
49197
|
videoBase64?: string;
|
|
49198
49198
|
/**
|
|
49199
|
-
* Optional
|
|
49199
|
+
* Optional file name, sent to Meta as the video's name and title so it shows and is searchable in the Ads Manager media library. Applies to both videoUrl and videoBase64. Without it (and without name), a videoUrl upload is named after the last path segment of the URL.
|
|
49200
49200
|
*/
|
|
49201
49201
|
filename?: string;
|
|
49202
|
+
/**
|
|
49203
|
+
* Optional video name shown in the Ads Manager media library. Takes precedence over filename.
|
|
49204
|
+
*/
|
|
49205
|
+
name?: string;
|
|
49202
49206
|
/**
|
|
49203
49207
|
* true: answer 202 once Meta accepts the upload instead of waiting for processing. Poll GET /v1/ads/videos/{videoId} or subscribe to ad.video.processed.
|
|
49204
49208
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -49196,9 +49196,13 @@ type UploadAdVideoData = {
|
|
|
49196
49196
|
*/
|
|
49197
49197
|
videoBase64?: string;
|
|
49198
49198
|
/**
|
|
49199
|
-
* Optional
|
|
49199
|
+
* Optional file name, sent to Meta as the video's name and title so it shows and is searchable in the Ads Manager media library. Applies to both videoUrl and videoBase64. Without it (and without name), a videoUrl upload is named after the last path segment of the URL.
|
|
49200
49200
|
*/
|
|
49201
49201
|
filename?: string;
|
|
49202
|
+
/**
|
|
49203
|
+
* Optional video name shown in the Ads Manager media library. Takes precedence over filename.
|
|
49204
|
+
*/
|
|
49205
|
+
name?: string;
|
|
49202
49206
|
/**
|
|
49203
49207
|
* true: answer 202 once Meta accepts the upload instead of waiting for processing. Poll GET /v1/ads/videos/{videoId} or subscribe to ad.video.processed.
|
|
49204
49208
|
*/
|
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.1213",
|
|
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.1213",
|
|
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
|
@@ -10101,9 +10101,11 @@ export const updateAdCampaign = <ThrowOnError extends boolean = false>(options:
|
|
|
10101
10101
|
|
|
10102
10102
|
/**
|
|
10103
10103
|
* Delete a campaign
|
|
10104
|
-
* Deletes a campaign
|
|
10104
|
+
* Deletes a campaign on its platform, including a campaign that never got any ads.
|
|
10105
10105
|
*
|
|
10106
|
-
*
|
|
10106
|
+
* Only the campaign itself is sent to the platform. Meta, Google, TikTok, LinkedIn
|
|
10107
|
+
* and X delete it; OpenAI, Reddit and Pinterest have no campaign delete and archive
|
|
10108
|
+
* it instead (see below). Locally, all Ad documents for this campaign are marked
|
|
10107
10109
|
* `status: cancelled`.
|
|
10108
10110
|
*
|
|
10109
10111
|
* **Empty campaigns.** A campaign with zero ads has no local Ad documents
|
|
@@ -10111,21 +10113,34 @@ export const updateAdCampaign = <ThrowOnError extends boolean = false>(options:
|
|
|
10111
10113
|
* 404. That state is produced by the two-step create flow (campaign, then
|
|
10112
10114
|
* ads via `existingCampaignId`) whenever Meta rejects the ad step. To
|
|
10113
10115
|
* delete such a shell, send `accountId` in the body or the query string:
|
|
10114
|
-
* we skip the local lookup entirely and forward the delete to
|
|
10115
|
-
*
|
|
10116
|
+
* we skip the local lookup entirely and forward the delete to the platform
|
|
10117
|
+
* of that connection. Google, TikTok, LinkedIn, Pinterest and Reddit take the
|
|
10118
|
+
* ad account from the synced campaign (OpenAI needs none); when the campaign
|
|
10119
|
+
* was never synced (or is synced under several ad accounts) the answer is 409
|
|
10120
|
+
* `invalid_resource_state` on `campaignId` and nothing is deleted: sync the ad
|
|
10121
|
+
* account and retry. Before deleting on Google, TikTok, LinkedIn, Pinterest,
|
|
10122
|
+
* OpenAI or Reddit, Zernio asks the platform whether the campaign still holds
|
|
10123
|
+
* ad groups or ads (Google asset groups count; on LinkedIn, campaigns inside
|
|
10124
|
+
* the campaign group). If it does, or the platform cannot confirm it has none
|
|
10125
|
+
* (a TikTok Smart+ campaign), the answer is 409 `invalid_resource_state` on
|
|
10126
|
+
* `campaignId` and nothing is deleted: sync the ad account and delete the
|
|
10127
|
+
* campaign again so its ads are cancelled with it, or delete them on the
|
|
10128
|
+
* platform first. On X the ad account comes
|
|
10116
10129
|
* from the synced campaign, which wins over `adAccountId`; when the campaign
|
|
10117
10130
|
* was never synced, send `adAccountId` too. Before deleting, Zernio asks X
|
|
10118
10131
|
* whether the campaign still holds undeleted line items (ads not synced
|
|
10119
10132
|
* yet); if it does the answer is 409 `invalid_field_value` on `campaignId`
|
|
10120
10133
|
* and nothing is deleted. Sync the ad account and retry when those line items
|
|
10121
10134
|
* hold promoted posts; line items without promoted posts never sync, so delete
|
|
10122
|
-
* them in X Ads Manager first.
|
|
10123
|
-
* `accountId` is ignored when the campaign does have ads.
|
|
10135
|
+
* them in X Ads Manager first. `accountId` is ignored when the campaign does have ads.
|
|
10124
10136
|
*
|
|
10125
10137
|
* Reddit Ads has no delete: the campaign is archived instead (`configured_status`
|
|
10126
10138
|
* ARCHIVED), which stops delivery for good. Its ad groups and ads keep their own
|
|
10127
10139
|
* switches but cannot deliver under an archived campaign.
|
|
10128
10140
|
*
|
|
10141
|
+
* OpenAI Ads has no delete either: the campaign is archived (state `archive`).
|
|
10142
|
+
* Its ad groups and ads are not touched on OpenAI.
|
|
10143
|
+
*
|
|
10129
10144
|
*/
|
|
10130
10145
|
export const deleteAdCampaign = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteAdCampaignData, ThrowOnError>) => {
|
|
10131
10146
|
return (options?.client ?? client).delete<DeleteAdCampaignResponse, DeleteAdCampaignError, ThrowOnError>({
|
|
@@ -50047,9 +50047,13 @@ export type UploadAdVideoData = {
|
|
|
50047
50047
|
*/
|
|
50048
50048
|
videoBase64?: string;
|
|
50049
50049
|
/**
|
|
50050
|
-
* Optional
|
|
50050
|
+
* Optional file name, sent to Meta as the video's name and title so it shows and is searchable in the Ads Manager media library. Applies to both videoUrl and videoBase64. Without it (and without name), a videoUrl upload is named after the last path segment of the URL.
|
|
50051
50051
|
*/
|
|
50052
50052
|
filename?: string;
|
|
50053
|
+
/**
|
|
50054
|
+
* Optional video name shown in the Ads Manager media library. Takes precedence over filename.
|
|
50055
|
+
*/
|
|
50056
|
+
name?: string;
|
|
50053
50057
|
/**
|
|
50054
50058
|
* true: answer 202 once Meta accepts the upload instead of waiting for processing. Poll GET /v1/ads/videos/{videoId} or subscribe to ad.video.processed.
|
|
50055
50059
|
*/
|