@getlatedev/node 0.2.1446 → 0.2.1448

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 = {
@@ -20614,9 +20665,18 @@ export type event52 = 'review.restored';
20614
20665
  /**
20615
20666
  * Webhook payload for the review.updated event. Same shape as review.new.
20616
20667
  *
20617
- * Fired when the reviewer edits their text or rating, or when a reply is posted through POST /v1/inbox/reviews/{reviewId}/reply.
20668
+ * Fired when the reviewer edits their text or rating, or when a reply is added, edited or removed.
20669
+ *
20670
+ * A reply posted through POST /v1/inbox/reviews/{reviewId}/reply fires immediately. The periodic check then reports it again with the full review payload, so expect a second delivery.
20671
+ *
20672
+ *
20673
+ * Replies written or removed in Google's own interface, and replies removed through the API, are reported by the periodic check.
20618
20674
  *
20619
- * A reply written directly in Google's own interface does NOT fire it: Google emits no notification when a reviewReply is written.
20675
+ *
20676
+ * For replies written in Google, that is usually within 6 hours for reviews updated in the last 30 days, and usually within about 7 days for older ones.
20677
+ *
20678
+ *
20679
+ * Only teams with a webhook subscribed to review.updated are checked. A removed reply fires with hasReply false.
20620
20680
  *
20621
20681
  * When a reply is present, review.hasReply is true and review.reply is populated.
20622
20682
  *
@@ -53205,6 +53265,48 @@ export type GetAdTreeResponse = (AdTreeResponse | (AdTreeResponse & {
53205
53265
 
53206
53266
  export type GetAdTreeError = (ErrorResponse | unknown);
53207
53267
 
53268
+ export type ListAdsByPerformanceData = {
53269
+ query: {
53270
+ /**
53271
+ * Account ID. Sibling-expanded to its linked posting and ads pair. An id the API key cannot reach answers 404.
53272
+ */
53273
+ accountId: string;
53274
+ /**
53275
+ * Optional platform-native ad account ID (e.g. Meta `act_…`) to rank one ad account only.
53276
+ */
53277
+ adAccountId?: string;
53278
+ /**
53279
+ * Inclusive start of the range (YYYY-MM-DD).
53280
+ */
53281
+ fromDate: string;
53282
+ /**
53283
+ * How many ads to return.
53284
+ */
53285
+ limit?: number;
53286
+ /**
53287
+ * Restrict to one platform.
53288
+ */
53289
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft';
53290
+ /**
53291
+ * Metric the ads are ranked by, highest first.
53292
+ */
53293
+ sortBy?: 'spend' | 'impressions' | 'clicks' | 'conversions' | 'roas';
53294
+ /**
53295
+ * Inclusive end of the range (YYYY-MM-DD). Max 730-day range.
53296
+ */
53297
+ toDate: string;
53298
+ };
53299
+ };
53300
+
53301
+ export type ListAdsByPerformanceResponse = (AdsPerformanceResponse | (AdsPerformanceResponse & {
53302
+ /**
53303
+ * Always true on this response. Retry until the request returns 200.
53304
+ */
53305
+ backfillPending: boolean;
53306
+ }));
53307
+
53308
+ export type ListAdsByPerformanceError = (ErrorResponse | unknown);
53309
+
53208
53310
  export type GetAdsTimelineData = {
53209
53311
  query: {
53210
53312
  /**