rio-assist-widget 0.1.18 → 0.1.26

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/src/main.ts CHANGED
@@ -13,15 +13,21 @@ export type RioAssistOptions = {
13
13
 
14
14
  const DEFAULT_OPTIONS: Required<Omit<RioAssistOptions, 'target'>> = {
15
15
  title: 'Rio Insight',
16
- buttonLabel: 'Rio Insight',
17
- placeholder: 'Pergunte alguma coisa',
18
- suggestions: [
19
- 'Veículos com problemas',
20
- 'Valor das peças',
21
- 'Planos de manutenção',
22
- ],
23
- accentColor: '#008B9A',
24
- apiBaseUrl: '',
16
+ buttonLabel: 'Rio Insight',
17
+ placeholder: 'Pergunte alguma coisa',
18
+ suggestions: [
19
+ 'Resumo da Frota',
20
+ 'Frota Disponível',
21
+ 'Chamados Abertos',
22
+ 'Parados + Causas',
23
+ 'Aguardando Peças',
24
+ 'Principais Gargalos',
25
+ 'Tempo por Concessionária',
26
+ 'Tempo de Ciclo',
27
+ 'Preventiva x Corretiva',
28
+ ],
29
+ accentColor: '#008B9A',
30
+ apiBaseUrl: '',
25
31
  rioToken: '',
26
32
  };
27
33
 
package/src/playground.ts CHANGED
@@ -11,9 +11,15 @@ const boot = () => {
11
11
  rioToken,
12
12
  apiBaseUrl,
13
13
  suggestions: [
14
- 'Veículos com problemas',
15
- 'Valor das peças',
16
- 'Planos de manutenção',
14
+ 'Resumo da Frota',
15
+ 'Frota Disponível',
16
+ 'Chamados Abertos',
17
+ 'Parados + Causas',
18
+ 'Aguardando Peças',
19
+ 'Principais Gargalos',
20
+ 'Tempo por Concessionária',
21
+ 'Tempo de Ciclo',
22
+ 'Preventiva x Corretiva',
17
23
  ],
18
24
  });
19
25
  };
@@ -50,6 +50,29 @@ export class RioWebsocketClient {
50
50
 
51
51
  socket.send(JSON.stringify(payload));
52
52
  }
53
+
54
+ async renameConversation(conversationId: string, newTitle: string) {
55
+ const socket = await this.ensureConnection();
56
+ const payload = {
57
+ action: 'renameConversation',
58
+ conversationId,
59
+ newTitle,
60
+ };
61
+
62
+ console.info('[RioAssist][ws] enviando renameConversation', payload);
63
+ socket.send(JSON.stringify(payload));
64
+ }
65
+
66
+ async deleteConversation(conversationId: string) {
67
+ const socket = await this.ensureConnection();
68
+ const payload = {
69
+ action: 'deleteConversation',
70
+ conversationId,
71
+ };
72
+
73
+ console.info('[RioAssist][ws] enviando deleteConversation', payload);
74
+ socket.send(JSON.stringify(payload));
75
+ }
53
76
 
54
77
  onMessage(listener: (message: RioIncomingMessage) => void) {
55
78
  this.listeners.add(listener);