n8n-nodes-base-wework 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 (63) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +351 -0
  3. package/dist/credentials/BaseWeworkApi.credentials.d.ts +9 -0
  4. package/dist/credentials/BaseWeworkApi.credentials.js +39 -0
  5. package/dist/credentials/BaseWeworkApi.credentials.js.map +1 -0
  6. package/dist/credentials/GithubIssuesApi.credentials.d.ts +10 -0
  7. package/dist/credentials/GithubIssuesApi.credentials.js +37 -0
  8. package/dist/credentials/GithubIssuesApi.credentials.js.map +1 -0
  9. package/dist/credentials/GithubIssuesOAuth2Api.credentials.d.ts +9 -0
  10. package/dist/credentials/GithubIssuesOAuth2Api.credentials.js +54 -0
  11. package/dist/credentials/GithubIssuesOAuth2Api.credentials.js.map +1 -0
  12. package/dist/nodes/BaseWework/BaseWework.node.d.ts +5 -0
  13. package/dist/nodes/BaseWework/BaseWework.node.js +1004 -0
  14. package/dist/nodes/BaseWework/BaseWework.node.js.map +1 -0
  15. package/dist/nodes/BaseWework/BaseWework.node.json +19 -0
  16. package/dist/nodes/BaseWework/basewework.svg +8 -0
  17. package/dist/nodes/Example/Example.node.d.ts +5 -0
  18. package/dist/nodes/Example/Example.node.js +61 -0
  19. package/dist/nodes/Example/Example.node.js.map +1 -0
  20. package/dist/nodes/Example/Example.node.json +18 -0
  21. package/dist/nodes/GithubIssues/GithubIssues.node.d.ts +14 -0
  22. package/dist/nodes/GithubIssues/GithubIssues.node.js +101 -0
  23. package/dist/nodes/GithubIssues/GithubIssues.node.js.map +1 -0
  24. package/dist/nodes/GithubIssues/GithubIssues.node.json +18 -0
  25. package/dist/nodes/GithubIssues/listSearch/getIssues.d.ts +2 -0
  26. package/dist/nodes/GithubIssues/listSearch/getIssues.js +28 -0
  27. package/dist/nodes/GithubIssues/listSearch/getIssues.js.map +1 -0
  28. package/dist/nodes/GithubIssues/listSearch/getRepositories.d.ts +2 -0
  29. package/dist/nodes/GithubIssues/listSearch/getRepositories.js +31 -0
  30. package/dist/nodes/GithubIssues/listSearch/getRepositories.js.map +1 -0
  31. package/dist/nodes/GithubIssues/listSearch/getUsers.d.ts +2 -0
  32. package/dist/nodes/GithubIssues/listSearch/getUsers.js +29 -0
  33. package/dist/nodes/GithubIssues/listSearch/getUsers.js.map +1 -0
  34. package/dist/nodes/GithubIssues/resources/issue/create.d.ts +2 -0
  35. package/dist/nodes/GithubIssues/resources/issue/create.js +75 -0
  36. package/dist/nodes/GithubIssues/resources/issue/create.js.map +1 -0
  37. package/dist/nodes/GithubIssues/resources/issue/get.d.ts +2 -0
  38. package/dist/nodes/GithubIssues/resources/issue/get.js +15 -0
  39. package/dist/nodes/GithubIssues/resources/issue/get.js.map +1 -0
  40. package/dist/nodes/GithubIssues/resources/issue/getAll.d.ts +2 -0
  41. package/dist/nodes/GithubIssues/resources/issue/getAll.js +125 -0
  42. package/dist/nodes/GithubIssues/resources/issue/getAll.js.map +1 -0
  43. package/dist/nodes/GithubIssues/resources/issue/index.d.ts +2 -0
  44. package/dist/nodes/GithubIssues/resources/issue/index.js +76 -0
  45. package/dist/nodes/GithubIssues/resources/issue/index.js.map +1 -0
  46. package/dist/nodes/GithubIssues/resources/issueComment/getAll.d.ts +2 -0
  47. package/dist/nodes/GithubIssues/resources/issueComment/getAll.js +66 -0
  48. package/dist/nodes/GithubIssues/resources/issueComment/getAll.js.map +1 -0
  49. package/dist/nodes/GithubIssues/resources/issueComment/index.d.ts +2 -0
  50. package/dist/nodes/GithubIssues/resources/issueComment/index.js +48 -0
  51. package/dist/nodes/GithubIssues/resources/issueComment/index.js.map +1 -0
  52. package/dist/nodes/GithubIssues/shared/descriptions.d.ts +4 -0
  53. package/dist/nodes/GithubIssues/shared/descriptions.js +151 -0
  54. package/dist/nodes/GithubIssues/shared/descriptions.js.map +1 -0
  55. package/dist/nodes/GithubIssues/shared/transport.d.ts +2 -0
  56. package/dist/nodes/GithubIssues/shared/transport.js +16 -0
  57. package/dist/nodes/GithubIssues/shared/transport.js.map +1 -0
  58. package/dist/nodes/GithubIssues/shared/utils.d.ts +3 -0
  59. package/dist/nodes/GithubIssues/shared/utils.js +17 -0
  60. package/dist/nodes/GithubIssues/shared/utils.js.map +1 -0
  61. package/dist/package.json +62 -0
  62. package/dist/tsconfig.tsbuildinfo +1 -0
  63. package/package.json +59 -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,351 @@
1
+ # n8n-nodes-base-wework
2
+
3
+ ![n8n](https://img.shields.io/badge/n8n-community-blue)
4
+ ![npm version](https://img.shields.io/npm/v/n8n-nodes-base-wework)
5
+ ![License](https://img.shields.io/badge/license-MIT-green)
6
+
7
+ **Tích hợp hoàn chỉnh Base WeWork API vào n8n** - Quản lý projects, tasks, managers, departments, và nhiều hơn nữa!
8
+
9
+ ## 🚀 Quick Install
10
+
11
+ ```bash
12
+ npm install n8n-nodes-base-wework
13
+ ```
14
+
15
+ Sau đó restart n8n để load node.
16
+
17
+ ## ✨ Features
18
+
19
+ - 🎯 **30 API Operations** - Đầy đủ tất cả endpoints từ Base WeWork API v3
20
+ - 📦 **7 Resources** - Project, Task, Manager, Department, Tasklist, Topic, User
21
+ - 🔐 **Secure Authentication** - API key authentication với domain configuration
22
+ - ⚡ **Production Ready** - Error handling, type-safe, tested
23
+
24
+ ## 📚 Resources
25
+
26
+ | Resource | Operations | Description |
27
+ |----------|-----------|-------------|
28
+ | 📁 Project | Create, Get, Update, Delete, Get All | Quản lý dự án |
29
+ | ✅ Task | Create, Get, Update, Delete, Get All | Quản lý công việc |
30
+ | 👥 Manager | Add List, Set List, Exchange Single | Quản lý người quản lý |
31
+ | 🏢 Department | Create, Get, Update, Delete, Get All | Quản lý phòng ban |
32
+ | 📋 Tasklist | Create, Get, Update, Delete, Get All | Quản lý danh sách công việc |
33
+ | 💬 Topic | Create, Get, Update, Delete, Get All | Quản lý chủ đề |
34
+ | 👤 User | Get Info, Get All | Quản lý người dùng |
35
+
36
+ ## 🔧 Setup
37
+
38
+ ### 1. Install node
39
+ ```bash
40
+ npm install n8n-nodes-base-wework
41
+ ```
42
+
43
+ ### 2. Restart n8n
44
+ ```bash
45
+ n8n start
46
+ ```
47
+
48
+ ### 3. Configure Credential
49
+ 1. Mở n8n UI → **Credentials** → **Add Credential**
50
+ 2. Chọn **Base WeWork API**
51
+ 3. Nhập:
52
+ - **Domain**: `basevn.tech` (hoặc domain Base WeWork của bạn)
53
+ - **Access Token**: Token từ Base WeWork
54
+ 4. Click **Save**
55
+
56
+ ### 4. Use in Workflow
57
+ - Add node → Search "Base WeWork"
58
+ - Select credential
59
+ - Choose Resource and Operation
60
+ - Execute! ⚡
61
+
62
+ ## 📖 Example Usage
63
+
64
+ ### Create Project
65
+ ```yaml
66
+ Resource: Project
67
+ Operation: Create
68
+ Username: @admin
69
+ Project Name: My New Project
70
+ ```
71
+
72
+ ### Create Task
73
+ ```yaml
74
+ Resource: Task
75
+ Operation: Create
76
+ Username: @admin
77
+ Project ID: 123
78
+ Task Name: Important Task
79
+ ```
80
+
81
+ ### Get All Projects
82
+ ```yaml
83
+ Resource: Project
84
+ Operation: Get All
85
+ ```
86
+
87
+ ## 🌐 API Documentation
88
+
89
+ Full API documentation: https://documenter.getpostman.com/view/1345096/SztA68Az?version=latest
90
+
91
+ ## 🛠️ Development
92
+
93
+ ```bash
94
+ # Clone repository
95
+ git clone https://github.com/basevn/n8n-nodes-base-wework.git
96
+ cd n8n-nodes-base-wework
97
+
98
+ # Install dependencies
99
+ npm install
100
+
101
+ # Build
102
+ npm run build
103
+
104
+ # Link for local development
105
+ npm link
106
+ ```
107
+
108
+ ## 📝 License
109
+
110
+ MIT © BaseVN
111
+
112
+ ## 🆘 Support
113
+
114
+ - 📧 Email: support@basevn.tech
115
+ - 🌐 Website: https://basevn.tech
116
+ - 📖 Documentation: https://github.com/basevn/n8n-nodes-base-wework
117
+
118
+ ## 🙏 Credits
119
+
120
+ Built with ❤️ for the n8n community
121
+
122
+ ---
123
+
124
+ **Keywords**: n8n, base, wework, project management, task management, automation, workflow
125
+ npm run dev
126
+ ```
127
+
128
+ This starts n8n with your nodes loaded and hot reload enabled.
129
+
130
+ ## What's Included
131
+
132
+ This starter repository includes two example nodes to learn from:
133
+
134
+ - **[Example Node](nodes/Example/)** - A simple starter node that shows the basic structure with a custom `execute` method
135
+ - **[GitHub Issues Node](nodes/GithubIssues/)** - A complete, production-ready example built using the **declarative style**:
136
+ - **Low-code approach** - Define operations declaratively without writing request logic
137
+ - Multiple resources (Issues, Comments)
138
+ - Multiple operations (Get, Get All, Create)
139
+ - Two authentication methods (OAuth2 and Personal Access Token)
140
+ - List search functionality for dynamic dropdowns
141
+ - Proper error handling and typing
142
+ - Ideal for HTTP API-based integrations
143
+
144
+ > [!TIP]
145
+ > 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.
146
+
147
+ Browse these examples to understand both approaches, then modify them or create your own.
148
+
149
+ ## Finding Inspiration
150
+
151
+ Looking for more examples? Check out these resources:
152
+
153
+ - **[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
154
+ - **[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
155
+ - **[n8n Credentials](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/credentials)** - See how authentication is implemented for various services
156
+
157
+ These are excellent resources to understand how to structure your nodes, handle different API patterns, and implement advanced features.
158
+
159
+ ## Prerequisites
160
+
161
+ Before you begin, install the following on your development machine:
162
+
163
+ ### Required
164
+
165
+ - **[Node.js](https://nodejs.org/)** (v22 or higher) and npm
166
+ - Linux/Mac/WSL: Install via [nvm](https://github.com/nvm-sh/nvm)
167
+ - Windows: Follow [Microsoft's NodeJS guide](https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows)
168
+ - **[git](https://git-scm.com/downloads)**
169
+
170
+ ### Recommended
171
+
172
+ - Follow n8n's [development environment setup guide](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/)
173
+
174
+ > [!NOTE]
175
+ > 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.
176
+
177
+ ## Getting Started with this Starter
178
+
179
+ Follow these steps to create your own n8n community node package:
180
+
181
+ ### 1. Create Your Repository
182
+
183
+ [Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template, then clone it:
184
+
185
+ ```bash
186
+ git clone https://github.com/<your-organization>/<your-repo-name>.git
187
+ cd <your-repo-name>
188
+ ```
189
+
190
+ ### 2. Install Dependencies
191
+
192
+ ```bash
193
+ npm install
194
+ ```
195
+
196
+ This installs all required dependencies including the `@n8n/node-cli`.
197
+
198
+ ### 3. Explore the Examples
199
+
200
+ Browse the example nodes in [nodes/](nodes/) and [credentials/](credentials/) to understand the structure:
201
+
202
+ - Start with [nodes/Example/](nodes/Example/) for a basic node
203
+ - Study [nodes/GithubIssues/](nodes/GithubIssues/) for a real-world implementation
204
+
205
+ ### 4. Build Your Node
206
+
207
+ Edit the example nodes to fit your use case, or create new node files by copying the structure from [nodes/Example/](nodes/Example/).
208
+
209
+ > [!TIP]
210
+ > If you want to scaffold a completely new node package, use `npm create @n8n/node` to start fresh with the CLI's interactive generator.
211
+
212
+ ### 5. Configure Your Package
213
+
214
+ Update `package.json` with your details:
215
+
216
+ - `name` - Your package name (must start with `n8n-nodes-`)
217
+ - `author` - Your name and email
218
+ - `repository` - Your repository URL
219
+ - `description` - What your node does
220
+
221
+ Make sure your node is registered in the `n8n.nodes` array.
222
+
223
+ ### 6. Develop and Test Locally
224
+
225
+ Start n8n with your node loaded:
226
+
227
+ ```bash
228
+ npm run dev
229
+ ```
230
+
231
+ This command runs `n8n-node dev` which:
232
+
233
+ - Builds your node with watch mode
234
+ - Starts n8n with your node available
235
+ - Automatically rebuilds when you make changes
236
+ - Opens n8n in your browser (usually http://localhost:5678)
237
+
238
+ You can now test your node in n8n workflows!
239
+
240
+ > [!NOTE]
241
+ > Learn more about CLI commands in the [@n8n/node-cli documentation](https://www.npmjs.com/package/@n8n/node-cli).
242
+
243
+ ### 7. Lint Your Code
244
+
245
+ Check for errors:
246
+
247
+ ```bash
248
+ npm run lint
249
+ ```
250
+
251
+ Auto-fix issues when possible:
252
+
253
+ ```bash
254
+ npm run lint:fix
255
+ ```
256
+
257
+ ### 8. Build for Production
258
+
259
+ When ready to publish:
260
+
261
+ ```bash
262
+ npm run build
263
+ ```
264
+
265
+ This compiles your TypeScript code to the `dist/` folder.
266
+
267
+ ### 9. Prepare for Publishing
268
+
269
+ Before publishing:
270
+
271
+ 1. **Update documentation**: Replace this README with your node's documentation. Use [README_TEMPLATE.md](README_TEMPLATE.md) as a starting point.
272
+ 2. **Update the LICENSE**: Add your details to the [LICENSE](LICENSE.md) file.
273
+ 3. **Test thoroughly**: Ensure your node works in different scenarios.
274
+
275
+ ### 10. Publish to npm
276
+
277
+ Publish your package to make it available to the n8n community:
278
+
279
+ ```bash
280
+ npm publish
281
+ ```
282
+
283
+ Learn more about [publishing to npm](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
284
+
285
+ ### 11. Submit for Verification (Optional)
286
+
287
+ Get your node verified for n8n Cloud:
288
+
289
+ 1. Ensure your node meets the [requirements](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/):
290
+ - Uses MIT license ✅ (included in this starter)
291
+ - No external package dependencies
292
+ - Follows n8n's design guidelines
293
+ - Passes quality and security review
294
+
295
+ 2. Submit through the [n8n Creator Portal](https://creators.n8n.io/nodes)
296
+
297
+ **Benefits of verification:**
298
+
299
+ - Available directly in n8n Cloud
300
+ - Discoverable in the n8n nodes panel
301
+ - Verified badge for quality assurance
302
+ - Increased visibility in the n8n community
303
+
304
+ ## Available Scripts
305
+
306
+ This starter includes several npm scripts to streamline development:
307
+
308
+ | Script | Description |
309
+ | --------------------- | ---------------------------------------------------------------- |
310
+ | `npm run dev` | Start n8n with your node and watch for changes (runs `n8n-node dev`) |
311
+ | `npm run build` | Compile TypeScript to JavaScript for production (runs `n8n-node build`) |
312
+ | `npm run build:watch` | Build in watch mode (auto-rebuild on changes) |
313
+ | `npm run lint` | Check your code for errors and style issues (runs `n8n-node lint`) |
314
+ | `npm run lint:fix` | Automatically fix linting issues when possible (runs `n8n-node lint --fix`) |
315
+ | `npm run release` | Create a new release (runs `n8n-node release`) |
316
+
317
+ > [!TIP]
318
+ > 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`.
319
+
320
+ ## Troubleshooting
321
+
322
+ ### My node doesn't appear in n8n
323
+
324
+ 1. Make sure you ran `npm install` to install dependencies
325
+ 2. Check that your node is listed in `package.json` under `n8n.nodes`
326
+ 3. Restart the dev server with `npm run dev`
327
+ 4. Check the console for any error messages
328
+
329
+ ### Linting errors
330
+
331
+ 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/).
332
+
333
+ ### TypeScript errors
334
+
335
+ Make sure you're using Node.js v22 or higher and have run `npm install` to get all type definitions.
336
+
337
+ ## Resources
338
+
339
+ - **[n8n Node Documentation](https://docs.n8n.io/integrations/creating-nodes/)** - Complete guide to building nodes
340
+ - **[n8n Community Forum](https://community.n8n.io/)** - Get help and share your nodes
341
+ - **[@n8n/node-cli Documentation](https://www.npmjs.com/package/@n8n/node-cli)** - CLI tool reference
342
+ - **[n8n Creator Portal](https://creators.n8n.io/nodes)** - Submit your node for verification
343
+ - **[Submit Community Nodes Guide](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/)** - Verification requirements and process
344
+
345
+ ## Contributing
346
+
347
+ Have suggestions for improving this starter? [Open an issue](https://github.com/n8n-io/n8n-nodes-starter/issues) or submit a pull request!
348
+
349
+ ## License
350
+
351
+ [MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)
@@ -0,0 +1,9 @@
1
+ import type { Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class BaseWeworkApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: Icon;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ test: ICredentialTestRequest;
9
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseWeworkApi = void 0;
4
+ class BaseWeworkApi {
5
+ constructor() {
6
+ this.name = 'baseWeworkApi';
7
+ this.displayName = 'Base WeWork API';
8
+ this.icon = 'file:basewework.svg';
9
+ this.documentationUrl = 'https://documenter.getpostman.com/view/1345096/SztA68Az?version=latest';
10
+ this.properties = [
11
+ {
12
+ displayName: 'Domain',
13
+ name: 'domain',
14
+ type: 'string',
15
+ default: 'basevn.tech',
16
+ placeholder: 'basevn.tech hoặc wework.vn',
17
+ description: 'Domain đầy đủ của Base WeWork (vd: basevn.tech, wework.vn)',
18
+ },
19
+ {
20
+ displayName: 'Access Token',
21
+ name: 'accessToken',
22
+ type: 'string',
23
+ typeOptions: { password: true },
24
+ default: '',
25
+ required: true,
26
+ description: 'Access token để xác thực với Base WeWork API',
27
+ },
28
+ ];
29
+ this.test = {
30
+ request: {
31
+ baseURL: '=https://{{$credentials?.domain}}',
32
+ url: '/extapi/v3/user/info',
33
+ method: 'POST',
34
+ },
35
+ };
36
+ }
37
+ }
38
+ exports.BaseWeworkApi = BaseWeworkApi;
39
+ //# sourceMappingURL=BaseWeworkApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseWeworkApi.credentials.js","sourceRoot":"","sources":["../../credentials/BaseWeworkApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,aAAa;IAA1B;QACC,SAAI,GAAG,eAAe,CAAC;QAEvB,gBAAW,GAAG,iBAAiB,CAAC;QAEhC,SAAI,GAAS,qBAAqB,CAAC;QAEnC,qBAAgB,GAAG,wEAAwE,CAAC;QAE5F,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,aAAa;gBACtB,WAAW,EAAE,4BAA4B;gBACzC,WAAW,EAAE,4DAA4D;aACzE;YACD;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,8CAA8C;aAC3D;SACD,CAAC;QAIF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,mCAAmC;gBAC5C,GAAG,EAAE,sBAAsB;gBAC3B,MAAM,EAAE,MAAM;aACd;SACD,CAAC;IACH,CAAC;CAAA;AAtCD,sCAsCC"}
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class GithubIssuesApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: Icon;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GithubIssuesApi = void 0;
4
+ class GithubIssuesApi {
5
+ constructor() {
6
+ this.name = 'githubIssuesApi';
7
+ this.displayName = 'GitHub Issues API';
8
+ this.icon = { light: 'file:../icons/github.svg', dark: 'file:../icons/github.dark.svg' };
9
+ this.documentationUrl = 'https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#deleting-a-personal-access-token';
10
+ this.properties = [
11
+ {
12
+ displayName: 'Access Token',
13
+ name: 'accessToken',
14
+ type: 'string',
15
+ typeOptions: { password: true },
16
+ default: '',
17
+ },
18
+ ];
19
+ this.authenticate = {
20
+ type: 'generic',
21
+ properties: {
22
+ headers: {
23
+ Authorization: '=token {{$credentials?.accessToken}}',
24
+ },
25
+ },
26
+ };
27
+ this.test = {
28
+ request: {
29
+ baseURL: 'https://api.github.com',
30
+ url: '/user',
31
+ method: 'GET',
32
+ },
33
+ };
34
+ }
35
+ }
36
+ exports.GithubIssuesApi = GithubIssuesApi;
37
+ //# sourceMappingURL=GithubIssuesApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GithubIssuesApi.credentials.js","sourceRoot":"","sources":["../../credentials/GithubIssuesApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,eAAe;IAA5B;QACC,SAAI,GAAG,iBAAiB,CAAC;QAEzB,gBAAW,GAAG,mBAAmB,CAAC;QAElC,SAAI,GAAS,EAAE,KAAK,EAAE,0BAA0B,EAAE,IAAI,EAAE,+BAA+B,EAAE,CAAC;QAE1F,qBAAgB,GACf,sJAAsJ,CAAC;QAExJ,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;aACX;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,sCAAsC;iBACrD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,wBAAwB;gBACjC,GAAG,EAAE,OAAO;gBACZ,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AApCD,0CAoCC"}
@@ -0,0 +1,9 @@
1
+ import type { Icon, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class GithubIssuesOAuth2Api implements ICredentialType {
3
+ name: string;
4
+ extends: string[];
5
+ displayName: string;
6
+ icon: Icon;
7
+ documentationUrl: string;
8
+ properties: INodeProperties[];
9
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GithubIssuesOAuth2Api = void 0;
4
+ class GithubIssuesOAuth2Api {
5
+ constructor() {
6
+ this.name = 'githubIssuesOAuth2Api';
7
+ this.extends = ['oAuth2Api'];
8
+ this.displayName = 'GitHub Issues OAuth2 API';
9
+ this.icon = { light: 'file:../icons/github.svg', dark: 'file:../icons/github.dark.svg' };
10
+ this.documentationUrl = 'https://docs.github.com/en/apps/oauth-apps';
11
+ this.properties = [
12
+ {
13
+ displayName: 'Grant Type',
14
+ name: 'grantType',
15
+ type: 'hidden',
16
+ default: 'authorizationCode',
17
+ },
18
+ {
19
+ displayName: 'Authorization URL',
20
+ name: 'authUrl',
21
+ type: 'hidden',
22
+ default: 'https://github.com/login/oauth/authorize',
23
+ required: true,
24
+ },
25
+ {
26
+ displayName: 'Access Token URL',
27
+ name: 'accessTokenUrl',
28
+ type: 'hidden',
29
+ default: 'https://github.com/login/oauth/access_token',
30
+ required: true,
31
+ },
32
+ {
33
+ displayName: 'Scope',
34
+ name: 'scope',
35
+ type: 'hidden',
36
+ default: 'repo',
37
+ },
38
+ {
39
+ displayName: 'Auth URI Query Parameters',
40
+ name: 'authQueryParameters',
41
+ type: 'hidden',
42
+ default: '',
43
+ },
44
+ {
45
+ displayName: 'Authentication',
46
+ name: 'authentication',
47
+ type: 'hidden',
48
+ default: 'header',
49
+ },
50
+ ];
51
+ }
52
+ }
53
+ exports.GithubIssuesOAuth2Api = GithubIssuesOAuth2Api;
54
+ //# sourceMappingURL=GithubIssuesOAuth2Api.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GithubIssuesOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/GithubIssuesOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,qBAAqB;IAAlC;QACC,SAAI,GAAG,uBAAuB,CAAC;QAE/B,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QAExB,gBAAW,GAAG,0BAA0B,CAAC;QAEzC,SAAI,GAAS,EAAE,KAAK,EAAE,0BAA0B,EAAE,IAAI,EAAE,+BAA+B,EAAE,CAAC;QAE1F,qBAAgB,GAAG,4CAA4C,CAAC;QAEhE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mBAAmB;aAC5B;YACD;gBACC,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,0CAA0C;gBACnD,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,6CAA6C;gBACtD,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,MAAM;aACf;YACD;gBACC,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,QAAQ;aACjB;SACD,CAAC;IACH,CAAC;CAAA;AAnDD,sDAmDC"}
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class BaseWework implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }