@getlatedev/node 0.2.394 → 0.2.395

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.
@@ -23758,6 +23758,48 @@ export type ListAdCampaignsError = ({
23758
23758
  error?: string;
23759
23759
  } | unknown);
23760
23760
 
23761
+ export type CreateAdCampaignData = {
23762
+ body: {
23763
+ /**
23764
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
23765
+ */
23766
+ accountId: string;
23767
+ /**
23768
+ * Meta ad account id (act_<n>).
23769
+ */
23770
+ adAccountId: string;
23771
+ name: string;
23772
+ /**
23773
+ * Mapped to the ODAX objective (same mapping as POST /v1/ads/create).
23774
+ */
23775
+ goal: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'job_applicants' | 'conversions' | 'app_promotion' | 'catalog_sales';
23776
+ specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
23777
+ /**
23778
+ * Campaign-level (CBO) budget in whole currency units. Requires budgetType.
23779
+ */
23780
+ budgetAmount?: number;
23781
+ budgetType?: 'daily' | 'lifetime';
23782
+ status?: 'ACTIVE' | 'PAUSED';
23783
+ };
23784
+ };
23785
+
23786
+ export type CreateAdCampaignResponse = ({
23787
+ adAccountId?: string;
23788
+ /**
23789
+ * Platform id of the new campaign
23790
+ */
23791
+ campaignId?: string;
23792
+ /**
23793
+ * Resolved ODAX objective (e.g. OUTCOME_SALES).
23794
+ */
23795
+ objective?: string;
23796
+ status?: 'ACTIVE' | 'PAUSED';
23797
+ });
23798
+
23799
+ export type CreateAdCampaignError = (unknown | {
23800
+ error?: string;
23801
+ });
23802
+
23761
23803
  export type UpdateAdCampaignStatusData = {
23762
23804
  body: {
23763
23805
  status: 'active' | 'paused';
@@ -23949,6 +23991,89 @@ export type DuplicateAdCampaignError = (unknown | {
23949
23991
  error?: string;
23950
23992
  });
23951
23993
 
23994
+ export type DuplicateAdSetData = {
23995
+ body: {
23996
+ platform: 'facebook' | 'instagram';
23997
+ /**
23998
+ * Destination platform campaign id (defaults to the source's campaign)
23999
+ */
24000
+ campaignId?: string;
24001
+ /**
24002
+ * Copy child ads + creatives
24003
+ */
24004
+ deepCopy?: boolean;
24005
+ statusOption?: 'ACTIVE' | 'PAUSED' | 'INHERITED_FROM_SOURCE';
24006
+ /**
24007
+ * Reschedule the copy's start time
24008
+ */
24009
+ startTime?: string;
24010
+ endTime?: string;
24011
+ renameStrategy?: 'DEEP_RENAME' | 'ONLY_TOP_LEVEL_RENAME' | 'NO_RENAME';
24012
+ renamePrefix?: string;
24013
+ renameSuffix?: string;
24014
+ syncAfter?: boolean;
24015
+ };
24016
+ path: {
24017
+ /**
24018
+ * Source platform ad set ID
24019
+ */
24020
+ adSetId: string;
24021
+ };
24022
+ };
24023
+
24024
+ export type DuplicateAdSetResponse = ({
24025
+ /**
24026
+ * Platform ID of the new ad set
24027
+ */
24028
+ copiedAdSetId?: string;
24029
+ discovery?: 'triggered' | 'skipped' | 'failed';
24030
+ /**
24031
+ * Meta's native copy response (includes ad_object_ids for child copies)
24032
+ */
24033
+ raw?: {
24034
+ [key: string]: unknown;
24035
+ };
24036
+ });
24037
+
24038
+ export type DuplicateAdSetError = (unknown | {
24039
+ error?: string;
24040
+ });
24041
+
24042
+ export type DuplicateAdData = {
24043
+ body?: {
24044
+ /**
24045
+ * Destination platform ad set id (defaults to the source's ad set)
24046
+ */
24047
+ adSetId?: string;
24048
+ statusOption?: 'ACTIVE' | 'PAUSED' | 'INHERITED_FROM_SOURCE';
24049
+ renameStrategy?: 'DEEP_RENAME' | 'ONLY_TOP_LEVEL_RENAME' | 'NO_RENAME';
24050
+ renamePrefix?: string;
24051
+ renameSuffix?: string;
24052
+ syncAfter?: boolean;
24053
+ };
24054
+ path: {
24055
+ /**
24056
+ * Zernio ad ID or platform ad ID
24057
+ */
24058
+ adId: string;
24059
+ };
24060
+ };
24061
+
24062
+ export type DuplicateAdResponse = ({
24063
+ /**
24064
+ * Platform ID of the new ad
24065
+ */
24066
+ copiedAdId?: string;
24067
+ discovery?: 'triggered' | 'skipped' | 'failed';
24068
+ raw?: {
24069
+ [key: string]: unknown;
24070
+ };
24071
+ });
24072
+
24073
+ export type DuplicateAdError = (unknown | {
24074
+ error?: string;
24075
+ });
24076
+
23952
24077
  export type GetAdSetDetailsData = {
23953
24078
  path: {
23954
24079
  /**
@@ -25180,6 +25305,271 @@ export type ListAdStudiesError = (unknown | {
25180
25305
  error?: string;
25181
25306
  });
25182
25307
 
25308
+ export type ListAdLabelsData = {
25309
+ query: {
25310
+ /**
25311
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25312
+ */
25313
+ accountId: string;
25314
+ /**
25315
+ * Meta ad account id (act_<n>).
25316
+ */
25317
+ adAccountId: string;
25318
+ /**
25319
+ * Cursor from paging.after of the previous page.
25320
+ */
25321
+ after?: string;
25322
+ /**
25323
+ * Rows per page
25324
+ */
25325
+ limit?: number;
25326
+ };
25327
+ };
25328
+
25329
+ export type ListAdLabelsResponse = ({
25330
+ adAccountId?: string;
25331
+ data?: Array<{
25332
+ [key: string]: unknown;
25333
+ }>;
25334
+ paging?: {
25335
+ /**
25336
+ * Cursor for the next page; null when exhausted.
25337
+ */
25338
+ after?: (string) | null;
25339
+ };
25340
+ });
25341
+
25342
+ export type ListAdLabelsError = (unknown | {
25343
+ error?: string;
25344
+ });
25345
+
25346
+ export type ListHighDemandPeriodsData = {
25347
+ query: {
25348
+ /**
25349
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25350
+ */
25351
+ accountId: string;
25352
+ /**
25353
+ * Platform ad set id. Exactly one of campaignId / adSetId.
25354
+ */
25355
+ adSetId?: string;
25356
+ /**
25357
+ * Cursor from paging.after of the previous page.
25358
+ */
25359
+ after?: string;
25360
+ /**
25361
+ * Platform campaign id. Exactly one of campaignId / adSetId.
25362
+ */
25363
+ campaignId?: string;
25364
+ /**
25365
+ * Rows per page
25366
+ */
25367
+ limit?: number;
25368
+ };
25369
+ };
25370
+
25371
+ export type ListHighDemandPeriodsResponse = ({
25372
+ /**
25373
+ * The campaign / ad set id the schedules belong to.
25374
+ */
25375
+ objectId?: string;
25376
+ data?: Array<{
25377
+ [key: string]: unknown;
25378
+ }>;
25379
+ paging?: {
25380
+ /**
25381
+ * Cursor for the next page; null when exhausted.
25382
+ */
25383
+ after?: (string) | null;
25384
+ };
25385
+ });
25386
+
25387
+ export type ListHighDemandPeriodsError = (unknown | {
25388
+ error?: string;
25389
+ });
25390
+
25391
+ export type ListAdCreativesData = {
25392
+ query: {
25393
+ /**
25394
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25395
+ */
25396
+ accountId: string;
25397
+ /**
25398
+ * Meta ad account id (act_<n>).
25399
+ */
25400
+ adAccountId: string;
25401
+ /**
25402
+ * Cursor from paging.after of the previous page.
25403
+ */
25404
+ after?: string;
25405
+ /**
25406
+ * Comma-separated Graph field override (supports nested {} projections).
25407
+ */
25408
+ fields?: string;
25409
+ /**
25410
+ * Rows per page
25411
+ */
25412
+ limit?: number;
25413
+ };
25414
+ };
25415
+
25416
+ export type ListAdCreativesResponse = ({
25417
+ adAccountId?: string;
25418
+ data?: Array<{
25419
+ [key: string]: unknown;
25420
+ }>;
25421
+ paging?: {
25422
+ /**
25423
+ * Cursor for the next page; null when exhausted.
25424
+ */
25425
+ after?: (string) | null;
25426
+ };
25427
+ });
25428
+
25429
+ export type ListAdCreativesError = (unknown | {
25430
+ error?: string;
25431
+ });
25432
+
25433
+ export type CreateAdCreativeData = {
25434
+ body: {
25435
+ /**
25436
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token and Page.
25437
+ */
25438
+ accountId: string;
25439
+ /**
25440
+ * Meta ad account id (act_<n>).
25441
+ */
25442
+ adAccountId: string;
25443
+ headline: string;
25444
+ /**
25445
+ * Primary text
25446
+ */
25447
+ body: string;
25448
+ /**
25449
+ * Link description below the headline; omitted = Meta scrapes the destination's OG description.
25450
+ */
25451
+ description?: string;
25452
+ /**
25453
+ * CTA type (same whitelist as POST /v1/ads/create).
25454
+ */
25455
+ callToAction?: string;
25456
+ linkUrl: string;
25457
+ /**
25458
+ * Publicly reachable image; uploaded to the account's library server-side.
25459
+ */
25460
+ imageUrl?: string;
25461
+ /**
25462
+ * Existing library image hash (POST /v1/ads/images or GET /v1/ads/images).
25463
+ */
25464
+ imageHash?: string;
25465
+ carouselCards?: Array<{
25466
+ imageUrl: string;
25467
+ linkUrl: string;
25468
+ headline?: string;
25469
+ description?: string;
25470
+ callToAction?: string;
25471
+ }>;
25472
+ /**
25473
+ * Appended to every outbound URL (e.g. utm_source=fb).
25474
+ */
25475
+ urlTags?: string;
25476
+ };
25477
+ };
25478
+
25479
+ export type CreateAdCreativeResponse = ({
25480
+ adAccountId?: string;
25481
+ /**
25482
+ * Platform creative id, reusable via existingCreativeId.
25483
+ */
25484
+ creativeId?: string;
25485
+ });
25486
+
25487
+ export type CreateAdCreativeError = (unknown | {
25488
+ error?: string;
25489
+ });
25490
+
25491
+ export type GetAdCreativeData = {
25492
+ path: {
25493
+ /**
25494
+ * Platform creative id
25495
+ */
25496
+ creativeId: string;
25497
+ };
25498
+ query: {
25499
+ /**
25500
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25501
+ */
25502
+ accountId: string;
25503
+ /**
25504
+ * Comma-separated Graph field override (supports nested {} projections).
25505
+ */
25506
+ fields?: string;
25507
+ };
25508
+ };
25509
+
25510
+ export type GetAdCreativeResponse = ({
25511
+ /**
25512
+ * Raw Meta creative node
25513
+ */
25514
+ creative?: {
25515
+ [key: string]: unknown;
25516
+ };
25517
+ });
25518
+
25519
+ export type GetAdCreativeError = (unknown | {
25520
+ error?: string;
25521
+ });
25522
+
25523
+ export type UpdateAdCreativeData = {
25524
+ body: {
25525
+ /**
25526
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25527
+ */
25528
+ accountId: string;
25529
+ name: string;
25530
+ };
25531
+ path: {
25532
+ /**
25533
+ * Platform creative id
25534
+ */
25535
+ creativeId: string;
25536
+ };
25537
+ };
25538
+
25539
+ export type UpdateAdCreativeResponse = ({
25540
+ creativeId?: string;
25541
+ name?: string;
25542
+ message?: string;
25543
+ });
25544
+
25545
+ export type UpdateAdCreativeError = (unknown | {
25546
+ error?: string;
25547
+ });
25548
+
25549
+ export type DeleteAdCreativeData = {
25550
+ path: {
25551
+ /**
25552
+ * Platform creative id
25553
+ */
25554
+ creativeId: string;
25555
+ };
25556
+ query: {
25557
+ /**
25558
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25559
+ */
25560
+ accountId: string;
25561
+ };
25562
+ };
25563
+
25564
+ export type DeleteAdCreativeResponse = ({
25565
+ creativeId?: string;
25566
+ message?: string;
25567
+ });
25568
+
25569
+ export type DeleteAdCreativeError = (unknown | {
25570
+ error?: string;
25571
+ });
25572
+
25183
25573
  export type GetAdAccountFinanceData = {
25184
25574
  query: {
25185
25575
  /**
@@ -26660,6 +27050,48 @@ export type UploadAdImageError = (unknown | {
26660
27050
  error?: string;
26661
27051
  });
26662
27052
 
27053
+ export type ListAdImagesData = {
27054
+ query: {
27055
+ /**
27056
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
27057
+ */
27058
+ accountId: string;
27059
+ /**
27060
+ * Meta ad account id (act_<n>).
27061
+ */
27062
+ adAccountId: string;
27063
+ /**
27064
+ * Cursor from paging.after of the previous page.
27065
+ */
27066
+ after?: string;
27067
+ /**
27068
+ * Comma-separated Graph field override (supports nested {} projections).
27069
+ */
27070
+ fields?: string;
27071
+ /**
27072
+ * Rows per page
27073
+ */
27074
+ limit?: number;
27075
+ };
27076
+ };
27077
+
27078
+ export type ListAdImagesResponse = ({
27079
+ adAccountId?: string;
27080
+ data?: Array<{
27081
+ [key: string]: unknown;
27082
+ }>;
27083
+ paging?: {
27084
+ /**
27085
+ * Cursor for the next page; null when exhausted.
27086
+ */
27087
+ after?: (string) | null;
27088
+ };
27089
+ });
27090
+
27091
+ export type ListAdImagesError = (unknown | {
27092
+ error?: string;
27093
+ });
27094
+
26663
27095
  export type SearchAdInterestsData = {
26664
27096
  query: {
26665
27097
  /**