@seventhingscompany/n8n-nodes-seventhings 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +108 -0
  3. package/dist/credentials/SeventhingsApi.credentials.js +100 -0
  4. package/dist/credentials/seventhings.dark.svg +5 -0
  5. package/dist/credentials/seventhings.svg +5 -0
  6. package/dist/nodes/Seventhings/Seventhings.node.js +251 -0
  7. package/dist/nodes/Seventhings/Seventhings.node.json +18 -0
  8. package/dist/nodes/Seventhings/actions/asset/index.js +238 -0
  9. package/dist/nodes/Seventhings/actions/file/index.js +77 -0
  10. package/dist/nodes/Seventhings/actions/location/index.js +127 -0
  11. package/dist/nodes/Seventhings/actions/rentalCase/index.js +211 -0
  12. package/dist/nodes/Seventhings/actions/room/index.js +138 -0
  13. package/dist/nodes/Seventhings/actions/task/index.js +235 -0
  14. package/dist/nodes/Seventhings/descriptions/AssetDescription.js +226 -0
  15. package/dist/nodes/Seventhings/descriptions/FileDescription.js +57 -0
  16. package/dist/nodes/Seventhings/descriptions/LocationDescription.js +140 -0
  17. package/dist/nodes/Seventhings/descriptions/RentalCaseDescription.js +324 -0
  18. package/dist/nodes/Seventhings/descriptions/RoomDescription.js +124 -0
  19. package/dist/nodes/Seventhings/descriptions/TaskDescription.js +248 -0
  20. package/dist/nodes/Seventhings/methods/assetMethods.js +68 -0
  21. package/dist/nodes/Seventhings/methods/index.js +23 -0
  22. package/dist/nodes/Seventhings/methods/locationMethods.js +49 -0
  23. package/dist/nodes/Seventhings/methods/rentalCaseMethods.js +31 -0
  24. package/dist/nodes/Seventhings/methods/roomMethods.js +35 -0
  25. package/dist/nodes/Seventhings/methods/taskMethods.js +31 -0
  26. package/dist/nodes/Seventhings/seventhings.dark.svg +5 -0
  27. package/dist/nodes/Seventhings/seventhings.svg +5 -0
  28. package/dist/nodes/Seventhings/transport/apiRequest.js +44 -0
  29. package/dist/nodes/Seventhings/transport/assetFields.js +128 -0
  30. package/dist/nodes/Seventhings/transport/fileUpload.js +72 -0
  31. package/dist/nodes/Seventhings/transport/index.js +44 -0
  32. package/dist/nodes/Seventhings/transport/locationFields.js +13 -0
  33. package/dist/nodes/Seventhings/transport/rentalCaseFields.js +18 -0
  34. package/dist/nodes/Seventhings/transport/roomFields.js +104 -0
  35. package/dist/nodes/Seventhings/transport/taskFields.js +12 -0
  36. package/dist/nodes/Seventhings/transport/timestamps.js +39 -0
  37. package/dist/nodes/Seventhings/transport/validators.js +49 -0
  38. package/dist/nodes/SeventhingsTrigger/SeventhingsTrigger.node.js +246 -0
  39. package/dist/nodes/SeventhingsTrigger/SeventhingsTrigger.node.json +18 -0
  40. package/dist/nodes/SeventhingsTrigger/seventhings.dark.svg +5 -0
  41. package/dist/nodes/SeventhingsTrigger/seventhings.svg +5 -0
  42. package/dist/package.json +51 -0
  43. package/package.json +51 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 seventhings GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,108 @@
