@zernio/node 0.2.964 → 0.2.966

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.
@@ -7015,6 +7015,28 @@ export type MetaAdsPlatformData = {
7015
7015
  lifetimeMinSpendTarget?: number;
7016
7016
  };
7017
7017
 
7018
+ export type MetaAssignedUser = {
7019
+ /**
7020
+ * Business-scoped user id.
7021
+ */
7022
+ id?: string;
7023
+ name?: string;
7024
+ tasks?: Array<(string)>;
7025
+ };
7026
+
7027
+ export type MetaBusinessUser = {
7028
+ /**
7029
+ * Business-scoped user id.
7030
+ */
7031
+ id?: string;
7032
+ name?: string;
7033
+ email?: string;
7034
+ /**
7035
+ * Meta role in the portfolio, e.g. ADMIN or EMPLOYEE.
7036
+ */
7037
+ role?: string;
7038
+ };
7039
+
7018
7040
  export type MetaCatalogProduct = {
7019
7041
  /**
7020
7042
  * Meta product item ID (use in the product endpoints)
@@ -7269,6 +7291,34 @@ export type MetaLeadForm = {
7269
7291
 
7270
7292
  export type style = 'LIST_STYLE' | 'PARAGRAPH_STYLE';
7271
7293
 
7294
+ export type MetaPageOwnership = {
7295
+ /**
7296
+ * Facebook Page id.
7297
+ */
7298
+ id?: string;
7299
+ name?: string;
7300
+ /**
7301
+ * Business portfolio that owns the Page; null when the Page is outside any portfolio.
7302
+ */
7303
+ business?: {
7304
+ id?: string;
7305
+ name?: string;
7306
+ } | null;
7307
+ /**
7308
+ * Instagram professional account linked to the Page; null when none is linked.
7309
+ */
7310
+ instagramBusinessAccount?: {
7311
+ id?: string;
7312
+ username?: string;
7313
+ } | null;
7314
+ };
7315
+
7316
+ export type MetaPagePartner = {
7317
+ businessId?: string;
7318
+ name?: string;
7319
+ permittedTasks?: Array<(string)>;
7320
+ };
7321
+
7272
7322
  /**
7273
7323
  * Meta placement asset customization: pin a SPECIFIC asset (image OR video) to each
7274
7324
  * placement group on a SINGLE ad (e.g. a 4:5 image on Feed and a 9:16 image on
@@ -8740,26 +8790,50 @@ export type SocialAccount = {
8740
8790
  export type platform10 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs';
8741
8791
 
8742
8792
  /**
8743
- * A tracking tag's install on a connected store (Shopify web pixel).
8793
+ * A tracking tag's install on a connected store: a Shopify web pixel, or a Custom HTML widget on a WordPress site. Fields marked Shopify or WordPress are present only for that platform.
8744
8794
  */
8745
8795
  export type StorePixelInstall = {
8746
8796
  storeAccountId?: string;
8747
- platform?: 'shopify';
8748
- shopDomain?: string;
8797
+ platform?: 'shopify' | 'wordpress';
8749
8798
  /**
8750
- * True when this tag is the pixel the store fires.
8799
+ * Shopify: this tag is the pixel the store fires. WordPress: the Zernio widget for this tag is in an active widget area with its script intact.
8751
8800
  */
8752
8801
  installed?: boolean;
8753
8802
  /**
8754
- * The Meta pixel the store fires now (may be a different tag), or null.
8803
+ * Shopify only.
8804
+ */
8805
+ shopDomain?: string;
8806
+ /**
8807
+ * Shopify only: the Meta pixel the store fires now (may be a different tag), or null.
8755
8808
  */
8756
8809
  installedTagId?: (string) | null;
8757
8810
  /**
8758
- * Shopify web pixel id, or null when nothing is installed.
8811
+ * Shopify only: web pixel id, or null when nothing is installed.
8759
8812
  */
8760
8813
  webPixelId?: (string) | null;
8814
+ /**
8815
+ * WordPress only.
8816
+ */
8817
+ siteUrl?: string;
8818
+ /**
8819
+ * WordPress only.
8820
+ */
8821
+ method?: 'wordpress_widget';
8822
+ /**
8823
+ * WordPress only: widget id, e.g. `custom_html-3`.
8824
+ */
8825
+ widgetId?: (string) | null;
8826
+ /**
8827
+ * WordPress only: widget area holding the widget.
8828
+ */
8829
+ sidebarId?: (string) | null;
8761
8830
  };
8762
8831
 
