@smartlyqofficial/node 0.1.28 → 0.1.30

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
@@ -213,6 +213,15 @@ All methods below are available on the client. Full request/response documentati
213
213
  | `sq.automations.listRuns(automationId, query?)` | `GET /automations/{automation_id}/runs` | List runs |
214
214
  | `sq.automations.getRun(automationId, runId)` | `GET /automations/{automation_id}/runs/{run_id}` | Get run |
215
215
 
216
+ ### Calendar
217
+
218
+ | Method | Endpoint | Description |
219
+ | --- | --- | --- |
220
+ | `sq.calendar.listEventTypes()` | `GET /calendar/event-types` | List booking pages |
221
+ | `sq.calendar.listSlots(query?)` | `GET /calendar/slots` | List open slots |
222
+ | `sq.calendar.createBooking(body)` | `POST /calendar/bookings` | Take a booking |
223
+ | `sq.calendar.cancelBooking(id, body?)` | `POST /calendar/bookings/{id}/cancel` | Cancel a booking |
224
+
216
225
  ### Chatbot
217
226
 
218
227
  | Method | Endpoint | Description |
@@ -257,6 +266,18 @@ All methods below are available on the client. Full request/response documentati
257
266
  | `sq.crm.bulkImportContacts(body)` | `POST /contacts/bulk` | Bulk import contacts |
258
267
  | `sq.crm.contactChannels(id)` | `GET /contacts/{id}/channels` | Contact channels |
259
268
 
269
+ ### CRM Companies
270
+
271
+ | Method | Endpoint | Description |
272
+ | --- | --- | --- |
273
+ | `sq.crmCompanies.list(query?)` | `GET /companies` | List companies |
274
+ | `sq.crmCompanies.create(body)` | `POST /companies` | Create a company |
275
+ | `sq.crmCompanies.get(id)` | `GET /companies/{id}` | Get a company |
276
+ | `sq.crmCompanies.update(id, body)` | `PATCH /companies/{id}` | Update a company |
277
+ | `sq.crmCompanies.delete(id)` | `DELETE /companies/{id}` | Delete a company |
278
+ | `sq.crmCompanies.linkContact(id, body)` | `POST /companies/{id}/contacts` | Link a contact to a company |
279
+ | `sq.crmCompanies.unlinkContact(id, body)` | `DELETE /companies/{id}/contacts` | Unlink a contact from a company |
280
+
260
281
  ### CRM Contacts
261
282
 
262
283
  | Method | Endpoint | Description |
@@ -295,6 +316,27 @@ All methods below are available on the client. Full request/response documentati
295
316
  | `sq.opportunities.delete(id)` | `DELETE /opportunities/{id}` | Delete an opportunity |
296
317
  | `sq.opportunities.updateStatus(id, body)` | `POST /opportunities/{id}/status` | Update opportunity status |
297
318
 
319
+ ### CRM Tags
320
+
321
+ | Method | Endpoint | Description |
322
+ | --- | --- | --- |
323
+ | `sq.crmTags.list()` | `GET /tags` | List tags |
324
+ | `sq.crmTags.create(body)` | `POST /tags` | Create a tag |
325
+ | `sq.crmTags.rename(body)` | `POST /tags/rename` | Rename a tag |
326
+ | `sq.crmTags.merge(body)` | `POST /tags/merge` | Merge tags |
327
+ | `sq.crmTags.delete(body)` | `POST /tags/delete` | Delete a tag |
328
+
329
+ ### CRM Tasks
330
+
331
+ | Method | Endpoint | Description |
332
+ | --- | --- | --- |
333
+ | `sq.crmTasks.list(query?)` | `GET /tasks` | List tasks |
334
+ | `sq.crmTasks.create(body)` | `POST /tasks` | Create a task |
335
+ | `sq.crmTasks.get(id)` | `GET /tasks/{id}` | Get a task |
336
+ | `sq.crmTasks.update(id, body)` | `PATCH /tasks/{id}` | Update a task |
337
+ | `sq.crmTasks.delete(id)` | `DELETE /tasks/{id}` | Delete a task |
338
+ | `sq.crmTasks.logTime(id, body)` | `POST /tasks/{id}/time` | Log time on a task |
339
+
298
340
  ### Direct Messages
299
341
 
300
342
  | Method | Endpoint | Description |
