@zernio/node 0.2.965 → 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
@@ -20983,6 +21033,80 @@ export type ResyncPageWebhookSubscriptionError = (ErrorResponse | {
20983
21033
  error?: string;
20984
21034
  } | unknown);
20985
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
+
20986
21110
  export type GetFacebookPagesData = {
20987
21111
  path: {
20988
21112
  accountId: string;
@@ -40558,6 +40682,118 @@ export type ListMetaBusinessesError = (unknown | {
40558
40682
  error?: string;
40559
40683
  } | ErrorResponse);
40560
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
+
40561
40797
  export type ListAdLabelsData = {
40562
40798
  query: {
40563
40799
  /**
@@ -42064,6 +42300,90 @@ export type UpdateAdAccountManagerLinkError = (ErrorResponse | {
42064
42300
  error?: string;
42065
42301
  } | unknown);
42066
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
+
42067
42387
  export type GetAdAccountFinanceData = {
42068
42388
  query: {
42069
42389
  /**
@@ -42366,12 +42686,24 @@ export type UpdateAdAccountData = {
42366
42686
  * Meta ad account ID (act_...)
42367
42687
  */
42368
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;
42369
42701
  /**
42370
42702
  * Legal entity benefiting from ads on this ad account
42371
42703
  */
42372
- defaultDsaBeneficiary: string;
42704
+ defaultDsaBeneficiary?: string;
42373
42705
  /**
42374
- * 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.
42375
42707
  */
42376
42708
  defaultDsaPayor?: string;
42377
42709
  };
@@ -42379,10 +42711,27 @@ export type UpdateAdAccountData = {
42379
42711
 
42380
42712
  export type UpdateAdAccountResponse = ({
42381
42713
  adAccountId?: string;
42714
+ /**
42715
+ * Present when defaultDsaBeneficiary was passed.
42716
+ */
42382
42717
  dsaDefaults?: {
42383
42718
  beneficiary?: string;
42384
42719
  payor?: string;
42385
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
+ };
42386
42735
  });
42387
42736
 
42388
42737
  export type UpdateAdAccountError = (unknown | {