8832
+ /**
8833
+ * WordPress only.
8834
+ */
8835
+ export type method = 'wordpress_widget';
8836
+
8763
8837
  /**
8764
8838
  * Normalized, platform-agnostic ad-targeting spec. Every field is optional, an
8765
8839
  * empty object targets the platform's default broadest audience. Field names are
@@ -9315,6 +9389,11 @@ export type platform11 = 'metaads';
9315
9389
  */
9316
9390
  export type kind2 = 'pixel' | 'tag' | 'insight_tag';
9317
9391
 
9392
+ /**
9393
+ * Why a pixel cannot be installed on a WordPress site.
9394
+ */
9395
+ export type TrackingTagInstallBlockedReason = 'insufficient_permissions' | 'scripts_stripped' | 'wordpress_com_plan' | 'no_widget_areas' | 'widgets_api_unavailable';
9396
+
9318
9397
  /**
9319
9398
  * X-specific post options. The article field creates a long-form X Article and is mutually exclusive with tweet media and tweet-only options. Geo-restriction applies at the media level: media is hidden outside the specified countries while tweet text remains visible.
9320
9399
  *
@@ -20954,6 +21033,80 @@ export type ResyncPageWebhookSubscriptionError = (ErrorResponse | {
20954
21033
  error?: string;
20955
21034
  } | unknown);
20956
21035
 
21036
+ export type ListBusinessPartnersData = {
21037
+ path: {
21038
+ /**
21039
+ * Zernio SocialAccount id of the Facebook or Instagram account.
21040
+ */
21041
+ accountId: string;
21042
+ };
21043
+ };
21044
+
21045
+ export type ListBusinessPartnersResponse = ({
21046
+ page?: MetaPageOwnership;
21047
+ partners?: Array<MetaPagePartner>;
21048
+ });
21049
+
21050
+ export type ListBusinessPartnersError = (ErrorResponse | {
21051
+ error?: string;
21052
+ } | unknown);
21053
+
21054
+ export type GrantBusinessPartnerData = {
21055
+ body: {
21056
+ /**
21057
+ * Meta business portfolio id of the partner (numeric string).
21058
+ */
21059
+ businessId: string;
21060
+ /**
21061
+ * Tasks granted on the Page. Defaults to ADVERTISE and ANALYZE.
21062
+ */
21063
+ permittedTasks?: Array<('MANAGE' | 'CREATE_CONTENT' | 'MODERATE' | 'MESSAGING' | 'ADVERTISE' | 'ANALYZE')>;
21064
+ };
21065
+ path: {
21066
+ /**
21067
+ * Zernio SocialAccount id of the Facebook or Instagram account.
21068
+ */
21069
+ accountId: string;
21070
+ };
21071
+ };
21072
+
21073
+ export type GrantBusinessPartnerResponse = ({
21074
+ page?: MetaPageOwnership;
21075
+ partner?: {
21076
+ businessId?: string;
21077
+ permittedTasks?: Array<(string)>;
21078
+ };
21079
+ });
21080
+
21081
+ export type GrantBusinessPartnerError = (ErrorResponse | {
21082
+ error?: string;
21083
+ } | unknown);
21084
+
21085
+ export type RevokeBusinessPartnerData = {
21086
+ path: {
21087
+ /**
21088
+ * Zernio SocialAccount id of the Facebook or Instagram account.
21089
+ */
21090
+ accountId: string;
21091
+ };
21092
+ query: {
21093
+ /**
21094
+ * Meta business portfolio id of the partner (numeric string).
21095
+ */
21096
+ businessId: string;
21097
+ };
21098
+ };
21099
+
21100
+ export type RevokeBusinessPartnerResponse = ({
21101
+ pageId?: string;
21102
+ businessId?: string;
21103
+ revoked?: boolean;
21104
+ });
21105
+
21106
+ export type RevokeBusinessPartnerError = (ErrorResponse | {
21107
+ error?: string;
21108
+ } | unknown);
21109
+
20957
21110
  export type GetFacebookPagesData = {
20958
21111
  path: {
20959
21112
  accountId: string;
@@ -40529,6 +40682,118 @@ export type ListMetaBusinessesError = (unknown | {
40529
40682
  error?: string;
40530
40683
  } | ErrorResponse);
40531
40684
 
40685
+ export type ListMetaBusinessUsersData = {
40686
+ query: {
40687
+ /**
40688
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
40689
+ */
40690
+ accountId: string;
40691
+ /**
40692
+ * Meta business portfolio id.
40693
+ */
40694
+ businessId: string;
40695
+ };
40696
+ };
40697
+
40698
+ export type ListMetaBusinessUsersResponse = ({
40699
+ businessId?: string;
40700
+ users?: Array<MetaBusinessUser>;
40701
+ systemUsers?: Array<MetaBusinessUser>;
40702
+ });
40703
+
40704
+ export type ListMetaBusinessUsersError = (unknown | {
40705
+ error?: string;
40706
+ } | ErrorResponse);
40707
+
40708
+ export type ListPageUsersData = {
40709
+ query: {
40710
+ /**
40711
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
40712
+ */
40713
+ accountId: string;
40714
+ /**
40715
+ * Business portfolio whose people to list.
40716
+ */
40717
+ businessId: string;
40718
+ /**
40719
+ * Facebook Page id.
40720
+ */
40721
+ pageId: string;
40722
+ };
40723
+ };
40724
+
40725
+ export type ListPageUsersResponse = ({
40726
+ pageId?: string;
40727
+ businessId?: string;
40728
+ users?: Array<MetaAssignedUser>;
40729
+ });
40730
+
40731
+ export type ListPageUsersError = (unknown | {
40732
+ error?: string;
40733
+ } | ErrorResponse);
40734
+
40735
+ export type AssignPageUserData = {
40736
+ body: {
40737
+ /**
40738
+ * Zernio SocialAccount id used to resolve the Meta token.
40739
+ */
40740
+ accountId: string;
40741
+ /**
40742
+ * Facebook Page id.
40743
+ */
40744
+ pageId: string;
40745
+ /**
40746
+ * Business portfolio the user belongs to.
40747
+ */
40748
+ businessId: string;
40749
+ /**
40750
+ * Business-scoped user id from GET /v1/ads/businesses/users.
40751
+ */
40752
+ userId: string;
40753
+ tasks: Array<('MANAGE' | 'CREATE_CONTENT' | 'MODERATE' | 'MESSAGING' | 'ADVERTISE' | 'ANALYZE')>;
40754
+ };
40755
+ };
40756
+
40757
+ export type AssignPageUserResponse = ({
40758
+ pageId?: string;
40759
+ businessId?: string;
40760
+ user?: {
40761
+ id?: string;
40762
+ tasks?: Array<(string)>;
40763
+ };
40764
+ });
40765
+
40766
+ export type AssignPageUserError = (unknown | {
40767
+ error?: string;
40768
+ } | ErrorResponse);
40769
+
40770
+ export type RemovePageUserData = {
40771
+ query: {
40772
+ /**
40773
+ * Zernio SocialAccount id used to resolve the Meta token.
40774
+ */
40775
+ accountId: string;
40776
+ /**
40777
+ * Facebook Page id.
40778
+ */
40779
+ pageId: string;
40780
+ /**
40781
+ * Business-scoped user id.
40782
+ */
40783
+ userId: string;
40784
+ };
40785
+ };
40786
+
40787
+ export type RemovePageUserResponse = ({
40788
+ pageId?: string;
40789
+ userId?: string;
40790
+ removed?: boolean;
40791
+ });
40792
+
40793
+ export type RemovePageUserError = (unknown | {
40794
+ error?: string;
40795
+ } | ErrorResponse);
40796
+
40532
40797
  export type ListAdLabelsData = {
40533
40798
  query: {
40534
40799
  /**
@@ -42035,6 +42300,90 @@ export type UpdateAdAccountManagerLinkError = (ErrorResponse | {
42035
42300
  error?: string;
42036
42301
  } | unknown);
42037
42302
 
42303
+ export type ListAdAccountUsersData = {
42304
+ query: {
42305
+ /**
42306
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
42307
+ */
42308
+ accountId: string;
42309
+ /**
42310
+ * Meta ad account id (act_<n>).
42311
+ */
42312
+ adAccountId: string;
42313
+ /**
42314
+ * Business portfolio whose people to list.
42315
+ */
42316
+ businessId: string;
42317
+ };
42318
+ };
42319
+
42320
+ export type ListAdAccountUsersResponse = ({
42321
+ adAccountId?: string;
42322
+ businessId?: string;
42323
+ users?: Array<MetaAssignedUser>;
42324
+ });
42325
+
42326
+ export type ListAdAccountUsersError = (unknown | {
42327
+ error?: string;
42328
+ } | ErrorResponse);
42329
+
42330
+ export type AssignAdAccountUserData = {
42331
+ body: {
42332
+ /**
42333
+ * Zernio SocialAccount id used to resolve the Meta token.
42334
+ */
42335
+ accountId: string;
42336
+ /**
42337
+ * Meta ad account id (act_<n>).
42338
+ */
42339
+ adAccountId: string;
42340
+ /**
42341
+ * Business-scoped user id from GET /v1/ads/businesses/users.
42342
+ */
42343
+ userId: string;
42344
+ tasks: Array<('MANAGE' | 'ADVERTISE' | 'ANALYZE' | 'DRAFT')>;
42345
+ };
42346
+ };
42347
+
42348
+ export type AssignAdAccountUserResponse = ({
42349
+ adAccountId?: string;
42350
+ user?: {
42351
+ id?: string;
42352
+ tasks?: Array<(string)>;
42353
+ };
42354
+ });
42355
+
42356
+ export type AssignAdAccountUserError = (unknown | {
42357
+ error?: string;
42358
+ } | ErrorResponse);
42359
+
42360
+ export type RemoveAdAccountUserData = {
42361
+ query: {
42362
+ /**
42363
+ * Zernio SocialAccount id used to resolve the Meta token.
42364
+ */
42365
+ accountId: string;
42366
+ /**
42367
+ * Meta ad account id (act_<n>).
42368
+ */
42369
+ adAccountId: string;
42370
+ /**
42371
+ * Business-scoped user id.
42372
+ */
42373
+ userId: string;
42374
+ };
42375
+ };
42376
+
42377
+ export type RemoveAdAccountUserResponse = ({
42378
+ adAccountId?: string;
42379
+ userId?: string;
42380
+ removed?: boolean;
42381
+ });
42382
+
42383
+ export type RemoveAdAccountUserError = (unknown | {
42384
+ error?: string;
42385
+ } | ErrorResponse);
42386
+
42038
42387
  export type GetAdAccountFinanceData = {
42039
42388
  query: {
42040
42389
  /**
@@ -42337,12 +42686,24 @@ export type UpdateAdAccountData = {
42337
42686
  * Meta ad account ID (act_...)
42338
42687
  */
42339
42688
  adAccountId: string;
42689
+ /**
42690
+ * New ad account name.
42691
+ */
42692
+ name?: string;
42693
+ /**
42694
+ * Account spend cap in whole currency units; null removes it.
42695
+ */
42696
+ spendCap?: (number) | null;
42697
+ /**
42698
+ * Restart the amount counted against the cap from zero. Cannot be combined with spendCap null.
42699
+ */
42700
+ resetAmountSpent?: boolean;
42340
42701
  /**
42341
42702
  * Legal entity benefiting from ads on this ad account
42342
42703
  */
42343
- defaultDsaBeneficiary: string;
42704
+ defaultDsaBeneficiary?: string;
42344
42705
  /**
42345
- * Legal entity paying for ads on this ad account. Defaults to defaultDsaBeneficiary when omitted.
42706
+ * Legal entity paying for ads on this ad account. Defaults to defaultDsaBeneficiary when omitted. Requires defaultDsaBeneficiary.
42346
42707
  */
42347
42708
  defaultDsaPayor?: string;
42348
42709
  };
@@ -42350,10 +42711,27 @@ export type UpdateAdAccountData = {
42350
42711
 
42351
42712
  export type UpdateAdAccountResponse = ({
42352
42713
  adAccountId?: string;
42714
+ /**
42715
+ * Present when defaultDsaBeneficiary was passed.
42716
+ */
42353
42717
  dsaDefaults?: {
42354
42718
  beneficiary?: string;
42355
42719
  payor?: string;
42356
42720
  };
42721
+ /**
42722
+ * Present when name, spendCap or resetAmountSpent was passed.
42723
+ */
42724
+ settings?: {
42725
+ name?: string;
42726
+ currency?: string;
42727
+ balance?: number;
42728
+ amountSpent?: number;
42729
+ spendCap?: (number) | null;
42730
+ fundingSource?: {
42731
+ displayString?: string;
42732
+ type?: number;
42733
+ } | null;
42734
+ };
42357
42735
  });
42358
42736
 
42359
42737
  export type UpdateAdAccountError = (unknown | {
@@ -48609,9 +48987,17 @@ export type RemoveTrackingTagSharedAccountError = (unknown | {
48609
48987
  export type InstallTrackingTagOnStoreData = {
48610
48988
  body: {
48611
48989
  /**
48612
- * The connected Shopify account id (platform `shopify`).
48990
+ * The connected Shopify (`shopify`) or WordPress (`wordpress`) account id.
48613
48991
  */
48614
48992
  storeAccountId: string;
48993
+ /**
48994
+ * WordPress only: widget area to use (see `install.preflight.sidebars` from GET). Defaults to a footer area.
48995
+ */
48996
+ sidebarId?: string;
48997
+ /**
48998
+ * WordPress only: fetch the homepage afterwards and report `homepageCheck`.
48999
+ */
49000
+ verifyHomepage?: boolean;
48615
49001
  };
48616
49002
  path: {
48617
49003
  accountId: string;
@@ -48626,15 +49012,36 @@ export type InstallTrackingTagOnStoreResponse = ({
48626
49012
  platform?: 'metaads';
48627
49013
  install?: (StorePixelInstall & {
48628
49014
  /**
48629
- * The pixel this install replaced on the store, if any.
49015
+ * Shopify only: the pixel this install replaced on the store, if any.
48630
49016
  */
48631
49017
  replacedTagId?: (string) | null;
49018
+ /**
49019
+ * WordPress only: name of the widget area used.
49020
+ */
49021
+ sidebarName?: string;
49022
+ /**
49023
+ * WordPress only: false when an existing Zernio widget was updated.
49024
+ */
49025
+ created?: boolean;
49026
+ /**
49027
+ * WordPress only: whether the pixel appeared in the homepage HTML. `not_found` can be a stale page cache.
49028
+ */
49029
+ homepageCheck?: 'found' | 'not_found' | 'unreachable' | 'skipped';
48632
49030
  });
48633
49031
  });
48634
49032
 
48635
49033
  export type InstallTrackingTagOnStoreError = (ErrorResponse | {
48636
49034
  error?: string;
48637
- } | unknown);
49035
+ } | unknown | {
49036
+ /**
49037
+ * What blocked the install and the manual alternative.
49038
+ */
49039
+ error?: string;
49040
+ code?: 'tracking_tag_install_blocked';
49041
+ details?: {
49042
+ reason?: TrackingTagInstallBlockedReason;
49043
+ };
49044
+ });
48638
49045
 
48639
49046
  export type GetTrackingTagStoreInstallData = {
48640
49047
  path: {
@@ -48646,7 +49053,7 @@ export type GetTrackingTagStoreInstallData = {
48646
49053
  };
48647
49054
  query: {
48648
49055
  /**
48649
- * The connected Shopify account id.
49056
+ * The connected Shopify or WordPress account id.
48650
49057
  */
48651
49058
  storeAccountId: string;
48652
49059
  };
@@ -48654,7 +49061,28 @@ export type GetTrackingTagStoreInstallData = {
48654
49061
 
48655
49062
  export type GetTrackingTagStoreInstallResponse = ({
48656
49063
  platform?: 'metaads';
48657
- install?: StorePixelInstall;
49064
+ install?: (StorePixelInstall & {
49065
+ /**
49066
+ * WordPress only.
49067
+ */
49068
+ preflight?: {
49069
+ /**
49070
+ * True when POST should be able to install.
49071
+ */
49072
+ ready?: boolean;
49073
+ /**
49074
+ * A TrackingTagInstallBlockedReason when an install would be blocked, else null.
49075
+ */
49076
+ reason?: (string) | null;
49077
+ /**
49078
+ * Active widget areas of the theme.
49079
+ */
49080
+ sidebars?: Array<{
49081
+ id?: string;
49082
+ name?: string;
49083
+ }>;
49084
+ };
49085
+ });
48658
49086
  });
48659
49087
 
48660
49088
  export type GetTrackingTagStoreInstallError = (ErrorResponse | {
@@ -48671,7 +49099,7 @@ export type RemoveTrackingTagFromStoreData = {
48671
49099
  };
48672
49100
  query: {
48673
49101
  /**
48674
- * The connected Shopify account id.
49102
+ * The connected Shopify or WordPress account id.
48675
49103
  */
48676
49104
  storeAccountId: string;
48677
49105
  };
@@ -48679,7 +49107,12 @@ export type RemoveTrackingTagFromStoreData = {
48679
49107
 
48680
49108
  export type RemoveTrackingTagFromStoreResponse = ({
48681
49109
  platform?: 'metaads';
48682
- install?: StorePixelInstall;
49110
+ install?: (StorePixelInstall & {
49111
+ /**
49112
+ * WordPress only: number of Zernio widgets deleted.
49113
+ */
49114
+ removed?: number;
49115
+ });
48683
49116
  });
48684
49117
 
48685
49118
  export type RemoveTrackingTagFromStoreError = (ErrorResponse | {