@product7/product7-js 0.5.8 → 0.6.0

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.
@@ -540,7 +540,7 @@
540
540
  };
541
541
  }
542
542
 
543
- return this.api._makeRequest('/widget/liveChat/settings', {
543
+ return this.api._makeRequest('/widget/livechat/settings', {
544
544
  method: 'GET',
545
545
  headers: { Authorization: `Bearer ${this.api.sessionToken}` },
546
546
  });
@@ -564,7 +564,7 @@
564
564
  };
565
565
  }
566
566
 
567
- return this.api._makeRequest('/widget/liveChat/agents/online', {
567
+ return this.api._makeRequest('/widget/livechat/agents/online', {
568
568
  method: 'GET',
569
569
  headers: { Authorization: `Bearer ${this.api.sessionToken}` },
570
570
  });
@@ -583,7 +583,7 @@
583
583
  }
584
584
 
585
585
  const endpoint = this.api._getEndpointWithParams(
586
- '/widget/liveChat/conversations',
586
+ '/widget/livechat/conversations',
587
587
  options
588
588
  );
589
589
  return this.api._makeRequest(endpoint, {
@@ -605,7 +605,7 @@
605
605
  }
606
606
 
607
607
  return this.api._makeRequest(
608
- `/widget/liveChat/conversations/${conversationId}`,
608
+ `/widget/livechat/conversations/${conversationId}`,
609
609
  {
610
610
  method: 'GET',
611
611
  headers: { Authorization: `Bearer ${this.api.sessionToken}` },
@@ -639,7 +639,7 @@
639
639
  return { status: true, data: newConv };
640
640
  }
641
641
 
642
- return this.api._makeRequest('/widget/liveChat/conversations', {
642
+ return this.api._makeRequest('/widget/livechat/conversations', {
643
643
  method: 'POST',
644
644
  headers: {
645
645
  'Content-Type': 'application/json',
@@ -673,7 +673,7 @@
673
673
  }
674
674
 
675
675
  return this.api._makeRequest(
676
- `/widget/liveChat/conversations/${conversationId}/messages`,
676
+ `/widget/livechat/conversations/${conversationId}/messages`,
677
677
  {
678
678
  method: 'POST',
679
679
  headers: {
@@ -702,7 +702,7 @@
702
702
  };
703
703
  }
704
704
 
705
- return this.api._makeRequest('/widget/liveChat/unread', {
705
+ return this.api._makeRequest('/widget/livechat/unread', {
706
706
  method: 'GET',
707
707
  headers: { Authorization: `Bearer ${this.api.sessionToken}` },
708
708
  });
@@ -716,7 +716,7 @@
716
716
  }
717
717
 
718
718
  return this.api._makeRequest(
719
- `/widget/liveChat/conversations/${conversationId}/read`,
719
+ `/widget/livechat/conversations/${conversationId}/read`,
720
720
  {
721
721
  method: 'POST',
722
722
  headers: { Authorization: `Bearer ${this.api.sessionToken}` },
@@ -738,7 +738,7 @@
738
738
 
739
739
  const params = { ...options };
740
740
  const endpoint = this.api._getEndpointWithParams(
741
- `/widget/liveChat/conversations/${conversationId}/messages`,
741
+ `/widget/livechat/conversations/${conversationId}/messages`,
742
742
  params
743
743
  );
744
744
  return this.api._makeRequest(endpoint, {
@@ -755,7 +755,7 @@
755
755
  return { status: true, url: `https://mock-cdn.example.com/${filename}` };
756
756
  }
757
757
 
758
- return this.api._makeRequest('/widget/liveChat/upload', {
758
+ return this.api._makeRequest('/widget/livechat/upload', {
759
759
  method: 'POST',
760
760
  headers: {
761
761
  'Content-Type': 'application/json',
@@ -777,7 +777,7 @@
777
777
  }
778
778
 
779
779
  return this.api._makeRequest(
780
- `/widget/liveChat/conversations/${conversationId}/rating`,
780
+ `/widget/livechat/conversations/${conversationId}/rating`,
781
781
  {
782
782
  method: 'POST',
783
783
  headers: {
@@ -797,7 +797,7 @@
797
797
  }
798
798
 
799
799
  return this.api._makeRequest(
800
- `/widget/liveChat/conversations/${conversationId}/typing`,
800
+ `/widget/livechat/conversations/${conversationId}/typing`,
801
801
  {
802
802
  method: 'POST',
803
803
  headers: {
@@ -8256,7 +8256,7 @@
8256
8256
  const wsProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
8257
8257
  let wsURL = this.baseURL.replace(/^https?:/, wsProtocol);
8258
8258
  wsURL = wsURL.replace('/api/v1', '');
8259
- wsURL = `${wsURL}/api/v1/widget/liveChat/ws?token=${encodeURIComponent(this.sessionToken)}`;
8259
+ wsURL = `${wsURL}/api/v1/widget/livechat/ws?token=${encodeURIComponent(this.sessionToken)}`;
8260
8260
 
8261
8261
  try {
8262
8262
  this.ws = new WebSocket(wsURL);