@smartlyqofficial/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
@@ -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,23 @@ 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
+ /** Sync reviews `POST /reviews/sync` */
637
+ sync(body, options) {
638
+ return this._client.request("POST", "/reviews/sync", { body, options });
639
+ }
640
+ };
550
641
  var SeoResource = class {
551
642
  constructor(_client) {
552
643
  this._client = _client;
@@ -673,6 +764,10 @@ var SocialResource = class {
673
764
  updateAccount(accountId, body, options) {
674
765
  return this._client.request("PATCH", `/social/accounts/${encodeURIComponent(accountId)}`, { body, options });
675
766
  }
767
+ /** Disconnect a social account `DELETE /social/accounts/{account_id}` */
768
+ disconnectAccount(accountId, options) {
769
+ return this._client.request("DELETE", `/social/accounts/${encodeURIComponent(accountId)}`, { options });
770
+ }
676
771
  /** Account health `GET /social/accounts/{account_id}/health` */
677
772
  getAccountHealth(accountId, options) {
678
773
  return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/health`, { options });
@@ -789,6 +884,62 @@ var SocialResource = class {
789
884
  deleteAccountGroup(groupId, options) {
790
885
  return this._client.request("DELETE", `/social/account-groups/${encodeURIComponent(groupId)}`, { options });
791
886
  }
887
+ /** Get conversation `GET /social/conversations/{conversation_id}` */
888
+ getConversation(conversationId, options) {
889
+ return this._client.request("GET", `/social/conversations/${encodeURIComponent(conversationId)}`, { options });
890
+ }
891
+ /** Archive / reopen conversation `PATCH /social/conversations/{conversation_id}` */
892
+ updateConversation(conversationId, body, options) {
893
+ return this._client.request("PATCH", `/social/conversations/${encodeURIComponent(conversationId)}`, { body, options });
894
+ }
895
+ /** Search conversations `GET /social/conversations/search` */
896
+ searchConversations(query, options) {
897
+ return this._client.request("GET", "/social/conversations/search", { query, options });
898
+ }
899
+ /** Pinterest boards `GET /social/accounts/{account_id}/pinterest/boards` */
900
+ pinterestBoards(accountId, options) {
901
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/pinterest/boards`, { options });
902
+ }
903
+ /** YouTube playlists `GET /social/accounts/{account_id}/youtube/playlists` */
904
+ youtubePlaylists(accountId, options) {
905
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/youtube/playlists`, { options });
906
+ }
907
+ /** Instagram publishing limit `GET /social/accounts/{account_id}/instagram/publishing-limit` */
908
+ instagramPublishingLimit(accountId, options) {
909
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/instagram/publishing-limit`, { options });
910
+ }
911
+ /** Google Business performance `GET /social/accounts/{account_id}/gmb/performance` */
912
+ gmbPerformance(accountId, query, options) {
913
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/gmb/performance`, { query, options });
914
+ }
915
+ /** Google Business search keywords `GET /social/accounts/{account_id}/gmb/search-keywords` */
916
+ gmbSearchKeywords(accountId, query, options) {
917
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/gmb/search-keywords`, { query, options });
918
+ }
919
+ /** Reddit search `GET /social/accounts/{account_id}/reddit/search` */
920
+ redditSearch(accountId, query, options) {
921
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/reddit/search`, { query, options });
922
+ }
923
+ /** Reddit feed `GET /social/accounts/{account_id}/reddit/feed` */
924
+ redditFeed(accountId, query, options) {
925
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/reddit/feed`, { query, options });
926
+ }
927
+ /** Subscribed subreddits `GET /social/accounts/{account_id}/reddit/subreddits` */
928
+ redditSubreddits(accountId, options) {
929
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/reddit/subreddits`, { options });
930
+ }
931
+ /** Subreddit rules `GET /social/accounts/{account_id}/reddit/subreddits/{subreddit}/rules` */
932
+ redditSubredditRules(accountId, subreddit, options) {
933
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/reddit/subreddits/${encodeURIComponent(subreddit)}/rules`, { options });
934
+ }
935
+ /** Instagram stories `GET /social/accounts/{account_id}/instagram/stories` */
936
+ instagramStories(accountId, options) {
937
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/instagram/stories`, { options });
938
+ }
939
+ /** Facebook post reactions `GET /social/accounts/{account_id}/facebook/post-reactions` */
940
+ facebookPostReactions(accountId, query, options) {
941
+ return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/facebook/post-reactions`, { query, options });
942
+ }
792
943
  };
793
944
  var UrlsResource = class {
794
945
  constructor(_client) {
@@ -945,9 +1096,11 @@ function createResources(client) {
945
1096
  analytics: new AnalyticsResource(client),
946
1097
  articles: new ArticlesResource(client),
947
1098
  audio: new AudioResource(client),
1099
+ automations: new AutomationsResource(client),
948
1100
  chatbots: new ChatbotsResource(client),
949
1101
  comments: new CommentsResource(client),
950
1102
  content: new ContentResource(client),
1103
+ crm: new CrmResource(client),
951
1104
  contacts: new ContactsResource(client),
952
1105
  customFields: new CustomFieldsResource(client),
953
1106
  opportunities: new OpportunitiesResource(client),
@@ -957,6 +1110,7 @@ function createResources(client) {
957
1110
  media: new MediaResource(client),
958
1111
  presentations: new PresentationsResource(client),
959
1112
  profiles: new ProfilesResource(client),
1113
+ reviews: new ReviewsResource(client),
960
1114
  seo: new SeoResource(client),
961
1115
  shorts: new ShortsResource(client),
962
1116
  social: new SocialResource(client),
@@ -972,31 +1126,7 @@ var SmartlyQ = class {
972
1126
  constructor(options = {}) {
973
1127
  const resolved = typeof options === "string" ? { apiKey: options } : options;
974
1128
  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;
1129
+ Object.assign(this, createResources(this.core));
1000
1130
  }
1001
1131
  };
1002
1132
  var index_default = SmartlyQ;
@@ -1005,12 +1135,14 @@ export {
1005
1135
  AnalyticsResource,
1006
1136
  ArticlesResource,
1007
1137
  AudioResource,
1138
+ AutomationsResource,
1008
1139
  CaptainResource,
1009
1140
  ChatbotsResource,
1010
1141
  CommentsResource,
1011
1142
  ContactsResource,
1012
1143
  ContentResource,
1013
1144
  CoreClient,
1145
+ CrmResource,
1014
1146
  CustomFieldsResource,
1015
1147
  ImagesResource,
1016
1148
  JobsResource,
@@ -1019,6 +1151,7 @@ export {
1019
1151
  OpportunitiesResource,
1020
1152
  PresentationsResource,
1021
1153
  ProfilesResource,
1154
+ ReviewsResource,
1022
1155
  SeoResource,
1023
1156
  ShortsResource,
1024
1157
  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.5",
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",