2019-06-23 03:35:23 -07:00
|
|
|
import {
|
feat: Add more credentials tests (#3668)
* ✨ Add injection to notion,
Add test to notion in cred
* 🔥 Remove unuse method
* 🎨 Move testing from node file to cred file
* ✨ Add injection and testing in facebook graph
* Add cred injec with testing
* Add Cred injection and cred test
* Add cred injection, and cred testing for typeform, fix issue in clickup
* Add cred injection, move testing inside creds
* Add cred injection and cred testing to SendGrid
* Add cred injection and cred testing to woocommerce
* Add cred injection, add cred test to gitlab
* 🔥 Fix duplicated imports in Mautic cred
* 🔥 removed unused credentials testing in node
* Add cred injection, cred testing, handles slash trailing for Grafana node
* Add cred injection, cred testing to shopify
* Add cred injection , add cred testing to stripe
* changed cred injection, add testing to cred for mattermost
* add cred injection and testing for dropbox
* Add cred injection, cred testing to webflow
* ✨ Add cred injection and cred test to nocodb
* ✨ Add cred injection, cred testing to mailchimp
* 🐛 fix a bug In credentials testing
* ✨ Add cred injection, cred testing to sms77
* ✨ Add cred injection, cred testing to ActiveCampaign
* Add cred injection, cred testing to TheHive
* ✨ Add cred injection, add cred testing to ApiTemplateio
* ✨ Add cred injection, add cred testing for zoom
* ✨ Add cred injection, cred testing to rocketchat
* ✨ Add cred injection, add cred test to getResponse
* 🔥 Remove useless authentcate creds and testing from facebookGraphApp
* 🔥 Remove useless imports in FacebookGrappApp credentials file
* 🔥 Removed useless imports and if statement
* 🐛 Add version to header when testing cred
Co-authored-by: Omar Ajoue <krynble@gmail.com>
Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com>
2022-07-15 07:20:41 -07:00
|
|
|
IAuthenticateGeneric,
|
|
|
|
ICredentialTestRequest,
|
2019-06-23 03:35:23 -07:00
|
|
|
ICredentialType,
|
2022-07-24 08:36:17 -07:00
|
|
|
INodeProperties,
|
2019-06-23 03:35:23 -07:00
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class DropboxApi implements ICredentialType {
|
|
|
|
name = 'dropboxApi';
|
|
|
|
displayName = 'Dropbox API';
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'dropbox';
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2019-06-23 03:35:23 -07:00
|
|
|
{
|
|
|
|
displayName: 'Access Token',
|
|
|
|
name: 'accessToken',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2022-11-01 09:41:45 -07:00
|
|
|
typeOptions: { password: true },
|
2019-06-23 03:35:23 -07:00
|
|
|
default: '',
|
|
|
|
},
|
2021-03-25 15:25:05 -07:00
|
|
|
{
|
|
|
|
displayName: 'APP Access Type',
|
|
|
|
name: 'accessType',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'options',
|
2021-03-25 15:25:05 -07:00
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'App Folder',
|
|
|
|
value: 'folder',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Full Dropbox',
|
|
|
|
value: 'full',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'full',
|
|
|
|
},
|
2019-06-23 03:35:23 -07:00
|
|
|
];
|
feat: Add more credentials tests (#3668)
* ✨ Add injection to notion,
Add test to notion in cred
* 🔥 Remove unuse method
* 🎨 Move testing from node file to cred file
* ✨ Add injection and testing in facebook graph
* Add cred injec with testing
* Add Cred injection and cred test
* Add cred injection, and cred testing for typeform, fix issue in clickup
* Add cred injection, move testing inside creds
* Add cred injection and cred testing to SendGrid
* Add cred injection and cred testing to woocommerce
* Add cred injection, add cred test to gitlab
* 🔥 Fix duplicated imports in Mautic cred
* 🔥 removed unused credentials testing in node
* Add cred injection, cred testing, handles slash trailing for Grafana node
* Add cred injection, cred testing to shopify
* Add cred injection , add cred testing to stripe
* changed cred injection, add testing to cred for mattermost
* add cred injection and testing for dropbox
* Add cred injection, cred testing to webflow
* ✨ Add cred injection and cred test to nocodb
* ✨ Add cred injection, cred testing to mailchimp
* 🐛 fix a bug In credentials testing
* ✨ Add cred injection, cred testing to sms77
* ✨ Add cred injection, cred testing to ActiveCampaign
* Add cred injection, cred testing to TheHive
* ✨ Add cred injection, add cred testing to ApiTemplateio
* ✨ Add cred injection, add cred testing for zoom
* ✨ Add cred injection, cred testing to rocketchat
* ✨ Add cred injection, add cred test to getResponse
* 🔥 Remove useless authentcate creds and testing from facebookGraphApp
* 🔥 Remove useless imports in FacebookGrappApp credentials file
* 🔥 Removed useless imports and if statement
* 🐛 Add version to header when testing cred
Co-authored-by: Omar Ajoue <krynble@gmail.com>
Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com>
2022-07-15 07:20:41 -07:00
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
|
|
type: 'generic',
|
|
|
|
properties: {
|
|
|
|
headers: {
|
|
|
|
Authorization: '=Bearer {{$credentials.accessToken}}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
test: ICredentialTestRequest = {
|
|
|
|
request: {
|
|
|
|
baseURL: 'https://api.dropboxapi.com/2',
|
|
|
|
url: '/users/get_current_account',
|
|
|
|
method: 'POST',
|
|
|
|
},
|
|
|
|
};
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|