mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
6d64e84f5e
* Update icon, add cred injection and test, update url for integration
* ⚡ Fix error display for some edge cases
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
35 lines
674 B
TypeScript
35 lines
674 B
TypeScript
import {
|
|
IAuthenticateBearer,
|
|
ICredentialTestRequest,
|
|
ICredentialType,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export class TwakeCloudApi implements ICredentialType {
|
|
name = 'twakeCloudApi';
|
|
displayName = 'Twake Cloud API';
|
|
documentationUrl = 'twake';
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'Workspace Key',
|
|
name: 'workspaceKey',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
];
|
|
authenticate = {
|
|
type: 'bearer',
|
|
properties: {
|
|
tokenPropertyName: 'workspaceKey',
|
|
},
|
|
} as IAuthenticateBearer;
|
|
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: 'https://plugins.twake.app/plugins/n8n',
|
|
url: '/channel',
|
|
method: 'POST',
|
|
},
|
|
};
|
|
}
|