ugcinc 2.4.0 → 2.4.2
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/dist/render.d.ts +8 -8
- package/dist/render.js +8 -8
- package/package.json +1 -1
package/dist/render.d.ts
CHANGED
|
@@ -5,37 +5,37 @@ import type { ApiResponse, RenderJobSubmit, RenderVideoRequest, RenderImageReque
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class RenderClient extends BaseClient {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Render a video
|
|
9
9
|
* @param params - Video render parameters
|
|
10
10
|
* @returns Job ID and initial status
|
|
11
11
|
* @example
|
|
12
12
|
* ```typescript
|
|
13
|
-
* const videoJob = await client.render.
|
|
13
|
+
* const videoJob = await client.render.renderVideo({
|
|
14
14
|
* editor: myVideoEditorConfig, // Can include video/audio/text/image segments
|
|
15
15
|
* });
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
renderVideo(params: Omit<RenderVideoRequest, 'output_type'>): Promise<ApiResponse<RenderJobResponse>>;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Render a static image (text and images only)
|
|
21
21
|
* @param params - Image render parameters
|
|
22
22
|
* @returns Job ID and initial status
|
|
23
23
|
* @example
|
|
24
24
|
* ```typescript
|
|
25
|
-
* const imageJob = await client.render.
|
|
25
|
+
* const imageJob = await client.render.renderImage({
|
|
26
26
|
* editor: myImageEditorConfig, // Can only include text/image segments
|
|
27
27
|
* image_format: 'png'
|
|
28
28
|
* });
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
renderImage(params: Omit<RenderImageRequest, 'output_type'>): Promise<ApiResponse<RenderJobResponse>>;
|
|
32
32
|
/**
|
|
33
|
-
* Submit a render job (generic - use
|
|
33
|
+
* Submit a render job (generic - use renderVideo or renderImage for type safety)
|
|
34
34
|
* @param params - Render job parameters
|
|
35
35
|
* @returns Job ID and initial status
|
|
36
36
|
* @example
|
|
37
37
|
* ```typescript
|
|
38
|
-
* // Less type-safe, prefer
|
|
38
|
+
* // Less type-safe, prefer renderVideo() or renderImage()
|
|
39
39
|
* const job = await client.render.submit({
|
|
40
40
|
* use_example: true,
|
|
41
41
|
* output_type: 'video'
|
package/dist/render.js
CHANGED
|
@@ -7,41 +7,41 @@ const base_1 = require("./base");
|
|
|
7
7
|
*/
|
|
8
8
|
class RenderClient extends base_1.BaseClient {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Render a video
|
|
11
11
|
* @param params - Video render parameters
|
|
12
12
|
* @returns Job ID and initial status
|
|
13
13
|
* @example
|
|
14
14
|
* ```typescript
|
|
15
|
-
* const videoJob = await client.render.
|
|
15
|
+
* const videoJob = await client.render.renderVideo({
|
|
16
16
|
* editor: myVideoEditorConfig, // Can include video/audio/text/image segments
|
|
17
17
|
* });
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
async
|
|
20
|
+
async renderVideo(params) {
|
|
21
21
|
return this.post('/render/submit', { ...params, output_type: 'video' });
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Render a static image (text and images only)
|
|
25
25
|
* @param params - Image render parameters
|
|
26
26
|
* @returns Job ID and initial status
|
|
27
27
|
* @example
|
|
28
28
|
* ```typescript
|
|
29
|
-
* const imageJob = await client.render.
|
|
29
|
+
* const imageJob = await client.render.renderImage({
|
|
30
30
|
* editor: myImageEditorConfig, // Can only include text/image segments
|
|
31
31
|
* image_format: 'png'
|
|
32
32
|
* });
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
|
-
async
|
|
35
|
+
async renderImage(params) {
|
|
36
36
|
return this.post('/render/submit', { ...params, output_type: 'image' });
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* Submit a render job (generic - use
|
|
39
|
+
* Submit a render job (generic - use renderVideo or renderImage for type safety)
|
|
40
40
|
* @param params - Render job parameters
|
|
41
41
|
* @returns Job ID and initial status
|
|
42
42
|
* @example
|
|
43
43
|
* ```typescript
|
|
44
|
-
* // Less type-safe, prefer
|
|
44
|
+
* // Less type-safe, prefer renderVideo() or renderImage()
|
|
45
45
|
* const job = await client.render.submit({
|
|
46
46
|
* use_example: true,
|
|
47
47
|
* output_type: 'video'
|