n8n-nodes-imobzi 0.3.44 → 0.3.45

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.
@@ -17,60 +17,6 @@ const resourceEndpoint = {
17
17
  usuario: 'users',
18
18
  account: 'account',
19
19
  };
20
- const createFiltersProperty = () => ({
21
- displayName: 'Filtros',
22
- name: 'filters',
23
- type: 'fixedCollection',
24
- typeOptions: { multipleValues: true },
25
- placeholder: 'Adicionar filtro',
26
- default: {},
27
- displayOptions: {
28
- show: {
29
- operation: ['getAll', 'delete'],
30
- },
31
- },
32
- options: [
33
- {
34
- name: 'filter',
35
- displayName: 'Condição',
36
- values: [
37
- {
38
- displayName: 'Campo',
39
- name: 'field',
40
- type: 'string',
41
- default: '',
42
- description: 'Campo para filtrar',
43
- },
44
- {
45
- displayName: 'Operador',
46
- name: 'operator',
47
- type: 'options',
48
- options: [
49
- { name: 'Começa Com', value: 'starts_with' },
50
- { name: 'Contém', value: 'contains' },
51
- { name: 'Diferente', value: 'neq' },
52
- { name: 'Igual', value: 'eq' },
53
- { name: 'Maior Ou Igual', value: 'gte' },
54
- { name: 'Maior Que', value: 'gt' },
55
- { name: 'Menor Ou Igual', value: 'lte' },
56
- { name: 'Menor Que', value: 'lt' },
57
- { name: 'Não Contém', value: 'not_contains' },
58
- { name: 'Termina Com', value: 'ends_with' },
59
- ],
60
- default: 'eq',
61
- description: 'Operador de comparação',
62
- },
63
- {
64
- displayName: 'Valor',
65
- name: 'value',
66
- type: 'string',
67
- default: '',
68
- description: 'Valor para comparar',
69
- },
70
- ],
71
- },
72
- ],
73
- });
74
20
  const createCreateFieldsProperty = (resourceName) => ({
75
21
  displayName: 'Create Fields',
76
22
  name: 'createFields',
@@ -212,6 +158,14 @@ class Imobzi {
212
158
  value: item.id,
213
159
  }));
214
160
  },
