ugcinc 4.8.1 → 4.9.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 +18 -0
- package/dist/posts.d.ts +12 -0
- package/dist/tools/posts.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -109,6 +109,24 @@ await client.posts.createVideo({
|
|
|
109
109
|
});
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
+
## Post Tags
|
|
113
|
+
|
|
114
|
+
Posts carry an optional custom `tag` for categorization (independent of account tags). Set it with
|
|
115
|
+
the `post_tag` param on `posts.createVideo()`, `posts.createSlideshow()`, `posts.createDraft()`, and
|
|
116
|
+
`posts.updatePost()`; it is returned as `tag` on the `Post` object. Note: on the create endpoints,
|
|
117
|
+
the separate `tag` param filters account auto-selection by ACCOUNT tag and is not stored on the post.
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
await client.posts.createVideo({
|
|
121
|
+
accountId: "acc_123",
|
|
122
|
+
videoUrl: "https://example.com/video.mp4",
|
|
123
|
+
caption: "Post description",
|
|
124
|
+
post_tag: "campaign-july",
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
await client.posts.updatePost({ postId: "post_123", post_tag: "campaign-august" });
|
|
128
|
+
```
|
|
129
|
+
|
|
112
130
|
## Useful Exports
|
|
113
131
|
|
|
114
132
|
- `UGCClient` for API access
|
package/dist/posts.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export interface Post {
|
|
|
20
20
|
status: PostStatus;
|
|
21
21
|
social_id: string | null;
|
|
22
22
|
caption: string | null;
|
|
23
|
+
/** Custom tag stored on the post itself (set via `post_tag` on create/update) */
|
|
24
|
+
tag: string | null;
|
|
23
25
|
/** Only returned by createVideo; other post endpoints omit it */
|
|
24
26
|
caption_overlays?: CaptionOverlay[] | null;
|
|
25
27
|
title: string | null;
|
|
@@ -59,9 +61,12 @@ export interface CreateSlideshowParams {
|
|
|
59
61
|
imageUrls: string[];
|
|
60
62
|
strict?: boolean;
|
|
61
63
|
mustPostBy?: string;
|
|
64
|
+
/** Account auto-selection filter: only pick accounts whose ACCOUNT tag matches (not stored on the post) */
|
|
62
65
|
tag?: string;
|
|
63
66
|
user_group?: string;
|
|
64
67
|
org_group?: string;
|
|
68
|
+
/** Tag stored on the created POST itself (returned as `tag` on the Post object) */
|
|
69
|
+
post_tag?: string;
|
|
65
70
|
}
|
|
66
71
|
export interface GetPostStatsParams {
|
|
67
72
|
postIds?: string[];
|
|
@@ -81,9 +86,12 @@ export interface CreateVideoParams {
|
|
|
81
86
|
videoUrl: string;
|
|
82
87
|
strict?: boolean;
|
|
83
88
|
mustPostBy?: string;
|
|
89
|
+
/** Account auto-selection filter: only pick accounts whose ACCOUNT tag matches (not stored on the post) */
|
|
84
90
|
tag?: string;
|
|
85
91
|
user_group?: string;
|
|
86
92
|
org_group?: string;
|
|
93
|
+
/** Tag stored on the created POST itself (returned as `tag` on the Post object) */
|
|
94
|
+
post_tag?: string;
|
|
87
95
|
}
|
|
88
96
|
export interface DeletePostsParams {
|
|
89
97
|
postIds: string[];
|
|
@@ -109,6 +117,8 @@ export interface UpdatePostParams {
|
|
|
109
117
|
postTime?: string;
|
|
110
118
|
accountId?: string;
|
|
111
119
|
mediaUrls?: string[];
|
|
120
|
+
/** New tag stored on the post (returned as `tag` on the Post object) */
|
|
121
|
+
post_tag?: string;
|
|
112
122
|
excludePostIds?: string[];
|
|
113
123
|
}
|
|
114
124
|
export interface SetPostStatusParams {
|
|
@@ -130,6 +140,8 @@ export interface CreateDraftParams {
|
|
|
130
140
|
caption?: string;
|
|
131
141
|
title?: string;
|
|
132
142
|
socialAudioId?: string;
|
|
143
|
+
/** Tag stored on the created POST itself (returned as `tag` on the Post object) */
|
|
144
|
+
post_tag?: string;
|
|
133
145
|
}
|
|
134
146
|
export interface PreviewScheduleParams {
|
|
135
147
|
entries: PreviewScheduleEntry[];
|
package/dist/tools/posts.js
CHANGED
|
@@ -32,6 +32,7 @@ exports.postTools = [
|
|
|
32
32
|
tag: zod_1.z.string().optional().describe('Filter accounts by tag (for auto-selection)'),
|
|
33
33
|
user_group: zod_1.z.string().optional().describe('Filter accounts by user group (for auto-selection)'),
|
|
34
34
|
org_group: zod_1.z.string().optional().describe('Filter accounts by org group (for auto-selection)'),
|
|
35
|
+
post_tag: zod_1.z.string().optional().describe('Tag stored on the created post itself (distinct from the account-filter tag)'),
|
|
35
36
|
}),
|
|
36
37
|
execute: async (client, params) => {
|
|
37
38
|
return client.posts.createVideo(params);
|
|
@@ -52,6 +53,7 @@ exports.postTools = [
|
|
|
52
53
|
tag: zod_1.z.string().optional().describe('Filter accounts by tag (for auto-selection)'),
|
|
53
54
|
user_group: zod_1.z.string().optional().describe('Filter accounts by user group (for auto-selection)'),
|
|
54
55
|
org_group: zod_1.z.string().optional().describe('Filter accounts by org group (for auto-selection)'),
|
|
56
|
+
post_tag: zod_1.z.string().optional().describe('Tag stored on the created post itself (distinct from the account-filter tag)'),
|
|
55
57
|
}),
|
|
56
58
|
execute: async (client, params) => {
|
|
57
59
|
return client.posts.createSlideshow(params);
|
|
@@ -66,6 +68,7 @@ exports.postTools = [
|
|
|
66
68
|
caption: zod_1.z.string().optional().describe('Post caption'),
|
|
67
69
|
title: zod_1.z.string().optional().describe('Slideshow title'),
|
|
68
70
|
socialAudioId: zod_1.z.string().optional().describe('Social audio ID'),
|
|
71
|
+
post_tag: zod_1.z.string().optional().describe('Tag stored on the created post'),
|
|
69
72
|
}),
|
|
70
73
|
execute: async (client, params) => {
|
|
71
74
|
return client.posts.createDraft(params);
|
|
@@ -92,6 +95,7 @@ exports.postTools = [
|
|
|
92
95
|
postTime: zod_1.z.string().optional().describe('New scheduled time (ISO 8601)'),
|
|
93
96
|
accountId: zod_1.z.string().optional().describe('Move post to different account'),
|
|
94
97
|
mediaUrls: zod_1.z.array(zod_1.z.string()).optional().describe('New media URLs'),
|
|
98
|
+
post_tag: zod_1.z.string().optional().describe('New tag stored on the post'),
|
|
95
99
|
}),
|
|
96
100
|
execute: async (client, params) => {
|
|
97
101
|
return client.posts.updatePost(params);
|