first commit
This commit is contained in:
50
nodes/GwezzOceanengine/GwezzOceanengine.node.ts
Normal file
50
nodes/GwezzOceanengine/GwezzOceanengine.node.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import { NodeConnectionType, type INodeType, type INodeTypeDescription } from 'n8n-workflow';
|
||||
import { userDescription } from './resources/user';
|
||||
import { companyDescription } from './resources/company';
|
||||
|
||||
export class GwezzOceanengine implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Gwezz Oceanengine',
|
||||
name: 'gwezzOceanengine',
|
||||
icon: { light: 'file:gwezzOceanengine.svg', dark: 'file:gwezzOceanengine.dark.svg' },
|
||||
group: ['transform'],
|
||||
version: 1,
|
||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||
description: 'Interact with the Gwezz Oceanengine API',
|
||||
defaults: {
|
||||
name: 'Gwezz Oceanengine',
|
||||
},
|
||||
usableAsTool: true,
|
||||
inputs: [NodeConnectionType.Main],
|
||||
outputs: [NodeConnectionType.Main],
|
||||
credentials: [{ name: 'gwezzOceanengineOAuth2Api', required: true }],
|
||||
requestDefaults: {
|
||||
baseURL: 'https://api.oceanengine.com/open_api/v3.0',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
},
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
options: [
|
||||
{
|
||||
name: 'User',
|
||||
value: 'user',
|
||||
},
|
||||
{
|
||||
name: 'Company',
|
||||
value: 'company',
|
||||
},
|
||||
],
|
||||
default: 'user',
|
||||
},
|
||||
...userDescription,
|
||||
...companyDescription,
|
||||
],
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user