ugcinc 2.76.0 → 2.77.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/dist/media.d.ts +10 -3
- package/dist/media.js +11 -2
- package/dist/types.d.ts +19 -0
- package/package.json +1 -1
package/dist/media.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from './base';
|
|
2
|
-
import type { Media,
|
|
2
|
+
import type { Media, SocialAudio, GetMediaParams, GetSocialAudioParams, UploadMediaResponse, UpdateMediaTagParams, UpdateMediaTagsParams, UpdateMediaTagsResponse, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, GetUploadTokenParams, UploadTokenResponse, ImportTextParams, ImportTextResponse, ApiResponse } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Client for managing media files
|
|
5
5
|
*/
|
|
@@ -27,10 +27,17 @@ export declare class MediaClient extends BaseClient {
|
|
|
27
27
|
*/
|
|
28
28
|
getUploadToken(params: GetUploadTokenParams): Promise<ApiResponse<UploadTokenResponse>>;
|
|
29
29
|
/**
|
|
30
|
-
* Update
|
|
30
|
+
* Update tags on multiple media items in a single request
|
|
31
31
|
* Works for both user_media and social_audio
|
|
32
|
+
* @param params.updates - Array of {id, tag} pairs to update
|
|
32
33
|
*/
|
|
33
|
-
|
|
34
|
+
updateTags(params: UpdateMediaTagsParams): Promise<ApiResponse<UpdateMediaTagsResponse>>;
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Use updateTags() instead for bulk operations
|
|
37
|
+
* Update the tag on a single media item
|
|
38
|
+
* Works for both user_media and social_audio
|
|
39
|
+
*/
|
|
40
|
+
updateTag(params: UpdateMediaTagParams): Promise<ApiResponse<UpdateMediaTagsResponse>>;
|
|
34
41
|
/**
|
|
35
42
|
* Delete one or more media items
|
|
36
43
|
* Also deletes the files from blob storage
|
package/dist/media.js
CHANGED
|
@@ -37,12 +37,21 @@ class MediaClient extends base_1.BaseClient {
|
|
|
37
37
|
return this.post('/media/create/url', params);
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
* Update
|
|
40
|
+
* Update tags on multiple media items in a single request
|
|
41
41
|
* Works for both user_media and social_audio
|
|
42
|
+
* @param params.updates - Array of {id, tag} pairs to update
|
|
42
43
|
*/
|
|
43
|
-
async
|
|
44
|
+
async updateTags(params) {
|
|
44
45
|
return this.post('/media/update-tag', params);
|
|
45
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Use updateTags() instead for bulk operations
|
|
49
|
+
* Update the tag on a single media item
|
|
50
|
+
* Works for both user_media and social_audio
|
|
51
|
+
*/
|
|
52
|
+
async updateTag(params) {
|
|
53
|
+
return this.post('/media/update-tag', { updates: [params] });
|
|
54
|
+
}
|
|
46
55
|
/**
|
|
47
56
|
* Delete one or more media items
|
|
48
57
|
* Also deletes the files from blob storage
|
package/dist/types.d.ts
CHANGED
|
@@ -1006,6 +1006,25 @@ export interface UploadMediaResponse {
|
|
|
1006
1006
|
}>;
|
|
1007
1007
|
message: string;
|
|
1008
1008
|
}
|
|
1009
|
+
export interface MediaTagUpdate {
|
|
1010
|
+
id: string;
|
|
1011
|
+
tag: string;
|
|
1012
|
+
}
|
|
1013
|
+
export interface UpdateMediaTagsParams {
|
|
1014
|
+
updates: MediaTagUpdate[];
|
|
1015
|
+
}
|
|
1016
|
+
export interface MediaTagUpdateResult {
|
|
1017
|
+
id: string;
|
|
1018
|
+
success: boolean;
|
|
1019
|
+
media?: Media;
|
|
1020
|
+
error?: string;
|
|
1021
|
+
}
|
|
1022
|
+
export interface UpdateMediaTagsResponse {
|
|
1023
|
+
results: MediaTagUpdateResult[];
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* @deprecated Use UpdateMediaTagsParams instead for bulk operations
|
|
1027
|
+
*/
|
|
1009
1028
|
export interface UpdateMediaTagParams {
|
|
1010
1029
|
id: string;
|
|
1011
1030
|
tag: string;
|