ugcinc 2.22.0 → 2.24.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 CHANGED
@@ -1,14 +1,20 @@
1
1
  import { BaseClient } from './base';
2
- import type { Media, UserMedia, SocialAudio, GetMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, ApiResponse } from './types';
2
+ import type { Media, UserMedia, SocialAudio, GetMediaParams, GetSocialAudioParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, ApiResponse } from './types';
3
3
  /**
4
4
  * Client for managing media files
5
5
  */
6
6
  export declare class MediaClient extends BaseClient {
7
7
  /**
8
- * Get all media for the organization
8
+ * Get media for the organization
9
9
  * Returns both user_media and social_audio combined
10
+ * Can filter by ids or tag
10
11
  */
11
12
  getMedia(params?: GetMediaParams): Promise<ApiResponse<Media[]>>;
13
+ /**
14
+ * Get social audio for the organization
15
+ * Can filter by ids or tag
16
+ */
17
+ getSocialAudio(params?: GetSocialAudioParams): Promise<ApiResponse<SocialAudio[]>>;
12
18
  /**
13
19
  * Create media from URL(s)
14
20
  * Creates media records from files already uploaded to blob storage
@@ -27,7 +33,6 @@ export declare class MediaClient extends BaseClient {
27
33
  updateTag(params: UpdateMediaTagParams): Promise<ApiResponse<UserMedia | SocialAudio>>;
28
34
  /**
29
35
  * Delete one or more media items
30
- * Supports both single id and bulk ids
31
36
  * Also deletes the files from blob storage
32
37
  */
33
38
  delete(params: DeleteMediaParams): Promise<ApiResponse<DeleteMediaResponse>>;
package/dist/media.js CHANGED
@@ -7,12 +7,20 @@ const base_1 = require("./base");
7
7
  */
8
8
  class MediaClient extends base_1.BaseClient {
9
9
  /**
10
- * Get all media for the organization
10
+ * Get media for the organization
11
11
  * Returns both user_media and social_audio combined
12
+ * Can filter by ids or tag
12
13
  */
13
14
  async getMedia(params) {
14
15
  return this.post('/media', params ?? {});
15
16
  }
17
+ /**
18
+ * Get social audio for the organization
19
+ * Can filter by ids or tag
20
+ */
21
+ async getSocialAudio(params) {
22
+ return this.post('/media/social-audio', params ?? {});
23
+ }
16
24
  /**
17
25
  * Create media from URL(s)
18
26
  * Creates media records from files already uploaded to blob storage
@@ -41,7 +49,6 @@ class MediaClient extends base_1.BaseClient {
41
49
  }
42
50
  /**
43
51
  * Delete one or more media items
44
- * Supports both single id and bulk ids
45
52
  * Also deletes the files from blob storage
46
53
  */
47
54
  async delete(params) {
@@ -52,7 +59,7 @@ class MediaClient extends base_1.BaseClient {
52
59
  * Extracts audio and cover image from TikTok video or music URL
53
60
  */
54
61
  async createSocialAudio(params) {
55
- return this.post('/media/social-audio', params);
62
+ return this.post('/media/social-audio/upload', params);
56
63
  }
57
64
  }
58
65
  exports.MediaClient = MediaClient;
package/dist/types.d.ts CHANGED
@@ -668,6 +668,11 @@ export interface SocialAudio {
668
668
  }
669
669
  export type Media = UserMedia | SocialAudio;
670
670
  export interface GetMediaParams {
671
+ ids?: string[];
672
+ tag?: string;
673
+ }
674
+ export interface GetSocialAudioParams {
675
+ ids?: string[];
671
676
  tag?: string;
672
677
  }
673
678
  export interface UploadMediaParams {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "2.22.0",
3
+ "version": "2.24.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",