n8n/packages/nodes-base/credentials/TwakeCloudApi.credentials.ts
agobrech 6d64e84f5e
feat(Twake Node): Update icon, add cred test and custom operation support (#3431)
* 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>
2022-06-18 20:10:08 -07:00

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',
},
};
}