ugcinc 1.1.2 → 1.1.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/README.md CHANGED
@@ -25,128 +25,6 @@ if (response.ok) {
25
25
  }
26
26
  ```
27
27
 
28
- ## Video Rendering
29
-
30
- The UGC Inc API now includes powerful video rendering capabilities. You can create custom videos by composing multiple layers of video, images, text, and audio.
31
-
32
- ### Basic Video Rendering Example
33
-
34
- ```typescript
35
- import { UGCClient } from 'ugcinc';
36
-
37
- const client = new UGCClient({
38
- apiKey: 'your-api-key-here'
39
- });
40
-
41
- const result = await client.video.render({
42
- editor: {
43
- width: 1080,
44
- height: 1920,
45
- fps: 30,
46
- duration: 5000, // 5 seconds in milliseconds
47
- channels: [
48
- {
49
- id: "background",
50
- segments: [
51
- {
52
- id: "bg-video",
53
- type: "video",
54
- source: "https://example.com/background.mp4",
55
- order: 0,
56
- offset: { type: "absolute", value: 0 },
57
- startTrim: 0,
58
- endTrim: 0,
59
- xOffset: 0,
60
- yOffset: 0,
61
- width: 1080,
62
- height: 1920,
63
- zIndex: 0,
64
- scale: 1,
65
- rotation: 0,
66
- fit: "cover",
67
- speed: 1,
68
- opacity: 100,
69
- volume: 50
70
- }
71
- ]
72
- },
73
- {
74
- id: "text-layer",
75
- segments: [
76
- {
77
- id: "title",
78
- type: "text",
79
- source: "",
80
- order: 0,
81
- offset: { type: "absolute", value: 500 },
82
- startTrim: 0,
83
- endTrim: 0,
84
- duration: { type: "absolute", value: 4000 },
85
- xOffset: 90,
86
- yOffset: 800,
87
- width: 900,
88
- height: 320,
89
- zIndex: 10,
90
- scale: 1,
91
- rotation: 0,
92
- text: "Hello World! 🎉",
93
- alignment: "center",
94
- verticalAlign: "middle",
95
- direction: "ltr",
96
- padding: 20,
97
- fontType: "tiktok",
98
- fontSize: 80,
99
- fontWeight: "bold",
100
- lineHeight: 1.2,
101
- letterSpacing: 0,
102
- textWrap: "word",
103
- wordBreak: "break-word",
104
- hyphenation: "none",
105
- maxLines: 0,
106
- textOverflow: "clip",
107
- ellipsis: "...",
108
- color: "#FFFFFF",
109
- backgroundColor: "#00000080",
110
- strokeColor: "#000000",
111
- strokeWidth: 4
112
- }
113
- ]
114
- }
115
- ]
116
- }
117
- });
118
-
119
- if (result.ok) {
120
- console.log('Video URL:', result.data.video_url);
121
- }
122
- ```
123
-
124
- ### Segment Types
125
-
126
- The video renderer supports multiple segment types:
127
-
128
- - **video**: Video clips with playback control
129
- - **image**: Static or animated images (including GIFs)
130
- - **text**: Customizable text overlays with fonts, colors, and effects
131
- - **audio**: Audio tracks that can be mixed together
132
- - **editor**: Nested editors for complex compositions
133
-
134
- ### Time Values
135
-
136
- Time values can be specified as absolute (milliseconds) or relative (0-1 percentage):
137
-
138
- ```typescript
139
- // Absolute time (500ms)
140
- offset: { type: "absolute", value: 500 }
141
-
142
- // Relative time (50% of video duration)
143
- offset: { type: "relative", value: 0.5 }
144
- ```
145
-
146
- ### Layering with Channels
147
-
148
- Organize your composition into channels, where each channel can contain multiple segments. Segments are ordered by their `order` property and layered by their `zIndex`.
149
-
150
28
  ## Get Your API Key
151
29
 
152
30
  To get your API key:
@@ -168,16 +46,7 @@ For complete API documentation, including all endpoints, parameters, and example
168
46
  This package is written in TypeScript and provides full type definitions:
169
47
 
170
48
  ```typescript
171
- import type {
172
- Account,
173
- Post,
174
- Task,
175
- ApiResponse,
176
- Editor,
177
- VideoSegment,
178
- TextSegment,
179
- Channel
180
- } from 'ugcinc';
49
+ import type { Account, Post, Task, ApiResponse } from 'ugcinc';
181
50
  ```
182
51
 
183
52
  ## License
package/dist/client.d.ts CHANGED
@@ -2,7 +2,6 @@ import { AccountsClient } from './accounts';
2
2
  import { TasksClient } from './tasks';
3
3
  import { PostsClient } from './posts';
4
4
  import { StatsClient } from './stats';
5
- import { VideoClient } from './video';
6
5
  import type { ClientConfig } from './base';
7
6
  /**
8
7
  * Main UGC Inc API Client
@@ -27,16 +26,6 @@ import type { ClientConfig } from './base';
27
26
  * videoUrl: 'https://example.com/video.mp4',
28
27
  * caption: 'My awesome video!',
29
28
  * });
30
- *
31
- * // Render a video
32
- * const renderResponse = await client.video.render({
33
- * editor: {
34
- * width: 1080,
35
- * height: 1920,
36
- * fps: 30,
37
- * channels: [...]
38
- * }
39
- * });
40
29
  * ```
41
30
  */
42
31
  export declare class UGCClient {
@@ -56,9 +45,5 @@ export declare class UGCClient {
56
45
  * Client for statistics operations
57
46
  */
58
47
  stats: StatsClient;
59
- /**
60
- * Client for video rendering operations
61
- */
62
- video: VideoClient;
63
48
  constructor(config: ClientConfig);
64
49
  }
package/dist/client.js CHANGED
@@ -5,7 +5,6 @@ const accounts_1 = require("./accounts");
5
5
  const tasks_1 = require("./tasks");
6
6
  const posts_1 = require("./posts");
7
7
  const stats_1 = require("./stats");
8
- const video_1 = require("./video");
9
8
  /**
10
9
  * Main UGC Inc API Client
11
10
  *
@@ -29,16 +28,6 @@ const video_1 = require("./video");
29
28
  * videoUrl: 'https://example.com/video.mp4',
30
29
  * caption: 'My awesome video!',
31
30
  * });
32
- *
33
- * // Render a video
34
- * const renderResponse = await client.video.render({
35
- * editor: {
36
- * width: 1080,
37
- * height: 1920,
38
- * fps: 30,
39
- * channels: [...]
40
- * }
41
- * });
42
31
  * ```
43
32
  */
44
33
  class UGCClient {
@@ -47,7 +36,6 @@ class UGCClient {
47
36
  this.tasks = new tasks_1.TasksClient(config);
48
37
  this.posts = new posts_1.PostsClient(config);
49
38
  this.stats = new stats_1.StatsClient(config);
50
- this.video = new video_1.VideoClient(config);
51
39
  }
52
40
  }
53
41
  exports.UGCClient = UGCClient;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,5 @@ export { AccountsClient } from './accounts';
8
8
  export { TasksClient } from './tasks';
9
9
  export { PostsClient } from './posts';
10
10
  export { StatsClient } from './stats';
11
- export { VideoClient } from './video';
12
11
  export type { ClientConfig, } from './base';
13
- export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStat, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, RenderVideoParams, RenderVideoResponse, SegmentType, TimeValue, BaseSegment, VisualSegment, PictureSegment, VideoSegment, ImageSegment, AudioSegment, TextSegment, EditorSegment, Channel, Editor, } from './types';
12
+ export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStat, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, } from './types';
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Official TypeScript/JavaScript client for the UGC Inc API
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.VideoClient = exports.StatsClient = exports.PostsClient = exports.TasksClient = exports.AccountsClient = exports.UGCClient = void 0;
8
+ exports.StatsClient = exports.PostsClient = exports.TasksClient = exports.AccountsClient = exports.UGCClient = void 0;
9
9
  var client_1 = require("./client");
