@justbrunasso/n8n-nodes-glpi-v2 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.
Files changed (44) hide show
  1. package/.github/workflows/ci.yml +28 -0
  2. package/.prettierrc.js +51 -0
  3. package/.vscode/extensions.json +7 -0
  4. package/.vscode/launch.json +12 -0
  5. package/CHANGELOG.md +0 -0
  6. package/CODE_OF_CONDUCT.md +76 -0
  7. package/LICENSE.md +19 -0
  8. package/README.md +247 -0
  9. package/README_TEMPLATE.md +48 -0
  10. package/api_docs.json +1 -0
  11. package/credentials/GithubIssuesApi.credentials.ts +45 -0
  12. package/credentials/GithubIssuesOAuth2Api.credentials.ts +54 -0
  13. package/eslint.config.mjs +3 -0
  14. package/icons/github.dark.svg +3 -0
  15. package/icons/github.svg +3 -0
  16. package/nodes/Example/Example.node.json +18 -0
  17. package/nodes/Example/Example.node.ts +78 -0
  18. package/nodes/Example/example.dark.svg +13 -0
  19. package/nodes/Example/example.svg +13 -0
  20. package/nodes/GithubIssues/GithubIssues.node.json +18 -0
  21. package/nodes/GithubIssues/GithubIssues.node.ts +96 -0
  22. package/nodes/GithubIssues/listSearch/getIssues.ts +49 -0
  23. package/nodes/GithubIssues/listSearch/getRepositories.ts +50 -0
  24. package/nodes/GithubIssues/listSearch/getUsers.ts +49 -0
  25. package/nodes/GithubIssues/resources/issue/create.ts +74 -0
  26. package/nodes/GithubIssues/resources/issue/get.ts +14 -0
  27. package/nodes/GithubIssues/resources/issue/getAll.ts +124 -0
  28. package/nodes/GithubIssues/resources/issue/index.ts +75 -0
  29. package/nodes/GithubIssues/resources/issueComment/getAll.ts +65 -0
  30. package/nodes/GithubIssues/resources/issueComment/index.ts +47 -0
  31. package/nodes/GithubIssues/shared/descriptions.ts +151 -0
  32. package/nodes/GithubIssues/shared/transport.ts +32 -0
  33. package/nodes/GithubIssues/shared/utils.ts +14 -0
  34. package/nodes/GlpiV2/GlpiV2.credentials.ts +76 -0
  35. package/nodes/GlpiV2/GlpiV2.node.ts +50 -0
  36. package/nodes/GlpiV2/GlpiV2.svg +5 -0
  37. package/nodes/GlpiV2/resources/computer/create.ts +43 -0
  38. package/nodes/GlpiV2/resources/computer/delete.ts +37 -0
  39. package/nodes/GlpiV2/resources/computer/get.ts +37 -0
  40. package/nodes/GlpiV2/resources/computer/getAll.ts +61 -0
  41. package/nodes/GlpiV2/resources/computer/index.ts +61 -0
  42. package/nodes/GlpiV2/resources/computer/update.ts +55 -0
  43. package/package.json +33 -0
  44. package/tsconfig.json +16 -0
