ugcinc 4.15.1 → 4.16.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
@@ -43,7 +43,7 @@ if (res.ok) {
43
43
 
44
44
  - `client.accounts`: list, create, update, troubleshoot, quarantine/release, and manage account lifecycle
45
45
  - `client.posts`: create video/slideshow posts, update them, retry failures, and preview schedule conflicts
46
- - `client.media`: upload media, create media records, search profile-picture candidates, manage tags/names, and work with social audio
46
+ - `client.media`: upload media, create media records, search profile-picture candidates, search images and videos by keyword (`media.imageSearch`, cursor-paged), manage tags/names, and work with social audio
47
47
  - `client.stats`: fetch account/post analytics, daily aggregates, top performers, and refresh stats
48
48
  - `client.org`: manage organizations, API keys, and integration keys
49
49
  - `client.billing`: inspect subscription state and handle account deactivation, replacements, and refunds
package/dist/index.d.ts CHANGED
@@ -30,7 +30,7 @@ export type { TaskType, Task, GetTasksParams } from './tasks';
30
30
  export type { PostType, PostStatus, Post, PostStat, CaptionOverlay, GetPostsParams, GetPostsPageParams, PostsPage, PostSortField, PostSortDirection, 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
- 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, PfpSearchParams, PfpSearchResponse, PfpCandidate, } from './media';
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, PfpSearchParams, PfpSearchResponse, PfpCandidate, ImageSearchParams, ImageSearchResult, ImageSearchResponse, ImageSearchVideoFormat, } from './media';
34
34
  export type { CommentStatus, Comment, CreateCommentParams, CreateCommentResponse, GetCommentsParams, } from './comments';
35
35
  export type { BillingInfo, PortalUrlResponse, CancelAccountParams, CancelAccountResponse, ReactivateAccountParams, ReactivateAccountResponse, CancelSubscriptionResponse, RequestReplacementParams, RequestReplacementResponse, RequestRefundParams, RequestRefundResponse, BillingRequestInfo, PortalParams, } from './billing';
36
36
  export type { RenderJobResponse, RenderJobStatus, SubmitImageRenderJobParams, SubmitVideoRenderJobParams, SubmitScreenshotAnimationRenderJobParams, SubmitAutoCaptionRenderJobParams, SubmitSceneSplitJobParams, SceneSplitDetectorConfig, SubmitInstagramDmRenderJobParams, SubmitIMessageDmRenderJobParams, IgDmMessage, ImDmMessage, RenderVideoEditorConfig, } from './render';
package/dist/media.d.ts CHANGED
@@ -150,6 +150,38 @@ export interface PfpSearchResponse {
150
150
  search_term: string;
151
151
  count: number;
152
152
  }
