n8n-nodes-redlib 0.1.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +101 -201
  2. package/dist/credentials/RedlibApi.credentials.d.ts +10 -0
  3. package/dist/credentials/RedlibApi.credentials.js +80 -0
  4. package/dist/credentials/RedlibApi.credentials.js.map +1 -0
  5. package/dist/icons/redlib.dark.svg +11 -0
  6. package/dist/icons/redlib.svg +11 -0
  7. package/dist/nodes/Redlib/Redlib.node.d.ts +6 -0
  8. package/dist/nodes/Redlib/Redlib.node.js +404 -0
  9. package/dist/nodes/Redlib/Redlib.node.js.map +1 -0
  10. package/dist/nodes/Redlib/Redlib.node.json +18 -0
  11. package/dist/nodes/Redlib/resources/post/get.d.ts +2 -0
  12. package/dist/nodes/Redlib/resources/post/get.js +31 -0
  13. package/dist/nodes/Redlib/resources/post/get.js.map +1 -0
  14. package/dist/nodes/Redlib/resources/post/getAll.d.ts +2 -0
  15. package/dist/nodes/Redlib/resources/post/getAll.js +60 -0
  16. package/dist/nodes/Redlib/resources/post/getAll.js.map +1 -0
  17. package/dist/nodes/Redlib/resources/post/search.d.ts +2 -0
  18. package/dist/nodes/Redlib/resources/post/search.js +113 -0
  19. package/dist/nodes/Redlib/resources/post/search.js.map +1 -0
  20. package/dist/nodes/Redlib/resources/postComment/get.d.ts +2 -0
  21. package/dist/nodes/Redlib/resources/postComment/get.js +44 -0
  22. package/dist/nodes/Redlib/resources/postComment/get.js.map +1 -0
  23. package/dist/nodes/Redlib/resources/postComment/getAll.d.ts +2 -0
  24. package/dist/nodes/Redlib/resources/postComment/getAll.js +44 -0
  25. package/dist/nodes/Redlib/resources/postComment/getAll.js.map +1 -0
  26. package/dist/nodes/Redlib/resources/postComment/search.d.ts +2 -0
  27. package/dist/nodes/Redlib/resources/postComment/search.js +44 -0
  28. package/dist/nodes/Redlib/resources/postComment/search.js.map +1 -0
  29. package/dist/nodes/Redlib/resources/subreddit/get.d.ts +2 -0
  30. package/dist/nodes/Redlib/resources/subreddit/get.js +19 -0
  31. package/dist/nodes/Redlib/resources/subreddit/get.js.map +1 -0
  32. package/dist/nodes/Redlib/resources/subreddit/getAll.d.ts +2 -0
  33. package/dist/nodes/Redlib/resources/subreddit/getAll.js +29 -0
  34. package/dist/nodes/Redlib/resources/subreddit/getAll.js.map +1 -0
  35. package/dist/nodes/Redlib/resources/subreddit/search.d.ts +2 -0
  36. package/dist/nodes/Redlib/resources/subreddit/search.js +32 -0
  37. package/dist/nodes/Redlib/resources/subreddit/search.js.map +1 -0
  38. package/dist/nodes/Redlib/shared/utils.d.ts +85 -0
  39. package/dist/nodes/Redlib/shared/utils.js +313 -0
  40. package/dist/nodes/Redlib/shared/utils.js.map +1 -0
  41. package/dist/package.json +8 -7
  42. package/dist/tsconfig.tsbuildinfo +1 -1
  43. package/package.json +8 -7
  44. package/dist/credentials/GithubIssuesApi.credentials.d.ts +0 -10
  45. package/dist/credentials/GithubIssuesApi.credentials.js +0 -37
  46. package/dist/credentials/GithubIssuesApi.credentials.js.map +0 -1
  47. package/dist/credentials/GithubIssuesOAuth2Api.credentials.d.ts +0 -9
  48. package/dist/credentials/GithubIssuesOAuth2Api.credentials.js +0 -54
  49. package/dist/credentials/GithubIssuesOAuth2Api.credentials.js.map +0 -1
  50. package/dist/icons/github.dark.svg +0 -3
  51. package/dist/icons/github.svg +0 -3
  52. package/dist/nodes/Example/Example.node.d.ts +0 -5
  53. package/dist/nodes/Example/Example.node.js +0 -61
  54. package/dist/nodes/Example/Example.node.js.map +0 -1
  55. package/dist/nodes/Example/Example.node.json +0 -18
  56. package/dist/nodes/Example/example.dark.svg +0 -13
  57. package/dist/nodes/Example/example.svg +0 -13
  58. package/dist/nodes/GithubIssues/GithubIssues.node.d.ts +0 -14
  59. package/dist/nodes/GithubIssues/GithubIssues.node.js +0 -101
  60. package/dist/nodes/GithubIssues/GithubIssues.node.js.map +0 -1
  61. package/dist/nodes/GithubIssues/GithubIssues.node.json +0 -18
  62. package/dist/nodes/GithubIssues/listSearch/getIssues.d.ts +0 -2
  63. package/dist/nodes/GithubIssues/listSearch/getIssues.js +0 -28
  64. package/dist/nodes/GithubIssues/listSearch/getIssues.js.map +0 -1
  65. package/dist/nodes/GithubIssues/listSearch/getRepositories.d.ts +0 -2
  66. package/dist/nodes/GithubIssues/listSearch/getRepositories.js +0 -31
  67. package/dist/nodes/GithubIssues/listSearch/getRepositories.js.map +0 -1
  68. package/dist/nodes/GithubIssues/listSearch/getUsers.d.ts +0 -2
  69. package/dist/nodes/GithubIssues/listSearch/getUsers.js +0 -29
  70. package/dist/nodes/GithubIssues/listSearch/getUsers.js.map +0 -1
  71. package/dist/nodes/GithubIssues/resources/issue/create.d.ts +0 -2
  72. package/dist/nodes/GithubIssues/resources/issue/create.js +0 -75
  73. package/dist/nodes/GithubIssues/resources/issue/create.js.map +0 -1
  74. package/dist/nodes/GithubIssues/resources/issue/get.d.ts +0 -2
  75. package/dist/nodes/GithubIssues/resources/issue/get.js +0 -15
  76. package/dist/nodes/GithubIssues/resources/issue/get.js.map +0 -1
  77. package/dist/nodes/GithubIssues/resources/issue/getAll.d.ts +0 -2
  78. package/dist/nodes/GithubIssues/resources/issue/getAll.js +0 -125
  79. package/dist/nodes/GithubIssues/resources/issue/getAll.js.map +0 -1
  80. package/dist/nodes/GithubIssues/resources/issue/index.d.ts +0 -2
  81. package/dist/nodes/GithubIssues/resources/issue/index.js +0 -76
  82. package/dist/nodes/GithubIssues/resources/issue/index.js.map +0 -1
  83. package/dist/nodes/GithubIssues/resources/issueComment/getAll.d.ts +0 -2
  84. package/dist/nodes/GithubIssues/resources/issueComment/getAll.js +0 -66
  85. package/dist/nodes/GithubIssues/resources/issueComment/getAll.js.map +0 -1
  86. package/dist/nodes/GithubIssues/resources/issueComment/index.d.ts +0 -2
  87. package/dist/nodes/GithubIssues/resources/issueComment/index.js +0 -48
  88. package/dist/nodes/GithubIssues/resources/issueComment/index.js.map +0 -1
  89. package/dist/nodes/GithubIssues/shared/descriptions.d.ts +0 -4
  90. package/dist/nodes/GithubIssues/shared/descriptions.js +0 -151
  91. package/dist/nodes/GithubIssues/shared/descriptions.js.map +0 -1
  92. package/dist/nodes/GithubIssues/shared/transport.d.ts +0 -2
  93. package/dist/nodes/GithubIssues/shared/transport.js +0 -16
  94. package/dist/nodes/GithubIssues/shared/transport.js.map +0 -1
  95. package/dist/nodes/GithubIssues/shared/utils.d.ts +0 -3
  96. package/dist/nodes/GithubIssues/shared/utils.js +0 -17
  97. package/dist/nodes/GithubIssues/shared/utils.js.map +0 -1