10
10
  Object.defineProperty(exports, "UGCClient", { enumerable: true, get: function () { return client_1.UGCClient; } });
11
11
  var accounts_1 = require("./accounts");
@@ -16,5 +16,3 @@ var posts_1 = require("./posts");
16
16
  Object.defineProperty(exports, "PostsClient", { enumerable: true, get: function () { return posts_1.PostsClient; } });
17
17
  var stats_1 = require("./stats");
18
18
  Object.defineProperty(exports, "StatsClient", { enumerable: true, get: function () { return stats_1.StatsClient; } });
19
- var video_1 = require("./video");
20
- Object.defineProperty(exports, "VideoClient", { enumerable: true, get: function () { return video_1.VideoClient; } });
package/dist/types.d.ts CHANGED
@@ -173,16 +173,3 @@ export interface RefreshStatsResponse {
173
173
  post_stats_count: number;
174
174
  errors?: RefreshStatsError[];
175
175
  }
176
- /**
177
- * Video rendering types - imported from video-render module
178
- * These are copied during the build process from ../../src/video-render/types/
179
- */
180
- import type { SegmentType, TimeValue, BaseSegment, VisualSegment, PictureSegment, VideoSegment, ImageSegment, AudioSegment, TextSegment, EditorSegment } from './video-render-types/segment';
181
- import type { Channel, Editor } from './video-render-types/video';
182
- export type { SegmentType, TimeValue, BaseSegment, VisualSegment, PictureSegment, VideoSegment, ImageSegment, AudioSegment, TextSegment, EditorSegment, Channel, Editor, };
183
- export interface RenderVideoParams {
184
- editor: Editor;
185
- }
186
- export interface RenderVideoResponse {
187
- video_url: string;
188
- }
package/package.json CHANGED
@@ -1,34 +1,33 @@
1
- {
2
- "name": "ugcinc",
3
- "version": "1.1.2",
4
- "description": "TypeScript/JavaScript client for the UGC Inc API",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "scripts": {
8
- "prebuild": "node -e \"const fs = require('fs'); const path = require('path'); const srcDir = path.join(__dirname, '../../src/video-render/types'); const destDir = path.join(__dirname, 'src/video-render-types'); fs.mkdirSync(destDir, {recursive: true}); ['segment.ts', 'video.ts'].forEach(file => fs.copyFileSync(path.join(srcDir, file), path.join(destDir, file)));\"",
9
- "build": "npm run prebuild && tsc",
10
- "prepublishOnly": "npm run build",
11
- "test": "echo \"No tests specified\" && exit 0"
12
- },
13
- "keywords": [
14
- "ugcinc",
15
- "api",
16
- "client",
17
- "tiktok",
18
- "automation",
19
- "social-media",
20
- "content-management"
21
- ],
22
- "author": "UGC Inc",
23
- "license": "MIT",
24
- "devDependencies": {
25
- "@types/node": "^20.0.0",
26
- "typescript": "^5.0.0"
27
- },
28
- "dependencies": {},
29
- "files": [
30
- "dist",
31
- "README.md"
32
- ]
33
- }
34
-
1
+ {
2
+ "name": "ugcinc",
3
+ "version": "1.1.3",
4
+ "description": "TypeScript/JavaScript client for the UGC Inc API",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc",
9
+ "prepublishOnly": "npm run build",
10
+ "test": "echo \"No tests specified\" && exit 0"
11
+ },
12
+ "keywords": [
13
+ "ugcinc",
14
+ "api",
15
+ "client",
16
+ "tiktok",
17
+ "automation",
18
+ "social-media",
19
+ "content-management"
20
+ ],
21
+ "author": "UGC Inc",
22
+ "license": "MIT",
23
+ "devDependencies": {
24
+ "@types/node": "^20.0.0",
25
+ "typescript": "^5.0.0"
26
+ },
27
+ "dependencies": {},
28
+ "files": [
29
+ "dist",
30
+ "README.md"
31
+ ]
32
+ }
33
+