mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-11-13 03:27:29 -06:00
S4DSAuth node added. Some other nodes deleted
This commit is contained in:
parent
21f7bc4eae
commit
392231e695
16 changed files with 4910 additions and 222 deletions
|
|
@ -1,59 +0,0 @@
|
|||
import {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class ExampleCredentialsApi implements ICredentialType {
|
||||
name = 'exampleCredentialsApi';
|
||||
displayName = 'Example Credentials API';
|
||||
|
||||
documentationUrl = 'https://your-docs-url';
|
||||
|
||||
properties: INodeProperties[] = [
|
||||
// The credentials to get from user and save encrypted.
|
||||
// Properties can be defined exactly in the same way
|
||||
// as node properties.
|
||||
{
|
||||
displayName: 'User Name',
|
||||
name: 'username',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Password',
|
||||
name: 'password',
|
||||
type: 'string',
|
||||
typeOptions: {
|
||||
password: true,
|
||||
},
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
|
||||
// This credential is currently not used by any node directly
|
||||
// but the HTTP Request node can use it to make requests.
|
||||
// The credential is also testable due to the `test` property below
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
auth: {
|
||||
username: '={{ $credentials.username }}',
|
||||
password: '={{ $credentials.password }}',
|
||||
},
|
||||
qs: {
|
||||
// Send this as part of the query string
|
||||
n8n: 'rocks',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
// The block below tells how this credential can be tested
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: 'https://example.com/',
|
||||
url: '',
|
||||
},
|
||||
};
|
||||
}
|
||||
100
credentials/S4DSApi.credentials.ts
Normal file
100
credentials/S4DSApi.credentials.ts
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
import {
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class S4DSApi implements ICredentialType {
|
||||
name = 's4dsApi';
|
||||
displayName = 'S4DS API';
|
||||
documentationUrl = 'https://docs.n8n.io/integrations/builtin/credentials/s4ds/';
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Base URL',
|
||||
name: 'baseUrl',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Demo Test',
|
||||
value: 'https://demotest.s4ds.com/demoapi-test',
|
||||
},
|
||||
{
|
||||
name: 'Demo UAT',
|
||||
value: 'https://demouat.s4ds.com/demoapi-uat',
|
||||
},
|
||||
{
|
||||
name: 'Demo Production',
|
||||
value: 'https://demoprod.s4ds.com/demoapi-prod',
|
||||
},
|
||||
{
|
||||
name: 'Cliente 1 Test',
|
||||
value: 'https://cliente1test.s4ds.com/cliente1api-test',
|
||||
},
|
||||
{
|
||||
name: 'Cliente 1 UAT',
|
||||
value: 'https://cliente1uat.s4ds.com/cliente1api-uat',
|
||||
},
|
||||
{
|
||||
name: 'Cliente 1 Production',
|
||||
value: 'https://cliente1prod.s4ds.com/cliente1api-prod',
|
||||
},
|
||||
{
|
||||
name: 'Cliente 2 Test',
|
||||
value: 'https://cliente2test.s4ds.com/cliente2api-test',
|
||||
},
|
||||
{
|
||||
name: 'Cliente 2 UAT',
|
||||
value: 'https://cliente2uat.s4ds.com/cliente2api-uat',
|
||||
},
|
||||
{
|
||||
name: 'Cliente 2 Production',
|
||||
value: 'https://cliente2prod.s4ds.com/cliente2api-prod',
|
||||
},
|
||||
{
|
||||
name: 'Custom URL',
|
||||
value: 'custom',
|
||||
},
|
||||
],
|
||||
default: 'https://demotest.s4ds.com/demoapi-test',
|
||||
description: 'Select the S4DS environment and client',
|
||||
},
|
||||
{
|
||||
displayName: 'Custom Base URL',
|
||||
name: 'customBaseUrl',
|
||||
type: 'string',
|
||||
default: '',
|
||||
placeholder: 'https://your-custom-domain.s4ds.com/yourapi',
|
||||
description: 'Custom base URL for S4DS API',
|
||||
displayOptions: {
|
||||
show: {
|
||||
baseUrl: ['custom'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Username',
|
||||
name: 'username',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
description: 'Username for S4DS authentication',
|
||||
},
|
||||
{
|
||||
displayName: 'Password',
|
||||
name: 'password',
|
||||
type: 'string',
|
||||
typeOptions: {
|
||||
password: true,
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
description: 'Password for S4DS authentication',
|
||||
},
|
||||
{
|
||||
displayName: 'Timeout',
|
||||
name: 'timeout',
|
||||
type: 'number',
|
||||
default: 30000,
|
||||
description: 'Request timeout in milliseconds',
|
||||
},
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue