n8n-nodes-piapi 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.
Files changed (94) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +41 -0
  3. package/dist/credentials/PiAPI.credentials.d.ts +8 -0
  4. package/dist/credentials/PiAPI.credentials.js +46 -0
  5. package/dist/credentials/PiAPI.credentials.js.map +1 -0
  6. package/dist/nodes/PiAPI/DreamMachine/DreamMachineExtendVideo.node.d.ts +5 -0
  7. package/dist/nodes/PiAPI/DreamMachine/DreamMachineExtendVideo.node.js +237 -0
  8. package/dist/nodes/PiAPI/DreamMachine/DreamMachineExtendVideo.node.js.map +1 -0
  9. package/dist/nodes/PiAPI/DreamMachine/DreamMachineImageToVideo.node.d.ts +5 -0
  10. package/dist/nodes/PiAPI/DreamMachine/DreamMachineImageToVideo.node.js +270 -0
  11. package/dist/nodes/PiAPI/DreamMachine/DreamMachineImageToVideo.node.js.map +1 -0
  12. package/dist/nodes/PiAPI/DreamMachine/DreamMachineTextToVideo.node.d.ts +5 -0
  13. package/dist/nodes/PiAPI/DreamMachine/DreamMachineTextToVideo.node.js +186 -0
  14. package/dist/nodes/PiAPI/DreamMachine/DreamMachineTextToVideo.node.js.map +1 -0
  15. package/dist/nodes/PiAPI/Flux/FluxImageToImage.node.d.ts +5 -0
  16. package/dist/nodes/PiAPI/Flux/FluxImageToImage.node.js +359 -0
  17. package/dist/nodes/PiAPI/Flux/FluxImageToImage.node.js.map +1 -0
  18. package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.d.ts +5 -0
  19. package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.js +398 -0
  20. package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.js.map +1 -0
  21. package/dist/nodes/PiAPI/Hailuo/HailuoImageToVideo.node.d.ts +5 -0
  22. package/dist/nodes/PiAPI/Hailuo/HailuoImageToVideo.node.js +190 -0
  23. package/dist/nodes/PiAPI/Hailuo/HailuoImageToVideo.node.js.map +1 -0
  24. package/dist/nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.d.ts +5 -0
  25. package/dist/nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.js +140 -0
  26. package/dist/nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.js.map +1 -0
  27. package/dist/nodes/PiAPI/Hailuo/HailuoTextToVideo.node.d.ts +5 -0
  28. package/dist/nodes/PiAPI/Hailuo/HailuoTextToVideo.node.js +150 -0
  29. package/dist/nodes/PiAPI/Hailuo/HailuoTextToVideo.node.js.map +1 -0
  30. package/dist/nodes/PiAPI/Hailuo/index.d.ts +4 -0
  31. package/dist/nodes/PiAPI/Hailuo/index.js +10 -0
  32. package/dist/nodes/PiAPI/Hailuo/index.js.map +1 -0
  33. package/dist/nodes/PiAPI/Hunyuan/HunyuanImageToVideo.node.d.ts +5 -0
  34. package/dist/nodes/PiAPI/Hunyuan/HunyuanImageToVideo.node.js +227 -0
  35. package/dist/nodes/PiAPI/Hunyuan/HunyuanImageToVideo.node.js.map +1 -0
  36. package/dist/nodes/PiAPI/Hunyuan/HunyuanTextToVideo.node.d.ts +5 -0
  37. package/dist/nodes/PiAPI/Hunyuan/HunyuanTextToVideo.node.js +142 -0
  38. package/dist/nodes/PiAPI/Hunyuan/HunyuanTextToVideo.node.js.map +1 -0
  39. package/dist/nodes/PiAPI/Hunyuan/index.d.ts +3 -0
  40. package/dist/nodes/PiAPI/Hunyuan/index.js +8 -0
  41. package/dist/nodes/PiAPI/Hunyuan/index.js.map +1 -0
  42. package/dist/nodes/PiAPI/Kling/KlingEffects.node.d.ts +5 -0
  43. package/dist/nodes/PiAPI/Kling/KlingEffects.node.js +175 -0
  44. package/dist/nodes/PiAPI/Kling/KlingEffects.node.js.map +1 -0
  45. package/dist/nodes/PiAPI/Kling/KlingImageToVideo.node.d.ts +5 -0
  46. package/dist/nodes/PiAPI/Kling/KlingImageToVideo.node.js +411 -0
  47. package/dist/nodes/PiAPI/Kling/KlingImageToVideo.node.js.map +1 -0
  48. package/dist/nodes/PiAPI/Kling/KlingLipSync.node.d.ts +13 -0
  49. package/dist/nodes/PiAPI/Kling/KlingLipSync.node.js +276 -0
  50. package/dist/nodes/PiAPI/Kling/KlingLipSync.node.js.map +1 -0
  51. package/dist/nodes/PiAPI/Kling/KlingTextToVideo.node.d.ts +5 -0
  52. package/dist/nodes/PiAPI/Kling/KlingTextToVideo.node.js +206 -0
  53. package/dist/nodes/PiAPI/Kling/KlingTextToVideo.node.js.map +1 -0
  54. package/dist/nodes/PiAPI/Kling/KlingTryOn.node.d.ts +5 -0
  55. package/dist/nodes/PiAPI/Kling/KlingTryOn.node.js +426 -0
  56. package/dist/nodes/PiAPI/Kling/KlingTryOn.node.js.map +1 -0
  57. package/dist/nodes/PiAPI/Kling/KlingVideoExtend.node.d.ts +5 -0
  58. package/dist/nodes/PiAPI/Kling/KlingVideoExtend.node.js +93 -0
  59. package/dist/nodes/PiAPI/Kling/KlingVideoExtend.node.js.map +1 -0
  60. package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.d.ts +5 -0
  61. package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.js +242 -0
  62. package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.js.map +1 -0
  63. package/dist/nodes/PiAPI/Skyreels/index.d.ts +2 -0
  64. package/dist/nodes/PiAPI/Skyreels/index.js +6 -0
  65. package/dist/nodes/PiAPI/Skyreels/index.js.map +1 -0
  66. package/dist/nodes/PiAPI/TaskStatus/PiAPITaskStatus.node.d.ts +5 -0
  67. package/dist/nodes/PiAPI/TaskStatus/PiAPITaskStatus.node.js +125 -0
  68. package/dist/nodes/PiAPI/TaskStatus/PiAPITaskStatus.node.js.map +1 -0
  69. package/dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.d.ts +5 -0
  70. package/dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.js +262 -0
  71. package/dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.js.map +1 -0
  72. package/dist/nodes/PiAPI/Trellis/index.d.ts +2 -0
  73. package/dist/nodes/PiAPI/Trellis/index.js +6 -0
  74. package/dist/nodes/PiAPI/Trellis/index.js.map +1 -0
  75. package/dist/nodes/PiAPI/WanX/WanXImageToVideo.node.d.ts +5 -0
  76. package/dist/nodes/PiAPI/WanX/WanXImageToVideo.node.js +227 -0
  77. package/dist/nodes/PiAPI/WanX/WanXImageToVideo.node.js.map +1 -0
  78. package/dist/nodes/PiAPI/WanX/WanXTextToVideo.node.d.ts +5 -0
  79. package/dist/nodes/PiAPI/WanX/WanXTextToVideo.node.js +129 -0
  80. package/dist/nodes/PiAPI/WanX/WanXTextToVideo.node.js.map +1 -0
  81. package/dist/nodes/PiAPI/piapi.svg +5 -0
  82. package/dist/nodes/PiAPI/shared/Constants.d.ts +30 -0
  83. package/dist/nodes/PiAPI/shared/Constants.js +262 -0
  84. package/dist/nodes/PiAPI/shared/Constants.js.map +1 -0
  85. package/dist/nodes/PiAPI/shared/GenericFunctions.d.ts +3 -0
  86. package/dist/nodes/PiAPI/shared/GenericFunctions.js +43 -0
  87. package/dist/nodes/PiAPI/shared/GenericFunctions.js.map +1 -0
  88. package/dist/nodes/PiAPI/shared/Interfaces.d.ts +102 -0
  89. package/dist/nodes/PiAPI/shared/Interfaces.js +3 -0
  90. package/dist/nodes/PiAPI/shared/Interfaces.js.map +1 -0
  91. package/dist/package.json +95 -0
  92. package/dist/tsconfig.tsbuildinfo +1 -0
  93. package/index.js +6 -0
  94. package/package.json +95 -0
