contactstudiocstools 1.0.226 → 1.0.228

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/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@contactstudio/cstools",
3
3
  "configKey": "CSTools",
4
- "version": "1.0.226"
4
+ "version": "1.0.228"
5
5
  }
@@ -8,6 +8,11 @@ import { logout } from "./types";
8
8
  import { useNuxtApp, useRuntimeConfig } from "#app";
9
9
  import { getCookie } from "typescript-cookie";
10
10
 
11
+ //props
12
+ const props = defineProps<{
13
+ csAppHeader?: string
14
+ }>();
15
+
11
16
  // data
12
17
  const { $emit } = useNuxtApp();
13
18
  const { BASE_URL } = useRuntimeConfig().public;
@@ -17,11 +22,15 @@ function initSnapshot(): void {
17
22
  const snapshot = new Worker(`${BASE_URL}/snapshot.js`);
18
23
  const cssession = getCookie("cssession")
19
24
 
20
- snapshot.postMessage(cssession || "");
25
+ //Objeto para adicionar os headers das requisições
26
+ snapshot.postMessage({
27
+ cssession,
28
+ csAppHeader: props.csAppHeader || ''
29
+ });
21
30
  snapshot.onmessage = ({ data }) => {
22
31
  if (data.error) {
23
32
  console.log(data)
24
- logout(data.message || "longpollingError");
33
+ logout(data.data.message || "longpollingError");
25
34
  return;
26
35
  }
27
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contactstudiocstools",
3
- "version": "1.0.226",
3
+ "version": "1.0.228",
4
4
  "description": "Nuxt Tools Module for ContactStudio",
5
5
  "type": "module",
6
6
  "exports": {