@renatoascencio/n8n-nodes-chatwoot 0.1.2 → 0.3.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 (172) hide show
  1. package/README.md +315 -80
  2. package/dist/nodes/Chatwoot/Chatwoot.node.d.ts +9 -0
  3. package/dist/nodes/Chatwoot/Chatwoot.node.js +611 -77
  4. package/dist/nodes/Chatwoot/Chatwoot.node.js.map +1 -1
  5. package/dist/nodes/Chatwoot/Chatwoot.node.json +22 -0
  6. package/dist/nodes/Chatwoot/ChatwootTrigger.node.d.ts +12 -0
  7. package/dist/nodes/Chatwoot/ChatwootTrigger.node.js +197 -0
  8. package/dist/nodes/Chatwoot/ChatwootTrigger.node.js.map +1 -0
  9. package/dist/nodes/Chatwoot/ChatwootTrigger.node.json +22 -0
  10. package/dist/nodes/Chatwoot/GenericFunctions.d.ts +5 -1
  11. package/dist/nodes/Chatwoot/GenericFunctions.js +71 -0
  12. package/dist/nodes/Chatwoot/GenericFunctions.js.map +1 -1
  13. package/dist/nodes/Chatwoot/chatwoot.svg +4 -7
  14. package/dist/nodes/Chatwoot/resources/account/get.operation.d.ts +2 -0
  15. package/dist/nodes/Chatwoot/resources/account/get.operation.js +5 -0
  16. package/dist/nodes/Chatwoot/resources/account/get.operation.js.map +1 -0
  17. package/dist/nodes/Chatwoot/resources/account/index.d.ts +3 -0
  18. package/dist/nodes/Chatwoot/resources/account/index.js +36 -0
  19. package/dist/nodes/Chatwoot/resources/account/index.js.map +1 -0
  20. package/dist/nodes/Chatwoot/resources/account/update.operation.d.ts +2 -0
  21. package/dist/nodes/Chatwoot/resources/account/update.operation.js +75 -0
  22. package/dist/nodes/Chatwoot/resources/account/update.operation.js.map +1 -0
  23. package/dist/nodes/Chatwoot/resources/agent/create.operation.d.ts +2 -0
  24. package/dist/nodes/Chatwoot/resources/agent/create.operation.js +95 -0
  25. package/dist/nodes/Chatwoot/resources/agent/create.operation.js.map +1 -0
  26. package/dist/nodes/Chatwoot/resources/agent/delete.operation.d.ts +2 -0
  27. package/dist/nodes/Chatwoot/resources/agent/delete.operation.js +23 -0
  28. package/dist/nodes/Chatwoot/resources/agent/delete.operation.js.map +1 -0
  29. package/dist/nodes/Chatwoot/resources/agent/getAll.operation.d.ts +2 -0
  30. package/dist/nodes/Chatwoot/resources/agent/getAll.operation.js +5 -0
  31. package/dist/nodes/Chatwoot/resources/agent/getAll.operation.js.map +1 -0
  32. package/dist/nodes/Chatwoot/resources/agent/index.d.ts +3 -0
  33. package/dist/nodes/Chatwoot/resources/agent/index.js +52 -0
  34. package/dist/nodes/Chatwoot/resources/agent/index.js.map +1 -0
  35. package/dist/nodes/Chatwoot/resources/agent/update.operation.d.ts +2 -0
  36. package/dist/nodes/Chatwoot/resources/agent/update.operation.js +75 -0
  37. package/dist/nodes/Chatwoot/resources/agent/update.operation.js.map +1 -0
  38. package/dist/nodes/Chatwoot/resources/agentBot/index.d.ts +3 -0
  39. package/dist/nodes/Chatwoot/resources/agentBot/index.js +143 -0
  40. package/dist/nodes/Chatwoot/resources/agentBot/index.js.map +1 -0
  41. package/dist/nodes/Chatwoot/resources/automationRule/index.d.ts +3 -0
  42. package/dist/nodes/Chatwoot/resources/automationRule/index.js +205 -0
  43. package/dist/nodes/Chatwoot/resources/automationRule/index.js.map +1 -0
  44. package/dist/nodes/Chatwoot/resources/cannedResponse/create.operation.d.ts +2 -0
  45. package/dist/nodes/Chatwoot/resources/cannedResponse/create.operation.js +38 -0
  46. package/dist/nodes/Chatwoot/resources/cannedResponse/create.operation.js.map +1 -0
  47. package/dist/nodes/Chatwoot/resources/cannedResponse/delete.operation.d.ts +2 -0
  48. package/dist/nodes/Chatwoot/resources/cannedResponse/delete.operation.js +20 -0
  49. package/dist/nodes/Chatwoot/resources/cannedResponse/delete.operation.js.map +1 -0
  50. package/dist/nodes/Chatwoot/resources/cannedResponse/getAll.operation.d.ts +2 -0
  51. package/dist/nodes/Chatwoot/resources/cannedResponse/getAll.operation.js +28 -0
  52. package/dist/nodes/Chatwoot/resources/cannedResponse/getAll.operation.js.map +1 -0
  53. package/dist/nodes/Chatwoot/resources/cannedResponse/index.d.ts +3 -0
  54. package/dist/nodes/Chatwoot/resources/cannedResponse/index.js +52 -0
  55. package/dist/nodes/Chatwoot/resources/cannedResponse/index.js.map +1 -0
  56. package/dist/nodes/Chatwoot/resources/cannedResponse/update.operation.d.ts +2 -0
  57. package/dist/nodes/Chatwoot/resources/cannedResponse/update.operation.js +52 -0
  58. package/dist/nodes/Chatwoot/resources/cannedResponse/update.operation.js.map +1 -0
  59. package/dist/nodes/Chatwoot/resources/contact/getConversations.operation.d.ts +2 -0
  60. package/dist/nodes/Chatwoot/resources/contact/getConversations.operation.js +20 -0
  61. package/dist/nodes/Chatwoot/resources/contact/getConversations.operation.js.map +1 -0
  62. package/dist/nodes/Chatwoot/resources/contact/index.js +16 -0
  63. package/dist/nodes/Chatwoot/resources/contact/index.js.map +1 -1
  64. package/dist/nodes/Chatwoot/resources/contact/merge.operation.d.ts +2 -0
  65. package/dist/nodes/Chatwoot/resources/contact/merge.operation.js +34 -0
  66. package/dist/nodes/Chatwoot/resources/contact/merge.operation.js.map +1 -0
  67. package/dist/nodes/Chatwoot/resources/conversation/addLabels.operation.d.ts +2 -0
  68. package/dist/nodes/Chatwoot/resources/conversation/addLabels.operation.js +37 -0
  69. package/dist/nodes/Chatwoot/resources/conversation/addLabels.operation.js.map +1 -0
  70. package/dist/nodes/Chatwoot/resources/conversation/assign.operation.d.ts +2 -0
  71. package/dist/nodes/Chatwoot/resources/conversation/assign.operation.js +87 -0
  72. package/dist/nodes/Chatwoot/resources/conversation/assign.operation.js.map +1 -0
  73. package/dist/nodes/Chatwoot/resources/conversation/create.operation.d.ts +2 -0
  74. package/dist/nodes/Chatwoot/resources/conversation/create.operation.js +92 -0
  75. package/dist/nodes/Chatwoot/resources/conversation/create.operation.js.map +1 -0
  76. package/dist/nodes/Chatwoot/resources/conversation/index.js +32 -0
  77. package/dist/nodes/Chatwoot/resources/conversation/index.js.map +1 -1
  78. package/dist/nodes/Chatwoot/resources/conversation/togglePriority.operation.d.ts +2 -0
  79. package/dist/nodes/Chatwoot/resources/conversation/togglePriority.operation.js +41 -0
  80. package/dist/nodes/Chatwoot/resources/conversation/togglePriority.operation.js.map +1 -0
  81. package/dist/nodes/Chatwoot/resources/customAttribute/create.operation.d.ts +2 -0
  82. package/dist/nodes/Chatwoot/resources/customAttribute/create.operation.js +122 -0
  83. package/dist/nodes/Chatwoot/resources/customAttribute/create.operation.js.map +1 -0
  84. package/dist/nodes/Chatwoot/resources/customAttribute/delete.operation.d.ts +2 -0
  85. package/dist/nodes/Chatwoot/resources/customAttribute/delete.operation.js +20 -0
  86. package/dist/nodes/Chatwoot/resources/customAttribute/delete.operation.js.map +1 -0
  87. package/dist/nodes/Chatwoot/resources/customAttribute/get.operation.d.ts +2 -0
  88. package/dist/nodes/Chatwoot/resources/customAttribute/get.operation.js +20 -0
  89. package/dist/nodes/Chatwoot/resources/customAttribute/get.operation.js.map +1 -0
  90. package/dist/nodes/Chatwoot/resources/customAttribute/getAll.operation.d.ts +2 -0
  91. package/dist/nodes/Chatwoot/resources/customAttribute/getAll.operation.js +32 -0
  92. package/dist/nodes/Chatwoot/resources/customAttribute/getAll.operation.js.map +1 -0
  93. package/dist/nodes/Chatwoot/resources/customAttribute/index.d.ts +3 -0
  94. package/dist/nodes/Chatwoot/resources/customAttribute/index.js +60 -0
  95. package/dist/nodes/Chatwoot/resources/customAttribute/index.js.map +1 -0
  96. package/dist/nodes/Chatwoot/resources/customAttribute/update.operation.d.ts +2 -0
  97. package/dist/nodes/Chatwoot/resources/customAttribute/update.operation.js +64 -0
  98. package/dist/nodes/Chatwoot/resources/customAttribute/update.operation.js.map +1 -0
  99. package/dist/nodes/Chatwoot/resources/customFilter/index.d.ts +3 -0
  100. package/dist/nodes/Chatwoot/resources/customFilter/index.js +139 -0
  101. package/dist/nodes/Chatwoot/resources/customFilter/index.js.map +1 -0
  102. package/dist/nodes/Chatwoot/resources/inbox/get.operation.d.ts +2 -0
  103. package/dist/nodes/Chatwoot/resources/inbox/get.operation.js +23 -0
  104. package/dist/nodes/Chatwoot/resources/inbox/get.operation.js.map +1 -0
  105. package/dist/nodes/Chatwoot/resources/inbox/getAll.operation.d.ts +2 -0
  106. package/dist/nodes/Chatwoot/resources/inbox/getAll.operation.js +5 -0
  107. package/dist/nodes/Chatwoot/resources/inbox/getAll.operation.js.map +1 -0
  108. package/dist/nodes/Chatwoot/resources/inbox/index.d.ts +3 -0
  109. package/dist/nodes/Chatwoot/resources/inbox/index.js +44 -0
  110. package/dist/nodes/Chatwoot/resources/inbox/index.js.map +1 -0
  111. package/dist/nodes/Chatwoot/resources/inbox/update.operation.d.ts +2 -0
  112. package/dist/nodes/Chatwoot/resources/inbox/update.operation.js +143 -0
  113. package/dist/nodes/Chatwoot/resources/inbox/update.operation.js.map +1 -0
  114. package/dist/nodes/Chatwoot/resources/label/create.operation.d.ts +2 -0
  115. package/dist/nodes/Chatwoot/resources/label/create.operation.js +56 -0
  116. package/dist/nodes/Chatwoot/resources/label/create.operation.js.map +1 -0
  117. package/dist/nodes/Chatwoot/resources/label/delete.operation.d.ts +2 -0
  118. package/dist/nodes/Chatwoot/resources/label/delete.operation.js +23 -0
  119. package/dist/nodes/Chatwoot/resources/label/delete.operation.js.map +1 -0
  120. package/dist/nodes/Chatwoot/resources/label/getAll.operation.d.ts +2 -0
  121. package/dist/nodes/Chatwoot/resources/label/getAll.operation.js +5 -0
  122. package/dist/nodes/Chatwoot/resources/label/getAll.operation.js.map +1 -0
  123. package/dist/nodes/Chatwoot/resources/label/index.d.ts +3 -0
  124. package/dist/nodes/Chatwoot/resources/label/index.js +52 -0
  125. package/dist/nodes/Chatwoot/resources/label/index.js.map +1 -0
  126. package/dist/nodes/Chatwoot/resources/label/update.operation.d.ts +2 -0
  127. package/dist/nodes/Chatwoot/resources/label/update.operation.js +66 -0
  128. package/dist/nodes/Chatwoot/resources/label/update.operation.js.map +1 -0
  129. package/dist/nodes/Chatwoot/resources/message/delete.operation.d.ts +2 -0
  130. package/dist/nodes/Chatwoot/resources/message/delete.operation.js +34 -0
  131. package/dist/nodes/Chatwoot/resources/message/delete.operation.js.map +1 -0
  132. package/dist/nodes/Chatwoot/resources/message/index.js +8 -1
  133. package/dist/nodes/Chatwoot/resources/message/index.js.map +1 -1
  134. package/dist/nodes/Chatwoot/resources/report/index.d.ts +3 -0
  135. package/dist/nodes/Chatwoot/resources/report/index.js +155 -0
  136. package/dist/nodes/Chatwoot/resources/report/index.js.map +1 -0
  137. package/dist/nodes/Chatwoot/resources/team/create.operation.d.ts +2 -0
  138. package/dist/nodes/Chatwoot/resources/team/create.operation.js +49 -0
  139. package/dist/nodes/Chatwoot/resources/team/create.operation.js.map +1 -0
  140. package/dist/nodes/Chatwoot/resources/team/delete.operation.d.ts +2 -0
  141. package/dist/nodes/Chatwoot/resources/team/delete.operation.js +23 -0
  142. package/dist/nodes/Chatwoot/resources/team/delete.operation.js.map +1 -0
  143. package/dist/nodes/Chatwoot/resources/team/get.operation.d.ts +2 -0
  144. package/dist/nodes/Chatwoot/resources/team/get.operation.js +23 -0
  145. package/dist/nodes/Chatwoot/resources/team/get.operation.js.map +1 -0
  146. package/dist/nodes/Chatwoot/resources/team/getAll.operation.d.ts +2 -0
  147. package/dist/nodes/Chatwoot/resources/team/getAll.operation.js +5 -0
  148. package/dist/nodes/Chatwoot/resources/team/getAll.operation.js.map +1 -0
  149. package/dist/nodes/Chatwoot/resources/team/index.d.ts +3 -0
  150. package/dist/nodes/Chatwoot/resources/team/index.js +60 -0
  151. package/dist/nodes/Chatwoot/resources/team/index.js.map +1 -0
  152. package/dist/nodes/Chatwoot/resources/team/update.operation.d.ts +2 -0
  153. package/dist/nodes/Chatwoot/resources/team/update.operation.js +59 -0
  154. package/dist/nodes/Chatwoot/resources/team/update.operation.js.map +1 -0
  155. package/dist/nodes/Chatwoot/resources/webhook/create.operation.d.ts +2 -0
  156. package/dist/nodes/Chatwoot/resources/webhook/create.operation.js +77 -0
  157. package/dist/nodes/Chatwoot/resources/webhook/create.operation.js.map +1 -0
  158. package/dist/nodes/Chatwoot/resources/webhook/delete.operation.d.ts +2 -0
  159. package/dist/nodes/Chatwoot/resources/webhook/delete.operation.js +20 -0
  160. package/dist/nodes/Chatwoot/resources/webhook/delete.operation.js.map +1 -0
  161. package/dist/nodes/Chatwoot/resources/webhook/getAll.operation.d.ts +2 -0
  162. package/dist/nodes/Chatwoot/resources/webhook/getAll.operation.js +5 -0
  163. package/dist/nodes/Chatwoot/resources/webhook/getAll.operation.js.map +1 -0
  164. package/dist/nodes/Chatwoot/resources/webhook/index.d.ts +3 -0
  165. package/dist/nodes/Chatwoot/resources/webhook/index.js +52 -0
  166. package/dist/nodes/Chatwoot/resources/webhook/index.js.map +1 -0
  167. package/dist/nodes/Chatwoot/resources/webhook/update.operation.d.ts +2 -0
  168. package/dist/nodes/Chatwoot/resources/webhook/update.operation.js +59 -0
  169. package/dist/nodes/Chatwoot/resources/webhook/update.operation.js.map +1 -0
  170. package/dist/nodes/Chatwoot/types.d.ts +322 -6
  171. package/dist/tsconfig.tsbuildinfo +1 -1
  172. package/package.json +4 -3
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createOperation = void 0;
4
+ exports.createOperation = [
5
+ {
6
+ displayName: 'Webhook URL',
7
+ name: 'url',
8
+ type: 'string',
9
+ required: true,
10
+ default: '',
11
+ placeholder: 'https://your-server.com/webhook',
12
+ displayOptions: {
13
+ show: {
14
+ resource: ['webhook'],
15
+ operation: ['create'],
16
+ },
17
+ },
18
+ description: 'URL where webhook events will be sent',
19
+ },
20
+ {
21
+ displayName: 'Subscriptions',
22
+ name: 'subscriptions',
23
+ type: 'multiOptions',
24
+ required: true,
25
+ options: [
26
+ {
27
+ name: 'Contact Created',
28
+ value: 'contact_created',
29
+ description: 'Triggered when a new contact is created',
30
+ },
31
+ {
32
+ name: 'Contact Updated',
33
+ value: 'contact_updated',
34
+ description: 'Triggered when a contact is updated',
35
+ },
36
+ {
37
+ name: 'Conversation Created',
38
+ value: 'conversation_created',
39
+ description: 'Triggered when a new conversation is created',
40
+ },
41
+ {
42
+ name: 'Conversation Status Changed',
43
+ value: 'conversation_status_changed',
44
+ description: 'Triggered when conversation status changes (open, resolved, pending, snoozed)',
45
+ },
46
+ {
47
+ name: 'Conversation Updated',
48
+ value: 'conversation_updated',
49
+ description: 'Triggered when a conversation is updated',
50
+ },
51
+ {
52
+ name: 'Message Created',
53
+ value: 'message_created',
54
+ description: 'Triggered when a new message is sent',
55
+ },
56
+ {
57
+ name: 'Message Updated',
58
+ value: 'message_updated',
59
+ description: 'Triggered when a message is updated',
60
+ },
61
+ {
62
+ name: 'Webwidget Triggered',
63
+ value: 'webwidget_triggered',
64
+ description: 'Triggered when chat widget is opened',
65
+ },
66
+ ],
67
+ default: ['message_created'],
68
+ displayOptions: {
69
+ show: {
70
+ resource: ['webhook'],
71
+ operation: ['create'],
72
+ },
73
+ },
74
+ description: 'Events that will trigger this webhook',
75
+ },
76
+ ];
77
+ //# sourceMappingURL=create.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.operation.js","sourceRoot":"","sources":["../../../../../nodes/Chatwoot/resources/webhook/create.operation.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IAChD;QACE,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iCAAiC;QAC9C,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACtB;SACF;QACD,WAAW,EAAE,uCAAuC;KACrD;IACD;QACE,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,cAAc;QACpB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,yCAAyC;aACvD;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,qCAAqC;aACnD;YACD;gBACE,IAAI,EAAE,sBAAsB;gBAC5B,KAAK,EAAE,sBAAsB;gBAC7B,WAAW,EAAE,8CAA8C;aAC5D;YACD;gBACE,IAAI,EAAE,6BAA6B;gBACnC,KAAK,EAAE,6BAA6B;gBACpC,WAAW,EAAE,+EAA+E;aAC7F;YACD;gBACE,IAAI,EAAE,sBAAsB;gBAC5B,KAAK,EAAE,sBAAsB;gBAC7B,WAAW,EAAE,0CAA0C;aACxD;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,sCAAsC;aACpD;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,qCAAqC;aACnD;YACD;gBACE,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,qBAAqB;gBAC5B,WAAW,EAAE,sCAAsC;aACpD;SACF;QACD,OAAO,EAAE,CAAC,iBAAiB,CAAC;QAC5B,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACtB;SACF;QACD,WAAW,EAAE,uCAAuC;KACrD;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const deleteOperation: INodeProperties[];
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteOperation = void 0;
4
+ exports.deleteOperation = [
5
+ {
6
+ displayName: 'Webhook ID',
7
+ name: 'webhookId',
8
+ type: 'number',
9
+ required: true,
10
+ default: 0,
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['webhook'],
14
+ operation: ['delete'],
15
+ },
16
+ },
17
+ description: 'ID of the webhook to delete',
18
+ },
19
+ ];
20
+ //# sourceMappingURL=delete.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.operation.js","sourceRoot":"","sources":["../../../../../nodes/Chatwoot/resources/webhook/delete.operation.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IAChD;QACE,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,CAAC;QACV,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACtB;SACF;QACD,WAAW,EAAE,6BAA6B;KAC3C;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const getAllOperation: INodeProperties[];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAllOperation = void 0;
4
+ exports.getAllOperation = [];
5
+ //# sourceMappingURL=getAll.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAll.operation.js","sourceRoot":"","sources":["../../../../../nodes/Chatwoot/resources/webhook/getAll.operation.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB,EAEjD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const webhookOperations: INodeProperties;
3
+ export declare const webhookFields: INodeProperties[];
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.webhookFields = exports.webhookOperations = void 0;
4
+ const getAll_operation_1 = require("./getAll.operation");
5
+ const create_operation_1 = require("./create.operation");
6
+ const update_operation_1 = require("./update.operation");
7
+ const delete_operation_1 = require("./delete.operation");
8
+ exports.webhookOperations = {
9
+ displayName: 'Operation',
10
+ name: 'operation',
11
+ type: 'options',
12
+ noDataExpression: true,
13
+ displayOptions: {
14
+ show: {
15
+ resource: ['webhook'],
16
+ },
17
+ },
18
+ options: [
19
+ {
20
+ name: 'Create',
21
+ value: 'create',
22
+ description: 'Create a new webhook',
23
+ action: 'Create a webhook',
24
+ },
25
+ {
26
+ name: 'Delete',
27
+ value: 'delete',
28
+ description: 'Delete a webhook',
29
+ action: 'Delete a webhook',
30
+ },
31
+ {
32
+ name: 'Get Many',
33
+ value: 'getAll',
34
+ description: 'Get all webhooks in the account',
35
+ action: 'Get all webhooks',
36
+ },
37
+ {
38
+ name: 'Update',
39
+ value: 'update',
40
+ description: 'Update a webhook',
41
+ action: 'Update a webhook',
42
+ },
43
+ ],
44
+ default: 'getAll',
45
+ };
46
+ exports.webhookFields = [
47
+ ...getAll_operation_1.getAllOperation,
48
+ ...create_operation_1.createOperation,
49
+ ...update_operation_1.updateOperation,
50
+ ...delete_operation_1.deleteOperation,
51
+ ];
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Chatwoot/resources/webhook/index.ts"],"names":[],"mappings":";;;AACA,yDAAqD;AACrD,yDAAqD;AACrD,yDAAqD;AACrD,yDAAqD;AAExC,QAAA,iBAAiB,GAAoB;IAChD,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE;QACd,IAAI,EAAE;YACJ,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB;KACF;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,sBAAsB;YACnC,MAAM,EAAE,kBAAkB;SAC3B;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,kBAAkB;YAC/B,MAAM,EAAE,kBAAkB;SAC3B;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,iCAAiC;YAC9C,MAAM,EAAE,kBAAkB;SAC3B;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,kBAAkB;YAC/B,MAAM,EAAE,kBAAkB;SAC3B;KACF;IACD,OAAO,EAAE,QAAQ;CAClB,CAAC;AAEW,QAAA,aAAa,GAAsB;IAC9C,GAAG,kCAAe;IAClB,GAAG,kCAAe;IAClB,GAAG,kCAAe;IAClB,GAAG,kCAAe;CACnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const updateOperation: INodeProperties[];
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateOperation = void 0;
4
+ exports.updateOperation = [
5
+ {
6
+ displayName: 'Webhook ID',
7
+ name: 'webhookId',
8
+ type: 'number',
9
+ required: true,
10
+ default: 0,
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['webhook'],
14
+ operation: ['update'],
15
+ },
16
+ },
17
+ description: 'ID of the webhook to update',
18
+ },
19
+ {
20
+ displayName: 'Update Fields',
21
+ name: 'updateFields',
22
+ type: 'collection',
23
+ placeholder: 'Add Field',
24
+ default: {},
25
+ displayOptions: {
26
+ show: {
27
+ resource: ['webhook'],
28
+ operation: ['update'],
29
+ },
30
+ },
31
+ options: [
32
+ {
33
+ displayName: 'Webhook URL',
34
+ name: 'url',
35
+ type: 'string',
36
+ default: '',
37
+ description: 'URL where webhook events will be sent',
38
+ },
39
+ {
40
+ displayName: 'Subscriptions',
41
+ name: 'subscriptions',
42
+ type: 'multiOptions',
43
+ options: [
44
+ { name: 'Contact Created', value: 'contact_created' },
45
+ { name: 'Contact Updated', value: 'contact_updated' },
46
+ { name: 'Conversation Created', value: 'conversation_created' },
47
+ { name: 'Conversation Status Changed', value: 'conversation_status_changed' },
48
+ { name: 'Conversation Updated', value: 'conversation_updated' },
49
+ { name: 'Message Created', value: 'message_created' },
50
+ { name: 'Message Updated', value: 'message_updated' },
51
+ { name: 'Webwidget Triggered', value: 'webwidget_triggered' },
52
+ ],
53
+ default: [],
54
+ description: 'Events that will trigger this webhook',
55
+ },
56
+ ],
57
+ },
58
+ ];
59
+ //# sourceMappingURL=update.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.operation.js","sourceRoot":"","sources":["../../../../../nodes/Chatwoot/resources/webhook/update.operation.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IAChD;QACE,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,CAAC;QACV,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACtB;SACF;QACD,WAAW,EAAE,6BAA6B;KAC3C;IACD;QACE,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,WAAW;QACxB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACtB;SACF;QACD,OAAO,EAAE;YACP;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,uCAAuC;aACrD;YACD;gBACE,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;oBACrD,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;oBACrD,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,sBAAsB,EAAE;oBAC/D,EAAE,IAAI,EAAE,6BAA6B,EAAE,KAAK,EAAE,6BAA6B,EAAE;oBAC7E,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,sBAAsB,EAAE;oBAC/D,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;oBACrD,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;oBACrD,EAAE,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,qBAAqB,EAAE;iBAC9D;gBACD,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,uCAAuC;aACrD;SACF;KACF;CACF,CAAC"}
@@ -8,20 +8,275 @@ export interface IChatwootApiResponse {
8
8
  payload?: IDataObject[] | IDataObject;
9
9
  data?: IDataObject[] | IDataObject;
10
10
  }
