mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(SeaTable Node): Update node with new options (#11431)
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import moment from 'moment-timezone';
|
||||
import type { ICredentialType, INodeProperties, INodePropertyOptions } from 'n8n-workflow';
|
||||
import type {
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
INodePropertyOptions,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
// Get options for timezones
|
||||
const timezones: INodePropertyOptions[] = moment.tz
|
||||
@@ -40,7 +45,7 @@ export class SeaTableApi implements ICredentialType {
|
||||
name: 'domain',
|
||||
type: 'string',
|
||||
default: '',
|
||||
placeholder: 'https://www.mydomain.com',
|
||||
placeholder: 'https://seatable.example.com',
|
||||
displayOptions: {
|
||||
show: {
|
||||
environment: ['selfHosted'],
|
||||
@@ -51,6 +56,8 @@ export class SeaTableApi implements ICredentialType {
|
||||
displayName: 'API Token (of a Base)',
|
||||
name: 'token',
|
||||
type: 'string',
|
||||
description:
|
||||
'The API-Token of the SeaTable base you would like to use with n8n. n8n can only connect to one base at a time.',
|
||||
typeOptions: { password: true },
|
||||
default: '',
|
||||
},
|
||||
@@ -63,4 +70,14 @@ export class SeaTableApi implements ICredentialType {
|
||||
options: [...timezones],
|
||||
},
|
||||
];
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: '={{$credentials?.domain || "https://cloud.seatable.io" }}',
|
||||
url: '/api/v2.1/dtable/app-access-token/',
|
||||
headers: {
|
||||
Authorization: '={{"Token " + $credentials.token}}',
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user