fix: lint
This commit is contained in:
parent
ef9d0c69a8
commit
5d6b96e7cd
|
@ -45,7 +45,7 @@ You need npm and NodeJS installed.
|
||||||
* Build the node with `npm run build`
|
* Build the node with `npm run build`
|
||||||
* Check for lint errors with `npm run lint` and fix them with `npm run lintfix`
|
* Check for lint errors with `npm run lint` and fix them with `npm run lintfix`
|
||||||
* To release a new version in the npm registry, run `npm publish`
|
* To release a new version in the npm registry, run `npm publish`
|
||||||
* To test the node, build the node with `npm run build`, then while in the project directory run `export N8N_CUSTOM_EXTENSIONS=$PWD8N_CUSTOM_EXTENSIONS=$PWD` and start n8n with the `n8n` command. You should now be able to find the node when searching for it.
|
* To test the node, build the node with `npm run build`, then while in the project directory run `export N8N_CUSTOM_EXTENSIONS=$PWD` and start n8n with the `n8n` command. You should now be able to find the node when searching for it.
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ export class VikunjaApi implements ICredentialType {
|
||||||
displayName: 'API Key',
|
displayName: 'API Key',
|
||||||
name: 'apiKey',
|
name: 'apiKey',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
typeOptions: { password: true },
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,14 +3,14 @@ import {
|
||||||
INodeListSearchResult,
|
INodeListSearchResult,
|
||||||
INodeType,
|
INodeType,
|
||||||
INodeTypeDescription,
|
INodeTypeDescription,
|
||||||
} from 'n8n-workflow'
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import {taskProperties} from './properties/Task'
|
import { taskProperties } from './properties/Task';
|
||||||
import {projectProperties} from './properties/Project'
|
import { projectProperties } from './properties/Project';
|
||||||
import {labelProperties} from './properties/Label'
|
import { labelProperties } from './properties/Label';
|
||||||
import {searchAndMap} from './helper'
|
import { searchAndMap } from './helper';
|
||||||
import {webhookProperties} from './properties/Webhook'
|
import { webhookProperties } from './properties/Webhook';
|
||||||
import {teamProperties} from './properties/Team'
|
import { teamProperties } from './properties/Team';
|
||||||
|
|
||||||
export class Vikunja implements INodeType {
|
export class Vikunja implements INodeType {
|
||||||
description: INodeTypeDescription = {
|
description: INodeTypeDescription = {
|
||||||
|
@ -20,7 +20,7 @@ export class Vikunja implements INodeType {
|
||||||
group: ['transform'],
|
group: ['transform'],
|
||||||
version: 1,
|
version: 1,
|
||||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||||
description: 'Get data from Vikunja\'s API',
|
description: "Get data from Vikunja's API",
|
||||||
defaults: {
|
defaults: {
|
||||||
name: 'Vikunja',
|
name: 'Vikunja',
|
||||||
},
|
},
|
||||||
|
@ -47,25 +47,25 @@ export class Vikunja implements INodeType {
|
||||||
noDataExpression: true,
|
noDataExpression: true,
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: 'Task',
|
name: 'Label',
|
||||||
value: 'task',
|
value: 'label',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Project',
|
name: 'Project',
|
||||||
value: 'project',
|
value: 'project',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Label',
|
name: 'Task',
|
||||||
value: 'label',
|
value: 'task',
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Webhook',
|
|
||||||
value: 'webhook',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Team',
|
name: 'Team',
|
||||||
value: 'team',
|
value: 'team',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Webhook',
|
||||||
|
value: 'webhook',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
default: 'task',
|
default: 'task',
|
||||||
},
|
},
|
||||||
|
@ -76,19 +76,19 @@ export class Vikunja implements INodeType {
|
||||||
...webhookProperties,
|
...webhookProperties,
|
||||||
...teamProperties,
|
...teamProperties,
|
||||||
],
|
],
|
||||||
}
|
};
|
||||||
|
|
||||||
methods = {
|
methods = {
|
||||||
listSearch: {
|
listSearch: {
|
||||||
searchProjects(this: ILoadOptionsFunctions): Promise<INodeListSearchResult> {
|
searchProjects(this: ILoadOptionsFunctions): Promise<INodeListSearchResult> {
|
||||||
return searchAndMap(this, '/projects')
|
return searchAndMap(this, '/projects');
|
||||||
},
|
},
|
||||||
async searchLabels(this: ILoadOptionsFunctions): Promise<INodeListSearchResult> {
|
async searchLabels(this: ILoadOptionsFunctions): Promise<INodeListSearchResult> {
|
||||||
return searchAndMap(this, '/labels')
|
return searchAndMap(this, '/labels');
|
||||||
},
|
},
|
||||||
async searchTeams(this: ILoadOptionsFunctions): Promise<INodeListSearchResult> {
|
async searchTeams(this: ILoadOptionsFunctions): Promise<INodeListSearchResult> {
|
||||||
return searchAndMap(this, '/teams', 'name')
|
return searchAndMap(this, '/teams', 'name');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
import {INodeProperties} from 'n8n-workflow'
|
import { INodeProperties } from 'n8n-workflow';
|
||||||
|
|
||||||
export const projectProperties: INodeProperties[] = [
|
export const projectProperties: INodeProperties[] = [
|
||||||
{
|
{
|
||||||
|
@ -13,126 +13,6 @@ export const projectProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
options: [
|
options: [
|
||||||
{
|
|
||||||
name: 'Create',
|
|
||||||
value: 'create',
|
|
||||||
description: 'Create a project',
|
|
||||||
action: 'Create a project',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'PUT',
|
|
||||||
url: '=/projects',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Delete',
|
|
||||||
value: 'delete',
|
|
||||||
description: 'Delete a project',
|
|
||||||
action: 'Delete a project',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'DELETE',
|
|
||||||
url: '=/projects/{{$parameter.project}}',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Get',
|
|
||||||
value: 'get',
|
|
||||||
description: 'Get a project',
|
|
||||||
action: 'Get a project',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'GET',
|
|
||||||
url: '=/projects/{{$parameter.project}}',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Get Many',
|
|
||||||
value: 'getAll',
|
|
||||||
description: 'Get many projects',
|
|
||||||
action: 'Get many projects',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'GET',
|
|
||||||
url: '=/projects',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Update',
|
|
||||||
value: 'update',
|
|
||||||
description: 'Update a project',
|
|
||||||
action: 'Update a project',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'POST',
|
|
||||||
url: '=/projects/{{$parameter.project}}',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Duplicate',
|
|
||||||
value: 'duplicate',
|
|
||||||
description: 'Duplicate a project',
|
|
||||||
action: 'Duplicate a project',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'PUT',
|
|
||||||
url: '=/projects/{{$parameter.project}}/duplicate',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Get All Link Shares',
|
|
||||||
description: 'Fetch all linkShares on a project',
|
|
||||||
value: 'getAllLinkShares',
|
|
||||||
action: 'Get all link shares',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'GET',
|
|
||||||
url: '=/project/{{$parameter.project}}/shares',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Create a Link Share',
|
|
||||||
description: 'Create Link Share for a project',
|
|
||||||
value: 'createLinkShare',
|
|
||||||
action: 'Create a link share',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'PUT',
|
|
||||||
url: '=/projects/{{$parameter.project}}/shares',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Delete a Link Share',
|
|
||||||
description: 'Delete a link share from a project',
|
|
||||||
value: 'deleteLinkShare',
|
|
||||||
action: 'Delete a link share',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'DELETE',
|
|
||||||
url: '=/projects/{{$parameter.project}}/shares/{{$parameter.linkShareId}}',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Get All Teams',
|
|
||||||
description: 'Fetch all teams who have access to a project',
|
|
||||||
value: 'getAllTeams',
|
|
||||||
action: 'Get all teams',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'GET',
|
|
||||||
url: '=/projects/{{$parameter.project}}/teams',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Add a Team',
|
name: 'Add a Team',
|
||||||
description: 'Add a team to a project',
|
description: 'Add a team to a project',
|
||||||
|
@ -145,40 +25,6 @@ export const projectProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'Update a Team\'s Rights on a Project',
|
|
||||||
value: 'updateTeam',
|
|
||||||
action: 'Update a team s rights on a project a project',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'POST',
|
|
||||||
url: '=/projects/{{$parameter.project}}/teams/{{$parameter.teamId}}',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Remove a Team From a Project',
|
|
||||||
value: 'removeTeam',
|
|
||||||
action: 'Remove a team',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'DELETE',
|
|
||||||
url: '=/projects/{{$parameter.project}}/teams/{{$parameter.teamId}}',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Get All Users',
|
|
||||||
description: 'Fetch all users who have access to a project',
|
|
||||||
value: 'getAllUsers',
|
|
||||||
action: 'Get all users',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'GET',
|
|
||||||
url: '=/projects/{{$parameter.project}}/users',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Add a User',
|
name: 'Add a User',
|
||||||
description: 'Add a user to a project',
|
description: 'Add a user to a project',
|
||||||
|
@ -192,24 +38,14 @@ export const projectProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Update a User\'s Rights on a Project',
|
name: 'Create',
|
||||||
value: 'updateUser',
|
value: 'create',
|
||||||
action: 'Update a user s rights on a project a project',
|
description: 'Create a project',
|
||||||
|
action: 'Create a project',
|
||||||
routing: {
|
routing: {
|
||||||
request: {
|
request: {
|
||||||
method: 'POST',
|
method: 'PUT',
|
||||||
url: '=/projects/{{$parameter.project}}/users/{{$parameter.userId}}',
|
url: '=/projects',
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Remove a User From a Project',
|
|
||||||
value: 'removeUser',
|
|
||||||
action: 'Remove a user',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'DELETE',
|
|
||||||
url: '=/projects/{{$parameter.project}}/users/{{$parameter.userId}}',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -226,14 +62,26 @@ export const projectProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Update a Kanban Bucket',
|
name: 'Create a Link Share',
|
||||||
description: 'Update a kanban bucket in a project',
|
description: 'Create Link Share for a project',
|
||||||
value: 'updateBucket',
|
value: 'createLinkShare',
|
||||||
action: 'Update a bucket',
|
action: 'Create a link share',
|
||||||
routing: {
|
routing: {
|
||||||
request: {
|
request: {
|
||||||
method: 'POST',
|
method: 'PUT',
|
||||||
url: '=/projects/{{$parameter.project}}/buckets/{{$parameter.bucketId}}',
|
url: '=/projects/{{$parameter.project}}/shares',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Delete',
|
||||||
|
value: 'delete',
|
||||||
|
description: 'Delete a project',
|
||||||
|
action: 'Delete a project',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'DELETE',
|
||||||
|
url: '=/projects/{{$parameter.project}}',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -249,6 +97,158 @@ export const projectProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Delete a Link Share',
|
||||||
|
description: 'Delete a link share from a project',
|
||||||
|
value: 'deleteLinkShare',
|
||||||
|
action: 'Delete a link share',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'DELETE',
|
||||||
|
url: '=/projects/{{$parameter.project}}/shares/{{$parameter.linkShareId}}',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Duplicate',
|
||||||
|
value: 'duplicate',
|
||||||
|
description: 'Duplicate a project',
|
||||||
|
action: 'Duplicate a project',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'PUT',
|
||||||
|
url: '=/projects/{{$parameter.project}}/duplicate',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Get',
|
||||||
|
value: 'get',
|
||||||
|
description: 'Get a project',
|
||||||
|
action: 'Get a project',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'GET',
|
||||||
|
url: '=/projects/{{$parameter.project}}',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Get All Link Shares',
|
||||||
|
description: 'Fetch all linkShares on a project',
|
||||||
|
value: 'getAllLinkShares',
|
||||||
|
action: 'Get all link shares',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'GET',
|
||||||
|
url: '=/project/{{$parameter.project}}/shares',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Get All Teams',
|
||||||
|
description: 'Fetch all teams who have access to a project',
|
||||||
|
value: 'getAllTeams',
|
||||||
|
action: 'Get all teams',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'GET',
|
||||||
|
url: '=/projects/{{$parameter.project}}/teams',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Get All Users',
|
||||||
|
description: 'Fetch all users who have access to a project',
|
||||||
|
value: 'getAllUsers',
|
||||||
|
action: 'Get all users',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'GET',
|
||||||
|
url: '=/projects/{{$parameter.project}}/users',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Get Many',
|
||||||
|
value: 'getAll',
|
||||||
|
description: 'Get many projects',
|
||||||
|
action: 'Get many projects',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'GET',
|
||||||
|
url: '=/projects',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Remove a Team From a Project',
|
||||||
|
value: 'removeTeam',
|
||||||
|
action: 'Remove a team',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'DELETE',
|
||||||
|
url: '=/projects/{{$parameter.project}}/teams/{{$parameter.teamId}}',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Remove a User From a Project',
|
||||||
|
value: 'removeUser',
|
||||||
|
action: 'Remove a user',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'DELETE',
|
||||||
|
url: '=/projects/{{$parameter.project}}/users/{{$parameter.userId}}',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Update',
|
||||||
|
value: 'update',
|
||||||
|
description: 'Update a project',
|
||||||
|
action: 'Update a project',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'POST',
|
||||||
|
url: '=/projects/{{$parameter.project}}',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Update a Kanban Bucket',
|
||||||
|
description: 'Update a kanban bucket in a project',
|
||||||
|
value: 'updateBucket',
|
||||||
|
action: 'Update a bucket',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'POST',
|
||||||
|
url: '=/projects/{{$parameter.project}}/buckets/{{$parameter.bucketId}}',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Update a Team's Rights on a Project",
|
||||||
|
value: 'updateTeam',
|
||||||
|
action: 'Update a team s rights on a project a project',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'POST',
|
||||||
|
url: '=/projects/{{$parameter.project}}/teams/{{$parameter.teamId}}',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Update a User's Rights on a Project",
|
||||||
|
value: 'updateUser',
|
||||||
|
action: 'Update a user s rights on a project a project',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'POST',
|
||||||
|
url: '=/projects/{{$parameter.project}}/users/{{$parameter.userId}}',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
default: 'create',
|
default: 'create',
|
||||||
},
|
},
|
||||||
|
@ -256,7 +256,7 @@ export const projectProperties: INodeProperties[] = [
|
||||||
displayName: 'Project Title or ID',
|
displayName: 'Project Title or ID',
|
||||||
name: 'project',
|
name: 'project',
|
||||||
type: 'resourceLocator',
|
type: 'resourceLocator',
|
||||||
default: {mode: 'id', value: ''},
|
default: { mode: 'id', value: '' },
|
||||||
required: true,
|
required: true,
|
||||||
modes: [
|
modes: [
|
||||||
{
|
{
|
||||||
|
@ -307,7 +307,7 @@ export const projectProperties: INodeProperties[] = [
|
||||||
displayName: 'Parent Project Title or ID',
|
displayName: 'Parent Project Title or ID',
|
||||||
name: 'parentProject',
|
name: 'parentProject',
|
||||||
type: 'resourceLocator',
|
type: 'resourceLocator',
|
||||||
default: {mode: 'id', value: ''},
|
default: { mode: 'id', value: '' },
|
||||||
modes: [
|
modes: [
|
||||||
{
|
{
|
||||||
displayName: 'From List',
|
displayName: 'From List',
|
||||||
|
@ -431,7 +431,8 @@ export const projectProperties: INodeProperties[] = [
|
||||||
name: 'defaultBucketId',
|
name: 'defaultBucketId',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
default: 0,
|
default: 0,
|
||||||
description: 'The ID of the bucket where new tasks without a bucket are added to. By default, this is the leftmost bucket in a project.',
|
description:
|
||||||
|
'The ID of the bucket where new tasks without a bucket are added to. By default, this is the leftmost bucket in a project.',
|
||||||
routing: {
|
routing: {
|
||||||
send: {
|
send: {
|
||||||
type: 'body',
|
type: 'body',
|
||||||
|
@ -444,7 +445,8 @@ export const projectProperties: INodeProperties[] = [
|
||||||
name: 'doneBucketId',
|
name: 'doneBucketId',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
default: 0,
|
default: 0,
|
||||||
description: 'If tasks are moved to the done bucket, they are marked as done. If they are marked as done individually, they are moved into the done bucket.',
|
description:
|
||||||
|
'If tasks are moved to the done bucket, they are marked as done. If they are marked as done individually, they are moved into the done bucket.',
|
||||||
routing: {
|
routing: {
|
||||||
send: {
|
send: {
|
||||||
type: 'body',
|
type: 'body',
|
||||||
|
@ -484,7 +486,7 @@ export const projectProperties: INodeProperties[] = [
|
||||||
displayName: 'Team ID',
|
displayName: 'Team ID',
|
||||||
name: 'teamId',
|
name: 'teamId',
|
||||||
type: 'resourceLocator',
|
type: 'resourceLocator',
|
||||||
default: {mode: 'id', value: ''},
|
default: { mode: 'id', value: '' },
|
||||||
modes: [
|
modes: [
|
||||||
{
|
{
|
||||||
displayName: 'From List',
|
displayName: 'From List',
|
||||||
|
@ -587,7 +589,8 @@ export const projectProperties: INodeProperties[] = [
|
||||||
name: 'name',
|
name: 'name',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: '',
|
default: '',
|
||||||
description: 'The name of this link share. All actions someone takes while being authenticated with that link will appear with that name.',
|
description:
|
||||||
|
'The name of this link share. All actions someone takes while being authenticated with that link will appear with that name.',
|
||||||
routing: {
|
routing: {
|
||||||
send: {
|
send: {
|
||||||
type: 'body',
|
type: 'body',
|
||||||
|
@ -599,8 +602,10 @@ export const projectProperties: INodeProperties[] = [
|
||||||
displayName: 'Password',
|
displayName: 'Password',
|
||||||
name: 'password',
|
name: 'password',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
typeOptions: { password: true },
|
||||||
default: '',
|
default: '',
|
||||||
description: 'The password of this link share. You can only set it, not retrieve it after the link share has been created.',
|
description:
|
||||||
|
'The password of this link share. You can only set it, not retrieve it after the link share has been created.',
|
||||||
routing: {
|
routing: {
|
||||||
send: {
|
send: {
|
||||||
type: 'body',
|
type: 'body',
|
||||||
|
@ -629,7 +634,7 @@ export const projectProperties: INodeProperties[] = [
|
||||||
property: 'sharing_type',
|
property: 'sharing_type',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -683,4 +688,4 @@ export const projectProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
]
|
];
|
|
@ -1,4 +1,4 @@
|
||||||
import {INodeProperties} from 'n8n-workflow'
|
import { INodeProperties } from 'n8n-workflow';
|
||||||
|
|
||||||
export const taskProperties: INodeProperties[] = [
|
export const taskProperties: INodeProperties[] = [
|
||||||
{
|
{
|
||||||
|
@ -13,6 +13,53 @@ export const taskProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
options: [
|
options: [
|
||||||
|
{
|
||||||
|
name: 'Add a Comment',
|
||||||
|
description: 'Add a comment to a task',
|
||||||
|
value: 'addComment',
|
||||||
|
action: 'Add a comment',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'PUT',
|
||||||
|
url: '=/tasks/{{$parameter.taskId}}/comments',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Add a Label',
|
||||||
|
description: 'Add a label to a task',
|
||||||
|
value: 'addLabel',
|
||||||
|
action: 'Add a label',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'PUT',
|
||||||
|
url: '=/tasks/{{$parameter.taskId}}/labels',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Add a Relation',
|
||||||
|
description: 'Add a relation to a task',
|
||||||
|
value: 'addRelation',
|
||||||
|
action: 'Add a relation',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'PUT',
|
||||||
|
url: '=/tasks/{{$parameter.taskId}}/relations',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Assign a User to a Task',
|
||||||
|
value: 'assignUser',
|
||||||
|
action: 'Assign a user',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'PUT',
|
||||||
|
url: '=/tasks/{{$parameter.taskId}}/assignees',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Create',
|
name: 'Create',
|
||||||
value: 'create',
|
value: 'create',
|
||||||
|
@ -37,6 +84,18 @@ export const taskProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Delete a Comment',
|
||||||
|
description: 'Delete an existing comment on a task',
|
||||||
|
value: 'deleteComment',
|
||||||
|
action: 'Delete a comment',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'DELETE',
|
||||||
|
url: '=/tasks/{{$parameter.taskId}}/comments/{{$parameter.commentId}}',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Get',
|
name: 'Get',
|
||||||
value: 'get',
|
value: 'get',
|
||||||
|
@ -49,52 +108,6 @@ export const taskProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'Get Many',
|
|
||||||
value: 'getAll',
|
|
||||||
description: 'Get many tasks',
|
|
||||||
action: 'Get many tasks',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'GET',
|
|
||||||
url: '=/projects/{{$parameter.taskProject}}/tasks',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Update',
|
|
||||||
value: 'update',
|
|
||||||
description: 'Update a task',
|
|
||||||
action: 'Update a task',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'GET',
|
|
||||||
url: '=/tasks/{{$parameter.taskId}}',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Assign a User to a Task',
|
|
||||||
value: 'assignUser',
|
|
||||||
action: 'Assign a user',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'PUT',
|
|
||||||
url: '=/tasks/{{$parameter.taskId}}/assignees',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Remove an Assigned User From a Task',
|
|
||||||
value: 'unassignUser',
|
|
||||||
action: 'Unassign a user',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'DELETE',
|
|
||||||
url: '=/tasks/{{$parameter.taskId}}/assignees/{{$parameter.userId}}',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Get All Comments',
|
name: 'Get All Comments',
|
||||||
description: 'Fetch all comments on a task',
|
description: 'Fetch all comments on a task',
|
||||||
|
@ -107,42 +120,6 @@ export const taskProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'Add a Comment',
|
|
||||||
description: 'Add a comment to a task',
|
|
||||||
value: 'addComment',
|
|
||||||
action: 'Add a comment',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'PUT',
|
|
||||||
url: '=/tasks/{{$parameter.taskId}}/comments',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Update a Comment',
|
|
||||||
description: 'Update an existing comment on a task',
|
|
||||||
value: 'updateComment',
|
|
||||||
action: 'Update a comment',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'POST',
|
|
||||||
url: '=/tasks/{{$parameter.taskId}}/comments/{{$parameter.commentId}}',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Delete a Comment',
|
|
||||||
description: 'Delete an existing comment on a task',
|
|
||||||
value: 'deleteComment',
|
|
||||||
action: 'Delete a comment',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'DELETE',
|
|
||||||
url: '=/tasks/{{$parameter.taskId}}/comments/{{$parameter.commentId}}',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Get All Labels',
|
name: 'Get All Labels',
|
||||||
description: 'Fetch all labels on a task',
|
description: 'Fetch all labels on a task',
|
||||||
|
@ -156,14 +133,14 @@ export const taskProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Add a Label',
|
name: 'Get Many',
|
||||||
description: 'Add a label to a task',
|
value: 'getAll',
|
||||||
value: 'addLabel',
|
description: 'Get many tasks',
|
||||||
action: 'Add a label',
|
action: 'Get many tasks',
|
||||||
routing: {
|
routing: {
|
||||||
request: {
|
request: {
|
||||||
method: 'PUT',
|
method: 'GET',
|
||||||
url: '=/tasks/{{$parameter.taskId}}/labels',
|
url: '=/projects/{{$parameter.taskProject}}/tasks',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -178,18 +155,6 @@ export const taskProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'Add a Relation',
|
|
||||||
description: 'Add a relation to a task',
|
|
||||||
value: 'addRelation',
|
|
||||||
action: 'Add a relation',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'PUT',
|
|
||||||
url: '=/tasks/{{$parameter.taskId}}/relations',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Remove a Relation',
|
name: 'Remove a Relation',
|
||||||
description: 'Remove an existing relation on a task',
|
description: 'Remove an existing relation on a task',
|
||||||
|
@ -202,6 +167,41 @@ export const taskProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Remove an Assigned User From a Task',
|
||||||
|
value: 'unassignUser',
|
||||||
|
action: 'Unassign a user',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'DELETE',
|
||||||
|
url: '=/tasks/{{$parameter.taskId}}/assignees/{{$parameter.userId}}',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Update',
|
||||||
|
value: 'update',
|
||||||
|
description: 'Update a task',
|
||||||
|
action: 'Update a task',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'GET',
|
||||||
|
url: '=/tasks/{{$parameter.taskId}}',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Update a Comment',
|
||||||
|
description: 'Update an existing comment on a task',
|
||||||
|
value: 'updateComment',
|
||||||
|
action: 'Update a comment',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'POST',
|
||||||
|
url: '=/tasks/{{$parameter.taskId}}/comments/{{$parameter.commentId}}',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
default: 'create',
|
default: 'create',
|
||||||
},
|
},
|
||||||
|
@ -237,7 +237,7 @@ export const taskProperties: INodeProperties[] = [
|
||||||
displayName: 'Project Title or ID',
|
displayName: 'Project Title or ID',
|
||||||
name: 'taskProject',
|
name: 'taskProject',
|
||||||
type: 'resourceLocator',
|
type: 'resourceLocator',
|
||||||
default: {mode: 'id', value: ''},
|
default: { mode: 'id', value: '' },
|
||||||
required: true,
|
required: true,
|
||||||
modes: [
|
modes: [
|
||||||
{
|
{
|
||||||
|
@ -459,7 +459,8 @@ export const taskProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: 0,
|
default: 0,
|
||||||
description: 'How a repeating task will repeat itself. Will be triggered when a task is marked done.',
|
description:
|
||||||
|
'How a repeating task will repeat itself. Will be triggered when a task is marked done.',
|
||||||
routing: {
|
routing: {
|
||||||
send: {
|
send: {
|
||||||
type: 'body',
|
type: 'body',
|
||||||
|
@ -551,16 +552,20 @@ export const taskProperties: INodeProperties[] = [
|
||||||
type: 'options',
|
type: 'options',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: 'Sub Task',
|
name: 'Blocked',
|
||||||
value: 'subtask',
|
value: 'blocked',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Parent Task',
|
name: 'Blocking',
|
||||||
value: 'parenttask',
|
value: 'blocking',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Related Task',
|
name: 'Coped To',
|
||||||
value: 'related',
|
value: 'copiedto',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Copied From',
|
||||||
|
value: 'copiedfrom',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Duplicate Of',
|
name: 'Duplicate Of',
|
||||||
|
@ -571,28 +576,24 @@ export const taskProperties: INodeProperties[] = [
|
||||||
value: 'duplicates',
|
value: 'duplicates',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Blocking',
|
name: 'Follows',
|
||||||
value: 'blocking',
|
value: 'follows',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Blocked',
|
name: 'Parent Task',
|
||||||
value: 'blocked',
|
value: 'parenttask',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Precedes',
|
name: 'Precedes',
|
||||||
value: 'precedes',
|
value: 'precedes',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Follows',
|
name: 'Related Task',
|
||||||
value: 'follows',
|
value: 'related',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Copied From',
|
name: 'Sub Task',
|
||||||
value: 'copiedfrom',
|
value: 'subtask',
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Coped To',
|
|
||||||
value: 'copiedto',
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: 'related',
|
default: 'related',
|
||||||
|
@ -610,4 +611,4 @@ export const taskProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
];
|
|
@ -1,4 +1,4 @@
|
||||||
import {INodeProperties} from 'n8n-workflow'
|
import { INodeProperties } from 'n8n-workflow';
|
||||||
|
|
||||||
export const teamProperties: INodeProperties[] = [
|
export const teamProperties: INodeProperties[] = [
|
||||||
{
|
{
|
||||||
|
@ -13,6 +13,18 @@ export const teamProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
options: [
|
options: [
|
||||||
|
{
|
||||||
|
name: 'Add a User',
|
||||||
|
description: 'Add a user to a team',
|
||||||
|
value: 'addUser',
|
||||||
|
action: 'Add a user',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'PUT',
|
||||||
|
url: '=/teams/{{$parameter.team}}/members',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Create',
|
name: 'Create',
|
||||||
value: 'create',
|
value: 'create',
|
||||||
|
@ -61,30 +73,6 @@ export const teamProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'Update',
|
|
||||||
value: 'update',
|
|
||||||
description: 'Update a team',
|
|
||||||
action: 'Update a team',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'POST',
|
|
||||||
url: '=/teams/{{$parameter.team}}',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Add a User',
|
|
||||||
description: 'Add a user to a team',
|
|
||||||
value: 'addUser',
|
|
||||||
action: 'Add a user',
|
|
||||||
routing: {
|
|
||||||
request: {
|
|
||||||
method: 'PUT',
|
|
||||||
url: '=/teams/{{$parameter.team}}/members',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Remove a User From a Team',
|
name: 'Remove a User From a Team',
|
||||||
value: 'removeUser',
|
value: 'removeUser',
|
||||||
|
@ -97,7 +85,7 @@ export const teamProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Toggle a User\'s Admin Status in a Team',
|
name: "Toggle a User's Admin Status in a Team",
|
||||||
value: 'updateUser',
|
value: 'updateUser',
|
||||||
action: 'Toggle admin status',
|
action: 'Toggle admin status',
|
||||||
routing: {
|
routing: {
|
||||||
|
@ -107,6 +95,18 @@ export const teamProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Update',
|
||||||
|
value: 'update',
|
||||||
|
description: 'Update a team',
|
||||||
|
action: 'Update a team',
|
||||||
|
routing: {
|
||||||
|
request: {
|
||||||
|
method: 'POST',
|
||||||
|
url: '=/teams/{{$parameter.team}}',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
default: 'create',
|
default: 'create',
|
||||||
},
|
},
|
||||||
|
@ -114,7 +114,7 @@ export const teamProperties: INodeProperties[] = [
|
||||||
displayName: 'Team Name or ID',
|
displayName: 'Team Name or ID',
|
||||||
name: 'team',
|
name: 'team',
|
||||||
type: 'resourceLocator',
|
type: 'resourceLocator',
|
||||||
default: {mode: 'id', value: ''},
|
default: { mode: 'id', value: '' },
|
||||||
required: true,
|
required: true,
|
||||||
modes: [
|
modes: [
|
||||||
{
|
{
|
||||||
|
@ -248,4 +248,4 @@ export const teamProperties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
];
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "n8n-nodes-vikunja",
|
"name": "n8n-nodes-vikunja",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "",
|
"description": "This is an n8n community node which lets you use Vikunja in your n8n workflows.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"n8n-community-node-package"
|
"n8n-community-node-package"
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue