Expand Taiga node (#1970)

*  Expand Taiga node

*  Make projectId consistent

* 🔥 Remove logging

* 🔨 Fix user story statuses loader

*  Add epics loader

* 🔨 Make projectId required for updates

* 🔨 Refactor credentials

*  Small change

*  Update credentials in trigger

* 🔥 Remove old unused credentials

* ✏️ Write breaking changes

Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
Iván Ovejero 2021-07-15 00:02:30 +02:00 committed by GitHub
parent bf6ef3bbc0
commit a1f0fff9fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 2872 additions and 694 deletions

View file

@ -2,6 +2,16 @@
This list shows all the versions which include breaking changes and how to upgrade. This list shows all the versions which include breaking changes and how to upgrade.
## 0.130.0
### What changed?
For the Taiga regular and trigger nodes, the server and cloud credentials types are now unified into a single credentials type and the `version` param has been removed. Also, the `issue:create` operation now automatically loads the tags as `multiOptions`.
### When is action necessary?
If you are using the Taiga nodes, reconnect the credentials. If you are using tags in the `issue:create` operation, reselect them.
## 0.127.0 ## 0.127.0
### What changed? ### What changed?

View file

@ -3,9 +3,9 @@ import {
INodeProperties, INodeProperties,
} from 'n8n-workflow'; } from 'n8n-workflow';
export class TaigaServerApi implements ICredentialType { export class TaigaApi implements ICredentialType {
name = 'taigaServerApi'; name = 'taigaApi';
displayName = 'Taiga Server API'; displayName = 'Taiga API';
documentationUrl = 'taiga'; documentationUrl = 'taiga';
properties: INodeProperties[] = [ properties: INodeProperties[] = [
{ {
@ -20,12 +20,35 @@ export class TaigaServerApi implements ICredentialType {
type: 'string', type: 'string',
default: '', default: '',
}, },
{
displayName: 'Environment',
name: 'environment',
type: 'options',
default: 'cloud',
options: [
{
name: 'Cloud',
value: 'cloud',
},
{
name: 'Self-Hosted',
value: 'selfHosted',
},
],
},
{ {
displayName: 'URL', displayName: 'URL',
name: 'url', name: 'url',
type: 'string', type: 'string',
default: '', default: '',
placeholder: 'https://taiga.yourdomain.com', placeholder: 'https://taiga.yourdomain.com',
displayOptions: {
show: {
environment: [
'selfHosted',
],
},
},
}, },
]; ];
} }

View file

@ -1,24 +0,0 @@
import {
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class TaigaCloudApi implements ICredentialType {
name = 'taigaCloudApi';
displayName = 'Taiga Cloud API';
documentationUrl = 'taiga';
properties: INodeProperties[] = [
{
displayName: 'Username',
name: 'username',
type: 'string',
default: '',
},
{
displayName: 'Password',
name: 'password',
type: 'string',
default: '',
},
];
}

View file

@ -60,16 +60,7 @@ export async function taigaApiRequest(
uri?: string | undefined, uri?: string | undefined,
option = {}, option = {},
): Promise<any> { // tslint:disable-line:no-any ): Promise<any> { // tslint:disable-line:no-any
const credentials = this.getCredentials('taigaApi') as ICredentialDataDecryptedObject;
const version = this.getNodeParameter('version', 0, 'cloud') as string;
let credentials;
if (version === 'server') {
credentials = this.getCredentials('taigaServerApi') as ICredentialDataDecryptedObject;
} else {
credentials = this.getCredentials('taigaCloudApi') as ICredentialDataDecryptedObject;
}
const authToken = await getAuthorization.call(this, credentials); const authToken = await getAuthorization.call(this, credentials);
@ -124,3 +115,44 @@ export function getAutomaticSecret(credentials: ICredentialDataDecryptedObject)
const data = `${credentials.username},${credentials.password}`; const data = `${credentials.username},${credentials.password}`;
return createHash('md5').update(data).digest('hex'); return createHash('md5').update(data).digest('hex');
} }
export async function handleListing(
this: IExecuteFunctions,
method: string,
endpoint: string,
body: IDataObject = {},
qs: IDataObject = {},
i: number,
) {
let responseData;
qs.project = this.getNodeParameter('projectId', i) as number;
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
if (returnAll) {
return await taigaApiRequestAllItems.call(this, method, endpoint, body, qs);
} else {
qs.limit = this.getNodeParameter('limit', i) as number;
responseData = await taigaApiRequestAllItems.call(this, method, endpoint, body, qs);
return responseData.splice(0, qs.limit);
}
}
export const toOptions = (items: LoadedResource[]) =>
items.map(({ name, id }) => ({ name, value: id }));
export function throwOnEmptyUpdate(
this: IExecuteFunctions,
resource: Resource,
) {
throw new NodeOperationError(
this.getNode(),
`Please enter at least one field to update for the ${resource}.`,
);
}
export async function getVersionForUpdate(
this: IExecuteFunctions,
endpoint: string,
) {
return await taigaApiRequest.call(this, 'GET', endpoint).then(response => response.version);
}

View file

@ -1,40 +0,0 @@
import {
INodeProperties,
} from 'n8n-workflow';
export const issueOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
options: [
{
name: 'Create',
value: 'create',
description: 'Create an issue',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete an issue',
},
{
name: 'Get',
value: 'get',
description: 'Get an issue',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get all issues',
},
{
name: 'Update',
value: 'update',
description: 'Update an issue',
},
],
default: 'create',
description: 'The operation to perform.',
},
] as INodeProperties[];

View file

