n8n-nodes-basevn-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.

Potentially problematic release.


This version of n8n-nodes-basevn-wework might be problematic. Click here for more details.

Files changed (27) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +396 -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/BaseWorkflowApi.credentials.d.ts +9 -0
  7. package/dist/credentials/BaseWorkflowApi.credentials.js +39 -0
  8. package/dist/credentials/BaseWorkflowApi.credentials.js.map +1 -0
  9. package/dist/credentials/GithubIssuesApi.credentials.d.ts +10 -0
  10. package/dist/credentials/GithubIssuesApi.credentials.js +37 -0
  11. package/dist/credentials/GithubIssuesApi.credentials.js.map +1 -0
  12. package/dist/credentials/GithubIssuesOAuth2Api.credentials.d.ts +9 -0
  13. package/dist/credentials/GithubIssuesOAuth2Api.credentials.js +54 -0
  14. package/dist/credentials/GithubIssuesOAuth2Api.credentials.js.map +1 -0
  15. package/dist/nodes/BaseWework/BaseWework.node.d.ts +5 -0
  16. package/dist/nodes/BaseWework/BaseWework.node.js +1144 -0
  17. package/dist/nodes/BaseWework/BaseWework.node.js.map +1 -0
  18. package/dist/nodes/BaseWework/BaseWework.node.json +19 -0
  19. package/dist/nodes/BaseWework/basewework.svg +1 -0
  20. package/dist/nodes/BaseWeworkTrigger/BaseWeworkTrigger.node.d.ts +5 -0
  21. package/dist/nodes/BaseWeworkTrigger/BaseWeworkTrigger.node.js +86 -0
  22. package/dist/nodes/BaseWeworkTrigger/BaseWeworkTrigger.node.js.map +1 -0
  23. package/dist/nodes/BaseWeworkTrigger/BaseWeworkTrigger.node.json +13 -0
  24. package/dist/nodes/BaseWeworkTrigger/basewework.svg +1 -0
  25. package/dist/package.json +56 -0
  26. package/dist/tsconfig.tsbuildinfo +1 -0
  27. package/package.json +56 -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,396 @@
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, departments với action nodes và webhook triggers cho sự kiện real-time!
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
+ ### Action Node (Base WeWork)
20
+ - 🎯 **15+ Operations** - Quản lý đầy đủ các hoạt động từ Base WeWork API v3
21
+ - 📦 **3 Resources** - Project, Task, Department
22
+ - 🔐 **Secure Authentication** - API key authentication với domain configuration
23
+ - ⚡ **Production Ready** - Error handling, type-safe, tested
24
+
25
+ ### Trigger Node (Base WeWork Trigger)
26
+ - ⚡ **6 Webhook Triggers** - Nhận sự kiện real-time từ Base WeWork
27
+ - 🎪 **Task Events** - Task created, done, status updated
28
+ - 📋 **Subtask Events** - Subtask created, done, status updated
29
+ - 🔔 **Real-time** - Phản ứng ngay lập tức với các thay đổi
30
+
31
+ ## 📚 Resources & Operations
32
+
33
+ ### Action Node Resources
34
+
35
+ | Resource | Operations | Description |
36
+ |----------|-----------|-------------|
37
+ | 📁 **Project** | Create, Edit, Get Full, List | Quản lý dự án (tạo, sửa, xem chi tiết, danh sách) |
38
+ | ✅ **Task** | Create, Create Subtask, Edit Basic Info, Edit Extra, Get, List by Project, Mark Done | Quản lý công việc và subtask |
39
+ | 🏢 **Department** | Create, Edit, Get, List, Remove | Quản lý phòng ban |
40
+
41
+ ### Trigger Node Events
42
+
43
+ | Event | Description |
44
+ |-------|-------------|
45
+ | 🆕 **On Task Created** | Trigger khi task mới được tạo |
46
+ | ✅ **On Task Done** | Trigger khi task được đánh dấu hoàn thành |
47
+ | 🔄 **On Task Status Updated** | Trigger khi trạng thái task thay đổi |
48
+ | 📋 **On Subtask Created** | Trigger khi subtask mới được tạo |
49
+ | ✔️ **On Subtask Done** | Trigger khi subtask được đánh dấu hoàn thành |
50
+ | 🔄 **On Subtask Status Updated** | Trigger khi trạng thái subtask thay đổi |
51
+
52
+ ## 🔧 Setup
53
+
54
+ ### 1. Install node
55
+ ```bash
56
+ npm install n8n-nodes-base-wework
57
+ ```
58
+
59
+ ### 2. Restart n8n
60
+ ```bash
61
+ n8n start
62
+ ```
63
+
64
+ ### 3. Configure Credential
65
+ 1. Mở n8n UI → **Credentials** → **Add Credential**
66
+ 2. Chọn **Base WeWork API**
67
+ 3. Nhập:
68
+ - **Domain**: `basevn.tech` (hoặc domain Base WeWork của bạn)
69
+ - **Access Token**: Token từ Base WeWork
70
+ 4. Click **Save**
71
+
72
+ ### 4. Use in Workflow
73
+ - Add node → Search "Base WeWork"
74
+ - Select credential
75
+ - Choose Resource and Operation
76
+ - Execute! ⚡
77
+
78
+ ## 📖 Example Usage
79
+
80
+ ### Action Node Examples
81
+
82
+ #### Create Project
83
+ ```yaml
84
+ Node: Base WeWork
85
+ Resource: Project
86
+ Operation: Create
87
+ Username: @admin
88
+ Metatype: project
89
+ Name: My New Project
90
+ External: Inhouse (0)
91
+ Owners: @admin
92
+ Content: Project description
93
+ ```
94
+
95
+ #### Create Task
96
+ ```yaml
97
+ Node: Base WeWork
98
+ Resource: Task
99
+ Operation: Create
100
+ Username: @admin
101
+ Project ID: 123
102
+ Tasklist ID: 456
103
+ Name: Important Task
104
+ Content: Task description
105
+ Assign: @user
106
+ ```
107
+
108
+ #### List Projects
109
+ ```yaml
110
+ Node: Base WeWork
111
+ Resource: Project
112
+ Operation: List
113
+ ```
114
+
115
+ ### Trigger Node Examples
116
+
117
+ #### Trigger on Task Created
118
+ ```yaml
119
+ Node: Base WeWork Trigger
120
+ Event: On Task Created
121
+ # Webhook URL sẽ được tạo tự động
122
+ # Cấu hình webhook này trong Base WeWork để nhận events
123
+ ```
124
+
125
+ #### Trigger on Task Done
126
+ ```yaml
127
+ Node: Base WeWork Trigger
128
+ Event: On Task Done
129
+ # Tự động trigger workflow khi task được hoàn thành
130
+ ```
131
+
132
+ ## 🌐 API Documentation
133
+
134
+ Full API documentation: https://documenter.getpostman.com/view/1345096/SztA68Az?version=latest
135
+
136
+ ## 🛠️ Development
137
+
138
+ ```bash
139
+ # Clone repository
140
+ git clone https://github.com/basevn/n8n-nodes-base-wework.git
141
+ cd n8n-nodes-base-wework
142
+
143
+ # Install dependencies
144
+ npm install
145
+
146
+ # Build
147
+ npm run build
148
+
149
+ # Link for local development
150
+ npm link
151
+ ```
152
+
153
+ ## 📝 License
154
+
155
+ MIT © BaseVN
156
+
157
+ ## 🆘 Support
158
+
159
+ - 📧 Email: support@basevn.tech
160
+ - 🌐 Website: https://basevn.tech
161
+ - 📖 Documentation: https://github.com/basevn/n8n-nodes-base-wework
162
+
163
+ ## 🙏 Credits
164
+
165
+ Built with ❤️ for the n8n community
166
+
167
+ ---
168
+
169
+ **Keywords**: n8n, base, wework, project management, task management, automation, workflow
170
+ npm run dev
171
+ ```
172
+
173
+ This starts n8n with your nodes loaded and hot reload enabled.
174
+
175
+ ## What's Included
176
+
177
+ This starter repository includes two example nodes to learn from:
178
+
179
+ - **[Example Node](nodes/Example/)** - A simple starter node that shows the basic structure with a custom `execute` method
180
+ - **[GitHub Issues Node](nodes/GithubIssues/)** - A complete, production-ready example built using the **declarative style**:
181
+ - **Low-code approach** - Define operations declaratively without writing request logic
182
+ - Multiple resources (Issues, Comments)
183
+ - Multiple operations (Get, Get All, Create)
184
+ - Two authentication methods (OAuth2 and Personal Access Token)
185
+ - List search functionality for dynamic dropdowns
186
+ - Proper error handling and typing
187
+ - Ideal for HTTP API-based integrations
188
+
189
+ > [!TIP]
190
+ > 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.
191
+
192
+ Browse these examples to understand both approaches, then modify them or create your own.
193
+
194
+ ## Finding Inspiration
195
+
196
+ Looking for more examples? Check out these resources:
197
+
198
+ - **[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
199
+ - **[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
200
+ - **[n8n Credentials](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/credentials)** - See how authentication is implemented for various services
201
+
202
+ These are excellent resources to understand how to structure your nodes, handle different API patterns, and implement advanced features.
203
+
204
+ ## Prerequisites
205
+
206
+ Before you begin, install the following on your development machine:
207
+
208
+ ### Required
209
+
210
+ - **[Node.js](https://nodejs.org/)** (v22 or higher) and npm
211
+ - Linux/Mac/WSL: Install via [nvm](https://github.com/nvm-sh/nvm)
212
+ - Windows: Follow [Microsoft's NodeJS guide](https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows)
213
+ - **[git](https://git-scm.com/downloads)**
214
+
215
+ ### Recommended
216
+
217
+ - Follow n8n's [development environment setup guide](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/)
218
+
219
+ > [!NOTE]
220
+ > 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.
221
+
222
+ ## Getting Started with this Starter
223
+
224
+ Follow these steps to create your own n8n community node package:
225
+
226
+ ### 1. Create Your Repository
227
+
228
+ [Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template, then clone it:
229
+
230
+ ```bash
231
+ git clone https://github.com/<your-organization>/<your-repo-name>.git
232
+ cd <your-repo-name>
233
+ ```
234
+
235
+ ### 2. Install Dependencies
236
+
237
+ ```bash
238
+ npm install
239
+ ```
240
+
241
+ This installs all required dependencies including the `@n8n/node-cli`.
242
+
243
+ ### 3. Explore the Examples
244
+
245
+ Browse the example nodes in [nodes/](nodes/) and [credentials/](credentials/) to understand the structure:
246
+
247
+ - Start with [nodes/Example/](nodes/Example/) for a basic node
248
+ - Study [nodes/GithubIssues/](nodes/GithubIssues/) for a real-world implementation
249
+
250
+ ### 4. Build Your Node
251
+
252
+ Edit the example nodes to fit your use case, or create new node files by copying the structure from [nodes/Example/](nodes/Example/).
253
+
254
+ > [!TIP]
255
+ > If you want to scaffold a completely new node package, use `npm create @n8n/node` to start fresh with the CLI's interactive generator.
256
+
257
+ ### 5. Configure Your Package
258
+
259
+ Update `package.json` with your details:
260
+
261
+ - `name` - Your package name (must start with `n8n-nodes-`)
262
+ - `author` - Your name and email
263
+ - `repository` - Your repository URL
264
+ - `description` - What your node does
265
+
266
+ Make sure your node is registered in the `n8n.nodes` array.
267
+
268
+ ### 6. Develop and Test Locally
269
+
270
+ Start n8n with your node loaded:
271
+
272
+ ```bash
273
+ npm run dev
274
+ ```
275
+
276
+ This command runs `n8n-node dev` which:
277
+
278
+ - Builds your node with watch mode
279
+ - Starts n8n with your node available
280
+ - Automatically rebuilds when you make changes
281
+ - Opens n8n in your browser (usually http://localhost:5678)
282
+
283
+ You can now test your node in n8n workflows!
284
+
285
+ > [!NOTE]
286
+ > Learn more about CLI commands in the [@n8n/node-cli documentation](https://www.npmjs.com/package/@n8n/node-cli).
287
+
288
+ ### 7. Lint Your Code
289
+
290
+ Check for errors:
291
+
292
+ ```bash
293
+ npm run lint
294
+ ```
295
+
296
+ Auto-fix issues when possible:
297
+
298
+ ```bash
299
+ npm run lint:fix
300
+ ```
301
+
302
+ ### 8. Build for Production
303
+
304
+ When ready to publish:
305
+
306
+ ```bash
307
+ npm run build
308
+ ```
309
+
310
+ This compiles your TypeScript code to the `dist/` folder.
311
+
312
+ ### 9. Prepare for Publishing
313
+
314
+ Before publishing:
315
+
316
+ 1. **Update documentation**: Replace this README with your node's documentation. Use [README_TEMPLATE.md](README_TEMPLATE.md) as a starting point.
317
+ 2. **Update the LICENSE**: Add your details to the [LICENSE](LICENSE.md) file.
318
+ 3. **Test thoroughly**: Ensure your node works in different scenarios.
319
+
320
+ ### 10. Publish to npm
321
+
322
+ Publish your package to make it available to the n8n community:
323
+
324
+ ```bash
325
+ npm publish
326
+ ```
327
+
328
+ Learn more about [publishing to npm](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
329
+
330
+ ### 11. Submit for Verification (Optional)
331
+
332
+ Get your node verified for n8n Cloud:
333
+
334
+ 1. Ensure your node meets the [requirements](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/):
335
+ - Uses MIT license ✅ (included in this starter)
336
+ - No external package dependencies
337
+ - Follows n8n's design guidelines
338
+ - Passes quality and security review
339
+
340
+ 2. Submit through the [n8n Creator Portal](https://creators.n8n.io/nodes)
341
+
342
+ **Benefits of verification:**
343
+
344
+ - Available directly in n8n Cloud
345
+ - Discoverable in the n8n nodes panel
346
+ - Verified badge for quality assurance
347
+ - Increased visibility in the n8n community
348
+
349
+ ## Available Scripts
350
+
351
+ This starter includes several npm scripts to streamline development:
352
+
353
+ | Script | Description |
354
+ | --------------------- | ---------------------------------------------------------------- |
355
+ | `npm run dev` | Start n8n with your node and watch for changes (runs `n8n-node dev`) |
356
+ | `npm run build` | Compile TypeScript to JavaScript for production (runs `n8n-node build`) |
357
+ | `npm run build:watch` | Build in watch mode (auto-rebuild on changes) |
358
+ | `npm run lint` | Check your code for errors and style issues (runs `n8n-node lint`) |
359
+ | `npm run lint:fix` | Automatically fix linting issues when possible (runs `n8n-node lint --fix`) |
360
+ | `npm run release` | Create a new release (runs `n8n-node release`) |
361
+
362
+ > [!TIP]
363
+ > 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`.
364
+
365
+ ## Troubleshooting
366
+
367
+ ### My node doesn't appear in n8n
368
+
369
+ 1. Make sure you ran `npm install` to install dependencies
370
+ 2. Check that your node is listed in `package.json` under `n8n.nodes`
371
+ 3. Restart the dev server with `npm run dev`
372
+ 4. Check the console for any error messages
373
+
374
+ ### Linting errors
375
+
376
+ 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/).
377
+
378
+ ### TypeScript errors
379
+
380
+ Make sure you're using Node.js v22 or higher and have run `npm install` to get all type definitions.
381
+
382
+ ## Resources
383
+
384
+ - **[n8n Node Documentation](https://docs.n8n.io/integrations/creating-nodes/)** - Complete guide to building nodes
385
+ - **[n8n Community Forum](https://community.n8n.io/)** - Get help and share your nodes
386
+ - **[@n8n/node-cli Documentation](https://www.npmjs.com/package/@n8n/node-cli)** - CLI tool reference
387
+ - **[n8n Creator Portal](https://creators.n8n.io/nodes)** - Submit your node for verification
388
+ - **[Submit Community Nodes Guide](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/)** - Verification requirements and process
389
+
390
+ ## Contributing
391
+
392
+ Have suggestions for improving this starter? [Open an issue](https://github.com/n8n-io/n8n-nodes-starter/issues) or submit a pull request!
393
+
394
+ ## License
395
+
396
+ [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,9 @@
1
+ import type { Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class BaseWorkflowApi 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.BaseWorkflowApi = void 0;
4
+ class BaseWorkflowApi {
5
+ constructor() {
6
+ this.name = 'baseWorkflowApi';
7
+ this.displayName = 'Base Workflow API';
8
+ this.icon = 'file:baseworkflow.svg';
9
+ this.documentationUrl = 'https://documenter.getpostman.com/view/1345096/SWE84Hd1?version=latest';
10
+ this.properties = [
11
+ {
12
+ displayName: 'Domain',
13
+ name: 'domain',
14
+ type: 'string',
15
+ default: 'basevn.tech',
16
+ placeholder: 'basevn.tech',
17
+ description: 'Domain của Base Workflow',
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 v2 để xác thực với Base Workflow API',
27
+ },
28
+ ];
29
+ this.test = {
30
+ request: {
31
+ baseURL: '=https://workflow.{{$credentials?.domain}}',
32
+ url: '/extapi/v1/jobs/get',
33
+ method: 'POST',
34
+ },
35
+ };
36
+ }
37
+ }
38
+ exports.BaseWorkflowApi = BaseWorkflowApi;
39
+ //# sourceMappingURL=BaseWorkflowApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseWorkflowApi.credentials.js","sourceRoot":"","sources":["../../credentials/BaseWorkflowApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,eAAe;IAA5B;QACC,SAAI,GAAG,iBAAiB,CAAC;QAEzB,gBAAW,GAAG,mBAAmB,CAAC;QAElC,SAAI,GAAS,uBAAuB,CAAC;QAErC,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,aAAa;gBAC1B,WAAW,EAAE,0BAA0B;aACvC;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,mDAAmD;aAChE;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,4CAA4C;gBACrD,GAAG,EAAE,qBAAqB;gBAC1B,MAAM,EAAE,MAAM;aACd;SACD,CAAC;IACH,CAAC;CAAA;AApCD,0CAoCC"}
@@ -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
+ }