@getlatedev/node 0.2.398 → 0.2.400
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/README.md +20 -6
- package/dist/index.d.mts +691 -93
- package/dist/index.d.ts +691 -93
- package/dist/index.js +163 -42
- package/dist/index.mjs +163 -42
- package/package.json +1 -1
- package/src/client.ts +71 -41
- package/src/generated/sdk.gen.ts +269 -10
- package/src/generated/types.gen.ts +692 -53
|
@@ -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
|
/**
|
|
@@ -25157,40 +25429,344 @@ export type ListAdStudiesError = (unknown | {
|
|
|
25157
25429
|
error?: string;
|
|
25158
25430
|
});
|
|
25159
25431
|
|
|
25160
|
-
export type
|
|
25432
|
+
export type ListMetaBusinessesData = {
|
|
25161
25433
|
query: {
|
|
25162
25434
|
/**
|
|
25163
25435
|
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
25164
25436
|
*/
|
|
25165
25437
|
accountId: string;
|
|
25166
25438
|
/**
|
|
25167
|
-
*
|
|
25439
|
+
* Cursor from paging.after of the previous page.
|
|
25168
25440
|
*/
|
|
25169
|
-
|
|
25441
|
+
after?: string;
|
|
25442
|
+
/**
|
|
25443
|
+
* Rows per page
|
|
25444
|
+
*/
|
|
25445
|
+
limit?: number;
|
|
25170
25446
|
};
|
|
25171
25447
|
};
|
|
25172
25448
|
|
|
25173
|
-
export type
|
|
25174
|
-
|
|
25175
|
-
|
|
25176
|
-
|
|
25177
|
-
|
|
25178
|
-
|
|
25179
|
-
|
|
25180
|
-
|
|
25181
|
-
|
|
25182
|
-
|
|
25183
|
-
|
|
25184
|
-
|
|
25185
|
-
|
|
25186
|
-
|
|
25187
|
-
|
|
25188
|
-
|
|
25189
|
-
|
|
25190
|
-
|
|
25191
|
-
|
|
25192
|
-
|
|
25193
|
-
|
|
25449
|
+
export type ListMetaBusinessesResponse = ({
|
|
25450
|
+
data?: Array<{
|
|
25451
|
+
[key: string]: unknown;
|
|
25452
|
+
}>;
|
|
25453
|
+
paging?: {
|
|
25454
|
+
/**
|
|
25455
|
+
* Cursor for the next page; null when exhausted.
|
|
25456
|
+
*/
|
|
25457
|
+
after?: (string) | null;
|
|
25458
|
+
};
|
|
25459
|
+
});
|
|
25460
|
+
|
|
25461
|
+
export type ListMetaBusinessesError = (unknown | {
|
|
25462
|
+
error?: string;
|
|
25463
|
+
});
|
|
25464
|
+
|
|
25465
|
+
export type ListAdLabelsData = {
|
|
25466
|
+
query: {
|
|
25467
|
+
/**
|
|
25468
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
25469
|
+
*/
|
|
25470
|
+
accountId: string;
|
|
25471
|
+
/**
|
|
25472
|
+
* Meta ad account id (act_<n>).
|
|
25473
|
+
*/
|
|
25474
|
+
adAccountId: string;
|
|
25475
|
+
/**
|
|
25476
|
+
* Cursor from paging.after of the previous page.
|
|
25477
|
+
*/
|
|
25478
|
+
after?: string;
|
|
25479
|
+
/**
|
|
25480
|
+
* Rows per page
|
|
25481
|
+
*/
|
|
25482
|
+
limit?: number;
|
|
25483
|
+
};
|
|
25484
|
+
};
|
|
25485
|
+
|
|
25486
|
+
export type ListAdLabelsResponse = ({
|
|
25487
|
+
adAccountId?: string;
|
|
25488
|
+
data?: Array<{
|
|
25489
|
+
[key: string]: unknown;
|
|
25490
|
+
}>;
|
|
25491
|
+
paging?: {
|
|
25492
|
+
/**
|
|
25493
|
+
* Cursor for the next page; null when exhausted.
|
|
25494
|
+
*/
|
|
25495
|
+
after?: (string) | null;
|
|
25496
|
+
};
|
|
25497
|
+
});
|
|
25498
|
+
|
|
25499
|
+
export type ListAdLabelsError = (unknown | {
|
|
25500
|
+
error?: string;
|
|
25501
|
+
});
|
|
25502
|
+
|
|
25503
|
+
export type ListHighDemandPeriodsData = {
|
|
25504
|
+
query: {
|
|
25505
|
+
/**
|
|
25506
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
25507
|
+
*/
|
|
25508
|
+
accountId: string;
|
|
25509
|
+
/**
|
|
25510
|
+
* Platform ad set id. Exactly one of campaignId / adSetId.
|
|
25511
|
+
*/
|
|
25512
|
+
adSetId?: string;
|
|
25513
|
+
/**
|
|
25514
|
+
* Cursor from paging.after of the previous page.
|
|
25515
|
+
*/
|
|
25516
|
+
after?: string;
|
|
25517
|
+
/**
|
|
25518
|
+
* Platform campaign id. Exactly one of campaignId / adSetId.
|
|
25519
|
+
*/
|
|
25520
|
+
campaignId?: string;
|
|
25521
|
+
/**
|
|
25522
|
+
* Rows per page
|
|
25523
|
+
*/
|
|
25524
|
+
limit?: number;
|
|
25525
|
+
};
|
|
25526
|
+
};
|
|
25527
|
+
|
|
25528
|
+
export type ListHighDemandPeriodsResponse = ({
|
|
25529
|
+
/**
|
|
25530
|
+
* The campaign / ad set id the schedules belong to.
|
|
25531
|
+
*/
|
|
25532
|
+
objectId?: string;
|
|
25533
|
+
data?: Array<{
|
|
25534
|
+
[key: string]: unknown;
|
|
25535
|
+
}>;
|
|
25536
|
+
paging?: {
|
|
25537
|
+
/**
|
|
25538
|
+
* Cursor for the next page; null when exhausted.
|
|
25539
|
+
*/
|
|
25540
|
+
after?: (string) | null;
|
|
25541
|
+
};
|
|
25542
|
+
});
|
|
25543
|
+
|
|
25544
|
+
export type ListHighDemandPeriodsError = (unknown | {
|
|
25545
|
+
error?: string;
|
|
25546
|
+
});
|
|
25547
|
+
|
|
25548
|
+
export type ListAdCreativesData = {
|
|
25549
|
+
query: {
|
|
25550
|
+
/**
|
|
25551
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
25552
|
+
*/
|
|
25553
|
+
accountId: string;
|
|
25554
|
+
/**
|
|
25555
|
+
* Meta ad account id (act_<n>).
|
|
25556
|
+
*/
|
|
25557
|
+
adAccountId: string;
|
|
25558
|
+
/**
|
|
25559
|
+
* Cursor from paging.after of the previous page.
|
|
25560
|
+
*/
|
|
25561
|
+
after?: string;
|
|
25562
|
+
/**
|
|
25563
|
+
* Comma-separated Graph field override (supports nested {} projections).
|
|
25564
|
+
*/
|
|
25565
|
+
fields?: string;
|
|
25566
|
+
/**
|
|
25567
|
+
* Rows per page
|
|
25568
|
+
*/
|
|
25569
|
+
limit?: number;
|
|
25570
|
+
};
|
|
25571
|
+
};
|
|
25572
|
+
|
|
25573
|
+
export type ListAdCreativesResponse = ({
|
|
25574
|
+
adAccountId?: string;
|
|
25575
|
+
data?: Array<{
|
|
25576
|
+
[key: string]: unknown;
|
|
25577
|
+
}>;
|
|
25578
|
+
paging?: {
|
|
25579
|
+
/**
|
|
25580
|
+
* Cursor for the next page; null when exhausted.
|
|
25581
|
+
*/
|
|
25582
|
+
after?: (string) | null;
|
|
25583
|
+
};
|
|
25584
|
+
});
|
|
25585
|
+
|
|
25586
|
+
export type ListAdCreativesError = (unknown | {
|
|
25587
|
+
error?: string;
|
|
25588
|
+
});
|
|
25589
|
+
|
|
25590
|
+
export type CreateAdCreativeData = {
|
|
25591
|
+
body: {
|
|
25592
|
+
/**
|
|
25593
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token and Page.
|
|
25594
|
+
*/
|
|
25595
|
+
accountId: string;
|
|
25596
|
+
/**
|
|
25597
|
+
* Meta ad account id (act_<n>).
|
|
25598
|
+
*/
|
|
25599
|
+
adAccountId: string;
|
|
25600
|
+
headline: string;
|
|
25601
|
+
/**
|
|
25602
|
+
* Primary text
|
|
25603
|
+
*/
|
|
25604
|
+
body: string;
|
|
25605
|
+
/**
|
|
25606
|
+
* Link description below the headline; omitted = Meta scrapes the destination's OG description.
|
|
25607
|
+
*/
|
|
25608
|
+
description?: string;
|
|
25609
|
+
/**
|
|
25610
|
+
* CTA type (same whitelist as POST /v1/ads/create).
|
|
25611
|
+
*/
|
|
25612
|
+
callToAction?: string;
|
|
25613
|
+
linkUrl: string;
|
|
25614
|
+
/**
|
|
25615
|
+
* Publicly reachable image; uploaded to the account's library server-side.
|
|
25616
|
+
*/
|
|
25617
|
+
imageUrl?: string;
|
|
25618
|
+
/**
|
|
25619
|
+
* Existing library image hash (POST /v1/ads/images or GET /v1/ads/images).
|
|
25620
|
+
*/
|
|
25621
|
+
imageHash?: string;
|
|
25622
|
+
carouselCards?: Array<{
|
|
25623
|
+
imageUrl: string;
|
|
25624
|
+
linkUrl: string;
|
|
25625
|
+
headline?: string;
|
|
25626
|
+
description?: string;
|
|
25627
|
+
callToAction?: string;
|
|
25628
|
+
}>;
|
|
25629
|
+
/**
|
|
25630
|
+
* Appended to every outbound URL (e.g. utm_source=fb).
|
|
25631
|
+
*/
|
|
25632
|
+
urlTags?: string;
|
|
25633
|
+
/**
|
|
25634
|
+
* 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.
|
|
25635
|
+
*/
|
|
25636
|
+
creativeFeatures?: {
|
|
25637
|
+
[key: string]: ('OPT_IN' | 'OPT_OUT');
|
|
25638
|
+
};
|
|
25639
|
+
};
|
|
25640
|
+
};
|
|
25641
|
+
|
|
25642
|
+
export type CreateAdCreativeResponse = ({
|
|
25643
|
+
adAccountId?: string;
|
|
25644
|
+
/**
|
|
25645
|
+
* Platform creative id, reusable via existingCreativeId.
|
|
25646
|
+
*/
|
|
25647
|
+
creativeId?: string;
|
|
25648
|
+
});
|
|
25649
|
+
|
|
25650
|
+
export type CreateAdCreativeError = (unknown | {
|
|
25651
|
+
error?: string;
|
|
25652
|
+
});
|
|
25653
|
+
|
|
25654
|
+
export type GetAdCreativeData = {
|
|
25655
|
+
path: {
|
|
25656
|
+
/**
|
|
25657
|
+
* Platform creative id
|
|
25658
|
+
*/
|
|
25659
|
+
creativeId: string;
|
|
25660
|
+
};
|
|
25661
|
+
query: {
|
|
25662
|
+
/**
|
|
25663
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
25664
|
+
*/
|
|
25665
|
+
accountId: string;
|
|
25666
|
+
/**
|
|
25667
|
+
* Comma-separated Graph field override (supports nested {} projections).
|
|
25668
|
+
*/
|
|
25669
|
+
fields?: string;
|
|
25670
|
+
};
|
|
25671
|
+
};
|
|
25672
|
+
|
|
25673
|
+
export type GetAdCreativeResponse = ({
|
|
25674
|
+
/**
|
|
25675
|
+
* Raw Meta creative node
|
|
25676
|
+
*/
|
|
25677
|
+
creative?: {
|
|
25678
|
+
[key: string]: unknown;
|
|
25679
|
+
};
|
|
25680
|
+
});
|
|
25681
|
+
|
|
25682
|
+
export type GetAdCreativeError = (unknown | {
|
|
25683
|
+
error?: string;
|
|
25684
|
+
});
|
|
25685
|
+
|
|
25686
|
+
export type UpdateAdCreativeData = {
|
|
25687
|
+
body: {
|
|
25688
|
+
/**
|
|
25689
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
25690
|
+
*/
|
|
25691
|
+
accountId: string;
|
|
25692
|
+
name: string;
|
|
25693
|
+
};
|
|
25694
|
+
path: {
|
|
25695
|
+
/**
|
|
25696
|
+
* Platform creative id
|
|
25697
|
+
*/
|
|
25698
|
+
creativeId: string;
|
|
25699
|
+
};
|
|
25700
|
+
};
|
|
25701
|
+
|
|
25702
|
+
export type UpdateAdCreativeResponse = ({
|
|
25703
|
+
creativeId?: string;
|
|
25704
|
+
name?: string;
|
|
25705
|
+
message?: string;
|
|
25706
|
+
});
|
|
25707
|
+
|
|
25708
|
+
export type UpdateAdCreativeError = (unknown | {
|
|
25709
|
+
error?: string;
|
|
25710
|
+
});
|
|
25711
|
+
|
|
25712
|
+
export type DeleteAdCreativeData = {
|
|
25713
|
+
path: {
|
|
25714
|
+
/**
|
|
25715
|
+
* Platform creative id
|
|
25716
|
+
*/
|
|
25717
|
+
creativeId: string;
|
|
25718
|
+
};
|
|
25719
|
+
query: {
|
|
25720
|
+
/**
|
|
25721
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
25722
|
+
*/
|
|
25723
|
+
accountId: string;
|
|
25724
|
+
};
|
|
25725
|
+
};
|
|
25726
|
+
|
|
25727
|
+
export type DeleteAdCreativeResponse = ({
|
|
25728
|
+
creativeId?: string;
|
|
25729
|
+
message?: string;
|
|
25730
|
+
});
|
|
25731
|
+
|
|
25732
|
+
export type DeleteAdCreativeError = (unknown | {
|
|
25733
|
+
error?: string;
|
|
25734
|
+
});
|
|
25735
|
+
|
|
25736
|
+
export type GetAdAccountFinanceData = {
|
|
25737
|
+
query: {
|
|
25738
|
+
/**
|
|
25739
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
25740
|
+
*/
|
|
25741
|
+
accountId: string;
|
|
25742
|
+
/**
|
|
25743
|
+
* Meta ad account id (act_<n>).
|
|
25744
|
+
*/
|
|
25745
|
+
adAccountId: string;
|
|
25746
|
+
};
|
|
25747
|
+
};
|
|
25748
|
+
|
|
25749
|
+
export type GetAdAccountFinanceResponse = ({
|
|
25750
|
+
adAccountId?: string;
|
|
25751
|
+
/**
|
|
25752
|
+
* ISO 4217 code all money values are expressed in.
|
|
25753
|
+
*/
|
|
25754
|
+
currency?: string;
|
|
25755
|
+
/**
|
|
25756
|
+
* Outstanding/prepaid balance in whole currency units.
|
|
25757
|
+
*/
|
|
25758
|
+
balance?: number;
|
|
25759
|
+
/**
|
|
25760
|
+
* Lifetime amount spent in whole currency units.
|
|
25761
|
+
*/
|
|
25762
|
+
amountSpent?: number;
|
|
25763
|
+
/**
|
|
25764
|
+
* Account spend cap; null when none is set.
|
|
25765
|
+
*/
|
|
25766
|
+
spendCap?: (number) | null;
|
|
25767
|
+
fundingSource?: {
|
|
25768
|
+
/**
|
|
25769
|
+
* Human-readable payment method, e.g. 'Mastercard *4985'.
|
|
25194
25770
|
*/
|
|
25195
25771
|
displayString?: string;
|
|
25196
25772
|
/**
|
|
@@ -25632,6 +26208,16 @@ export type CreateStandaloneAdData = {
|
|
|
25632
26208
|
* 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
26209
|
*/
|
|
25634
26210
|
rfPredictionId?: string;
|
|
26211
|
+
/**
|
|
26212
|
+
* 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.
|
|
26213
|
+
*/
|
|
26214
|
+
creativeFeatures?: {
|
|
26215
|
+
[key: string]: ('OPT_IN' | 'OPT_OUT');
|
|
26216
|
+
};
|
|
26217
|
+
/**
|
|
26218
|
+
* 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.
|
|
26219
|
+
*/
|
|
26220
|
+
validateOnly?: boolean;
|
|
25635
26221
|
/**
|
|
25636
26222
|
* Required on legacy + multi-creative shapes. Inherited on attach.
|
|
25637
26223
|
*/
|
|
@@ -26341,7 +26927,18 @@ export type CreateStandaloneAdData = {
|
|
|
26341
26927
|
};
|
|
26342
26928
|
};
|
|
26343
26929
|
|
|
26344
|
-
export type CreateStandaloneAdResponse = (
|
|
26930
|
+
export type CreateStandaloneAdResponse = ({
|
|
26931
|
+
validateOnly?: boolean;
|
|
26932
|
+
results?: Array<{
|
|
26933
|
+
node?: 'campaign' | 'adSet' | 'creative' | 'ad';
|
|
26934
|
+
status?: 'validated' | 'skipped';
|
|
26935
|
+
/**
|
|
26936
|
+
* Why the node could not be validated (only on skipped).
|
|
26937
|
+
*/
|
|
26938
|
+
reason?: string;
|
|
26939
|
+
}>;
|
|
26940
|
+
message?: string;
|
|
26941
|
+
} | ({
|
|
26345
26942
|
ad?: Ad;
|
|
26346
26943
|
message?: string;
|
|
26347
26944
|
} | {
|
|
@@ -26637,6 +27234,48 @@ export type UploadAdImageError = (unknown | {
|
|
|
26637
27234
|
error?: string;
|
|
26638
27235
|
});
|
|
26639
27236
|
|
|
27237
|
+
export type ListAdImagesData = {
|
|
27238
|
+
query: {
|
|
27239
|
+
/**
|
|
27240
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
27241
|
+
*/
|
|
27242
|
+
accountId: string;
|
|
27243
|
+
/**
|
|
27244
|
+
* Meta ad account id (act_<n>).
|
|
27245
|
+
*/
|
|
27246
|
+
adAccountId: string;
|
|
27247
|
+
/**
|
|
27248
|
+
* Cursor from paging.after of the previous page.
|
|
27249
|
+
*/
|
|
27250
|
+
after?: string;
|
|
27251
|
+
/**
|
|
27252
|
+
* Comma-separated Graph field override (supports nested {} projections).
|
|
27253
|
+
*/
|
|
27254
|
+
fields?: string;
|
|
27255
|
+
/**
|
|
27256
|
+
* Rows per page
|
|
27257
|
+
*/
|
|
27258
|
+
limit?: number;
|
|
27259
|
+
};
|
|
27260
|
+
};
|
|
27261
|
+
|
|
27262
|
+
export type ListAdImagesResponse = ({
|
|
27263
|
+
adAccountId?: string;
|
|
27264
|
+
data?: Array<{
|
|
27265
|
+
[key: string]: unknown;
|
|
27266
|
+
}>;
|
|
27267
|
+
paging?: {
|
|
27268
|
+
/**
|
|
27269
|
+
* Cursor for the next page; null when exhausted.
|
|
27270
|
+
*/
|
|
27271
|
+
after?: (string) | null;
|
|
27272
|
+
};
|
|
27273
|
+
});
|
|
27274
|
+
|
|
27275
|
+
export type ListAdImagesError = (unknown | {
|
|
27276
|
+
error?: string;
|
|
27277
|
+
});
|
|
27278
|
+
|
|
26640
27279
|
export type SearchAdInterestsData = {
|
|
26641
27280
|
query: {
|
|
26642
27281
|
/**
|