@renatoascencio/n8n-nodes-chatwoot 0.2.0 → 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 (32) hide show
  1. package/README.md +3 -2
  2. package/dist/nodes/Chatwoot/Chatwoot.node.js +228 -0
  3. package/dist/nodes/Chatwoot/Chatwoot.node.js.map +1 -1
  4. package/dist/nodes/Chatwoot/chatwoot.svg +4 -11
  5. package/dist/nodes/Chatwoot/resources/agentBot/index.d.ts +3 -0
  6. package/dist/nodes/Chatwoot/resources/agentBot/index.js +143 -0
  7. package/dist/nodes/Chatwoot/resources/agentBot/index.js.map +1 -0
  8. package/dist/nodes/Chatwoot/resources/automationRule/index.d.ts +3 -0
  9. package/dist/nodes/Chatwoot/resources/automationRule/index.js +205 -0
  10. package/dist/nodes/Chatwoot/resources/automationRule/index.js.map +1 -0
  11. package/dist/nodes/Chatwoot/resources/conversation/create.operation.d.ts +2 -0
  12. package/dist/nodes/Chatwoot/resources/conversation/create.operation.js +92 -0
  13. package/dist/nodes/Chatwoot/resources/conversation/create.operation.js.map +1 -0
  14. package/dist/nodes/Chatwoot/resources/conversation/index.js +16 -0
  15. package/dist/nodes/Chatwoot/resources/conversation/index.js.map +1 -1
  16. package/dist/nodes/Chatwoot/resources/conversation/togglePriority.operation.d.ts +2 -0
  17. package/dist/nodes/Chatwoot/resources/conversation/togglePriority.operation.js +41 -0
  18. package/dist/nodes/Chatwoot/resources/conversation/togglePriority.operation.js.map +1 -0
  19. package/dist/nodes/Chatwoot/resources/customFilter/index.d.ts +3 -0
  20. package/dist/nodes/Chatwoot/resources/customFilter/index.js +139 -0
  21. package/dist/nodes/Chatwoot/resources/customFilter/index.js.map +1 -0
  22. package/dist/nodes/Chatwoot/resources/message/delete.operation.d.ts +2 -0
  23. package/dist/nodes/Chatwoot/resources/message/delete.operation.js +34 -0
  24. package/dist/nodes/Chatwoot/resources/message/delete.operation.js.map +1 -0
  25. package/dist/nodes/Chatwoot/resources/message/index.js +8 -1
  26. package/dist/nodes/Chatwoot/resources/message/index.js.map +1 -1
  27. package/dist/nodes/Chatwoot/resources/report/index.d.ts +3 -0
  28. package/dist/nodes/Chatwoot/resources/report/index.js +155 -0
  29. package/dist/nodes/Chatwoot/resources/report/index.js.map +1 -0
  30. package/dist/nodes/Chatwoot/types.d.ts +19 -0
  31. package/dist/tsconfig.tsbuildinfo +1 -1
  32. package/package.json +1 -1
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.reportFields = exports.reportOperations = void 0;
4
+ exports.reportOperations = {
5
+ displayName: 'Operation',
6
+ name: 'operation',
7
+ type: 'options',
8
+ noDataExpression: true,
9
+ displayOptions: {
10
+ show: {
11
+ resource: ['report'],
12
+ },
13
+ },
14
+ options: [
15
+ {
16
+ name: 'Account Summary',
17
+ value: 'accountSummary',
18
+ description: 'Get account reports summary',
19
+ action: 'Get account summary report',
20
+ },
21
+ {
22
+ name: 'Agent Statistics',
23
+ value: 'agentStatistics',
24
+ description: 'Get agent conversation metrics',
25
+ action: 'Get agent statistics',
26
+ },
27
+ {
28
+ name: 'Conversation Counts',
29
+ value: 'conversationCounts',
30
+ description: 'Get conversation counts by status',
31
+ action: 'Get conversation counts',
32
+ },
33
+ {
34
+ name: 'Conversation Statistics',
35
+ value: 'conversationStatistics',
36
+ description: 'Get conversation statistics grouped by various dimensions',
37
+ action: 'Get conversation statistics',
38
+ },
39
+ ],
40
+ default: 'accountSummary',
41
+ };
42
+ exports.reportFields = [
43
+ {
44
+ displayName: 'Since',
45
+ name: 'since',
46
+ type: 'dateTime',
47
+ required: true,
48
+ default: '',
49
+ displayOptions: {
50
+ show: {
51
+ resource: ['report'],
52
+ operation: ['accountSummary', 'agentStatistics', 'conversationStatistics'],
53
+ },
54
+ },
55
+ description: 'Start date for the report (Unix timestamp)',
56
+ },
57
+ {
58
+ displayName: 'Until',
59
+ name: 'until',
60
+ type: 'dateTime',
61
+ required: true,
62
+ default: '',
63
+ displayOptions: {
64
+ show: {
65
+ resource: ['report'],
66
+ operation: ['accountSummary', 'agentStatistics', 'conversationStatistics'],
67
+ },
68
+ },
69
+ description: 'End date for the report (Unix timestamp)',
70
+ },
71
+ {
72
+ displayName: 'Metric',
73
+ name: 'metric',
74
+ type: 'options',
75
+ options: [
76
+ { name: 'Conversations Count', value: 'conversations_count' },
77
+ { name: 'Incoming Messages Count', value: 'incoming_messages_count' },
78
+ { name: 'Outgoing Messages Count', value: 'outgoing_messages_count' },
79
+ { name: 'Average First Response Time', value: 'avg_first_response_time' },
80
+ { name: 'Average Resolution Time', value: 'avg_resolution_time' },
81
+ { name: 'Resolutions Count', value: 'resolutions_count' },
82
+ ],
83
+ default: 'conversations_count',
84
+ displayOptions: {
85
+ show: {
86
+ resource: ['report'],
87
+ operation: ['accountSummary'],
88
+ },
89
+ },
90
+ description: 'Metric to retrieve',
91
+ },
92
+ {
93
+ displayName: 'Group By',
94
+ name: 'groupBy',
95
+ type: 'options',
96
+ options: [
97
+ { name: 'Agent', value: 'agent' },
98
+ { name: 'Channel Type', value: 'channel_type' },
99
+ { name: 'Inbox', value: 'inbox' },
100
+ { name: 'Team', value: 'team' },
101
+ ],
102
+ default: 'agent',
103
+ displayOptions: {
104
+ show: {
105
+ resource: ['report'],
106
+ operation: ['conversationStatistics'],
107
+ },
108
+ },
109
+ description: 'Group statistics by this dimension',
110
+ },
111
+ {
112
+ displayName: 'Options',
113
+ name: 'options',
114
+ type: 'collection',
115
+ placeholder: 'Add Option',
116
+ default: {},
117
+ displayOptions: {
118
+ show: {
119
+ resource: ['report'],
120
+ operation: ['accountSummary', 'agentStatistics', 'conversationStatistics'],
121
+ },
122
+ },
123
+ options: [
124
+ {
125
+ displayName: 'Type',
126
+ name: 'type',
127
+ type: 'options',
128
+ options: [
129
+ { name: 'Account', value: 'account' },
130
+ { name: 'Agent', value: 'agent' },
131
+ { name: 'Inbox', value: 'inbox' },
132
+ { name: 'Label', value: 'label' },
133
+ { name: 'Team', value: 'team' },
134
+ ],
135
+ default: 'account',
136
+ description: 'Type of report',
137
+ },
138
+ {
139
+ displayName: 'ID',
140
+ name: 'id',
141
+ type: 'number',
142
+ default: 0,
143
+ description: 'ID of the agent/inbox/team/label for specific reports',
144
+ },
145
+ {
146
+ displayName: 'Timezone Offset',
147
+ name: 'timezone_offset',
148
+ type: 'number',
149
+ default: 0,
150
+ description: 'Timezone offset in seconds',
151
+ },
152
+ ],
153
+ },
154
+ ];
155
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Chatwoot/resources/report/index.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAoB;IAC/C,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,QAAQ,CAAC;SACrB;KACF;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,gBAAgB;YACvB,WAAW,EAAE,6BAA6B;YAC1C,MAAM,EAAE,4BAA4B;SACrC;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,gCAAgC;YAC7C,MAAM,EAAE,sBAAsB;SAC/B;QACD;YACE,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,mCAAmC;YAChD,MAAM,EAAE,yBAAyB;SAClC;QACD;YACE,IAAI,EAAE,yBAAyB;YAC/B,KAAK,EAAE,wBAAwB;YAC/B,WAAW,EAAE,2DAA2D;YACxE,MAAM,EAAE,6BAA6B;SACtC;KACF;IACD,OAAO,EAAE,gBAAgB;CAC1B,CAAC;AAEW,QAAA,YAAY,GAAsB;IAE7C;QACE,WAAW,EAAE,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K,EAAE,MAAM,EAAE;iBAChC;gBACD,OAAO,EAAE,SAAS;gBAClB,WAAW,EAAE,gBAAgB;aAC9B;YACD;gBACE,WAAW,EAAE,IAAI;gBACjB,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,uDAAuD;aACrE;YACD;gBACE,WAAW,EAAE,iBAAiB;gBAC9B,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,4BAA4B;aAC1C;SACF;KACF;CACF,CAAC"}
@@ -368,6 +368,25 @@ export interface IContactMerge extends IDataObject {
368
368
  base_contact_id: number;
369
369
  mergee_contact_id: number;
370
370
  }
371
+ export type CustomFilterType = 'conversation' | 'contact' | 'report';
372
+ export interface ICustomFilter extends IDataObject {
373
+ id: number;
374
+ name: string;
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
+ }
371
390
  export type ReportType = 'account' | 'agent' | 'inbox' | 'label' | 'team';
372
391
  export type ReportMetric = 'conversations_count' | 'incoming_messages_count' | 'outgoing_messages_count' | 'avg_first_response_time' | 'avg_resolution_time' | 'resolutions_count' | 'reply_time';
373
392
  export interface IReportParams extends IDataObject {