mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(DeepL Node): Add support for longer texts + Credential tests (#3651)
* Updated DeepL to send data with Body instead of QS allowing larger translations * Updated Credentials and added test
This commit is contained in:
committed by
GitHub
parent
088daf952e
commit
88d6cfc07b
@@ -1,4 +1,9 @@
|
||||
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||
import {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class DeepLApi implements ICredentialType {
|
||||
name = 'deepLApi';
|
||||
@@ -28,4 +33,20 @@ export class DeepLApi implements ICredentialType {
|
||||
default: 'pro',
|
||||
},
|
||||
];
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
qs: {
|
||||
auth_key: '={{$credentials.apiKey}}',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: '={{$credentials.apiPlan === "pro" ? "https://api.deepl.com/v2" : "https://api-free.deepl.com/v2" }}',
|
||||
url: '/usage',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user