package/README.md CHANGED
@@ -1,247 +1,147 @@
1
- ![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)
2
-
3
1
  # n8n-nodes-redlib
4
2
 
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.
3
+ [n8n](https://n8n.io/) community node for fetching Reddit data through Redlib without OAuth authentication.
42
4
 
43
- Browse these examples to understand both approaches, then modify them or create your own.
5
+ > **Disclaimer**: This project is not affiliated with, endorsed by, or connected to [Redlib](https://github.com/redlib-org/redlib) in any way. Redlib is a separate independent project. This node simply uses publicly accessible Redlib instances to fetch Reddit data.
44
6
 
45
- ## Finding Inspiration
7
+ ## Why This Node?
46
8
 
47
- Looking for more examples? Check out these resources:
9
+ In November 2025, Reddit introduced the [Responsible Builder Policy](https://www.reddit.com/r/redditdev/comments/1oug31u/introducing_the_responsible_builder_policy_new/), which significantly restricts the creation of new OAuth2 applications. Developers can no longer self-serve OAuth2 apps and must instead submit a support ticket with a low approval rate.
48
10
 
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
11
+ This node exists to help n8n users continue to fetch Reddit data for automation workflows without needing OAuth2 credentials. It uses [Redlib](https://github.com/redlib-org/redlib)—a private Reddit frontend—to scrape public Reddit data and return it in the same format as the Reddit API.
52
12
 
53
- These are excellent resources to understand how to structure your nodes, handle different API patterns, and implement advanced features.
13
+ ## What is Redlib?
54
14
 
55
- ## Prerequisites
15
+ Redlib is an alternative private front-end to Reddit. It provides a clean, privacy-focused interface for browsing Reddit without tracking. This node uses Redlib instances to fetch public Reddit data (posts, comments, subreddit information) and parses the HTML to return structured data compatible with the Reddit API format.
56
16
 
57
- Before you begin, install the following on your development machine:
17
+ > **Note**: This project is independent from Redlib. For issues related to Redlib itself, please visit the [Redlib GitHub repository](https://github.com/redlib-org/redlib).
58
18
 
59
- ### Required
19
+ [Installation](#installation)
20
+ [Operations](#operations)
21
+ [Credentials](#credentials)
22
+ [Compatibility](#compatibility)
23
+ [Resources](#resources)
60
24
 
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)**
25
+ ## Installation
65
26
 
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:
27
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
80
28
 
81
29
  ```bash
82
- git clone https://github.com/<your-organization>/<your-repo-name>.git
83
- cd <your-repo-name>
30
+ # In your n8n installation directory
31
+ npm install n8n-nodes-redlib
84
32
  ```
85
33
 
86
- ### 2. Install Dependencies
87
-
88
- ```bash
89
- npm install
90
- ```
34
+ ## Operations
91
35
 
92
- This installs all required dependencies including the `@n8n/node-cli`.
36
+ ### Post
93
37
 
94
- ### 3. Explore the Examples
38
+ | Operation | Description |
39
+ |-----------|-------------|
40
+ | **Search** | Search for posts in a subreddit by keyword |
41
+ | **Get** | Get a single post by ID |
42
+ | **Get Many** | Get multiple posts from a subreddit (hot/new/top/rising) |
95
43
 
96
- Browse the example nodes in [nodes/](nodes/) and [credentials/](credentials/) to understand the structure:
44
+ ### Post Comment
97
45
 
98
- - Start with [nodes/Example/](nodes/Example/) for a basic node
99
- - Study [nodes/GithubIssues/](nodes/GithubIssues/) for a real-world implementation
46
+ | Operation | Description |
47
+ |-----------|-------------|
48
+ | **Search** | Search for posts containing a keyword |
49
+ | **Get** | Get comments from a specific post |
50
+ | **Get Many** | Get comments from multiple posts |
100
51
 
101
- ### 4. Build Your Node
52
+ ### Subreddit
102
53
 
103
- Edit the example nodes to fit your use case, or create new node files by copying the structure from [nodes/Example/](nodes/Example/).
54
+ | Operation | Description |
55
+ |-----------|-------------|
56
+ | **Search** | Search for subreddits by keyword |
57
+ | **Get** | Get subreddit information |
58
+ | **Get Many** | Get multiple subreddits or trending subreddits |
104
59
 
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.
60
+ ## Credentials
107
61
 
108
- ### 5. Configure Your Package
62
+ **Redlib API** - Configure access to a Redlib instance.
109
63
 
110
- Update `package.json` with your details:
64
+ | Property | Description |
65
+ |----------|-------------|
66
+ | **Instance URL** | URL of the Redlib instance to use (default: `https://redlib.catsarch.com`) |
67
+ | **Authentication** | None or Basic Auth (if your Redlib instance requires authentication) |
68
+ | **Username** | Username for Basic Auth (if required) |
69
+ | **Password** | Password for Basic Auth (if required) |
111
70
 
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
71
+ ### Finding a Redlib Instance
116
72
 
117
- Make sure your node is registered in the `n8n.nodes` array.
73
+ You can use any public Redlib instance. A list of public instances is available at [redlibinstances.github.io](https://redlibinstances.github.io). Popular instances include:
118
74
 
119
- ### 6. Develop and Test Locally
75
+ - `https://redlib.catsarch.com`
76
+ - `https://redlib.privacydev.net`
77
+ - `https://redlib.nerdvpn.de`
120
78
 
121
- Start n8n with your node loaded:
79
+ > **Note**: Public instances may have rate limits. Consider hosting your own Redlib instance for production use.
122
80
 
123
- ```bash
124
- npm run dev
125
- ```
81
+ ## Compatibility
126
82
 
127
- This command runs `n8n-node dev` which:
83
+ Minimum n8n version: **1.0.0**
128
84
 
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)
85
+ Tested with n8n versions: **1.x**
133
86
 
134
- You can now test your node in n8n workflows!
87
+ ## Usage
135
88
 
136
- > [!NOTE]
137
- > Learn more about CLI commands in the [@n8n/node-cli documentation](https://www.npmjs.com/package/@n8n/node-cli).
89
+ ### Example: Get Posts from a Subreddit
138
90
 
139
- ### 7. Lint Your Code
91
+ 1. Add the **Redlib** node to your workflow
92
+ 2. Select **Post** > **Get Many** operation
93
+ 3. Enter subreddit name (e.g., `technology`)
94
+ 4. Select category (hot, new, top, or rising)
95
+ 5. Set the limit for number of results
140
96
 
141
- Check for errors:
97
+ ### Example: Search for Posts
142
98
 
143
- ```bash
144
- npm run lint
145
- ```
99
+ 1. Add the **Redlib** node to your workflow
100
+ 2. Select **Post** > **Search** operation
101
+ 3. Enter subreddit name (e.g., `SaaS`)
102
+ 4. Enter search keyword (e.g., `marketing`)
103
+ 5. Sort by relevance, hot, top, or new
146
104
 
147
- Auto-fix issues when possible:
105
+ ### Example: Get Comments from a Post
148
106
 
149
- ```bash
150
- npm run lint:fix
151
- ```
107
+ 1. Add the **Redlib** node to your workflow
108
+ 2. Select **Post Comment** > **Get** operation
109
+ 3. Enter subreddit name (e.g., `technology`)
110
+ 4. Enter post ID (e.g., `1pudg98`)
111
+ 5. Set the limit for number of comments
152
112
 
153
- ### 8. Build for Production
113
+ ### Output Format
154
114
 
155
- When ready to publish:
115
+ The node returns data in the same format as the Reddit API:
156
116
 
157
- ```bash
158
- npm run build
117
+ ```json
118
+ {
119
+ "kind": "Listing",
120
+ "data": {
121
+ "children": [
122
+ {
123
+ "kind": "t3",
124
+ "data": {
125
+ "id": "1pudg98",
126
+ "title": "Post title",
127
+ "author": "username",
128
+ "subreddit": "SaaS",
129
+ "selftext": "Post content",
130
+ "score": 74,
131
+ "num_comments": 52,
132
+ "created_utc": 1766547398.0,
133
+ "permalink": "/r/SaaS/comments/1pudg98/...",
134
+ "url": "https://www.reddit.com/..."
135
+ }
136
+ }
137
+ ]
138
+ }
139
+ }
159
140
  ```
160
141
 
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
142
  ## Resources
234
143
 
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)
144
+ * [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
145
+ * [Redlib GitHub Repository](https://github.com/redlib-org/redlib)
146
+ * [Public Redlib Instances](https://redlibinstances.github.io)
147
+ * [n8n Node Development Guide](https://docs.n8n.io/integrations/creating-nodes/)
@@ -0,0 +1,10 @@
1
+ import type { ICredentialType, INodeProperties, IAuthenticateGeneric, ICredentialTestRequest } from 'n8n-workflow';
2
+ export declare class RedlibApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ testedBy: string;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RedlibApi = void 0;
4
+ class RedlibApi {
5
+ constructor() {
6
+ this.name = 'redlibApi';
7
+ this.displayName = 'Redlib API';
8
+ this.documentationUrl = 'https://github.com/yuangwei/n8n-nodes-redlib';
9
+ this.testedBy = 'redlib';
10
+ this.properties = [
11
+ {
12
+ displayName: 'Instance URL',
13
+ name: 'instanceUrl',
14
+ type: 'string',
15
+ default: 'https://redlib.catsarch.com',
16
+ required: true,
17
+ description: 'URL of the Redlib instance to use',
18
+ },
19
+ {
20
+ displayName: 'Authentication',
21
+ name: 'authType',
22
+ type: 'options',
23
+ options: [
24
+ {
25
+ name: 'None',
26
+ value: 'none',
27
+ description: 'No authentication required',
28
+ },
29
+ {
30
+ name: 'Basic Auth',
31
+ value: 'basicAuth',
32
+ description: 'Username and password authentication',
33
+ },
34
+ ],
35
+ default: 'none',
36
+ },
37
+ {
38
+ displayName: 'Username',
39
+ name: 'username',
40
+ type: 'string',
41
+ displayOptions: {
42
+ show: {
43
+ authType: ['basicAuth'],
44
+ },
45
+ },
46
+ default: '',
47
+ },
48
+ {
49
+ displayName: 'Password',
50
+ name: 'password',
51
+ type: 'string',
52
+ typeOptions: {
53
+ password: true,
54
+ },
55
+ displayOptions: {
56
+ show: {
57
+ authType: ['basicAuth'],
58
+ },
59
+ },
60
+ default: '',
61
+ },
62
+ ];
63
+ this.authenticate = {
64
+ type: 'generic',
65
+ properties: {
66
+ headers: {
67
+ 'User-Agent': 'n8n-redlib-node/1.0',
68
+ },
69
+ },
70
+ };
71
+ this.test = {
72
+ request: {
73
+ baseURL: '={{$credentials.instanceUrl}}',
74
+ url: '/',
75
+ },
76
+ };
77
+ }
78
+ }
79
+ exports.RedlibApi = RedlibApi;
80
+ //# sourceMappingURL=RedlibApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RedlibApi.credentials.js","sourceRoot":"","sources":["../../credentials/RedlibApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,SAAS;IAAtB;QACE,SAAI,GAAG,WAAW,CAAC;QACnB,gBAAW,GAAG,YAAY,CAAC;QAC3B,qBAAgB,GAAG,8CAA8C,CAAC;QAClE,aAAQ,GAAG,QAAQ,CAAC;QACpB,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,6BAA6B;gBACtC,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,mCAAmC;aACjD;YACD;gBACE,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,KAAK,EAAE,MAAM;wBACb,WAAW,EAAE,4BAA4B;qBAC1C;oBACD;wBACE,IAAI,EAAE,YAAY;wBAClB,KAAK,EAAE,WAAW;wBAClB,WAAW,EAAE,sCAAsC;qBACpD;iBACF;gBACD,OAAO,EAAE,MAAM;aAChB;YACD;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,cAAc,EAAE;oBACd,IAAI,EAAE;wBACJ,QAAQ,EAAE,CAAC,WAAW,CAAC;qBACxB;iBACF;gBACD,OAAO,EAAE,EAAE;aACZ;YACD;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE;wBACJ,QAAQ,EAAE,CAAC,WAAW,CAAC;qBACxB;iBACF;gBACD,OAAO,EAAE,EAAE;aACZ;SACF,CAAC;QACF,iBAAY,GAAyB;YACnC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,YAAY,EAAE,qBAAqB;iBACpC;aACF;SACF,CAAC;QACF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,+BAA+B;gBACxC,GAAG,EAAE,GAAG;aACT;SACF,CAAC;IACJ,CAAC;CAAA;AAxED,8BAwEC"}
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none">
2
+ <rect x="10" y="10" width="80" height="80" rx="12" fill="#FF4500" stroke="#E0E0E0" stroke-width="2"/>
3
+ <path d="M30 40 Q50 30 70 40" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" fill="none"/>
4
+ <circle cx="35" cy="45" r="8" fill="#FFFFFF"/>
5
+ <circle cx="65" cy="45" r="8" fill="#FFFFFF"/>
6
+ <circle cx="35" cy="45" r="3" fill="#E0E0E0"/>
7
+ <circle cx="65" cy="45" r="3" fill="#E0E0E0"/>
8
+ <path d="M40 60 Q50 70 60 60" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" fill="none"/>
9
+ <rect x="20" y="25" width="25" height="8" rx="2" fill="#FF5722"/>
10
+ <rect x="55" y="25" width="25" height="8" rx="2" fill="#FF5722"/>
11
+ </svg>
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none">
2
+ <rect x="10" y="10" width="80" height="80" rx="12" fill="#FF4500" stroke="#1A1A1B" stroke-width="2"/>
3
+ <path d="M30 40 Q50 30 70 40" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" fill="none"/>
4
+ <circle cx="35" cy="45" r="8" fill="#FFFFFF"/>
5
+ <circle cx="65" cy="45" r="8" fill="#FFFFFF"/>
6
+ <circle cx="35" cy="45" r="3" fill="#1A1A1B"/>
7
+ <circle cx="65" cy="45" r="3" fill="#1A1A1B"/>
8
+ <path d="M40 60 Q50 70 60 60" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" fill="none"/>
9
+ <rect x="20" y="25" width="25" height="8" rx="2" fill="#FF5722"/>
10
+ <rect x="55" y="25" width="25" height="8" rx="2" fill="#FF5722"/>
11
+ </svg>
@@ -0,0 +1,6 @@
1
+ import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type INodeExecutionData } from 'n8n-workflow';
2
+ export declare class Redlib implements INodeType {
3
+ description: INodeTypeDescription;
4
+ private getNodeProperties;
5
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
6
+ }