@getlatedev/node 0.2.21 → 0.2.23

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.
@@ -1678,7 +1678,7 @@ export type Webhook = {
1678
1678
  /**
1679
1679
  * Events subscribed to
1680
1680
  */
1681
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received')>;
1681
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received')>;
1682
1682
  /**
1683
1683
  * Whether webhook delivery is enabled
1684
1684
  */
@@ -1712,7 +1712,7 @@ export type WebhookLog = {
1712
1712
  * Name of the webhook that was triggered
1713
1713
  */
1714
1714
  webhookName?: string;
1715
- event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'webhook.test';
1715
+ event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'webhook.test';
1716
1716
  url?: string;
1717
1717
  status?: 'success' | 'failed';
1718
1718
  /**
@@ -1744,7 +1744,7 @@ export type WebhookLog = {
1744
1744
  createdAt?: string;
1745
1745
  };
1746
1746
 
1747
- export type event = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'webhook.test';
1747
+ export type event = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'webhook.test';
1748
1748
 
1749
1749
  export type status7 = 'success' | 'failed';
1750
1750
 
@@ -1752,21 +1752,25 @@ export type status7 = 'success' | 'failed';
1752
1752
  * Webhook payload for account connected events
1753
1753
  */
1754
1754
  export type WebhookPayloadAccountConnected = {
1755
- event?: 'account.connected';
1756
- account?: {
1755
+ /**
1756
+ * Stable webhook event ID
1757
+ */
1758
+ id: string;
1759
+ event: 'account.connected';
1760
+ account: {
1757
1761
  /**
1758
1762
  * The account's unique identifier (same as used in /v1/accounts/{accountId})
1759
1763
  */
1760
- accountId?: string;
1764
+ accountId: string;
1761
1765
  /**
1762
1766
  * The profile's unique identifier this account belongs to
1763
1767
  */
1764
- profileId?: string;
1765
- platform?: string;
1766
- username?: string;
1768
+ profileId: string;
1769
+ platform: string;
1770
+ username: string;
1767
1771
  displayName?: string;
1768
1772
  };
1769
- timestamp?: string;
1773
+ timestamp: string;
1770
1774
  };
1771
1775
 
1772
1776
  export type event2 = 'account.connected';
@@ -1775,29 +1779,33 @@ export type event2 = 'account.connected';
1775
1779
  * Webhook payload for account disconnected events
1776
1780
  */
1777
1781
  export type WebhookPayloadAccountDisconnected = {
1778
- event?: 'account.disconnected';
1779
- account?: {
1782
+ /**
1783
+ * Stable webhook event ID
1784
+ */
1785
+ id: string;
1786
+ event: 'account.disconnected';
1787
+ account: {
1780
1788
  /**
1781
1789
  * The account's unique identifier (same as used in /v1/accounts/{accountId})
1782
1790
  */
1783
- accountId?: string;
1791
+ accountId: string;
1784
1792
  /**
1785
1793
  * The profile's unique identifier this account belongs to
1786
1794
  */
1787
- profileId?: string;
1788
- platform?: string;
1789
- username?: string;
1795
+ profileId: string;
1796
+ platform: string;
1797
+ username: string;
1790
1798
  displayName?: string;
1791
1799
  /**
1792
1800
  * Whether the disconnection was intentional (user action) or unintentional (token expired/revoked)
1793
1801
  */
1794
- disconnectionType?: 'intentional' | 'unintentional';
1802
+ disconnectionType: 'intentional' | 'unintentional';
1795
1803
  /**
1796
1804
  * Human-readable reason for the disconnection
1797
1805
  */
1798
- reason?: string;
1806
+ reason: string;
1799
1807
  };
1800
- timestamp?: string;
1808
+ timestamp: string;
1801
1809
  };
1802
1810
 
1803
1811
  export type event3 = 'account.disconnected';
@@ -1811,63 +1819,67 @@ export type disconnectionType = 'intentional' | 'unintentional';
1811
1819
  * Webhook payload for comment received events (Instagram, Facebook, Twitter/X, YouTube, LinkedIn, Bluesky, Reddit)
1812
1820
  */
1813
1821
  export type WebhookPayloadComment = {
1814
- event?: 'comment.received';
1815
- comment?: {
1822
+ /**
1823
+ * Stable webhook event ID
1824
+ */
1825
+ id: string;
1826
+ event: 'comment.received';
1827
+ comment: {
1816
1828
  /**
1817
1829
  * Platform comment ID
1818
1830
  */
1819
- id?: string;
1831
+ id: string;
1820
1832
  /**
1821
1833
  * Internal post ID
1822
1834
  */
1823
- postId?: string;
1835
+ postId: string;
1824
1836
  /**
1825
1837
  * Platform's post ID
1826
1838
  */
1827
- platformPostId?: string;
1828
- platform?: 'instagram' | 'facebook' | 'twitter' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit';
1839
+ platformPostId: string;
1840
+ platform: 'instagram' | 'facebook' | 'twitter' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit';
1829
1841
  /**
1830
1842
  * Comment text content
1831
1843
  */
1832
- text?: string;
1833
- author?: {
1844
+ text: string;
1845
+ author: {
1834
1846
  /**
1835
1847
  * Author's platform ID
1836
1848
  */
1837
- id?: string;
1849
+ id: string;
1838
1850
  username?: string;
1839
1851
  name?: string;
1840
1852
  picture?: (string) | null;
1841
1853
  };
1842
- createdAt?: string;
1854
+ createdAt: string;
1843
1855
  /**
1844
1856
  * Whether this is a reply to another comment
1845
1857
  */
1846
- isReply?: boolean;
1858
+ isReply: boolean;
1847
1859
  /**
1848
1860
  * Parent comment ID if this is a reply
1849
1861
  */
1850
- parentCommentId?: (string) | null;
1862
+ parentCommentId: (string) | null;
1851
1863
  };
1852
- post?: {
1864
+ post: {
1853
1865
  /**
1854
1866
  * Internal post ID
1855
1867
  */
1856
- id?: string;
1868
+ id: string;
1857
1869
  /**
1858
1870
  * Platform's post ID
1859
1871
  */
1860
- platformPostId?: string;
1872
+ platformPostId: string;
1861
1873
  };
1862
- account?: {
1874
+ account: {
1863
1875
  /**
1864
1876
  * Social account ID
1865
1877
  */
1866
- id?: string;
1867
- platform?: string;
1868
- username?: string;
1878
+ id: string;
1879
+ platform: string;
1880
+ username: string;
1869
1881
  };
1870
- timestamp?: string;
1882
+ timestamp: string;
1871
1883
  };
1872
1884
 
1873
1885
  export type event4 = 'comment.received';
@@ -1875,38 +1887,42 @@ export type event4 = 'comment.received';
1875
1887
  export type platform2 = 'instagram' | 'facebook' | 'twitter' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit';
1876
1888
 
1877
1889
  /**
1878
- * Webhook payload for message received events (DMs from Instagram, Facebook, Telegram, Bluesky, Reddit)
1890
+ * Webhook payload for message received events
1879
1891
  */
1880
1892
  export type WebhookPayloadMessage = {
1881
- event?: 'message.received';
1882
- message?: {
1893
+ /**
1894
+ * Stable webhook event ID
1895
+ */
1896
+ id: string;
1897
+ event: 'message.received';
1898
+ message: {
1883
1899
  /**
1884
1900
  * Internal message ID
1885
1901
  */
1886
- id?: string;
1902
+ id: string;
1887
1903
  /**
1888
1904
  * Internal conversation ID
1889
1905
  */
1890
- conversationId?: string;
1891
- platform?: 'instagram' | 'facebook' | 'telegram' | 'bluesky' | 'reddit';
1906
+ conversationId: string;
1907
+ platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp';
1892
1908
  /**
1893
1909
  * Platform's message ID
1894
1910
  */
1895
- platformMessageId?: string;
1896
- direction?: 'incoming';
1911
+ platformMessageId: string;
1912
+ direction: 'incoming' | 'outgoing';
1897
1913
  /**
1898
1914
  * Message text content
1899
1915
  */
1900
- text?: (string) | null;
1901
- attachments?: Array<{
1916
+ text: (string) | null;
1917
+ attachments: Array<{
1902
1918
  /**
1903
1919
  * Attachment type (image, video, file, sticker, audio)
1904
1920
  */
1905
- type?: string;
1921
+ type: string;
1906
1922
  /**
1907
1923
  * Attachment URL (may expire for Meta platforms)
1908
1924
  */
1909
- url?: string;
1925
+ url: string;
1910
1926
  /**
1911
1927
  * Additional attachment metadata
1912
1928
  */
@@ -1914,8 +1930,8 @@ export type WebhookPayloadMessage = {
1914
1930
  [key: string]: unknown;
1915
1931
  };
1916
1932
  }>;
1917
- sender?: {
1918
- id?: string;
1933
+ sender: {
1934
+ id: string;
1919
1935
  name?: string;
1920
1936
  username?: string;
1921
1937
  picture?: string;
@@ -1939,31 +1955,27 @@ export type WebhookPayloadMessage = {
1939
1955
  * Whether the sender is a verified Instagram user
1940
1956
  */
1941
1957
  isVerified?: (boolean) | null;
1942
- } | null;
1958
+ };
1943
1959
  };
1944
- sentAt?: string;
1945
- isRead?: boolean;
1960
+ sentAt: string;
1961
+ isRead: boolean;
1946
1962
  };
1947
- conversation?: {
1948
- id?: string;
1949
- platformConversationId?: string;
1963
+ conversation: {
1964
+ id: string;
1965
+ platformConversationId: string;
1950
1966
  participantId?: string;
1951
1967
  participantName?: string;
1952
1968
  participantUsername?: string;
1953
1969
  participantPicture?: string;
1954
- /**
1955
- * X/Twitter verified badge type. Only present for Twitter/X conversations.
1956
- */
1957
- participantVerifiedType?: ('blue' | 'government' | 'business' | 'none') | null;
1958
- status?: 'active' | 'archived';
1970
+ status: 'active' | 'archived';
1959
1971
  };
1960
- account?: {
1972
+ account: {
1961
1973
  /**
1962
1974
  * Social account ID
1963
1975
  */
1964
- id?: string;
1965
- platform?: string;
1966
- username?: string;
1976
+ id: string;
1977
+ platform: string;
1978
+ username: string;
1967
1979
  displayName?: string;
1968
1980
  };
1969
1981
  /**
@@ -1987,19 +1999,14 @@ export type WebhookPayloadMessage = {
1987
1999
  */
1988
2000
  callbackData?: string;
1989
2001
  } | null;
1990
- timestamp?: string;
2002
+ timestamp: string;
1991
2003
  };
1992
2004
 
1993
2005
  export type event5 = 'message.received';
1994
2006
 
1995
- export type platform3 = 'instagram' | 'facebook' | 'telegram' | 'bluesky' | 'reddit';
2007
+ export type platform3 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp';
1996
2008
 
1997
- export type direction = 'incoming';
1998
-
1999
- /**
2000
- * X/Twitter verified badge type. Only present for Twitter/X conversations.
2001
- */
2002
- export type participantVerifiedType = 'blue' | 'government' | 'business' | 'none';
2009
+ export type direction = 'incoming' | 'outgoing';
2003
2010
 
2004
2011
  export type status8 = 'active' | 'archived';
2005
2012
 
@@ -2007,24 +2014,47 @@ export type status8 = 'active' | 'archived';
2007
2014
  * Webhook payload for post events
2008
2015
  */
2009
2016
  export type WebhookPayloadPost = {
2010
- event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.recycled';
2011
- post?: {
2012
- id?: string;
2013
- content?: string;
2014
- status?: string;
2015
- scheduledFor?: string;
2017
+ /**
2018
+ * Stable webhook event ID
2019
+ */
2020
+ id: string;
2021
+ event: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
2022
+ post: {
2023
+ id: string;
2024
+ content: string;
2025
+ status: string;
2026
+ scheduledFor: string;
2016
2027
  publishedAt?: string;
2017
- platforms?: Array<{
2018
- platform?: string;
2019
- status?: string;
2028
+ platforms: Array<{
2029
+ platform: string;
2030
+ status: string;
2031
+ platformPostId?: string;
2020
2032
  publishedUrl?: string;
2021
2033
  error?: string;
2022
2034
  }>;
2023
2035
  };
2024
- timestamp?: string;
2036
+ timestamp: string;
2037
+ };
2038
+
2039
+ export type event6 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
2040
+
2041
+ /**
2042
+ * Webhook payload for test deliveries
2043
+ */
2044
+ export type WebhookPayloadTest = {
2045
+ /**
2046
+ * Stable webhook event ID
2047
+ */
2048
+ id: string;
2049
+ event: 'webhook.test';
2050
+ /**
2051
+ * Human-readable test message
2052
+ */
2053
+ message: string;
2054
+ timestamp: string;
2025
2055
  };
2026
2056
 
2027
- export type event6 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.recycled';
2057
+ export type event7 = 'webhook.test';
2028
2058
 
2029
2059
  export type YouTubeDailyViewsResponse = {
2030
2060
  success?: boolean;
@@ -3342,6 +3372,14 @@ export type UpdatePostMetadataData = {
3342
3372
  * The platform to update metadata on
3343
3373
  */
3344
3374
  platform: 'youtube';
3375
+ /**
3376
+ * YouTube video ID (required for direct mode, ignored for post-based mode)
3377
+ */
3378
+ videoId?: string;
3379
+ /**
3380
+ * Zernio social account ID (required for direct mode, ignored for post-based mode)
3381
+ */
3382
+ accountId?: string;
3345
3383
  /**
3346
3384
  * New video title (max 100 characters for YouTube)
3347
3385
  */
@@ -3364,6 +3402,9 @@ export type UpdatePostMetadataData = {
3364
3402
  privacyStatus?: 'public' | 'private' | 'unlisted';
3365
3403
  };
3366
3404
  path: {
3405
+ /**
3406
+ * Zernio post ID, or "_" when using direct video ID mode
3407
+ */
3367
3408
  postId: string;
3368
3409
  };
3369
3410
  };
@@ -3371,6 +3412,10 @@ export type UpdatePostMetadataData = {
3371
3412
  export type UpdatePostMetadataResponse = ({
3372
3413
  success?: boolean;
3373
3414
  message?: string;
3415
+ /**
3416
+ * Only present in direct video ID mode
3417
+ */
3418
+ videoId?: string;
3374
3419
  updatedFields?: Array<(string)>;
3375
3420
  });
3376
3421
 
@@ -6078,7 +6123,7 @@ export type CreateWebhookSettingsData = {
6078
6123
  /**
6079
6124
  * Events to subscribe to
6080
6125
  */
6081
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received')>;
6126
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received')>;
6082
6127
  /**
6083
6128
  * Enable or disable webhook delivery
6084
6129
  */
@@ -6122,7 +6167,7 @@ export type UpdateWebhookSettingsData = {
6122
6167
  /**
6123
6168
  * Events to subscribe to
6124
6169
  */
6125
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received')>;
6170
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received')>;
6126
6171
  /**
6127
6172
  * Enable or disable webhook delivery
6128
6173
  */
@@ -6188,7 +6233,7 @@ export type GetWebhookLogsData = {
6188
6233
  /**
6189
6234
  * Filter by event type
6190
6235
  */
6191
- event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'webhook.test';
6236
+ event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'webhook.test';
6192
6237
  /**
6193
6238
  * Maximum number of logs to return (max 100)
6194
6239
  */