@synchat/webchat 0.0.26 → 0.0.28

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.
Files changed (2) hide show
  1. package/README.md +4 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -35,7 +35,7 @@ Para mais informações sobre a Synchat, acesse [synchat.com.br](https://synchat
35
35
  4. Clique em **Criar canal WebChat**.
36
36
  5. Após a criação, o portal exibe o **token** do canal. **Copie e guarde** esse valor — ele será usado no componente no seu site.
37
37
 
38
- O **token** identifica o canal na API e no widget; não o compartilhe publicamente.
38
+ O **token** identifica o canal no widget; não o compartilhe publicamente.
39
39
 
40
40
  ---
41
41
 
@@ -55,7 +55,7 @@ npm install react react-dom @mui/material @mui/icons-material @emotion/react @em
55
55
 
56
56
  ## Uso básico
57
57
 
58
- Importe o componente e informe o **token** (obtido no portal). A URL da API é opcional e tem valor padrão:
58
+ Importe o componente e informe o **token** (obtido no portal):
59
59
 
60
60
  ```tsx
61
61
  import { WebChat } from "@synchat/webchat";
@@ -87,7 +87,6 @@ Exemplo de uso com **onStartChat** (conecte em `/ws/business/{businessId}` usand
87
87
  ```tsx
88
88
  <WebChat
89
89
  token="SEU_TOKEN_DO_PORTAL"
90
- apiBaseUrl="https://api.synchat.com.br"
91
90
  onStartChat={async (data) => {
92
91
  // config.businessId está disponível após fetch da config
93
92
  // Conectar ao WebSocket: wsBase/ws/business/${config.businessId}
@@ -133,7 +132,7 @@ VITE_WEBCHAT_TOKEN=seu_token_aqui
133
132
  />
134
133
  ```
135
134
 
136
- Se a API estiver em outra URL, passe `apiBaseUrl`. Para customizar a cor do botão:
135
+ Para customizar a cor do botão:
137
136
 
138
137
  ```tsx
139
138
  <WebChat
@@ -149,7 +148,7 @@ Se a API estiver em outra URL, passe `apiBaseUrl`. Para customizar a cor do bot
149
148
 
150
149
  1. **Cadastro:** [portal.synchat.com.br](https://portal.synchat.com.br) → Cadastre-se.
151
150
  2. **Canal WebChat:** Portal → Canais → Novo canal → WebChat → preencher → Criar → **copiar o token**.
152
- 3. **No site:** `npm install @synchat/webchat` e usar `<WebChat token="..." />` (ou informar `apiBaseUrl` e `primaryColor` se quiser).
151
+ 3. **No site:** `npm install @synchat/webchat` e usar `<WebChat token="..." />` (ou informar `primaryColor` se quiser).
153
152
  4. **Conversa:** Implementar **onStartChat** para conectar ao WebSocket e enviar a primeira mensagem quando o recurso estiver disponível.
154
153
 
155
154
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synchat/webchat",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "Starter de biblioteca de componentes React + TypeScript com tsup.",
5
5
  "author": "synchat <contato@synchat.com.br>",
6
6
  "license": "MIT",