n8n-nodes-imobzi 0.1.1 → 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 +75 -88
- package/dist/credentials/ExampleCredentialsApi.credentials.d.ts +9 -0
- package/dist/credentials/ExampleCredentialsApi.credentials.js +47 -0
- package/dist/credentials/ExampleCredentialsApi.credentials.js.map +1 -0
- package/dist/nodes/Imobzi/imobzi.svg +33 -1
- package/dist/nodes/ImobziAgenda/ImobziAgenda.node.d.ts +5 -0
- package/dist/nodes/ImobziAgenda/ImobziAgenda.node.js +117 -0
- package/dist/nodes/ImobziAgenda/ImobziAgenda.node.js.map +1 -0
- package/dist/nodes/ImobziAgenda/imobzi.svg +33 -0
- package/dist/nodes/ImobziCamposPersonalizados/ImobziCamposPersonalizados.node.d.ts +5 -0
- package/dist/nodes/ImobziCamposPersonalizados/ImobziCamposPersonalizados.node.js +109 -0
- package/dist/nodes/ImobziCamposPersonalizados/ImobziCamposPersonalizados.node.js.map +1 -0
- package/dist/nodes/ImobziCamposPersonalizados/imobzi.svg +33 -0
- package/dist/nodes/ImobziContratos/ImobziContratos.node.d.ts +5 -0
- package/dist/nodes/ImobziContratos/ImobziContratos.node.js +117 -0
- package/dist/nodes/ImobziContratos/ImobziContratos.node.js.map +1 -0
- package/dist/nodes/ImobziContratos/imobzi.svg +33 -0
- package/dist/nodes/ImobziDocumentos/ImobziDocumentos.node.d.ts +5 -0
- package/dist/nodes/ImobziDocumentos/ImobziDocumentos.node.js +108 -0
- package/dist/nodes/ImobziDocumentos/ImobziDocumentos.node.js.map +1 -0
- package/dist/nodes/ImobziDocumentos/imobzi.svg +33 -0
- package/dist/nodes/ImobziFinanceiro/ImobziFinanceiro.node.d.ts +5 -0
- package/dist/nodes/ImobziFinanceiro/ImobziFinanceiro.node.js +118 -0
- package/dist/nodes/ImobziFinanceiro/ImobziFinanceiro.node.js.map +1 -0
- package/dist/nodes/ImobziFinanceiro/imobzi.svg +33 -0
- package/dist/nodes/ImobziIntegracoes/ImobziIntegracoes.node.d.ts +5 -0
- package/dist/nodes/ImobziIntegracoes/ImobziIntegracoes.node.js +107 -0
- package/dist/nodes/ImobziIntegracoes/ImobziIntegracoes.node.js.map +1 -0
- package/dist/nodes/ImobziIntegracoes/imobzi.svg +33 -0
- package/dist/nodes/ImobziLocacoes/ImobziLocacoes.node.d.ts +5 -0
- package/dist/nodes/ImobziLocacoes/ImobziLocacoes.node.js +116 -0
- package/dist/nodes/ImobziLocacoes/ImobziLocacoes.node.js.map +1 -0
- package/dist/nodes/ImobziLocacoes/imobzi.svg +33 -0
- package/dist/nodes/ImobziTarefas/ImobziTarefas.node.d.ts +5 -0
- package/dist/nodes/ImobziTarefas/ImobziTarefas.node.js +117 -0
- package/dist/nodes/ImobziTarefas/ImobziTarefas.node.js.map +1 -0
- package/dist/nodes/ImobziTarefas/imobzi.svg +33 -0
- package/dist/nodes/ImobziUsuarios/ImobziUsuarios.node.d.ts +5 -0
- package/dist/nodes/ImobziUsuarios/ImobziUsuarios.node.js +109 -0
- package/dist/nodes/ImobziUsuarios/ImobziUsuarios.node.js.map +1 -0
- package/dist/nodes/ImobziUsuarios/imobzi.svg +33 -0
- package/dist/nodes/ImobziWebhook/ImobziWebhook.node.d.ts +9 -2
- package/dist/nodes/ImobziWebhook/ImobziWebhook.node.js +35 -52
- package/dist/nodes/ImobziWebhook/ImobziWebhook.node.js.map +1 -1
- package/dist/nodes/ImobziWebhook/ImobziWebhook.node.json +1 -0
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -0,0 +1,33 @@
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
3
|
+
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
4
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
5
|
+
width="170.000000pt" height="161.000000pt" viewBox="0 0 170.000000 161.000000"
|
6
|
+
preserveAspectRatio="xMidYMid meet">
|
7
|
+
|
8
|
+
<g transform="translate(0.000000,161.000000) scale(0.100000,-0.100000)"
|
9
|
+
fill="#000000" stroke="none">
|
10
|
+
<path d="M574 1265 c-169 -41 -300 -195 -339 -399 -33 -174 -9 -398 58 -539
|
11
|
+
43 -88 135 -192 206 -230 140 -76 403 -74 509 4 46 34 92 116 92 164 0 111
|
12
|
+
-81 194 -191 195 -139 0 -207 -194 -89 -255 41 -21 71 -19 111 8 64 43 34 122
|
13
|
+
-32 85 -42 -24 -49 -23 -49 11 0 40 24 61 70 61 31 0 43 -6 65 -32 22 -26 26
|
14
|
+
-39 22 -70 -15 -112 -120 -146 -259 -86 -63 27 -131 102 -148 163 -26 93 3
|
15
|
+
205 67 255 37 29 48 25 61 -19 20 -65 47 -91 97 -91 46 0 69 17 63 47 -2 10
|
16
|
+
-14 19 -28 21 -26 4 -50 27 -50 49 0 10 35 13 160 13 144 0 161 -2 166 -17 3
|
17
|
+
-10 15 -38 27 -63 22 -45 22 -45 79 -48 47 -2 58 0 67 16 13 25 -5 50 -39 57
|
18
|
+
-23 4 -50 29 -50 46 0 4 53 9 118 11 107 3 122 5 155 28 20 14 32 27 26 28 -5
|
19
|
+
2 -16 -2 -24 -8 -18 -15 -20 1 -3 18 8 8 9 12 1 12 -6 0 -19 -7 -27 -16 -9 -8
|
20
|
+
-16 -12 -16 -7 0 5 5 14 11 20 8 8 8 13 0 17 -6 4 -11 2 -11 -4 0 -6 -5 -8
|
21
|
+
-10 -5 -6 4 -8 11 -5 16 3 5 -1 6 -9 3 -9 -3 -16 -2 -16 4 0 14 -105 72 -130
|
22
|
+
72 -11 0 -23 7 -27 15 -6 18 -93 65 -119 65 -11 0 -15 6 -11 19 3 14 1 18 -10
|
23
|
+
14 -7 -3 -21 2 -31 10 -9 8 -36 21 -59 29 -24 7 -43 16 -43 20 0 5 -5 8 -11 8
|
24
|
+
-6 0 -41 17 -77 37 -37 21 -69 38 -72 39 -20 3 -58 29 -54 35 3 5 -1 9 -10 9
|
25
|
+
-8 0 -16 3 -18 8 -5 12 -86 52 -105 52 -10 0 -26 8 -34 18 -9 9 -25 24 -37 32
|
26
|
+
-16 10 -18 16 -9 22 17 11 122 0 175 -17 42 -15 142 -64 174 -87 9 -7 20 -10
|
27
|
+
23 -7 9 9 30 118 23 124 -3 3 -36 12 -74 20 -82 18 -229 18 -300 0z"/>
|
28
|
+
<path d="M1242 1038 c-20 -20 -14 -56 13 -74 23 -15 27 -15 50 0 27 18 33 54
|
29
|
+
13 74 -15 15 -61 15 -76 0z"/>
|
30
|
+
<path d="M1173 915 c0 -8 4 -12 9 -9 5 3 6 10 3 15 -9 13 -12 11 -12 -6z"/>
|
31
|
+
<path d="M1526 708 c3 -5 10 -6 15 -3 13 9 11 12 -6 12 -8 0 -12 -4 -9 -9z"/>
|
32
|
+
</g>
|
33
|
+
</svg>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
2
|
+
export declare class ImobziLocacoes implements INodeType {
|
3
|
+
description: INodeTypeDescription;
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
5
|
+
}
|
@@ -0,0 +1,116 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ImobziLocacoes = void 0;
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
5
|
+
class ImobziLocacoes {
|
6
|
+
constructor() {
|
7
|
+
this.description = {
|
8
|
+
displayName: 'Locações (Imobzi)',
|
9
|
+
name: 'imobziLocacoes',
|
10
|
+
group: ['transform'],
|
11
|
+
version: 1,
|
12
|
+
description: 'Gerenciar locações na Imobzi',
|
13
|
+
defaults: {
|
14
|
+
name: 'Locações (Imobzi)',
|
15
|
+
},
|
16
|
+
inputs: ["main"],
|
17
|
+
outputs: ["main"],
|
18
|
+
credentials: [
|
19
|
+
{
|
20
|
+
name: 'imobziApi',
|
21
|
+
required: true,
|
22
|
+
},
|
23
|
+
],
|
24
|
+
properties: [
|
25
|
+
{
|
26
|
+
displayName: 'Operação',
|
27
|
+
name: 'operation',
|
28
|
+
type: 'options',
|
29
|
+
noDataExpression: true,
|
30
|
+
options: [
|
31
|
+
{ name: 'Criar', value: 'create', description: 'Criar nova locação', action: 'Criar nova loca o' },
|
32
|
+
{ name: 'Obter', value: 'get', description: 'Obter locação por ID', action: 'Obter loca o por id' },
|
33
|
+
{ name: 'Get Many', value: 'getAll', description: 'Listar locações', action: 'Listar loca es' },
|
34
|
+
{ name: 'Atualizar', value: 'update', description: 'Atualizar locação', action: 'Atualizar loca o' },
|
35
|
+
],
|
36
|
+
default: 'create',
|
37
|
+
},
|
38
|
+
{
|
39
|
+
displayName: 'ID Da Locação',
|
40
|
+
name: 'locacaoId',
|
41
|
+
type: 'string',
|
42
|
+
default: '',
|
43
|
+
required: true,
|
44
|
+
displayOptions: { show: { operation: ['get', 'update'] } },
|
45
|
+
},
|
46
|
+
{
|
47
|
+
displayName: 'Nome Do Inquilino',
|
48
|
+
name: 'inquilino',
|
49
|
+
type: 'string',
|
50
|
+
default: '',
|
51
|
+
required: true,
|
52
|
+
displayOptions: { show: { operation: ['create'] } },
|
53
|
+
},
|
54
|
+
{
|
55
|
+
displayName: 'Imóvel',
|
56
|
+
name: 'imovel',
|
57
|
+
type: 'string',
|
58
|
+
default: '',
|
59
|
+
displayOptions: { show: { operation: ['create'] } },
|
60
|
+
description: 'ID do imóvel locado',
|
61
|
+
},
|
62
|
+
{
|
63
|
+
displayName: 'Data De Início',
|
64
|
+
name: 'dataInicio',
|
65
|
+
type: 'string',
|
66
|
+
default: '',
|
67
|
+
displayOptions: { show: { operation: ['create'] } },
|
68
|
+
description: 'Data de início da locação',
|
69
|
+
},
|
70
|
+
],
|
71
|
+
};
|
72
|
+
}
|
73
|
+
async execute() {
|
74
|
+
const items = this.getInputData();
|
75
|
+
const returnData = [];
|
76
|
+
const operation = this.getNodeParameter('operation', 0);
|
77
|
+
for (let i = 0; i < items.length; i++) {
|
78
|
+
try {
|
79
|
+
if (operation === 'create') {
|
80
|
+
const inquilino = this.getNodeParameter('inquilino', i, '');
|
81
|
+
const imovel = this.getNodeParameter('imovel', i, '');
|
82
|
+
const dataInicio = this.getNodeParameter('dataInicio', i, '');
|
83
|
+
const body = { inquilino, imovel, dataInicio };
|
84
|
+
const response = { id: `locacao_${Date.now()}`, ...body, criado_em: new Date().toISOString() };
|
85
|
+
items[i].json = response;
|
86
|
+
}
|
87
|
+
else if (operation === 'get') {
|
88
|
+
const locacaoId = this.getNodeParameter('locacaoId', i, '');
|
89
|
+
const response = { id: locacaoId, inquilino: 'Exemplo', imovel: 'imovel_1', dataInicio: '2024-01-01', criado_em: new Date().toISOString() };
|
90
|
+
items[i].json = response;
|
91
|
+
}
|
92
|
+
else if (operation === 'getAll') {
|
93
|
+
const response = { data: [{ id: 'locacao_1', inquilino: 'Inquilino 1', imovel: 'imovel_1', dataInicio: '2024-01-01' }, { id: 'locacao_2', inquilino: 'Inquilino 2', imovel: 'imovel_2', dataInicio: '2024-02-01' }] };
|
94
|
+
items[i].json = response;
|
95
|
+
}
|
96
|
+
else if (operation === 'update') {
|
97
|
+
const locacaoId = this.getNodeParameter('locacaoId', i, '');
|
98
|
+
const response = { id: locacaoId, atualizado: true };
|
99
|
+
items[i].json = response;
|
100
|
+
}
|
101
|
+
returnData.push(items[i]);
|
102
|
+
}
|
103
|
+
catch (error) {
|
104
|
+
if (this.continueOnFail()) {
|
105
|
+
returnData.push({ json: this.getInputData(i)[0].json, error, pairedItem: i });
|
106
|
+
}
|
107
|
+
else {
|
108
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
return [returnData];
|
113
|
+
}
|
114
|
+
}
|
115
|
+
exports.ImobziLocacoes = ImobziLocacoes;
|
116
|
+
//# sourceMappingURL=ImobziLocacoes.node.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ImobziLocacoes.node.js","sourceRoot":"","sources":["../../../nodes/ImobziLocacoes/ImobziLocacoes.node.ts"],"names":[],"mappings":";;;AAOA,+CAAsE;AAEtE,MAAa,cAAc;IAA3B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,gBAAgB;YACtB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE;gBACT,IAAI,EAAE,mBAAmB;aACzB;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,WAAW;oBACjB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,EAAE,mBAAmB,EAAE;wBAClG,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,EAAE,qBAAqB,EAAE;wBACnG,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,EAAE,gBAAgB,EAAE;wBAC/F,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,kBAAkB,EAAE;qBACpG;oBACD,OAAO,EAAE,QAAQ;iBACjB;gBACD;oBAC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904//EN"
|
3
|
+
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
4
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
5
|
+
width="170.000000pt" height="161.000000pt" viewBox="0 0 170.000000 161.000000"
|
6
|
+
preserveAspectRatio="xMidYMid meet">
|
7
|
+
|
8
|
+
<g transform="translate(0.000000,161.000000) scale(0.100000,-0.100000)"
|
9
|
+
fill="#000000" stroke="none">
|
10
|
+
<path d="M574 1265 c-169 -41 -300 -195 -339 -399 -33 -174 -9 -398 58 -539
|
11
|
+
43 -88 135 -192 206 -230 140 -76 403 -74 509 4 46 34 92 116 92 164 0 111
|
12
|
+
-81 194 -191 195 -139 0 -207 -194 -89 -255 41 -21 71 -19 111 8 64 43 34 122
|
13
|
+
-32 85 -42 -24 -49 -23 -49 11 0 40 24 61 70 61 31 0 43 -6 65 -32 22 -26 26
|
14
|
+
-39 22 -70 -15 -112 -120 -146 -259 -86 -63 27 -131 102 -148 163 -26 93 3
|
15
|
+
205 67 255 37 29 48 25 61 -19 20 -65 47 -91 97 -91 46 0 69 17 63 47 -2 10
|
16
|
+
-14 19 -28 21 -26 4 -50 27 -50 49 0 10 35 13 160 13 144 0 161 -2 166 -17 3
|
17
|
+
-10 15 -38 27 -63 22 -45 22 -45 79 -48 47 -2 58 0 67 16 13 25 -5 50 -39 57
|
18
|
+
-23 4 -50 29 -50 46 0 4 53 9 118 11 107 3 122 5 155 28 20 14 32 27 26 28 -5
|
19
|
+
2 -16 -2 -24 -8 -18 -15 -20 1 -3 18 8 8 9 12 1 12 -6 0 -19 -7 -27 -16 -9 -8
|
20
|
+
-16 -12 -16 -7 0 5 5 14 11 20 8 8 8 13 0 17 -6 4 -11 2 -11 -4 0 -6 -5 -8
|
21
|
+
-10 -5 -6 4 -8 11 -5 16 3 5 -1 6 -9 3 -9 -3 -16 -2 -16 4 0 14 -105 72 -130
|
22
|
+
72 -11 0 -23 7 -27 15 -6 18 -93 65 -119 65 -11 0 -15 6 -11 19 3 14 1 18 -10
|
23
|
+
14 -7 -3 -21 2 -31 10 -9 8 -36 21 -59 29 -24 7 -43 16 -43 20 0 5 -5 8 -11 8
|
24
|
+
-6 0 -41 17 -77 37 -37 21 -69 38 -72 39 -20 3 -58 29 -54 35 3 5 -1 9 -10 9
|
25
|
+
-8 0 -16 3 -18 8 -5 12 -86 52 -105 52 -10 0 -26 8 -34 18 -9 9 -25 24 -37 32
|
26
|
+
-16 10 -18 16 -9 22 17 11 122 0 175 -17 42 -15 142 -64 174 -87 9 -7 20 -10
|
27
|
+
23 -7 9 9 30 118 23 124 -3 3 -36 12 -74 20 -82 18 -229 18 -300 0z"/>
|
28
|
+
<path d="M1242 1038 c-20 -20 -14 -56 13 -74 23 -15 27 -15 50 0 27 18 33 54
|
29
|
+
13 74 -15 15 -61 15 -76 0z"/>
|
30
|
+
<path d="M1173 915 c0 -8 4 -12 9 -9 5 3 6 10 3 15 -9 13 -12 11 -12 -6z"/>
|
31
|
+
<path d="M1526 708 c3 -5 10 -6 15 -3 13 9 11 12 -6 12 -8 0 -12 -4 -9 -9z"/>
|
32
|
+
</g>
|
33
|
+
</svg>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
2
|
+
export declare class ImobziTarefas implements INodeType {
|
3
|
+
description: INodeTypeDescription;
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
5
|
+
}
|
@@ -0,0 +1,117 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ImobziTarefas = void 0;
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
5
|
+
class ImobziTarefas {
|
6
|
+
constructor() {
|
7
|
+
this.description = {
|
8
|
+
displayName: 'Tarefas (Imobzi)',
|
9
|
+
name: 'imobziTarefas',
|
10
|
+
group: ['transform'],
|
11
|
+
version: 1,
|
12
|
+
description: 'Gerenciar tarefas na Imobzi',
|
13
|
+
defaults: {
|
14
|
+
name: 'Tarefas (Imobzi)',
|
15
|
+
},
|
16
|
+
inputs: ["main"],
|
17
|
+
outputs: ["main"],
|
18
|
+
credentials: [
|
19
|
+
{
|
20
|
+
name: 'imobziApi',
|
21
|
+
required: true,
|
22
|
+
},
|
23
|
+
],
|
24
|
+
properties: [
|
25
|
+
{
|
26
|
+
displayName: 'Operação',
|
27
|
+
name: 'operation',
|
28
|
+
type: 'options',
|
29
|
+
noDataExpression: true,
|
30
|
+
options: [
|
31
|
+
{ name: 'Criar', value: 'create', description: 'Criar nova tarefa', action: 'Criar nova tarefa' },
|
32
|
+
{ name: 'Obter', value: 'get', description: 'Obter tarefa por ID', action: 'Obter tarefa por ID' },
|
33
|
+
{ name: 'Get Many', value: 'getAll', description: 'Listar tarefas', action: 'Listar tarefas' },
|
34
|
+
{ name: 'Atualizar', value: 'update', description: 'Atualizar tarefa', action: 'Atualizar tarefa' },
|
35
|
+
],
|
36
|
+
default: 'create',
|
37
|
+
},
|
38
|
+
{
|
39
|
+
displayName: 'ID Da Tarefa',
|
40
|
+
name: 'tarefaId',
|
41
|
+
type: 'string',
|
42
|
+
default: '',
|
43
|
+
required: true,
|
44
|
+
displayOptions: { show: { operation: ['get', 'update'] } },
|
45
|
+
},
|
46
|
+
{
|
47
|
+
displayName: 'Título',
|
48
|
+
name: 'titulo',
|
49
|
+
type: 'string',
|
50
|
+
default: '',
|
51
|
+
required: true,
|
52
|
+
displayOptions: { show: { operation: ['create'] } },
|
53
|
+
description: 'Título da tarefa',
|
54
|
+
},
|
55
|
+
{
|
56
|
+
displayName: 'Descrição',
|
57
|
+
name: 'descricao',
|
58
|
+
type: 'string',
|
59
|
+
default: '',
|
60
|
+
displayOptions: { show: { operation: ['create'] } },
|
61
|
+
description: 'Descrição da tarefa',
|
62
|
+
},
|
63
|
+
{
|
64
|
+
displayName: 'Data De Vencimento',
|
65
|
+
name: 'dataVencimento',
|
66
|
+
type: 'string',
|
67
|
+
default: '',
|
68
|
+
displayOptions: { show: { operation: ['create'] } },
|
69
|
+
description: 'Data de vencimento da tarefa',
|
70
|
+
},
|
71
|
+
],
|
72
|
+
};
|
73
|
+
}
|
74
|
+
async execute() {
|
75
|
+
const items = this.getInputData();
|
76
|
+
const returnData = [];
|
77
|
+
const operation = this.getNodeParameter('operation', 0);
|
78
|
+
for (let i = 0; i < items.length; i++) {
|
79
|
+
try {
|
80
|
+
if (operation === 'create') {
|
81
|
+
const titulo = this.getNodeParameter('titulo', i, '');
|
82
|
+
const descricao = this.getNodeParameter('descricao', i, '');
|
83
|
+
const dataVencimento = this.getNodeParameter('dataVencimento', i, '');
|
84
|
+
const body = { titulo, descricao, dataVencimento };
|
85
|
+
const response = { id: `tarefa_${Date.now()}`, ...body, criado_em: new Date().toISOString() };
|
86
|
+
items[i].json = response;
|
87
|
+
}
|
88
|
+
else if (operation === 'get') {
|
89
|
+
const tarefaId = this.getNodeParameter('tarefaId', i, '');
|
90
|
+
const response = { id: tarefaId, titulo: 'Exemplo', descricao: 'Descrição', dataVencimento: '2024-01-01', criado_em: new Date().toISOString() };
|
91
|
+
items[i].json = response;
|
92
|
+
}
|
93
|
+
else if (operation === 'getAll') {
|
94
|
+
const response = { data: [{ id: 'tarefa_1', titulo: 'Tarefa 1', descricao: 'Desc 1', dataVencimento: '2024-01-01' }, { id: 'tarefa_2', titulo: 'Tarefa 2', descricao: 'Desc 2', dataVencimento: '2024-02-01' }] };
|
95
|
+
items[i].json = response;
|
96
|
+
}
|
97
|
+
else if (operation === 'update') {
|
98
|
+
const tarefaId = this.getNodeParameter('tarefaId', i, '');
|
99
|
+
const response = { id: tarefaId, atualizado: true };
|
100
|
+
items[i].json = response;
|
101
|
+
}
|
102
|
+
returnData.push(items[i]);
|
103
|
+
}
|
104
|
+
catch (error) {
|
105
|
+
if (this.continueOnFail()) {
|
106
|
+
returnData.push({ json: this.getInputData(i)[0].json, error, pairedItem: i });
|
107
|
+
}
|
108
|
+
else {
|
109
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
return [returnData];
|
114
|
+
}
|
115
|
+
}
|
116
|
+
exports.ImobziTarefas = ImobziTarefas;
|
117
|
+
//# sourceMappingURL=ImobziTarefas.node.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ImobziTarefas.node.js","sourceRoot":"","sources":["../../../nodes/ImobziTarefas/ImobziTarefas.node.ts"],"names":[],"mappings":";;;AAOA,+CAAsE;AAEtE,MAAa,aAAa;IAA1B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,eAAe;YACrB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE;gBACT,IAAI,EAAE,kBAAkB;aACxB;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,WAAW;oBACjB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,mBAAmB,EAAE;wBACjG,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,EAAE,qBAAqB,EAAE;wBAClG,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,EAAE;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AAC;YACF,CAAC;QACF,CAAC;QACD,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AA1GD,sCA0GC"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
3
|
+
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
4
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
5
|
+
width="170.000000pt" height="161.000000pt" viewBox="0 0 170.000000 161.000000"
|
6
|
+
preserveAspectRatio="xMidYMid meet">
|
7
|
+
|
8
|
+
<g transform="translate(0.000000,161.000000) scale(0.100000,-0.100000)"
|
9
|
+
fill="#000000" stroke="none">
|
10
|
+
<path d="M574 1265 c-169 -41 -300 -195 -339 -399 -33 -174 -9 -398 58 -539
|
11
|
+
43 -88 135 -192 206 -230 140 -76 403 -74 509 4 46 34 92 116 92 164 0 111
|
12
|
+
-81 194 -191 195 -139 0 -207 -194 -89 -255 41 -21 71 -19 111 8 64 43 34 122
|
13
|
+
-32 85 -42 -24 -49 -23 -49 11 0 40 24 61 70 61 31 0 43 -6 65 -32 22 -26 26
|
14
|
+
-39 22 -70 -15 -112 -120 -146 -259 -86 -63 27 -131 102 -148 163 -26 93 3
|
15
|
+
205 67 255 37 29 48 25 61 -19 20 -65 47 -91 97 -91 46 0 69 17 63 47 -2 10
|
16
|
+
-14 19 -28 21 -26 4 -50 27 -50 49 0 10 35 13 160 13 144 0 161 -2 166 -17 3
|
17
|
+
-10 15 -38 27 -63 22 -45 22 -45 79 -48 47 -2 58 0 67 16 13 25 -5 50 -39 57
|
18
|
+
-23 4 -50 29 -50 46 0 4 53 9 118 11 107 3 122 5 155 28 20 14 32 27 26 28 -5
|
19
|
+
2 -16 -2 -24 -8 -18 -15 -20 1 -3 18 8 8 9 12 1 12 -6 0 -19 -7 -27 -16 -9 -8
|
20
|
+
-16 -12 -16 -7 0 5 5 14 11 20 8 8 8 13 0 17 -6 4 -11 2 -11 -4 0 -6 -5 -8
|
21
|
+
-10 -5 -6 4 -8 11 -5 16 3 5 -1 6 -9 3 -9 -3 -16 -2 -16 4 0 14 -105 72 -130
|
22
|
+
72 -11 0 -23 7 -27 15 -6 18 -93 65 -119 65 -11 0 -15 6 -11 19 3 14 1 18 -10
|
23
|
+
14 -7 -3 -21 2 -31 10 -9 8 -36 21 -59 29 -24 7 -43 16 -43 20 0 5 -5 8 -11 8
|
24
|
+
-6 0 -41 17 -77 37 -37 21 -69 38 -72 39 -20 3 -58 29 -54 35 3 5 -1 9 -10 9
|
25
|
+
-8 0 -16 3 -18 8 -5 12 -86 52 -105 52 -10 0 -26 8 -34 18 -9 9 -25 24 -37 32
|
26
|
+
-16 10 -18 16 -9 22 17 11 122 0 175 -17 42 -15 142 -64 174 -87 9 -7 20 -10
|
27
|
+
23 -7 9 9 30 118 23 124 -3 3 -36 12 -74 20 -82 18 -229 18 -300 0z"/>
|
28
|
+
<path d="M1242 1038 c-20 -20 -14 -56 13 -74 23 -15 27 -15 50 0 27 18 33 54
|
29
|
+
13 74 -15 15 -61 15 -76 0z"/>
|
30
|
+
<path d="M1173 915 c0 -8 4 -12 9 -9 5 3 6 10 3 15 -9 13 -12 11 -12 -6z"/>
|
31
|
+
<path d="M1526 708 c3 -5 10 -6 15 -3 13 9 11 12 -6 12 -8 0 -12 -4 -9 -9z"/>
|
32
|
+
</g>
|
33
|
+
</svg>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
2
|
+
export declare class ImobziUsuarios implements INodeType {
|
3
|
+
description: INodeTypeDescription;
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
5
|
+
}
|
@@ -0,0 +1,109 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ImobziUsuarios = void 0;
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
5
|
+
class ImobziUsuarios {
|
6
|
+
constructor() {
|
7
|
+
this.description = {
|
8
|
+
displayName: 'Usuários/Corretores (Imobzi)',
|
9
|
+
name: 'imobziUsuarios',
|
10
|
+
group: ['transform'],
|
11
|
+
version: 1,
|
12
|
+
description: 'Gerenciar usuários e corretores na Imobzi',
|
13
|
+
defaults: {
|
14
|
+
name: 'Usuários/Corretores (Imobzi)',
|
15
|
+
},
|
16
|
+
inputs: ["main"],
|
17
|
+
outputs: ["main"],
|
18
|
+
credentials: [
|
19
|
+
{
|
20
|
+
name: 'imobziApi',
|
21
|
+
required: true,
|
22
|
+
},
|
23
|
+
],
|
24
|
+
properties: [
|
25
|
+
{
|
26
|
+
displayName: 'Operação',
|
27
|
+
name: 'operation',
|
28
|
+
type: 'options',
|
29
|
+
noDataExpression: true,
|
30
|
+
options: [
|
31
|
+
{ name: 'Criar', value: 'create', description: 'Criar novo usuário/corretor', action: 'Criar novo usu rio corretor' },
|
32
|
+
{ name: 'Obter', value: 'get', description: 'Obter usuário/corretor por ID', action: 'Obter usu rio corretor por id' },
|
33
|
+
{ name: 'Get Many', value: 'getAll', description: 'Listar usuários/corretores', action: 'Listar usu rios corretores' },
|
34
|
+
{ name: 'Atualizar', value: 'update', description: 'Atualizar usuário/corretor', action: 'Atualizar usu rio corretor' },
|
35
|
+
],
|
36
|
+
default: 'create',
|
37
|
+
},
|
38
|
+
{
|
39
|
+
displayName: 'ID do Usuário/Corretor',
|
40
|
+
name: 'usuarioId',
|
41
|
+
type: 'string',
|
42
|
+
default: '',
|
43
|
+
required: true,
|
44
|
+
displayOptions: { show: { operation: ['get', 'update'] } },
|
45
|
+
},
|
46
|
+
{
|
47
|
+
displayName: 'Nome',
|
48
|
+
name: 'nome',
|
49
|
+
type: 'string',
|
50
|
+
default: '',
|
51
|
+
required: true,
|
52
|
+
displayOptions: { show: { operation: ['create'] } },
|
53
|
+
description: 'Nome do usuário/corretor',
|
54
|
+
},
|
55
|
+
{
|
56
|
+
displayName: 'E-Mail',
|
57
|
+
name: 'email',
|
58
|
+
type: 'string',
|
59
|
+
placeholder: 'name@email.com',
|
60
|
+
default: '',
|
61
|
+
displayOptions: { show: { operation: ['create'] } },
|
62
|
+
description: 'E-mail do usuário/corretor',
|
63
|
+
},
|
64
|
+
],
|
65
|
+
};
|
66
|
+
}
|
67
|
+
async execute() {
|
68
|
+
const items = this.getInputData();
|
69
|
+
const returnData = [];
|
70
|
+
const operation = this.getNodeParameter('operation', 0);
|
71
|
+
for (let i = 0; i < items.length; i++) {
|
72
|
+
try {
|
73
|
+
if (operation === 'create') {
|
74
|
+
const nome = this.getNodeParameter('nome', i, '');
|
75
|
+
const email = this.getNodeParameter('email', i, '');
|
76
|
+
const body = { nome, email };
|
77
|
+
const response = { id: `usuario_${Date.now()}`, ...body, criado_em: new Date().toISOString() };
|
78
|
+
items[i].json = response;
|
79
|
+
}
|
80
|
+
else if (operation === 'get') {
|
81
|
+
const usuarioId = this.getNodeParameter('usuarioId', i, '');
|
82
|
+
const response = { id: usuarioId, nome: 'Exemplo', email: 'exemplo@imobzi.com', criado_em: new Date().toISOString() };
|
83
|
+
items[i].json = response;
|
84
|
+
}
|
85
|
+
else if (operation === 'getAll') {
|
86
|
+
const response = { data: [{ id: 'usuario_1', nome: 'Usuário 1', email: 'u1@imobzi.com' }, { id: 'usuario_2', nome: 'Usuário 2', email: 'u2@imobzi.com' }] };
|
87
|
+
items[i].json = response;
|
88
|
+
}
|
89
|
+
else if (operation === 'update') {
|
90
|
+
const usuarioId = this.getNodeParameter('usuarioId', i, '');
|
91
|
+
const response = { id: usuarioId, atualizado: true };
|
92
|
+
items[i].json = response;
|
93
|
+
}
|
94
|
+
returnData.push(items[i]);
|
95
|
+
}
|
96
|
+
catch (error) {
|
97
|
+
if (this.continueOnFail()) {
|
98
|
+
returnData.push({ json: this.getInputData(i)[0].json, error, pairedItem: i });
|
99
|
+
}
|
100
|
+
else {
|
101
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
return [returnData];
|
106
|
+
}
|
107
|
+
}
|
108
|
+
exports.ImobziUsuarios = ImobziUsuarios;
|
109
|
+
//# sourceMappingURL=ImobziUsuarios.node.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ImobziUsuarios.node.js","sourceRoot":"","sources":["../../../nodes/ImobziUsuarios/ImobziUsuarios.node.ts"],"names":[],"mappings":";;;AAOA,+CAAsE;AAEtE,MAAa,cAAc;IAA3B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,8BAA8B;YAC3C,IAAI,EAAE,gBAAgB;YACtB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,2CAA2C;YACxD,QAAQ,EAAE;gBACT,IAAI,EAAE,8BAA8B;aACpC;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,WAAW;oBACjB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE,MAAM,EAAE,6BAA6B,EAAE;wBACrH,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,+BAA+B,EAAE,MAAM,EAAE,+BAA+B,EAAE;wBACtH,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,EAAE,4BAA4B,EAAE;w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,CAAC,CAAC,CAAC,IAAI,GAAG,QAAuB,CAAC;gBACzC,CAAC;qBAAM,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;oBACnC,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE,CAAW,CAAC;oBACtE,MAAM,QAAQ,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;oBACrD,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,QAAQ,CAAC;gBAC1B,CAAC;gBACD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;gBAC/E,CAAC;qBAAM,CAAC;oBACP,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;gBACvE,CAAC;YACF,CAAC;QACF,CAAC;QACD,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAlGD,wCAkGC"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
3
|
+
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
4
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
5
|
+
width="170.000000pt" height="161.000000pt" viewBox="0 0 170.000000 161.000000"
|
6
|
+
preserveAspectRatio="xMidYMid meet">
|
7
|
+
|
8
|
+
<g transform="translate(0.000000,161.000000) scale(0.100000,-0.100000)"
|
9
|
+
fill="#000000" stroke="none">
|
10
|
+
<path d="M574 1265 c-169 -41 -300 -195 -339 -399 -33 -174 -9 -398 58 -539
|
11
|
+
43 -88 135 -192 206 -230 140 -76 403 -74 509 4 46 34 92 116 92 164 0 111
|
12
|
+
-81 194 -191 195 -139 0 -207 -194 -89 -255 41 -21 71 -19 111 8 64 43 34 122
|
13
|
+
-32 85 -42 -24 -49 -23 -49 11 0 40 24 61 70 61 31 0 43 -6 65 -32 22 -26 26
|
14
|
+
-39 22 -70 -15 -112 -120 -146 -259 -86 -63 27 -131 102 -148 163 -26 93 3
|
15
|
+
205 67 255 37 29 48 25 61 -19 20 -65 47 -91 97 -91 46 0 69 17 63 47 -2 10
|
16
|
+
-14 19 -28 21 -26 4 -50 27 -50 49 0 10 35 13 160 13 144 0 161 -2 166 -17 3
|
17
|
+
-10 15 -38 27 -63 22 -45 22 -45 79 -48 47 -2 58 0 67 16 13 25 -5 50 -39 57
|
18
|
+
-23 4 -50 29 -50 46 0 4 53 9 118 11 107 3 122 5 155 28 20 14 32 27 26 28 -5
|
19
|
+
2 -16 -2 -24 -8 -18 -15 -20 1 -3 18 8 8 9 12 1 12 -6 0 -19 -7 -27 -16 -9 -8
|
20
|
+
-16 -12 -16 -7 0 5 5 14 11 20 8 8 8 13 0 17 -6 4 -11 2 -11 -4 0 -6 -5 -8
|
21
|
+
-10 -5 -6 4 -8 11 -5 16 3 5 -1 6 -9 3 -9 -3 -16 -2 -16 4 0 14 -105 72 -130
|
22
|
+
72 -11 0 -23 7 -27 15 -6 18 -93 65 -119 65 -11 0 -15 6 -11 19 3 14 1 18 -10
|
23
|
+
14 -7 -3 -21 2 -31 10 -9 8 -36 21 -59 29 -24 7 -43 16 -43 20 0 5 -5 8 -11 8
|
24
|
+
-6 0 -41 17 -77 37 -37 21 -69 38 -72 39 -20 3 -58 29 -54 35 3 5 -1 9 -10 9
|
25
|
+
-8 0 -16 3 -18 8 -5 12 -86 52 -105 52 -10 0 -26 8 -34 18 -9 9 -25 24 -37 32
|
26
|
+
-16 10 -18 16 -9 22 17 11 122 0 175 -17 42 -15 142 -64 174 -87 9 -7 20 -10
|
27
|
+
23 -7 9 9 30 118 23 124 -3 3 -36 12 -74 20 -82 18 -229 18 -300 0z"/>
|
28
|
+
<path d="M1242 1038 c-20 -20 -14 -56 13 -74 23 -15 27 -15 50 0 27 18 33 54
|
29
|
+
13 74 -15 15 -61 15 -76 0z"/>
|
30
|
+
<path d="M1173 915 c0 -8 4 -12 9 -9 5 3 6 10 3 15 -9 13 -12 11 -12 -6z"/>
|
31
|
+
<path d="M1526 708 c3 -5 10 -6 15 -3 13 9 11 12 -6 12 -8 0 -12 -4 -9 -9z"/>
|
32
|
+
</g>
|
33
|
+
</svg>
|
@@ -1,5 +1,12 @@
|
|
1
|
-
import type {
|
1
|
+
import type { IWebhookFunctions, INodeType, INodeTypeDescription, IHookFunctions } from 'n8n-workflow';
|
2
2
|
export declare class ImobziWebhook implements INodeType {
|
3
3
|
description: INodeTypeDescription;
|
4
|
-
|
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<any>;
|
5
12
|
}
|