ugcinc 4.17.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 +43 -85
- package/dist/accounts.d.ts +0 -2
- package/dist/automations/index.d.ts +1 -1
- package/dist/automations/nodes/index.d.ts +28 -0
- package/dist/automations/nodes/index.js +2 -0
- package/dist/automations/nodes/remotion-composition.d.ts +44 -0
- package/dist/automations/nodes/remotion-composition.js +32 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +10 -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 +6 -6
- package/dist/render/types/remotion-composition.d.ts +123 -0
- package/dist/render/types/remotion-composition.js +42 -0
- package/dist/render.d.ts +5 -0
- package/dist/render.js +25 -0
- 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,29 +162,45 @@ For the full endpoint reference, all method signatures, data structures, and wor
|
|
|
220
162
|
|
|
221
163
|
MIT
|
|
222
164
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
165
|
+
### Render a supplied Remotion composition
|
|
166
|
+
|
|
167
|
+
`remotion-composition` accepts a TSX module whose default export is a React
|
|
168
|
+
component. UGC supplies registration, bundling and video rendering. Static imports
|
|
169
|
+
may use `react`, `remotion`, `ugcinc/render`, `ugcinc/render/utils`, and
|
|
170
|
+
`ugcinc/render/types`. Dependencies and UGC components come from the render runtime;
|
|
171
|
+
local-file imports, dynamic imports, npm installation and build scripts are not accepted.
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
await client.automations.runNode({
|
|
175
|
+
nodeType: 'remotion-composition',
|
|
176
|
+
config: {
|
|
177
|
+
source: `import React from 'react';
|
|
178
|
+
import {AbsoluteFill} from 'remotion';
|
|
179
|
+
export default function Video({title}) {
|
|
180
|
+
return <AbsoluteFill style={{background: 'white', fontSize: 80}}>{title}</AbsoluteFill>;
|
|
181
|
+
}`,
|
|
182
|
+
width: 1080, height: 1920, fps: 30, durationInFrames: 150,
|
|
183
|
+
inputProps: {title: 'A new video'},
|
|
184
|
+
},
|
|
185
|
+
waitForCompletion: true,
|
|
186
|
+
});
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
In a workflow, add `inputs: [{id: 'title', type: 'text', isArray: false,
|
|
190
|
+
required: true}]` to create a connected prop. Connected values override
|
|
191
|
+
`inputProps` defaults. Media inputs retain their `{url}` shape. The `output` port
|
|
192
|
+
is a video suitable for Save to Media or Pass Through. Rendering errors identify
|
|
193
|
+
invalid source, unsupported imports or missing inputs. Use normal automation run
|
|
194
|
+
status/logs to inspect failures and the returned video for preview.
|
|
195
|
+
|
|
196
|
+
Server integrations can also call `submitRemotionCompositionRenderJob` and
|
|
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;
|
|
@@ -75,7 +75,7 @@ export declare class AutomationsClient extends BaseClient {
|
|
|
75
75
|
* Run a single automation node by compiling it to a minimal inline workflow.
|
|
76
76
|
*/
|
|
77
77
|
runNode(params: {
|
|
78
|
-
nodeType: 'scene-split' | 'generate-image' | 'generate-video';
|
|
78
|
+
nodeType: 'scene-split' | 'generate-image' | 'generate-video' | 'remotion-composition';
|
|
79
79
|
inputs?: Record<string, PortValue>;
|
|
80
80
|
config?: Record<string, unknown>;
|
|
81
81
|
waitForCompletion?: boolean;
|
|
@@ -332,6 +332,34 @@ export declare const nodeDefinitions: {
|
|
|
332
332
|
__TInputs: import("./screenshot-animation").ScreenshotAnimationNodeInputs;
|
|
333
333
|
__TOutputs: import("./screenshot-animation").ScreenshotAnimationNodeOutputs;
|
|
334
334
|
};
|
|
335
|
+
readonly 'remotion-composition': NodeDefinition<"remotion-composition", "generator", {
|
|
336
|
+
source: string;
|
|
337
|
+
outputMode: "per-input" | "single";
|
|
338
|
+
selectionMode: null;
|
|
339
|
+
outputType: "video" | "image";
|
|
340
|
+
inputs: {
|
|
341
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
342
|
+
id: string;
|
|
343
|
+
isArray: boolean;
|
|
344
|
+
required: boolean;
|
|
345
|
+
}[];
|
|
346
|
+
width: number;
|
|
347
|
+
height: number;
|
|
348
|
+
fps: number;
|
|
349
|
+
durationInFrames: number;
|
|
350
|
+
inputProps: Record<string, unknown>;
|
|
351
|
+
}, {
|
|
352
|
+
[x: string]: import("../types").PortValue | import("../types").PortValue[];
|
|
353
|
+
}, {
|
|
354
|
+
output: import("../types").VideoValue;
|
|
355
|
+
}, false> & {
|
|
356
|
+
__TInputs: {
|
|
357
|
+
[x: string]: import("../types").PortValue | import("../types").PortValue[];
|
|
358
|
+
};
|
|
359
|
+
__TOutputs: {
|
|
360
|
+
output: import("../types").VideoValue;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
335
363
|
readonly 'social-audio': NodeDefinition<"social-audio", "source", {
|
|
336
364
|
audioPool: import("../types").SocialAudioValue[];
|
|
337
365
|
selectedMediaIds: string[];
|
|
@@ -38,6 +38,7 @@ const random_route_1 = __importDefault(require("./random-route"));
|
|
|
38
38
|
const save_to_media_1 = __importDefault(require("./save-to-media"));
|
|
39
39
|
const scene_split_1 = __importDefault(require("./scene-split"));
|
|
40
40
|
const screenshot_animation_1 = __importDefault(require("./screenshot-animation"));
|
|
41
|
+
const remotion_composition_1 = __importDefault(require("./remotion-composition"));
|
|
41
42
|
const social_audio_1 = __importDefault(require("./social-audio"));
|
|
42
43
|
const text_1 = __importDefault(require("./text"));
|
|
43
44
|
const transcript_1 = __importDefault(require("./transcript"));
|
|
@@ -79,6 +80,7 @@ exports.nodeDefinitions = {
|
|
|
79
80
|
'save-to-media': save_to_media_1.default,
|
|
80
81
|
'scene-split': scene_split_1.default,
|
|
81
82
|
'screenshot-animation': screenshot_animation_1.default,
|
|
83
|
+
'remotion-composition': remotion_composition_1.default,
|
|
82
84
|
'social-audio': social_audio_1.default,
|
|
83
85
|
'text': text_1.default,
|
|
84
86
|
'transcript': transcript_1.default,
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { PortValue, VideoValue } from '../types';
|
|
2
|
+
type Inputs = Record<string, PortValue | PortValue[]>;
|
|
3
|
+
type Outputs = {
|
|
4
|
+
output: VideoValue;
|
|
5
|
+
};
|
|
6
|
+
declare const defaults: {
|
|
7
|
+
source: string;
|
|
8
|
+
outputMode: "per-input" | "single";
|
|
9
|
+
selectionMode: null;
|
|
10
|
+
outputType: "video" | "image";
|
|
11
|
+
inputs: {
|
|
12
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
13
|
+
id: string;
|
|
14
|
+
isArray: boolean;
|
|
15
|
+
required: boolean;
|
|
16
|
+
}[];
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
fps: number;
|
|
20
|
+
durationInFrames: number;
|
|
21
|
+
inputProps: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
declare const _default: import("./types").NodeDefinition<"remotion-composition", "generator", {
|
|
24
|
+
source: string;
|
|
25
|
+
outputMode: "per-input" | "single";
|
|
26
|
+
selectionMode: null;
|
|
27
|
+
outputType: "video" | "image";
|
|
28
|
+
inputs: {
|
|
29
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
30
|
+
id: string;
|
|
31
|
+
isArray: boolean;
|
|
32
|
+
required: boolean;
|
|
33
|
+
}[];
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
fps: number;
|
|
37
|
+
durationInFrames: number;
|
|
38
|
+
inputProps: Record<string, unknown>;
|
|
39
|
+
}, Inputs, Outputs, false> & {
|
|
40
|
+
__TInputs: Inputs;
|
|
41
|
+
__TOutputs: Outputs;
|
|
42
|
+
};
|
|
43
|
+
export default _default;
|
|
44
|
+
export type RemotionCompositionNodeConfig = typeof defaults;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const remotion_composition_1 = require("../../render/types/remotion-composition");
|
|
4
|
+
const types_1 = require("./types");
|
|
5
|
+
const defaults = remotion_composition_1.remotionCompositionNodeSchema.parse({
|
|
6
|
+
source: `import React from 'react';
|
|
7
|
+
import {AbsoluteFill} from 'remotion';
|
|
8
|
+
|
|
9
|
+
export default function Video({title}: {title: string}) {
|
|
10
|
+
return <AbsoluteFill style={{background: '#fff', justifyContent: 'center', alignItems: 'center', fontSize: 64}}>{title}</AbsoluteFill>;
|
|
11
|
+
}`,
|
|
12
|
+
width: 1080, height: 1920, fps: 30, durationInFrames: 150,
|
|
13
|
+
inputProps: { title: 'Your video' }, inputs: [], outputMode: 'per-input', selectionMode: null,
|
|
14
|
+
});
|
|
15
|
+
const definition = (0, types_1.defineNode)({
|
|
16
|
+
nodeId: 'remotion-composition', label: 'Remotion Composition',
|
|
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
|
+
type: 'generator', category: 'Generation', outputModes: ['per-input', 'single'], selectionModes: null,
|
|
20
|
+
defaults,
|
|
21
|
+
computePorts: ({ config }) => ({ inputs: config.inputs,
|
|
22
|
+
outputs: [{ id: 'output', type: config.outputType === 'image' ? 'image' : 'video', isArray: false, required: true }] }),
|
|
23
|
+
generatePreview: (_config, _ctx, cached) => (0, types_1.preview)({ output: cached?.output ?? null }),
|
|
24
|
+
validate: config => {
|
|
25
|
+
const result = remotion_composition_1.remotionCompositionNodeSchema.safeParse(config);
|
|
26
|
+
return result.success ? [] : result.error.issues.map(issue => `${issue.path.join('.')}: ${issue.message}`);
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
// Runtime markers preserve the registry's typed input/output inference without casts.
|
|
30
|
+
const inputTypes = {};
|
|
31
|
+
const outputTypes = { output: { url: '' } };
|
|
32
|
+
exports.default = Object.assign(definition, { __TInputs: inputTypes, __TOutputs: outputTypes });
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,10 @@ export { AutomationsClient } from './automations';
|
|
|
13
13
|
export { MediaClient } from './media';
|
|
14
14
|
export { CommentsClient } from './comments';
|
|
15
15
|
export { BillingClient } from './billing';
|
|
16
|
-
export { submitImageRenderJob, submitVideoRenderJob, getRenderJobStatus, submitDeduplicationJob, submitSceneSplitJob, submitScreenshotAnimationRenderJob, submitAutoCaptionRenderJob, submitInstagramDmRenderJob, submitIMessageDmRenderJob, } from './render';
|
|
16
|
+
export { submitImageRenderJob, submitVideoRenderJob, getRenderJobStatus, submitDeduplicationJob, submitSceneSplitJob, submitScreenshotAnimationRenderJob, submitRemotionCompositionRenderJob, submitAutoCaptionRenderJob, submitInstagramDmRenderJob, submitIMessageDmRenderJob, } from './render';
|
|
17
|
+
export { remotionCompositionSchema, remotionCompositionNodeSchema, remotionCompositionPortSchema, REMOTION_COMPOSITION_IMPORTS, parseRemotionPropsJson } from './render/types/remotion-composition';
|
|
18
|
+
export type { RemotionCompositionInput } from './render/types/remotion-composition';
|
|
19
|
+
export type { RemotionCompositionNodeConfig } from './automations/nodes/remotion-composition';
|
|
17
20
|
export { areTypesCompatible, computePortsForNode, computePortsWithPreviews, computeAllNodePorts, computeAllNodePortsWithPreviews, getInputPreviewValue, getAllNodes, getNodeByType, getOutputSchema, createNode, deriveConnections, addConnection, removeConnection, removeNodeConnections, cleanupStaleConnections, getConnectedSource, getForEachContext, checkCrossContextViolation, getDownstreamNodes, getNodesDownstreamOfSet, getCapturedNodes, validateWorkflow, getErrorNodeIds, getPortErrorsForNode, hasMissingTriggerError, hasMissingTerminalError, getWorkflowOutputSchema, resolveNodePreview, computeAllNodePreviews, computePreviewMap, updatePreviewMapForConnection, removePreviewForConnection, getPreviewValue, shuffleNodePreview, type PreviewMap, type NodePreviewOutputs, type Connection, generateNodeName, extractWorkflowConfig, type WorkflowTemplateData, } from './automations/graph-controller';
|
|
18
21
|
export { nodeDefinitions, internalNodeTypes, isAsyncExecutor, formatPortType, isPortType } from './automations/types';
|
|
19
22
|
export { getNodeDefinition, getAllNodeDefinitions, getFlowControlNodeTypes, getCapturedSourceNodeTypes } from './automations/nodes';
|
|
@@ -27,10 +30,10 @@ export type { InputType } from './automations/nodes/types';
|
|
|
27
30
|
export type { ClientConfig } from './base';
|
|
28
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';
|
|
29
32
|
export type { TaskType, Task, GetTasksParams } from './tasks';
|
|
30
|
-
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';
|
|
31
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';
|
|
32
35
|
export type { Org, ApiKey, DeleteApiKeyParams, EditApiKeyParams, IntegrationKey, IntegrationProvider, UpsertIntegrationKeyParams, DeleteIntegrationKeyParams } from './org';
|
|
33
|
-
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';
|
|
34
37
|
export type { CommentStatus, Comment, CreateCommentParams, CreateCommentResponse, GetCommentsParams, } from './comments';
|
|
35
38
|
export type { BillingInfo, PortalUrlResponse, CancelAccountParams, CancelAccountResponse, ReactivateAccountParams, ReactivateAccountResponse, CancelSubscriptionResponse, RequestReplacementParams, RequestReplacementResponse, RequestRefundParams, RequestRefundResponse, BillingRequestInfo, PortalParams, } from './billing';
|
|
36
39
|
export type { RenderJobResponse, RenderJobStatus, SubmitImageRenderJobParams, SubmitVideoRenderJobParams, SubmitScreenshotAnimationRenderJobParams, SubmitAutoCaptionRenderJobParams, SubmitSceneSplitJobParams, SceneSplitDetectorConfig, SubmitInstagramDmRenderJobParams, SubmitIMessageDmRenderJobParams, IgDmMessage, ImDmMessage, RenderVideoEditorConfig, } from './render';
|
|
@@ -81,4 +84,3 @@ export type { NodeDefinition, NodeType, UserCreatableNodeType, NodeConfig, Workf
|
|
|
81
84
|
export type { SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, NodeCategory, TriggerIterationMode, IterationExhaustionBehavior, CollectionSelectionMode, TriggerCollectionConfig, MediaItemType, MediaNodeSelectionType, ResolvedPreview, PreviewSelectionState, PreviewContext, NullableOutputs, } from './automations/nodes/types';
|
|
82
85
|
export type { SuccessResponse, ErrorResponse, ApiResponse, } from './types';
|
|
83
86
|
export type { CropBoundary, CropAxisConfig, DynamicCropConfig, BorderRadiusConfig, VerticalAnchor, HorizontalAnchor, HorizontalSelfAnchor, VerticalSelfAnchor, RelativePositionConfigX, RelativePositionConfigY, } from './render/types';
|
|
84
|
-
export type { PublicPostFailureCode, PublicPostRecovery, PublicPostNextAction, PublicPostFailure } from './post-failure';
|
package/dist/index.js
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Official TypeScript/JavaScript client for the UGC Inc API
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.prepareVideoComposerInput = exports.formatDateTag = exports.outputFieldsToZod = exports.outputFieldToZod = exports.LLMProviders = exports.applyLogicOperator = void 0;
|
|
8
|
+
exports.hasMissingTriggerError = exports.getPortErrorsForNode = exports.getErrorNodeIds = exports.validateWorkflow = exports.getCapturedNodes = exports.getNodesDownstreamOfSet = exports.getDownstreamNodes = exports.checkCrossContextViolation = exports.getForEachContext = exports.getConnectedSource = exports.cleanupStaleConnections = exports.removeNodeConnections = exports.removeConnection = exports.addConnection = exports.deriveConnections = exports.createNode = exports.getOutputSchema = exports.getNodeByType = exports.getAllNodes = exports.getInputPreviewValue = exports.computeAllNodePortsWithPreviews = exports.computeAllNodePorts = exports.computePortsWithPreviews = exports.computePortsForNode = exports.areTypesCompatible = exports.parseRemotionPropsJson = exports.REMOTION_COMPOSITION_IMPORTS = exports.remotionCompositionPortSchema = exports.remotionCompositionNodeSchema = exports.remotionCompositionSchema = exports.submitIMessageDmRenderJob = exports.submitInstagramDmRenderJob = exports.submitAutoCaptionRenderJob = exports.submitRemotionCompositionRenderJob = exports.submitScreenshotAnimationRenderJob = exports.submitSceneSplitJob = exports.submitDeduplicationJob = exports.getRenderJobStatus = exports.submitVideoRenderJob = exports.submitImageRenderJob = exports.BillingClient = exports.CommentsClient = exports.MediaClient = exports.AutomationsClient = exports.OrganizationClient = exports.StatsClient = exports.PostsClient = exports.TasksClient = exports.AccountsClient = exports.UGCClient = void 0;
|
|
9
|
+
exports.parseOpenAPIOutputPath = exports.parseOpenAPIInputs = exports.mapOpenAPIType = exports.nodeConfigToCaptionStyle = exports.HttpMethods = exports.prepareImageComposerInput = exports.substituteVariables = exports.processTemplate = exports.extractTemplateVariables = exports.PortIdSchema = exports.normalizeToPortId = exports.portIdToTitle = exports.isValidPortId = exports.portId = exports.selectFromPool = exports.getModelDurations = exports.getModelAspectRatios = exports.ALL_VIDEO_MODELS = exports.getAvailableInputModes = exports.hasReferenceVariant = exports.getReferenceModelId = exports.hasFirstLastFrameVariant = exports.getFirstLastFrameModelId = exports.hasImageToVideoVariant = exports.getImageToVideoModelId = exports.isImageToVideoModel = exports.IMAGE_ASPECT_RATIOS = exports.ALL_IMAGE_MODELS = exports.getEditModelId = exports.isEditModel = exports.getCapturedSourceNodeTypes = exports.getFlowControlNodeTypes = exports.getAllNodeDefinitions = exports.getNodeDefinition = exports.isPortType = exports.formatPortType = exports.isAsyncExecutor = exports.internalNodeTypes = exports.nodeDefinitions = exports.extractWorkflowConfig = exports.generateNodeName = exports.shuffleNodePreview = exports.getPreviewValue = exports.removePreviewForConnection = exports.updatePreviewMapForConnection = exports.computePreviewMap = exports.computeAllNodePreviews = exports.resolveNodePreview = exports.getWorkflowOutputSchema = exports.hasMissingTerminalError = void 0;
|
|
10
|
+
exports.prepareVideoComposerInput = exports.formatDateTag = exports.outputFieldsToZod = exports.outputFieldToZod = exports.LLMProviders = exports.applyLogicOperator = exports.IfLogicOperators = exports.resolvePath = exports.indexExpressionToString = exports.indexExpressionToIndexes = exports.resolveUnknownPath = exports.getOutputTypeFromCategory = void 0;
|
|
11
11
|
// =============================================================================
|
|
12
12
|
// Client Exports
|
|
13
13
|
// =============================================================================
|
|
@@ -39,9 +39,16 @@ Object.defineProperty(exports, "getRenderJobStatus", { enumerable: true, get: fu
|
|
|
39
39
|
Object.defineProperty(exports, "submitDeduplicationJob", { enumerable: true, get: function () { return render_1.submitDeduplicationJob; } });
|
|
40
40
|
Object.defineProperty(exports, "submitSceneSplitJob", { enumerable: true, get: function () { return render_1.submitSceneSplitJob; } });
|
|
41
41
|
Object.defineProperty(exports, "submitScreenshotAnimationRenderJob", { enumerable: true, get: function () { return render_1.submitScreenshotAnimationRenderJob; } });
|
|
42
|
+
Object.defineProperty(exports, "submitRemotionCompositionRenderJob", { enumerable: true, get: function () { return render_1.submitRemotionCompositionRenderJob; } });
|
|
42
43
|
Object.defineProperty(exports, "submitAutoCaptionRenderJob", { enumerable: true, get: function () { return render_1.submitAutoCaptionRenderJob; } });
|
|
43
44
|
Object.defineProperty(exports, "submitInstagramDmRenderJob", { enumerable: true, get: function () { return render_1.submitInstagramDmRenderJob; } });
|
|
44
45
|
Object.defineProperty(exports, "submitIMessageDmRenderJob", { enumerable: true, get: function () { return render_1.submitIMessageDmRenderJob; } });
|
|
46
|
+
var remotion_composition_1 = require("./render/types/remotion-composition");
|
|
47
|
+
Object.defineProperty(exports, "remotionCompositionSchema", { enumerable: true, get: function () { return remotion_composition_1.remotionCompositionSchema; } });
|
|
48
|
+
Object.defineProperty(exports, "remotionCompositionNodeSchema", { enumerable: true, get: function () { return remotion_composition_1.remotionCompositionNodeSchema; } });
|
|
49
|
+
Object.defineProperty(exports, "remotionCompositionPortSchema", { enumerable: true, get: function () { return remotion_composition_1.remotionCompositionPortSchema; } });
|
|
50
|
+
Object.defineProperty(exports, "REMOTION_COMPOSITION_IMPORTS", { enumerable: true, get: function () { return remotion_composition_1.REMOTION_COMPOSITION_IMPORTS; } });
|
|
51
|
+
Object.defineProperty(exports, "parseRemotionPropsJson", { enumerable: true, get: function () { return remotion_composition_1.parseRemotionPropsJson; } });
|
|
45
52
|
// =============================================================================
|
|
46
53
|
// Graph Controller Exports
|
|
47
54
|
// =============================================================================
|
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
|
*
|
|
@@ -385,29 +385,29 @@ export declare const iMessageDmPropsSchema: z.ZodObject<{
|
|
|
385
385
|
groupWithPrevious: z.ZodOptional<z.ZodBoolean>;
|
|
386
386
|
}, "strip", z.ZodTypeAny, {
|
|
387
387
|
text: string;
|
|
388
|
-
sender: "user" | "recipient";
|
|
389
388
|
id: string;
|
|
389
|
+
sender: "user" | "recipient";
|
|
390
390
|
imageUrl?: string | undefined;
|
|
391
391
|
groupWithPrevious?: boolean | undefined;
|
|
392
392
|
}, {
|
|
393
393
|
text: string;
|
|
394
|
-
sender: "user" | "recipient";
|
|
395
394
|
id: string;
|
|
395
|
+
sender: "user" | "recipient";
|
|
396
396
|
imageUrl?: string | undefined;
|
|
397
397
|
groupWithPrevious?: boolean | undefined;
|
|
398
398
|
}>, "many">>;
|
|
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;
|
|
409
|
-
sender: "user" | "recipient";
|
|
410
409
|
id: string;
|
|
410
|
+
sender: "user" | "recipient";
|
|
411
411
|
imageUrl?: string | undefined;
|
|
412
412
|
groupWithPrevious?: boolean | undefined;
|
|
413
413
|
}[] | undefined;
|
|
@@ -582,15 +582,15 @@ 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;
|
|
592
|
-
sender: "user" | "recipient";
|
|
593
592
|
id: string;
|
|
593
|
+
sender: "user" | "recipient";
|
|
594
594
|
imageUrl?: string | undefined;
|
|
595
595
|
groupWithPrevious?: boolean | undefined;
|
|
596
596
|
}[] | undefined;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** A React component module. UGC supplies the root and bundled dependencies. */
|
|
3
|
+
export declare const remotionCompositionSchema: z.ZodObject<{
|
|
4
|
+
source: z.ZodString;
|
|
5
|
+
width: z.ZodNumber;
|
|
6
|
+
height: z.ZodNumber;
|
|
7
|
+
fps: z.ZodNumber;
|
|
8
|
+
durationInFrames: z.ZodNumber;
|
|
9
|
+
inputProps: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
10
|
+
}, "strict", z.ZodTypeAny, {
|
|
11
|
+
source: string;
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
fps: number;
|
|
15
|
+
durationInFrames: number;
|
|
16
|
+
inputProps: Record<string, unknown>;
|
|
17
|
+
}, {
|
|
18
|
+
source: string;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
fps: number;
|
|
22
|
+
durationInFrames: number;
|
|
23
|
+
inputProps: Record<string, unknown>;
|
|
24
|
+
}>;
|
|
25
|
+
export type RemotionCompositionInput = z.infer<typeof remotionCompositionSchema>;
|
|
26
|
+
export declare const remotionCompositionPortSchema: z.ZodObject<{
|
|
27
|
+
id: z.ZodEffects<z.ZodString, string, string>;
|
|
28
|
+
type: z.ZodEnum<["text", "number", "boolean", "image", "video", "audio", "object"]>;
|
|
29
|
+
isArray: z.ZodBoolean;
|
|
30
|
+
required: z.ZodBoolean;
|
|
31
|
+
}, "strict", z.ZodTypeAny, {
|
|
32
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
33
|
+
id: string;
|
|
34
|
+
isArray: boolean;
|
|
35
|
+
required: boolean;
|
|
36
|
+
}, {
|
|
37
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
38
|
+
id: string;
|
|
39
|
+
isArray: boolean;
|
|
40
|
+
required: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
export declare const remotionCompositionNodeSchema: z.ZodObject<{
|
|
43
|
+
source: z.ZodString;
|
|
44
|
+
width: z.ZodNumber;
|
|
45
|
+
height: z.ZodNumber;
|
|
46
|
+
fps: z.ZodNumber;
|
|
47
|
+
durationInFrames: z.ZodNumber;
|
|
48
|
+
inputProps: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
49
|
+
} & {
|
|
50
|
+
outputType: z.ZodDefault<z.ZodEnum<["video", "image"]>>;
|
|
51
|
+
inputs: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
52
|
+
id: z.ZodEffects<z.ZodString, string, string>;
|
|
53
|
+
type: z.ZodEnum<["text", "number", "boolean", "image", "video", "audio", "object"]>;
|
|
54
|
+
isArray: z.ZodBoolean;
|
|
55
|
+
required: z.ZodBoolean;
|
|
56
|
+
}, "strict", z.ZodTypeAny, {
|
|
57
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
58
|
+
id: string;
|
|
59
|
+
isArray: boolean;
|
|
60
|
+
required: boolean;
|
|
61
|
+
}, {
|
|
62
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
63
|
+
id: string;
|
|
64
|
+
isArray: boolean;
|
|
65
|
+
required: boolean;
|
|
66
|
+
}>, "many">, {
|
|
67
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
68
|
+
id: string;
|
|
69
|
+
isArray: boolean;
|
|
70
|
+
required: boolean;
|
|
71
|
+
}[], {
|
|
72
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
73
|
+
id: string;
|
|
74
|
+
isArray: boolean;
|
|
75
|
+
required: boolean;
|
|
76
|
+
}[]>;
|
|
77
|
+
outputMode: z.ZodEnum<["single", "per-input"]>;
|
|
78
|
+
selectionMode: z.ZodNull;
|
|
79
|
+
}, "strict", z.ZodTypeAny, {
|
|
80
|
+
source: string;
|
|
81
|
+
outputMode: "per-input" | "single";
|
|
82
|
+
selectionMode: null;
|
|
83
|
+
outputType: "video" | "image";
|
|
84
|
+
inputs: {
|
|
85
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
86
|
+
id: string;
|
|
87
|
+
isArray: boolean;
|
|
88
|
+
required: boolean;
|
|
89
|
+
}[];
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
fps: number;
|
|
93
|
+
durationInFrames: number;
|
|
94
|
+
inputProps: Record<string, unknown>;
|
|
95
|
+
}, {
|
|
96
|
+
source: string;
|
|
97
|
+
outputMode: "per-input" | "single";
|
|
98
|
+
selectionMode: null;
|
|
99
|
+
inputs: {
|
|
100
|
+
type: "number" | "boolean" | "object" | "video" | "image" | "audio" | "text";
|
|
101
|
+
id: string;
|
|
102
|
+
isArray: boolean;
|
|
103
|
+
required: boolean;
|
|
104
|
+
}[];
|
|
105
|
+
width: number;
|
|
106
|
+
height: number;
|
|
107
|
+
fps: number;
|
|
108
|
+
durationInFrames: number;
|
|
109
|
+
inputProps: Record<string, unknown>;
|
|
110
|
+
outputType?: "video" | "image" | undefined;
|
|
111
|
+
}>;
|
|
112
|
+
export declare const REMOTION_COMPOSITION_IMPORTS: string[];
|
|
113
|
+
export declare function parseRemotionPropsJson({ text }: {
|
|
114
|
+
text: string;
|
|
115
|
+
}): {
|
|
116
|
+
ok: false;
|
|
117
|
+
message: string;
|
|
118
|
+
value?: undefined;
|
|
119
|
+
} | {
|
|
120
|
+
ok: true;
|
|
121
|
+
value: Record<string, unknown>;
|
|
122
|
+
message?: undefined;
|
|
123
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REMOTION_COMPOSITION_IMPORTS = exports.remotionCompositionNodeSchema = exports.remotionCompositionPortSchema = exports.remotionCompositionSchema = void 0;
|
|
4
|
+
exports.parseRemotionPropsJson = parseRemotionPropsJson;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
/** A React component module. UGC supplies the root and bundled dependencies. */
|
|
7
|
+
exports.remotionCompositionSchema = zod_1.z.object({
|
|
8
|
+
source: zod_1.z.string().trim().min(1).max(200000),
|
|
9
|
+
width: zod_1.z.number().int().min(16).max(3840).multipleOf(2),
|
|
10
|
+
height: zod_1.z.number().int().min(16).max(3840).multipleOf(2),
|
|
11
|
+
fps: zod_1.z.number().int().min(1).max(60),
|
|
12
|
+
durationInFrames: zod_1.z.number().int().min(1).max(18000),
|
|
13
|
+
inputProps: zod_1.z.record(zod_1.z.unknown()),
|
|
14
|
+
}).strict();
|
|
15
|
+
exports.remotionCompositionPortSchema = zod_1.z.object({
|
|
16
|
+
id: zod_1.z.string().regex(/^[A-Za-z][A-Za-z0-9_]*$/, 'Use a simple prop name').refine(id => !['constructor', 'prototype', '__proto__'].includes(id), 'Reserved prop name'),
|
|
17
|
+
type: zod_1.z.enum(['text', 'number', 'boolean', 'image', 'video', 'audio', 'object']),
|
|
18
|
+
isArray: zod_1.z.boolean(),
|
|
19
|
+
required: zod_1.z.boolean(),
|
|
20
|
+
}).strict();
|
|
21
|
+
exports.remotionCompositionNodeSchema = exports.remotionCompositionSchema.extend({
|
|
22
|
+
outputType: zod_1.z.enum(['video', 'image']).default('video'),
|
|
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'),
|
|
24
|
+
outputMode: zod_1.z.enum(['single', 'per-input']),
|
|
25
|
+
selectionMode: zod_1.z.null(),
|
|
26
|
+
});
|
|
27
|
+
exports.REMOTION_COMPOSITION_IMPORTS = [
|
|
28
|
+
'react', 'react/jsx-runtime', 'react/jsx-dev-runtime', 'remotion',
|
|
29
|
+
'ugcinc/render', 'ugcinc/render/utils', 'ugcinc/render/types',
|
|
30
|
+
];
|
|
31
|
+
function parseRemotionPropsJson({ text }) {
|
|
32
|
+
try {
|
|
33
|
+
const value = JSON.parse(text);
|
|
34
|
+
const parsed = zod_1.z.record(zod_1.z.unknown()).safeParse(value);
|
|
35
|
+
if (!parsed.success)
|
|
36
|
+
return { ok: false, message: 'Props must be a JSON object' };
|
|
37
|
+
return { ok: true, value: parsed.data };
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return { ok: false, message: 'Enter valid JSON' };
|
|
41
|
+
}
|
|
42
|
+
}
|
package/dist/render.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ import type { VideoEditorNodeConfig, DeduplicationInput } from './render/types';
|
|
|
12
12
|
import type { CaptionWord, CaptionStyle } from './render/types/caption';
|
|
13
13
|
import type { ImageEditorNodeConfig } from './automations/nodes/image-composer';
|
|
14
14
|
import type { CreateDmMessage } from './automations/nodes/create-dm';
|
|
15
|
+
import { type RemotionCompositionInput } from './render/types/remotion-composition';
|
|
16
|
+
/** Submit TSX source and props; UGC owns registration and bundling. */
|
|
17
|
+
export declare function submitRemotionCompositionRenderJob(params: RemotionCompositionInput & {
|
|
18
|
+
outputType?: 'video' | 'image';
|
|
19
|
+
}): Promise<ApiResponse<RenderJobResponse>>;
|
|
15
20
|
export interface RenderJobResponse {
|
|
16
21
|
job_id: string;
|
|
17
22
|
status: string;
|
package/dist/render.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* variable set fails fast.
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.submitRemotionCompositionRenderJob = submitRemotionCompositionRenderJob;
|
|
12
13
|
exports.submitImageRenderJob = submitImageRenderJob;
|
|
13
14
|
exports.submitVideoRenderJob = submitVideoRenderJob;
|
|
14
15
|
exports.getRenderJobStatus = getRenderJobStatus;
|
|
@@ -18,6 +19,8 @@ exports.submitScreenshotAnimationRenderJob = submitScreenshotAnimationRenderJob;
|
|
|
18
19
|
exports.submitAutoCaptionRenderJob = submitAutoCaptionRenderJob;
|
|
19
20
|
exports.submitInstagramDmRenderJob = submitInstagramDmRenderJob;
|
|
20
21
|
exports.submitIMessageDmRenderJob = submitIMessageDmRenderJob;
|
|
22
|
+
const zod_1 = require("zod");
|
|
23
|
+
const remotion_composition_1 = require("./render/types/remotion-composition");
|
|
21
24
|
function renderBaseUrl() {
|
|
22
25
|
const url = process.env.UGC_RENDER_URL?.trim();
|
|
23
26
|
if (!url) {
|
|
@@ -26,6 +29,28 @@ function renderBaseUrl() {
|
|
|
26
29
|
return url.replace(/\/+$/, '');
|
|
27
30
|
}
|
|
28
31
|
const MAX_RETRIES = 3;
|
|
32
|
+
/** Submit TSX source and props; UGC owns registration and bundling. */
|
|
33
|
+
async function submitRemotionCompositionRenderJob(params) {
|
|
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);
|
|
38
|
+
if (!parsed.success)
|
|
39
|
+
return { ok: false, code: 400, message: parsed.error.message };
|
|
40
|
+
const response = await renderFetch('/submit-job', {
|
|
41
|
+
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
|
42
|
+
body: JSON.stringify({ config: { _compositionType: 'remotion-composition', ...parsed.data },
|
|
43
|
+
output_type: outputType, video_codec: 'h264', image_format: 'png' }),
|
|
44
|
+
});
|
|
45
|
+
const data = await response.json();
|
|
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);
|
|
47
|
+
if (!response.ok || !result.success || result.data.status === 'error') {
|
|
48
|
+
const error = zod_1.z.object({ error: zod_1.z.string() }).safeParse(data);
|
|
49
|
+
return { ok: false, code: response.ok ? 400 : response.status,
|
|
50
|
+
message: error.success ? error.data.error : 'Failed to submit Remotion composition' };
|
|
51
|
+
}
|
|
52
|
+
return { ok: true, code: 200, message: 'Remotion composition submitted', data: result.data };
|
|
53
|
+
}
|
|
29
54
|
/**
|
|
30
55
|
* Fetch wrapper for every render worker call: retries network errors, 429 and
|
|
31
56
|
* 5xx with exponential backoff; returns 4xx responses to the caller unchanged.
|
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