n8n/packages/nodes-base/credentials/JiraSoftwareCloudApi.credentials.ts
pemontto 07b6cffdba
feat(Jira Node): Use Jira rendered fields with simplify option (#3323)
* 💄 Use Jira rendered fields with simplify

* 🐛 Merge the renderedField results with fields

*  improvements

*  Improvements

Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
2022-07-04 11:43:37 +02:00

50 lines
983 B
TypeScript

import {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class JiraSoftwareCloudApi implements ICredentialType {
name = 'jiraSoftwareCloudApi';
displayName = 'Jira SW Cloud API';
documentationUrl = 'jira';
properties: INodeProperties[] = [
{
displayName: 'Email',
name: 'email',
type: 'string',
placeholder: 'name@email.com',
default: '',
},
{
displayName: 'API Token',
name: 'apiToken',
type: 'string',
default: '',
},
{
displayName: 'Domain',
name: 'domain',
type: 'string',
default: '',
placeholder: 'https://example.atlassian.net',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
auth:{
username: '={{$credentials.email}}',
password: '={{$credentials.apiToken}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: '={{$credentials?.domain}}',
url: '/rest/api/2/project',
},
};
}