@joshuanode/n8n-nodes-immybot 0.0.1

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 (97) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +314 -0
  3. package/dist/credentials/ImmyDotBotOAuth2Api.credentials.d.ts +10 -0
  4. package/dist/credentials/ImmyDotBotOAuth2Api.credentials.d.ts.map +1 -0
  5. package/dist/credentials/ImmyDotBotOAuth2Api.credentials.js +103 -0
  6. package/dist/credentials/ImmyDotBotOAuth2Api.credentials.js.map +1 -0
  7. package/dist/credentials/immybot.png +0 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +19 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/nodes/ImmyBot/ImmyBot.node.d.ts +16 -0
  13. package/dist/nodes/ImmyBot/ImmyBot.node.d.ts.map +1 -0
  14. package/dist/nodes/ImmyBot/ImmyBot.node.js +348 -0
  15. package/dist/nodes/ImmyBot/ImmyBot.node.js.map +1 -0
  16. package/dist/nodes/ImmyBot/immybot.png +0 -0
  17. package/dist/nodes/ImmyBot/resources/ChangeRequest/ChangeRequestRouter.d.ts +3 -0
  18. package/dist/nodes/ImmyBot/resources/ChangeRequest/ChangeRequestRouter.d.ts.map +1 -0
  19. package/dist/nodes/ImmyBot/resources/ChangeRequest/ChangeRequestRouter.js +81 -0
  20. package/dist/nodes/ImmyBot/resources/ChangeRequest/ChangeRequestRouter.js.map +1 -0
  21. package/dist/nodes/ImmyBot/resources/ChangeRequest/index.d.ts +4 -0
  22. package/dist/nodes/ImmyBot/resources/ChangeRequest/index.d.ts.map +1 -0
  23. package/dist/nodes/ImmyBot/resources/ChangeRequest/index.js +189 -0
  24. package/dist/nodes/ImmyBot/resources/ChangeRequest/index.js.map +1 -0
  25. package/dist/nodes/ImmyBot/resources/Computer/ComputerRouter.d.ts +3 -0
  26. package/dist/nodes/ImmyBot/resources/Computer/ComputerRouter.d.ts.map +1 -0
  27. package/dist/nodes/ImmyBot/resources/Computer/ComputerRouter.js +284 -0
  28. package/dist/nodes/ImmyBot/resources/Computer/ComputerRouter.js.map +1 -0
  29. package/dist/nodes/ImmyBot/resources/Computer/index.d.ts +4 -0
  30. package/dist/nodes/ImmyBot/resources/Computer/index.d.ts.map +1 -0
  31. package/dist/nodes/ImmyBot/resources/Computer/index.js +557 -0
  32. package/dist/nodes/ImmyBot/resources/Computer/index.js.map +1 -0
  33. package/dist/nodes/ImmyBot/resources/MaintenanceAction/MaintenanceActionRouter.d.ts +3 -0
  34. package/dist/nodes/ImmyBot/resources/MaintenanceAction/MaintenanceActionRouter.d.ts.map +1 -0
  35. package/dist/nodes/ImmyBot/resources/MaintenanceAction/MaintenanceActionRouter.js +34 -0
  36. package/dist/nodes/ImmyBot/resources/MaintenanceAction/MaintenanceActionRouter.js.map +1 -0
  37. package/dist/nodes/ImmyBot/resources/MaintenanceAction/index.d.ts +4 -0
  38. package/dist/nodes/ImmyBot/resources/MaintenanceAction/index.d.ts.map +1 -0
  39. package/dist/nodes/ImmyBot/resources/MaintenanceAction/index.js +103 -0
  40. package/dist/nodes/ImmyBot/resources/MaintenanceAction/index.js.map +1 -0
  41. package/dist/nodes/ImmyBot/resources/Person/PersonRouter.d.ts +3 -0
  42. package/dist/nodes/ImmyBot/resources/Person/PersonRouter.d.ts.map +1 -0
  43. package/dist/nodes/ImmyBot/resources/Person/PersonRouter.js +34 -0
  44. package/dist/nodes/ImmyBot/resources/Person/PersonRouter.js.map +1 -0
  45. package/dist/nodes/ImmyBot/resources/Person/index.d.ts +4 -0
  46. package/dist/nodes/ImmyBot/resources/Person/index.d.ts.map +1 -0
  47. package/dist/nodes/ImmyBot/resources/Person/index.js +104 -0
  48. package/dist/nodes/ImmyBot/resources/Person/index.js.map +1 -0
  49. package/dist/nodes/ImmyBot/resources/Script/ScriptRouter.d.ts +3 -0
  50. package/dist/nodes/ImmyBot/resources/Script/ScriptRouter.d.ts.map +1 -0
  51. package/dist/nodes/ImmyBot/resources/Script/ScriptRouter.js +38 -0
  52. package/dist/nodes/ImmyBot/resources/Script/ScriptRouter.js.map +1 -0
  53. package/dist/nodes/ImmyBot/resources/Script/index.d.ts +4 -0
  54. package/dist/nodes/ImmyBot/resources/Script/index.d.ts.map +1 -0
  55. package/dist/nodes/ImmyBot/resources/Script/index.js +113 -0
  56. package/dist/nodes/ImmyBot/resources/Script/index.js.map +1 -0
  57. package/dist/nodes/ImmyBot/resources/Software/SoftwareRouter.d.ts +3 -0
  58. package/dist/nodes/ImmyBot/resources/Software/SoftwareRouter.d.ts.map +1 -0
  59. package/dist/nodes/ImmyBot/resources/Software/SoftwareRouter.js +93 -0
  60. package/dist/nodes/ImmyBot/resources/Software/SoftwareRouter.js.map +1 -0
  61. package/dist/nodes/ImmyBot/resources/Software/index.d.ts +4 -0
  62. package/dist/nodes/ImmyBot/resources/Software/index.d.ts.map +1 -0
  63. package/dist/nodes/ImmyBot/resources/Software/index.js +177 -0
  64. package/dist/nodes/ImmyBot/resources/Software/index.js.map +1 -0
  65. package/dist/nodes/ImmyBot/resources/Sync/SyncRouter.d.ts +3 -0
  66. package/dist/nodes/ImmyBot/resources/Sync/SyncRouter.d.ts.map +1 -0
  67. package/dist/nodes/ImmyBot/resources/Sync/SyncRouter.js +43 -0
  68. package/dist/nodes/ImmyBot/resources/Sync/SyncRouter.js.map +1 -0
  69. package/dist/nodes/ImmyBot/resources/Sync/index.d.ts +4 -0
  70. package/dist/nodes/ImmyBot/resources/Sync/index.d.ts.map +1 -0
  71. package/dist/nodes/ImmyBot/resources/Sync/index.js +73 -0
  72. package/dist/nodes/ImmyBot/resources/Sync/index.js.map +1 -0
  73. package/dist/nodes/ImmyBot/resources/Tag/TagRouter.d.ts +3 -0
  74. package/dist/nodes/ImmyBot/resources/Tag/TagRouter.d.ts.map +1 -0
  75. package/dist/nodes/ImmyBot/resources/Tag/TagRouter.js +34 -0
  76. package/dist/nodes/ImmyBot/resources/Tag/TagRouter.js.map +1 -0
  77. package/dist/nodes/ImmyBot/resources/Tag/index.d.ts +4 -0
  78. package/dist/nodes/ImmyBot/resources/Tag/index.d.ts.map +1 -0
  79. package/dist/nodes/ImmyBot/resources/Tag/index.js +104 -0
  80. package/dist/nodes/ImmyBot/resources/Tag/index.js.map +1 -0
  81. package/dist/nodes/ImmyBot/resources/Tenant/TenantRouter.d.ts +3 -0
  82. package/dist/nodes/ImmyBot/resources/Tenant/TenantRouter.d.ts.map +1 -0
  83. package/dist/nodes/ImmyBot/resources/Tenant/TenantRouter.js +85 -0
  84. package/dist/nodes/ImmyBot/resources/Tenant/TenantRouter.js.map +1 -0
  85. package/dist/nodes/ImmyBot/resources/Tenant/index.d.ts +4 -0
  86. package/dist/nodes/ImmyBot/resources/Tenant/index.d.ts.map +1 -0
  87. package/dist/nodes/ImmyBot/resources/Tenant/index.js +178 -0
  88. package/dist/nodes/ImmyBot/resources/Tenant/index.js.map +1 -0
  89. package/dist/nodes/ImmyBot/resources/User/UserRouter.d.ts +3 -0
  90. package/dist/nodes/ImmyBot/resources/User/UserRouter.d.ts.map +1 -0
  91. package/dist/nodes/ImmyBot/resources/User/UserRouter.js +167 -0
  92. package/dist/nodes/ImmyBot/resources/User/UserRouter.js.map +1 -0
  93. package/dist/nodes/ImmyBot/resources/User/index.d.ts +4 -0
  94. package/dist/nodes/ImmyBot/resources/User/index.d.ts.map +1 -0
  95. package/dist/nodes/ImmyBot/resources/User/index.js +344 -0
  96. package/dist/nodes/ImmyBot/resources/User/index.js.map +1 -0
  97. package/package.json +61 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Joshua
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,314 @@
1
+ # @joshuanode/n8n-nodes-immybot
2
+
3
+ [![NPM Version](https://img.shields.io/npm/v/@joshuanode/n8n-nodes-immybot)](https://www.npmjs.com/package/@joshuanode/n8n-nodes-immybot)
4
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
5
+ [![n8n Community Node](https://img.shields.io/badge/n8n-community%20node-00D4AA)](https://n8n.io)
6
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)](https://www.typescriptlang.org/)
7
+
8
+ This is an n8n community node for [ImmyBot](https://immy.bot), the intelligent IT automation and management platform. It enables automated workflows for computer management, software deployment, maintenance actions, and more within n8n.
9
+
10
+ ## Features
11
+
12
+ | Feature | Description |
13
+ |---------|-------------|
14
+ | **Computer Management** | Complete computer lifecycle management with 20+ operations including inventory, status monitoring, and configuration |
15
+ | **Change Request Workflow** | Full change request approval workflow with approve, deny, require changes, and commenting capabilities |
16
+ | **Multi-Tenant Support** | Manage computers and resources across multiple tenants with tenant-specific operations |
17
+ | **Dynamic Dropdowns** | Resource locators with searchable dropdowns for computers, tenants, persons, tags, users, and more |
18
+ | **Tag Management** | Bulk add/remove tags to organize and categorize computers |
19
+ | **Maintenance Operations** | Monitor and retrieve maintenance actions and session data |
20
+ | **Software Management** | Comprehensive local and global software operations including create, retrieve, and delete with pagination |
21
+ | **User Management** | Full user lifecycle including creation, roles, permissions, and access control with 12 operations |
22
+ | **Sync Operations** | Trigger Azure user sync and user affinity sync across tenants |
23
+ | **Script Management** | Query and manage deployment and inventory scripts |
24
+ | **Person Management** | Associate users with computers and manage primary/additional persons |
25
+ | **Bulk Operations** | Efficiently manage multiple computers and users with bulk delete, restore, and tenant change operations |
26
+ | **Pagination Controls** | All list operations support Return All or configurable limits (max 500) to handle large datasets efficiently |
27
+
28
+ ## Installation
29
+
30
+ ### Community Nodes (Recommended)
31
+
32
+ 1. Open n8n and navigate to **Settings** → **Community Nodes**
33
+ 2. Click **Install** and search for `@joshuanode/n8n-nodes-immybot`
34
+ 3. Click **Install** to add the node to your n8n instance
35
+
36
+ ### Manual Installation
37
+
38
+ ```bash
39
+ npm install @joshuanode/n8n-nodes-immybot
40
+ ```
41
+
42
+ ## Credentials
43
+
44
+ ### Setting up Immy.Bot OAuth2 API Credentials
45
+
46
+ This node uses Azure AD OAuth2 authentication. To configure:
47
+
48
+ 1. **Create Azure AD App Registration**:
49
+ - Navigate to [Microsoft Entra ID](https://portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/Overview)
50
+ - Go to **App registrations** → **New registration**
51
+ - Enter a name (e.g., "n8n ImmyBot Integration")
52
+ - Use default settings and click **Register**
53
+
54
+ 2. **Generate Client Secret**:
55
+ - In your app registration, go to **Certificates & secrets**
56
+ - Click **New client secret**
57
+ - Add a description and expiration period
58
+ - Copy the **Value** (not the Secret ID)
59
+
60
+ 3. **Collect Required Information**:
61
+ - **Azure AD Tenant ID**: Found in your app registration's **Overview** page
62
+ - **Client ID**: The Application (client) ID from **Overview**
63
+ - **Client Secret**: The value you copied in step 2
64
+ - **ImmyBot Subdomain**: Your ImmyBot subdomain (e.g., "yourcompany" for yourcompany.immy.bot)
65
+
66
+ 4. **Configure in n8n**:
67
+ - Create a new **Immy.Bot OAuth2 API** credential
68
+ - Enter the Azure AD Tenant ID, Client ID, Client Secret, and Subdomain
69
+ - Test the connection
70
+
71
+ For detailed setup instructions, see the [ImmyBot API Documentation](https://docs.immy.bot/Documentation/Reference/api-documentation.html).
72
+
73
+ **Note:** The OAuth2 token is automatically acquired and refreshed by the node.
74
+
75
+ ## Operations by Resource
76
+
77
+ ### Change Request (7 operations)
78
+
79
+ | Operation | Description |
80
+ |-----------|-------------|
81
+ | Approve | Approve a change request |
82
+ | Deny | Deny a change request with optional reason |
83
+ | Require Changes | Request changes to a change request with comment |
84
+ | Comment | Add a comment to a change request |
85
+ | Delete | Delete a change request |
86
+ | Get Many | List change requests with status filtering and pagination |
87
+ | Get Open Count | Get count of open change requests |
88
+
89
+ ### Computer (20 operations)
90
+
91
+ | Operation | Description |
92
+ |-----------|-------------|
93
+ | Get | Retrieve a single computer by ID |
94
+ | Get Many | List computers with optional filtering by name or tenant |
95
+ | Update | Update computer properties including name, tenant, and maintenance settings |
96
+ | Get Status | Get current status and health information for a computer |
97
+ | Get Events | Retrieve event history for a computer |
98
+ | Get Detected Software | List all software detected on a computer |
99
+ | Get Inventory | Retrieve inventory data across all computers |
100
+ | Get Inventory Script Results | Get results from custom inventory scripts |
101
+ | Get User Affinities | View user affinity relationships across computers |
102
+ | Get Agent Status | Check ImmyBot agent connectivity status |
103
+ | Add Tags | Add tags to one or multiple computers |
104
+ | Remove Tags | Remove tags from computers |
105
+ | Change Tenant | Move computers to a different tenant |
106
+ | Bulk Delete | Delete multiple computers at once |
107
+ | Restore | Restore previously deleted computers |
108
+ | Reinventory | Trigger a new inventory scan for a computer |
109
+ | Set to Needs Onboarding | Mark a computer for onboarding |
110
+ | Skip Onboarding | Skip the onboarding process for computers |
111
+ | Update Primary Person | Assign or update the primary user for a computer |
112
+ | Update Additional Persons | Manage additional users associated with a computer |
113
+
114
+ ### Tenant (5 operations)
115
+
116
+ | Operation | Description |
117
+ |-----------|-------------|
118
+ | Get | Retrieve a single tenant by ID |
119
+ | Get Many | List all tenants |
120
+ | Create | Create a new tenant |
121
+ | Update | Update tenant properties |
122
+ | Bulk Delete | Delete multiple tenants |
123
+
124
+ ### Software (8 operations)
125
+
126
+ | Operation | Description |
127
+ |-----------|-------------|
128
+ | Get Global Software | Retrieve global software by identifier |
129
+ | Get Local Software | Retrieve local software by identifier |
130
+ | Get Many Global | List global software items with pagination |
131
+ | Get Many Local | List local software items with pagination |
132
+ | Create Global Software | Create a new global software item |
133
+ | Create Local Software | Create a new local software item |
134
+ | Delete Global Software | Delete a global software item |
135
+ | Delete Local Software | Delete a local software item |
136
+
137
+ ### Sync (2 operations)
138
+
139
+ | Operation | Description |
140
+ |-----------|-------------|
141
+ | Trigger Azure User Sync | Trigger Azure user synchronization for tenants |
142
+ | Trigger User Affinity Sync | Trigger user affinity synchronization |
143
+
144
+ ### User (12 operations)
145
+
146
+ | Operation | Description |
147
+ |-----------|-------------|
148
+ | Get | Retrieve a user by ID |
149
+ | Get Many | List users with pagination |
150
+ | Create from Person | Create a user account from a person record |
151
+ | Update | Update user details |
152
+ | Delete | Delete a user account |
153
+ | Bulk Delete | Delete multiple users at once |
154
+ | Get Claims | Retrieve user claims and permissions |
155
+ | Add Roles | Add roles to a user |
156
+ | Remove Roles | Remove roles from a user |
157
+ | Grant Access | Grant tenant access to a user |
158
+ | Update Expiration | Update user access expiration date |
159
+ | Invalidate Cache | Invalidate user cache |
160
+
161
+ ### Maintenance Action (2 operations)
162
+
163
+ | Operation | Description |
164
+ |-----------|-------------|
165
+ | Get Latest for Computer | Get the most recent maintenance action for a computer |
166
+ | Get Many | List maintenance actions across all computers |
167
+
168
+ ### Person (2 operations)
169
+
170
+ | Operation | Description |
171
+ |-----------|-------------|
172
+ | Get | Retrieve person details by ID |
173
+ | Get Many | List all persons |
174
+
175
+ ### Script (3 operations)
176
+
177
+ | Operation | Description |
178
+ |-----------|-------------|
179
+ | Get Global Script | Retrieve a global script by ID |
180
+ | Get Local Script | Retrieve a local script by ID |
181
+ | Get Many | List scripts with database type filtering (Global, Local, or Both) and pagination |
182
+
183
+ ### Tag (2 operations)
184
+
185
+ | Operation | Description |
186
+ |-----------|-------------|
187
+ | Get | Retrieve tag details by ID |
188
+ | Get Many | List all tags |
189
+
190
+ ## Usage Examples
191
+
192
+ ### Example 1: Monitor Computer Health
193
+
194
+ ```
195
+ Trigger (Schedule) → ImmyBot (Computer: Get Many) → Filter (Status = Offline) → Send Alert
196
+ ```
197
+
198
+ This workflow runs on a schedule, retrieves all computers, filters for offline devices, and sends alerts.
199
+
200
+ ### Example 2: Automated Tagging
201
+
202
+ ```
203
+ Webhook → ImmyBot (Computer: Get by ID) → Conditional → ImmyBot (Computer: Add Tags)
204
+ ```
205
+
206
+ When a webhook is triggered, fetch computer details and automatically apply tags based on conditions.
207
+
208
+ ### Example 3: Software Inventory Report
209
+
210
+ ```
211
+ Schedule → ImmyBot (Computer: Get Many) → ImmyBot (Computer: Get Detected Software) → Export to CSV
212
+ ```
213
+
214
+ Generate regular reports of installed software across all managed computers.
215
+
216
+ ### Example 4: Bulk Tenant Migration
217
+
218
+ ```
219
+ Manual Trigger → ImmyBot (Computer: Get Many, Filter by Tenant) → ImmyBot (Computer: Change Tenant)
220
+ ```
221
+
222
+ Move multiple computers from one tenant to another with a single workflow execution.
223
+
224
+ ## Architecture
225
+
226
+ ```
227
+ ┌─────────────┐ ┌──────────────┐ ┌─────────────────┐
228
+ │ n8n │ │ ImmyBot │ │ ImmyBot API │
229
+ │ Workflow │────────▶│ Node │────────▶│ v1 │
230
+ │ │ │ │ │ │
231
+ └─────────────┘ └──────────────┘ └─────────────────┘
232
+
233
+
234
+ ┌──────▼──────┐
235
+ │ Resource │
236
+ │ Locators & │
237
+ │ List Search│
238
+ └─────────────┘
239
+ ```
240
+
241
+ ## Features in Detail
242
+
243
+ ### Resource Locators
244
+
245
+ All ID-based parameters use resource locators with three modes:
246
+
247
+ - **From List**: Searchable dropdown populated from your ImmyBot instance
248
+ - **By ID**: Direct numeric ID input with validation
249
+ - **By URL**: Extract ID from ImmyBot URLs (for Computer resource)
250
+
251
+ ### Filtering & Pagination
252
+
253
+ List operations support:
254
+
255
+ - **Return All**: Retrieve all results (use with caution for large datasets)
256
+ - **Limit**: Specify maximum number of results to return
257
+ - **Filters**: Resource-specific filters (e.g., filter computers by name or tenant)
258
+
259
+ ### Error Handling
260
+
261
+ The node implements proper error handling and supports n8n's **Continue on Fail** mode, allowing workflows to proceed even when individual operations fail.
262
+
263
+ ## Development
264
+
265
+ ```bash
266
+ # Install dependencies
267
+ npm install
268
+
269
+ # Build the node
270
+ npm run build
271
+
272
+ # Lint the code
273
+ npm run lint
274
+
275
+ # Lint and fix issues
276
+ npm run lintfix
277
+ ```
278
+
279
+ ## Resources
280
+
281
+ - [ImmyBot Documentation](https://docs.immy.bot/)
282
+ - [ImmyBot API Reference](https://docs.immy.bot/api)
283
+ - [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
284
+ - [n8n Node Development Guide](https://docs.n8n.io/integrations/creating-nodes/)
285
+
286
+ ## Compatibility
287
+
288
+ - **n8n version**: 0.220.0 or later
289
+ - **Node.js version**: 18.17.0 or later
290
+ - **ImmyBot API**: v1
291
+
292
+ ## License
293
+
294
+ [MIT](LICENSE)
295
+
296
+ ## Contributing
297
+
298
+ Contributions are welcome! Please feel free to submit a Pull Request.
299
+
300
+ ## Support
301
+
302
+ For issues, questions, or feature requests, please:
303
+
304
+ 1. Check the [ImmyBot Documentation](https://docs.immy.bot/)
305
+ 2. Review existing [GitHub Issues](https://github.com/ajoshuasmith/n8n-nodes-immybot/issues)
306
+ 3. Create a new issue with detailed information about your problem or request
307
+
308
+ ## Acknowledgments
309
+
310
+ Built with the [n8n-node-dev](https://www.npmjs.com/package/n8n-node-dev) CLI tool.
311
+
312
+ ---
313
+
314
+ **Note:** This is a community-maintained node and is not officially supported by ImmyBot or n8n.io.
@@ -0,0 +1,10 @@
1
+ import type { ICredentialType, INodeProperties, ICredentialTestRequest, ICredentialDataDecryptedObject, IHttpRequestOptions } from 'n8n-workflow';
2
+ export declare class ImmyDotBotOAuth2Api implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate(credentials: ICredentialDataDecryptedObject, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
8
+ test: ICredentialTestRequest;
9
+ }
10
+ //# sourceMappingURL=ImmyDotBotOAuth2Api.credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImmyDotBotOAuth2Api.credentials.d.ts","sourceRoot":"","sources":["../../src/credentials/ImmyDotBotOAuth2Api.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,8BAA8B,EAC9B,mBAAmB,EACnB,MAAM,cAAc,CAAC;AAEtB,qBAAa,mBAAoB,YAAW,eAAe;IAC1D,IAAI,SAAyB;IAE7B,WAAW,SAAyB;IAEpC,gBAAgB,SAA0E;IAE1F,UAAU,EAAE,eAAe,EAAE,CAuC3B;IAEI,YAAY,CACjB,WAAW,EAAE,8BAA8B,EAC3C,cAAc,EAAE,mBAAmB,GACjC,OAAO,CAAC,mBAAmB,CAAC;IAkD/B,IAAI,EAAE,sBAAsB,CAM1B;CACF"}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImmyDotBotOAuth2Api = void 0;
4
+ class ImmyDotBotOAuth2Api {
5
+ name = 'immyDotBotOAuth2Api';
6
+ displayName = 'Immy.Bot OAuth2 API';
7
+ documentationUrl = 'https://docs.immy.bot/Documentation/Reference/api-documentation.html';
8
+ properties = [
9
+ {
10
+ displayName: 'Azure AD Tenant ID',
11
+ name: 'tenantId',
12
+ type: 'string',
13
+ default: '',
14
+ placeholder: 'd5f1dedc-dfd0-4377-a269-31d08dfa8f12',
15
+ description: 'The Azure AD Tenant ID from your Microsoft Entra ID',
16
+ required: true,
17
+ },
18
+ {
19
+ displayName: 'Client ID',
20
+ name: 'clientId',
21
+ type: 'string',
22
+ default: '',
23
+ placeholder: 'e95c3890-08cc-4d38-87f1-97736e2ff6f1',
24
+ description: 'Application (Client) ID from your Azure App Registration',
25
+ required: true,
26
+ },
27
+ {
28
+ displayName: 'Client Secret',
29
+ name: 'clientSecret',
30
+ type: 'string',
31
+ typeOptions: {
32
+ password: true,
33
+ },
34
+ default: '',
35
+ description: 'Client secret value generated in Azure App Registration → Certificates & Secrets',
36
+ required: true,
37
+ },
38
+ {
39
+ displayName: 'ImmyBot Subdomain',
40
+ name: 'subdomain',
41
+ type: 'string',
42
+ default: '',
43
+ placeholder: 'schillingit',
44
+ description: 'Your ImmyBot subdomain (e.g., "schillingit" for schillingit.immy.bot)',
45
+ required: true,
46
+ },
47
+ ];
48
+ async authenticate(credentials, requestOptions) {
49
+ // Get OAuth2 token from Azure AD
50
+ const tokenUrl = `https://login.microsoftonline.com/${credentials.tenantId}/oauth2/v2.0/token`;
51
+ const scope = `https://${credentials.subdomain}.immy.bot/.default`;
52
+ const tokenBody = new URLSearchParams({
53
+ grant_type: 'client_credentials',
54
+ client_id: credentials.clientId,
55
+ client_secret: credentials.clientSecret,
56
+ scope: scope,
57
+ });
58
+ // Make token request using this.helpers if available, otherwise use fetch
59
+ let tokenResponse;
60
+ try {
61
+ // Try to use n8n helpers if available
62
+ if (this.helpers?.httpRequest) {
63
+ tokenResponse = await this.helpers.httpRequest({
64
+ method: 'POST',
65
+ url: tokenUrl,
66
+ headers: {
67
+ 'Content-Type': 'application/x-www-form-urlencoded',
68
+ },
69
+ body: tokenBody.toString(),
70
+ });
71
+ }
72
+ else {
73
+ // Fallback to fetch
74
+ const response = await fetch(tokenUrl, {
75
+ method: 'POST',
76
+ headers: {
77
+ 'Content-Type': 'application/x-www-form-urlencoded',
78
+ },
79
+ body: tokenBody.toString(),
80
+ });
81
+ tokenResponse = await response.json();
82
+ }
83
+ }
84
+ catch (error) {
85
+ throw new Error(`Failed to acquire OAuth2 token: ${error.message}`);
86
+ }
87
+ // Add Bearer token to request
88
+ if (!requestOptions.headers) {
89
+ requestOptions.headers = {};
90
+ }
91
+ requestOptions.headers['Authorization'] = `Bearer ${tokenResponse.access_token}`;
92
+ return requestOptions;
93
+ }
94
+ test = {
95
+ request: {
96
+ baseURL: '=https://{{$credentials.subdomain}}.immy.bot',
97
+ url: '/api/v1/tenants',
98
+ method: 'GET',
99
+ },
100
+ };
101
+ }
102
+ exports.ImmyDotBotOAuth2Api = ImmyDotBotOAuth2Api;
103
+ //# sourceMappingURL=ImmyDotBotOAuth2Api.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImmyDotBotOAuth2Api.credentials.js","sourceRoot":"","sources":["../../src/credentials/ImmyDotBotOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,mBAAmB;IAC/B,IAAI,GAAG,qBAAqB,CAAC;IAE7B,WAAW,GAAG,qBAAqB,CAAC;IAEpC,gBAAgB,GAAG,sEAAsE,CAAC;IAE1F,UAAU,GAAsB;QAC/B;YACC,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,sCAAsC;YACnD,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE,IAAI;SACd;QACD;YACC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,sCAAsC;YACnD,WAAW,EAAE,0DAA0D;YACvE,QAAQ,EAAE,IAAI;SACd;QACD;YACC,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE;gBACZ,QAAQ,EAAE,IAAI;aACd;YACD,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,kFAAkF;YAC/F,QAAQ,EAAE,IAAI;SACd;QACD;YACC,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,uEAAuE;YACpF,QAAQ,EAAE,IAAI;SACd;KACD,CAAC;IAEF,KAAK,CAAC,YAAY,CACjB,WAA2C,EAC3C,cAAmC;QAEnC,iCAAiC;QACjC,MAAM,QAAQ,GAAG,qCAAqC,WAAW,CAAC,QAAQ,oBAAoB,CAAC;QAC/F,MAAM,KAAK,GAAG,WAAW,WAAW,CAAC,SAAS,oBAAoB,CAAC;QAEnE,MAAM,SAAS,GAAG,IAAI,eAAe,CAAC;YACrC,UAAU,EAAE,oBAAoB;YAChC,SAAS,EAAE,WAAW,CAAC,QAAkB;YACzC,aAAa,EAAE,WAAW,CAAC,YAAsB;YACjD,KAAK,EAAE,KAAK;SACZ,CAAC,CAAC;QAEH,0EAA0E;QAC1E,IAAI,aAAa,CAAC;QAClB,IAAI,CAAC;YACJ,sCAAsC;YACtC,IAAK,IAAY,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC;gBACxC,aAAa,GAAG,MAAO,IAAY,CAAC,OAAO,CAAC,WAAW,CAAC;oBACvD,MAAM,EAAE,MAAM;oBACd,GAAG,EAAE,QAAQ;oBACb,OAAO,EAAE;wBACR,cAAc,EAAE,mCAAmC;qBACnD;oBACD,IAAI,EAAE,SAAS,CAAC,QAAQ,EAAE;iBAC1B,CAAC,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACP,oBAAoB;gBACpB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,QAAQ,EAAE;oBACtC,MAAM,EAAE,MAAM;oBACd,OAAO,EAAE;wBACR,cAAc,EAAE,mCAAmC;qBACnD;oBACD,IAAI,EAAE,SAAS,CAAC,QAAQ,EAAE;iBAC1B,CAAC,CAAC;gBACH,aAAa,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACvC,CAAC;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,mCAAoC,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;QAChF,CAAC;QAED,8BAA8B;QAC9B,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;YAC7B,cAAc,CAAC,OAAO,GAAG,EAAE,CAAC;QAC7B,CAAC;QAED,cAAc,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,aAAa,CAAC,YAAY,EAAE,CAAC;QAEjF,OAAO,cAAc,CAAC;IACvB,CAAC;IAED,IAAI,GAA2B;QAC9B,OAAO,EAAE;YACR,OAAO,EAAE,8CAA8C;YACvD,GAAG,EAAE,iBAAiB;YACtB,MAAM,EAAE,KAAK;SACb;KACD,CAAC;CACF;AA5GD,kDA4GC"}
Binary file
@@ -0,0 +1,3 @@
1
+ export * from './credentials/ImmyDotBotOAuth2Api.credentials';
2
+ export * from './nodes/ImmyBot/ImmyBot.node';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAC;AAC9D,cAAc,8BAA8B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./credentials/ImmyDotBotOAuth2Api.credentials"), exports);
18
+ __exportStar(require("./nodes/ImmyBot/ImmyBot.node"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gFAA8D;AAC9D,+DAA6C"}
@@ -0,0 +1,16 @@
1
+ import type { IExecuteFunctions, ILoadOptionsFunctions, INodeType, INodeTypeDescription, INodeExecutionData, INodeListSearchResult } from 'n8n-workflow';
2
+ export declare class ImmyBot implements INodeType {
3
+ description: INodeTypeDescription;
4
+ methods: {
5
+ listSearch: {
6
+ getComputers(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
7
+ getTenants(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
8
+ getPersons(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
9
+ getTags(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
10
+ getSoftware(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
11
+ getUsers(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
12
+ };
13
+ };
14
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
15
+ }
16
+ //# sourceMappingURL=ImmyBot.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImmyBot.node.d.ts","sourceRoot":"","sources":["../../../src/nodes/ImmyBot/ImmyBot.node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,qBAAqB,EACrB,SAAS,EACT,oBAAoB,EACpB,kBAAkB,EAElB,qBAAqB,EACrB,MAAM,cAAc,CAAC;AAatB,qBAAa,OAAQ,YAAW,SAAS;IACxC,WAAW,EAAE,oBAAoB,CAiG/B;IAEF,OAAO;;+BAEoB,qBAAqB,WAAW,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;6BA2BzE,qBAAqB,WAAW,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;6BAwBvE,qBAAqB,WAAW,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;0BA6B1E,qBAAqB,WAAW,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;8BAwBnE,qBAAqB,WAAW,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;2BAwB1E,qBAAqB,WAAW,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;;MA8B5F;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CA2GvE"}