@renatoascencio/n8n-nodes-chatwoot 0.1.2 → 0.2.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/README.md +314 -80
- package/dist/nodes/Chatwoot/Chatwoot.node.d.ts +9 -0
- package/dist/nodes/Chatwoot/Chatwoot.node.js +383 -77
- package/dist/nodes/Chatwoot/Chatwoot.node.js.map +1 -1
- package/dist/nodes/Chatwoot/Chatwoot.node.json +22 -0
- package/dist/nodes/Chatwoot/ChatwootTrigger.node.d.ts +12 -0
- package/dist/nodes/Chatwoot/ChatwootTrigger.node.js +197 -0
- package/dist/nodes/Chatwoot/ChatwootTrigger.node.js.map +1 -0
- package/dist/nodes/Chatwoot/ChatwootTrigger.node.json +22 -0
- package/dist/nodes/Chatwoot/GenericFunctions.d.ts +5 -1
- package/dist/nodes/Chatwoot/GenericFunctions.js +71 -0
- package/dist/nodes/Chatwoot/GenericFunctions.js.map +1 -1
- package/dist/nodes/Chatwoot/chatwoot.svg +10 -6
- package/dist/nodes/Chatwoot/resources/account/get.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/account/get.operation.js +5 -0
- package/dist/nodes/Chatwoot/resources/account/get.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/account/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/account/index.js +36 -0
- package/dist/nodes/Chatwoot/resources/account/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/account/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/account/update.operation.js +75 -0
- package/dist/nodes/Chatwoot/resources/account/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/agent/create.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/agent/create.operation.js +95 -0
- package/dist/nodes/Chatwoot/resources/agent/create.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/agent/delete.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/agent/delete.operation.js +23 -0
- package/dist/nodes/Chatwoot/resources/agent/delete.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/agent/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/agent/getAll.operation.js +5 -0
- package/dist/nodes/Chatwoot/resources/agent/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/agent/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/agent/index.js +52 -0
- package/dist/nodes/Chatwoot/resources/agent/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/agent/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/agent/update.operation.js +75 -0
- package/dist/nodes/Chatwoot/resources/agent/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/create.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/create.operation.js +38 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/create.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/delete.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/delete.operation.js +20 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/delete.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/getAll.operation.js +28 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/index.js +52 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/update.operation.js +52 -0
- package/dist/nodes/Chatwoot/resources/cannedResponse/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/contact/getConversations.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/contact/getConversations.operation.js +20 -0
- package/dist/nodes/Chatwoot/resources/contact/getConversations.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/contact/index.js +16 -0
- package/dist/nodes/Chatwoot/resources/contact/index.js.map +1 -1
- package/dist/nodes/Chatwoot/resources/contact/merge.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/contact/merge.operation.js +34 -0
- package/dist/nodes/Chatwoot/resources/contact/merge.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/conversation/addLabels.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/conversation/addLabels.operation.js +37 -0
- package/dist/nodes/Chatwoot/resources/conversation/addLabels.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/conversation/assign.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/conversation/assign.operation.js +87 -0
- package/dist/nodes/Chatwoot/resources/conversation/assign.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/conversation/index.js +16 -0
- package/dist/nodes/Chatwoot/resources/conversation/index.js.map +1 -1
- package/dist/nodes/Chatwoot/resources/customAttribute/create.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/create.operation.js +122 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/create.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/delete.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/delete.operation.js +20 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/delete.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/get.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/get.operation.js +20 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/get.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/getAll.operation.js +32 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/index.js +60 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/update.operation.js +64 -0
- package/dist/nodes/Chatwoot/resources/customAttribute/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/inbox/get.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/inbox/get.operation.js +23 -0
- package/dist/nodes/Chatwoot/resources/inbox/get.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/inbox/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/inbox/getAll.operation.js +5 -0
- package/dist/nodes/Chatwoot/resources/inbox/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/inbox/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/inbox/index.js +44 -0
- package/dist/nodes/Chatwoot/resources/inbox/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/inbox/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/inbox/update.operation.js +143 -0
- package/dist/nodes/Chatwoot/resources/inbox/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/label/create.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/label/create.operation.js +56 -0
- package/dist/nodes/Chatwoot/resources/label/create.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/label/delete.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/label/delete.operation.js +23 -0
- package/dist/nodes/Chatwoot/resources/label/delete.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/label/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/label/getAll.operation.js +5 -0
- package/dist/nodes/Chatwoot/resources/label/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/label/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/label/index.js +52 -0
- package/dist/nodes/Chatwoot/resources/label/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/label/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/label/update.operation.js +66 -0
- package/dist/nodes/Chatwoot/resources/label/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/team/create.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/team/create.operation.js +49 -0
- package/dist/nodes/Chatwoot/resources/team/create.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/team/delete.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/team/delete.operation.js +23 -0
- package/dist/nodes/Chatwoot/resources/team/delete.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/team/get.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/team/get.operation.js +23 -0
- package/dist/nodes/Chatwoot/resources/team/get.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/team/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/team/getAll.operation.js +5 -0
- package/dist/nodes/Chatwoot/resources/team/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/team/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/team/index.js +60 -0
- package/dist/nodes/Chatwoot/resources/team/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/team/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/team/update.operation.js +59 -0
- package/dist/nodes/Chatwoot/resources/team/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/webhook/create.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/webhook/create.operation.js +77 -0
- package/dist/nodes/Chatwoot/resources/webhook/create.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/webhook/delete.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/webhook/delete.operation.js +20 -0
- package/dist/nodes/Chatwoot/resources/webhook/delete.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/webhook/getAll.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/webhook/getAll.operation.js +5 -0
- package/dist/nodes/Chatwoot/resources/webhook/getAll.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/webhook/index.d.ts +3 -0
- package/dist/nodes/Chatwoot/resources/webhook/index.js +52 -0
- package/dist/nodes/Chatwoot/resources/webhook/index.js.map +1 -0
- package/dist/nodes/Chatwoot/resources/webhook/update.operation.d.ts +2 -0
- package/dist/nodes/Chatwoot/resources/webhook/update.operation.js +59 -0
- package/dist/nodes/Chatwoot/resources/webhook/update.operation.js.map +1 -0
- package/dist/nodes/Chatwoot/types.d.ts +305 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
|
@@ -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
|
|
36
|
-
|
|
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,35 @@ export interface IContactUpdate extends IDataObject {
|
|
|
84
358
|
avatar_url?: string;
|
|
85
359
|
blocked?: boolean;
|
|
86
360
|
}
|
|
87
|
-
export interface
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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 ReportType = 'account' | 'agent' | 'inbox' | 'label' | 'team';
|
|
372
|
+
export type ReportMetric = 'conversations_count' | 'incoming_messages_count' | 'outgoing_messages_count' | 'avg_first_response_time' | 'avg_resolution_time' | 'resolutions_count' | 'reply_time';
|
|
373
|
+
export interface IReportParams extends IDataObject {
|
|
374
|
+
type: ReportType;
|
|
375
|
+
metric: ReportMetric;
|
|
376
|
+
since?: string;
|
|
377
|
+
until?: string;
|
|
378
|
+
id?: number;
|
|
379
|
+
timezone_offset?: number;
|
|
380
|
+
}
|
|
381
|
+
export type TriggerEventType = 'conversation_created' | 'conversation_status_changed' | 'conversation_updated' | 'message_created' | 'message_updated' | 'webwidget_triggered' | 'contact_created' | 'contact_updated';
|
|
382
|
+
export interface ITriggerEvent extends IDataObject {
|
|
383
|
+
event: TriggerEventType;
|
|
384
|
+
account?: IDataObject;
|
|
385
|
+
inbox?: IDataObject;
|
|
386
|
+
conversation?: IDataObject;
|
|
387
|
+
message?: IDataObject;
|
|
388
|
+
contact?: IDataObject;
|
|
389
|
+
sender?: IDataObject;
|
|
93
390
|
}
|
|
94
391
|
export interface IChatwootError extends IDataObject {
|
|
95
392
|
error?: string;
|