@zernio/node 0.2.787 → 0.2.789
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 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
- package/src/errors.ts +4 -0
- package/src/generated/sdk.gen.ts +17 -10
- package/src/generated/types.gen.ts +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1543,6 +1543,7 @@ interface ZernioErrorBody {
|
|
|
1543
1543
|
type?: string;
|
|
1544
1544
|
code?: string;
|
|
1545
1545
|
param?: string;
|
|
1546
|
+
docUrl?: string;
|
|
1546
1547
|
platform?: string;
|
|
1547
1548
|
platformError?: Record<string, unknown>;
|
|
1548
1549
|
details?: Record<string, unknown>;
|
|
@@ -1555,6 +1556,8 @@ declare class ZernioApiError extends Error {
|
|
|
1555
1556
|
readonly type?: string;
|
|
1556
1557
|
/** The request field that caused the error, when the API names one. */
|
|
1557
1558
|
readonly param?: string;
|
|
1559
|
+
/** Link to the documentation for this error, when the API provides one. */
|
|
1560
|
+
readonly docUrl?: string;
|
|
1558
1561
|
/** Upstream platform, present when type is platform_error. */
|
|
1559
1562
|
readonly platform?: string;
|
|
1560
1563
|
/** The upstream platform's own payload, verbatim (Meta: code, subcode, fbtrace_id). */
|
|
@@ -10114,7 +10117,7 @@ type WebhookPayloadComment = {
|
|
|
10114
10117
|
name?: string;
|
|
10115
10118
|
picture?: (string) | null;
|
|
10116
10119
|
/**
|
|
10117
|
-
* True when this comment was authored by the connected account itself (Meta re-delivers the account's own replies as comments events)
|
|
10120
|
+
* True when this comment was authored by the connected account itself. Populated on the Instagram and Facebook realtime webhooks (Meta re-delivers the account's own replies as comments events) and on TikTok, where it is inferred: comments created through this API are always flagged, and once the account's own author identifier is known (from one of those or from a comments listing) every author is compared against it. Absent means not evaluated, never "not the account".
|
|
10118
10121
|
*/
|
|
10119
10122
|
isOwnAccount?: boolean;
|
|
10120
10123
|
/**
|
|
@@ -39179,7 +39182,7 @@ type SearchAdTargetingData = {
|
|
|
39179
39182
|
type SearchAdTargetingResponse = ({
|
|
39180
39183
|
results?: Array<{
|
|
39181
39184
|
/**
|
|
39182
|
-
* The platform's opaque id. Use as a geo `key` (regions/cities/zips/metros) or an entity `id` (interests/behaviors) in TargetingSpec.
|
|
39185
|
+
* The platform's opaque id. Use as a geo `key` (regions/cities/zips/metros) or an entity `id` (interests/behaviors) in TargetingSpec. A `country` result is the exception on every platform: its id is the ISO 3166-1 alpha-2 code, which is what `targeting.countries` takes.
|
|
39183
39186
|
*/
|
|
39184
39187
|
id: string;
|
|
39185
39188
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1543,6 +1543,7 @@ interface ZernioErrorBody {
|
|
|
1543
1543
|
type?: string;
|
|
1544
1544
|
code?: string;
|
|
1545
1545
|
param?: string;
|
|
1546
|
+
docUrl?: string;
|
|
1546
1547
|
platform?: string;
|
|
1547
1548
|
platformError?: Record<string, unknown>;
|
|
1548
1549
|
details?: Record<string, unknown>;
|
|
@@ -1555,6 +1556,8 @@ declare class ZernioApiError extends Error {
|
|
|
1555
1556
|
readonly type?: string;
|
|
1556
1557
|
/** The request field that caused the error, when the API names one. */
|
|
1557
1558
|
readonly param?: string;
|
|
1559
|
+
/** Link to the documentation for this error, when the API provides one. */
|
|
1560
|
+
readonly docUrl?: string;
|
|
1558
1561
|
/** Upstream platform, present when type is platform_error. */
|
|
1559
1562
|
readonly platform?: string;
|
|
1560
1563
|
/** The upstream platform's own payload, verbatim (Meta: code, subcode, fbtrace_id). */
|
|
@@ -10114,7 +10117,7 @@ type WebhookPayloadComment = {
|
|
|
10114
10117
|
name?: string;
|
|
10115
10118
|
picture?: (string) | null;
|
|
10116
10119
|
/**
|
|
10117
|
-
* True when this comment was authored by the connected account itself (Meta re-delivers the account's own replies as comments events)
|
|
10120
|
+
* True when this comment was authored by the connected account itself. Populated on the Instagram and Facebook realtime webhooks (Meta re-delivers the account's own replies as comments events) and on TikTok, where it is inferred: comments created through this API are always flagged, and once the account's own author identifier is known (from one of those or from a comments listing) every author is compared against it. Absent means not evaluated, never "not the account".
|
|
10118
10121
|
*/
|
|
10119
10122
|
isOwnAccount?: boolean;
|
|
10120
10123
|
/**
|
|
@@ -39179,7 +39182,7 @@ type SearchAdTargetingData = {
|
|
|
39179
39182
|
type SearchAdTargetingResponse = ({
|
|
39180
39183
|
results?: Array<{
|
|
39181
39184
|
/**
|
|
39182
|
-
* The platform's opaque id. Use as a geo `key` (regions/cities/zips/metros) or an entity `id` (interests/behaviors) in TargetingSpec.
|
|
39185
|
+
* The platform's opaque id. Use as a geo `key` (regions/cities/zips/metros) or an entity `id` (interests/behaviors) in TargetingSpec. A `country` result is the exception on every platform: its id is the ISO 3166-1 alpha-2 code, which is what `targeting.countries` takes.
|
|
39183
39186
|
*/
|
|
39184
39187
|
id: string;
|
|
39185
39188
|
/**
|
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.789",
|
|
40
40
|
description: "The official Node.js library for the Zernio API",
|
|
41
41
|
main: "dist/index.js",
|
|
42
42
|
module: "dist/index.mjs",
|
|
@@ -4764,6 +4764,7 @@ var ZernioApiError = class _ZernioApiError extends Error {
|
|
|
4764
4764
|
this.details = details;
|
|
4765
4765
|
this.type = body?.type;
|
|
4766
4766
|
this.param = body?.param;
|
|
4767
|
+
this.docUrl = body?.docUrl;
|
|
4767
4768
|
this.platform = body?.platform;
|
|
4768
4769
|
this.platformError = body?.platformError;
|
|
4769
4770
|
this.body = body;
|
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.789",
|
|
9
9
|
description: "The official Node.js library for the Zernio API",
|
|
10
10
|
main: "dist/index.js",
|
|
11
11
|
module: "dist/index.mjs",
|
|
@@ -4733,6 +4733,7 @@ var ZernioApiError = class _ZernioApiError extends Error {
|
|
|
4733
4733
|
this.details = details;
|
|
4734
4734
|
this.type = body?.type;
|
|
4735
4735
|
this.param = body?.param;
|
|
4736
|
+
this.docUrl = body?.docUrl;
|
|
4736
4737
|
this.platform = body?.platform;
|
|
4737
4738
|
this.platformError = body?.platformError;
|
|
4738
4739
|
this.body = body;
|
package/package.json
CHANGED
package/src/errors.ts
CHANGED
|
@@ -15,6 +15,7 @@ export interface ZernioErrorBody {
|
|
|
15
15
|
type?: string;
|
|
16
16
|
code?: string;
|
|
17
17
|
param?: string;
|
|
18
|
+
docUrl?: string;
|
|
18
19
|
platform?: string;
|
|
19
20
|
platformError?: Record<string, unknown>;
|
|
20
21
|
details?: Record<string, unknown>;
|
|
@@ -28,6 +29,8 @@ export class ZernioApiError extends Error {
|
|
|
28
29
|
public readonly type?: string;
|
|
29
30
|
/** The request field that caused the error, when the API names one. */
|
|
30
31
|
public readonly param?: string;
|
|
32
|
+
/** Link to the documentation for this error, when the API provides one. */
|
|
33
|
+
public readonly docUrl?: string;
|
|
31
34
|
/** Upstream platform, present when type is platform_error. */
|
|
32
35
|
public readonly platform?: string;
|
|
33
36
|
/** The upstream platform's own payload, verbatim (Meta: code, subcode, fbtrace_id). */
|
|
@@ -49,6 +52,7 @@ export class ZernioApiError extends Error {
|
|
|
49
52
|
this.details = details;
|
|
50
53
|
this.type = body?.type;
|
|
51
54
|
this.param = body?.param;
|
|
55
|
+
this.docUrl = body?.docUrl;
|
|
52
56
|
this.platform = body?.platform;
|
|
53
57
|
this.platformError = body?.platformError;
|
|
54
58
|
this.body = body;
|
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -10451,15 +10451,20 @@ export const searchAdInterests = <ThrowOnError extends boolean = false>(options:
|
|
|
10451
10451
|
* TikTok geo searches return every matching level in one list (`type` is
|
|
10452
10452
|
* `country`, `region`, `city`, `district`, or `metro` for DMA areas), and
|
|
10453
10453
|
* `geoType` is not applied. Results are scoped to the advertiser's targetable
|
|
10454
|
-
* markets
|
|
10455
|
-
* `
|
|
10454
|
+
* markets. A `country` result's id is its ISO 3166-1 alpha-2 code, for
|
|
10455
|
+
* `targeting.countries`; every other id is TikTok's numeric location id,
|
|
10456
|
+
* usable in `regions`/`cities`/`metros` keys on `POST /v1/ads/create`.
|
|
10456
10457
|
*
|
|
10457
10458
|
* LinkedIn geo searches also return every matching level in one list, and
|
|
10458
10459
|
* neither `geoType` nor `countryCode` is applied: LinkedIn's typeahead only
|
|
10459
10460
|
* returns a name and a URN per result, with no level or country field to
|
|
10460
|
-
* filter on.
|
|
10461
|
-
* `
|
|
10462
|
-
* `
|
|
10461
|
+
* filter on. A result whose URN is a country Zernio holds a code for has
|
|
10462
|
+
* `type: country` and its ISO 3166-1 alpha-2 code as the id, for
|
|
10463
|
+
* `targeting.countries`. Every other result has `type: region` and keeps
|
|
10464
|
+
* its `urn:li:geo:*` URN as the id, usable as a `regions[].key` on
|
|
10465
|
+
* `POST /v1/ads/create`, `POST /v1/ads/boost` and
|
|
10466
|
+
* `POST /v1/ads/targeting/reach-estimate` (LinkedIn puts countries and
|
|
10467
|
+
* regions in the same `locations` facet, so both target the same way).
|
|
10463
10468
|
*
|
|
10464
10469
|
* LinkedIn B2B searches (`industry`, `jobFunction`, `seniority`, `companySize`) return the
|
|
10465
10470
|
* full URN to pass straight back, so no URN id fragment has to be assembled by hand:
|
|
@@ -10475,11 +10480,13 @@ export const searchAdInterests = <ThrowOnError extends boolean = false>(options:
|
|
|
10475
10480
|
* `target_type` is an open taxonomy that does not map one-to-one onto the
|
|
10476
10481
|
* `geoType` enum), so filter client-side on the returned `type` (`country`,
|
|
10477
10482
|
* `region`, `city`, `zip`, `metro`, or the lowercased Google target type for
|
|
10478
|
-
* rarer levels). `countryCode` scopes the search to one country.
|
|
10479
|
-
*
|
|
10480
|
-
*
|
|
10481
|
-
* `
|
|
10482
|
-
*
|
|
10483
|
+
* rarer levels). `countryCode` scopes the search to one country. A `country`
|
|
10484
|
+
* result's id is its ISO 3166-1 alpha-2 code, for `targeting.countries`;
|
|
10485
|
+
* every other id is Google's numeric criterion id, usable as a
|
|
10486
|
+
* `regions`/`cities`/`zips`/`metros` `key` on `POST /v1/ads/create`. Google
|
|
10487
|
+
* city radius is not supported (pass a `customLocations` lat/lng pin for a
|
|
10488
|
+
* radius); country targeting also accepts plain ISO codes via `countries`
|
|
10489
|
+
* with no search call.
|
|
10483
10490
|
*
|
|
10484
10491
|
* Pinterest resolves against three whole-catalog endpoints (interests, locations,
|
|
10485
10492
|
* regions) with no server-side query or pagination, so matching, ranking and the
|
|
@@ -8846,7 +8846,7 @@ export type WebhookPayloadComment = {
|
|
|
8846
8846
|
name?: string;
|
|
8847
8847
|
picture?: (string) | null;
|
|
8848
8848
|
/**
|
|
8849
|
-
* True when this comment was authored by the connected account itself (Meta re-delivers the account's own replies as comments events)
|
|
8849
|
+
* True when this comment was authored by the connected account itself. Populated on the Instagram and Facebook realtime webhooks (Meta re-delivers the account's own replies as comments events) and on TikTok, where it is inferred: comments created through this API are always flagged, and once the account's own author identifier is known (from one of those or from a comments listing) every author is compared against it. Absent means not evaluated, never "not the account".
|
|
8850
8850
|
*/
|
|
8851
8851
|
isOwnAccount?: boolean;
|
|
8852
8852
|
/**
|
|
@@ -39831,7 +39831,7 @@ export type SearchAdTargetingData = {
|
|
|
39831
39831
|
export type SearchAdTargetingResponse = ({
|
|
39832
39832
|
results?: Array<{
|
|
39833
39833
|
/**
|
|
39834
|
-
* The platform's opaque id. Use as a geo `key` (regions/cities/zips/metros) or an entity `id` (interests/behaviors) in TargetingSpec.
|
|
39834
|
+
* The platform's opaque id. Use as a geo `key` (regions/cities/zips/metros) or an entity `id` (interests/behaviors) in TargetingSpec. A `country` result is the exception on every platform: its id is the ISO 3166-1 alpha-2 code, which is what `targeting.countries` takes.
|
|
39835
39835
|
*/
|
|
39836
39836
|
id: string;
|
|
39837
39837
|
/**
|