@sendly/node 1.0.7 → 1.0.8

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
@@ -631,7 +631,7 @@ var MessagesResource = class {
631
631
  }
632
632
  const message = await this.http.request({
633
633
  method: "POST",
634
- path: "/v1/messages",
634
+ path: "/messages",
635
635
  body: {
636
636
  to: request.to,
637
637
  text: request.text,
@@ -667,7 +667,7 @@ var MessagesResource = class {
667
667
  validateLimit(options.limit);
668
668
  const response = await this.http.request({
669
669
  method: "GET",
670
- path: "/v1/messages",
670
+ path: "/messages",
671
671
  query: {
672
672
  limit: options.limit,
673
673
  offset: options.offset,
@@ -698,7 +698,7 @@ var MessagesResource = class {
698
698
  validateMessageId(id);
699
699
  const message = await this.http.request({
700
700
  method: "GET",
701
- path: `/v1/messages/${encodeURIComponent(id)}`
701
+ path: `/messages/${encodeURIComponent(id)}`
702
702
  });
703
703
  return message;
704
704
  }
@@ -731,7 +731,7 @@ var MessagesResource = class {
731
731
  while (hasMore) {
732
732
  const response = await this.http.request({
733
733
  method: "GET",
734
- path: "/v1/messages",
734
+ path: "/messages",
735
735
  query: {
736
736
  limit: batchSize,
737
737
  offset
@@ -790,7 +790,7 @@ var MessagesResource = class {
790
790
  }
791
791
  const scheduled = await this.http.request({
792
792
  method: "POST",
793
- path: "/v1/messages/schedule",
793
+ path: "/messages/schedule",
794
794
  body: {
795
795
  to: request.to,
796
796
  text: request.text,
@@ -819,7 +819,7 @@ var MessagesResource = class {
819
819
  validateLimit(options.limit);
820
820
  const response = await this.http.request({
821
821
  method: "GET",
822
- path: "/v1/messages/scheduled",
822
+ path: "/messages/scheduled",
823
823
  query: {
824
824
  limit: options.limit,
825
825
  offset: options.offset,
@@ -844,7 +844,7 @@ var MessagesResource = class {
844
844
  validateMessageId(id);
845
845
  const scheduled = await this.http.request({
846
846
  method: "GET",
847
- path: `/v1/messages/scheduled/${encodeURIComponent(id)}`
847
+ path: `/messages/scheduled/${encodeURIComponent(id)}`
848
848
  });
849
849
  return scheduled;
850
850
  }
@@ -869,7 +869,7 @@ var MessagesResource = class {
869
869
  validateMessageId(id);
870
870
  const result = await this.http.request({
871
871
  method: "DELETE",
872
- path: `/v1/messages/scheduled/${encodeURIComponent(id)}`
872
+ path: `/messages/scheduled/${encodeURIComponent(id)}`
873
873
  });
874
874
  return result;
875
875
  }
@@ -915,7 +915,7 @@ var MessagesResource = class {
915
915
  }
916
916
  const batch = await this.http.request({
917
917
  method: "POST",
918
- path: "/v1/messages/batch",
918
+ path: "/messages/batch",
919
919
  body: {
920
920
  messages: request.messages,
921
921
  ...request.from && { from: request.from }
@@ -944,7 +944,7 @@ var MessagesResource = class {
944
944
  }
945
945
  const batch = await this.http.request({
946
946
  method: "GET",
947
- path: `/v1/messages/batch/${encodeURIComponent(batchId)}`
947
+ path: `/messages/batch/${encodeURIComponent(batchId)}`
948
948
  });
949
949
  return batch;
950
950
  }
@@ -967,7 +967,7 @@ var MessagesResource = class {
967
967
  validateLimit(options.limit);
968
968
  const response = await this.http.request({
969
969
  method: "GET",
970
- path: "/v1/messages/batches",
970
+ path: "/messages/batches",
971
971
  query: {
972
972
  limit: options.limit,
973
973
  offset: options.offset,
package/dist/index.mjs CHANGED
@@ -571,7 +571,7 @@ var MessagesResource = class {
571
571
  }
572
572
  const message = await this.http.request({
573
573
  method: "POST",
574
- path: "/v1/messages",
574
+ path: "/messages",
575
575
  body: {
576
576
  to: request.to,
577
577
  text: request.text,
@@ -607,7 +607,7 @@ var MessagesResource = class {
607
607
  validateLimit(options.limit);
608
608
  const response = await this.http.request({
609
609
  method: "GET",
610
- path: "/v1/messages",
610
+ path: "/messages",
611
611
  query: {
612
612
  limit: options.limit,
613
613
  offset: options.offset,
@@ -638,7 +638,7 @@ var MessagesResource = class {
638
638
  validateMessageId(id);
639
639
  const message = await this.http.request({
640
640
  method: "GET",
641
- path: `/v1/messages/${encodeURIComponent(id)}`
641
+ path: `/messages/${encodeURIComponent(id)}`
642
642
  });
643
643
  return message;
644
644
  }
@@ -671,7 +671,7 @@ var MessagesResource = class {
671
671
  while (hasMore) {
672
672
  const response = await this.http.request({
673
673
  method: "GET",
674
- path: "/v1/messages",
674
+ path: "/messages",
675
675
  query: {
676
676
  limit: batchSize,
677
677
  offset
@@ -730,7 +730,7 @@ var MessagesResource = class {
730
730
  }
731
731
  const scheduled = await this.http.request({
732
732
  method: "POST",
733
- path: "/v1/messages/schedule",
733
+ path: "/messages/schedule",
734
734
  body: {
735
735
  to: request.to,
736
736
  text: request.text,
@@ -759,7 +759,7 @@ var MessagesResource = class {
759
759
  validateLimit(options.limit);
760
760
  const response = await this.http.request({
761
761
  method: "GET",
762
- path: "/v1/messages/scheduled",
762
+ path: "/messages/scheduled",
763
763
  query: {
764
764
  limit: options.limit,
765
765
  offset: options.offset,
@@ -784,7 +784,7 @@ var MessagesResource = class {
784
784
  validateMessageId(id);
785
785
  const scheduled = await this.http.request({
786
786
  method: "GET",
787
- path: `/v1/messages/scheduled/${encodeURIComponent(id)}`
787
+ path: `/messages/scheduled/${encodeURIComponent(id)}`
788
788
  });
789
789
  return scheduled;
790
790
  }
@@ -809,7 +809,7 @@ var MessagesResource = class {
809
809
  validateMessageId(id);
810
810
  const result = await this.http.request({
811
811
  method: "DELETE",
812
- path: `/v1/messages/scheduled/${encodeURIComponent(id)}`
812
+ path: `/messages/scheduled/${encodeURIComponent(id)}`
813
813
  });
814
814
  return result;
815
815
  }
@@ -855,7 +855,7 @@ var MessagesResource = class {
855
855
  }
856
856
  const batch = await this.http.request({
857
857
  method: "POST",
858
- path: "/v1/messages/batch",
858
+ path: "/messages/batch",
859
859
  body: {
860
860
  messages: request.messages,
861
861
  ...request.from && { from: request.from }
@@ -884,7 +884,7 @@ var MessagesResource = class {
884
884
  }
885
885
  const batch = await this.http.request({
886
886
  method: "GET",
887
- path: `/v1/messages/batch/${encodeURIComponent(batchId)}`
887
+ path: `/messages/batch/${encodeURIComponent(batchId)}`
888
888
  });
889
889
  return batch;
890
890
  }
@@ -907,7 +907,7 @@ var MessagesResource = class {
907
907
  validateLimit(options.limit);
908
908
  const response = await this.http.request({
909
909
  method: "GET",
910
- path: "/v1/messages/batches",
910
+ path: "/messages/batches",
911
911
  query: {
912
912
  limit: options.limit,
913
913
  offset: options.offset,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendly/node",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Official Sendly Node.js SDK for SMS messaging",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",