mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat: Updated multiple credentials with tests and allow to be used on HTTP Request Node (#3670)
* Notion cred updated * Airtable new cred * revamped twilio cred * urlscanlo revamp cred * Wordpress revamp cred with testing * SendGrid cred revamped * 🐛 Fix imports * 🐛 Fixes imports in urlscanio * Fix airtable cred injection * Fixes notion request, changes way of cred injection * Change auth type from method to generic * Fix minor issues * Fix lint issue Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
@@ -16,4 +17,12 @@ export class AirtableApi implements ICredentialType {
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
headers: {
|
||||
Authorization: '={{$credentials.apiKey}}',
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
@@ -15,4 +17,18 @@ export class NotionApi implements ICredentialType {
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: 'https://api.notion.com/v1',
|
||||
url: '/users',
|
||||
},
|
||||
};
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
headers: {
|
||||
'Authorization': '=Bearer {{$credentials.apiKey}}',
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
@@ -15,4 +16,12 @@ export class SendGridApi implements ICredentialType {
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
authenticate = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
headers: {
|
||||
Authorization: '=Bearer {{$credentials.apiKey}}',
|
||||
},
|
||||
},
|
||||
} as IAuthenticateGeneric;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialDataDecryptedObject,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
IHttpRequestOptions,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
@@ -74,4 +78,14 @@ export class TwilioApi implements ICredentialType {
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
auth: {
|
||||
username: '={{ $credentials.authType === "apiKey" ? $credentials.apiKeySid : $credentials.accountSid }}',
|
||||
password: '={{ $credentials.authType === "apiKey" ? $credentials.apiKeySecret : $credentials.authToken }}',
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
@@ -16,4 +18,19 @@ export class UrlScanIoApi implements ICredentialType {
|
||||
required: true,
|
||||
},
|
||||
];
|
||||
authenticate = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
headers: {
|
||||
'API-KEY': '={{$credentials.apiKey}}',
|
||||
},
|
||||
},
|
||||
} as IAuthenticateGeneric;
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: 'https://urlscan.io',
|
||||
url: '/user/quotas',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -50,3 +50,4 @@ export class WordpressApi implements ICredentialType {
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user