@getlatedev/node 0.2.1320 → 0.2.1322

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.
@@ -31656,6 +31656,83 @@ export type DeleteInboxLabelResponse = ({
31656
31656
 
31657
31657
  export type DeleteInboxLabelError = (ErrorResponse | unknown);
31658
31658
 
31659
+ export type ListConversationLabelsData = {
31660
+ path: {
31661
+ /**
31662
+ * Conversation ID (Zernio id or Meta platform conversation id)
31663
+ */
31664
+ conversationId: string;
31665
+ };
31666
+ query: {
31667
+ /**
31668
+ * Facebook social account ID
31669
+ */
31670
+ accountId: string;
31671
+ };
31672
+ };
31673
+
31674
+ export type ListConversationLabelsResponse = ({
31675
+ labels?: Array<{
31676
+ /**
31677
+ * Meta label id
31678
+ */
31679
+ id?: string;
31680
+ name?: string;
31681
+ }>;
31682
+ });
31683
+
31684
+ export type ListConversationLabelsError = (ErrorResponse | unknown);
31685
+
31686
+ export type AddConversationLabelData = {
31687
+ body: {
31688
+ /**
31689
+ * Facebook social account ID
31690
+ */
31691
+ accountId: string;
31692
+ /**
31693
+ * Meta label id from listInboxLabels
31694
+ */
31695
+ labelId: string;
31696
+ };
31697
+ path: {
31698
+ /**
31699
+ * Conversation ID (Zernio id or Meta platform conversation id)
31700
+ */
31701
+ conversationId: string;
31702
+ };
31703
+ };
31704
+
31705
+ export type AddConversationLabelResponse = ({
31706
+ success?: boolean;
31707
+ });
31708
+
31709
+ export type AddConversationLabelError = (ErrorResponse | unknown);
31710
+
31711
+ export type RemoveConversationLabelData = {
31712
+ path: {
31713
+ /**
31714
+ * Conversation ID (Zernio id or Meta platform conversation id)
31715
+ */
31716
+ conversationId: string;
31717
+ /**
31718
+ * Meta label id
31719
+ */
31720
+ labelId: string;
31721
+ };
31722
+ query: {
31723
+ /**
31724
+ * Facebook social account ID
31725
+ */
31726
+ accountId: string;
31727
+ };
31728
+ };
31729
+
31730
+ export type RemoveConversationLabelResponse = ({
31731
+ success?: boolean;
31732
+ });
31733
+
31734
+ export type RemoveConversationLabelError = (ErrorResponse | unknown);
31735
+
31659
31736
  export type MarkConversationReadData = {
31660
31737
  body: {
31661
31738
  /**
@@ -47548,6 +47625,10 @@ export type ListTikTokSmartPlusReviewsData = {
47548
47625
  * Also return Smart+ ads deleted on TikTok (listed with `primary_status: STATUS_ALL`).
47549
47626
  */
47550
47627
  includeDeleted?: boolean;
47628
+ /**
47629
+ * Freshness window in seconds. Reviews, refusals and the listing read within it are served without calling TikTok; older ones are still returned but read again, oldest first.
47630
+ */
47631
+ maxAgeSeconds?: number;
47551
47632
  page?: number;
47552
47633
  pageSize?: number;
47553
47634
  };
@@ -47556,6 +47637,10 @@ export type ListTikTokSmartPlusReviewsData = {
47556
47637
  export type ListTikTokSmartPlusReviewsResponse = ({
47557
47638
  adAccountId?: string;
47558
47639
  includeDeleted?: boolean;
47640
+ /**
47641
+ * The freshness window this page was read with.
47642
+ */
47643
+ maxAgeSeconds?: number;
47559
47644
  page?: number;
47560
47645
  pageSize?: number;
47561
47646
  totalPages?: number;
@@ -47563,6 +47648,58 @@ export type ListTikTokSmartPlusReviewsResponse = ({
47563
47648
  * Smart+ ads of the advertiser across all pages.
47564
47649
  */
47565
47650
  totalSmartPlusAds?: number;
47651
+ /**
47652
+ * The Smart+ ad listing this page was cut from.
47653
+ */
47654
+ listing?: {
47655
+ /**
47656
+ * When the listing was read from TikTok.
47657
+ */
47658
+ readAt?: string;
47659
+ /**
47660
+ * `fresh`: read within `maxAgeSeconds`. `fallback`: relisting failed and this is the older stored listing.
47661
+ */
47662
+ source?: 'fresh' | 'fallback';
47663
+ /**
47664
+ * The relist error on a fallback, otherwise null.
47665
+ */
47666
+ error?: {
47667
+ tiktokCode?: (number) | null;
47668
+ message?: string;
47669
+ } | null;
47670
+ };
47671
+ /**
47672
+ * Set when TikTok refused both halves of a review batch the same way (for example a permission error) and the page was served from stored reviews instead of being refreshed. Null otherwise.
47673
+ */
47674
+ reviewError?: {
47675
+ tiktokCode?: (number) | null;
47676
+ message?: string;
47677
+ } | null;
47678
+ /**
47679
+ * The Smart+ ads on this page split by state; the four counts add up to the Smart+ ads on this page (fewer than `pageSize` on the last page).
47680
+ */
47681
+ counts?: {
47682
+ /**
47683
+ * Items read within `maxAgeSeconds`.
47684
+ */
47685
+ fresh?: number;
47686
+ /**
47687
+ * Items read earlier, returned with their `readAt` and due for a refresh.
47688
+ */
47689
+ stale?: number;
47690
+ /**
47691
+ * Smart+ ads never read (`pendingSmartPlusAdIds`).
47692
+ */
47693
+ pending?: number;
47694
+ /**
47695
+ * Entries of `failedSmartPlusAds`.
47696
+ */
47697
+ failed?: number;
47698
+ };
47699
+ /**
47700
+ * The oldest `readAt` in `items`. Null when `items` is empty.
47701
+ */
47702
+ oldestReadAt?: (string) | null;
47566
47703
  items?: Array<{
47567
47704
  smartPlusAdId?: string;
47568
47705
  adGroupId?: (string) | null;
@@ -47573,12 +47710,12 @@ export type ListTikTokSmartPlusReviewsResponse = ({
47573
47710
  */
47574
47711
  materials?: Array<TikTokSmartPlusMaterialReview>;
47575
47712
  /**
47576
- * When the verdict was read from TikTok.
47713
+ * When the verdict was read from TikTok, kept as is when served from the store. Older than `maxAgeSeconds` means stale.
47577
47714
  */
47578
47715
  readAt?: string;
47579
47716
  }>;
47580
47717
  /**
47581
- * Smart+ ads of this page whose review TikTok refused on its own (for example an ad deleted on TikTok since the listing was cached). Zernio splits a refused batch in halves (at most 16 extra calls per page), so the other ads of the batch are still read; ads left unresolved by that cap carry the batch error. Empty when none.
47718
+ * Smart+ ads of this page whose review TikTok refused on its own (for example an ad deleted on TikTok since the listing was read). Zernio splits a refused batch in halves (at most 16 extra calls per page), so the other ads of the batch are still read; ads left unresolved by that cap stay in `items` with their stored review or in `pendingSmartPlusAdIds`. Empty when none.
47582
47719
  */
47583
47720
  failedSmartPlusAds?: Array<{
47584
47721
  smartPlusAdId?: string;
@@ -47594,17 +47731,25 @@ export type ListTikTokSmartPlusReviewsResponse = ({
47594
47731
  */
47595
47732
  message?: string;
47596
47733
  };
47734
+ /**
47735
+ * When TikTok refused this ad. Null for a refusal stored before this field existed.
47736
+ */
47737
+ refusedAt?: (string) | null;
47597
47738
  }>;
47598
47739
  /**
47599
- * True when some Smart+ ads of this page could not be read because of TikTok's review quota.
47740
+ * True while some Smart+ ads of this page were never read (`counts.pending > 0`). Stale items alone keep it false.
47600
47741
  */
47601
47742
  incomplete?: boolean;
47602
47743
  /**
47603
- * Smart+ ads of this page still to read. Empty when complete.
47744
+ * True when every item and refusal of this page was read within `maxAgeSeconds` and nothing is pending. False with `incomplete: false` means the page is complete but some reviews are older than the window; a later read refreshes them oldest first.
47745
+ */
47746
+ allFresh?: boolean;
47747
+ /**
47748
+ * Smart+ ads of this page never read. Empty when every ad has a stored review or refusal.
47604
47749
  */
47605
47750
  pendingSmartPlusAdIds?: Array<(string)>;
47606
47751
  /**
47607
- * Seconds to wait before reading this page again. Null when complete.
47752
+ * Seconds to wait before reading this page again, set only while `incomplete` is true and review reads are paused. Null when complete (stale items included), or when the page is incomplete without a quota pause (read it again right away).
47608
47753
  */
47609
47754
  retryAfterSeconds?: (number) | null;
47610
47755
  });