n8n-nodes-kapacity 0.1.2 → 0.1.4
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 +10 -1
- package/dist/nodes/Kapacity/Kapacity.node.js +3 -2
- package/dist/nodes/Kapacity/actions.js +6 -0
- package/dist/nodes/Kapacity/resources/contact.js +22 -2
- package/dist/nodes/Kapacity/shared/connection.d.ts +2 -0
- package/dist/nodes/Kapacity/shared/connection.js +7 -0
- package/dist/nodes/KapacityTrigger/KapacityTrigger.node.js +2 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ The package contains two nodes.
|
|
|
28
28
|
|
|
29
29
|
| Resource | Operations |
|
|
30
30
|
| --- | --- |
|
|
31
|
-
| Contact | Create, Create or Update (by e-mail), Delete, Get, Get Many, Update |
|
|
31
|
+
| Contact | Create, Create or Update (by e-mail), Delete, Get, Get Many, Move, Update |
|
|
32
32
|
| Row (your own CRM tables) | Create, Delete, Get, Get Many, Update |
|
|
33
33
|
| Table | Get Columns, Get Many |
|
|
34
34
|
| Contract | Send (from a template, for e-signature), Get (with its audit trail), Get Many |
|
|
@@ -49,6 +49,7 @@ What the node does for you, so you never write a request body:
|
|
|
49
49
|
- **Readable output.** By default a contact or a row comes out with column names, option labels and member names instead of IDs. Choose **Output Format: Raw** to get the API response as is.
|
|
50
50
|
- **Pagination.** **Return All** reads every page for you.
|
|
51
51
|
- **Contacts found by e-mail.** **Create or Update** updates the contact that has this e-mail, or creates it.
|
|
52
|
+
- **Setting to Mon Pipe.** **Move** hands a contact over from Setting to Mon Pipe (or back), as the Base menu of its record does: same contact, default status of the new base, automations of the new base.
|
|
52
53
|
|
|
53
54
|
### Kapacity Trigger
|
|
54
55
|
|
|
@@ -101,6 +102,14 @@ The API has a monthly quota per workspace. Each call counts, so prefer the trigg
|
|
|
101
102
|
|
|
102
103
|
## Version history
|
|
103
104
|
|
|
105
|
+
### 0.1.4
|
|
106
|
+
|
|
107
|
+
Contact, Move: hands a contact over from Setting to Mon Pipe, or back. A contact can be created with only an e-mail or only a phone.
|
|
108
|
+
|
|
109
|
+
### 0.1.3
|
|
110
|
+
|
|
111
|
+
Installs on n8n instances upgraded from 1.x that still keep an old n8n-workflow in ~/.n8n/nodes (the install used to fail with "Class could not be found").
|
|
112
|
+
|
|
104
113
|
### 0.1.2
|
|
105
114
|
|
|
106
115
|
Kapacity Trigger: replacing an outdated webhook no longer hides a failed deletion. Only a 404 is ignored, so an event can never fire the workflow twice.
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Kapacity = void 0;
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
5
|
const actions_1 = require("./actions");
|
|
6
|
+
const connection_1 = require("./shared/connection");
|
|
6
7
|
const methods_1 = require("./methods");
|
|
7
8
|
const contact_1 = require("./resources/contact");
|
|
8
9
|
const contract_1 = require("./resources/contract");
|
|
@@ -20,8 +21,8 @@ class Kapacity {
|
|
|
20
21
|
description: 'Work with the contacts, tables, contracts, appointments and payments of Kapacity',
|
|
21
22
|
defaults: { name: 'Kapacity' },
|
|
22
23
|
usableAsTool: true,
|
|
23
|
-
inputs: [
|
|
24
|
-
outputs: [
|
|
24
|
+
inputs: [connection_1.MAIN_CONNECTION],
|
|
25
|
+
outputs: [connection_1.MAIN_CONNECTION],
|
|
25
26
|
credentials: [{ name: 'kapacityApi', required: true }],
|
|
26
27
|
properties: [
|
|
27
28
|
{
|
|
@@ -101,6 +101,12 @@ async function contact(ctx, cache, operation, i) {
|
|
|
101
101
|
return updateRecord(ctx, cache, base, locator(ctx, 'contactId', i), i);
|
|
102
102
|
case 'delete':
|
|
103
103
|
return deleteRecord(ctx, locator(ctx, 'contactId', i));
|
|
104
|
+
case 'move': {
|
|
105
|
+
const destination = param(ctx, 'destination', i, 'leads');
|
|
106
|
+
const options = param(ctx, 'options', i, {});
|
|
107
|
+
const response = await transport_1.kapacityApiRequest.call(ctx, 'PATCH', `/records/${locator(ctx, 'contactToMove', i)}`, automationsQs(options), { base: destination });
|
|
108
|
+
return present(ctx, cache, destination, response.ligne, options);
|
|
109
|
+
}
|
|
104
110
|
case 'getAll': {
|
|
105
111
|
const filters = param(ctx, 'filters', i, {});
|
|
106
112
|
const conditions = [];
|
|
@@ -22,12 +22,32 @@ exports.contactDescription = [
|
|
|
22
22
|
{ name: 'Delete', value: 'delete', action: 'Delete contact', description: 'Delete a contact permanently' },
|
|
23
23
|
{ name: 'Get', value: 'get', action: 'Get contact', description: 'Retrieve a contact' },
|
|
24
24
|
{ name: 'Get Many', value: 'getAll', action: 'Get many contacts', description: 'Retrieve a list of contacts' },
|
|
25
|
+
{
|
|
26
|
+
name: 'Move',
|
|
27
|
+
value: 'move',
|
|
28
|
+
action: 'Move contact',
|
|
29
|
+
description: 'Move a contact from Setting to Mon Pipe, or back, as the Base menu of its record does',
|
|
30
|
+
},
|
|
25
31
|
{ name: 'Update', value: 'update', action: 'Update contact', description: 'Update the fields of a contact' },
|
|
26
32
|
],
|
|
27
33
|
default: 'create',
|
|
28
34
|
},
|
|
29
|
-
(0, descriptions_1.contactBaseSelect)(
|
|
35
|
+
(0, descriptions_1.contactBaseSelect)(on('create', 'upsert', 'get', 'update', 'delete', 'getAll')),
|
|
30
36
|
(0, descriptions_1.contactLocator)(on('get', 'update', 'delete')),
|
|
37
|
+
(0, descriptions_1.contactLocator)(on('move'), 'contactToMove'),
|
|
38
|
+
{
|
|
39
|
+
displayName: 'Move To',
|
|
40
|
+
name: 'destination',
|
|
41
|
+
type: 'options',
|
|
42
|
+
noDataExpression: true,
|
|
43
|
+
options: [
|
|
44
|
+
{ name: 'Mon Pipe', value: 'leads', description: 'The closing pipeline' },
|
|
45
|
+
{ name: 'Setting', value: 'leads_setting', description: 'The setting pipeline' },
|
|
46
|
+
],
|
|
47
|
+
default: 'leads',
|
|
48
|
+
description: 'The base the contact goes to. It stays the same contact, with its appointments, answers and contracts. Its status becomes the default status of that base. A contact moved to Mon Pipe stays visible in Setting, marked as handed over to the closer.',
|
|
49
|
+
displayOptions: { show: on('move') },
|
|
50
|
+
},
|
|
31
51
|
{
|
|
32
52
|
displayName: 'E-Mail',
|
|
33
53
|
name: 'email',
|
|
@@ -45,7 +65,7 @@ exports.contactDescription = [
|
|
|
45
65
|
noDataExpression: true,
|
|
46
66
|
default: { mappingMode: 'defineBelow', value: null },
|
|
47
67
|
required: true,
|
|
48
|
-
description: 'A new contact needs at least a first name
|
|
68
|
+
description: 'A new contact needs at least a first name, a last name, an email or a phone. Fields left empty are not changed.',
|
|
49
69
|
typeOptions: {
|
|
50
70
|
loadOptionsDependsOn: ['base'],
|
|
51
71
|
resourceMapper: {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.MAIN_CONNECTION = void 0;
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
exports.MAIN_CONNECTION = (_a = n8n_workflow_1.NodeConnectionTypes === null || n8n_workflow_1.NodeConnectionTypes === void 0 ? void 0 : n8n_workflow_1.NodeConnectionTypes.Main) !== null && _a !== void 0 ? _a : 'main';
|
|
7
|
+
//# sourceMappingURL=connection.js.map
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.KapacityTrigger = void 0;
|
|
4
4
|
const crypto_1 = require("crypto");
|
|
5
5
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
const connection_1 = require("../Kapacity/shared/connection");
|
|
6
7
|
const transport_1 = require("../Kapacity/shared/transport");
|
|
7
8
|
const EVENTS = [
|
|
8
9
|
{ name: 'Contact Created', value: 'contact.cree', description: 'A contact is added to Mon Pipe or Setting' },
|
|
@@ -39,7 +40,7 @@ class KapacityTrigger {
|
|
|
39
40
|
description: 'Starts the workflow when something happens in Kapacity',
|
|
40
41
|
defaults: { name: 'Kapacity Trigger' },
|
|
41
42
|
inputs: [],
|
|
42
|
-
outputs: [
|
|
43
|
+
outputs: [connection_1.MAIN_CONNECTION],
|
|
43
44
|
credentials: [{ name: 'kapacityApi', required: true }],
|
|
44
45
|
webhooks: [{ name: 'default', httpMethod: 'POST', responseMode: 'onReceived', path: 'webhook' }],
|
|
45
46
|
properties: [
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-kapacity",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "n8n nodes for Kapacity, the all-in-one sales CRM: contacts, CRM tables, contracts with e-signature, appointments, forms, payments and real-time webhooks.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/kapacity-saas/n8n-nodes-kapacity#readme",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-kapacity",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "n8n nodes for Kapacity, the all-in-one sales CRM: contacts, CRM tables, contracts with e-signature, appointments, forms, payments and real-time webhooks.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/kapacity-saas/n8n-nodes-kapacity#readme",
|