@getlatedev/node 0.2.399 → 0.2.401

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.
@@ -1722,6 +1722,38 @@ export type CtwaSingleResponse = {
1722
1722
 
1723
1723
  export type adType3 = 'single';
1724
1724
 
1725
+ /**
1726
+ * A Discord guild member, returned verbatim from Discord's API.
1727
+ */
1728
+ export type DiscordGuildMember = {
1729
+ user?: {
1730
+ /**
1731
+ * User snowflake
1732
+ */
1733
+ id?: string;
1734
+ username?: string;
1735
+ discriminator?: string;
1736
+ avatar?: (string) | null;
1737
+ /**
1738
+ * User's display name (post-2023 Discord rebrand)
1739
+ */
1740
+ global_name?: (string) | null;
1741
+ };
1742
+ /**
1743
+ * Guild-specific nickname
1744
+ */
1745
+ nick?: (string) | null;
1746
+ /**
1747
+ * Snowflake IDs of roles assigned to this member
1748
+ */
1749
+ roles?: Array<(string)>;
1750
+ joined_at?: string;
1751
+ /**
1752
+ * When the user started boosting the server
1753
+ */
1754
+ premium_since?: (string) | null;
1755
+ };
1756
+
1725
1757
  /**
1726
1758
  * Discord message settings. Supports plain text (2,000 chars), rich embeds (up to 10), native polls, forum posts, threads, and announcement crossposts. Media attachments support images (JPEG, PNG, GIF, WebP), videos (MP4), and documents (up to 10 files, 25 MB each). Webhook identity (username + avatar) can be customized per-account via PATCH /v1/connect/discord or per-post via webhookUsername/webhookAvatarUrl.
1727
1759
  *
@@ -13625,34 +13657,7 @@ export type ListDiscordGuildMembersData = {
13625
13657
  };
13626
13658
 
13627
13659
  export type ListDiscordGuildMembersResponse = ({
13628
- data?: Array<{
13629
- user?: {
13630
- /**
13631
- * User snowflake
13632
- */
13633
- id?: string;
13634
- username?: string;
13635
- discriminator?: string;
13636
- avatar?: (string) | null;
13637
- /**
13638
- * User's display name (post-2023 Discord rebrand)
13639
- */
13640
- global_name?: (string) | null;
13641
- };
13642
- /**
13643
- * Guild-specific nickname
13644
- */
13645
- nick?: (string) | null;
13646
- /**
13647
- * Snowflake IDs of roles assigned to this member
13648
- */
13649
- roles?: Array<(string)>;
13650
- joined_at?: string;
13651
- /**
13652
- * When the user started boosting the server
13653
- */
13654
- premium_since?: (string) | null;
13655
- }>;
13660
+ data?: Array<DiscordGuildMember>;
13656
13661
  pagination?: {
13657
13662
  /**
13658
13663
  * Pass as `after` on the next call. Null when there are no more pages.
@@ -13666,6 +13671,49 @@ export type ListDiscordGuildMembersError = (unknown | {
13666
13671
  error?: string;
13667
13672
  });
13668
13673
 
13674
+ export type SearchDiscordGuildMembersData = {
13675
+ path: {
13676
+ guildId: string;
13677
+ };
13678
+ query: {
13679
+ accountId: string;
13680
+ limit?: number;
13681
+ /**
13682
+ * Username or nickname prefix to match.
13683
+ */
13684
+ query: string;
13685
+ };
13686
+ };
13687
+
13688
+ export type SearchDiscordGuildMembersResponse = ({
13689
+ data?: Array<DiscordGuildMember>;
13690
+ });
13691
+
13692
+ export type SearchDiscordGuildMembersError = (unknown | {
13693
+ error?: string;
13694
+ });
13695
+
13696
+ export type GetDiscordGuildMemberData = {
13697
+ path: {
13698
+ guildId: string;
13699
+ /**
13700
+ * Discord user snowflake.
13701
+ */
13702
+ userId: string;
13703
+ };
13704
+ query: {
13705
+ accountId: string;
13706
+ };
13707
+ };
13708
+
13709
+ export type GetDiscordGuildMemberResponse = ({
13710
+ data?: DiscordGuildMember;
13711
+ });
13712
+
13713
+ export type GetDiscordGuildMemberError = (ErrorResponse | {
13714
+ error?: string;
13715
+ } | unknown);
13716
+
13669
13717
  export type AddDiscordMemberRoleData = {
13670
13718
  path: {
13671
13719
  guildId: string;
@@ -17957,6 +18005,105 @@ export type ListSmsOptOutsError = ({
17957
18005
  error?: string;
17958
18006
  });
17959
18007
 
18008
+ export type CreateSmsSenderIdData = {
18009
+ body: {
18010
+ /**
18011
+ * The sender ID recipients will see (3-11 letters/digits/spaces, at least one letter, no leading/trailing space).
18012
+ */
18013
+ senderId: string;
18014
+ };
18015
+ };
18016
+
18017
+ export type CreateSmsSenderIdResponse = ({
18018
+ /**
18019
+ * Sender ID resource id.
18020
+ */
18021
+ id?: string;
18022
+ senderId?: string;
18023
+ isActive?: boolean;
18024
+ });
18025
+
18026
+ export type CreateSmsSenderIdError = (ErrorResponse | {
18027
+ error?: string;
18028
+ } | unknown);
18029
+
18030
+ export type ListSmsSenderIdsResponse = ({
18031
+ senderIds?: Array<{
18032
+ id?: string;
18033
+ senderId?: string;
18034
+ isActive?: boolean;
18035
+ createdAt?: (string) | null;
18036
+ }>;
18037
+ /**
18038
+ * Workspace-wide daily sending budget, shared by every sender ID (resets midnight UTC).
18039
+ */
18040
+ budget?: {
18041
+ /**
18042
+ * Daily message cap (raisable via `/v1/sms/sender-ids/limit-request`).
18043
+ */
18044
+ cap?: number;
18045
+ /**
18046
+ * Messages already counted against today's cap.
18047
+ */
18048
+ usedToday?: number;
18049
+ /**
18050
+ * Cap tier (Level 1 = 500/day).
18051
+ */
18052
+ level?: number;
18053
+ /**
18054
+ * The in-flight cap-raise request awaiting review, or null. While set, further requests return 409.
18055
+ */
18056
+ pendingRequest?: {
18057
+ requestedCap?: number;
18058
+ level?: number;
18059
+ requestedAt?: (string) | null;
18060
+ } | null;
18061
+ };
18062
+ });
18063
+
18064
+ export type ListSmsSenderIdsError = ({
18065
+ error?: string;
18066
+ });
18067
+
18068
+ export type RequestSmsSenderIdLimitIncreaseData = {
18069
+ body: {
18070
+ /**
18071
+ * Desired daily message cap. Must exceed the current cap.
18072
+ */
18073
+ requestedCap: number;
18074
+ /**
18075
+ * Use case and audience (what you send, to whom, opt-in status).
18076
+ */
18077
+ reason: string;
18078
+ };
18079
+ };
18080
+
18081
+ export type RequestSmsSenderIdLimitIncreaseResponse = ({
18082
+ requested?: boolean;
18083
+ requestedCap?: number;
18084
+ });
18085
+
18086
+ export type RequestSmsSenderIdLimitIncreaseError = (ErrorResponse | {
18087
+ error?: string;
18088
+ } | unknown);
18089
+
18090
+ export type DeleteSmsSenderIdData = {
18091
+ path: {
18092
+ /**
18093
+ * Sender ID resource id.
18094
+ */
18095
+ id: string;
18096
+ };
18097
+ };
18098
+
18099
+ export type DeleteSmsSenderIdResponse = ({
18100
+ deleted?: boolean;
18101
+ });
18102
+
18103
+ export type DeleteSmsSenderIdError = (ErrorResponse | {
18104
+ error?: string;
18105
+ } | unknown);
18106
+
17960
18107
  export type StartSmsRegistrationData = {
17961
18108
  body: {
17962
18109
  registrationType: 'standard_10dlc' | 'sole_prop_10dlc' | 'toll_free';
@@ -23735,6 +23882,48 @@ export type ListAdCampaignsError = ({
23735
23882
  error?: string;
23736
23883
  } | unknown);
23737
23884
 
23885
+ export type CreateAdCampaignData = {
23886
+ body: {
23887
+ /**
23888
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
23889
+ */
23890
+ accountId: string;
23891
+ /**
23892
+ * Meta ad account id (act_<n>).
23893
+ */
23894
+ adAccountId: string;
23895
+ name: string;
23896
+ /**
23897
+ * Mapped to the ODAX objective (same mapping as POST /v1/ads/create).
23898
+ */
23899
+ goal: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'job_applicants' | 'conversions' | 'app_promotion' | 'catalog_sales';
23900
+ specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
23901
+ /**
23902
+ * Campaign-level (CBO) budget in whole currency units. Requires budgetType.
23903
+ */
23904
+ budgetAmount?: number;
23905
+ budgetType?: 'daily' | 'lifetime';
23906
+ status?: 'ACTIVE' | 'PAUSED';
23907
+ };
23908
+ };
23909
+
23910
+ export type CreateAdCampaignResponse = ({
23911
+ adAccountId?: string;
23912
+ /**
23913
+ * Platform id of the new campaign
23914
+ */
23915
+ campaignId?: string;
23916
+ /**
23917
+ * Resolved ODAX objective (e.g. OUTCOME_SALES).
23918
+ */
23919
+ objective?: string;
23920
+ status?: 'ACTIVE' | 'PAUSED';
23921
+ });
23922
+
23923
+ export type CreateAdCampaignError = (unknown | {
23924
+ error?: string;
23925
+ });
23926
+
23738
23927
  export type UpdateAdCampaignStatusData = {
23739
23928
  body: {
23740
23929
  status: 'active' | 'paused';
@@ -23926,6 +24115,89 @@ export type DuplicateAdCampaignError = (unknown | {
23926
24115
  error?: string;
23927
24116
  });
23928
24117
 
24118
+ export type DuplicateAdSetData = {
24119
+ body: {
24120
+ platform: 'facebook' | 'instagram';
24121
+ /**
24122
+ * Destination platform campaign id (defaults to the source's campaign)
24123
+ */
24124
+ campaignId?: string;
24125
+ /**
24126
+ * Copy child ads + creatives
24127
+ */
24128
+ deepCopy?: boolean;
24129
+ statusOption?: 'ACTIVE' | 'PAUSED' | 'INHERITED_FROM_SOURCE';
24130
+ /**
24131
+ * Reschedule the copy's start time
24132
+ */
24133
+ startTime?: string;
24134
+ endTime?: string;
24135
+ renameStrategy?: 'DEEP_RENAME' | 'ONLY_TOP_LEVEL_RENAME' | 'NO_RENAME';
24136
+ renamePrefix?: string;
24137
+ renameSuffix?: string;
24138
+ syncAfter?: boolean;
24139
+ };
24140
+ path: {
24141
+ /**
24142
+ * Source platform ad set ID
24143
+ */
24144
+ adSetId: string;
24145
+ };
24146
+ };
24147
+
24148
+ export type DuplicateAdSetResponse = ({
24149
+ /**
24150
+ * Platform ID of the new ad set
24151
+ */
24152
+ copiedAdSetId?: string;
24153
+ discovery?: 'triggered' | 'skipped' | 'failed';
24154
+ /**
24155
+ * Meta's native copy response (includes ad_object_ids for child copies)
24156
+ */
24157
+ raw?: {
24158
+ [key: string]: unknown;
24159
+ };
24160
+ });
24161
+
24162
+ export type DuplicateAdSetError = (unknown | {
24163
+ error?: string;
24164
+ });
24165
+
24166
+ export type DuplicateAdData = {
24167
+ body?: {
24168
+ /**
24169
+ * Destination platform ad set id (defaults to the source's ad set)
24170
+ */
24171
+ adSetId?: string;
24172
+ statusOption?: 'ACTIVE' | 'PAUSED' | 'INHERITED_FROM_SOURCE';
24173
+ renameStrategy?: 'DEEP_RENAME' | 'ONLY_TOP_LEVEL_RENAME' | 'NO_RENAME';
24174
+ renamePrefix?: string;
24175
+ renameSuffix?: string;
24176
+ syncAfter?: boolean;
24177
+ };
24178
+ path: {
24179
+ /**
24180
+ * Zernio ad ID or platform ad ID
24181
+ */
24182
+ adId: string;
24183
+ };
24184
+ };
24185
+
24186
+ export type DuplicateAdResponse = ({
24187
+ /**
24188
+ * Platform ID of the new ad
24189
+ */
24190
+ copiedAdId?: string;
24191
+ discovery?: 'triggered' | 'skipped' | 'failed';
24192
+ raw?: {
24193
+ [key: string]: unknown;
24194
+ };
24195
+ });
24196
+
24197
+ export type DuplicateAdError = (unknown | {
24198
+ error?: string;
24199
+ });
24200
+
23929
24201
  export type GetAdSetDetailsData = {
23930
24202
  path: {
23931
24203
  /**
@@ -24021,7 +24293,7 @@ export type UpdateAdSetData = {
24021
24293
  */
24022
24294
  endDate?: string;
24023
24295
  /**
24024
- * Meta ad-set promoted_object, forwarded verbatim (same shape as /v1/ads/create).
24296
+ * Meta ad-set promoted_object, forwarded verbatim (same shape as /v1/ads/create). Unknown keys are rejected with 400.
24025
24297
  */
24026
24298
  promotedObject?: {
24027
24299
  pixelId?: string;
@@ -24032,6 +24304,8 @@ export type UpdateAdSetData = {
24032
24304
  customConversionId?: string;
24033
24305
  productCatalogId?: string;
24034
24306
  productSetId?: string;
24307
+ offlineConversionDataSetId?: string;
24308
+ whatsappPhoneNumber?: string;
24035
24309
  };
24036
24310
  };
24037
24311
  };
@@ -25157,40 +25431,344 @@ export type ListAdStudiesError = (unknown | {
25157
25431
  error?: string;
25158
25432
  });
25159
25433
 
25160
- export type GetAdAccountFinanceData = {
25434
+ export type ListMetaBusinessesData = {
25161
25435
  query: {
25162
25436
  /**
25163
25437
  * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25164
25438
  */
25165
25439
  accountId: string;
25166
25440
  /**
25167
- * Meta ad account id (act_<n>).
25441
+ * Cursor from paging.after of the previous page.
25168
25442
  */
25169
- adAccountId: string;
25443
+ after?: string;
25444
+ /**
25445
+ * Rows per page
25446
+ */
25447
+ limit?: number;
25170
25448
  };
25171
25449
  };
25172
25450
 
25173
- export type GetAdAccountFinanceResponse = ({
25174
- adAccountId?: string;
25175
- /**
25176
- * ISO 4217 code all money values are expressed in.
25177
- */
25178
- currency?: string;
25179
- /**
25180
- * Outstanding/prepaid balance in whole currency units.
25181
- */
25182
- balance?: number;
25183
- /**
25184
- * Lifetime amount spent in whole currency units.
25185
- */
25186
- amountSpent?: number;
25187
- /**
25188
- * Account spend cap; null when none is set.
25189
- */
25190
- spendCap?: (number) | null;
25191
- fundingSource?: {
25192
- /**
25193
- * Human-readable payment method, e.g. 'Mastercard *4985'.
25451
+ export type ListMetaBusinessesResponse = ({
25452
+ data?: Array<{
25453
+ [key: string]: unknown;
25454
+ }>;
25455
+ paging?: {
25456
+ /**
25457
+ * Cursor for the next page; null when exhausted.
25458
+ */
25459
+ after?: (string) | null;
25460
+ };
25461
+ });
25462
+
25463
+ export type ListMetaBusinessesError = (unknown | {
25464
+ error?: string;
25465
+ });
25466
+
25467
+ export type ListAdLabelsData = {
25468
+ query: {
25469
+ /**
25470
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25471
+ */
25472
+ accountId: string;
25473
+ /**
25474
+ * Meta ad account id (act_<n>).
25475
+ */
25476
+ adAccountId: string;
25477
+ /**
25478
+ * Cursor from paging.after of the previous page.
25479
+ */
25480
+ after?: string;
25481
+ /**
25482
+ * Rows per page
25483
+ */
25484
+ limit?: number;
25485
+ };
25486
+ };
25487
+
25488
+ export type ListAdLabelsResponse = ({
25489
+ adAccountId?: string;
25490
+ data?: Array<{
25491
+ [key: string]: unknown;
25492
+ }>;
25493
+ paging?: {
25494
+ /**
25495
+ * Cursor for the next page; null when exhausted.
25496
+ */
25497
+ after?: (string) | null;
25498
+ };
25499
+ });
25500
+
25501
+ export type ListAdLabelsError = (unknown | {
25502
+ error?: string;
25503
+ });
25504
+
25505
+ export type ListHighDemandPeriodsData = {
25506
+ query: {
25507
+ /**
25508
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25509
+ */
25510
+ accountId: string;
25511
+ /**
25512
+ * Platform ad set id. Exactly one of campaignId / adSetId.
25513
+ */
25514
+ adSetId?: string;
25515
+ /**
25516
+ * Cursor from paging.after of the previous page.
25517
+ */
25518
+ after?: string;
25519
+ /**
25520
+ * Platform campaign id. Exactly one of campaignId / adSetId.
25521
+ */
25522
+ campaignId?: string;
25523
+ /**
25524
+ * Rows per page
25525
+ */
25526
+ limit?: number;
25527
+ };
25528
+ };
25529
+
25530
+ export type ListHighDemandPeriodsResponse = ({
25531
+ /**
25532
+ * The campaign / ad set id the schedules belong to.
25533
+ */
25534
+ objectId?: string;
25535
+ data?: Array<{
25536
+ [key: string]: unknown;
25537
+ }>;
25538
+ paging?: {
25539
+ /**
25540
+ * Cursor for the next page; null when exhausted.
25541
+ */
25542
+ after?: (string) | null;
25543
+ };
25544
+ });
25545
+
25546
+ export type ListHighDemandPeriodsError = (unknown | {
25547
+ error?: string;
25548
+ });
25549
+
25550
+ export type ListAdCreativesData = {
25551
+ query: {
25552
+ /**
25553
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25554
+ */
25555
+ accountId: string;
25556
+ /**
25557
+ * Meta ad account id (act_<n>).
25558
+ */
25559
+ adAccountId: string;
25560
+ /**
25561
+ * Cursor from paging.after of the previous page.
25562
+ */
25563
+ after?: string;
25564
+ /**
25565
+ * Comma-separated Graph field override (supports nested {} projections).
25566
+ */
25567
+ fields?: string;
25568
+ /**
25569
+ * Rows per page
25570
+ */
25571
+ limit?: number;
25572
+ };
25573
+ };
25574
+
25575
+ export type ListAdCreativesResponse = ({
25576
+ adAccountId?: string;
25577
+ data?: Array<{
25578
+ [key: string]: unknown;
25579
+ }>;
25580
+ paging?: {
25581
+ /**
25582
+ * Cursor for the next page; null when exhausted.
25583
+ */
25584
+ after?: (string) | null;
25585
+ };
25586
+ });
25587
+
25588
+ export type ListAdCreativesError = (unknown | {
25589
+ error?: string;
25590
+ });
25591
+
25592
+ export type CreateAdCreativeData = {
25593
+ body: {
25594
+ /**
25595
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token and Page.
25596
+ */
25597
+ accountId: string;
25598
+ /**
25599
+ * Meta ad account id (act_<n>).
25600
+ */
25601
+ adAccountId: string;
25602
+ headline: string;
25603
+ /**
25604
+ * Primary text
25605
+ */
25606
+ body: string;
25607
+ /**
25608
+ * Link description below the headline; omitted = Meta scrapes the destination's OG description.
25609
+ */
25610
+ description?: string;
25611
+ /**
25612
+ * CTA type (same whitelist as POST /v1/ads/create).
25613
+ */
25614
+ callToAction?: string;
25615
+ linkUrl: string;
25616
+ /**
25617
+ * Publicly reachable image; uploaded to the account's library server-side.
25618
+ */
25619
+ imageUrl?: string;
25620
+ /**
25621
+ * Existing library image hash (POST /v1/ads/images or GET /v1/ads/images).
25622
+ */
25623
+ imageHash?: string;
25624
+ carouselCards?: Array<{
25625
+ imageUrl: string;
25626
+ linkUrl: string;
25627
+ headline?: string;
25628
+ description?: string;
25629
+ callToAction?: string;
25630
+ }>;
25631
+ /**
25632
+ * Appended to every outbound URL (e.g. utm_source=fb).
25633
+ */
25634
+ urlTags?: string;
25635
+ /**
25636
+ * Advantage+ creative enhancements: partial map of Meta creative feature keys (snake_case) to enroll status, forwarded as degrees_of_freedom_spec.creative_features_spec. Unspecified features default to OPT_OUT.
25637
+ */
25638
+ creativeFeatures?: {
25639
+ [key: string]: ('OPT_IN' | 'OPT_OUT');
25640
+ };
25641
+ };
25642
+ };
25643
+
25644
+ export type CreateAdCreativeResponse = ({
25645
+ adAccountId?: string;
25646
+ /**
25647
+ * Platform creative id, reusable via existingCreativeId.
25648
+ */
25649
+ creativeId?: string;
25650
+ });
25651
+
25652
+ export type CreateAdCreativeError = (unknown | {
25653
+ error?: string;
25654
+ });
25655
+
25656
+ export type GetAdCreativeData = {
25657
+ path: {
25658
+ /**
25659
+ * Platform creative id
25660
+ */
25661
+ creativeId: string;
25662
+ };
25663
+ query: {
25664
+ /**
25665
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25666
+ */
25667
+ accountId: string;
25668
+ /**
25669
+ * Comma-separated Graph field override (supports nested {} projections).
25670
+ */
25671
+ fields?: string;
25672
+ };
25673
+ };
25674
+
25675
+ export type GetAdCreativeResponse = ({
25676
+ /**
25677
+ * Raw Meta creative node
25678
+ */
25679
+ creative?: {
25680
+ [key: string]: unknown;
25681
+ };
25682
+ });
25683
+
25684
+ export type GetAdCreativeError = (unknown | {
25685
+ error?: string;
25686
+ });
25687
+
25688
+ export type UpdateAdCreativeData = {
25689
+ body: {
25690
+ /**
25691
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25692
+ */
25693
+ accountId: string;
25694
+ name: string;
25695
+ };
25696
+ path: {
25697
+ /**
25698
+ * Platform creative id
25699
+ */
25700
+ creativeId: string;
25701
+ };
25702
+ };
25703
+
25704
+ export type UpdateAdCreativeResponse = ({
25705
+ creativeId?: string;
25706
+ name?: string;
25707
+ message?: string;
25708
+ });
25709
+
25710
+ export type UpdateAdCreativeError = (unknown | {
25711
+ error?: string;
25712
+ });
25713
+
25714
+ export type DeleteAdCreativeData = {
25715
+ path: {
25716
+ /**
25717
+ * Platform creative id
25718
+ */
25719
+ creativeId: string;
25720
+ };
25721
+ query: {
25722
+ /**
25723
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25724
+ */
25725
+ accountId: string;
25726
+ };
25727
+ };
25728
+
25729
+ export type DeleteAdCreativeResponse = ({
25730
+ creativeId?: string;
25731
+ message?: string;
25732
+ });
25733
+
25734
+ export type DeleteAdCreativeError = (unknown | {
25735
+ error?: string;
25736
+ });
25737
+
25738
+ export type GetAdAccountFinanceData = {
25739
+ query: {
25740
+ /**
25741
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25742
+ */
25743
+ accountId: string;
25744
+ /**
25745
+ * Meta ad account id (act_<n>).
25746
+ */
25747
+ adAccountId: string;
25748
+ };
25749
+ };
25750
+
25751
+ export type GetAdAccountFinanceResponse = ({
25752
+ adAccountId?: string;
25753
+ /**
25754
+ * ISO 4217 code all money values are expressed in.
25755
+ */
25756
+ currency?: string;
25757
+ /**
25758
+ * Outstanding/prepaid balance in whole currency units.
25759
+ */
25760
+ balance?: number;
25761
+ /**
25762
+ * Lifetime amount spent in whole currency units.
25763
+ */
25764
+ amountSpent?: number;
25765
+ /**
25766
+ * Account spend cap; null when none is set.
25767
+ */
25768
+ spendCap?: (number) | null;
25769
+ fundingSource?: {
25770
+ /**
25771
+ * Human-readable payment method, e.g. 'Mastercard *4985'.
25194
25772
  */
25195
25773
  displayString?: string;
25196
25774
  /**
@@ -25507,6 +26085,10 @@ export type BoostPostData = {
25507
26085
  * Meta only. Required for housing, employment, credit, or political ads.
25508
26086
  */
25509
26087
  specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ISSUES_ELECTIONS_POLITICS' | 'ONLINE_GAMBLING_AND_GAMING')>;
26088
+ /**
26089
+ * Meta (metaads) only. 2-letter ISO country codes the special ad category applies to. Requires specialAdCategories to be set (400 otherwise).
26090
+ */
26091
+ specialAdCategoryCountry?: Array<(string)>;
25510
26092
  /**
25511
26093
  * TikTok-only. Custom destination URL for the Spark Ad. Without this, TikTok
25512
26094
  * Spark Ads have no clickable destination — required for traffic / conversion
@@ -25632,6 +26214,16 @@ export type CreateStandaloneAdData = {
25632
26214
  * Meta only. The RESERVED prediction id the R&F ad set runs on (reserving mints a new id — pass that one). Requires buyingType RESERVED.
25633
26215
  */
25634
26216
  rfPredictionId?: string;
26217
+ /**
26218
+ * Meta only. Advantage+ creative enhancements: a partial map of Meta creative feature keys (snake_case, e.g. enhance_cta, image_brightness_and_contrast, text_optimizations) to enroll status, forwarded as degrees_of_freedom_spec.creative_features_spec. Meta validates the keys; unspecified features default to OPT_OUT. The legacy standard_enhancements bundle is deprecated by Meta and rejected.
26219
+ */
26220
+ creativeFeatures?: {
26221
+ [key: string]: ('OPT_IN' | 'OPT_OUT');
26222
+ };
26223
+ /**
26224
+ * Meta only, single standalone shape only (no creatives[], adSetId, or RESERVED). Dry-run: each node runs Meta's execution_options validate_only and NOTHING is created or persisted. Children need real parents, so a fresh tree validates the campaign + creative (the ad set needs its campaign to exist — pass existingCampaignId to validate it too; the ad itself is never validatable pre-create). A Meta validation failure returns the 400 verbatim; success returns 200 with per-node results instead of an ad.
26225
+ */
26226
+ validateOnly?: boolean;
25635
26227
  /**
25636
26228
  * Required on legacy + multi-creative shapes. Inherited on attach.
25637
26229
  */
@@ -25968,6 +26560,13 @@ export type CreateStandaloneAdData = {
25968
26560
  *
25969
26561
  */
25970
26562
  specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ISSUES_ELECTIONS_POLITICS' | 'ONLINE_GAMBLING_AND_GAMING')>;
26563
+ /**
26564
+ * Meta (metaads) only. 2-letter ISO country codes the special ad category applies to. Requires
26565
+ * specialAdCategories to be set (400 otherwise). Ignored when joining an existing campaign via
26566
+ * existingCampaignId (the existing campaign's category/country already governs it).
26567
+ *
26568
+ */
26569
+ specialAdCategoryCountry?: Array<(string)>;
25971
26570
  /**
25972
26571
  * Required for lifetime budgets
25973
26572
  */
@@ -26331,6 +26930,14 @@ export type CreateStandaloneAdData = {
26331
26930
  * Product Set ID inside the catalog.
26332
26931
  */
26333
26932
  productSetId?: string;
26933
+ /**
26934
+ * Meta only. Offline event set (dataset) to optimise toward. Post-merger these are datasets: the id is the dataset id (for pixel-backed datasets, the pixel id).
26935
+ */
26936
+ offlineConversionDataSetId?: string;
26937
+ /**
26938
+ * Meta only. WhatsApp number on messaging-destination ad sets.
26939
+ */
26940
+ whatsappPhoneNumber?: string;
26334
26941
  };
26335
26942
  };
26336
26943
  headers?: {
@@ -26341,7 +26948,18 @@ export type CreateStandaloneAdData = {
26341
26948
  };
26342
26949
  };
26343
26950
 
26344
- export type CreateStandaloneAdResponse = (({
26951
+ export type CreateStandaloneAdResponse = ({
26952
+ validateOnly?: boolean;
26953
+ results?: Array<{
26954
+ node?: 'campaign' | 'adSet' | 'creative' | 'ad';
26955
+ status?: 'validated' | 'skipped';
26956
+ /**
26957
+ * Why the node could not be validated (only on skipped).
26958
+ */
26959
+ reason?: string;
26960
+ }>;
26961
+ message?: string;
26962
+ } | ({
26345
26963
  ad?: Ad;
26346
26964
  message?: string;
26347
26965
  } | {
@@ -26637,6 +27255,48 @@ export type UploadAdImageError = (unknown | {
26637
27255
  error?: string;
26638
27256
  });
26639
27257
 
27258
+ export type ListAdImagesData = {
27259
+ query: {
27260
+ /**
27261
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
27262
+ */
27263
+ accountId: string;
27264
+ /**
27265
+ * Meta ad account id (act_<n>).
27266
+ */
27267
+ adAccountId: string;
27268
+ /**
27269
+ * Cursor from paging.after of the previous page.
27270
+ */
27271
+ after?: string;
27272
+ /**
27273
+ * Comma-separated Graph field override (supports nested {} projections).
27274
+ */
27275
+ fields?: string;
27276
+ /**
27277
+ * Rows per page
27278
+ */
27279
+ limit?: number;
27280
+ };
27281
+ };
27282
+
27283
+ export type ListAdImagesResponse = ({
27284
+ adAccountId?: string;
27285
+ data?: Array<{
27286
+ [key: string]: unknown;
27287
+ }>;
27288
+ paging?: {
27289
+ /**
27290
+ * Cursor for the next page; null when exhausted.
27291
+ */
27292
+ after?: (string) | null;
27293
+ };
27294
+ });
27295
+
27296
+ export type ListAdImagesError = (unknown | {
27297
+ error?: string;
27298
+ });
27299
+
26640
27300
  export type SearchAdInterestsData = {
26641
27301
  query: {
26642
27302
  /**
@@ -26990,7 +27650,7 @@ export type ListAdAudiencesData = {
26990
27650
  /**
26991
27651
  * Filter to one audience type. `saved_targeting` returns stored TargetingSpec audiences; the other types return uploaded/derived audiences.
26992
27652
  */
26993
- type?: 'customer_list' | 'company_list' | 'engagement' | 'website' | 'website_retargeting' | 'lookalike' | 'saved_targeting';
27653
+ type?: 'customer_list' | 'company_list' | 'engagement' | 'meta_engagement' | 'website' | 'website_retargeting' | 'lookalike' | 'saved_targeting';
26994
27654
  };
26995
27655
  };
26996
27656
 
@@ -27004,7 +27664,7 @@ export type ListAdAudiencesResponse = ({
27004
27664
  platformAudienceId?: string;
27005
27665
  name?: string;
27006
27666
  description?: string;
27007
- type?: 'customer_list' | 'company_list' | 'engagement' | 'website' | 'website_retargeting' | 'lookalike' | 'saved_targeting';
27667
+ type?: 'customer_list' | 'company_list' | 'engagement' | 'meta_engagement' | 'website' | 'website_retargeting' | 'lookalike' | 'saved_targeting';
27008
27668
  /**
27009
27669
  * Present (and the only meaningful payload) when `type` is `saved_targeting`. Null for uploaded/derived audience types.
27010
27670
  */
@@ -27028,7 +27688,7 @@ export type CreateAdAudienceData = {
27028
27688
  adAccountId: string;
27029
27689
  name: string;
27030
27690
  description?: string;
27031
- type: 'customer_list' | 'company_list' | 'engagement' | 'website' | 'website_retargeting' | 'lookalike';
27691
+ type: 'customer_list' | 'company_list' | 'engagement' | 'meta_engagement' | 'website' | 'website_retargeting' | 'lookalike';
27032
27692
  /**
27033
27693
  * Required for website_retargeting audiences (LinkedIn only).
27034
27694
  * Each rule is a URL pattern; a member who visits any
@@ -27093,9 +27753,29 @@ export type CreateAdAudienceData = {
27093
27753
  */
27094
27754
  pixelId?: string;
27095
27755
  /**
27096
- * Required for website audiences
27756
+ * Required for website (max 180) and meta_engagement (max 365) audiences.
27097
27757
  */
27098
27758
  retentionDays?: number;
27759
+ /**
27760
+ * Required for meta_engagement audiences (Meta only): what people
27761
+ * engaged with. `page` = a Facebook Page, `instagram` = an IG
27762
+ * professional account, `video` = a video. The source object must be
27763
+ * eligible for engagement audiences or Meta rejects with subcode
27764
+ * 1713151 ("Invalid Event Name"), surfaced verbatim.
27765
+ *
27766
+ */
27767
+ engagementSource?: 'page' | 'instagram' | 'video';
27768
+ /**
27769
+ * Required for meta_engagement: the Page / IG account / video id.
27770
+ */
27771
+ sourceId?: string;
27772
+ /**
27773
+ * meta_engagement only. The engagement event; defaults per source
27774
+ * (page → page_engaged, instagram → ig_business_profile_all,
27775
+ * video → video_watched). Ignored when `rule` is provided.
27776
+ *
27777
+ */
27778
+ event?: string;
27099
27779
  /**
27100
27780
  * Required for lookalike audiences
27101
27781
  */
@@ -27109,7 +27789,7 @@ export type CreateAdAudienceData = {
27109
27789
  */
27110
27790
  ratio?: number;
27111
27791
  /**
27112
- * Pixel event rule for website audiences (optional)
27792
+ * Optional raw Meta rule, forwarded verbatim: pixel event rule for website audiences, or the engagement rule for meta_engagement (overrides the built rule, e.g. for event/canvas/lead-form sources).
27113
27793
  */
27114
27794
  rule?: {
27115
27795
  [key: string]: unknown;