1
+ # @seventhingscompany/n8n-nodes-seventhings
2
+
3
+ This is an n8n community node. It lets you use [seventhings](https://seventhings.com/) in your n8n workflows.
4
+
5
+ seventhings is an asset-management and inventory platform for tracking physical assets, tasks, rental cases, locations and rooms across an organization. This package adds two nodes: a **Seventhings** action node for reading and writing those records, and a **Seventhings Trigger** node that starts workflows when records change.
6
+
7
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/sustainable-use-license/) workflow automation platform.
8
+
9
+ [Installation](#installation)
10
+ [Operations](#operations)
11
+ [Credentials](#credentials)
12
+ [Compatibility](#compatibility)
13
+ [Usage](#usage)
14
+ [Resources](#resources)
15
+ [Version history](#version-history)
16
+
17
+ ## Installation
18
+
19
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
20
+
21
+ Install the package `@seventhingscompany/n8n-nodes-seventhings` from **Settings → Community Nodes** in your n8n instance.
22
+
23
+ ## Operations
24
+
25
+ This package provides two nodes.
26
+
27
+ ### Seventhings (action node)
28
+
29
+ Manage assets, tasks, rental cases, locations, rooms and files. The node is organized by **resource**, each with its own set of operations.
30
+
31
+ | Resource | Operations |
32
+ |----------|------------|
33
+ | **Asset** | Create, Update, Get, Get Many, Archive, Unarchive, Delete, Move to Location, Move to Room, Attach File, Detach File |
34
+ | **Task** | Create, Update, Get, Get Many, Close, Reopen, Delete |
35
+ | **Rental Case** | Create, Update, Get, Get Many, Delete |
36
+ | **Location** | Create, Update, Get, Get Many, Delete |
37
+ | **Room** | Create, Update, Get, Get Many, Delete |
38
+ | **File** | Upload |
39
+
40
+ Notes:
41
+
42
+ - **Get** looks a record up by UUID; **Get Many** lists/filters records with a **Return All** toggle and a **Limit**.
43
+ - **Asset** and **Room** Create/Update expose your tenant's own custom fields dynamically (via a resource mapper that reads the field definitions), so the inputs match your seventhings configuration.
44
+ - **Asset → Create** supports a find-or-create behaviour to avoid duplicates.
45
+ - **Asset → Attach File / Detach File** target an attachment-type field, picked from a dropdown of the asset's attachment fields.
46
+ - **Room** records belong to a **Building** (a Location), selected from a dropdown.
47
+ - **File → Upload** accepts either an upstream node's **binary** data or a public **URL** to download, and returns the uploaded file's UUID — which you can then attach to an asset.
48
+
49
+ ### Seventhings Trigger (polling)
50
+
51
+ Starts a workflow when seventhings records change. The trigger **polls** the API (there are no webhooks). Pick one event:
52
+
53
+ - **New Asset**, **Updated Asset**
54
+ - **New Task**, **Updated Task**, **Task Closed**, **Task Reopened**, **Task Overdue**, **Task Due Soon**
55
+ - **New Rental Case**, **Updated Rental Case**, **Rental Case Returned**
56
+
57
+ **Task Due Soon** has a **Days Ahead** input (default 3) controlling how far ahead to look for upcoming deadlines.
58
+
59
+ ## Credentials
60
+
61
+ You need a seventhings account and API access.
62
+
63
+ **Prerequisites**
64
+
65
+ - A seventhings instance (you log in at `https://<yourcompany>.seventhings.com`).
66
+ - A **Client ID**, found in seventhings under **Integrations → Rest API**.
67
+
68
+ **Setting up the credential**
69
+
70
+ Create a **Seventhings API** credential with:
71
+
72
+ - **Subdomain** — the `<yourcompany>` part of your seventhings URL.
73
+ - **Username** — your seventhings login (an email address).
74
+ - **Password** — your seventhings password.
75
+ - **Client ID** — from Integrations → Rest API.
76
+
77
+ Authentication uses a session bearer token obtained via a password grant. n8n fetches and caches the token automatically and refreshes it when it expires, so you only ever enter the four fields above. Use **Test** to confirm the connection.
78
+
79
+ ## Compatibility
80
+
81
+ - Requires **n8n 1.x** (uses `n8nNodesApiVersion: 1`).
82
+ - Built and tested against **Node.js 20+**.
83
+
84
+ No known incompatibilities. If you hit one, please open an issue.
85
+
86
+ ## Usage
87
+
88
+ - Records are selected through searchable dropdowns (resource locators) — start typing to find an asset, task, location, room or rental case, or paste a UUID directly.
89
+ - For list operations, enable **Return All** to fetch every record, or leave it off and set a **Limit**.
90
+ - For **Asset → Attach File / Detach File**, first **Upload** a file (File resource) to get its UUID, then choose the asset's attachment field from the dropdown.
91
+ - The action node is usable as a tool by AI agents.
92
+
93
+ New to n8n? See the [Try it out](https://docs.n8n.io/try-it-out/) documentation to get started.
94
+
95
+ ## Resources
96
+
97
+ * [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
98
+ * [seventhings API documentation](https://helpcenter.seventhings.com/en/articles/58547-how-do-i-use-the-seventhings-api)
99
+
100
+ ## Version history
101
+
102
+ ### 0.1.0
103
+
104
+ Initial release. Full parity with the seventhings Zapier integration:
105
+
106
+ - **Seventhings** action node with Asset, Task, Rental Case, Location, Room and File resources.
107
+ - **Seventhings Trigger** node with 11 polling events.
108
+ - Session-token authentication with automatic refresh.
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SeventhingsApi = void 0;
4
+ const validators_1 = require("../nodes/Seventhings/transport/validators");
5
+ class SeventhingsApi {
6
+ constructor() {
7
+ this.name = 'seventhingsApi';
8
+ this.displayName = 'Seventhings API';
9
+ this.icon = { light: 'file:seventhings.svg', dark: 'file:seventhings.dark.svg' };
10
+ this.documentationUrl = 'https://helpcenter.seventhings.com/en/articles/58547-how-do-i-use-the-seventhings-api';
11
+ this.properties = [
12
+ {
13
+ displayName: 'Subdomain',
14
+ name: 'subdomain',
15
+ type: 'string',
16
+ default: '',
17
+ required: true,
18
+ placeholder: 'yourcompany',
19
+ description: 'The subdomain of your seventhings instance. If you log in at https://yourcompany.seventhings.com, enter "yourcompany".',
20
+ },
21
+ {
22
+ displayName: 'Username',
23
+ name: 'username',
24
+ type: 'string',
25
+ default: '',
26
+ required: true,
27
+ placeholder: 'name@example.com',
28
+ description: 'Your seventhings login username (email address)',
29
+ },
30
+ {
31
+ displayName: 'Password',
32
+ name: 'password',
33
+ type: 'string',
34
+ typeOptions: {
35
+ password: true,
36
+ },
37
+ default: '',
38
+ required: true,
39
+ description: 'Your seventhings password',
40
+ },
41
+ {
42
+ displayName: 'Client ID',
43
+ name: 'clientId',
44
+ type: 'string',
45
+ default: '',
46
+ required: true,
47
+ description: 'Your client ID, found in seventhings under Integrations → Rest API',
48
+ },
49
+ {
50
+ displayName: 'Session Token',
51
+ name: 'sessionToken',
52
+ type: 'string',
53
+ typeOptions: {
54
+ password: true,
55
+ expirable: true,
56
+ },
57
+ default: '',
58
+ },
59
+ ];
60
+ this.authenticate = {
61
+ type: 'generic',
62
+ properties: {
63
+ headers: {
64
+ Authorization: '=Bearer {{$credentials.sessionToken}}',
65
+ },
66
+ },
67
+ };
68
+ this.test = {
69
+ request: {
70
+ baseURL: '=https://{{$credentials.subdomain}}.seventhings.com',
71
+ url: '/customer-api/v1/users',
72
+ method: 'GET',
73
+ },
74
+ };
75
+ }
76
+ async preAuthentication(credentials) {
77
+ const baseUrl = (0, validators_1.buildBaseUrl)(credentials.subdomain);
78
+ const username = (0, validators_1.validateEmail)(credentials.username);
79
+ const response = (await this.helpers.httpRequest({
80
+ method: 'POST',
81
+ url: `${baseUrl}/customer-api/v1/auth_token`,
82
+ headers: {
83
+ 'Content-Type': 'application/x-www-form-urlencoded',
84
+ Accept: 'application/json',
85
+ },
86
+ body: {
87
+ username,
88
+ password: credentials.password,
89
+ client_id: credentials.clientId,
90
+ grant_type: 'password',
91
+ },
92
+ }));
93
+ const accessToken = response === null || response === void 0 ? void 0 : response.access_token;
94
+ if (typeof accessToken !== 'string' || accessToken === '') {
95
+ throw new Error('Authentication failed: no access token returned by seventhings.');
96
+ }
97
+ return { sessionToken: accessToken };
98
+ }
99
+ }
100
+ exports.SeventhingsApi = SeventhingsApi;
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="1418px" height="1418px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" xmlns:xlink="http://www.w3.org/1999/xlink">
4
+ <g><path style="opacity:1" fill="#f9faf9" d="M 282.5,282.5 C 471.833,282.5 661.167,282.5 850.5,282.5C 850.5,376.833 850.5,471.167 850.5,565.5C 944.833,565.5 1039.17,565.5 1133.5,565.5C 1133.5,660.5 1133.5,755.5 1133.5,850.5C 999.166,850.333 864.833,850.5 730.5,851C 788.137,861.971 826.637,895.138 846,950.5C 863.217,1020.54 842.384,1076.04 783.5,1117C 742.56,1140.12 699.894,1143.79 655.5,1128C 597.192,1102.26 566.526,1057.42 563.5,993.5C 565.598,938.439 589.931,896.606 636.5,868C 652.144,859.341 668.811,853.674 686.5,851C 646.168,850.5 605.835,850.333 565.5,850.5C 569.264,741.075 617.597,658.242 710.5,602C 746.073,582.476 784.073,570.809 824.5,567C 643.834,566.5 463.167,566.333 282.5,566.5C 282.5,471.833 282.5,377.167 282.5,282.5 Z"/></g>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="1418px" height="1418px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" xmlns:xlink="http://www.w3.org/1999/xlink">
4
+ <g><path style="opacity:1" fill="#000000" d="M 282.5,282.5 C 471.833,282.5 661.167,282.5 850.5,282.5C 850.5,376.833 850.5,471.167 850.5,565.5C 944.833,565.5 1039.17,565.5 1133.5,565.5C 1133.5,660.5 1133.5,755.5 1133.5,850.5C 999.166,850.333 864.833,850.5 730.5,851C 788.137,861.971 826.637,895.138 846,950.5C 863.217,1020.54 842.384,1076.04 783.5,1117C 742.56,1140.12 699.894,1143.79 655.5,1128C 597.192,1102.26 566.526,1057.42 563.5,993.5C 565.598,938.439 589.931,896.606 636.5,868C 652.144,859.341 668.811,853.674 686.5,851C 646.168,850.5 605.835,850.333 565.5,850.5C 569.264,741.075 617.597,658.242 710.5,602C 746.073,582.476 784.073,570.809 824.5,567C 643.834,566.5 463.167,566.333 282.5,566.5C 282.5,471.833 282.5,377.167 282.5,282.5 Z"/></g>
5
+ </svg>
@@ -0,0 +1,251 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Seventhings = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const AssetDescription_1 = require("./descriptions/AssetDescription");
6
+ const TaskDescription_1 = require("./descriptions/TaskDescription");
7
+ const RentalCaseDescription_1 = require("./descriptions/RentalCaseDescription");
8
+ const LocationDescription_1 = require("./descriptions/LocationDescription");
9
+ const RoomDescription_1 = require("./descriptions/RoomDescription");
10
+ const FileDescription_1 = require("./descriptions/FileDescription");
11
+ const asset_1 = require("./actions/asset");
12
+ const task_1 = require("./actions/task");
13
+ const rentalCase_1 = require("./actions/rentalCase");
14
+ const location_1 = require("./actions/location");
15
+ const room_1 = require("./actions/room");
16
+ const file_1 = require("./actions/file");
17
+ const methods_1 = require("./methods");
18
+ const resourceProperty = {
19
+ displayName: 'Resource',
20
+ name: 'resource',
21
+ type: 'options',
22
+ noDataExpression: true,
23
+ options: [
24
+ { name: 'Asset', value: 'asset' },
25
+ { name: 'File', value: 'file' },
26
+ { name: 'Location', value: 'location' },
27
+ { name: 'Rental Case', value: 'rentalCase' },
28
+ { name: 'Room', value: 'room' },
29
+ { name: 'Task', value: 'task' },
30
+ ],
31
+ default: 'asset',
32
+ };
33
+ const taskOperations = {
34
+ displayName: 'Operation',
35
+ name: 'operation',
36
+ type: 'options',
37
+ noDataExpression: true,
38
+ displayOptions: { show: { resource: ['task'] } },
39
+ options: [
40
+ { name: 'Close', value: 'close', description: 'Close a task', action: 'Close a task' },
41
+ { name: 'Create', value: 'create', description: 'Create a task', action: 'Create a task' },
42
+ { name: 'Delete', value: 'delete', description: 'Delete a task', action: 'Delete a task' },
43
+ { name: 'Get', value: 'get', description: 'Get a task by UUID', action: 'Get a task' },
44
+ { name: 'Get Many', value: 'getAll', description: 'Get many tasks', action: 'Get many tasks' },
45
+ { name: 'Reopen', value: 'reopen', description: 'Reopen a task', action: 'Reopen a task' },
46
+ { name: 'Update', value: 'update', description: 'Update a task', action: 'Update a task' },
47
+ ],
48
+ default: 'create',
49
+ };
50
+ const rentalCaseOperations = {
51
+ displayName: 'Operation',
52
+ name: 'operation',
53
+ type: 'options',
54
+ noDataExpression: true,
55
+ displayOptions: { show: { resource: ['rentalCase'] } },
56
+ options: [
57
+ {
58
+ name: 'Create',
59
+ value: 'create',
60
+ description: 'Create a rental case',
61
+ action: 'Create a rental case',
62
+ },
63
+ {
64
+ name: 'Delete',
65
+ value: 'delete',
66
+ description: 'Delete a rental case',
67
+ action: 'Delete a rental case',
68
+ },
69
+ {
70
+ name: 'Get',
71
+ value: 'get',
72
+ description: 'Get a rental case by UUID',
73
+ action: 'Get a rental case',
74
+ },
75
+ {
76
+ name: 'Get Many',
77
+ value: 'getAll',
78
+ description: 'Get many rental cases',
79
+ action: 'Get many rental cases',
80
+ },
81
+ {
82
+ name: 'Update',
83
+ value: 'update',
84
+ description: 'Update a rental case',
85
+ action: 'Update a rental case',
86
+ },
87
+ ],
88
+ default: 'create',
89
+ };
90
+ const locationOperations = {
91
+ displayName: 'Operation',
92
+ name: 'operation',
93
+ type: 'options',
94
+ noDataExpression: true,
95
+ displayOptions: { show: { resource: ['location'] } },
96
+ options: [
97
+ {
98
+ name: 'Create',
99
+ value: 'create',
100
+ description: 'Create a location',
101
+ action: 'Create a location',
102
+ },
103
+ {
104
+ name: 'Delete',
105
+ value: 'delete',
106
+ description: 'Delete a location',
107
+ action: 'Delete a location',
108
+ },
109
+ { name: 'Get', value: 'get', description: 'Get a location by UUID', action: 'Get a location' },
110
+ {
111
+ name: 'Get Many',
112
+ value: 'getAll',
113
+ description: 'Get many locations',
114
+ action: 'Get many locations',
115
+ },
116
+ {
117
+ name: 'Update',
118
+ value: 'update',
119
+ description: 'Update a location',
120
+ action: 'Update a location',
121
+ },
122
+ ],
123
+ default: 'create',
124
+ };
125
+ const roomOperations = {
126
+ displayName: 'Operation',
127
+ name: 'operation',
128
+ type: 'options',
129
+ noDataExpression: true,
130
+ displayOptions: { show: { resource: ['room'] } },
131
+ options: [
132
+ { name: 'Create', value: 'create', description: 'Create a room', action: 'Create a room' },
133
+ { name: 'Delete', value: 'delete', description: 'Delete a room', action: 'Delete a room' },
134
+ { name: 'Get', value: 'get', description: 'Get a room by UUID', action: 'Get a room' },
135
+ { name: 'Get Many', value: 'getAll', description: 'Get many rooms', action: 'Get many rooms' },
136
+ { name: 'Update', value: 'update', description: 'Update a room', action: 'Update a room' },
137
+ ],
138
+ default: 'create',
139
+ };
140
+ const fileOperations = {
141
+ displayName: 'Operation',
142
+ name: 'operation',
143
+ type: 'options',
144
+ noDataExpression: true,
145
+ displayOptions: { show: { resource: ['file'] } },
146
+ options: [
147
+ { name: 'Upload', value: 'upload', description: 'Upload a file', action: 'Upload a file' },
148
+ ],
149
+ default: 'upload',
150
+ };
151
+ class Seventhings {
152
+ constructor() {
153
+ this.description = {
154
+ displayName: 'Seventhings',
155
+ name: 'seventhings',
156
+ icon: { light: 'file:seventhings.svg', dark: 'file:seventhings.dark.svg' },
157
+ group: ['output'],
158
+ version: 1,
159
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
160
+ description: 'Manage assets, tasks, rental cases, locations, rooms and files in seventhings',
161
+ defaults: {
162
+ name: 'Seventhings',
163
+ },
164
+ usableAsTool: true,
165
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
166
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
167
+ credentials: [
168
+ {
169
+ name: 'seventhingsApi',
170
+ required: true,
171
+ },
172
+ ],
173
+ properties: [
174
+ resourceProperty,
175
+ AssetDescription_1.assetOperations,
176
+ taskOperations,
177
+ rentalCaseOperations,
178
+ locationOperations,
179
+ roomOperations,
180
+ fileOperations,
181
+ ...AssetDescription_1.assetFields,
182
+ ...TaskDescription_1.taskFields,
183
+ ...RentalCaseDescription_1.rentalCaseFields,
184
+ ...LocationDescription_1.locationFields,
185
+ ...RoomDescription_1.roomFields,
186
+ ...FileDescription_1.fileFields,
187
+ ],
188
+ };
189
+ this.methods = {
190
+ loadOptions: methods_1.loadOptions,
191
+ listSearch: methods_1.listSearch,
192
+ resourceMapping: methods_1.resourceMapping,
193
+ };
194
+ }
195
+ async execute() {
196
+ const items = this.getInputData();
197
+ const returnData = [];
198
+ for (let i = 0; i < items.length; i++) {
199
+ const resource = this.getNodeParameter('resource', i);
200
+ const operation = this.getNodeParameter('operation', i);
201
+ try {
202
+ if (resource === 'asset' && (0, asset_1.isAssetOperationSupported)(operation)) {
203
+ const results = await asset_1.executeAssetOperation.call(this, operation, i);
204
+ returnData.push(...results);
205
+ continue;
206
+ }
207
+ if (resource === 'task' && (0, task_1.isTaskOperationSupported)(operation)) {
208
+ const results = await task_1.executeTaskOperation.call(this, operation, i);
209
+ returnData.push(...results);
210
+ continue;
211
+ }
212
+ if (resource === 'rentalCase' && (0, rentalCase_1.isRentalCaseOperationSupported)(operation)) {
213
+ const results = await rentalCase_1.executeRentalCaseOperation.call(this, operation, i);
214
+ returnData.push(...results);
215
+ continue;
216
+ }
217
+ if (resource === 'location' && (0, location_1.isLocationOperationSupported)(operation)) {
218
+ const results = await location_1.executeLocationOperation.call(this, operation, i);
219
+ returnData.push(...results);
220
+ continue;
221
+ }
222
+ if (resource === 'room' && (0, room_1.isRoomOperationSupported)(operation)) {
223
+ const results = await room_1.executeRoomOperation.call(this, operation, i);
224
+ returnData.push(...results);
225
+ continue;
226
+ }
227
+ if (resource === 'file' && (0, file_1.isFileOperationSupported)(operation)) {
228
+ const results = await file_1.executeFileOperation.call(this, operation, i);
229
+ returnData.push(...results);
230
+ continue;
231
+ }
232
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" for resource "${resource}" is not implemented yet.`, { itemIndex: i });
233
+ }
234
+ catch (error) {
235
+ if (this.continueOnFail()) {
236
+ returnData.push({
237
+ json: { error: error.message },
238
+ pairedItem: { item: i },
239
+ });
240
+ continue;
241
+ }
242
+ if (error instanceof n8n_workflow_1.NodeOperationError) {
243
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
244
+ }
245
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error, { itemIndex: i });
246
+ }
247
+ }
248
+ return [returnData];
249
+ }
250
+ }
251
+ exports.Seventhings = Seventhings;
@@ -0,0 +1,18 @@
1
+ {
2
+ "node": "n8n-nodes-base.seventhings",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Productivity"],
6
+ "resources": {
7
+ "credentialDocumentation": [
8
+ {
9
+ "url": "https://github.com/seventhingscompany/n8n-nodes-seventhings?tab=readme-ov-file#credentials"
10
+ }
11
+ ],
12
+ "primaryDocumentation": [
13
+ {
14
+ "url": "https://github.com/seventhingscompany/n8n-nodes-seventhings?tab=readme-ov-file"
15
+ }
16
+ ]
17
+ }
18
+ }