@smartlyqofficial/node 0.1.3 → 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
@@ -164,6 +164,54 @@ var AnalyticsResource = class {
164
164
  getAccount(accountId, query, options) {
165
165
  return this._client.request("GET", `/analytics/accounts/${encodeURIComponent(accountId)}`, { query, options });
166
166
  }
167
+ /** Daily metrics `GET /analytics/daily-metrics` */
168
+ dailyMetrics(query, options) {
169
+ return this._client.request("GET", "/analytics/daily-metrics", { query, options });
170
+ }
171
+ /** Best time to post `GET /analytics/best-time` */
172
+ bestTime(query, options) {
173
+ return this._client.request("GET", "/analytics/best-time", { query, options });
174
+ }
175
+ /** Content decay `GET /analytics/content-decay` */
176
+ contentDecay(query, options) {
177
+ return this._client.request("GET", "/analytics/content-decay", { query, options });
178
+ }
179
+ /** Posting frequency vs engagement `GET /analytics/posting-frequency` */
180
+ postingFrequency(query, options) {
181
+ return this._client.request("GET", "/analytics/posting-frequency", { query, options });
182
+ }
183
+ /** Post metric timeline `GET /analytics/posts/{post_id}/timeline` */
184
+ postTimeline(postId, options) {
185
+ return this._client.request("GET", `/analytics/posts/${encodeURIComponent(postId)}/timeline`, { options });
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
+ }
167
215
  };
168
216
  var ArticlesResource = class {
169
217
  constructor(_client) {
@@ -203,6 +251,39 @@ var AudioResource = class {
203
251
  return this._client.request("GET", `/audio/${encodeURIComponent(audioId)}`, { options });
204
252
  }
205
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
+ };
206
287
  var ChatbotsResource = class {
207
288
  constructor(_client) {
208
289
  this._client = _client;
@@ -282,6 +363,19 @@ var ContentResource = class {
282
363
  return this._client.request("POST", "/content/caption", { body, options });
283
364
  }
284
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
+ };
285
379
  var ContactsResource = class {
286
380
  constructor(_client) {
287
381
  this._client = _client;
@@ -527,6 +621,23 @@ var ProfilesResource = class {
527
621
  return this._client.request("GET", "/me/account-billing", { options });
528
622
  }
529
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
+ };
530
641
  var SeoResource = class {
531
642
  constructor(_client) {
532
643
  this._client = _client;
@@ -653,6 +764,10 @@ var SocialResource = class {
653
764
  updateAccount(accountId, body, options) {
654
765
  return this._client.request("PATCH", `/social/accounts/${encodeURIComponent(accountId)}`, { body, options });
655
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
+ }
656
771
  /** Account health `GET /social/accounts/{account_id}/health` */
657
772
  getAccountHealth(accountId, options) {
658
773
  return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/health`, { options });
@@ -769,6 +884,62 @@ var SocialResource = class {
769
884
  deleteAccountGroup(groupId, options) {
770
885
  return this._client.request("DELETE", `/social/account-groups/${encodeURIComponent(groupId)}`, { options });
771
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
+ }
772
943
  };
773
944
  var UrlsResource = class {
774
945
  constructor(_client) {
@@ -925,9 +1096,11 @@ function createResources(client) {
925
1096
  analytics: new AnalyticsResource(client),
926
1097
  articles: new ArticlesResource(client),
927
1098
  audio: new AudioResource(client),
1099
+ automations: new AutomationsResource(client),
928
1100
  chatbots: new ChatbotsResource(client),
929
1101
  comments: new CommentsResource(client),
930
1102
  content: new ContentResource(client),
1103
+ crm: new CrmResource(client),
931
1104
  contacts: new ContactsResource(client),
932
1105
  customFields: new CustomFieldsResource(client),
933
1106
  opportunities: new OpportunitiesResource(client),
@@ -937,6 +1110,7 @@ function createResources(client) {
937
1110
  media: new MediaResource(client),
938
1111
  presentations: new PresentationsResource(client),
939
1112
  profiles: new ProfilesResource(client),
1113
+ reviews: new ReviewsResource(client),
940
1114
  seo: new SeoResource(client),
941
1115
  shorts: new ShortsResource(client),
942
1116
  social: new SocialResource(client),
@@ -952,31 +1126,7 @@ var SmartlyQ = class {
952
1126
  constructor(options = {}) {
953
1127
  const resolved = typeof options === "string" ? { apiKey: options } : options;
954
1128
  this.core = new CoreClient(resolved);
955
- const resources = createResources(this.core);
956
- this.account = resources.account;
957
- this.analytics = resources.analytics;
958
- this.articles = resources.articles;
959
- this.audio = resources.audio;
960
- this.captain = resources.captain;
961
- this.chatbots = resources.chatbots;
962
- this.comments = resources.comments;
963
- this.contacts = resources.contacts;
964
- this.content = resources.content;
965
- this.customFields = resources.customFields;
966
- this.images = resources.images;
967
- this.jobs = resources.jobs;
968
- this.media = resources.media;
969
- this.messages = resources.messages;
970
- this.opportunities = resources.opportunities;
971
- this.presentations = resources.presentations;
972
- this.profiles = resources.profiles;
973
- this.seo = resources.seo;
974
- this.shorts = resources.shorts;
975
- this.social = resources.social;
976
- this.urls = resources.urls;
977
- this.videos = resources.videos;
978
- this.webhooks = resources.webhooks;
979
- this.workspaces = resources.workspaces;
1129
+ Object.assign(this, createResources(this.core));
980
1130
  }
981
1131
  };
982
1132
  var index_default = SmartlyQ;
@@ -985,12 +1135,14 @@ export {
985
1135
  AnalyticsResource,
986
1136
  ArticlesResource,
987
1137
  AudioResource,
1138
+ AutomationsResource,
988
1139
  CaptainResource,
989
1140
  ChatbotsResource,
990
1141
  CommentsResource,
991
1142
  ContactsResource,
992
1143
  ContentResource,
993
1144
  CoreClient,
1145
+ CrmResource,
994
1146
  CustomFieldsResource,
995
1147
  ImagesResource,
996
1148
  JobsResource,
@@ -999,6 +1151,7 @@ export {
999
1151
  OpportunitiesResource,
1000
1152
  PresentationsResource,
1001
1153
  ProfilesResource,
1154
+ ReviewsResource,
1002
1155
  SeoResource,
1003
1156
  ShortsResource,
1004
1157
  SmartlyQ,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartlyqofficial/node",
3
- "version": "0.1.3",
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",