ugcinc 5.6.0 → 5.7.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 +9 -0
- package/dist/index.d.ts +1 -1
- package/dist/posts.d.ts +19 -0
- package/dist/posts.js +8 -0
- package/dist/skills.js +6 -0
- package/dist/tools/posts.js +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -88,6 +88,15 @@ if (result.ok && result.data.failure) {
|
|
|
88
88
|
|
|
89
89
|
See the posting failure reference below for recovery states and messages.
|
|
90
90
|
|
|
91
|
+
## Marking a manually posted post
|
|
92
|
+
|
|
93
|
+
For accounts your team posts by hand, `posts.markPosted()` tells UGC Inc a post is live. Without `socialId` a scheduled post becomes `pending` and is completed when the live post is found; with `socialId` (the number in a TikTok video link) it is linked and completed at once. Posts of other accounts, and posts that are not scheduled or pending, are refused.
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
const marked = await client.posts.markPosted({ postId: "post_123", socialId: "7234567890123456789" });
|
|
97
|
+
if (marked.ok) console.log(marked.data.action, marked.data.status);
|
|
98
|
+
```
|
|
99
|
+
|
|
91
100
|
## Pagination
|
|
92
101
|
|
|
93
102
|
`accounts.getAccounts()` and `posts.getPosts()` support keyset pagination via `limit`/`cursor`.
|
package/dist/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export type { InputType } from './automations/nodes/types';
|
|
|
32
32
|
export type { ClientConfig } from './base';
|
|
33
33
|
export type { Account, AccountStatus, AccountStat, AccountTask, QuarantineAccountParams, ReleaseAccountParams, QuarantineAccountResponse, EditProfileInfo, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, AccountInfoUpdate, UpdateAccountInfoParams, AccountInfoUpdateResult, UpdateAccountInfoResponse, AccountSocialUpdate, UpdateAccountSocialParams, AccountSocialUpdateResult, UpdateAccountSocialResponse, DeleteAccountPostsParams, DeleteAccountPostsResponse, ResetWarmupParams, ResetWarmupResponse, NicheSwitchUpdate, NicheSwitchParams, NicheSwitchResult, NicheSwitchResponse, CreateAccountInput, CreateAccountsParams, CreateAccountResult, CreateAccountsResponse, TroubleshootFailReason, TroubleshootAccount, TroubleshootParams, } from './accounts';
|
|
34
34
|
export type { TaskType, Task, GetTasksParams } from './tasks';
|
|
35
|
-
export type { PostType, PostStatus, Post, PostStat, CaptionOverlay, GetPostsParams, GetPostsPageParams, PostsPage, PostSortField, PostSortDirection, CreateDraftParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, UpdatePostParams, DeletePostsParams, DeletePostsResponse, RetryPostsParams, SetPostStatusParams, SetPostStatusResponse, PreviewScheduleEntry, PreviewScheduleParams, PreviewScheduleResult, } from './posts';
|
|
35
|
+
export type { PostType, PostStatus, Post, PostStat, CaptionOverlay, GetPostsParams, GetPostsPageParams, PostsPage, PostSortField, PostSortDirection, CreateDraftParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, MarkPostedParams, MarkPostedResult, CreateVideoParams, UpdatePostParams, DeletePostsParams, DeletePostsResponse, RetryPostsParams, SetPostStatusParams, SetPostStatusResponse, PreviewScheduleEntry, PreviewScheduleParams, PreviewScheduleResult, } from './posts';
|
|
36
36
|
export type { RefreshStatsParams, RefreshStatsError, RefreshStatsResponse, RefreshStatsProgressResponse, StatsSyncStatus, RefreshStartEvent, RefreshProgressEvent, RefreshDoneEvent, RefreshStreamEvent, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyAccountStat, GetDailyAccountStatsParams, DailyPostStat, GetDailyPostStatsParams, DashboardDailyStat, GetDashboardDailyStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, } from './stats';
|
|
37
37
|
export type { Org, ApiKey, DeleteApiKeyParams, EditApiKeyParams, IntegrationKey, IntegrationProvider, UpsertIntegrationKeyParams, DeleteIntegrationKeyParams } from './org';
|
|
38
38
|
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, ImageSearchParams, ImageSearchResult, ImageSearchResponse, ImageSearchVideoFormat, } from './media';
|
package/dist/posts.d.ts
CHANGED
|
@@ -134,6 +134,19 @@ export interface GetPostStatsParams {
|
|
|
134
134
|
export interface GetPostStatusParams {
|
|
135
135
|
postId: string;
|
|
136
136
|
}
|
|
137
|
+
export interface MarkPostedParams {
|
|
138
|
+
postId: string;
|
|
139
|
+
/** The platform's id of the live post (e.g. the number in a TikTok video link). With it the post is completed at once. */
|
|
140
|
+
socialId?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface MarkPostedResult {
|
|
143
|
+
post_id: string;
|
|
144
|
+
/** What the call did: `start_monitoring` (now pending, completed when the live post is found), `associate` (linked and completed) or `unchanged`. */
|
|
145
|
+
action: 'start_monitoring' | 'associate' | 'unchanged';
|
|
146
|
+
previous_status: string;
|
|
147
|
+
status: string;
|
|
148
|
+
social_id: string | null;
|
|
149
|
+
}
|
|
137
150
|
export interface CreateVideoParams {
|
|
138
151
|
accountId: string | null;
|
|
139
152
|
caption?: string;
|
|
@@ -256,6 +269,12 @@ export declare class PostsClient extends BaseClient {
|
|
|
256
269
|
fail_category: PostFailCategory | null;
|
|
257
270
|
failure: PublicPostFailure | null;
|
|
258
271
|
}>>;
|
|
272
|
+
/**
|
|
273
|
+
* Mark a post of a manually posted account as posted.
|
|
274
|
+
* Without socialId a scheduled post becomes pending and is completed when the live post is found;
|
|
275
|
+
* with socialId it is linked to that post and completed.
|
|
276
|
+
*/
|
|
277
|
+
markPosted(params: MarkPostedParams): Promise<ApiResponse<MarkPostedResult>>;
|
|
259
278
|
/**
|
|
260
279
|
* Create a video post
|
|
261
280
|
*/
|
package/dist/posts.js
CHANGED
|
@@ -43,6 +43,14 @@ class PostsClient extends base_1.BaseClient {
|
|
|
43
43
|
async getStatus(params) {
|
|
44
44
|
return this.post('/post/status', params);
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Mark a post of a manually posted account as posted.
|
|
48
|
+
* Without socialId a scheduled post becomes pending and is completed when the live post is found;
|
|
49
|
+
* with socialId it is linked to that post and completed.
|
|
50
|
+
*/
|
|
51
|
+
async markPosted(params) {
|
|
52
|
+
return this.post('/post/mark-posted', params);
|
|
53
|
+
}
|
|
46
54
|
/**
|
|
47
55
|
* Create a video post
|
|
48
56
|
*/
|
package/dist/skills.js
CHANGED
|
@@ -129,6 +129,12 @@ Check post status. Returns platform URL when complete.
|
|
|
129
129
|
${run} get_post_status '{"postId":"id"}'
|
|
130
130
|
\`\`\`
|
|
131
131
|
|
|
132
|
+
### mark_post_posted
|
|
133
|
+
Mark a post of a manually posted account as posted. Without socialId a scheduled post becomes pending and is completed when the live post is found; with socialId it is linked and completed.
|
|
134
|
+
\`\`\`bash
|
|
135
|
+
${run} mark_post_posted '{"postId":"id","socialId":"7234567890123456789"}'
|
|
136
|
+
\`\`\`
|
|
137
|
+
|
|
132
138
|
### update_post
|
|
133
139
|
Update a scheduled or failed post. Failed posts reset to "scheduled".
|
|
134
140
|
\`\`\`bash
|
package/dist/tools/posts.js
CHANGED
|
@@ -87,6 +87,17 @@ exports.postTools = [
|
|
|
87
87
|
return client.posts.getStatus(params);
|
|
88
88
|
},
|
|
89
89
|
},
|
|
90
|
+
{
|
|
91
|
+
name: 'mark_post_posted',
|
|
92
|
+
description: 'Mark a post of a manually posted account as posted. Without socialId a scheduled post becomes pending and is completed when the live post is found; with socialId it is linked to that post and completed.',
|
|
93
|
+
schema: zod_1.z.object({
|
|
94
|
+
postId: zod_1.z.string().describe('Post ID to mark'),
|
|
95
|
+
socialId: zod_1.z.string().optional().describe("The platform's id of the live post"),
|
|
96
|
+
}),
|
|
97
|
+
execute: async (client, params) => {
|
|
98
|
+
return client.posts.markPosted(params);
|
|
99
|
+
},
|
|
100
|
+
},
|
|
90
101
|
{
|
|
91
102
|
name: 'update_post',
|
|
92
103
|
description: 'Update a draft, scheduled, or failed post. Draft posts transition to "scheduled" when given both accountId and postTime. Failed posts are reset to "scheduled".',
|