@getlatedev/node 0.2.405 → 0.2.407
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 +2 -0
- package/dist/index.d.mts +344 -46
- package/dist/index.d.ts +344 -46
- package/dist/index.js +214 -1
- package/dist/index.mjs +214 -1
- package/package.json +1 -1
- package/src/client.ts +204 -0
- package/src/generated/sdk.gen.ts +95 -29
- package/src/generated/types.gen.ts +148 -45
|
@@ -86,7 +86,7 @@ export type AccountWithFollowerStats = SocialAccount & {
|
|
|
86
86
|
export type Ad = {
|
|
87
87
|
_id?: string;
|
|
88
88
|
name?: string;
|
|
89
|
-
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
89
|
+
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
90
90
|
status?: AdStatus;
|
|
91
91
|
adType?: 'boost' | 'standalone';
|
|
92
92
|
/**
|
|
@@ -281,7 +281,7 @@ export type Ad = {
|
|
|
281
281
|
updatedAt?: string;
|
|
282
282
|
};
|
|
283
283
|
|
|
284
|
-
export type platform = 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
284
|
+
export type platform = 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
285
285
|
|
|
286
286
|
export type adType = 'boost' | 'standalone';
|
|
287
287
|
|
|
@@ -302,7 +302,7 @@ export type AdBudget = {
|
|
|
302
302
|
|
|
303
303
|
export type AdCampaign = {
|
|
304
304
|
platformCampaignId?: string;
|
|
305
|
-
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
305
|
+
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
306
306
|
campaignName?: string;
|
|
307
307
|
/**
|
|
308
308
|
* Delivery status derived from child ad statuses. Distinct from `reviewStatus`.
|
|
@@ -576,7 +576,7 @@ export type AdTreeAdSet = {
|
|
|
576
576
|
*/
|
|
577
577
|
export type AdTreeCampaign = {
|
|
578
578
|
platformCampaignId?: string;
|
|
579
|
-
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
579
|
+
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
580
580
|
campaignName?: string;
|
|
581
581
|
/**
|
|
582
582
|
* Delivery status derived from child ad statuses. Distinct from `reviewStatus`, which reflects the platform-side review state.
|
|
@@ -1215,12 +1215,14 @@ export type ConversionEvent = {
|
|
|
1215
1215
|
* Standard event name (Purchase, Lead, CompleteRegistration, AddToCart,
|
|
1216
1216
|
* InitiateCheckout, AddPaymentInfo, Subscribe, StartTrial, ViewContent,
|
|
1217
1217
|
* Search, Contact, SubmitApplication, Schedule) or a custom string
|
|
1218
|
-
* (only supported on platforms that accept custom events — Meta
|
|
1218
|
+
* (only supported on platforms that accept custom events — Meta and
|
|
1219
|
+
* OpenAI Ads).
|
|
1219
1220
|
*
|
|
1220
1221
|
* Per-platform behavior:
|
|
1221
1222
|
* - Meta: free-form; standard names match Meta's built-ins.
|
|
1222
1223
|
* - Google: ignored — the conversion action's category determines the type.
|
|
1223
1224
|
* - LinkedIn: ignored — the conversion rule's `type` is locked to the destination.
|
|
1225
|
+
* - OpenAI Ads: a fixed subset of standard names (Purchase, Lead, AddToCart, ViewContent, InitiateCheckout, CompleteRegistration, Subscribe, StartTrial, Schedule) maps 1:1 onto OpenAI's own event-type enum; anything else is sent as a custom event with the name preserved.
|
|
1224
1226
|
*
|
|
1225
1227
|
*/
|
|
1226
1228
|
eventName: string;
|
|
@@ -4017,7 +4019,7 @@ export type contentType3 = 'story' | 'saved_story' | 'spotlight';
|
|
|
4017
4019
|
|
|
4018
4020
|
export type SocialAccount = {
|
|
4019
4021
|
_id: string;
|
|
4020
|
-
platform: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads';
|
|
4022
|
+
platform: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads';
|
|
4021
4023
|
profileId: (string | Profile);
|
|
4022
4024
|
username?: string;
|
|
4023
4025
|
displayName?: string;
|
|
@@ -4077,7 +4079,7 @@ export type SocialAccount = {
|
|
|
4077
4079
|
};
|
|
4078
4080
|
};
|
|
4079
4081
|
|
|
4080
|
-
export type platform5 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads';
|
|
4082
|
+
export type platform5 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads';
|
|
4081
4083
|
|
|
4082
4084
|
/**
|
|
4083
4085
|
* Normalized, platform-agnostic ad-targeting spec. Every field is optional, an
|
|
@@ -12117,6 +12119,35 @@ export type ConnectBlueskyCredentialsError = (unknown | {
|
|
|
12117
12119
|
error?: string;
|
|
12118
12120
|
});
|
|
12119
12121
|
|
|
12122
|
+
export type ConnectOpenAiAdsCredentialsData = {
|
|
12123
|
+
body: {
|
|
12124
|
+
/**
|
|
12125
|
+
* API key from ChatGPT Ads Manager (Settings). Grants full read/write access on OpenAI's side; Zernio only ever reads with it.
|
|
12126
|
+
*/
|
|
12127
|
+
apiKey: string;
|
|
12128
|
+
/**
|
|
12129
|
+
* Your Zernio profile ID
|
|
12130
|
+
*/
|
|
12131
|
+
profileId: string;
|
|
12132
|
+
/**
|
|
12133
|
+
* Optional state passthrough for the connect flow.
|
|
12134
|
+
*/
|
|
12135
|
+
state?: string;
|
|
12136
|
+
/**
|
|
12137
|
+
* Optional URL to redirect to after successful connection
|
|
12138
|
+
*/
|
|
12139
|
+
redirectUri?: string;
|
|
12140
|
+
};
|
|
12141
|
+
};
|
|
12142
|
+
|
|
12143
|
+
export type ConnectOpenAiAdsCredentialsResponse = ({
|
|
12144
|
+
accountId?: string;
|
|
12145
|
+
adAccountName?: string;
|
|
12146
|
+
redirectUrl?: string;
|
|
12147
|
+
});
|
|
12148
|
+
|
|
12149
|
+
export type ConnectOpenAiAdsCredentialsError = (ErrorResponse | unknown);
|
|
12150
|
+
|
|
12120
12151
|
export type ConnectWhatsAppCredentialsData = {
|
|
12121
12152
|
body: {
|
|
12122
12153
|
/**
|
|
@@ -19729,7 +19760,7 @@ export type GetPhoneNumberKycFormResponse = ({
|
|
|
19729
19760
|
localTo?: (string) | null;
|
|
19730
19761
|
}>;
|
|
19731
19762
|
/**
|
|
19732
|
-
* Present when this account already has
|
|
19763
|
+
* Present when this account already has a reusable verification for the country (skip the form). `fromPhoneNumber`/`details` mirror the first option; `options` lists ALL reusable verifications (agencies hold one per end client), approved-first. Pass the chosen option's `id` as `reuseOptionId` on POST. Each option's `instant` says whether it activates in minutes (group-approved) or still queues for carrier review (1-3 days).
|
|
19733
19764
|
*/
|
|
19734
19765
|
reusable?: {
|
|
19735
19766
|
available?: boolean;
|
|
@@ -19745,10 +19776,25 @@ export type GetPhoneNumberKycFormResponse = ({
|
|
|
19745
19776
|
* One entry per distinct approved verification, newest first.
|
|
19746
19777
|
*/
|
|
19747
19778
|
options?: Array<{
|
|
19779
|
+
/**
|
|
19780
|
+
* Opaque option id — pass as `reuseOptionId` on POST. Stable selection key (a phone number is not unique across verifications).
|
|
19781
|
+
*/
|
|
19782
|
+
id?: string;
|
|
19783
|
+
/**
|
|
19784
|
+
* Display only — the number this verification was submitted for. Not a selection key.
|
|
19785
|
+
*/
|
|
19748
19786
|
fromPhoneNumber?: string;
|
|
19787
|
+
/**
|
|
19788
|
+
* true = group-approved, a new order activates in minutes; false = documents are reused but the order still queues for carrier review (1-3 days).
|
|
19789
|
+
*/
|
|
19790
|
+
instant?: boolean;
|
|
19749
19791
|
details?: Array<{
|
|
19750
19792
|
label?: string;
|
|
19751
19793
|
value?: string;
|
|
19794
|
+
/**
|
|
19795
|
+
* Present on document rows — the Telnyx document id. GET /v1/whatsapp/phone-numbers/kyc/document/{documentId} streams it (auth-scoped, inline PDF).
|
|
19796
|
+
*/
|
|
19797
|
+
documentId?: string;
|
|
19752
19798
|
}>;
|
|
19753
19799
|
}>;
|
|
19754
19800
|
} | null;
|
|
@@ -19775,7 +19821,11 @@ export type SubmitPhoneNumberKycData = {
|
|
|
19775
19821
|
*/
|
|
19776
19822
|
reuse?: boolean;
|
|
19777
19823
|
/**
|
|
19778
|
-
* Which
|
|
19824
|
+
* Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409.
|
|
19825
|
+
*/
|
|
19826
|
+
reuseOptionId?: string;
|
|
19827
|
+
/**
|
|
19828
|
+
* Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications — prefer `reuseOptionId`. Omitted = the approved default. No match = 409.
|
|
19779
19829
|
*/
|
|
19780
19830
|
reuseFrom?: string;
|
|
19781
19831
|
/**
|
|
@@ -19845,6 +19895,21 @@ export type SubmitPhoneNumberKycError = (unknown | {
|
|
|
19845
19895
|
error?: string;
|
|
19846
19896
|
});
|
|
19847
19897
|
|
|
19898
|
+
export type ViewPhoneNumberKycDocumentData = {
|
|
19899
|
+
path: {
|
|
19900
|
+
/**
|
|
19901
|
+
* The Telnyx document id (from `reusable.options[].details[].documentId`).
|
|
19902
|
+
*/
|
|
19903
|
+
documentId: string;
|
|
19904
|
+
};
|
|
19905
|
+
};
|
|
19906
|
+
|
|
19907
|
+
export type ViewPhoneNumberKycDocumentResponse = ((Blob | File));
|
|
19908
|
+
|
|
19909
|
+
export type ViewPhoneNumberKycDocumentError = (ErrorResponse | {
|
|
19910
|
+
error?: string;
|
|
19911
|
+
} | unknown);
|
|
19912
|
+
|
|
19848
19913
|
export type UploadPhoneNumberKycDocumentData = {
|
|
19849
19914
|
body: (Blob | File);
|
|
19850
19915
|
headers: {
|
|
@@ -20387,7 +20452,7 @@ export type GetWhatsAppNumberKycFormResponse = ({
|
|
|
20387
20452
|
audience?: ('business' | 'individual') | null;
|
|
20388
20453
|
}>;
|
|
20389
20454
|
/**
|
|
20390
|
-
* Present when this account already has
|
|
20455
|
+
* Present when this account already has a reusable verification for the country (skip the form). `fromPhoneNumber`/`details` mirror the first option; `options` lists ALL reusable verifications (agencies hold one per end client), approved-first. Pass the chosen option's `id` as `reuseOptionId` on POST. Each option's `instant` says whether it activates in minutes (group-approved) or still queues for carrier review (1-3 days).
|
|
20391
20456
|
*/
|
|
20392
20457
|
reusable?: {
|
|
20393
20458
|
available?: boolean;
|
|
@@ -20403,10 +20468,25 @@ export type GetWhatsAppNumberKycFormResponse = ({
|
|
|
20403
20468
|
* One entry per distinct approved verification, newest first.
|
|
20404
20469
|
*/
|
|
20405
20470
|
options?: Array<{
|
|
20471
|
+
/**
|
|
20472
|
+
* Opaque option id — pass as `reuseOptionId` on POST. Stable selection key (a phone number is not unique across verifications).
|
|
20473
|
+
*/
|
|
20474
|
+
id?: string;
|
|
20475
|
+
/**
|
|
20476
|
+
* Display only — the number this verification was submitted for. Not a selection key.
|
|
20477
|
+
*/
|
|
20406
20478
|
fromPhoneNumber?: string;
|
|
20479
|
+
/**
|
|
20480
|
+
* true = group-approved, a new order activates in minutes; false = documents are reused but the order still queues for carrier review (1-3 days).
|
|
20481
|
+
*/
|
|
20482
|
+
instant?: boolean;
|
|
20407
20483
|
details?: Array<{
|
|
20408
20484
|
label?: string;
|
|
20409
20485
|
value?: string;
|
|
20486
|
+
/**
|
|
20487
|
+
* Present on document rows — the Telnyx document id. GET /v1/whatsapp/phone-numbers/kyc/document/{documentId} streams it (auth-scoped, inline PDF).
|
|
20488
|
+
*/
|
|
20489
|
+
documentId?: string;
|
|
20410
20490
|
}>;
|
|
20411
20491
|
}>;
|
|
20412
20492
|
} | null;
|
|
@@ -20433,7 +20513,11 @@ export type SubmitWhatsAppNumberKycData = {
|
|
|
20433
20513
|
*/
|
|
20434
20514
|
reuse?: boolean;
|
|
20435
20515
|
/**
|
|
20436
|
-
* Which
|
|
20516
|
+
* Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409.
|
|
20517
|
+
*/
|
|
20518
|
+
reuseOptionId?: string;
|
|
20519
|
+
/**
|
|
20520
|
+
* Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications — prefer `reuseOptionId`. Omitted = the approved default. No match = 409.
|
|
20437
20521
|
*/
|
|
20438
20522
|
reuseFrom?: string;
|
|
20439
20523
|
/**
|
|
@@ -23858,7 +23942,7 @@ export type ListAdsData = {
|
|
|
23858
23942
|
* Page number (1-based)
|
|
23859
23943
|
*/
|
|
23860
23944
|
page?: number;
|
|
23861
|
-
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
23945
|
+
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
23862
23946
|
/**
|
|
23863
23947
|
* Meta ad ID. Returns the ad with this platform-side ad ID.
|
|
23864
23948
|
*/
|
|
@@ -23911,7 +23995,7 @@ export type ListAdCampaignsData = {
|
|
|
23911
23995
|
* Page number (1-based)
|
|
23912
23996
|
*/
|
|
23913
23997
|
page?: number;
|
|
23914
|
-
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
23998
|
+
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
23915
23999
|
/**
|
|
23916
24000
|
* Profile ID
|
|
23917
24001
|
*/
|
|
@@ -23985,7 +24069,7 @@ export type CreateAdCampaignError = (unknown | {
|
|
|
23985
24069
|
export type UpdateAdCampaignStatusData = {
|
|
23986
24070
|
body: {
|
|
23987
24071
|
status: 'active' | 'paused';
|
|
23988
|
-
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
24072
|
+
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
23989
24073
|
};
|
|
23990
24074
|
path: {
|
|
23991
24075
|
/**
|
|
@@ -24097,7 +24181,7 @@ export type BulkUpdateAdCampaignStatusData = {
|
|
|
24097
24181
|
status: 'active' | 'paused';
|
|
24098
24182
|
campaigns: Array<{
|
|
24099
24183
|
platformCampaignId: string;
|
|
24100
|
-
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
24184
|
+
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
24101
24185
|
}>;
|
|
24102
24186
|
};
|
|
24103
24187
|
};
|
|
@@ -24290,7 +24374,7 @@ export type GetAdSetDetailsError = (unknown | {
|
|
|
24290
24374
|
|
|
24291
24375
|
export type UpdateAdSetData = {
|
|
24292
24376
|
body: {
|
|
24293
|
-
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
24377
|
+
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
24294
24378
|
/**
|
|
24295
24379
|
* Omit if not updating budget
|
|
24296
24380
|
*/
|
|
@@ -24308,23 +24392,27 @@ export type UpdateAdSetData = {
|
|
|
24308
24392
|
name?: string;
|
|
24309
24393
|
/**
|
|
24310
24394
|
* Ad-set-level bid strategy. Overrides the campaign-level default.
|
|
24311
|
-
* Supported on Meta (facebook, instagram) and
|
|
24395
|
+
* Supported on Meta (facebook, instagram), TikTok, and OpenAI. On TikTok the
|
|
24312
24396
|
* Meta-style enum is mapped to bid_type / bid_price / deep_bid_type
|
|
24313
|
-
* automatically.
|
|
24314
|
-
*
|
|
24397
|
+
* automatically. On OpenAI, LOWEST_COST_WITH_BID_CAP and COST_CAP both map to
|
|
24398
|
+
* the ad group's `bidding_config.max_bid_micros` (one knob covers both);
|
|
24399
|
+
* LOWEST_COST_WITH_MIN_ROAS is rejected with 422 (OpenAI has no ROAS-based
|
|
24400
|
+
* bidding). Other platforms (linkedin, pinterest, google, twitter) return 501
|
|
24401
|
+
* Not Implemented when bidStrategy is set.
|
|
24315
24402
|
*
|
|
24316
24403
|
*/
|
|
24317
24404
|
bidStrategy?: (BidStrategy);
|
|
24318
24405
|
/**
|
|
24319
24406
|
* Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when
|
|
24320
24407
|
* bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP. Internally converted to Meta's
|
|
24321
|
-
* smallest-denomination integer.
|
|
24408
|
+
* smallest-denomination integer, or (on OpenAI) to micros (× 1,000,000).
|
|
24322
24409
|
*
|
|
24323
24410
|
*/
|
|
24324
24411
|
bidAmount?: number;
|
|
24325
24412
|
/**
|
|
24326
24413
|
* Minimum ROAS as a decimal multiplier (2.0 = 2.0x). Required when bidStrategy is
|
|
24327
24414
|
* LOWEST_COST_WITH_MIN_ROAS. Sent to Meta as `bid_constraints.roas_average_floor` × 10000.
|
|
24415
|
+
* Not supported on OpenAI (422).
|
|
24328
24416
|
*
|
|
24329
24417
|
*/
|
|
24330
24418
|
roasAverageFloor?: number;
|
|
@@ -24396,7 +24484,7 @@ export type UpdateAdSetError = (unknown | {
|
|
|
24396
24484
|
export type UpdateAdSetStatusData = {
|
|
24397
24485
|
body: {
|
|
24398
24486
|
status: 'active' | 'paused';
|
|
24399
|
-
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
24487
|
+
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
24400
24488
|
};
|
|
24401
24489
|
path: {
|
|
24402
24490
|
/**
|
|
@@ -24445,7 +24533,7 @@ export type GetAdTreeData = {
|
|
|
24445
24533
|
* Page number (1-based)
|
|
24446
24534
|
*/
|
|
24447
24535
|
page?: number;
|
|
24448
|
-
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
24536
|
+
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
24449
24537
|
/**
|
|
24450
24538
|
* Profile ID
|
|
24451
24539
|
*/
|
|
@@ -24503,7 +24591,7 @@ export type GetAdsTimelineData = {
|
|
|
24503
24591
|
/**
|
|
24504
24592
|
* Restrict to one platform.
|
|
24505
24593
|
*/
|
|
24506
|
-
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
24594
|
+
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
24507
24595
|
/**
|
|
24508
24596
|
* Inclusive end of metrics range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
24509
24597
|
*/
|
|
@@ -24596,6 +24684,9 @@ export type UpdateAdData = {
|
|
|
24596
24684
|
* Minimum varies by platform: TikTok=$20, Pinterest=$5, others=$1
|
|
24597
24685
|
*/
|
|
24598
24686
|
amount?: number;
|
|
24687
|
+
/**
|
|
24688
|
+
* OpenAI Ads accepts lifetime only; sending daily returns 422.
|
|
24689
|
+
*/
|
|
24599
24690
|
type?: 'daily' | 'lifetime';
|
|
24600
24691
|
};
|
|
24601
24692
|
/**
|
|
@@ -26137,7 +26228,13 @@ export type BoostPostData = {
|
|
|
26137
26228
|
*/
|
|
26138
26229
|
tracking?: {
|
|
26139
26230
|
pixelId?: string;
|
|
26140
|
-
|
|
26231
|
+
/**
|
|
26232
|
+
* URL parameters appended to the ad link, rendered as `key=value` pairs joined with `&`.
|
|
26233
|
+
*/
|
|
26234
|
+
urlTags?: Array<{
|
|
26235
|
+
key?: string;
|
|
26236
|
+
value?: string;
|
|
26237
|
+
}>;
|
|
26141
26238
|
};
|
|
26142
26239
|
/**
|
|
26143
26240
|
* Meta only. Required for housing, employment, credit, or political ads.
|
|
@@ -26254,6 +26351,9 @@ export type CreateStandaloneAdData = {
|
|
|
26254
26351
|
* - `job_applicants` requires a `platformSpecificData.jobs` creative.
|
|
26255
26352
|
* - For `lead_generation` or `conversions` on LinkedIn, or to promote an existing post, use POST /v1/ads/boost.
|
|
26256
26353
|
*
|
|
26354
|
+
* **OpenAI Ads**
|
|
26355
|
+
* - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns 422.
|
|
26356
|
+
*
|
|
26257
26357
|
*/
|
|
26258
26358
|
goal?: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'conversions' | 'app_promotion' | 'catalog_sales' | 'job_applicants';
|
|
26259
26359
|
/**
|
|
@@ -26283,11 +26383,11 @@ export type CreateStandaloneAdData = {
|
|
|
26283
26383
|
*/
|
|
26284
26384
|
validateOnly?: boolean;
|
|
26285
26385
|
/**
|
|
26286
|
-
* Required on legacy + multi-creative shapes. Inherited on attach.
|
|
26386
|
+
* Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType).
|
|
26287
26387
|
*/
|
|
26288
26388
|
budgetAmount?: number;
|
|
26289
26389
|
/**
|
|
26290
|
-
* Required on legacy + multi-creative shapes. Inherited on attach.
|
|
26390
|
+
* 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.
|
|
26291
26391
|
*/
|
|
26292
26392
|
budgetType?: 'daily' | 'lifetime';
|
|
26293
26393
|
/**
|
|
@@ -26308,7 +26408,7 @@ export type CreateStandaloneAdData = {
|
|
|
26308
26408
|
budgetLevel?: 'adset' | 'campaign';
|
|
26309
26409
|
currency?: string;
|
|
26310
26410
|
/**
|
|
26311
|
-
* Required for Meta, Google, Pinterest, and
|
|
26411
|
+
* Required for Meta, Google, Pinterest, LinkedIn, and OpenAI Ads on legacy + attach shapes (skip for multi-creative — use `creatives[].headline`). Ignored for TikTok and X/Twitter. Max: Meta=255, Google=30, Pinterest=100, LinkedIn=400, OpenAI=50 (min 3). On LinkedIn this is the ad's headline (the bold text on the creative); for traffic ads it's the link card title. On OpenAI Ads this is the chat card's title.
|
|
26312
26412
|
*/
|
|
26313
26413
|
headline?: string;
|
|
26314
26414
|
/**
|
|
@@ -26316,7 +26416,7 @@ export type CreateStandaloneAdData = {
|
|
|
26316
26416
|
*/
|
|
26317
26417
|
longHeadline?: string;
|
|
26318
26418
|
/**
|
|
26319
|
-
* Required on legacy + attach shapes. For X/Twitter this is the tweet text (max 280 chars including a ~24-char URL when `linkUrl` is set). On LinkedIn this is the post commentary (the intro text shown above the ad). Max: Google=90, Pinterest=500.
|
|
26419
|
+
* Required on legacy + attach shapes. For X/Twitter this is the tweet text (max 280 chars including a ~24-char URL when `linkUrl` is set). On LinkedIn this is the post commentary (the intro text shown above the ad). On OpenAI Ads this is the chat card's body text. Max: Google=90, Pinterest=500, OpenAI=100.
|
|
26320
26420
|
*/
|
|
26321
26421
|
body?: string;
|
|
26322
26422
|
/**
|
|
@@ -26328,7 +26428,7 @@ export type CreateStandaloneAdData = {
|
|
|
26328
26428
|
*/
|
|
26329
26429
|
callToAction?: 'LEARN_MORE' | 'SHOP_NOW' | 'SIGN_UP' | 'BOOK_TRAVEL' | 'CONTACT_US' | 'DOWNLOAD' | 'GET_OFFER' | 'GET_QUOTE' | 'SUBSCRIBE' | 'WATCH_MORE' | 'ADD_TO_CART' | 'APPLY_NOW' | 'BOOK_NOW' | 'BUY_TICKETS' | 'DONATE' | 'DONATE_NOW' | 'GET_DIRECTIONS' | 'GET_SHOWTIMES' | 'LISTEN_NOW' | 'ORDER_NOW' | 'PLAY_GAME' | 'REQUEST_TIME' | 'SEE_MENU' | 'START_ORDER' | 'INSTALL_MOBILE_APP' | 'USE_APP' | 'REGISTER' | 'JOIN' | 'ATTEND' | 'REQUEST_DEMO' | 'VIEW_QUOTE' | 'APPLY' | 'SEE_MORE' | 'BUY_NOW';
|
|
26330
26430
|
/**
|
|
26331
|
-
* Required on legacy + attach shapes (skip for multi-creative). On LinkedIn it's the ad's destination URL; required for `traffic` ads, optional for `engagement` / `awareness`. NOT required when `goal` is `lead_generation` (the ad opens a Lead Gen form instead of a destination). On LinkedIn, `imageUrl` + `linkUrl` publishes an ARTICLE-content creative; this is LinkedIn's article ad format, with the image as thumbnail and `longHeadline` as description.
|
|
26431
|
+
* Required on legacy + attach shapes (skip for multi-creative). On LinkedIn it's the ad's destination URL; required for `traffic` ads, optional for `engagement` / `awareness`. NOT required when `goal` is `lead_generation` (the ad opens a Lead Gen form instead of a destination). On LinkedIn, `imageUrl` + `linkUrl` publishes an ARTICLE-content creative; this is LinkedIn's article ad format, with the image as thumbnail and `longHeadline` as description. Required for OpenAI Ads (the chat card's target_url).
|
|
26332
26432
|
*/
|
|
26333
26433
|
linkUrl?: string;
|
|
26334
26434
|
/**
|
|
@@ -26336,7 +26436,7 @@ export type CreateStandaloneAdData = {
|
|
|
26336
26436
|
*/
|
|
26337
26437
|
leadGenFormId?: string;
|
|
26338
26438
|
/**
|
|
26339
|
-
* Image creative for Meta/Google/Pinterest/LinkedIn on legacy + attach shapes (mutually exclusive with `video`). Required for LinkedIn ads unless `video` is set. Not required for Google Search campaigns. For TikTok, this field carries the VIDEO URL (the TikTok ads endpoint is video-only; the field retains the `imageUrl` name for cross-platform consistency). Ignored for X/Twitter. For Google Display, treated as the landscape image (alias of `images.landscape`); supply `images.square` alongside or the request is rejected. For LinkedIn the image is uploaded to LinkedIn under the authoring Company Page (see `organizationId`); recommended ratio 1.91:1 (e.g. 1200×627).
|
|
26439
|
+
* Image creative for Meta/Google/Pinterest/LinkedIn on legacy + attach shapes (mutually exclusive with `video`). Required for LinkedIn ads unless `video` is set. Not required for Google Search campaigns. For TikTok, this field carries the VIDEO URL (the TikTok ads endpoint is video-only; the field retains the `imageUrl` name for cross-platform consistency). Ignored for X/Twitter. For Google Display, treated as the landscape image (alias of `images.landscape`); supply `images.square` alongside or the request is rejected. For LinkedIn the image is uploaded to LinkedIn under the authoring Company Page (see `organizationId`); recommended ratio 1.91:1 (e.g. 1200×627). Required for OpenAI Ads (uploaded as the chat card's image; OpenAI has no video ad format).
|
|
26340
26440
|
*/
|
|
26341
26441
|
imageUrl?: string;
|
|
26342
26442
|
/**
|
|
@@ -26477,7 +26577,7 @@ export type CreateStandaloneAdData = {
|
|
|
26477
26577
|
*/
|
|
26478
26578
|
targeting?: (TargetingSpec);
|
|
26479
26579
|
/**
|
|
26480
|
-
* ISO 3166-1 alpha-2 country codes (e.g. ['NL']). Defaults to ['US'] when no other geo targeting (flat or nested `targeting`) is provided. (LinkedIn currently
|
|
26580
|
+
* ISO 3166-1 alpha-2 country codes (e.g. ['NL']). Defaults to ['US'] when no other geo targeting (flat or nested `targeting`) is provided. (LinkedIn and OpenAI Ads currently honour country-level targeting only; any other targeting field returns 400 for OpenAI Ads.)
|
|
26481
26581
|
*/
|
|
26482
26582
|
countries?: Array<(string)>;
|
|
26483
26583
|
/**
|
|
@@ -28004,20 +28104,21 @@ export type GetConversionsQualityError = (ErrorResponse | {
|
|
|
28004
28104
|
export type SendConversionsData = {
|
|
28005
28105
|
body: {
|
|
28006
28106
|
/**
|
|
28007
|
-
* SocialAccount ID (metaads, googleads, linkedinads, or
|
|
28107
|
+
* SocialAccount ID (metaads, googleads, linkedinads, tiktokads, or openaiads).
|
|
28008
28108
|
*/
|
|
28009
28109
|
accountId: string;
|
|
28010
28110
|
/**
|
|
28011
28111
|
* Platform destination identifier. For Meta, the pixel/dataset
|
|
28012
28112
|
* ID. For Google, the conversion action resource name. For
|
|
28013
28113
|
* LinkedIn, the conversion rule ID or full
|
|
28014
|
-
* `urn:lla:llaPartnerConversion:{id}` URN.
|
|
28114
|
+
* `urn:lla:llaPartnerConversion:{id}` URN. For OpenAI Ads, the
|
|
28115
|
+
* pixel wire id.
|
|
28015
28116
|
*
|
|
28016
28117
|
*/
|
|
28017
28118
|
destinationId: string;
|
|
28018
28119
|
events: Array<ConversionEvent>;
|
|
28019
28120
|
/**
|
|
28020
|
-
* Meta `test_event_code` passthrough. Ignored by Google and
|
|
28121
|
+
* Meta `test_event_code` passthrough. Ignored by Google, LinkedIn, and OpenAI Ads.
|
|
28021
28122
|
*/
|
|
28022
28123
|
testCode?: string;
|
|
28023
28124
|
/**
|
|
@@ -28038,7 +28139,7 @@ export type SendConversionsData = {
|
|
|
28038
28139
|
};
|
|
28039
28140
|
|
|
28040
28141
|
export type SendConversionsResponse = ({
|
|
28041
|
-
platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads';
|
|
28142
|
+
platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads';
|
|
28042
28143
|
/**
|
|
28043
28144
|
* Events accepted by the platform.
|
|
28044
28145
|
*/
|
|
@@ -28062,7 +28163,8 @@ export type SendConversionsResponse = ({
|
|
|
28062
28163
|
/**
|
|
28063
28164
|
* Platform trace ID for debugging. fbtrace_id for Meta,
|
|
28064
28165
|
* requestId for Google. Absent for LinkedIn (LinkedIn's
|
|
28065
|
-
* conversionEvents endpoint does not surface a trace ID)
|
|
28166
|
+
* conversionEvents endpoint does not surface a trace ID)
|
|
28167
|
+
* and OpenAI Ads (no trace ID surfaced).
|
|
28066
28168
|
*
|
|
28067
28169
|
*/
|
|
28068
28170
|
traceId?: string;
|
|
@@ -28151,19 +28253,20 @@ export type AdjustConversionsError = (unknown | {
|
|
|
28151
28253
|
export type ListConversionDestinationsData = {
|
|
28152
28254
|
path: {
|
|
28153
28255
|
/**
|
|
28154
|
-
* SocialAccount ID (metaads, googleads, linkedinads, or
|
|
28256
|
+
* SocialAccount ID (metaads, googleads, linkedinads, tiktokads, or openaiads).
|
|
28155
28257
|
*/
|
|
28156
28258
|
accountId: string;
|
|
28157
28259
|
};
|
|
28158
28260
|
};
|
|
28159
28261
|
|
|
28160
28262
|
export type ListConversionDestinationsResponse = ({
|
|
28161
|
-
platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads';
|
|
28263
|
+
platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads';
|
|
28162
28264
|
destinations?: Array<{
|
|
28163
28265
|
/**
|
|
28164
28266
|
* Destination identifier. Meta: pixel ID. Google:
|
|
28165
28267
|
* conversion action resource name. LinkedIn:
|
|
28166
|
-
* numeric conversion rule ID.
|
|
28268
|
+
* numeric conversion rule ID. OpenAI Ads: pixel wire
|
|
28269
|
+
* id.
|
|
28167
28270
|
*
|
|
28168
28271
|
*/
|
|
28169
28272
|
id?: string;
|
|
@@ -28725,20 +28828,20 @@ export type CreateCtwaAdError = (unknown | {
|
|
|
28725
28828
|
export type ListTrackingTagsData = {
|
|
28726
28829
|
path: {
|
|
28727
28830
|
/**
|
|
28728
|
-
*
|
|
28831
|
+
* Ads SocialAccount id (platform `metaads` or `openaiads`).
|
|
28729
28832
|
*/
|
|
28730
28833
|
accountId: string;
|
|
28731
28834
|
};
|
|
28732
28835
|
query?: {
|
|
28733
28836
|
/**
|
|
28734
|
-
* Optional. Scope to one ad account, e.g. `act_123456789`.
|
|
28837
|
+
* Optional, Meta only. Scope to one ad account, e.g. `act_123456789`. Ignored for OpenAI Ads.
|
|
28735
28838
|
*/
|
|
28736
28839
|
adAccountId?: string;
|
|
28737
28840
|
};
|
|
28738
28841
|
};
|
|
28739
28842
|
|
|
28740
28843
|
export type ListTrackingTagsResponse = ({
|
|
28741
|
-
platform?: 'metaads';
|
|
28844
|
+
platform?: 'metaads' | 'openaiads';
|
|
28742
28845
|
tags?: Array<TrackingTag>;
|
|
28743
28846
|
});
|
|
28744
28847
|
|
|
@@ -28749,21 +28852,21 @@ export type ListTrackingTagsError = (unknown | {
|
|
|
28749
28852
|
export type CreateTrackingTagData = {
|
|
28750
28853
|
body: {
|
|
28751
28854
|
/**
|
|
28752
|
-
* Meta ad account id, e.g. `act_123456789`.
|
|
28855
|
+
* Meta ad account id, e.g. `act_123456789`. Required by this endpoint but ignored for OpenAI Ads.
|
|
28753
28856
|
*/
|
|
28754
28857
|
adAccountId: string;
|
|
28755
28858
|
name: string;
|
|
28756
28859
|
};
|
|
28757
28860
|
path: {
|
|
28758
28861
|
/**
|
|
28759
|
-
*
|
|
28862
|
+
* Ads SocialAccount id (platform `metaads` or `openaiads`).
|
|
28760
28863
|
*/
|
|
28761
28864
|
accountId: string;
|
|
28762
28865
|
};
|
|
28763
28866
|
};
|
|
28764
28867
|
|
|
28765
28868
|
export type CreateTrackingTagResponse = ({
|
|
28766
|
-
platform?: 'metaads';
|
|
28869
|
+
platform?: 'metaads' | 'openaiads';
|
|
28767
28870
|
tag?: TrackingTag;
|
|
28768
28871
|
});
|
|
28769
28872
|
|