@zernio/node 0.2.962 → 0.2.963
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 +48 -4
- package/dist/index.d.ts +48 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +17 -0
- package/src/generated/types.gen.ts +48 -4
package/dist/index.d.mts
CHANGED
|
@@ -38845,7 +38845,7 @@ type GenerateKeywordHistoricalMetricsError = (unknown | {
|
|
|
38845
38845
|
type QueryAdInsightsData = {
|
|
38846
38846
|
query: {
|
|
38847
38847
|
/**
|
|
38848
|
-
* Zernio SocialAccount id (posting or ads variant); its platform selects the Meta or
|
|
38848
|
+
* Zernio SocialAccount id (posting or ads variant); its platform selects the Meta, Google or TikTok contract.
|
|
38849
38849
|
*/
|
|
38850
38850
|
accountId: string;
|
|
38851
38851
|
/**
|
|
@@ -38861,7 +38861,7 @@ type QueryAdInsightsData = {
|
|
|
38861
38861
|
*/
|
|
38862
38862
|
actionReportTime?: string;
|
|
38863
38863
|
/**
|
|
38864
|
-
* Google
|
|
38864
|
+
* Google: platform ad account ID (Google customer ID, digits only) when the connection has several Google Ads accounts. TikTok (required there): the advertiser id.
|
|
38865
38865
|
*/
|
|
38866
38866
|
adAccountId?: string;
|
|
38867
38867
|
/**
|
|
@@ -38877,20 +38877,28 @@ type QueryAdInsightsData = {
|
|
|
38877
38877
|
* @deprecated
|
|
38878
38878
|
*/
|
|
38879
38879
|
customerId?: string;
|
|
38880
|
+
/**
|
|
38881
|
+
* TikTok only (required there): data_level.
|
|
38882
|
+
*/
|
|
38883
|
+
dataLevel?: 'AUCTION_ADVERTISER' | 'AUCTION_CAMPAIGN' | 'AUCTION_ADGROUP' | 'AUCTION_AD';
|
|
38880
38884
|
/**
|
|
38881
38885
|
* Meta date_preset (e.g. last_7d, last_30d, this_month). Mutually exclusive with fromDate/toDate.
|
|
38882
38886
|
*/
|
|
38883
38887
|
datePreset?: string;
|
|
38888
|
+
/**
|
|
38889
|
+
* TikTok only (required there): 1-4 comma-separated TikTok dimensions (e.g. country_code, campaign_id, stat_time_day).
|
|
38890
|
+
*/
|
|
38891
|
+
dimensions?: string;
|
|
38884
38892
|
/**
|
|
38885
38893
|
* Comma-separated Graph insights fields (e.g. spend,impressions,frequency,website_purchase_roas). Omitted = Meta's default set.
|
|
38886
38894
|
*/
|
|
38887
38895
|
fields?: string;
|
|
38888
38896
|
/**
|
|
38889
|
-
* JSON array of
|
|
38897
|
+
* JSON array of filter objects: [{"field", "operator", "value"}]. Applied server-side by Meta or TikTok (TikTok fields e.g. campaign_ids, adgroup_ids, ad_ids).
|
|
38890
38898
|
*/
|
|
38891
38899
|
filtering?: string;
|
|
38892
38900
|
/**
|
|
38893
|
-
* Start of range (YYYY-MM-DD); requires toDate.
|
|
38901
|
+
* Start of range (YYYY-MM-DD); requires toDate. Required on TikTok.
|
|
38894
38902
|
*/
|
|
38895
38903
|
fromDate?: string;
|
|
38896
38904
|
/**
|
|
@@ -38901,10 +38909,22 @@ type QueryAdInsightsData = {
|
|
|
38901
38909
|
* Rows per page
|
|
38902
38910
|
*/
|
|
38903
38911
|
limit?: number;
|
|
38912
|
+
/**
|
|
38913
|
+
* TikTok only (required there): comma-separated TikTok metrics (e.g. reach,impressions,frequency,spend).
|
|
38914
|
+
*/
|
|
38915
|
+
metrics?: string;
|
|
38904
38916
|
/**
|
|
38905
38917
|
* Meta only (required there): insights node (act_<n>, campaign id, ad set id or ad id).
|
|
38906
38918
|
*/
|
|
38907
38919
|
objectId?: string;
|
|
38920
|
+
/**
|
|
38921
|
+
* TikTok only: page number.
|
|
38922
|
+
*/
|
|
38923
|
+
page?: number;
|
|
38924
|
+
/**
|
|
38925
|
+
* TikTok only: rows per page.
|
|
38926
|
+
*/
|
|
38927
|
+
pageSize?: number;
|
|
38908
38928
|
/**
|
|
38909
38929
|
* Google only: cursor from paging.nextPageToken of the previous page.
|
|
38910
38930
|
*/
|
|
@@ -38913,6 +38933,10 @@ type QueryAdInsightsData = {
|
|
|
38913
38933
|
* Google only (required there): the GAQL SELECT statement to run.
|
|
38914
38934
|
*/
|
|
38915
38935
|
query?: string;
|
|
38936
|
+
/**
|
|
38937
|
+
* TikTok only: report_type.
|
|
38938
|
+
*/
|
|
38939
|
+
reportType?: 'BASIC' | 'AUDIENCE';
|
|
38916
38940
|
/**
|
|
38917
38941
|
* Days per row (1-90), monthly, or all_days.
|
|
38918
38942
|
*/
|
|
@@ -38932,6 +38956,10 @@ type QueryAdInsightsResponse = ({
|
|
|
38932
38956
|
* Meta responses only.
|
|
38933
38957
|
*/
|
|
38934
38958
|
objectId?: string;
|
|
38959
|
+
/**
|
|
38960
|
+
* TikTok responses only: the advertiser queried.
|
|
38961
|
+
*/
|
|
38962
|
+
adAccountId?: string;
|
|
38935
38963
|
/**
|
|
38936
38964
|
* Google responses only: the customer the query ran against.
|
|
38937
38965
|
*/
|
|
@@ -38952,6 +38980,22 @@ type QueryAdInsightsResponse = ({
|
|
|
38952
38980
|
* Google cursor for the next page; null when exhausted.
|
|
38953
38981
|
*/
|
|
38954
38982
|
nextPageToken?: (string) | null;
|
|
38983
|
+
/**
|
|
38984
|
+
* TikTok only: current page.
|
|
38985
|
+
*/
|
|
38986
|
+
page?: number;
|
|
38987
|
+
/**
|
|
38988
|
+
* TikTok only.
|
|
38989
|
+
*/
|
|
38990
|
+
pageSize?: number;
|
|
38991
|
+
/**
|
|
38992
|
+
* TikTok only.
|
|
38993
|
+
*/
|
|
38994
|
+
totalRows?: number;
|
|
38995
|
+
/**
|
|
38996
|
+
* TikTok only.
|
|
38997
|
+
*/
|
|
38998
|
+
totalPages?: number;
|
|
38955
38999
|
};
|
|
38956
39000
|
});
|
|
38957
39001
|
type QueryAdInsightsError = (unknown | {
|
package/dist/index.d.ts
CHANGED
|
@@ -38845,7 +38845,7 @@ type GenerateKeywordHistoricalMetricsError = (unknown | {
|
|
|
38845
38845
|
type QueryAdInsightsData = {
|
|
38846
38846
|
query: {
|
|
38847
38847
|
/**
|
|
38848
|
-
* Zernio SocialAccount id (posting or ads variant); its platform selects the Meta or
|
|
38848
|
+
* Zernio SocialAccount id (posting or ads variant); its platform selects the Meta, Google or TikTok contract.
|
|
38849
38849
|
*/
|
|
38850
38850
|
accountId: string;
|
|
38851
38851
|
/**
|
|
@@ -38861,7 +38861,7 @@ type QueryAdInsightsData = {
|
|
|
38861
38861
|
*/
|
|
38862
38862
|
actionReportTime?: string;
|
|
38863
38863
|
/**
|
|
38864
|
-
* Google
|
|
38864
|
+
* Google: platform ad account ID (Google customer ID, digits only) when the connection has several Google Ads accounts. TikTok (required there): the advertiser id.
|
|
38865
38865
|
*/
|
|
38866
38866
|
adAccountId?: string;
|
|
38867
38867
|
/**
|
|
@@ -38877,20 +38877,28 @@ type QueryAdInsightsData = {
|
|
|
38877
38877
|
* @deprecated
|
|
38878
38878
|
*/
|
|
38879
38879
|
customerId?: string;
|
|
38880
|
+
/**
|
|
38881
|
+
* TikTok only (required there): data_level.
|
|
38882
|
+
*/
|
|
38883
|
+
dataLevel?: 'AUCTION_ADVERTISER' | 'AUCTION_CAMPAIGN' | 'AUCTION_ADGROUP' | 'AUCTION_AD';
|
|
38880
38884
|
/**
|
|
38881
38885
|
* Meta date_preset (e.g. last_7d, last_30d, this_month). Mutually exclusive with fromDate/toDate.
|
|
38882
38886
|
*/
|
|
38883
38887
|
datePreset?: string;
|
|
38888
|
+
/**
|
|
38889
|
+
* TikTok only (required there): 1-4 comma-separated TikTok dimensions (e.g. country_code, campaign_id, stat_time_day).
|
|
38890
|
+
*/
|
|
38891
|
+
dimensions?: string;
|
|
38884
38892
|
/**
|
|
38885
38893
|
* Comma-separated Graph insights fields (e.g. spend,impressions,frequency,website_purchase_roas). Omitted = Meta's default set.
|
|
38886
38894
|
*/
|
|
38887
38895
|
fields?: string;
|
|
38888
38896
|
/**
|
|
38889
|
-
* JSON array of
|
|
38897
|
+
* JSON array of filter objects: [{"field", "operator", "value"}]. Applied server-side by Meta or TikTok (TikTok fields e.g. campaign_ids, adgroup_ids, ad_ids).
|
|
38890
38898
|
*/
|
|
38891
38899
|
filtering?: string;
|
|
38892
38900
|
/**
|
|
38893
|
-
* Start of range (YYYY-MM-DD); requires toDate.
|
|
38901
|
+
* Start of range (YYYY-MM-DD); requires toDate. Required on TikTok.
|
|
38894
38902
|
*/
|
|
38895
38903
|
fromDate?: string;
|
|
38896
38904
|
/**
|
|
@@ -38901,10 +38909,22 @@ type QueryAdInsightsData = {
|
|
|
38901
38909
|
* Rows per page
|
|
38902
38910
|
*/
|
|
38903
38911
|
limit?: number;
|
|
38912
|
+
/**
|
|
38913
|
+
* TikTok only (required there): comma-separated TikTok metrics (e.g. reach,impressions,frequency,spend).
|
|
38914
|
+
*/
|
|
38915
|
+
metrics?: string;
|
|
38904
38916
|
/**
|
|
38905
38917
|
* Meta only (required there): insights node (act_<n>, campaign id, ad set id or ad id).
|
|
38906
38918
|
*/
|
|
38907
38919
|
objectId?: string;
|
|
38920
|
+
/**
|
|
38921
|
+
* TikTok only: page number.
|
|
38922
|
+
*/
|
|
38923
|
+
page?: number;
|
|
38924
|
+
/**
|
|
38925
|
+
* TikTok only: rows per page.
|
|
38926
|
+
*/
|
|
38927
|
+
pageSize?: number;
|
|
38908
38928
|
/**
|
|
38909
38929
|
* Google only: cursor from paging.nextPageToken of the previous page.
|
|
38910
38930
|
*/
|
|
@@ -38913,6 +38933,10 @@ type QueryAdInsightsData = {
|
|
|
38913
38933
|
* Google only (required there): the GAQL SELECT statement to run.
|
|
38914
38934
|
*/
|
|
38915
38935
|
query?: string;
|
|
38936
|
+
/**
|
|
38937
|
+
* TikTok only: report_type.
|
|
38938
|
+
*/
|
|
38939
|
+
reportType?: 'BASIC' | 'AUDIENCE';
|
|
38916
38940
|
/**
|
|
38917
38941
|
* Days per row (1-90), monthly, or all_days.
|
|
38918
38942
|
*/
|
|
@@ -38932,6 +38956,10 @@ type QueryAdInsightsResponse = ({
|
|
|
38932
38956
|
* Meta responses only.
|
|
38933
38957
|
*/
|
|
38934
38958
|
objectId?: string;
|
|
38959
|
+
/**
|
|
38960
|
+
* TikTok responses only: the advertiser queried.
|
|
38961
|
+
*/
|
|
38962
|
+
adAccountId?: string;
|
|
38935
38963
|
/**
|
|
38936
38964
|
* Google responses only: the customer the query ran against.
|
|
38937
38965
|
*/
|
|
@@ -38952,6 +38980,22 @@ type QueryAdInsightsResponse = ({
|
|
|
38952
38980
|
* Google cursor for the next page; null when exhausted.
|
|
38953
38981
|
*/
|
|
38954
38982
|
nextPageToken?: (string) | null;
|
|
38983
|
+
/**
|
|
38984
|
+
* TikTok only: current page.
|
|
38985
|
+
*/
|
|
38986
|
+
page?: number;
|
|
38987
|
+
/**
|
|
38988
|
+
* TikTok only.
|
|
38989
|
+
*/
|
|
38990
|
+
pageSize?: number;
|
|
38991
|
+
/**
|
|
38992
|
+
* TikTok only.
|
|
38993
|
+
*/
|
|
38994
|
+
totalRows?: number;
|
|
38995
|
+
/**
|
|
38996
|
+
* TikTok only.
|
|
38997
|
+
*/
|
|
38998
|
+
totalPages?: number;
|
|
38955
38999
|
};
|
|
38956
39000
|
});
|
|
38957
39001
|
type QueryAdInsightsError = (unknown | {
|
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: "@zernio/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.963",
|
|
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: "@zernio/node",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.963",
|
|
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
|
@@ -9995,6 +9995,23 @@ export const generateKeywordHistoricalMetrics = <ThrowOnError extends boolean =
|
|
|
9995
9995
|
* `'YYYY-MM-DD'` literal are translated; any other form returns Google's 400. New code should
|
|
9996
9996
|
* select the `_date_time` fields directly.
|
|
9997
9997
|
*
|
|
9998
|
+
* **TikTok (tiktok/tiktokads)**: passthrough of TikTok's synchronous report
|
|
9999
|
+
* (`/report/integrated/get/`). Send `adAccountId`, `dataLevel`, `dimensions`, `metrics`,
|
|
10000
|
+
* `fromDate`/`toDate` (TikTok caps the span at 365 days) and optionally `filtering` in the same
|
|
10001
|
+
* `[{"field", "operator", "value"}]` shape as Meta (operator is TikTok's `filter_type`, e.g. `IN`;
|
|
10002
|
+
* array values are JSON-encoded for TikTok). Rows come back verbatim as
|
|
10003
|
+
* `{ dimensions, metrics }` with page-number paging.
|
|
10004
|
+
*
|
|
10005
|
+
* *De-duplicated reach across a set of campaigns, ad groups or ads*: filter the set and group by
|
|
10006
|
+
* `country_code` instead of the entity id. TikTok then counts each person once across the whole
|
|
10007
|
+
* set and range, per country. Example, two campaigns for a month:
|
|
10008
|
+
* `dataLevel=AUCTION_CAMPAIGN&dimensions=country_code&metrics=reach,impressions,frequency&fromDate=2026-09-01&toDate=2026-09-30&filtering=[{"field":"campaign_ids","operator":"IN","value":["1876574798182050","1876575504573650"]}]`.
|
|
10009
|
+
* For a set of ads use `dataLevel=AUCTION_AD` with `ad_ids`. A filter on a finer entity than
|
|
10010
|
+
* `dataLevel` (e.g. `ad_ids` at `AUCTION_CAMPAIGN`) returns 400: TikTok would otherwise widen it to
|
|
10011
|
+
* every parent entity containing those ids. When the set delivers in several countries, reach is
|
|
10012
|
+
* per country; summing the rows counts a person reached in two countries twice.
|
|
10013
|
+
* `AUCTION_ADVERTISER` rejects entity filters.
|
|
10014
|
+
*
|
|
9998
10015
|
*/
|
|
9999
10016
|
export const queryAdInsights = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<QueryAdInsightsData, ThrowOnError>) => {
|
|
10000
10017
|
return (options?.client ?? client).get<QueryAdInsightsResponse, QueryAdInsightsError, ThrowOnError>({
|
|
@@ -39306,7 +39306,7 @@ export type GenerateKeywordHistoricalMetricsError = (unknown | {
|
|
|
39306
39306
|
export type QueryAdInsightsData = {
|
|
39307
39307
|
query: {
|
|
39308
39308
|
/**
|
|
39309
|
-
* Zernio SocialAccount id (posting or ads variant); its platform selects the Meta or
|
|
39309
|
+
* Zernio SocialAccount id (posting or ads variant); its platform selects the Meta, Google or TikTok contract.
|
|
39310
39310
|
*/
|
|
39311
39311
|
accountId: string;
|
|
39312
39312
|
/**
|
|
@@ -39322,7 +39322,7 @@ export type QueryAdInsightsData = {
|
|
|
39322
39322
|
*/
|
|
39323
39323
|
actionReportTime?: string;
|
|
39324
39324
|
/**
|
|
39325
|
-
* Google
|
|
39325
|
+
* Google: platform ad account ID (Google customer ID, digits only) when the connection has several Google Ads accounts. TikTok (required there): the advertiser id.
|
|
39326
39326
|
*/
|
|
39327
39327
|
adAccountId?: string;
|
|
39328
39328
|
/**
|
|
@@ -39338,20 +39338,28 @@ export type QueryAdInsightsData = {
|
|
|
39338
39338
|
* @deprecated
|
|
39339
39339
|
*/
|
|
39340
39340
|
customerId?: string;
|
|
39341
|
+
/**
|
|
39342
|
+
* TikTok only (required there): data_level.
|
|
39343
|
+
*/
|
|
39344
|
+
dataLevel?: 'AUCTION_ADVERTISER' | 'AUCTION_CAMPAIGN' | 'AUCTION_ADGROUP' | 'AUCTION_AD';
|
|
39341
39345
|
/**
|
|
39342
39346
|
* Meta date_preset (e.g. last_7d, last_30d, this_month). Mutually exclusive with fromDate/toDate.
|
|
39343
39347
|
*/
|
|
39344
39348
|
datePreset?: string;
|
|
39349
|
+
/**
|
|
39350
|
+
* TikTok only (required there): 1-4 comma-separated TikTok dimensions (e.g. country_code, campaign_id, stat_time_day).
|
|
39351
|
+
*/
|
|
39352
|
+
dimensions?: string;
|
|
39345
39353
|
/**
|
|
39346
39354
|
* Comma-separated Graph insights fields (e.g. spend,impressions,frequency,website_purchase_roas). Omitted = Meta's default set.
|
|
39347
39355
|
*/
|
|
39348
39356
|
fields?: string;
|
|
39349
39357
|
/**
|
|
39350
|
-
* JSON array of
|
|
39358
|
+
* JSON array of filter objects: [{"field", "operator", "value"}]. Applied server-side by Meta or TikTok (TikTok fields e.g. campaign_ids, adgroup_ids, ad_ids).
|
|
39351
39359
|
*/
|
|
39352
39360
|
filtering?: string;
|
|
39353
39361
|
/**
|
|
39354
|
-
* Start of range (YYYY-MM-DD); requires toDate.
|
|
39362
|
+
* Start of range (YYYY-MM-DD); requires toDate. Required on TikTok.
|
|
39355
39363
|
*/
|
|
39356
39364
|
fromDate?: string;
|
|
39357
39365
|
/**
|
|
@@ -39362,10 +39370,22 @@ export type QueryAdInsightsData = {
|
|
|
39362
39370
|
* Rows per page
|
|
39363
39371
|
*/
|
|
39364
39372
|
limit?: number;
|
|
39373
|
+
/**
|
|
39374
|
+
* TikTok only (required there): comma-separated TikTok metrics (e.g. reach,impressions,frequency,spend).
|
|
39375
|
+
*/
|
|
39376
|
+
metrics?: string;
|
|
39365
39377
|
/**
|
|
39366
39378
|
* Meta only (required there): insights node (act_<n>, campaign id, ad set id or ad id).
|
|
39367
39379
|
*/
|
|
39368
39380
|
objectId?: string;
|
|
39381
|
+
/**
|
|
39382
|
+
* TikTok only: page number.
|
|
39383
|
+
*/
|
|
39384
|
+
page?: number;
|
|
39385
|
+
/**
|
|
39386
|
+
* TikTok only: rows per page.
|
|
39387
|
+
*/
|
|
39388
|
+
pageSize?: number;
|
|
39369
39389
|
/**
|
|
39370
39390
|
* Google only: cursor from paging.nextPageToken of the previous page.
|
|
39371
39391
|
*/
|
|
@@ -39374,6 +39394,10 @@ export type QueryAdInsightsData = {
|
|
|
39374
39394
|
* Google only (required there): the GAQL SELECT statement to run.
|
|
39375
39395
|
*/
|
|
39376
39396
|
query?: string;
|
|
39397
|
+
/**
|
|
39398
|
+
* TikTok only: report_type.
|
|
39399
|
+
*/
|
|
39400
|
+
reportType?: 'BASIC' | 'AUDIENCE';
|
|
39377
39401
|
/**
|
|
39378
39402
|
* Days per row (1-90), monthly, or all_days.
|
|
39379
39403
|
*/
|
|
@@ -39394,6 +39418,10 @@ export type QueryAdInsightsResponse = ({
|
|
|
39394
39418
|
* Meta responses only.
|
|
39395
39419
|
*/
|
|
39396
39420
|
objectId?: string;
|
|
39421
|
+
/**
|
|
39422
|
+
* TikTok responses only: the advertiser queried.
|
|
39423
|
+
*/
|
|
39424
|
+
adAccountId?: string;
|
|
39397
39425
|
/**
|
|
39398
39426
|
* Google responses only: the customer the query ran against.
|
|
39399
39427
|
*/
|
|
@@ -39414,6 +39442,22 @@ export type QueryAdInsightsResponse = ({
|
|
|
39414
39442
|
* Google cursor for the next page; null when exhausted.
|
|
39415
39443
|
*/
|
|
39416
39444
|
nextPageToken?: (string) | null;
|
|
39445
|
+
/**
|
|
39446
|
+
* TikTok only: current page.
|
|
39447
|
+
*/
|
|
39448
|
+
page?: number;
|
|
39449
|
+
/**
|
|
39450
|
+
* TikTok only.
|
|
39451
|
+
*/
|
|
39452
|
+
pageSize?: number;
|
|
39453
|
+
/**
|
|
39454
|
+
* TikTok only.
|
|
39455
|
+
*/
|
|
39456
|
+
totalRows?: number;
|
|
39457
|
+
/**
|
|
39458
|
+
* TikTok only.
|
|
39459
|
+
*/
|
|
39460
|
+
totalPages?: number;
|
|
39417
39461
|
};
|
|
39418
39462
|
});
|
|
39419
39463
|
|