Great that you are here and you want to contribute to n8n-nodes-chatwork
The most important files
- src/ - Root resource
- assets/ - Assets folder
- chatwork.png - Logo file
- credentials/ - Credentials folder
- Chatwork.credentials.ts - Credentials of the node (Chatwork api key)
- nodes/ - Nodes folder
- Chatwork/ - Chatwork node folder
- Chatwork.node.ts - Chatwork node definition
- Chatwork/ - Chatwork node folder
- shared/ - Shared folder
- Constants.ts - Constants definition
- GenericFunction.ts - Utility functions
- assets/ - Assets folder
- gulpfile.js - Gulp script to copy icon file to dist folder
- nodemon.json - Nodemon configuration file
- package.json - This file is used to give information to
npm
that allows it to identify the project as well as handle the project's dependencies - tsconfig.json - Specify base the root level files and the compiler options that requires to compile a TypeScript project.
- tsconfig.build.json - Extends from tsconfig.json. Custom compiler options for production build.
- tslint.json - TSLint configuration
If you want to change or extend n8n-nodes-chatwork
you have to make sure that all needed dependencies are installed and the packages get linked correctly. Here a short guide on how that can be done:
- node version >= 14.x
- npm version >= 7.x
IMPORTANT: All the steps bellow have to get executed at least once to get the development setup up and running!
Now that everything the project requires to run is installed the project can be checked out and set up:
-
Clone the repository
git clone git@github.com:hoangsetup/n8n-nodes-chatwork.git
-
Go into repository folder
cd n8n-nodes-chatwork
-
Install all dependencies
npm install
-
Build the code
npm run build
-
Symlink the package folder
cp package.* ./dist cd dist npm link
-
Create symbolic link
cd ~./n8n/custom npm link n8n-nodes-chatwork
npm run n8n
While iterating on n8n-nodes-chatwork modules code, you can run npm run dev
. It will then automatically build your code, restart the backend on every change you make.
-
Start n8n-nodes-chatwork in development mode
npm run dev
-
code, code, code
-
Check if everything still runs in production mode
npm run build npm run n8n
-
Run all tests
npm run test
-
Commit code and create pull request
The list of Chatwork apis need to complete:
/me
- Used to access your account information-
GET /me
- Get your account information
-
/my
- Used to access your data on the account.-
GET /my/status
- Get the number of: unread messages, unread To messages, and unfinished tasks. -
GET /my/task
- Get the list of all unfinished tasks.
-
/contacts
- Used to access the list of your contacts-
GET /contacts
- Get the list of your contacts
-
/rooms
- Used to access information such as messages, members, files, and tasks associated to a specific conversation.-
GET /rooms
- Get the list of all chats on your account -
POST /rooms
- Create a new group chat -
GET /rooms/{room_id}
- Get chat name, icon, and Type (my, direct, or group) -
PUT /rooms/{room_id}
- Change the title and icon type of the specified chat -
DELETE /rooms/{room_id}
- Leave/Delete a group chat -
GET /rooms/{room_id}/members
- Get the list of all chat members associated with the specified chat -
PUT /rooms/{room_id}/members
- Change associated members of group chat at once -
GET /rooms/{room_id}/messages
- Get all messages associated with the specified chat -
POST /rooms/{room_id}/messages
- Add new message to the chat -
GET /rooms/{room_id}/messages/{message_id}
- Get information about the specified message -
PUT /rooms/{room_id}/messages/{message_id}
- Update the specified message -
DELETE /rooms/{room_id}/messages/{message_id}
- Delete the specified message -
GET /rooms/{room_id}/tasks
- Get the list of tasks associated with the specified chat -
POST /rooms/{room_id}/tasks
- Add a new task to the chat -
GET /rooms/{room_id}/tasks/{task_id}
- Get information about the specified task -
GET /rooms/{room_id}/files
- Get the list of files associated with the specified chat -
GET /rooms/{room_id}/files/{file_id}
- Get information about the specified file
-
/incoming_requests
- You can access contact approval requests you received-
GET /incoming_requests
- You can get the list of contact approval request you received -
PUT /incoming_requests/{request_id}
- You can approve a contact approval request you received -
DELETE /incoming_requests/{request_id}
- You can decline a contact approval request you received
-