mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-11-03 07:32:25 -06:00
Jules was unable to complete the task in time. Please review the work done so far and provide feedback for Jules to continue.
This commit is contained in:
parent
e1c2f2e46b
commit
b17810e962
5 changed files with 414 additions and 50 deletions
|
|
@ -0,0 +1,184 @@
|
|||
// interfaces/SunoTypes.ts
|
||||
|
||||
/**
|
||||
* Represents the authentication response from the Suno API.
|
||||
*/
|
||||
export interface SunoAuthResponse {
|
||||
/**
|
||||
* The session token or JWT.
|
||||
* @type {string}
|
||||
*/
|
||||
token?: string;
|
||||
|
||||
/**
|
||||
* Session cookie, if authentication is cookie-based.
|
||||
* @type {string}
|
||||
*/
|
||||
cookie?: string;
|
||||
|
||||
/**
|
||||
* The user ID, if provided by the authentication response.
|
||||
* @type {string}
|
||||
*/
|
||||
userId?: string;
|
||||
|
||||
/**
|
||||
* Error message, if authentication failed.
|
||||
* @type {string}
|
||||
*/
|
||||
error?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a job submitted to the Suno API, typically for song generation.
|
||||
*/
|
||||
export interface SunoJob {
|
||||
/**
|
||||
* Unique identifier for the job.
|
||||
* @type {string}
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* Current status of the job.
|
||||
* @type {'queued' | 'processing' | 'generating' | 'complete' | 'failed'}
|
||||
*/
|
||||
status: 'queued' | 'processing' | 'generating' | 'complete' | 'failed';
|
||||
|
||||
/**
|
||||
* Identifier of the track that is/will be generated by this job.
|
||||
* Available when the job status is 'complete'.
|
||||
* @type {string}
|
||||
*/
|
||||
trackId?: string;
|
||||
|
||||
/**
|
||||
* Error message if the job failed.
|
||||
* @type {string}
|
||||
*/
|
||||
error?: string;
|
||||
|
||||
/**
|
||||
* Timestamp of when the job was created (ISO date string).
|
||||
* @type {string}
|
||||
*/
|
||||
createdAt: string;
|
||||
|
||||
/**
|
||||
* Progress of the job, typically a percentage (0-100).
|
||||
* @type {number}
|
||||
*/
|
||||
progress?: number;
|
||||
|
||||
/**
|
||||
* Any additional metadata associated with the job.
|
||||
* @type {Record<string, any>}
|
||||
*/
|
||||
metadata?: Record<string, any>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a music track generated by or stored in Suno AI.
|
||||
*/
|
||||
export interface SunoTrack {
|
||||
/**
|
||||
* Unique identifier for the track.
|
||||
* @type {string}
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* Title of the track.
|
||||
* @type {string}
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* Artist name associated with the track.
|
||||
* @type {string}
|
||||
*/
|
||||
artist?: string;
|
||||
|
||||
/**
|
||||
* URL to the cover art or image associated with the track.
|
||||
* @type {string}
|
||||
*/
|
||||
imageUrl?: string;
|
||||
|
||||
/**
|
||||
* URL to the playable audio file or a preview.
|
||||
* @type {string}
|
||||
*/
|
||||
audioUrl?: string;
|
||||
|
||||
/**
|
||||
* Duration of the track in seconds.
|
||||
* @type {number}
|
||||
*/
|
||||
duration?: number;
|
||||
|
||||
/**
|
||||
* Current status of the track (distinct from job status, e.g., availability).
|
||||
* @type {'queued' | 'generating' | 'complete' | 'failed' | 'available'}
|
||||
*/
|
||||
status: 'queued' | 'generating' | 'complete' | 'failed' | 'available'; // Added 'available'
|
||||
|
||||
/**
|
||||
* Timestamp of when the track was created or made available (ISO date string).
|
||||
* @type {string}
|
||||
*/
|
||||
createdAt?: string;
|
||||
|
||||
/**
|
||||
* Indicates if the track is public or private.
|
||||
* @type {boolean}
|
||||
*/
|
||||
isPublic?: boolean;
|
||||
|
||||
/**
|
||||
* Any additional metadata associated with the track.
|
||||
* @type {Record<string, any>}
|
||||
*/
|
||||
metadata?: Record<string, any>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for submitting a prompt to generate music.
|
||||
*/
|
||||
export interface SunoPromptOptions {
|
||||
/**
|
||||
* Desired musical style (e.g., 'pop', 'orchestral', 'jazz').
|
||||
* @type {string}
|
||||
*/
|
||||
style?: string;
|
||||
|
||||
/**
|
||||
* Desired mood for the music (e.g., 'happy', 'epic', 'chill').
|
||||
* @type {string}
|
||||
*/
|
||||
mood?: string;
|
||||
|
||||
/**
|
||||
* Whether the generated track should be instrumental.
|
||||
* @type {boolean}
|
||||
*/
|
||||
instrumental?: boolean;
|
||||
|
||||
/**
|
||||
* Flag for advanced 'custom mode' features, if available.
|
||||
* @type {boolean}
|
||||
*/
|
||||
custom?: boolean;
|
||||
|
||||
/**
|
||||
* ID of a reference track for voice or style transfer.
|
||||
* @type {string}
|
||||
*/
|
||||
referenceTrackId?: string;
|
||||
|
||||
/**
|
||||
* ID of a predefined voice to use for generation.
|
||||
* @type {string}
|
||||
*/
|
||||
voiceId?: string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue