@smartlyqofficial/node 0.1.13 → 0.1.15

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 CHANGED
@@ -100,6 +100,7 @@ All methods below are available on the client. Full request/response documentati
100
100
  | `sq.account.getMe()` | `GET /me` | Get current user profile |
101
101
  | `sq.account.getMeUsage(query?)` | `GET /me/usage` | Get usage summary |
102
102
  | `sq.account.getMeBalance()` | `GET /me/balance` | Get wallet balance |
103
+ | `sq.account.getBilling()` | `GET /me/billing` | Billing overview |
103
104
 
104
105
  ### AI Captain
105
106
 
@@ -181,6 +182,7 @@ All methods below are available on the client. Full request/response documentati
181
182
  | `sq.comments.replyTo(commentId, body)` | `POST /social/comments/{comment_id}/reply` | Reply to a comment |
182
183
  | `sq.comments.hide(commentId)` | `POST /social/comments/{comment_id}/hide` | Hide or unhide a comment |
183
184
  | `sq.comments.delete(commentId)` | `DELETE /social/comments/{comment_id}` | Delete a comment |
185
+ | `sq.comments.getPost(postId)` | `GET /social/comments/{post_id}` | Get one post's comments (threaded) |
184
186
 
185
187
  ### Content
186
188
 
@@ -212,6 +214,8 @@ All methods below are available on the client. Full request/response documentati
212
214
  | `sq.contacts.addNote(id, body)` | `POST /contacts/{id}/notes` | Add a note to a contact |
213
215
  | `sq.contacts.enroll(id, body)` | `POST /contacts/{id}/enroll` | Enroll a contact in an automation |
214
216
  | `sq.contacts.addMessage(id, body)` | `POST /contacts/{id}/messages` | Log a message on a contact's timeline |
217
+ | `sq.contacts.setField(id, slug, body)` | `PUT /contacts/{id}/fields/{slug}` | Set one custom field |
218
+ | `sq.contacts.clearField(id, slug)` | `DELETE /contacts/{id}/fields/{slug}` | Clear one custom field |
215
219
 
216
220
  ### CRM Custom Fields
217
221
 
@@ -464,6 +468,17 @@ All methods below are available on the client. Full request/response documentati
464
468
  | `sq.webhooks.listLogs(query?)` | `GET /webhooks/logs` | List webhook delivery logs |
465
469
  | `sq.webhooks.test(id)` | `POST /webhooks/{id}/test` | Send test webhook |
466
470
 
471
+ ### WhatsApp
472
+
473
+ | Method | Endpoint | Description |
474
+ | --- | --- | --- |
475
+ | `sq.whatsApp.sendWhatsAppMessage(body)` | `POST /whatsapp/messages` | Send a WhatsApp message |
476
+ | `sq.whatsApp.listWhatsAppTemplates(query?)` | `GET /whatsapp/templates` | List message templates |
477
+ | `sq.whatsApp.createWhatsAppTemplate(body)` | `POST /whatsapp/templates` | Create a message template |
478
+ | `sq.whatsApp.getWhatsAppBusinessProfile(query?)` | `GET /whatsapp/business-profile` | Get business profile |
479
+ | `sq.whatsApp.updateWhatsAppBusinessProfile(body)` | `PATCH /whatsapp/business-profile` | Update business profile |
480
+ | `sq.whatsApp.listWhatsAppPhoneNumbers(query?)` | `GET /whatsapp/phone-numbers` | List phone numbers |
481
+
467
482
  ### Workspaces
468
483
 
469
484
  | Method | Endpoint | Description |
