ugcinc 4.7.1 → 4.8.1

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
@@ -93,6 +93,22 @@ do {
93
93
  } while (cursor);
94
94
  ```
95
95
 
96
+ ## Caption Overlays
97
+
98
+ Video posts can carry text overlays to display on the video. Pass `captionOverlays` to
99
+ `posts.createVideo()`; each `CaptionOverlay` is `{ text, x, y, fontSize }`, where `x`/`y` are the
100
+ overlay center as a fraction (0-1) of the video width/height and `fontSize` is a fraction (0-1) of
101
+ the video height. Overlays are returned on the `Post` as `caption_overlays`.
102
+
103
+ ```typescript
104
+ await client.posts.createVideo({
105
+ accountId: "acc_123",
106
+ videoUrl: "https://example.com/video.mp4",
107
+ caption: "Post description",
108
+ captionOverlays: [{ text: "Wait for it...", x: 0.5, y: 0.2, fontSize: 0.04 }],
109
+ });
110
+ ```
111
+
96
112
  ## Useful Exports
97
113
 
98
114
  - `UGCClient` for API access
package/dist/index.d.ts CHANGED
@@ -27,7 +27,7 @@ export type { InputType } from './automations/nodes/types';
27
27
  export type { ClientConfig } from './base';
28
28
  export type { Account, AccountStat, AccountTask, EditProfileInfo, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, AccountInfoUpdate, UpdateAccountInfoParams, AccountInfoUpdateResult, UpdateAccountInfoResponse, AccountSocialUpdate, UpdateAccountSocialParams, AccountSocialUpdateResult, UpdateAccountSocialResponse, DeleteAccountPostsParams, DeleteAccountPostsResponse, ResetWarmupParams, ResetWarmupResponse, NicheSwitchUpdate, NicheSwitchParams, NicheSwitchResult, NicheSwitchResponse, CreateAccountInput, CreateAccountsParams, CreateAccountResult, CreateAccountsResponse, TroubleshootFailReason, TroubleshootAccount, TroubleshootParams, } from './accounts';
29
29
  export type { TaskType, Task, GetTasksParams } from './tasks';
30
- export type { PostType, PostStatus, Post, PostStat, GetPostsParams, CreateDraftParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, UpdatePostParams, DeletePostsParams, DeletePostsResponse, RetryPostsParams, SetPostStatusParams, SetPostStatusResponse, PreviewScheduleEntry, PreviewScheduleParams, PreviewScheduleResult, } from './posts';
30
+ export type { PostType, PostStatus, Post, PostStat, CaptionOverlay, GetPostsParams, CreateDraftParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, UpdatePostParams, DeletePostsParams, DeletePostsResponse, RetryPostsParams, SetPostStatusParams, SetPostStatusResponse, PreviewScheduleEntry, PreviewScheduleParams, PreviewScheduleResult, } from './posts';
31
31
  export type { RefreshStatsParams, RefreshStatsError, RefreshStatsResponse, RefreshStatsProgressResponse, RefreshStartEvent, RefreshProgressEvent, RefreshDoneEvent, RefreshStreamEvent, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyAccountStat, GetDailyAccountStatsParams, DailyPostStat, GetDailyPostStatsParams, DashboardDailyStat, GetDashboardDailyStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, } from './stats';
32
32
  export type { Org, ApiKey, DeleteApiKeyParams, EditApiKeyParams, IntegrationKey, IntegrationProvider, UpsertIntegrationKeyParams, DeleteIntegrationKeyParams } from './org';
33
33
  export type { UserMedia, MediaUse, SocialAudio, Media, GetMediaParams, GetSocialAudioParams, UploadMediaParams, UploadMediaResponse, MediaTagUpdate, UpdateMediaTagsParams, MediaTagUpdateResult, UpdateMediaTagsResponse, UpdateMediaTagParams, UpdateMediaNameParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, ImportTextParams, ImportTextResponse, CreateMediaFromUrlParams, GetMediaUseParams, GetMediaUseResponse, FilterMediaParams, FilterMediaResponse, GetUploadTokenParams, UploadTokenResponse, } from './media';
package/dist/posts.d.ts CHANGED
@@ -2,6 +2,17 @@ import { BaseClient } from './base';
2
2
  import type { ApiResponse } from './types';
3
3
  export type PostType = 'video' | 'slideshow';
4
4
  export type PostStatus = 'draft' | 'scheduled' | 'pending' | 'complete' | 'failed' | 'retrying' | 'deleting' | 'deleted' | 'hidden' | 'require-approval';
5
+ /**
6
+ * A text overlay to display on top of a video post.
7
+ * x/y are the overlay center as a fraction (0-1) of the video width/height;
8
+ * fontSize is a fraction (0-1) of the video height.
9
+ */
10
+ export interface CaptionOverlay {
11
+ text: string;
12
+ x: number;
13
+ y: number;
14
+ fontSize: number;
15
+ }
5
16
  export interface Post {
6
17
  id: string;
7
18
  account_id: string | null;
@@ -9,6 +20,8 @@ export interface Post {
9
20
  status: PostStatus;
10
21
  social_id: string | null;
11
22
  caption: string | null;
23
+ /** Only returned by createVideo; other post endpoints omit it */
24
+ caption_overlays?: CaptionOverlay[] | null;
12
25
  title: string | null;
13
26
  media_urls: string[] | null;
14
27
  thumbnail_url: string | null;
@@ -62,6 +75,7 @@ export interface GetPostStatusParams {
62
75
  export interface CreateVideoParams {
63
76
  accountId: string | null;
64
77
  caption?: string;
78
+ captionOverlays?: CaptionOverlay[];
65
79
  socialAudioId?: string;
66
80
  postTime?: string;
67
81
  videoUrl: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "4.7.1",
3
+ "version": "4.8.1",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",