mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(Trello Node) Add support for board members and credential tests (#3201)
* adds support for trello board member operations: inviteMemberByEmail, addMember, removeMember, getMembers * lintfix * format fixes * remove unnecessary variable and assign to qs on same line * fix description * Moved Board Members to their own resource * Removed members from board resource... * Added return all limits to get members * adds info about Trello premium feature in description * Improvements from internal review * ⚡ Improvements * Changed credentials to use new system and implemented test * ⚡ Improvements * fix(core): Fix issue with fixedCollection having all default values * 👕 Fix lint issue Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
committed by
GitHub
parent
7ced65484f
commit
d8870ecbff
@@ -1,9 +1,11 @@
|
||||
import {
|
||||
ICredentialDataDecryptedObject,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
IHttpRequestOptions,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
|
||||
export class TrelloApi implements ICredentialType {
|
||||
name = 'trelloApi';
|
||||
displayName = 'Trello API';
|
||||
@@ -13,19 +15,36 @@ export class TrelloApi implements ICredentialType {
|
||||
displayName: 'API Key',
|
||||
name: 'apiKey',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'API Token',
|
||||
name: 'apiToken',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'OAuth Secret',
|
||||
name: 'oauthSecret',
|
||||
type: 'string',
|
||||
type: 'hidden',
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
|
||||
async authenticate(credentials: ICredentialDataDecryptedObject, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions> {
|
||||
requestOptions.qs = {
|
||||
...requestOptions.qs,
|
||||
'key': credentials.apiKey,
|
||||
'token': credentials.apiToken,
|
||||
};
|
||||
return requestOptions;
|
||||
}
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: 'https://api.trello.com',
|
||||
url: '=/1/tokens/{{$credentials.apiToken}}/member',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user