package/dist/index.cjs CHANGED
@@ -26,13 +26,17 @@ __export(index_exports, {
26
26
  ArticlesResource: () => ArticlesResource,
27
27
  AudioResource: () => AudioResource,
28
28
  AutomationsResource: () => AutomationsResource,
29
+ CalendarResource: () => CalendarResource,
29
30
  CaptainResource: () => CaptainResource,
30
31
  ChatbotsResource: () => ChatbotsResource,
31
32
  CommentsResource: () => CommentsResource,
32
33
  ContactsResource: () => ContactsResource,
33
34
  ContentResource: () => ContentResource,
34
35
  CoreClient: () => CoreClient,
36
+ CrmCompaniesResource: () => CrmCompaniesResource,
35
37
  CrmResource: () => CrmResource,
38
+ CrmTagsResource: () => CrmTagsResource,
39
+ CrmTasksResource: () => CrmTasksResource,
36
40
  CustomFieldsResource: () => CustomFieldsResource,
37
41
  ImagesResource: () => ImagesResource,
38
42
  JobsResource: () => JobsResource,
@@ -550,6 +554,27 @@ var AutomationsResource = class {
550
554
  return this._client.request("GET", `/automations/${encodeURIComponent(automationId)}/runs/${encodeURIComponent(runId)}`, { options });
551
555
  }
552
556
  };
557
+ var CalendarResource = class {
558
+ constructor(_client) {
559
+ this._client = _client;
560
+ }
561
+ /** List booking pages `GET /calendar/event-types` */
562
+ listEventTypes(options) {
563
+ return this._client.request("GET", "/calendar/event-types", { options });
564
+ }
565
+ /** List open slots `GET /calendar/slots` */
566
+ listSlots(query, options) {
567
+ return this._client.request("GET", "/calendar/slots", { query, options });
568
+ }
569
+ /** Take a booking `POST /calendar/bookings` */
570
+ createBooking(body, options) {
571
+ return this._client.request("POST", "/calendar/bookings", { body, options });
572
+ }
573
+ /** Cancel a booking `POST /calendar/bookings/{id}/cancel` */
574
+ cancelBooking(id, body, options) {
575
+ return this._client.request("POST", `/calendar/bookings/${encodeURIComponent(id)}/cancel`, { body, options });
576
+ }
577
+ };
553
578
  var ChatbotsResource = class {
554
579
  constructor(_client) {
555
580
  this._client = _client;
@@ -666,6 +691,39 @@ var CrmResource = class {
666
691
  return this._client.request("GET", `/contacts/${encodeURIComponent(id)}/channels`, { options });
667
692
  }
668
693
  };
694
+ var CrmCompaniesResource = class {
695
+ constructor(_client) {
696
+ this._client = _client;
697
+ }
698
+ /** List companies `GET /companies` */
699
+ list(query, options) {
700
+ return this._client.request("GET", "/companies", { query, options });
701
+ }
702
+ /** Create a company `POST /companies` */
703
+ create(body, options) {
704
+ return this._client.request("POST", "/companies", { body, options });
705
+ }
706
+ /** Get a company `GET /companies/{id}` */
707
+ get(id, options) {
708
+ return this._client.request("GET", `/companies/${encodeURIComponent(id)}`, { options });
709
+ }
710
+ /** Update a company `PATCH /companies/{id}` */
711
+ update(id, body, options) {
712
+ return this._client.request("PATCH", `/companies/${encodeURIComponent(id)}`, { body, options });
713
+ }
714
+ /** Delete a company `DELETE /companies/{id}` */
715
+ delete(id, options) {
716
+ return this._client.request("DELETE", `/companies/${encodeURIComponent(id)}`, { options });
717
+ }
718
+ /** Link a contact to a company `POST /companies/{id}/contacts` */
719
+ linkContact(id, body, options) {
720
+ return this._client.request("POST", `/companies/${encodeURIComponent(id)}/contacts`, { body, options });
721
+ }
722
+ /** Unlink a contact from a company `DELETE /companies/{id}/contacts` */
723
+ unlinkContact(id, body, options) {
724
+ return this._client.request("DELETE", `/companies/${encodeURIComponent(id)}/contacts`, { body, options });
725
+ }
726
+ };
669
727
  var ContactsResource = class {
670
728
  constructor(_client) {
671
729
  this._client = _client;
@@ -773,6 +831,60 @@ var OpportunitiesResource = class {
773
831
  return this._client.request("POST", `/opportunities/${encodeURIComponent(id)}/status`, { body, options });
774
832
  }
775
833
  };
834
+ var CrmTagsResource = class {
835
+ constructor(_client) {
836
+ this._client = _client;
837
+ }
838
+ /** List tags `GET /tags` */
839
+ list(options) {
840
+ return this._client.request("GET", "/tags", { options });
841
+ }
842
+ /** Create a tag `POST /tags` */
843
+ create(body, options) {
844
+ return this._client.request("POST", "/tags", { body, options });
845
+ }
846
+ /** Rename a tag `POST /tags/rename` */
847
+ rename(body, options) {
848
+ return this._client.request("POST", "/tags/rename", { body, options });
849
+ }
850
+ /** Merge tags `POST /tags/merge` */
851
+ merge(body, options) {
852
+ return this._client.request("POST", "/tags/merge", { body, options });
853
+ }
854
+ /** Delete a tag `POST /tags/delete` */
855
+ delete(body, options) {
856
+ return this._client.request("POST", "/tags/delete", { body, options });
857
+ }
858
+ };
859
+ var CrmTasksResource = class {
860
+ constructor(_client) {
861
+ this._client = _client;
862
+ }
863
+ /** List tasks `GET /tasks` */
864
+ list(query, options) {
865
+ return this._client.request("GET", "/tasks", { query, options });
866
+ }
867
+ /** Create a task `POST /tasks` */
868
+ create(body, options) {
869
+ return this._client.request("POST", "/tasks", { body, options });
870
+ }
871
+ /** Get a task `GET /tasks/{id}` */
872
+ get(id, options) {
873
+ return this._client.request("GET", `/tasks/${encodeURIComponent(id)}`, { options });
874
+ }
875
+ /** Update a task `PATCH /tasks/{id}` */
876
+ update(id, body, options) {
877
+ return this._client.request("PATCH", `/tasks/${encodeURIComponent(id)}`, { body, options });
878
+ }
879
+ /** Delete a task `DELETE /tasks/{id}` */
880
+ delete(id, options) {
881
+ return this._client.request("DELETE", `/tasks/${encodeURIComponent(id)}`, { options });
882
+ }
883
+ /** Log time on a task `POST /tasks/{id}/time` */
884
+ logTime(id, body, options) {
885
+ return this._client.request("POST", `/tasks/${encodeURIComponent(id)}/time`, { body, options });
886
+ }
887
+ };
776
888
  var MessagesResource = class {
777
889
  constructor(_client) {
778
890
  this._client = _client;
@@ -1766,13 +1878,17 @@ function createResources(client) {
1766
1878
  articles: new ArticlesResource(client),
1767
1879
  audio: new AudioResource(client),
1768
1880
  automations: new AutomationsResource(client),
1881
+ calendar: new CalendarResource(client),
1769
1882
  chatbots: new ChatbotsResource(client),
1770
1883
  comments: new CommentsResource(client),
1771
1884
  content: new ContentResource(client),
1772
1885
  crm: new CrmResource(client),
1886
+ crmCompanies: new CrmCompaniesResource(client),
1773
1887
  contacts: new ContactsResource(client),
1774
1888
  customFields: new CustomFieldsResource(client),
1775
1889
  opportunities: new OpportunitiesResource(client),
1890
+ crmTags: new CrmTagsResource(client),
1891
+ crmTasks: new CrmTasksResource(client),
1776
1892
  messages: new MessagesResource(client),
1777
1893
  images: new ImagesResource(client),
1778
1894
  jobs: new JobsResource(client),
@@ -1809,13 +1925,17 @@ var index_default = SmartlyQ;
1809
1925
  ArticlesResource,
1810
1926
  AudioResource,
1811
1927
  AutomationsResource,
1928
+ CalendarResource,
1812
1929
  CaptainResource,
1813
1930
  ChatbotsResource,
1814
1931
  CommentsResource,
1815
1932
  ContactsResource,
1816
1933
  ContentResource,
1817
1934
  CoreClient,
1935
+ CrmCompaniesResource,
1818
1936
  CrmResource,
1937
+ CrmTagsResource,
1938
+ CrmTasksResource,
1819
1939
  CustomFieldsResource,
1820
1940
  ImagesResource,
1821
1941
  JobsResource,