n8n-nodes-bizappay
Version:
Unofficial community n8n node for Bizappay API integration - NOT officially endorsed by Bizappay
51 lines (50 loc) • 1.84 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BizappayApi = void 0;
class BizappayApi {
constructor() {
this.name = 'bizappayApi';
this.displayName = 'Bizappay API';
this.documentationUrl = 'https://documenter.getpostman.com/view/6258355/SzmZdLp3?version=latest';
this.description = 'Need a Bizappay account? Sign up at https://www.bizappay.my/a/OTQxNg__ and support this n8n node development!';
this.properties = [
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: {
password: true,
},
default: '',
required: true,
description: 'Your Bizappay API key. Get it from Settings > Profile page in your Bizappay dashboard.',
},
];
this.test = {
request: {
baseURL: 'https://bizappay.my',
url: '/api/v3/token',
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'n8n-bizappay-node/1.0.0',
Accept: 'application/json',
'Cache-Control': 'no-cache',
},
body: 'apiKey={{$credentials.apiKey}}',
timeout: 30000,
},
rules: [
{
type: 'responseSuccessBody',
properties: {
message: 'Authentication successful',
key: 'token',
value: 'regex:^[a-zA-Z0-9]+$',
},
},
],
};
}
}
exports.BizappayApi = BizappayApi;