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,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.leadOperations = void 0;
|
|
4
|
+
exports.leadOperations = {
|
|
5
|
+
displayName: 'Operation',
|
|
6
|
+
name: 'operation',
|
|
7
|
+
type: 'options',
|
|
8
|
+
noDataExpression: true,
|
|
9
|
+
displayOptions: {
|
|
10
|
+
show: {
|
|
11
|
+
resource: ['lead'],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
options: [
|
|
15
|
+
{
|
|
16
|
+
name: 'Add Label To Lead',
|
|
17
|
+
value: 'addLabelToLead',
|
|
18
|
+
action: 'Add label to lead',
|
|
19
|
+
description: 'Add a new label to the selected lead',
|
|
20
|
+
routing: {
|
|
21
|
+
request: {
|
|
22
|
+
method: 'POST',
|
|
23
|
+
url: '=/leads/{{$parameter["leadId"]}}/labels/{{$parameter["labelId"]}}',
|
|
24
|
+
headers: {
|
|
25
|
+
Authorization: '={{"Bearer " + $credentials.aimfoxApi.apiKey}}',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'Add Note To Lead',
|
|
32
|
+
value: 'addNoteToLead',
|
|
33
|
+
action: 'Add note to lead',
|
|
34
|
+
description: 'Add a new note to the selected lead',
|
|
35
|
+
routing: {
|
|
36
|
+
request: {
|
|
37
|
+
method: 'POST',
|
|
38
|
+
url: '=/leads/{{$parameter["leadId"]}}/notes',
|
|
39
|
+
headers: {
|
|
40
|
+
Authorization: '={{"Bearer " + $credentials.aimfoxApi.apiKey}}',
|
|
41
|
+
},
|
|
42
|
+
body: {
|
|
43
|
+
text: '={{$parameter["noteText"]}}',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'Get Lead',
|
|
50
|
+
value: 'getLead',
|
|
51
|
+
action: 'Get lead',
|
|
52
|
+
description: 'Get a specific lead by ID',
|
|
53
|
+
routing: {
|
|
54
|
+
request: {
|
|
55
|
+
method: 'GET',
|
|
56
|
+
url: '=/leads/{{$parameter["leadId"]}}',
|
|
57
|
+
headers: {
|
|
58
|
+
Authorization: '={{"Bearer " + $credentials.aimfoxApi.apiKey}}',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'List Recent Leads',
|
|
65
|
+
value: 'listRecentLeads',
|
|
66
|
+
action: 'List recent leads',
|
|
67
|
+
description: 'List recent leads for the selected workspace',
|
|
68
|
+
routing: {
|
|
69
|
+
request: {
|
|
70
|
+
method: 'GET',
|
|
71
|
+
url: '/analytics/recent-leads',
|
|
72
|
+
headers: {
|
|
73
|
+
Authorization: '={{"Bearer " + $credentials.aimfoxApi.apiKey}}',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'Remove Label From Lead',
|
|
80
|
+
value: 'removeLabelFromLead',
|
|
81
|
+
action: 'Remove label from lead',
|
|
82
|
+
description: 'Remove a label from the selected lead',
|
|
83
|
+
routing: {
|
|
84
|
+
request: {
|
|
85
|
+
method: 'DELETE',
|
|
86
|
+
url: '=/leads/{{$parameter["leadId"]}}/labels/{{$parameter["labelId"]}}',
|
|
87
|
+
headers: {
|
|
88
|
+
Authorization: '={{"Bearer " + $credentials.aimfoxApi.apiKey}}',
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
default: 'listRecentLeads',
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../../nodes/Aimfox/properties/lead/operations.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAoB;IAC9C,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE;QACf,IAAI,EAAE;YACL,QAAQ,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AM,EAAE,wBAAwB;YAChC,WAAW,EAAE,uCAAuC;YACpD,OAAO,EAAE;gBACR,OAAO,EAAE;oBACR,MAAM,EAAE,QAAQ;oBAChB,GAAG,EAAE,mEAAmE;oBACxE,OAAO,EAAE;wBACR,aAAa,EAAE,gDAAgD;qBAC/D;iBACD;aACD;SACD;KACD;IACD,OAAO,EAAE,iBAAiB;CAC1B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.noteFields = void 0;
|
|
4
|
+
exports.noteFields = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Note Text',
|
|
7
|
+
name: 'noteText',
|
|
8
|
+
type: 'string',
|
|
9
|
+
displayOptions: {
|
|
10
|
+
show: {
|
|
11
|
+
resource: ['lead'],
|
|
12
|
+
operation: ['addNoteToLead'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
default: '',
|
|
16
|
+
placeholder: 'Note text',
|
|
17
|
+
description: 'The text of the note to add to the lead',
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../nodes/Aimfox/properties/note/fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,eAAe,CAAC;aAC5B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,WAAW;QACxB,WAAW,EAAE,yCAAyC;QACtD,QAAQ,EAAE,IAAI;KACd;CACD,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.templateFields = void 0;
|
|
4
|
+
exports.templateFields = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Template ID',
|
|
7
|
+
name: 'templateId',
|
|
8
|
+
type: 'string',
|
|
9
|
+
displayOptions: {
|
|
10
|
+
show: {
|
|
11
|
+
resource: ['template'],
|
|
12
|
+
operation: ['getTemplate', 'removeTemplate'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
default: '',
|
|
16
|
+
placeholder: '6b36b919-79ab-4656-84ea-e23a9f840df9',
|
|
17
|
+
description: 'The ID of the template to retrieve',
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Template Name',
|
|
22
|
+
name: 'templateName',
|
|
23
|
+
type: 'string',
|
|
24
|
+
displayOptions: {
|
|
25
|
+
show: {
|
|
26
|
+
resource: ['template'],
|
|
27
|
+
operation: ['createTemplate'],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
default: '',
|
|
31
|
+
placeholder: 'Template Name',
|
|
32
|
+
description: 'The name of the template to create',
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Template Subject',
|
|
37
|
+
name: 'templateSubject',
|
|
38
|
+
type: 'string',
|
|
39
|
+
displayOptions: {
|
|
40
|
+
show: {
|
|
41
|
+
resource: ['template'],
|
|
42
|
+
operation: ['createTemplate'],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
default: '',
|
|
46
|
+
placeholder: 'Template Subject',
|
|
47
|
+
description: 'The subject of the template to create',
|
|
48
|
+
required: true,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
displayName: 'Template Message',
|
|
52
|
+
name: 'templateMessage',
|
|
53
|
+
type: 'string',
|
|
54
|
+
displayOptions: {
|
|
55
|
+
show: {
|
|
56
|
+
resource: ['template'],
|
|
57
|
+
operation: ['createTemplate'],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
default: '',
|
|
61
|
+
placeholder: 'Template Message',
|
|
62
|
+
description: 'The message of the template to create',
|
|
63
|
+
required: true,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Template Type',
|
|
67
|
+
name: 'templateType',
|
|
68
|
+
type: 'options',
|
|
69
|
+
displayOptions: {
|
|
70
|
+
show: {
|
|
71
|
+
resource: ['template'],
|
|
72
|
+
operation: ['createTemplate'],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
options: [
|
|
76
|
+
{ name: 'Note', value: 'NOTE_TEMPLATE' },
|
|
77
|
+
{ name: 'Inmail', value: 'INMAIL_TEMPLATE' },
|
|
78
|
+
{ name: 'Message', value: 'MESSAGE_TEMPLATE' },
|
|
79
|
+
],
|
|
80
|
+
default: 'NOTE_TEMPLATE',
|
|
81
|
+
description: 'The type of the template to create',
|
|
82
|
+
required: true,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
displayName: 'Template AI',
|
|
86
|
+
name: 'templateAi',
|
|
87
|
+
type: 'boolean',
|
|
88
|
+
displayOptions: {
|
|
89
|
+
show: {
|
|
90
|
+
resource: ['template'],
|
|
91
|
+
operation: ['createTemplate'],
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
default: false,
|
|
95
|
+
description: 'Whether to use AI for the template or not',
|
|
96
|
+
required: true,
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../nodes/Aimfox/properties/template/fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAsB;IAChD;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBAC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I,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,gBAAgB,CAAC;aAC7B;SACD;QACD,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE;YACxC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,iBAAiB,EAAE;YAC5C,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,kBAAkB,EAAE;SAC9C;QACD,OAAO,EAAE,eAAe;QACxB,WAAW,EAAE,oCAAoC;QACjD,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,gBAAgB,CAAC;aAC7B;SACD;QACD,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,2CAA2C;QACxD,QAAQ,EAAE,IAAI;KACd;CACD,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.templateOperations = void 0;
|
|
4
|
+
exports.templateOperations = {
|
|
5
|
+
displayName: 'Operation',
|
|
6
|
+
name: 'operation',
|
|
7
|
+
type: 'options',
|
|
8
|
+
noDataExpression: true,
|
|
9
|
+
displayOptions: {
|
|
10
|
+
show: {
|
|
11
|
+
resource: ['template'],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
options: [
|
|
15
|
+
{
|
|
16
|
+
name: 'List Templates',
|
|
17
|
+
value: 'listTemplates',
|
|
18
|
+
action: 'List templates',
|
|
19
|
+
description: 'List all templates in the selected workspace',
|
|
20
|
+
routing: {
|
|
21
|
+
request: {
|
|
22
|
+
method: 'GET',
|
|
23
|
+
url: '/templates',
|
|
24
|
+
headers: {
|
|
25
|
+
Authorization: '={{"Bearer " + $credentials.aimfoxApi.apiKey}}',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'Get Template',
|
|
32
|
+
value: 'getTemplate',
|
|
33
|
+
action: 'Get template',
|
|
34
|
+
description: 'Get a specific template by ID',
|
|
35
|
+
routing: {
|
|
36
|
+
request: {
|
|
37
|
+
method: 'GET',
|
|
38
|
+
url: '=/templates/{{$parameter["templateId"]}}',
|
|
39
|
+
headers: {
|
|
40
|
+
Authorization: '={{"Bearer " + $credentials.aimfoxApi.apiKey}}',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'Create Template',
|
|
47
|
+
value: 'createTemplate',
|
|
48
|
+
action: 'Create template',
|
|
49
|
+
description: 'Create a new template in the selected workspace',
|
|
50
|
+
routing: {
|
|
51
|
+
request: {
|
|
52
|
+
method: 'POST',
|
|
53
|
+
url: '/templates',
|
|
54
|
+
headers: {
|
|
55
|
+
Authorization: '={{"Bearer " + $credentials.aimfoxApi.apiKey}}',
|
|
56
|
+
},
|
|
57
|
+
body: {
|
|
58
|
+
name: '={{$parameter["templateName"]}}',
|
|
59
|
+
type: '={{$parameter["templateType"]}}',
|
|
60
|
+
subject: '={{$parameter["templateSubject"]}}',
|
|
61
|
+
message: '={{$parameter["templateMessage"]}}',
|
|
62
|
+
ai: '={{$parameter["templateAi"]}}',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'Remove Template',
|
|
69
|
+
value: 'removeTemplate',
|
|
70
|
+
action: 'Remove template',
|
|
71
|
+
description: 'Remove a template from the workspace',
|
|
72
|
+
routing: {
|
|
73
|
+
request: {
|
|
74
|
+
method: 'DELETE',
|
|
75
|
+
url: '=/templates/{{$parameter["templateId"]}}',
|
|
76
|
+
headers: {
|
|
77
|
+
Authorization: '={{"Bearer " + $credentials.aimfoxApi.apiKey}}',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
default: 'listTemplates',
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../../nodes/Aimfox/properties/template/operations.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAoB;IAClD,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE;QACf,IAAI,EAAE;YACL,QAAQ,EAAE,CAAC,UAAU,CAAC;SACtB;KACD;IACD,OAAO,EAAE;QACR;YACC,IAAI,EAAE,gBAAgB;YACtB,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,gBAAgB;YACxB,WAAW,EAAE,8CAA8C;YAC3D,OAAO,EAAE;gBACR,OAAO,EAAE;oBACR,MAAM,EAAE,KAAK;oBACb,GAAG,EAAE,YAAY;oBACjB,OAAO,EAAE;wBACR,aAAa,EAAE,gDAAgD;qBAC/D;iBACD;aACD;SACD;QACD;YACC,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,aAAa;YACpB,MAAM,EAAE,cAAc;YACtB,WAAW,EAAE,+BAA+B;YAC5C,OAAO,EAAE;gBACR,OAAO,EAAE;oBACR,MAAM,EAAE,KAAK;oBACb,GAAG,EAAE,0CAA0C;oBAC/C,OAAO,EAAE;wBACR,aAAa,EAAE,gDAAgD;qBAC/D;iBACD;aACD;SACD;QACD;YACC,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,gBAAgB;YACvB,MAAM,EAAE,iBAAiB;YACzB,WAAW,EAAE,iDAAiD;YAC9D,OAAO,EAAE;gBACR,OAAO,EAAE;oBACR,MAAM,EAAE,MAAM;oBACd,GAAG,EAAE,YAAY;oBACjB,OAAO,EAAE;wBACR,aAAa,EAAE,gDAAgD;qBAC/D;oBACD,IAAI,EAAE;wBACL,IAAI,EAAE,iCAAiC;wBACvC,IAAI,EAAE,iCAAiC;wBACvC,OAAO,EAAE,oCAAoC;wBAC7C,OAAO,EAAE,oCAAoC;wBAC7C,EAAE,EAAE,+BAA+B;qBACnC;iBACD;aACD;SACD;QACD;YACC,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,gBAAgB;YACvB,MAAM,EAAE,iBAAiB;YACzB,WAAW,EAAE,sCAAsC;YACnD,OAAO,EAAE;gBACR,OAAO,EAAE;oBACR,MAAM,EAAE,QAAQ;oBAChB,GAAG,EAAE,0CAA0C;oBAC/C,OAAO,EAAE;wBACR,aAAa,EAAE,gDAAgD;qBAC/D;iBACD;aACD;SACD;KACD;IACD,OAAO,EAAE,eAAe;CACxB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workspaceFields = void 0;
|
|
4
|
+
exports.workspaceFields = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Workspace ID',
|
|
7
|
+
name: 'workspaceId',
|
|
8
|
+
type: 'options',
|
|
9
|
+
required: true,
|
|
10
|
+
typeOptions: {
|
|
11
|
+
loadOptions: {
|
|
12
|
+
routing: {
|
|
13
|
+
request: {
|
|
14
|
+
method: 'GET',
|
|
15
|
+
url: '/workspaces',
|
|
16
|
+
},
|
|
17
|
+
output: {
|
|
18
|
+
postReceive: [
|
|
19
|
+
{
|
|
20
|
+
type: 'rootProperty',
|
|
21
|
+
properties: {
|
|
22
|
+
property: 'workspaces',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
type: 'setKeyValue',
|
|
27
|
+
properties: {
|
|
28
|
+
name: '={{$responseItem.name}}',
|
|
29
|
+
value: '={{$responseItem.id}}',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
default: '',
|
|
38
|
+
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>.',
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../nodes/Aimfox/properties/workspace/fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE;YACZ,WAAW,EAAE;gBACZ,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,aAAa;qBAClB;oBACD,MAAM,EAAE;wBACP,WAAW,EAAE;4BACZ;gCACC,IAAI,EAAE,cAAc;gCACpB,UAAU,EAAE;oCACX,QAAQ,EAAE,YAAY;iCACtB;6BACD;4BACD;gCACC,IAAI,EAAE,aAAa;gCACnB,UAAU,EAAE;oCACX,IAAI,EAAE,yBAAyB;oCAC/B,KAAK,EAAE,uBAAuB;iCAC9B;6BACD;yBACD;qBACD;iBACD;aACD;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EACV,8IAA8I;KAC/I;CACD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type IHookFunctions, type IWebhookFunctions, type INodeType, type INodeTypeDescription, type IWebhookResponseData } from 'n8n-workflow';
|
|
2
|
+
export declare class AimfoxTrigger implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
webhookMethods: {
|
|
5
|
+
default: {
|
|
6
|
+
checkExists(this: IHookFunctions): Promise<boolean>;
|
|
7
|
+
create(this: IHookFunctions): Promise<boolean>;
|
|
8
|
+
delete(this: IHookFunctions): Promise<boolean>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AimfoxTrigger = void 0;
|
|
4
|
+
const properties_1 = require("./properties");
|
|
5
|
+
class AimfoxTrigger {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.description = {
|
|
8
|
+
displayName: 'Aimfox Trigger',
|
|
9
|
+
name: 'aimfoxTrigger',
|
|
10
|
+
icon: 'file:aimfox.svg',
|
|
11
|
+
group: ['trigger'],
|
|
12
|
+
version: 1,
|
|
13
|
+
description: 'Starts the workflow when Aimfox events occur',
|
|
14
|
+
defaults: {
|
|
15
|
+
name: 'Aimfox Trigger',
|
|
16
|
+
},
|
|
17
|
+
inputs: [],
|
|
18
|
+
outputs: ["main"],
|
|
19
|
+
credentials: [
|
|
20
|
+
{
|
|
21
|
+
name: 'aimfoxApi',
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
requestDefaults: {
|
|
26
|
+
baseURL: 'https://api.aimfox.com/api/v2',
|
|
27
|
+
headers: {
|
|
28
|
+
Accept: 'application/json',
|
|
29
|
+
'Content-Type': 'application/json',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
webhooks: [
|
|
33
|
+
{
|
|
34
|
+
name: 'default',
|
|
35
|
+
httpMethod: 'POST',
|
|
36
|
+
responseMode: 'onReceived',
|
|
37
|
+
path: 'webhook',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
properties: properties_1.aimfoxTriggerProperties,
|
|
41
|
+
};
|
|
42
|
+
this.webhookMethods = {
|
|
43
|
+
default: {
|
|
44
|
+
async checkExists() {
|
|
45
|
+
const webhookUrl = this.getNodeWebhookUrl('default');
|
|
46
|
+
const webhookData = this.getWorkflowStaticData('node');
|
|
47
|
+
const events = this.getNodeParameter('events');
|
|
48
|
+
const credentials = await this.getCredentials('aimfoxApi');
|
|
49
|
+
const options = {
|
|
50
|
+
headers: {
|
|
51
|
+
Authorization: `Bearer ${credentials.apiKey}`,
|
|
52
|
+
Accept: 'application/json',
|
|
53
|
+
'Content-Type': 'application/json',
|
|
54
|
+
},
|
|
55
|
+
method: 'GET',
|
|
56
|
+
uri: `https://api.aimfox.com/api/v2/webhooks`,
|
|
57
|
+
json: true,
|
|
58
|
+
};
|
|
59
|
+
const responseData = await this.helpers.request.call(this, options);
|
|
60
|
+
for (const webhook of responseData.webhooks) {
|
|
61
|
+
if (webhook.url === webhookUrl && webhook.events === events) {
|
|
62
|
+
webhookData.webhookId = webhook.id;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
},
|
|
68
|
+
async create() {
|
|
69
|
+
const webhookData = this.getWorkflowStaticData('node');
|
|
70
|
+
const webhookUrl = this.getNodeWebhookUrl('default');
|
|
71
|
+
const events = this.getNodeParameter('events');
|
|
72
|
+
const credentials = await this.getCredentials('aimfoxApi');
|
|
73
|
+
const options = {
|
|
74
|
+
headers: {
|
|
75
|
+
Authorization: `Bearer ${credentials.apiKey}`,
|
|
76
|
+
Accept: 'application/json',
|
|
77
|
+
'Content-Type': 'application/json',
|
|
78
|
+
},
|
|
79
|
+
method: 'POST',
|
|
80
|
+
uri: `https://api.aimfox.com/api/v2/webhooks`,
|
|
81
|
+
body: {
|
|
82
|
+
events: events,
|
|
83
|
+
url: webhookUrl,
|
|
84
|
+
name: 'n8n',
|
|
85
|
+
integration: true,
|
|
86
|
+
},
|
|
87
|
+
json: true,
|
|
88
|
+
};
|
|
89
|
+
const responseData = await this.helpers.request.call(this, options);
|
|
90
|
+
if (responseData.webhook.id === undefined) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
webhookData.webhookId = responseData.webhook.id;
|
|
94
|
+
return true;
|
|
95
|
+
},
|
|
96
|
+
async delete() {
|
|
97
|
+
const webhookData = this.getWorkflowStaticData('node');
|
|
98
|
+
if (webhookData.webhookId !== undefined) {
|
|
99
|
+
try {
|
|
100
|
+
const credentials = await this.getCredentials('aimfoxApi');
|
|
101
|
+
const options = {
|
|
102
|
+
headers: {
|
|
103
|
+
Authorization: `Bearer ${credentials.apiKey}`,
|
|
104
|
+
Accept: 'application/json',
|
|
105
|
+
'Content-Type': 'application/json',
|
|
106
|
+
},
|
|
107
|
+
method: 'DELETE',
|
|
108
|
+
uri: `https://api.aimfox.com/api/v2/webhooks/${webhookData.webhookId}`,
|
|
109
|
+
json: true,
|
|
110
|
+
};
|
|
111
|
+
await this.helpers.request.call(this, options);
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
delete webhookData.webhookId;
|
|
117
|
+
}
|
|
118
|
+
return true;
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
async webhook() {
|
|
124
|
+
const body = this.getBodyData();
|
|
125
|
+
return {
|
|
126
|
+
workflowData: [this.helpers.returnJsonArray(body)],
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
exports.AimfoxTrigger = AimfoxTrigger;
|
|
131
|
+
//# sourceMappingURL=AimfoxTrigger.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AimfoxTrigger.node.js","sourceRoot":"","sources":["../../../nodes/AimfoxTrigger/AimfoxTrigger.node.ts"],"names":[],"mappings":";;;AASA,6CAAuD;AAEvD,MAAa,aAAa;IAA1B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,iBAAiB;YACvB,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7
|
+
"Development": ["Webhook"]
|
|
8
|
+
},
|
|
9
|
+
"resources": {
|
|
10
|
+
"primaryDocumentation": [
|
|
11
|
+
{
|
|
12
|
+
"url": "https://docs.aimfox.com/webhooks"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { IDataObject, IExecuteFunctions, IHookFunctions, IHttpRequestMethods, ILoadOptionsFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function pushcutApiRequest(this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions, method: IHttpRequestMethods, path: string, body?: any, qs?: IDataObject, uri?: string, option?: {}): Promise<any>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pushcutApiRequest = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
async function pushcutApiRequest(method, path, body = {}, qs = {}, uri, option = {}) {
|
|
6
|
+
const credentials = await this.getCredentials('aimfoxApi');
|
|
7
|
+
const options = {
|
|
8
|
+
headers: {
|
|
9
|
+
'API-Key': credentials.apiKey,
|
|
10
|
+
},
|
|
11
|
+
method,
|
|
12
|
+
body,
|
|
13
|
+
qs,
|
|
14
|
+
uri: 'https://673b415297f2.ngrok-free.app/api/v1',
|
|
15
|
+
json: true,
|
|
16
|
+
};
|
|
17
|
+
try {
|
|
18
|
+
if (Object.keys(body).length === 0) {
|
|
19
|
+
delete options.body;
|
|
20
|
+
}
|
|
21
|
+
if (Object.keys(option).length !== 0) {
|
|
22
|
+
Object.assign(options, option);
|
|
23
|
+
}
|
|
24
|
+
return await this.helpers.request.call(this, options);
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.pushcutApiRequest = pushcutApiRequest;
|
|
31
|
+
//# sourceMappingURL=GenericFunctions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../nodes/AimfoxTrigger/GenericFunctions.ts"],"names":[],"mappings":";;;AASA,+CAA4C;AAErC,KAAK,UAAU,iBAAiB,CAEtC,MAA2B,EAC3B,IAAY,EAEZ,OAAY,EAAE,EACd,KAAkB,EAAE,EACpB,GAAY,EACZ,MAAM,GAAG,EAAE;IAEX,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAE3D,MAAM,OAAO,GAAoB;QAChC,OAAO,EAAE;YACR,SAAS,EAAE,WAAW,CAAC,MAAM;SAC7B;QACD,MAAM;QACN,IAAI;QACJ,EAAE;QACF,GAAG,EAAE,4CAA4C;QACjD,IAAI,EAAE,IAAI;KACV,CAAC;IACF,IAAI;QACH,IAAI,MAAM,CAAC,IAAI,CAAC,IAAmB,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;YAClD,OAAO,OAAO,CAAC,IAAI,CAAC;SACpB;QACD,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;YACrC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;SAC/B;QACD,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACtD;IAAC,OAAO,KAAK,EAAE;QACf,MAAM,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAmB,CAAC,CAAC;KAC5D;AACF,CAAC;AAjCD,8CAiCC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M326.279 335.762L377.997 431.82C379.242 434.111 377.565 436.926 374.932 436.926H153.503C150.869 436.926 149.194 434.111 150.439 431.82L200.336 339.198C201.581 336.907 199.905 334.092 197.271 334.092H52.9886C49.7801 334.092 48.2957 330.131 50.6901 328.032L334.467 75.9809C337.389 73.4041 341.698 76.7921 339.83 80.2279L246.26 253.924C244.441 257.36 248.75 260.748 251.623 258.171L456.675 76.0286C459.596 73.4518 463.905 76.8398 462.037 80.2756L326.183 332.517C325.608 333.519 325.608 334.76 326.183 335.81L326.279 335.762Z" fill="#FF4D00"/>
|
|
3
|
+
</svg>
|