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
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.contactIdentifierOperations = exports.contactOperationOptions = exports.contactFields = void 0;
|
|
4
|
+
function whenOp(ops, show = {}) {
|
|
5
|
+
return { show: { operation: ops, ...show } };
|
|
6
|
+
}
|
|
7
|
+
const ADD_LABELS_HELP = 'Select existing workspace labels, and/or type new names as a comma-separated list (e.g. VIP, Lead). Missing names are created in the workspace and added to the contact. Provide at least one of Labels or Label Names.';
|
|
8
|
+
const REMOVE_LABELS_HELP = 'Select labels to remove from this contact only (workspace labels stay). You can also type comma-separated names or IDs (e.g. VIP, Lead or 1,2). Provide at least one of Labels or Label Names / IDs.';
|
|
9
|
+
exports.contactFields = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Name',
|
|
12
|
+
name: 'name',
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: '',
|
|
15
|
+
displayOptions: whenOp(['createContact', 'updateContact']),
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
displayName: 'Phone Number',
|
|
19
|
+
name: 'phoneNumber',
|
|
20
|
+
type: 'string',
|
|
21
|
+
default: '',
|
|
22
|
+
required: true,
|
|
23
|
+
description: 'E.164 recommended (e.g. +15551234567).',
|
|
24
|
+
displayOptions: whenOp(['createContact']),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Email',
|
|
28
|
+
name: 'email',
|
|
29
|
+
type: 'string',
|
|
30
|
+
default: '',
|
|
31
|
+
required: true,
|
|
32
|
+
displayOptions: whenOp(['createContact']),
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Phone Number',
|
|
36
|
+
name: 'updatePhoneNumber',
|
|
37
|
+
type: 'string',
|
|
38
|
+
default: '',
|
|
39
|
+
description: 'E.164 recommended (e.g. +15551234567).',
|
|
40
|
+
displayOptions: whenOp(['updateContact']),
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Email',
|
|
44
|
+
name: 'updateEmail',
|
|
45
|
+
type: 'string',
|
|
46
|
+
default: '',
|
|
47
|
+
displayOptions: whenOp(['updateContact']),
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
displayName: 'Note',
|
|
51
|
+
name: 'note',
|
|
52
|
+
type: 'string',
|
|
53
|
+
typeOptions: { rows: 3 },
|
|
54
|
+
default: '',
|
|
55
|
+
displayOptions: whenOp(['createContact', 'updateContact', 'upsertContactNote']),
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
displayName: 'Country',
|
|
59
|
+
name: 'country',
|
|
60
|
+
type: 'string',
|
|
61
|
+
default: '',
|
|
62
|
+
description: 'ISO 3166-1 alpha-2 (e.g. US). Helps parse local phone numbers.',
|
|
63
|
+
displayOptions: whenOp(['createContact', 'updateContact']),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Language',
|
|
67
|
+
name: 'language',
|
|
68
|
+
type: 'string',
|
|
69
|
+
default: '',
|
|
70
|
+
displayOptions: whenOp(['createContact', 'updateContact']),
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
displayName: 'Labels',
|
|
74
|
+
name: 'labelIds',
|
|
75
|
+
type: 'multiOptions',
|
|
76
|
+
typeOptions: {
|
|
77
|
+
loadOptionsMethod: 'getLabels',
|
|
78
|
+
},
|
|
79
|
+
default: [],
|
|
80
|
+
description: ADD_LABELS_HELP,
|
|
81
|
+
displayOptions: whenOp(['addContactLabels']),
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
displayName: 'Label Names',
|
|
85
|
+
name: 'labelNames',
|
|
86
|
+
type: 'string',
|
|
87
|
+
default: '',
|
|
88
|
+
description: 'Optional. Comma-separated names (e.g. VIP, Lead). Missing names are created in the workspace, then added to the contact.',
|
|
89
|
+
displayOptions: whenOp(['addContactLabels']),
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
displayName: 'Labels',
|
|
93
|
+
name: 'removeLabelIds',
|
|
94
|
+
type: 'multiOptions',
|
|
95
|
+
typeOptions: {
|
|
96
|
+
loadOptionsMethod: 'getLabels',
|
|
97
|
+
},
|
|
98
|
+
default: [],
|
|
99
|
+
description: REMOVE_LABELS_HELP,
|
|
100
|
+
displayOptions: whenOp(['removeContactLabels']),
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
displayName: 'Label Names or IDs',
|
|
104
|
+
name: 'removeLabelNames',
|
|
105
|
+
type: 'string',
|
|
106
|
+
default: '',
|
|
107
|
+
description: 'Optional. Comma-separated names or IDs (e.g. VIP, Lead or 1,2). Removes from this contact only.',
|
|
108
|
+
displayOptions: whenOp(['removeContactLabels']),
|
|
109
|
+
},
|
|
110
|
+
];
|
|
111
|
+
exports.contactOperationOptions = [
|
|
112
|
+
{
|
|
113
|
+
name: 'Get Contact',
|
|
114
|
+
value: 'getContact',
|
|
115
|
+
description: 'Find a contact by ID, email, or phone',
|
|
116
|
+
action: 'Get Contact',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'Create Contact',
|
|
120
|
+
value: 'createContact',
|
|
121
|
+
description: 'Create a contact (phone and email required)',
|
|
122
|
+
action: 'Create Contact',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'Update Contact',
|
|
126
|
+
value: 'updateContact',
|
|
127
|
+
description: 'Update an existing contact',
|
|
128
|
+
action: 'Update Contact',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: 'Delete Contact',
|
|
132
|
+
value: 'deleteContact',
|
|
133
|
+
description: 'Permanently delete a contact',
|
|
134
|
+
action: 'Delete Contact',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: 'Add Label(s) to a Contact',
|
|
138
|
+
value: 'addContactLabels',
|
|
139
|
+
description: 'Add labels via dropdown and/or comma-separated names',
|
|
140
|
+
action: 'Add Labels to Contact',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'Remove Label(s)',
|
|
144
|
+
value: 'removeContactLabels',
|
|
145
|
+
description: 'Remove labels from a contact via dropdown, names, or IDs',
|
|
146
|
+
action: 'Remove Labels from Contact',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: 'Add or Update Note',
|
|
150
|
+
value: 'upsertContactNote',
|
|
151
|
+
description: 'Set or replace the note on a contact',
|
|
152
|
+
action: 'Add or Update Note',
|
|
153
|
+
},
|
|
154
|
+
];
|
|
155
|
+
exports.contactIdentifierOperations = [
|
|
156
|
+
'getContact',
|
|
157
|
+
'updateContact',
|
|
158
|
+
'deleteContact',
|
|
159
|
+
'addContactLabels',
|
|
160
|
+
'removeContactLabels',
|
|
161
|
+
'upsertContactNote',
|
|
162
|
+
];
|
|
163
|
+
//# sourceMappingURL=contactFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contactFields.js","sourceRoot":"","sources":["../../lib/contactFields.ts"],"names":[],"mappings":";;;AAEA,SAAS,MAAM,CACd,GAAa,EACb,OAAsD,EAAE;IAExD,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC;AAC9C,CAAC;AAED,MAAM,eAAe,GACpB,yNAAyN,CAAC;AAE3N,MAAM,kBAAkB,GACvB,sMAAsM,CAAC;AAE3L,QAAA,aAAa,GAAsB;IAC/C;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,MAAM,CAAC,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;KAC1D;IACD;QACC,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,wCAAwC;QACrD,cAAc,EAAE,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC;KACzC;IACD;QACC,WAAW,EAAE,OAAO;Q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;QACC,IAAI,EAAE,2BAA2B;QACjC,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,sDAAsD;QACnE,MAAM,EAAE,uBAAuB;KAC/B;IACD;QACC,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,0DAA0D;QACvE,MAAM,EAAE,4BAA4B;KACpC;IACD;QACC,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,sCAAsC;QACnD,MAAM,EAAE,oBAAoB;KAC5B;CACD,CAAC;AAEW,QAAA,2BAA2B,GAAG;IAC1C,YAAY;IACZ,eAAe;IACf,eAAe;IACf,kBAAkB;IAClB,qBAAqB;IACrB,mBAAmB;CACV,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WEBHOOK_EVENT_OPTIONS = void 0;
|
|
4
|
+
exports.WEBHOOK_EVENT_OPTIONS = [
|
|
5
|
+
{ name: 'Any inbound message (all channels)', value: 'incoming.vendschat.messages' },
|
|
6
|
+
{ name: 'WhatsApp — text', value: 'incoming.whatsapp.messages.text' },
|
|
7
|
+
{ name: 'WhatsApp — document', value: 'incoming.whatsapp.messages.document' },
|
|
8
|
+
{ name: 'WhatsApp — image', value: 'incoming.whatsapp.messages.image' },
|
|
9
|
+
{ name: 'WhatsApp — video', value: 'incoming.whatsapp.messages.video' },
|
|
10
|
+
{ name: 'WhatsApp — audio', value: 'incoming.whatsapp.messages.audio' },
|
|
11
|
+
{ name: 'WhatsApp — reaction', value: 'incoming.whatsapp.messages.react' },
|
|
12
|
+
{ name: 'Instagram — text', value: 'incoming.instagram.messages.text' },
|
|
13
|
+
{ name: 'Instagram — image', value: 'incoming.instagram.messages.image' },
|
|
14
|
+
{ name: 'Instagram — video', value: 'incoming.instagram.messages.video' },
|
|
15
|
+
{ name: 'Instagram — audio', value: 'incoming.instagram.messages.audio' },
|
|
16
|
+
{ name: 'Instagram — story reply', value: 'incoming.instagram.messages.story_reply' },
|
|
17
|
+
{ name: 'Messenger — text', value: 'incoming.messenger.messages.text' },
|
|
18
|
+
{ name: 'Messenger — image', value: 'incoming.messenger.messages.image' },
|
|
19
|
+
{ name: 'Messenger — video', value: 'incoming.messenger.messages.video' },
|
|
20
|
+
{ name: 'Messenger — audio', value: 'incoming.messenger.messages.audio' },
|
|
21
|
+
{ name: 'Messenger — postback', value: 'incoming.messenger.messages.postback' },
|
|
22
|
+
{ name: 'Any outbound message (all channels)', value: 'outgoing.vendschat.messages' },
|
|
23
|
+
{ name: 'WhatsApp — message sent', value: 'outgoing.whatsapp.response' },
|
|
24
|
+
{ name: 'WhatsApp — sent to servers', value: 'outgoing.whatsapp.status.send' },
|
|
25
|
+
{ name: 'WhatsApp — delivered', value: 'outgoing.whatsapp.status.delivered' },
|
|
26
|
+
{ name: 'WhatsApp — read', value: 'outgoing.whatsapp.status.read' },
|
|
27
|
+
{ name: 'WhatsApp — failed', value: 'outgoing.whatsapp.status.failed' },
|
|
28
|
+
{ name: 'Instagram — message sent', value: 'outgoing.instagram.response' },
|
|
29
|
+
{ name: 'Instagram — delivered', value: 'outgoing.instagram.status.delivered' },
|
|
30
|
+
{ name: 'Instagram — read', value: 'outgoing.instagram.status.read' },
|
|
31
|
+
{ name: 'Messenger — message sent', value: 'outgoing.messenger.response' },
|
|
32
|
+
{ name: 'Messenger — delivered', value: 'outgoing.messenger.status.delivered' },
|
|
33
|
+
{ name: 'Messenger — read', value: 'outgoing.messenger.status.read' },
|
|
34
|
+
];
|
|
35
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../lib/events.ts"],"names":[],"mappings":";;;AACa,QAAA,qBAAqB,GAA2C;IAC5E,EAAE,IAAI,EAAE,oCAAoC,EAAE,KAAK,EAAE,6BAA6B,EAAE;IACpF,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IAC9E,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,oCAAoC,EAAE;IAC7E,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,+BAA+B,EAAE;IACnE,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,iCAAiC,EAAE;IACvE,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,6BAA6B,EAAE;IAC1E,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,qCAAqC,EAAE;IAC/E,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,gCAAgC,EAAE;IACrE,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,6BAA6B,EAAE;IAC1E,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,qCAAqC,EAAE;IAC/E,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,gCAAgC,EAAE;CACrE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IDataObject } from 'n8n-workflow';
|
|
2
|
+
export type VendsChatAuthType = 'bearer' | 'xApiKey';
|
|
3
|
+
export type VendsChatCredentials = {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
apiKey: string;
|
|
6
|
+
authType: VendsChatAuthType;
|
|
7
|
+
webhookSecret?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function getVendsChatAuthHeaders(cred: VendsChatCredentials): IDataObject;
|
|
10
|
+
export declare function normalizeBaseUrl(baseUrl: string): string;
|
package/dist/lib/http.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getVendsChatAuthHeaders = getVendsChatAuthHeaders;
|
|
4
|
+
exports.normalizeBaseUrl = normalizeBaseUrl;
|
|
5
|
+
function getVendsChatAuthHeaders(cred) {
|
|
6
|
+
const h = {
|
|
7
|
+
'Content-Type': 'application/json',
|
|
8
|
+
};
|
|
9
|
+
if (cred.authType === 'xApiKey') {
|
|
10
|
+
h['x-api-key'] = cred.apiKey;
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
h.Authorization = `Bearer ${cred.apiKey}`;
|
|
14
|
+
}
|
|
15
|
+
return h;
|
|
16
|
+
}
|
|
17
|
+
function normalizeBaseUrl(baseUrl) {
|
|
18
|
+
return baseUrl.replace(/\/+$/, '');
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../lib/http.ts"],"names":[],"mappings":";;AAWA,0DAYC;AAED,4CAEC;AAhBD,SAAgB,uBAAuB,CACtC,IAA0B;IAE1B,MAAM,CAAC,GAAgB;QACtB,cAAc,EAAE,kBAAkB;KAClC,CAAC;IACF,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QACjC,CAAC,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9B,CAAC;SAAM,CAAC;QACP,CAAC,CAAC,aAAa,GAAG,UAAU,IAAI,CAAC,MAAM,EAAE,CAAC;IAC3C,CAAC;IACD,OAAO,CAAC,CAAC;AACV,CAAC;AAED,SAAgB,gBAAgB,CAAC,OAAe;IAC/C,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IDataObject, IHttpRequestMethods } from 'n8n-workflow';
|
|
2
|
+
import type { VendsChatCredentials } from './http';
|
|
3
|
+
export declare function vendsChatIntegrationRequest(ctx: {
|
|
4
|
+
helpers: {
|
|
5
|
+
request: (opts: IDataObject) => Promise<unknown>;
|
|
6
|
+
};
|
|
7
|
+
}, cred: VendsChatCredentials, path: string, method?: IHttpRequestMethods, body?: IDataObject): Promise<IDataObject>;
|
|
8
|
+
export declare const WINDOW_CHECK_HELP = "Session messages on WhatsApp, Messenger, and Instagram only work inside the 24-hour window. Add a Check 24-Hour Window step first, or send a WhatsApp Template outside the window.";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WINDOW_CHECK_HELP = void 0;
|
|
4
|
+
exports.vendsChatIntegrationRequest = vendsChatIntegrationRequest;
|
|
5
|
+
const http_1 = require("./http");
|
|
6
|
+
async function vendsChatIntegrationRequest(ctx, cred, path, method = 'GET', body) {
|
|
7
|
+
const baseUrl = (0, http_1.normalizeBaseUrl)(cred.baseUrl);
|
|
8
|
+
return (await ctx.helpers.request({
|
|
9
|
+
method,
|
|
10
|
+
url: `${baseUrl}${path}`,
|
|
11
|
+
headers: (0, http_1.getVendsChatAuthHeaders)(cred),
|
|
12
|
+
body,
|
|
13
|
+
json: true,
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
16
|
+
exports.WINDOW_CHECK_HELP = 'Session messages on WhatsApp, Messenger, and Instagram only work inside the 24-hour window. Add a Check 24-Hour Window step first, or send a WhatsApp Template outside the window.';
|
|
17
|
+
//# sourceMappingURL=integrationApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrationApi.js","sourceRoot":"","sources":["../../lib/integrationApi.ts"],"names":[],"mappings":";;;AAIA,kEAmBC;AArBD,iCAAmE;AAE5D,KAAK,UAAU,2BAA2B,CAChD,GAIC,EACD,IAA0B,EAC1B,IAAY,EACZ,SAA8B,KAAK,EACnC,IAAkB;IAElB,MAAM,OAAO,GAAG,IAAA,uBAAgB,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/C,OAAO,CAAC,MAAM,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;QACjC,MAAM;QACN,GAAG,EAAE,GAAG,OAAO,GAAG,IAAI,EAAE;QACxB,OAAO,EAAE,IAAA,8BAAuB,EAAC,IAAI,CAAC;QACtC,IAAI;QACJ,IAAI,EAAE,IAAI;KACV,CAAC,CAAgB,CAAC;AACpB,CAAC;AAEY,QAAA,iBAAiB,GAC7B,oLAAoL,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const VENDSCHAT_BRAND = "Vendschat";
|
|
2
|
+
export declare const displayNameAction = "Vendschat";
|
|
3
|
+
export declare const displayNameTrigger = "Vendschat Trigger";
|
|
4
|
+
export declare const descriptionAction = "Send messages and manage contacts on Vendschat (WhatsApp, Instagram, Messenger).";
|
|
5
|
+
export declare const descriptionTrigger = "Starts the workflow when a subscribed Vendschat event occurs. Select events inside the node.";
|
|
6
|
+
export declare const subtitleAction = "={{$parameter[\"operation\"]}}";
|
|
7
|
+
export declare const subtitleTrigger = "={{$parameter[\"events\"].length + \" event(s)\"}}";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.subtitleTrigger = exports.subtitleAction = exports.descriptionTrigger = exports.descriptionAction = exports.displayNameTrigger = exports.displayNameAction = exports.VENDSCHAT_BRAND = void 0;
|
|
4
|
+
exports.VENDSCHAT_BRAND = 'Vendschat';
|
|
5
|
+
exports.displayNameAction = 'Vendschat';
|
|
6
|
+
exports.displayNameTrigger = 'Vendschat Trigger';
|
|
7
|
+
exports.descriptionAction = 'Send messages and manage contacts on Vendschat (WhatsApp, Instagram, Messenger).';
|
|
8
|
+
exports.descriptionTrigger = 'Starts the workflow when a subscribed Vendschat event occurs. Select events inside the node.';
|
|
9
|
+
exports.subtitleAction = '={{$parameter["operation"]}}';
|
|
10
|
+
exports.subtitleTrigger = '={{$parameter["events"].length + " event(s)"}}';
|
|
11
|
+
//# sourceMappingURL=productCopy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productCopy.js","sourceRoot":"","sources":["../../lib/productCopy.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG,WAAW,CAAC;AAG9B,QAAA,iBAAiB,GAAG,WAAW,CAAC;AAChC,QAAA,kBAAkB,GAAG,mBAAmB,CAAC;AAEzC,QAAA,iBAAiB,GAC7B,kFAAkF,CAAC;AAEvE,QAAA,kBAAkB,GAC9B,8FAA8F,CAAC;AAEnF,QAAA,cAAc,GAAG,8BAA8B,CAAC;AAChD,QAAA,eAAe,GAAG,gDAAgD,CAAC"}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendMessageFields = void 0;
|
|
4
|
+
const contactFields_1 = require("./contactFields");
|
|
5
|
+
const WINDOW_NOTICE = 'Session messages on WhatsApp, Messenger, and Instagram only work inside the 24-hour customer service window. Use a WhatsApp Template outside the window.';
|
|
6
|
+
function whenSendMessage(show) {
|
|
7
|
+
return { show: { operation: ['sendMessage'], ...show } };
|
|
8
|
+
}
|
|
9
|
+
function whenIdentifier(show = {}) {
|
|
10
|
+
return {
|
|
11
|
+
show: {
|
|
12
|
+
operation: ['sendMessage', ...contactFields_1.contactIdentifierOperations],
|
|
13
|
+
...show,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
exports.sendMessageFields = [
|
|
18
|
+
{
|
|
19
|
+
displayName: 'Operation',
|
|
20
|
+
name: 'operation',
|
|
21
|
+
type: 'options',
|
|
22
|
+
noDataExpression: true,
|
|
23
|
+
options: [
|
|
24
|
+
{
|
|
25
|
+
name: 'Send Message',
|
|
26
|
+
value: 'sendMessage',
|
|
27
|
+
description: 'Send a WhatsApp, Instagram, or Messenger message',
|
|
28
|
+
action: 'Send Message',
|
|
29
|
+
},
|
|
30
|
+
...contactFields_1.contactOperationOptions,
|
|
31
|
+
],
|
|
32
|
+
default: 'sendMessage',
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: WINDOW_NOTICE,
|
|
37
|
+
name: 'windowNotice',
|
|
38
|
+
type: 'notice',
|
|
39
|
+
default: '',
|
|
40
|
+
displayOptions: whenSendMessage({}),
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Identifier Type',
|
|
44
|
+
name: 'identifierType',
|
|
45
|
+
type: 'options',
|
|
46
|
+
options: [
|
|
47
|
+
{ name: 'Contact ID', value: 'contact_id' },
|
|
48
|
+
{ name: 'Email', value: 'email' },
|
|
49
|
+
{ name: 'Phone Number', value: 'phone_number' },
|
|
50
|
+
],
|
|
51
|
+
default: 'phone_number',
|
|
52
|
+
required: true,
|
|
53
|
+
displayOptions: whenIdentifier(),
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Identifier Value',
|
|
57
|
+
name: 'identifierValue',
|
|
58
|
+
type: 'string',
|
|
59
|
+
default: '',
|
|
60
|
+
required: true,
|
|
61
|
+
description: 'Contact ID, email address, or phone number in E.164 format.',
|
|
62
|
+
displayOptions: whenIdentifier(),
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
displayName: 'Channel Type',
|
|
66
|
+
name: 'channelMode',
|
|
67
|
+
type: 'options',
|
|
68
|
+
options: [
|
|
69
|
+
{ name: 'Last Interacted Channel', value: 'last_interacted' },
|
|
70
|
+
{ name: 'Specific Channel', value: 'specific' },
|
|
71
|
+
],
|
|
72
|
+
default: 'last_interacted',
|
|
73
|
+
required: true,
|
|
74
|
+
displayOptions: whenSendMessage({}),
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
displayName: 'Message Format',
|
|
78
|
+
name: 'contentMode',
|
|
79
|
+
type: 'options',
|
|
80
|
+
displayOptions: whenSendMessage({ channelMode: ['last_interacted'] }),
|
|
81
|
+
options: [
|
|
82
|
+
{ name: 'Text', value: 'text' },
|
|
83
|
+
{ name: 'Attachment', value: 'attachment' },
|
|
84
|
+
],
|
|
85
|
+
default: 'text',
|
|
86
|
+
required: true,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
displayName: 'Message Text',
|
|
90
|
+
name: 'text',
|
|
91
|
+
type: 'string',
|
|
92
|
+
typeOptions: { rows: 4 },
|
|
93
|
+
displayOptions: whenSendMessage({
|
|
94
|
+
channelMode: ['last_interacted'],
|
|
95
|
+
contentMode: ['text'],
|
|
96
|
+
}),
|
|
97
|
+
default: '',
|
|
98
|
+
required: true,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
displayName: 'Attachment Type',
|
|
102
|
+
name: 'attachmentType',
|
|
103
|
+
type: 'options',
|
|
104
|
+
displayOptions: whenSendMessage({
|
|
105
|
+
channelMode: ['last_interacted'],
|
|
106
|
+
contentMode: ['attachment'],
|
|
107
|
+
}),
|
|
108
|
+
options: [
|
|
109
|
+
{ name: 'Image', value: 'image' },
|
|
110
|
+
{ name: 'Video', value: 'video' },
|
|
111
|
+
{ name: 'Audio', value: 'audio' },
|
|
112
|
+
{ name: 'Document', value: 'document' },
|
|
113
|
+
],
|
|
114
|
+
default: 'image',
|
|
115
|
+
required: true,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
displayName: 'Attachment URL',
|
|
119
|
+
name: 'mediaUrl',
|
|
120
|
+
type: 'string',
|
|
121
|
+
displayOptions: whenSendMessage({
|
|
122
|
+
channelMode: ['last_interacted'],
|
|
123
|
+
contentMode: ['attachment'],
|
|
124
|
+
}),
|
|
125
|
+
default: '',
|
|
126
|
+
required: true,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
displayName: 'Caption',
|
|
130
|
+
name: 'caption',
|
|
131
|
+
type: 'string',
|
|
132
|
+
displayOptions: whenSendMessage({
|
|
133
|
+
channelMode: ['last_interacted'],
|
|
134
|
+
contentMode: ['attachment'],
|
|
135
|
+
attachmentType: ['image', 'video', 'document'],
|
|
136
|
+
}),
|
|
137
|
+
default: '',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
displayName: 'File Name',
|
|
141
|
+
name: 'filename',
|
|
142
|
+
type: 'string',
|
|
143
|
+
displayOptions: whenSendMessage({
|
|
144
|
+
channelMode: ['last_interacted'],
|
|
145
|
+
contentMode: ['attachment'],
|
|
146
|
+
attachmentType: ['document'],
|
|
147
|
+
}),
|
|
148
|
+
default: '',
|
|
149
|
+
description: 'e.g. invoice.pdf',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
displayName: 'Channel Name or ID',
|
|
153
|
+
name: 'channelId',
|
|
154
|
+
type: 'options',
|
|
155
|
+
displayOptions: whenSendMessage({ channelMode: ['specific'] }),
|
|
156
|
+
typeOptions: { loadOptionsMethod: 'getChannels' },
|
|
157
|
+
default: '',
|
|
158
|
+
required: true,
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
displayName: 'WhatsApp Message Type',
|
|
162
|
+
name: 'messageType',
|
|
163
|
+
type: 'options',
|
|
164
|
+
displayOptions: whenSendMessage({ channelMode: ['specific'] }),
|
|
165
|
+
options: [
|
|
166
|
+
{ name: 'Template', value: 'template' },
|
|
167
|
+
{ name: 'Text', value: 'text' },
|
|
168
|
+
{ name: 'Image', value: 'image' },
|
|
169
|
+
{ name: 'Document', value: 'document' },
|
|
170
|
+
{ name: 'Video', value: 'video' },
|
|
171
|
+
{ name: 'Audio', value: 'audio' },
|
|
172
|
+
],
|
|
173
|
+
default: 'text',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
displayName: 'Template Name or ID',
|
|
177
|
+
name: 'templateId',
|
|
178
|
+
type: 'options',
|
|
179
|
+
displayOptions: whenSendMessage({
|
|
180
|
+
channelMode: ['specific'],
|
|
181
|
+
messageType: ['template'],
|
|
182
|
+
}),
|
|
183
|
+
typeOptions: {
|
|
184
|
+
loadOptionsDependsOn: ['channelId'],
|
|
185
|
+
loadOptionsMethod: 'getTemplates',
|
|
186
|
+
},
|
|
187
|
+
default: '',
|
|
188
|
+
required: true,
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
displayName: 'Template Variables',
|
|
192
|
+
name: 'templateVariables',
|
|
193
|
+
type: 'fixedCollection',
|
|
194
|
+
typeOptions: { multipleValues: true },
|
|
195
|
+
displayOptions: whenSendMessage({
|
|
196
|
+
channelMode: ['specific'],
|
|
197
|
+
messageType: ['template'],
|
|
198
|
+
}),
|
|
199
|
+
default: {},
|
|
200
|
+
options: [
|
|
201
|
+
{
|
|
202
|
+
displayName: 'Variable',
|
|
203
|
+
name: 'variable',
|
|
204
|
+
values: [
|
|
205
|
+
{ displayName: 'Key', name: 'key', type: 'string', default: '' },
|
|
206
|
+
{ displayName: 'Value', name: 'value', type: 'string', default: '' },
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
displayName: 'Message Text',
|
|
213
|
+
name: 'specificText',
|
|
214
|
+
type: 'string',
|
|
215
|
+
typeOptions: { rows: 4 },
|
|
216
|
+
displayOptions: whenSendMessage({
|
|
217
|
+
channelMode: ['specific'],
|
|
218
|
+
messageType: ['text'],
|
|
219
|
+
}),
|
|
220
|
+
default: '',
|
|
221
|
+
required: true,
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
displayName: 'Media URL',
|
|
225
|
+
name: 'specificMediaUrl',
|
|
226
|
+
type: 'string',
|
|
227
|
+
displayOptions: whenSendMessage({
|
|
228
|
+
channelMode: ['specific'],
|
|
229
|
+
messageType: ['image', 'video', 'audio', 'document'],
|
|
230
|
+
}),
|
|
231
|
+
default: '',
|
|
232
|
+
required: true,
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
displayName: 'Caption',
|
|
236
|
+
name: 'specificCaption',
|
|
237
|
+
type: 'string',
|
|
238
|
+
displayOptions: whenSendMessage({
|
|
239
|
+
channelMode: ['specific'],
|
|
240
|
+
messageType: ['image', 'video', 'document'],
|
|
241
|
+
}),
|
|
242
|
+
default: '',
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
displayName: 'File Name',
|
|
246
|
+
name: 'specificFilename',
|
|
247
|
+
type: 'string',
|
|
248
|
+
displayOptions: whenSendMessage({
|
|
249
|
+
channelMode: ['specific'],
|
|
250
|
+
messageType: ['document'],
|
|
251
|
+
}),
|
|
252
|
+
default: '',
|
|
253
|
+
description: 'e.g. invoice.pdf',
|
|
254
|
+
},
|
|
255
|
+
...contactFields_1.contactFields,
|
|
256
|
+
];
|
|
257
|
+
//# sourceMappingURL=sendMessageFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendMessageFields.js","sourceRoot":"","sources":["../../lib/sendMessageFields.ts"],"names":[],"mappings":";;;AACA,mDAIyB;AAEzB,MAAM,aAAa,GAClB,0JAA0J,CAAC;AAE5J,SAAS,eAAe,CACvB,IAAmD;IAEnD,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,aAAa,CAAC,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC;AAC1D,CAAC;AAED,SAAS,cAAc,CACtB,OAAsD,EAAE;IAExD,OAAO;QACN,IAAI,EAAE;YACL,SAAS,EAAE,CAAC,aAAa,EAAE,GAAG,2CAA2B,CAAC;YAC1D,GAAG,IAAI;SACP;KACD,CAAC;AACH,CAAC;AAEY,QAAA,iBAAiB,GAAsB;IACnD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,kDAAkD;gBAC/D,MAAM,EAAE,cAAc;aACtB;YACD,GAAG,uCAAuB;SAC1B;QACD,OAAO,EAAE,aAAa;QACtB,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,eAAe,CAAC,EAAE,CAAC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AAI;KACd;IACD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE,eAAe,CAAC;YAC/B,WAAW,EAAE,CAAC,UAAU,CAAC;YACzB,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;SACpD,CAAC;QACF,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE,eAAe,CAAC;YAC/B,WAAW,EAAE,CAAC,UAAU,CAAC;YACzB,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;SAC3C,CAAC;QACF,OAAO,EAAE,EAAE;KACX;IACD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE,eAAe,CAAC;YAC/B,WAAW,EAAE,CAAC,UAAU,CAAC;YACzB,WAAW,EAAE,CAAC,UAAU,CAAC;SACzB,CAAC;QACF,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,kBAAkB;KAC/B;IACD,GAAG,6BAAa;CAChB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IDataObject } from 'n8n-workflow';
|
|
2
|
+
export type VendsChatErrorBody = {
|
|
3
|
+
success: false;
|
|
4
|
+
error: {
|
|
5
|
+
code: string;
|
|
6
|
+
message: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
type TextualBody = {
|
|
10
|
+
platform: string;
|
|
11
|
+
to: string;
|
|
12
|
+
type: 'text' | 'image' | 'video' | 'audio' | 'location';
|
|
13
|
+
content: IDataObject;
|
|
14
|
+
};
|
|
15
|
+
type TemplateBody = {
|
|
16
|
+
platform: string;
|
|
17
|
+
to: string;
|
|
18
|
+
type: 'template';
|
|
19
|
+
template: {
|
|
20
|
+
name: string;
|
|
21
|
+
language: string;
|
|
22
|
+
variables?: IDataObject;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type VendsChatSendBody = TextualBody | TemplateBody;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.vendsChatCodex = void 0;
|
|
4
|
+
exports.vendsChatCodex = {
|
|
5
|
+
categories: ['Communication'],
|
|
6
|
+
alias: ['Vendschat', 'vendschat', 'whatsapp', 'instagram', 'messenger'],
|
|
7
|
+
resources: {
|
|
8
|
+
primaryDocumentation: [{ url: 'https://docs.vendschat.com' }],
|
|
9
|
+
credentialDocumentation: [{ url: 'https://docs.vendschat.com/docs/auth' }],
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=vendsChatCodex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendsChatCodex.js","sourceRoot":"","sources":["../../lib/vendsChatCodex.ts"],"names":[],"mappings":";;;AAGa,QAAA,cAAc,GAAc;IACxC,UAAU,EAAE,CAAC,eAAe,CAAC;IAC7B,KAAK,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC;IACvE,SAAS,EAAE;QACV,oBAAoB,EAAE,CAAC,EAAE,GAAG,EAAE,4BAA4B,EAAE,CAAC;QAC7D,uBAAuB,EAAE,CAAC,EAAE,GAAG,EAAE,sCAAsC,EAAE,CAAC;KAC1E;CACD,CAAC"}
|