mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 21:19:43 -08:00
f79bc633c0
* Add get/getAll:messageConversation to Twist node
* Add delete:messageConversation to Twist node
* Add update:messageConversation to Twist node
* Add archive/unarchive/delete:channel to Twist node
* Add add/update/get/getAll/remove:Thread to Twist node
* Add add/update/get/getAll/remove:Comment to Twist node
* Lint fixes
* Fix operations's descriptions
* Enhance Twist node code
* Reorder attributes alphabetically
* Fix typos
* Fix the ouput of get:Comment operation
* Fix getAll:Comment & getAll:Thread operations outputs
* 🐛 Add missing scopes and remove not needed parameters
Co-authored-by: dali <servfrdali@yahoo.fr>
58 lines
1.2 KiB
TypeScript
58 lines
1.2 KiB
TypeScript
import {
|
|
ICredentialType,
|
|
NodePropertyTypes,
|
|
} from 'n8n-workflow';
|
|
|
|
const scopes = [
|
|
'attachments:write',
|
|
'channels:remove',
|
|
'comments:remove',
|
|
'messages:remove',
|
|
'threads:remove',
|
|
'workspaces:read',
|
|
];
|
|
|
|
export class TwistOAuth2Api implements ICredentialType {
|
|
name = 'twistOAuth2Api';
|
|
extends = [
|
|
'oAuth2Api',
|
|
];
|
|
displayName = 'Twist OAuth2 API';
|
|
documentationUrl = 'twist';
|
|
properties = [
|
|
{
|
|
displayName: 'Authorization URL',
|
|
name: 'authUrl',
|
|
type: 'hidden' as NodePropertyTypes,
|
|
default: 'https://twist.com/oauth/authorize',
|
|
required: true,
|
|
},
|
|
{
|
|
displayName: 'Access Token URL',
|
|
name: 'accessTokenUrl',
|
|
type: 'hidden' as NodePropertyTypes,
|
|
default: 'https://twist.com/oauth/access_token',
|
|
required: true,
|
|
},
|
|
{
|
|
displayName: 'Scope',
|
|
name: 'scope',
|
|
type: 'hidden' as NodePropertyTypes,
|
|
default: scopes.join(','),
|
|
},
|
|
{
|
|
displayName: 'Auth URI Query Parameters',
|
|
name: 'authQueryParameters',
|
|
type: 'hidden' as NodePropertyTypes,
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Authentication',
|
|
name: 'authentication',
|
|
type: 'hidden' as NodePropertyTypes,
|
|
default: 'body',
|
|
description: 'Resource to consume.',
|
|
},
|
|
];
|
|
}
|