153
+ export interface ImageSearchParams {
154
+ /** What to search for. */
155
+ search_term: string;
156
+ /** How many results to return. Defaults to 24, min 1, capped at 50. */
157
+ count?: number;
158
+ /** `next_cursor` of a previous response for the same `search_term`. */
159
+ cursor?: string;
160
+ }
161
+ export type ImageSearchVideoFormat = 'mp4' | 'hls' | 'gif';
162
+ export interface ImageSearchResult {
163
+ /** Stable id for this result at the source. */
164
+ source_id: string;
165
+ title: string;
166
+ /** Full-resolution image; the cover image for a video result. */
167
+ url: string;
168
+ /** Smaller variant, for rendering a grid of results. */
169
+ preview_url: string;
170
+ /** Present only on video results. */
171
+ video_url?: string;
172
+ /**
173
+ * Present exactly when `video_url` is. `hls` is a playlist (`.m3u8`), not a
174
+ * file — convert it before storing it.
175
+ */
176
+ video_format?: ImageSearchVideoFormat;
177
+ }
178
+ export interface ImageSearchResponse {
179
+ results: ImageSearchResult[];
180
+ /** Pass as `cursor` to get the next page; null when there are no more. */
181
+ next_cursor: string | null;
182
+ search_term: string;
183
+ count: number;
184
+ }
153
185
  export interface OwnedUploadParams {
154
186
  filename: string;
155
187
  contentType: string;
@@ -246,4 +278,18 @@ export declare class MediaClient extends BaseClient {
246
278
  * @param params.count - How many to return (default 12, max 40)
247
279
  */
248
280
  pfpSearch(params: PfpSearchParams): Promise<ApiResponse<PfpSearchResponse>>;
281
+ /**
282
+ * Search for images and videos by keyword, a page at a time.
283
+ *
284
+ * Pass the previous response's `next_cursor` as `cursor`, with the same
285
+ * `search_term`, to continue. Unlike `pfpSearch`, results already in use are
286
+ * not removed.
287
+ *
288
+ * Requires the `media:search` scope on a restricted key.
289
+ *
290
+ * @param params.search_term - What to search for
291
+ * @param params.count - How many to return (default 24, max 50)
292
+ * @param params.cursor - `next_cursor` from the previous page
293
+ */
294
+ imageSearch(params: ImageSearchParams): Promise<ApiResponse<ImageSearchResponse>>;
249
295
  }
package/dist/media.js CHANGED
@@ -112,5 +112,21 @@ class MediaClient extends base_1.BaseClient {
112
112
  async pfpSearch(params) {
113
113
  return this.post('/media/pfp-search', params);
114
114
  }
115
+ /**
116
+ * Search for images and videos by keyword, a page at a time.
117
+ *
118
+ * Pass the previous response's `next_cursor` as `cursor`, with the same
119
+ * `search_term`, to continue. Unlike `pfpSearch`, results already in use are
120
+ * not removed.
121
+ *
122
+ * Requires the `media:search` scope on a restricted key.
123
+ *
124
+ * @param params.search_term - What to search for
125
+ * @param params.count - How many to return (default 24, max 50)
126
+ * @param params.cursor - `next_cursor` from the previous page
127
+ */
128
+ async imageSearch(params) {
129
+ return this.post('/media/image-search', params);
130
+ }
115
131
  }
116
132
  exports.MediaClient = MediaClient;
@@ -2,7 +2,7 @@
2
2
  * AutoCaptionComposition
3
3
  *
4
4
  * A Remotion composition that renders a video with TikTok-style captions overlay.
5
- * Used for both server-side rendering (Modal) and client-side preview.
5
+ * Used for both server-side rendering (the render worker) and client-side preview.
6
6
  *
7
7
  * Features:
8
8
  * - Video playback with caption overlay
@@ -29,7 +29,7 @@ export interface ScreenshotAnimationProps {
29
29
  }
30
30
  /**
31
31
  * Config for submitting a screenshot animation render job.
32
- * Used by Modal render service to identify this composition type.
32
+ * Used by the render worker to identify this composition type.
33
33
  */
34
34
  export interface ScreenshotAnimationConfig {
35
35
  _compositionType: 'screenshot-animation';
package/dist/stats.d.ts CHANGED
@@ -277,6 +277,9 @@ export declare class StatsClient extends BaseClient {
277
277
  * Returns per-video daily stats with both cumulative values and daily changes.
278
278
  * Perfect for showing per-video performance in chart tooltips.
279
279
  *
280
+ * Each `*_change` is measured against the post's previous stats row, which may be
281
+ * earlier than `startDate`, so a one-day range returns that day's real changes.
282
+ *
280
283
  * @param params - Date range and filter parameters (startDate and endDate required)
281
284
  * @returns Array of daily post statistics with changes
282
285
  *
package/dist/stats.js CHANGED
@@ -100,6 +100,9 @@ class StatsClient extends base_1.BaseClient {
100
100
  * Returns per-video daily stats with both cumulative values and daily changes.
101
101
  * Perfect for showing per-video performance in chart tooltips.
102
102
  *
103
+ * Each `*_change` is measured against the post's previous stats row, which may be
104
+ * earlier than `startDate`, so a one-day range returns that day's real changes.
105
+ *
103
106
  * @param params - Date range and filter parameters (startDate and endDate required)
104
107
  * @returns Array of daily post statistics with changes
105
108
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "4.15.1",
3
+ "version": "4.16.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",