@getlatedev/node 0.2.475 → 0.2.477
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 +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +7 -1
- package/src/generated/types.gen.ts +12 -1
package/dist/index.d.mts
CHANGED
|
@@ -22973,7 +22973,10 @@ type BulkCreateContactsData = {
|
|
|
22973
22973
|
platform?: string;
|
|
22974
22974
|
contacts: Array<{
|
|
22975
22975
|
name: string;
|
|
22976
|
-
|
|
22976
|
+
/**
|
|
22977
|
+
* Required when the top-level accountId is set (channel mode). A row missing it in that mode is rejected individually and reported in errors[], not a 400 for the whole import.
|
|
22978
|
+
*/
|
|
22979
|
+
platformIdentifier?: string;
|
|
22977
22980
|
displayIdentifier?: string;
|
|
22978
22981
|
email?: string;
|
|
22979
22982
|
company?: string;
|
|
@@ -24646,6 +24649,10 @@ type ListAdCampaignsData = {
|
|
|
24646
24649
|
* Start of metrics date range (YYYY-MM-DD, inclusive). Defaults to 90 days ago when both date params are omitted.
|
|
24647
24650
|
*/
|
|
24648
24651
|
fromDate?: string;
|
|
24652
|
+
/**
|
|
24653
|
+
* Meta only. Campaign reads aggregate over ad documents, so a campaign with ZERO ads is normally invisible here — the state the two-step create (campaign, then ads via `existingCampaignId`) leaves behind whenever Meta rejects the ad step. Set true to list those too, with `adCount: 0` and zeroed metrics. Requires `accountId` and `adAccountId`, since an empty campaign has no ad row to resolve a token or ad account from.
|
|
24654
|
+
*/
|
|
24655
|
+
includeEmpty?: boolean;
|
|
24649
24656
|
limit?: number;
|
|
24650
24657
|
/**
|
|
24651
24658
|
* Page number (1-based)
|
|
@@ -24770,6 +24777,10 @@ type UpdateAdCampaignStatusError = (unknown | {
|
|
|
24770
24777
|
});
|
|
24771
24778
|
type UpdateAdCampaignData = {
|
|
24772
24779
|
body: {
|
|
24780
|
+
/**
|
|
24781
|
+
* Zernio SocialAccount id owning the ad account. Required only to update an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
|
|
24782
|
+
*/
|
|
24783
|
+
accountId?: string;
|
|
24773
24784
|
platform: 'facebook' | 'instagram';
|
|
24774
24785
|
budget?: {
|
|
24775
24786
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -22973,7 +22973,10 @@ type BulkCreateContactsData = {
|
|
|
22973
22973
|
platform?: string;
|
|
22974
22974
|
contacts: Array<{
|
|
22975
22975
|
name: string;
|
|
22976
|
-
|
|
22976
|
+
/**
|
|
22977
|
+
* Required when the top-level accountId is set (channel mode). A row missing it in that mode is rejected individually and reported in errors[], not a 400 for the whole import.
|
|
22978
|
+
*/
|
|
22979
|
+
platformIdentifier?: string;
|
|
22977
22980
|
displayIdentifier?: string;
|
|
22978
22981
|
email?: string;
|
|
22979
22982
|
company?: string;
|
|
@@ -24646,6 +24649,10 @@ type ListAdCampaignsData = {
|
|
|
24646
24649
|
* Start of metrics date range (YYYY-MM-DD, inclusive). Defaults to 90 days ago when both date params are omitted.
|
|
24647
24650
|
*/
|
|
24648
24651
|
fromDate?: string;
|
|
24652
|
+
/**
|
|
24653
|
+
* Meta only. Campaign reads aggregate over ad documents, so a campaign with ZERO ads is normally invisible here — the state the two-step create (campaign, then ads via `existingCampaignId`) leaves behind whenever Meta rejects the ad step. Set true to list those too, with `adCount: 0` and zeroed metrics. Requires `accountId` and `adAccountId`, since an empty campaign has no ad row to resolve a token or ad account from.
|
|
24654
|
+
*/
|
|
24655
|
+
includeEmpty?: boolean;
|
|
24649
24656
|
limit?: number;
|
|
24650
24657
|
/**
|
|
24651
24658
|
* Page number (1-based)
|
|
@@ -24770,6 +24777,10 @@ type UpdateAdCampaignStatusError = (unknown | {
|
|
|
24770
24777
|
});
|
|
24771
24778
|
type UpdateAdCampaignData = {
|
|
24772
24779
|
body: {
|
|
24780
|
+
/**
|
|
24781
|
+
* Zernio SocialAccount id owning the ad account. Required only to update an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
|
|
24782
|
+
*/
|
|
24783
|
+
accountId?: string;
|
|
24773
24784
|
platform: 'facebook' | 'instagram';
|
|
24774
24785
|
budget?: {
|
|
24775
24786
|
/**
|
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.477",
|
|
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.477",
|
|
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
|
@@ -6062,7 +6062,7 @@ export const getContactChannels = <ThrowOnError extends boolean = false>(options
|
|
|
6062
6062
|
|
|
6063
6063
|
/**
|
|
6064
6064
|
* Bulk create contacts
|
|
6065
|
-
* Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
|
|
6065
|
+
* Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. When accountId is set, each contact must carry a platformIdentifier; a row missing it is rejected individually (reported in errors[], HTTP 200), not a 400 for the whole import. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
|
|
6066
6066
|
*/
|
|
6067
6067
|
export const bulkCreateContacts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<BulkCreateContactsData, ThrowOnError>) => {
|
|
6068
6068
|
return (options?.client ?? client).post<BulkCreateContactsResponse, BulkCreateContactsError, ThrowOnError>({
|
|
@@ -6697,6 +6697,12 @@ export const updateAdCampaignStatus = <ThrowOnError extends boolean = false>(opt
|
|
|
6697
6697
|
* Update a campaign
|
|
6698
6698
|
* Campaign-level edits. At least one of `budget`, `bidStrategy`, `name` or `platformSpecificData` is required.
|
|
6699
6699
|
*
|
|
6700
|
+
* **Empty campaigns.** A campaign with zero ads has no local Ad documents to
|
|
6701
|
+
* resolve, so this would 404 even though it exists on Meta. Send `accountId`
|
|
6702
|
+
* in the body to skip the local lookup and forward the update to Meta. The
|
|
6703
|
+
* response then carries `updated: 0`, since there are no local rows to mirror
|
|
6704
|
+
* onto. `accountId` is ignored when the campaign does have ads.
|
|
6705
|
+
*
|
|
6700
6706
|
* - `budget` updates the CBO (Campaign Budget Optimization) budget. For ABO campaigns
|
|
6701
6707
|
* (where the budget lives on the ad set), use PUT /v1/ads/ad-sets/{adSetId} instead — this endpoint
|
|
6702
6708
|
* will return 409 with code BUDGET_LEVEL_MISMATCH.
|
|
@@ -23202,7 +23202,10 @@ export type BulkCreateContactsData = {
|
|
|
23202
23202
|
platform?: string;
|
|
23203
23203
|
contacts: Array<{
|
|
23204
23204
|
name: string;
|
|
23205
|
-
|
|
23205
|
+
/**
|
|
23206
|
+
* Required when the top-level accountId is set (channel mode). A row missing it in that mode is rejected individually and reported in errors[], not a 400 for the whole import.
|
|
23207
|
+
*/
|
|
23208
|
+
platformIdentifier?: string;
|
|
23206
23209
|
displayIdentifier?: string;
|
|
23207
23210
|
email?: string;
|
|
23208
23211
|
company?: string;
|
|
@@ -25022,6 +25025,10 @@ export type ListAdCampaignsData = {
|
|
|
25022
25025
|
* Start of metrics date range (YYYY-MM-DD, inclusive). Defaults to 90 days ago when both date params are omitted.
|
|
25023
25026
|
*/
|
|
25024
25027
|
fromDate?: string;
|
|
25028
|
+
/**
|
|
25029
|
+
* Meta only. Campaign reads aggregate over ad documents, so a campaign with ZERO ads is normally invisible here — the state the two-step create (campaign, then ads via `existingCampaignId`) leaves behind whenever Meta rejects the ad step. Set true to list those too, with `adCount: 0` and zeroed metrics. Requires `accountId` and `adAccountId`, since an empty campaign has no ad row to resolve a token or ad account from.
|
|
25030
|
+
*/
|
|
25031
|
+
includeEmpty?: boolean;
|
|
25025
25032
|
limit?: number;
|
|
25026
25033
|
/**
|
|
25027
25034
|
* Page number (1-based)
|
|
@@ -25155,6 +25162,10 @@ export type UpdateAdCampaignStatusError = (unknown | {
|
|
|
25155
25162
|
|
|
25156
25163
|
export type UpdateAdCampaignData = {
|
|
25157
25164
|
body: {
|
|
25165
|
+
/**
|
|
25166
|
+
* Zernio SocialAccount id owning the ad account. Required only to update an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
|
|
25167
|
+
*/
|
|
25168
|
+
accountId?: string;
|
|
25158
25169
|
platform: 'facebook' | 'instagram';
|
|
25159
25170
|
budget?: {
|
|
25160
25171
|
/**
|