@zernio/node 0.2.737 → 0.2.739

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.
@@ -255,6 +255,14 @@ export type Ad = {
255
255
  * Platform-specific creative data. Fields vary by platform.
256
256
  */
257
257
  creative?: {
258
+ /**
259
+ * Initial Performance Max asset group input. Use the asset-groups endpoint for current Google assets.
260
+ */
261
+ assetGroup?: GooglePmaxAssetGroupInput;
262
+ /**
263
+ * Google resource name of the created Performance Max asset group.
264
+ */
265
+ assetGroupResourceName?: string;
258
266
  /**
259
267
  * Google RSA only. Replaces the complete headline list. No padding or truncation on update.
260
268
  */
@@ -4473,6 +4481,70 @@ export type GoogleBusinessReview = {
4473
4481
  */
4474
4482
  export type starRating = 'ONE' | 'TWO' | 'THREE' | 'FOUR' | 'FIVE';
4475
4483
 
4484
+ export type GooglePmaxAssetGroup = {
4485
+ id: string;
4486
+ resourceName: string;
4487
+ name: string;
4488
+ /**
4489
+ * Asset-group status on Google. Campaign status independently controls delivery.
4490
+ */
4491
+ status: string;
4492
+ finalUrls: Array<(string)>;
4493
+ assets: Array<{
4494
+ resourceName: string;
4495
+ /**
4496
+ * Google asset role, such as HEADLINE or LOGO.
4497
+ */
4498
+ fieldType: string;
4499
+ status: string;
4500
+ text?: string;
4501
+ imageUrl?: string;
4502
+ youtubeVideoId?: string;
4503
+ }>;
4504
+ };
4505
+
4506
+ /**
4507
+ * Google Performance Max creative assets. At least one description must be 60 characters or fewer. Texts within each list must be distinct.
4508
+ */
4509
+ export type GooglePmaxAssetGroupInput = {
4510
+ /**
4511
+ * Defaults to the request name.
4512
+ */
4513
+ name?: string;
4514
+ /**
4515
+ * Required destination URL.
4516
+ */
4517
+ finalUrl: string;
4518
+ headlines: Array<(string)>;
4519
+ longHeadline: string;
4520
+ /**
4521
+ * At least one description must be 60 characters or fewer.
4522
+ */
4523
+ descriptions: Array<(string)>;
4524
+ businessName: string;
4525
+ /**
4526
+ * Public HTTP(S) image URLs. GIF, JPEG or PNG, at most 5120 KB per image. Google validates dimensions and aspect ratios.
4527
+ */
4528
+ images: {
4529
+ /**
4530
+ * Landscape marketing images. Aspect ratio 1.91:1, minimum 600 x 314 pixels.
4531
+ */
4532
+ landscape: Array<(string)>;
4533
+ /**
4534
+ * Square marketing images. Aspect ratio 1:1, minimum 300 x 300 pixels.
4535
+ */
4536
+ square: Array<(string)>;
4537
+ /**
4538
+ * Required square logos. Aspect ratio 1:1, minimum 128 x 128 pixels.
4539
+ */
4540
+ logo: Array<(string)>;
4541
+ };
4542
+ /**
4543
+ * Optional existing YouTube video id. Google can generate video when omitted. Video uploads and arbitrary video URLs are not supported.
4544
+ */
4545
+ youtubeVideoId?: string;
4546
+ };
4547
+
4476
4548
  export type GoogleRsaDescription = {
4477
4549
  text: string;
4478
4550
  /**
@@ -6605,7 +6677,7 @@ export type SocialAccount = {
6605
6677
  /**
6606
6678
  * Reference to the parent posting SocialAccount. Set for ads accounts that share
6607
6679
  * or derive from a posting account's OAuth token. null for standalone ads (Google Ads)
6608
- * and all posting accounts.
6680
+ * and all posting accounts. Meta ads business-login accounts also have no parent.
6609
6681
  *
6610
6682
  */
6611
6683
  parentAccountId?: (string) | null;
@@ -6627,6 +6699,17 @@ export type SocialAccount = {
6627
6699
  * - wabaId: WhatsApp Business Account ID
6628
6700
  * - phoneNumberId: Meta phone number ID
6629
6701
  *
6702
+ * For Meta ads business-login accounts:
6703
+ * - tokenType: system-user
6704
+ * - businessId: The owning Business Manager ID when there is one owner; null for multiple owners.
6705
+ * - businessIds: Owning Business Manager IDs discovered from granted ad accounts.
6706
+ * - grantedAdAccountIds: Ad-account IDs granted to the token.
6707
+ * - adAccountBusinesses: Map from ad-account ID to its owning business ID or null.
6708
+ * - availablePages: Granted Page IDs and names. No Page tokens are exposed.
6709
+ * - selectedPageId: The Page selected for creatives and lead forms, or null.
6710
+ * - scopedAdAccountIds: Existing sync scope preserved on reconnect.
6711
+ * Non-expiring tokens have no tokenExpiresAt field. Parent posting reconnects do not replace this token.
6712
+ *
6630
6713
  * For LinkedIn accounts, profileData carries the profile details refreshed on each daily snapshot:
6631
6714
  * - profileData.bio: The member's headline for personal accounts, or the organization description for organization accounts. null when the member has not set one.
6632
6715
  * - profileData.extraData.vanityName: The member's profile slug, i.e. the /in/{vanityName} segment of profileUrl. Personal accounts only; an organization's own slug is in metadata.organizationInfo.vanityName.
@@ -14690,7 +14773,7 @@ export type ConnectAdsData = {
14690
14773
  /**
14691
14774
  * Platform to connect ads for. Only platforms with ads support are accepted.
14692
14775
  *
14693
- * `instagram` requires an Instagram account connected with loginMethod=facebook_login whose
14776
+ * In classic mode, `instagram` requires an Instagram account connected with loginMethod=facebook_login whose
14694
14777
  * token carries ads_management and ads_read. With an account connected through the default
14695
14778
  * instagram_login flow no ads account can be created; do not use this value for those accounts.
14696
14779
  *
@@ -14708,7 +14791,9 @@ export type ConnectAdsData = {
14708
14791
  accountId?: string;
14709
14792
  /**
14710
14793
  * Scope ad sync to a single platform ad account. Without this param,
14711
- * sync covers every ad account the connected token can see. Supported
14794
+ * sync covers every ad account the connected token can see. Business-login reconnects
14795
+ * preserve the existing scope; supplied IDs are checked against the new grant. To change
14796
+ * that scope after migration, call this endpoint with the IDs and omit loginMode. Supported
14712
14797
  * on `facebook`/`instagram` (Meta, `act_<digits>`), `linkedin` (bare
14713
14798
  * numeric sponsored-account id), `googleads` (bare customer id digits)
14714
14799
  * and `twitter` (X Ads, base36 account id). `tiktok` scopes advertisers
@@ -14745,6 +14830,14 @@ export type ConnectAdsData = {
14745
14830
  * Enable headless mode (same-token platforms only)
14746
14831
  */
14747
14832
  headless?: boolean;
14833
+ /**
14834
+ * Meta ads authorization mode. Business login is opt-in for Facebook and Instagram; classic preserves the posting-account flow.
14835
+ */
14836
+ loginMode?: 'classic' | 'business';
14837
+ /**
14838
+ * Business login only. Facebook Page ID to select from the token grants for ad creatives and lead forms.
14839
+ */
14840
+ pageId?: string;
14748
14841
  /**
14749
14842
  * Your Zernio profile ID
14750
14843
  */
@@ -14777,6 +14870,10 @@ export type ConnectAdsResponse = (({
14777
14870
  platform?: string;
14778
14871
  username?: string;
14779
14872
  displayName?: string;
14873
+ /**
14874
+ * Present for an existing business-login connection.
14875
+ */
14876
+ tokenType?: 'system-user';
14780
14877
  /**
14781
14878
  * Echo of the persisted ad-account scope when the caller passed
14782
14879
  * `adAccountId` / `adAccountIds`. Omitted when no scope is set.
@@ -14792,6 +14889,23 @@ export type ConnectAdsError = (unknown | {
14792
14889
  error?: string;
14793
14890
  });
14794
14891
 
14892
+ export type CompleteMetaAdsBusinessLoginData = {
14893
+ query: {
14894
+ /**
14895
+ * Single-use authorization code returned by Meta.
14896
+ */
14897
+ code?: string;
14898
+ /**
14899
+ * Meta authorization error when the user declines the dialog.
14900
+ */
14901
+ error?: string;
14902
+ /**
14903
+ * Authenticated state from the initial connectAds response.
14904
+ */
14905
+ state: string;
14906
+ };
14907
+ };
14908
+
14795
14909
  export type GetShopifyConnectUrlData = {
14796
14910
  query: {
14797
14911
  /**
@@ -36421,6 +36535,14 @@ export type ListAdAccountsResponse = ({
36421
36535
  id?: string;
36422
36536
  name?: string;
36423
36537
  currency?: string;
36538
+ /**
36539
+ * Meta only. Owning Business Manager ID when available on the grant.
36540
+ */
36541
+ businessId?: string;
36542
+ /**
36543
+ * Owning business name when supplied by the platform.
36544
+ */
36545
+ businessName?: string;
36424
36546
  /**
36425
36547
  * LinkedIn only. LinkedIn's own ad account status. In practice always `ACTIVE`, because the LinkedIn query filters to active accounts. Meta, Google, TikTok and Pinterest report `accountStatus` instead; X reports `approvalStatus`.
36426
36548
  */
@@ -36912,6 +37034,25 @@ export type BoostPostError = (unknown | {
36912
37034
  error?: string;
36913
37035
  });
36914
37036
 
37037
+ export type ListGoogleAssetGroupsData = {
37038
+ path: {
37039
+ /**
37040
+ * Google Ads campaign id.
37041
+ */
37042
+ campaignId: string;
37043
+ };
37044
+ };
37045
+
37046
+ export type ListGoogleAssetGroupsResponse = ({
37047
+ assetGroups: Array<GooglePmaxAssetGroup>;
37048
+ cachedAt: (string) | null;
37049
+ stale: boolean;
37050
+ });
37051
+
37052
+ export type ListGoogleAssetGroupsError = (ErrorResponse | {
37053
+ error?: string;
37054
+ } | unknown);
37055
+
36915
37056
  export type CreateStandaloneAdData = {
36916
37057
  body: {
36917
37058
  accountId: string;
@@ -36981,19 +37122,19 @@ export type CreateStandaloneAdData = {
36981
37122
  */
36982
37123
  multiAdvertiser?: 'OPT_IN' | 'OPT_OUT';
36983
37124
  /**
36984
- * Meta only. Validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, existing video.id or existingCreativeId; media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error.
37125
+ * Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, existing video.id or existingCreativeId; media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error.
36985
37126
  */
36986
37127
  validateOnly?: boolean;
36987
37128
  /**
36988
- * Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType).
37129
+ * Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType).
36989
37130
  */
36990
37131
  budgetAmount?: number;
36991
37132
  /**
36992
- * Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads accepts lifetime only (no daily-budget concept on the platform); sending daily returns 422. OpenAI Ads lifetime budgets require `endDate` to give the lifetime cap a spend window.
37133
+ * Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads accepts lifetime only (no daily-budget concept on the platform); sending daily returns 422. OpenAI Ads lifetime budgets require `endDate` to give the lifetime cap a spend window.
36993
37134
  */
36994
37135
  budgetType?: 'daily' | 'lifetime';
36995
37136
  /**
36996
- * Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/{campaignId}/status with `active` brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: `existingCampaignId` (that campaign may be running and is never touched) or `campaignStatus: ACTIVE`. On TikTok the whole campaign > ad group > ad hierarchy stays paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
37137
+ * Google Performance Max accepts PAUSED only and always creates a paused campaign. Meta, TikTok, and LinkedIn: publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/{campaignId}/status with `active` brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: `existingCampaignId` (that campaign may be running and is never touched) or `campaignStatus: ACTIVE`. On TikTok the whole campaign > ad group > ad hierarchy stays paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
36997
37138
  */
36998
37139
  status?: 'ACTIVE' | 'PAUSED';
36999
37140
  /**
@@ -37689,9 +37830,10 @@ export type CreateStandaloneAdData = {
37689
37830
  */
37690
37831
  audienceId?: string;
37691
37832
  /**
37692
- * Google only
37833
+ * Google only. Performance Max requires assetGroup and is always created PAUSED.
37693
37834
  */
37694
- campaignType?: 'display' | 'search';
37835
+ campaignType?: 'display' | 'search' | 'pmax';
37836
+ assetGroup?: GooglePmaxAssetGroupInput;
37695
37837
  /**
37696
37838
  * Google Search only. Keywords on the new ad group; entries are strings (BROAD) or { text, matchType }. Editable later via PUT /v1/ads/{adId} targeting.keywords.
37697
37839
  */
@@ -37829,7 +37971,7 @@ export type CreateStandaloneAdData = {
37829
37971
  */
37830
37972
  roasAverageFloor?: number;
37831
37973
  /**
37832
- * Google only. Attach an existing portfolio bid strategy (numeric id from GET /v1/ads/bid-strategies) to the new campaign instead of a standard one. Exclusive with bidStrategy.
37974
+ * Google Search and Display only. Performance Max rejects portfolio bidding. Attach an existing portfolio bid strategy (numeric id from GET /v1/ads/bid-strategies) to the new campaign instead of a standard one. Exclusive with bidStrategy.
37833
37975
  */
37834
37976
  portfolioBidStrategyId?: string;
37835
37977
  /**
@@ -37981,7 +38123,7 @@ export type CreateStandaloneAdResponse = ({
37981
38123
  */
37982
38124
  validateOnly?: boolean;
37983
38125
  results?: Array<{
37984
- node?: 'campaign' | 'adSet' | 'creative' | 'ad';
38126
+ node?: 'campaign' | 'adSet' | 'creative' | 'ad' | 'performanceMaxCampaign';
37985
38127
  status?: 'validated' | 'skipped';
37986
38128
  /**
37987
38129
  * Why the node could not be validated (only on skipped).
@@ -38080,7 +38222,7 @@ export type ListLeadsError = (ErrorResponse | {
38080
38222
  export type ListLeadFormsData = {
38081
38223
  query: {
38082
38224
  /**
38083
- * Connected facebook or linkedin ads account id.
38225
+ * Connected Facebook, Meta ads business-login or LinkedIn ads account ID.
38084
38226
  */
38085
38227
  accountId: string;
38086
38228
  /**