@getlatedev/node 0.2.1095 → 0.2.1097
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 +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +4 -1
- package/src/generated/types.gen.ts +31 -1
package/dist/index.d.mts
CHANGED
|
@@ -6961,6 +6961,16 @@ type ErrorResponse = {
|
|
|
6961
6961
|
* create with a 5xx or dropped the connection and Zernio could not confirm
|
|
6962
6962
|
* whether the object exists: check that parent before creating it again.
|
|
6963
6963
|
*
|
|
6964
|
+
* When Meta refuses a write because the ad account's status is ineligible to manage
|
|
6965
|
+
* ads (Meta subcode 2490592 or 4841021, on the write itself or on a cleanup delete),
|
|
6966
|
+
* any Meta ads write (create, boost, CTWA, campaign / ad set / ad updates and status
|
|
6967
|
+
* changes) answers 422 `ad_account_unusable`. The message names the ad account when
|
|
6968
|
+
* known, links Meta's fix (https://www.facebook.com/business/help/422289316306981),
|
|
6969
|
+
* lists the objects left behind and ends with Meta's original error, which also stays
|
|
6970
|
+
* verbatim in `platformError`. Meta often reports the first failure under an
|
|
6971
|
+
* unrelated code (e.g. 1487194 on the creative), so branch on `code`, not on
|
|
6972
|
+
* `platformError`.
|
|
6973
|
+
*
|
|
6964
6974
|
*/
|
|
6965
6975
|
details?: {
|
|
6966
6976
|
/**
|
|
@@ -44791,9 +44801,29 @@ type BoostPostData = {
|
|
|
44791
44801
|
*/
|
|
44792
44802
|
leadGenFormId?: string;
|
|
44793
44803
|
/**
|
|
44794
|
-
* Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default); PAUSED pauses only the top-most object this boost creates and switches everything below it on: a new campaign is held paused with its ad set and ad on (one PUT /v1/ads/campaigns/{campaignId}/status with `active` brings it live); into an existing campaign (TikTok `existingCampaignId`) the new ad set is held paused; attached to an existing ad set (`adSetId`) the new ad itself is paused. On LinkedIn the held campaign group is PAUSED, its campaign and creative ACTIVE. X has no per-ad switch, so its lowest level is the line item.
|
|
44804
|
+
* Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default); PAUSED pauses only the top-most object this boost creates and switches everything below it on: a new campaign is held paused with its ad set and ad on (one PUT /v1/ads/campaigns/{campaignId}/status with `active` brings it live); into an existing campaign (TikTok `existingCampaignId`) the new ad set is held paused; attached to an existing ad set (`adSetId`) the new ad itself is paused. On LinkedIn the held campaign group is PAUSED, its campaign and creative ACTIVE. X has no per-ad switch, so its lowest level is the line item. `campaignStatus`, `adSetStatus` and `adStatus` set one level each and always win for that level; `status: PAUSED` adds a hold of its own only when none of them is PAUSED. To create every object paused, send all three as PAUSED.
|
|
44795
44805
|
*/
|
|
44796
44806
|
status?: 'ACTIVE' | 'PAUSED';
|
|
44807
|
+
/**
|
|
44808
|
+
* Every platform, same semantics as POST /v1/ads/create. Sets the switch of the new campaign alone (LinkedIn: the campaign group) and overrides `status` for it. `ACTIVE` with `status: PAUSED` switches the campaign on and holds the new ad set paused (its ad on). Omitted, it follows `status`. Rejected with a 400 alongside `adSetId` or `existingCampaignId`, where no campaign is created (change an existing one with PUT /v1/ads/campaigns/{campaignId}/status).
|
|
44809
|
+
*/
|
|
44810
|
+
campaignStatus?: 'ACTIVE' | 'PAUSED';
|
|
44811
|
+
/**
|
|
44812
|
+
* Every platform, same semantics as POST /v1/ads/create. Sets the switch of the new ad set alone (Google, TikTok and Pinterest: the ad group; LinkedIn: the campaign, which stays DRAFT when held; X: the line item) and overrides `status` for it. Omitted, it follows `status`.
|
|
44813
|
+
*
|
|
44814
|
+
* Precedence: a level status (`campaignStatus`, `adSetStatus`, `adStatus`) always wins for its level. `status: PAUSED` then holds the top-most new object that has no level status, and only when no level status is PAUSED; every other new object is switched on. So `campaignStatus: ACTIVE` + `adSetStatus: PAUSED` + `adStatus: PAUSED` keeps the campaign on with the new ad set and ad off, and all three PAUSED create the whole tree paused.
|
|
44815
|
+
*
|
|
44816
|
+
* Rejected with a 400 alongside `adSetId` (that ad set already exists; change it with PUT /v1/ads/ad-sets/{adSetId}/status).
|
|
44817
|
+
*
|
|
44818
|
+
*/
|
|
44819
|
+
adSetStatus?: 'ACTIVE' | 'PAUSED';
|
|
44820
|
+
/**
|
|
44821
|
+
* Sets the switch of the new ad alone, also when attaching to an existing ad set with `adSetId` (Meta, TikTok Smart+), and overrides `status` for it. Same precedence as `adSetStatus`. Omitted, it follows `status`.
|
|
44822
|
+
*
|
|
44823
|
+
* X returns a 400: a promoted post has no switch of its own, so hold the line item with `adSetStatus`.
|
|
44824
|
+
*
|
|
44825
|
+
*/
|
|
44826
|
+
adStatus?: AdActivationStatus;
|
|
44797
44827
|
/**
|
|
44798
44828
|
* Meta only, same semantics as POST /v1/ads/create: campaign = Advantage campaign budget (CBO), the budget and bid strategy sit on the campaign and the ad set inherits them. Default adset. Not allowed with adSetId.
|
|
44799
44829
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -6961,6 +6961,16 @@ type ErrorResponse = {
|
|
|
6961
6961
|
* create with a 5xx or dropped the connection and Zernio could not confirm
|
|
6962
6962
|
* whether the object exists: check that parent before creating it again.
|
|
6963
6963
|
*
|
|
6964
|
+
* When Meta refuses a write because the ad account's status is ineligible to manage
|
|
6965
|
+
* ads (Meta subcode 2490592 or 4841021, on the write itself or on a cleanup delete),
|
|
6966
|
+
* any Meta ads write (create, boost, CTWA, campaign / ad set / ad updates and status
|
|
6967
|
+
* changes) answers 422 `ad_account_unusable`. The message names the ad account when
|
|
6968
|
+
* known, links Meta's fix (https://www.facebook.com/business/help/422289316306981),
|
|
6969
|
+
* lists the objects left behind and ends with Meta's original error, which also stays
|
|
6970
|
+
* verbatim in `platformError`. Meta often reports the first failure under an
|
|
6971
|
+
* unrelated code (e.g. 1487194 on the creative), so branch on `code`, not on
|
|
6972
|
+
* `platformError`.
|
|
6973
|
+
*
|
|
6964
6974
|
*/
|
|
6965
6975
|
details?: {
|
|
6966
6976
|
/**
|
|
@@ -44791,9 +44801,29 @@ type BoostPostData = {
|
|
|
44791
44801
|
*/
|
|
44792
44802
|
leadGenFormId?: string;
|
|
44793
44803
|
/**
|
|
44794
|
-
* Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default); PAUSED pauses only the top-most object this boost creates and switches everything below it on: a new campaign is held paused with its ad set and ad on (one PUT /v1/ads/campaigns/{campaignId}/status with `active` brings it live); into an existing campaign (TikTok `existingCampaignId`) the new ad set is held paused; attached to an existing ad set (`adSetId`) the new ad itself is paused. On LinkedIn the held campaign group is PAUSED, its campaign and creative ACTIVE. X has no per-ad switch, so its lowest level is the line item.
|
|
44804
|
+
* Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default); PAUSED pauses only the top-most object this boost creates and switches everything below it on: a new campaign is held paused with its ad set and ad on (one PUT /v1/ads/campaigns/{campaignId}/status with `active` brings it live); into an existing campaign (TikTok `existingCampaignId`) the new ad set is held paused; attached to an existing ad set (`adSetId`) the new ad itself is paused. On LinkedIn the held campaign group is PAUSED, its campaign and creative ACTIVE. X has no per-ad switch, so its lowest level is the line item. `campaignStatus`, `adSetStatus` and `adStatus` set one level each and always win for that level; `status: PAUSED` adds a hold of its own only when none of them is PAUSED. To create every object paused, send all three as PAUSED.
|
|
44795
44805
|
*/
|
|
44796
44806
|
status?: 'ACTIVE' | 'PAUSED';
|
|
44807
|
+
/**
|
|
44808
|
+
* Every platform, same semantics as POST /v1/ads/create. Sets the switch of the new campaign alone (LinkedIn: the campaign group) and overrides `status` for it. `ACTIVE` with `status: PAUSED` switches the campaign on and holds the new ad set paused (its ad on). Omitted, it follows `status`. Rejected with a 400 alongside `adSetId` or `existingCampaignId`, where no campaign is created (change an existing one with PUT /v1/ads/campaigns/{campaignId}/status).
|
|
44809
|
+
*/
|
|
44810
|
+
campaignStatus?: 'ACTIVE' | 'PAUSED';
|
|
44811
|
+
/**
|
|
44812
|
+
* Every platform, same semantics as POST /v1/ads/create. Sets the switch of the new ad set alone (Google, TikTok and Pinterest: the ad group; LinkedIn: the campaign, which stays DRAFT when held; X: the line item) and overrides `status` for it. Omitted, it follows `status`.
|
|
44813
|
+
*
|
|
44814
|
+
* Precedence: a level status (`campaignStatus`, `adSetStatus`, `adStatus`) always wins for its level. `status: PAUSED` then holds the top-most new object that has no level status, and only when no level status is PAUSED; every other new object is switched on. So `campaignStatus: ACTIVE` + `adSetStatus: PAUSED` + `adStatus: PAUSED` keeps the campaign on with the new ad set and ad off, and all three PAUSED create the whole tree paused.
|
|
44815
|
+
*
|
|
44816
|
+
* Rejected with a 400 alongside `adSetId` (that ad set already exists; change it with PUT /v1/ads/ad-sets/{adSetId}/status).
|
|
44817
|
+
*
|
|
44818
|
+
*/
|
|
44819
|
+
adSetStatus?: 'ACTIVE' | 'PAUSED';
|
|
44820
|
+
/**
|
|
44821
|
+
* Sets the switch of the new ad alone, also when attaching to an existing ad set with `adSetId` (Meta, TikTok Smart+), and overrides `status` for it. Same precedence as `adSetStatus`. Omitted, it follows `status`.
|
|
44822
|
+
*
|
|
44823
|
+
* X returns a 400: a promoted post has no switch of its own, so hold the line item with `adSetStatus`.
|
|
44824
|
+
*
|
|
44825
|
+
*/
|
|
44826
|
+
adStatus?: AdActivationStatus;
|
|
44797
44827
|
/**
|
|
44798
44828
|
* Meta only, same semantics as POST /v1/ads/create: campaign = Advantage campaign budget (CBO), the budget and bid strategy sit on the campaign and the ad set inherits them. Default adset. Not allowed with adSetId.
|
|
44799
44829
|
*/
|
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.1097",
|
|
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.1097",
|
|
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
|
@@ -10228,7 +10228,10 @@ export const updateAd = <ThrowOnError extends boolean = false>(options: OptionsL
|
|
|
10228
10228
|
|
|
10229
10229
|
/**
|
|
10230
10230
|
* Cancel an ad
|
|
10231
|
-
*
|
|
10231
|
+
* Deletes the ad on the platform and marks it as cancelled in the database. The ad is preserved for history. OpenAI Ads has no delete API; the ad is archived instead (a terminal state, the closest equivalent).
|
|
10232
|
+
*
|
|
10233
|
+
* Only the ad is deleted; a campaign or ad set is never deleted while it still holds another ad. On Meta, when the ad set and campaign were created by Zernio (by `POST /v1/ads/create` or `POST /v1/ads/boost`) and Meta lists no other ad in the ad set (archived ads count), the emptied ad set is deleted too, then the campaign once it holds no other ad set. Parents created outside Zernio, and the parents of an ad imported from the platform, are always kept. To delete a whole campaign on purpose use `DELETE /v1/ads/campaigns/{campaignId}`.
|
|
10234
|
+
*
|
|
10232
10235
|
*/
|
|
10233
10236
|
export const deleteAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteAdData, ThrowOnError>) => {
|
|
10234
10237
|
return (options?.client ?? client).delete<DeleteAdResponse, DeleteAdError, ThrowOnError>({
|
|
@@ -5183,6 +5183,16 @@ export type ErrorResponse = {
|
|
|
5183
5183
|
* create with a 5xx or dropped the connection and Zernio could not confirm
|
|
5184
5184
|
* whether the object exists: check that parent before creating it again.
|
|
5185
5185
|
*
|
|
5186
|
+
* When Meta refuses a write because the ad account's status is ineligible to manage
|
|
5187
|
+
* ads (Meta subcode 2490592 or 4841021, on the write itself or on a cleanup delete),
|
|
5188
|
+
* any Meta ads write (create, boost, CTWA, campaign / ad set / ad updates and status
|
|
5189
|
+
* changes) answers 422 `ad_account_unusable`. The message names the ad account when
|
|
5190
|
+
* known, links Meta's fix (https://www.facebook.com/business/help/422289316306981),
|
|
5191
|
+
* lists the objects left behind and ends with Meta's original error, which also stays
|
|
5192
|
+
* verbatim in `platformError`. Meta often reports the first failure under an
|
|
5193
|
+
* unrelated code (e.g. 1487194 on the creative), so branch on `code`, not on
|
|
5194
|
+
* `platformError`.
|
|
5195
|
+
*
|
|
5186
5196
|
*/
|
|
5187
5197
|
details?: {
|
|
5188
5198
|
/**
|
|
@@ -45510,9 +45520,29 @@ export type BoostPostData = {
|
|
|
45510
45520
|
*/
|
|
45511
45521
|
leadGenFormId?: string;
|
|
45512
45522
|
/**
|
|
45513
|
-
* Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default); PAUSED pauses only the top-most object this boost creates and switches everything below it on: a new campaign is held paused with its ad set and ad on (one PUT /v1/ads/campaigns/{campaignId}/status with `active` brings it live); into an existing campaign (TikTok `existingCampaignId`) the new ad set is held paused; attached to an existing ad set (`adSetId`) the new ad itself is paused. On LinkedIn the held campaign group is PAUSED, its campaign and creative ACTIVE. X has no per-ad switch, so its lowest level is the line item.
|
|
45523
|
+
* Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default); PAUSED pauses only the top-most object this boost creates and switches everything below it on: a new campaign is held paused with its ad set and ad on (one PUT /v1/ads/campaigns/{campaignId}/status with `active` brings it live); into an existing campaign (TikTok `existingCampaignId`) the new ad set is held paused; attached to an existing ad set (`adSetId`) the new ad itself is paused. On LinkedIn the held campaign group is PAUSED, its campaign and creative ACTIVE. X has no per-ad switch, so its lowest level is the line item. `campaignStatus`, `adSetStatus` and `adStatus` set one level each and always win for that level; `status: PAUSED` adds a hold of its own only when none of them is PAUSED. To create every object paused, send all three as PAUSED.
|
|
45514
45524
|
*/
|
|
45515
45525
|
status?: 'ACTIVE' | 'PAUSED';
|
|
45526
|
+
/**
|
|
45527
|
+
* Every platform, same semantics as POST /v1/ads/create. Sets the switch of the new campaign alone (LinkedIn: the campaign group) and overrides `status` for it. `ACTIVE` with `status: PAUSED` switches the campaign on and holds the new ad set paused (its ad on). Omitted, it follows `status`. Rejected with a 400 alongside `adSetId` or `existingCampaignId`, where no campaign is created (change an existing one with PUT /v1/ads/campaigns/{campaignId}/status).
|
|
45528
|
+
*/
|
|
45529
|
+
campaignStatus?: 'ACTIVE' | 'PAUSED';
|
|
45530
|
+
/**
|
|
45531
|
+
* Every platform, same semantics as POST /v1/ads/create. Sets the switch of the new ad set alone (Google, TikTok and Pinterest: the ad group; LinkedIn: the campaign, which stays DRAFT when held; X: the line item) and overrides `status` for it. Omitted, it follows `status`.
|
|
45532
|
+
*
|
|
45533
|
+
* Precedence: a level status (`campaignStatus`, `adSetStatus`, `adStatus`) always wins for its level. `status: PAUSED` then holds the top-most new object that has no level status, and only when no level status is PAUSED; every other new object is switched on. So `campaignStatus: ACTIVE` + `adSetStatus: PAUSED` + `adStatus: PAUSED` keeps the campaign on with the new ad set and ad off, and all three PAUSED create the whole tree paused.
|
|
45534
|
+
*
|
|
45535
|
+
* Rejected with a 400 alongside `adSetId` (that ad set already exists; change it with PUT /v1/ads/ad-sets/{adSetId}/status).
|
|
45536
|
+
*
|
|
45537
|
+
*/
|
|
45538
|
+
adSetStatus?: 'ACTIVE' | 'PAUSED';
|
|
45539
|
+
/**
|
|
45540
|
+
* Sets the switch of the new ad alone, also when attaching to an existing ad set with `adSetId` (Meta, TikTok Smart+), and overrides `status` for it. Same precedence as `adSetStatus`. Omitted, it follows `status`.
|
|
45541
|
+
*
|
|
45542
|
+
* X returns a 400: a promoted post has no switch of its own, so hold the line item with `adSetStatus`.
|
|
45543
|
+
*
|
|
45544
|
+
*/
|
|
45545
|
+
adStatus?: AdActivationStatus;
|
|
45516
45546
|
/**
|
|
45517
45547
|
* Meta only, same semantics as POST /v1/ads/create: campaign = Advantage campaign budget (CBO), the budget and bid strategy sit on the campaign and the ad set inherits them. Default adset. Not allowed with adSetId.
|
|
45518
45548
|
*/
|