@ -3,6 +3,7 @@
"nodeVersion": "1.0", "nodeVersion": "1.0",
"codexVersion": "1.0", "codexVersion": "1.0",
"categories": [ "categories": [
"Development",
"Productivity" "Productivity"
], ],
"resources": { "resources": {

View file

@ -12,23 +12,29 @@ import {
} from 'n8n-workflow'; } from 'n8n-workflow';
import { import {
getVersionForUpdate,
handleListing,
taigaApiRequest, taigaApiRequest,
taigaApiRequestAllItems, throwOnEmptyUpdate,
toOptions,
} from './GenericFunctions'; } from './GenericFunctions';
import { import {
epicFields,
epicOperations,
issueFields,
issueOperations, issueOperations,
} from './IssueOperations'; taskFields,
taskOperations,
import { userStoryFields,
issueOperationFields, userStoryOperations,
} from './issueOperationFields'; } from './descriptions';
export class Taiga implements INodeType { export class Taiga implements INodeType {
description: INodeTypeDescription = { description: INodeTypeDescription = {
displayName: 'Taiga', displayName: 'Taiga',
name: 'taiga', name: 'taiga',
icon: 'file:taiga.png', icon: 'file:taiga.svg',
group: ['transform'], group: ['transform'],
version: 1, version: 1,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}', subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
@ -41,196 +47,139 @@ export class Taiga implements INodeType {
outputs: ['main'], outputs: ['main'],
credentials: [ credentials: [
{ {
name: 'taigaCloudApi', name: 'taigaApi',
displayOptions: {
show: {
version: [
'cloud',
],
},
},
required: true,
},
{
name: 'taigaServerApi',
displayOptions: {
show: {
version: [
'server',
],
},
},
required: true, required: true,
}, },
], ],
properties: [ properties: [
{
displayName: 'Taiga Version',
name: 'version',
type: 'options',
options: [
{
name: 'Cloud',
value: 'cloud',
},
{
name: 'Server (Self Hosted)',
value: 'server',
},
],
default: 'cloud',
},
{ {
displayName: 'Resource', displayName: 'Resource',
name: 'resource', name: 'resource',
type: 'options', type: 'options',
options: [ options: [
{
name: 'Epic',
value: 'epic',
},
{ {
name: 'Issue', name: 'Issue',
value: 'issue', value: 'issue',
}, },
{
name: 'Task',
value: 'task',
},
{
name: 'User Story',
value: 'userStory',
},
], ],
default: 'issue', default: 'issue',
description: 'Resource to consume.',
}, },
...epicOperations,
...epicFields,
...issueOperations, ...issueOperations,
...issueOperationFields, ...issueFields,
...taskOperations,
...taskFields,
...userStoryOperations,
...userStoryFields,
], ],
}; };
methods = { methods = {
loadOptions: { loadOptions: {
// Get all the available tags to display them to user so that he can async getEpics(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
// select them easily const project = this.getCurrentNodeParameter('projectId') as string;
const epics = await taigaApiRequest.call(this, 'GET', '/epics', {}, { project }) as LoadedEpic[];
return epics.map(({ subject, id }) => ({ name: subject, value: id }));
},
async getMilestones(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const project = this.getCurrentNodeParameter('projectId') as string;
const milestones = await taigaApiRequest.call(this, 'GET', '/milestones', {}, { project }) as LoadedResource[];
return toOptions(milestones);
},
async getPriorities(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const project = this.getCurrentNodeParameter('projectId') as string;
const priorities = await taigaApiRequest.call(this, 'GET', '/priorities', {}, { project }) as LoadedResource[];
return toOptions(priorities);
},
async getProjects(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const { id } = await taigaApiRequest.call(this, 'GET', '/users/me') as { id: string };
const projects = await taigaApiRequest.call(this, 'GET', '/projects', {}, { member: id }) as LoadedResource[];
return toOptions(projects);
},
async getRoles(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const project = this.getCurrentNodeParameter('projectId') as string;
const roles = await taigaApiRequest.call(this, 'GET', '/roles', {}, { project }) as LoadedResource[];
return toOptions(roles);
},
async getSeverities(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const project = this.getCurrentNodeParameter('projectId') as string;
const severities = await taigaApiRequest.call(this, 'GET', '/severities', {}, { project }) as LoadedResource[];
return toOptions(severities);
},
async getTags(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const project = this.getCurrentNodeParameter('projectId') as string;
const tags = await taigaApiRequest.call(this, 'GET', `/projects/${project}/tags_colors`) as LoadedTags;
return Object.keys(tags).map(tag => ({ name: tag, value: tag }));
},
async getTypes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> { async getTypes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const projectId = this.getCurrentNodeParameter('projectId') as string; const project = this.getCurrentNodeParameter('projectId') as string;
const types = await taigaApiRequest.call(this, 'GET', '/issue-types', {}, { project }) as LoadedResource[];
const returnData: INodePropertyOptions[] = []; return toOptions(types);
const types = await taigaApiRequest.call(this, 'GET', `/issue-types?project=${projectId}`);
for (const type of types) {
const typeName = type.name;
const typeId = type.id;
returnData.push({
name: typeName,
value: typeId,
});
}
return returnData;
}, },
// Get all the available statuses to display them to user so that he can async getUsers(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
// select them easily const project = this.getCurrentNodeParameter('projectId') as string;
async getStatuses(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> { const users = await taigaApiRequest.call(this, 'GET', '/users', {}, { project }) as LoadedUser[];
const returnData: INodePropertyOptions[] = [];
const projectId = this.getCurrentNodeParameter('projectId') as string; return users.map(({ full_name_display, id }) => ({ name: full_name_display, value: id }));
const statuses = await taigaApiRequest.call(this, 'GET', '/issue-statuses', {}, { project: projectId });
for (const status of statuses) {
const statusName = status.name;
const statusId = status.id;
returnData.push({
name: statusName,
value: statusId,
});
}
return returnData;
}, },
// Get all the available users to display them to user so that he can async getUserStories(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
// select them easily const project = this.getCurrentNodeParameter('projectId') as string;
async getProjectUsers(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> { const userStories = await taigaApiRequest.call(this, 'GET', '/userstories', {}, { project }) as LoadedUserStory[];
const returnData: INodePropertyOptions[] = [];
const projectId = this.getCurrentNodeParameter('projectId') as string; return userStories.map(({ subject, id }) => ({ name: subject, value: id }));
const users = await taigaApiRequest.call(this, 'GET', '/users', {}, { project: projectId });
for (const user of users) {
const userName = user.username;
const userId = user.id;
returnData.push({
name: userName,
value: userId,
});
}
return returnData;
}, },
// Get all the available priorities to display them to user so that he can // statuses
// select them easily
async getProjectPriorities(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const projectId = this.getCurrentNodeParameter('projectId') as string; async getIssueStatuses(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const project = this.getCurrentNodeParameter('projectId') as string;
const statuses = await taigaApiRequest.call(this, 'GET', '/issue-statuses', {}, { project }) as LoadedResource[];
const priorities = await taigaApiRequest.call(this, 'GET', '/priorities', {}, { project: projectId }); return toOptions(statuses);
for (const priority of priorities) {
const priorityName = priority.name;
const priorityId = priority.id;
returnData.push({
name: priorityName,
value: priorityId,
});
}
return returnData;
}, },
// Get all the available severities to display them to user so that he can async getTaskStatuses(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
// select them easily const project = this.getCurrentNodeParameter('projectId') as string;
async getProjectSeverities(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> { const statuses = await taigaApiRequest.call(this, 'GET', '/task-statuses', {}, { project }) as LoadedResource[];
const returnData: INodePropertyOptions[] = [];
const projectId = this.getCurrentNodeParameter('projectId') as string; return toOptions(statuses);
const severities = await taigaApiRequest.call(this, 'GET', '/severities', {}, { project: projectId });
for (const severity of severities) {
const severityName = severity.name;
const severityId = severity.id;
returnData.push({
name: severityName,
value: severityId,
});
}
return returnData;
}, },
// Get all the available milestones to display them to user so that he can async getUserStoryStatuses(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
// select them easily const project = this.getCurrentNodeParameter('projectId') as string;
async getProjectMilestones(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> { const statuses = await taigaApiRequest.call(this, 'GET', '/userstory-statuses', {}, { project }) as LoadedResource[];
const returnData: INodePropertyOptions[] = [];
const projectId = this.getCurrentNodeParameter('projectId') as string; return toOptions(statuses);
const milestones = await taigaApiRequest.call(this, 'GET', '/milestones', {}, { project: projectId });
for (const milestone of milestones) {
const milestoneName = milestone.name;
const milestoneId = milestone.id;
returnData.push({
name: milestoneName,
value: milestoneId,
});
}
return returnData;
},
// Get all the available projects to display them to user so that he can
// select them easily
async getUserProjects(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const { id } = await taigaApiRequest.call(this, 'GET', '/users/me');
const projects = await taigaApiRequest.call(this, 'GET', '/projects', {}, { member: id });
for (const project of projects) {
const projectName = project.name;
const projectId = project.id;
returnData.push({
name: projectName,
value: projectId,
});
}
return returnData;
}, },
}, },
}; };
@ -238,90 +187,365 @@ export class Taiga implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> { async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData(); const items = this.getInputData();
const returnData: IDataObject[] = []; const returnData: IDataObject[] = [];
const resource = this.getNodeParameter('resource', 0) as Resource;
const operation = this.getNodeParameter('operation', 0) as Operation;
let responseData; let responseData;
const resource = this.getNodeParameter('resource', 0) as string;
const operation = this.getNodeParameter('operation', 0) as string;
const qs: IDataObject = {};
for (let i = 0; i < items.length; i++) { for (let i = 0; i < items.length; i++) {
if (resource === 'issue') {
if (operation === 'create') {
const projectId = this.getNodeParameter('projectId', i) as number;
const subject = this.getNodeParameter('subject', i) as string; try {
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject; if (resource === 'epic') {
const body: IDataObject = { // **********************************************************************
project: projectId, // epic
subject, // **********************************************************************
};
Object.assign(body, additionalFields); if (operation === 'create') {
// ----------------------------------------
// epic: create
// ----------------------------------------
const body = {
project: this.getNodeParameter('projectId', i),
subject: this.getNodeParameter('subject', i),
} as IDataObject;
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
if (Object.keys(additionalFields).length) {
Object.assign(body, additionalFields);
}
responseData = await taigaApiRequest.call(this, 'POST', '/epics', body);
} else if (operation === 'delete') {
// ----------------------------------------
// epic: delete
// ----------------------------------------
const epicId = this.getNodeParameter('epicId', i);
responseData = await taigaApiRequest.call(this, 'DELETE', `/epics/${epicId}`);
responseData = { success: true };
} else if (operation === 'get') {
// ----------------------------------------
// epic: get
// ----------------------------------------
const epicId = this.getNodeParameter('epicId', i);
responseData = await taigaApiRequest.call(this, 'GET', `/epics/${epicId}`);
} else if (operation === 'getAll') {
// ----------------------------------------
// epic: getAll
// ----------------------------------------
const qs = {} as IDataObject;
const filters = this.getNodeParameter('filters', i) as IDataObject;
if (Object.keys(filters).length) {
Object.assign(qs, filters);
}
responseData = await handleListing.call(this, 'GET', '/epics', {}, qs, i);
} else if (operation === 'update') {
// ----------------------------------------
// epic: update
// ----------------------------------------
const body = {} as IDataObject;
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
if (Object.keys(updateFields).length) {
Object.assign(body, updateFields);
} else {
throwOnEmptyUpdate.call(this, resource);
}
const epicId = this.getNodeParameter('epicId', i);
body.version = await getVersionForUpdate.call(this, `/epics/${epicId}`);
responseData = await taigaApiRequest.call(this, 'PATCH', `/epics/${epicId}`, body);
if (body.tags) {
body.tags = (body.tags as string).split(',') as string[];
} }
responseData = await taigaApiRequest.call(this, 'POST', '/issues', body); } else if (resource === 'issue') {
}
if (operation === 'update') { // **********************************************************************
// issue
// **********************************************************************
const issueId = this.getNodeParameter('issueId', i) as string; if (operation === 'create') {
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject; // ----------------------------------------
// issue: create
// ----------------------------------------
const body: IDataObject = {}; const body = {
project: this.getNodeParameter('projectId', i),
subject: this.getNodeParameter('subject', i),
} as IDataObject;
Object.assign(body, updateFields); const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
if (Object.keys(additionalFields).length) {
Object.assign(body, additionalFields);
}
responseData = await taigaApiRequest.call(this, 'POST', '/issues', body);
} else if (operation === 'delete') {
// ----------------------------------------
// issue: delete
// ----------------------------------------
const issueId = this.getNodeParameter('issueId', i);
responseData = await taigaApiRequest.call(this, 'DELETE', `/issues/${issueId}`);
responseData = { success: true };
} else if (operation === 'get') {
// ----------------------------------------
// issue: get
// ----------------------------------------
const issueId = this.getNodeParameter('issueId', i);
responseData = await taigaApiRequest.call(this, 'GET', `/issues/${issueId}`);
} else if (operation === 'getAll') {
// ----------------------------------------
// issue: getAll
// ----------------------------------------
const qs = {} as IDataObject;
const filters = this.getNodeParameter('filters', i) as IDataObject;
if (Object.keys(filters).length) {
Object.assign(qs, filters);
}
responseData = await handleListing.call(this, 'GET', '/issues', {}, qs, i);
} else if (operation === 'update') {
// ----------------------------------------
// issue: update
// ----------------------------------------
const body = {} as IDataObject;
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
if (Object.keys(updateFields).length) {
Object.assign(body, updateFields);
} else {
throwOnEmptyUpdate.call(this, resource);
}
const issueId = this.getNodeParameter('issueId', i);
body.version = await getVersionForUpdate.call(this, `/issues/${issueId}`);
responseData = await taigaApiRequest.call(this, 'PATCH', `/issues/${issueId}`, body);
if (body.tags) {
body.tags = (body.tags as string).split(',') as string[];
} }
const { version } = await taigaApiRequest.call(this, 'GET', `/issues/${issueId}`); } else if (resource === 'task') {
body.version = version; // **********************************************************************
// task
// **********************************************************************
responseData = await taigaApiRequest.call(this, 'PATCH', `/issues/${issueId}`, body); if (operation === 'create') {
}
if (operation === 'delete') { // ----------------------------------------
const issueId = this.getNodeParameter('issueId', i) as string; // task: create
responseData = await taigaApiRequest.call(this, 'DELETE', `/issues/${issueId}`); // ----------------------------------------
responseData = { success: true };
}
if (operation === 'get') { const body = {
const issueId = this.getNodeParameter('issueId', i) as string; project: this.getNodeParameter('projectId', i),
responseData = await taigaApiRequest.call(this, 'GET', `/issues/${issueId}`); subject: this.getNodeParameter('subject', i),
} } as IDataObject;
if (operation === 'getAll') { const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
const projectId = this.getNodeParameter('projectId', i) as number; if (Object.keys(additionalFields).length) {
const returnAll = this.getNodeParameter('returnAll', i) as boolean; Object.assign(body, additionalFields);
}
qs.project = projectId; responseData = await taigaApiRequest.call(this, 'POST', '/tasks', body);
if (returnAll === true) { } else if (operation === 'delete') {
responseData = await taigaApiRequestAllItems.call(this, 'GET', '/issues', {}, qs);
// ----------------------------------------
// task: delete
// ----------------------------------------
const taskId = this.getNodeParameter('taskId', i);
responseData = await taigaApiRequest.call(this, 'DELETE', `/tasks/${taskId}`);
responseData = { success: true };
} else if (operation === 'get') {
// ----------------------------------------
// task: get
// ----------------------------------------
const taskId = this.getNodeParameter('taskId', i);
responseData = await taigaApiRequest.call(this, 'GET', `/tasks/${taskId}`);
} else if (operation === 'getAll') {
// ----------------------------------------
// task: getAll
// ----------------------------------------
const qs = {} as IDataObject;
const filters = this.getNodeParameter('filters', i) as IDataObject;
if (Object.keys(filters).length) {
Object.assign(qs, filters);
}
responseData = await handleListing.call(this, 'GET', '/tasks', {}, qs, i);
} else if (operation === 'update') {
// ----------------------------------------
// task: update
// ----------------------------------------
const body = {} as IDataObject;
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
if (Object.keys(updateFields).length) {
Object.assign(body, updateFields);
} else {
throwOnEmptyUpdate.call(this, resource);
}
const taskId = this.getNodeParameter('taskId', i);
body.version = await getVersionForUpdate.call(this, `/tasks/${taskId}`);
responseData = await taigaApiRequest.call(this, 'PATCH', `/tasks/${taskId}`, body);
} else {
qs.limit = this.getNodeParameter('limit', i) as number;
responseData = await taigaApiRequestAllItems.call(this, 'GET', '/issues', {}, qs);
responseData = responseData.splice(0, qs.limit);
} }
} else if (resource === 'userStory') {
// **********************************************************************
// userStory
// **********************************************************************
if (operation === 'create') {
// ----------------------------------------
// userStory: create
// ----------------------------------------
const body = {
project: this.getNodeParameter('projectId', i),
subject: this.getNodeParameter('subject', i),
} as IDataObject;
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
if (Object.keys(additionalFields).length) {
Object.assign(body, additionalFields);
}
responseData = await taigaApiRequest.call(this, 'POST', '/userstories', body);
} else if (operation === 'delete') {
// ----------------------------------------
// userStory: delete
// ----------------------------------------
const userStoryId = this.getNodeParameter('userStoryId', i);
const endpoint = `/userstories/${userStoryId}`;
responseData = await taigaApiRequest.call(this, 'DELETE', endpoint);
responseData = { success: true };
} else if (operation === 'get') {
// ----------------------------------------
// userStory: get
// ----------------------------------------
const userStoryId = this.getNodeParameter('userStoryId', i);
const endpoint = `/userstories/${userStoryId}`;
responseData = await taigaApiRequest.call(this, 'GET', endpoint);
} else if (operation === 'getAll') {
// ----------------------------------------
// userStory: getAll
// ----------------------------------------
const qs = {} as IDataObject;
const filters = this.getNodeParameter('filters', i) as IDataObject;
if (Object.keys(filters).length) {
Object.assign(qs, filters);
}
responseData = await handleListing.call(this, 'GET', '/userstories', {}, qs, i);
} else if (operation === 'update') {
// ----------------------------------------
// userStory: update
// ----------------------------------------
const body = {} as IDataObject;
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
if (Object.keys(updateFields).length) {
Object.assign(body, updateFields);
} else {
throwOnEmptyUpdate.call(this, resource);
}
const userStoryId = this.getNodeParameter('userStoryId', i);
body.version = await getVersionForUpdate.call(this, `/userstories/${userStoryId}`);
responseData = await taigaApiRequest.call(this, 'PATCH', `/userstories/${userStoryId}`, body);
}
} }
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });
continue;
}
throw error;
} }
if (Array.isArray(responseData)) {
returnData.push.apply(returnData, responseData as IDataObject[]); Array.isArray(responseData)
} else { ? returnData.push(...responseData)
returnData.push(responseData as IDataObject); : returnData.push(responseData);
}
} }
return [this.helpers.returnJsonArray(returnData)]; return [this.helpers.returnJsonArray(returnData)];

View file

@ -3,6 +3,7 @@
"nodeVersion": "1.0", "nodeVersion": "1.0",
"codexVersion": "1.0", "codexVersion": "1.0",
"categories": [ "categories": [
"Development",
"Productivity" "Productivity"
], ],
"resources": { "resources": {

View file

@ -26,7 +26,7 @@ export class TaigaTrigger implements INodeType {
description: INodeTypeDescription = { description: INodeTypeDescription = {
displayName: 'Taiga Trigger', displayName: 'Taiga Trigger',
name: 'taigaTrigger', name: 'taigaTrigger',
icon: 'file:taiga.png', icon: 'file:taiga.svg',
group: ['trigger'], group: ['trigger'],
version: 1, version: 1,
subtitle: '={{"project:" + $parameter["projectSlug"]}}', subtitle: '={{"project:" + $parameter["projectSlug"]}}',
@ -39,25 +39,7 @@ export class TaigaTrigger implements INodeType {
outputs: ['main'], outputs: ['main'],
credentials: [ credentials: [
{ {
name: 'taigaCloudApi', name: 'taigaApi',
displayOptions: {
show: {
version: [
'cloud',
],
},
},
required: true,
},
{
name: 'taigaServerApi',
displayOptions: {
show: {
version: [
'server',
],
},
},
required: true, required: true,
}, },
], ],
@ -70,22 +52,6 @@ export class TaigaTrigger implements INodeType {
}, },
], ],
properties: [ properties: [
{
displayName: 'Taiga Version',
name: 'version',
type: 'options',
options: [
{
name: 'Cloud',
value: 'cloud',
},
{
name: 'Server (Self Hosted)',
value: 'server',
},
],
default: 'cloud',
},
{ {
displayName: 'Project ID', displayName: 'Project ID',
name: 'projectId', name: 'projectId',
@ -146,15 +112,7 @@ export class TaigaTrigger implements INodeType {
return false; return false;
}, },
async create(this: IHookFunctions): Promise<boolean> { async create(this: IHookFunctions): Promise<boolean> {
const version = this.getNodeParameter('version') as string; const credentials = this.getCredentials('taigaApi') as ICredentialDataDecryptedObject;
let credentials;
if (version === 'server') {
credentials = this.getCredentials('taigaServerApi') as ICredentialDataDecryptedObject;
} else {
credentials = this.getCredentials('taigaCloudApi') as ICredentialDataDecryptedObject;
}
const webhookUrl = this.getNodeWebhookUrl('default') as string; const webhookUrl = this.getNodeWebhookUrl('default') as string;

View file

@ -0,0 +1,429 @@
import {
INodeProperties,
} from 'n8n-workflow';
export const epicOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'epic',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create an epic',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete an epic',
},
{
name: 'Get',
value: 'get',
description: 'Get an epic',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get all epics',
},
{
name: 'Update',
value: 'update',
description: 'Update an epic',
},
],
default: 'create',
description: 'Operation to perform',
},
] as INodeProperties[];
export const epicFields = [
// ----------------------------------------
// epic: create
// ----------------------------------------
{
displayName: 'Project ID',
name: 'projectId',
description: 'ID of the project to which the epic belongs',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'epic',
],
operation: [
'create',
],
},
},
},
{
displayName: 'Subject',
name: 'subject',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'epic',
],
operation: [
'create',
],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'epic',
],
operation: [
'create',
],
},
},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'ID of the user to assign the epic to',
},
{
displayName: 'Blocked Note',
name: 'blocked_note',
type: 'string',
default: '',
description: 'Reason why the epic is blocked. Requires "Is Blocked" toggle to be enabled',
},
{
displayName: 'Color',
name: 'color',
type: 'color',
default: '0000FF',
description: 'Color code in hexadecimal notation',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
},
{
displayName: 'Is Blocked',
name: 'is_blocked',
type: 'boolean',
default: false,
description: 'Whether the issue is blocked',
},
{
displayName: 'Tags',
name: 'tags',
type: 'multiOptions',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTags',
},
default: [],
},
],
},
// ----------------------------------------
// epic: delete
// ----------------------------------------
{
displayName: 'Epic ID',
name: 'epicId',
description: 'ID of the epic to delete',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'epic',
],
operation: [
'delete',
],
},
},
},
// ----------------------------------------
// epic: get
// ----------------------------------------
{
displayName: 'Epic ID',
name: 'epicId',
description: 'ID of the epic to retrieve',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'epic',
],
operation: [
'get',
],
},
},
},
// ----------------------------------------
// epic: getAll
// ----------------------------------------
{
displayName: 'Project ID',
name: 'projectId',
description: 'ID of the project to which the epic belongs',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'epic',
],
operation: [
'getAll',
],
},
},
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'epic',
],
operation: [
'getAll',
],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'How many results to return',
typeOptions: {
minValue: 1,
},
displayOptions: {
show: {
resource: [
'epic',
],
operation: [
'getAll',
],
returnAll: [
false,
],
},
},
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Filter',
displayOptions: {
show: {
resource: [
'epic',
],
operation: [
'getAll',
],
},
},
default: {},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'ID of the user whom the epic is assigned to',
},
{
displayName: 'Is Closed',
name: 'statusIsClosed',
description: 'Whether the epic is closed',
type: 'boolean',
default: false,
},
],
},
// ----------------------------------------
// epic: update
// ----------------------------------------
{
displayName: 'Project ID',
name: 'projectId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
default: '',
description: 'ID of the project to set the epic to',
displayOptions: {
show: {
resource: [
'epic',
],
operation: [
'update',
],
},
},
},
{
displayName: 'Epic ID',
name: 'epicId',
description: 'ID of the epic to update',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'epic',
],
operation: [
'update',
],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'epic',
],
operation: [
'update',
],
},
},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'ID of the user to whom the epic is assigned',
},
{
displayName: 'Blocked Note',
name: 'blocked_note',
type: 'string',
default: '',
description: 'Reason why the epic is blocked. Requires "Is Blocked" toggle to be enabled',
},
{
displayName: 'Color',
name: 'color',
type: 'color',
default: '0000FF',
description: 'Color code in hexadecimal notation',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
},
{
displayName: 'Is Blocked',
name: 'is_blocked',
type: 'boolean',
default: false,
description: 'Whether the epic is blocked',
},
{
displayName: 'Subject',
name: 'subject',
type: 'string',
default: '',
},
{
displayName: 'Tags',
name: 'tags',
type: 'multiOptions',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTags',
},
default: [],
},
],
},
] as INodeProperties[];

View file

@ -0,0 +1,663 @@
import {
INodeProperties,
} from 'n8n-workflow';
export const issueOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'issue',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create an issue',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete an issue',
},
{
name: 'Get',
value: 'get',
description: 'Get an issue',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get all issues',
},
{
name: 'Update',
value: 'update',
description: 'Update an issue',
},
],
default: 'create',
description: 'Operation to perform',
},
] as INodeProperties[];
export const issueFields = [
// ----------------------------------------
// issue: create
// ----------------------------------------
{
displayName: 'Project ID',
name: 'projectId',
description: 'ID of the project to which the issue belongs',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'create',
],
},
},
},
{
displayName: 'Subject',
name: 'subject',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'create',
],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'create',
],
},
},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'ID of the user to whom the issue is assigned',
},
{
displayName: 'Blocked Note',
name: 'blocked_note',
type: 'string',
default: '',
description: 'Reason why the issue is blocked. Requires "Is Blocked" toggle to be enabled',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
},
{
displayName: 'Is Blocked',
name: 'is_blocked',
type: 'boolean',
default: false,
description: 'Whether the issue is blocked',
},
{
displayName: 'Milestone (Sprint)',
name: 'milestone',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getMilestones',
},
default: '',
description: 'ID of the milestone of the issue',
},
{
displayName: 'Priority',
name: 'priority',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getPriorities',
},
default: '',
},
{
displayName: 'Severity',
name: 'severity',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getSeverities',
},
default: '',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getIssueStatuses',
},
default: '',
description: 'ID of the status of the issue',
},
{
displayName: 'Tags',
name: 'tags',
type: 'multiOptions',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTags',
},
default: [],
},
{
displayName: 'Type',
name: 'type',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTypes',
},
default: '',
},
],
},
// ----------------------------------------
// issue: delete
// ----------------------------------------
{
displayName: 'Issue ID',
name: 'issueId',
description: 'ID of the issue to delete',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'delete',
],
},
},
},
// ----------------------------------------
// issue: get
// ----------------------------------------
{
displayName: 'Issue ID',
name: 'issueId',
description: 'ID of the issue to retrieve',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'get',
],
},
},
},
// ----------------------------------------
// issue: getAll
// ----------------------------------------
{
displayName: 'Project ID',
name: 'projectId',
description: 'ID of the project to which the issue belongs',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'getAll',
],
},
},
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'getAll',
],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'How many results to return',
typeOptions: {
minValue: 1,
},
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'getAll',
],
returnAll: [
false,
],
},
},
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Filter',
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'getAll',
],
},
},
default: {},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
description: 'ID of the user to assign the issue to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUsers',
},
default: '',
},
{
displayName: 'Order By',
name: 'orderBy',
description: 'Field to order the issues by',
type: 'options',
options: [
{
name: 'Assigned To',
value: 'assigned_to',
},
{
name: 'Created Date',
value: 'created_date',
},
{
name: 'Modified Date',
value: 'modified_date',
},
{
name: 'Owner',
value: 'owner',
},
{
name: 'Priority',
value: 'priority',
},
{
name: 'Severity',
value: 'severity',
},
{
name: 'Status',
value: 'status',
},
{
name: 'Subject',
value: 'subject',
},
{
name: 'Type',
value: 'type',
},
],
default: 'assigned_to',
},
{
displayName: 'Owner',
name: 'owner',
description: 'ID of the owner of the issue',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUsers',
},
default: '',
},
{
displayName: 'Priority',
name: 'priority',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getPriorities',
},
default: '',
},
{
displayName: 'Role',
name: 'role',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getRoles',
},
default: '',
},
{
displayName: 'Severity',
name: 'severity',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getSeverities',
},
default: '',
},
{
displayName: 'Status',
name: 'status',
description: 'ID of the status of the issue',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getIssueStatuses',
},
default: '',
},
{
displayName: 'Tags',
name: 'tags',
type: 'multiOptions',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTags',
},
default: [],
},
{
displayName: 'Type',
name: 'type',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTypes',
},
default: '',
},
],
},
// ----------------------------------------
// issue: update
// ----------------------------------------
{
displayName: 'Project ID',
name: 'projectId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
default: '',
description: 'ID of the project to set the issue to',
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'update',
],
},
},
},
{
displayName: 'Issue ID',
name: 'issueId',
description: 'ID of the issue to update',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'update',
],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'update',
],
},
},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'ID of the user whom the issue is assigned to',
},
{
displayName: 'Blocked Note',
name: 'blocked_note',
type: 'string',
default: '',
description: 'Reason why the issue is blocked. Requires "Is Blocked" toggle to be enabled',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
},
{
displayName: 'Is Blocked',
name: 'is_blocked',
type: 'boolean',
default: false,
description: 'Whether the issue is blocked',
},
{
displayName: 'Milestone (Sprint)',
name: 'milestone',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getMilestones',
},
default: '',
description: 'ID of the milestone of the issue',
},
{
displayName: 'Priority',
name: 'priority',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getPriorities',
},
default: '',
},
{
displayName: 'Severity',
name: 'severity',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getSeverities',
},
default: '',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getIssueStatuses',
},
default: '',
description: 'ID of the status of the issue',
},
{
displayName: 'Subject',
name: 'subject',
type: 'string',
default: '',
},
{
displayName: 'Tags',
name: 'tags',
type: 'multiOptions',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTags',
},
default: [],
},
{
displayName: 'Type',
name: 'type',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTypes',
},
default: '',
},
],
},
] as INodeProperties[];

