socialdesk-node 1.0.0 → 1.0.1

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 +54 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # socialdesk-node
2
+
3
+ [![npm version](https://img.shields.io/npm/v/socialdesk-node.svg)](https://www.npmjs.com/package/socialdesk-node)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
+ [![TypeScript](https://img.shields.io/badge/TypeScript-ready-blue.svg)](https://www.typescriptlang.org/)
6
+
7
+ SDK oficial de [Socialdesk](https://socialdesk.com) para Node.js.
8
+
9
+ - Tipado completo en TypeScript
10
+ - Helper para parsear webhooks
11
+ - Cliente HTTP pre-autenticado
12
+
13
+ ## Ejemplo
14
+
15
+ ```typescript
16
+ import { WebhookHelper, EventType } from 'socialdesk-node';
17
+
18
+ app.post('/webhook', async (req, res) => {
19
+ const webhook = new WebhookHelper(req.body);
20
+ const client = webhook.createClient();
21
+
22
+ if (webhook.isEventType(EventType.DirectMessage)) {
23
+ await client.sendHintMessage({
24
+ text: 'El cliente preguntó por precios',
25
+ message_id: webhook.getMessageId(),
26
+ conversation_id: webhook.getConversationId(),
27
+ quick_replies: [
28
+ { text: 'El Plan Básico cuesta $79/mes + IVA.' },
29
+ ],
30
+ });
31
+ }
32
+
33
+ res.json({ ok: true });
34
+ });
35
+ ```
36
+
37
+ ## Funcionalidades
38
+
39
+ | Método | Descripción |
40
+ |---|---|
41
+ | `sendHintMessage` | Envía un mensaje visible solo para el agente |
42
+ | `sendDirectMessage` | Envía un mensaje directo al participante |
43
+ | `sendHSMMessage` | Envía un mensaje con plantilla (HSM) |
44
+ | `sendHintCallback` | Ejecuta un callback de un hint message |
45
+ | `assignConversation` | Asigna una conversación a un agente o equipo |
46
+ | `addLabel` | Agrega una etiqueta a una conversación |
47
+
48
+ ## Documentación
49
+
50
+ [socialdesk-docs.web.app](https://socialdesk-docs.web.app)
51
+
52
+ ## Licencia
53
+
54
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socialdesk-node",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "SDK oficial de Socialdesk para Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",