ugcinc 4.18.0 → 4.19.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 -86
- package/dist/accounts.d.ts +0 -2
- package/dist/automations/nodes/index.d.ts +2 -1
- package/dist/automations/nodes/remotion-composition.d.ts +4 -2
- package/dist/automations/nodes/remotion-composition.js +3 -3
- package/dist/index.d.ts +2 -3
- package/dist/media.d.ts +0 -79
- package/dist/media.js +0 -32
- package/dist/posts.d.ts +1 -57
- package/dist/posts.js +0 -7
- package/dist/render/compositions/IMessageDmComposition/types.d.ts +2 -2
- package/dist/render/types/remotion-composition.d.ts +11 -8
- package/dist/render/types/remotion-composition.js +1 -0
- package/dist/render.d.ts +3 -1
- package/dist/render.js +5 -2
- package/dist/tools/accounts.js +0 -1
- package/dist/tools/posts.js +0 -4
- package/dist/types.d.ts +0 -1
- package/package.json +1 -1
- package/dist/post-failure.d.ts +0 -10
- package/dist/post-failure.js +0 -2
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ if (res.ok) {
|
|
|
43
43
|
|
|
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
|
-
- `client.media`: upload media, create media records,
|
|
46
|
+
- `client.media`: upload media, create media records, manage tags/names, and work with social audio
|
|
47
47
|
- `client.stats`: fetch account/post analytics, daily aggregates, top performers, and refresh stats
|
|
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
|
|
@@ -74,20 +74,6 @@ if (posts.ok) {
|
|
|
74
74
|
}
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
## Posting failure quick reference
|
|
78
|
-
|
|
79
|
-
`posts.getStatus()` returns `failure`; both `getPosts()` and `getPostsPage()` include it on each post. It is `null` when there is no current posting issue. A successful lookup still returns HTTP 200 even if the post failed.
|
|
80
|
-
|
|
81
|
-
```typescript
|
|
82
|
-
const result = await client.posts.getStatus({ postId: "post_123" });
|
|
83
|
-
if (result.ok && result.data.failure) {
|
|
84
|
-
const { code, message, recovery, next_action } = result.data.failure;
|
|
85
|
-
console.log(code, message, recovery, next_action);
|
|
86
|
-
}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
See the posting failure reference below for recovery states and messages.
|
|
90
|
-
|
|
91
77
|
## Pagination
|
|
92
78
|
|
|
93
79
|
`accounts.getAccounts()` and `posts.getPosts()` support keyset pagination via `limit`/`cursor`.
|
|
@@ -107,28 +93,6 @@ do {
|
|
|
107
93
|
} while (cursor);
|
|
108
94
|
```
|
|
109
95
|
|
|
110
|
-
For interactive tables, `posts.getPostsPage()` keeps filtering and sorting on the server and
|
|
111
|
-
returns page-scoped latest stats plus `totalCount`, organization-wide `postTags`,
|
|
112
|
-
`anyHasTitle`, and `matchingAccountIds`. It supports caption/title/account search; platform,
|
|
113
|
-
post type, status, account, account-tag, post-tag, social-audio, and phone-type filters; and
|
|
114
|
-
sorting by account, status, title, caption, tag, audio presence, scheduled time, or engagement:
|
|
115
|
-
|
|
116
|
-
```typescript
|
|
117
|
-
const page = await client.posts.getPostsPage({
|
|
118
|
-
search: "launch",
|
|
119
|
-
statuses: ["complete"],
|
|
120
|
-
postTags: ["fall-campaign"],
|
|
121
|
-
sortBy: "views",
|
|
122
|
-
sortDirection: "desc",
|
|
123
|
-
limit: 200,
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
if (page.ok) {
|
|
127
|
-
console.log(page.data.posts, page.data.stats, page.data.totalCount);
|
|
128
|
-
const next = page.data.nextCursor;
|
|
129
|
-
}
|
|
130
|
-
```
|
|
131
|
-
|
|
132
96
|
## Caption Overlays
|
|
133
97
|
|
|
134
98
|
Video posts can carry text overlays to display on the video. Pass `captionOverlays` to
|
|
@@ -180,28 +144,6 @@ await client.posts.createVideo({
|
|
|
180
144
|
await client.posts.updatePost({ postId: "post_123", post_tag: "campaign-august" });
|
|
181
145
|
```
|
|
182
146
|
|
|
183
|
-
When a post fails, its category is appended to the tag as `fail reason: <fail_category>` (for
|
|
184
|
-
example `campaign-july fail reason: device_error`), so a post list shows why without a status call
|
|
185
|
-
per post. The suffix is removed again when the post is retried.
|
|
186
|
-
|
|
187
|
-
## Backup Audio
|
|
188
|
-
|
|
189
|
-
A post can carry a second sound. If the platform refuses the primary sound at posting time, the
|
|
190
|
-
backup becomes the post's `social_audio_id`, the post is re-attempted once, ` switched to backup
|
|
191
|
-
audio` is appended to its `tag`, and `backup_audio_used_at` is set. With no backup left the post
|
|
192
|
-
fails as `audio_unavailable` and is not retried. Set it with `backupSocialAudioId` on
|
|
193
|
-
`posts.createVideo()`, `posts.createSlideshow()`, `posts.createDraft()`, and `posts.updatePost()`
|
|
194
|
-
(`null` clears it on update).
|
|
195
|
-
|
|
196
|
-
```typescript
|
|
197
|
-
await client.posts.createSlideshow({
|
|
198
|
-
accountId: "acc_123",
|
|
199
|
-
imageUrls: ["https://example.com/img1.jpg"],
|
|
200
|
-
socialAudioId: "audio_primary",
|
|
201
|
-
backupSocialAudioId: "audio_fallback",
|
|
202
|
-
});
|
|
203
|
-
```
|
|
204
|
-
|
|
205
147
|
## Useful Exports
|
|
206
148
|
|
|
207
149
|
- `UGCClient` for API access
|
|
@@ -220,33 +162,6 @@ For the full endpoint reference, all method signatures, data structures, and wor
|
|
|
220
162
|
|
|
221
163
|
MIT
|
|
222
164
|
|
|
223
|
-
## Posting failure reference
|
|
224
|
-
|
|
225
|
-
The same `failure` object is returned by status and list responses. It contains a stable `code`, a fixed `message`, a `recovery` state, and `next_action`.
|
|
226
|
-
|
|
227
|
-
| Recovery | Meaning |
|
|
228
|
-
|---|---|
|
|
229
|
-
| `retry_pending` | The existing post is waiting for another attempt; no execution time is guaranteed. |
|
|
230
|
-
| `waiting` | The existing post is paused until a publishing issue is resolved. |
|
|
231
|
-
| `verifying_publication` | Publication is being checked before another attempt is allowed. |
|
|
232
|
-
| `stopped` | No automatic recovery is indicated. Follow `next_action`. |
|
|
233
|
-
|
|
234
|
-
`next_action` is `wait`, `change_audio`, `change_audio_or_contact_support`, or `contact_support`. When it is `wait`, do not submit another copy. Account and publishing operations are handled by the service; these messages never ask customers to manage them.
|
|
235
|
-
|
|
236
|
-
| Code | Message |
|
|
237
|
-
|---|---|
|
|
238
|
-
| `AUDIO_UNAVAILABLE` | The selected sound is unavailable. Choose another sound and retry. |
|
|
239
|
-
| `BACKUP_AUDIO_RETRY_PENDING` | The selected sound was unavailable. Your post is waiting to be retried with its backup sound. |
|
|
240
|
-
| `AUDIO_RETRY_PENDING` | The selected sound could not be loaded. Your post is waiting to be retried. |
|
|
241
|
-
| `AUDIO_PREPARATION_FAILED` | The selected sound could not be prepared for this post. Choose another sound or contact support before retrying. |
|
|
242
|
-
| `PUBLISHING_RETRY_PENDING` | Publishing was temporarily interrupted. Your post is waiting to be retried. No action is needed. |
|
|
243
|
-
| `PUBLISHING_BLOCKED` | A publishing issue prevented this post from proceeding. Contact support for help with this post. |
|
|
244
|
-
| `POST_PROCESSING_FAILED` | A processing error prevented this posting attempt from completing. Contact support before retrying. |
|
|
245
|
-
| `PUBLICATION_CHECK_IN_PROGRESS` | We’re checking whether your post published. Please wait before submitting it again to avoid a duplicate. |
|
|
246
|
-
| `PUBLICATION_UNCONFIRMED` | We couldn’t confirm whether your post published. Contact support before submitting it again to avoid a duplicate. |
|
|
247
|
-
| `POST_RETRY_PENDING` | The previous posting attempt did not complete. Your post is waiting to be retried. No action is needed. |
|
|
248
|
-
| `POST_FAILED` | The posting attempt failed, but we couldn’t determine the cause. Contact support before submitting it again. |
|
|
249
|
-
|
|
250
165
|
### Render a supplied Remotion composition
|
|
251
166
|
|
|
252
167
|
`remotion-composition` accepts a TSX module whose default export is a React
|
|
@@ -280,3 +195,12 @@ status/logs to inspect failures and the returned video for preview.
|
|
|
280
195
|
|
|
281
196
|
Server integrations can also call `submitRemotionCompositionRenderJob` and
|
|
282
197
|
`getRenderJobStatus` with the configured render-worker origin.
|
|
198
|
+
|
|
199
|
+
### Remotion composition PNG output
|
|
200
|
+
|
|
201
|
+
The `remotion-composition` workflow node accepts `outputType: "image"` to render
|
|
202
|
+
the first composition frame as a PNG. Its output port becomes `image`; video
|
|
203
|
+
remains the default for existing workflows. Pass sound assets separately for
|
|
204
|
+
photo posts because PNG files contain no audio. The public render helper
|
|
205
|
+
`submitRemotionCompositionRenderJob({...composition, outputType: "image"})`
|
|
206
|
+
supports the same option.
|
package/dist/accounts.d.ts
CHANGED
|
@@ -96,8 +96,6 @@ export interface EditProfileInfo {
|
|
|
96
96
|
}
|
|
97
97
|
export interface GetAccountsParams {
|
|
98
98
|
tag?: string;
|
|
99
|
-
/** Platform filter: only accounts of this type are returned. */
|
|
100
|
-
type?: 'tiktok' | 'instagram';
|
|
101
99
|
org_group?: string;
|
|
102
100
|
user_group?: string;
|
|
103
101
|
status?: AccountStatus;
|
|
@@ -336,8 +336,9 @@ export declare const nodeDefinitions: {
|
|
|
336
336
|
source: string;
|
|
337
337
|
outputMode: "per-input" | "single";
|
|
338
338
|
selectionMode: null;
|
|
339
|
+
outputType: "video" | "image";
|
|
339
340
|
inputs: {
|
|
340
|
-
type: "number" | "boolean" | "object" | "video" | "
|
|
341
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
341
342
|
id: string;
|
|
342
343
|
isArray: boolean;
|
|
343
344
|
required: boolean;
|
|
@@ -7,8 +7,9 @@ declare const defaults: {
|
|
|
7
7
|
source: string;
|
|
8
8
|
outputMode: "per-input" | "single";
|
|
9
9
|
selectionMode: null;
|
|
10
|
+
outputType: "video" | "image";
|
|
10
11
|
inputs: {
|
|
11
|
-
type: "number" | "boolean" | "object" | "video" | "
|
|
12
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
12
13
|
id: string;
|
|
13
14
|
isArray: boolean;
|
|
14
15
|
required: boolean;
|
|
@@ -23,8 +24,9 @@ declare const _default: import("./types").NodeDefinition<"remotion-composition",
|
|
|
23
24
|
source: string;
|
|
24
25
|
outputMode: "per-input" | "single";
|
|
25
26
|
selectionMode: null;
|
|
27
|
+
outputType: "video" | "image";
|
|
26
28
|
inputs: {
|
|
27
|
-
type: "number" | "boolean" | "object" | "video" | "
|
|
29
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
28
30
|
id: string;
|
|
29
31
|
isArray: boolean;
|
|
30
32
|
required: boolean;
|
|
@@ -14,12 +14,12 @@ export default function Video({title}: {title: string}) {
|
|
|
14
14
|
});
|
|
15
15
|
const definition = (0, types_1.defineNode)({
|
|
16
16
|
nodeId: 'remotion-composition', label: 'Remotion Composition',
|
|
17
|
-
description: 'Render a React/TSX composition
|
|
18
|
-
guide: 'Supply a TSX module with a default-exported React component. UGC registers and bundles it. Import react, remotion or ugcinc/render (including its utils/types subpaths). Configure dimensions, fps, frame count and default inputProps. Add typed input ports whose IDs match component props; connected values override defaults. Media props retain their {url} shape. Source is browser code: no local files, npm installs, require or dynamic imports.
|
|
17
|
+
description: 'Render a React/TSX composition as a video or PNG',
|
|
18
|
+
guide: 'Supply a TSX module with a default-exported React component. UGC registers and bundles it. Import react, remotion or ugcinc/render (including its utils/types subpaths). Configure dimensions, fps, frame count and default inputProps. Add typed input ports whose IDs match component props; connected values override defaults. Media props retain their {url} shape. Source is browser code: no local files, npm installs, require or dynamic imports. Set outputType to video (default) or image (first-frame PNG); use Save to Media or Pass Through. Image output does not embed audio. Run preview uses the same renderer as the final output.',
|
|
19
19
|
type: 'generator', category: 'Generation', outputModes: ['per-input', 'single'], selectionModes: null,
|
|
20
20
|
defaults,
|
|
21
21
|
computePorts: ({ config }) => ({ inputs: config.inputs,
|
|
22
|
-
outputs: [{ id: 'output', type: 'video', isArray: false, required: true }] }),
|
|
22
|
+
outputs: [{ id: 'output', type: config.outputType === 'image' ? 'image' : 'video', isArray: false, required: true }] }),
|
|
23
23
|
generatePreview: (_config, _ctx, cached) => (0, types_1.preview)({ output: cached?.output ?? null }),
|
|
24
24
|
validate: config => {
|
|
25
25
|
const result = remotion_composition_1.remotionCompositionNodeSchema.safeParse(config);
|
package/dist/index.d.ts
CHANGED
|
@@ -30,10 +30,10 @@ export type { InputType } from './automations/nodes/types';
|
|
|
30
30
|
export type { ClientConfig } from './base';
|
|
31
31
|
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';
|
|
32
32
|
export type { TaskType, Task, GetTasksParams } from './tasks';
|
|
33
|
-
export type { PostType, PostStatus, Post, PostStat, CaptionOverlay, GetPostsParams,
|
|
33
|
+
export type { PostType, PostStatus, Post, PostStat, CaptionOverlay, GetPostsParams, CreateDraftParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, UpdatePostParams, DeletePostsParams, DeletePostsResponse, RetryPostsParams, SetPostStatusParams, SetPostStatusResponse, PreviewScheduleEntry, PreviewScheduleParams, PreviewScheduleResult, } from './posts';
|
|
34
34
|
export type { RefreshStatsParams, RefreshStatsError, RefreshStatsResponse, RefreshStatsProgressResponse, RefreshStartEvent, RefreshProgressEvent, RefreshDoneEvent, RefreshStreamEvent, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyAccountStat, GetDailyAccountStatsParams, DailyPostStat, GetDailyPostStatsParams, DashboardDailyStat, GetDashboardDailyStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, } from './stats';
|
|
35
35
|
export type { Org, ApiKey, DeleteApiKeyParams, EditApiKeyParams, IntegrationKey, IntegrationProvider, UpsertIntegrationKeyParams, DeleteIntegrationKeyParams } from './org';
|
|
36
|
-
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,
|
|
36
|
+
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, } from './media';
|
|
37
37
|
export type { CommentStatus, Comment, CreateCommentParams, CreateCommentResponse, GetCommentsParams, } from './comments';
|
|
38
38
|
export type { BillingInfo, PortalUrlResponse, CancelAccountParams, CancelAccountResponse, ReactivateAccountParams, ReactivateAccountResponse, CancelSubscriptionResponse, RequestReplacementParams, RequestReplacementResponse, RequestRefundParams, RequestRefundResponse, BillingRequestInfo, PortalParams, } from './billing';
|
|
39
39
|
export type { RenderJobResponse, RenderJobStatus, SubmitImageRenderJobParams, SubmitVideoRenderJobParams, SubmitScreenshotAnimationRenderJobParams, SubmitAutoCaptionRenderJobParams, SubmitSceneSplitJobParams, SceneSplitDetectorConfig, SubmitInstagramDmRenderJobParams, SubmitIMessageDmRenderJobParams, IgDmMessage, ImDmMessage, RenderVideoEditorConfig, } from './render';
|
|
@@ -84,4 +84,3 @@ export type { NodeDefinition, NodeType, UserCreatableNodeType, NodeConfig, Workf
|
|
|
84
84
|
export type { SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, NodeCategory, TriggerIterationMode, IterationExhaustionBehavior, CollectionSelectionMode, TriggerCollectionConfig, MediaItemType, MediaNodeSelectionType, ResolvedPreview, PreviewSelectionState, PreviewContext, NullableOutputs, } from './automations/nodes/types';
|
|
85
85
|
export type { SuccessResponse, ErrorResponse, ApiResponse, } from './types';
|
|
86
86
|
export type { CropBoundary, CropAxisConfig, DynamicCropConfig, BorderRadiusConfig, VerticalAnchor, HorizontalAnchor, HorizontalSelfAnchor, VerticalSelfAnchor, RelativePositionConfigX, RelativePositionConfigY, } from './render/types';
|
|
87
|
-
export type { PublicPostFailureCode, PublicPostRecovery, PublicPostNextAction, PublicPostFailure } from './post-failure';
|
package/dist/media.d.ts
CHANGED
|
@@ -131,57 +131,6 @@ export interface FilterMediaResponse {
|
|
|
131
131
|
used_count: number;
|
|
132
132
|
available_count: number;
|
|
133
133
|
}
|
|
134
|
-
export interface PfpSearchParams {
|
|
135
|
-
/** What to search for, e.g. "black girl selfie" or "asian woman aesthetic". */
|
|
136
|
-
search_term: string;
|
|
137
|
-
/** How many pictures to return. Defaults to 12, capped at 40. */
|
|
138
|
-
count?: number;
|
|
139
|
-
}
|
|
140
|
-
export interface PfpCandidate {
|
|
141
|
-
/** Stable id for this picture at the source. */
|
|
142
|
-
source_id: string;
|
|
143
|
-
/** Full-resolution image — the one an account's avatar is set to. */
|
|
144
|
-
url: string;
|
|
145
|
-
/** Smaller variant, for rendering a grid of options. */
|
|
146
|
-
preview_url: string;
|
|
147
|
-
}
|
|
148
|
-
export interface PfpSearchResponse {
|
|
149
|
-
pictures: PfpCandidate[];
|
|
150
|
-
search_term: string;
|
|
151
|
-
count: number;
|
|
152
|
-
}
|
|
153
|
-
export interface ImageSearchParams {
|
|
154
|
-
/** What to search for. */
|
|
155
|
-
search_term: string;
|
|
156
|
-
/** How many results to return. Defaults to 24, min 1, capped at 50. */
|
|
157
|
-
count?: number;
|
|
158
|
-
/** `next_cursor` of a previous response for the same `search_term`. */
|
|
159
|
-
cursor?: string;
|
|
160
|
-
}
|
|
161
|
-
export type ImageSearchVideoFormat = 'mp4' | 'hls' | 'gif';
|
|
162
|
-
export interface ImageSearchResult {
|
|
163
|
-
/** Stable id for this result at the source. */
|
|
164
|
-
source_id: string;
|
|
165
|
-
title: string;
|
|
166
|
-
/** Full-resolution image; the cover image for a video result. */
|
|
167
|
-
url: string;
|
|
168
|
-
/** Smaller variant, for rendering a grid of results. */
|
|
169
|
-
preview_url: string;
|
|
170
|
-
/** Present only on video results. */
|
|
171
|
-
video_url?: string;
|
|
172
|
-
/**
|
|
173
|
-
* Present exactly when `video_url` is. `hls` is a playlist (`.m3u8`), not a
|
|
174
|
-
* file — convert it before storing it.
|
|
175
|
-
*/
|
|
176
|
-
video_format?: ImageSearchVideoFormat;
|
|
177
|
-
}
|
|
178
|
-
export interface ImageSearchResponse {
|
|
179
|
-
results: ImageSearchResult[];
|
|
180
|
-
/** Pass as `cursor` to get the next page; null when there are no more. */
|
|
181
|
-
next_cursor: string | null;
|
|
182
|
-
search_term: string;
|
|
183
|
-
count: number;
|
|
184
|
-
}
|
|
185
134
|
export interface OwnedUploadParams {
|
|
186
135
|
filename: string;
|
|
187
136
|
contentType: string;
|
|
@@ -264,32 +213,4 @@ export declare class MediaClient extends BaseClient {
|
|
|
264
213
|
* @param params.name - Use case identifier (e.g., "profile_picture")
|
|
265
214
|
*/
|
|
266
215
|
filter(params: FilterMediaParams): Promise<ApiResponse<FilterMediaResponse>>;
|
|
267
|
-
/**
|
|
268
|
-
* Search for profile-picture candidates for a search term.
|
|
269
|
-
*
|
|
270
|
-
* Pictures already in use as a profile picture are removed before the result
|
|
271
|
-
* comes back, so two accounts cannot end up wearing the same face. Sourcing
|
|
272
|
-
* and filtering are one call for that reason — a caller who forgot the second
|
|
273
|
-
* step would get duplicates across their accounts and find out much later.
|
|
274
|
-
*
|
|
275
|
-
* Requires the `media:search` scope on a restricted key.
|
|
276
|
-
*
|
|
277
|
-
* @param params.search_term - What to search for
|
|
278
|
-
* @param params.count - How many to return (default 12, max 40)
|
|
279
|
-
*/
|
|
280
|
-
pfpSearch(params: PfpSearchParams): Promise<ApiResponse<PfpSearchResponse>>;
|
|
281
|
-
/**
|
|
282
|
-
* Search for images and videos by keyword, a page at a time.
|
|
283
|
-
*
|
|
284
|
-
* Pass the previous response's `next_cursor` as `cursor`, with the same
|
|
285
|
-
* `search_term`, to continue. Unlike `pfpSearch`, results already in use are
|
|
286
|
-
* not removed.
|
|
287
|
-
*
|
|
288
|
-
* Requires the `media:search` scope on a restricted key.
|
|
289
|
-
*
|
|
290
|
-
* @param params.search_term - What to search for
|
|
291
|
-
* @param params.count - How many to return (default 24, max 50)
|
|
292
|
-
* @param params.cursor - `next_cursor` from the previous page
|
|
293
|
-
*/
|
|
294
|
-
imageSearch(params: ImageSearchParams): Promise<ApiResponse<ImageSearchResponse>>;
|
|
295
216
|
}
|
package/dist/media.js
CHANGED
|
@@ -96,37 +96,5 @@ class MediaClient extends base_1.BaseClient {
|
|
|
96
96
|
async filter(params) {
|
|
97
97
|
return this.post('/media/filter', params);
|
|
98
98
|
}
|
|
99
|
-
/**
|
|
100
|
-
* Search for profile-picture candidates for a search term.
|
|
101
|
-
*
|
|
102
|
-
* Pictures already in use as a profile picture are removed before the result
|
|
103
|
-
* comes back, so two accounts cannot end up wearing the same face. Sourcing
|
|
104
|
-
* and filtering are one call for that reason — a caller who forgot the second
|
|
105
|
-
* step would get duplicates across their accounts and find out much later.
|
|
106
|
-
*
|
|
107
|
-
* Requires the `media:search` scope on a restricted key.
|
|
108
|
-
*
|
|
109
|
-
* @param params.search_term - What to search for
|
|
110
|
-
* @param params.count - How many to return (default 12, max 40)
|
|
111
|
-
*/
|
|
112
|
-
async pfpSearch(params) {
|
|
113
|
-
return this.post('/media/pfp-search', params);
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Search for images and videos by keyword, a page at a time.
|
|
117
|
-
*
|
|
118
|
-
* Pass the previous response's `next_cursor` as `cursor`, with the same
|
|
119
|
-
* `search_term`, to continue. Unlike `pfpSearch`, results already in use are
|
|
120
|
-
* not removed.
|
|
121
|
-
*
|
|
122
|
-
* Requires the `media:search` scope on a restricted key.
|
|
123
|
-
*
|
|
124
|
-
* @param params.search_term - What to search for
|
|
125
|
-
* @param params.count - How many to return (default 24, max 50)
|
|
126
|
-
* @param params.cursor - `next_cursor` from the previous page
|
|
127
|
-
*/
|
|
128
|
-
async imageSearch(params) {
|
|
129
|
-
return this.post('/media/image-search', params);
|
|
130
|
-
}
|
|
131
99
|
}
|
|
132
100
|
exports.MediaClient = MediaClient;
|
package/dist/posts.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from './base';
|
|
2
2
|
import type { ApiResponse } from './types';
|
|
3
|
-
import type { PublicPostFailure } from './post-failure';
|
|
4
3
|
/**
|
|
5
4
|
* Why a post failed, as a stable, client-safe category.
|
|
6
5
|
*
|
|
@@ -11,13 +10,9 @@ import type { PublicPostFailure } from './post-failure';
|
|
|
11
10
|
* - `capacity_deferred` — no posting capacity was available; the post will be retried
|
|
12
11
|
* - `platform_change` — the social app's interface changed and the post could not complete
|
|
13
12
|
* - `unconfirmed` — posting finished but publication could not be confirmed
|
|
14
|
-
* - `audio_unavailable` — the chosen sound was not available on the platform and no backup audio was left
|
|
15
13
|
* - `unknown` — the post failed for an unrecognized reason
|
|
16
|
-
*
|
|
17
|
-
* A failed post also carries its category on its `tag`, as a trailing
|
|
18
|
-
* `fail reason: <category>` (removed again when the post is retried).
|
|
19
14
|
*/
|
|
20
|
-
export type PostFailCategory = 'device_error' | 'network_error' | 'upload_interrupted' | 'account_issue' | 'capacity_deferred' | 'platform_change' | 'unconfirmed' | '
|
|
15
|
+
export type PostFailCategory = 'device_error' | 'network_error' | 'upload_interrupted' | 'account_issue' | 'capacity_deferred' | 'platform_change' | 'unconfirmed' | 'unknown';
|
|
21
16
|
export type PostType = 'video' | 'slideshow';
|
|
22
17
|
export type PostStatus = 'draft' | 'scheduled' | 'pending' | 'complete' | 'failed' | 'retrying' | 'deleting' | 'deleted' | 'hidden' | 'require-approval';
|
|
23
18
|
/**
|
|
@@ -32,8 +27,6 @@ export interface CaptionOverlay {
|
|
|
32
27
|
fontSize: number;
|
|
33
28
|
}
|
|
34
29
|
export interface Post {
|
|
35
|
-
/** Present in list responses; null when there is no current posting issue. */
|
|
36
|
-
failure?: PublicPostFailure | null;
|
|
37
30
|
id: string;
|
|
38
31
|
account_id: string | null;
|
|
39
32
|
type: PostType;
|
|
@@ -49,10 +42,6 @@ export interface Post {
|
|
|
49
42
|
thumbnail_url: string | null;
|
|
50
43
|
music_post_id: string | null;
|
|
51
44
|
social_audio_id: string | null;
|
|
52
|
-
/** Fallback sound. Moved into `social_audio_id` (and cleared) if the platform refuses the primary sound. */
|
|
53
|
-
backup_social_audio_id: string | null;
|
|
54
|
-
/** When the backup sound was swapped in (ISO 8601), or null if it never was. */
|
|
55
|
-
backup_audio_used_at: string | null;
|
|
56
45
|
scheduled_at: string | null;
|
|
57
46
|
postUrl?: string;
|
|
58
47
|
}
|
|
@@ -75,45 +64,12 @@ export interface GetPostsParams {
|
|
|
75
64
|
limit?: number;
|
|
76
65
|
/** Opaque cursor from a previous response's `nextCursor`, to fetch the next page. */
|
|
77
66
|
cursor?: string;
|
|
78
|
-
/** Case-insensitive substring search across caption, title, and account username. */
|
|
79
|
-
search?: string;
|
|
80
|
-
platform?: 'tiktok' | 'instagram';
|
|
81
|
-
postType?: PostType;
|
|
82
|
-
statuses?: PostStatus[];
|
|
83
|
-
/** Match any comma-separated tag on the post's account. */
|
|
84
|
-
accountTags?: string[];
|
|
85
|
-
/** Match any comma-separated tag stored on the post. */
|
|
86
|
-
postTags?: string[];
|
|
87
|
-
socialAudioIds?: string[];
|
|
88
|
-
phoneTypes?: Array<'physical_iphone' | 'manual_iphone' | 'physical_android' | 'emulated_android' | 'social_api' | 'custom_provider' | 'tracking' | 'clipper'>;
|
|
89
|
-
sortBy?: PostSortField;
|
|
90
|
-
sortDirection?: PostSortDirection;
|
|
91
|
-
}
|
|
92
|
-
export type PostSortField = 'created' | 'account' | 'status' | 'title' | 'caption' | 'tag' | 'audio' | 'time' | 'views' | 'likes' | 'comments' | 'shares';
|
|
93
|
-
export type PostSortDirection = 'asc' | 'desc';
|
|
94
|
-
export interface GetPostsPageParams extends GetPostsParams {
|
|
95
|
-
/** Page size. Defaults to 200 and is capped at 500. */
|
|
96
|
-
limit?: number;
|
|
97
|
-
}
|
|
98
|
-
export interface PostsPage {
|
|
99
|
-
posts: Post[];
|
|
100
|
-
/** Latest stats only for posts in this page. */
|
|
101
|
-
stats: PostStat[];
|
|
102
|
-
totalCount: number;
|
|
103
|
-
/** Distinct comma-split post tags across the organization. */
|
|
104
|
-
postTags: string[];
|
|
105
|
-
anyHasTitle: boolean;
|
|
106
|
-
/** Accounts with a match when `accountIds` is ignored and all other filters remain active. */
|
|
107
|
-
matchingAccountIds: string[];
|
|
108
|
-
nextCursor: string | null;
|
|
109
67
|
}
|
|
110
68
|
export interface CreateSlideshowParams {
|
|
111
69
|
accountId: string | null;
|
|
112
70
|
caption?: string;
|
|
113
71
|
title?: string;
|
|
114
72
|
socialAudioId?: string;
|
|
115
|
-
/** Fallback sound, used once if the platform refuses the primary sound at posting time */
|
|
116
|
-
backupSocialAudioId?: string;
|
|
117
73
|
postTime?: string;
|
|
118
74
|
imageUrls: string[];
|
|
119
75
|
strict?: boolean;
|
|
@@ -139,8 +95,6 @@ export interface CreateVideoParams {
|
|
|
139
95
|
caption?: string;
|
|
140
96
|
captionOverlays?: CaptionOverlay[];
|
|
141
97
|
socialAudioId?: string;
|
|
142
|
-
/** Fallback sound, used once if the platform refuses the primary sound at posting time */
|
|
143
|
-
backupSocialAudioId?: string;
|
|
144
98
|
postTime?: string;
|
|
145
99
|
videoUrl: string;
|
|
146
100
|
strict?: boolean;
|
|
@@ -173,8 +127,6 @@ export interface UpdatePostParams {
|
|
|
173
127
|
caption?: string;
|
|
174
128
|
title?: string;
|
|
175
129
|
socialAudioId?: string;
|
|
176
|
-
/** Fallback sound, used once if the platform refuses the primary sound at posting time; `null` clears it */
|
|
177
|
-
backupSocialAudioId?: string | null;
|
|
178
130
|
postTime?: string;
|
|
179
131
|
accountId?: string;
|
|
180
132
|
mediaUrls?: string[];
|
|
@@ -201,8 +153,6 @@ export interface CreateDraftParams {
|
|
|
201
153
|
caption?: string;
|
|
202
154
|
title?: string;
|
|
203
155
|
socialAudioId?: string;
|
|
204
|
-
/** Fallback sound, used once if the platform refuses the primary sound at posting time */
|
|
205
|
-
backupSocialAudioId?: string;
|
|
206
156
|
/** Tag stored on the created POST itself (returned as `tag` on the Post object) */
|
|
207
157
|
post_tag?: string;
|
|
208
158
|
}
|
|
@@ -229,11 +179,6 @@ export declare class PostsClient extends BaseClient {
|
|
|
229
179
|
* passed back as `cursor` to fetch the next page, ordered newest-first.
|
|
230
180
|
*/
|
|
231
181
|
getPosts(params?: GetPostsParams): Promise<ApiResponse<Post[]>>;
|
|
232
|
-
/**
|
|
233
|
-
* Get one server-filtered/sorted page plus table metadata and page-scoped stats.
|
|
234
|
-
* Unlike getPosts(), this method never falls back to an unbounded response.
|
|
235
|
-
*/
|
|
236
|
-
getPostsPage(params?: GetPostsPageParams): Promise<ApiResponse<PostsPage>>;
|
|
237
182
|
/**
|
|
238
183
|
* Create a draft post without assigning it to an account
|
|
239
184
|
*
|
|
@@ -254,7 +199,6 @@ export declare class PostsClient extends BaseClient {
|
|
|
254
199
|
postUrl?: string;
|
|
255
200
|
/** Set when status is "failed"; null otherwise. */
|
|
256
201
|
fail_category: PostFailCategory | null;
|
|
257
|
-
failure: PublicPostFailure | null;
|
|
258
202
|
}>>;
|
|
259
203
|
/**
|
|
260
204
|
* Create a video post
|
package/dist/posts.js
CHANGED
|
@@ -15,13 +15,6 @@ class PostsClient extends base_1.BaseClient {
|
|
|
15
15
|
async getPosts(params) {
|
|
16
16
|
return this.post('/post', params ?? {});
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Get one server-filtered/sorted page plus table metadata and page-scoped stats.
|
|
20
|
-
* Unlike getPosts(), this method never falls back to an unbounded response.
|
|
21
|
-
*/
|
|
22
|
-
async getPostsPage(params = {}) {
|
|
23
|
-
return this.post('/post', { ...params, includePageMeta: true });
|
|
24
|
-
}
|
|
25
18
|
/**
|
|
26
19
|
* Create a draft post without assigning it to an account
|
|
27
20
|
*
|
|
@@ -399,10 +399,10 @@ export declare const iMessageDmPropsSchema: z.ZodObject<{
|
|
|
399
399
|
dynamicCrop: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
400
400
|
cropVerticalCenter: z.ZodOptional<z.ZodBoolean>;
|
|
401
401
|
}, "strip", z.ZodTypeAny, {
|
|
402
|
-
time?: string | undefined;
|
|
403
402
|
backgroundColor?: string | undefined;
|
|
404
403
|
lightMode?: boolean | undefined;
|
|
405
404
|
username?: string | undefined;
|
|
405
|
+
time?: string | undefined;
|
|
406
406
|
profilePicUrl?: string | undefined;
|
|
407
407
|
messages?: {
|
|
408
408
|
text: string;
|
|
@@ -582,10 +582,10 @@ export declare const iMessageDmPropsSchema: z.ZodObject<{
|
|
|
582
582
|
readReceiptLeft?: number | undefined;
|
|
583
583
|
readReceiptRight?: number | undefined;
|
|
584
584
|
}, {
|
|
585
|
-
time?: string | undefined;
|
|
586
585
|
backgroundColor?: string | undefined;
|
|
587
586
|
lightMode?: boolean | undefined;
|
|
588
587
|
username?: string | undefined;
|
|
588
|
+
time?: string | undefined;
|
|
589
589
|
profilePicUrl?: string | undefined;
|
|
590
590
|
messages?: {
|
|
591
591
|
text: string;
|
|
@@ -29,12 +29,12 @@ export declare const remotionCompositionPortSchema: z.ZodObject<{
|
|
|
29
29
|
isArray: z.ZodBoolean;
|
|
30
30
|
required: z.ZodBoolean;
|
|
31
31
|
}, "strict", z.ZodTypeAny, {
|
|
32
|
-
type: "number" | "boolean" | "object" | "video" | "
|
|
32
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
33
33
|
id: string;
|
|
34
34
|
isArray: boolean;
|
|
35
35
|
required: boolean;
|
|
36
36
|
}, {
|
|
37
|
-
type: "number" | "boolean" | "object" | "video" | "
|
|
37
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
38
38
|
id: string;
|
|
39
39
|
isArray: boolean;
|
|
40
40
|
required: boolean;
|
|
@@ -47,28 +47,29 @@ export declare const remotionCompositionNodeSchema: z.ZodObject<{
|
|
|
47
47
|
durationInFrames: z.ZodNumber;
|
|
48
48
|
inputProps: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
49
49
|
} & {
|
|
50
|
+
outputType: z.ZodDefault<z.ZodEnum<["video", "image"]>>;
|
|
50
51
|
inputs: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
51
52
|
id: z.ZodEffects<z.ZodString, string, string>;
|
|
52
53
|
type: z.ZodEnum<["text", "number", "boolean", "image", "video", "audio", "object"]>;
|
|
53
54
|
isArray: z.ZodBoolean;
|
|
54
55
|
required: z.ZodBoolean;
|
|
55
56
|
}, "strict", z.ZodTypeAny, {
|
|
56
|
-
type: "number" | "boolean" | "object" | "video" | "
|
|
57
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
57
58
|
id: string;
|
|
58
59
|
isArray: boolean;
|
|
59
60
|
required: boolean;
|
|
60
61
|
}, {
|
|
61
|
-
type: "number" | "boolean" | "object" | "video" | "
|
|
62
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
62
63
|
id: string;
|
|
63
64
|
isArray: boolean;
|
|
64
65
|
required: boolean;
|
|
65
66
|
}>, "many">, {
|
|
66
|
-
type: "number" | "boolean" | "object" | "video" | "
|
|
67
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
67
68
|
id: string;
|
|
68
69
|
isArray: boolean;
|
|
69
70
|
required: boolean;
|
|
70
71
|
}[], {
|
|
71
|
-
type: "number" | "boolean" | "object" | "video" | "
|
|
72
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
72
73
|
id: string;
|
|
73
74
|
isArray: boolean;
|
|
74
75
|
required: boolean;
|
|
@@ -79,8 +80,9 @@ export declare const remotionCompositionNodeSchema: z.ZodObject<{
|
|
|
79
80
|
source: string;
|
|
80
81
|
outputMode: "per-input" | "single";
|
|
81
82
|
selectionMode: null;
|
|
83
|
+
outputType: "video" | "image";
|
|
82
84
|
inputs: {
|
|
83
|
-
type: "number" | "boolean" | "object" | "video" | "
|
|
85
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
84
86
|
id: string;
|
|
85
87
|
isArray: boolean;
|
|
86
88
|
required: boolean;
|
|
@@ -95,7 +97,7 @@ export declare const remotionCompositionNodeSchema: z.ZodObject<{
|
|
|
95
97
|
outputMode: "per-input" | "single";
|
|
96
98
|
selectionMode: null;
|
|
97
99
|
inputs: {
|
|
98
|
-
type: "number" | "boolean" | "object" | "video" | "
|
|
100
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
99
101
|
id: string;
|
|
100
102
|
isArray: boolean;
|
|
101
103
|
required: boolean;
|
|
@@ -105,6 +107,7 @@ export declare const remotionCompositionNodeSchema: z.ZodObject<{
|
|
|
105
107
|
fps: number;
|
|
106
108
|
durationInFrames: number;
|
|
107
109
|
inputProps: Record<string, unknown>;
|
|
110
|
+
outputType?: "video" | "image" | undefined;
|
|
108
111
|
}>;
|
|
109
112
|
export declare const REMOTION_COMPOSITION_IMPORTS: string[];
|
|
110
113
|
export declare function parseRemotionPropsJson({ text }: {
|
|
@@ -19,6 +19,7 @@ exports.remotionCompositionPortSchema = zod_1.z.object({
|
|
|
19
19
|
required: zod_1.z.boolean(),
|
|
20
20
|
}).strict();
|
|
21
21
|
exports.remotionCompositionNodeSchema = exports.remotionCompositionSchema.extend({
|
|
22
|
+
outputType: zod_1.z.enum(['video', 'image']).default('video'),
|
|
22
23
|
inputs: zod_1.z.array(exports.remotionCompositionPortSchema).max(64).refine(ports => new Set(ports.map(port => port.id)).size === ports.length, 'Prop names must be unique'),
|
|
23
24
|
outputMode: zod_1.z.enum(['single', 'per-input']),
|
|
24
25
|
selectionMode: zod_1.z.null(),
|
package/dist/render.d.ts
CHANGED
|
@@ -14,7 +14,9 @@ import type { ImageEditorNodeConfig } from './automations/nodes/image-composer';
|
|
|
14
14
|
import type { CreateDmMessage } from './automations/nodes/create-dm';
|
|
15
15
|
import { type RemotionCompositionInput } from './render/types/remotion-composition';
|
|
16
16
|
/** Submit TSX source and props; UGC owns registration and bundling. */
|
|
17
|
-
export declare function submitRemotionCompositionRenderJob(params: RemotionCompositionInput
|
|
17
|
+
export declare function submitRemotionCompositionRenderJob(params: RemotionCompositionInput & {
|
|
18
|
+
outputType?: 'video' | 'image';
|
|
19
|
+
}): Promise<ApiResponse<RenderJobResponse>>;
|
|
18
20
|
export interface RenderJobResponse {
|
|
19
21
|
job_id: string;
|
|
20
22
|
status: string;
|
package/dist/render.js
CHANGED
|
@@ -31,13 +31,16 @@ function renderBaseUrl() {
|
|
|
31
31
|
const MAX_RETRIES = 3;
|
|
32
32
|
/** Submit TSX source and props; UGC owns registration and bundling. */
|
|
33
33
|
async function submitRemotionCompositionRenderJob(params) {
|
|
34
|
-
const
|
|
34
|
+
const { outputType = 'video', ...composition } = params;
|
|
35
|
+
if (outputType !== 'video' && outputType !== 'image')
|
|
36
|
+
return { ok: false, code: 400, message: 'Output type must be video or image' };
|
|
37
|
+
const parsed = remotion_composition_1.remotionCompositionSchema.safeParse(composition);
|
|
35
38
|
if (!parsed.success)
|
|
36
39
|
return { ok: false, code: 400, message: parsed.error.message };
|
|
37
40
|
const response = await renderFetch('/submit-job', {
|
|
38
41
|
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
|
39
42
|
body: JSON.stringify({ config: { _compositionType: 'remotion-composition', ...parsed.data },
|
|
40
|
-
output_type:
|
|
43
|
+
output_type: outputType, video_codec: 'h264', image_format: 'png' }),
|
|
41
44
|
});
|
|
42
45
|
const data = await response.json();
|
|
43
46
|
const result = zod_1.z.object({ job_id: zod_1.z.string(), status: zod_1.z.string(), output_type: zod_1.z.string(), message: zod_1.z.string() }).safeParse(data);
|
package/dist/tools/accounts.js
CHANGED
|
@@ -8,7 +8,6 @@ exports.accountTools = [
|
|
|
8
8
|
description: 'List accounts with optional filters. Returns all accounts if no filters provided.',
|
|
9
9
|
schema: zod_1.z.object({
|
|
10
10
|
tag: zod_1.z.string().optional().describe('Filter by tag'),
|
|
11
|
-
type: zod_1.z.enum(['tiktok', 'instagram']).optional().describe('Filter by platform'),
|
|
12
11
|
org_group: zod_1.z.string().optional().describe('Filter by org group'),
|
|
13
12
|
user_group: zod_1.z.string().optional().describe('Filter by user group'),
|
|
14
13
|
status: zod_1.z.enum(['uninitialized', 'pending', 'initialized', 'setup', 'warming', 'warmed', 'needs_replacement', 'replacing', 'failed', 'deleted']).optional().describe('Filter by account status'),
|
package/dist/tools/posts.js
CHANGED
|
@@ -26,7 +26,6 @@ exports.postTools = [
|
|
|
26
26
|
videoUrl: zod_1.z.string().describe('URL of the video file'),
|
|
27
27
|
caption: zod_1.z.string().optional().describe('Post caption'),
|
|
28
28
|
socialAudioId: zod_1.z.string().optional().describe('Social audio ID to use'),
|
|
29
|
-
backupSocialAudioId: zod_1.z.string().optional().describe('Fallback social audio ID, used once if the platform refuses the primary sound'),
|
|
30
29
|
postTime: zod_1.z.string().optional().describe('Scheduled time (ISO 8601). Omit for next available slot.'),
|
|
31
30
|
strict: zod_1.z.boolean().optional().describe('If true with auto-selection, must post at exact time or error'),
|
|
32
31
|
mustPostBy: zod_1.z.string().optional().describe('Latest allowed scheduled time (ISO 8601). Errors if no slot is available before this deadline.'),
|
|
@@ -48,7 +47,6 @@ exports.postTools = [
|
|
|
48
47
|
caption: zod_1.z.string().optional().describe('Post caption'),
|
|
49
48
|
title: zod_1.z.string().optional().describe('Slideshow title'),
|
|
50
49
|
socialAudioId: zod_1.z.string().optional().describe('Social audio ID to use'),
|
|
51
|
-
backupSocialAudioId: zod_1.z.string().optional().describe('Fallback social audio ID, used once if the platform refuses the primary sound'),
|
|
52
50
|
postTime: zod_1.z.string().optional().describe('Scheduled time (ISO 8601)'),
|
|
53
51
|
strict: zod_1.z.boolean().optional().describe('If true with auto-selection, must post at exact time or error'),
|
|
54
52
|
mustPostBy: zod_1.z.string().optional().describe('Latest allowed scheduled time (ISO 8601). Errors if no slot is available before this deadline.'),
|
|
@@ -70,7 +68,6 @@ exports.postTools = [
|
|
|
70
68
|
caption: zod_1.z.string().optional().describe('Post caption'),
|
|
71
69
|
title: zod_1.z.string().optional().describe('Slideshow title'),
|
|
72
70
|
socialAudioId: zod_1.z.string().optional().describe('Social audio ID'),
|
|
73
|
-
backupSocialAudioId: zod_1.z.string().optional().describe('Fallback social audio ID, used once if the platform refuses the primary sound'),
|
|
74
71
|
post_tag: zod_1.z.string().optional().describe('Tag stored on the created post'),
|
|
75
72
|
}),
|
|
76
73
|
execute: async (client, params) => {
|
|
@@ -95,7 +92,6 @@ exports.postTools = [
|
|
|
95
92
|
caption: zod_1.z.string().optional().describe('New caption'),
|
|
96
93
|
title: zod_1.z.string().optional().describe('New title (slideshows only)'),
|
|
97
94
|
socialAudioId: zod_1.z.string().optional().describe('New social audio ID'),
|
|
98
|
-
backupSocialAudioId: zod_1.z.string().nullable().optional().describe('Fallback social audio ID, used once if the platform refuses the primary sound; null clears it'),
|
|
99
95
|
postTime: zod_1.z.string().optional().describe('New scheduled time (ISO 8601)'),
|
|
100
96
|
accountId: zod_1.z.string().optional().describe('Move post to different account'),
|
|
101
97
|
mediaUrls: zod_1.z.array(zod_1.z.string()).optional().describe('New media URLs'),
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
package/dist/post-failure.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** Customer-facing posting explanations. No operational diagnostics are exposed. */
|
|
2
|
-
export type PublicPostFailureCode = 'AUDIO_UNAVAILABLE' | 'BACKUP_AUDIO_RETRY_PENDING' | 'AUDIO_RETRY_PENDING' | 'AUDIO_PREPARATION_FAILED' | 'PUBLISHING_RETRY_PENDING' | 'PUBLISHING_BLOCKED' | 'POST_PROCESSING_FAILED' | 'PUBLICATION_CHECK_IN_PROGRESS' | 'PUBLICATION_UNCONFIRMED' | 'POST_RETRY_PENDING' | 'POST_FAILED';
|
|
3
|
-
export type PublicPostRecovery = 'retry_pending' | 'waiting' | 'verifying_publication' | 'stopped';
|
|
4
|
-
export type PublicPostNextAction = 'wait' | 'change_audio' | 'change_audio_or_contact_support' | 'contact_support';
|
|
5
|
-
export interface PublicPostFailure {
|
|
6
|
-
code: PublicPostFailureCode;
|
|
7
|
-
message: string;
|
|
8
|
-
recovery: PublicPostRecovery;
|
|
9
|
-
next_action: PublicPostNextAction;
|
|
10
|
-
}
|
package/dist/post-failure.js
DELETED