@@ -0,0 +1,411 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KlingImageToVideo = void 0;
4
+ const GenericFunctions_1 = require("../shared/GenericFunctions");
5
+ class KlingImageToVideo {
6
+ constructor() {
7
+ this.description = {
8
+ displayName: 'PiAPI Kling Image to Video',
9
+ name: 'klingImageToVideo',
10
+ icon: 'file:../piapi.svg',
11
+ group: ['transform'],
12
+ version: 1,
13
+ description: 'Generate videos from images using PiAPI Kling',
14
+ defaults: {
15
+ name: 'Kling Image to Video',
16
+ },
17
+ inputs: ["main"],
18
+ outputs: ["main"],
19
+ credentials: [
20
+ {
21
+ name: 'piAPIApi',
22
+ required: true,
23
+ },
24
+ ],
25
+ properties: [
26
+ {
27
+ displayName: 'Image Source',
28
+ name: 'imageSource',
29
+ type: 'options',
30
+ options: [
31
+ {
32
+ name: 'URL',
33
+ value: 'url',
34
+ description: 'Load image from URL',
35
+ },
36
+ {
37
+ name: 'Binary Data',
38
+ value: 'binaryData',
39
+ description: 'Use image from binary field',
40
+ },
41
+ ],
42
+ default: 'url',
43
+ description: 'Where to get the image from',
44
+ },
45
+ {
46
+ displayName: 'Image URL',
47
+ name: 'imageUrl',
48
+ type: 'string',
49
+ default: '',
50
+ required: true,
51
+ displayOptions: {
52
+ show: {
53
+ imageSource: ['url'],
54
+ },
55
+ },
56
+ description: 'URL of the image to transform into a video',
57
+ },
58
+ {
59
+ displayName: 'Binary Property',
60
+ name: 'binaryPropertyName',
61
+ type: 'string',
62
+ default: 'data',
63
+ required: true,
64
+ displayOptions: {
65
+ show: {
66
+ imageSource: ['binaryData'],
67
+ },
68
+ },
69
+ description: 'Name of the binary property containing the image',
70
+ },
71
+ {
72
+ displayName: 'End Frame Image Source',
73
+ name: 'endFrameImageSource',
74
+ type: 'options',
75
+ options: [
76
+ {
77
+ name: 'None',
78
+ value: 'none',
79
+ description: 'Do not use an end frame image',
80
+ },
81
+ {
82
+ name: 'URL',
83
+ value: 'url',
84
+ description: 'Load end frame image from URL',
85
+ },
86
+ {
87
+ name: 'Binary Data',
88
+ value: 'binaryData',
89
+ description: 'Use end frame image from binary field',
90
+ },
91
+ ],
92
+ default: 'none',
93
+ description: 'Whether to use an end frame image',
94
+ },
95
+ {
96
+ displayName: 'End Frame Image URL',
97
+ name: 'endFrameImageUrl',
98
+ type: 'string',
99
+ default: '',
100
+ required: true,
101
+ displayOptions: {
102
+ show: {
103
+ endFrameImageSource: ['url'],
104
+ },
105
+ },
106
+ description: 'URL of the end frame image',
107
+ },
108
+ {
109
+ displayName: 'End Frame Binary Property',
110
+ name: 'endFrameBinaryPropertyName',
111
+ type: 'string',
112
+ default: 'endFrame',
113
+ required: true,
114
+ displayOptions: {
115
+ show: {
116
+ endFrameImageSource: ['binaryData'],
117
+ },
118
+ },
119
+ description: 'Name of the binary property containing the end frame image',
120
+ },
121
+ {
122
+ displayName: 'Prompt',
123
+ name: 'prompt',
124
+ type: 'string',
125
+ typeOptions: {
126
+ rows: 4,
127
+ },
128
+ default: '',
129
+ required: false,
130
+ description: 'Text prompt to guide the video generation',
131
+ },
132
+ {
133
+ displayName: 'Negative Prompt',
134
+ name: 'negativePrompt',
135
+ type: 'string',
136
+ typeOptions: {
137
+ rows: 4,
138
+ },
139
+ default: '',
140
+ description: 'Negative prompt to avoid certain elements in the video',
141
+ },
142
+ {
143
+ displayName: 'Use Elements',
144
+ name: 'useElements',
145
+ type: 'boolean',
146
+ default: false,
147
+ description: 'Whether to use elements feature (V1.6 only)',
148
+ },
149
+ {
150
+ displayName: 'Elements',
151
+ name: 'elements',
152
+ type: 'fixedCollection',
153
+ typeOptions: {
154
+ multipleValues: true,
155
+ sortable: true,
156
+ },
157
+ default: {},
158
+ displayOptions: {
159
+ show: {
160
+ useElements: [true],
161
+ },
162
+ },
163
+ options: [
164
+ {
165
+ name: 'elementsList',
166
+ displayName: 'Element',
167
+ values: [
168
+ {
169
+ displayName: 'Element Image URL',
170
+ name: 'elementImageUrl',
171
+ type: 'string',
172
+ default: '',
173
+ description: 'URL of the element image',
174
+ },
175
+ ],
176
+ },
177
+ ],
178
+ description: 'Elements to include in the video (1-4 images)',
179
+ },
180
+ {
181
+ displayName: 'Duration',
182
+ name: 'duration',
183
+ type: 'options',
184
+ options: [
185
+ {
186
+ name: '5 Seconds',
187
+ value: 5,
188
+ },
189
+ {
190
+ name: '10 Seconds',
191
+ value: 10,
192
+ },
193
+ ],
194
+ default: 5,
195
+ description: 'Duration of the generated video',
196
+ },
197
+ {
198
+ displayName: 'Aspect Ratio',
199
+ name: 'aspectRatio',
200
+ type: 'options',
201
+ options: [
202
+ {
203
+ name: 'Landscape (16:9)',
204
+ value: '16:9',
205
+ },
206
+ {
207
+ name: 'Portrait (9:16)',
208
+ value: '9:16',
209
+ },
210
+ {
211
+ name: 'Square (1:1)',
212
+ value: '1:1',
213
+ },
214
+ ],
215
+ default: '16:9',
216
+ description: 'Aspect ratio of the generated video',
217
+ },
218
+ {
219
+ displayName: 'Mode',
220
+ name: 'mode',
221
+ type: 'options',
222
+ options: [
223
+ {
224
+ name: 'Standard',
225
+ value: 'std',
226
+ },
227
+ {
228
+ name: 'Professional',
229
+ value: 'pro',
230
+ },
231
+ ],
232
+ default: 'std',
233
+ description: 'Generation mode of the video',
234
+ },
235
+ {
236
+ displayName: 'Version',
237
+ name: 'version',
238
+ type: 'options',
239
+ options: [
240
+ {
241
+ name: 'V1.0',
242
+ value: '1.0',
243
+ },
244
+ {
245
+ name: 'V1.5',
246
+ value: '1.5',
247
+ },
248
+ {
249
+ name: 'V1.6',
250
+ value: '1.6',
251
+ },
252
+ ],
253
+ default: '1.6',
254
+ description: 'Model version to use',
255
+ },
256
+ {
257
+ displayName: 'CFG Scale',
258
+ name: 'cfgScale',
259
+ type: 'number',
260
+ typeOptions: {
261
+ minValue: 0,
262
+ maxValue: 1,
263
+ numberPrecision: 2,
264
+ },
265
+ default: 0.5,
266
+ description: 'How strongly the video adheres to the prompt (between 0-1, recommended: 0.5)',
267
+ },
268
+ {
269
+ displayName: 'Wait for Completion',
270
+ name: 'waitForCompletion',
271
+ type: 'boolean',
272
+ default: false,
273
+ description: 'Whether to wait for the task to complete before returning',
274
+ },
275
+ ],
276
+ };
277
+ }
278
+ async execute() {
279
+ var _a, _b;
280
+ const items = this.getInputData();
281
+ const returnData = [];
282
+ for (let i = 0; i < items.length; i++) {
283
+ try {
284
+ const imageSource = this.getNodeParameter('imageSource', i);
285
+ const endFrameImageSource = this.getNodeParameter('endFrameImageSource', i);
286
+ const prompt = this.getNodeParameter('prompt', i, '');
287
+ const negativePrompt = this.getNodeParameter('negativePrompt', i, '');
288
+ const duration = this.getNodeParameter('duration', i);
289
+ const aspectRatio = this.getNodeParameter('aspectRatio', i);
290
+ const mode = this.getNodeParameter('mode', i);
291
+ const version = this.getNodeParameter('version', i);
292
+ const cfgScale = this.getNodeParameter('cfgScale', i);
293
+ const useElements = this.getNodeParameter('useElements', i, false);
294
+ const waitForCompletion = this.getNodeParameter('waitForCompletion', i, false);
295
+ let imageUrl = '';
296
+ let endFrameImageUrl = '';
297
+ let elements = [];
298
+ if (imageSource === 'url') {
299
+ imageUrl = this.getNodeParameter('imageUrl', i);
300
+ try {
301
+ new URL(imageUrl);
302
+ }
303
+ catch (error) {
304
+ throw new Error(`Invalid image URL: ${error.message}`);
305
+ }
306
+ }
307
+ else if (imageSource === 'binaryData') {
308
+ const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
309
+ const binaryItem = (_a = items[i].binary) === null || _a === void 0 ? void 0 : _a[binaryPropertyName];
310
+ if (!binaryItem) {
311
+ throw new Error(`No binary data found in property ${binaryPropertyName}`);
312
+ }
313
+ const binaryData = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
314
+ if (!binaryData) {
315
+ throw new Error(`No binary data found in property ${binaryPropertyName}`);
316
+ }
317
+ const binaryMimeType = binaryItem.mimeType || 'image/png';
318
+ imageUrl = `data:${binaryMimeType};base64,${binaryData.toString('base64')}`;
319
+ }
320
+ if (endFrameImageSource === 'url') {
321
+ endFrameImageUrl = this.getNodeParameter('endFrameImageUrl', i);
322
+ try {
323
+ new URL(endFrameImageUrl);
324
+ }
325
+ catch (error) {
326
+ throw new Error(`Invalid end frame image URL: ${error.message}`);
327
+ }
328
+ }
329
+ else if (endFrameImageSource === 'binaryData') {
330
+ const endFrameBinaryPropertyName = this.getNodeParameter('endFrameBinaryPropertyName', i);
331
+ const binaryItem = (_b = items[i].binary) === null || _b === void 0 ? void 0 : _b[endFrameBinaryPropertyName];
332
+ if (!binaryItem) {
333
+ throw new Error(`No binary data found in property ${endFrameBinaryPropertyName}`);
334
+ }
335
+ const binaryData = await this.helpers.getBinaryDataBuffer(i, endFrameBinaryPropertyName);
336
+ if (!binaryData) {
337
+ throw new Error(`No binary data found in property ${endFrameBinaryPropertyName}`);
338
+ }
339
+ const binaryMimeType = binaryItem.mimeType || 'image/png';
340
+ endFrameImageUrl = `data:${binaryMimeType};base64,${binaryData.toString('base64')}`;
341
+ }
342
+ if (useElements) {
343
+ const elementsList = this.getNodeParameter('elements.elementsList', i, []);
344
+ if (elementsList.length === 0) {
345
+ throw new Error('Elements feature requires at least one element image');
346
+ }
347
+ else if (elementsList.length > 4) {
348
+ throw new Error('Elements feature supports a maximum of 4 element images');
349
+ }
350
+ elements = elementsList.map(element => ({
351
+ image_url: element.elementImageUrl,
352
+ }));
353
+ }
354
+ const body = {
355
+ model: 'kling',
356
+ task_type: 'video_generation',
357
+ input: {
358
+ prompt,
359
+ negative_prompt: negativePrompt,
360
+ duration,
361
+ aspect_ratio: aspectRatio,
362
+ mode,
363
+ version,
364
+ cfg_scale: cfgScale,
365
+ },
366
+ config: {
367
+ webhook_config: {
368
+ endpoint: '',
369
+ secret: '',
370
+ },
371
+ },
372
+ };
373
+ if (!useElements) {
374
+ body.input.image_url = imageUrl;
375
+ if (endFrameImageSource !== 'none' && endFrameImageUrl) {
376
+ body.input.image_tail_url = endFrameImageUrl;
377
+ }
378
+ }
379
+ else {
380
+ body.input.elements = elements;
381
+ }
382
+ const response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', body);
383
+ if (response.code !== 200) {
384
+ throw new Error(`API Error: ${response.message}`);
385
+ }
386
+ const taskId = response.data.task_id;
387
+ let taskData = response.data;
388
+ if (waitForCompletion) {
389
+ taskData = await GenericFunctions_1.waitForTaskCompletion.call(this, taskId);
390
+ }
391
+ returnData.push({
392
+ json: taskData,
393
+ });
394
+ }
395
+ catch (error) {
396
+ if (this.continueOnFail()) {
397
+ returnData.push({
398
+ json: {
399
+ error: error.message,
400
+ },
401
+ });
402
+ continue;
403
+ }
404
+ throw error;
405
+ }
406
+ }
407
+ return [returnData];
408
+ }
409
+ }
410
+ exports.KlingImageToVideo = KlingImageToVideo;
411
+ //# sourceMappingURL=KlingImageToVideo.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KlingImageToVideo.node.js","sourceRoot":"","sources":["../../../../nodes/PiAPI/Kling/KlingImageToVideo.node.ts"],"names":[],"mappings":";;;AAQA,iEAAiF;AAEjF,MAAa,iBAAiB;IAA9B;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,4BAA4B;YACzC,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE;gBACN,IAAI,EAAE,sBAAsB;aAC/B;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE;gBACT;oBACI,IAAI,EAAE,UAAU;oBAChB,QAAQ,EAAE,IAAI;iBACjB;aACJ;YACD,UAAU,EAAE;gBACR;oBACI,WAAW,EAAE,cAAc;oBAC3B,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACL;4BACI,IAAI,EAAE,KAAK;4BACX,KAAK,EAAE,KAAK;4BACZ,WAAW,EAAE,qBAAqB;yBACrC;wBACD;4BACI,IAAI,EAAE,aAAa;4BACnB,KAAK,EAAE,YAAY;4BACnB,WAAW,EAAE,6BAA6B;yBAC7C;qBACJ;oBACD,OAAO,EAAE,KAAK;oBACd,WAAW,EAAE,6BAA6B;iBAC7C;gBACD;oBACI,WAAW,EAAE,WAAW;oBACxB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,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flow';
2
+ export declare function loadTtsVoices(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
3
+ export declare function loadTtsEmotions(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
4
+ export declare class KlingLipSync implements INodeType {
5
+ methods: {
6
+ loadOptions: {
7
+ loadTtsVoices: typeof loadTtsVoices;
8
+ loadTtsEmotions: typeof loadTtsEmotions;
9
+ };
10
+ };
11
+ description: INodeTypeDescription;
12
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
13
+ }