ugcinc 4.11.0 → 4.13.0

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, manage tags/names, and work with social audio
46
+ - `client.media`: upload media, create media records, search profile-picture candidates, 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
@@ -96,6 +96,8 @@ export interface EditProfileInfo {
96
96
  }
97
97
  export interface GetAccountsParams {
98
98
  tag?: string;
99
+ /** Platform filter: only accounts of this type are returned. */
100
+ type?: 'tiktok' | 'instagram';
99
101
  org_group?: string;
100
102
  user_group?: string;
101
103
  status?: AccountStatus;
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, 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, GetUploadTokenParams, UploadTokenResponse, } 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, GetUploadTokenParams, UploadTokenResponse, } 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
@@ -131,6 +131,25 @@ export interface FilterMediaResponse {
131
131
  used_count: number;
132
132
  available_count: number;
133
133
  }
134
+ export interface PfpSearchParams {
135
+ /** What to search for, e.g. "black girl selfie" or "asian woman aesthetic". */
136
+ search_term: string;
137
+ /** How many pictures to return. Defaults to 12, capped at 40. */
138
+ count?: number;
139
+ }
140
+ export interface PfpCandidate {
141
+ /** Stable id for this picture at the source. */
142
+ source_id: string;
143
+ /** Full-resolution image — the one an account's avatar is set to. */
144
+ url: string;
145
+ /** Smaller variant, for rendering a grid of options. */
146
+ preview_url: string;
147
+ }
148
+ export interface PfpSearchResponse {
149
+ pictures: PfpCandidate[];
150
+ search_term: string;
151
+ count: number;
152
+ }
134
153
  export interface GetUploadTokenParams {
135
154
  filename: string;
136
155
  contentType?: string;
@@ -212,4 +231,18 @@ export declare class MediaClient extends BaseClient {
212
231
  * @param params.name - Use case identifier (e.g., "profile_picture")
213
232
  */
214
233
  filter(params: FilterMediaParams): Promise<ApiResponse<FilterMediaResponse>>;
234
+ /**
235
+ * Search for profile-picture candidates for a search term.
236
+ *
237
+ * Pictures already in use as a profile picture are removed before the result
238
+ * comes back, so two accounts cannot end up wearing the same face. Sourcing
239
+ * and filtering are one call for that reason — a caller who forgot the second
240
+ * step would get duplicates across their accounts and find out much later.
241
+ *
242
+ * Requires the `media:search` scope on a restricted key.
243
+ *
244
+ * @param params.search_term - What to search for
245
+ * @param params.count - How many to return (default 12, max 40)
246
+ */
247
+ pfpSearch(params: PfpSearchParams): Promise<ApiResponse<PfpSearchResponse>>;
215
248
  }
package/dist/media.js CHANGED
@@ -99,5 +99,21 @@ class MediaClient extends base_1.BaseClient {
99
99
  async filter(params) {
100
100
  return this.post('/media/filter', params);
101
101
  }
102
+ /**
103
+ * Search for profile-picture candidates for a search term.
104
+ *
105
+ * Pictures already in use as a profile picture are removed before the result
106
+ * comes back, so two accounts cannot end up wearing the same face. Sourcing
107
+ * and filtering are one call for that reason — a caller who forgot the second
108
+ * step would get duplicates across their accounts and find out much later.
109
+ *
110
+ * Requires the `media:search` scope on a restricted key.
111
+ *
112
+ * @param params.search_term - What to search for
113
+ * @param params.count - How many to return (default 12, max 40)
114
+ */
115
+ async pfpSearch(params) {
116
+ return this.post('/media/pfp-search', params);
117
+ }
102
118
  }
103
119
  exports.MediaClient = MediaClient;
@@ -8,6 +8,7 @@ exports.accountTools = [
8
8
  description: 'List accounts with optional filters. Returns all accounts if no filters provided.',
9
9
  schema: zod_1.z.object({
10
10
  tag: zod_1.z.string().optional().describe('Filter by tag'),
11
+ type: zod_1.z.enum(['tiktok', 'instagram']).optional().describe('Filter by platform'),
11
12
  org_group: zod_1.z.string().optional().describe('Filter by org group'),
12
13
  user_group: zod_1.z.string().optional().describe('Filter by user group'),
13
14
  status: zod_1.z.enum(['uninitialized', 'pending', 'initialized', 'setup', 'warming', 'warmed', 'needs_replacement', 'replacing', 'failed', 'deleted']).optional().describe('Filter by account status'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "4.11.0",
3
+ "version": "4.13.0",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",