ugcinc 4.11.0 → 4.12.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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/media.d.ts +33 -0
- package/dist/media.js +16 -0
- package/package.json +1 -1
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
|
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;
|