n8n-nodes-vendschat 1.0.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.
- package/LICENSE +21 -0
- package/README.md +79 -0
- package/dist/credentials/VendsChatApi.credentials.d.ts +9 -0
- package/dist/credentials/VendsChatApi.credentials.js +61 -0
- package/dist/credentials/VendsChatApi.credentials.js.map +1 -0
- package/dist/credentials/vendschat.svg +58 -0
- package/dist/lib/adapters/baseAdapter.d.ts +3 -0
- package/dist/lib/adapters/baseAdapter.js +14 -0
- package/dist/lib/adapters/baseAdapter.js.map +1 -0
- package/dist/lib/adapters/index.d.ts +2 -0
- package/dist/lib/adapters/index.js +21 -0
- package/dist/lib/adapters/index.js.map +1 -0
- package/dist/lib/adapters/instagramAdapter.d.ts +2 -0
- package/dist/lib/adapters/instagramAdapter.js +6 -0
- package/dist/lib/adapters/instagramAdapter.js.map +1 -0
- package/dist/lib/adapters/lineAdapter.d.ts +2 -0
- package/dist/lib/adapters/lineAdapter.js +6 -0
- package/dist/lib/adapters/lineAdapter.js.map +1 -0
- package/dist/lib/adapters/messengerAdapter.d.ts +2 -0
- package/dist/lib/adapters/messengerAdapter.js +6 -0
- package/dist/lib/adapters/messengerAdapter.js.map +1 -0
- package/dist/lib/adapters/telegramAdapter.d.ts +2 -0
- package/dist/lib/adapters/telegramAdapter.js +6 -0
- package/dist/lib/adapters/telegramAdapter.js.map +1 -0
- package/dist/lib/adapters/types.d.ts +6 -0
- package/dist/lib/adapters/types.js +3 -0
- package/dist/lib/adapters/types.js.map +1 -0
- package/dist/lib/adapters/whatsappAdapter.d.ts +2 -0
- package/dist/lib/adapters/whatsappAdapter.js +15 -0
- package/dist/lib/adapters/whatsappAdapter.js.map +1 -0
- package/dist/lib/buildSendMessageRequest.d.ts +19 -0
- package/dist/lib/buildSendMessageRequest.js +125 -0
- package/dist/lib/buildSendMessageRequest.js.map +1 -0
- package/dist/lib/contactFields.d.ts +9 -0
- package/dist/lib/contactFields.js +163 -0
- package/dist/lib/contactFields.js.map +1 -0
- package/dist/lib/events.d.ts +4 -0
- package/dist/lib/events.js +35 -0
- package/dist/lib/events.js.map +1 -0
- package/dist/lib/http.d.ts +10 -0
- package/dist/lib/http.js +20 -0
- package/dist/lib/http.js.map +1 -0
- package/dist/lib/integrationApi.d.ts +8 -0
- package/dist/lib/integrationApi.js +17 -0
- package/dist/lib/integrationApi.js.map +1 -0
- package/dist/lib/productCopy.d.ts +7 -0
- package/dist/lib/productCopy.js +11 -0
- package/dist/lib/productCopy.js.map +1 -0
- package/dist/lib/sendMessageFields.d.ts +2 -0
- package/dist/lib/sendMessageFields.js +257 -0
- package/dist/lib/sendMessageFields.js.map +1 -0
- package/dist/lib/types.d.ts +26 -0
- package/dist/lib/types.js +3 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/vendsChatCodex.d.ts +2 -0
- package/dist/lib/vendsChatCodex.js +12 -0
- package/dist/lib/vendsChatCodex.js.map +1 -0
- package/dist/nodes/VendsChat/VendsChat.node.d.ts +21 -0
- package/dist/nodes/VendsChat/VendsChat.node.js +228 -0
- package/dist/nodes/VendsChat/VendsChat.node.js.map +1 -0
- package/dist/nodes/VendsChat/VendsChat.node.json +19 -0
- package/dist/nodes/VendsChat/VendsChatSendMessage.node.d.ts +17 -0
- package/dist/nodes/VendsChat/VendsChatSendMessage.node.js +130 -0
- package/dist/nodes/VendsChat/VendsChatSendMessage.node.js.map +1 -0
- package/dist/nodes/VendsChat/VendsChatSendMessage.node.json +18 -0
- package/dist/nodes/VendsChat/VendsChatTrigger.node.d.ts +23 -0
- package/dist/nodes/VendsChat/VendsChatTrigger.node.js +200 -0
- package/dist/nodes/VendsChat/VendsChatTrigger.node.js.map +1 -0
- package/dist/nodes/VendsChat/VendsChatTrigger.node.json +19 -0
- package/dist/nodes/VendsChat/vendschat.svg +58 -0
- package/index.js +6 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vendschat
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# n8n-nodes-vendschat
|
|
2
|
+
|
|
3
|
+
Community nodes for [Vendschat](https://vendschat.com): send WhatsApp / Instagram / Messenger messages, manage contacts, and trigger workflows from Vendschat webhook events.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
### n8n UI (recommended)
|
|
8
|
+
|
|
9
|
+
1. Open **Settings → Community nodes**
|
|
10
|
+
2. Select **Install**
|
|
11
|
+
3. Enter: `n8n-nodes-vendschat`
|
|
12
|
+
4. Confirm and restart n8n if prompted
|
|
13
|
+
|
|
14
|
+
### npm (self-hosted)
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install n8n-nodes-vendschat
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Restart your n8n instance after installing.
|
|
21
|
+
|
|
22
|
+
Package: [npmjs.com/package/n8n-nodes-vendschat](https://www.npmjs.com/package/n8n-nodes-vendschat)
|
|
23
|
+
|
|
24
|
+
## Credentials
|
|
25
|
+
|
|
26
|
+
Create a **Vendschat API** credential:
|
|
27
|
+
|
|
28
|
+
| Field | Description |
|
|
29
|
+
|-------|-------------|
|
|
30
|
+
| **Base URL** | Default `https://api.vendschat.com/v1` (local: `http://localhost:8080/v1`) |
|
|
31
|
+
| **API Key** | From Vendschat → **Settings → Integrations** (or API Keys) |
|
|
32
|
+
| **API Key in Header** | `Authorization: Bearer` (default) or `x-api-key` |
|
|
33
|
+
|
|
34
|
+
Webhooks and messaging integrations require a **Growth** or **Advanced** plan.
|
|
35
|
+
|
|
36
|
+
## Nodes
|
|
37
|
+
|
|
38
|
+
### Vendschat Trigger
|
|
39
|
+
|
|
40
|
+
Starts the workflow when subscribed Vendschat events occur (messages, contacts, etc.).
|
|
41
|
+
|
|
42
|
+
1. Add **Vendschat Trigger**
|
|
43
|
+
2. Select events
|
|
44
|
+
3. Activate the workflow — n8n registers a webhook with Vendschat automatically
|
|
45
|
+
|
|
46
|
+
### Vendschat (actions)
|
|
47
|
+
|
|
48
|
+
| Operation | Description |
|
|
49
|
+
|-----------|-------------|
|
|
50
|
+
| **Send Message** | Send WhatsApp, Instagram, or Messenger messages |
|
|
51
|
+
| **Get Contact** | Find a contact by ID, email, or phone |
|
|
52
|
+
| **Create Contact** | Create a contact (phone + email required) |
|
|
53
|
+
| **Update Contact** | Update contact fields |
|
|
54
|
+
| **Delete Contact** | Permanently delete a contact |
|
|
55
|
+
| **Add Label(s) to a Contact** | Dropdown and/or comma-separated names (creates missing labels) |
|
|
56
|
+
| **Remove Label(s)** | Remove labels from a contact only |
|
|
57
|
+
| **Add or Update Note** | Set the contact note |
|
|
58
|
+
|
|
59
|
+
Identify contacts with **Contact ID**, **Email**, or **Phone number** (E.164 recommended).
|
|
60
|
+
|
|
61
|
+
## Development
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm install
|
|
65
|
+
npm run build
|
|
66
|
+
npm run lint
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Link into a local n8n install for testing, or use n8n’s community node development workflow.
|
|
70
|
+
|
|
71
|
+
## Related
|
|
72
|
+
|
|
73
|
+
- API: `https://api.vendschat.com/v1/integrations/*`
|
|
74
|
+
- Zapier / Make siblings use the same integrations API
|
|
75
|
+
- Docs: [docs.vendschat.com](https://docs.vendschat.com)
|
|
76
|
+
|
|
77
|
+
## License
|
|
78
|
+
|
|
79
|
+
[MIT](./LICENSE)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class VendsChatApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
icon: "file:vendschat.svg";
|
|
6
|
+
documentationUrl: string;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VendsChatApi = void 0;
|
|
4
|
+
const DEFAULT_BASE = 'https://api.vendschat.com/v1';
|
|
5
|
+
class VendsChatApi {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.name = 'vendsChatApi';
|
|
8
|
+
this.displayName = 'Vendschat API';
|
|
9
|
+
this.icon = 'file:vendschat.svg';
|
|
10
|
+
this.documentationUrl = 'https://docs.vendschat.com/docs/auth';
|
|
11
|
+
this.properties = [
|
|
12
|
+
{
|
|
13
|
+
displayName: 'Base URL',
|
|
14
|
+
name: 'baseUrl',
|
|
15
|
+
type: 'string',
|
|
16
|
+
default: DEFAULT_BASE,
|
|
17
|
+
placeholder: DEFAULT_BASE,
|
|
18
|
+
description: 'Vendschat API base path (e.g. https://api.vendschat.com/v1).',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'API Key',
|
|
22
|
+
name: 'apiKey',
|
|
23
|
+
type: 'string',
|
|
24
|
+
typeOptions: { password: true },
|
|
25
|
+
default: '',
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
displayName: 'API Key in Header',
|
|
30
|
+
name: 'authType',
|
|
31
|
+
type: 'options',
|
|
32
|
+
options: [
|
|
33
|
+
{ name: 'Authorization: Bearer', value: 'bearer' },
|
|
34
|
+
{ name: 'x-api-key', value: 'xApiKey' },
|
|
35
|
+
],
|
|
36
|
+
default: 'bearer',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
displayName: 'Webhook Secret (optional)',
|
|
40
|
+
name: 'webhookSecret',
|
|
41
|
+
type: 'string',
|
|
42
|
+
typeOptions: { password: true },
|
|
43
|
+
default: '',
|
|
44
|
+
description: 'If set, incoming webhooks must send the same value in the X-VendsChat-Webhook-Secret header (recommended for New Message trigger).',
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
this.test = {
|
|
48
|
+
request: {
|
|
49
|
+
baseURL: '={{$credentials.baseUrl}}',
|
|
50
|
+
url: '/integrations/me',
|
|
51
|
+
method: 'GET',
|
|
52
|
+
headers: {
|
|
53
|
+
Authorization: '={{$credentials.authType === "xApiKey" ? "" : "Bearer " + $credentials.apiKey}}',
|
|
54
|
+
'x-api-key': '={{$credentials.authType === "xApiKey" ? $credentials.apiKey : ""}}',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.VendsChatApi = VendsChatApi;
|
|
61
|
+
//# sourceMappingURL=VendsChatApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VendsChatApi.credentials.js","sourceRoot":"","sources":["../../credentials/VendsChatApi.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAM,YAAY,GAAG,8BAA8B,CAAC;AAEpD,MAAa,YAAY;IAAzB;QACC,SAAI,GAAG,cAAc,CAAC;QACtB,gBAAW,GAAG,eAAe,CAAC;QAC9B,SAAI,GAAG,oBAA6B,CAAC;QACrC,qBAAgB,GAAG,sCAAsC,CAAC;QAC1D,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,YAAY;gBACrB,WAAW,EAAE,YAAY;gBACzB,WAAW,EAAE,8DAA8D;aAC3E;YACD;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACR,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,QAAQ,EAAE;oBAClD,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE;iBACvC;gBACD,OAAO,EAAE,QAAQ;aACjB;YACD;gBACC,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,oIAAoI;aACrI;SACD,CAAC;QAMF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,2BAA2B;gBACpC,GAAG,EAAE,kBAAkB;gBACvB,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE;oBACR,aAAa,EACZ,iFAAiF;oBAClF,WAAW,EAAE,qEAAqE;iBAClF;aACD;SACD,CAAC;IACH,CAAC;CAAA;AA3DD,oCA2DC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
width="1000.0031mm"
|
|
6
|
+
height="1158.7782mm"
|
|
7
|
+
viewBox="0 0 1000.0033 1158.7782"
|
|
8
|
+
version="1.1"
|
|
9
|
+
id="svg1"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
12
|
+
<defs
|
|
13
|
+
id="defs1" />
|
|
14
|
+
<g
|
|
15
|
+
id="layer1"
|
|
16
|
+
transform="translate(7509.5714,-3242.3644)">
|
|
17
|
+
<g
|
|
18
|
+
id="g143"
|
|
19
|
+
transform="matrix(13.675258,0,0,13.675258,-16215.584,520.1177)">
|
|
20
|
+
<path
|
|
21
|
+
style="baseline-shift:baseline;display:inline;overflow:visible;opacity:1;vector-effect:none;fill:#059669;fill-opacity:1;stroke-linecap:round;stroke-linejoin:round;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
|
22
|
+
d="m 1251.4513,19.415869 a 5.7487893,5.7487893 0 0 0 -5.749,5.748486 v 6.229594 a 5.7487893,5.7487893 0 0 0 5.749,5.749003 h 6.2296 a 5.7487893,5.7487893 0 0 0 5.7484,-5.749003 v -1.115694 h 2.6702 c 1.0492,0 1.8551,0.808553 1.8551,1.857768 v 6.865214 c 0,3.21098 2.6466,5.857007 5.8576,5.857007 h 5.4761 v 0.137976 a 3.9469318,3.9469318 0 0 0 3.9466,3.947046 h 4.2772 a 3.9469318,3.9469318 0 0 0 3.9471,-3.947046 v -4.276742 a 3.9469318,3.9469318 0 0 0 -3.9471,-3.947046 h -4.2772 a 3.9469318,3.9469318 0 0 0 -3.9466,3.947046 v 0.13901 h -5.4761 c -1.0492,0 -1.8573,-0.808036 -1.8573,-1.857251 v -6.865214 c 0,-3.21098 -2.6445,-5.857524 -5.8554,-5.857524 h -2.6702 v -1.114144 a 5.7487893,5.7487893 0 0 0 -5.7484,-5.748486 z"
|
|
23
|
+
id="path115" />
|
|
24
|
+
<path
|
|
25
|
+
style="baseline-shift:baseline;display:inline;overflow:visible;opacity:1;vector-effect:none;fill:#059669;fill-opacity:1;stroke-linecap:round;stroke-linejoin:round;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
|
26
|
+
d="m 1289.9342,8.3819173 c -1.7461,0.76744 -3.2863,1.7147917 -4.3134,2.7419517 -0.1122,0.11224 -0.2232,0.23043 -0.3334,0.3545 l 5.4509,3.131592 h 5e-4 v -0.0021 c 1.6514,-0.63163 3.1316,-1.481323 4.0313,-2.380733 0.2083,-0.20828 0.414,-0.447685 0.6149,-0.713135 z"
|
|
27
|
+
id="path114" />
|
|
28
|
+
<path
|
|
29
|
+
style="baseline-shift:baseline;display:inline;overflow:visible;opacity:1;vector-effect:none;fill:#059669;fill-opacity:1;stroke-linecap:round;stroke-linejoin:round;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
|
30
|
+
d="m 1299.5677,7.3416707 c -0.329,-2e-5 -0.6576,0.462599 -1.0113,1.388029 -0.6806,1.7808103 -1.5915,3.4280683 -2.7218,4.5583783 -1.1298,1.12941 -2.777,2.040867 -4.5573,2.721797 -1.8507,0.70783 -1.8504,1.316736 5e-4,2.024166 1.7805,0.68055 3.4269,1.592025 4.5568,2.722315 1.1298,1.12983 2.0414,2.776368 2.7223,4.556828 0.7078,1.85073 1.3169,1.85089 2.0242,0 0.6806,-1.78075 1.5916,-3.428088 2.7213,-4.558378 1.1297,-1.12978 2.7765,-2.041008 4.5568,-2.721798 1.8507,-0.70775 1.8508,-1.316546 0,-2.024166 -1.7803,-0.68067 -3.4273,-1.591988 -4.5574,-2.721798 -1.1298,-1.13018 -2.0411,-2.777134 -2.7218,-4.5573443 -0.3538,-0.92538 -0.6833,-1.388009 -1.0123,-1.388029 z"
|
|
31
|
+
id="path113" />
|
|
32
|
+
<path
|
|
33
|
+
style="baseline-shift:baseline;display:inline;overflow:visible;opacity:1;vector-effect:none;fill:#059669;fill-opacity:1;stroke-linecap:round;stroke-linejoin:round;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
|
34
|
+
d="m 1269.1344,-1.7802531 c -2.0362,1.75e-5 -4.0371,0.5344693 -5.8027,1.54874268 L 1241.935,12.057662 c -3.5921,2.06321 -5.8124,5.900368 -5.8125,10.042798 v 24.935429 c 10e-5,4.14244 2.2204,7.980104 5.8125,10.043314 l 10.8066,6.206857 -0.232,-0.232544 a 2.50025,2.50025 0 0 0 0.4491,0.355533 c 2.2002,1.36647 3.5467,3.790736 3.5465,6.416146 0,0.89815 -0.1587,1.772403 -0.4547,2.590023 -0.2938,0.81125 -0.5343,1.438801 -0.7189,2.032951 -0.092,0.29708 -0.1784,0.57723 -0.2304,0.98857 -0.052,0.41134 -0.2013,1.112628 0.4785,2.070158 0.6798,0.95754 2.0247,1.175645 2.5993,1.101225 0.5746,-0.0744 0.8653,-0.217727 1.1684,-0.353467 0.6062,-0.27148 1.1793,-0.607163 1.9648,-1.058333 l 35.0216,-20.117119 c 3.592,-2.06323 5.8119,-5.898827 5.812,-10.041247 V 25.43514 c -0.056,0.13644 -0.1106,0.274321 -0.1638,0.413411 -0.2024,0.52974 -0.3994,0.968249 -0.7012,1.384929 -0.3019,0.41667 -0.8434,0.968466 -1.711,0.968416 -0.8676,-6e-5 -1.4107,-0.549759 -1.7126,-0.966349 -0.3019,-0.41659 -0.4987,-0.857316 -0.7012,-1.386996 0,-0.0084 -0.01,-0.01627 -0.01,-0.02429 v 21.213692 c -8e-4,2.35952 -1.2565,4.529808 -3.3026,5.705078 l -32.6311,18.744075 c 0.077,-0.56148 0.293,-1.086984 0.293,-1.661914 3e-4,-4.2393 -2.157,-8.16989 -5.6833,-10.47843 a 2.50025,2.50025 0 0 0 -0.3008,-0.230477 l -11.096,-6.373254 c -2.0466,-1.17556 -3.3025,-3.346875 -3.3026,-5.707145 V 22.10046 c 10e-5,-2.36026 1.256,-4.531575 3.3026,-5.707145 L 1265.822,4.102592 c 0.1665,-0.0957 0.3367,-0.1840734 0.51,-0.2645834 0.1603,-0.17727 0.3357,-0.3234702 0.4997,-0.4423502 0.4836,-0.35047 1.0237,-0.5978076 1.6873,-0.8516276 2.1668,-0.82875 4.1248,-1.9419321 5.3516,-3.1682821 0.034,-0.0339 0.067,-0.0683029 0.1013,-0.10335287 -1.5148,-0.69163623 -3.164,-1.05263453 -4.8375,-1.05264893 z"
|
|
35
|
+
id="path112" />
|
|
36
|
+
<path
|
|
37
|
+
style="baseline-shift:baseline;display:inline;overflow:visible;opacity:1;vector-effect:none;fill:#059669;fill-opacity:1;stroke-linecap:round;stroke-linejoin:round;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
|
38
|
+
d="m 1279.7451,-7.2321167 c -0.4242,-2e-5 -0.8487,0.5967316 -1.3048,1.7900716 -0.8776,2.29631 -2.0523,4.4206742 -3.5099,5.87819419 -1.4568,1.45636001 -3.5804,2.63181331 -5.8761,3.50986331 -2.3864,0.91275 -2.3862,1.6974398 5e-4,2.6096598 2.296,0.87756 4.4193,2.0528698 5.8762,3.5103798 1.4569,1.45691 2.6323,3.580257 3.5103,5.876127 0.9127,2.38651 1.698,2.38671 2.6102,0 0.8776,-2.29625 2.0522,-4.420704 3.5089,-5.878194 1.4569,-1.45683 3.5805,-2.6314663 5.8761,-3.5093463 2.3865,-0.91262 2.3866,-1.6982234 0,-2.6106934 -2.2957,-0.87771 -4.4194,-2.0529933 -5.8767,-3.50986327 -1.4568,-1.45735003 -2.6321,-3.58058713 -3.5098,-5.87612713 -0.4563,-1.19327 -0.8806,-1.7900516 -1.3049,-1.7900716 z"
|
|
39
|
+
id="path102" />
|
|
40
|
+
</g>
|
|
41
|
+
<path
|
|
42
|
+
id="path128"
|
|
43
|
+
style="fill:#059669;fill-opacity:1;stroke:none;stroke-width:68.3763;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
44
|
+
d="m -387.69964,656.16656 c -5.80104,-2.8e-4 -11.60606,8.16041 -17.84335,24.47964 -12.0014,31.40263 -28.06558,60.44711 -47.99863,80.37908 -19.92212,19.91609 -48.96307,35.99054 -80.35736,47.9981 -32.63463,12.4821 -32.63167,23.21289 0.007,35.68774 31.39839,12.00086 60.43337,28.07351 80.35685,48.00534 19.92349,19.92362 35.99898,48.96075 48.00586,80.35737 12.48141,32.63617 23.22041,32.63897 35.69498,0 12.0014,-31.40181 28.06288,-60.447 47.98363,-80.37855 19.92349,-19.92252 48.966,-35.99288 80.35892,-47.99811 32.63601,-12.48032 32.63737,-23.21672 0,-35.69498 -31.39429,-12.00291 -60.43669,-28.07555 -80.36564,-47.99862 -19.92212,-19.92964 -35.99585,-48.96527 -47.99862,-80.35737 -6.24002,-16.31827 -12.04094,-24.47937 -17.84335,-24.47964 z m -145.11776,74.55462 0.014,10e-4 c -27.84693,1.3e-4 -55.20826,7.30918 -79.3533,21.17958 L -904.7621,919.9592 c -49.1229,28.21493 -79.48628,80.6891 -79.48765,137.3379 v 340.9983 c 10e-4,56.6489 30.36475,109.1302 79.48765,137.3451 l 147.78272,84.8806 -3.17242,-3.1801 a 34.191564,34.191564 0 0 0 6.14019,4.8617 c 30.0883,18.6868 48.50314,51.8392 48.5004,87.7424 0,12.2824 -2.17138,24.2384 -6.21926,35.4196 -4.01779,11.094 -7.30544,19.6757 -9.82989,27.8009 -1.25812,4.0626 -2.44114,7.8939 -3.15226,13.519 -0.71111,5.6252 -2.7511,15.2154 6.54534,28.3099 9.29644,13.0946 27.68783,16.0773 35.54563,15.0596 7.8578,-1.0175 11.83338,-2.9775 15.97835,-4.8338 8.28994,-3.7125 16.12569,-8.3033 26.86761,-14.4731 l 478.93098,-275.1067 c 49.12153,-28.2152 79.47905,-80.668 79.480417,-137.3167 V 1102.9 c -0.765814,1.8658 -1.512132,3.7513 -2.239656,5.6534 -2.767872,7.2443 -5.461886,13.2407 -9.589079,18.9389 -4.009585,5.5328 -11.104562,12.8056 -22.374342,13.2225 v -0.01 c -0.34188,0.013 -0.68367,0.027 -1.03922,0.027 -11.85372,-0.01 -19.27946,-7.5211 -23.40529,-13.2152 -4.12856,-5.697 -6.82138,-11.7238 -9.59062,-18.9673 0,-0.1094 -0.13643,-0.2229 -0.13643,-0.3323 v 0.055 c -8.62635,-22.474 -20.19548,-42.5982 -32.45125,-54.853 -12.30363,-12.309 -32.54458,-23.9539 -55.1279,-32.5856 -7.24378,-2.7687 -13.24334,-5.4627 -18.94045,-9.5896 -5.69848,-4.127 -13.21816,-11.53392 -13.2209,-23.39858 -0.003,-11.86479 7.52379,-19.26236 13.2209,-23.39133 5.68344,-4.1183 11.66529,-6.84112 18.88309,-9.60407 l 0.007,0.007 h 0.008 v -0.007 c 0.002,-6.2e-4 0.003,-10e-4 0.004,-0.002 l 5.2e-4,-5.1e-4 v -5.2e-4 l 5.1e-4,-5.2e-4 v -5.1e-4 -5.2e-4 -5.2e-4 -5.1e-4 -5.2e-4 l -5.1e-4,-5.2e-4 c -7.7e-4,-10e-4 -0.003,-0.003 -0.004,-0.004 -2.1e-4,-2.8e-4 -8.8e-4,-10e-4 -0.001,-0.002 v -5.2e-4 -5.2e-4 c 13.51526,-5.16911 26.19337,-11.40688 36.83135,-18.21852 v -0.014 c 7.13165,-4.56767 13.34428,-9.39603 18.28105,-14.33143 2.84855,-2.84829 5.66298,-6.12228 8.41034,-9.75238 l -74.54118,-42.83252 c -12.93406,5.68453 -24.79843,12.1772 -35.4118,19.08772 l -0.19172,-0.10955 h -0.007 c -8.99969,5.85575 -16.92866,12.0734 -23.37791,18.52238 -1.53437,1.53491 -3.05085,3.15108 -4.55786,4.84777 l 0.28681,0.16278 c -15.04826,16.86378 -28.71254,41.14961 -39.0524,68.20255 -3.46941,9.07613 -6.84676,16.45947 -11.63857,23.07357 -4.79181,6.6139 -12.86166,14.5869 -25.37726,14.5861 -12.51559,-7e-4 -20.55702,-7.9733 -25.34884,-14.5861 -4.79317,-6.613 -8.17501,-13.9984 -11.6458,-23.07357 -11.33268,-29.63305 -26.57059,-56.40705 -43.34877,-73.18468 -16.7768,-16.78364 -43.55313,-32.02228 -73.18468,-43.34826 -9.07626,-3.46873 -16.45829,-6.82745 -23.07301,-11.61789 -6.61336,-4.79045 -14.58209,-12.86139 -14.58619,-25.37726 -10e-4,-8.65617 3.82675,-15.14148 8.36693,-19.9285 0.58804,-0.61949 1.18943,-1.19099 1.79524,-1.75235 1.47556,-1.36986 2.98128,-2.64316 4.42402,-3.68918 6.61335,-4.79263 13.99811,-8.1754 23.07301,-11.64632 15.22467,-5.82306 29.69585,-12.67322 42.44392,-20.23236 12.06295,-7.15257 22.58484,-14.94152 30.74076,-23.09471 0.46496,-0.46359 0.91586,-0.93389 1.38492,-1.41335 -20.71392,-9.45822 -43.26701,-14.39471 -66.15255,-14.39499 z m 416.19734,124.74588 c -4.49916,-2.7e-4 -8.99323,6.32578 -13.83017,18.98127 -9.30738,24.35304 -21.76383,46.87999 -37.22098,62.33728 -15.4503,15.44497 -37.97777,27.90961 -62.32384,37.2215 -25.3088,9.67976 -25.30446,17.99951 0.007,27.67379 24.3488,9.3067 46.86494,21.7712 62.31661,37.2282 15.45031,15.4507 27.91674,37.9745 37.22822,62.3228 9.67935,25.3092 18.009,25.3112 27.68151,0 9.307381,-24.3522 21.76378,-46.8797 37.212719,-62.3368 15.448939,-15.45 37.971065,-27.9115 62.3171269,-37.2215 25.3087991,-9.6786 25.3101671,-18.00407 0,-27.68096 -24.3460619,-9.30834 -46.8694349,-21.77778 -62.3238439,-37.22822 -15.450307,-15.4555 -27.912232,-37.97126 -37.220982,-62.31609 -4.8383,-12.65481 -9.34444,-18.98099 -13.8436,-18.98127 z M -767.0553,1025.8954 h 85.1917 a 78.616177,78.616177 0 0 1 78.61071,78.619 v 15.229 h 36.5156 c 43.90988,0 80.07418,36.1923 80.07418,80.1032 v 93.8836 c 0,14.3483 11.05089,25.4052 25.39897,25.4052 h 74.8869 v -1.9007 a 53.975311,53.975311 0 0 1 53.97758,-53.977 h 58.48532 a 53.975311,53.975311 0 0 1 53.97759,53.977 v 58.4854 a 53.975311,53.975311 0 0 1 -53.97759,53.977 h -58.48532 a 53.975311,53.975311 0 0 1 -53.97758,-53.977 v -1.8868 h -74.8869 c -43.91126,0 -80.10261,-36.1921 -80.10261,-80.1031 v -93.8836 c 0,-14.3482 -11.02246,-25.3985 -25.37054,-25.3985 h -36.5156 v 15.2575 a 78.616177,78.616177 0 0 1 -78.61071,78.6122 h -85.1917 a 78.616177,78.616177 0 0 1 -78.61897,-78.6122 v -85.1912 a 78.616177,78.616177 0 0 1 78.61897,-78.619 z" />
|
|
45
|
+
<path
|
|
46
|
+
id="path164"
|
|
47
|
+
style="baseline-shift:baseline;display:inline;overflow:visible;vector-effect:none;fill:#059669;fill-opacity:1;stroke-width:13.6608;stroke-linecap:round;stroke-linejoin:round;enable-background:accumulate;stop-color:#000000"
|
|
48
|
+
d="m -2807.2588,911.48948 c -5.7649,-4.1e-4 -11.5297,8.11095 -17.7263,24.32671 -11.9258,31.20313 -27.8885,60.06453 -47.6939,79.87011 -19.7958,19.7896 -48.6542,35.762 -79.8486,47.6933 -32.4279,12.4028 -32.4238,23.0638 0.01,35.4594 31.1984,11.9245 60.0514,27.8951 79.8486,47.7005 19.7972,19.797 35.7694,48.6515 47.7007,79.8489 12.4026,32.4285 23.0717,32.4313 35.4661,0 11.9259,-31.2025 27.8858,-60.065 47.6802,-79.8701 19.7959,-19.7959 48.6543,-35.7644 79.8487,-47.6934 32.4279,-12.4011 32.4293,-23.0745 0,-35.4734 -31.1944,-11.9267 -60.0528,-27.8967 -79.8569,-47.6934 -19.7944,-19.80319 -35.7584,-48.6493 -47.6857,-79.84191 -6.1992,-16.21467 -11.975,-24.32644 -17.7398,-24.32671 z m -186.9123,60.42149 c -27.8174,0 -55.1773,7.27273 -79.2981,21.12872 l -292.2669,167.90791 c -49.0695,28.1851 -79.4019,80.5753 -79.4033,137.1642 v 340.6657 c 0,56.589 30.3338,108.9863 79.4033,137.1713 l 147.6266,84.8187 -3.1133,-3.1202 a 34.155365,34.155365 0 0 0 6.0503,4.8004 c 30.0565,18.667 48.4576,51.7844 48.4562,87.6496 0,12.2693 -2.1475,24.2123 -6.1924,35.3817 -4.0122,11.0823 -7.325,19.6268 -9.8467,27.7434 -1.2568,4.0582 -2.4098,7.9137 -3.1215,13.5329 -0.7104,5.6192 -2.7486,15.1711 6.538,28.2517 9.2853,13.0806 27.6385,16.0955 35.4866,15.0789 7.8495,-1.0164 11.8426,-3.0026 15.9831,-4.8569 8.2812,-3.7087 16.0815,-8.273 26.8121,-14.4365 l 478.4442,-274.8155 c 49.0695,-28.1854 79.4019,-80.6108 79.4033,-137.1995 v -220.1404 c -7.0517,7.234 -18.1115,14.7551 -34.1465,14.7541 -21.4556,0 -34.0126,-13.4722 -39.9701,-21.6935 -5.9575,-8.2214 -9.0243,-15.4628 -12.1417,-23.6138 -7.9547,-20.7981 -18.7289,-38.7696 -27.8775,-47.9191 -9.1487,-9.1521 -27.103,-19.9363 -47.8988,-27.8847 -8.1514,-3.1155 -15.4121,-6.1793 -23.6346,-12.1351 -8.2224,-5.9559 -21.6892,-18.5137 -21.6933,-39.9704 -0.01,-21.4567 13.4709,-34.0115 21.6933,-39.9703 8.2225,-5.9589 15.4559,-9.0178 23.6072,-12.1352 20.7986,-7.9551 38.7775,-18.7394 47.9262,-27.8846 6.0872,-6.0876 12.8916,-16.0761 19.11,-28.2094 l -18.9625,-10.8926 c -23.528,10.0384 -43.7719,22.5309 -55.6486,34.4076 -13.5105,13.5172 -27.7887,37.8447 -38.3676,65.5253 -3.7991,9.9387 -7.5353,18.5275 -14.1403,27.6446 -6.605,9.1171 -19.7999,23.0292 -41.8908,23.0278 -22.0908,0 -35.2858,-13.8848 -41.8908,-22.9995 -6.605,-9.1148 -10.3111,-17.7355 -14.1115,-27.6729 -10.5831,-27.6742 -24.8845,-51.9853 -38.3964,-65.4972 -13.5091,-13.5156 -37.8335,-27.82 -65.5034,-38.3961 -9.9383,-3.7985 -18.55,-7.5159 -27.6659,-14.1188 -9.1158,-6.6028 -23.0225,-19.7916 -23.0279,-41.8834 -0.01,-22.0918 13.9121,-35.284 23.0279,-41.8905 9.1145,-6.6065 17.7071,-10.3393 27.644,-14.14 21.9706,-8.4032 41.8334,-19.1604 55.8466,-29.9954 l -3.5791,-2.05431 c -24.1208,-13.85599 -51.452,-21.12872 -79.2694,-21.12872 z m 416.8013,156.01993 c -4.4944,-3e-4 -8.9901,6.3264 -13.822,18.9685 -9.2975,24.3273 -21.7411,46.8301 -37.1819,62.271 -15.4339,15.4287 -37.9305,27.8799 -62.2508,37.182 -25.282,9.6695 -25.2765,17.9805 0.01,27.6446 24.323,9.2968 46.8142,21.7482 62.2495,37.1889 15.4339,15.4343 27.8871,37.9343 37.1887,62.2568 9.6691,25.2824 17.9831,25.2846 27.6453,0 9.2976,-24.3264 21.7494,-46.8303 37.1819,-62.2709 15.4326,-15.4337 37.9292,-27.8818 62.2495,-37.1819 25.282,-9.6684 25.2834,-17.9921 0,-27.6587 -24.3203,-9.2985 -46.8196,-21.7478 -62.2577,-37.1819 -15.4339,-15.4392 -27.883,-37.9308 -37.1819,-62.2499 -4.8331,-12.6414 -9.3344,-18.9682 -13.8288,-18.9685 z m -650.8132,138.8372 h 85.0944 a 78.532946,78.532946 0 0 1 78.5358,78.5358 v 22.0466 h 36.4688 c 40.1723,0 73.1631,33.0116 73.1631,73.1848 v 93.7842 c 0,18.0245 14.1812,32.2051 32.2052,32.2051 h 74.801 v -8.7326 a 53.918167,53.918167 0 0 1 53.9205,-53.9197 h 58.4299 a 53.918167,53.918167 0 0 1 53.9136,53.9197 v 58.4308 a 53.918167,53.918167 0 0 1 -53.9136,53.9126 h -58.4299 a 53.918167,53.918167 0 0 1 -53.9205,-53.9126 v -8.7185 h -74.801 c -40.1736,0 -73.1849,-33.0118 -73.1849,-73.1848 v -93.7842 c 0,-18.0247 -14.1594,-32.205 -32.1834,-32.205 h -36.4688 v 22.0748 a 78.532946,78.532946 0 0 1 -78.5358,78.5288 h -85.0944 a 78.532946,78.532946 0 0 1 -78.5358,-78.5288 v -85.1012 a 78.532946,78.532946 0 0 1 78.5358,-78.5358 z" />
|
|
49
|
+
<path
|
|
50
|
+
id="path164-5"
|
|
51
|
+
style="baseline-shift:baseline;display:inline;overflow:visible;vector-effect:none;fill:#05ad7d;fill-opacity:1;stroke-width:13.6608;stroke-linecap:round;stroke-linejoin:round;enable-background:accumulate;stop-color:#000000"
|
|
52
|
+
d="m -4711.7308,3223.9478 c -5.7649,0 -11.5296,8.1118 -17.7262,24.3271 -11.9258,31.2039 -27.8885,60.0649 -47.6938,79.8703 -19.7958,19.789 -48.6542,35.7611 -79.8485,47.6924 -32.4278,12.404 -32.4237,23.0649 0.01,35.4607 31.1983,11.9244 60.0513,27.8938 79.8485,47.6992 19.7971,19.7971 35.7693,48.6514 47.7006,79.8498 12.4025,32.428 23.0716,32.4307 35.466,0 11.9259,-31.2025 27.8858,-60.065 47.6801,-79.8703 19.7959,-19.7958 48.6542,-35.7639 79.8486,-47.6938 32.4278,-12.4012 32.4292,-23.0744 0,-35.4729 -31.1944,-11.9272 -60.0527,-27.8966 -79.8568,-47.6938 -19.7943,-19.8027 -35.7583,-48.6487 -47.6856,-79.8416 -6.1992,-16.214 -11.975,-24.3257 -17.7398,-24.3271 z m -186.9119,60.4215 c -27.8174,0 -55.1772,7.273 -79.298,21.1292 l -292.2663,167.9083 c -49.0695,28.1849 -79.4018,80.5739 -79.4032,137.1636 v 340.6651 c 0,56.5883 30.3337,108.9855 79.4032,137.1703 l 147.6263,84.8197 -3.1133,-3.1215 a 34.155303,34.155303 0 0 0 6.0503,4.8004 c 30.0564,18.6674 48.4575,51.7852 48.4547,87.6501 0,12.2688 -2.1461,24.2124 -6.191,35.3813 -4.0122,11.083 -7.325,19.6265 -9.8467,27.7437 -1.2568,4.0586 -2.4098,7.9137 -3.1215,13.5324 -0.7104,5.62 -2.7486,15.1715 6.538,28.2517 9.2853,13.0816 27.6385,16.0965 35.4866,15.0788 7.8494,-1.0109 11.8425,-3.0026 15.983,-4.8564 8.2812,-3.7089 16.0815,-8.273 26.8121,-14.4367 l 478.4433,-274.8148 c 49.0694,-28.1848 79.4018,-80.6107 79.4032,-137.199 v -220.1403 c -7.0517,7.2347 -18.1115,14.7549 -34.1465,14.7535 -21.4555,0 -34.0125,-13.4722 -39.97,-21.6932 -5.9575,-8.2211 -9.0243,-15.4627 -12.1417,-23.614 -7.9547,-20.7971 -18.7289,-38.7692 -27.8774,-47.9179 -9.1487,-9.1527 -27.103,-19.9364 -47.8988,-27.8856 -8.1513,-3.1147 -15.412,-6.1788 -23.6345,-12.1349 -8.2224,-5.9561 -21.6892,-18.5131 -21.6933,-39.97 -0.01,-21.4569 13.4709,-34.0112 21.6933,-39.97 8.2225,-5.9589 15.4559,-9.0174 23.6071,-12.1348 20.7986,-7.956 38.7775,-18.7399 47.9262,-27.8858 6.0872,-6.0872 12.8915,-16.076 19.1099,-28.2094 l -18.9624,-10.8917 c -23.528,10.0379 -43.7719,22.5306 -55.6485,34.4073 -13.5105,13.5173 -27.7887,37.8444 -38.3676,65.5252 -3.7991,9.9382 -7.5353,18.5281 -14.1402,27.6439 -6.605,9.1172 -19.7999,23.0293 -41.8908,23.0279 -22.0907,0 -35.2857,-13.8848 -41.8907,-22.9993 -6.605,-9.1143 -10.3111,-17.7356 -14.1115,-27.6725 -10.583,-27.674 -24.8844,-51.9846 -38.3963,-65.4965 -13.5091,-13.516 -37.8334,-27.8201 -65.5033,-38.3963 -9.9383,-3.799 -18.5499,-7.5161 -27.6658,-14.1197 -9.1158,-6.6023 -23.0225,-19.7903 -23.0279,-41.8825 -0.01,-22.0922 13.9121,-35.2844 23.0279,-41.8907 9.1145,-6.6064 17.707,-10.3399 27.6439,-14.1403 21.9706,-8.4027 41.8334,-19.1606 55.8465,-29.995 l -3.5791,-2.0544 c -24.1207,-13.8562 -51.4519,-21.1292 -79.2692,-21.1292 z m 416.8005,156.0195 c -4.4944,0 -8.9901,6.3277 -13.822,18.9694 -9.2974,24.327 -21.741,46.8304 -37.1818,62.2712 -15.4339,15.4283 -37.9304,27.8788 -62.2507,37.1818 -25.2819,9.6691 -25.2764,17.9803 0.01,27.6438 24.323,9.2975 46.8141,21.748 62.2494,37.1888 15.4339,15.4352 27.8871,37.9345 37.1886,62.2575 9.6691,25.2819 17.9831,25.2846 27.6453,0 9.2976,-24.3271 21.7494,-46.8305 37.1818,-62.2712 15.4326,-15.4339 37.9292,-27.8817 62.2494,-37.1819 25.282,-9.6676 25.2834,-17.9925 0,-27.6589 -24.3202,-9.2989 -46.8195,-21.748 -62.2576,-37.1818 -15.4338,-15.4394 -27.8829,-37.9305 -37.1818,-62.2493 -4.8331,-12.6417 -9.3344,-18.968 -13.8288,-18.9694 z m -650.8188,118.3513 h 85.1078 c 54.4463,0 99.0146,44.5751 99.0146,99.0227 v 22.0526 h 15.983 c 40.1723,0 73.1848,33.0112 73.1848,73.1847 v 93.7839 c 0,18.0253 14.1512,32.1765 32.1765,32.1765 h 54.322 v -8.7101 c 0,-40.8525 33.5673,-74.421 74.4197,-74.421 h 58.4025 c 40.8525,0 74.4197,33.5685 74.4197,74.421 v 58.4298 c 0,40.8524 -33.5672,74.4211 -74.4197,74.4211 h -58.4025 c -40.8524,0 -74.4197,-33.5687 -74.4197,-74.4211 v -8.732 h -54.322 c -40.1735,0 -73.1574,-32.9907 -73.1574,-73.1642 v -93.7839 c 0,-18.0239 -14.1799,-32.2052 -32.2039,-32.2052 h -15.983 v 22.0759 c 0,54.4463 -44.5683,99.0145 -99.0146,99.0145 h -85.1078 c -54.4477,0 -99.0159,-44.5682 -99.0159,-99.0145 v -85.108 c 0,-54.4476 44.5682,-99.0227 99.0159,-99.0227 z m 0,40.9864 c -32.2995,0 -58.0364,25.7369 -58.0364,58.0363 v 85.108 c 0,32.298 25.7369,58.0348 58.0364,58.0348 h 85.1078 c 32.2982,0 58.035,-25.7368 58.035,-58.0348 v -85.108 c 0,-32.2994 -25.7368,-58.0363 -58.035,-58.0363 z m 434.2084,237.0824 c -18.7043,0 -33.4401,14.7373 -33.4401,33.4415 v 58.4298 c 0,18.7043 14.7358,33.4129 33.4401,33.4129 h 58.4025 c 18.7043,0 33.4333,-14.7086 33.4333,-33.4129 v -58.4298 c 0,-18.7042 -14.729,-33.4415 -33.4333,-33.4415 z" />
|
|
53
|
+
<path
|
|
54
|
+
id="path174"
|
|
55
|
+
style="baseline-shift:baseline;display:inline;overflow:visible;vector-effect:none;fill:#05ad7d;fill-opacity:1;stroke-width:13.6608;stroke-linecap:round;stroke-linejoin:round;enable-background:accumulate;stop-color:#000000"
|
|
56
|
+
d="m -6871.6908,3242.3644 c -5.7649,0 -11.5297,8.1104 -17.7263,24.3271 -11.9258,31.2026 -27.8885,60.0637 -47.6939,79.8691 -19.7958,19.7904 -48.6542,35.7626 -79.8486,47.6939 -32.4279,12.4026 -32.4238,23.0635 0.01,35.4593 31.1984,11.9245 60.0514,27.8953 79.8486,47.7007 19.7972,19.7972 35.7694,48.6515 47.7007,79.8486 12.4012,32.428 23.0717,32.4321 35.4661,0 11.9259,-31.2026 27.8858,-60.065 47.6802,-79.8704 19.7959,-19.7959 48.6543,-35.764 79.8487,-47.6926 32.4279,-12.4012 32.4293,-23.0744 0,-35.4743 -31.1944,-11.9258 -60.0528,-27.8967 -79.8569,-47.6925 -19.7958,-19.804 -35.7584,-48.6501 -47.6857,-79.8418 -6.1992,-16.2153 -11.975,-24.3271 -17.7398,-24.3271 z m -186.9123,60.4216 c -27.8174,0 -55.1773,7.273 -79.2981,21.1292 l -292.2669,167.9073 c -49.0709,28.185 -79.4019,80.5754 -79.4033,137.1638 v 340.6657 c 0,56.5898 30.3324,108.9871 79.4033,137.172 l 147.6266,84.8184 -3.1133,-3.1201 a 34.155365,34.155365 0 0 0 6.0503,4.8004 c 30.0551,18.6675 48.4576,51.7839 48.4548,87.6489 0,12.2702 -2.1461,24.2124 -6.191,35.3828 -4.0122,11.0817 -7.325,19.6265 -9.8467,27.7423 -1.2568,4.0587 -2.4098,7.9137 -3.1215,13.5338 -0.7104,5.6187 -2.7486,15.1703 6.538,28.2518 9.2853,13.0802 27.6385,16.0952 35.4866,15.0788 7.8495,-1.0109 11.8426,-3.0026 15.9831,-4.8578 8.2812,-3.7075 16.0815,-8.2729 26.8121,-14.4353 l 478.4428,-274.8167 c 49.0709,-28.1849 79.4033,-80.6109 79.4047,-137.1993 v -220.1407 c -7.0517,7.2347 -18.1115,14.7564 -34.1465,14.755 -21.4556,0 -34.0126,-13.4723 -39.9701,-21.6933 -5.9575,-8.2211 -9.0243,-15.4627 -12.1417,-23.614 -7.9547,-20.7986 -18.7289,-38.7693 -27.8775,-47.9193 -9.15,-9.1514 -27.103,-19.9366 -47.8988,-27.8844 -8.1514,-3.116 -15.4121,-6.1801 -23.6346,-12.1349 -8.2224,-5.9561 -21.6892,-18.5144 -21.6933,-39.9714 -0.01,-21.4556 13.4709,-34.0113 21.6933,-39.9701 8.2225,-5.9588 15.4559,-9.0175 23.6072,-12.1349 20.7986,-7.9546 38.7775,-18.7398 47.9262,-27.8844 6.0872,-6.0872 12.8916,-16.076 19.1087,-28.2095 l -18.9612,-10.8931 c -23.528,10.0393 -43.7719,22.5308 -55.6486,34.4074 -13.5105,13.5174 -27.7901,37.8459 -38.3676,65.5253 -3.7991,9.9396 -7.5353,18.5281 -14.1403,27.6454 -6.605,9.1172 -19.7999,23.0293 -41.8908,23.0279 -22.0908,0 -35.2858,-13.8848 -41.8908,-22.9993 -6.605,-9.1158 -10.3111,-17.7357 -14.1115,-27.674 -10.5844,-27.674 -24.8845,-51.9847 -38.3964,-65.4966 -13.5105,-13.516 -37.8335,-27.8202 -65.5034,-38.3963 -9.9383,-3.7977 -18.55,-7.5162 -27.6659,-14.1184 -9.1158,-6.6037 -23.0225,-19.7918 -23.0279,-41.884 -0.01,-22.0908 13.9121,-35.2831 23.0279,-41.8908 9.1145,-6.6063 17.7071,-10.3385 27.644,-14.1389 21.9706,-8.4041 41.8334,-19.1606 55.8466,-29.9963 l -3.5791,-2.0532 c -24.1208,-13.8562 -51.452,-21.1292 -79.2694,-21.1292 z m 416.8013,156.0198 c -4.4944,0 -8.9901,6.3263 -13.822,18.968 -9.2975,24.3285 -21.7411,46.8305 -37.1819,62.2713 -15.4339,15.4285 -37.9305,27.8803 -62.2508,37.1819 -25.282,9.6691 -25.2765,17.9803 0.01,27.6453 24.323,9.2962 46.8155,21.748 62.2508,37.1888 15.4339,15.4339 27.8871,37.9346 37.1887,62.2562 9.6691,25.2834 17.9817,25.2848 27.644,0 9.2975,-24.3257 21.7493,-46.8305 37.1819,-62.2713 15.4326,-15.4325 37.9305,-27.8816 62.2508,-37.1805 25.282,-9.6691 25.2834,-17.9926 0,-27.659 -24.3203,-9.2989 -46.8196,-21.748 -62.2577,-37.1819 -15.4339,-15.4394 -27.883,-37.9305 -37.1819,-62.2508 -4.8331,-12.6403 -9.3344,-18.968 -13.8288,-18.968 z m -659.3348,121.1397 h 69.8039 c 46.6474,0 84.8963,38.2488 84.8963,84.8963 v 14.4217 h 15.968 c 40.1737,0 73.1849,32.9839 73.1849,73.1575 v 93.784 c 0,18.0241 14.1813,32.2053 32.2053,32.2053 h 54.3085 v -14.4094 c 0,-46.6474 38.2488,-84.8963 84.8962,-84.8963 h 69.8025 c 46.6475,0 84.8963,38.2489 84.8963,84.8963 v 69.8039 c 0,46.6474 -38.2488,84.8963 -84.8963,84.8963 h -69.8025 c -46.6474,0 -84.8962,-38.2489 -84.8962,-84.8963 v -14.4149 h -54.3085 c -40.1736,0 -73.1917,-33.0126 -73.1917,-73.1849 v -93.784 c 0,-18.0254 -14.1731,-32.1766 -32.1985,-32.1766 h -15.968 v 14.4081 c 0,46.6474 -38.2489,84.8962 -84.8963,84.8962 h -69.8039 c -46.6475,0 -84.8963,-38.2488 -84.8963,-84.8962 v -69.8107 c 0,-46.6475 38.2488,-84.8963 84.8963,-84.8963 z m 0,40.9864 c -24.4992,0 -43.9167,19.4106 -43.9167,43.9099 v 69.8107 c 0,24.4992 19.4175,43.9084 43.9167,43.9084 h 69.8039 c 24.4992,0 43.9166,-19.4092 43.9166,-43.9084 v -69.8107 c 0,-24.4993 -19.4174,-43.9099 -43.9166,-43.9099 z m 415.2631,199.1523 c -24.4992,0 -43.9166,19.4175 -43.9166,43.9167 v 69.8039 c 0,24.4992 19.4174,43.9167 43.9166,43.9167 h 69.8025 c 24.4993,0 43.9167,-19.4175 43.9167,-43.9167 v -69.8039 c 0,-24.4992 -19.4174,-43.9167 -43.9167,-43.9167 z" />
|
|
57
|
+
</g>
|
|
58
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.baseAdapter = void 0;
|
|
4
|
+
exports.createNoopAdapter = createNoopAdapter;
|
|
5
|
+
const noop = () => {
|
|
6
|
+
};
|
|
7
|
+
exports.baseAdapter = {
|
|
8
|
+
id: 'base',
|
|
9
|
+
validateOrNormalizeContent: noop,
|
|
10
|
+
};
|
|
11
|
+
function createNoopAdapter(id) {
|
|
12
|
+
return { id, validateOrNormalizeContent: noop };
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=baseAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseAdapter.js","sourceRoot":"","sources":["../../../lib/adapters/baseAdapter.ts"],"names":[],"mappings":";;;AAcA,8CAEC;AAdD,MAAM,IAAI,GAAmD,GAAG,EAAE;AAElE,CAAC,CAAC;AAKW,QAAA,WAAW,GAAqB;IAC5C,EAAE,EAAE,MAAM;IACV,0BAA0B,EAAE,IAAI;CAChC,CAAC;AAEF,SAAgB,iBAAiB,CAAC,EAAU;IAC3C,OAAO,EAAE,EAAE,EAAE,0BAA0B,EAAE,IAAI,EAAE,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAdapter = getAdapter;
|
|
4
|
+
const baseAdapter_1 = require("./baseAdapter");
|
|
5
|
+
const instagramAdapter_1 = require("./instagramAdapter");
|
|
6
|
+
const lineAdapter_1 = require("./lineAdapter");
|
|
7
|
+
const messengerAdapter_1 = require("./messengerAdapter");
|
|
8
|
+
const telegramAdapter_1 = require("./telegramAdapter");
|
|
9
|
+
const whatsappAdapter_1 = require("./whatsappAdapter");
|
|
10
|
+
const byId = {
|
|
11
|
+
whatsapp: whatsappAdapter_1.whatsappAdapter,
|
|
12
|
+
instagram: instagramAdapter_1.instagramAdapter,
|
|
13
|
+
messenger: messengerAdapter_1.messengerAdapter,
|
|
14
|
+
telegram: telegramAdapter_1.telegramAdapter,
|
|
15
|
+
line: lineAdapter_1.lineAdapter,
|
|
16
|
+
};
|
|
17
|
+
function getAdapter(platform) {
|
|
18
|
+
var _a;
|
|
19
|
+
return (_a = byId[platform]) !== null && _a !== void 0 ? _a : baseAdapter_1.baseAdapter;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/adapters/index.ts"],"names":[],"mappings":";;AAgBA,gCAEC;AAjBD,+CAA4C;AAC5C,yDAAsD;AACtD,+CAA4C;AAC5C,yDAAsD;AACtD,uDAAoD;AACpD,uDAAoD;AAEpD,MAAM,IAAI,GAAqC;IAC9C,QAAQ,EAAE,iCAAe;IACzB,SAAS,EAAE,mCAAgB;IAC3B,SAAS,EAAE,mCAAgB;IAC3B,QAAQ,EAAE,iCAAe;IACzB,IAAI,EAAE,yBAAW;CACjB,CAAC;AAEF,SAAgB,UAAU,CAAC,QAAgB;;IAC1C,OAAO,MAAA,IAAI,CAAC,QAAQ,CAAC,mCAAI,yBAAW,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.instagramAdapter = void 0;
|
|
4
|
+
const baseAdapter_1 = require("./baseAdapter");
|
|
5
|
+
exports.instagramAdapter = (0, baseAdapter_1.createNoopAdapter)('instagram');
|
|
6
|
+
//# sourceMappingURL=instagramAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instagramAdapter.js","sourceRoot":"","sources":["../../../lib/adapters/instagramAdapter.ts"],"names":[],"mappings":";;;AACA,+CAAkD;AAErC,QAAA,gBAAgB,GAAqB,IAAA,+BAAiB,EAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lineAdapter = void 0;
|
|
4
|
+
const baseAdapter_1 = require("./baseAdapter");
|
|
5
|
+
exports.lineAdapter = (0, baseAdapter_1.createNoopAdapter)('line');
|
|
6
|
+
//# sourceMappingURL=lineAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineAdapter.js","sourceRoot":"","sources":["../../../lib/adapters/lineAdapter.ts"],"names":[],"mappings":";;;AACA,+CAAkD;AAGrC,QAAA,WAAW,GAAqB,IAAA,+BAAiB,EAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.messengerAdapter = void 0;
|
|
4
|
+
const baseAdapter_1 = require("./baseAdapter");
|
|
5
|
+
exports.messengerAdapter = (0, baseAdapter_1.createNoopAdapter)('messenger');
|
|
6
|
+
//# sourceMappingURL=messengerAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messengerAdapter.js","sourceRoot":"","sources":["../../../lib/adapters/messengerAdapter.ts"],"names":[],"mappings":";;;AACA,+CAAkD;AAErC,QAAA,gBAAgB,GAAqB,IAAA,+BAAiB,EAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.telegramAdapter = void 0;
|
|
4
|
+
const baseAdapter_1 = require("./baseAdapter");
|
|
5
|
+
exports.telegramAdapter = (0, baseAdapter_1.createNoopAdapter)('telegram');
|
|
6
|
+
//# sourceMappingURL=telegramAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telegramAdapter.js","sourceRoot":"","sources":["../../../lib/adapters/telegramAdapter.ts"],"names":[],"mappings":";;;AACA,+CAAkD;AAGrC,QAAA,eAAe,GAAqB,IAAA,+BAAiB,EAAC,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../lib/adapters/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.whatsappAdapter = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const baseAdapter_1 = require("./baseAdapter");
|
|
6
|
+
exports.whatsappAdapter = {
|
|
7
|
+
...baseAdapter_1.baseAdapter,
|
|
8
|
+
id: 'whatsapp',
|
|
9
|
+
validateOrNormalizeContent: (messageType, content) => {
|
|
10
|
+
if (messageType === 'text' && content.text === undefined) {
|
|
11
|
+
throw new n8n_workflow_1.ApplicationError('WhatsApp text messages require content.text');
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=whatsappAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whatsappAdapter.js","sourceRoot":"","sources":["../../../lib/adapters/whatsappAdapter.ts"],"names":[],"mappings":";;;AAAA,+CAAkE;AAElE,+CAA4C;AAM/B,QAAA,eAAe,GAAqB;IAChD,GAAG,yBAAW;IACd,EAAE,EAAE,UAAU;IACd,0BAA0B,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,EAAE;QACpD,IAAI,WAAW,KAAK,MAAM,IAAK,OAAuB,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC3E,MAAM,IAAI,+BAAgB,CAAC,6CAA6C,CAAC,CAAC;QAC3E,CAAC;IACF,CAAC;CACD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { VendsChatSendBody } from './types';
|
|
2
|
+
export type BuildBodyOptions = {
|
|
3
|
+
platform: string;
|
|
4
|
+
recipient: string;
|
|
5
|
+
messageType: 'text' | 'template' | 'image' | 'video' | 'audio' | 'location';
|
|
6
|
+
textMessage?: string;
|
|
7
|
+
templateName?: string;
|
|
8
|
+
templateLanguage?: string;
|
|
9
|
+
templateVariablesJson?: string;
|
|
10
|
+
mediaUrl?: string;
|
|
11
|
+
mediaCaption?: string;
|
|
12
|
+
latitude?: number;
|
|
13
|
+
longitude?: number;
|
|
14
|
+
locationName?: string;
|
|
15
|
+
locationAddress?: string;
|
|
16
|
+
contentOverrideJson?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function buildSendMessageRequestBody(options: BuildBodyOptions): VendsChatSendBody;
|
|
19
|
+
export declare function parseAndValidateSendBodyFromJsonString(json: string): VendsChatSendBody;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildSendMessageRequestBody = buildSendMessageRequestBody;
|
|
4
|
+
exports.parseAndValidateSendBodyFromJsonString = parseAndValidateSendBodyFromJsonString;
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
const adapters_1 = require("./adapters");
|
|
7
|
+
function buildSendMessageRequestBody(options) {
|
|
8
|
+
var _a, _b, _c, _d;
|
|
9
|
+
const adapter = (0, adapters_1.getAdapter)(options.platform);
|
|
10
|
+
const { messageType, platform, recipient } = options;
|
|
11
|
+
const to = recipient.trim();
|
|
12
|
+
if (!to) {
|
|
13
|
+
throw new n8n_workflow_1.ApplicationError('Recipient (to) is required');
|
|
14
|
+
}
|
|
15
|
+
if (messageType === 'template') {
|
|
16
|
+
if (!((_a = options.templateName) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
17
|
+
throw new n8n_workflow_1.ApplicationError('Template name is required for template messages');
|
|
18
|
+
}
|
|
19
|
+
if (!((_b = options.templateLanguage) === null || _b === void 0 ? void 0 : _b.trim())) {
|
|
20
|
+
throw new n8n_workflow_1.ApplicationError('Template language (e.g. en_US) is required');
|
|
21
|
+
}
|
|
22
|
+
let variables;
|
|
23
|
+
if ((_c = options.templateVariablesJson) === null || _c === void 0 ? void 0 : _c.trim()) {
|
|
24
|
+
variables = parseJsonObject(options.templateVariablesJson, 'Template variables (JSON)');
|
|
25
|
+
}
|
|
26
|
+
const body = {
|
|
27
|
+
platform,
|
|
28
|
+
to,
|
|
29
|
+
type: 'template',
|
|
30
|
+
template: {
|
|
31
|
+
name: options.templateName.trim(),
|
|
32
|
+
language: options.templateLanguage.trim(),
|
|
33
|
+
...(variables && Object.keys(variables).length > 0 ? { variables } : {}),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
return body;
|
|
37
|
+
}
|
|
38
|
+
if ((_d = options.contentOverrideJson) === null || _d === void 0 ? void 0 : _d.trim()) {
|
|
39
|
+
const content = parseJsonObject(options.contentOverrideJson, 'Content (JSON object)');
|
|
40
|
+
adapter.validateOrNormalizeContent(messageType, content);
|
|
41
|
+
return { platform, to, type: messageType, content };
|
|
42
|
+
}
|
|
43
|
+
const content = buildStructuredContent(messageType, options);
|
|
44
|
+
adapter.validateOrNormalizeContent(messageType, content);
|
|
45
|
+
return { platform, to, type: messageType, content };
|
|
46
|
+
}
|
|
47
|
+
function buildStructuredContent(messageType, options) {
|
|
48
|
+
var _a, _b, _c, _d, _e;
|
|
49
|
+
switch (messageType) {
|
|
50
|
+
case 'text':
|
|
51
|
+
if (!((_a = options.textMessage) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
52
|
+
throw new n8n_workflow_1.ApplicationError('Text is required for text messages, or set the Content (JSON) override');
|
|
53
|
+
}
|
|
54
|
+
return { text: options.textMessage };
|
|
55
|
+
case 'image':
|
|
56
|
+
case 'video':
|
|
57
|
+
case 'audio':
|
|
58
|
+
if (!((_b = options.mediaUrl) === null || _b === void 0 ? void 0 : _b.trim())) {
|
|
59
|
+
throw new n8n_workflow_1.ApplicationError('Media URL is required for this message type, or set the Content (JSON) override');
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
url: options.mediaUrl.trim(),
|
|
63
|
+
...(((_c = options.mediaCaption) === null || _c === void 0 ? void 0 : _c.trim()) ? { caption: options.mediaCaption.trim() } : {}),
|
|
64
|
+
};
|
|
65
|
+
case 'location':
|
|
66
|
+
if (options.latitude === undefined || options.longitude === undefined) {
|
|
67
|
+
throw new n8n_workflow_1.ApplicationError('Latitude and longitude are required, or set the Content (JSON) override');
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
latitude: options.latitude,
|
|
71
|
+
longitude: options.longitude,
|
|
72
|
+
...(((_d = options.locationName) === null || _d === void 0 ? void 0 : _d.trim()) ? { name: options.locationName.trim() } : {}),
|
|
73
|
+
...(((_e = options.locationAddress) === null || _e === void 0 ? void 0 : _e.trim()) ? { address: options.locationAddress.trim() } : {}),
|
|
74
|
+
};
|
|
75
|
+
default: {
|
|
76
|
+
const m = messageType;
|
|
77
|
+
throw new n8n_workflow_1.ApplicationError(`Unsupported type: ${m}`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function parseJsonObject(json, label) {
|
|
82
|
+
try {
|
|
83
|
+
const v = JSON.parse(json);
|
|
84
|
+
if (v === null || typeof v !== 'object' || Array.isArray(v)) {
|
|
85
|
+
throw new n8n_workflow_1.ApplicationError('Invalid');
|
|
86
|
+
}
|
|
87
|
+
return v;
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
throw new n8n_workflow_1.ApplicationError(`${label} must be a JSON object`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function parseAndValidateSendBodyFromJsonString(json) {
|
|
94
|
+
const o = parseJsonObject(json, 'Request body (JSON object)');
|
|
95
|
+
if (typeof o.platform !== 'string' || !o.platform.trim()) {
|
|
96
|
+
throw new n8n_workflow_1.ApplicationError('platform is required in the JSON body (unified schema)');
|
|
97
|
+
}
|
|
98
|
+
if (typeof o.to !== 'string' || !o.to.trim()) {
|
|
99
|
+
throw new n8n_workflow_1.ApplicationError('to (recipient) is required in the JSON body (unified schema)');
|
|
100
|
+
}
|
|
101
|
+
if (typeof o.type !== 'string' || !o.type.trim()) {
|
|
102
|
+
throw new n8n_workflow_1.ApplicationError('type is required in the JSON body (unified schema)');
|
|
103
|
+
}
|
|
104
|
+
const t = o.type;
|
|
105
|
+
if (t === 'template') {
|
|
106
|
+
if (!o.template || typeof o.template !== 'object' || Array.isArray(o.template)) {
|
|
107
|
+
throw new n8n_workflow_1.ApplicationError('type "template" requires a "template" object in the body');
|
|
108
|
+
}
|
|
109
|
+
const tpl = o.template;
|
|
110
|
+
if (typeof tpl.name !== 'string' || !String(tpl.name).trim()) {
|
|
111
|
+
throw new n8n_workflow_1.ApplicationError('template.name is required');
|
|
112
|
+
}
|
|
113
|
+
if (typeof tpl.language !== 'string' || !String(tpl.language).trim()) {
|
|
114
|
+
throw new n8n_workflow_1.ApplicationError('template.language is required (e.g. en_US)');
|
|
115
|
+
}
|
|
116
|
+
return o;
|
|
117
|
+
}
|
|
118
|
+
if (!o.content || typeof o.content !== 'object' || Array.isArray(o.content)) {
|
|
119
|
+
throw new n8n_workflow_1.ApplicationError(`type "${t}" requires a "content" object in the body (or use type "template" with a "template" object)`);
|
|
120
|
+
}
|
|
121
|
+
const adapter = (0, adapters_1.getAdapter)(String(o.platform));
|
|
122
|
+
adapter.validateOrNormalizeContent(t, o.content);
|
|
123
|
+
return o;
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=buildSendMessageRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildSendMessageRequest.js","sourceRoot":"","sources":["../../lib/buildSendMessageRequest.ts"],"names":[],"mappings":";;AA2BA,kEA2CC;AA4DD,wFAmCC;AArKD,+CAAkE;AAClE,yCAAwC;AA0BxC,SAAgB,2BAA2B,CAC1C,OAAyB;;IAEzB,MAAM,OAAO,GAAG,IAAA,qBAAU,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7C,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IACrD,MAAM,EAAE,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,CAAC,EAAE,EAAE,CAAC;QACT,MAAM,IAAI,+BAAgB,CAAC,4BAA4B,CAAC,CAAC;IAC1D,CAAC;IAED,IAAI,WAAW,KAAK,UAAU,EAAE,CAAC;QAChC,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,YAAY,0CAAE,IAAI,EAAE,CAAA,EAAE,CAAC;YACnC,MAAM,IAAI,+BAAgB,CAAC,iDAAiD,CAAC,CAAC;QAC/E,CAAC;QACD,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,gBAAgB,0CAAE,IAAI,EAAE,CAAA,EAAE,CAAC;YACvC,MAAM,IAAI,+BAAgB,CAAC,4CAA4C,CAAC,CAAC;QAC1E,CAAC;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,OAAsB,CAAC,CAAC;IACnG,OAAO,CAAsB,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const contactFields: INodeProperties[];
|
|
3
|
+
export declare const contactOperationOptions: {
|
|
4
|
+
name: string;
|
|
5
|
+
value: string;
|
|
6
|
+
description: string;
|
|
7
|
+
action: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const contactIdentifierOperations: readonly ["getContact", "updateContact", "deleteContact", "addContactLabels", "removeContactLabels", "upsertContactNote"];
|