n8n/packages/nodes-base/credentials/TwakeCloudApi.credentials.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
762 B
TypeScript
Raw Normal View History

import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class TwakeCloudApi implements ICredentialType {
name = 'twakeCloudApi';
2021-08-21 05:22:42 -07:00
displayName = 'Twake Cloud API';
documentationUrl = 'twake';
properties: INodeProperties[] = [
{
displayName: 'Workspace Key',
name: 'workspaceKey',
type: 'string',
typeOptions: { password: true },
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.workspaceKey}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: 'https://plugins.twake.app/plugins/n8n',
url: '/channel',
method: 'POST',
},
};
}