n8n-nodes-supermachine 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/credentials/SupermachineApi.credentials.ts +41 -0
- package/dist/credentials/SupermachineApi.credentials.js +38 -0
- package/dist/credentials/SupermachineApi.credentials.js.map +1 -0
- package/dist/nodes/Supermachine/Supermachine.node.js +428 -0
- package/dist/nodes/Supermachine/Supermachine.node.js.map +1 -0
- package/dist/nodes/Supermachine/SupermachineTrigger.node.js +157 -0
- package/dist/nodes/Supermachine/SupermachineTrigger.node.js.map +1 -0
- package/dist/nodes/Supermachine/descriptions/AccountDescription.js +73 -0
- package/dist/nodes/Supermachine/descriptions/AccountDescription.js.map +1 -0
- package/dist/nodes/Supermachine/descriptions/ImageDescription.js +355 -0
- package/dist/nodes/Supermachine/descriptions/ImageDescription.js.map +1 -0
- package/dist/nodes/Supermachine/descriptions/ToolsDescription.js +241 -0
- package/dist/nodes/Supermachine/descriptions/ToolsDescription.js.map +1 -0
- package/dist/nodes/Supermachine/descriptions/index.js +21 -0
- package/dist/nodes/Supermachine/descriptions/index.js.map +1 -0
- package/dist/nodes/Supermachine/index.js +5 -0
- package/dist/nodes/Supermachine/index.js.map +1 -0
- package/dist/nodes/Supermachine/supermachine.svg +132 -0
- package/gulpfile.js +58 -0
- package/index.ts +5 -0
- package/nodes/Supermachine/Supermachine.node.ts +508 -0
- package/nodes/Supermachine/SupermachineTrigger.node.ts +175 -0
- package/nodes/Supermachine/descriptions/AccountDescription.ts +72 -0
- package/nodes/Supermachine/descriptions/ImageDescription.ts +355 -0
- package/nodes/Supermachine/descriptions/ToolsDescription.ts +241 -0
- package/nodes/Supermachine/descriptions/index.ts +3 -0
- package/nodes/Supermachine/index.ts +3 -0
- package/nodes/Supermachine/supermachine.svg +132 -0
- package/package.json +47 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SupermachineTrigger = void 0;
|
|
4
|
+
const crypto_1 = require("crypto");
|
|
5
|
+
class SupermachineTrigger {
|
|
6
|
+
description = {
|
|
7
|
+
displayName: 'Supermachine Trigger',
|
|
8
|
+
name: 'supermachineTrigger',
|
|
9
|
+
// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg
|
|
10
|
+
icon: 'file:supermachine.svg',
|
|
11
|
+
group: ['trigger'],
|
|
12
|
+
version: 1,
|
|
13
|
+
subtitle: '=Job Completed',
|
|
14
|
+
description: 'Starts the workflow when Supermachine job is completed',
|
|
15
|
+
defaults: {
|
|
16
|
+
name: 'Supermachine Trigger',
|
|
17
|
+
},
|
|
18
|
+
inputs: [],
|
|
19
|
+
outputs: ['main'],
|
|
20
|
+
credentials: [
|
|
21
|
+
{
|
|
22
|
+
name: 'supermachineApi',
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
webhooks: [
|
|
27
|
+
{
|
|
28
|
+
name: 'default',
|
|
29
|
+
httpMethod: 'POST',
|
|
30
|
+
responseMode: 'onReceived',
|
|
31
|
+
path: 'webhook',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
properties: [
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Event',
|
|
37
|
+
name: 'event',
|
|
38
|
+
type: 'options',
|
|
39
|
+
options: [
|
|
40
|
+
{
|
|
41
|
+
name: 'Job Completed',
|
|
42
|
+
value: 'job.completed',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'Job Failed',
|
|
46
|
+
value: 'job.failed',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
default: 'job.completed',
|
|
50
|
+
required: true,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
};
|
|
54
|
+
methods = {
|
|
55
|
+
loadOptions: {
|
|
56
|
+
async getEvents() {
|
|
57
|
+
return [
|
|
58
|
+
{
|
|
59
|
+
name: 'Job Completed',
|
|
60
|
+
value: 'job.completed',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'Job Failed',
|
|
64
|
+
value: 'job.failed',
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
webhookMethods = {
|
|
71
|
+
default: {
|
|
72
|
+
async checkExists() {
|
|
73
|
+
// Webhook must be configured manually in Supermachine dashboard
|
|
74
|
+
// This returns true to indicate webhook is ready to receive
|
|
75
|
+
return true;
|
|
76
|
+
},
|
|
77
|
+
async create() {
|
|
78
|
+
const webhookUrl = this.getNodeWebhookUrl('default');
|
|
79
|
+
// Store webhook URL for user to configure manually
|
|
80
|
+
const staticData = this.getWorkflowStaticData('node');
|
|
81
|
+
staticData.webhookUrl = webhookUrl;
|
|
82
|
+
// Note: If Supermachine API supports webhook registration, implement here
|
|
83
|
+
// Example:
|
|
84
|
+
// const credentials = await this.getCredentials('supermachineApi');
|
|
85
|
+
// await this.helpers.requestWithAuthentication.call(this, 'supermachineApi', {
|
|
86
|
+
// method: 'POST',
|
|
87
|
+
// url: 'https://dev.supermachine.art/v1/webhooks',
|
|
88
|
+
// body: { url: webhookUrl, events: ['job.completed'] }
|
|
89
|
+
// });
|
|
90
|
+
return true;
|
|
91
|
+
},
|
|
92
|
+
async delete() {
|
|
93
|
+
// Implement webhook deletion if API supports
|
|
94
|
+
return true;
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
async webhook() {
|
|
99
|
+
const bodyData = this.getBodyData();
|
|
100
|
+
const headers = this.getHeaderData();
|
|
101
|
+
// Verify webhook signature if Supermachine sends signature
|
|
102
|
+
const signature = headers['x-supermachine-signature'];
|
|
103
|
+
if (signature && typeof signature === 'string') {
|
|
104
|
+
try {
|
|
105
|
+
const credentials = await this.getCredentials('supermachineApi');
|
|
106
|
+
const apiKey = credentials.apiKey;
|
|
107
|
+
// Get raw body for signature verification
|
|
108
|
+
const req = this.getRequestObject();
|
|
109
|
+
const rawBody = req.rawBody || JSON.stringify(bodyData);
|
|
110
|
+
const hmac = (0, crypto_1.createHmac)('sha256', apiKey);
|
|
111
|
+
hmac.update(rawBody);
|
|
112
|
+
const calculatedSig = 'sha256=' + hmac.digest('hex');
|
|
113
|
+
// Safe comparison to prevent timing attacks
|
|
114
|
+
if (signature.length !== calculatedSig.length ||
|
|
115
|
+
!(0, crypto_1.timingSafeEqual)(Buffer.from(signature), Buffer.from(calculatedSig))) {
|
|
116
|
+
throw new Error('Invalid webhook signature');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
const err = error;
|
|
121
|
+
throw new Error(`Signature verification failed: ${err.message}`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// Parse response from Supermachine
|
|
125
|
+
let imageUrl = '';
|
|
126
|
+
if (bodyData.imageUrl && typeof bodyData.imageUrl === 'string') {
|
|
127
|
+
imageUrl = bodyData.imageUrl;
|
|
128
|
+
}
|
|
129
|
+
else if (bodyData.output && typeof bodyData.output === 'object') {
|
|
130
|
+
const output = bodyData.output;
|
|
131
|
+
if (output.imageUrl && typeof output.imageUrl === 'string') {
|
|
132
|
+
imageUrl = output.imageUrl;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const jobData = {
|
|
136
|
+
batchId: bodyData.batchId || bodyData.id,
|
|
137
|
+
status: bodyData.status,
|
|
138
|
+
imageUrl,
|
|
139
|
+
model: bodyData.model,
|
|
140
|
+
prompt: bodyData.prompt,
|
|
141
|
+
creditsUsed: bodyData.creditsUsed,
|
|
142
|
+
timestamp: new Date().toISOString(),
|
|
143
|
+
};
|
|
144
|
+
return {
|
|
145
|
+
workflowData: [
|
|
146
|
+
[
|
|
147
|
+
{
|
|
148
|
+
json: jobData,
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
],
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
exports.SupermachineTrigger = SupermachineTrigger;
|
|
156
|
+
|
|
157
|
+
//# sourceMappingURL=SupermachineTrigger.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../nodes/Supermachine/SupermachineTrigger.node.ts"],"names":[],"mappings":";;;AAWA,mCAAqD;AAErD,MAAa,mBAAmB;IAC9B,WAAW,GAAyB;QAClC,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE,qBAAqB;QAC3B,8EAA8E;QAC9E,IAAI,EAAE,uBAAuB;QAC7B,KAAK,EAAE,CAAC,SAAS,CAAC;QAClB,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,gBAAgB;QAC1B,WAAW,EAAE,wDAAwD;QACrE,QAAQ,EAAE;YACR,IAAI,EAAE,sBAAsB;SAC7B;QACD,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC,MAAM,CAAC;QACjB,WAAW,EAAE;YACX;gBACE,IAAI,EAAE,iBAAiB;gBACvB,QAAQ,EAAE,IAAI;aACf;SACF;QACD,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,UAAU,EAAE,MAAM;gBAClB,YAAY,EAAE,YAAY;gBAC1B,IAAI,EAAE,SAAS;aAChB;SACF;QACD,UAAU,EAAE;YACV;gBACE,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,eAAe;wBACrB,KAAK,EAAE,eAAe;qBACvB;oBACD;wBACE,IAAI,EAAE,YAAY;wBAClB,KAAK,EAAE,YAAY;qBACpB;iBACF;gBACD,OAAO,EAAE,eAAe;gBACxB,QAAQ,EAAE,IAAI;aACf;SACF;KACF,CAAC;IAEF,OAAO,GAAG;QACR,WAAW,EAAE;YACX,KAAK,CAAC,SAAS;gBACb,OAAO;oBACL;wBACE,IAAI,EAAE,eAAe;wBACrB,KAAK,EAAE,eAAe;qBACvB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O,EAAE,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,EAAE;YACxC,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,QAAQ;YACR,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACpC,CAAC;QAEF,OAAO;YACL,YAAY,EAAE;gBACZ;oBACE;wBACE,IAAI,EAAE,OAAO;qBACd;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF;AAjKD,kDAiKC","file":"SupermachineTrigger.node.js"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAccountFields = exports.getAccountOperations = void 0;
|
|
4
|
+
exports.getAccountOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['account'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Get Profile',
|
|
18
|
+
value: 'getProfile',
|
|
19
|
+
description: 'Lấy thông tin tài khoản và credit còn lại',
|
|
20
|
+
action: 'Get account profile',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'List Models',
|
|
24
|
+
value: 'listModels',
|
|
25
|
+
description: 'Liệt kê tất cả models có sẵn',
|
|
26
|
+
action: 'List available models',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Get Model Categories',
|
|
30
|
+
value: 'listModelCategories',
|
|
31
|
+
description: 'Lấy danh mục models',
|
|
32
|
+
action: 'List model categories',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
default: 'getProfile',
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
exports.getAccountFields = [
|
|
39
|
+
// Get Profile - không cần fields
|
|
40
|
+
{
|
|
41
|
+
displayName: 'Return All',
|
|
42
|
+
name: 'returnAll',
|
|
43
|
+
type: 'boolean',
|
|
44
|
+
displayOptions: {
|
|
45
|
+
show: {
|
|
46
|
+
resource: ['account'],
|
|
47
|
+
operation: ['listModels', 'listModelCategories'],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
default: false,
|
|
51
|
+
description: 'Trả về tất cả kết quả hay chỉ giới hạn',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
displayName: 'Limit',
|
|
55
|
+
name: 'limit',
|
|
56
|
+
type: 'number',
|
|
57
|
+
typeOptions: {
|
|
58
|
+
minValue: 1,
|
|
59
|
+
maxValue: 100,
|
|
60
|
+
},
|
|
61
|
+
displayOptions: {
|
|
62
|
+
show: {
|
|
63
|
+
resource: ['account'],
|
|
64
|
+
operation: ['listModels', 'listModelCategories'],
|
|
65
|
+
returnAll: [false],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
default: 20,
|
|
69
|
+
description: 'Số lượng items trả về mỗi trang',
|
|
70
|
+
},
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=AccountDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../nodes/Supermachine/descriptions/AccountDescription.ts"],"names":[],"mappings":";;;AAGa,QAAA,oBAAoB,GAAsB;IACrD;QACE,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,SAAS,CAAC;aACtB;SACF;QACD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,2CAA2C;gBACxD,MAAM,EAAE,qBAAqB;aAC9B;YACD;gBACE,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,8BAA8B;gBAC3C,MAAM,EAAE,uBAAuB;aAChC;YACD;gBACE,IAAI,EAAE,sBAAsB;gBAC5B,KAAK,EAAE,qBAAqB;gBAC5B,WAAW,EAAE,qBAAqB;gBAClC,MAAM,EAAE,uBAAuB;aAChC;SACF;QACD,OAAO,EAAE,YAAY;KACtB;CACF,CAAC;AAEW,QAAA,gBAAgB,GAAsB;IACjD,iCAAiC;IACjC;QACE,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,YAAY,EAAE,qBAAqB,CAAC;aACjD;SACF;QACD,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,wCAAwC;KACtD;IACD;QACE,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACX,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,GAAG;SACd;QACD,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,YAAY,EAAE,qBAAqB,CAAC;gBAChD,SAAS,EAAE,CAAC,KAAK,CAAC;aACnB;SACF;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iCAAiC;KAC/C;CACF,CAAC","file":"AccountDescription.js"}
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getImageFields = exports.getImageOperations = void 0;
|
|
4
|
+
exports.getImageOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['image'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Generate an Image',
|
|
18
|
+
value: 'generate',
|
|
19
|
+
description: 'Tạo ảnh mới từ text prompt',
|
|
20
|
+
action: 'Generate an image',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Get Image Job Status',
|
|
24
|
+
value: 'getStatus',
|
|
25
|
+
description: 'Lấy status và kết quả job theo batchId',
|
|
26
|
+
action: 'Get image job status',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'List Generated Images',
|
|
30
|
+
value: 'listImages',
|
|
31
|
+
description: 'Liệt kê tất cả ảnh theo batchId',
|
|
32
|
+
action: 'List generated images',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
default: 'generate',
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
exports.getImageFields = [
|
|
39
|
+
// ═══════════════════════════════════════════════════════════
|
|
40
|
+
// GENERATE OPERATION
|
|
41
|
+
// ═══════════════════════════════════════════════════════════
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Model Name or ID',
|
|
44
|
+
name: 'model',
|
|
45
|
+
type: 'options',
|
|
46
|
+
typeOptions: {
|
|
47
|
+
loadOptionsMethod: 'getModels',
|
|
48
|
+
},
|
|
49
|
+
displayOptions: {
|
|
50
|
+
show: {
|
|
51
|
+
resource: ['image'],
|
|
52
|
+
operation: ['generate'],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
default: '',
|
|
56
|
+
description: 'Model AI dùng để generate ảnh. Chọn từ danh sách. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
|
57
|
+
required: true,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
displayName: 'Prompt',
|
|
61
|
+
name: 'prompt',
|
|
62
|
+
type: 'string',
|
|
63
|
+
typeOptions: {
|
|
64
|
+
rows: 4,
|
|
65
|
+
},
|
|
66
|
+
displayOptions: {
|
|
67
|
+
show: {
|
|
68
|
+
resource: ['image'],
|
|
69
|
+
operation: ['generate'],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
default: '',
|
|
73
|
+
placeholder: 'A beautiful sunset over mountains, photorealistic, 8k',
|
|
74
|
+
description: 'Mô tả ảnh muốn tạo (bằng tiếng Anh cho kết quả tốt nhất)',
|
|
75
|
+
required: true,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
displayName: 'Width',
|
|
79
|
+
name: 'width',
|
|
80
|
+
type: 'number',
|
|
81
|
+
typeOptions: {
|
|
82
|
+
minValue: 256,
|
|
83
|
+
maxValue: 2048,
|
|
84
|
+
},
|
|
85
|
+
displayOptions: {
|
|
86
|
+
show: {
|
|
87
|
+
resource: ['image'],
|
|
88
|
+
operation: ['generate'],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
default: 1024,
|
|
92
|
+
description: 'Chiều rộng ảnh tính bằng pixels (256-2048)',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
displayName: 'Height',
|
|
96
|
+
name: 'height',
|
|
97
|
+
type: 'number',
|
|
98
|
+
typeOptions: {
|
|
99
|
+
minValue: 256,
|
|
100
|
+
maxValue: 2048,
|
|
101
|
+
},
|
|
102
|
+
displayOptions: {
|
|
103
|
+
show: {
|
|
104
|
+
resource: ['image'],
|
|
105
|
+
operation: ['generate'],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
default: 768,
|
|
109
|
+
description: 'Chiều cao ảnh tính bằng pixels (256-2048)',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
displayName: 'Additional Fields',
|
|
113
|
+
name: 'additionalFields',
|
|
114
|
+
type: 'collection',
|
|
115
|
+
placeholder: 'Add Field',
|
|
116
|
+
default: {},
|
|
117
|
+
displayOptions: {
|
|
118
|
+
show: {
|
|
119
|
+
resource: ['image'],
|
|
120
|
+
operation: ['generate'],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
options: [
|
|
124
|
+
{
|
|
125
|
+
displayName: 'Negative Prompt',
|
|
126
|
+
name: 'negativePrompt',
|
|
127
|
+
type: 'string',
|
|
128
|
+
typeOptions: { rows: 2 },
|
|
129
|
+
default: '',
|
|
130
|
+
placeholder: 'blurry, low quality, distorted',
|
|
131
|
+
description: 'Những gì KHÔNG muốn xuất hiện trong ảnh',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
displayName: 'Number of Results',
|
|
135
|
+
name: 'numberResults',
|
|
136
|
+
type: 'number',
|
|
137
|
+
typeOptions: { minValue: 1, maxValue: 4 },
|
|
138
|
+
default: 1,
|
|
139
|
+
description: 'Số ảnh tạo cùng lúc (1-4). Mỗi ảnh tốn 1 credit.',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
displayName: 'Output Format',
|
|
143
|
+
name: 'outputFormat',
|
|
144
|
+
type: 'options',
|
|
145
|
+
options: [
|
|
146
|
+
{ name: 'PNG', value: 'PNG' },
|
|
147
|
+
{ name: 'WEBP', value: 'WEBP' },
|
|
148
|
+
{ name: 'JPEG', value: 'JPEG' },
|
|
149
|
+
],
|
|
150
|
+
default: 'PNG',
|
|
151
|
+
description: 'Định dạng file ảnh đầu ra',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
displayName: 'Seed',
|
|
155
|
+
name: 'seed',
|
|
156
|
+
type: 'number',
|
|
157
|
+
typeOptions: { minValue: 0, maxValue: 2147483647 },
|
|
158
|
+
default: 0,
|
|
159
|
+
description: 'Seed cố định để tái tạo kết quả giống nhau (0 = random)',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
displayName: 'Steps',
|
|
163
|
+
name: 'steps',
|
|
164
|
+
type: 'number',
|
|
165
|
+
typeOptions: { minValue: 1, maxValue: 80 },
|
|
166
|
+
default: 30,
|
|
167
|
+
description: 'Số bước inference. Nhiều hơn = chất lượng cao hơn nhưng chậm hơn (20-50 recommended).',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
displayName: 'CFG Scale',
|
|
171
|
+
name: 'cfgScale',
|
|
172
|
+
type: 'number',
|
|
173
|
+
typeOptions: {
|
|
174
|
+
minValue: 1,
|
|
175
|
+
maxValue: 20,
|
|
176
|
+
numberPrecision: 1,
|
|
177
|
+
},
|
|
178
|
+
default: 7,
|
|
179
|
+
description: 'Độ tuân thủ prompt. Cao hơn = tuân thủ strict hơn (7-9 recommended).',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
displayName: 'LoRAs',
|
|
183
|
+
name: 'loras',
|
|
184
|
+
type: 'fixedCollection',
|
|
185
|
+
typeOptions: {
|
|
186
|
+
multipleValues: true,
|
|
187
|
+
},
|
|
188
|
+
default: {},
|
|
189
|
+
description: 'Thêm LoRA để điều chỉnh style. ⚠️ Phải chọn Model trước!',
|
|
190
|
+
options: [
|
|
191
|
+
{
|
|
192
|
+
name: 'loraValues',
|
|
193
|
+
displayName: 'LoRA',
|
|
194
|
+
values: [
|
|
195
|
+
{
|
|
196
|
+
displayName: 'LoRA Name or ID',
|
|
197
|
+
name: 'loraId',
|
|
198
|
+
type: 'options',
|
|
199
|
+
typeOptions: {
|
|
200
|
+
loadOptionsMethod: 'getLoras',
|
|
201
|
+
loadOptionsDependsOn: ['model'],
|
|
202
|
+
},
|
|
203
|
+
default: '',
|
|
204
|
+
description: 'Chọn LoRA. Dropdown sẽ load sau khi chọn Model. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
displayName: 'Strength',
|
|
208
|
+
name: 'strength',
|
|
209
|
+
type: 'number',
|
|
210
|
+
typeOptions: {
|
|
211
|
+
minValue: 0,
|
|
212
|
+
maxValue: 2,
|
|
213
|
+
numberPrecision: 1,
|
|
214
|
+
},
|
|
215
|
+
default: 1,
|
|
216
|
+
description: 'Độ mạnh của LoRA (0-2). Default: 1.0',
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
displayName: 'Character Category',
|
|
224
|
+
name: 'characterCategory',
|
|
225
|
+
type: 'options',
|
|
226
|
+
typeOptions: {
|
|
227
|
+
loadOptionsMethod: 'getCharacterCategories',
|
|
228
|
+
},
|
|
229
|
+
default: '',
|
|
230
|
+
description: 'Chọn category để filter characters (Female, Male, Young Adult, Middle Aged). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
displayName: 'Character',
|
|
234
|
+
name: 'characterId',
|
|
235
|
+
type: 'options',
|
|
236
|
+
typeOptions: {
|
|
237
|
+
loadOptionsMethod: 'getCharacters',
|
|
238
|
+
loadOptionsDependsOn: ['model', 'characterCategory'],
|
|
239
|
+
},
|
|
240
|
+
displayOptions: {
|
|
241
|
+
show: {
|
|
242
|
+
characterCategory: ['3', '4', '5', '6'],
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
default: '',
|
|
246
|
+
description: 'Chọn character. ⚠️ Phải chọn Model và Category trước! Embed code sẽ hiện trong description. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
displayName: 'Image to Image',
|
|
250
|
+
name: 'img2img',
|
|
251
|
+
type: 'fixedCollection',
|
|
252
|
+
default: {},
|
|
253
|
+
description: 'Dùng ảnh có sẵn làm base để generate',
|
|
254
|
+
options: [
|
|
255
|
+
{
|
|
256
|
+
name: 'img2imgValues',
|
|
257
|
+
displayName: 'Image to Image Settings',
|
|
258
|
+
values: [
|
|
259
|
+
{
|
|
260
|
+
displayName: 'Source Image URL',
|
|
261
|
+
name: 'sourceImageUrl',
|
|
262
|
+
type: 'string',
|
|
263
|
+
default: '',
|
|
264
|
+
placeholder: 'https://example.com/image.png',
|
|
265
|
+
description: 'URL của ảnh gốc dùng làm base',
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
displayName: 'Denoising Strength',
|
|
269
|
+
name: 'denoisingStrength',
|
|
270
|
+
type: 'number',
|
|
271
|
+
typeOptions: {
|
|
272
|
+
minValue: 0,
|
|
273
|
+
maxValue: 1,
|
|
274
|
+
numberPrecision: 2,
|
|
275
|
+
},
|
|
276
|
+
default: 0.75,
|
|
277
|
+
description: 'Mức độ thay đổi so với ảnh gốc (0=giữ nguyên, 1=thay đổi hoàn toàn)',
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
displayName: 'Callback URL',
|
|
285
|
+
name: 'callbackUrl',
|
|
286
|
+
type: 'string',
|
|
287
|
+
default: '',
|
|
288
|
+
placeholder: 'https://your-n8n.com/webhook/supermachine-callback',
|
|
289
|
+
description: 'Webhook URL để nhận kết quả async. Copy URL từ Supermachine Trigger node.',
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
},
|
|
293
|
+
// ═══════════════════════════════════════════════════════════
|
|
294
|
+
// GET STATUS & LIST IMAGES OPERATIONS
|
|
295
|
+
// ═══════════════════════════════════════════════════════════
|
|
296
|
+
{
|
|
297
|
+
displayName: 'Batch ID',
|
|
298
|
+
name: 'batchId',
|
|
299
|
+
type: 'string',
|
|
300
|
+
displayOptions: {
|
|
301
|
+
show: {
|
|
302
|
+
resource: ['image'],
|
|
303
|
+
operation: ['getStatus', 'listImages'],
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
default: '',
|
|
307
|
+
placeholder: '1994761',
|
|
308
|
+
description: 'batchId nhận được từ Generate operation response',
|
|
309
|
+
required: true,
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
displayName: 'Return All',
|
|
313
|
+
name: 'returnAll',
|
|
314
|
+
type: 'boolean',
|
|
315
|
+
displayOptions: {
|
|
316
|
+
show: {
|
|
317
|
+
resource: ['image'],
|
|
318
|
+
operation: ['listImages'],
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
default: false,
|
|
322
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
displayName: 'Limit',
|
|
326
|
+
name: 'limit',
|
|
327
|
+
type: 'number',
|
|
328
|
+
typeOptions: { minValue: 1, maxValue: 100 },
|
|
329
|
+
displayOptions: {
|
|
330
|
+
show: {
|
|
331
|
+
resource: ['image'],
|
|
332
|
+
operation: ['listImages'],
|
|
333
|
+
returnAll: [false],
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
default: 20,
|
|
337
|
+
description: 'Max number of results to return',
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
displayName: 'Page',
|
|
341
|
+
name: 'page',
|
|
342
|
+
type: 'number',
|
|
343
|
+
typeOptions: { minValue: 1 },
|
|
344
|
+
displayOptions: {
|
|
345
|
+
show: {
|
|
346
|
+
resource: ['image'],
|
|
347
|
+
operation: ['listImages'],
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
default: 1,
|
|
351
|
+
description: 'Số trang để fetch (bắt đầu từ 1)',
|
|
352
|
+
},
|
|
353
|
+
];
|
|
354
|
+
|
|
355
|
+
//# sourceMappingURL=ImageDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../nodes/Supermachine/descriptions/ImageDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAsB;IACnD;QACE,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;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