ugcinc 2.63.2 → 2.63.3
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/index.d.ts +1 -1
- package/dist/render.d.ts +12 -12
- package/dist/render.js +19 -19
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,6 @@ export { OrganizationClient } from './org';
|
|
|
12
12
|
export { RenderClient } from './render';
|
|
13
13
|
export { AutomationsClient, getAllNodes, getNodeByType } from './automations';
|
|
14
14
|
export { MediaClient } from './media';
|
|
15
|
-
export type {
|
|
15
|
+
export type { RenderJobResponse, RenderJobStatus, SubmitImageRenderJobParams, SubmitVideoRenderJobParams, RenderVideoEditorConfig, } from './render';
|
|
16
16
|
export type { ClientConfig, } from './base';
|
|
17
17
|
export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStat, ApiKey, EditorConfig, VideoEditorConfig, ImageEditorNodeConfig, ImageEditorElement, ImageEditorNodeInput, ImageEditorNodeOutput, DimensionPresetKey, EditorChannel, TimeValue, BaseSegmentProps, VisualSegmentProps, EditorSegment, VideoSegment, AudioSegment, ImageSegment, TextSegment, StaticSegment, PositionAnchor, RelativePositionConfig, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyPostStat, GetDailyPostStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, MediaType, NodePort, NodeControlConfig, NodeTypeEnum, WorkflowNodeDefinition, WorkflowDefinition, CanvasState, AutomationTemplate, AutomationRun, NodeRun, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, OutputInput, OutputNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, } from './types';
|
package/dist/render.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ApiResponse } from './types';
|
|
2
2
|
import type { ImageEditorNodeConfig } from 'ugcinc-render';
|
|
3
|
-
export interface
|
|
3
|
+
export interface RenderJobResponse {
|
|
4
4
|
job_id: string;
|
|
5
5
|
status: string;
|
|
6
6
|
output_type: string;
|
|
7
7
|
message: string;
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface RenderJobStatus {
|
|
10
10
|
job_id: string;
|
|
11
11
|
status: 'pending' | 'processing' | 'completed' | 'failed' | 'error';
|
|
12
12
|
progress?: number;
|
|
@@ -25,7 +25,7 @@ export interface SubmitImageRenderJobParams {
|
|
|
25
25
|
output_type?: 'image';
|
|
26
26
|
image_format?: 'png' | 'jpeg';
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
28
|
+
export interface RenderVideoEditorConfig {
|
|
29
29
|
width: number;
|
|
30
30
|
height: number;
|
|
31
31
|
fps: number;
|
|
@@ -36,29 +36,29 @@ export interface RemotionEditorConfig {
|
|
|
36
36
|
}>;
|
|
37
37
|
dynamicCrop?: Record<string, unknown>;
|
|
38
38
|
}
|
|
39
|
-
export interface
|
|
40
|
-
config:
|
|
39
|
+
export interface SubmitVideoRenderJobParams {
|
|
40
|
+
config: RenderVideoEditorConfig;
|
|
41
41
|
sources?: Record<string, string>;
|
|
42
42
|
output_type?: 'video' | 'image';
|
|
43
43
|
image_format?: 'png' | 'jpeg';
|
|
44
44
|
video_codec?: 'h264' | 'h265';
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* Client for
|
|
47
|
+
* Client for rendering operations
|
|
48
48
|
* Note: This calls Modal endpoints directly, not the UGC Inc API
|
|
49
49
|
*/
|
|
50
50
|
export declare class RenderClient {
|
|
51
51
|
/**
|
|
52
|
-
* Submit an image render job to the
|
|
52
|
+
* Submit an image render job to the Modal renderer
|
|
53
53
|
* Uses the new element-based format for single-source-of-truth rendering
|
|
54
54
|
*/
|
|
55
|
-
submitImageRenderJob(params: SubmitImageRenderJobParams): Promise<ApiResponse<
|
|
55
|
+
submitImageRenderJob(params: SubmitImageRenderJobParams): Promise<ApiResponse<RenderJobResponse>>;
|
|
56
56
|
/**
|
|
57
|
-
* Submit a render job to the
|
|
57
|
+
* Submit a render job to the Modal renderer
|
|
58
58
|
*/
|
|
59
|
-
|
|
59
|
+
submitVideoRenderJob(params: SubmitVideoRenderJobParams): Promise<ApiResponse<RenderJobResponse>>;
|
|
60
60
|
/**
|
|
61
|
-
* Get render job status from the
|
|
61
|
+
* Get render job status from the Modal renderer
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
getRenderJobStatus(jobId: string): Promise<ApiResponse<RenderJobStatus>>;
|
|
64
64
|
}
|
package/dist/render.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RenderClient = void 0;
|
|
4
|
-
//
|
|
5
|
-
const
|
|
6
|
-
const
|
|
4
|
+
// Modal renderer endpoints
|
|
5
|
+
const RENDER_SUBMIT_URL = "https://aidangollan--ugcinc-render-renderer-submit-job.modal.run";
|
|
6
|
+
const RENDER_STATUS_URL = "https://aidangollan--ugcinc-render-renderer-get-status.modal.run";
|
|
7
7
|
/**
|
|
8
|
-
* Client for
|
|
8
|
+
* Client for rendering operations
|
|
9
9
|
* Note: This calls Modal endpoints directly, not the UGC Inc API
|
|
10
10
|
*/
|
|
11
11
|
class RenderClient {
|
|
12
12
|
/**
|
|
13
|
-
* Submit an image render job to the
|
|
13
|
+
* Submit an image render job to the Modal renderer
|
|
14
14
|
* Uses the new element-based format for single-source-of-truth rendering
|
|
15
15
|
*/
|
|
16
16
|
async submitImageRenderJob(params) {
|
|
17
17
|
try {
|
|
18
|
-
const response = await fetch(
|
|
18
|
+
const response = await fetch(RENDER_SUBMIT_URL, {
|
|
19
19
|
method: 'POST',
|
|
20
20
|
headers: {
|
|
21
21
|
'Content-Type': 'application/json',
|
|
@@ -42,7 +42,7 @@ class RenderClient {
|
|
|
42
42
|
data = JSON.parse(text);
|
|
43
43
|
}
|
|
44
44
|
catch (jsonError) {
|
|
45
|
-
console.error('[
|
|
45
|
+
console.error('[Render] JSON parse error:', text.substring(0, 200));
|
|
46
46
|
return {
|
|
47
47
|
ok: false,
|
|
48
48
|
code: response.status || 500,
|
|
@@ -65,7 +65,7 @@ class RenderClient {
|
|
|
65
65
|
}
|
|
66
66
|
catch (error) {
|
|
67
67
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
68
|
-
console.error('[
|
|
68
|
+
console.error('[Render] Submit error:', error);
|
|
69
69
|
return {
|
|
70
70
|
ok: false,
|
|
71
71
|
code: 500,
|
|
@@ -74,11 +74,11 @@ class RenderClient {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
|
-
* Submit a render job to the
|
|
77
|
+
* Submit a render job to the Modal renderer
|
|
78
78
|
*/
|
|
79
|
-
async
|
|
79
|
+
async submitVideoRenderJob(params) {
|
|
80
80
|
try {
|
|
81
|
-
const response = await fetch(
|
|
81
|
+
const response = await fetch(RENDER_SUBMIT_URL, {
|
|
82
82
|
method: 'POST',
|
|
83
83
|
headers: {
|
|
84
84
|
'Content-Type': 'application/json',
|
|
@@ -97,7 +97,7 @@ class RenderClient {
|
|
|
97
97
|
data = JSON.parse(text);
|
|
98
98
|
}
|
|
99
99
|
catch (jsonError) {
|
|
100
|
-
console.error('[
|
|
100
|
+
console.error('[Render] JSON parse error:', text.substring(0, 200));
|
|
101
101
|
return {
|
|
102
102
|
ok: false,
|
|
103
103
|
code: response.status || 500,
|
|
@@ -120,7 +120,7 @@ class RenderClient {
|
|
|
120
120
|
}
|
|
121
121
|
catch (error) {
|
|
122
122
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
123
|
-
console.error('[
|
|
123
|
+
console.error('[Render] Submit error:', error);
|
|
124
124
|
return {
|
|
125
125
|
ok: false,
|
|
126
126
|
code: 500,
|
|
@@ -129,11 +129,11 @@ class RenderClient {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
/**
|
|
132
|
-
* Get render job status from the
|
|
132
|
+
* Get render job status from the Modal renderer
|
|
133
133
|
*/
|
|
134
|
-
async
|
|
134
|
+
async getRenderJobStatus(jobId) {
|
|
135
135
|
try {
|
|
136
|
-
const response = await fetch(
|
|
136
|
+
const response = await fetch(RENDER_STATUS_URL, {
|
|
137
137
|
method: 'POST',
|
|
138
138
|
headers: {
|
|
139
139
|
'Content-Type': 'application/json',
|
|
@@ -146,7 +146,7 @@ class RenderClient {
|
|
|
146
146
|
data = JSON.parse(text);
|
|
147
147
|
}
|
|
148
148
|
catch (jsonError) {
|
|
149
|
-
console.error('[
|
|
149
|
+
console.error('[Render] JSON parse error:', text.substring(0, 200));
|
|
150
150
|
return {
|
|
151
151
|
ok: false,
|
|
152
152
|
code: response.status || 500,
|
|
@@ -160,7 +160,7 @@ class RenderClient {
|
|
|
160
160
|
message: data.error ?? data.message ?? 'Failed to get job status',
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
//
|
|
163
|
+
// Modal returns Vercel Blob URL as download_url (fast CDN access)
|
|
164
164
|
// Fallback to download endpoint if not provided
|
|
165
165
|
if (data.status === 'completed' && !data.download_url) {
|
|
166
166
|
data.download_url = `https://aidangollan--ugcinc-render-renderer-download.modal.run?job_id=${jobId}`;
|
|
@@ -174,7 +174,7 @@ class RenderClient {
|
|
|
174
174
|
}
|
|
175
175
|
catch (error) {
|
|
176
176
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
177
|
-
console.error('[
|
|
177
|
+
console.error('[Render] Status error:', error);
|
|
178
178
|
return {
|
|
179
179
|
ok: false,
|
|
180
180
|
code: 500,
|