@smartlyqofficial/node 0.1.19 → 0.1.21
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 +21 -0
- package/dist/index.cjs +84 -0
- package/dist/index.d.cts +852 -3
- package/dist/index.d.ts +852 -3
- package/dist/index.js +84 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -160,6 +160,10 @@ All methods below are available on the client. Full request/response documentati
|
|
|
160
160
|
| `sq.automations.activate(automationId)` | `POST /automations/{automation_id}/activate` | Activate automation |
|
|
161
161
|
| `sq.automations.deactivate(automationId)` | `POST /automations/{automation_id}/deactivate` | Pause automation |
|
|
162
162
|
| `sq.automations.trigger(automationId, body?)` | `POST /automations/{automation_id}/trigger` | Trigger automation |
|
|
163
|
+
| `sq.automations.duplicate(automationId)` | `POST /automations/{automation_id}/duplicate` | Duplicate an automation |
|
|
164
|
+
| `sq.automations.listVersions(automationId)` | `GET /automations/{automation_id}/versions` | List automation versions |
|
|
165
|
+
| `sq.automations.getVersion(automationId, version)` | `GET /automations/{automation_id}/versions/{version}` | Get one automation version |
|
|
166
|
+
| `sq.automations.restoreVersion(automationId, version)` | `POST /automations/{automation_id}/versions/{version}/restore` | Restore an automation version |
|
|
163
167
|
| `sq.automations.listRuns(automationId, query?)` | `GET /automations/{automation_id}/runs` | List runs |
|
|
164
168
|
| `sq.automations.getRun(automationId, runId)` | `GET /automations/{automation_id}/runs/{run_id}` | Get run |
|
|
165
169
|
|
|
@@ -185,6 +189,9 @@ All methods below are available on the client. Full request/response documentati
|
|
|
185
189
|
| `sq.comments.list(query?)` | `GET /social/comments` | List comments |
|
|
186
190
|
| `sq.comments.replyTo(commentId, body)` | `POST /social/comments/{comment_id}/reply` | Reply to a comment |
|
|
187
191
|
| `sq.comments.hide(commentId)` | `POST /social/comments/{comment_id}/hide` | Hide or unhide a comment |
|
|
192
|
+
| `sq.comments.moderate(commentId, body)` | `POST /social/comments/{comment_id}/moderate` | Approve or reject a comment |
|
|
193
|
+
| `sq.comments.like(commentId)` | `POST /social/comments/{comment_id}/like` | Like a comment |
|
|
194
|
+
| `sq.comments.unlike(commentId)` | `DELETE /social/comments/{comment_id}/like` | Unlike a comment |
|
|
188
195
|
| `sq.comments.delete(commentId)` | `DELETE /social/comments/{comment_id}` | Delete a comment |
|
|
189
196
|
| `sq.comments.getPost(postId)` | `GET /social/comments/{post_id}` | Get one post's comments (threaded) |
|
|
190
197
|
|
|
@@ -250,6 +257,7 @@ All methods below are available on the client. Full request/response documentati
|
|
|
250
257
|
| `sq.messages.list(conversationId, query?)` | `GET /social/conversations/{conversation_id}/messages` | List messages in a conversation |
|
|
251
258
|
| `sq.messages.send(conversationId, body)` | `POST /social/conversations/{conversation_id}/messages` | Send a direct message |
|
|
252
259
|
| `sq.messages.markConversationRead(conversationId)` | `POST /social/conversations/{conversation_id}/read` | Mark a conversation read |
|
|
260
|
+
| `sq.messages.delete(conversationId, messageId)` | `DELETE /social/conversations/{conversation_id}/messages/{message_id}` | Delete a sent message |
|
|
253
261
|
| `sq.messages.reactTo(conversationId, messageId, body)` | `POST /social/conversations/{conversation_id}/messages/{message_id}/reactions` | React to a message |
|
|
254
262
|
| `sq.messages.removeReaction(conversationId, messageId)` | `DELETE /social/conversations/{conversation_id}/messages/{message_id}/reactions` | Remove a message reaction |
|
|
255
263
|
|
|
@@ -499,6 +507,19 @@ All methods below are available on the client. Full request/response documentati
|
|
|
499
507
|
| `sq.whatsApp.getWhatsAppBusinessProfile(query?)` | `GET /whatsapp/business-profile` | Get business profile |
|
|
500
508
|
| `sq.whatsApp.updateWhatsAppBusinessProfile(body)` | `PATCH /whatsapp/business-profile` | Update business profile |
|
|
501
509
|
| `sq.whatsApp.listWhatsAppPhoneNumbers(query?)` | `GET /whatsapp/phone-numbers` | List phone numbers |
|
|
510
|
+
| `sq.whatsApp.listWhatsAppFlows(query?)` | `GET /whatsapp/flows` | List flows |
|
|
511
|
+
| `sq.whatsApp.createWhatsAppFlow(body)` | `POST /whatsapp/flows` | Create a flow |
|
|
512
|
+
| `sq.whatsApp.getWhatsAppFlow(flowId, query?)` | `GET /whatsapp/flows/{flow_id}` | Get flow |
|
|
513
|
+
| `sq.whatsApp.updateWhatsAppFlow(flowId, body)` | `PATCH /whatsapp/flows/{flow_id}` | Update flow |
|
|
514
|
+
| `sq.whatsApp.deleteWhatsAppFlow(flowId, query?)` | `DELETE /whatsapp/flows/{flow_id}` | Delete flow |
|
|
515
|
+
| `sq.whatsApp.getWhatsAppFlowJson(flowId, query?)` | `GET /whatsapp/flows/{flow_id}/json` | Get flow JSON asset |
|
|
516
|
+
| `sq.whatsApp.uploadWhatsAppFlowJson(flowId, body)` | `PUT /whatsapp/flows/{flow_id}/json` | Upload flow JSON |
|
|
517
|
+
| `sq.whatsApp.getWhatsAppFlowPreview(flowId, query?)` | `GET /whatsapp/flows/{flow_id}/preview` | Get flow preview URL |
|
|
518
|
+
| `sq.whatsApp.publishWhatsAppFlow(flowId, body)` | `POST /whatsapp/flows/{flow_id}/publish` | Publish flow |
|
|
519
|
+
| `sq.whatsApp.deprecateWhatsAppFlow(flowId, body)` | `POST /whatsapp/flows/{flow_id}/deprecate` | Deprecate flow |
|
|
520
|
+
| `sq.whatsApp.getWhatsAppBlockedUsers(query?)` | `GET /whatsapp/block-users` | List blocked users |
|
|
521
|
+
| `sq.whatsApp.blockWhatsAppUsers(body)` | `POST /whatsapp/block-users` | Block users |
|
|
522
|
+
| `sq.whatsApp.unblockWhatsAppUsers(body)` | `DELETE /whatsapp/block-users` | Unblock users |
|
|
502
523
|
| `sq.whatsApp.getTemplate(name, query?)` | `GET /whatsapp/templates/{name}` | Get a WhatsApp template |
|
|
503
524
|
| `sq.whatsApp.updateTemplate(name, body)` | `PATCH /whatsapp/templates/{name}` | Update a WhatsApp template |
|
|
504
525
|
| `sq.whatsApp.deleteTemplate(name, query?)` | `DELETE /whatsapp/templates/{name}` | Delete a WhatsApp template |
|
package/dist/index.cjs
CHANGED
|
@@ -355,6 +355,22 @@ var AutomationsResource = class {
|
|
|
355
355
|
trigger(automationId, body, options) {
|
|
356
356
|
return this._client.request("POST", `/automations/${encodeURIComponent(automationId)}/trigger`, { body, options });
|
|
357
357
|
}
|
|
358
|
+
/** Duplicate an automation `POST /automations/{automation_id}/duplicate` */
|
|
359
|
+
duplicate(automationId, options) {
|
|
360
|
+
return this._client.request("POST", `/automations/${encodeURIComponent(automationId)}/duplicate`, { options });
|
|
361
|
+
}
|
|
362
|
+
/** List automation versions `GET /automations/{automation_id}/versions` */
|
|
363
|
+
listVersions(automationId, options) {
|
|
364
|
+
return this._client.request("GET", `/automations/${encodeURIComponent(automationId)}/versions`, { options });
|
|
365
|
+
}
|
|
366
|
+
/** Get one automation version `GET /automations/{automation_id}/versions/{version}` */
|
|
367
|
+
getVersion(automationId, version, options) {
|
|
368
|
+
return this._client.request("GET", `/automations/${encodeURIComponent(automationId)}/versions/${encodeURIComponent(version)}`, { options });
|
|
369
|
+
}
|
|
370
|
+
/** Restore an automation version `POST /automations/{automation_id}/versions/{version}/restore` */
|
|
371
|
+
restoreVersion(automationId, version, options) {
|
|
372
|
+
return this._client.request("POST", `/automations/${encodeURIComponent(automationId)}/versions/${encodeURIComponent(version)}/restore`, { options });
|
|
373
|
+
}
|
|
358
374
|
/** List runs `GET /automations/{automation_id}/runs` */
|
|
359
375
|
listRuns(automationId, query, options) {
|
|
360
376
|
return this._client.request("GET", `/automations/${encodeURIComponent(automationId)}/runs`, { query, options });
|
|
@@ -425,6 +441,18 @@ var CommentsResource = class {
|
|
|
425
441
|
hide(commentId, options) {
|
|
426
442
|
return this._client.request("POST", `/social/comments/${encodeURIComponent(commentId)}/hide`, { options });
|
|
427
443
|
}
|
|
444
|
+
/** Approve or reject a comment `POST /social/comments/{comment_id}/moderate` */
|
|
445
|
+
moderate(commentId, body, options) {
|
|
446
|
+
return this._client.request("POST", `/social/comments/${encodeURIComponent(commentId)}/moderate`, { body, options });
|
|
447
|
+
}
|
|
448
|
+
/** Like a comment `POST /social/comments/{comment_id}/like` */
|
|
449
|
+
like(commentId, options) {
|
|
450
|
+
return this._client.request("POST", `/social/comments/${encodeURIComponent(commentId)}/like`, { options });
|
|
451
|
+
}
|
|
452
|
+
/** Unlike a comment `DELETE /social/comments/{comment_id}/like` */
|
|
453
|
+
unlike(commentId, options) {
|
|
454
|
+
return this._client.request("DELETE", `/social/comments/${encodeURIComponent(commentId)}/like`, { options });
|
|
455
|
+
}
|
|
428
456
|
/** Delete a comment `DELETE /social/comments/{comment_id}` */
|
|
429
457
|
delete(commentId, options) {
|
|
430
458
|
return this._client.request("DELETE", `/social/comments/${encodeURIComponent(commentId)}`, { options });
|
|
@@ -595,6 +623,10 @@ var MessagesResource = class {
|
|
|
595
623
|
markConversationRead(conversationId, options) {
|
|
596
624
|
return this._client.request("POST", `/social/conversations/${encodeURIComponent(conversationId)}/read`, { options });
|
|
597
625
|
}
|
|
626
|
+
/** Delete a sent message `DELETE /social/conversations/{conversation_id}/messages/{message_id}` */
|
|
627
|
+
delete(conversationId, messageId, options) {
|
|
628
|
+
return this._client.request("DELETE", `/social/conversations/${encodeURIComponent(conversationId)}/messages/${encodeURIComponent(messageId)}`, { options });
|
|
629
|
+
}
|
|
598
630
|
/** React to a message `POST /social/conversations/{conversation_id}/messages/{message_id}/reactions` */
|
|
599
631
|
reactTo(conversationId, messageId, body, options) {
|
|
600
632
|
return this._client.request("POST", `/social/conversations/${encodeURIComponent(conversationId)}/messages/${encodeURIComponent(messageId)}/reactions`, { body, options });
|
|
@@ -1381,6 +1413,58 @@ var WhatsAppResource = class {
|
|
|
1381
1413
|
listWhatsAppPhoneNumbers(query, options) {
|
|
1382
1414
|
return this._client.request("GET", "/whatsapp/phone-numbers", { query, options });
|
|
1383
1415
|
}
|
|
1416
|
+
/** List flows `GET /whatsapp/flows` */
|
|
1417
|
+
listWhatsAppFlows(query, options) {
|
|
1418
|
+
return this._client.request("GET", "/whatsapp/flows", { query, options });
|
|
1419
|
+
}
|
|
1420
|
+
/** Create a flow `POST /whatsapp/flows` */
|
|
1421
|
+
createWhatsAppFlow(body, options) {
|
|
1422
|
+
return this._client.request("POST", "/whatsapp/flows", { body, options });
|
|
1423
|
+
}
|
|
1424
|
+
/** Get flow `GET /whatsapp/flows/{flow_id}` */
|
|
1425
|
+
getWhatsAppFlow(flowId, query, options) {
|
|
1426
|
+
return this._client.request("GET", `/whatsapp/flows/${encodeURIComponent(flowId)}`, { query, options });
|
|
1427
|
+
}
|
|
1428
|
+
/** Update flow `PATCH /whatsapp/flows/{flow_id}` */
|
|
1429
|
+
updateWhatsAppFlow(flowId, body, options) {
|
|
1430
|
+
return this._client.request("PATCH", `/whatsapp/flows/${encodeURIComponent(flowId)}`, { body, options });
|
|
1431
|
+
}
|
|
1432
|
+
/** Delete flow `DELETE /whatsapp/flows/{flow_id}` */
|
|
1433
|
+
deleteWhatsAppFlow(flowId, query, options) {
|
|
1434
|
+
return this._client.request("DELETE", `/whatsapp/flows/${encodeURIComponent(flowId)}`, { query, options });
|
|
1435
|
+
}
|
|
1436
|
+
/** Get flow JSON asset `GET /whatsapp/flows/{flow_id}/json` */
|
|
1437
|
+
getWhatsAppFlowJson(flowId, query, options) {
|
|
1438
|
+
return this._client.request("GET", `/whatsapp/flows/${encodeURIComponent(flowId)}/json`, { query, options });
|
|
1439
|
+
}
|
|
1440
|
+
/** Upload flow JSON `PUT /whatsapp/flows/{flow_id}/json` */
|
|
1441
|
+
uploadWhatsAppFlowJson(flowId, body, options) {
|
|
1442
|
+
return this._client.request("PUT", `/whatsapp/flows/${encodeURIComponent(flowId)}/json`, { body, options });
|
|
1443
|
+
}
|
|
1444
|
+
/** Get flow preview URL `GET /whatsapp/flows/{flow_id}/preview` */
|
|
1445
|
+
getWhatsAppFlowPreview(flowId, query, options) {
|
|
1446
|
+
return this._client.request("GET", `/whatsapp/flows/${encodeURIComponent(flowId)}/preview`, { query, options });
|
|
1447
|
+
}
|
|
1448
|
+
/** Publish flow `POST /whatsapp/flows/{flow_id}/publish` */
|
|
1449
|
+
publishWhatsAppFlow(flowId, body, options) {
|
|
1450
|
+
return this._client.request("POST", `/whatsapp/flows/${encodeURIComponent(flowId)}/publish`, { body, options });
|
|
1451
|
+
}
|
|
1452
|
+
/** Deprecate flow `POST /whatsapp/flows/{flow_id}/deprecate` */
|
|
1453
|
+
deprecateWhatsAppFlow(flowId, body, options) {
|
|
1454
|
+
return this._client.request("POST", `/whatsapp/flows/${encodeURIComponent(flowId)}/deprecate`, { body, options });
|
|
1455
|
+
}
|
|
1456
|
+
/** List blocked users `GET /whatsapp/block-users` */
|
|
1457
|
+
getWhatsAppBlockedUsers(query, options) {
|
|
1458
|
+
return this._client.request("GET", "/whatsapp/block-users", { query, options });
|
|
1459
|
+
}
|
|
1460
|
+
/** Block users `POST /whatsapp/block-users` */
|
|
1461
|
+
blockWhatsAppUsers(body, options) {
|
|
1462
|
+
return this._client.request("POST", "/whatsapp/block-users", { body, options });
|
|
1463
|
+
}
|
|
1464
|
+
/** Unblock users `DELETE /whatsapp/block-users` */
|
|
1465
|
+
unblockWhatsAppUsers(body, options) {
|
|
1466
|
+
return this._client.request("DELETE", "/whatsapp/block-users", { body, options });
|
|
1467
|
+
}
|
|
1384
1468
|
/** Get a WhatsApp template `GET /whatsapp/templates/{name}` */
|
|
1385
1469
|
getTemplate(name, query, options) {
|
|
1386
1470
|
return this._client.request("GET", `/whatsapp/templates/${encodeURIComponent(name)}`, { query, options });
|