@smartlyqofficial/node 0.1.4 → 0.1.6

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
@@ -184,6 +184,34 @@ var AnalyticsResource = class {
184
184
  postTimeline(postId, options) {
185
185
  return this._client.request("GET", `/analytics/posts/${encodeURIComponent(postId)}/timeline`, { options });
186
186
  }
187
+ /** Inbox volume `GET /analytics/inbox/volume` */
188
+ inboxVolume(query, options) {
189
+ return this._client.request("GET", "/analytics/inbox/volume", { query, options });
190
+ }
191
+ /** Inbox heatmap `GET /analytics/inbox/heatmap` */
192
+ inboxHeatmap(query, options) {
193
+ return this._client.request("GET", "/analytics/inbox/heatmap", { query, options });
194
+ }
195
+ /** Inbox source breakdown `GET /analytics/inbox/source-breakdown` */
196
+ inboxSourceBreakdown(query, options) {
197
+ return this._client.request("GET", "/analytics/inbox/source-breakdown", { query, options });
198
+ }
199
+ /** Inbox response time `GET /analytics/inbox/response-time` */
200
+ inboxResponseTime(query, options) {
201
+ return this._client.request("GET", "/analytics/inbox/response-time", { query, options });
202
+ }
203
+ /** Inbox top accounts `GET /analytics/inbox/top-accounts` */
204
+ inboxTopAccounts(query, options) {
205
+ return this._client.request("GET", "/analytics/inbox/top-accounts", { query, options });
206
+ }
207
+ /** Inbox conversation stats `GET /analytics/inbox/conversations` */
208
+ inboxConversations(query, options) {
209
+ return this._client.request("GET", "/analytics/inbox/conversations", { query, options });
210
+ }
211
+ /** Conversation analytics `GET /analytics/inbox/conversations/{conversation_id}` */
212
+ inboxConversationDetail(conversationId, options) {
213
+ return this._client.request("GET", `/analytics/inbox/conversations/${encodeURIComponent(conversationId)}`, { options });
214
+ }
187
215
  };
188
216
  var ArticlesResource = class {
189
217
  constructor(_client) {
@@ -223,6 +251,39 @@ var AudioResource = class {
223
251
  return this._client.request("GET", `/audio/${encodeURIComponent(audioId)}`, { options });
224
252
  }
225
253
  };
254
+ var AutomationsResource = class {
255
+ constructor(_client) {
256
+ this._client = _client;
257
+ }
258
+ /** List automations `GET /automations` */
259
+ list(query, options) {
260
+ return this._client.request("GET", "/automations", { query, options });
261
+ }
262
+ /** Get automation `GET /automations/{automation_id}` */
263
+ get(automationId, options) {
264
+ return this._client.request("GET", `/automations/${encodeURIComponent(automationId)}`, { options });
265
+ }
266
+ /** Activate automation `POST /automations/{automation_id}/activate` */
267
+ activate(automationId, options) {
268
+ return this._client.request("POST", `/automations/${encodeURIComponent(automationId)}/activate`, { options });
269
+ }
270
+ /** Pause automation `POST /automations/{automation_id}/deactivate` */
271
+ deactivate(automationId, options) {
272
+ return this._client.request("POST", `/automations/${encodeURIComponent(automationId)}/deactivate`, { options });
273
+ }
274
+ /** Trigger automation `POST /automations/{automation_id}/trigger` */
275
+ trigger(automationId, body, options) {
276
+ return this._client.request("POST", `/automations/${encodeURIComponent(automationId)}/trigger`, { body, options });
277
+ }
278
+ /** List runs `GET /automations/{automation_id}/runs` */
279
+ listRuns(automationId, query, options) {
280
+ return this._client.request("GET", `/automations/${encodeURIComponent(automationId)}/runs`, { query, options });
281
+ }
282
+ /** Get run `GET /automations/{automation_id}/runs/{run_id}` */
283
+ getRun(automationId, runId, options) {
284
+ return this._client.request("GET", `/automations/${encodeURIComponent(automationId)}/runs/${encodeURIComponent(runId)}`, { options });
285
+ }
286
+ };
226
287
  var ChatbotsResource = class {
227
288
  constructor(_client) {
228
289
  this._client = _client;
@@ -302,6 +363,19 @@ var ContentResource = class {
302
363
  return this._client.request("POST", "/content/caption", { body, options });
303
364
  }
304
365
  };
366
+ var CrmResource = class {
367
+ constructor(_client) {
368
+ this._client = _client;
369
+ }
370
+ /** Delete contact `DELETE /contacts/{id}` */
371
+ deleteContact(id, options) {
372
+ return this._client.request("DELETE", `/contacts/${encodeURIComponent(id)}`, { options });
373
+ }
374
+ /** Bulk import contacts `POST /contacts/bulk` */
375
+ bulkImportContacts(body, options) {
376
+ return this._client.request("POST", "/contacts/bulk", { body, options });
377
+ }
378
+ };
305
379
  var ContactsResource = class {
306
380
  constructor(_client) {
307
381
  this._client = _client;
@@ -547,6 +621,27 @@ var ProfilesResource = class {
547
621
  return this._client.request("GET", "/me/account-billing", { options });
548
622
  }
549
623
  };
624
+ var ReviewsResource = class {
625
+ constructor(_client) {
626
+ this._client = _client;
627
+ }
628
+ /** List reviews `GET /reviews` */
629
+ list(query, options) {
630
+ return this._client.request("GET", "/reviews", { query, options });
631
+ }
632
+ /** Reply to review `POST /reviews/{review_id}/reply` */
633
+ replyTo(reviewId, body, options) {
634
+ return this._client.request("POST", `/reviews/${encodeURIComponent(reviewId)}/reply`, { body, options });
635
+ }
636
+ /** Delete review reply `DELETE /reviews/{review_id}/reply` */
637
+ deleteReply(reviewId, options) {
638
+ return this._client.request("DELETE", `/reviews/${encodeURIComponent(reviewId)}/reply`, { options });
639
+ }
640
+ /** Sync reviews `POST /reviews/sync` */
641
+ sync(body, options) {
642
+ return this._client.request("POST", "/reviews/sync", { body, options });
643
+ }
644
+ };
550
645
  var SeoResource = class {
551
646
  constructor(_client) {
552
647
  this._client = _client;
@@ -673,6 +768,10 @@ var SocialResource = class {
673
768
  updateAccount(accountId, body, options) {
674
769
  return this._client.request("PATCH", `/social/accounts/${encodeURIComponent(accountId)}`, { body, options });
675
770
  }
771
+ /** Disconnect a social account `DELETE /social/accounts/{account_id}` */
772
+ disconnectAccount(accountId, options) {
773
+ return this._client.request("DELETE", `/social/accounts/${encodeURIComponent(accountId)}`, { options });
774
+ }
676
775
  /** Account health `GET /social/accounts/{account_id}/health` */
677
776
  getAccountHealth(accountId, options) {
678
777
  return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/health`, { options });
@@ -789,6 +888,74 @@ var SocialResource = class {
789
888
  deleteAccountGroup(groupId, options) {
790
889
  return this._client.request("DELETE", `/social/account-groups/${encodeURIComponent(groupId)}`, { options });
791
890
  }
891
+ /** Get conversation `GET /social/conversations/{conversation_id}` */
892
+ getConversation(conversationId, options) {
893
+ return this._client.request("GET", `/social/conversations/${encodeURIComponent(conversationId)}`, { options });
894
+ }
895
+ /** Archive / reopen conversation `PATCH /social/conversations/{conversation_id}` */
896
+ updateConversation(conversationId, body, options) {
897
+ return this._client.request("PATCH", `/social/conversations/${encodeURIComponent(conversationId)}`, { body, options });
898
+ }
899
+ /** Search conversations `GET /social/conversations/search` */
900
+ searchConversations(query, options) {
901
+ return this._client.request("GET", "/social/conversations/search", { query, options });
902
+ }
903
+ /** Pinterest boards `GET /social/accounts/{account_id}/pinterest/boards` */
904
+ pinterestBoards(accountId, options) {
905
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/pinterest/boards`, { options });
906
+ }
907
+ /** YouTube playlists `GET /social/accounts/{account_id}/youtube/playlists` */
908
+ youtubePlaylists(accountId, options) {
909
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/youtube/playlists`, { options });
910
+ }
911
+ /** Instagram publishing limit `GET /social/accounts/{account_id}/instagram/publishing-limit` */
912
+ instagramPublishingLimit(accountId, options) {
913
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/instagram/publishing-limit`, { options });
914
+ }
915
+ /** Google Business performance `GET /social/accounts/{account_id}/gmb/performance` */
916
+ gmbPerformance(accountId, query, options) {
917
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/gmb/performance`, { query, options });
918
+ }
919
+ /** Google Business search keywords `GET /social/accounts/{account_id}/gmb/search-keywords` */
920
+ gmbSearchKeywords(accountId, query, options) {
921
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/gmb/search-keywords`, { query, options });
922
+ }
923
+ /** Reddit search `GET /social/accounts/{account_id}/reddit/search` */
924
+ redditSearch(accountId, query, options) {
925
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/reddit/search`, { query, options });
926
+ }
927
+ /** Reddit feed `GET /social/accounts/{account_id}/reddit/feed` */
928
+ redditFeed(accountId, query, options) {
929
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/reddit/feed`, { query, options });
930
+ }
931
+ /** Subscribed subreddits `GET /social/accounts/{account_id}/reddit/subreddits` */
932
+ redditSubreddits(accountId, options) {
933
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/reddit/subreddits`, { options });
934
+ }
935
+ /** Subreddit rules `GET /social/accounts/{account_id}/reddit/subreddits/{subreddit}/rules` */
936
+ redditSubredditRules(accountId, subreddit, options) {
937
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/reddit/subreddits/${encodeURIComponent(subreddit)}/rules`, { options });
938
+ }
939
+ /** Instagram stories `GET /social/accounts/{account_id}/instagram/stories` */
940
+ instagramStories(accountId, options) {
941
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/instagram/stories`, { options });
942
+ }
943
+ /** Facebook post reactions `GET /social/accounts/{account_id}/facebook/post-reactions` */
944
+ facebookPostReactions(accountId, query, options) {
945
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/facebook/post-reactions`, { query, options });
946
+ }
947
+ /** Instagram story insights `GET /social/accounts/{account_id}/instagram/stories/{story_id}/insights` */
948
+ instagramStoryInsights(accountId, storyId, query, options) {
949
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/instagram/stories/${encodeURIComponent(storyId)}/insights`, { query, options });
950
+ }
951
+ /** Retweet on X `POST /social/accounts/{account_id}/x/retweets` */
952
+ xRetweet(accountId, body, options) {
953
+ return this._client.request("POST", `/social/accounts/${encodeURIComponent(accountId)}/x/retweets`, { body, options });
954
+ }
955
+ /** Undo retweet `DELETE /social/accounts/{account_id}/x/retweets/{tweet_id}` */
956
+ xUnretweet(accountId, tweetId, options) {
957
+ return this._client.request("DELETE", `/social/accounts/${encodeURIComponent(accountId)}/x/retweets/${encodeURIComponent(tweetId)}`, { options });
958
+ }
792
959
  };
793
960
  var UrlsResource = class {
794
961
  constructor(_client) {
@@ -945,9 +1112,11 @@ function createResources(client) {
945
1112
  analytics: new AnalyticsResource(client),
946
1113
  articles: new ArticlesResource(client),
947
1114
  audio: new AudioResource(client),
1115
+ automations: new AutomationsResource(client),
948
1116
  chatbots: new ChatbotsResource(client),
949
1117
  comments: new CommentsResource(client),
950
1118
  content: new ContentResource(client),
1119
+ crm: new CrmResource(client),
951
1120
  contacts: new ContactsResource(client),
952
1121
  customFields: new CustomFieldsResource(client),
953
1122
  opportunities: new OpportunitiesResource(client),
@@ -957,6 +1126,7 @@ function createResources(client) {
957
1126
  media: new MediaResource(client),
958
1127
  presentations: new PresentationsResource(client),
959
1128
  profiles: new ProfilesResource(client),
1129
+ reviews: new ReviewsResource(client),
960
1130
  seo: new SeoResource(client),
961
1131
  shorts: new ShortsResource(client),
962
1132
  social: new SocialResource(client),
@@ -972,31 +1142,7 @@ var SmartlyQ = class {
972
1142
  constructor(options = {}) {
973
1143
  const resolved = typeof options === "string" ? { apiKey: options } : options;
974
1144
  this.core = new CoreClient(resolved);
975
- const resources = createResources(this.core);
976
- this.account = resources.account;
977
- this.analytics = resources.analytics;
978
- this.articles = resources.articles;
979
- this.audio = resources.audio;
980
- this.captain = resources.captain;
981
- this.chatbots = resources.chatbots;
982
- this.comments = resources.comments;
983
- this.contacts = resources.contacts;
984
- this.content = resources.content;
985
- this.customFields = resources.customFields;
986
- this.images = resources.images;
987
- this.jobs = resources.jobs;
988
- this.media = resources.media;
989
- this.messages = resources.messages;
990
- this.opportunities = resources.opportunities;
991
- this.presentations = resources.presentations;
992
- this.profiles = resources.profiles;
993
- this.seo = resources.seo;
994
- this.shorts = resources.shorts;
995
- this.social = resources.social;
996
- this.urls = resources.urls;
997
- this.videos = resources.videos;
998
- this.webhooks = resources.webhooks;
999
- this.workspaces = resources.workspaces;
1145
+ Object.assign(this, createResources(this.core));
1000
1146
  }
1001
1147
  };
1002
1148
  var index_default = SmartlyQ;
@@ -1005,12 +1151,14 @@ export {
1005
1151
  AnalyticsResource,
1006
1152
  ArticlesResource,
1007
1153
  AudioResource,
1154
+ AutomationsResource,
1008
1155
  CaptainResource,
1009
1156
  ChatbotsResource,
1010
1157
  CommentsResource,
1011
1158
  ContactsResource,
1012
1159
  ContentResource,
1013
1160
  CoreClient,
1161
+ CrmResource,
1014
1162
  CustomFieldsResource,
1015
1163
  ImagesResource,
1016
1164
  JobsResource,
@@ -1019,6 +1167,7 @@ export {
1019
1167
  OpportunitiesResource,
1020
1168
  PresentationsResource,
1021
1169
  ProfilesResource,
1170
+ ReviewsResource,
1022
1171
  SeoResource,
1023
1172
  ShortsResource,
1024
1173
  SmartlyQ,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartlyqofficial/node",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Official Node.js SDK for the SmartlyQ API - social posting, AI content generation, SEO, CRM, and more.",
5
5
  "keywords": [
6
6
  "smartlyq",