@getlatedev/node 0.2.1446 → 0.2.1447

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.
@@ -2034,6 +2034,57 @@ export type AdsListResponse = {
2034
2034
  backfillPending?: boolean;
2035
2035
  };
2036
2036
 
2037
+ export type AdsPerformanceResponse = {
2038
+ ads: Array<{
2039
+ /**
2040
+ * Zernio ad ID.
2041
+ */
2042
+ adId?: string;
2043
+ platformAdId?: (string) | null;
2044
+ platform?: string;
2045
+ name?: string;
2046
+ status?: (string) | null;
2047
+ campaignName?: (string) | null;
2048
+ adSetName?: (string) | null;
2049
+ /**
2050
+ * ISO 4217 code of the ad's money metrics.
2051
+ */
2052
+ currency?: (string) | null;
2053
+ creative?: {
2054
+ type?: ('image' | 'video' | 'carousel' | 'document') | null;
2055
+ thumbnailUrl?: (string) | null;
2056
+ headline?: (string) | null;
2057
+ body?: (string) | null;
2058
+ linkUrl?: (string) | null;
2059
+ };
2060
+ metrics?: {
2061
+ /**
2062
+ * In the ad's currency.
2063
+ */
2064
+ spend?: number;
2065
+ impressions?: number;
2066
+ clicks?: number;
2067
+ /**
2068
+ * Percent.
2069
+ */
2070
+ ctr?: number;
2071
+ /**
2072
+ * Results over the range (see AdMetrics.conversions).
2073
+ */
2074
+ conversions?: number;
2075
+ costPerConversion?: number;
2076
+ purchaseValue?: number;
2077
+ roas?: number;
2078
+ /**
2079
+ * `conversions` split by what was counted (Meta action_type or Google conversion action name).
2080
+ */
2081
+ conversionsByType?: {
2082
+ [key: string]: (number);
2083
+ };
2084
+ };
2085
+ }>;
2086
+ };
2087
+
2037
2088
  export type AdStatus = 'active' | 'paused' | 'pending_review' | 'rejected' | 'completed' | 'cancelled' | 'error';
2038
2089
 
2039
2090
  export type AdsTimelineResponse = {
@@ -53205,6 +53256,48 @@ export type GetAdTreeResponse = (AdTreeResponse | (AdTreeResponse & {
53205
53256
 
53206
53257
  export type GetAdTreeError = (ErrorResponse | unknown);
53207
53258
 
53259
+ export type ListAdsByPerformanceData = {
53260
+ query: {
53261
+ /**
53262
+ * Account ID. Sibling-expanded to its linked posting and ads pair. An id the API key cannot reach answers 404.
53263
+ */
53264
+ accountId: string;
53265
+ /**
53266
+ * Optional platform-native ad account ID (e.g. Meta `act_…`) to rank one ad account only.
53267
+ */
53268
+ adAccountId?: string;
53269
+ /**
53270
+ * Inclusive start of the range (YYYY-MM-DD).
53271
+ */
53272
+ fromDate: string;
53273
+ /**
53274
+ * How many ads to return.
53275
+ */
53276
+ limit?: number;
53277
+ /**
53278
+ * Restrict to one platform.
53279
+ */
53280
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft';
53281
+ /**
53282
+ * Metric the ads are ranked by, highest first.
53283
+ */
53284
+ sortBy?: 'spend' | 'impressions' | 'clicks' | 'conversions' | 'roas';
53285
+ /**
53286
+ * Inclusive end of the range (YYYY-MM-DD). Max 730-day range.
53287
+ */
53288
+ toDate: string;
53289
+ };
53290
+ };
53291
+
53292
+ export type ListAdsByPerformanceResponse = (AdsPerformanceResponse | (AdsPerformanceResponse & {
53293
+ /**
53294
+ * Always true on this response. Retry until the request returns 200.
53295
+ */
53296
+ backfillPending: boolean;
53297
+ }));
53298
+
53299
+ export type ListAdsByPerformanceError = (ErrorResponse | unknown);
53300
+
53208
53301
  export type GetAdsTimelineData = {
53209
53302
  query: {
53210
53303
  /**