@getlatedev/node 0.1.4 → 0.1.5

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.
package/dist/index.js CHANGED
@@ -643,6 +643,12 @@ var completeTelegramConnect = (options) => {
643
643
  url: "/v1/connect/telegram"
644
644
  });
645
645
  };
646
+ var getFacebookPages = (options) => {
647
+ return (options?.client ?? client).get({
648
+ ...options,
649
+ url: "/v1/accounts/{accountId}/facebook-page"
650
+ });
651
+ };
646
652
  var updateFacebookPage = (options) => {
647
653
  return (options?.client ?? client).put({
648
654
  ...options,
@@ -691,6 +697,18 @@ var updatePinterestBoards = (options) => {
691
697
  url: "/v1/accounts/{accountId}/pinterest-boards"
692
698
  });
693
699
  };
700
+ var getGmbLocations = (options) => {
701
+ return (options?.client ?? client).get({
702
+ ...options,
703
+ url: "/v1/accounts/{accountId}/gmb-locations"
704
+ });
705
+ };
706
+ var updateGmbLocation = (options) => {
707
+ return (options?.client ?? client).put({
708
+ ...options,
709
+ url: "/v1/accounts/{accountId}/gmb-locations"
710
+ });
711
+ };
694
712
  var getRedditSubreddits = (options) => {
695
713
  return (options?.client ?? client).get({
696
714
  ...options,
@@ -793,6 +811,102 @@ var getPostLogs = (options) => {
793
811
  url: "/v1/posts/{postId}/logs"
794
812
  });
795
813
  };
814
+ var listInboxConversations = (options) => {
815
+ return (options?.client ?? client).get({
816
+ ...options,
817
+ url: "/v1/inbox/conversations"
818
+ });
819
+ };
820
+ var getInboxConversation = (options) => {
821
+ return (options?.client ?? client).get({
822
+ ...options,
823
+ url: "/v1/inbox/conversations/{conversationId}"
824
+ });
825
+ };
826
+ var updateInboxConversation = (options) => {
827
+ return (options?.client ?? client).put({
828
+ ...options,
829
+ url: "/v1/inbox/conversations/{conversationId}"
830
+ });
831
+ };
832
+ var getInboxConversationMessages = (options) => {
833
+ return (options?.client ?? client).get({
834
+ ...options,
835
+ url: "/v1/inbox/conversations/{conversationId}/messages"
836
+ });
837
+ };
838
+ var sendInboxMessage = (options) => {
839
+ return (options?.client ?? client).post({
840
+ ...options,
841
+ url: "/v1/inbox/conversations/{conversationId}/messages"
842
+ });
843
+ };
844
+ var listInboxComments = (options) => {
845
+ return (options?.client ?? client).get({
846
+ ...options,
847
+ url: "/v1/inbox/comments"
848
+ });
849
+ };
850
+ var getInboxPostComments = (options) => {
851
+ return (options?.client ?? client).get({
852
+ ...options,
853
+ url: "/v1/inbox/comments/{postId}"
854
+ });
855
+ };
856
+ var replyToInboxPost = (options) => {
857
+ return (options?.client ?? client).post({
858
+ ...options,
859
+ url: "/v1/inbox/comments/{postId}"
860
+ });
861
+ };
862
+ var deleteInboxComment = (options) => {
863
+ return (options?.client ?? client).delete({
864
+ ...options,
865
+ url: "/v1/inbox/comments/{postId}"
866
+ });
867
+ };
868
+ var hideInboxComment = (options) => {
869
+ return (options?.client ?? client).post({
870
+ ...options,
871
+ url: "/v1/inbox/comments/{postId}/{commentId}/hide"
872
+ });
873
+ };
874
+ var unhideInboxComment = (options) => {
875
+ return (options?.client ?? client).delete({
876
+ ...options,
877
+ url: "/v1/inbox/comments/{postId}/{commentId}/hide"
878
+ });
879
+ };
880
+ var likeInboxComment = (options) => {
881
+ return (options?.client ?? client).post({
882
+ ...options,
883
+ url: "/v1/inbox/comments/{postId}/{commentId}/like"
884
+ });
885
+ };
886
+ var unlikeInboxComment = (options) => {
887
+ return (options?.client ?? client).delete({
888
+ ...options,
889
+ url: "/v1/inbox/comments/{postId}/{commentId}/like"
890
+ });
891
+ };
892
+ var listInboxReviews = (options) => {
893
+ return (options?.client ?? client).get({
894
+ ...options,
895
+ url: "/v1/inbox/reviews"
896
+ });
897
+ };
898
+ var replyToInboxReview = (options) => {
899
+ return (options?.client ?? client).post({
900
+ ...options,
901
+ url: "/v1/inbox/reviews/{reviewId}/reply"
902
+ });
903
+ };
904
+ var deleteInboxReviewReply = (options) => {
905
+ return (options?.client ?? client).delete({
906
+ ...options,
907
+ url: "/v1/inbox/reviews/{reviewId}/reply"
908
+ });
909
+ };
796
910
 
797
911
  // src/errors.ts
798
912
  var LateApiError = class _LateApiError extends Error {
@@ -1009,11 +1123,14 @@ var Late = class {
1009
1123
  getConnectUrl,
1010
1124
  handleOAuthCallback,
1011
1125
  getPendingOAuthData,
1126
+ getFacebookPages,
1012
1127
  updateFacebookPage,
1013
1128
  getLinkedInOrganizations,
1014
1129
  updateLinkedInOrganization,
1015
1130
  getPinterestBoards,
1016
1131
  updatePinterestBoards,
1132
+ getGmbLocations,
1133
+ updateGmbLocation,
1017
1134
  getRedditSubreddits,
1018
1135
  updateRedditSubreddits,
1019
1136
  facebook: {
@@ -1075,6 +1192,27 @@ var Late = class {
1075
1192
  getLog,
1076
1193
  getPostLogs
1077
1194
  };
1195
+ /**
1196
+ * inbox API
1197
+ */
1198
+ this.inbox = {
1199
+ listInboxConversations,
1200
+ getInboxConversation,
1201
+ updateInboxConversation,
1202
+ getInboxConversationMessages,
1203
+ sendInboxMessage,
1204
+ listInboxComments,
1205
+ getInboxPostComments,
1206
+ replyToInboxPost,
1207
+ deleteInboxComment,
1208
+ hideInboxComment,
1209
+ unhideInboxComment,
1210
+ likeInboxComment,
1211
+ unlikeInboxComment,
1212
+ listInboxReviews,
1213
+ replyToInboxReview,
1214
+ deleteInboxReviewReply
1215
+ };
1078
1216
  const apiKey = options.apiKey ?? process.env["LATE_API_KEY"];
1079
1217
  if (!apiKey) {
1080
1218
  throw new LateApiError(
package/dist/index.mjs CHANGED
@@ -614,6 +614,12 @@ var completeTelegramConnect = (options) => {
614
614
  url: "/v1/connect/telegram"
615
615
  });
616
616
  };
617
+ var getFacebookPages = (options) => {
618
+ return (options?.client ?? client).get({
619
+ ...options,
620
+ url: "/v1/accounts/{accountId}/facebook-page"
621
+ });
622
+ };
617
623
  var updateFacebookPage = (options) => {
618
624
  return (options?.client ?? client).put({
619
625
  ...options,
@@ -662,6 +668,18 @@ var updatePinterestBoards = (options) => {
662
668
  url: "/v1/accounts/{accountId}/pinterest-boards"
663
669
  });
664
670
  };
671
+ var getGmbLocations = (options) => {
672
+ return (options?.client ?? client).get({
673
+ ...options,
674
+ url: "/v1/accounts/{accountId}/gmb-locations"
675
+ });
676
+ };
677
+ var updateGmbLocation = (options) => {
678
+ return (options?.client ?? client).put({
679
+ ...options,
680
+ url: "/v1/accounts/{accountId}/gmb-locations"
681
+ });
682
+ };
665
683
  var getRedditSubreddits = (options) => {
666
684
  return (options?.client ?? client).get({
667
685
  ...options,
@@ -764,6 +782,102 @@ var getPostLogs = (options) => {
764
782
  url: "/v1/posts/{postId}/logs"
765
783
  });
766
784
  };
785
+ var listInboxConversations = (options) => {
786
+ return (options?.client ?? client).get({
787
+ ...options,
788
+ url: "/v1/inbox/conversations"
789
+ });
790
+ };
791
+ var getInboxConversation = (options) => {
792
+ return (options?.client ?? client).get({
793
+ ...options,
794
+ url: "/v1/inbox/conversations/{conversationId}"
795
+ });
796
+ };
797
+ var updateInboxConversation = (options) => {
798
+ return (options?.client ?? client).put({
799
+ ...options,
800
+ url: "/v1/inbox/conversations/{conversationId}"
801
+ });
802
+ };
803
+ var getInboxConversationMessages = (options) => {
804
+ return (options?.client ?? client).get({
805
+ ...options,
806
+ url: "/v1/inbox/conversations/{conversationId}/messages"
807
+ });
808
+ };
809
+ var sendInboxMessage = (options) => {
810
+ return (options?.client ?? client).post({
811
+ ...options,
812
+ url: "/v1/inbox/conversations/{conversationId}/messages"
813
+ });
814
+ };
815
+ var listInboxComments = (options) => {
816
+ return (options?.client ?? client).get({
817
+ ...options,
818
+ url: "/v1/inbox/comments"
819
+ });
820
+ };
821
+ var getInboxPostComments = (options) => {
822
+ return (options?.client ?? client).get({
823
+ ...options,
824
+ url: "/v1/inbox/comments/{postId}"
825
+ });
826
+ };
827
+ var replyToInboxPost = (options) => {
828
+ return (options?.client ?? client).post({
829
+ ...options,
830
+ url: "/v1/inbox/comments/{postId}"
831
+ });
832
+ };
833
+ var deleteInboxComment = (options) => {
834
+ return (options?.client ?? client).delete({
835
+ ...options,
836
+ url: "/v1/inbox/comments/{postId}"
837
+ });
838
+ };
839
+ var hideInboxComment = (options) => {
840
+ return (options?.client ?? client).post({
841
+ ...options,
842
+ url: "/v1/inbox/comments/{postId}/{commentId}/hide"
843
+ });
844
+ };
845
+ var unhideInboxComment = (options) => {
846
+ return (options?.client ?? client).delete({
847
+ ...options,
848
+ url: "/v1/inbox/comments/{postId}/{commentId}/hide"
849
+ });
850
+ };
851
+ var likeInboxComment = (options) => {
852
+ return (options?.client ?? client).post({
853
+ ...options,
854
+ url: "/v1/inbox/comments/{postId}/{commentId}/like"
855
+ });
856
+ };
857
+ var unlikeInboxComment = (options) => {
858
+ return (options?.client ?? client).delete({
859
+ ...options,
860
+ url: "/v1/inbox/comments/{postId}/{commentId}/like"
861
+ });
862
+ };
863
+ var listInboxReviews = (options) => {
864
+ return (options?.client ?? client).get({
865
+ ...options,
866
+ url: "/v1/inbox/reviews"
867
+ });
868
+ };
869
+ var replyToInboxReview = (options) => {
870
+ return (options?.client ?? client).post({
871
+ ...options,
872
+ url: "/v1/inbox/reviews/{reviewId}/reply"
873
+ });
874
+ };
875
+ var deleteInboxReviewReply = (options) => {
876
+ return (options?.client ?? client).delete({
877
+ ...options,
878
+ url: "/v1/inbox/reviews/{reviewId}/reply"
879
+ });
880
+ };
767
881
 
768
882
  // src/errors.ts
769
883
  var LateApiError = class _LateApiError extends Error {
@@ -980,11 +1094,14 @@ var Late = class {
980
1094
  getConnectUrl,
981
1095
  handleOAuthCallback,
982
1096
  getPendingOAuthData,
1097
+ getFacebookPages,
983
1098
  updateFacebookPage,
984
1099
  getLinkedInOrganizations,
985
1100
  updateLinkedInOrganization,
986
1101
  getPinterestBoards,
987
1102
  updatePinterestBoards,
1103
+ getGmbLocations,
1104
+ updateGmbLocation,
988
1105
  getRedditSubreddits,
989
1106
  updateRedditSubreddits,
990
1107
  facebook: {
@@ -1046,6 +1163,27 @@ var Late = class {
1046
1163
  getLog,
1047
1164
  getPostLogs
1048
1165
  };
1166
+ /**
1167
+ * inbox API
1168
+ */
1169
+ this.inbox = {
1170
+ listInboxConversations,
1171
+ getInboxConversation,
1172
+ updateInboxConversation,
1173
+ getInboxConversationMessages,
1174
+ sendInboxMessage,
1175
+ listInboxComments,
1176
+ getInboxPostComments,
1177
+ replyToInboxPost,
1178
+ deleteInboxComment,
1179
+ hideInboxComment,
1180
+ unhideInboxComment,
1181
+ likeInboxComment,
1182
+ unlikeInboxComment,
1183
+ listInboxReviews,
1184
+ replyToInboxReview,
1185
+ deleteInboxReviewReply
1186
+ };
1049
1187
  const apiKey = options.apiKey ?? process.env["LATE_API_KEY"];
1050
1188
  if (!apiKey) {
1051
1189
  throw new LateApiError(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "The official Node.js library for the Late API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/client.ts CHANGED
@@ -14,6 +14,8 @@ import {
14
14
  deleteAccount,
15
15
  deleteAccountGroup,
16
16
  deleteApiKey,
17
+ deleteInboxComment,
18
+ deleteInboxReviewReply,
17
19
  deletePost,
18
20
  deleteProfile,
19
21
  deleteQueueSlot,
@@ -29,8 +31,13 @@ import {
29
31
  getAllAccountsHealth,
30
32
  getAnalytics,
31
33
  getConnectUrl,
34
+ getFacebookPages,
32
35
  getFollowerStats,
36
+ getGmbLocations,
33
37
  getGoogleBusinessReviews,
38
+ getInboxConversation,
39
+ getInboxConversationMessages,
40
+ getInboxPostComments,
34
41
  getLinkedInAggregateAnalytics,
35
42
  getLinkedInMentions,
36
43
  getLinkedInOrganizations,
@@ -53,12 +60,17 @@ import {
53
60
  getYouTubeDailyViews,
54
61
  getYouTubeTranscript,
55
62
  handleOAuthCallback,
63
+ hideInboxComment,
56
64
  initiateTelegramConnect,
65
+ likeInboxComment,
57
66
  listAccountGroups,
58
67
  listAccounts,
59
68
  listApiKeys,
60
69
  listFacebookPages,
61
70
  listGoogleBusinessLocations,
71
+ listInboxComments,
72
+ listInboxConversations,
73
+ listInboxReviews,
62
74
  listLinkedInOrganizations,
63
75
  listLogs,
64
76
  listPinterestBoardsForSelection,
@@ -68,6 +80,8 @@ import {
68
80
  listSnapchatProfiles,
69
81
  listUsers,
70
82
  previewQueue,
83
+ replyToInboxPost,
84
+ replyToInboxReview,
71
85
  retryPost,
72
86
  searchReddit,
73
87
  selectFacebookPage,
@@ -75,10 +89,15 @@ import {
75
89
  selectLinkedInOrganization,
76
90
  selectPinterestBoard,
77
91
  selectSnapchatProfile,
92
+ sendInboxMessage,
78
93
  testWebhook,
94
+ unhideInboxComment,
95
+ unlikeInboxComment,
79
96
  updateAccount,
80
97
  updateAccountGroup,
81
98
  updateFacebookPage,
99
+ updateGmbLocation,
100
+ updateInboxConversation,
82
101
  updateLinkedInOrganization,
83
102
  updatePinterestBoards,
84
103
  updatePost,
@@ -276,11 +295,14 @@ export class Late {
276
295
  getConnectUrl: getConnectUrl,
277
296
  handleOAuthCallback: handleOAuthCallback,
278
297
  getPendingOAuthData: getPendingOAuthData,
298
+ getFacebookPages: getFacebookPages,
279
299
  updateFacebookPage: updateFacebookPage,
280
300
  getLinkedInOrganizations: getLinkedInOrganizations,
281
301
  updateLinkedInOrganization: updateLinkedInOrganization,
282
302
  getPinterestBoards: getPinterestBoards,
283
303
  updatePinterestBoards: updatePinterestBoards,
304
+ getGmbLocations: getGmbLocations,
305
+ updateGmbLocation: updateGmbLocation,
284
306
  getRedditSubreddits: getRedditSubreddits,
285
307
  updateRedditSubreddits: updateRedditSubreddits,
286
308
  facebook: {
@@ -346,6 +368,28 @@ export class Late {
346
368
  getPostLogs: getPostLogs,
347
369
  };
348
370
 
371
+ /**
372
+ * inbox API
373
+ */
374
+ inbox = {
375
+ listInboxConversations: listInboxConversations,
376
+ getInboxConversation: getInboxConversation,
377
+ updateInboxConversation: updateInboxConversation,
378
+ getInboxConversationMessages: getInboxConversationMessages,
379
+ sendInboxMessage: sendInboxMessage,
380
+ listInboxComments: listInboxComments,
381
+ getInboxPostComments: getInboxPostComments,
382
+ replyToInboxPost: replyToInboxPost,
383
+ deleteInboxComment: deleteInboxComment,
384
+ hideInboxComment: hideInboxComment,
385
+ unhideInboxComment: unhideInboxComment,
386
+ likeInboxComment: likeInboxComment,
387
+ unlikeInboxComment: unlikeInboxComment,
388
+ listInboxReviews: listInboxReviews,
389
+ replyToInboxReview: replyToInboxReview,
390
+ deleteInboxReviewReply: deleteInboxReviewReply,
391
+ };
392
+
349
393
  /**
350
394
  * Create a new Late API client.
351
395
  *