@zernio/node 0.2.98 → 0.2.99
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 +30 -0
- package/dist/index.d.ts +30 -0
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +2 -36
- package/src/generated/types.gen.ts +30 -0
package/dist/index.d.mts
CHANGED
|
@@ -6267,6 +6267,36 @@ type GetGoogleBusinessLocationDetailsResponse = ({
|
|
|
6267
6267
|
success?: boolean;
|
|
6268
6268
|
accountId?: string;
|
|
6269
6269
|
locationId?: string;
|
|
6270
|
+
/**
|
|
6271
|
+
* Compact public-facing summary derived from `metadata`. Useful for
|
|
6272
|
+
* surfacing the "leave a review" URL (e.g. behind a QR code) without
|
|
6273
|
+
* parsing Google's raw `metadata` block. Populated when the readMask
|
|
6274
|
+
* includes `metadata` (the default). For unverified or new locations,
|
|
6275
|
+
* Google omits placeId/reviewUrl/mapsUri, so those return as null.
|
|
6276
|
+
*
|
|
6277
|
+
*/
|
|
6278
|
+
location?: {
|
|
6279
|
+
/**
|
|
6280
|
+
* Business name as set in GBP
|
|
6281
|
+
*/
|
|
6282
|
+
name?: (string) | null;
|
|
6283
|
+
/**
|
|
6284
|
+
* Google Maps Place ID for this location
|
|
6285
|
+
*/
|
|
6286
|
+
placeId?: (string) | null;
|
|
6287
|
+
/**
|
|
6288
|
+
* Public "write a review" URL Google generates for this place
|
|
6289
|
+
*/
|
|
6290
|
+
reviewUrl?: (string) | null;
|
|
6291
|
+
/**
|
|
6292
|
+
* Public Google Maps URL for this location
|
|
6293
|
+
*/
|
|
6294
|
+
mapsUri?: (string) | null;
|
|
6295
|
+
/**
|
|
6296
|
+
* True when the location has Voice of Merchant (verified + live on Google)
|
|
6297
|
+
*/
|
|
6298
|
+
isVerified?: boolean;
|
|
6299
|
+
} | null;
|
|
6270
6300
|
/**
|
|
6271
6301
|
* Business name
|
|
6272
6302
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -6267,6 +6267,36 @@ type GetGoogleBusinessLocationDetailsResponse = ({
|
|
|
6267
6267
|
success?: boolean;
|
|
6268
6268
|
accountId?: string;
|
|
6269
6269
|
locationId?: string;
|
|
6270
|
+
/**
|
|
6271
|
+
* Compact public-facing summary derived from `metadata`. Useful for
|
|
6272
|
+
* surfacing the "leave a review" URL (e.g. behind a QR code) without
|
|
6273
|
+
* parsing Google's raw `metadata` block. Populated when the readMask
|
|
6274
|
+
* includes `metadata` (the default). For unverified or new locations,
|
|
6275
|
+
* Google omits placeId/reviewUrl/mapsUri, so those return as null.
|
|
6276
|
+
*
|
|
6277
|
+
*/
|
|
6278
|
+
location?: {
|
|
6279
|
+
/**
|
|
6280
|
+
* Business name as set in GBP
|
|
6281
|
+
*/
|
|
6282
|
+
name?: (string) | null;
|
|
6283
|
+
/**
|
|
6284
|
+
* Google Maps Place ID for this location
|
|
6285
|
+
*/
|
|
6286
|
+
placeId?: (string) | null;
|
|
6287
|
+
/**
|
|
6288
|
+
* Public "write a review" URL Google generates for this place
|
|
6289
|
+
*/
|
|
6290
|
+
reviewUrl?: (string) | null;
|
|
6291
|
+
/**
|
|
6292
|
+
* Public Google Maps URL for this location
|
|
6293
|
+
*/
|
|
6294
|
+
mapsUri?: (string) | null;
|
|
6295
|
+
/**
|
|
6296
|
+
* True when the location has Voice of Merchant (verified + live on Google)
|
|
6297
|
+
*/
|
|
6298
|
+
isVerified?: boolean;
|
|
6299
|
+
} | null;
|
|
6270
6300
|
/**
|
|
6271
6301
|
* Business name
|
|
6272
6302
|
*/
|
package/package.json
CHANGED
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -3350,26 +3350,7 @@ export const boostPost = <ThrowOnError extends boolean = false>(options: Options
|
|
|
3350
3350
|
|
|
3351
3351
|
/**
|
|
3352
3352
|
* Create standalone ad
|
|
3353
|
-
* Creates a paid ad with custom creative
|
|
3354
|
-
*
|
|
3355
|
-
* 1. **Legacy single-creative** (all platforms). Top-level `headline` + `body` + `imageUrl` + `linkUrl` + `callToAction` create 1 campaign + 1 ad set + 1 ad.
|
|
3356
|
-
* 2. **Multi-creative** (Meta only — use `creatives[]` array). Creates 1 campaign + 1 ad set + N ads sharing the same budget / targeting / schedule. This is the standard performance-marketing creative-testing flow — Meta's delivery algorithm A/B tests the creatives inside a single ad set so budget isn't fragmented across N parallel campaigns.
|
|
3357
|
-
* 3. **Attach to existing ad set** (Meta only — pass `adSetId` + a single creative). Adds one new ad to an existing ad set without creating a new campaign. Budget, targeting, goal are inherited from the ad set on Meta.
|
|
3358
|
-
*
|
|
3359
|
-
* `creatives[]` and `adSetId` are mutually exclusive; specifying both returns 400.
|
|
3360
|
-
*
|
|
3361
|
-
* **Per-platform required fields** (the platform is inferred from `accountId`):
|
|
3362
|
-
* - **Meta (facebook, instagram)**: `accountId`, `adAccountId`, `name`, `goal`, `budgetAmount`, `budgetType`, `headline`, `body`, `imageUrl`, `linkUrl`, `callToAction`.
|
|
3363
|
-
* - **Google Ads (Display)**: `accountId`, `adAccountId`, `name`, `goal`, `budgetAmount`, `budgetType`, `headline`, `body`, `linkUrl`, `images.landscape` (1.91:1) + `images.square` (1:1), `businessName`. Google's Responsive Display Ads require BOTH a landscape and a square marketing image; supplying only one is rejected by Google as "Too few.". The legacy top-level `imageUrl` is accepted as an alias for `images.landscape` for back-compat. `longHeadline` defaults to `headline` if omitted (max 90 chars).
|
|
3364
|
-
* - **Google Ads (Search)**: `accountId`, `adAccountId`, `name`, `goal`, `budgetAmount`, `budgetType`, `headline`, `body`, `linkUrl`, `businessName`. `imageUrl` is NOT required for Search. Set `campaignType: "search"`.
|
|
3365
|
-
* - **TikTok**: `accountId`, `adAccountId`, `name`, `goal`, `budgetAmount`, `budgetType`, `body`, `linkUrl`, `imageUrl` (this field **carries the VIDEO URL** for TikTok; the TikTok ads endpoint is video-only and the field is named `imageUrl` for cross-platform consistency).
|
|
3366
|
-
* - **Pinterest**: `accountId`, `adAccountId`, `name`, `goal`, `budgetAmount`, `budgetType`, `headline`, `body`, `imageUrl`, `linkUrl`. Optional `boardId` (auto-creates "Zernio Ads" board if omitted).
|
|
3367
|
-
* - **X / Twitter**: `accountId` (the posting account, internally resolved to the linked X Ads credential), `adAccountId`, `name`, `goal`, `budgetAmount`, `budgetType`, `body` (the tweet text, max 280 chars with `linkUrl` adding ~24). `headline`, `imageUrl`, `callToAction`, and targeting fields are ignored. Requires a connected X Ads account (`/v1/connect/twitter/ads`); otherwise 422.
|
|
3368
|
-
*
|
|
3369
|
-
* **Budget minimums** are enforced per platform in USD: TikTok=$20, Pinterest=$5, all others=$1. If you pass `currency` other than USD, this minimum is currently still evaluated as USD. Pass the ad account's native currency on every request so Meta-side amount conversion is correct.
|
|
3370
|
-
*
|
|
3371
|
-
* **Video ads (Meta only).** Meta (facebook, instagram) supports video creatives on all three shapes (legacy, multi-creative via `creatives[].video`, attach). Set `video: { url, thumbnailUrl }` at the request root (for legacy/attach) or per-entry inside `creatives[]` (for multi-creative). `video` and `imageUrl` are mutually exclusive per creative; supply exactly one. `video.thumbnailUrl` is required because Meta requires a thumbnail on every video creative. The video is uploaded to Meta via chunked transfer and the request blocks on Meta's transcoding (`status.video_status === 'ready'`). This path can take several minutes for longer videos; this endpoint is configured with `maxDuration = 800` on Vercel (13 min) to cover it, but your HTTP client should allow for the same. If transcoding hasn't finished within 10 minutes, the request fails with a `platform_error`. Video on non-Meta platforms is NOT supported here: TikTok uses its own flow (pass the video URL via `imageUrl`); other platforms are image-only.
|
|
3372
|
-
*
|
|
3353
|
+
* Creates a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, and X/Twitter. Supports three mutually-exclusive request shapes selected by the body, a legacy single-creative shape (all platforms, default), a Meta-only multi-creative shape via the creatives array (one ad set with N ads sharing budget and targeting), and a Meta-only attach shape via adSetId (adds one new ad to an existing ad set). Per-platform required fields, budget minimums, and video-ad rules (Meta only) are documented on each property below.
|
|
3373
3354
|
*/
|
|
3374
3355
|
export const createStandaloneAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateStandaloneAdData, ThrowOnError>) => {
|
|
3375
3356
|
return (options?.client ?? client).post<CreateStandaloneAdResponse, CreateStandaloneAdError, ThrowOnError>({
|
|
@@ -3537,22 +3518,7 @@ export const sendWhatsAppConversion = <ThrowOnError extends boolean = false>(opt
|
|
|
3537
3518
|
|
|
3538
3519
|
/**
|
|
3539
3520
|
* Create Click-to-WhatsApp ad
|
|
3540
|
-
*
|
|
3541
|
-
* opens a WhatsApp conversation with the business attached to the
|
|
3542
|
-
* supplied Facebook Page. The full hierarchy (campaign, ad set,
|
|
3543
|
-
* creative, ad) is created and activated in one call.
|
|
3544
|
-
*
|
|
3545
|
-
* The CTA is locked to `WHATSAPP_MESSAGE` and the destination is
|
|
3546
|
-
* hard-coded to `https://api.whatsapp.com/send`. Meta resolves the
|
|
3547
|
-
* actual WhatsApp number from the Page-to-WA pairing the user
|
|
3548
|
-
* configured in Page settings or Business Manager.
|
|
3549
|
-
*
|
|
3550
|
-
* Prerequisites enforced by Meta (failure surfaces as a platform_error):
|
|
3551
|
-
* - The Facebook Page must already be paired with a verified WhatsApp
|
|
3552
|
-
* Business number.
|
|
3553
|
-
* - The WhatsApp Business Account must be business-verified.
|
|
3554
|
-
* - The Meta access token must carry `ads_management`.
|
|
3555
|
-
*
|
|
3521
|
+
* Creates a Click-to-WhatsApp (CTWA) ad on Meta. When tapped, the ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page, and the full hierarchy (campaign, ad set, creative, ad) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Prerequisites enforced by Meta (surfaced as platform_error on failure), the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
|
|
3556
3522
|
*/
|
|
3557
3523
|
export const createCtwaAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateCtwaAdData, ThrowOnError>) => {
|
|
3558
3524
|
return (options?.client ?? client).post<CreateCtwaAdResponse, CreateCtwaAdError, ThrowOnError>({
|
|
@@ -6035,6 +6035,36 @@ export type GetGoogleBusinessLocationDetailsResponse = ({
|
|
|
6035
6035
|
success?: boolean;
|
|
6036
6036
|
accountId?: string;
|
|
6037
6037
|
locationId?: string;
|
|
6038
|
+
/**
|
|
6039
|
+
* Compact public-facing summary derived from `metadata`. Useful for
|
|
6040
|
+
* surfacing the "leave a review" URL (e.g. behind a QR code) without
|
|
6041
|
+
* parsing Google's raw `metadata` block. Populated when the readMask
|
|
6042
|
+
* includes `metadata` (the default). For unverified or new locations,
|
|
6043
|
+
* Google omits placeId/reviewUrl/mapsUri, so those return as null.
|
|
6044
|
+
*
|
|
6045
|
+
*/
|
|
6046
|
+
location?: {
|
|
6047
|
+
/**
|
|
6048
|
+
* Business name as set in GBP
|
|
6049
|
+
*/
|
|
6050
|
+
name?: (string) | null;
|
|
6051
|
+
/**
|
|
6052
|
+
* Google Maps Place ID for this location
|
|
6053
|
+
*/
|
|
6054
|
+
placeId?: (string) | null;
|
|
6055
|
+
/**
|
|
6056
|
+
* Public "write a review" URL Google generates for this place
|
|
6057
|
+
*/
|
|
6058
|
+
reviewUrl?: (string) | null;
|
|
6059
|
+
/**
|
|
6060
|
+
* Public Google Maps URL for this location
|
|
6061
|
+
*/
|
|
6062
|
+
mapsUri?: (string) | null;
|
|
6063
|
+
/**
|
|
6064
|
+
* True when the location has Voice of Merchant (verified + live on Google)
|
|
6065
|
+
*/
|
|
6066
|
+
isVerified?: boolean;
|
|
6067
|
+
} | null;
|
|
6038
6068
|
/**
|
|
6039
6069
|
* Business name
|
|
6040
6070
|
*/
|