@affeldt28/n8n-nodes-ninjaone 1.0.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.
- package/LICENSE.md +19 -0
- package/README.md +85 -0
- package/dist/credentials/NinjaoneApi.credentials.d.ts +13 -0
- package/dist/credentials/NinjaoneApi.credentials.js +207 -0
- package/dist/credentials/NinjaoneApi.credentials.js.map +1 -0
- package/dist/icons/ninjaone.svg +23 -0
- package/dist/nodes/ninjaone/Ninjaone.json +25 -0
- package/dist/nodes/ninjaone/Ninjaone.node.d.ts +5 -0
- package/dist/nodes/ninjaone/Ninjaone.node.js +52 -0
- package/dist/nodes/ninjaone/Ninjaone.node.js.map +1 -0
- package/dist/nodes/ninjaone/descriptions/index.d.ts +1 -0
- package/dist/nodes/ninjaone/descriptions/index.js +38 -0
- package/dist/nodes/ninjaone/descriptions/index.js.map +1 -0
- package/dist/nodes/ninjaone/descriptions/organizations/Organizations.resource.d.ts +2 -0
- package/dist/nodes/ninjaone/descriptions/organizations/Organizations.resource.js +67 -0
- package/dist/nodes/ninjaone/descriptions/organizations/Organizations.resource.js.map +1 -0
- package/dist/nodes/ninjaone/descriptions/organizations/getAll.operation.d.ts +29 -0
- package/dist/nodes/ninjaone/descriptions/organizations/getAll.operation.js +13 -0
- package/dist/nodes/ninjaone/descriptions/organizations/getAll.operation.js.map +1 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/buyerReference.d.ts +2 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/buyerReference.js +18 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/buyerReference.js.map +1 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/externalDocumentNumber.d.ts +2 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/externalDocumentNumber.js +18 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/externalDocumentNumber.js.map +1 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/index.d.ts +4 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/index.js +21 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/index.js.map +1 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/limit.d.ts +2 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/limit.js +49 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/limit.js.map +1 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/period.d.ts +2 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/period.js +32 -0
- package/dist/nodes/ninjaone/descriptions/shared/QueryParameter/period.js.map +1 -0
- package/dist/package.json +58 -0
- package/package.json +58 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright 2022 n8n
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
8
|
+
so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# n8n-nodes-ninjaone
|
|
2
|
+
|
|
3
|
+
This is an n8n community node. It lets you use NinjaOne in your n8n workflows.
|
|
4
|
+
|
|
5
|
+
NinjaOne is a cloud-based IT management platform that provides remote monitoring and management (RMM) capabilities for IT professionals. It allows users to monitor, manage, and support their IT infrastructure and endpoints remotely.
|
|
6
|
+
|
|
7
|
+
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
|
|
8
|
+
|
|
9
|
+
[Installation](#installation)
|
|
10
|
+
[Operations](#operations)
|
|
11
|
+
[Credentials](#credentials)
|
|
12
|
+
[Compatibility](#compatibility)
|
|
13
|
+
[Usage](#usage)
|
|
14
|
+
[Resources](#resources)
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
|
19
|
+
|
|
20
|
+
## Operations
|
|
21
|
+
|
|
22
|
+
The node currently supports the following operation:
|
|
23
|
+
|
|
24
|
+
### Organizations
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
| Operation | API | Implemented |
|
|
28
|
+
| ------------------ | ----------------------------------------------------------------------------------------------------- | ----------- |
|
|
29
|
+
| List organizations | [GET /v2/organizations](https://app.ninjarmm.com/apidocs/?links.active=core#/system/getOrganizations) | ✅ |
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## Credentials
|
|
33
|
+
|
|
34
|
+
Create a **NinjaOne API** credential in n8n using the client credentials from your NinjaOne portal.
|
|
35
|
+
|
|
36
|
+
1. Select the **Region** matching your NinjaOne instance.
|
|
37
|
+
2. Enter your **Client Id** and **Client Secret**.
|
|
38
|
+
3. Set **Grant Type** to **Client Credentials** for a client credentials integration.
|
|
39
|
+
4. Select the **Scope** configured for your API client. The default is **Monitoring** (`monitoring`); the credential also offers **Management** (`management`) and **Control** (`control`).
|
|
40
|
+
5. Save and test the credential. The test requests `GET /v2/organizations`, so the client must have access to this endpoint.
|
|
41
|
+
|
|
42
|
+
### Regions
|
|
43
|
+
|
|
44
|
+
The credential offers these region values:
|
|
45
|
+
|
|
46
|
+
| Region | Value |
|
|
47
|
+
| -------------------- | ----- |
|
|
48
|
+
| USA Standard | `app` |
|
|
49
|
+
| USA | `us2` |
|
|
50
|
+
| Europe / Middle East | `eu` |
|
|
51
|
+
| Canada | `ca` |
|
|
52
|
+
| Australia / Oceania | `oc` |
|
|
53
|
+
| Japan | `jp` |
|
|
54
|
+
| Government | `fed` |
|
|
55
|
+
|
|
56
|
+
The node builds the API base URL as `https://<region>.ninjarmm.com/v2` and requests an access token from `https://<region>.ninjarmm.com/ws/oauth/token`. API requests use the returned token in the `Authorization: Bearer` header.
|
|
57
|
+
|
|
58
|
+
### Other grant types
|
|
59
|
+
|
|
60
|
+
The credential also accepts manually supplied values for:
|
|
61
|
+
|
|
62
|
+
- **Authorization Code**: Select this grant type and enter the **Code** and matching **Redirect URI**.
|
|
63
|
+
- **Refresh Token**: Select this grant type and enter the **Refresh Token**.
|
|
64
|
+
|
|
65
|
+
The credential does not provide an interactive browser authorization flow or persist newly returned refresh tokens. The **Redirect URI** field defaults to `https://localhost` and is only sent for the authorization code grant.
|
|
66
|
+
|
|
67
|
+
## Compatibility
|
|
68
|
+
|
|
69
|
+
This package uses the n8n community node API version 1 and depends on `n8n-workflow`.
|
|
70
|
+
|
|
71
|
+
No specific minimum n8n version is pinned in this package yet.
|
|
72
|
+
|
|
73
|
+
## Usage
|
|
74
|
+
|
|
75
|
+
1. Add the **NinjaOne** node to your workflow.
|
|
76
|
+
2. Select your **NinjaOne API** credential.
|
|
77
|
+
3. Set **Resource** to **Organizations**.
|
|
78
|
+
4. Set **Operation** to **Get Many**.
|
|
79
|
+
5. Execute the node to retrieve organizations and use the response in subsequent workflow steps.
|
|
80
|
+
|
|
81
|
+
## Resources
|
|
82
|
+
|
|
83
|
+
- [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
|
|
84
|
+
- [NinjaOne](https://www.ninjaone.com/)
|
|
85
|
+
- [NinjaOne API documentation](https://app.ninjarmm.com/apidocs/)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, ICredentialDataDecryptedObject, ICredentialTestRequest, ICredentialType, Icon, IHttpRequestHelper, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class NinjaoneApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
icon: Icon;
|
|
6
|
+
documentationUrl: string;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
preAuthentication(this: IHttpRequestHelper, credentials: ICredentialDataDecryptedObject): Promise<{
|
|
9
|
+
accessToken: string;
|
|
10
|
+
}>;
|
|
11
|
+
authenticate: IAuthenticateGeneric;
|
|
12
|
+
test: ICredentialTestRequest;
|
|
13
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NinjaoneApi = void 0;
|
|
4
|
+
class NinjaoneApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'ninjaoneApi';
|
|
7
|
+
this.displayName = 'NinjaOne API';
|
|
8
|
+
this.icon = { light: 'file:../icons/ninjaone.svg', dark: 'file:../icons/ninjaone.svg' };
|
|
9
|
+
this.documentationUrl = 'https://www.ninjaone.com/de/services/ninjaone-api/';
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Region',
|
|
13
|
+
name: 'region',
|
|
14
|
+
type: 'options',
|
|
15
|
+
typeOptions: { password: false },
|
|
16
|
+
required: true,
|
|
17
|
+
default: '',
|
|
18
|
+
description: '',
|
|
19
|
+
options: [
|
|
20
|
+
{
|
|
21
|
+
name: 'USA Standard (app)',
|
|
22
|
+
value: 'app',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'USA (us2)',
|
|
26
|
+
value: 'us2',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Europa / Middle East (eu)',
|
|
30
|
+
value: 'eu',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'Canada (ca)',
|
|
34
|
+
value: 'ca',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'Australia / Oceania (oc)',
|
|
38
|
+
value: 'oc',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Japan (jp)',
|
|
42
|
+
value: 'jp',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'Government (fed)',
|
|
46
|
+
value: 'fed',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
displayName: 'Client Id',
|
|
52
|
+
name: 'clientId',
|
|
53
|
+
type: 'string',
|
|
54
|
+
typeOptions: { password: false },
|
|
55
|
+
required: true,
|
|
56
|
+
default: '',
|
|
57
|
+
description: 'Client Id can be created in the NinjaOne portal.',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
displayName: 'Client Secret',
|
|
61
|
+
name: 'clientSecret',
|
|
62
|
+
type: 'string',
|
|
63
|
+
typeOptions: { password: true },
|
|
64
|
+
default: '',
|
|
65
|
+
description: 'Client secret can be created in the NinjaOne portal.',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
displayName: 'Redirect URI',
|
|
69
|
+
name: 'redirectUri',
|
|
70
|
+
type: 'string',
|
|
71
|
+
default: 'https://localhost',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: 'Scope',
|
|
75
|
+
name: 'scope',
|
|
76
|
+
type: 'multiOptions',
|
|
77
|
+
default: ['monitoring'],
|
|
78
|
+
options: [
|
|
79
|
+
{
|
|
80
|
+
name: 'Monitoring',
|
|
81
|
+
value: 'monitoring',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'Management',
|
|
85
|
+
value: 'management',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'Control',
|
|
89
|
+
value: 'control',
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
displayName: 'Grant Type',
|
|
95
|
+
name: 'grantType',
|
|
96
|
+
type: 'options',
|
|
97
|
+
default: 'client_credentials',
|
|
98
|
+
required: true,
|
|
99
|
+
options: [
|
|
100
|
+
{
|
|
101
|
+
name: 'Authorization Code',
|
|
102
|
+
value: 'authorization_code',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: 'Client Credentials',
|
|
106
|
+
value: 'client_credentials',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'Refresh Token',
|
|
110
|
+
value: 'refresh_token',
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
displayName: 'Code',
|
|
116
|
+
name: 'code',
|
|
117
|
+
type: 'string',
|
|
118
|
+
default: '',
|
|
119
|
+
displayOptions: {
|
|
120
|
+
show: {
|
|
121
|
+
grantType: ['authorization_code'],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
displayName: 'Refresh Token',
|
|
127
|
+
name: 'refresh_token',
|
|
128
|
+
type: 'string',
|
|
129
|
+
default: '',
|
|
130
|
+
displayOptions: {
|
|
131
|
+
show: {
|
|
132
|
+
grantType: ['refresh_token'],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
displayName: 'Access Token',
|
|
138
|
+
name: 'accessToken',
|
|
139
|
+
type: 'hidden',
|
|
140
|
+
typeOptions: {
|
|
141
|
+
expirable: true,
|
|
142
|
+
},
|
|
143
|
+
default: '',
|
|
144
|
+
},
|
|
145
|
+
];
|
|
146
|
+
this.authenticate = {
|
|
147
|
+
type: 'generic',
|
|
148
|
+
properties: {
|
|
149
|
+
headers: {
|
|
150
|
+
Authorization: '=Bearer {{$credentials.accessToken}}',
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
this.test = {
|
|
155
|
+
request: {
|
|
156
|
+
baseURL: '={{ `https://${$credentials.region}.ninjarmm.com` }}',
|
|
157
|
+
url: '/v2/organizations',
|
|
158
|
+
method: 'GET',
|
|
159
|
+
headers: {
|
|
160
|
+
Accept: 'application/json',
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
async preAuthentication(credentials) {
|
|
166
|
+
var _a, _b, _c, _d, _e, _f;
|
|
167
|
+
const grants = Array.isArray(credentials.grantType)
|
|
168
|
+
? credentials.grantType
|
|
169
|
+
: [credentials.grantType];
|
|
170
|
+
if (grants.length !== 1 ||
|
|
171
|
+
!['client_credentials', 'authorization_code', 'refresh_token'].includes(String(grants[0]))) {
|
|
172
|
+
throw new Error('Select exactly one supported OAuth grant type.');
|
|
173
|
+
}
|
|
174
|
+
const grantType = String(grants[0]);
|
|
175
|
+
const body = {
|
|
176
|
+
grant_type: grantType,
|
|
177
|
+
client_id: String((_a = credentials.clientId) !== null && _a !== void 0 ? _a : ''),
|
|
178
|
+
client_secret: String((_b = credentials.clientSecret) !== null && _b !== void 0 ? _b : ''),
|
|
179
|
+
scope: Array.isArray(credentials.scope)
|
|
180
|
+
? credentials.scope.join(' ')
|
|
181
|
+
: String((_c = credentials.scope) !== null && _c !== void 0 ? _c : 'monitoring'),
|
|
182
|
+
};
|
|
183
|
+
if (grantType === 'authorization_code') {
|
|
184
|
+
body.code = String((_d = credentials.code) !== null && _d !== void 0 ? _d : '');
|
|
185
|
+
body.redirect_uri = String((_e = credentials.redirectUri) !== null && _e !== void 0 ? _e : '');
|
|
186
|
+
}
|
|
187
|
+
else if (grantType === 'refresh_token') {
|
|
188
|
+
body.refresh_token = String((_f = credentials.refresh_token) !== null && _f !== void 0 ? _f : '');
|
|
189
|
+
}
|
|
190
|
+
const response = (await this.helpers.httpRequest({
|
|
191
|
+
method: 'POST',
|
|
192
|
+
url: `https://${credentials.region}.ninjarmm.com/ws/oauth/token`,
|
|
193
|
+
headers: {
|
|
194
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
195
|
+
Accept: 'application/json',
|
|
196
|
+
},
|
|
197
|
+
body,
|
|
198
|
+
json: true,
|
|
199
|
+
}));
|
|
200
|
+
if (typeof response.access_token !== 'string' || !response.access_token) {
|
|
201
|
+
throw new Error('NinjaOne did not return an access token.');
|
|
202
|
+
}
|
|
203
|
+
return { accessToken: response.access_token };
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
exports.NinjaoneApi = NinjaoneApi;
|
|
207
|
+
//# sourceMappingURL=NinjaoneApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NinjaoneApi.credentials.js","sourceRoot":"","sources":["../../credentials/NinjaoneApi.credentials.ts"],"names":[],"mappings":";;;AAUA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,aAAa,CAAC;QAErB,gBAAW,GAAG,cAAc,CAAC;QAE7B,SAAI,GAAS,EAAE,KAAK,EAAE,4BAA4B,EAAE,IAAI,EAAE,4BAA4B,EAAE,CAAC;QAEzF,qBAAgB,GAAG,oDAAoD,CAAC;QAExE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAChC,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,EAAE;gBACf,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,oBAAoB;wBAC1B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3D,CAAC;aAAM,IAAI,SAAS,KAAK,eAAe,EAAE,CAAC;YAC1C,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,MAAA,WAAW,CAAC,aAAa,mCAAI,EAAE,CAAC,CAAC;QAC9D,CAAC;QAED,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;YAChD,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,WAAW,WAAW,CAAC,MAAM,8BAA8B;YAChE,OAAO,EAAE;gBACR,cAAc,EAAE,mCAAmC;gBACnD,MAAM,EAAE,kBAAkB;aAC1B;YACD,IAAI;YACJ,IAAI,EAAE,IAAI;SACV,CAAC,CAMD,CAAC;QACF,IAAI,OAAO,QAAQ,CAAC,YAAY,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;YACzE,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC7D,CAAC;QACD,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,YAAY,EAAE,CAAC;IAC/C,CAAC;CAqBD;AAxND,kCAwNC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 128 128">
|
|
3
|
+
<defs>
|
|
4
|
+
<style>
|
|
5
|
+
.cls-1 {
|
|
6
|
+
fill: #fff;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.cls-2 {
|
|
10
|
+
fill: #007da5;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</defs>
|
|
14
|
+
<!-- Generator: Adobe Illustrator 28.7.1, SVG Export Plug-In . SVG Version: 1.2.0 Build 142) -->
|
|
15
|
+
<g>
|
|
16
|
+
<g id="Layer_1">
|
|
17
|
+
<g>
|
|
18
|
+
<path class="cls-2" d="M10,0h108c5.5,0,10,4.5,10,10v108c0,5.5-4.5,10-10,10H10c-5.5,0-10-4.5-10-10V10C0,4.5,4.5,0,10,0Z"/>
|
|
19
|
+
<path class="cls-1" d="M86.6,38.4h0c-4.3-4.4-10-6.6-17.1-6.6s-7.4.7-10.7,2c-3.2,1.4-6,3.3-8.1,5.8v-8.9l-15.8,7.4v53.2h16.5v-28.7c0-5.3,1.2-9.2,3.7-11.9,2.5-2.7,5.8-4,9.9-4s6.6,1.2,8.6,3.5c2,2.3,3,5.8,3,10.5v30.7h16.5v-32.1c0-8.6-2.2-16.3-6.5-20.7"/>
|
|
20
|
+
</g>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
</svg>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "@affeldt28/n8n-nodes-ninjaone.ninjaone",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": [
|
|
6
|
+
"Finance & Accounting",
|
|
7
|
+
"Productivity",
|
|
8
|
+
"Miscellaneous",
|
|
9
|
+
"Development",
|
|
10
|
+
"Analytics",
|
|
11
|
+
"Utility"
|
|
12
|
+
],
|
|
13
|
+
"resources": {
|
|
14
|
+
"credentialDocumentation": [
|
|
15
|
+
{
|
|
16
|
+
"url": "https://app.ninjarmm.com/apidocs/?links.active=authorization"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"primaryDocumentation": [
|
|
20
|
+
{
|
|
21
|
+
"url": "https://app.ninjarmm.com/apidocs/?links.active=core/"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Ninjaone = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const descriptions_1 = require("./descriptions");
|
|
6
|
+
class Ninjaone {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.description = {
|
|
9
|
+
displayName: 'NinjaOne',
|
|
10
|
+
name: 'ninjaone',
|
|
11
|
+
icon: { light: 'file:../../icons/ninjaone.svg', dark: 'file:../../icons/ninjaone.svg' },
|
|
12
|
+
group: ['input'],
|
|
13
|
+
subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
|
|
14
|
+
version: 1,
|
|
15
|
+
description: 'Interact with the NinjaOne API',
|
|
16
|
+
defaults: {
|
|
17
|
+
name: 'NinjaOne',
|
|
18
|
+
},
|
|
19
|
+
usableAsTool: true,
|
|
20
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
21
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
22
|
+
credentials: [
|
|
23
|
+
{
|
|
24
|
+
name: 'ninjaoneApi',
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
requestDefaults: {
|
|
29
|
+
baseURL: '=https://{{ $credentials.region }}.ninjarmm.com/v2',
|
|
30
|
+
},
|
|
31
|
+
properties: [
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Resource',
|
|
34
|
+
name: 'resource',
|
|
35
|
+
type: 'options',
|
|
36
|
+
noDataExpression: true,
|
|
37
|
+
default: 'organizations',
|
|
38
|
+
options: [
|
|
39
|
+
{
|
|
40
|
+
name: 'Organizations',
|
|
41
|
+
value: 'organizations',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
...descriptions_1.organizations.description,
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
this.methods = {};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.Ninjaone = Ninjaone;
|
|
52
|
+
//# sourceMappingURL=Ninjaone.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ninjaone.node.js","sourceRoot":"","sources":["../../../nodes/ninjaone/Ninjaone.node.ts"],"names":[],"mappings":";;;AAAA,+CAA8F;AAC9F,iDAA+C;AAE/C,MAAa,QAAQ;IAArB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,EAAE,KAAK,EAAE,+BAA+B,EAAE,IAAI,EAAE,+BAA+B,EAAE;YACvF,KAAK,EAAE,CAAC,OAAO,CAAC;YAChB,QAAQ,EAAE,gEAAgE;YAC1E,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE;gBACT,IAAI,EAAE,UAAU;aAChB;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,aAAa;oBACnB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,OAAO,EAAE,oDAAoD;aAC7D;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE,eAAe;oBACxB,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,eAAe;4BACrB,KAAK,EAAE,eAAe;yBACtB;qBACD;iBACD;gBACD,GAAG,4BAAa,CAAC,WAAW;aAC5B;SACD,CAAC;QACF,YAAO,GAAG,EAAE,CAAC;IACd,CAAC;CAAA;AA1CD,4BA0CC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as organizations from './organizations/Organizations.resource';
|
|
@@ -0,0 +1,38 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.organizations = void 0;
|
|
37
|
+
exports.organizations = __importStar(require("./organizations/Organizations.resource"));
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/ninjaone/descriptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wFAAwE"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.description = void 0;
|
|
37
|
+
const getAll = __importStar(require("./getAll.operation"));
|
|
38
|
+
exports.description = [
|
|
39
|
+
{
|
|
40
|
+
name: 'operation',
|
|
41
|
+
displayName: 'Operation',
|
|
42
|
+
type: 'options',
|
|
43
|
+
default: 'getAll',
|
|
44
|
+
noDataExpression: true,
|
|
45
|
+
displayOptions: {
|
|
46
|
+
show: {
|
|
47
|
+
resource: ['organizations'],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
options: [
|
|
51
|
+
{
|
|
52
|
+
name: 'Get Many',
|
|
53
|
+
description: 'Get a list of all organization names',
|
|
54
|
+
value: 'getAll',
|
|
55
|
+
routing: {
|
|
56
|
+
request: {
|
|
57
|
+
method: 'GET',
|
|
58
|
+
url: '/organizations',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
action: 'Get many organizations',
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
...getAll.description,
|
|
66
|
+
];
|
|
67
|
+
//# sourceMappingURL=Organizations.resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Organizations.resource.js","sourceRoot":"","sources":["../../../../../nodes/ninjaone/descriptions/organizations/Organizations.resource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAA6C;AAEhC,QAAA,WAAW,GAAsB;IAC7C;QACC,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,QAAQ;QACjB,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,eAAe,CAAC;aAC3B;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,sCAAsC;gBACnD,KAAK,EAAE,QAAQ;gBACf,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,gBAAgB;qBACrB;iBACD;gBACD,MAAM,EAAE,wBAAwB;aAChC;SACD;KACD;IACD,GAAG,MAAM,CAAC,WAAW;CACrB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const description: {
|
|
3
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
4
|
+
displayName: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
7
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
|
|
8
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
9
|
+
description?: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
builderHint?: import("n8n-workflow").IParameterBuilderHint;
|
|
12
|
+
disabledOptions?: import("n8n-workflow").IDisplayOptions;
|
|
13
|
+
envFeatureFlag?: Uppercase<string>;
|
|
14
|
+
options?: Array<import("n8n-workflow").INodePropertyOptions | INodeProperties | import("n8n-workflow").INodePropertyCollection>;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
isNodeSetting?: boolean;
|
|
17
|
+
noDataExpression?: boolean;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
routing?: import("n8n-workflow").INodePropertyRouting;
|
|
20
|
+
credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
|
|
21
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
|
|
22
|
+
modes?: import("n8n-workflow").INodePropertyMode[];
|
|
23
|
+
requiresDataPath?: "single" | "multiple";
|
|
24
|
+
doNotInherit?: boolean;
|
|
25
|
+
validateType?: import("n8n-workflow").FieldType;
|
|
26
|
+
ignoreValidationDuringExecution?: boolean;
|
|
27
|
+
allowArbitraryValues?: boolean;
|
|
28
|
+
resolvableField?: boolean;
|
|
29
|
+
}[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const properties = [];
|
|
6
|
+
const displayOptions = {
|
|
7
|
+
show: {
|
|
8
|
+
resource: ['organizations'],
|
|
9
|
+
operation: ['getAll'],
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
exports.description = (0, n8n_workflow_1.updateDisplayOptions)(displayOptions, properties);
|
|
13
|
+
//# sourceMappingURL=getAll.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAll.operation.js","sourceRoot":"","sources":["../../../../../nodes/ninjaone/descriptions/organizations/getAll.operation.ts"],"names":[],"mappings":";;;AAAA,+CAA0E;AAE1E,MAAM,UAAU,GAAsB,EAAE,CAAC;AAEzC,MAAM,cAAc,GAAG;IACtB,IAAI,EAAE;QACL,QAAQ,EAAE,CAAC,eAAe,CAAC;QAC3B,SAAS,EAAE,CAAC,QAAQ,CAAC;KACrB;CACD,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,mCAAoB,EAAC,cAAc,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buyerReferenceQueryParameter = void 0;
|
|
4
|
+
exports.buyerReferenceQueryParameter = {
|
|
5
|
+
name: 'BuyerReference',
|
|
6
|
+
displayName: 'Buyer Reference',
|
|
7
|
+
type: 'string',
|
|
8
|
+
default: '',
|
|
9
|
+
placeholder: 'e.g. buyerReference',
|
|
10
|
+
description: 'Filter by buyer reference',
|
|
11
|
+
routing: {
|
|
12
|
+
send: {
|
|
13
|
+
type: 'query',
|
|
14
|
+
property: 'BuyerReference',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=buyerReference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buyerReference.js","sourceRoot":"","sources":["../../../../../../nodes/ninjaone/descriptions/shared/QueryParameter/buyerReference.ts"],"names":[],"mappings":";;;AAEa,QAAA,4BAA4B,GAAoB;IAC5D,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iBAAiB;IAC9B,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,2BAA2B;IACxC,OAAO,EAAE;QACR,IAAI,EAAE;YACL,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,gBAAgB;SAC1B;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.externalDocumentNumberQueryParameter = void 0;
|
|
4
|
+
exports.externalDocumentNumberQueryParameter = {
|
|
5
|
+
name: 'ExternalDocumentNumber',
|
|
6
|
+
displayName: 'External Document Number',
|
|
7
|
+
type: 'string',
|
|
8
|
+
default: '',
|
|
9
|
+
placeholder: 'e.g. externalDocumentNumber',
|
|
10
|
+
description: 'Filter by external document number',
|
|
11
|
+
routing: {
|
|
12
|
+
send: {
|
|
13
|
+
type: 'query',
|
|
14
|
+
property: 'ExternalDocumentNumber',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=externalDocumentNumber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"externalDocumentNumber.js","sourceRoot":"","sources":["../../../../../../nodes/ninjaone/descriptions/shared/QueryParameter/externalDocumentNumber.ts"],"names":[],"mappings":";;;AAEa,QAAA,oCAAoC,GAAoB;IACpE,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,0BAA0B;IACvC,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,6BAA6B;IAC1C,WAAW,EAAE,oCAAoC;IACjD,OAAO,EAAE;QACR,IAAI,EAAE;YACL,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,wBAAwB;SAClC;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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("./buyerReference"), exports);
|
|
18
|
+
__exportStar(require("./externalDocumentNumber"), exports);
|
|
19
|
+
__exportStar(require("./limit"), exports);
|
|
20
|
+
__exportStar(require("./period"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/ninjaone/descriptions/shared/QueryParameter/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,2DAAyC;AACzC,0CAAwB;AACxB,2CAAyB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.limitQueryParameters = void 0;
|
|
4
|
+
exports.limitQueryParameters = [
|
|
5
|
+
{
|
|
6
|
+
name: 'useLimit',
|
|
7
|
+
displayName: 'Use Limit',
|
|
8
|
+
description: 'Whether to limit the number of returned items',
|
|
9
|
+
type: 'boolean',
|
|
10
|
+
default: false,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'Take',
|
|
14
|
+
displayName: 'Take',
|
|
15
|
+
type: 'number',
|
|
16
|
+
default: 50,
|
|
17
|
+
description: 'Maximum number of items to return',
|
|
18
|
+
displayOptions: {
|
|
19
|
+
show: {
|
|
20
|
+
useLimit: [true],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
routing: {
|
|
24
|
+
send: {
|
|
25
|
+
type: 'query',
|
|
26
|
+
property: 'Take',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'Skip',
|
|
32
|
+
displayName: 'Skip',
|
|
33
|
+
type: 'number',
|
|
34
|
+
default: 0,
|
|
35
|
+
description: 'Number of items to skip',
|
|
36
|
+
displayOptions: {
|
|
37
|
+
show: {
|
|
38
|
+
useLimit: [true],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
routing: {
|
|
42
|
+
send: {
|
|
43
|
+
type: 'query',
|
|
44
|
+
property: 'Skip',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
//# sourceMappingURL=limit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limit.js","sourceRoot":"","sources":["../../../../../../nodes/ninjaone/descriptions/shared/QueryParameter/limit.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAsB;IACtD;QACC,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,WAAW;QACxB,WAAW,EAAE,+CAA+C;QAC5D,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;KACd;IACD;QACC,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,mCAAmC;QAChD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,IAAI,CAAC;aAChB;SACD;QACD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,MAAM;aAChB;SACD;KACD;IACD;QACC,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,yBAAyB;QACtC,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,IAAI,CAAC;aAChB;SACD;QACD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,MAAM;aAChB;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.periodQueryParameters = void 0;
|
|
4
|
+
exports.periodQueryParameters = [
|
|
5
|
+
{
|
|
6
|
+
name: 'PeriodStart',
|
|
7
|
+
displayName: 'Period Start',
|
|
8
|
+
type: 'dateTime',
|
|
9
|
+
default: '',
|
|
10
|
+
description: 'Filter by the start of the period',
|
|
11
|
+
routing: {
|
|
12
|
+
send: {
|
|
13
|
+
type: 'query',
|
|
14
|
+
property: 'PeriodStart',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'PeriodEnd',
|
|
20
|
+
displayName: 'Period End',
|
|
21
|
+
type: 'dateTime',
|
|
22
|
+
default: '',
|
|
23
|
+
description: 'Filter by the end of the period',
|
|
24
|
+
routing: {
|
|
25
|
+
send: {
|
|
26
|
+
type: 'query',
|
|
27
|
+
property: 'PeriodEnd',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
//# sourceMappingURL=period.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"period.js","sourceRoot":"","sources":["../../../../../../nodes/ninjaone/descriptions/shared/QueryParameter/period.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAsB;IACvD;QACC,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,mCAAmC;QAChD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,aAAa;aACvB;SACD;KACD;IACD;QACC,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iCAAiC;QAC9C,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,WAAW;aACrB;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@affeldt28/n8n-nodes-ninjaone",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "n8n node for NinjaOne",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/affeldt28/n8n-nodes-ninjaone",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"n8n-community-node-package",
|
|
9
|
+
"NinjaRMM",
|
|
10
|
+
"NinjaOne",
|
|
11
|
+
"Device Management",
|
|
12
|
+
"MDM"
|
|
13
|
+
],
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "affeldt28",
|
|
16
|
+
"email": "code@affeldt.dev"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/affeldt28/n8n-nodes-ninjaone.git"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "n8n-node build",
|
|
24
|
+
"build:watch": "tsc --watch",
|
|
25
|
+
"dev": "n8n-node dev",
|
|
26
|
+
"format": "biome format --write ",
|
|
27
|
+
"lint": "biome check",
|
|
28
|
+
"lint:fix": "biome check --write",
|
|
29
|
+
"n8n-lint": "n8n-node lint",
|
|
30
|
+
"release": "n8n-node release",
|
|
31
|
+
"prepublishOnly": "n8n-node prerelease"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"n8n": {
|
|
37
|
+
"n8nNodesApiVersion": 1,
|
|
38
|
+
"strict": true,
|
|
39
|
+
"credentials": [
|
|
40
|
+
"dist/credentials/NinjaoneApi.credentials.js"
|
|
41
|
+
],
|
|
42
|
+
"nodes": [
|
|
43
|
+
"dist/nodes/ninjaone/Ninjaone.node.js"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@biomejs/biome": "2.5.1",
|
|
51
|
+
"@n8n/node-cli": "*",
|
|
52
|
+
"release-it": "20.2.1",
|
|
53
|
+
"typescript": "6.0.3"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"n8n-workflow": "*"
|
|
57
|
+
}
|
|
58
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@affeldt28/n8n-nodes-ninjaone",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "n8n node for NinjaOne",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/affeldt28/n8n-nodes-ninjaone",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"n8n-community-node-package",
|
|
9
|
+
"NinjaRMM",
|
|
10
|
+
"NinjaOne",
|
|
11
|
+
"Device Management",
|
|
12
|
+
"MDM"
|
|
13
|
+
],
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "affeldt28",
|
|
16
|
+
"email": "code@affeldt.dev"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/affeldt28/n8n-nodes-ninjaone.git"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "n8n-node build",
|
|
24
|
+
"build:watch": "tsc --watch",
|
|
25
|
+
"dev": "n8n-node dev",
|
|
26
|
+
"format": "biome format --write ",
|
|
27
|
+
"lint": "biome check",
|
|
28
|
+
"lint:fix": "biome check --write",
|
|
29
|
+
"n8n-lint": "n8n-node lint",
|
|
30
|
+
"release": "n8n-node release",
|
|
31
|
+
"prepublishOnly": "n8n-node prerelease"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"n8n": {
|
|
37
|
+
"n8nNodesApiVersion": 1,
|
|
38
|
+
"strict": true,
|
|
39
|
+
"credentials": [
|
|
40
|
+
"dist/credentials/NinjaoneApi.credentials.js"
|
|
41
|
+
],
|
|
42
|
+
"nodes": [
|
|
43
|
+
"dist/nodes/ninjaone/Ninjaone.node.js"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@biomejs/biome": "2.5.1",
|
|
51
|
+
"@n8n/node-cli": "*",
|
|
52
|
+
"release-it": "20.2.1",
|
|
53
|
+
"typescript": "6.0.3"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"n8n-workflow": "*"
|
|
57
|
+
}
|
|
58
|
+
}
|