76 lines
1.6 KiB
TypeScript
76 lines
1.6 KiB
TypeScript
import type { ICredentialType, INodeProperties, Icon } from 'n8n-workflow';
|
|
|
|
export class GwezzOceanengineOAuth2Api implements ICredentialType {
|
|
name = 'gwezzOceanengineOAuth2Api';
|
|
|
|
extends = ['oAuth2Api'];
|
|
|
|
displayName = 'Gwezz Ocean Engine OAuth2 API';
|
|
|
|
icon = { light: 'file:../icons/gwezz.svg', dark: 'file:../icons/gwezz.dark.svg' } as Icon;
|
|
|
|
documentationUrl = 'https://gitea.gwezz.com/n8n-nodes/n8n-nodes-gwezz-oceanengine/wiki';
|
|
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'APPID',
|
|
name: 'appId',
|
|
type: 'string',
|
|
default: '',
|
|
required: true,
|
|
},
|
|
{
|
|
displayName: 'Secret',
|
|
name: 'secret',
|
|
type: 'string',
|
|
typeOptions: {
|
|
password: true,
|
|
},
|
|
default: '',
|
|
required: true,
|
|
},
|
|
{
|
|
displayName: 'Redirect URI',
|
|
name: 'redirectUri',
|
|
type: 'hidden',
|
|
default: '={{$oauth2.redirectUrl}}',
|
|
},
|
|
{
|
|
displayName: 'Grant Type',
|
|
name: 'grantType',
|
|
type: 'hidden',
|
|
default: 'authorizationCode',
|
|
},
|
|
{
|
|
displayName: 'Authorization URL',
|
|
name: 'authUrl',
|
|
type: 'hidden',
|
|
default: 'https://ad.oceanengine.com/openapi/audit/oauth.html',
|
|
},
|
|
{
|
|
displayName: 'Access Token URL',
|
|
name: 'accessTokenUrl',
|
|
type: 'hidden',
|
|
default: 'https://ad.oceanengine.com/open_api/oauth2/access_token/',
|
|
},
|
|
{
|
|
displayName: 'Auth URI Query Parameters',
|
|
name: 'authQueryParameters',
|
|
type: 'hidden',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Scope',
|
|
name: 'scope',
|
|
type: 'hidden',
|
|
default: 'users:read users:write companies:read',
|
|
},
|
|
{
|
|
displayName: 'Authentication',
|
|
name: 'authentication',
|
|
type: 'hidden',
|
|
default: 'header',
|
|
},
|
|
];
|
|
}
|