@n8n-dev/n8n-nodes-chatwoot 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.
Files changed (111) hide show
  1. package/README.md +26 -0
  2. package/dist/credentials/ChatwootApi.credentials.d.ts +10 -0
  3. package/dist/credentials/ChatwootApi.credentials.js +47 -0
  4. package/dist/credentials/ChatwootApi.credentials.js.map +1 -0
  5. package/dist/icons/chatwoot.dark.svg +4 -0
  6. package/dist/icons/chatwoot.svg +4 -0
  7. package/dist/nodes/Chatwoot/Chatwoot.node.d.ts +4 -0
  8. package/dist/nodes/Chatwoot/Chatwoot.node.js +264 -0
  9. package/dist/nodes/Chatwoot/Chatwoot.node.js.map +1 -0
  10. package/dist/nodes/Chatwoot/Chatwoot.node.json +20 -0
  11. package/dist/nodes/Chatwoot/chatwoot.dark.svg +4 -0
  12. package/dist/nodes/Chatwoot/chatwoot.svg +4 -0
  13. package/dist/nodes/Chatwoot/resources/account/index.d.ts +2 -0
  14. package/dist/nodes/Chatwoot/resources/account/index.js +370 -0
  15. package/dist/nodes/Chatwoot/resources/account/index.js.map +1 -0
  16. package/dist/nodes/Chatwoot/resources/account-agent-bots/index.d.ts +2 -0
  17. package/dist/nodes/Chatwoot/resources/account-agent-bots/index.js +527 -0
  18. package/dist/nodes/Chatwoot/resources/account-agent-bots/index.js.map +1 -0
  19. package/dist/nodes/Chatwoot/resources/account-users/index.d.ts +2 -0
  20. package/dist/nodes/Chatwoot/resources/account-users/index.js +167 -0
  21. package/dist/nodes/Chatwoot/resources/account-users/index.js.map +1 -0
  22. package/dist/nodes/Chatwoot/resources/accounts/index.d.ts +2 -0
  23. package/dist/nodes/Chatwoot/resources/accounts/index.js +516 -0
  24. package/dist/nodes/Chatwoot/resources/accounts/index.js.map +1 -0
  25. package/dist/nodes/Chatwoot/resources/agent-bots/index.d.ts +2 -0
  26. package/dist/nodes/Chatwoot/resources/agent-bots/index.js +477 -0
  27. package/dist/nodes/Chatwoot/resources/agent-bots/index.js.map +1 -0
  28. package/dist/nodes/Chatwoot/resources/agents/index.d.ts +2 -0
  29. package/dist/nodes/Chatwoot/resources/agents/index.js +434 -0
  30. package/dist/nodes/Chatwoot/resources/agents/index.js.map +1 -0
  31. package/dist/nodes/Chatwoot/resources/audit-logs/index.d.ts +2 -0
  32. package/dist/nodes/Chatwoot/resources/audit-logs/index.js +78 -0
  33. package/dist/nodes/Chatwoot/resources/audit-logs/index.js.map +1 -0
  34. package/dist/nodes/Chatwoot/resources/automation-rule/index.d.ts +2 -0
  35. package/dist/nodes/Chatwoot/resources/automation-rule/index.js +610 -0
  36. package/dist/nodes/Chatwoot/resources/automation-rule/index.js.map +1 -0
  37. package/dist/nodes/Chatwoot/resources/canned-responses/index.d.ts +2 -0
  38. package/dist/nodes/Chatwoot/resources/canned-responses/index.js +282 -0
  39. package/dist/nodes/Chatwoot/resources/canned-responses/index.js.map +1 -0
  40. package/dist/nodes/Chatwoot/resources/contact-labels/index.d.ts +2 -0
  41. package/dist/nodes/Chatwoot/resources/contact-labels/index.js +110 -0
  42. package/dist/nodes/Chatwoot/resources/contact-labels/index.js.map +1 -0
  43. package/dist/nodes/Chatwoot/resources/contacts/index.d.ts +2 -0
  44. package/dist/nodes/Chatwoot/resources/contacts/index.js +1345 -0
  45. package/dist/nodes/Chatwoot/resources/contacts/index.js.map +1 -0
  46. package/dist/nodes/Chatwoot/resources/contacts-api/index.d.ts +2 -0
  47. package/dist/nodes/Chatwoot/resources/contacts-api/index.js +465 -0
  48. package/dist/nodes/Chatwoot/resources/contacts-api/index.js.map +1 -0
  49. package/dist/nodes/Chatwoot/resources/conversation/index.d.ts +2 -0
  50. package/dist/nodes/Chatwoot/resources/conversation/index.js +53 -0
  51. package/dist/nodes/Chatwoot/resources/conversation/index.js.map +1 -0
  52. package/dist/nodes/Chatwoot/resources/conversation-assignments/index.d.ts +2 -0
  53. package/dist/nodes/Chatwoot/resources/conversation-assignments/index.js +103 -0
  54. package/dist/nodes/Chatwoot/resources/conversation-assignments/index.js.map +1 -0
  55. package/dist/nodes/Chatwoot/resources/conversations/index.d.ts +2 -0
  56. package/dist/nodes/Chatwoot/resources/conversations/index.js +1396 -0
  57. package/dist/nodes/Chatwoot/resources/conversations/index.js.map +1 -0
  58. package/dist/nodes/Chatwoot/resources/conversations-api/index.d.ts +2 -0
  59. package/dist/nodes/Chatwoot/resources/conversations-api/index.js +294 -0
  60. package/dist/nodes/Chatwoot/resources/conversations-api/index.js.map +1 -0
  61. package/dist/nodes/Chatwoot/resources/csat-survey-page/index.d.ts +2 -0
  62. package/dist/nodes/Chatwoot/resources/csat-survey-page/index.js +53 -0
  63. package/dist/nodes/Chatwoot/resources/csat-survey-page/index.js.map +1 -0
  64. package/dist/nodes/Chatwoot/resources/custom-attributes/index.d.ts +2 -0
  65. package/dist/nodes/Chatwoot/resources/custom-attributes/index.js +703 -0
  66. package/dist/nodes/Chatwoot/resources/custom-attributes/index.js.map +1 -0
  67. package/dist/nodes/Chatwoot/resources/custom-filters/index.d.ts +2 -0
  68. package/dist/nodes/Chatwoot/resources/custom-filters/index.js +373 -0
  69. package/dist/nodes/Chatwoot/resources/custom-filters/index.js.map +1 -0
  70. package/dist/nodes/Chatwoot/resources/help-center/index.d.ts +2 -0
  71. package/dist/nodes/Chatwoot/resources/help-center/index.js +1156 -0
  72. package/dist/nodes/Chatwoot/resources/help-center/index.js.map +1 -0
  73. package/dist/nodes/Chatwoot/resources/inbox-api/index.d.ts +2 -0
  74. package/dist/nodes/Chatwoot/resources/inbox-api/index.js +53 -0
  75. package/dist/nodes/Chatwoot/resources/inbox-api/index.js.map +1 -0
  76. package/dist/nodes/Chatwoot/resources/inboxes/index.d.ts +2 -0
  77. package/dist/nodes/Chatwoot/resources/inboxes/index.js +1580 -0
  78. package/dist/nodes/Chatwoot/resources/inboxes/index.js.map +1 -0
  79. package/dist/nodes/Chatwoot/resources/index.d.ts +31 -0
  80. package/dist/nodes/Chatwoot/resources/index.js +66 -0
  81. package/dist/nodes/Chatwoot/resources/index.js.map +1 -0
  82. package/dist/nodes/Chatwoot/resources/integrations/index.d.ts +2 -0
  83. package/dist/nodes/Chatwoot/resources/integrations/index.js +386 -0
  84. package/dist/nodes/Chatwoot/resources/integrations/index.js.map +1 -0
  85. package/dist/nodes/Chatwoot/resources/labels/index.d.ts +2 -0
  86. package/dist/nodes/Chatwoot/resources/labels/index.js +377 -0
  87. package/dist/nodes/Chatwoot/resources/labels/index.js.map +1 -0
  88. package/dist/nodes/Chatwoot/resources/messages/index.d.ts +2 -0
  89. package/dist/nodes/Chatwoot/resources/messages/index.js +377 -0
  90. package/dist/nodes/Chatwoot/resources/messages/index.js.map +1 -0
  91. package/dist/nodes/Chatwoot/resources/messages-api/index.d.ts +2 -0
  92. package/dist/nodes/Chatwoot/resources/messages-api/index.js +190 -0
  93. package/dist/nodes/Chatwoot/resources/messages-api/index.js.map +1 -0
  94. package/dist/nodes/Chatwoot/resources/profile/index.d.ts +2 -0
  95. package/dist/nodes/Chatwoot/resources/profile/index.js +109 -0
  96. package/dist/nodes/Chatwoot/resources/profile/index.js.map +1 -0
  97. package/dist/nodes/Chatwoot/resources/reports/index.d.ts +2 -0
  98. package/dist/nodes/Chatwoot/resources/reports/index.js +588 -0
  99. package/dist/nodes/Chatwoot/resources/reports/index.js.map +1 -0
  100. package/dist/nodes/Chatwoot/resources/teams/index.d.ts +2 -0
  101. package/dist/nodes/Chatwoot/resources/teams/index.js +583 -0
  102. package/dist/nodes/Chatwoot/resources/teams/index.js.map +1 -0
  103. package/dist/nodes/Chatwoot/resources/users/index.d.ts +2 -0
  104. package/dist/nodes/Chatwoot/resources/users/index.js +427 -0
  105. package/dist/nodes/Chatwoot/resources/users/index.js.map +1 -0
  106. package/dist/nodes/Chatwoot/resources/webhooks/index.d.ts +2 -0
  107. package/dist/nodes/Chatwoot/resources/webhooks/index.js +332 -0
  108. package/dist/nodes/Chatwoot/resources/webhooks/index.js.map +1 -0
  109. package/dist/package.json +53 -0
  110. package/dist/tsconfig.tsbuildinfo +1 -0
  111. package/package.json +53 -0
