ugcinc 5.5.2 → 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 +10 -1
- 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/stats.d.ts +20 -0
- package/dist/tools/posts.js +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ if (res.ok) {
|
|
|
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
46
|
- `client.media`: upload media, create media records, search profile-picture candidates, search images and videos by keyword (`media.imageSearch`, cursor-paged), manage tags/names, and work with social audio
|
|
47
|
-
- `client.stats`: fetch account/post analytics, daily aggregates, top performers, refresh stats, and check stats freshness
|
|
47
|
+
- `client.stats`: fetch account/post analytics, daily aggregates, top performers, refresh stats, and check stats freshness. Daily stats methods take an optional `timezone` (IANA name, default UTC): days are calendar days in that zone.
|
|
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
|
|
50
50
|
- `client.automations`: create, run, publish, export, and monitor automation workflows
|
|
@@ -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/stats.d.ts
CHANGED
|
@@ -59,6 +59,11 @@ export interface DailyAggregatedStat {
|
|
|
59
59
|
export interface GetDailyAggregatedStatsParams {
|
|
60
60
|
startDate: string;
|
|
61
61
|
endDate: string;
|
|
62
|
+
/**
|
|
63
|
+
* IANA time zone whose calendar days the result uses, for example 'America/Los_Angeles'.
|
|
64
|
+
* startDate and endDate name days in this zone. Defaults to UTC.
|
|
65
|
+
*/
|
|
66
|
+
timezone?: string;
|
|
62
67
|
accountIds?: string[];
|
|
63
68
|
tag?: string;
|
|
64
69
|
org_group?: string;
|
|
@@ -75,6 +80,11 @@ export interface DailyAccountStat {
|
|
|
75
80
|
export interface GetDailyAccountStatsParams {
|
|
76
81
|
startDate: string;
|
|
77
82
|
endDate: string;
|
|
83
|
+
/**
|
|
84
|
+
* IANA time zone whose calendar days the result uses, for example 'America/Los_Angeles'.
|
|
85
|
+
* startDate and endDate name days in this zone. Defaults to UTC.
|
|
86
|
+
*/
|
|
87
|
+
timezone?: string;
|
|
78
88
|
accountIds?: string[];
|
|
79
89
|
tag?: string;
|
|
80
90
|
org_group?: string;
|
|
@@ -103,6 +113,11 @@ export interface DailyPostStat {
|
|
|
103
113
|
export interface GetDailyPostStatsParams {
|
|
104
114
|
startDate: string;
|
|
105
115
|
endDate: string;
|
|
116
|
+
/**
|
|
117
|
+
* IANA time zone whose calendar days the result uses, for example 'America/Los_Angeles'.
|
|
118
|
+
* startDate and endDate name days in this zone. Defaults to UTC.
|
|
119
|
+
*/
|
|
120
|
+
timezone?: string;
|
|
106
121
|
accountIds?: string[];
|
|
107
122
|
tag?: string;
|
|
108
123
|
org_group?: string;
|
|
@@ -127,6 +142,11 @@ export interface DashboardDailyStat {
|
|
|
127
142
|
export interface GetDashboardDailyStatsParams {
|
|
128
143
|
startDate: string;
|
|
129
144
|
endDate: string;
|
|
145
|
+
/**
|
|
146
|
+
* IANA time zone whose calendar days the result uses, for example 'America/Los_Angeles'.
|
|
147
|
+
* startDate and endDate name days in this zone. Defaults to UTC.
|
|
148
|
+
*/
|
|
149
|
+
timezone?: string;
|
|
130
150
|
accountIds?: string[];
|
|
131
151
|
tag?: string;
|
|
132
152
|
org_group?: string;
|
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".',
|