161
+ async getLeadFields() {
162
+ const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/leads', qs: { limit: 1 } });
163
+ const item = (response.data || [])[0] || {};
164
+ return Object.keys(item).map(key => ({
165
+ name: key,
166
+ value: key,
167
+ }));
168
+ },
215
169
  async getProperties() {
216
170
  const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/properties' });
217
171
  return (response.data || []).map((item) => ({
@@ -219,6 +173,14 @@ class Imobzi {
219
173
  value: item.id,
220
174
  }));
221
175
  },
176
+ async getPropertyFields() {
177
+ const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/properties', qs: { limit: 1 } });
178
+ const item = (response.data || [])[0] || {};
179
+ return Object.keys(item).map(key => ({
180
+ name: key,
181
+ value: key,
182
+ }));
183
+ },
222
184
  async getContacts() {
223
185
  const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/contacts' });
224
186
  return (response.data || []).map((item) => ({
@@ -226,6 +188,14 @@ class Imobzi {
226
188
  value: item.id,
227
189
  }));
228
190
  },
191
+ async getContactFields() {
192
+ const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/contacts', qs: { limit: 1 } });
193
+ const item = (response.data || [])[0] || {};
194
+ return Object.keys(item).map(key => ({
195
+ name: key,
196
+ value: key,
197
+ }));
198
+ },
229
199
  async getContracts() {
230
200
  const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/contracts' });
231
201
  return (response.data || []).map((item) => ({
@@ -233,6 +203,14 @@ class Imobzi {
233
203
  value: item.id,
234
204
  }));
235
205
  },
206
+ async getContractFields() {
207
+ const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/contracts', qs: { limit: 1 } });
208
+ const item = (response.data || [])[0] || {};
209
+ return Object.keys(item).map(key => ({
210
+ name: key,
211
+ value: key,
212
+ }));
213
+ },
236
214
  async getFinancialAccounts() {
237
215
  const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/financial/accounts' });
238
216
  return (response.data || []).map((item) => ({
@@ -240,6 +218,14 @@ class Imobzi {
240
218
  value: item.id,
241
219
  }));
242
220
  },
221
+ async getFinancialAccountFields() {
222
+ const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/financial/accounts', qs: { limit: 1 } });
223
+ const item = (response.data || [])[0] || {};
224
+ return Object.keys(item).map(key => ({
225
+ name: key,
226
+ value: key,
227
+ }));
228
+ },
243
229
  async getRentals() {
244
230
  const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/rentals' });
245
231
  return (response.data || []).map((item) => ({
@@ -247,6 +233,14 @@ class Imobzi {
247
233
  value: item.id,
248
234
  }));
249
235
  },
236
+ async getRentalFields() {
237
+ const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/rentals', qs: { limit: 1 } });
238
+ const item = (response.data || [])[0] || {};
239
+ return Object.keys(item).map(key => ({
240
+ name: key,
241
+ value: key,
242
+ }));
243
+ },
250
244
  async getDocuments() {
251
245
  const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/documents' });
252
246
  return (response.data || []).map((item) => ({
@@ -254,6 +248,14 @@ class Imobzi {
254
248
  value: item.id,
255
249
  }));
256
250
  },
251
+ async getDocumentFields() {
252
+ const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/documents', qs: { limit: 1 } });
253
+ const item = (response.data || [])[0] || {};
254
+ return Object.keys(item).map(key => ({
255
+ name: key,
256
+ value: key,
257
+ }));
258
+ },
257
259
  async getTasks() {
258
260
  const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/tasks' });
259
261
  return (response.data || []).map((item) => ({
@@ -261,6 +263,14 @@ class Imobzi {
261
263
  value: item.id,
262
264
  }));
263
265
  },
266
+ async getTaskFields() {
267
+ const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/tasks', qs: { limit: 1 } });
268
+ const item = (response.data || [])[0] || {};
269
+ return Object.keys(item).map(key => ({
270
+ name: key,
271
+ value: key,
272
+ }));
273
+ },
264
274
  async getAgendas() {
265
275
  const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/agendas' });
266
276
  return (response.data || []).map((item) => ({
@@ -268,6 +278,14 @@ class Imobzi {
268
278
  value: item.id,
269
279
  }));
270
280
  },
281
+ async getAgendaFields() {
282
+ const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/agendas', qs: { limit: 1 } });
283
+ const item = (response.data || [])[0] || {};
284
+ return Object.keys(item).map(key => ({
285
+ name: key,
286
+ value: key,
287
+ }));
288
+ },
271
289
  async getEvents() {
272
290
  const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/events' });
273
291
  return (response.data || []).map((item) => ({
@@ -275,6 +293,14 @@ class Imobzi {
275
293
  value: item.id,
276
294
  }));
277
295
  },
296
+ async getEventFields() {
297
+ const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/events', qs: { limit: 1 } });
298
+ const item = (response.data || [])[0] || {};
299
+ return Object.keys(item).map(key => ({
300
+ name: key,
301
+ value: key,
302
+ }));
303
+ },
278
304
  async getIntegrations() {
279
305
  const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/integrations' });
280
306
  return (response.data || []).map((item) => ({
@@ -282,6 +308,14 @@ class Imobzi {
282
308
  value: item.id,
283
309
  }));
284
310
  },
311
+ async getIntegrationFields() {
312
+ const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/integrations', qs: { limit: 1 } });
313
+ const item = (response.data || [])[0] || {};
314
+ return Object.keys(item).map(key => ({
315
+ name: key,
316
+ value: key,
317
+ }));
318
+ },
285
319
  async getUsers() {
286
320
  const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/users' });
287
321
  return (response.data || []).map((item) => ({
@@ -289,6 +323,14 @@ class Imobzi {
289
323
  value: item.id,
290
324
  }));
291
325
  },
326
+ async getUserFields() {
327
+ const response = await this.helpers.requestWithAuthentication.call(this, 'imobziApi', { method: 'GET', url: '/users', qs: { limit: 1 } });
328
+ const item = (response.data || [])[0] || {};
329
+ return Object.keys(item).map(key => ({
330
+ name: key,
331
+ value: key,
332
+ }));
333
+ },
292
334
  },
293
335
  };
294
336
  this.description = {
@@ -550,7 +592,678 @@ class Imobzi {
550
592
  },
551
593
  },
552
594
  },
553
- createFiltersProperty(),
595
+ {
596
+ displayName: 'Filtros',
597
+ name: 'filters',
598
+ type: 'fixedCollection',
599
+ typeOptions: { multipleValues: true },
600
+ placeholder: 'Adicionar filtro',
601
+ default: {},
602
+ displayOptions: {
603
+ show: {
604
+ resource: ['lead'],
605
+ operation: ['getAll'],
606
+ },
607
+ },
608
+ options: [
609
+ {
610
+ name: 'filter',
611
+ displayName: 'Condição',
612
+ values: [
613
+ {
614
+ displayName: 'Campo Name or ID',
615
+ name: 'field',
616
+ type: 'options',
617
+ typeOptions: { loadOptionsMethod: 'getLeadFields' },
618
+ default: '',
619
+ description: 'Campo para filtrar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
620
+ },
621
+ {
622
+ displayName: 'Operador',
623
+ name: 'operator',
624
+ type: 'options',
625
+ options: [
626
+ { name: 'Começa Com', value: 'starts_with' },
627
+ { name: 'Contém', value: 'contains' },
628
+ { name: 'Diferente', value: 'neq' },
629
+ { name: 'Igual', value: 'eq' },
630
+ { name: 'Maior Ou Igual', value: 'gte' },
631
+ { name: 'Maior Que', value: 'gt' },
632
+ { name: 'Menor Ou Igual', value: 'lte' },
633
+ { name: 'Menor Que', value: 'lt' },
634
+ { name: 'Não Contém', value: 'not_contains' },
635
+ { name: 'Termina Com', value: 'ends_with' },
636
+ ],
637
+ default: 'eq',
638
+ description: 'Operador de comparação',
639
+ },
640
+ {
641
+ displayName: 'Valor',
642
+ name: 'value',
643
+ type: 'string',
644
+ default: '',
645
+ description: 'Valor para comparar',
646
+ },
647
+ ],
648
+ },
649
+ ],
650
+ },
651
+ {
652
+ displayName: 'Filtros',
653
+ name: 'filters',
654
+ type: 'fixedCollection',
655
+ typeOptions: { multipleValues: true },
656
+ placeholder: 'Adicionar filtro',
657
+ default: {},
658
+ displayOptions: {
659
+ show: {
660
+ resource: ['property'],
661
+ operation: ['getAll'],
662
+ },
663
+ },
664
+ options: [
665
+ {
666
+ name: 'filter',
667
+ displayName: 'Condição',
668
+ values: [
669
+ {
670
+ displayName: 'Campo Name or ID',
671
+ name: 'field',
672
+ type: 'options',
673
+ typeOptions: { loadOptionsMethod: 'getPropertyFields' },
674
+ default: '',
675
+ description: 'Campo para filtrar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
676
+ },
677
+ {
678
+ displayName: 'Operador',
679
+ name: 'operator',
680
+ type: 'options',
681
+ options: [
682
+ { name: 'Começa Com', value: 'starts_with' },
683
+ { name: 'Contém', value: 'contains' },
684
+ { name: 'Diferente', value: 'neq' },
685
+ { name: 'Igual', value: 'eq' },
686
+ { name: 'Maior Ou Igual', value: 'gte' },
687
+ { name: 'Maior Que', value: 'gt' },
688
+ { name: 'Menor Ou Igual', value: 'lte' },
689
+ { name: 'Menor Que', value: 'lt' },
690
+ { name: 'Não Contém', value: 'not_contains' },
691
+ { name: 'Termina Com', value: 'ends_with' },
692
+ ],
693
+ default: 'eq',
694
+ description: 'Operador de comparação',
695
+ },
696
+ {
697
+ displayName: 'Valor',
698
+ name: 'value',
699
+ type: 'string',
700
+ default: '',
701
+ description: 'Valor para comparar',
702
+ },
703
+ ],
704
+ },
705
+ ],
706
+ },
707
+ {
708
+ displayName: 'Filtros',
709
+ name: 'filters',
710
+ type: 'fixedCollection',
711
+ typeOptions: { multipleValues: true },
712
+ placeholder: 'Adicionar filtro',
713
+ default: {},
714
+ displayOptions: {
715
+ show: {
716
+ resource: ['contact'],
717
+ operation: ['getAll'],
718
+ },
719
+ },
720
+ options: [
721
+ {
722
+ name: 'filter',
723
+ displayName: 'Condição',
724
+ values: [
725
+ {
726
+ displayName: 'Campo Name or ID',
727
+ name: 'field',
728
+ type: 'options',
729
+ typeOptions: { loadOptionsMethod: 'getContactFields' },
730
+ default: '',
731
+ description: 'Campo para filtrar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
732
+ },
733
+ {
734
+ displayName: 'Operador',
735
+ name: 'operator',
736
+ type: 'options',
737
+ options: [
738
+ { name: 'Começa Com', value: 'starts_with' },
739
+ { name: 'Contém', value: 'contains' },
740
+ { name: 'Diferente', value: 'neq' },
741
+ { name: 'Igual', value: 'eq' },
742
+ { name: 'Maior Ou Igual', value: 'gte' },
743
+ { name: 'Maior Que', value: 'gt' },
744
+ { name: 'Menor Ou Igual', value: 'lte' },
745
+ { name: 'Menor Que', value: 'lt' },
746
+ { name: 'Não Contém', value: 'not_contains' },
747
+ { name: 'Termina Com', value: 'ends_with' },
748
+ ],
749
+ default: 'eq',
750
+ description: 'Operador de comparação',
751
+ },
752
+ {
753
+ displayName: 'Valor',
754
+ name: 'value',
755
+ type: 'string',
756
+ default: '',
757
+ description: 'Valor para comparar',
758
+ },
759
+ ],
760
+ },
761
+ ],
762
+ },
763
+ {
764
+ displayName: 'Filtros',
765
+ name: 'filters',
766
+ type: 'fixedCollection',
767
+ typeOptions: { multipleValues: true },
768
+ placeholder: 'Adicionar filtro',
769
+ default: {},
770
+ displayOptions: {
771
+ show: {
772
+ resource: ['contrato'],
773
+ operation: ['getAll'],
774
+ },
775
+ },
776
+ options: [
777
+ {
778
+ name: 'filter',
779
+ displayName: 'Condição',
780
+ values: [
781
+ {
782
+ displayName: 'Campo Name or ID',
783
+ name: 'field',
784
+ type: 'options',
785
+ typeOptions: { loadOptionsMethod: 'getContractFields' },
786
+ default: '',
787
+ description: 'Campo para filtrar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
788
+ },
789
+ {
790
+ displayName: 'Operador',
791
+ name: 'operator',
792
+ type: 'options',
793
+ options: [
794
+ { name: 'Começa Com', value: 'starts_with' },
795
+ { name: 'Contém', value: 'contains' },
796
+ { name: 'Diferente', value: 'neq' },
797
+ { name: 'Igual', value: 'eq' },
798
+ { name: 'Maior Ou Igual', value: 'gte' },
799
+ { name: 'Maior Que', value: 'gt' },
800
+ { name: 'Menor Ou Igual', value: 'lte' },
801
+ { name: 'Menor Que', value: 'lt' },
802
+ { name: 'Não Contém', value: 'not_contains' },
803
+ { name: 'Termina Com', value: 'ends_with' },
804
+ ],
805
+ default: 'eq',
806
+ description: 'Operador de comparação',
807
+ },
808
+ {
809
+ displayName: 'Valor',
810
+ name: 'value',
811
+ type: 'string',
812
+ default: '',
813
+ description: 'Valor para comparar',
814
+ },
815
+ ],
816
+ },
817
+ ],
818
+ },
819
+ {
820
+ displayName: 'Filtros',
821
+ name: 'filters',
822
+ type: 'fixedCollection',
823
+ typeOptions: { multipleValues: true },
824
+ placeholder: 'Adicionar filtro',
825
+ default: {},
826
+ displayOptions: {
827
+ show: {
828
+ resource: ['financeiro'],
829
+ operation: ['getAll'],
830
+ },
831
+ },
832
+ options: [
833
+ {
834
+ name: 'filter',
835
+ displayName: 'Condição',
836
+ values: [
837
+ {
838
+ displayName: 'Campo Name or ID',
839
+ name: 'field',
840
+ type: 'options',
841
+ typeOptions: { loadOptionsMethod: 'getFinancialAccountFields' },
842
+ default: '',
843
+ description: 'Campo para filtrar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
844
+ },
845
+ {
846
+ displayName: 'Operador',
847
+ name: 'operator',
848
+ type: 'options',
849
+ options: [
850
+ { name: 'Começa Com', value: 'starts_with' },
851
+ { name: 'Contém', value: 'contains' },
852
+ { name: 'Diferente', value: 'neq' },
853
+ { name: 'Igual', value: 'eq' },
854
+ { name: 'Maior Ou Igual', value: 'gte' },
855
+ { name: 'Maior Que', value: 'gt' },
856
+ { name: 'Menor Ou Igual', value: 'lte' },
857
+ { name: 'Menor Que', value: 'lt' },
858
+ { name: 'Não Contém', value: 'not_contains' },
859
+ { name: 'Termina Com', value: 'ends_with' },
860
+ ],
861
+ default: 'eq',
862
+ description: 'Operador de comparação',
863
+ },
864
+ {
865
+ displayName: 'Valor',
866
+ name: 'value',
867
+ type: 'string',
868
+ default: '',
869
+ description: 'Valor para comparar',
870
+ },
871
+ ],
872
+ },
873
+ ],
874
+ },
875
+ {
876
+ displayName: 'Filtros',
877
+ name: 'filters',
878
+ type: 'fixedCollection',
879
+ typeOptions: { multipleValues: true },
880
+ placeholder: 'Adicionar filtro',
881
+ default: {},
882
+ displayOptions: {
883
+ show: {
884
+ resource: ['locacao'],
885
+ operation: ['getAll'],
886
+ },
887
+ },
888
+ options: [
889
+ {
890
+ name: 'filter',
891
+ displayName: 'Condição',
892
+ values: [
893
+ {
894
+ displayName: 'Campo Name or ID',
895
+ name: 'field',
896
+ type: 'options',
897
+ typeOptions: { loadOptionsMethod: 'getRentalFields' },
898
+ default: '',
899
+ description: 'Campo para filtrar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
900
+ },
901
+ {
902
+ displayName: 'Operador',
903
+ name: 'operator',
904
+ type: 'options',
905
+ options: [
906
+ { name: 'Começa Com', value: 'starts_with' },
907
+ { name: 'Contém', value: 'contains' },
908
+ { name: 'Diferente', value: 'neq' },
909
+ { name: 'Igual', value: 'eq' },
910
+ { name: 'Maior Ou Igual', value: 'gte' },
911
+ { name: 'Maior Que', value: 'gt' },
912
+ { name: 'Menor Ou Igual', value: 'lte' },
913
+ { name: 'Menor Que', value: 'lt' },
914
+ { name: 'Não Contém', value: 'not_contains' },
915
+ { name: 'Termina Com', value: 'ends_with' },
916
+ ],
917
+ default: 'eq',
918
+ description: 'Operador de comparação',
919
+ },
920
+ {
921
+ displayName: 'Valor',
922
+ name: 'value',
923
+ type: 'string',
924
+ default: '',
925
+ description: 'Valor para comparar',
926
+ },
927
+ ],
928
+ },
929
+ ],
930
+ },
931
+ {
932
+ displayName: 'Filtros',
933
+ name: 'filters',
934
+ type: 'fixedCollection',
935
+ typeOptions: { multipleValues: true },
936
+ placeholder: 'Adicionar filtro',
937
+ default: {},
938
+ displayOptions: {
939
+ show: {
940
+ resource: ['documento'],
941
+ operation: ['getAll'],
942
+ },
943
+ },
944
+ options: [
945
+ {
946
+ name: 'filter',
947
+ displayName: 'Condição',
948
+ values: [
949
+ {
950
+ displayName: 'Campo Name or ID',
951
+ name: 'field',
952
+ type: 'options',
953
+ typeOptions: { loadOptionsMethod: 'getDocumentFields' },
954
+ default: '',
955
+ description: 'Campo para filtrar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
956
+ },
957
+ {
958
+ displayName: 'Operador',
959
+ name: 'operator',
960
+ type: 'options',
961
+ options: [
962
+ { name: 'Começa Com', value: 'starts_with' },
963
+ { name: 'Contém', value: 'contains' },
964
+ { name: 'Diferente', value: 'neq' },
965
+ { name: 'Igual', value: 'eq' },
966
+ { name: 'Maior Ou Igual', value: 'gte' },
967
+ { name: 'Maior Que', value: 'gt' },
968
+ { name: 'Menor Ou Igual', value: 'lte' },
969
+ { name: 'Menor Que', value: 'lt' },
970
+ { name: 'Não Contém', value: 'not_contains' },
971
+ { name: 'Termina Com', value: 'ends_with' },
972
+ ],
973
+ default: 'eq',
974
+ description: 'Operador de comparação',
975
+ },
976
+ {
977
+ displayName: 'Valor',
978
+ name: 'value',
979
+ type: 'string',
980
+ default: '',
981
+ description: 'Valor para comparar',
982
+ },
983
+ ],
984
+ },
985
+ ],
986
+ },
987
+ {
988
+ displayName: 'Filtros',
989
+ name: 'filters',
990
+ type: 'fixedCollection',
991
+ typeOptions: { multipleValues: true },
992
+ placeholder: 'Adicionar filtro',
993
+ default: {},
994
+ displayOptions: {
995
+ show: {
996
+ resource: ['tarefa'],
997
+ operation: ['getAll'],
998
+ },
999
+ },
1000
+ options: [
1001
+ {
1002
+ name: 'filter',
1003
+ displayName: 'Condição',
1004
+ values: [
1005
+ {
1006
+ displayName: 'Campo Name or ID',
1007
+ name: 'field',
1008
+ type: 'options',
1009
+ typeOptions: { loadOptionsMethod: 'getTaskFields' },
1010
+ default: '',
1011
+ description: 'Campo para filtrar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
1012
+ },
1013
+ {
1014
+ displayName: 'Operador',
1015
+ name: 'operator',
1016
+ type: 'options',
1017
+ options: [
1018
+ { name: 'Começa Com', value: 'starts_with' },
1019
+ { name: 'Contém', value: 'contains' },
1020
+ { name: 'Diferente', value: 'neq' },
1021
+ { name: 'Igual', value: 'eq' },
1022
+ { name: 'Maior Ou Igual', value: 'gte' },
1023
+ { name: 'Maior Que', value: 'gt' },
1024
+ { name: 'Menor Ou Igual', value: 'lte' },
1025
+ { name: 'Menor Que', value: 'lt' },
1026
+ { name: 'Não Contém', value: 'not_contains' },
1027
+ { name: 'Termina Com', value: 'ends_with' },
1028
+ ],
1029
+ default: 'eq',
1030
+ description: 'Operador de comparação',
1031
+ },
1032
+ {
1033
+ displayName: 'Valor',
1034
+ name: 'value',
1035
+ type: 'string',
1036
+ default: '',
1037
+ description: 'Valor para comparar',
1038
+ },
1039
+ ],
1040
+ },
1041
+ ],
1042
+ },
1043
+ {
1044
+ displayName: 'Filtros',
1045
+ name: 'filters',
1046
+ type: 'fixedCollection',
1047
+ typeOptions: { multipleValues: true },
1048
+ placeholder: 'Adicionar filtro',
1049
+ default: {},
1050
+ displayOptions: {
1051
+ show: {
1052
+ resource: ['agenda'],
1053
+ operation: ['getAll'],
1054
+ },
1055
+ },
1056
+ options: [
1057
+ {
1058
+ name: 'filter',
1059
+ displayName: 'Condição',
1060
+ values: [
1061
+ {
1062
+ displayName: 'Campo Name or ID',
1063
+ name: 'field',
1064
+ type: 'options',
1065
+ typeOptions: { loadOptionsMethod: 'getAgendaFields' },
1066
+ default: '',
1067
+ description: 'Campo para filtrar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
1068
+ },
1069
+ {
1070
+ displayName: 'Operador',
1071
+ name: 'operator',
1072
+ type: 'options',
1073
+ options: [
1074
+ { name: 'Começa Com', value: 'starts_with' },
1075
+ { name: 'Contém', value: 'contains' },
1076
+ { name: 'Diferente', value: 'neq' },
1077
+ { name: 'Igual', value: 'eq' },
1078
+ { name: 'Maior Ou Igual', value: 'gte' },
1079
+ { name: 'Maior Que', value: 'gt' },
1080
+ { name: 'Menor Ou Igual', value: 'lte' },
1081
+ { name: 'Menor Que', value: 'lt' },
1082
+ { name: 'Não Contém', value: 'not_contains' },
1083
+ { name: 'Termina Com', value: 'ends_with' },
1084
+ ],
1085
+ default: 'eq',
1086
+ description: 'Operador de comparação',
1087
+ },
1088
+ {
1089
+ displayName: 'Valor',
1090
+ name: 'value',
1091
+ type: 'string',
1092
+ default: '',
1093
+ description: 'Valor para comparar',
1094
+ },
1095
+ ],
1096
+ },
1097
+ ],
1098
+ },
1099
+ {
1100
+ displayName: 'Filtros',
1101
+ name: 'filters',
1102
+ type: 'fixedCollection',
1103
+ typeOptions: { multipleValues: true },
1104
+ placeholder: 'Adicionar filtro',
1105
+ default: {},
1106
+ displayOptions: {
1107
+ show: {
1108
+ resource: ['evento'],
1109
+ operation: ['getAll'],
1110
+ },
1111
+ },
1112
+ options: [
1113
+ {
1114
+ name: 'filter',
1115
+ displayName: 'Condição',
1116
+ values: [
1117
+ {
1118
+ displayName: 'Campo Name or ID',
1119
+ name: 'field',
1120
+ type: 'options',
1121
+ typeOptions: { loadOptionsMethod: 'getEventFields' },
1122
+ default: '',
1123
+ description: 'Campo para filtrar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
1124
+ },
1125
+ {
1126
+ displayName: 'Operador',
1127
+ name: 'operator',
1128
+ type: 'options',
1129
+ options: [
1130
+ { name: 'Começa Com', value: 'starts_with' },
1131
+ { name: 'Contém', value: 'contains' },
1132
+ { name: 'Diferente', value: 'neq' },
1133
+ { name: 'Igual', value: 'eq' },
1134
+ { name: 'Maior Ou Igual', value: 'gte' },
1135
+ { name: 'Maior Que', value: 'gt' },
1136
+ { name: 'Menor Ou Igual', value: 'lte' },
1137
+ { name: 'Menor Que', value: 'lt' },
1138
+ { name: 'Não Contém', value: 'not_contains' },
1139
+ { name: 'Termina Com', value: 'ends_with' },
1140
+ ],
1141
+ default: 'eq',
1142
+ description: 'Operador de comparação',
1143
+ },
1144
+ {
1145
+ displayName: 'Valor',
1146
+ name: 'value',
1147
+ type: 'string',
1148
+ default: '',
1149
+ description: 'Valor para comparar',
1150
+ },
1151
+ ],
1152
+ },
1153
+ ],
1154
+ },
1155
+ {
1156
+ displayName: 'Filtros',
1157
+ name: 'filters',
1158
+ type: 'fixedCollection',
1159
+ typeOptions: { multipleValues: true },
1160
+ placeholder: 'Adicionar filtro',
1161
+ default: {},
1162
+ displayOptions: {
1163
+ show: {
1164
+ resource: ['integracao'],
1165
+ operation: ['getAll'],
1166
+ },
1167
+ },
1168
+ options: [
1169
+ {
1170
+ name: 'filter',
1171
+ displayName: 'Condição',
1172
+ values: [
1173
+ {
1174
+ displayName: 'Campo Name or ID',
1175
+ name: 'field',
1176
+ type: 'options',
1177
+ typeOptions: { loadOptionsMethod: 'getIntegrationFields' },
1178
+ default: '',
1179
+ description: 'Campo para filtrar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
1180
+ },
1181
+ {
1182
+ displayName: 'Operador',
1183
+ name: 'operator',
1184
+ type: 'options',
1185
+ options: [
1186
+ { name: 'Começa Com', value: 'starts_with' },
1187
+ { name: 'Contém', value: 'contains' },
1188
+ { name: 'Diferente', value: 'neq' },
1189
+ { name: 'Igual', value: 'eq' },
1190
+ { name: 'Maior Ou Igual', value: 'gte' },
1191
+ { name: 'Maior Que', value: 'gt' },
1192
+ { name: 'Menor Ou Igual', value: 'lte' },
1193
+ { name: 'Menor Que', value: 'lt' },
1194
+ { name: 'Não Contém', value: 'not_contains' },
1195
+ { name: 'Termina Com', value: 'ends_with' },
1196
+ ],
1197
+ default: 'eq',
1198
+ description: 'Operador de comparação',
1199
+ },
1200
+ {
1201
+ displayName: 'Valor',
1202
+ name: 'value',
1203
+ type: 'string',
1204
+ default: '',
1205
+ description: 'Valor para comparar',
1206
+ },
1207
+ ],
1208
+ },
1209
+ ],
1210
+ },
1211
+ {
1212
+ displayName: 'Filtros',
1213
+ name: 'filters',
1214
+ type: 'fixedCollection',
1215
+ typeOptions: { multipleValues: true },
1216
+ placeholder: 'Adicionar filtro',
1217
+ default: {},
1218
+ displayOptions: {
1219
+ show: {
1220
+ resource: ['usuario'],
1221
+ operation: ['getAll'],
1222
+ },
1223
+ },
1224
+ options: [
1225
+ {
1226
+ name: 'filter',
1227
+ displayName: 'Condição',
1228
+ values: [
1229
+ {
1230
+ displayName: 'Campo Name or ID',
1231
+ name: 'field',
1232
+ type: 'options',
1233
+ typeOptions: { loadOptionsMethod: 'getUserFields' },
1234
+ default: '',
1235
+ description: 'Campo para filtrar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
1236
+ },
1237
+ {
1238
+ displayName: 'Operador',
1239
+ name: 'operator',
1240
+ type: 'options',
1241
+ options: [
1242
+ { name: 'Começa Com', value: 'starts_with' },
1243
+ { name: 'Contém', value: 'contains' },
1244
+ { name: 'Diferente', value: 'neq' },
1245
+ { name: 'Igual', value: 'eq' },
1246
+ { name: 'Maior Ou Igual', value: 'gte' },
1247
+ { name: 'Maior Que', value: 'gt' },
1248
+ { name: 'Menor Ou Igual', value: 'lte' },
1249
+ { name: 'Menor Que', value: 'lt' },
1250
+ { name: 'Não Contém', value: 'not_contains' },
1251
+ { name: 'Termina Com', value: 'ends_with' },
1252
+ ],
1253
+ default: 'eq',
1254
+ description: 'Operador de comparação',
1255
+ },
1256
+ {
1257
+ displayName: 'Valor',
1258
+ name: 'value',
1259
+ type: 'string',
1260
+ default: '',
1261
+ description: 'Valor para comparar',
1262
+ },
1263
+ ],
1264
+ },
1265
+ ],
1266
+ },
554
1267
  createCreateFieldsProperty('lead'),
555
1268
  createCreateFieldsProperty('property'),
556
1269
  createCreateFieldsProperty('contact'),
@@ -626,7 +1339,7 @@ class Imobzi {
626
1339
  if (filters && filters.filter && Array.isArray(filters.filter)) {
627
1340
  filters.filter.forEach((filter) => {
628
1341
  if (filter.field && filter.operator && filter.value !== undefined) {
629
- const filterKey = `${filter.field}_${filter.operator}`;
1342
+ const filterKey = `${filter.field}__${filter.operator}`;
630
1343
  query[filterKey] = filter.value;
631
1344
  }
632
1345
  });