n8n-nodes-aimfox 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +19 -0
- package/README.md +116 -0
- package/dist/credentials/AimfoxApi.credentials.d.ts +8 -0
- package/dist/credentials/AimfoxApi.credentials.js +29 -0
- package/dist/credentials/AimfoxApi.credentials.js.map +1 -0
- package/dist/credentials/AimfoxOAuth2Api.credentials.d.ts +8 -0
- package/dist/credentials/AimfoxOAuth2Api.credentials.js +69 -0
- package/dist/credentials/AimfoxOAuth2Api.credentials.js.map +1 -0
- package/dist/credentials/CityWeatherApi.credentials.d.ts +8 -0
- package/dist/credentials/CityWeatherApi.credentials.js +28 -0
- package/dist/credentials/CityWeatherApi.credentials.js.map +1 -0
- package/dist/nodes/Aimfox/Aimfox.node.d.ts +4 -0
- package/dist/nodes/Aimfox/Aimfox.node.js +38 -0
- package/dist/nodes/Aimfox/Aimfox.node.js.map +1 -0
- package/dist/nodes/Aimfox/Aimfox.node.json +23 -0
- package/dist/nodes/Aimfox/aimfox.svg +3 -0
- package/dist/nodes/Aimfox/properties/account/operations.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/account/operations.js +33 -0
- package/dist/nodes/Aimfox/properties/account/operations.js.map +1 -0
- package/dist/nodes/Aimfox/properties/blacklist/fields.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/blacklist/fields.js +21 -0
- package/dist/nodes/Aimfox/properties/blacklist/fields.js.map +1 -0
- package/dist/nodes/Aimfox/properties/blacklist/operations.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/blacklist/operations.js +63 -0
- package/dist/nodes/Aimfox/properties/blacklist/operations.js.map +1 -0
- package/dist/nodes/Aimfox/properties/campaign/fields.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/campaign/fields.js +82 -0
- package/dist/nodes/Aimfox/properties/campaign/fields.js.map +1 -0
- package/dist/nodes/Aimfox/properties/campaign/operations.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/campaign/operations.js +126 -0
- package/dist/nodes/Aimfox/properties/campaign/operations.js.map +1 -0
- package/dist/nodes/Aimfox/properties/conversation/fields.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/conversation/fields.js +72 -0
- package/dist/nodes/Aimfox/properties/conversation/fields.js.map +1 -0
- package/dist/nodes/Aimfox/properties/conversation/operations.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/conversation/operations.js +115 -0
- package/dist/nodes/Aimfox/properties/conversation/operations.js.map +1 -0
- package/dist/nodes/Aimfox/properties/index.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/index.js +72 -0
- package/dist/nodes/Aimfox/properties/index.js.map +1 -0
- package/dist/nodes/Aimfox/properties/label/fields.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/label/fields.js +58 -0
- package/dist/nodes/Aimfox/properties/label/fields.js.map +1 -0
- package/dist/nodes/Aimfox/properties/label/operations.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/label/operations.js +52 -0
- package/dist/nodes/Aimfox/properties/label/operations.js.map +1 -0
- package/dist/nodes/Aimfox/properties/lead/fields.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/lead/fields.js +21 -0
- package/dist/nodes/Aimfox/properties/lead/fields.js.map +1 -0
- package/dist/nodes/Aimfox/properties/lead/operations.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/lead/operations.js +96 -0
- package/dist/nodes/Aimfox/properties/lead/operations.js.map +1 -0
- package/dist/nodes/Aimfox/properties/note/fields.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/note/fields.js +21 -0
- package/dist/nodes/Aimfox/properties/note/fields.js.map +1 -0
- package/dist/nodes/Aimfox/properties/template/fields.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/template/fields.js +99 -0
- package/dist/nodes/Aimfox/properties/template/fields.js.map +1 -0
- package/dist/nodes/Aimfox/properties/template/operations.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/template/operations.js +85 -0
- package/dist/nodes/Aimfox/properties/template/operations.js.map +1 -0
- package/dist/nodes/Aimfox/properties/workspace/fields.d.ts +2 -0
- package/dist/nodes/Aimfox/properties/workspace/fields.js +41 -0
- package/dist/nodes/Aimfox/properties/workspace/fields.js.map +1 -0
- package/dist/nodes/AimfoxTrigger/AimfoxTrigger.node.d.ts +12 -0
- package/dist/nodes/AimfoxTrigger/AimfoxTrigger.node.js +131 -0
- package/dist/nodes/AimfoxTrigger/AimfoxTrigger.node.js.map +1 -0
- package/dist/nodes/AimfoxTrigger/AimfoxTrigger.node.json +17 -0
- package/dist/nodes/AimfoxTrigger/GenericFunctions.d.ts +2 -0
- package/dist/nodes/AimfoxTrigger/GenericFunctions.js +31 -0
- package/dist/nodes/AimfoxTrigger/GenericFunctions.js.map +1 -0
- package/dist/nodes/AimfoxTrigger/aimfox.svg +3 -0
- package/dist/nodes/AimfoxTrigger/properties/index.d.ts +2 -0
- package/dist/nodes/AimfoxTrigger/properties/index.js +58 -0
- package/dist/nodes/AimfoxTrigger/properties/index.js.map +1 -0
- package/dist/nodes/AimfoxTrigger/properties/workspace/fields.d.ts +2 -0
- package/dist/nodes/AimfoxTrigger/properties/workspace/fields.js +41 -0
- package/dist/nodes/AimfoxTrigger/properties/workspace/fields.js.map +1 -0
- package/dist/nodes/CityWeather/CityWeather.node.d.ts +4 -0
- package/dist/nodes/CityWeather/CityWeather.node.js +892 -0
- package/dist/nodes/CityWeather/CityWeather.node.js.map +1 -0
- package/dist/nodes/CityWeather/CityWeather.node.json +23 -0
- package/dist/nodes/CityWeather/aimfox.svg +3 -0
- package/dist/nodes/CityWeather/openweather.svg +3 -0
- package/dist/package.json +51 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.js +0 -0
- package/package.json +51 -0
|
@@ -0,0 +1,892 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CityWeather = void 0;
|
|
4
|
+
class CityWeather {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.description = {
|
|
7
|
+
displayName: 'Aimfox',
|
|
8
|
+
name: 'cityWeather',
|
|
9
|
+
icon: 'file:aimfox.svg',
|
|
10
|
+
group: ['transform'],
|
|
11
|
+
version: 1,
|
|
12
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
13
|
+
description: 'Interact with Aimfox application',
|
|
14
|
+
defaults: {
|
|
15
|
+
name: 'Aimfox',
|
|
16
|
+
},
|
|
17
|
+
inputs: ["main"],
|
|
18
|
+
outputs: ["main"],
|
|
19
|
+
credentials: [
|
|
20
|
+
{
|
|
21
|
+
name: 'AimfoxApi',
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
requestDefaults: {
|
|
26
|
+
baseURL: 'https://673b415297f2.ngrok-free.app/api/v1',
|
|
27
|
+
headers: {
|
|
28
|
+
Authorization: '={{"Bearer " + $credentials.apiKey}}',
|
|
29
|
+
Accept: 'application/json',
|
|
30
|
+
'Content-Type': 'application/json',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
properties: [
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Resource',
|
|
36
|
+
name: 'resource',
|
|
37
|
+
type: 'options',
|
|
38
|
+
noDataExpression: true,
|
|
39
|
+
options: [
|
|
40
|
+
{
|
|
41
|
+
name: 'Account',
|
|
42
|
+
value: 'account',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'Blacklist',
|
|
46
|
+
value: 'blacklist',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'Campaign',
|
|
50
|
+
value: 'campaign',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Conversation',
|
|
54
|
+
value: 'conversation',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'Label',
|
|
58
|
+
value: 'label',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'Lead',
|
|
62
|
+
value: 'lead',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Template',
|
|
66
|
+
value: 'template',
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
default: 'account',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
displayName: 'Operation',
|
|
73
|
+
name: 'operation',
|
|
74
|
+
type: 'options',
|
|
75
|
+
noDataExpression: true,
|
|
76
|
+
displayOptions: {
|
|
77
|
+
show: {
|
|
78
|
+
resource: ['account'],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
options: [
|
|
82
|
+
{
|
|
83
|
+
name: 'List Accounts',
|
|
84
|
+
value: 'listAccounts',
|
|
85
|
+
action: 'List accounts',
|
|
86
|
+
description: 'List all accounts in the workspace',
|
|
87
|
+
routing: {
|
|
88
|
+
request: {
|
|
89
|
+
method: 'GET',
|
|
90
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/accounts',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
default: 'listAccounts',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
displayName: 'Operation',
|
|
99
|
+
name: 'operation',
|
|
100
|
+
type: 'options',
|
|
101
|
+
noDataExpression: true,
|
|
102
|
+
displayOptions: {
|
|
103
|
+
show: {
|
|
104
|
+
resource: ['blacklist'],
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
options: [
|
|
108
|
+
{
|
|
109
|
+
name: 'List Blacklisted Accounts',
|
|
110
|
+
value: 'listBlacklist',
|
|
111
|
+
action: 'List blacklist',
|
|
112
|
+
description: 'List all blacklisted accounts in the workspace',
|
|
113
|
+
routing: {
|
|
114
|
+
request: {
|
|
115
|
+
method: 'GET',
|
|
116
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/blacklist',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'Add Profile to Blacklist',
|
|
122
|
+
value: 'addProfileToBlacklist',
|
|
123
|
+
action: 'Add profile to blacklist',
|
|
124
|
+
description: 'Add profile to the blacklist using the profile URN',
|
|
125
|
+
routing: {
|
|
126
|
+
request: {
|
|
127
|
+
method: 'POST',
|
|
128
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/blacklist/{{$parameter["profileUrn"]}}',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: 'Remove Profile From Blacklist',
|
|
134
|
+
value: 'removeProfileFromBlacklist',
|
|
135
|
+
action: 'Remove profile from blacklist',
|
|
136
|
+
description: 'Remove profile from the blacklist using the profile URN',
|
|
137
|
+
routing: {
|
|
138
|
+
request: {
|
|
139
|
+
method: 'DELETE',
|
|
140
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/blacklist/{{$parameter["profileUrn"]}}',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
default: 'listBlacklist',
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
displayName: 'Operation',
|
|
149
|
+
name: 'operation',
|
|
150
|
+
type: 'options',
|
|
151
|
+
noDataExpression: true,
|
|
152
|
+
displayOptions: {
|
|
153
|
+
show: {
|
|
154
|
+
resource: ['conversation'],
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
options: [
|
|
158
|
+
{
|
|
159
|
+
name: 'Get Conversation',
|
|
160
|
+
value: 'getConversation',
|
|
161
|
+
action: 'Get conversation',
|
|
162
|
+
description: 'Get a specific conversation by URN',
|
|
163
|
+
routing: {
|
|
164
|
+
request: {
|
|
165
|
+
method: 'GET',
|
|
166
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/conversations/{{$parameter["conversationUrn"]}}',
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: 'Get Lead Conversation',
|
|
172
|
+
value: 'getLeadConversation',
|
|
173
|
+
action: 'Get lead conversation',
|
|
174
|
+
description: 'Get a specific lead conversation URN',
|
|
175
|
+
routing: {
|
|
176
|
+
request: {
|
|
177
|
+
method: 'GET',
|
|
178
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/accounts/{{$parameter["accountId"]}}/leads/{{$parameter["leadId"]}}/conversation-urn',
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: 'List Conversations',
|
|
184
|
+
value: 'listConversations',
|
|
185
|
+
action: 'List conversations',
|
|
186
|
+
description: 'List all conversations for the selected workspace',
|
|
187
|
+
routing: {
|
|
188
|
+
request: {
|
|
189
|
+
method: 'GET',
|
|
190
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/conversations',
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: 'Mark Conversation As Read',
|
|
196
|
+
value: 'markConversationAsRead',
|
|
197
|
+
action: 'Mark conversation as read',
|
|
198
|
+
description: 'Mark an existing conversation as read',
|
|
199
|
+
routing: {
|
|
200
|
+
request: {
|
|
201
|
+
method: 'POST',
|
|
202
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/accounts/{{$parameter["accountId"]}}/conversations/{{$parameter["conversationUrn"]}}/read',
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: 'Send Message To Conversation',
|
|
208
|
+
value: 'sendMessageToConversation',
|
|
209
|
+
action: 'Send message to conversation',
|
|
210
|
+
description: 'Send a message to an existing conversation',
|
|
211
|
+
routing: {
|
|
212
|
+
request: {
|
|
213
|
+
method: 'POST',
|
|
214
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/accounts/{{$parameter["accountId"]}}/conversations/{{$parameter["conversationUrn"]}}',
|
|
215
|
+
body: {
|
|
216
|
+
message: '={{$parameter["conversationMessage"]}}',
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'Start Conversation',
|
|
223
|
+
value: 'startConversation',
|
|
224
|
+
action: 'Start conversation',
|
|
225
|
+
description: 'Start a new conversation with the lead',
|
|
226
|
+
routing: {
|
|
227
|
+
request: {
|
|
228
|
+
method: 'POST',
|
|
229
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/accounts/{{$parameter["accountId"]}}/conversations',
|
|
230
|
+
body: {
|
|
231
|
+
message: '={{$parameter["conversationMessage"]}}',
|
|
232
|
+
recipients: ['={{$parameter["leadId"]}}'],
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
default: 'listConversations',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
displayName: 'Operation',
|
|
242
|
+
name: 'operation',
|
|
243
|
+
type: 'options',
|
|
244
|
+
noDataExpression: true,
|
|
245
|
+
default: 'listCampaigns',
|
|
246
|
+
displayOptions: {
|
|
247
|
+
show: {
|
|
248
|
+
resource: ['campaign'],
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
options: [
|
|
252
|
+
{
|
|
253
|
+
name: 'Add Profile to Campaign',
|
|
254
|
+
value: 'addProfileToCampaign',
|
|
255
|
+
action: 'Add profile to campaign',
|
|
256
|
+
description: 'Add profile to the selected campaign',
|
|
257
|
+
routing: {
|
|
258
|
+
request: {
|
|
259
|
+
method: 'POST',
|
|
260
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/campaigns/{{$parameter["campaignId"]}}/audience',
|
|
261
|
+
body: {
|
|
262
|
+
profile_url: '={{$parameter["profileUrl"]}}',
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
name: 'Add Profile to Campaign with Custom Variables',
|
|
269
|
+
value: 'addProfileToCampaignWithCustomVariables',
|
|
270
|
+
action: 'Add profile to campaign with custom variables',
|
|
271
|
+
description: 'Add profile to the selected campaign with custom variables',
|
|
272
|
+
routing: {
|
|
273
|
+
request: {
|
|
274
|
+
method: 'POST',
|
|
275
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/campaigns/{{$parameter["campaignId"]}}/audience/multiple',
|
|
276
|
+
body: {
|
|
277
|
+
type: 'profile_url',
|
|
278
|
+
profiles: [
|
|
279
|
+
{
|
|
280
|
+
profile_url: '={{$parameter["profileUrl"]}}',
|
|
281
|
+
custom_variables: '={{JSON.parse($parameter["customVariables"])}}',
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: 'Get Campaign',
|
|
290
|
+
value: 'getCampaign',
|
|
291
|
+
action: 'Get a campaign',
|
|
292
|
+
description: 'Get a specific campaign by ID',
|
|
293
|
+
routing: {
|
|
294
|
+
request: {
|
|
295
|
+
method: 'GET',
|
|
296
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/campaigns/{{$parameter["campaignId"]}}',
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: 'List Campaigns',
|
|
302
|
+
value: 'listCampaigns',
|
|
303
|
+
action: 'List campaigns',
|
|
304
|
+
description: 'List all campaigns in the workspace',
|
|
305
|
+
routing: {
|
|
306
|
+
request: {
|
|
307
|
+
method: 'GET',
|
|
308
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/campaigns',
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
name: 'Pause',
|
|
314
|
+
value: 'pauseCampaign',
|
|
315
|
+
action: 'Pause a campaign',
|
|
316
|
+
description: 'Pause a running campaign',
|
|
317
|
+
routing: {
|
|
318
|
+
request: {
|
|
319
|
+
method: 'PATCH',
|
|
320
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/campaigns/{{$parameter["campaignId"]}}',
|
|
321
|
+
body: {
|
|
322
|
+
state: 'PAUSED',
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
name: 'Resume',
|
|
329
|
+
value: 'resumeCampaign',
|
|
330
|
+
action: 'Resume a campaign',
|
|
331
|
+
description: 'Resume a paused campaign',
|
|
332
|
+
routing: {
|
|
333
|
+
request: {
|
|
334
|
+
method: 'PATCH',
|
|
335
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/campaigns/{{$parameter["campaignId"]}}',
|
|
336
|
+
body: {
|
|
337
|
+
state: 'ACTIVE',
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
],
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
displayName: 'Operation',
|
|
346
|
+
name: 'operation',
|
|
347
|
+
type: 'options',
|
|
348
|
+
noDataExpression: true,
|
|
349
|
+
displayOptions: {
|
|
350
|
+
show: {
|
|
351
|
+
resource: ['label'],
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
options: [
|
|
355
|
+
{
|
|
356
|
+
name: 'List Labels',
|
|
357
|
+
value: 'listLabels',
|
|
358
|
+
action: 'List labels',
|
|
359
|
+
description: 'List all labels for the selected workspace',
|
|
360
|
+
routing: {
|
|
361
|
+
request: {
|
|
362
|
+
method: 'GET',
|
|
363
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/labels',
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
name: 'Add Label',
|
|
369
|
+
value: 'addLabel',
|
|
370
|
+
action: 'Add label',
|
|
371
|
+
description: 'Add a new label to the selected workspace',
|
|
372
|
+
routing: {
|
|
373
|
+
request: {
|
|
374
|
+
method: 'POST',
|
|
375
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/labels',
|
|
376
|
+
body: {
|
|
377
|
+
name: '={{$parameter["labelName"]}}',
|
|
378
|
+
color: '={{$parameter["labelColor"]}}',
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
],
|
|
384
|
+
default: 'listLabels',
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
displayName: 'Operation',
|
|
388
|
+
name: 'operation',
|
|
389
|
+
type: 'options',
|
|
390
|
+
noDataExpression: true,
|
|
391
|
+
displayOptions: {
|
|
392
|
+
show: {
|
|
393
|
+
resource: ['lead'],
|
|
394
|
+
},
|
|
395
|
+
},
|
|
396
|
+
options: [
|
|
397
|
+
{
|
|
398
|
+
name: 'Add Label To Lead',
|
|
399
|
+
value: 'addLabelToLead',
|
|
400
|
+
action: 'Add label to lead',
|
|
401
|
+
description: 'Add a new label to the selected lead',
|
|
402
|
+
routing: {
|
|
403
|
+
request: {
|
|
404
|
+
method: 'POST',
|
|
405
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/leads/{{$parameter["leadId"]}}/labels/{{$parameter["labelId"]}}',
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
name: 'Add Note To Lead',
|
|
411
|
+
value: 'addNoteToLead',
|
|
412
|
+
action: 'Add note to lead',
|
|
413
|
+
description: 'Add a new note to the selected lead',
|
|
414
|
+
routing: {
|
|
415
|
+
request: {
|
|
416
|
+
method: 'POST',
|
|
417
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/leads/{{$parameter["leadId"]}}/notes',
|
|
418
|
+
body: {
|
|
419
|
+
text: '={{$parameter["noteText"]}}',
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
name: 'Get Lead',
|
|
426
|
+
value: 'getLead',
|
|
427
|
+
action: 'Get lead',
|
|
428
|
+
description: 'Get a specific lead by ID',
|
|
429
|
+
routing: {
|
|
430
|
+
request: {
|
|
431
|
+
method: 'GET',
|
|
432
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/leads/{{$parameter["leadId"]}}',
|
|
433
|
+
},
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
name: 'List Recent Leads',
|
|
438
|
+
value: 'listRecentLeads',
|
|
439
|
+
action: 'List recent leads',
|
|
440
|
+
description: 'List recent leads for the selected workspace',
|
|
441
|
+
routing: {
|
|
442
|
+
request: {
|
|
443
|
+
method: 'GET',
|
|
444
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/recent-leads',
|
|
445
|
+
},
|
|
446
|
+
},
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
name: 'Remove Label From Lead',
|
|
450
|
+
value: 'removeLabelFromLead',
|
|
451
|
+
action: 'Remove label from lead',
|
|
452
|
+
description: 'Remove a label from the selected lead',
|
|
453
|
+
routing: {
|
|
454
|
+
request: {
|
|
455
|
+
method: 'DELETE',
|
|
456
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/leads/{{$parameter["leadId"]}}/labels/{{$parameter["labelId"]}}',
|
|
457
|
+
},
|
|
458
|
+
},
|
|
459
|
+
},
|
|
460
|
+
],
|
|
461
|
+
default: 'listRecentLeads',
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
displayName: 'Operation',
|
|
465
|
+
name: 'operation',
|
|
466
|
+
type: 'options',
|
|
467
|
+
noDataExpression: true,
|
|
468
|
+
displayOptions: {
|
|
469
|
+
show: {
|
|
470
|
+
resource: ['template'],
|
|
471
|
+
},
|
|
472
|
+
},
|
|
473
|
+
options: [
|
|
474
|
+
{
|
|
475
|
+
name: 'List Templates',
|
|
476
|
+
value: 'listTemplates',
|
|
477
|
+
action: 'List templates',
|
|
478
|
+
description: 'List all templates in the selected workspace',
|
|
479
|
+
routing: {
|
|
480
|
+
request: {
|
|
481
|
+
method: 'GET',
|
|
482
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/templates',
|
|
483
|
+
},
|
|
484
|
+
},
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
name: 'Get Template',
|
|
488
|
+
value: 'getTemplate',
|
|
489
|
+
action: 'Get template',
|
|
490
|
+
description: 'Get a specific template by ID',
|
|
491
|
+
routing: {
|
|
492
|
+
request: {
|
|
493
|
+
method: 'GET',
|
|
494
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/templates/{{$parameter["templateId"]}}',
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
name: 'Create Template',
|
|
500
|
+
value: 'createTemplate',
|
|
501
|
+
action: 'Create template',
|
|
502
|
+
description: 'Create a new template in the selected workspace',
|
|
503
|
+
routing: {
|
|
504
|
+
request: {
|
|
505
|
+
method: 'POST',
|
|
506
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/templates',
|
|
507
|
+
body: {
|
|
508
|
+
name: '={{$parameter["templateName"]}}',
|
|
509
|
+
type: '={{$parameter["templateType"]}}',
|
|
510
|
+
subject: '={{$parameter["templateSubject"]}}',
|
|
511
|
+
message: '={{$parameter["templateMessage"]}}',
|
|
512
|
+
ai: '={{$parameter["templateAi"]}}',
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
name: 'Remove Template',
|
|
519
|
+
value: 'removeTemplate',
|
|
520
|
+
action: 'Remove template',
|
|
521
|
+
description: 'Remove a template from the workspace',
|
|
522
|
+
routing: {
|
|
523
|
+
request: {
|
|
524
|
+
method: 'DELETE',
|
|
525
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/templates/{{$parameter["templateId"]}}',
|
|
526
|
+
},
|
|
527
|
+
},
|
|
528
|
+
},
|
|
529
|
+
],
|
|
530
|
+
default: 'listTemplates',
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
displayName: 'Workspace ID',
|
|
534
|
+
name: 'workspaceId',
|
|
535
|
+
type: 'options',
|
|
536
|
+
required: true,
|
|
537
|
+
typeOptions: {
|
|
538
|
+
loadOptions: {
|
|
539
|
+
routing: {
|
|
540
|
+
request: {
|
|
541
|
+
method: 'GET',
|
|
542
|
+
url: '/kurcina',
|
|
543
|
+
},
|
|
544
|
+
output: {
|
|
545
|
+
postReceive: [
|
|
546
|
+
{
|
|
547
|
+
type: 'rootProperty',
|
|
548
|
+
properties: {
|
|
549
|
+
property: 'workspaces',
|
|
550
|
+
},
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
type: 'setKeyValue',
|
|
554
|
+
properties: {
|
|
555
|
+
name: '={{$responseItem.name}}',
|
|
556
|
+
value: '={{$responseItem.id}}',
|
|
557
|
+
},
|
|
558
|
+
},
|
|
559
|
+
],
|
|
560
|
+
},
|
|
561
|
+
},
|
|
562
|
+
},
|
|
563
|
+
},
|
|
564
|
+
default: '',
|
|
565
|
+
description: 'Select the Aimfox workspace. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
displayName: 'Profile URN',
|
|
569
|
+
name: 'profileUrn',
|
|
570
|
+
type: 'string',
|
|
571
|
+
displayOptions: {
|
|
572
|
+
show: {
|
|
573
|
+
resource: ['blacklist'],
|
|
574
|
+
operation: ['addProfileToBlacklist'],
|
|
575
|
+
},
|
|
576
|
+
},
|
|
577
|
+
default: '',
|
|
578
|
+
placeholder: 'ACoAAAK-hCcB6RvA71OCuRk-JHYpV6FFKIjbxpY',
|
|
579
|
+
description: 'The LinkedIn URN of the profile to add to the blacklist',
|
|
580
|
+
required: true,
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
displayName: 'Conversation URN',
|
|
584
|
+
name: 'conversationUrn',
|
|
585
|
+
type: 'string',
|
|
586
|
+
displayOptions: {
|
|
587
|
+
show: {
|
|
588
|
+
resource: ['conversation'],
|
|
589
|
+
operation: ['getConversation', 'sendMessageToConversation', 'markConversationAsRead'],
|
|
590
|
+
},
|
|
591
|
+
},
|
|
592
|
+
default: '',
|
|
593
|
+
placeholder: '2-MTczMTgzNzQyMTM4OGI1NzMzNC0wMDMmNDU5NGMxYzgtZGIyMi00Yzc4LWFjNTYtOWIyNDdmMzI4MmQwXzAxMg==',
|
|
594
|
+
description: 'The URN of the conversation to retrieve',
|
|
595
|
+
required: true,
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
displayName: 'Account ID',
|
|
599
|
+
name: 'accountId',
|
|
600
|
+
type: 'string',
|
|
601
|
+
displayOptions: {
|
|
602
|
+
show: {
|
|
603
|
+
resource: ['conversation'],
|
|
604
|
+
operation: ['getLeadConversation', 'startConversation', 'sendMessageToConversation', 'markConversationAsRead'],
|
|
605
|
+
},
|
|
606
|
+
},
|
|
607
|
+
default: '',
|
|
608
|
+
placeholder: '987654321',
|
|
609
|
+
description: 'The LinkedIn ID of the account to retrieve the conversation for',
|
|
610
|
+
required: true,
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
displayName: 'Lead ID',
|
|
614
|
+
name: 'leadId',
|
|
615
|
+
type: 'string',
|
|
616
|
+
displayOptions: {
|
|
617
|
+
show: {
|
|
618
|
+
resource: ['conversation'],
|
|
619
|
+
operation: ['getLeadConversation', 'startConversation'],
|
|
620
|
+
},
|
|
621
|
+
},
|
|
622
|
+
default: '',
|
|
623
|
+
placeholder: '123123123',
|
|
624
|
+
description: 'The LinkedIn ID of the lead the conversation was with',
|
|
625
|
+
required: true,
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
displayName: 'Conversation Message',
|
|
629
|
+
name: 'conversationMessage',
|
|
630
|
+
type: 'string',
|
|
631
|
+
displayOptions: {
|
|
632
|
+
show: {
|
|
633
|
+
resource: ['conversation'],
|
|
634
|
+
operation: ['startConversation', 'sendMessageToConversation'],
|
|
635
|
+
},
|
|
636
|
+
},
|
|
637
|
+
default: '',
|
|
638
|
+
placeholder: 'Hello! How are you?',
|
|
639
|
+
description: 'The message to send in the conversation',
|
|
640
|
+
required: true,
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
displayName: 'Campaign ID',
|
|
644
|
+
name: 'campaignId',
|
|
645
|
+
type: 'options',
|
|
646
|
+
required: true,
|
|
647
|
+
displayOptions: {
|
|
648
|
+
show: {
|
|
649
|
+
resource: ['campaign'],
|
|
650
|
+
operation: ['resumeCampaign', 'pauseCampaign', 'addProfileToCampaign', 'getCampaign'],
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
typeOptions: {
|
|
654
|
+
loadOptions: {
|
|
655
|
+
routing: {
|
|
656
|
+
request: {
|
|
657
|
+
method: 'GET',
|
|
658
|
+
url: '=/workspaces/{{$parameter["workspaceId"]}}/campaigns',
|
|
659
|
+
},
|
|
660
|
+
output: {
|
|
661
|
+
postReceive: [
|
|
662
|
+
{
|
|
663
|
+
type: 'rootProperty',
|
|
664
|
+
properties: {
|
|
665
|
+
property: 'campaigns',
|
|
666
|
+
},
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
type: 'setKeyValue',
|
|
670
|
+
properties: {
|
|
671
|
+
name: '={{$responseItem.name}}',
|
|
672
|
+
value: '={{$responseItem.id}}',
|
|
673
|
+
},
|
|
674
|
+
},
|
|
675
|
+
],
|
|
676
|
+
},
|
|
677
|
+
},
|
|
678
|
+
},
|
|
679
|
+
},
|
|
680
|
+
default: '',
|
|
681
|
+
description: 'Select the Aimfox campaign to resume. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
displayName: 'Profile URL',
|
|
685
|
+
name: 'profileUrl',
|
|
686
|
+
type: 'string',
|
|
687
|
+
displayOptions: {
|
|
688
|
+
show: {
|
|
689
|
+
resource: ['campaign'],
|
|
690
|
+
operation: ['addProfileToCampaign', 'addProfileToCampaignWithCustomVariables'],
|
|
691
|
+
},
|
|
692
|
+
},
|
|
693
|
+
default: '',
|
|
694
|
+
placeholder: 'https://www.linkedin.com/in/john-doe-bb1869208/',
|
|
695
|
+
description: 'The LinkedIn URL of the profile to add to the campaign',
|
|
696
|
+
required: true,
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
displayName: 'Custom Variables (JSON)',
|
|
700
|
+
name: 'customVariables',
|
|
701
|
+
type: 'json',
|
|
702
|
+
required: true,
|
|
703
|
+
default: '',
|
|
704
|
+
description: 'Custom variables to send with the profile, in JSON format',
|
|
705
|
+
displayOptions: {
|
|
706
|
+
show: {
|
|
707
|
+
resource: ['campaign'],
|
|
708
|
+
operation: ['addProfileToCampaignWithCustomVariables'],
|
|
709
|
+
},
|
|
710
|
+
},
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
displayName: 'Label ID',
|
|
714
|
+
name: 'labelId',
|
|
715
|
+
type: 'string',
|
|
716
|
+
displayOptions: {
|
|
717
|
+
show: {
|
|
718
|
+
resource: ['lead'],
|
|
719
|
+
operation: ['addLabelToLead', 'removeLabelFromLead'],
|
|
720
|
+
},
|
|
721
|
+
},
|
|
722
|
+
default: '',
|
|
723
|
+
placeholder: '83b3aa1d-cda0-42b3-845c-afccf1192dc5',
|
|
724
|
+
description: 'The ID of the label',
|
|
725
|
+
required: true,
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
displayName: 'Label Name',
|
|
729
|
+
name: 'labelName',
|
|
730
|
+
type: 'string',
|
|
731
|
+
displayOptions: {
|
|
732
|
+
show: {
|
|
733
|
+
resource: ['label'],
|
|
734
|
+
operation: ['addLabel'],
|
|
735
|
+
},
|
|
736
|
+
},
|
|
737
|
+
default: '',
|
|
738
|
+
placeholder: 'Label Name',
|
|
739
|
+
description: 'The name of the label to add',
|
|
740
|
+
required: true,
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
displayName: 'Label Color',
|
|
744
|
+
name: 'labelColor',
|
|
745
|
+
type: 'options',
|
|
746
|
+
displayOptions: {
|
|
747
|
+
show: {
|
|
748
|
+
resource: ['label'],
|
|
749
|
+
operation: ['addLabel'],
|
|
750
|
+
},
|
|
751
|
+
},
|
|
752
|
+
options: [
|
|
753
|
+
{ name: 'Blue', value: 'info' },
|
|
754
|
+
{ name: 'Gray', value: 'quaternary' },
|
|
755
|
+
{ name: 'Green', value: 'success' },
|
|
756
|
+
{ name: 'Purple', value: 'secondary' },
|
|
757
|
+
{ name: 'Red', value: 'danger' },
|
|
758
|
+
{ name: 'Yellow', value: 'yellow' },
|
|
759
|
+
],
|
|
760
|
+
default: 'info',
|
|
761
|
+
description: 'The color of the label to add',
|
|
762
|
+
required: true,
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
displayName: 'Lead ID',
|
|
766
|
+
name: 'leadId',
|
|
767
|
+
type: 'string',
|
|
768
|
+
displayOptions: {
|
|
769
|
+
show: {
|
|
770
|
+
resource: ['lead'],
|
|
771
|
+
operation: ['getLead', 'addLabelToLead', 'removeLabelFromLead', 'addNoteToLead'],
|
|
772
|
+
},
|
|
773
|
+
},
|
|
774
|
+
default: '',
|
|
775
|
+
placeholder: '1113575872',
|
|
776
|
+
description: 'The LinkedIn ID of the lead to retrieve',
|
|
777
|
+
required: true,
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
displayName: 'Note Text',
|
|
781
|
+
name: 'noteText',
|
|
782
|
+
type: 'string',
|
|
783
|
+
displayOptions: {
|
|
784
|
+
show: {
|
|
785
|
+
resource: ['lead'],
|
|
786
|
+
operation: ['addNoteToLead'],
|
|
787
|
+
},
|
|
788
|
+
},
|
|
789
|
+
default: '',
|
|
790
|
+
placeholder: 'Note text',
|
|
791
|
+
description: 'The text of the note to add to the lead',
|
|
792
|
+
required: true,
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
displayName: 'Template ID',
|
|
796
|
+
name: 'templateId',
|
|
797
|
+
type: 'string',
|
|
798
|
+
displayOptions: {
|
|
799
|
+
show: {
|
|
800
|
+
resource: ['template'],
|
|
801
|
+
operation: ['getTemplate', 'removeTemplate'],
|
|
802
|
+
},
|
|
803
|
+
},
|
|
804
|
+
default: '',
|
|
805
|
+
placeholder: '6b36b919-79ab-4656-84ea-e23a9f840df9',
|
|
806
|
+
description: 'The ID of the template to retrieve',
|
|
807
|
+
required: true,
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
displayName: 'Template Name',
|
|
811
|
+
name: 'templateName',
|
|
812
|
+
type: 'string',
|
|
813
|
+
displayOptions: {
|
|
814
|
+
show: {
|
|
815
|
+
resource: ['template'],
|
|
816
|
+
operation: ['createTemplate'],
|
|
817
|
+
},
|
|
818
|
+
},
|
|
819
|
+
default: '',
|
|
820
|
+
placeholder: 'Template Name',
|
|
821
|
+
description: 'The name of the template to create',
|
|
822
|
+
required: true,
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
displayName: 'Template Subject',
|
|
826
|
+
name: 'templateSubject',
|
|
827
|
+
type: 'string',
|
|
828
|
+
displayOptions: {
|
|
829
|
+
show: {
|
|
830
|
+
resource: ['template'],
|
|
831
|
+
operation: ['createTemplate'],
|
|
832
|
+
},
|
|
833
|
+
},
|
|
834
|
+
default: '',
|
|
835
|
+
placeholder: 'Template Subject',
|
|
836
|
+
description: 'The subject of the template to create',
|
|
837
|
+
required: true,
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
displayName: 'Template Message',
|
|
841
|
+
name: 'templateMessage',
|
|
842
|
+
type: 'string',
|
|
843
|
+
displayOptions: {
|
|
844
|
+
show: {
|
|
845
|
+
resource: ['template'],
|
|
846
|
+
operation: ['createTemplate'],
|
|
847
|
+
},
|
|
848
|
+
},
|
|
849
|
+
default: '',
|
|
850
|
+
placeholder: 'Template Message',
|
|
851
|
+
description: 'The message of the template to create',
|
|
852
|
+
required: true,
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
displayName: 'Template Type',
|
|
856
|
+
name: 'templateType',
|
|
857
|
+
type: 'options',
|
|
858
|
+
displayOptions: {
|
|
859
|
+
show: {
|
|
860
|
+
resource: ['template'],
|
|
861
|
+
operation: ['createTemplate'],
|
|
862
|
+
},
|
|
863
|
+
},
|
|
864
|
+
options: [
|
|
865
|
+
{ name: 'Note', value: 'NOTE_TEMPLATE' },
|
|
866
|
+
{ name: 'Inmail', value: 'INMAIL_TEMPLATE' },
|
|
867
|
+
{ name: 'Message', value: 'MESSAGE_TEMPLATE' },
|
|
868
|
+
],
|
|
869
|
+
default: 'NOTE_TEMPLATE',
|
|
870
|
+
description: 'The type of the template to create',
|
|
871
|
+
required: true,
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
displayName: 'Template AI',
|
|
875
|
+
name: 'templateAi',
|
|
876
|
+
type: 'boolean',
|
|
877
|
+
displayOptions: {
|
|
878
|
+
show: {
|
|
879
|
+
resource: ['template'],
|
|
880
|
+
operation: ['createTemplate'],
|
|
881
|
+
},
|
|
882
|
+
},
|
|
883
|
+
default: false,
|
|
884
|
+
description: 'Whether to use AI for the template or not',
|
|
885
|
+
required: true,
|
|
886
|
+
},
|
|
887
|
+
],
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
exports.CityWeather = CityWeather;
|
|
892
|
+
//# sourceMappingURL=CityWeather.node.js.map
|