@@ -0,0 +1,28 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Use Node.js
17
+ uses: actions/setup-node@v4
18
+ with:
19
+ node-version: '22'
20
+
21
+ - name: Install dependencies
22
+ run: 'npm ci'
23
+
24
+ - name: Run lint
25
+ run: 'npm run lint'
26
+
27
+ - name: Run build
28
+ run: 'npm run build'
package/.prettierrc.js ADDED
@@ -0,0 +1,51 @@
1
+ module.exports = {
2
+ /**
3
+ * https://prettier.io/docs/en/options.html#semicolons
4
+ */
5
+ semi: true,
6
+
7
+ /**
8
+ * https://prettier.io/docs/en/options.html#trailing-commas
9
+ */
10
+ trailingComma: 'all',
11
+
12
+ /**
13
+ * https://prettier.io/docs/en/options.html#bracket-spacing
14
+ */
15
+ bracketSpacing: true,
16
+
17
+ /**
18
+ * https://prettier.io/docs/en/options.html#tabs
19
+ */
20
+ useTabs: true,
21
+
22
+ /**
23
+ * https://prettier.io/docs/en/options.html#tab-width
24
+ */
25
+ tabWidth: 2,
26
+
27
+ /**
28
+ * https://prettier.io/docs/en/options.html#arrow-function-parentheses
29
+ */
30
+ arrowParens: 'always',
31
+
32
+ /**
33
+ * https://prettier.io/docs/en/options.html#quotes
34
+ */
35
+ singleQuote: true,
36
+
37
+ /**
38
+ * https://prettier.io/docs/en/options.html#quote-props
39
+ */
40
+ quoteProps: 'as-needed',
41
+
42
+ /**
43
+ * https://prettier.io/docs/en/options.html#end-of-line
44
+ */
45
+ endOfLine: 'lf',
46
+
47
+ /**
48
+ * https://prettier.io/docs/en/options.html#print-width
49
+ */
50
+ printWidth: 100,
51
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "dbaeumer.vscode-eslint",
4
+ "EditorConfig.EditorConfig",
5
+ "esbenp.prettier-vscode",
6
+ ]
7
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Attach to running n8n",
6
+ "processId": "${command:PickProcess}",
7
+ "request": "attach",
8
+ "skipFiles": ["<node_internals>/**"],
9
+ "type": "node"
10
+ }
11
+ ]
12
+ }
package/CHANGELOG.md ADDED
File without changes
@@ -0,0 +1,76 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
9
+ level of experience, education, socio-economic status, nationality, personal
10
+ appearance, race, religion, or sexual identity and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at jan@n8n.io. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72
+
73
+ [homepage]: https://www.contributor-covenant.org
74
+
75
+ For answers to common questions about this code of conduct, see
76
+ https://www.contributor-covenant.org/faq
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,247 @@
1
+ ![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)
2
+
3
+ # n8n-nodes-starter
4
+
5
+ This starter repository helps you build custom integrations for [n8n](https://n8n.io). It includes example nodes, credentials, the node linter, and all the tooling you need to get started.
6
+
7
+ ## Quick Start
8
+
9
+ > [!TIP]
10
+ > **New to building n8n nodes?** The fastest way to get started is with `npm create @n8n/node`. This command scaffolds a complete node package for you using the [@n8n/node-cli](https://www.npmjs.com/package/@n8n/node-cli).
11
+
12
+ **To create a new node package from scratch:**
13
+
14
+ ```bash
15
+ npm create @n8n/node
16
+ ```
17
+
18
+ **Already using this starter? Start developing with:**
19
+
20
+ ```bash
21
+ npm run dev
22
+ ```
23
+
24
+ This starts n8n with your nodes loaded and hot reload enabled.
25
+
26
+ ## What's Included
27
+
28
+ This starter repository includes two example nodes to learn from:
29
+
30
+ - **[Example Node](nodes/Example/)** - A simple starter node that shows the basic structure with a custom `execute` method
31
+ - **[GitHub Issues Node](nodes/GithubIssues/)** - A complete, production-ready example built using the **declarative style**:
32
+ - **Low-code approach** - Define operations declaratively without writing request logic
33
+ - Multiple resources (Issues, Comments)
34
+ - Multiple operations (Get, Get All, Create)
35
+ - Two authentication methods (OAuth2 and Personal Access Token)
36
+ - List search functionality for dynamic dropdowns
37
+ - Proper error handling and typing
38
+ - Ideal for HTTP API-based integrations
39
+
40
+ > [!TIP]
41
+ > The declarative/low-code style (used in GitHub Issues) is the recommended approach for building nodes that interact with HTTP APIs. It significantly reduces boilerplate code and handles requests automatically.
42
+
43
+ Browse these examples to understand both approaches, then modify them or create your own.
44
+
45
+ ## Finding Inspiration
46
+
47
+ Looking for more examples? Check out these resources:
48
+
49
+ - **[npm Community Nodes](https://www.npmjs.com/search?q=keywords:n8n-community-node-package)** - Browse thousands of community-built nodes on npm using the `n8n-community-node-package` tag
50
+ - **[n8n Built-in Nodes](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/nodes)** - Study the source code of n8n's official nodes for production-ready patterns and best practices
51
+ - **[n8n Credentials](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/credentials)** - See how authentication is implemented for various services
52
+
53
+ These are excellent resources to understand how to structure your nodes, handle different API patterns, and implement advanced features.
54
+
55
+ ## Prerequisites
56
+
57
+ Before you begin, install the following on your development machine:
58
+
59
+ ### Required
60
+
61
+ - **[Node.js](https://nodejs.org/)** (v22 or higher) and npm
62
+ - Linux/Mac/WSL: Install via [nvm](https://github.com/nvm-sh/nvm)
63
+ - Windows: Follow [Microsoft's NodeJS guide](https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows)
64
+ - **[git](https://git-scm.com/downloads)**
65
+
66
+ ### Recommended
67
+
68
+ - Follow n8n's [development environment setup guide](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/)
69
+
70
+ > [!NOTE]
71
+ > The `@n8n/node-cli` is included as a dev dependency and will be installed automatically when you run `npm install`. The CLI includes n8n for local development, so you don't need to install n8n globally.
72
+
73
+ ## Getting Started with this Starter
74
+
75
+ Follow these steps to create your own n8n community node package:
76
+
77
+ ### 1. Create Your Repository
78
+
79
+ [Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template, then clone it:
80
+
81
+ ```bash
82
+ git clone https://github.com/<your-organization>/<your-repo-name>.git
83
+ cd <your-repo-name>
84
+ ```
85
+
86
+ ### 2. Install Dependencies
87
+
88
+ ```bash
89
+ npm install
90
+ ```
91
+
92
+ This installs all required dependencies including the `@n8n/node-cli`.
93
+
94
+ ### 3. Explore the Examples
95
+
96
+ Browse the example nodes in [nodes/](nodes/) and [credentials/](credentials/) to understand the structure:
97
+
98
+ - Start with [nodes/Example/](nodes/Example/) for a basic node
99
+ - Study [nodes/GithubIssues/](nodes/GithubIssues/) for a real-world implementation
100
+
101
+ ### 4. Build Your Node
102
+
103
+ Edit the example nodes to fit your use case, or create new node files by copying the structure from [nodes/Example/](nodes/Example/).
104
+
105
+ > [!TIP]
106
+ > If you want to scaffold a completely new node package, use `npm create @n8n/node` to start fresh with the CLI's interactive generator.
107
+
108
+ ### 5. Configure Your Package
109
+
110
+ Update `package.json` with your details:
111
+
112
+ - `name` - Your package name (must start with `n8n-nodes-`)
113
+ - `author` - Your name and email
114
+ - `repository` - Your repository URL
115
+ - `description` - What your node does
116
+
117
+ Make sure your node is registered in the `n8n.nodes` array.
118
+
119
+ ### 6. Develop and Test Locally
120
+
121
+ Start n8n with your node loaded:
122
+
123
+ ```bash
124
+ npm run dev
125
+ ```
126
+
127
+ This command runs `n8n-node dev` which:
128
+
129
+ - Builds your node with watch mode
130
+ - Starts n8n with your node available
131
+ - Automatically rebuilds when you make changes
132
+ - Opens n8n in your browser (usually http://localhost:5678)
133
+
134
+ You can now test your node in n8n workflows!
135
+
136
+ > [!NOTE]
137
+ > Learn more about CLI commands in the [@n8n/node-cli documentation](https://www.npmjs.com/package/@n8n/node-cli).
138
+
139
+ ### 7. Lint Your Code
140
+
141
+ Check for errors:
142
+
143
+ ```bash
144
+ npm run lint
145
+ ```
146
+
147
+ Auto-fix issues when possible:
148
+
149
+ ```bash
150
+ npm run lint:fix
151
+ ```
152
+
153
+ ### 8. Build for Production
154
+
155
+ When ready to publish:
156
+
157
+ ```bash
158
+ npm run build
159
+ ```
160
+
161
+ This compiles your TypeScript code to the `dist/` folder.
162
+
163
+ ### 9. Prepare for Publishing
164
+
165
+ Before publishing:
166
+
167
+ 1. **Update documentation**: Replace this README with your node's documentation. Use [README_TEMPLATE.md](README_TEMPLATE.md) as a starting point.
168
+ 2. **Update the LICENSE**: Add your details to the [LICENSE](LICENSE.md) file.
169
+ 3. **Test thoroughly**: Ensure your node works in different scenarios.
170
+
171
+ ### 10. Publish to npm
172
+
173
+ Publish your package to make it available to the n8n community:
174
+
175
+ ```bash
176
+ npm publish
177
+ ```
178
+
179
+ Learn more about [publishing to npm](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
180
+
181
+ ### 11. Submit for Verification (Optional)
182
+
183
+ Get your node verified for n8n Cloud:
184
+
185
+ 1. Ensure your node meets the [requirements](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/):
186
+ - Uses MIT license ✅ (included in this starter)
187
+ - No external package dependencies
188
+ - Follows n8n's design guidelines
189
+ - Passes quality and security review
190
+
191
+ 2. Submit through the [n8n Creator Portal](https://creators.n8n.io/nodes)
192
+
193
+ **Benefits of verification:**
194
+
195
+ - Available directly in n8n Cloud
196
+ - Discoverable in the n8n nodes panel
197
+ - Verified badge for quality assurance
198
+ - Increased visibility in the n8n community
199
+
200
+ ## Available Scripts
201
+
202
+ This starter includes several npm scripts to streamline development:
203
+
204
+ | Script | Description |
205
+ | --------------------- | ---------------------------------------------------------------- |
206
+ | `npm run dev` | Start n8n with your node and watch for changes (runs `n8n-node dev`) |
207
+ | `npm run build` | Compile TypeScript to JavaScript for production (runs `n8n-node build`) |
208
+ | `npm run build:watch` | Build in watch mode (auto-rebuild on changes) |
209
+ | `npm run lint` | Check your code for errors and style issues (runs `n8n-node lint`) |
210
+ | `npm run lint:fix` | Automatically fix linting issues when possible (runs `n8n-node lint --fix`) |
211
+ | `npm run release` | Create a new release (runs `n8n-node release`) |
212
+
213
+ > [!TIP]
214
+ > These scripts use the [@n8n/node-cli](https://www.npmjs.com/package/@n8n/node-cli) under the hood. You can also run CLI commands directly, e.g., `npx n8n-node dev`.
215
+
216
+ ## Troubleshooting
217
+
218
+ ### My node doesn't appear in n8n
219
+
220
+ 1. Make sure you ran `npm install` to install dependencies
221
+ 2. Check that your node is listed in `package.json` under `n8n.nodes`
222
+ 3. Restart the dev server with `npm run dev`
223
+ 4. Check the console for any error messages
224
+
225
+ ### Linting errors
226
+
227
+ Run `npm run lint:fix` to automatically fix most common issues. For remaining errors, check the [n8n node development guidelines](https://docs.n8n.io/integrations/creating-nodes/).
228
+
229
+ ### TypeScript errors
230
+
231
+ Make sure you're using Node.js v22 or higher and have run `npm install` to get all type definitions.
232
+
233
+ ## Resources
234
+
235
+ - **[n8n Node Documentation](https://docs.n8n.io/integrations/creating-nodes/)** - Complete guide to building nodes
236
+ - **[n8n Community Forum](https://community.n8n.io/)** - Get help and share your nodes
237
+ - **[@n8n/node-cli Documentation](https://www.npmjs.com/package/@n8n/node-cli)** - CLI tool reference
238
+ - **[n8n Creator Portal](https://creators.n8n.io/nodes)** - Submit your node for verification
239
+ - **[Submit Community Nodes Guide](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/)** - Verification requirements and process
240
+
241
+ ## Contributing
242
+
243
+ Have suggestions for improving this starter? [Open an issue](https://github.com/n8n-io/n8n-nodes-starter/issues) or submit a pull request!
244
+
245
+ ## License
246
+
247
+ [MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)
@@ -0,0 +1,48 @@
1
+ # n8n-nodes-_node-name_
2
+
3
+ This is an n8n community node. It lets you use _app/service name_ in your n8n workflows.
4
+
5
+ _App/service name_ is _one or two sentences describing the service this node integrates with_.
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) <!-- delete if no auth needed -->
12
+ [Compatibility](#compatibility)
13
+ [Usage](#usage) <!-- delete if not using this section -->
14
+ [Resources](#resources)
15
+ [Version history](#version-history) <!-- delete if not using this section -->
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
+ ## Operations
22
+
23
+ _List the operations supported by your node._
24
+
25
+ ## Credentials
26
+
27
+ _If users need to authenticate with the app/service, provide details here. You should include prerequisites (such as signing up with the service), available authentication methods, and how to set them up._
28
+
29
+ ## Compatibility
30
+
31
+ _State the minimum n8n version, as well as which versions you test against. You can also include any known version incompatibility issues._
32
+
33
+ ## Usage
34
+
35
+ _This is an optional section. Use it to help users with any difficult or confusing aspects of the node._
36
+
37
+ _By the time users are looking for community nodes, they probably already know n8n basics. But if you expect new users, you can link to the [Try it out](https://docs.n8n.io/try-it-out/) documentation to help them get started._
38
+
39
+ ## Resources
40
+
41
+ * [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
42
+ * _Link to app/service documentation._
43
+
44
+ ## Version history
45
+
46
+ _This is another optional section. If your node has multiple versions, include a short description of available versions and what changed, as well as any compatibility impact._
47
+
48
+