@sudobility/screenwriter_types 0.1.1
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/CLAUDE.md +50 -0
- package/README.md +34 -0
- package/dist/account/index.d.ts +440 -0
- package/dist/account/index.js +274 -0
- package/dist/admin/index.d.ts +95 -0
- package/dist/admin/index.js +20 -0
- package/dist/ai/index.d.ts +564 -0
- package/dist/ai/index.js +179 -0
- package/dist/api/envelope.d.ts +33 -0
- package/dist/api/envelope.js +140 -0
- package/dist/api/pagination.d.ts +7 -0
- package/dist/api/pagination.js +9 -0
- package/dist/api/routes.d.ts +273 -0
- package/dist/api/routes.js +306 -0
- package/dist/assets/index.d.ts +722 -0
- package/dist/assets/index.js +452 -0
- package/dist/collab/index.d.ts +214 -0
- package/dist/collab/index.js +211 -0
- package/dist/commands/index.d.ts +92 -0
- package/dist/commands/index.js +20 -0
- package/dist/credits/index.d.ts +26 -0
- package/dist/credits/index.js +7 -0
- package/dist/formats/index.d.ts +87 -0
- package/dist/formats/index.js +26 -0
- package/dist/ids/index.d.ts +2 -0
- package/dist/ids/index.js +2 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +33 -0
- package/dist/io/index.d.ts +395 -0
- package/dist/io/index.js +161 -0
- package/dist/jobs/index.d.ts +278 -0
- package/dist/jobs/index.js +138 -0
- package/dist/keys/index.d.ts +53 -0
- package/dist/keys/index.js +22 -0
- package/dist/lifecycle/index.d.ts +263 -0
- package/dist/lifecycle/index.js +148 -0
- package/dist/me/index.d.ts +35 -0
- package/dist/me/index.js +18 -0
- package/dist/packets/index.d.ts +887 -0
- package/dist/packets/index.js +312 -0
- package/dist/projects/index.d.ts +201 -0
- package/dist/projects/index.js +75 -0
- package/dist/public/index.d.ts +95 -0
- package/dist/public/index.js +25 -0
- package/dist/reads/index.d.ts +387 -0
- package/dist/reads/index.js +118 -0
- package/dist/reports/index.d.ts +168 -0
- package/dist/reports/index.js +466 -0
- package/dist/sharing/index.d.ts +256 -0
- package/dist/sharing/index.js +91 -0
- package/dist/sync/codec.d.ts +7 -0
- package/dist/sync/codec.js +91 -0
- package/dist/sync/index.d.ts +382 -0
- package/dist/sync/index.js +262 -0
- package/dist/sync/permissions.d.ts +22 -0
- package/dist/sync/permissions.js +11 -0
- package/dist/templates/index.d.ts +1699 -0
- package/dist/templates/index.js +70 -0
- package/dist/tenancy/index.d.ts +116 -0
- package/dist/tenancy/index.js +102 -0
- package/dist/test/index.d.ts +8 -0
- package/dist/test/index.js +88 -0
- package/dist/versions/index.d.ts +335 -0
- package/dist/versions/index.js +107 -0
- package/package.json +62 -0
|
@@ -0,0 +1,722 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The asset library (slice B11; spec 05 §6.13, §8.6, §14.1, spec 11 §3 and §4.5). Assets are workspace files with metadata;
|
|
4
|
+
* bytes never pass through the API (presigned multipart PUT to R2). This file holds the vocabularies, the DTOs and the
|
|
5
|
+
* role-to-target table the server enforces (`ROLE_NOT_ALLOWED_FOR_TARGET`).
|
|
6
|
+
*/
|
|
7
|
+
export declare const ASSET_KINDS: readonly ["image", "video", "audio", "model3d", "document", "archive", "data"];
|
|
8
|
+
export type AssetKind = (typeof ASSET_KINDS)[number];
|
|
9
|
+
export declare const assetKindSchema: z.ZodEnum<{
|
|
10
|
+
document: "document";
|
|
11
|
+
image: "image";
|
|
12
|
+
video: "video";
|
|
13
|
+
audio: "audio";
|
|
14
|
+
model3d: "model3d";
|
|
15
|
+
archive: "archive";
|
|
16
|
+
data: "data";
|
|
17
|
+
}>;
|
|
18
|
+
export declare const ASSET_ROLES: readonly ["reference", "headshot", "photo", "logo", "beat_image", "inline_image", "panel_reference", "location_scout", "mood_board", "attachment", "turnaround", "expression_sheet", "costume_design", "set_concept", "set_plan", "storyboard_frame", "animatic", "previz", "rendered_video", "rendered_shot", "dialogue_audio", "voice_sample", "voice_profile", "music_cue", "sound_effect", "lip_sync", "captions", "model3d", "model3d_rig", "texture", "lora", "timeline"];
|
|
19
|
+
export type AssetRole = (typeof ASSET_ROLES)[number];
|
|
20
|
+
export declare const assetRoleSchema: z.ZodEnum<{
|
|
21
|
+
model3d: "model3d";
|
|
22
|
+
reference: "reference";
|
|
23
|
+
headshot: "headshot";
|
|
24
|
+
photo: "photo";
|
|
25
|
+
logo: "logo";
|
|
26
|
+
beat_image: "beat_image";
|
|
27
|
+
inline_image: "inline_image";
|
|
28
|
+
panel_reference: "panel_reference";
|
|
29
|
+
location_scout: "location_scout";
|
|
30
|
+
mood_board: "mood_board";
|
|
31
|
+
attachment: "attachment";
|
|
32
|
+
turnaround: "turnaround";
|
|
33
|
+
expression_sheet: "expression_sheet";
|
|
34
|
+
costume_design: "costume_design";
|
|
35
|
+
set_concept: "set_concept";
|
|
36
|
+
set_plan: "set_plan";
|
|
37
|
+
storyboard_frame: "storyboard_frame";
|
|
38
|
+
animatic: "animatic";
|
|
39
|
+
previz: "previz";
|
|
40
|
+
rendered_video: "rendered_video";
|
|
41
|
+
rendered_shot: "rendered_shot";
|
|
42
|
+
dialogue_audio: "dialogue_audio";
|
|
43
|
+
voice_sample: "voice_sample";
|
|
44
|
+
voice_profile: "voice_profile";
|
|
45
|
+
music_cue: "music_cue";
|
|
46
|
+
sound_effect: "sound_effect";
|
|
47
|
+
lip_sync: "lip_sync";
|
|
48
|
+
captions: "captions";
|
|
49
|
+
model3d_rig: "model3d_rig";
|
|
50
|
+
texture: "texture";
|
|
51
|
+
lora: "lora";
|
|
52
|
+
timeline: "timeline";
|
|
53
|
+
}>;
|
|
54
|
+
export declare const ASSET_ROLE_GROUPS: Record<AssetRole, 'reference' | 'design' | 'storyboard' | 'video' | 'audio' | '3d' | 'other'>;
|
|
55
|
+
export declare const ASSET_TARGET_KINDS: readonly ["document", "scene", "element", "shot", "entity", "beat", "title_page", "snapshot"];
|
|
56
|
+
export type AssetTargetKind = (typeof ASSET_TARGET_KINDS)[number];
|
|
57
|
+
export declare const assetTargetKindSchema: z.ZodEnum<{
|
|
58
|
+
scene: "scene";
|
|
59
|
+
document: "document";
|
|
60
|
+
snapshot: "snapshot";
|
|
61
|
+
element: "element";
|
|
62
|
+
shot: "shot";
|
|
63
|
+
entity: "entity";
|
|
64
|
+
beat: "beat";
|
|
65
|
+
title_page: "title_page";
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
* Which target kinds a role may sit on (spec 05 §6.13: "enforces spec 11's role-to-target table"; spec 11 §3.7 lists the
|
|
69
|
+
* roles but not the table, so this is the decision made in B11). A role not listed here may go on any target.
|
|
70
|
+
*/
|
|
71
|
+
export declare const ASSET_ROLE_TARGETS: Partial<Record<AssetRole, readonly AssetTargetKind[]>>;
|
|
72
|
+
/** Roles that only fit an entity of one kind (checked against `proj_entities.kind`). */
|
|
73
|
+
export declare const ASSET_ROLE_ENTITY_KINDS: Partial<Record<AssetRole, readonly string[]>>;
|
|
74
|
+
export declare const ASSET_ORIGINS: readonly ["upload", "import", "generated", "external_tool"];
|
|
75
|
+
export type AssetOrigin = (typeof ASSET_ORIGINS)[number];
|
|
76
|
+
export declare const ASSET_VERSION_STATUSES: readonly ["uploading", "processing", "ready", "failed"];
|
|
77
|
+
export type AssetVersionStatus = (typeof ASSET_VERSION_STATUSES)[number];
|
|
78
|
+
export declare const STALENESS_VALUES: readonly ["fresh", "stale", "target_deleted", "unknown"];
|
|
79
|
+
export type Staleness = (typeof STALENESS_VALUES)[number];
|
|
80
|
+
/** Multipart parts are this big (the last one smaller); an upload of at most one part is a single presigned PUT. */
|
|
81
|
+
export declare const ASSET_PART_SIZE_BYTES: number;
|
|
82
|
+
/** How many part PUTs the client helper runs at once. */
|
|
83
|
+
export declare const ASSET_UPLOAD_CONCURRENCY = 3;
|
|
84
|
+
/** Presigned part URLs and the upload itself live this long (seconds); a resume re-signs. */
|
|
85
|
+
export declare const ASSET_UPLOAD_TTL_S = 3600;
|
|
86
|
+
/** Presigned GET lifetime for `GET /assets/:aid/versions/:vid/url` (seconds). */
|
|
87
|
+
export declare const ASSET_URL_TTL_S = 300;
|
|
88
|
+
/** Largest original per kind (spec 11 §3.2). */
|
|
89
|
+
export declare const ASSET_MAX_BYTES: Record<AssetKind, number>;
|
|
90
|
+
/** Extension -> kind and the MIME types accepted for it (spec 11 §3.2). The extension must be listed and the magic bytes must agree. */
|
|
91
|
+
export declare const ASSET_EXTENSIONS: Record<string, {
|
|
92
|
+
kind: AssetKind;
|
|
93
|
+
mimes: readonly string[];
|
|
94
|
+
}>;
|
|
95
|
+
/** `.ext` of a file name, lower-cased ('' when it has none). */
|
|
96
|
+
export declare const assetExtension: (filename: string) => string;
|
|
97
|
+
/** Client-side pre-check that mirrors the server's: null when the file could be accepted, else why not. */
|
|
98
|
+
export declare function checkAssetFile(filename: string, mimeType: string, sizeBytes: number, kind: AssetKind): 'type' | 'mime' | 'kind' | 'size' | null;
|
|
99
|
+
export declare const assetRightsSchema: z.ZodObject<{
|
|
100
|
+
ownership: z.ZodDefault<z.ZodEnum<{
|
|
101
|
+
unknown: "unknown";
|
|
102
|
+
generated: "generated";
|
|
103
|
+
owned: "owned";
|
|
104
|
+
licensed: "licensed";
|
|
105
|
+
public_domain: "public_domain";
|
|
106
|
+
}>>;
|
|
107
|
+
license: z.ZodOptional<z.ZodString>;
|
|
108
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
109
|
+
sourceUrl: z.ZodOptional<z.ZodString>;
|
|
110
|
+
restrictions: z.ZodOptional<z.ZodString>;
|
|
111
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
112
|
+
containsLikenessOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
113
|
+
consentAssetId: z.ZodOptional<z.ZodString>;
|
|
114
|
+
aiTrainingAllowed: z.ZodDefault<z.ZodBoolean>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
export type AssetRights = z.output<typeof assetRightsSchema>;
|
|
117
|
+
export declare const assetSourceRefSchema: z.ZodObject<{
|
|
118
|
+
documentId: z.ZodString;
|
|
119
|
+
snapshotId: z.ZodOptional<z.ZodString>;
|
|
120
|
+
targetKind: z.ZodEnum<{
|
|
121
|
+
scene: "scene";
|
|
122
|
+
document: "document";
|
|
123
|
+
element: "element";
|
|
124
|
+
shot: "shot";
|
|
125
|
+
entity: "entity";
|
|
126
|
+
beat: "beat";
|
|
127
|
+
title_page: "title_page";
|
|
128
|
+
}>;
|
|
129
|
+
targetId: z.ZodString;
|
|
130
|
+
sourceHash: z.ZodString;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
export type AssetSourceRef = z.infer<typeof assetSourceRefSchema>;
|
|
133
|
+
/** What a caller may send as `provenance` (the server fills `upload` and `import` itself). */
|
|
134
|
+
export declare const assetProvenanceInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
135
|
+
origin: z.ZodLiteral<"external_tool">;
|
|
136
|
+
tool: z.ZodString;
|
|
137
|
+
toolVersion: z.ZodOptional<z.ZodString>;
|
|
138
|
+
description: z.ZodOptional<z.ZodString>;
|
|
139
|
+
sourceRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
140
|
+
documentId: z.ZodString;
|
|
141
|
+
snapshotId: z.ZodOptional<z.ZodString>;
|
|
142
|
+
targetKind: z.ZodEnum<{
|
|
143
|
+
scene: "scene";
|
|
144
|
+
document: "document";
|
|
145
|
+
element: "element";
|
|
146
|
+
shot: "shot";
|
|
147
|
+
entity: "entity";
|
|
148
|
+
beat: "beat";
|
|
149
|
+
title_page: "title_page";
|
|
150
|
+
}>;
|
|
151
|
+
targetId: z.ZodString;
|
|
152
|
+
sourceHash: z.ZodString;
|
|
153
|
+
}, z.core.$strip>>>;
|
|
154
|
+
createdVia: z.ZodDefault<z.ZodEnum<{
|
|
155
|
+
mcp: "mcp";
|
|
156
|
+
api: "api";
|
|
157
|
+
app: "app";
|
|
158
|
+
}>>;
|
|
159
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
160
|
+
origin: z.ZodLiteral<"generated">;
|
|
161
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
162
|
+
adapter: z.ZodString;
|
|
163
|
+
provider: z.ZodString;
|
|
164
|
+
model: z.ZodOptional<z.ZodString>;
|
|
165
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
166
|
+
negativePrompt: z.ZodOptional<z.ZodString>;
|
|
167
|
+
parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
168
|
+
inputs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
169
|
+
assetVersionId: z.ZodOptional<z.ZodString>;
|
|
170
|
+
packetHash: z.ZodOptional<z.ZodString>;
|
|
171
|
+
role: z.ZodString;
|
|
172
|
+
}, z.core.$strip>>>;
|
|
173
|
+
sourceRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
174
|
+
documentId: z.ZodString;
|
|
175
|
+
snapshotId: z.ZodOptional<z.ZodString>;
|
|
176
|
+
targetKind: z.ZodEnum<{
|
|
177
|
+
scene: "scene";
|
|
178
|
+
document: "document";
|
|
179
|
+
element: "element";
|
|
180
|
+
shot: "shot";
|
|
181
|
+
entity: "entity";
|
|
182
|
+
beat: "beat";
|
|
183
|
+
title_page: "title_page";
|
|
184
|
+
}>;
|
|
185
|
+
targetId: z.ZodString;
|
|
186
|
+
sourceHash: z.ZodString;
|
|
187
|
+
}, z.core.$strip>>>;
|
|
188
|
+
costCredits: z.ZodOptional<z.ZodNumber>;
|
|
189
|
+
providerJobId: z.ZodOptional<z.ZodString>;
|
|
190
|
+
createdVia: z.ZodDefault<z.ZodEnum<{
|
|
191
|
+
mcp: "mcp";
|
|
192
|
+
api: "api";
|
|
193
|
+
app: "app";
|
|
194
|
+
}>>;
|
|
195
|
+
}, z.core.$strip>], "origin">;
|
|
196
|
+
export type AssetProvenanceInput = z.input<typeof assetProvenanceInputSchema>;
|
|
197
|
+
/** The stored, immutable provenance of a version (spec 11 §3.6). */
|
|
198
|
+
export type AssetProvenance = {
|
|
199
|
+
origin: 'upload';
|
|
200
|
+
uploadedBy: string;
|
|
201
|
+
originalFilename: string;
|
|
202
|
+
client?: Record<string, unknown>;
|
|
203
|
+
} | {
|
|
204
|
+
origin: 'import';
|
|
205
|
+
importJobId: string;
|
|
206
|
+
sourceFormat: string;
|
|
207
|
+
originalPath?: string;
|
|
208
|
+
} | ({
|
|
209
|
+
origin: 'generated';
|
|
210
|
+
agent?: {
|
|
211
|
+
client: string;
|
|
212
|
+
apiKeyId: string;
|
|
213
|
+
};
|
|
214
|
+
} & Record<string, unknown>) | ({
|
|
215
|
+
origin: 'external_tool';
|
|
216
|
+
agent?: {
|
|
217
|
+
client: string;
|
|
218
|
+
apiKeyId: string;
|
|
219
|
+
};
|
|
220
|
+
} & Record<string, unknown>);
|
|
221
|
+
export interface AssetDerivative {
|
|
222
|
+
mime: string;
|
|
223
|
+
sizeBytes: number;
|
|
224
|
+
}
|
|
225
|
+
export interface AssetVersion {
|
|
226
|
+
id: string;
|
|
227
|
+
assetId: string;
|
|
228
|
+
parentVersionId: string | null;
|
|
229
|
+
versionNumber: number;
|
|
230
|
+
mime: string;
|
|
231
|
+
ext: string;
|
|
232
|
+
sizeBytes: number;
|
|
233
|
+
sha256: string | null;
|
|
234
|
+
status: AssetVersionStatus;
|
|
235
|
+
errorCode: string | null;
|
|
236
|
+
media: Record<string, unknown>;
|
|
237
|
+
/** Derivative name (`thumb_256`, `preview_1600`, `poster`, `proxy_720p`, ...) -> its type and size. Empty until `asset.derive` has run. */
|
|
238
|
+
derivatives: Record<string, AssetDerivative>;
|
|
239
|
+
provenance: AssetProvenance;
|
|
240
|
+
origin: AssetOrigin;
|
|
241
|
+
rights: AssetRights;
|
|
242
|
+
createdBy: string | null;
|
|
243
|
+
createdAt: string;
|
|
244
|
+
}
|
|
245
|
+
export interface AssetSummary {
|
|
246
|
+
id: string;
|
|
247
|
+
workspaceId: string;
|
|
248
|
+
kind: AssetKind;
|
|
249
|
+
title: string;
|
|
250
|
+
description: string;
|
|
251
|
+
/** Null until the first version is ready (or processing finished without a derive worker: see `status`). */
|
|
252
|
+
currentVersionId: string | null;
|
|
253
|
+
versionCount: number;
|
|
254
|
+
/** Fields of the current version (the latest one when none is current yet). */
|
|
255
|
+
mime: string | null;
|
|
256
|
+
sizeBytes: number | null;
|
|
257
|
+
status: AssetVersionStatus | null;
|
|
258
|
+
origin: AssetOrigin | null;
|
|
259
|
+
rights: AssetRights | null;
|
|
260
|
+
hasThumbnail: boolean;
|
|
261
|
+
createdBy: string | null;
|
|
262
|
+
createdAt: string;
|
|
263
|
+
updatedAt: string;
|
|
264
|
+
deletedAt: string | null;
|
|
265
|
+
}
|
|
266
|
+
export interface AssetLink {
|
|
267
|
+
id: string;
|
|
268
|
+
workspaceId: string;
|
|
269
|
+
assetId: string;
|
|
270
|
+
/** Null = follow the asset's current version. */
|
|
271
|
+
pinnedVersionId: string | null;
|
|
272
|
+
/** Null = a workspace-level link (its target is `{kind: 'document', id: <workspaceId>}`). */
|
|
273
|
+
documentId: string | null;
|
|
274
|
+
targetKind: AssetTargetKind;
|
|
275
|
+
targetId: string;
|
|
276
|
+
role: AssetRole;
|
|
277
|
+
sortOrder: number;
|
|
278
|
+
sourceHash: string | null;
|
|
279
|
+
sourceSnapshotId: string | null;
|
|
280
|
+
originalTargetId: string | null;
|
|
281
|
+
note: string;
|
|
282
|
+
createdBy: string | null;
|
|
283
|
+
createdAt: string;
|
|
284
|
+
deletedAt: string | null;
|
|
285
|
+
}
|
|
286
|
+
export type AssetListItem = AssetSummary & {
|
|
287
|
+
role?: AssetRole;
|
|
288
|
+
sortOrder?: number;
|
|
289
|
+
};
|
|
290
|
+
export type AssetDetail = AssetSummary & {
|
|
291
|
+
versions: AssetVersion[];
|
|
292
|
+
links: AssetLink[];
|
|
293
|
+
};
|
|
294
|
+
export declare const assetUploadRequestSchema: z.ZodObject<{
|
|
295
|
+
assetId: z.ZodOptional<z.ZodString>;
|
|
296
|
+
filename: z.ZodString;
|
|
297
|
+
mimeType: z.ZodString;
|
|
298
|
+
sizeBytes: z.ZodNumber;
|
|
299
|
+
sha256Hex: z.ZodOptional<z.ZodString>;
|
|
300
|
+
kind: z.ZodEnum<{
|
|
301
|
+
document: "document";
|
|
302
|
+
image: "image";
|
|
303
|
+
video: "video";
|
|
304
|
+
audio: "audio";
|
|
305
|
+
model3d: "model3d";
|
|
306
|
+
archive: "archive";
|
|
307
|
+
data: "data";
|
|
308
|
+
}>;
|
|
309
|
+
title: z.ZodOptional<z.ZodString>;
|
|
310
|
+
parentVersionId: z.ZodOptional<z.ZodString>;
|
|
311
|
+
provenance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
312
|
+
origin: z.ZodLiteral<"external_tool">;
|
|
313
|
+
tool: z.ZodString;
|
|
314
|
+
toolVersion: z.ZodOptional<z.ZodString>;
|
|
315
|
+
description: z.ZodOptional<z.ZodString>;
|
|
316
|
+
sourceRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
317
|
+
documentId: z.ZodString;
|
|
318
|
+
snapshotId: z.ZodOptional<z.ZodString>;
|
|
319
|
+
targetKind: z.ZodEnum<{
|
|
320
|
+
scene: "scene";
|
|
321
|
+
document: "document";
|
|
322
|
+
element: "element";
|
|
323
|
+
shot: "shot";
|
|
324
|
+
entity: "entity";
|
|
325
|
+
beat: "beat";
|
|
326
|
+
title_page: "title_page";
|
|
327
|
+
}>;
|
|
328
|
+
targetId: z.ZodString;
|
|
329
|
+
sourceHash: z.ZodString;
|
|
330
|
+
}, z.core.$strip>>>;
|
|
331
|
+
createdVia: z.ZodDefault<z.ZodEnum<{
|
|
332
|
+
mcp: "mcp";
|
|
333
|
+
api: "api";
|
|
334
|
+
app: "app";
|
|
335
|
+
}>>;
|
|
336
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
337
|
+
origin: z.ZodLiteral<"generated">;
|
|
338
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
339
|
+
adapter: z.ZodString;
|
|
340
|
+
provider: z.ZodString;
|
|
341
|
+
model: z.ZodOptional<z.ZodString>;
|
|
342
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
343
|
+
negativePrompt: z.ZodOptional<z.ZodString>;
|
|
344
|
+
parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
345
|
+
inputs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
346
|
+
assetVersionId: z.ZodOptional<z.ZodString>;
|
|
347
|
+
packetHash: z.ZodOptional<z.ZodString>;
|
|
348
|
+
role: z.ZodString;
|
|
349
|
+
}, z.core.$strip>>>;
|
|
350
|
+
sourceRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
351
|
+
documentId: z.ZodString;
|
|
352
|
+
snapshotId: z.ZodOptional<z.ZodString>;
|
|
353
|
+
targetKind: z.ZodEnum<{
|
|
354
|
+
scene: "scene";
|
|
355
|
+
document: "document";
|
|
356
|
+
element: "element";
|
|
357
|
+
shot: "shot";
|
|
358
|
+
entity: "entity";
|
|
359
|
+
beat: "beat";
|
|
360
|
+
title_page: "title_page";
|
|
361
|
+
}>;
|
|
362
|
+
targetId: z.ZodString;
|
|
363
|
+
sourceHash: z.ZodString;
|
|
364
|
+
}, z.core.$strip>>>;
|
|
365
|
+
costCredits: z.ZodOptional<z.ZodNumber>;
|
|
366
|
+
providerJobId: z.ZodOptional<z.ZodString>;
|
|
367
|
+
createdVia: z.ZodDefault<z.ZodEnum<{
|
|
368
|
+
mcp: "mcp";
|
|
369
|
+
api: "api";
|
|
370
|
+
app: "app";
|
|
371
|
+
}>>;
|
|
372
|
+
}, z.core.$strip>], "origin">>;
|
|
373
|
+
rights: z.ZodOptional<z.ZodObject<{
|
|
374
|
+
ownership: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
375
|
+
unknown: "unknown";
|
|
376
|
+
generated: "generated";
|
|
377
|
+
owned: "owned";
|
|
378
|
+
licensed: "licensed";
|
|
379
|
+
public_domain: "public_domain";
|
|
380
|
+
}>>>;
|
|
381
|
+
license: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
382
|
+
attribution: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
383
|
+
sourceUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
384
|
+
restrictions: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
385
|
+
expiresAt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
386
|
+
containsLikenessOf: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
387
|
+
consentAssetId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
388
|
+
aiTrainingAllowed: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
389
|
+
}, z.core.$strip>>;
|
|
390
|
+
}, z.core.$strip>;
|
|
391
|
+
export type AssetUploadRequest = z.input<typeof assetUploadRequestSchema>;
|
|
392
|
+
export interface AssetPartUrl {
|
|
393
|
+
partNumber: number;
|
|
394
|
+
url: string;
|
|
395
|
+
expiresAt: string;
|
|
396
|
+
}
|
|
397
|
+
export interface AssetUploadInit {
|
|
398
|
+
uploadId: string;
|
|
399
|
+
assetId: string;
|
|
400
|
+
versionId: string;
|
|
401
|
+
partSizeBytes: number;
|
|
402
|
+
partCount: number;
|
|
403
|
+
parts: AssetPartUrl[];
|
|
404
|
+
expiresAt: string;
|
|
405
|
+
/** The workspace already holds these exact bytes: nothing to PUT (`parts` is empty); call complete. */
|
|
406
|
+
deduplicated: boolean;
|
|
407
|
+
}
|
|
408
|
+
export interface AssetCompletedPart {
|
|
409
|
+
partNumber: number;
|
|
410
|
+
etag: string;
|
|
411
|
+
sizeBytes?: number;
|
|
412
|
+
}
|
|
413
|
+
export interface AssetUploadStatus {
|
|
414
|
+
uploadId: string;
|
|
415
|
+
assetId: string;
|
|
416
|
+
versionId: string;
|
|
417
|
+
partSizeBytes: number;
|
|
418
|
+
partCount: number;
|
|
419
|
+
completedParts: AssetCompletedPart[];
|
|
420
|
+
expiresAt: string;
|
|
421
|
+
completedAt: string | null;
|
|
422
|
+
}
|
|
423
|
+
export declare const assetPartsRequestSchema: z.ZodObject<{
|
|
424
|
+
partNumbers: z.ZodArray<z.ZodNumber>;
|
|
425
|
+
}, z.core.$strip>;
|
|
426
|
+
export type AssetPartsRequest = z.infer<typeof assetPartsRequestSchema>;
|
|
427
|
+
export interface AssetPartsResponse {
|
|
428
|
+
parts: AssetPartUrl[];
|
|
429
|
+
}
|
|
430
|
+
export declare const assetCompleteSchema: z.ZodObject<{
|
|
431
|
+
parts: z.ZodArray<z.ZodObject<{
|
|
432
|
+
partNumber: z.ZodNumber;
|
|
433
|
+
etag: z.ZodString;
|
|
434
|
+
}, z.core.$strip>>;
|
|
435
|
+
sha256Hex: z.ZodOptional<z.ZodString>;
|
|
436
|
+
}, z.core.$strip>;
|
|
437
|
+
export type AssetCompleteRequest = z.infer<typeof assetCompleteSchema>;
|
|
438
|
+
export interface AssetAbortResponse {
|
|
439
|
+
aborted: true;
|
|
440
|
+
}
|
|
441
|
+
export declare const assetListQuerySchema: z.ZodObject<{
|
|
442
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
443
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
444
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
445
|
+
documentId: z.ZodOptional<z.ZodString>;
|
|
446
|
+
linkedTo: z.ZodOptional<z.ZodString>;
|
|
447
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
448
|
+
model3d: "model3d";
|
|
449
|
+
reference: "reference";
|
|
450
|
+
headshot: "headshot";
|
|
451
|
+
photo: "photo";
|
|
452
|
+
logo: "logo";
|
|
453
|
+
beat_image: "beat_image";
|
|
454
|
+
inline_image: "inline_image";
|
|
455
|
+
panel_reference: "panel_reference";
|
|
456
|
+
location_scout: "location_scout";
|
|
457
|
+
mood_board: "mood_board";
|
|
458
|
+
attachment: "attachment";
|
|
459
|
+
turnaround: "turnaround";
|
|
460
|
+
expression_sheet: "expression_sheet";
|
|
461
|
+
costume_design: "costume_design";
|
|
462
|
+
set_concept: "set_concept";
|
|
463
|
+
set_plan: "set_plan";
|
|
464
|
+
storyboard_frame: "storyboard_frame";
|
|
465
|
+
animatic: "animatic";
|
|
466
|
+
previz: "previz";
|
|
467
|
+
rendered_video: "rendered_video";
|
|
468
|
+
rendered_shot: "rendered_shot";
|
|
469
|
+
dialogue_audio: "dialogue_audio";
|
|
470
|
+
voice_sample: "voice_sample";
|
|
471
|
+
voice_profile: "voice_profile";
|
|
472
|
+
music_cue: "music_cue";
|
|
473
|
+
sound_effect: "sound_effect";
|
|
474
|
+
lip_sync: "lip_sync";
|
|
475
|
+
captions: "captions";
|
|
476
|
+
model3d_rig: "model3d_rig";
|
|
477
|
+
texture: "texture";
|
|
478
|
+
lora: "lora";
|
|
479
|
+
timeline: "timeline";
|
|
480
|
+
}>>;
|
|
481
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
482
|
+
document: "document";
|
|
483
|
+
image: "image";
|
|
484
|
+
video: "video";
|
|
485
|
+
audio: "audio";
|
|
486
|
+
model3d: "model3d";
|
|
487
|
+
archive: "archive";
|
|
488
|
+
data: "data";
|
|
489
|
+
}>>;
|
|
490
|
+
q: z.ZodOptional<z.ZodString>;
|
|
491
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
492
|
+
import: "import";
|
|
493
|
+
upload: "upload";
|
|
494
|
+
generated: "generated";
|
|
495
|
+
external_tool: "external_tool";
|
|
496
|
+
}>>;
|
|
497
|
+
}, z.core.$strip>;
|
|
498
|
+
export type AssetListQuery = z.output<typeof assetListQuerySchema>;
|
|
499
|
+
export declare const assetUpdateSchema: z.ZodObject<{
|
|
500
|
+
title: z.ZodOptional<z.ZodString>;
|
|
501
|
+
description: z.ZodOptional<z.ZodString>;
|
|
502
|
+
rights: z.ZodOptional<z.ZodObject<{
|
|
503
|
+
ownership: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
504
|
+
unknown: "unknown";
|
|
505
|
+
generated: "generated";
|
|
506
|
+
owned: "owned";
|
|
507
|
+
licensed: "licensed";
|
|
508
|
+
public_domain: "public_domain";
|
|
509
|
+
}>>>;
|
|
510
|
+
license: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
511
|
+
attribution: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
512
|
+
sourceUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
513
|
+
restrictions: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
514
|
+
expiresAt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
515
|
+
containsLikenessOf: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
516
|
+
consentAssetId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
517
|
+
aiTrainingAllowed: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
518
|
+
}, z.core.$strip>>;
|
|
519
|
+
}, z.core.$strip>;
|
|
520
|
+
export type AssetUpdateRequest = z.input<typeof assetUpdateSchema>;
|
|
521
|
+
export declare const ASSET_URL_VARIANTS: readonly ["original", "thumb_256", "thumb_512", "preview_1600", "poster", "proxy_720p", "proxy_1080p", "preview", "waveform", "sprite"];
|
|
522
|
+
export declare const assetUrlQuerySchema: z.ZodObject<{
|
|
523
|
+
variant: z.ZodDefault<z.ZodString>;
|
|
524
|
+
}, z.core.$strip>;
|
|
525
|
+
export type AssetUrlQuery = z.output<typeof assetUrlQuerySchema>;
|
|
526
|
+
export interface AssetUrlResponse {
|
|
527
|
+
url: string;
|
|
528
|
+
expiresAt: string;
|
|
529
|
+
}
|
|
530
|
+
export interface AssetDeleteResponse {
|
|
531
|
+
deletedAt: string;
|
|
532
|
+
}
|
|
533
|
+
export declare const assetLinkCreateSchema: z.ZodObject<{
|
|
534
|
+
assetId: z.ZodString;
|
|
535
|
+
pinnedVersionId: z.ZodOptional<z.ZodString>;
|
|
536
|
+
documentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
537
|
+
target: z.ZodObject<{
|
|
538
|
+
kind: z.ZodEnum<{
|
|
539
|
+
scene: "scene";
|
|
540
|
+
document: "document";
|
|
541
|
+
snapshot: "snapshot";
|
|
542
|
+
element: "element";
|
|
543
|
+
shot: "shot";
|
|
544
|
+
entity: "entity";
|
|
545
|
+
beat: "beat";
|
|
546
|
+
title_page: "title_page";
|
|
547
|
+
}>;
|
|
548
|
+
id: z.ZodString;
|
|
549
|
+
}, z.core.$strip>;
|
|
550
|
+
role: z.ZodEnum<{
|
|
551
|
+
model3d: "model3d";
|
|
552
|
+
reference: "reference";
|
|
553
|
+
headshot: "headshot";
|
|
554
|
+
photo: "photo";
|
|
555
|
+
logo: "logo";
|
|
556
|
+
beat_image: "beat_image";
|
|
557
|
+
inline_image: "inline_image";
|
|
558
|
+
panel_reference: "panel_reference";
|
|
559
|
+
location_scout: "location_scout";
|
|
560
|
+
mood_board: "mood_board";
|
|
561
|
+
attachment: "attachment";
|
|
562
|
+
turnaround: "turnaround";
|
|
563
|
+
expression_sheet: "expression_sheet";
|
|
564
|
+
costume_design: "costume_design";
|
|
565
|
+
set_concept: "set_concept";
|
|
566
|
+
set_plan: "set_plan";
|
|
567
|
+
storyboard_frame: "storyboard_frame";
|
|
568
|
+
animatic: "animatic";
|
|
569
|
+
previz: "previz";
|
|
570
|
+
rendered_video: "rendered_video";
|
|
571
|
+
rendered_shot: "rendered_shot";
|
|
572
|
+
dialogue_audio: "dialogue_audio";
|
|
573
|
+
voice_sample: "voice_sample";
|
|
574
|
+
voice_profile: "voice_profile";
|
|
575
|
+
music_cue: "music_cue";
|
|
576
|
+
sound_effect: "sound_effect";
|
|
577
|
+
lip_sync: "lip_sync";
|
|
578
|
+
captions: "captions";
|
|
579
|
+
model3d_rig: "model3d_rig";
|
|
580
|
+
texture: "texture";
|
|
581
|
+
lora: "lora";
|
|
582
|
+
timeline: "timeline";
|
|
583
|
+
}>;
|
|
584
|
+
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
585
|
+
sourceHash: z.ZodOptional<z.ZodString>;
|
|
586
|
+
sourceSnapshotId: z.ZodOptional<z.ZodString>;
|
|
587
|
+
note: z.ZodOptional<z.ZodString>;
|
|
588
|
+
}, z.core.$strip>;
|
|
589
|
+
export type AssetLinkCreateRequest = z.input<typeof assetLinkCreateSchema>;
|
|
590
|
+
export declare const assetLinkUpdateSchema: z.ZodObject<{
|
|
591
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
592
|
+
model3d: "model3d";
|
|
593
|
+
reference: "reference";
|
|
594
|
+
headshot: "headshot";
|
|
595
|
+
photo: "photo";
|
|
596
|
+
logo: "logo";
|
|
597
|
+
beat_image: "beat_image";
|
|
598
|
+
inline_image: "inline_image";
|
|
599
|
+
panel_reference: "panel_reference";
|
|
600
|
+
location_scout: "location_scout";
|
|
601
|
+
mood_board: "mood_board";
|
|
602
|
+
attachment: "attachment";
|
|
603
|
+
turnaround: "turnaround";
|
|
604
|
+
expression_sheet: "expression_sheet";
|
|
605
|
+
costume_design: "costume_design";
|
|
606
|
+
set_concept: "set_concept";
|
|
607
|
+
set_plan: "set_plan";
|
|
608
|
+
storyboard_frame: "storyboard_frame";
|
|
609
|
+
animatic: "animatic";
|
|
610
|
+
previz: "previz";
|
|
611
|
+
rendered_video: "rendered_video";
|
|
612
|
+
rendered_shot: "rendered_shot";
|
|
613
|
+
dialogue_audio: "dialogue_audio";
|
|
614
|
+
voice_sample: "voice_sample";
|
|
615
|
+
voice_profile: "voice_profile";
|
|
616
|
+
music_cue: "music_cue";
|
|
617
|
+
sound_effect: "sound_effect";
|
|
618
|
+
lip_sync: "lip_sync";
|
|
619
|
+
captions: "captions";
|
|
620
|
+
model3d_rig: "model3d_rig";
|
|
621
|
+
texture: "texture";
|
|
622
|
+
lora: "lora";
|
|
623
|
+
timeline: "timeline";
|
|
624
|
+
}>>;
|
|
625
|
+
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
626
|
+
pinnedVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
627
|
+
note: z.ZodOptional<z.ZodString>;
|
|
628
|
+
}, z.core.$strip>;
|
|
629
|
+
export type AssetLinkUpdateRequest = z.input<typeof assetLinkUpdateSchema>;
|
|
630
|
+
export declare const documentAssetLinksQuerySchema: z.ZodObject<{
|
|
631
|
+
targetKind: z.ZodOptional<z.ZodEnum<{
|
|
632
|
+
scene: "scene";
|
|
633
|
+
document: "document";
|
|
634
|
+
snapshot: "snapshot";
|
|
635
|
+
element: "element";
|
|
636
|
+
shot: "shot";
|
|
637
|
+
entity: "entity";
|
|
638
|
+
beat: "beat";
|
|
639
|
+
title_page: "title_page";
|
|
640
|
+
}>>;
|
|
641
|
+
targetId: z.ZodOptional<z.ZodString>;
|
|
642
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
643
|
+
model3d: "model3d";
|
|
644
|
+
reference: "reference";
|
|
645
|
+
headshot: "headshot";
|
|
646
|
+
photo: "photo";
|
|
647
|
+
logo: "logo";
|
|
648
|
+
beat_image: "beat_image";
|
|
649
|
+
inline_image: "inline_image";
|
|
650
|
+
panel_reference: "panel_reference";
|
|
651
|
+
location_scout: "location_scout";
|
|
652
|
+
mood_board: "mood_board";
|
|
653
|
+
attachment: "attachment";
|
|
654
|
+
turnaround: "turnaround";
|
|
655
|
+
expression_sheet: "expression_sheet";
|
|
656
|
+
costume_design: "costume_design";
|
|
657
|
+
set_concept: "set_concept";
|
|
658
|
+
set_plan: "set_plan";
|
|
659
|
+
storyboard_frame: "storyboard_frame";
|
|
660
|
+
animatic: "animatic";
|
|
661
|
+
previz: "previz";
|
|
662
|
+
rendered_video: "rendered_video";
|
|
663
|
+
rendered_shot: "rendered_shot";
|
|
664
|
+
dialogue_audio: "dialogue_audio";
|
|
665
|
+
voice_sample: "voice_sample";
|
|
666
|
+
voice_profile: "voice_profile";
|
|
667
|
+
music_cue: "music_cue";
|
|
668
|
+
sound_effect: "sound_effect";
|
|
669
|
+
lip_sync: "lip_sync";
|
|
670
|
+
captions: "captions";
|
|
671
|
+
model3d_rig: "model3d_rig";
|
|
672
|
+
texture: "texture";
|
|
673
|
+
lora: "lora";
|
|
674
|
+
timeline: "timeline";
|
|
675
|
+
}>>;
|
|
676
|
+
withStaleness: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
|
|
677
|
+
true: "true";
|
|
678
|
+
false: "false";
|
|
679
|
+
}>, z.ZodTransform<boolean, "true" | "false">>>;
|
|
680
|
+
}, z.core.$strip>;
|
|
681
|
+
export type DocumentAssetLinksQuery = z.output<typeof documentAssetLinksQuerySchema>;
|
|
682
|
+
export type AssetLinkWithStaleness = AssetLink & {
|
|
683
|
+
staleness?: Staleness;
|
|
684
|
+
};
|
|
685
|
+
export interface AssetLinkDeleteResponse {
|
|
686
|
+
deletedAt: string;
|
|
687
|
+
}
|
|
688
|
+
export declare const STALENESS_TARGET_KINDS: readonly ["scene", "element", "shot", "entity"];
|
|
689
|
+
export declare const documentStalenessQuerySchema: z.ZodObject<{
|
|
690
|
+
targetKind: z.ZodOptional<z.ZodEnum<{
|
|
691
|
+
scene: "scene";
|
|
692
|
+
element: "element";
|
|
693
|
+
shot: "shot";
|
|
694
|
+
entity: "entity";
|
|
695
|
+
}>>;
|
|
696
|
+
}, z.core.$strip>;
|
|
697
|
+
export type DocumentStalenessQuery = z.output<typeof documentStalenessQuerySchema>;
|
|
698
|
+
/** `GET /documents/:did/staleness`: per target with derived links, for badges. */
|
|
699
|
+
export interface TargetStaleness {
|
|
700
|
+
targetKind: (typeof STALENESS_TARGET_KINDS)[number];
|
|
701
|
+
targetId: string;
|
|
702
|
+
fresh: number;
|
|
703
|
+
stale: number;
|
|
704
|
+
deleted: number;
|
|
705
|
+
}
|
|
706
|
+
export interface LinkStaleness {
|
|
707
|
+
staleness: Staleness;
|
|
708
|
+
/** When the target's hash last changed (the normalizer's record); only for `stale`. */
|
|
709
|
+
changedAt?: string;
|
|
710
|
+
/** Snapshot-target links: how the live document compares (always `fresh` against the snapshot itself). */
|
|
711
|
+
liveStaleness?: Staleness;
|
|
712
|
+
/** Not built (needs the target's old element hashes, spec 11 §4.5's LCS diff); never sent. */
|
|
713
|
+
diffSummary?: {
|
|
714
|
+
added: number;
|
|
715
|
+
removed: number;
|
|
716
|
+
changed: number;
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
export declare const assetDeriveInputSchema: z.ZodObject<{
|
|
720
|
+
assetVersionId: z.ZodString;
|
|
721
|
+
}, z.core.$strip>;
|
|
722
|
+
export type AssetDeriveInput = z.infer<typeof assetDeriveInputSchema>;
|