@@ -0,0 +1,377 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.messagesDescription = void 0;
4
+ exports.messagesDescription = [
5
+ {
6
+ "displayName": "Operation",
7
+ "name": "operation",
8
+ "type": "options",
9
+ "noDataExpression": true,
10
+ "displayOptions": {
11
+ "show": {
12
+ "resource": [
13
+ "Messages"
14
+ ]
15
+ }
16
+ },
17
+ "options": [
18
+ {
19
+ "name": "List All Messages",
20
+ "value": "List All Messages",
21
+ "action": "Get messages",
22
+ "description": "List all messages of a conversation",
23
+ "routing": {
24
+ "request": {
25
+ "method": "GET",
26
+ "url": "=/api/v1/accounts/{{$parameter[\"account_id\"]}}/conversations/{{$parameter[\"conversation_id\"]}}/messages"
27
+ }
28
+ }
29
+ },
30
+ {
31
+ "name": "Create A New Message In A Conversation",
32
+ "value": "Create A New Message In A Conversation",
33
+ "action": "Create New Message",
34
+ "description": "Create a new message in the conversation.\n\nUse `application/json` for text messages and `multipart/form-data` when the\nmessage includes file attachments.\n\n### Multipart attachment request\n\nSend files with the `attachments[]` form field. `curl -F` sets the\n`multipart/form-data` content type and boundary automatically.\n\n```bash\ncurl -X POST \"https://app.chatwoot.com/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages\" \\\n -H \"api_access_token: <your-api-token>\" \\\n -F \"content=Here is the screenshot\" \\\n -F \"message_type=outgoing\" \\\n -F \"private=false\" \\\n -F \"attachments[]=@/path/to/screenshot.png\"\n```\n\n## WhatsApp Template Messages\n\nFor WhatsApp channels, you can send structured template messages using the `template_params` field. \nTemplates must be pre-approved in WhatsApp Business Manager.\n\n### Example Templates\n\n**Text with Image Header:**\n```json\n{\n \"content\": \"Hi your order 121212 is confirmed. Please wait for further updates\",\n \"template_params\": {\n \"name\": \"order_confirmation\",\n \"category\": \"MARKETING\",\n \"language\": \"en\",\n \"processed_params\": {\n \"body\": {\n \"1\": \"121212\"\n },\n \"header\": {\n \"media_url\": \"https://picsum.photos/200/300\",\n \"media_type\": \"image\"\n }\n }\n }\n}\n```\n\n**Text with Copy Code Button:**\n```json\n{\n \"content\": \"Special offer! Get 30% off your next purchase. Use the code below\",\n \"template_params\": {\n \"name\": \"discount_coupon\",\n \"category\": \"MARKETING\",\n \"language\": \"en\",\n \"processed_params\": {\n \"body\": {\n \"discount_percentage\": \"30\"\n },\n \"buttons\": [{\n \"type\": \"copy_code\",\n \"parameter\": \"SAVE20\"\n }]\n }\n }\n}\n```\n",
35
+ "routing": {
36
+ "request": {
37
+ "method": "POST",
38
+ "url": "=/api/v1/accounts/{{$parameter[\"account_id\"]}}/conversations/{{$parameter[\"conversation_id\"]}}/messages"
39
+ }
40
+ }
41
+ },
42
+ {
43
+ "name": "Delete A Message",
44
+ "value": "Delete A Message",
45
+ "action": "Delete a message",
46
+ "description": "Delete a message and it's attachments from the conversation.",
47
+ "routing": {
48
+ "request": {
49
+ "method": "DELETE",
50
+ "url": "=/api/v1/accounts/{{$parameter[\"account_id\"]}}/conversations/{{$parameter[\"conversation_id\"]}}/messages/{{$parameter[\"message_id\"]}}"
51
+ }
52
+ }
53
+ }
54
+ ],
55
+ "default": ""
56
+ },
57
+ {
58
+ "displayName": "GET /api/v1/accounts/{account_id}/conversations/{conversation_id}/messages",
59
+ "name": "operation",
60
+ "type": "notice",
61
+ "typeOptions": {
62
+ "theme": "info"
63
+ },
64
+ "default": "",
65
+ "displayOptions": {
66
+ "show": {
67
+ "resource": [
68
+ "Messages"
69
+ ],
70
+ "operation": [
71
+ "List All Messages"
72
+ ]
73
+ }
74
+ }
75
+ },
76
+ {
77
+ "displayName": "After",
78
+ "name": "after",
79
+ "description": "Fetch messages after the message with this ID. Returns up to 100 messages in ascending order.",
80
+ "default": 0,
81
+ "type": "number",
82
+ "routing": {
83
+ "send": {
84
+ "type": "query",
85
+ "property": "after",
86
+ "value": "={{ $value }}",
87
+ "propertyInDotNotation": false
88
+ }
89
+ },
90
+ "displayOptions": {
91
+ "show": {
92
+ "resource": [
93
+ "Messages"
94
+ ],
95
+ "operation": [
96
+ "List All Messages"
97
+ ]
98
+ }
99
+ }
100
+ },
101
+ {
102
+ "displayName": "Before",
103
+ "name": "before",
104
+ "description": "Fetch messages before the message with this ID. Returns up to 20 messages in ascending order.",
105
+ "default": 0,
106
+ "type": "number",
107
+ "routing": {
108
+ "send": {
109
+ "type": "query",
110
+ "property": "before",
111
+ "value": "={{ $value }}",
112
+ "propertyInDotNotation": false
113
+ }
114
+ },
115
+ "displayOptions": {
116
+ "show": {
117
+ "resource": [
118
+ "Messages"
119
+ ],
120
+ "operation": [
121
+ "List All Messages"
122
+ ]
123
+ }
124
+ }
125
+ },
126
+ {
127
+ "displayName": "POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/messages",
128
+ "name": "operation",
129
+ "type": "notice",
130
+ "typeOptions": {
131
+ "theme": "info"
132
+ },
133
+ "default": "",
134
+ "displayOptions": {
135
+ "show": {
136
+ "resource": [
137
+ "Messages"
138
+ ],
139
+ "operation": [
140
+ "Create A New Message In A Conversation"
141
+ ]
142
+ }
143
+ }
144
+ },
145
+ {
146
+ "required": true,
147
+ "displayName": "Content",
148
+ "name": "content",
149
+ "type": "string",
150
+ "default": "Hello, how can I help you?",
151
+ "description": "The content of the message",
152
+ "routing": {
153
+ "send": {
154
+ "property": "content",
155
+ "propertyInDotNotation": false,
156
+ "type": "body",
157
+ "value": "={{ $value }}"
158
+ }
159
+ },
160
+ "displayOptions": {
161
+ "show": {
162
+ "resource": [
163
+ "Messages"
164
+ ],
165
+ "operation": [
166
+ "Create A New Message In A Conversation"
167
+ ]
168
+ }
169
+ }
170
+ },
171
+ {
172
+ "displayName": "Message Type",
173
+ "name": "message_type",
174
+ "type": "options",
175
+ "default": "outgoing",
176
+ "description": "The type of the message",
177
+ "options": [
178
+ {
179
+ "name": "Outgoing",
180
+ "value": "outgoing"
181
+ },
182
+ {
183
+ "name": "Incoming",
184
+ "value": "incoming"
185
+ }
186
+ ],
187
+ "routing": {
188
+ "send": {
189
+ "property": "message_type",
190
+ "propertyInDotNotation": false,
191
+ "type": "body",
192
+ "value": "={{ $value }}"
193
+ }
194
+ },
195
+ "displayOptions": {
196
+ "show": {
197
+ "resource": [
198
+ "Messages"
199
+ ],
200
+ "operation": [
201
+ "Create A New Message In A Conversation"
202
+ ]
203
+ }
204
+ }
205
+ },
206
+ {
207
+ "displayName": "Private",
208
+ "name": "private",
209
+ "type": "boolean",
210
+ "default": false,
211
+ "description": "Flag to identify if it is a private note",
212
+ "routing": {
213
+ "send": {
214
+ "property": "private",
215
+ "propertyInDotNotation": false,
216
+ "type": "body",
217
+ "value": "={{ $value }}"
218
+ }
219
+ },
220
+ "displayOptions": {
221
+ "show": {
222
+ "resource": [
223
+ "Messages"
224
+ ],
225
+ "operation": [
226
+ "Create A New Message In A Conversation"
227
+ ]
228
+ }
229
+ }
230
+ },
231
+ {
232
+ "displayName": "Content Type",
233
+ "name": "content_type",
234
+ "type": "options",
235
+ "default": "text",
236
+ "description": "Content type of the message",
237
+ "options": [
238
+ {
239
+ "name": "Text",
240
+ "value": "text"
241
+ },
242
+ {
243
+ "name": "Input Email",
244
+ "value": "input_email"
245
+ },
246
+ {
247
+ "name": "Cards",
248
+ "value": "cards"
249
+ },
250
+ {
251
+ "name": "Input Select",
252
+ "value": "input_select"
253
+ },
254
+ {
255
+ "name": "Form",
256
+ "value": "form"
257
+ },
258
+ {
259
+ "name": "Article",
260
+ "value": "article"
261
+ }
262
+ ],
263
+ "routing": {
264
+ "send": {
265
+ "property": "content_type",
266
+ "propertyInDotNotation": false,
267
+ "type": "body",
268
+ "value": "={{ $value }}"
269
+ }
270
+ },
271
+ "displayOptions": {
272
+ "show": {
273
+ "resource": [
274
+ "Messages"
275
+ ],
276
+ "operation": [
277
+ "Create A New Message In A Conversation"
278
+ ]
279
+ }
280
+ }
281
+ },
282
+ {
283
+ "displayName": "Content Attributes",
284
+ "name": "content_attributes",
285
+ "type": "json",
286
+ "default": "{}",
287
+ "description": "Attributes based on the content type",
288
+ "routing": {
289
+ "send": {
290
+ "property": "content_attributes",
291
+ "propertyInDotNotation": false,
292
+ "type": "body",
293
+ "value": "={{ JSON.parse($value) }}"
294
+ }
295
+ },
296
+ "displayOptions": {
297
+ "show": {
298
+ "resource": [
299
+ "Messages"
300
+ ],
301
+ "operation": [
302
+ "Create A New Message In A Conversation"
303
+ ]
304
+ }
305
+ }
306
+ },
307
+ {
308
+ "displayName": "Campaign Id",
309
+ "name": "campaign_id",
310
+ "type": "number",
311
+ "default": 1,
312
+ "description": "The campaign id to which the message belongs",
313
+ "routing": {
314
+ "send": {
315
+ "property": "campaign_id",
316
+ "propertyInDotNotation": false,
317
+ "type": "body",
318
+ "value": "={{ $value }}"
319
+ }
320
+ },
321
+ "displayOptions": {
322
+ "show": {
323
+ "resource": [
324
+ "Messages"
325
+ ],
326
+ "operation": [
327
+ "Create A New Message In A Conversation"
328
+ ]
329
+ }
330
+ }
331
+ },
332
+ {
333
+ "displayName": "Template Params",
334
+ "name": "template_params",
335
+ "type": "json",
336
+ "default": "{\n \"name\": \"purchase_receipt\",\n \"category\": \"UTILITY\",\n \"language\": \"en_US\",\n \"processed_params\": {\n \"body\": {\n \"1\": \"Visa\",\n \"2\": \"Nike\",\n \"3\": \"Bill\"\n },\n \"header\": {\n \"media_url\": \"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf\",\n \"media_type\": \"document\"\n },\n \"buttons\": [\n {\n \"parameter\": \"SSFSDFSD\"\n }\n ]\n }\n}",
337
+ "description": "WhatsApp template parameters for sending structured messages",
338
+ "routing": {
339
+ "send": {
340
+ "property": "template_params",
341
+ "propertyInDotNotation": false,
342
+ "type": "body",
343
+ "value": "={{ JSON.parse($value) }}"
344
+ }
345
+ },
346
+ "displayOptions": {
347
+ "show": {
348
+ "resource": [
349
+ "Messages"
350
+ ],
351
+ "operation": [
352
+ "Create A New Message In A Conversation"
353
+ ]
354
+ }
355
+ }
356
+ },
357
+ {
358
+ "displayName": "DELETE /api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}",
359
+ "name": "operation",
360
+ "type": "notice",
361
+ "typeOptions": {
362
+ "theme": "info"
363
+ },
364
+ "default": "",
365
+ "displayOptions": {
366
+ "show": {
367
+ "resource": [
368
+ "Messages"
369
+ ],
370
+ "operation": [
371
+ "Delete A Message"
372
+ ]
373
+ }
374
+ }
375
+ },
376
+ ];
377
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Chatwoot/resources/messages/index.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAsB;IACpD;QACC,aAAa,EAAE,WAAW;QAC1B,MAAM,EAAE,WAAW;QACnB,MAAM,EAAE,SAAS;QACjB,kBAAkB,EAAE,IAAI;QACxB,gBAAgB,EAAE;YACjB,MAAM,EAAE;gBACP,UAAU,EAAE;oBACX,UAAU;iBACV;aACD;SACD;QACD,SAAS,EAAE;YACV;gBACC,MAAM,EAAE,mBAAmB;gBAC3B,OAAO,EAAE,mBAAmB;gBAC5B,QAAQ,EAAE,cAAc;gBACxB,aAAa,EAAE,qCAAqC;gBACpD,SAAS,EAAE;oBACV,SAAS,EAAE;wBACV,QAAQ,EAAE,KAAK;wBACf,KAAK,EAAE,6GAA6G;qBACpH;iBACD;aACD;YACD;gBACC,MAAM,EAAE,wCAAwC;gBAChD,OAAO,EAAE,wCAAwC;gBACjD,QAAQ,EAAE,oBAAoB;gBAC9B,aAAa,EAAE,6zDAA6zD;gBAC50D,SAAS,EAAE;oBACV,SAAS,EAAE;wBACV,QAAQ,EAAE,MAAM;wBAChB,KAAK,EAAE,6GAA6G;qBACpH;iBACD;aACD;YACD;gBACC,MAAM,EAAE,kBAAkB;gBAC1B,OAAO,EAAE,kBAAkB;gBAC3B,QAAQ,EAAE,kBAAkB;gBAC5B,aAAa,EAAE,8DAA8D;gBAC7E,SAAS,EAAE;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AAM,EAAE,WAAW;QACnB,MAAM,EAAE,QAAQ;QAChB,aAAa,EAAE;YACd,OAAO,EAAE,MAAM;SACf;QACD,SAAS,EAAE,EAAE;QACb,gBAAgB,EAAE;YACjB,MAAM,EAAE;gBACP,UAAU,EAAE;oBACX,UAAU;iBACV;gBACD,WAAW,EAAE;oBACZ,kBAAkB;iBAClB;aACD;SACD;KACD;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const messagesApiDescription: INodeProperties[];
@@ -0,0 +1,190 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.messagesApiDescription = void 0;
4
+ exports.messagesApiDescription = [
5
+ {
6
+ "displayName": "Operation",
7
+ "name": "operation",
8
+ "type": "options",
9
+ "noDataExpression": true,
10
+ "displayOptions": {
11
+ "show": {
12
+ "resource": [
13
+ "Messages API"
14
+ ]
15
+ }
16
+ },
17
+ "options": [
18
+ {
19
+ "name": "Create A Message",
20
+ "value": "Create A Message",
21
+ "action": "Create a message",
22
+ "description": "Create a message",
23
+ "routing": {
24
+ "request": {
25
+ "method": "POST",
26
+ "url": "=/public/api/v1/inboxes/{{$parameter[\"inbox_identifier\"]}}/contacts/{{$parameter[\"contact_identifier\"]}}/conversations/{{$parameter[\"conversation_id\"]}}/messages"
27
+ }
28
+ }
29
+ },
30
+ {
31
+ "name": "List All Conversation Messages",
32
+ "value": "List All Conversation Messages",
33
+ "action": "List all messages",
34
+ "description": "List all messages in the conversation",
35
+ "routing": {
36
+ "request": {
37
+ "method": "GET",
38
+ "url": "=/public/api/v1/inboxes/{{$parameter[\"inbox_identifier\"]}}/contacts/{{$parameter[\"contact_identifier\"]}}/conversations/{{$parameter[\"conversation_id\"]}}/messages"
39
+ }
40
+ }
41
+ },
42
+ {
43
+ "name": "Update A Message",
44
+ "value": "Update A Message",
45
+ "action": "Update a message",
46
+ "description": "Update a message",
47
+ "routing": {
48
+ "request": {
49
+ "method": "PATCH",
50
+ "url": "=/public/api/v1/inboxes/{{$parameter[\"inbox_identifier\"]}}/contacts/{{$parameter[\"contact_identifier\"]}}/conversations/{{$parameter[\"conversation_id\"]}}/messages/{{$parameter[\"message_id\"]}}"
51
+ }
52
+ }
53
+ }
54
+ ],
55
+ "default": ""
56
+ },
57
+ {
58
+ "displayName": "POST /public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages",
59
+ "name": "operation",
60
+ "type": "notice",
61
+ "typeOptions": {
62
+ "theme": "info"
63
+ },
64
+ "default": "",
65
+ "displayOptions": {
66
+ "show": {
67
+ "resource": [
68
+ "Messages API"
69
+ ],
70
+ "operation": [
71
+ "Create A Message"
72
+ ]
73
+ }
74
+ }
75
+ },
76
+ {
77
+ "displayName": "Content",
78
+ "name": "content",
79
+ "type": "string",
80
+ "default": "Hello, how can I help you?",
81
+ "description": "Content for the message",
82
+ "routing": {
83
+ "send": {
84
+ "property": "content",
85
+ "propertyInDotNotation": false,
86
+ "type": "body",
87
+ "value": "={{ $value }}"
88
+ }
89
+ },
90
+ "displayOptions": {
91
+ "show": {
92
+ "resource": [
93
+ "Messages API"
94
+ ],
95
+ "operation": [
96
+ "Create A Message"
97
+ ]
98
+ }
99
+ }
100
+ },
101
+ {
102
+ "displayName": "Echo Id",
103
+ "name": "echo_id",
104
+ "type": "string",
105
+ "default": "1234567890",
106
+ "description": "Temporary identifier which will be passed back via websockets",
107
+ "routing": {
108
+ "send": {
109
+ "property": "echo_id",
110
+ "propertyInDotNotation": false,
111
+ "type": "body",
112
+ "value": "={{ $value }}"
113
+ }
114
+ },
115
+ "displayOptions": {
116
+ "show": {
117
+ "resource": [
118
+ "Messages API"
119
+ ],
120
+ "operation": [
121
+ "Create A Message"
122
+ ]
123
+ }
124
+ }
125
+ },
126
+ {
127
+ "displayName": "GET /public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages",
128
+ "name": "operation",
129
+ "type": "notice",
130
+ "typeOptions": {
131
+ "theme": "info"
132
+ },
133
+ "default": "",
134
+ "displayOptions": {
135
+ "show": {
136
+ "resource": [
137
+ "Messages API"
138
+ ],
139
+ "operation": [
140
+ "List All Conversation Messages"
141
+ ]
142
+ }
143
+ }
144
+ },
145
+ {
146
+ "displayName": "PATCH /public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id}",
147
+ "name": "operation",
148
+ "type": "notice",
149
+ "typeOptions": {
150
+ "theme": "info"
151
+ },
152
+ "default": "",
153
+ "displayOptions": {
154
+ "show": {
155
+ "resource": [
156
+ "Messages API"
157
+ ],
158
+ "operation": [
159
+ "Update A Message"
160
+ ]
161
+ }
162
+ }
163
+ },
164
+ {
165
+ "displayName": "Submitted Values",
166
+ "name": "submitted_values",
167
+ "type": "json",
168
+ "default": "{\n \"name\": \"My Name\",\n \"title\": \"My Title\",\n \"value\": \"value\",\n \"csat_survey_response\": {\n \"feedback_message\": \"Great service!\",\n \"rating\": 5\n }\n}",
169
+ "description": "Replies to the Bot Message Types",
170
+ "routing": {
171
+ "send": {
172
+ "property": "submitted_values",
173
+ "propertyInDotNotation": false,
174
+ "type": "body",
175
+ "value": "={{ JSON.parse($value) }}"
176
+ }
177
+ },
178
+ "displayOptions": {
179
+ "show": {
180
+ "resource": [
181
+ "Messages API"
182
+ ],
183
+ "operation": [
184
+ "Update A Message"
185
+ ]
186
+ }
187
+ }
188
+ },
189
+ ];
190
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Chatwoot/resources/messages-api/index.ts"],"names":[],"mappings":";;;AAEa,QAAA,sBAAsB,GAAsB;IACvD;QACC,aAAa,EAAE,WAAW;QAC1B,MAAM,EAAE,WAAW;QACnB,MAAM,EAAE,SAAS;QACjB,kBAAkB,EAAE,IAAI;QACxB,gBAAgB,EAAE;YACjB,MAAM,EAAE;gBACP,UAAU,EA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1B,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,2LAA2L;QACtM,aAAa,EAAE,kCAAkC;QACjD,SAAS,EAAE;YACV,MAAM,EAAE;gBACP,UAAU,EAAE,kBAAkB;gBAC9B,uBAAuB,EAAE,KAAK;gBAC9B,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,2BAA2B;aACpC;SACD;QACD,gBAAgB,EAAE;YACjB,MAAM,EAAE;gBACP,UAAU,EAAE;oBACX,cAAc;iBACd;gBACD,WAAW,EAAE;oBACZ,kBAAkB;iBAClB;aACD;SACD;KACD;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const profileDescription: INodeProperties[];