n8n-nodes-propstack 0.2.1 → 0.2.2
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 +5 -4
- package/dist/nodes/Propstack/Propstack.node.js +0 -2
- package/dist/nodes/Propstack/Propstack.node.js.map +1 -1
- package/dist/nodes/Propstack/v1/PropstackV1.d.ts +3 -2
- package/dist/nodes/Propstack/v1/PropstackV1.js +12 -7
- package/dist/nodes/Propstack/v1/PropstackV1.js.map +1 -1
- package/dist/nodes/Propstack/v1/constants.d.ts +1 -6
- package/dist/nodes/Propstack/v1/constants.js +1 -6
- package/dist/nodes/Propstack/v1/constants.js.map +1 -1
- package/dist/nodes/Propstack/v1/helpers.d.ts +4 -0
- package/dist/nodes/Propstack/v1/helpers.js +16 -0
- package/dist/nodes/Propstack/v1/helpers.js.map +1 -1
- package/dist/nodes/Propstack/v1/listSearch.d.ts +2 -1
- package/dist/nodes/Propstack/v1/listSearch.js +58 -40
- package/dist/nodes/Propstack/v1/listSearch.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/activities/activityTypesGetAll.js +3 -1
- package/dist/nodes/Propstack/v1/resources/activities/activityTypesGetAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/activities/getAll.d.ts +1 -3
- package/dist/nodes/Propstack/v1/resources/activities/getAll.js +21 -244
- package/dist/nodes/Propstack/v1/resources/activities/getAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/contacts/create.js +26 -46
- package/dist/nodes/Propstack/v1/resources/contacts/create.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/contacts/get.js +7 -17
- package/dist/nodes/Propstack/v1/resources/contacts/get.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/contacts/getAll.js +16 -87
- package/dist/nodes/Propstack/v1/resources/contacts/getAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/contacts/update.js +28 -56
- package/dist/nodes/Propstack/v1/resources/contacts/update.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/deals/create.js +17 -26
- package/dist/nodes/Propstack/v1/resources/deals/create.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/deals/get.js +3 -6
- package/dist/nodes/Propstack/v1/resources/deals/get.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/deals/getAll.js +28 -128
- package/dist/nodes/Propstack/v1/resources/deals/getAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/deals/update.js +15 -26
- package/dist/nodes/Propstack/v1/resources/deals/update.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/documents/create.js +18 -29
- package/dist/nodes/Propstack/v1/resources/documents/create.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/documents/getAll.js +17 -51
- package/dist/nodes/Propstack/v1/resources/documents/getAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/documents/update.js +16 -29
- package/dist/nodes/Propstack/v1/resources/documents/update.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/emails/get.d.ts +1 -3
- package/dist/nodes/Propstack/v1/resources/emails/get.js +0 -3
- package/dist/nodes/Propstack/v1/resources/emails/get.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/emails/index.d.ts +1 -2
- package/dist/nodes/Propstack/v1/resources/emails/index.js +2 -22
- package/dist/nodes/Propstack/v1/resources/emails/index.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/emails/send.d.ts +0 -1
- package/dist/nodes/Propstack/v1/resources/emails/send.js +61 -51
- package/dist/nodes/Propstack/v1/resources/emails/send.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/emails/update.js +9 -33
- package/dist/nodes/Propstack/v1/resources/emails/update.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/events/getAll.js +17 -39
- package/dist/nodes/Propstack/v1/resources/events/getAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/features/create.d.ts +1 -3
- package/dist/nodes/Propstack/v1/resources/features/create.js +1 -50
- package/dist/nodes/Propstack/v1/resources/features/create.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/features/getAll.d.ts +1 -3
- package/dist/nodes/Propstack/v1/resources/features/getAll.js +0 -43
- package/dist/nodes/Propstack/v1/resources/features/getAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/features/index.js +22 -0
- package/dist/nodes/Propstack/v1/resources/features/index.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/features/parentGetAll.d.ts +1 -3
- package/dist/nodes/Propstack/v1/resources/features/parentGetAll.js +3 -35
- package/dist/nodes/Propstack/v1/resources/features/parentGetAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/notes/getAll.d.ts +1 -3
- package/dist/nodes/Propstack/v1/resources/notes/getAll.js +8 -83
- package/dist/nodes/Propstack/v1/resources/notes/getAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/projects/create.d.ts +0 -1
- package/dist/nodes/Propstack/v1/resources/projects/create.js +37 -38
- package/dist/nodes/Propstack/v1/resources/projects/create.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/projects/get.d.ts +0 -1
- package/dist/nodes/Propstack/v1/resources/projects/get.js +0 -1
- package/dist/nodes/Propstack/v1/resources/projects/get.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/projects/getAll.d.ts +0 -1
- package/dist/nodes/Propstack/v1/resources/projects/getAll.js +15 -27
- package/dist/nodes/Propstack/v1/resources/projects/getAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/projects/index.d.ts +1 -2
- package/dist/nodes/Propstack/v1/resources/projects/index.js +2 -11
- package/dist/nodes/Propstack/v1/resources/projects/index.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/projects/update.d.ts +0 -1
- package/dist/nodes/Propstack/v1/resources/projects/update.js +37 -38
- package/dist/nodes/Propstack/v1/resources/projects/update.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/properties/create.d.ts +0 -1
- package/dist/nodes/Propstack/v1/resources/properties/create.js +98 -113
- package/dist/nodes/Propstack/v1/resources/properties/create.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/properties/get.d.ts +0 -1
- package/dist/nodes/Propstack/v1/resources/properties/get.js +5 -9
- package/dist/nodes/Propstack/v1/resources/properties/get.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/properties/getAll.d.ts +0 -1
- package/dist/nodes/Propstack/v1/resources/properties/getAll.js +60 -163
- package/dist/nodes/Propstack/v1/resources/properties/getAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/properties/update.d.ts +0 -1
- package/dist/nodes/Propstack/v1/resources/properties/update.js +40 -67
- package/dist/nodes/Propstack/v1/resources/properties/update.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/searchProfiles/create.d.ts +3 -3
- package/dist/nodes/Propstack/v1/resources/searchProfiles/create.js +40 -278
- package/dist/nodes/Propstack/v1/resources/searchProfiles/create.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/searchProfiles/delete.d.ts +1 -3
- package/dist/nodes/Propstack/v1/resources/searchProfiles/delete.js +0 -19
- package/dist/nodes/Propstack/v1/resources/searchProfiles/delete.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/searchProfiles/getAll.d.ts +1 -3
- package/dist/nodes/Propstack/v1/resources/searchProfiles/getAll.js +15 -62
- package/dist/nodes/Propstack/v1/resources/searchProfiles/getAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/searchProfiles/index.js +180 -252
- package/dist/nodes/Propstack/v1/resources/searchProfiles/index.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/searchProfiles/update.d.ts +1 -3
- package/dist/nodes/Propstack/v1/resources/searchProfiles/update.js +4 -273
- package/dist/nodes/Propstack/v1/resources/searchProfiles/update.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/snippets/getAll.d.ts +2 -0
- package/dist/nodes/Propstack/v1/resources/snippets/getAll.js +24 -0
- package/dist/nodes/Propstack/v1/resources/snippets/getAll.js.map +1 -0
- package/dist/nodes/Propstack/v1/resources/snippets/index.d.ts +4 -0
- package/dist/nodes/Propstack/v1/resources/snippets/index.js +73 -0
- package/dist/nodes/Propstack/v1/resources/snippets/index.js.map +1 -0
- package/dist/nodes/Propstack/v1/resources/tasks/create.d.ts +1 -3
- package/dist/nodes/Propstack/v1/resources/tasks/create.js +25 -221
- package/dist/nodes/Propstack/v1/resources/tasks/create.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/tasks/getAll.d.ts +1 -1
- package/dist/nodes/Propstack/v1/resources/tasks/getAll.js +28 -38
- package/dist/nodes/Propstack/v1/resources/tasks/getAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/tasks/update.d.ts +1 -1
- package/dist/nodes/Propstack/v1/resources/tasks/update.js +26 -73
- package/dist/nodes/Propstack/v1/resources/tasks/update.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/teams/getAll.d.ts +1 -3
- package/dist/nodes/Propstack/v1/resources/teams/getAll.js +4 -51
- package/dist/nodes/Propstack/v1/resources/teams/getAll.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/teams/index.d.ts +0 -4
- package/dist/nodes/Propstack/v1/resources/teams/index.js +1 -214
- package/dist/nodes/Propstack/v1/resources/teams/index.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/webhooks/create.d.ts +1 -1
- package/dist/nodes/Propstack/v1/resources/webhooks/create.js +5 -11
- package/dist/nodes/Propstack/v1/resources/webhooks/create.js.map +1 -1
- package/dist/nodes/Propstack/v1/resources/webhooks/getAll.d.ts +1 -1
- package/dist/nodes/Propstack/v1/resources/webhooks/getAll.js +7 -6
- package/dist/nodes/Propstack/v1/resources/webhooks/getAll.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/nodes/Propstack/v1/resources/emails/getAll.d.ts +0 -4
- package/dist/nodes/Propstack/v1/resources/emails/getAll.js +0 -104
- package/dist/nodes/Propstack/v1/resources/emails/getAll.js.map +0 -1
- package/dist/nodes/Propstack/v1/resources/projects/delete.d.ts +0 -4
- package/dist/nodes/Propstack/v1/resources/projects/delete.js +0 -17
- package/dist/nodes/Propstack/v1/resources/projects/delete.js.map +0 -1
- package/dist/nodes/Propstack/v1/resources/teams/create.d.ts +0 -4
- package/dist/nodes/Propstack/v1/resources/teams/create.js +0 -133
- package/dist/nodes/Propstack/v1/resources/teams/create.js.map +0 -1
- package/dist/nodes/Propstack/v1/resources/teams/delete.d.ts +0 -4
- package/dist/nodes/Propstack/v1/resources/teams/delete.js +0 -17
- package/dist/nodes/Propstack/v1/resources/teams/delete.js.map +0 -1
- package/dist/nodes/Propstack/v1/resources/teams/get.d.ts +0 -4
- package/dist/nodes/Propstack/v1/resources/teams/get.js +0 -17
- package/dist/nodes/Propstack/v1/resources/teams/get.js.map +0 -1
- package/dist/nodes/Propstack/v1/resources/teams/update.d.ts +0 -4
- package/dist/nodes/Propstack/v1/resources/teams/update.js +0 -45
- package/dist/nodes/Propstack/v1/resources/teams/update.js.map +0 -1
|
@@ -1,292 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SEARCH_PROFILE_FIELD_MAPPING = void 0;
|
|
4
4
|
exports.searchProfilesCreate = searchProfilesCreate;
|
|
5
5
|
const constants_1 = require("../../constants");
|
|
6
6
|
const helpers_1 = require("../../helpers");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const SEARCH_PROFILE_FIELD_MAPPING = {
|
|
8
|
+
priceFrom: "price_from",
|
|
9
|
+
priceTo: "price_to",
|
|
10
|
+
baseRentFrom: "base_rent_from",
|
|
11
|
+
baseRentTo: "base_rent_to",
|
|
12
|
+
livingSpaceFrom: "living_space_from",
|
|
13
|
+
livingSpaceTo: "living_space_to",
|
|
14
|
+
numberOfRoomsFrom: "number_of_rooms_from",
|
|
15
|
+
numberOfRoomsTo: "number_of_rooms_to",
|
|
16
|
+
numberOfBedroomsFrom: "number_of_bedrooms_from",
|
|
17
|
+
numberOfBedroomsTo: "number_of_bedrooms_to",
|
|
18
|
+
constructionYearFrom: "construction_year_from",
|
|
19
|
+
constructionYearTo: "construction_year_to",
|
|
20
|
+
floorFrom: "floor_from",
|
|
21
|
+
floorTo: "floor_to",
|
|
22
|
+
plotAreaFrom: "plot_area_from",
|
|
23
|
+
plotAreaTo: "plot_area_to",
|
|
24
|
+
marketingType: "marketing_type",
|
|
25
|
+
builtInKitchen: "built_in_kitchen",
|
|
26
|
+
rsTypes: (0, helpers_1.splitCsv)("rs_types"),
|
|
27
|
+
rsCategories: (0, helpers_1.splitCsv)("rs_categories"),
|
|
28
|
+
cities: "cities",
|
|
29
|
+
regions: "regions",
|
|
30
|
+
note: "note",
|
|
31
|
+
active: "active",
|
|
32
|
+
balcony: "balcony",
|
|
33
|
+
garden: "garden",
|
|
34
|
+
lift: "lift",
|
|
35
|
+
cellar: "cellar",
|
|
36
|
+
rented: "rented",
|
|
37
|
+
lat: "lat",
|
|
38
|
+
lng: "lng",
|
|
39
|
+
radius: "radius",
|
|
40
|
+
groupIds: (0, helpers_1.splitCsv)("group_ids"),
|
|
10
41
|
};
|
|
11
|
-
exports.
|
|
12
|
-
{
|
|
13
|
-
displayName: "Client ID",
|
|
14
|
-
name: "clientId",
|
|
15
|
-
type: "string",
|
|
16
|
-
required: true,
|
|
17
|
-
default: "",
|
|
18
|
-
displayOptions: {
|
|
19
|
-
show: showForSearchProfilesCreate,
|
|
20
|
-
},
|
|
21
|
-
description: "Contact ID for the search profile",
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
displayName: "Additional Fields",
|
|
25
|
-
name: "additionalFields",
|
|
26
|
-
type: "collection",
|
|
27
|
-
placeholder: "Add Field",
|
|
28
|
-
default: {},
|
|
29
|
-
displayOptions: {
|
|
30
|
-
show: showForSearchProfilesCreate,
|
|
31
|
-
},
|
|
32
|
-
options: [
|
|
33
|
-
{
|
|
34
|
-
displayName: "Active",
|
|
35
|
-
name: "active",
|
|
36
|
-
type: "boolean",
|
|
37
|
-
default: true,
|
|
38
|
-
description: "Whether the search profile is active",
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
displayName: "Balcony",
|
|
42
|
-
name: "balcony",
|
|
43
|
-
type: "boolean",
|
|
44
|
-
default: false,
|
|
45
|
-
description: "Whether the property has a balcony",
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
displayName: "Base Rent From",
|
|
49
|
-
name: "baseRentFrom",
|
|
50
|
-
type: "number",
|
|
51
|
-
default: 0,
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
displayName: "Base Rent To",
|
|
55
|
-
name: "baseRentTo",
|
|
56
|
-
type: "number",
|
|
57
|
-
default: 0,
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
displayName: "Built-in Kitchen",
|
|
61
|
-
name: "builtInKitchen",
|
|
62
|
-
type: "boolean",
|
|
63
|
-
default: false,
|
|
64
|
-
description: "Whether the property has a built-in kitchen",
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
displayName: "Cellar",
|
|
68
|
-
name: "cellar",
|
|
69
|
-
type: "boolean",
|
|
70
|
-
default: false,
|
|
71
|
-
description: "Whether the property has a cellar",
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
displayName: "Cities",
|
|
75
|
-
name: "cities",
|
|
76
|
-
type: "string",
|
|
77
|
-
default: "",
|
|
78
|
-
description: "Comma-separated list of cities",
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
displayName: "Construction Year From",
|
|
82
|
-
name: "constructionYearFrom",
|
|
83
|
-
type: "number",
|
|
84
|
-
default: 0,
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
displayName: "Construction Year To",
|
|
88
|
-
name: "constructionYearTo",
|
|
89
|
-
type: "number",
|
|
90
|
-
default: 0,
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
displayName: "Floor From",
|
|
94
|
-
name: "floorFrom",
|
|
95
|
-
type: "number",
|
|
96
|
-
default: 0,
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
displayName: "Floor To",
|
|
100
|
-
name: "floorTo",
|
|
101
|
-
type: "number",
|
|
102
|
-
default: 0,
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
displayName: "Garden",
|
|
106
|
-
name: "garden",
|
|
107
|
-
type: "boolean",
|
|
108
|
-
default: false,
|
|
109
|
-
description: "Whether the property has a garden",
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
displayName: "Lift",
|
|
113
|
-
name: "lift",
|
|
114
|
-
type: "boolean",
|
|
115
|
-
default: false,
|
|
116
|
-
description: "Whether the property has a lift",
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
displayName: "Living Space From",
|
|
120
|
-
name: "livingSpaceFrom",
|
|
121
|
-
type: "number",
|
|
122
|
-
default: 0,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
displayName: "Living Space To",
|
|
126
|
-
name: "livingSpaceTo",
|
|
127
|
-
type: "number",
|
|
128
|
-
default: 0,
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
displayName: "Marketing Type",
|
|
132
|
-
name: "marketingType",
|
|
133
|
-
type: "options",
|
|
134
|
-
default: "BUY",
|
|
135
|
-
options: [
|
|
136
|
-
{ name: "Buy", value: "BUY" },
|
|
137
|
-
{ name: "Rent", value: "RENT" },
|
|
138
|
-
],
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
displayName: "Note",
|
|
142
|
-
name: "note",
|
|
143
|
-
type: "string",
|
|
144
|
-
default: "",
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
displayName: "Number of Rooms From",
|
|
148
|
-
name: "numberOfRoomsFrom",
|
|
149
|
-
type: "number",
|
|
150
|
-
default: 0,
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
displayName: "Number of Rooms To",
|
|
154
|
-
name: "numberOfRoomsTo",
|
|
155
|
-
type: "number",
|
|
156
|
-
default: 0,
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
displayName: "Price From",
|
|
160
|
-
name: "priceFrom",
|
|
161
|
-
type: "number",
|
|
162
|
-
default: 0,
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
displayName: "Price To",
|
|
166
|
-
name: "priceTo",
|
|
167
|
-
type: "number",
|
|
168
|
-
default: 0,
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
displayName: "Real Estate Categories",
|
|
172
|
-
name: "rsCategories",
|
|
173
|
-
type: "string",
|
|
174
|
-
default: "",
|
|
175
|
-
description: "Comma-separated list of categories",
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
displayName: "Real Estate Types",
|
|
179
|
-
name: "rsTypes",
|
|
180
|
-
type: "string",
|
|
181
|
-
default: "",
|
|
182
|
-
description: "Comma-separated list of types",
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
displayName: "Regions",
|
|
186
|
-
name: "regions",
|
|
187
|
-
type: "string",
|
|
188
|
-
default: "",
|
|
189
|
-
description: "Comma-separated list of regions",
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
displayName: "Rented",
|
|
193
|
-
name: "rented",
|
|
194
|
-
type: "boolean",
|
|
195
|
-
default: false,
|
|
196
|
-
description: "Whether the property is currently rented",
|
|
197
|
-
},
|
|
198
|
-
],
|
|
199
|
-
},
|
|
200
|
-
];
|
|
201
|
-
function buildSearchProfilesCreateBody() {
|
|
202
|
-
const savedQuery = {};
|
|
203
|
-
const clientId = (0, helpers_1.extractResourceLocatorValue)(this.getNodeParameter("clientId", 0));
|
|
204
|
-
savedQuery.client_id = parseInt(clientId, 10);
|
|
205
|
-
const options = this.getNodeParameter("additionalFields", 0);
|
|
206
|
-
if (options) {
|
|
207
|
-
if (options.active !== undefined) {
|
|
208
|
-
savedQuery.active = options.active;
|
|
209
|
-
}
|
|
210
|
-
if (options.baseRentFrom) {
|
|
211
|
-
savedQuery.base_rent_from = options.baseRentFrom;
|
|
212
|
-
}
|
|
213
|
-
if (options.baseRentTo) {
|
|
214
|
-
savedQuery.base_rent_to = options.baseRentTo;
|
|
215
|
-
}
|
|
216
|
-
if (options.balcony !== undefined) {
|
|
217
|
-
savedQuery.balcony = options.balcony;
|
|
218
|
-
}
|
|
219
|
-
if (options.builtInKitchen !== undefined) {
|
|
220
|
-
savedQuery.built_in_kitchen = options.builtInKitchen;
|
|
221
|
-
}
|
|
222
|
-
if (options.cellar !== undefined) {
|
|
223
|
-
savedQuery.cellar = options.cellar;
|
|
224
|
-
}
|
|
225
|
-
if (options.cities)
|
|
226
|
-
savedQuery.cities = options.cities;
|
|
227
|
-
if (options.constructionYearFrom) {
|
|
228
|
-
savedQuery.construction_year_from = options.constructionYearFrom;
|
|
229
|
-
}
|
|
230
|
-
if (options.constructionYearTo) {
|
|
231
|
-
savedQuery.construction_year_to = options.constructionYearTo;
|
|
232
|
-
}
|
|
233
|
-
if (options.floorFrom) {
|
|
234
|
-
savedQuery.floor_from = options.floorFrom;
|
|
235
|
-
}
|
|
236
|
-
if (options.floorTo) {
|
|
237
|
-
savedQuery.floor_to = options.floorTo;
|
|
238
|
-
}
|
|
239
|
-
if (options.garden !== undefined) {
|
|
240
|
-
savedQuery.garden = options.garden;
|
|
241
|
-
}
|
|
242
|
-
if (options.livingSpaceFrom) {
|
|
243
|
-
savedQuery.living_space_from = options.livingSpaceFrom;
|
|
244
|
-
}
|
|
245
|
-
if (options.livingSpaceTo) {
|
|
246
|
-
savedQuery.living_space_to = options.livingSpaceTo;
|
|
247
|
-
}
|
|
248
|
-
if (options.lift !== undefined) {
|
|
249
|
-
savedQuery.lift = options.lift;
|
|
250
|
-
}
|
|
251
|
-
if (options.marketingType) {
|
|
252
|
-
savedQuery.marketing_type = options.marketingType;
|
|
253
|
-
}
|
|
254
|
-
if (options.note)
|
|
255
|
-
savedQuery.note = options.note;
|
|
256
|
-
if (options.numberOfRoomsFrom) {
|
|
257
|
-
savedQuery.number_of_rooms_from = options.numberOfRoomsFrom;
|
|
258
|
-
}
|
|
259
|
-
if (options.numberOfRoomsTo) {
|
|
260
|
-
savedQuery.number_of_rooms_to = options.numberOfRoomsTo;
|
|
261
|
-
}
|
|
262
|
-
if (options.priceFrom) {
|
|
263
|
-
savedQuery.price_from = options.priceFrom;
|
|
264
|
-
}
|
|
265
|
-
if (options.priceTo) {
|
|
266
|
-
savedQuery.price_to = options.priceTo;
|
|
267
|
-
}
|
|
268
|
-
if (options.rsCategories) {
|
|
269
|
-
savedQuery.rs_categories = options.rsCategories;
|
|
270
|
-
}
|
|
271
|
-
if (options.rsTypes) {
|
|
272
|
-
savedQuery.rs_types = options.rsTypes;
|
|
273
|
-
}
|
|
274
|
-
if (options.regions)
|
|
275
|
-
savedQuery.regions = options.regions;
|
|
276
|
-
if (options.rented !== undefined) {
|
|
277
|
-
savedQuery.rented = options.rented;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
return { saved_query: savedQuery };
|
|
281
|
-
}
|
|
42
|
+
exports.SEARCH_PROFILE_FIELD_MAPPING = SEARCH_PROFILE_FIELD_MAPPING;
|
|
282
43
|
async function searchProfilesCreate() {
|
|
283
|
-
const
|
|
44
|
+
const clientId = (0, helpers_1.extractResourceLocatorValue)(this.getNodeParameter("clientId", 0));
|
|
45
|
+
const additionalFields = this.getNodeParameter("additionalFields", 0);
|
|
46
|
+
const body = (0, helpers_1.buildQs)(additionalFields, SEARCH_PROFILE_FIELD_MAPPING);
|
|
284
47
|
const response = await helpers_1.propstackRequest.call(this, {
|
|
285
48
|
method: "POST",
|
|
286
49
|
url: constants_1.API_ENDPOINTS.SEARCH_PROFILES_CREATE,
|
|
287
|
-
body,
|
|
50
|
+
body: { saved_query: { client_id: parseInt(clientId, 10), ...body } },
|
|
288
51
|
});
|
|
289
52
|
return this.helpers.returnJsonArray(Array.isArray(response) ? response : [response]);
|
|
290
53
|
}
|
|
291
|
-
exports.default = exports.searchProfilesCreateDescription;
|
|
292
54
|
//# sourceMappingURL=create.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/searchProfiles/create.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/searchProfiles/create.ts"],"names":[],"mappings":";;;AAoDA,oDAsBC;AApED,+CAAgD;AAChD,2CAKuB;AAEvB,MAAM,4BAA4B,GAA6E;IAC7G,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,UAAU;IACnB,YAAY,EAAE,gBAAgB;IAC9B,UAAU,EAAE,cAAc;IAC1B,eAAe,EAAE,mBAAmB;IACpC,aAAa,EAAE,iBAAiB;IAChC,iBAAiB,EAAE,sBAAsB;IACzC,eAAe,EAAE,oBAAoB;IACrC,oBAAoB,EAAE,yBAAyB;IAC/C,kBAAkB,EAAE,uBAAuB;IAC3C,oBAAoB,EAAE,wBAAwB;IAC9C,kBAAkB,EAAE,sBAAsB;IAC1C,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,UAAU;IACnB,YAAY,EAAE,gBAAgB;IAC9B,UAAU,EAAE,cAAc;IAC1B,aAAa,EAAE,gBAAgB;IAC/B,cAAc,EAAE,kBAAkB;IAClC,OAAO,EAAE,IAAA,kBAAQ,EAAC,UAAU,CAAC;IAC7B,YAAY,EAAE,IAAA,kBAAQ,EAAC,eAAe,CAAC;IACvC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,IAAA,kBAAQ,EAAC,WAAW,CAAC;CAChC,CAAC;AAEO,oEAA4B;AAE9B,KAAK,UAAU,oBAAoB;IAGxC,MAAM,QAAQ,GAAG,IAAA,qCAA2B,EAC1C,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAC,CACrC,CAAC;IACF,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAC5C,kBAAkB,EAClB,CAAC,CACa,CAAC;IAEjB,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,gBAAgB,EAAE,4BAA4B,CAAC,CAAC;IAErE,MAAM,QAAQ,GAAG,MAAM,0BAAgB,CAAC,IAAI,CAAC,IAAI,EAAE;QACjD,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,yBAAa,CAAC,sBAAsB;QACzC,IAAI,EAAE,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,EAAE;KACtE,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CACjC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAChD,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import type { IExecuteFunctions, INodeExecutionData
|
|
2
|
-
export declare const searchProfilesDeleteDescription: INodeProperties[];
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData } from "n8n-workflow";
|
|
3
2
|
export declare function searchProfilesDelete(this: IExecuteFunctions): Promise<INodeExecutionData[]>;
|
|
4
|
-
export default searchProfilesDeleteDescription;
|
|
@@ -1,26 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.searchProfilesDeleteDescription = void 0;
|
|
4
3
|
exports.searchProfilesDelete = searchProfilesDelete;
|
|
5
4
|
const constants_1 = require("../../constants");
|
|
6
5
|
const helpers_1 = require("../../helpers");
|
|
7
|
-
const showForSearchProfilesDelete = {
|
|
8
|
-
operation: ["delete"],
|
|
9
|
-
resource: ["searchProfiles"],
|
|
10
|
-
};
|
|
11
|
-
exports.searchProfilesDeleteDescription = [
|
|
12
|
-
{
|
|
13
|
-
displayName: "Search Profile ID",
|
|
14
|
-
name: "profileId",
|
|
15
|
-
type: "string",
|
|
16
|
-
required: true,
|
|
17
|
-
default: "",
|
|
18
|
-
displayOptions: {
|
|
19
|
-
show: showForSearchProfilesDelete,
|
|
20
|
-
},
|
|
21
|
-
description: "The ID of the search profile to delete",
|
|
22
|
-
},
|
|
23
|
-
];
|
|
24
6
|
async function searchProfilesDelete() {
|
|
25
7
|
const profileId = (0, helpers_1.extractResourceLocatorValue)(this.getNodeParameter("profileId", 0));
|
|
26
8
|
await helpers_1.propstackRequest.call(this, {
|
|
@@ -29,5 +11,4 @@ async function searchProfilesDelete() {
|
|
|
29
11
|
});
|
|
30
12
|
return [{ json: { deleted: true }, pairedItem: { item: 0 } }];
|
|
31
13
|
}
|
|
32
|
-
exports.default = exports.searchProfilesDeleteDescription;
|
|
33
14
|
//# sourceMappingURL=delete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/searchProfiles/delete.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/searchProfiles/delete.ts"],"names":[],"mappings":";;AAQA,oDAaC;AAhBD,+CAAgD;AAChD,2CAA8E;AAEvE,KAAK,UAAU,oBAAoB;IAGxC,MAAM,SAAS,GAAG,IAAA,qCAA2B,EAC3C,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAC,CACtC,CAAC;IAEF,MAAM,0BAAgB,CAAC,IAAI,CAAC,IAAI,EAAE;QAChC,MAAM,EAAE,QAAQ;QAChB,GAAG,EAAE,yBAAa,CAAC,sBAAsB,CAAC,SAAS,CAAC;KACrD,CAAC,CAAC;IAEH,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import type { IExecuteFunctions, INodeExecutionData
|
|
2
|
-
export declare const searchProfilesGetAllDescription: INodeProperties[];
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData } from "n8n-workflow";
|
|
3
2
|
export declare function searchProfilesGetAll(this: IExecuteFunctions): Promise<INodeExecutionData[]>;
|
|
4
|
-
export default searchProfilesGetAllDescription;
|
|
@@ -1,65 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.searchProfilesGetAllDescription = void 0;
|
|
4
3
|
exports.searchProfilesGetAll = searchProfilesGetAll;
|
|
5
4
|
const constants_1 = require("../../constants");
|
|
6
5
|
const helpers_1 = require("../../helpers");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
resource: ["searchProfiles"],
|
|
6
|
+
const GETALL_FIELD_MAPPING = {
|
|
7
|
+
clientId: (0, helpers_1.toInt)("client"),
|
|
10
8
|
};
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
show: showForSearchProfilesGetAll,
|
|
19
|
-
},
|
|
20
|
-
description: "Whether to return all results or only up to a given limit",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
displayName: "Limit",
|
|
24
|
-
name: "limit",
|
|
25
|
-
type: "number",
|
|
26
|
-
default: 50,
|
|
27
|
-
displayOptions: {
|
|
28
|
-
show: {
|
|
29
|
-
...showForSearchProfilesGetAll,
|
|
30
|
-
returnAll: [false],
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
description: "Max number of results to return",
|
|
34
|
-
typeOptions: {
|
|
35
|
-
minValue: 1,
|
|
36
|
-
maxValue: 100,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
displayName: "Additional Fields",
|
|
41
|
-
name: "additionalFields",
|
|
42
|
-
type: "collection",
|
|
43
|
-
placeholder: "Add Field",
|
|
44
|
-
default: {},
|
|
45
|
-
displayOptions: {
|
|
46
|
-
show: showForSearchProfilesGetAll,
|
|
47
|
-
},
|
|
48
|
-
options: [
|
|
49
|
-
{
|
|
50
|
-
displayName: "Client ID",
|
|
51
|
-
name: "clientId",
|
|
52
|
-
type: "string",
|
|
53
|
-
default: "",
|
|
54
|
-
description: "Filter by contact ID",
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
},
|
|
58
|
-
];
|
|
9
|
+
function extractData(response) {
|
|
10
|
+
if (response && typeof response === "object" && "data" in response) {
|
|
11
|
+
const data = response.data;
|
|
12
|
+
return Array.isArray(data) ? data : [];
|
|
13
|
+
}
|
|
14
|
+
return Array.isArray(response) ? response : [response];
|
|
15
|
+
}
|
|
59
16
|
async function searchProfilesGetAll() {
|
|
60
17
|
const returnAll = this.getNodeParameter("returnAll", 0);
|
|
61
18
|
const limit = this.getNodeParameter("limit", 0, 50);
|
|
62
|
-
const
|
|
19
|
+
const additionalFields = this.getNodeParameter("additionalFields", 0);
|
|
20
|
+
const extraQs = (0, helpers_1.buildQs)(additionalFields, GETALL_FIELD_MAPPING);
|
|
63
21
|
if (returnAll) {
|
|
64
22
|
let allResults = [];
|
|
65
23
|
let currentPage = 1;
|
|
@@ -68,16 +26,14 @@ async function searchProfilesGetAll() {
|
|
|
68
26
|
const qs = {
|
|
69
27
|
page: currentPage,
|
|
70
28
|
per: 100,
|
|
29
|
+
...extraQs,
|
|
71
30
|
};
|
|
72
|
-
if (options === null || options === void 0 ? void 0 : options.clientId) {
|
|
73
|
-
qs.client = parseInt(options.clientId, 10);
|
|
74
|
-
}
|
|
75
31
|
const response = await helpers_1.propstackRequest.call(this, {
|
|
76
32
|
method: "GET",
|
|
77
33
|
url: constants_1.API_ENDPOINTS.SEARCH_PROFILES_GET_ALL,
|
|
78
34
|
qs,
|
|
79
35
|
});
|
|
80
|
-
const results =
|
|
36
|
+
const results = extractData(response);
|
|
81
37
|
allResults = allResults.concat(results);
|
|
82
38
|
if (results.length < 100) {
|
|
83
39
|
hasMore = false;
|
|
@@ -91,16 +47,13 @@ async function searchProfilesGetAll() {
|
|
|
91
47
|
const qs = {
|
|
92
48
|
page: 1,
|
|
93
49
|
per: limit,
|
|
50
|
+
...extraQs,
|
|
94
51
|
};
|
|
95
|
-
if (options === null || options === void 0 ? void 0 : options.clientId) {
|
|
96
|
-
qs.client = parseInt(options.clientId, 10);
|
|
97
|
-
}
|
|
98
52
|
const response = await helpers_1.propstackRequest.call(this, {
|
|
99
53
|
method: "GET",
|
|
100
54
|
url: constants_1.API_ENDPOINTS.SEARCH_PROFILES_GET_ALL,
|
|
101
55
|
qs,
|
|
102
56
|
});
|
|
103
|
-
return this.helpers.returnJsonArray(
|
|
57
|
+
return this.helpers.returnJsonArray(extractData(response));
|
|
104
58
|
}
|
|
105
|
-
exports.default = exports.searchProfilesGetAllDescription;
|
|
106
59
|
//# sourceMappingURL=getAll.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/searchProfiles/getAll.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/searchProfiles/getAll.ts"],"names":[],"mappings":";;AAqBA,oDAwDC;AAvED,+CAAgD;AAChD,2CAAiE;AAEjE,MAAM,oBAAoB,GAA6E;IACrG,QAAQ,EAAE,IAAA,eAAK,EAAC,QAAQ,CAAC;CAC1B,CAAC;AAEF,SAAS,WAAW,CAAC,QAAiB;IACpC,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,MAAM,IAAK,QAAwB,EAAE,CAAC;QACpF,MAAM,IAAI,GAAI,QAAwB,CAAC,IAAI,CAAC;QAC5C,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAqB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAyB,CAAC,CAAC,CAAC,CAAC,QAAuB,CAAC,CAAC;AACzF,CAAC;AAEM,KAAK,UAAU,oBAAoB;IAGxC,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAY,CAAC;IACnE,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAW,CAAC;IAC9D,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAC5C,kBAAkB,EAClB,CAAC,CACa,CAAC;IAEjB,MAAM,OAAO,GAAG,IAAA,iBAAO,EAAC,gBAAgB,EAAE,oBAAoB,CAAC,CAAC;IAEhE,IAAI,SAAS,EAAE,CAAC;QACd,IAAI,UAAU,GAAkB,EAAE,CAAC;QACnC,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,IAAI,OAAO,GAAG,IAAI,CAAC;QAEnB,OAAO,OAAO,EAAE,CAAC;YACf,MAAM,EAAE,GAAgB;gBACtB,IAAI,EAAE,WAAW;gBACjB,GAAG,EAAE,GAAG;gBACR,GAAG,OAAO;aACX,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,0BAAgB,CAAC,IAAI,CAAC,IAAI,EAAE;gBACjD,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,yBAAa,CAAC,uBAAuB;gBAC1C,EAAE;aACH,CAAC,CAAC;YAEH,MAAM,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;YACtC,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAExC,IAAI,OAAO,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;gBACzB,OAAO,GAAG,KAAK,CAAC;YAClB,CAAC;iBAAM,CAAC;gBACN,WAAW,EAAE,CAAC;YAChB,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,EAAE,GAAgB;QACtB,IAAI,EAAE,CAAC;QACP,GAAG,EAAE,KAAK;QACV,GAAG,OAAO;KACX,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,0BAAgB,CAAC,IAAI,CAAC,IAAI,EAAE;QACjD,MAAM,EAAE,KAAK;QACb,GAAG,EAAE,yBAAa,CAAC,uBAAuB;QAC1C,EAAE;KACH,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC7D,CAAC"}
|