@smartlyqofficial/node 0.1.16 → 0.1.18
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/README.md +29 -0
- package/dist/index.cjs +104 -0
- package/dist/index.d.cts +1734 -202
- package/dist/index.d.ts +1734 -202
- package/dist/index.js +103 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -129,6 +129,10 @@ All methods below are available on the client. Full request/response documentati
|
|
|
129
129
|
| `sq.analytics.inboxTopAccounts(query?)` | `GET /analytics/inbox/top-accounts` | Inbox top accounts |
|
|
130
130
|
| `sq.analytics.inboxConversations(query?)` | `GET /analytics/inbox/conversations` | Inbox conversation stats |
|
|
131
131
|
| `sq.analytics.inboxConversationDetail(conversationId)` | `GET /analytics/inbox/conversations/{conversation_id}` | Conversation analytics |
|
|
132
|
+
| `sq.analytics.getYoutubeChannelInsights(query?)` | `GET /analytics/youtube/channel-insights` | YouTube channel insights |
|
|
133
|
+
| `sq.analytics.getYoutubeDailyViews(query?)` | `GET /analytics/youtube/daily-views` | YouTube daily views |
|
|
134
|
+
| `sq.analytics.getYoutubeVideoRetention(query?)` | `GET /analytics/youtube/video-retention` | YouTube audience retention |
|
|
135
|
+
| `sq.analytics.getYoutubeDemographics(query?)` | `GET /analytics/youtube/demographics` | YouTube viewer demographics |
|
|
132
136
|
|
|
133
137
|
### Articles
|
|
134
138
|
|
|
@@ -246,6 +250,8 @@ All methods below are available on the client. Full request/response documentati
|
|
|
246
250
|
| `sq.messages.list(conversationId, query?)` | `GET /social/conversations/{conversation_id}/messages` | List messages in a conversation |
|
|
247
251
|
| `sq.messages.send(conversationId, body)` | `POST /social/conversations/{conversation_id}/messages` | Send a direct message |
|
|
248
252
|
| `sq.messages.markConversationRead(conversationId)` | `POST /social/conversations/{conversation_id}/read` | Mark a conversation read |
|
|
253
|
+
| `sq.messages.reactTo(conversationId, messageId, body)` | `POST /social/conversations/{conversation_id}/messages/{message_id}/reactions` | React to a message |
|
|
254
|
+
| `sq.messages.removeReaction(conversationId, messageId)` | `DELETE /social/conversations/{conversation_id}/messages/{message_id}/reactions` | Remove a message reaction |
|
|
249
255
|
|
|
250
256
|
### Images
|
|
251
257
|
|
|
@@ -264,6 +270,12 @@ All methods below are available on the client. Full request/response documentati
|
|
|
264
270
|
| `sq.jobs.get(jobId)` | `GET /jobs/{job_id}` | Get job |
|
|
265
271
|
| `sq.jobs.cancel(jobId, body?)` | `POST /jobs/{job_id}/cancel` | Cancel job |
|
|
266
272
|
|
|
273
|
+
### Logs
|
|
274
|
+
|
|
275
|
+
| Method | Endpoint | Description |
|
|
276
|
+
| --- | --- | --- |
|
|
277
|
+
| `sq.logs.list(query?)` | `GET /logs` | List developer logs |
|
|
278
|
+
|
|
267
279
|
### Media
|
|
268
280
|
|
|
269
281
|
| Method | Endpoint | Description |
|
|
@@ -384,6 +396,7 @@ All methods below are available on the client. Full request/response documentati
|
|
|
384
396
|
| `sq.social.updateConversation(conversationId, body)` | `PATCH /social/conversations/{conversation_id}` | Archive / reopen conversation |
|
|
385
397
|
| `sq.social.searchConversations(query?)` | `GET /social/conversations/search` | Search conversations |
|
|
386
398
|
| `sq.social.pinterestBoards(accountId)` | `GET /social/accounts/{account_id}/pinterest/boards` | Pinterest boards |
|
|
399
|
+
| `sq.social.createPinterestBoard(accountId, body)` | `POST /social/accounts/{account_id}/pinterest/boards` | Create a Pinterest board |
|
|
387
400
|
| `sq.social.youtubePlaylists(accountId)` | `GET /social/accounts/{account_id}/youtube/playlists` | YouTube playlists |
|
|
388
401
|
| `sq.social.instagramPublishingLimit(accountId)` | `GET /social/accounts/{account_id}/instagram/publishing-limit` | Instagram publishing limit |
|
|
389
402
|
| `sq.social.gmbPerformance(accountId, query?)` | `GET /social/accounts/{account_id}/gmb/performance` | Google Business performance |
|
|
@@ -432,6 +445,12 @@ All methods below are available on the client. Full request/response documentati
|
|
|
432
445
|
| `sq.social.instagramAudience(accountId, query?)` | `GET /social/accounts/{account_id}/instagram/audience` | Instagram audience demographics |
|
|
433
446
|
| `sq.social.connectOptions(accountId)` | `GET /social/accounts/{account_id}/connect-options` | Connection target options |
|
|
434
447
|
| `sq.social.connectSelect(accountId, body)` | `POST /social/accounts/{account_id}/connect-select` | Select connection target |
|
|
448
|
+
| `sq.social.getFacebookPage(accountId)` | `GET /social/accounts/{account_id}/facebook/page` | Get Facebook page details |
|
|
449
|
+
| `sq.social.updateFacebookPage(accountId, body)` | `PATCH /social/accounts/{account_id}/facebook/page` | Update Facebook page details |
|
|
450
|
+
| `sq.social.updateYoutubePlaylist(accountId, playlistId, body)` | `PATCH /social/accounts/{account_id}/youtube/playlists/{playlist_id}` | Update a YouTube playlist |
|
|
451
|
+
| `sq.social.listMentions(accountId, query?)` | `GET /social/accounts/{account_id}/mentions` | List mentions |
|
|
452
|
+
| `sq.social.replyToMention(accountId, mentionId, body)` | `POST /social/accounts/{account_id}/mentions/{mention_id}/reply` | Reply to a mention |
|
|
453
|
+
| `sq.social.listRedditFlairs(accountId, subreddit)` | `GET /social/accounts/{account_id}/reddit/subreddits/{subreddit}/flairs` | List subreddit post flairs |
|
|
435
454
|
|
|
436
455
|
### URLs
|
|
437
456
|
|
|
@@ -442,6 +461,7 @@ All methods below are available on the client. Full request/response documentati
|
|
|
442
461
|
| `sq.urls.get(urlId)` | `GET /urls/{url_id}` | Get short URL |
|
|
443
462
|
| `sq.urls.delete(urlId)` | `DELETE /urls/{url_id}` | Delete short URL |
|
|
444
463
|
| `sq.urls.getStats(urlId)` | `GET /urls/{url_id}/stats` | Get short URL stats |
|
|
464
|
+
| `sq.urls.updateShort(id, body)` | `PATCH /urls/{id}` | Update a short URL |
|
|
445
465
|
|
|
446
466
|
### Videos
|
|
447
467
|
|
|
@@ -467,6 +487,7 @@ All methods below are available on the client. Full request/response documentati
|
|
|
467
487
|
| `sq.webhooks.delete(id)` | `DELETE /webhooks/{id}` | Delete webhook |
|
|
468
488
|
| `sq.webhooks.listLogs(query?)` | `GET /webhooks/logs` | List webhook delivery logs |
|
|
469
489
|
| `sq.webhooks.test(id)` | `POST /webhooks/{id}/test` | Send test webhook |
|
|
490
|
+
| `sq.webhooks.replayDelivery(id)` | `POST /webhooks/deliveries/{id}/replay` | Replay a webhook delivery |
|
|
470
491
|
|
|
471
492
|
### WhatsApp
|
|
472
493
|
|
|
@@ -478,6 +499,14 @@ All methods below are available on the client. Full request/response documentati
|
|
|
478
499
|
| `sq.whatsApp.getWhatsAppBusinessProfile(query?)` | `GET /whatsapp/business-profile` | Get business profile |
|
|
479
500
|
| `sq.whatsApp.updateWhatsAppBusinessProfile(body)` | `PATCH /whatsapp/business-profile` | Update business profile |
|
|
480
501
|
| `sq.whatsApp.listWhatsAppPhoneNumbers(query?)` | `GET /whatsapp/phone-numbers` | List phone numbers |
|
|
502
|
+
| `sq.whatsApp.getTemplate(name, query?)` | `GET /whatsapp/templates/{name}` | Get a WhatsApp template |
|
|
503
|
+
| `sq.whatsApp.updateTemplate(name, body)` | `PATCH /whatsapp/templates/{name}` | Update a WhatsApp template |
|
|
504
|
+
| `sq.whatsApp.deleteTemplate(name, query?)` | `DELETE /whatsapp/templates/{name}` | Delete a WhatsApp template |
|
|
505
|
+
| `sq.whatsApp.updateProfilePhoto(body)` | `POST /whatsapp/business-profile/photo` | Set the WhatsApp profile photo |
|
|
506
|
+
| `sq.whatsApp.getDisplayName(query?)` | `GET /whatsapp/business-profile/display-name` | Get the WhatsApp display name |
|
|
507
|
+
| `sq.whatsApp.updateDisplayName(body)` | `POST /whatsapp/business-profile/display-name` | Request a WhatsApp display-name change |
|
|
508
|
+
| `sq.whatsApp.listTemplateLibrary(query?)` | `GET /whatsapp/template-library` | Browse the shared template library |
|
|
509
|
+
| `sq.whatsApp.createTemplateFromLibrary(body)` | `POST /whatsapp/templates/from-library` | Adopt a library template |
|
|
481
510
|
|
|
482
511
|
### Workspaces
|
|
483
512
|
|
package/dist/index.cjs
CHANGED
|
@@ -35,6 +35,7 @@ __export(index_exports, {
|
|
|
35
35
|
CustomFieldsResource: () => CustomFieldsResource,
|
|
36
36
|
ImagesResource: () => ImagesResource,
|
|
37
37
|
JobsResource: () => JobsResource,
|
|
38
|
+
LogsResource: () => LogsResource,
|
|
38
39
|
MediaResource: () => MediaResource,
|
|
39
40
|
MessagesResource: () => MessagesResource,
|
|
40
41
|
OpportunitiesResource: () => OpportunitiesResource,
|
|
@@ -275,6 +276,22 @@ var AnalyticsResource = class {
|
|
|
275
276
|
inboxConversationDetail(conversationId, options) {
|
|
276
277
|
return this._client.request("GET", `/analytics/inbox/conversations/${encodeURIComponent(conversationId)}`, { options });
|
|
277
278
|
}
|
|
279
|
+
/** YouTube channel insights `GET /analytics/youtube/channel-insights` */
|
|
280
|
+
getYoutubeChannelInsights(query, options) {
|
|
281
|
+
return this._client.request("GET", "/analytics/youtube/channel-insights", { query, options });
|
|
282
|
+
}
|
|
283
|
+
/** YouTube daily views `GET /analytics/youtube/daily-views` */
|
|
284
|
+
getYoutubeDailyViews(query, options) {
|
|
285
|
+
return this._client.request("GET", "/analytics/youtube/daily-views", { query, options });
|
|
286
|
+
}
|
|
287
|
+
/** YouTube audience retention `GET /analytics/youtube/video-retention` */
|
|
288
|
+
getYoutubeVideoRetention(query, options) {
|
|
289
|
+
return this._client.request("GET", "/analytics/youtube/video-retention", { query, options });
|
|
290
|
+
}
|
|
291
|
+
/** YouTube viewer demographics `GET /analytics/youtube/demographics` */
|
|
292
|
+
getYoutubeDemographics(query, options) {
|
|
293
|
+
return this._client.request("GET", "/analytics/youtube/demographics", { query, options });
|
|
294
|
+
}
|
|
278
295
|
};
|
|
279
296
|
var ArticlesResource = class {
|
|
280
297
|
constructor(_client) {
|
|
@@ -578,6 +595,14 @@ var MessagesResource = class {
|
|
|
578
595
|
markConversationRead(conversationId, options) {
|
|
579
596
|
return this._client.request("POST", `/social/conversations/${encodeURIComponent(conversationId)}/read`, { options });
|
|
580
597
|
}
|
|
598
|
+
/** React to a message `POST /social/conversations/{conversation_id}/messages/{message_id}/reactions` */
|
|
599
|
+
reactTo(conversationId, messageId, body, options) {
|
|
600
|
+
return this._client.request("POST", `/social/conversations/${encodeURIComponent(conversationId)}/messages/${encodeURIComponent(messageId)}/reactions`, { body, options });
|
|
601
|
+
}
|
|
602
|
+
/** Remove a message reaction `DELETE /social/conversations/{conversation_id}/messages/{message_id}/reactions` */
|
|
603
|
+
removeReaction(conversationId, messageId, options) {
|
|
604
|
+
return this._client.request("DELETE", `/social/conversations/${encodeURIComponent(conversationId)}/messages/${encodeURIComponent(messageId)}/reactions`, { options });
|
|
605
|
+
}
|
|
581
606
|
};
|
|
582
607
|
var ImagesResource = class {
|
|
583
608
|
constructor(_client) {
|
|
@@ -617,6 +642,15 @@ var JobsResource = class {
|
|
|
617
642
|
return this._client.request("POST", `/jobs/${encodeURIComponent(jobId)}/cancel`, { body, options });
|
|
618
643
|
}
|
|
619
644
|
};
|
|
645
|
+
var LogsResource = class {
|
|
646
|
+
constructor(_client) {
|
|
647
|
+
this._client = _client;
|
|
648
|
+
}
|
|
649
|
+
/** List developer logs `GET /logs` */
|
|
650
|
+
list(query, options) {
|
|
651
|
+
return this._client.request("GET", "/logs", { query, options });
|
|
652
|
+
}
|
|
653
|
+
};
|
|
620
654
|
var MediaResource = class {
|
|
621
655
|
constructor(_client) {
|
|
622
656
|
this._client = _client;
|
|
@@ -995,6 +1029,10 @@ var SocialResource = class {
|
|
|
995
1029
|
pinterestBoards(accountId, options) {
|
|
996
1030
|
return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/pinterest/boards`, { options });
|
|
997
1031
|
}
|
|
1032
|
+
/** Create a Pinterest board `POST /social/accounts/{account_id}/pinterest/boards` */
|
|
1033
|
+
createPinterestBoard(accountId, body, options) {
|
|
1034
|
+
return this._client.request("POST", `/social/accounts/${encodeURIComponent(accountId)}/pinterest/boards`, { body, options });
|
|
1035
|
+
}
|
|
998
1036
|
/** YouTube playlists `GET /social/accounts/{account_id}/youtube/playlists` */
|
|
999
1037
|
youtubePlaylists(accountId, options) {
|
|
1000
1038
|
return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/youtube/playlists`, { options });
|
|
@@ -1187,6 +1225,30 @@ var SocialResource = class {
|
|
|
1187
1225
|
connectSelect(accountId, body, options) {
|
|
1188
1226
|
return this._client.request("POST", `/social/accounts/${encodeURIComponent(accountId)}/connect-select`, { body, options });
|
|
1189
1227
|
}
|
|
1228
|
+
/** Get Facebook page details `GET /social/accounts/{account_id}/facebook/page` */
|
|
1229
|
+
getFacebookPage(accountId, options) {
|
|
1230
|
+
return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/facebook/page`, { options });
|
|
1231
|
+
}
|
|
1232
|
+
/** Update Facebook page details `PATCH /social/accounts/{account_id}/facebook/page` */
|
|
1233
|
+
updateFacebookPage(accountId, body, options) {
|
|
1234
|
+
return this._client.request("PATCH", `/social/accounts/${encodeURIComponent(accountId)}/facebook/page`, { body, options });
|
|
1235
|
+
}
|
|
1236
|
+
/** Update a YouTube playlist `PATCH /social/accounts/{account_id}/youtube/playlists/{playlist_id}` */
|
|
1237
|
+
updateYoutubePlaylist(accountId, playlistId, body, options) {
|
|
1238
|
+
return this._client.request("PATCH", `/social/accounts/${encodeURIComponent(accountId)}/youtube/playlists/${encodeURIComponent(playlistId)}`, { body, options });
|
|
1239
|
+
}
|
|
1240
|
+
/** List mentions `GET /social/accounts/{account_id}/mentions` */
|
|
1241
|
+
listMentions(accountId, query, options) {
|
|
1242
|
+
return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/mentions`, { query, options });
|
|
1243
|
+
}
|
|
1244
|
+
/** Reply to a mention `POST /social/accounts/{account_id}/mentions/{mention_id}/reply` */
|
|
1245
|
+
replyToMention(accountId, mentionId, body, options) {
|
|
1246
|
+
return this._client.request("POST", `/social/accounts/${encodeURIComponent(accountId)}/mentions/${encodeURIComponent(mentionId)}/reply`, { body, options });
|
|
1247
|
+
}
|
|
1248
|
+
/** List subreddit post flairs `GET /social/accounts/{account_id}/reddit/subreddits/{subreddit}/flairs` */
|
|
1249
|
+
listRedditFlairs(accountId, subreddit, options) {
|
|
1250
|
+
return this._client.request("GET", `/social/accounts/${encodeURIComponent(accountId)}/reddit/subreddits/${encodeURIComponent(subreddit)}/flairs`, { options });
|
|
1251
|
+
}
|
|
1190
1252
|
};
|
|
1191
1253
|
var UrlsResource = class {
|
|
1192
1254
|
constructor(_client) {
|
|
@@ -1212,6 +1274,10 @@ var UrlsResource = class {
|
|
|
1212
1274
|
getStats(urlId, options) {
|
|
1213
1275
|
return this._client.request("GET", `/urls/${encodeURIComponent(urlId)}/stats`, { options });
|
|
1214
1276
|
}
|
|
1277
|
+
/** Update a short URL `PATCH /urls/{id}` */
|
|
1278
|
+
updateShort(id, body, options) {
|
|
1279
|
+
return this._client.request("PATCH", `/urls/${encodeURIComponent(id)}`, { body, options });
|
|
1280
|
+
}
|
|
1215
1281
|
};
|
|
1216
1282
|
var VideosResource = class {
|
|
1217
1283
|
constructor(_client) {
|
|
@@ -1282,6 +1348,10 @@ var WebhooksResource = class {
|
|
|
1282
1348
|
test(id, options) {
|
|
1283
1349
|
return this._client.request("POST", `/webhooks/${encodeURIComponent(id)}/test`, { options });
|
|
1284
1350
|
}
|
|
1351
|
+
/** Replay a webhook delivery `POST /webhooks/deliveries/{id}/replay` */
|
|
1352
|
+
replayDelivery(id, options) {
|
|
1353
|
+
return this._client.request("POST", `/webhooks/deliveries/${encodeURIComponent(id)}/replay`, { options });
|
|
1354
|
+
}
|
|
1285
1355
|
};
|
|
1286
1356
|
var WhatsAppResource = class {
|
|
1287
1357
|
constructor(_client) {
|
|
@@ -1311,6 +1381,38 @@ var WhatsAppResource = class {
|
|
|
1311
1381
|
listWhatsAppPhoneNumbers(query, options) {
|
|
1312
1382
|
return this._client.request("GET", "/whatsapp/phone-numbers", { query, options });
|
|
1313
1383
|
}
|
|
1384
|
+
/** Get a WhatsApp template `GET /whatsapp/templates/{name}` */
|
|
1385
|
+
getTemplate(name, query, options) {
|
|
1386
|
+
return this._client.request("GET", `/whatsapp/templates/${encodeURIComponent(name)}`, { query, options });
|
|
1387
|
+
}
|
|
1388
|
+
/** Update a WhatsApp template `PATCH /whatsapp/templates/{name}` */
|
|
1389
|
+
updateTemplate(name, body, options) {
|
|
1390
|
+
return this._client.request("PATCH", `/whatsapp/templates/${encodeURIComponent(name)}`, { body, options });
|
|
1391
|
+
}
|
|
1392
|
+
/** Delete a WhatsApp template `DELETE /whatsapp/templates/{name}` */
|
|
1393
|
+
deleteTemplate(name, query, options) {
|
|
1394
|
+
return this._client.request("DELETE", `/whatsapp/templates/${encodeURIComponent(name)}`, { query, options });
|
|
1395
|
+
}
|
|
1396
|
+
/** Set the WhatsApp profile photo `POST /whatsapp/business-profile/photo` */
|
|
1397
|
+
updateProfilePhoto(body, options) {
|
|
1398
|
+
return this._client.request("POST", "/whatsapp/business-profile/photo", { body, options });
|
|
1399
|
+
}
|
|
1400
|
+
/** Get the WhatsApp display name `GET /whatsapp/business-profile/display-name` */
|
|
1401
|
+
getDisplayName(query, options) {
|
|
1402
|
+
return this._client.request("GET", "/whatsapp/business-profile/display-name", { query, options });
|
|
1403
|
+
}
|
|
1404
|
+
/** Request a WhatsApp display-name change `POST /whatsapp/business-profile/display-name` */
|
|
1405
|
+
updateDisplayName(body, options) {
|
|
1406
|
+
return this._client.request("POST", "/whatsapp/business-profile/display-name", { body, options });
|
|
1407
|
+
}
|
|
1408
|
+
/** Browse the shared template library `GET /whatsapp/template-library` */
|
|
1409
|
+
listTemplateLibrary(query, options) {
|
|
1410
|
+
return this._client.request("GET", "/whatsapp/template-library", { query, options });
|
|
1411
|
+
}
|
|
1412
|
+
/** Adopt a library template `POST /whatsapp/templates/from-library` */
|
|
1413
|
+
createTemplateFromLibrary(body, options) {
|
|
1414
|
+
return this._client.request("POST", "/whatsapp/templates/from-library", { body, options });
|
|
1415
|
+
}
|
|
1314
1416
|
};
|
|
1315
1417
|
var WorkspacesResource = class {
|
|
1316
1418
|
constructor(_client) {
|
|
@@ -1383,6 +1485,7 @@ function createResources(client) {
|
|
|
1383
1485
|
messages: new MessagesResource(client),
|
|
1384
1486
|
images: new ImagesResource(client),
|
|
1385
1487
|
jobs: new JobsResource(client),
|
|
1488
|
+
logs: new LogsResource(client),
|
|
1386
1489
|
media: new MediaResource(client),
|
|
1387
1490
|
presentations: new PresentationsResource(client),
|
|
1388
1491
|
profiles: new ProfilesResource(client),
|
|
@@ -1424,6 +1527,7 @@ var index_default = SmartlyQ;
|
|
|
1424
1527
|
CustomFieldsResource,
|
|
1425
1528
|
ImagesResource,
|
|
1426
1529
|
JobsResource,
|
|
1530
|
+
LogsResource,
|
|
1427
1531
|
MediaResource,
|
|
1428
1532
|
MessagesResource,
|
|
1429
1533
|
OpportunitiesResource,
|