View file

@ -0,0 +1,609 @@
import {
INodeProperties,
} from 'n8n-workflow';
export const taskOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'task',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a task',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a task',
},
{
name: 'Get',
value: 'get',
description: 'Get a task',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get all tasks',
},
{
name: 'Update',
value: 'update',
description: 'Update a task',
},
],
default: 'create',
description: 'Operation to perform',
},
] as INodeProperties[];
export const taskFields = [
// ----------------------------------------
// task: create
// ----------------------------------------
{
displayName: 'Project ID',
name: 'projectId',
description: 'ID of the project to which the task belongs',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'create',
],
},
},
},
{
displayName: 'Subject',
name: 'subject',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'create',
],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'create',
],
},
},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'ID of the user to whom the task is assigned',
},
{
displayName: 'Blocked Note',
name: 'blocked_note',
type: 'string',
default: '',
description: 'Reason why the task is blocked. Requires "Is Blocked" toggle to be enabled',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
},
{
displayName: 'Is Blocked',
name: 'is_blocked',
type: 'boolean',
default: false,
description: 'Whether the task is blocked',
},
{
displayName: 'Milestone (Sprint)',
name: 'milestone',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getMilestones',
},
default: '',
description: 'ID of the milestone of the task',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTaskStatuses',
},
default: '',
description: 'ID of the status of the task',
},
{
displayName: 'Tags',
name: 'tags',
type: 'multiOptions',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTags',
},
default: [],
},
{
displayName: 'Taskboard Order',
name: 'taskboard_order',
type: 'number',
default: 1,
description: 'Order of the task in the taskboard',
typeOptions: {
minValue: 1,
},
},
{
displayName: 'User Story',
name: 'user_story',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUserStories',
},
default: '',
description: 'ID of the user story of the task',
},
{
displayName: 'User Story Order',
name: 'us_order',
type: 'number',
default: 1,
description: 'Order of the task in the user story',
typeOptions: {
minValue: 1,
},
},
],
},
// ----------------------------------------
// task: delete
// ----------------------------------------
{
displayName: 'Task ID',
name: 'taskId',
description: 'ID of the task to delete',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'delete',
],
},
},
},
// ----------------------------------------
// task: get
// ----------------------------------------
{
displayName: 'Task ID',
name: 'taskId',
description: 'ID of the task to retrieve',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'get',
],
},
},
},
// ----------------------------------------
// task: getAll
// ----------------------------------------
{
displayName: 'Project ID',
name: 'projectId',
description: 'ID of the project to which the task belongs',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'getAll',
],
},
},
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'getAll',
],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'How many results to return',
typeOptions: {
minValue: 1,
},
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'getAll',
],
returnAll: [
false,
],
},
},
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Filter',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'getAll',
],
},
},
default: {},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'ID of the user whom the task is assigned to',
},
{
displayName: 'Is Closed',
name: 'statusIsClosed',
description: 'Whether the task is closed',
type: 'boolean',
default: false,
},
{
displayName: 'Milestone (Sprint)',
name: 'milestone',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getMilestones',
},
default: '',
description: 'ID of the milestone of the task',
},
{
displayName: 'Owner',
name: 'owner',
description: 'ID of the owner of the task',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUsers',
},
default: '',
},
{
displayName: 'Role',
name: 'role',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getRoles',
},
default: '',
},
{
displayName: 'Status',
name: 'status',
description: 'ID of the status of the task',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTaskStatuses',
},
default: '',
},
{
displayName: 'Tags',
name: 'tags',
type: 'multiOptions',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTags',
},
default: [],
},
{
displayName: 'User Story',
name: 'userStory',
description: 'ID of the user story to which the task belongs',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUserStories',
},
default: '',
},
],
},
// ----------------------------------------
// task: update
// ----------------------------------------
{
displayName: 'Project ID',
name: 'projectId',
description: 'ID of the project to set the task to',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
default: '',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'update',
],
},
},
},
{
displayName: 'Task ID',
name: 'taskId',
description: 'ID of the task to update',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'update',
],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'task',
],
operation: [
'update',
],
},
},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTypes',
},
default: '',
description: 'ID of the user to assign the task to',
},
{
displayName: 'Blocked Note',
name: 'blocked_note',
type: 'string',
default: '',
description: 'Reason why the task is blocked. Requires "Is Blocked" toggle to be enabled',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
},
{
displayName: 'Is Blocked',
name: 'is_blocked',
type: 'boolean',
default: false,
description: 'Whether the task is blocked',
},
{
displayName: 'Milestone (Sprint)',
name: 'milestone',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getMilestones',
},
default: '',
description: 'ID of the milestone of the task',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTaskStatuses',
},
default: '',
description: 'ID of the status of the task',
},
{
displayName: 'Subject',
name: 'subject',
type: 'string',
default: '',
},
{
displayName: 'User Story',
name: 'user_story',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUserStories',
},
default: '',
description: 'ID of the user story of the task',
},
{
displayName: 'User Story Order',
name: 'us_order',
type: 'number',
default: 1,
typeOptions: {
minValue: 1,
},
description: 'Order of the task in the user story',
},
{
displayName: 'Tags',
name: 'tags',
type: 'multiOptions',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTags',
},
default: [],
},
{
displayName: 'Taskboard Order',
name: 'taskboard_order',
type: 'number',
default: 1,
typeOptions: {
minValue: 1,
},
description: 'Order of the task in the taskboard',
},
],
},
] as INodeProperties[];

View file

@ -0,0 +1,621 @@
import {
INodeProperties,
} from 'n8n-workflow';
export const userStoryOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'userStory',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a user story',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a user story',
},
{
name: 'Get',
value: 'get',
description: 'Get a user story',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get all user stories',
},
{
name: 'Update',
value: 'update',
description: 'Update a user story',
},
],
default: 'create',
description: 'Operation to perform',
},
] as INodeProperties[];
export const userStoryFields = [
// ----------------------------------------
// userStory: create
// ----------------------------------------
{
displayName: 'Project ID',
name: 'projectId',
description: 'ID of the project to which the user story belongs',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'userStory',
],
operation: [
'create',
],
},
},
},
{
displayName: 'Subject',
name: 'subject',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'userStory',
],
operation: [
'create',
],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'userStory',
],
operation: [
'create',
],
},
},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'ID of the user to whom the user story is assigned',
},
{
displayName: 'Backlog Order',
name: 'backlog_order',
type: 'number',
default: 1,
typeOptions: {
minValue: 1,
},
description: 'Order of the user story in the backlog',
},
{
displayName: 'Blocked Note',
name: 'blocked_note',
type: 'string',
default: '',
description: 'Reason why the user story is blocked. Requires "Is Blocked" toggle to be enabled',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
},
{
displayName: 'Is Blocked',
name: 'is_blocked',
type: 'boolean',
default: false,
description: 'Whether the user story is blocked',
},
{
displayName: 'Kanban Order',
name: 'kanban_order',
type: 'number',
default: 1,
typeOptions: {
minValue: 1,
},
description: 'Order of the user story in the kanban',
},
{
displayName: 'Milestone (Sprint)',
name: 'milestone',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getMilestones',
},
default: '',
description: 'ID of the milestone of the user story',
},
{
displayName: 'Sprint Order',
name: 'sprint_order',
type: 'number',
default: 1,
typeOptions: {
minValue: 1,
},
description: 'Order of the user story in the milestone',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUserStoryStatuses',
},
default: '',
description: 'ID of the status of the user story',
},
{
displayName: 'Tags',
name: 'tags',
type: 'multiOptions',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTags',
},
default: [],
},
{
displayName: 'Type',
name: 'type',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTypes',
},
default: '',
},
],
},
// ----------------------------------------
// userStory: delete
// ----------------------------------------
{
displayName: 'User Story ID',
name: 'userStoryId',
description: 'ID of the user story to delete',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'userStory',
],
operation: [
'delete',
],
},
},
},
// ----------------------------------------
// userStory: get
// ----------------------------------------
{
displayName: 'User Story ID',
name: 'userStoryId',
description: 'ID of the user story to retrieve',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'userStory',
],
operation: [
'get',
],
},
},
},
// ----------------------------------------
// userStory: getAll
// ----------------------------------------
{
displayName: 'Project ID',
name: 'projectId',
description: 'ID of the project to which the user story belongs',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'userStory',
],
operation: [
'getAll',
],
},
},
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'userStory',
],
operation: [
'getAll',
],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'How many results to return',
typeOptions: {
minValue: 1,
},
displayOptions: {
show: {
resource: [
'userStory',
],
operation: [
'getAll',
],
returnAll: [
false,
],
},
},
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Filter',
displayOptions: {
show: {
resource: [
'userStory',
],
operation: [
'getAll',
],
},
},
default: {},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
description: 'ID of the user whom the user story is assigned to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUsers',
},
default: '',
},
{
displayName: 'Epic',
name: 'epic',
description: 'ID of the epic to which the user story belongs',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getEpics',
},
default: '',
},
{
displayName: 'Is Closed',
name: 'statusIsClosed',
description: 'Whether the user story is closed',
type: 'boolean',
default: false,
},
{
displayName: 'Is Archived',
name: 'statusIsArchived',
description: 'Whether the user story has been archived',
type: 'boolean',
default: false,
},
{
displayName: 'Milestone (Sprint)',
name: 'milestone',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getMilestones',
},
default: '',
description: 'ID of the milestone of the user story',
},
{
displayName: 'Role',
name: 'role',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getRoles',
},
default: '',
},
{
displayName: 'Status',
name: 'status',
description: 'ID of the status of the user story',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUserStoryStatuses',
},
default: '',
},
{
displayName: 'Tags',
name: 'tags',
type: 'multiOptions',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTags',
},
default: [],
},
],
},
// ----------------------------------------
// userStory: update
// ----------------------------------------
{
displayName: 'Project ID',
name: 'projectId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
default: '',
description: 'ID of the project to set the user story to',
displayOptions: {
show: {
resource: [
'userStory',
],
operation: [
'update',
],
},
},
},
{
displayName: 'User Story ID',
name: 'userStoryId',
description: 'ID of the user story to update',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'userStory',
],
operation: [
'update',
],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'userStory',
],
operation: [
'update',
],
},
},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'ID of the user to assign the the user story to',
},
{
displayName: 'Backlog Order',
name: 'backlog_order',
type: 'number',
default: 1,
typeOptions: {
minValue: 1,
},
description: 'Order of the user story in the backlog',
},
{
displayName: 'Blocked Note',
name: 'blocked_note',
type: 'string',
default: '',
description: 'Reason why the user story is blocked. Requires "Is Blocked" toggle to be enabled',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
},
{
displayName: 'Is Blocked',
name: 'is_blocked',
type: 'boolean',
default: false,
description: 'Whether the user story is blocked',
},
{
displayName: 'Kanban Order',
name: 'kanban_order',
type: 'number',
default: 1,
typeOptions: {
minValue: 1,
},
description: 'Order of the user story in the kanban',
},
{
displayName: 'Milestone (Sprint)',
name: 'milestone',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getMilestones',
},
default: '',
description: 'ID of the milestone of the user story',
},
{
displayName: 'Subject',
name: 'subject',
type: 'string',
default: '',
},
{
displayName: 'Sprint Order',
name: 'sprint_order',
type: 'number',
default: 1,
typeOptions: {
minValue: 1,
},
description: 'Order of the user story in the milestone',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getUserStoryStatuses',
},
default: '',
description: 'ID of the status of the user story',
},
{
displayName: 'Tags',
name: 'tags',
type: 'multiOptions',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTags',
},
default: [],
},
{
displayName: 'Type',
name: 'type',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getTypes',
},
default: '',
},
],
},
] as INodeProperties[];

View file

@ -0,0 +1,4 @@
export * from './EpicDescription';
export * from './IssueDescription';
export * from './TaskDescription';
export * from './UserStoryDescription';

View file

@ -1,357 +0,0 @@
import {
INodeProperties,
} from 'n8n-workflow';
export const issueOperationFields = [
{
displayName: 'Project ID',
name: 'projectId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getUserProjects',
},
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'create',
'getAll',
'update',
],
},
},
default: '',
description: 'The project ID.',
required: true,
},
{
displayName: 'Subject',
name: 'subject',
type: 'string',
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'create',
],
},
},
default: '',
required: true,
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'create',
],
},
},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getProjectUsers',
},
default: '',
description: 'User id to you want assign the issue to',
},
{
displayName: 'Blocked Note',
name: 'blocked_note',
type: 'string',
default: '',
description: 'Reason why the issue is blocked',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
},
{
displayName: 'Is Blocked',
name: 'is_blocked',
type: 'boolean',
default: false,
},
{
displayName: 'Is Closed',
name: 'is_closed',
type: 'boolean',
default: false,
},
{
displayName: 'Milestone ID',
name: 'milestone',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectSlug',
],
loadOptionsMethod: 'getProjectMilestones',
},
default: '',
},
{
displayName: 'Priority ID',
name: 'priority',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectSlug',
],
loadOptionsMethod: 'getProjectPriorities',
},
default: '',
},
{
displayName: 'Severity ID',
name: 'severity',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectSlug',
],
loadOptionsMethod: 'getProjectSeverities',
},
default: '',
},
{
displayName: 'Status ID',
name: 'status',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getStatuses',
},
default: '',
},
{
displayName: 'Tags',
name: 'tags',
type: 'string',
description: 'Tags separated by comma.',
default: '',
placeholder: 'product, sales',
},
{
displayName: 'Type ID',
name: 'type',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectSlug',
],
loadOptionsMethod: 'getTypes',
},
default: '',
},
],
},
{
displayName: 'Issue ID',
name: 'issueId',
type: 'string',
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'update',
'delete',
'get',
],
},
},
default: '',
required: true,
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'issue',
],
operation: [
'update',
],
},
},
options: [
{
displayName: 'Assigned To',
name: 'assigned_to',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectId',
],
loadOptionsMethod: 'getProjectUsers',
},
default: '',
description: 'User id to you want assign the issue to',
},
{
displayName: 'Blocked Note',
name: 'blocked_note',
type: 'string',
default: '',
description: 'Reason why the issue is blocked',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
},
{
displayName: 'Is Blocked',
name: 'is_blocked',
type: 'boolean',
default: false,
},
{
displayName: 'Is Closed',
name: 'is_closed',
type: 'boolean',
default: false,
},
{
displayName: 'Milestone ID',
name: 'milestone',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectSlug',
],
loadOptionsMethod: 'getProjectMilestones',
},
default: '',
},
{
displayName: 'Priority ID',
name: 'priority',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectSlug',
],
loadOptionsMethod: 'getProjectPriorities',
},
default: '',
},
{
displayName: 'Severity ID',
name: 'severity',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectSlug',
],
loadOptionsMethod: 'getProjectSeverities',
},
default: '',
},
{
displayName: 'Status ID',
name: 'status',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getStatuses',
},
default: '',
},
{
displayName: 'Subject',
name: 'subject',
type: 'string',
default: '',
},
{
displayName: 'Tags',
name: 'tags',
type: 'string',
description: 'Tags separated by comma.',
default: '',
placeholder: 'product, sales',
},
{
displayName: 'Type ID',
name: 'type',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'projectSlug',
],
loadOptionsMethod: 'getTypes',
},
default: '',
},
],
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'issue',
],
},
},
default: false,
description: 'If all results should be returned or only up to a given limit.',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'issue',
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
maxValue: 500,
},
default: 100,
description: 'How many results to return.',
},
] as INodeProperties[];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -0,0 +1 @@
<svg width="2500" height="2500" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet"><path d="M224.288 43.916l-11.963 84.2-84.2-11.963 11.963-84.2 84.2 11.963z" opacity=".8" fill="#A295AE"/><path d="M31.885 212.291l11.963-84.2 84.2 11.963-11.963 84.2-84.2-11.963z" opacity=".8" fill="#5D6F6D"/><path d="M43.848 32.065l84.2 11.962-11.963 84.2-84.2-11.963 11.963-84.2z" opacity=".8" fill="#8CD592"/><path d="M212.226 224.264l-84.2-11.963 11.963-84.2 84.2 11.963-11.963 84.2z" opacity=".8" fill="#665E74"/><path d="M119.642 255.595l-51.08-67.997 67.998-51.08 51.08 67.998-67.998 51.08z" opacity=".8" fill="#3C3647"/><path d="M255.463 136.39l-67.997 51.079-51.08-67.997 67.998-51.08 51.08 67.998z" opacity=".8" fill="#837193"/><path d="M136.437.554l51.079 67.997-67.997 51.08-51.08-67.998L136.437.553z" opacity=".8" fill="#A2F4AC"/><path d="M.463 119.7l67.998-51.08 51.079 67.998-67.997 51.08L.463 119.7z" opacity=".8" fill="#7EA685"/><path d="M127.963 95.742l32.332 32.333-32.332 32.332-32.332-32.332 32.332-32.333z" fill="#3C3647"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,24 @@
type Resource = 'epic' | 'issue' | 'task' | 'userStory';
type Operation = 'create' | 'delete' | 'update' | 'get' | 'getAll'
type LoadedResource = {
id: string;
name: string;
};
type LoadedUser = {
id: string;
full_name_display: string;
};
type LoadedUserStory = {
id: string;
subject: string;
};
type LoadedEpic = LoadedUserStory;
type LoadedTags = {
[tagName: string]: string | null; // hex color
}

View file

@ -244,8 +244,7 @@
"dist/credentials/StrapiApi.credentials.js", "dist/credentials/StrapiApi.credentials.js",
"dist/credentials/SurveyMonkeyApi.credentials.js", "dist/credentials/SurveyMonkeyApi.credentials.js",
"dist/credentials/SurveyMonkeyOAuth2Api.credentials.js", "dist/credentials/SurveyMonkeyOAuth2Api.credentials.js",
"dist/credentials/TaigaCloudApi.credentials.js", "dist/credentials/TaigaApi.credentials.js",
"dist/credentials/TaigaServerApi.credentials.js",
"dist/credentials/TapfiliateApi.credentials.js", "dist/credentials/TapfiliateApi.credentials.js",
"dist/credentials/TelegramApi.credentials.js", "dist/credentials/TelegramApi.credentials.js",
"dist/credentials/TheHiveApi.credentials.js", "dist/credentials/TheHiveApi.credentials.js",