11
+ export interface IAccount extends IDataObject {
12
+ id: number;
13
+ name: string;
14
+ locale: string;
15
+ domain?: string;
16
+ support_email?: string;
17
+ features?: IDataObject;
18
+ auto_resolve_duration?: number;
19
+ created_at?: string;
20
+ updated_at?: string;
21
+ }
22
+ export interface IAccountUpdate extends IDataObject {
23
+ name?: string;
24
+ locale?: string;
25
+ domain?: string;
26
+ support_email?: string;
27
+ auto_resolve_duration?: number;
28
+ }
29
+ export type AgentRole = 'agent' | 'administrator';
30
+ export type AgentAvailabilityStatus = 'available' | 'busy' | 'offline';
31
+ export interface IAgent extends IDataObject {
32
+ id: number;
33
+ uid: string;
34
+ name: string;
35
+ email: string;
36
+ role: AgentRole;
37
+ confirmed: boolean;
38
+ availability_status?: AgentAvailabilityStatus;
39
+ auto_offline?: boolean;
40
+ custom_attributes?: IDataObject;
41
+ available_name?: string;
42
+ thumbnail?: string;
43
+ created_at?: string;
44
+ updated_at?: string;
45
+ }
46
+ export interface IAgentCreate extends IDataObject {
47
+ name: string;
48
+ email: string;
49
+ role: AgentRole;
50
+ availability_status?: AgentAvailabilityStatus;
51
+ auto_offline?: boolean;
52
+ }
53
+ export interface IAgentUpdate extends IDataObject {
54
+ name?: string;
55
+ role?: AgentRole;
56
+ availability_status?: AgentAvailabilityStatus;
57
+ auto_offline?: boolean;
58
+ }
59
+ export interface ITeam extends IDataObject {
60
+ id: number;
61
+ name: string;
62
+ description?: string;
63
+ allow_auto_assign?: boolean;
64
+ account_id?: number;
65
+ is_member?: boolean;
66
+ created_at?: string;
67
+ updated_at?: string;
68
+ }
69
+ export interface ITeamCreate extends IDataObject {
70
+ name: string;
71
+ description?: string;
72
+ allow_auto_assign?: boolean;
73
+ }
74
+ export interface ITeamUpdate extends IDataObject {
75
+ name?: string;
76
+ description?: string;
77
+ allow_auto_assign?: boolean;
78
+ }
79
+ export type ChannelType = 'web_widget' | 'api' | 'email' | 'twitter' | 'facebook' | 'whatsapp' | 'sms' | 'telegram' | 'line';
80
+ export interface IInbox extends IDataObject {
81
+ id: number;
82
+ name: string;
83
+ channel_type: ChannelType;
84
+ avatar_url?: string;
85
+ channel_id?: number;
86
+ website_url?: string;
87
+ welcome_title?: string;
88
+ welcome_tagline?: string;
89
+ greeting_enabled?: boolean;
90
+ greeting_message?: string;
91
+ enable_auto_assignment?: boolean;
92
+ working_hours_enabled?: boolean;
93
+ out_of_office_message?: string;
94
+ timezone?: string;
95
+ csat_survey_enabled?: boolean;
96
+ allow_messages_after_resolved?: boolean;
97
+ created_at?: string;
98
+ updated_at?: string;
99
+ }
100
+ export interface IInboxCreate extends IDataObject {
101
+ name: string;
102
+ channel?: IDataObject;
103
+ avatar?: string;
104
+ greeting_enabled?: boolean;
105
+ greeting_message?: string;
106
+ enable_auto_assignment?: boolean;
107
+ working_hours_enabled?: boolean;
108
+ out_of_office_message?: string;
109
+ timezone?: string;
110
+ csat_survey_enabled?: boolean;
111
+ allow_messages_after_resolved?: boolean;
112
+ }
113
+ export interface IInboxUpdate extends IDataObject {
114
+ name?: string;
115
+ avatar?: string;
116
+ greeting_enabled?: boolean;
117
+ greeting_message?: string;
118
+ enable_auto_assignment?: boolean;
119
+ working_hours_enabled?: boolean;
120
+ out_of_office_message?: string;
121
+ timezone?: string;
122
+ csat_survey_enabled?: boolean;
123
+ allow_messages_after_resolved?: boolean;
124
+ enable_email_collect?: boolean;
125
+ business_name?: string;
126
+ website_url?: string;
127
+ welcome_title?: string;
128
+ welcome_tagline?: string;
129
+ }
130
+ export interface ILabel extends IDataObject {
131
+ id: number;
132
+ title: string;
133
+ description?: string;
134
+ color?: string;
135
+ show_on_sidebar?: boolean;
136
+ created_at?: string;
137
+ updated_at?: string;
138
+ }
139
+ export interface ILabelCreate extends IDataObject {
140
+ title: string;
141
+ description?: string;
142
+ color?: string;
143
+ show_on_sidebar?: boolean;
144
+ }
145
+ export interface ILabelUpdate extends IDataObject {
146
+ title?: string;
147
+ description?: string;
148
+ color?: string;
149
+ show_on_sidebar?: boolean;
150
+ }
151
+ export interface ICannedResponse extends IDataObject {
152
+ id: number;
153
+ short_code: string;
154
+ content: string;
155
+ account_id?: number;
156
+ created_at?: string;
157
+ updated_at?: string;
158
+ }
159
+ export interface ICannedResponseCreate extends IDataObject {
160
+ short_code: string;
161
+ content: string;
162
+ }
163
+ export interface ICannedResponseUpdate extends IDataObject {
164
+ short_code?: string;
165
+ content?: string;
166
+ }
167
+ export type CustomAttributeModel = 'contact_attribute' | 'conversation_attribute';
168
+ export type CustomAttributeType = 'text' | 'number' | 'currency' | 'percent' | 'link' | 'date' | 'list' | 'checkbox';
169
+ export interface ICustomAttribute extends IDataObject {
170
+ id: number;
171
+ attribute_display_name: string;
172
+ attribute_display_type: CustomAttributeType;
173
+ attribute_description?: string;
174
+ attribute_key: string;
175
+ attribute_model: CustomAttributeModel;
176
+ default_value?: string | number | boolean;
177
+ attribute_values?: string[];
178
+ created_at?: string;
179
+ updated_at?: string;
180
+ }
181
+ export interface ICustomAttributeCreate extends IDataObject {
182
+ attribute_display_name: string;
183
+ attribute_display_type: CustomAttributeType;
184
+ attribute_description?: string;
185
+ attribute_key: string;
186
+ attribute_model: CustomAttributeModel;
187
+ default_value?: string | number | boolean;
188
+ attribute_values?: string[];
189
+ }
190
+ export interface ICustomAttributeUpdate extends IDataObject {
191
+ attribute_display_name?: string;
192
+ attribute_description?: string;
193
+ default_value?: string | number | boolean;
194
+ attribute_values?: string[];
195
+ }
196
+ export type WebhookSubscription = 'conversation_created' | 'conversation_status_changed' | 'conversation_updated' | 'message_created' | 'message_updated' | 'webwidget_triggered' | 'contact_created' | 'contact_updated';
197
+ export interface IWebhook extends IDataObject {
198
+ id: number;
199
+ url: string;
200
+ subscriptions: WebhookSubscription[];
201
+ account_id?: number;
202
+ created_at?: string;
203
+ updated_at?: string;
204
+ }
205
+ export interface IWebhookCreate extends IDataObject {
206
+ url: string;
207
+ subscriptions: WebhookSubscription[];
208
+ }
209
+ export interface IWebhookUpdate extends IDataObject {
210
+ url?: string;
211
+ subscriptions?: WebhookSubscription[];
212
+ }
213
+ export type AutomationEventType = 'conversation_created' | 'conversation_updated' | 'message_created' | 'conversation_opened';
214
+ export type AutomationActionType = 'assign_agent' | 'assign_team' | 'add_label' | 'remove_label' | 'send_email' | 'send_message' | 'resolve_conversation' | 'mute_conversation' | 'snooze_conversation' | 'send_webhook_event' | 'send_attachment';
215
+ export interface IAutomationRule extends IDataObject {
216
+ id: number;
217
+ name: string;
218
+ description?: string;
219
+ event_name: AutomationEventType;
220
+ active: boolean;
221
+ actions: IDataObject[];
222
+ conditions: IDataObject[];
223
+ account_id?: number;
224
+ created_at?: string;
225
+ updated_at?: string;
226
+ }
227
+ export interface IAutomationRuleCreate extends IDataObject {
228
+ name: string;
229
+ description?: string;
230
+ event_name: AutomationEventType;
231
+ active?: boolean;
232
+ actions: IDataObject[];
233
+ conditions: IDataObject[];
234
+ }
235
+ export interface IAgentBot extends IDataObject {
236
+ id: number;
237
+ name: string;
238
+ description?: string;
239
+ outgoing_url?: string;
240
+ account_id?: number;
241
+ bot_type?: string;
242
+ bot_config?: IDataObject;
243
+ created_at?: string;
244
+ updated_at?: string;
245
+ }
246
+ export interface IAgentBotCreate extends IDataObject {
247
+ name: string;
248
+ description?: string;
249
+ outgoing_url?: string;
250
+ }
251
+ export interface IAgentBotUpdate extends IDataObject {
252
+ name?: string;
253
+ description?: string;
254
+ outgoing_url?: string;
255
+ }
11
256
  export type ConversationStatus = 'open' | 'resolved' | 'pending' | 'snoozed' | 'all';
12
257
  export type AssigneeType = 'me' | 'unassigned' | 'all' | 'assigned';
258
+ export type ConversationPriority = 'urgent' | 'high' | 'medium' | 'low' | 'none';
13
259
  export interface IConversation extends IDataObject {
14
260
  id: number;
15
261
  account_id: number;
16
262
  inbox_id: number;
17
263
  status: ConversationStatus;
264
+ priority?: ConversationPriority;
18
265
  assignee?: IDataObject;
19
266
  contact?: IContact;
20
267
  messages?: IMessage[];
21
268
  labels?: string[];
269
+ team_id?: number;
270
+ additional_attributes?: IDataObject;
271
+ custom_attributes?: IDataObject;
272
+ first_reply_created_at?: string;
22
273
  created_at: string;
23
274
  updated_at: string;
24
275
  last_activity_at?: string;
276
+ waiting_since?: number;
277
+ snoozed_until?: number;
278
+ unread_count?: number;
279
+ agent_last_seen_at?: number;
25
280
  }
26
281
  export interface IConversationFilters extends IDataObject {
27
282
  status?: ConversationStatus;
@@ -32,8 +287,22 @@ export interface IConversationFilters extends IDataObject {
32
287
  q?: string;
33
288
  page?: number;
34
289
  }
35
- export type MessageType = 'incoming' | 'outgoing';
36
- export type ContentType = 'text' | 'input_email' | 'cards' | 'input_select' | 'form' | 'article';
290
+ export interface IConversationCreate extends IDataObject {
291
+ source_id: string;
292
+ inbox_id: number;
293
+ contact_id?: number;
294
+ additional_attributes?: IDataObject;
295
+ custom_attributes?: IDataObject;
296
+ status?: ConversationStatus;
297
+ assignee_id?: number;
298
+ team_id?: number;
299
+ }
300
+ export interface IConversationAssign extends IDataObject {
301
+ assignee_id?: number;
302
+ team_id?: number;
303
+ }
304
+ export type MessageType = 'incoming' | 'outgoing' | 'activity' | 'template';
305
+ export type ContentType = 'text' | 'input_email' | 'cards' | 'input_select' | 'form' | 'article' | 'input_csat';
37
306
  export interface IMessage extends IDataObject {
38
307
  id: number;
39
308
  content: string;
@@ -42,6 +311,8 @@ export interface IMessage extends IDataObject {
42
311
  private: boolean;
43
312
  sender?: IDataObject;
44
313
  conversation_id: number;
314
+ attachments?: IDataObject[];
315
+ content_attributes?: IDataObject;
45
316
  created_at: string;
46
317
  updated_at: string;
47
318
  }
@@ -51,6 +322,8 @@ export interface IMessageCreate extends IDataObject {
51
322
  private?: boolean;
52
323
  content_type?: ContentType;
53
324
  content_attributes?: IDataObject;
325
+ template_params?: IDataObject;
326
+ attachments?: IDataObject[];
54
327
  }
55
328
  export interface IContact extends IDataObject {
56
329
  id: number;
@@ -61,6 +334,7 @@ export interface IContact extends IDataObject {
61
334
  thumbnail?: string;
62
335
  additional_attributes?: IDataObject;
63
336
  custom_attributes?: IDataObject;
337
+ contact_inboxes?: IDataObject[];
64
338
  created_at: string;
65
339
  updated_at: string;
66
340
  last_activity_at?: string;
@@ -84,12 +358,54 @@ export interface IContactUpdate extends IDataObject {
84
358
  avatar_url?: string;
85
359
  blocked?: boolean;
86
360
  }
87
- export interface IInbox extends IDataObject {
361
+ export interface IContactFilter extends IDataObject {
362
+ attribute_key: string;
363
+ filter_operator: 'equal_to' | 'not_equal_to' | 'contains' | 'does_not_contain' | 'is_present' | 'is_not_present';
364
+ values?: string[];
365
+ query_operator?: 'and' | 'or';
366
+ }
367
+ export interface IContactMerge extends IDataObject {
368
+ base_contact_id: number;
369
+ mergee_contact_id: number;
370
+ }
371
+ export type CustomFilterType = 'conversation' | 'contact' | 'report';
372
+ export interface ICustomFilter extends IDataObject {
88
373
  id: number;
89
374
  name: string;
90
- channel_type: string;
91
- avatar_url?: string;
92
- channel_id?: number;
375
+ filter_type: CustomFilterType;
376
+ query: IDataObject;
377
+ account_id?: number;
378
+ created_at?: string;
379
+ updated_at?: string;
380
+ }
381
+ export interface ICustomFilterCreate extends IDataObject {
382
+ name: string;
383
+ filter_type: CustomFilterType;
384
+ query: IDataObject;
385
+ }
386
+ export interface ICustomFilterUpdate extends IDataObject {
387
+ name?: string;
388
+ query?: IDataObject;
389
+ }
390
+ export type ReportType = 'account' | 'agent' | 'inbox' | 'label' | 'team';
391
+ export type ReportMetric = 'conversations_count' | 'incoming_messages_count' | 'outgoing_messages_count' | 'avg_first_response_time' | 'avg_resolution_time' | 'resolutions_count' | 'reply_time';
392
+ export interface IReportParams extends IDataObject {
393
+ type: ReportType;
394
+ metric: ReportMetric;
395
+ since?: string;
396
+ until?: string;
397
+ id?: number;
398
+ timezone_offset?: number;
399
+ }
400
+ export type TriggerEventType = 'conversation_created' | 'conversation_status_changed' | 'conversation_updated' | 'message_created' | 'message_updated' | 'webwidget_triggered' | 'contact_created' | 'contact_updated';
401
+ export interface ITriggerEvent extends IDataObject {
402
+ event: TriggerEventType;
403
+ account?: IDataObject;
404
+ inbox?: IDataObject;
405
+ conversation?: IDataObject;
406
+ message?: IDataObject;
407
+ contact?: IDataObject;
408
+ sender?: IDataObject;
93
409
  }
94
410
  export interface IChatwootError extends IDataObject {
95
411
  error?: string;