@getlatedev/node 0.2.1358 → 0.2.1360
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 +216 -11
- package/dist/index.d.ts +216 -11
- package/dist/index.js +19 -1
- package/dist/index.mjs +19 -1
- package/package.json +1 -1
- package/src/client.ts +8 -0
- package/src/generated/sdk.gen.ts +71 -4
- package/src/generated/types.gen.ts +215 -10
|
@@ -47384,15 +47384,15 @@ export type ListAdSetsError = (ErrorResponse | unknown);
|
|
|
47384
47384
|
export type CreateAdSetData = {
|
|
47385
47385
|
body: {
|
|
47386
47386
|
/**
|
|
47387
|
-
* Zernio SocialAccount id owning the Google Ads connection.
|
|
47387
|
+
* Zernio SocialAccount id owning the Google Ads or Reddit Ads connection.
|
|
47388
47388
|
*/
|
|
47389
47389
|
accountId: string;
|
|
47390
47390
|
/**
|
|
47391
|
-
*
|
|
47391
|
+
* "google" and "reddit" are implemented; every other value returns 501.
|
|
47392
47392
|
*/
|
|
47393
47393
|
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit';
|
|
47394
47394
|
/**
|
|
47395
|
-
*
|
|
47395
|
+
* Platform campaign ID the ad group is created under (numeric on Google).
|
|
47396
47396
|
*/
|
|
47397
47397
|
campaignId: string;
|
|
47398
47398
|
name: string;
|
|
@@ -47402,14 +47402,56 @@ export type CreateAdSetData = {
|
|
|
47402
47402
|
*/
|
|
47403
47403
|
maxCpc?: number;
|
|
47404
47404
|
/**
|
|
47405
|
-
* Platform ad account ID
|
|
47405
|
+
* Platform ad account ID: the Google customer ID (digits only, only required when the connection has more than one) or the Reddit ad account id (required).
|
|
47406
47406
|
*/
|
|
47407
47407
|
adAccountId?: string;
|
|
47408
47408
|
/**
|
|
47409
|
-
* Alias of adAccountId, kept for existing callers
|
|
47409
|
+
* Google only. Alias of adAccountId, kept for existing callers
|
|
47410
47410
|
* @deprecated
|
|
47411
47411
|
*/
|
|
47412
47412
|
customerId?: string;
|
|
47413
|
+
/**
|
|
47414
|
+
* Reddit only. Budget of the new ad group, in the ad account's currency units. Required when the campaign has no campaign budget; not applied under campaign budget optimization.
|
|
47415
|
+
*/
|
|
47416
|
+
budgetAmount?: number;
|
|
47417
|
+
/**
|
|
47418
|
+
* Reddit only. Sent together with budgetAmount.
|
|
47419
|
+
*/
|
|
47420
|
+
budgetType?: 'daily' | 'lifetime';
|
|
47421
|
+
/**
|
|
47422
|
+
* Reddit only. ISO 8601 start of the ad group. Defaults to now, or to the campaign start when it is in the future.
|
|
47423
|
+
*/
|
|
47424
|
+
startDate?: string;
|
|
47425
|
+
/**
|
|
47426
|
+
* Reddit only. ISO 8601 end of the ad group. Defaults to the campaign end.
|
|
47427
|
+
*/
|
|
47428
|
+
endDate?: string;
|
|
47429
|
+
targeting?: TargetingSpec;
|
|
47430
|
+
/**
|
|
47431
|
+
* Reddit only. The pixel and the conversion event the ad group optimizes toward.
|
|
47432
|
+
*/
|
|
47433
|
+
promotedObject?: {
|
|
47434
|
+
/**
|
|
47435
|
+
* Reddit pixel id. Defaults to the ad account's first pixel.
|
|
47436
|
+
*/
|
|
47437
|
+
pixelId?: string;
|
|
47438
|
+
/**
|
|
47439
|
+
* Conversion event (PURCHASE, LEAD, SIGN_UP, ADD_TO_CART, PAGE_VISIT). Required on a conversions campaign.
|
|
47440
|
+
*/
|
|
47441
|
+
customEventType?: string;
|
|
47442
|
+
};
|
|
47443
|
+
/**
|
|
47444
|
+
* Reddit only. VIDEO_VIEW_6S (default) or VIDEO_VIEW_15S on a video views campaign.
|
|
47445
|
+
*/
|
|
47446
|
+
optimizationGoal?: string;
|
|
47447
|
+
/**
|
|
47448
|
+
* Reddit only. Defaults to LOWEST_COST_WITHOUT_CAP. Not accepted under campaign budget optimization.
|
|
47449
|
+
*/
|
|
47450
|
+
bidStrategy?: 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP';
|
|
47451
|
+
/**
|
|
47452
|
+
* Reddit only. Bid cap in currency units, sent with bidStrategy.
|
|
47453
|
+
*/
|
|
47454
|
+
bidAmount?: number;
|
|
47413
47455
|
};
|
|
47414
47456
|
headers?: {
|
|
47415
47457
|
/**
|
|
@@ -47697,7 +47739,35 @@ export type UpdateAdSetData = {
|
|
|
47697
47739
|
devicePlatforms?: Array<('mobile' | 'desktop')>;
|
|
47698
47740
|
} | null;
|
|
47699
47741
|
/**
|
|
47700
|
-
*
|
|
47742
|
+
* Reddit only. Every other platform ignores it (nothing is written and no error is returned,
|
|
47743
|
+
* so a body that also sends `status` still applies it); Meta takes it in
|
|
47744
|
+
* `platformSpecificData.startDate`. The ad group's new start_time, ISO 8601. A value
|
|
47745
|
+
* without an offset (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SS`) is read in the ad account
|
|
47746
|
+
* timezone. It cannot be earlier than the start of a campaign that starts in the future,
|
|
47747
|
+
* nor at or after the ad group's end (400, `param: startDate`).
|
|
47748
|
+
*
|
|
47749
|
+
*/
|
|
47750
|
+
startDate?: string;
|
|
47751
|
+
/**
|
|
47752
|
+
* Reddit only. Every other platform ignores it (nothing is written and no error is returned,
|
|
47753
|
+
* so a body that also sends `status` still applies it); Meta takes it in
|
|
47754
|
+
* `platformSpecificData.endDate`. The ad group's new end_time, ISO 8601, read in the ad
|
|
47755
|
+
* account timezone when it has no offset; a date alone means the end of that day. `null`
|
|
47756
|
+
* removes the end date so the ad group runs continuously. Returns 400 with
|
|
47757
|
+
* `param: endDate` when it is not after the start, when it falls after the campaign's
|
|
47758
|
+
* end, when the campaign uses campaign budget optimization with no end date (Reddit then
|
|
47759
|
+
* takes no end date on its ad groups), when `null` would outlive a campaign budget
|
|
47760
|
+
* campaign that ends, or when `null` is sent for an ad group with a lifetime budget.
|
|
47761
|
+
*
|
|
47762
|
+
*/
|
|
47763
|
+
endDate?: (string) | null;
|
|
47764
|
+
/**
|
|
47765
|
+
* Meta and Reddit (400 elsewhere). On Reddit, see the description above: `languages`
|
|
47766
|
+
* must be among Reddit's ISO 639-1 codes (AR, CS, DA, DE, EL, EN, ES, FI, FR, HU, IT, JA,
|
|
47767
|
+
* KO, NL, NO, PL, PT, RO, SV, VI, ZH, any case), emptying every included location is a
|
|
47768
|
+
* 400 with `param: targeting.countries`, and fields Reddit ad groups cannot take (age,
|
|
47769
|
+
* income, devices, behaviors, B2B, `places`) return 400 with `param: targeting.<field>`.
|
|
47770
|
+
* On Meta: targeting fields to change, same shape as the `targeting`
|
|
47701
47771
|
* object on POST /v1/ads/create. Only the keys you send change: Zernio reads the ad set's
|
|
47702
47772
|
* live targeting from Meta, merges these keys over it and writes the full spec back, so
|
|
47703
47773
|
* everything you do not send (custom audiences, geo, age, interest groups,
|
|
@@ -47859,11 +47929,19 @@ export type UpdateAdSetResponse = ({
|
|
|
47859
47929
|
[key: string]: unknown;
|
|
47860
47930
|
};
|
|
47861
47931
|
/**
|
|
47862
|
-
* Present when `placements` or `targeting` was sent. The ad set's full
|
|
47932
|
+
* Present when `placements` or `targeting` was sent. The ad set's full targeting as written, in the platform's own vocabulary (Meta or Reddit snake_case). Stored as the ad set's `targeting`. Meta stores the same object on its ads; Reddit stores it on its ads in the create vocabulary (`countries`, `communities`, ...), as GET /v1/ads/ad-sets/{adSetId}/targeting returns it.
|
|
47863
47933
|
*/
|
|
47864
47934
|
targeting?: {
|
|
47865
47935
|
[key: string]: unknown;
|
|
47866
47936
|
};
|
|
47937
|
+
/**
|
|
47938
|
+
* Reddit: the start_time written, a UTC instant. Present when `startDate` was sent.
|
|
47939
|
+
*/
|
|
47940
|
+
startDate?: string;
|
|
47941
|
+
/**
|
|
47942
|
+
* Reddit: the end_time written, a UTC instant, or null when the end date was removed. Present when `endDate` was sent.
|
|
47943
|
+
*/
|
|
47944
|
+
endDate?: (string) | null;
|
|
47867
47945
|
});
|
|
47868
47946
|
|
|
47869
47947
|
export type UpdateAdSetError = (unknown | ErrorResponse);
|
|
@@ -47887,6 +47965,39 @@ export type DeleteAdSetResponse = ({
|
|
|
47887
47965
|
|
|
47888
47966
|
export type DeleteAdSetError = (ErrorResponse | unknown);
|
|
47889
47967
|
|
|
47968
|
+
export type GetAdSetTargetingData = {
|
|
47969
|
+
path: {
|
|
47970
|
+
/**
|
|
47971
|
+
* Reddit ad group ID
|
|
47972
|
+
*/
|
|
47973
|
+
adSetId: string;
|
|
47974
|
+
};
|
|
47975
|
+
query?: {
|
|
47976
|
+
/**
|
|
47977
|
+
* Disambiguates when the same adSetId string exists on more than one connected platform.
|
|
47978
|
+
*/
|
|
47979
|
+
platform?: 'reddit';
|
|
47980
|
+
};
|
|
47981
|
+
};
|
|
47982
|
+
|
|
47983
|
+
export type GetAdSetTargetingResponse = ({
|
|
47984
|
+
adSetId?: string;
|
|
47985
|
+
/**
|
|
47986
|
+
* Only the keys the ad group sets. `regions`, `metros`, `cities` and `zips` entries carry `{ key, name }`; `interests` carry `{ id, name }`.
|
|
47987
|
+
*/
|
|
47988
|
+
targeting?: (TargetingSpec);
|
|
47989
|
+
/**
|
|
47990
|
+
* The ad group's start_time, null when it has none.
|
|
47991
|
+
*/
|
|
47992
|
+
startDate?: (string) | null;
|
|
47993
|
+
/**
|
|
47994
|
+
* The ad group's end_time, null when it runs continuously.
|
|
47995
|
+
*/
|
|
47996
|
+
endDate?: (string) | null;
|
|
47997
|
+
});
|
|
47998
|
+
|
|
47999
|
+
export type GetAdSetTargetingError = (ErrorResponse | unknown);
|
|
48000
|
+
|
|
47890
48001
|
export type UpdateAdSetStatusData = {
|
|
47891
48002
|
body: {
|
|
47892
48003
|
status: 'active' | 'paused';
|
|
@@ -54191,10 +54302,18 @@ export type CreateStandaloneAdData = {
|
|
|
54191
54302
|
* (geo, languages, `demandGen.channels`/`audience`/`audienceId`/
|
|
54192
54303
|
* `adGroupName`) return 400. `validateOnly` is supported.
|
|
54193
54304
|
*
|
|
54305
|
+
* On Reddit Ads the `adSetId` is the AD GROUP id. Only the post
|
|
54306
|
+
* and the ad are created; the ad group keeps its budget,
|
|
54307
|
+
* schedule, targeting, bid and optimization, so `budgetAmount`,
|
|
54308
|
+
* `budgetType`, `startDate`, `endDate`, targeting fields,
|
|
54309
|
+
* `promotedObject`, `tracking.pixelId` and `optimizationGoal`
|
|
54310
|
+
* return 400. `goal` is not required. An ad group of another
|
|
54311
|
+
* ad account returns 404.
|
|
54312
|
+
*
|
|
54194
54313
|
*/
|
|
54195
54314
|
adSetId?: string;
|
|
54196
54315
|
/**
|
|
54197
|
-
* Meta, Google Ads, LinkedIn and
|
|
54316
|
+
* Meta, Google Ads, LinkedIn, TikTok and Reddit Ads. On TikTok: creates
|
|
54198
54317
|
* the ad group and the ad under this existing campaign; the
|
|
54199
54318
|
* campaign is neither created nor activated and its
|
|
54200
54319
|
* objective must fit `goal`; not with `smartPlus`.
|
|
@@ -54220,8 +54339,26 @@ export type CreateStandaloneAdData = {
|
|
|
54220
54339
|
* a new ad group, so geo and language fields return 400 there; the new
|
|
54221
54340
|
* ad group follows the campaign's targeting. On failure only the entities we
|
|
54222
54341
|
* authored are cleaned up; the pre-existing parent is left
|
|
54223
|
-
* untouched and is never (re)activated.
|
|
54224
|
-
*
|
|
54342
|
+
* untouched and is never (re)activated. On Reddit Ads:
|
|
54343
|
+
* creates a new ad group and the ad under this EXISTING
|
|
54344
|
+
* campaign; `goal` may be omitted (the campaign's objective
|
|
54345
|
+
* decides it) and any other goal returns 400 naming the one to
|
|
54346
|
+
* send. The ad group must start no earlier than a future
|
|
54347
|
+
* campaign start and end no later than the campaign end
|
|
54348
|
+
* (400 otherwise); without `endDate` it ends with the
|
|
54349
|
+
* campaign. When the campaign has
|
|
54350
|
+
* no campaign budget, send `budgetAmount`/`budgetType` for the
|
|
54351
|
+
* new ad group (400 without them); bid, conversion event and
|
|
54352
|
+
* pixel work as on a new campaign. Under campaign budget
|
|
54353
|
+
* optimization the ad group takes the campaign's bid,
|
|
54354
|
+
* goal type, optimization event and pixel, carries no budget
|
|
54355
|
+
* of its own (a budget in the request is not applied), and
|
|
54356
|
+
* bid fields or another conversion event or pixel return
|
|
54357
|
+
* 400, as does an `endDate` when the campaign has no end
|
|
54358
|
+
* date. A
|
|
54359
|
+
* campaign of another ad account returns 404, a Reddit Max
|
|
54360
|
+
* campaign 422. If the ad fails, the new ad group is
|
|
54361
|
+
* archived. Mutually exclusive with `adSetId` and `creatives[]`.
|
|
54225
54362
|
*
|
|
54226
54363
|
*/
|
|
54227
54364
|
existingCampaignId?: string;
|
|
@@ -57874,6 +58011,74 @@ export type RemoveCustomConversionGoalResponse = ({
|
|
|
57874
58011
|
|
|
57875
58012
|
export type RemoveCustomConversionGoalError = (ErrorResponse | unknown);
|
|
57876
58013
|
|
|
58014
|
+
export type ListEventsData = {
|
|
58015
|
+
query: {
|
|
58016
|
+
/**
|
|
58017
|
+
* `nextCursor` from the previous page.
|
|
58018
|
+
*/
|
|
58019
|
+
cursor?: string;
|
|
58020
|
+
/**
|
|
58021
|
+
* Only events with this name, such as `Purchase`.
|
|
58022
|
+
*/
|
|
58023
|
+
eventName?: string;
|
|
58024
|
+
/**
|
|
58025
|
+
* Only events at or after this time (ISO 8601, on the event time).
|
|
58026
|
+
*/
|
|
58027
|
+
from?: string;
|
|
58028
|
+
limit?: number;
|
|
58029
|
+
profileId: string;
|
|
58030
|
+
/**
|
|
58031
|
+
* Only events before this time (ISO 8601, on the event time).
|
|
58032
|
+
*/
|
|
58033
|
+
to?: string;
|
|
58034
|
+
};
|
|
58035
|
+
};
|
|
58036
|
+
|
|
58037
|
+
export type ListEventsResponse = ({
|
|
58038
|
+
events?: Array<{
|
|
58039
|
+
eventId?: string;
|
|
58040
|
+
eventName?: string;
|
|
58041
|
+
eventTime?: string;
|
|
58042
|
+
receivedAt?: string;
|
|
58043
|
+
actionSource?: (string) | null;
|
|
58044
|
+
value?: (number) | null;
|
|
58045
|
+
currency?: (string) | null;
|
|
58046
|
+
/**
|
|
58047
|
+
* Origin, path and attribution parameters only.
|
|
58048
|
+
*/
|
|
58049
|
+
sourceUrl?: (string) | null;
|
|
58050
|
+
utm?: {
|
|
58051
|
+
source?: (string) | null;
|
|
58052
|
+
medium?: (string) | null;
|
|
58053
|
+
campaign?: (string) | null;
|
|
58054
|
+
content?: (string) | null;
|
|
58055
|
+
};
|
|
58056
|
+
/**
|
|
58057
|
+
* Ad ID from the `zrn` parameter Zernio adds to links of ads it creates.
|
|
58058
|
+
*/
|
|
58059
|
+
zrn?: (string) | null;
|
|
58060
|
+
clickIds?: {
|
|
58061
|
+
gclid?: (string) | null;
|
|
58062
|
+
fbc?: (string) | null;
|
|
58063
|
+
};
|
|
58064
|
+
/**
|
|
58065
|
+
* Destinations the event was forwarded to.
|
|
58066
|
+
*/
|
|
58067
|
+
destinationsSent?: number;
|
|
58068
|
+
hasEmail?: boolean;
|
|
58069
|
+
hasPhone?: boolean;
|
|
58070
|
+
hasExternalId?: boolean;
|
|
58071
|
+
}>;
|
|
58072
|
+
/**
|
|
58073
|
+
* Pass as `cursor` to get the next page; `null` on the last page.
|
|
58074
|
+
*/
|
|
58075
|
+
nextCursor?: (string) | null;
|
|
58076
|
+
});
|
|
58077
|
+
|
|
58078
|
+
export type ListEventsError = (ErrorResponse | {
|
|
58079
|
+
error?: string;
|
|
58080
|
+
});
|
|
58081
|
+
|
|
57877
58082
|
export type SendEventsData = {
|
|
57878
58083
|
body: {
|
|
57879
58084
|
/**
|