package/dist/index.cjs CHANGED
@@ -50,6 +50,7 @@ __export(index_exports, {
50
50
  UrlsResource: () => UrlsResource,
51
51
  VideosResource: () => VideosResource,
52
52
  WebhooksResource: () => WebhooksResource,
53
+ WhatsAppResource: () => WhatsAppResource,
53
54
  WorkspacesResource: () => WorkspacesResource,
54
55
  createResources: () => createResources,
55
56
  default: () => index_default
@@ -188,6 +189,10 @@ var AccountResource = class {
188
189
  getMeBalance(options) {
189
190
  return this._client.request("GET", "/me/balance", { options });
190
191
  }
192
+ /** Billing overview `GET /me/billing` */
193
+ getBilling(options) {
194
+ return this._client.request("GET", "/me/billing", { options });
195
+ }
191
196
  };
192
197
  var CaptainResource = class {
193
198
  constructor(_client) {
@@ -407,6 +412,10 @@ var CommentsResource = class {
407
412
  delete(commentId, options) {
408
413
  return this._client.request("DELETE", `/social/comments/${encodeURIComponent(commentId)}`, { options });
409
414
  }
415
+ /** Get one post's comments (threaded) `GET /social/comments/{post_id}` */
416
+ getPost(postId, options) {
417
+ return this._client.request("GET", `/social/comments/${encodeURIComponent(postId)}`, { options });
418
+ }
410
419
  };
411
420
  var ContentResource = class {
412
421
  constructor(_client) {
@@ -486,6 +495,14 @@ var ContactsResource = class {
486
495
  addMessage(id, body, options) {
487
496
  return this._client.request("POST", `/contacts/${encodeURIComponent(id)}/messages`, { body, options });
488
497
  }
498
+ /** Set one custom field `PUT /contacts/{id}/fields/{slug}` */
499
+ setField(id, slug, body, options) {
500
+ return this._client.request("PUT", `/contacts/${encodeURIComponent(id)}/fields/${encodeURIComponent(slug)}`, { body, options });
501
+ }
502
+ /** Clear one custom field `DELETE /contacts/{id}/fields/{slug}` */
503
+ clearField(id, slug, options) {
504
+ return this._client.request("DELETE", `/contacts/${encodeURIComponent(id)}/fields/${encodeURIComponent(slug)}`, { options });
505
+ }
489
506
  };
490
507
  var CustomFieldsResource = class {
491
508
  constructor(_client) {
@@ -1266,6 +1283,35 @@ var WebhooksResource = class {
1266
1283
  return this._client.request("POST", `/webhooks/${encodeURIComponent(id)}/test`, { options });
1267
1284
  }
1268
1285
  };
1286
+ var WhatsAppResource = class {
1287
+ constructor(_client) {
1288
+ this._client = _client;
1289
+ }
1290
+ /** Send a WhatsApp message `POST /whatsapp/messages` */
1291
+ sendWhatsAppMessage(body, options) {
1292
+ return this._client.request("POST", "/whatsapp/messages", { body, options });
1293
+ }
1294
+ /** List message templates `GET /whatsapp/templates` */
1295
+ listWhatsAppTemplates(query, options) {
1296
+ return this._client.request("GET", "/whatsapp/templates", { query, options });
1297
+ }
1298
+ /** Create a message template `POST /whatsapp/templates` */
1299
+ createWhatsAppTemplate(body, options) {
1300
+ return this._client.request("POST", "/whatsapp/templates", { body, options });
1301
+ }
1302
+ /** Get business profile `GET /whatsapp/business-profile` */
1303
+ getWhatsAppBusinessProfile(query, options) {
1304
+ return this._client.request("GET", "/whatsapp/business-profile", { query, options });
1305
+ }
1306
+ /** Update business profile `PATCH /whatsapp/business-profile` */
1307
+ updateWhatsAppBusinessProfile(body, options) {
1308
+ return this._client.request("PATCH", "/whatsapp/business-profile", { body, options });
1309
+ }
1310
+ /** List phone numbers `GET /whatsapp/phone-numbers` */
1311
+ listWhatsAppPhoneNumbers(query, options) {
1312
+ return this._client.request("GET", "/whatsapp/phone-numbers", { query, options });
1313
+ }
1314
+ };
1269
1315
  var WorkspacesResource = class {
1270
1316
  constructor(_client) {
1271
1317
  this._client = _client;
@@ -1347,6 +1393,7 @@ function createResources(client) {
1347
1393
  urls: new UrlsResource(client),
1348
1394
  videos: new VideosResource(client),
1349
1395
  webhooks: new WebhooksResource(client),
1396
+ whatsApp: new WhatsAppResource(client),
1350
1397
  workspaces: new WorkspacesResource(client)
1351
1398
  };
1352
1399
  }
@@ -1392,6 +1439,7 @@ var index_default = SmartlyQ;
1392
1439
  UrlsResource,
1393
1440
  VideosResource,
1394
1441
  WebhooksResource,
1442
+ WhatsAppResource,
1395
1443
  WorkspacesResource,
1396
1444
  createResources
1397
1445
  });