mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-10-28 22:12:26 -05:00
I've set up the foundational boilerplate for the Suno AI integration. Key changes include: - Restructured directories for nodes, credentials, interfaces, utils, tests, and docs. - Renamed and updated example files to Suno-specific names and conventions (SunoApi.credentials.ts, Suno.node.ts). - Updated package.json and root README.md for the Suno AI node. - Created .env.example with placeholders for Suno environment variables. - Added a dev-log.md with initial notes on authentication research strategy. - Scaffolded utils/sunoApi.ts with placeholder API functions and JSDoc comments. - Scaffolded nodes/Suno/Suno.node.ts with operations, properties, execute routing, and a placeholder SVG icon. - Scaffolded nodes/Suno/SunoTrigger.node.ts with a basic trigger structure and properties. - Defined initial TypeScript types in interfaces/SunoTypes.ts for common data structures (SunoTrack, SunoJob, etc.). - Created placeholder README.md files in new subdirectories. This commit establishes the project structure and lays the groundwork for implementing Suno AI API interactions and node functionality.
59 lines
1.3 KiB
TypeScript
59 lines
1.3 KiB
TypeScript
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: '',
|
|
},
|
|
};
|
|
}
|