post-engineer-mcp 1.52.601 → 1.52.615
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 +1 -1
- package/dist/client-batch.d.ts +3 -1
- package/dist/client-batch.js +4 -1
- package/dist/client-batch.js.map +1 -1
- package/dist/client-billing.d.ts +5 -0
- package/dist/client-billing.js +34 -0
- package/dist/client-billing.js.map +1 -0
- package/dist/client-experiments.d.ts +5 -14
- package/dist/client-experiments.js +17 -3
- package/dist/client-experiments.js.map +1 -1
- package/dist/client-posts.d.ts +12 -6
- package/dist/client-posts.js +22 -11
- package/dist/client-posts.js.map +1 -1
- package/dist/client-prompts.d.ts +4 -8
- package/dist/client-prompts.js +7 -24
- package/dist/client-prompts.js.map +1 -1
- package/dist/client-publish-uploaded.d.ts +8 -1
- package/dist/client-publish-uploaded.js +121 -49
- package/dist/client-publish-uploaded.js.map +1 -1
- package/dist/client-publishing-accounts.d.ts +4 -2
- package/dist/client-publishing-accounts.js +6 -2
- package/dist/client-publishing-accounts.js.map +1 -1
- package/dist/client-types.d.ts +5 -4
- package/dist/client-user-media.d.ts +4 -3
- package/dist/client-user-media.js +17 -47
- package/dist/client-user-media.js.map +1 -1
- package/dist/client-video-task.d.ts +3 -1
- package/dist/client-video-task.js +4 -1
- package/dist/client-video-task.js.map +1 -1
- package/dist/client.d.ts +40 -39
- package/dist/client.js +80 -148
- package/dist/client.js.map +1 -1
- package/dist/cloned-voice-client.d.ts +7 -5
- package/dist/cloned-voice-client.js +10 -4
- package/dist/cloned-voice-client.js.map +1 -1
- package/dist/connect-account.js +14 -6
- package/dist/connect-account.js.map +1 -1
- package/dist/contract-response.d.ts +8 -0
- package/dist/contract-response.js +24 -0
- package/dist/contract-response.js.map +1 -0
- package/dist/contracts/accounts.d.ts +844 -0
- package/dist/contracts/accounts.js +346 -0
- package/dist/contracts/accounts.js.map +1 -0
- package/dist/contracts/billing.d.ts +109 -0
- package/dist/contracts/billing.js +88 -0
- package/dist/contracts/billing.js.map +1 -0
- package/dist/contracts/endpoint.d.ts +45 -0
- package/dist/contracts/endpoint.js +8 -0
- package/dist/contracts/endpoint.js.map +1 -0
- package/dist/contracts/experiments.d.ts +271 -0
- package/dist/contracts/experiments.js +170 -0
- package/dist/contracts/experiments.js.map +1 -0
- package/dist/contracts/media.d.ts +165 -0
- package/dist/contracts/media.js +139 -0
- package/dist/contracts/media.js.map +1 -0
- package/dist/contracts/metrics.d.ts +351 -0
- package/dist/contracts/metrics.js +256 -0
- package/dist/contracts/metrics.js.map +1 -0
- package/dist/contracts/personas.d.ts +560 -0
- package/dist/contracts/personas.js +346 -0
- package/dist/contracts/personas.js.map +1 -0
- package/dist/contracts/posts.d.ts +485 -0
- package/dist/contracts/posts.js +153 -0
- package/dist/contracts/posts.js.map +1 -0
- package/dist/contracts/prompts.d.ts +90 -0
- package/dist/contracts/prompts.js +48 -0
- package/dist/contracts/prompts.js.map +1 -0
- package/dist/contracts/schedule.d.ts +691 -0
- package/dist/contracts/schedule.js +264 -0
- package/dist/contracts/schedule.js.map +1 -0
- package/dist/contracts/video-tasks.d.ts +181 -0
- package/dist/contracts/video-tasks.js +121 -0
- package/dist/contracts/video-tasks.js.map +1 -0
- package/dist/contracts/videos.d.ts +693 -0
- package/dist/contracts/videos.js +443 -0
- package/dist/contracts/videos.js.map +1 -0
- package/dist/contracts/voices.d.ts +237 -0
- package/dist/contracts/voices.js +118 -0
- package/dist/contracts/voices.js.map +1 -0
- package/dist/generate-video.d.ts +34 -34
- package/dist/generate-video.js +14 -2
- package/dist/generate-video.js.map +1 -1
- package/dist/intent-content.js +1 -1
- package/dist/intent-personas.js +17 -7
- package/dist/intent-personas.js.map +1 -1
- package/dist/limits.d.ts +27 -44
- package/dist/limits.js +27 -45
- package/dist/limits.js.map +1 -1
- package/dist/persona-delete.js +9 -9
- package/dist/persona-delete.js.map +1 -1
- package/dist/persona-update.js +3 -2
- package/dist/persona-update.js.map +1 -1
- package/dist/script-segments.d.ts +1 -1
- package/dist/script-segments.js +1 -1
- package/dist/single-video-shape.d.ts +5 -5
- package/dist/single-video-shape.js +1 -1
- package/dist/tools-batch.d.ts +42 -42
- package/dist/tools-batch.js +12 -36
- package/dist/tools-batch.js.map +1 -1
- package/dist/tools-experiments.d.ts +11 -11
- package/dist/tools-experiments.js +17 -9
- package/dist/tools-experiments.js.map +1 -1
- package/dist/tools-pinterest.js +5 -15
- package/dist/tools-pinterest.js.map +1 -1
- package/dist/tools-single-video.js +14 -51
- package/dist/tools-single-video.js.map +1 -1
- package/dist/tools-user-media.js +3 -1
- package/dist/tools-user-media.js.map +1 -1
- package/dist/tools.d.ts +0 -25
- package/dist/tools.js +56 -96
- package/dist/tools.js.map +1 -1
- package/dist/voice-filters.js +2 -1
- package/dist/voice-filters.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
// GENERATED from shared/contracts — do not edit.
|
|
2
|
+
// Run `node scripts/sync-contracts.mjs` from the repo root to regenerate.
|
|
3
|
+
// Video generation and publish-by-id contract: the single source of truth
|
|
4
|
+
// for POST /api/videos/generate-and-schedule, validate-script, score-draft,
|
|
5
|
+
// batch-discount, upload-url, uploads/:uploadId/complete and publish-by-id.
|
|
6
|
+
// Both apps generate a copy of this file (see scripts/sync-contracts.mjs);
|
|
7
|
+
// never edit a generated copy by hand.
|
|
8
|
+
//
|
|
9
|
+
// The web routes keep their own parsers where the 400 carries more than the
|
|
10
|
+
// shape (generate-and-schedule collects every issue, validate-script and
|
|
11
|
+
// score-draft report semantic failures with stable codes, mint/publish-by-id
|
|
12
|
+
// answer with coded errors): the contract mirrors the shape those parsers
|
|
13
|
+
// accept, and the equivalence tests pin the two together. Response schemas
|
|
14
|
+
// are plain objects (extra fields ignored).
|
|
15
|
+
//
|
|
16
|
+
// Duplicated literals, each pinned by a file-parsing sync test because the
|
|
17
|
+
// owning module cannot import this contract: VIDEO_TYPES /
|
|
18
|
+
// VIDEO_TYPE_ERROR_SUFFIX / unknownVideoTypeMessage mirror lib/tokens.ts,
|
|
19
|
+
// apps/mcp/src/video-type.ts and the engine's VIDEO_TYPE_ERROR_SUFFIX;
|
|
20
|
+
// MAX_SEGMENTS / MAX_IMAGES_MODE_MEDIAS / HOOK_MIN_SECONDS / HOOK_MAX_SECONDS
|
|
21
|
+
// mirror shared/script-segments/script-segments.ts, the source of the
|
|
22
|
+
// generated copies in both apps (a relative import from a synced contract
|
|
23
|
+
// cannot reach it: the two apps keep it at different depths).
|
|
24
|
+
import { z } from 'zod';
|
|
25
|
+
/** Define one endpoint contract. The literal path is preserved in the type
|
|
26
|
+
* so ParamsOf can read its `:param` segments. `Body`/`Query` default to
|
|
27
|
+
* `undefined` so an omitted optional schema stays `undefined` (not the
|
|
28
|
+
* bare `ZodType`) in the returned definition. */
|
|
29
|
+
export function defineEndpoint(config) {
|
|
30
|
+
return config;
|
|
31
|
+
}
|
|
32
|
+
import { EXPERIMENT_TARGET_PAIRS_MAX, EXPERIMENT_VARIANT_ID_PATTERN } from './experiments.js';
|
|
33
|
+
import { UploadContentResponseSchema } from './media.js';
|
|
34
|
+
import { SOCIAL_PROVIDERS, UUID } from './metrics.js';
|
|
35
|
+
/** The one video mode (issue #542): it decides render path + price. */
|
|
36
|
+
export const VIDEO_TYPES = ['full_lipsync', 'hook_lipsync', 'faceless'];
|
|
37
|
+
/**
|
|
38
|
+
* The invalid-video_type message suffix: every valid type WITH its token
|
|
39
|
+
* cost, so the agent can choose knowing the price. Must stay identical to
|
|
40
|
+
* the engine's VIDEO_TYPE_ERROR_SUFFIX (apps/engine/app/models/schema.py)
|
|
41
|
+
* and to lib/tokens.ts / apps/mcp/src/video-type.ts.
|
|
42
|
+
*/
|
|
43
|
+
export const VIDEO_TYPE_ERROR_SUFFIX = 'use full_lipsync (8/15), hook_lipsync (2/3) or faceless (1)';
|
|
44
|
+
/** Short invalid-video_type error, costs included, under 200 chars. */
|
|
45
|
+
export function unknownVideoTypeMessage(value) {
|
|
46
|
+
const shown = value === null || value === undefined ? '' : String(value).slice(0, 32);
|
|
47
|
+
return `unknown video_type '${shown}'; ${VIDEO_TYPE_ERROR_SUFFIX}`;
|
|
48
|
+
}
|
|
49
|
+
/** Missing-video_type error: same suffix, so the agent sees values + costs. */
|
|
50
|
+
export const VIDEO_TYPE_REQUIRED_MESSAGE = `videoType is required; ${VIDEO_TYPE_ERROR_SUFFIX}`;
|
|
51
|
+
/** Segments per video: the shape cap, before the content rules run. */
|
|
52
|
+
export const MAX_SEGMENTS = 12;
|
|
53
|
+
/** Photos per segment in images mode (full lip sync allows at most 6 in total). */
|
|
54
|
+
export const MAX_IMAGES_MODE_MEDIAS = 30;
|
|
55
|
+
/** Spoken hook window, seconds: reported by validate-script. */
|
|
56
|
+
export const HOOK_MIN_SECONDS = 8;
|
|
57
|
+
export const HOOK_MAX_SECONDS = 12;
|
|
58
|
+
/**
|
|
59
|
+
* How many problems a pre-auth 400 will echo. The route runs before session
|
|
60
|
+
* and rate-limit checks, and a caller can send a huge array, so at most this
|
|
61
|
+
* many problems are echoed. Each field path and each message is also
|
|
62
|
+
* length-capped where the response is built. The event's errorCount is the
|
|
63
|
+
* real total.
|
|
64
|
+
*/
|
|
65
|
+
export const MAX_REPORTED_ISSUES = 20;
|
|
66
|
+
/** Videos per batch (issue #487): the cheapest face video of every 6 is free. */
|
|
67
|
+
export const MAX_BATCH_VIDEOS = 12;
|
|
68
|
+
/** Batch key: letters, digits, "-" and "_" only, at most 100 chars. */
|
|
69
|
+
export const BATCH_KEY_MAX_LENGTH = 100;
|
|
70
|
+
export const BATCH_KEY_PATTERN = /^[A-Za-z0-9_-]+$/;
|
|
71
|
+
/** What the scored text is: a post body, or a video script. */
|
|
72
|
+
export const DRAFT_KINDS = ['post', 'script'];
|
|
73
|
+
/** The networks score-draft can publish-check. Same 10 as SOCIAL_PROVIDERS. */
|
|
74
|
+
export const PUBLISH_NETWORKS = [
|
|
75
|
+
'linkedin',
|
|
76
|
+
'youtube',
|
|
77
|
+
'instagram',
|
|
78
|
+
'bluesky',
|
|
79
|
+
'threads',
|
|
80
|
+
'facebook',
|
|
81
|
+
'pinterest',
|
|
82
|
+
'3speak',
|
|
83
|
+
'rumble',
|
|
84
|
+
'fanvue',
|
|
85
|
+
];
|
|
86
|
+
/** Drafts over this input cap are a 400, never silently truncated. */
|
|
87
|
+
export const DRAFT_MAX_INPUT_CHARS = 10000;
|
|
88
|
+
/** Signed video uploads (issue #561): the 2GB ceiling, same as upload-content. */
|
|
89
|
+
export const VIDEO_UPLOAD_CONTENT_TYPES = ['video/mp4', 'video/quicktime'];
|
|
90
|
+
export const MAX_VIDEO_UPLOAD_BYTES = 2 * 1024 * 1024 * 1024;
|
|
91
|
+
//---------------
|
|
92
|
+
// Segments script (moved verbatim from
|
|
93
|
+
// app/api/videos/generate-and-schedule/segments-schema.ts): strict at
|
|
94
|
+
// every level so an unknown key is a 400, never silently dropped.
|
|
95
|
+
// Content rules (word counts) live in the shared validator; this pins
|
|
96
|
+
// the shape plus the segment-count cap.
|
|
97
|
+
//---------------
|
|
98
|
+
export const segmentOverlaySchema = z
|
|
99
|
+
.object({
|
|
100
|
+
title: z.string(),
|
|
101
|
+
subtitle: z.string().optional(),
|
|
102
|
+
badge: z.string().optional(),
|
|
103
|
+
})
|
|
104
|
+
.strict();
|
|
105
|
+
export const segmentsRequestSchema = z.array(z
|
|
106
|
+
.object({
|
|
107
|
+
kind: z.enum(['hook', 'content']),
|
|
108
|
+
text: z.string(),
|
|
109
|
+
media: z
|
|
110
|
+
.array(z
|
|
111
|
+
.object({
|
|
112
|
+
mediaId: z.string().optional(),
|
|
113
|
+
url: z.string().optional(),
|
|
114
|
+
overlay: segmentOverlaySchema.optional(),
|
|
115
|
+
})
|
|
116
|
+
.strict())
|
|
117
|
+
.max(MAX_IMAGES_MODE_MEDIAS)
|
|
118
|
+
.optional(),
|
|
119
|
+
})
|
|
120
|
+
.strict()).max(MAX_SEGMENTS);
|
|
121
|
+
/** Paired A/B experiment link (issue #476): one variant of one pair. */
|
|
122
|
+
export const ExperimentLinkSchema = z
|
|
123
|
+
.object({
|
|
124
|
+
experimentId: z.string().uuid(),
|
|
125
|
+
variantId: z.string().regex(EXPERIMENT_VARIANT_ID_PATTERN),
|
|
126
|
+
pair: z.number().int().min(1).max(EXPERIMENT_TARGET_PAIRS_MAX),
|
|
127
|
+
})
|
|
128
|
+
.strict();
|
|
129
|
+
//---------------
|
|
130
|
+
// POST /api/videos/generate-and-schedule — moved verbatim from the route
|
|
131
|
+
// (BodySchema). Plain object, not strict: the route rejects unknown keys
|
|
132
|
+
// itself (rawKeyIssues — a `topics` key is a 400 naming the field, never
|
|
133
|
+
// stripped silently), and the semantic checks (mode/schedule coupling,
|
|
134
|
+
// segments required per mode, providers vs persona) run after the shape
|
|
135
|
+
// parse in request-validation.ts, never here.
|
|
136
|
+
//---------------
|
|
137
|
+
const PublishingScheduleSchema = z.object({
|
|
138
|
+
startAt: z.string(),
|
|
139
|
+
times: z.array(z.string()),
|
|
140
|
+
timezone: z.string(),
|
|
141
|
+
});
|
|
142
|
+
const PublishingSchema = z.object({
|
|
143
|
+
// 'scheduled' (default): publish at the slot times. 'asap': publish each
|
|
144
|
+
// video the moment generation finishes, with no scheduled time.
|
|
145
|
+
mode: z.enum(['scheduled', 'asap']).optional(),
|
|
146
|
+
providers: z.array(z.string()).max(MAX_REPORTED_ISSUES),
|
|
147
|
+
accounts: z.record(z.string(), z.array(z.string())).optional(),
|
|
148
|
+
pinterestBoardId: z.string().max(100).optional(),
|
|
149
|
+
// Required in scheduled mode, forbidden in asap mode (a stray plan would
|
|
150
|
+
// be silently ignored, so it is a 400 instead).
|
|
151
|
+
schedule: PublishingScheduleSchema.optional(),
|
|
152
|
+
// ASAP-only: the user's IANA zone, kept for display. Optional because the
|
|
153
|
+
// schedules.timezone column is NOT NULL DEFAULT 'UTC'.
|
|
154
|
+
timezone: z.string().optional(),
|
|
155
|
+
});
|
|
156
|
+
const OptionsSchema = z
|
|
157
|
+
.object({
|
|
158
|
+
// The one video mode (issue #542 follow-up), required: it decides
|
|
159
|
+
// render path + price. Zod v4 dropped errorMap, so the message lives
|
|
160
|
+
// in `error` (missing -> required, else unknown-mode with costs).
|
|
161
|
+
videoType: z.enum(VIDEO_TYPES, {
|
|
162
|
+
error: (issue) => (issue.input === undefined ? `options.videoType is required; ${VIDEO_TYPE_ERROR_SUFFIX}` : unknownVideoTypeMessage(issue.input)),
|
|
163
|
+
}),
|
|
164
|
+
// Inlined from shared/music-mood-field/music-mood-field.ts: the
|
|
165
|
+
// contract cannot import it (the two apps keep the generated copy at
|
|
166
|
+
// different depths). The equivalence test pins the bounds + describe
|
|
167
|
+
// text to the shared field.
|
|
168
|
+
musicMood: z.string().min(1).max(64).optional().describe('Background-music mood for the video: a mood from the engine BGM catalog, or "none" for explicit no music. Omitted lets the engine pick the first catalogued mood; an unknown mood is rejected with a 400 naming the valid moods. Works with faceless videos too.'),
|
|
169
|
+
audioUrl: z.string().optional(),
|
|
170
|
+
imageId: z.string().optional(),
|
|
171
|
+
// Segments contract (MCP first, Phase 1): one call = one video; the
|
|
172
|
+
// joined script becomes the video script, no LLM expands it. The engine's persona script budget and duration trim still apply downstream.
|
|
173
|
+
segments: segmentsRequestSchema.optional(),
|
|
174
|
+
webhookUrl: z.string().optional(),
|
|
175
|
+
voiceId: z.string().optional(),
|
|
176
|
+
// The rest of a persona's editorial definition, for a post created
|
|
177
|
+
// WITHOUT one (migration 012). With a persona these still override it.
|
|
178
|
+
videoAspect: z.enum(['9:16', '16:9', '1:1']).optional(),
|
|
179
|
+
videoLayout: z.enum(['standard', 'react']).optional(),
|
|
180
|
+
paragraphNumber: z.number().int().min(1).max(10).optional(),
|
|
181
|
+
language: z.string().optional(),
|
|
182
|
+
niche: z.string().optional(),
|
|
183
|
+
})
|
|
184
|
+
.optional();
|
|
185
|
+
export const GenerateAndScheduleBodySchema = z.object({
|
|
186
|
+
// Optional: a post without a persona is faceless (options.videoType
|
|
187
|
+
// 'faceless') and defined entirely by options + title + description.
|
|
188
|
+
personaId: z.string().optional(),
|
|
189
|
+
// The slot label. At most 100 chars (YouTube's cap): the engine rejects
|
|
190
|
+
// longer titles at dispatch, so fail here, pre-charge.
|
|
191
|
+
title: z.string().max(100, 'title must be at most 100 characters.'),
|
|
192
|
+
// Agent-supplied video description (issue #542 follow-up), REQUIRED: the publish copy. Zod v4 dropped required_error, so the missing-value message lives in `error`.
|
|
193
|
+
description: z.string({ error: (issue) => (issue.input === undefined ? 'description is required: the publish copy for this video.' : undefined) }).min(1, 'description must be a non-empty string: the publish copy for this video.').max(5000, 'description must be at most 5000 characters.'),
|
|
194
|
+
publishing: PublishingSchema,
|
|
195
|
+
options: OptionsSchema,
|
|
196
|
+
idempotencyKey: z.string().optional(),
|
|
197
|
+
// Paired A/B experiment link (issue #476), checked before the charge.
|
|
198
|
+
experiment: ExperimentLinkSchema.optional(),
|
|
199
|
+
});
|
|
200
|
+
export const GenerateSlotResultSchema = z.object({
|
|
201
|
+
slotId: z.string(),
|
|
202
|
+
slotAt: z.string(),
|
|
203
|
+
title: z.string(),
|
|
204
|
+
taskId: z.string().nullable(),
|
|
205
|
+
status: z.string(),
|
|
206
|
+
/** Machine code for a failed slot (image_sign_failed, engine_rejected, ...). */
|
|
207
|
+
errorCode: z.string().optional(),
|
|
208
|
+
/** Whether the prepaid cost was returned after a failed dispatch. */
|
|
209
|
+
tokensRefunded: z.boolean().optional(),
|
|
210
|
+
});
|
|
211
|
+
// Voice-fallback warning object (never a bare string): the persona's stored
|
|
212
|
+
// voice was missing or unroutable, so the route dispatched with the house
|
|
213
|
+
// default. Only one code exists today (`voice_fallback_applied`).
|
|
214
|
+
export const GenerateAndScheduleWarningSchema = z.object({ code: z.string(), fromVoice: z.string(), toVoice: z.string() });
|
|
215
|
+
// The all-failed 502 envelope ({ success: false, error, code, ... }) is
|
|
216
|
+
// not modelled: the MCP throws on non-2xx before parsing, so only the
|
|
217
|
+
// success shape reaches the client.
|
|
218
|
+
export const GenerateAndScheduleResponseSchema = z.object({
|
|
219
|
+
success: z.literal(true),
|
|
220
|
+
schedule: z.object({
|
|
221
|
+
id: z.string(),
|
|
222
|
+
mode: z.enum(['scheduled', 'asap']),
|
|
223
|
+
}),
|
|
224
|
+
slots: z.array(GenerateSlotResultSchema),
|
|
225
|
+
replayed: z.boolean(),
|
|
226
|
+
warnings: z.array(GenerateAndScheduleWarningSchema).optional(),
|
|
227
|
+
});
|
|
228
|
+
//---------------
|
|
229
|
+
// POST /api/videos/validate-script — mechanical segments-script
|
|
230
|
+
// validation only. The route runs validateSegments after the shape parse;
|
|
231
|
+
// the body schema mirrors the fields it reads (segments is opaque here,
|
|
232
|
+
// the validator owns its content rules).
|
|
233
|
+
//---------------
|
|
234
|
+
export const ValidateScriptBodySchema = z.object({
|
|
235
|
+
segments: z.unknown().optional(),
|
|
236
|
+
videoType: z
|
|
237
|
+
.enum(VIDEO_TYPES, {
|
|
238
|
+
error: (issue) => unknownVideoTypeMessage(issue.input),
|
|
239
|
+
})
|
|
240
|
+
.optional(),
|
|
241
|
+
});
|
|
242
|
+
export const ValidateScriptResponseSchema = z.object({
|
|
243
|
+
success: z.literal(true),
|
|
244
|
+
valid: z.literal(true),
|
|
245
|
+
segmentCount: z.number(),
|
|
246
|
+
totalWords: z.number(),
|
|
247
|
+
hookWords: z.number(),
|
|
248
|
+
contentWords: z.number(),
|
|
249
|
+
mediaCount: z.number(),
|
|
250
|
+
hookWindowSeconds: z.object({
|
|
251
|
+
min: z.literal(HOOK_MIN_SECONDS),
|
|
252
|
+
max: z.literal(HOOK_MAX_SECONDS),
|
|
253
|
+
}),
|
|
254
|
+
measuredDurationSeconds: z.null(),
|
|
255
|
+
measured: z.literal('pending'),
|
|
256
|
+
measuredReason: z.string(),
|
|
257
|
+
});
|
|
258
|
+
//---------------
|
|
259
|
+
// POST /api/videos/score-draft — mechanical draft scoring. The route
|
|
260
|
+
// keeps its hand-rolled parseBody (the non-object body message and the
|
|
261
|
+
// per-field messages are part of its 400 contract); this schema mirrors
|
|
262
|
+
// its rules, message for message.
|
|
263
|
+
//---------------
|
|
264
|
+
export const ScoreDraftBodySchema = z.object({
|
|
265
|
+
draft: z
|
|
266
|
+
.string({
|
|
267
|
+
error: (issue) => (issue.code === 'invalid_type' ? 'draft is required and must be a non-empty string.' : undefined),
|
|
268
|
+
})
|
|
269
|
+
.min(1, 'draft is required and must be a non-empty string.')
|
|
270
|
+
.max(DRAFT_MAX_INPUT_CHARS, `draft must be at most ${DRAFT_MAX_INPUT_CHARS} characters.`)
|
|
271
|
+
.refine((value) => value.trim().length > 0, { message: 'draft is required and must be a non-empty string.' }),
|
|
272
|
+
network: z
|
|
273
|
+
.enum(PUBLISH_NETWORKS, {
|
|
274
|
+
error: () => `network must be one of ${PUBLISH_NETWORKS.map((n) => `"${n}"`).join(', ')} when given.`,
|
|
275
|
+
})
|
|
276
|
+
.optional(),
|
|
277
|
+
personaId: z
|
|
278
|
+
.string()
|
|
279
|
+
.refine((value) => UUID.test(value), { message: 'personaId must be a uuid when given.' })
|
|
280
|
+
.optional(),
|
|
281
|
+
kind: z
|
|
282
|
+
.enum(DRAFT_KINDS, {
|
|
283
|
+
error: () => 'kind must be "post" or "script" when given.',
|
|
284
|
+
})
|
|
285
|
+
.optional(),
|
|
286
|
+
});
|
|
287
|
+
export const DraftScoreReasonSchema = z.object({ rule: z.string(), detail: z.string(), points: z.number() });
|
|
288
|
+
export const TopAngleSchema = z.object({ angle: z.string(), engagement: z.number(), posts: z.number() });
|
|
289
|
+
export const DraftBaselineSchema = z.object({
|
|
290
|
+
postsMeasured: z.number(),
|
|
291
|
+
topAngles: z.array(TopAngleSchema),
|
|
292
|
+
medianEngagement: z.number().nullable(),
|
|
293
|
+
bestEngagement: z.number().nullable(),
|
|
294
|
+
// True when the capped read left rows out, so the numbers above describe
|
|
295
|
+
// only the most recent BASELINE_ROW_LIMIT snapshots.
|
|
296
|
+
truncated: z.boolean(),
|
|
297
|
+
});
|
|
298
|
+
export const PublishCheckSchema = z.object({ network: z.enum(PUBLISH_NETWORKS), ok: z.boolean(), failures: z.array(z.string()), warnings: z.array(z.string()) });
|
|
299
|
+
export const DraftCountsSchema = z.object({ chars: z.number(), words: z.number(), hashtags: z.number(), links: z.number(), firstLineWords: z.number(), slopHits: z.array(z.string()), topThemeMatch: z.string().nullable() });
|
|
300
|
+
export const ScoreDraftResponseSchema = z.object({
|
|
301
|
+
success: z.literal(true),
|
|
302
|
+
score: z.number(),
|
|
303
|
+
reasons: z.array(DraftScoreReasonSchema),
|
|
304
|
+
counts: DraftCountsSchema,
|
|
305
|
+
baseline: DraftBaselineSchema,
|
|
306
|
+
// Null for a script: caption limits do not apply to spoken text.
|
|
307
|
+
publishCheck: PublishCheckSchema.nullable(),
|
|
308
|
+
});
|
|
309
|
+
//---------------
|
|
310
|
+
// POST /api/videos/batch-discount — the "6 for 5" batch discount
|
|
311
|
+
// (issue #487). The route keeps its local parse (first-issue message,
|
|
312
|
+
// bare) plus the duplicate-scheduleIds check that runs after it.
|
|
313
|
+
//---------------
|
|
314
|
+
export const BatchDiscountBodySchema = z
|
|
315
|
+
.object({
|
|
316
|
+
batchKey: z.string().min(1).max(BATCH_KEY_MAX_LENGTH).regex(BATCH_KEY_PATTERN, 'batchKey may only contain letters, digits, "-" and "_".'),
|
|
317
|
+
scheduleIds: z.array(z.string().uuid()).min(1).max(MAX_BATCH_VIDEOS),
|
|
318
|
+
})
|
|
319
|
+
.strict();
|
|
320
|
+
export const BatchDiscountFreeVideoSchema = z.object({ scheduleId: z.string(), slotId: z.string(), discountTokens: z.number() });
|
|
321
|
+
export const BatchDiscountResponseSchema = z.object({
|
|
322
|
+
success: z.literal(true),
|
|
323
|
+
batchId: z.string(),
|
|
324
|
+
videos: z.number(),
|
|
325
|
+
faceVideos: z.number(),
|
|
326
|
+
earnedFreeVideos: z.number(),
|
|
327
|
+
freeVideos: z.array(BatchDiscountFreeVideoSchema),
|
|
328
|
+
discountTokens: z.number(),
|
|
329
|
+
chargedTokens: z.number(),
|
|
330
|
+
warnings: z.array(z.string()),
|
|
331
|
+
});
|
|
332
|
+
//---------------
|
|
333
|
+
// POST /api/videos/upload-url + POST /api/videos/uploads/:uploadId/complete
|
|
334
|
+
// — signed video uploads (issue #561). The mint route keeps its coded
|
|
335
|
+
// parseMintBody (VIDEO_UPLOAD_INVALID_* + the 413 for an oversize
|
|
336
|
+
// declaration); this schema mirrors its accept/reject boundary.
|
|
337
|
+
//---------------
|
|
338
|
+
export const MintVideoUploadBodySchema = z.object({
|
|
339
|
+
contentType: z.enum(VIDEO_UPLOAD_CONTENT_TYPES, {
|
|
340
|
+
error: () => 'contentType must be video/mp4 or video/quicktime.',
|
|
341
|
+
}),
|
|
342
|
+
sizeBytes: z.number({ error: (issue) => (issue.code === 'invalid_type' ? 'sizeBytes must be a positive integer.' : undefined) }).int('sizeBytes must be a positive integer.').positive('sizeBytes must be a positive integer.').max(MAX_VIDEO_UPLOAD_BYTES, 'Video is too large. Maximum is 2GB.'),
|
|
343
|
+
});
|
|
344
|
+
export const MintVideoUploadResponseSchema = z.object({
|
|
345
|
+
success: z.literal(true),
|
|
346
|
+
uploadId: z.string(),
|
|
347
|
+
signedUrl: z.string(),
|
|
348
|
+
token: z.string(),
|
|
349
|
+
storagePath: z.string(),
|
|
350
|
+
expiresAt: z.string(),
|
|
351
|
+
maxBytes: z.number(),
|
|
352
|
+
});
|
|
353
|
+
export const CompleteVideoUploadResponseSchema = z.object({ success: z.literal(true), uploadId: z.string(), status: z.literal('ready'), contentType: z.enum(VIDEO_UPLOAD_CONTENT_TYPES), sizeBytes: z.number() });
|
|
354
|
+
//---------------
|
|
355
|
+
// POST /api/videos/publish-by-id — publish a signed-upload video by id
|
|
356
|
+
// (issue #561). The route keeps its coded parsePublishBody (ValidationError
|
|
357
|
+
// + field); this schema mirrors its shape rules. The provider-specific
|
|
358
|
+
// required fields (title/description for youtube/rumble/fanvue, tags +
|
|
359
|
+
// privacyStatus for youtube, boardId + description/caption for pinterest)
|
|
360
|
+
// are semantic checks in validatePublishFields, not shape rules.
|
|
361
|
+
// The response is the media contract's upload-content shape: the route
|
|
362
|
+
// returns the normalized publish result plus the computed successCount.
|
|
363
|
+
//---------------
|
|
364
|
+
function optionalContractString(field) {
|
|
365
|
+
return z.string({ error: () => `${field} must be a string.` }).optional();
|
|
366
|
+
}
|
|
367
|
+
export const PublishByIdBodySchema = z.object({
|
|
368
|
+
uploadId: z
|
|
369
|
+
.string({
|
|
370
|
+
error: () => 'uploadId must be the id returned by the signed-upload mint step.',
|
|
371
|
+
})
|
|
372
|
+
.refine((value) => UUID.test(value), {
|
|
373
|
+
message: 'uploadId must be the id returned by the signed-upload mint step.',
|
|
374
|
+
}),
|
|
375
|
+
provider: z.enum(SOCIAL_PROVIDERS, {
|
|
376
|
+
error: () => 'provider is invalid.',
|
|
377
|
+
}),
|
|
378
|
+
accountIds: z
|
|
379
|
+
.array(z.string({
|
|
380
|
+
error: () => 'At least one account ID is required.',
|
|
381
|
+
}))
|
|
382
|
+
.min(1, 'At least one account ID is required.')
|
|
383
|
+
.refine((ids) => ids.every((id) => id.trim() !== ''), {
|
|
384
|
+
message: 'At least one account ID is required.',
|
|
385
|
+
}),
|
|
386
|
+
tags: z
|
|
387
|
+
.array(z.string({
|
|
388
|
+
error: () => 'tags must be a list of strings.',
|
|
389
|
+
}), {
|
|
390
|
+
error: () => 'tags must be a list of strings.',
|
|
391
|
+
})
|
|
392
|
+
.optional(),
|
|
393
|
+
title: optionalContractString('title'),
|
|
394
|
+
description: optionalContractString('description'),
|
|
395
|
+
privacyStatus: optionalContractString('privacyStatus'),
|
|
396
|
+
caption: optionalContractString('caption'),
|
|
397
|
+
boardId: optionalContractString('boardId'),
|
|
398
|
+
});
|
|
399
|
+
//---------------
|
|
400
|
+
// Endpoints.
|
|
401
|
+
//---------------
|
|
402
|
+
export const generateAndSchedule = defineEndpoint({
|
|
403
|
+
method: 'POST',
|
|
404
|
+
path: '/api/videos/generate-and-schedule',
|
|
405
|
+
body: GenerateAndScheduleBodySchema,
|
|
406
|
+
response: GenerateAndScheduleResponseSchema,
|
|
407
|
+
});
|
|
408
|
+
export const validateScript = defineEndpoint({
|
|
409
|
+
method: 'POST',
|
|
410
|
+
path: '/api/videos/validate-script',
|
|
411
|
+
body: ValidateScriptBodySchema,
|
|
412
|
+
response: ValidateScriptResponseSchema,
|
|
413
|
+
});
|
|
414
|
+
export const scoreDraft = defineEndpoint({
|
|
415
|
+
method: 'POST',
|
|
416
|
+
path: '/api/videos/score-draft',
|
|
417
|
+
body: ScoreDraftBodySchema,
|
|
418
|
+
response: ScoreDraftResponseSchema,
|
|
419
|
+
});
|
|
420
|
+
export const applyBatchDiscount = defineEndpoint({
|
|
421
|
+
method: 'POST',
|
|
422
|
+
path: '/api/videos/batch-discount',
|
|
423
|
+
body: BatchDiscountBodySchema,
|
|
424
|
+
response: BatchDiscountResponseSchema,
|
|
425
|
+
});
|
|
426
|
+
export const mintVideoUpload = defineEndpoint({
|
|
427
|
+
method: 'POST',
|
|
428
|
+
path: '/api/videos/upload-url',
|
|
429
|
+
body: MintVideoUploadBodySchema,
|
|
430
|
+
response: MintVideoUploadResponseSchema,
|
|
431
|
+
});
|
|
432
|
+
export const completeVideoUpload = defineEndpoint({
|
|
433
|
+
method: 'POST',
|
|
434
|
+
path: '/api/videos/uploads/:uploadId/complete',
|
|
435
|
+
response: CompleteVideoUploadResponseSchema,
|
|
436
|
+
});
|
|
437
|
+
export const publishUploadedVideo = defineEndpoint({
|
|
438
|
+
method: 'POST',
|
|
439
|
+
path: '/api/videos/publish-by-id',
|
|
440
|
+
body: PublishByIdBodySchema,
|
|
441
|
+
response: UploadContentResponseSchema,
|
|
442
|
+
});
|
|
443
|
+
//# sourceMappingURL=videos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videos.js","sourceRoot":"","sources":["../../src/contracts/videos.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,0EAA0E;AAC1E,0EAA0E;AAC1E,4EAA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