n8n-nodes-propstack 0.2.0 → 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/PropstackTrigger.node.d.ts +1 -8
- package/dist/nodes/Propstack/PropstackTrigger.node.js +75 -92
- package/dist/nodes/Propstack/PropstackTrigger.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,41 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.featuresParentGetAllDescription = void 0;
|
|
4
3
|
exports.featuresParentGetAll = featuresParentGetAll;
|
|
5
4
|
const constants_1 = require("../../constants");
|
|
6
5
|
const helpers_1 = require("../../helpers");
|
|
7
|
-
const showForFeaturesParentGetAll = {
|
|
8
|
-
operation: ["getParentFeatures"],
|
|
9
|
-
resource: ["features"],
|
|
10
|
-
};
|
|
11
|
-
exports.featuresParentGetAllDescription = [
|
|
12
|
-
{
|
|
13
|
-
displayName: "Entity",
|
|
14
|
-
name: "entity",
|
|
15
|
-
type: "options",
|
|
16
|
-
required: true,
|
|
17
|
-
default: "for_clients",
|
|
18
|
-
displayOptions: {
|
|
19
|
-
show: showForFeaturesParentGetAll,
|
|
20
|
-
},
|
|
21
|
-
options: [
|
|
22
|
-
{ name: "Activities", value: "for_activities" },
|
|
23
|
-
{ name: "Clients", value: "for_clients" },
|
|
24
|
-
{ name: "Properties", value: "for_properties" },
|
|
25
|
-
],
|
|
26
|
-
description: "Entity type to retrieve parent features for",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
displayName: "Include Child Features",
|
|
30
|
-
name: "includeGroups",
|
|
31
|
-
type: "boolean",
|
|
32
|
-
default: false,
|
|
33
|
-
displayOptions: {
|
|
34
|
-
show: showForFeaturesParentGetAll,
|
|
35
|
-
},
|
|
36
|
-
description: "Whether to include child features",
|
|
37
|
-
},
|
|
38
|
-
];
|
|
39
6
|
async function featuresParentGetAll() {
|
|
40
7
|
const entity = this.getNodeParameter("entity", 0);
|
|
41
8
|
const includeGroups = this.getNodeParameter("includeGroups", 0);
|
|
@@ -50,7 +17,8 @@ async function featuresParentGetAll() {
|
|
|
50
17
|
url: constants_1.API_ENDPOINTS.FEATURES_PARENT_GET_ALL,
|
|
51
18
|
qs,
|
|
52
19
|
});
|
|
53
|
-
|
|
20
|
+
const body = response;
|
|
21
|
+
const data = Array.isArray(body.data) ? body.data : Array.isArray(response) ? response : [response];
|
|
22
|
+
return this.helpers.returnJsonArray(data);
|
|
54
23
|
}
|
|
55
|
-
exports.default = exports.featuresParentGetAllDescription;
|
|
56
24
|
//# sourceMappingURL=parentGetAll.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parentGetAll.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/features/parentGetAll.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parentGetAll.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/features/parentGetAll.ts"],"names":[],"mappings":";;AASA,oDAwBC;AA3BD,+CAAgD;AAChD,2CAAiD;AAE1C,KAAK,UAAU,oBAAoB;IAGxC,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAW,CAAC;IAC5D,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC,CAAY,CAAC;IAE3E,MAAM,EAAE,GAAgB;QACtB,MAAM;KACP,CAAC;IAEF,IAAI,aAAa,EAAE,CAAC;QAClB,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC;IACxB,CAAC;IAED,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,MAAM,IAAI,GAAG,QAAuB,CAAC;IACrC,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAEpG,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import type { IExecuteFunctions, INodeExecutionData
|
|
2
|
-
export declare const notesGetAllDescription: INodeProperties[];
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData } from "n8n-workflow";
|
|
3
2
|
export declare function notesGetAll(this: IExecuteFunctions): Promise<INodeExecutionData[]>;
|
|
4
|
-
export default notesGetAllDescription;
|
|
@@ -1,92 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.notesGetAllDescription = void 0;
|
|
4
3
|
exports.notesGetAll = notesGetAll;
|
|
5
4
|
const constants_1 = require("../../constants");
|
|
6
5
|
const helpers_1 = require("../../helpers");
|
|
7
|
-
const showForNotesGetAll = {
|
|
8
|
-
operation: ["getAll"],
|
|
9
|
-
resource: ["notes"],
|
|
10
|
-
};
|
|
11
|
-
exports.notesGetAllDescription = [
|
|
12
|
-
{
|
|
13
|
-
displayName: "Additional Fields",
|
|
14
|
-
name: "additionalFields",
|
|
15
|
-
type: "collection",
|
|
16
|
-
placeholder: "Add Field",
|
|
17
|
-
default: {},
|
|
18
|
-
displayOptions: {
|
|
19
|
-
show: showForNotesGetAll,
|
|
20
|
-
},
|
|
21
|
-
options: [
|
|
22
|
-
{
|
|
23
|
-
displayName: "Broker ID",
|
|
24
|
-
name: "broker",
|
|
25
|
-
type: "string",
|
|
26
|
-
default: "",
|
|
27
|
-
description: "Filter by user ID assigned to the note",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
displayName: "Client ID",
|
|
31
|
-
name: "client",
|
|
32
|
-
type: "string",
|
|
33
|
-
default: "",
|
|
34
|
-
description: "Filter by contact identifier",
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
displayName: "Note Type ID",
|
|
38
|
-
name: "noteType",
|
|
39
|
-
type: "string",
|
|
40
|
-
default: "",
|
|
41
|
-
description: "Filter by note category identifier",
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
displayName: "Project ID",
|
|
45
|
-
name: "project",
|
|
46
|
-
type: "string",
|
|
47
|
-
default: "",
|
|
48
|
-
description: "Filter by project identifier",
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
displayName: "Property ID",
|
|
52
|
-
name: "property",
|
|
53
|
-
type: "string",
|
|
54
|
-
default: "",
|
|
55
|
-
description: "Filter by object/property identifier",
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
displayName: "Tag ID",
|
|
59
|
-
name: "tag",
|
|
60
|
-
type: "string",
|
|
61
|
-
default: "",
|
|
62
|
-
description: "Filter by feature/attribute identifier",
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
];
|
|
67
6
|
async function notesGetAll() {
|
|
68
7
|
const options = this.getNodeParameter("additionalFields", 0);
|
|
69
|
-
const qs = {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (options.noteType) {
|
|
78
|
-
qs.note_type = parseInt(options.noteType, 10);
|
|
79
|
-
}
|
|
80
|
-
if (options.property) {
|
|
81
|
-
qs.property = parseInt(options.property, 10);
|
|
82
|
-
}
|
|
83
|
-
if (options.project) {
|
|
84
|
-
qs.project = parseInt(options.project, 10);
|
|
85
|
-
}
|
|
86
|
-
if (options.tag) {
|
|
87
|
-
qs.tag = parseInt(options.tag, 10);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
8
|
+
const qs = (0, helpers_1.buildQs)(options, {
|
|
9
|
+
tag: (0, helpers_1.toInt)("tag"),
|
|
10
|
+
broker: (0, helpers_1.toInt)("broker"),
|
|
11
|
+
noteType: (0, helpers_1.toInt)("note_type"),
|
|
12
|
+
client: (0, helpers_1.toInt)("client"),
|
|
13
|
+
property: (0, helpers_1.toInt)("property"),
|
|
14
|
+
project: (0, helpers_1.toInt)("project"),
|
|
15
|
+
});
|
|
90
16
|
const response = await helpers_1.propstackRequest.call(this, {
|
|
91
17
|
method: "GET",
|
|
92
18
|
url: constants_1.API_ENDPOINTS.NOTES_GET_ALL,
|
|
@@ -94,5 +20,4 @@ async function notesGetAll() {
|
|
|
94
20
|
});
|
|
95
21
|
return this.helpers.returnJsonArray(Array.isArray(response) ? response : [response]);
|
|
96
22
|
}
|
|
97
|
-
exports.default = exports.notesGetAllDescription;
|
|
98
23
|
//# sourceMappingURL=getAll.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/notes/getAll.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/notes/getAll.ts"],"names":[],"mappings":";;AASA,kCA0BC;AA7BD,+CAAgD;AAChD,2CAAiE;AAE1D,KAAK,UAAU,WAAW;IAG/B,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CACnC,kBAAkB,EAClB,CAAC,CACa,CAAC;IAEjB,MAAM,EAAE,GAAG,IAAA,iBAAO,EAAC,OAAO,EAAE;QAC1B,GAAG,EAAE,IAAA,eAAK,EAAC,KAAK,CAAC;QACjB,MAAM,EAAE,IAAA,eAAK,EAAC,QAAQ,CAAC;QACvB,QAAQ,EAAE,IAAA,eAAK,EAAC,WAAW,CAAC;QAC5B,MAAM,EAAE,IAAA,eAAK,EAAC,QAAQ,CAAC;QACvB,QAAQ,EAAE,IAAA,eAAK,EAAC,UAAU,CAAC;QAC3B,OAAO,EAAE,IAAA,eAAK,EAAC,SAAS,CAAC;KAC1B,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,0BAAgB,CAAC,IAAI,CAAC,IAAI,EAAE;QACjD,MAAM,EAAE,KAAK;QACb,GAAG,EAAE,yBAAa,CAAC,aAAa;QAChC,EAAE;KACH,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,3 @@
|
|
|
1
1
|
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
|
|
2
2
|
export declare const projectsCreateDescription: INodeProperties[];
|
|
3
3
|
export declare function projectsCreate(this: IExecuteFunctions): Promise<INodeExecutionData[]>;
|
|
4
|
-
export default projectsCreateDescription;
|
|
@@ -8,6 +8,30 @@ const showForProjectsCreate = {
|
|
|
8
8
|
operation: ["create"],
|
|
9
9
|
resource: ["projects"],
|
|
10
10
|
};
|
|
11
|
+
const PROJECT_BODY_MAPPING = {
|
|
12
|
+
name: "name",
|
|
13
|
+
title: "title",
|
|
14
|
+
status: "status",
|
|
15
|
+
broker_id: (0, helpers_1.toInt)("broker_id"),
|
|
16
|
+
for_rent: "for_rent",
|
|
17
|
+
street: "street",
|
|
18
|
+
house_number: "house_number",
|
|
19
|
+
zip_code: "zip_code",
|
|
20
|
+
city: "city",
|
|
21
|
+
lat: "lat",
|
|
22
|
+
lng: "lng",
|
|
23
|
+
location_id: (0, helpers_1.toInt)("location_id"),
|
|
24
|
+
courtage: "courtage",
|
|
25
|
+
courtage_note: "courtage_note",
|
|
26
|
+
description_note: "description_note",
|
|
27
|
+
location_note: "location_note",
|
|
28
|
+
furnishing_note: "furnishing_note",
|
|
29
|
+
construction_year: "construction_year",
|
|
30
|
+
warning_notice: "warning_notice",
|
|
31
|
+
title_image: "title_image",
|
|
32
|
+
logo_url: "logo_url",
|
|
33
|
+
note: "note",
|
|
34
|
+
};
|
|
11
35
|
exports.projectsCreateDescription = [
|
|
12
36
|
{
|
|
13
37
|
displayName: "Additional Fields",
|
|
@@ -131,6 +155,16 @@ exports.projectsCreateDescription = [
|
|
|
131
155
|
default: "",
|
|
132
156
|
description: "Project identifier",
|
|
133
157
|
},
|
|
158
|
+
{
|
|
159
|
+
displayName: "Note",
|
|
160
|
+
name: "note",
|
|
161
|
+
type: "string",
|
|
162
|
+
default: "",
|
|
163
|
+
description: "Project note",
|
|
164
|
+
typeOptions: {
|
|
165
|
+
rows: 4,
|
|
166
|
+
},
|
|
167
|
+
},
|
|
134
168
|
{
|
|
135
169
|
displayName: "Status",
|
|
136
170
|
name: "status",
|
|
@@ -156,7 +190,7 @@ exports.projectsCreateDescription = [
|
|
|
156
190
|
name: "title",
|
|
157
191
|
type: "string",
|
|
158
192
|
default: "",
|
|
159
|
-
description: "
|
|
193
|
+
description: "Expose headline",
|
|
160
194
|
},
|
|
161
195
|
{
|
|
162
196
|
displayName: "Title Image",
|
|
@@ -182,43 +216,9 @@ exports.projectsCreateDescription = [
|
|
|
182
216
|
],
|
|
183
217
|
},
|
|
184
218
|
];
|
|
185
|
-
function buildProjectsCreateBody() {
|
|
186
|
-
const body = {};
|
|
187
|
-
const options = this.getNodeParameter("additionalFields", 0);
|
|
188
|
-
if (options) {
|
|
189
|
-
const fields = [
|
|
190
|
-
"name",
|
|
191
|
-
"title",
|
|
192
|
-
"status",
|
|
193
|
-
"broker_id",
|
|
194
|
-
"for_rent",
|
|
195
|
-
"street",
|
|
196
|
-
"house_number",
|
|
197
|
-
"zip_code",
|
|
198
|
-
"city",
|
|
199
|
-
"lat",
|
|
200
|
-
"lng",
|
|
201
|
-
"location_id",
|
|
202
|
-
"courtage",
|
|
203
|
-
"courtage_note",
|
|
204
|
-
"description_note",
|
|
205
|
-
"location_note",
|
|
206
|
-
"furnishing_note",
|
|
207
|
-
"construction_year",
|
|
208
|
-
"warning_notice",
|
|
209
|
-
"title_image",
|
|
210
|
-
"logo_url",
|
|
211
|
-
];
|
|
212
|
-
for (const field of fields) {
|
|
213
|
-
if (options[field] !== undefined && options[field] !== "") {
|
|
214
|
-
body[field] = options[field];
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
return body;
|
|
219
|
-
}
|
|
220
219
|
async function projectsCreate() {
|
|
221
|
-
const
|
|
220
|
+
const options = this.getNodeParameter("additionalFields", 0);
|
|
221
|
+
const body = (0, helpers_1.buildQs)(options, PROJECT_BODY_MAPPING);
|
|
222
222
|
const response = await helpers_1.propstackRequest.call(this, {
|
|
223
223
|
method: "POST",
|
|
224
224
|
url: constants_1.API_ENDPOINTS.PROJECTS_CREATE,
|
|
@@ -226,5 +226,4 @@ async function projectsCreate() {
|
|
|
226
226
|
});
|
|
227
227
|
return this.helpers.returnJsonArray(Array.isArray(response) ? response : [response]);
|
|
228
228
|
}
|
|
229
|
-
exports.default = exports.projectsCreateDescription;
|
|
230
229
|
//# sourceMappingURL=create.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/projects/create.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/projects/create.ts"],"names":[],"mappings":";;;AAiOA,wCAeC;AAzOD,+CAAgD;AAChD,2CAAiE;AAEjE,MAAM,qBAAqB,GAAG;IAC5B,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,QAAQ,EAAE,CAAC,UAAU,CAAC;CACvB,CAAC;AAEF,MAAM,oBAAoB,GAAiE;IACzF,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,IAAA,eAAK,EAAC,WAAW,CAAC;IAC7B,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,cAAc;IAC5B,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,WAAW,EAAE,IAAA,eAAK,EAAC,aAAa,CAAC;IACjC,QAAQ,EAAE,UAAU;IACpB,aAAa,EAAE,eAAe;IAC9B,gBAAgB,EAAE,kBAAkB;IACpC,aAAa,EAAE,eAAe;IAC9B,eAAe,EAAE,iBAAiB;IAClC,iBAAiB,EAAE,mBAAmB;IACtC,cAAc,EAAE,gBAAgB;IAChC,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACb,CAAC;AAEW,QAAA,yBAAyB,GAAsB;IAC1D;QACE,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,WAAW;QACxB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACd,IAAI,EAAE,qBAAqB;SAC5B;QAC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,GAAG,MAAM,0BAAgB,CAAC,IAAI,CAAC,IAAI,EAAE;QACjD,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,yBAAa,CAAC,eAAe;QAClC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KACxB,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,3 @@
|
|
|
1
1
|
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
|
|
2
2
|
export declare const projectsGetDescription: INodeProperties[];
|
|
3
3
|
export declare function projectsGet(this: IExecuteFunctions): Promise<INodeExecutionData[]>;
|
|
4
|
-
export default projectsGetDescription;
|
|
@@ -19,5 +19,4 @@ async function projectsGet() {
|
|
|
19
19
|
const simplify = this.getNodeParameter("simplify", 0, true);
|
|
20
20
|
return this.helpers.returnJsonArray(simplify ? (0, helpers_1.simplifyResponse)(data, PROJECTS_SIMPLIFIED_FIELDS) : data);
|
|
21
21
|
}
|
|
22
|
-
exports.default = exports.projectsGetDescription;
|
|
23
22
|
//# sourceMappingURL=get.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/projects/get.ts"],"names":[],"mappings":";;;AAiBA,kCAiBC;AA3BD,+CAAgD;AAChD,2CAAgG;AAEhG,MAAM,0BAA0B,GAAG;IACjC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM;IACxC,aAAa,EAAE,YAAY,EAAE,YAAY;CAC1C,CAAC;AAEW,QAAA,sBAAsB,GAAsB,EAAE,CAAC;AAErD,KAAK,UAAU,WAAW;IAG/B,MAAM,SAAS,GAAG,IAAA,qCAA2B,EAC3C,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C,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,EAAE,IAAI,CAAY,CAAC;IACvE,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CACjC,QAAQ,CAAC,CAAC,CAAC,IAAA,0BAAgB,EAAC,IAAqB,EAAE,0BAA0B,CAAC,CAAC,CAAC,CAAC,IAAI,CACtF,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
|
|
2
2
|
export declare const projectsGetAllDescription: INodeProperties[];
|
|
3
3
|
export declare function projectsGetAll(this: IExecuteFunctions): Promise<INodeExecutionData[]>;
|
|
4
|
-
export default projectsGetAllDescription;
|
|
@@ -37,7 +37,7 @@ exports.projectsGetAllDescription = [
|
|
|
37
37
|
description: "Max number of results to return",
|
|
38
38
|
typeOptions: {
|
|
39
39
|
minValue: 1,
|
|
40
|
-
maxValue:
|
|
40
|
+
maxValue: 500,
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
{
|
|
@@ -70,55 +70,43 @@ exports.projectsGetAllDescription = [
|
|
|
70
70
|
],
|
|
71
71
|
},
|
|
72
72
|
];
|
|
73
|
+
function buildGetAllQs(options) {
|
|
74
|
+
const qs = {};
|
|
75
|
+
if (options === null || options === void 0 ? void 0 : options.expand) {
|
|
76
|
+
qs.expand = 1;
|
|
77
|
+
}
|
|
78
|
+
return qs;
|
|
79
|
+
}
|
|
73
80
|
async function projectsGetAll() {
|
|
74
81
|
const returnAll = this.getNodeParameter("returnAll", 0);
|
|
75
82
|
const limit = this.getNodeParameter("limit", 0, 50);
|
|
76
83
|
const options = this.getNodeParameter("additionalFields", 0);
|
|
77
|
-
const
|
|
84
|
+
const simplify = this.getNodeParameter("simplify", 0, true);
|
|
85
|
+
const baseQs = buildGetAllQs(options);
|
|
78
86
|
if (returnAll) {
|
|
79
87
|
let allResults = [];
|
|
80
88
|
let currentPage = 1;
|
|
81
89
|
let hasMore = true;
|
|
82
90
|
while (hasMore) {
|
|
83
|
-
const qs = {
|
|
84
|
-
page: currentPage,
|
|
85
|
-
per_page: 100,
|
|
86
|
-
};
|
|
87
|
-
if (options === null || options === void 0 ? void 0 : options.expand) {
|
|
88
|
-
qs.expand = 1;
|
|
89
|
-
}
|
|
90
91
|
const response = await helpers_1.propstackRequest.call(this, {
|
|
91
92
|
method: "GET",
|
|
92
93
|
url: constants_1.API_ENDPOINTS.PROJECTS_GET_ALL,
|
|
93
|
-
qs,
|
|
94
|
+
qs: { ...baseQs, page: currentPage, per: 100 },
|
|
94
95
|
});
|
|
95
96
|
const results = Array.isArray(response) ? response : [response];
|
|
96
97
|
allResults = allResults.concat(results);
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
currentPage++;
|
|
102
|
-
}
|
|
98
|
+
hasMore = results.length >= 100;
|
|
99
|
+
currentPage++;
|
|
103
100
|
}
|
|
104
|
-
const simplify = this.getNodeParameter("simplify", 0, true);
|
|
105
101
|
return this.helpers.returnJsonArray(simplify ? (0, helpers_1.simplifyResponse)(allResults, PROJECTS_SIMPLIFIED_FIELDS) : allResults);
|
|
106
102
|
}
|
|
107
|
-
const
|
|
108
|
-
page,
|
|
109
|
-
per_page: limit,
|
|
110
|
-
};
|
|
111
|
-
if (options === null || options === void 0 ? void 0 : options.expand) {
|
|
112
|
-
qs.expand = 1;
|
|
113
|
-
}
|
|
103
|
+
const page = (options === null || options === void 0 ? void 0 : options.page) || 1;
|
|
114
104
|
const response = await helpers_1.propstackRequest.call(this, {
|
|
115
105
|
method: "GET",
|
|
116
106
|
url: constants_1.API_ENDPOINTS.PROJECTS_GET_ALL,
|
|
117
|
-
qs,
|
|
107
|
+
qs: { ...baseQs, page, per: limit },
|
|
118
108
|
});
|
|
119
109
|
const data = Array.isArray(response) ? response : [response];
|
|
120
|
-
const simplify = this.getNodeParameter("simplify", 0, true);
|
|
121
110
|
return this.helpers.returnJsonArray(simplify ? (0, helpers_1.simplifyResponse)(data, PROJECTS_SIMPLIFIED_FIELDS) : data);
|
|
122
111
|
}
|
|
123
|
-
exports.default = exports.projectsGetAllDescription;
|
|
124
112
|
//# sourceMappingURL=getAll.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/projects/getAll.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/projects/getAll.ts"],"names":[],"mappings":";;;AAuFA,wCA6CC;AA7HD,+CAAgD;AAChD,2CAAmE;AAEnE,MAAM,0BAA0B,GAAG;IACjC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM;IACxC,aAAa,EAAE,YAAY,EAAE,YAAY;CAC1C,CAAC;AAEF,MAAM,qBAAqB,GAAG;IAC5B,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,QAAQ,EAAE,CAAC,UAAU,CAAC;CACvB,CAAC;AAEW,QAAA,yBAAyB,GAAsB;IAC1D;QACE,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,cAAc,EAAE;YACd,IAAI,EAAE,qBAAqB;SAC5B;QACD,WAAW,EAAE,2DAA2D;KACzE;IACD;QACE,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,GAAG,qBAAqB;gBACxB,SAAS,EAAE,CAAC,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AE,GAAG,EAAE,KAAK,EAAE;KACpC,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CACjC,QAAQ,CAAC,CAAC,CAAC,IAAA,0BAAgB,EAAC,IAAI,EAAE,0BAA0B,CAAC,CAAC,CAAC,CAAC,IAAI,CACrE,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,5 @@ import { projectsCreate } from "./create";
|
|
|
3
3
|
import { projectsGet } from "./get";
|
|
4
4
|
import { projectsGetAll } from "./getAll";
|
|
5
5
|
import { projectsUpdate } from "./update";
|
|
6
|
-
|
|
7
|
-
export { projectsCreate, projectsDelete, projectsGet, projectsGetAll, projectsUpdate, };
|
|
6
|
+
export { projectsCreate, projectsGet, projectsGetAll, projectsUpdate, };
|
|
8
7
|
export declare const projectsDescription: INodeProperties[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.projectsDescription = exports.projectsUpdate = exports.projectsGetAll = exports.projectsGet = exports.
|
|
3
|
+
exports.projectsDescription = exports.projectsUpdate = exports.projectsGetAll = exports.projectsGet = exports.projectsCreate = void 0;
|
|
4
4
|
const create_1 = require("./create");
|
|
5
5
|
Object.defineProperty(exports, "projectsCreate", { enumerable: true, get: function () { return create_1.projectsCreate; } });
|
|
6
6
|
const get_1 = require("./get");
|
|
@@ -9,8 +9,6 @@ const getAll_1 = require("./getAll");
|
|
|
9
9
|
Object.defineProperty(exports, "projectsGetAll", { enumerable: true, get: function () { return getAll_1.projectsGetAll; } });
|
|
10
10
|
const update_1 = require("./update");
|
|
11
11
|
Object.defineProperty(exports, "projectsUpdate", { enumerable: true, get: function () { return update_1.projectsUpdate; } });
|
|
12
|
-
const delete_1 = require("./delete");
|
|
13
|
-
Object.defineProperty(exports, "projectsDelete", { enumerable: true, get: function () { return delete_1.projectsDelete; } });
|
|
14
12
|
const projectIdField = {
|
|
15
13
|
displayName: "Project",
|
|
16
14
|
name: "projectId",
|
|
@@ -21,7 +19,7 @@ const projectIdField = {
|
|
|
21
19
|
displayOptions: {
|
|
22
20
|
show: {
|
|
23
21
|
resource: ["projects"],
|
|
24
|
-
operation: ["get", "update"
|
|
22
|
+
operation: ["get", "update"],
|
|
25
23
|
},
|
|
26
24
|
},
|
|
27
25
|
modes: [
|
|
@@ -61,12 +59,6 @@ exports.projectsDescription = [
|
|
|
61
59
|
action: "Create project",
|
|
62
60
|
description: "Create a new project",
|
|
63
61
|
},
|
|
64
|
-
{
|
|
65
|
-
name: "Delete",
|
|
66
|
-
value: "delete",
|
|
67
|
-
action: "Delete project",
|
|
68
|
-
description: "Permanently remove a project",
|
|
69
|
-
},
|
|
70
62
|
{
|
|
71
63
|
name: "Get",
|
|
72
64
|
value: "get",
|
|
@@ -106,6 +98,5 @@ exports.projectsDescription = [
|
|
|
106
98
|
},
|
|
107
99
|
},
|
|
108
100
|
...update_1.projectsUpdateDescription,
|
|
109
|
-
...delete_1.projectsDeleteDescription,
|
|
110
101
|
];
|
|
111
102
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/projects/index.ts"],"names":[],"mappings":";;;AACA,qCAAqE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Propstack/v1/resources/projects/index.ts"],"names":[],"mappings":";;;AACA,qCAAqE;AAMnE,+FANO,uBAAc,OAMP;AALhB,+BAA4D;AAM1D,4FANO,iBAAW,OAMP;AALb,qCAAqE;AAMnE,+FANO,uBAAc,OAMP;AALhB,qCAAqE;AAMnE,+FANO,uBAAc,OAMP;AAGhB,MAAM,cAAc,GAAoB;IAC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ACD;gBACE,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,gBAAgB;gBACxB,WAAW,EAAE,4BAA4B;aAC1C;SACF;QACD,OAAO,EAAE,QAAQ;KAClB;IACD,cAAc;IACd,GAAG,kCAAyB;IAC5B,GAAG,4BAAsB;IACzB,GAAG,kCAAyB;IAC5B;QACE,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI;QACb,WAAW,EACT,gFAAgF;QAClF,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;aAC7B;SACF;KACF;IACD,GAAG,kCAAyB;CAC7B,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
|
|
2
2
|
export declare const projectsUpdateDescription: INodeProperties[];
|
|
3
3
|
export declare function projectsUpdate(this: IExecuteFunctions): Promise<INodeExecutionData[]>;
|
|
4
|
-
export default projectsUpdateDescription;
|
|
@@ -8,6 +8,30 @@ const showForProjectsUpdate = {
|
|
|
8
8
|
operation: ["update"],
|
|
9
9
|
resource: ["projects"],
|
|
10
10
|
};
|
|
11
|
+
const PROJECT_BODY_MAPPING = {
|
|
12
|
+
name: "name",
|
|
13
|
+
title: "title",
|
|
14
|
+
status: "status",
|
|
15
|
+
broker_id: (0, helpers_1.toInt)("broker_id"),
|
|
16
|
+
for_rent: "for_rent",
|
|
17
|
+
street: "street",
|
|
18
|
+
house_number: "house_number",
|
|
19
|
+
zip_code: "zip_code",
|
|
20
|
+
city: "city",
|
|
21
|
+
lat: "lat",
|
|
22
|
+
lng: "lng",
|
|
23
|
+
location_id: (0, helpers_1.toInt)("location_id"),
|
|
24
|
+
courtage: "courtage",
|
|
25
|
+
courtage_note: "courtage_note",
|
|
26
|
+
description_note: "description_note",
|
|
27
|
+
location_note: "location_note",
|
|
28
|
+
furnishing_note: "furnishing_note",
|
|
29
|
+
construction_year: "construction_year",
|
|
30
|
+
warning_notice: "warning_notice",
|
|
31
|
+
title_image: "title_image",
|
|
32
|
+
logo_url: "logo_url",
|
|
33
|
+
note: "note",
|
|
34
|
+
};
|
|
11
35
|
exports.projectsUpdateDescription = [
|
|
12
36
|
{
|
|
13
37
|
displayName: "Additional Fields",
|
|
@@ -131,6 +155,16 @@ exports.projectsUpdateDescription = [
|
|
|
131
155
|
default: "",
|
|
132
156
|
description: "Project identifier",
|
|
133
157
|
},
|
|
158
|
+
{
|
|
159
|
+
displayName: "Note",
|
|
160
|
+
name: "note",
|
|
161
|
+
type: "string",
|
|
162
|
+
default: "",
|
|
163
|
+
description: "Project note",
|
|
164
|
+
typeOptions: {
|
|
165
|
+
rows: 4,
|
|
166
|
+
},
|
|
167
|
+
},
|
|
134
168
|
{
|
|
135
169
|
displayName: "Status",
|
|
136
170
|
name: "status",
|
|
@@ -156,7 +190,7 @@ exports.projectsUpdateDescription = [
|
|
|
156
190
|
name: "title",
|
|
157
191
|
type: "string",
|
|
158
192
|
default: "",
|
|
159
|
-
description: "
|
|
193
|
+
description: "Expose headline",
|
|
160
194
|
},
|
|
161
195
|
{
|
|
162
196
|
displayName: "Title Image",
|
|
@@ -182,44 +216,10 @@ exports.projectsUpdateDescription = [
|
|
|
182
216
|
],
|
|
183
217
|
},
|
|
184
218
|
];
|
|
185
|
-
function buildProjectsUpdateBody() {
|
|
186
|
-
const body = {};
|
|
187
|
-
const options = this.getNodeParameter("additionalFields", 0);
|
|
188
|
-
if (options) {
|
|
189
|
-
const fields = [
|
|
190
|
-
"name",
|
|
191
|
-
"title",
|
|
192
|
-
"status",
|
|
193
|
-
"broker_id",
|
|
194
|
-
"for_rent",
|
|
195
|
-
"street",
|
|
196
|
-
"house_number",
|
|
197
|
-
"zip_code",
|
|
198
|
-
"city",
|
|
199
|
-
"lat",
|
|
200
|
-
"lng",
|
|
201
|
-
"location_id",
|
|
202
|
-
"courtage",
|
|
203
|
-
"courtage_note",
|
|
204
|
-
"description_note",
|
|
205
|
-
"location_note",
|
|
206
|
-
"furnishing_note",
|
|
207
|
-
"construction_year",
|
|
208
|
-
"warning_notice",
|
|
209
|
-
"title_image",
|
|
210
|
-
"logo_url",
|
|
211
|
-
];
|
|
212
|
-
for (const field of fields) {
|
|
213
|
-
if (options[field] !== undefined && options[field] !== "") {
|
|
214
|
-
body[field] = options[field];
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
return body;
|
|
219
|
-
}
|
|
220
219
|
async function projectsUpdate() {
|
|
221
220
|
const projectId = (0, helpers_1.extractResourceLocatorValue)(this.getNodeParameter("projectId", 0));
|
|
222
|
-
const
|
|
221
|
+
const options = this.getNodeParameter("additionalFields", 0);
|
|
222
|
+
const body = (0, helpers_1.buildQs)(options, PROJECT_BODY_MAPPING);
|
|
223
223
|
const response = await helpers_1.propstackRequest.call(this, {
|
|
224
224
|
method: "PUT",
|
|
225
225
|
url: constants_1.API_ENDPOINTS.PROJECTS_UPDATE(projectId),
|
|
@@ -227,5 +227,4 @@ async function projectsUpdate() {
|
|
|
227
227
|
});
|
|
228
228
|
return this.helpers.returnJsonArray(Array.isArray(response) ? response : [response]);
|
|
229
229
|
}
|
|
230
|
-
exports.default = exports.projectsUpdateDescription;
|
|
231
230
|
//# sourceMappingURL=update.js.map
|