@cueframe/kernel 0.1.2 → 0.1.3

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.
Files changed (46) hide show
  1. package/dist/_members/authoring/index.d.ts +1 -1
  2. package/dist/_members/authoring/prompts/index.d.ts +0 -1
  3. package/dist/_members/convex-api/api.d.ts +3 -0
  4. package/dist/_members/convex-api/api.generated.d.ts +1444 -0
  5. package/dist/_members/convex-api/dataModel.d.ts +3 -1
  6. package/dist/_members/errors/registry.d.ts +103 -1
  7. package/dist/_members/mcp/core.d.ts +1 -1
  8. package/dist/_members/mcp/generated/harness.d.ts +1 -1
  9. package/dist/_members/mcp/generated/operations.d.ts +12 -0
  10. package/dist/_members/mcp/wait.d.ts +1 -1
  11. package/dist/_members/render-harness/remotion-runtime.d.ts +53 -0
  12. package/dist/authoring/prompts.js +1 -5
  13. package/dist/authoring.js +3 -7
  14. package/dist/{chunk-LLUW26BS.js → chunk-AW57IWNW.js} +18 -1
  15. package/dist/{chunk-AO744WIK.js → chunk-DJW3UGBH.js} +41 -30
  16. package/dist/{chunk-W3SIWT7J.js → chunk-DL7WYISQ.js} +267 -13
  17. package/dist/{chunk-PIURX6IZ.js → chunk-GIA2SVVB.js} +1 -1
  18. package/dist/{chunk-CAJQ7H5A.js → chunk-HBVAZXYO.js} +1 -1
  19. package/dist/{chunk-K2IUBCND.js → chunk-HFC3MKXA.js} +0 -51
  20. package/dist/{chunk-TD347SSX.js → chunk-KFECIHED.js} +29 -18
  21. package/dist/{chunk-VHF66LCQ.js → chunk-NQSMEUJ6.js} +2 -2
  22. package/dist/{chunk-QETYXKQQ.js → chunk-SDCEJAO2.js} +97 -14
  23. package/dist/{chunk-LJ5W4ZBU.js → chunk-TMB5AY6Q.js} +1 -1
  24. package/dist/{chunk-ZPLJ24OV.js → chunk-TO4BFNLJ.js} +1 -1
  25. package/dist/{chunk-VFMW3JUY.js → chunk-TXSFYUZH.js} +1 -1
  26. package/dist/{chunk-XQ72DZKJ.js → chunk-ZPRBGW4Y.js} +1 -1
  27. package/dist/compose/renderer.js +2 -2
  28. package/dist/compose.js +5 -5
  29. package/dist/composition/projection.js +2 -2
  30. package/dist/composition-ops.js +3 -3
  31. package/dist/composition.js +2 -2
  32. package/dist/core/render.js +3 -3
  33. package/dist/core/select.js +2 -2
  34. package/dist/core.js +3 -3
  35. package/dist/director/ai-sdk.js +3 -3
  36. package/dist/director/domain.js +2 -2
  37. package/dist/director.js +3 -3
  38. package/dist/errors.js +1 -1
  39. package/dist/mcp/adapter.js +44 -14
  40. package/dist/mcp/core.js +1 -1
  41. package/dist/mcp/curation.js +1 -1
  42. package/dist/mcp/server.js +4 -4
  43. package/dist/mcp.js +4 -4
  44. package/dist/media-model/testing.js +6 -6
  45. package/dist/nle-export.js +5 -5
  46. package/package.json +14 -13
@@ -0,0 +1,1444 @@
1
+ /* GENERATED — DO NOT EDIT. Regenerate with the backend's convex-api generator.
2
+ * SSOT: the backend's generated Convex api (`npx convex dev`).
3
+ * The internal.* and components surfaces are deliberately stripped — this
4
+ * package carries the client-facing api only. Drift-gated by check:sdk-drift.
5
+ */
6
+ /* eslint-disable */
7
+ /**
8
+ * Generated `api` utility.
9
+ *
10
+ * THIS CODE IS AUTOMATICALLY GENERATED.
11
+ *
12
+ * To regenerate, run `npx convex dev`.
13
+ * @module
14
+ */
15
+
16
+ import type { FunctionReference } from "convex/server";
17
+ import type { GenericId as Id } from "convex/values";
18
+
19
+ /**
20
+ * A utility for referencing Convex functions in your app's public API.
21
+ *
22
+ * Usage:
23
+ * ```js
24
+ * const myFunctionReference = api.myModule.myFunction;
25
+ * ```
26
+ */
27
+ export declare const api: {
28
+ agent: {
29
+ clips: {
30
+ index: {
31
+ createThread: FunctionReference<"mutation", "public", {}, any>;
32
+ deleteThread: FunctionReference<
33
+ "mutation",
34
+ "public",
35
+ { threadId: string },
36
+ any
37
+ >;
38
+ getDashboardInsights: FunctionReference<
39
+ "action",
40
+ "public",
41
+ {},
42
+ null | {
43
+ cacheHit: boolean;
44
+ contentSuggestions: Array<string>;
45
+ generatedAt: number;
46
+ heroInsight: string;
47
+ stale: boolean;
48
+ }
49
+ >;
50
+ listMessages: FunctionReference<
51
+ "query",
52
+ "public",
53
+ { threadId: string },
54
+ any
55
+ >;
56
+ listThreads: FunctionReference<"query", "public", {}, any>;
57
+ send: FunctionReference<
58
+ "action",
59
+ "public",
60
+ {
61
+ clipId?: string;
62
+ mediaItemId?: string;
63
+ projectId?: string;
64
+ prompt: string;
65
+ scope: string;
66
+ threadId: string;
67
+ },
68
+ any
69
+ >;
70
+ updateThreadTitle: FunctionReference<
71
+ "mutation",
72
+ "public",
73
+ { threadId: string; title: string },
74
+ any
75
+ >;
76
+ };
77
+ };
78
+ editor: {
79
+ index: {
80
+ createThread: FunctionReference<"mutation", "public", {}, any>;
81
+ deleteThread: FunctionReference<
82
+ "mutation",
83
+ "public",
84
+ { threadId: string },
85
+ any
86
+ >;
87
+ deleteThreadByConversation: FunctionReference<
88
+ "mutation",
89
+ "public",
90
+ { conversationKey: string },
91
+ any
92
+ >;
93
+ listMessages: FunctionReference<
94
+ "query",
95
+ "public",
96
+ { threadId: string },
97
+ any
98
+ >;
99
+ listThreads: FunctionReference<"query", "public", {}, any>;
100
+ resolveThread: FunctionReference<
101
+ "mutation",
102
+ "public",
103
+ { conversationKey: string },
104
+ any
105
+ >;
106
+ send: FunctionReference<
107
+ "action",
108
+ "public",
109
+ {
110
+ clipId?: string;
111
+ mediaItemId?: string;
112
+ projectId?: string;
113
+ prompt: string;
114
+ scope: string;
115
+ threadId: string;
116
+ },
117
+ any
118
+ >;
119
+ updateThreadTitle: FunctionReference<
120
+ "mutation",
121
+ "public",
122
+ { threadId: string; title: string },
123
+ any
124
+ >;
125
+ };
126
+ };
127
+ };
128
+ api: {
129
+ enrichment: {
130
+ listEnrichmentCandidates: FunctionReference<
131
+ "query",
132
+ "public",
133
+ { clipId: Id<"clips"> },
134
+ any
135
+ >;
136
+ };
137
+ internal: {
138
+ apiKeysAdapter: {
139
+ createForCurrentUser: FunctionReference<
140
+ "action",
141
+ "public",
142
+ {
143
+ expiresIn?: number;
144
+ name: string;
145
+ permissions: Record<string, Array<string>>;
146
+ },
147
+ any
148
+ >;
149
+ };
150
+ onboardingAdapter: {
151
+ status: FunctionReference<"query", "public", {}, any>;
152
+ };
153
+ usageAdapter: {
154
+ listForCurrentUser: FunctionReference<
155
+ "action",
156
+ "public",
157
+ {
158
+ cursor?: string | null;
159
+ from?: number;
160
+ numItems?: number;
161
+ to?: number;
162
+ },
163
+ any
164
+ >;
165
+ };
166
+ };
167
+ };
168
+ auth: {
169
+ getCurrentUser: FunctionReference<"query", "public", {}, any>;
170
+ getUserActivityStats: FunctionReference<"query", "public", {}, any>;
171
+ isCurrentUserAdmin: FunctionReference<"query", "public", {}, any>;
172
+ };
173
+ autumn: {
174
+ attach: FunctionReference<
175
+ "action",
176
+ "public",
177
+ {
178
+ checkoutSessionParams?: Record<string, any>;
179
+ customerData?: { email?: string; fingerprint?: string; name?: string };
180
+ entityData?: any;
181
+ entityId?: string;
182
+ forceCheckout?: boolean;
183
+ freeTrial?: boolean;
184
+ invoice?: boolean;
185
+ metadata?: {};
186
+ options?: Array<{ featureId: string; quantity: number }>;
187
+ productId?: string;
188
+ productIds?: Array<string>;
189
+ reward?: string;
190
+ successUrl?: string;
191
+ },
192
+ any
193
+ >;
194
+ billingPortal: FunctionReference<
195
+ "action",
196
+ "public",
197
+ { returnUrl?: string },
198
+ any
199
+ >;
200
+ cancel: FunctionReference<
201
+ "action",
202
+ "public",
203
+ {
204
+ cancelImmediately?: boolean;
205
+ customerData?: { email?: string; fingerprint?: string; name?: string };
206
+ entityId?: string;
207
+ productId: string;
208
+ },
209
+ any
210
+ >;
211
+ check: FunctionReference<
212
+ "action",
213
+ "public",
214
+ {
215
+ customerData?: { email?: string; fingerprint?: string; name?: string };
216
+ entityData?: any;
217
+ entityId?: string;
218
+ featureId?: string;
219
+ productId?: string;
220
+ requiredBalance?: number;
221
+ sendEvent?: boolean;
222
+ withPreview?: boolean;
223
+ },
224
+ any
225
+ >;
226
+ checkout: FunctionReference<
227
+ "action",
228
+ "public",
229
+ {
230
+ checkoutSessionParams?: Record<string, any>;
231
+ customerData?: { email?: string; fingerprint?: string; name?: string };
232
+ entityData?: any;
233
+ entityId?: string;
234
+ forceCheckout?: boolean;
235
+ freeTrial?: boolean;
236
+ invoice?: boolean;
237
+ options?: Array<{ featureId: string; quantity: number }>;
238
+ productId?: string;
239
+ productIds?: Array<string>;
240
+ reward?: string;
241
+ successUrl?: string;
242
+ },
243
+ any
244
+ >;
245
+ createCustomer: FunctionReference<
246
+ "action",
247
+ "public",
248
+ {
249
+ errorOnNotFound?: boolean;
250
+ expand?: Array<
251
+ | "payment_method"
252
+ | "invoices"
253
+ | "rewards"
254
+ | "trials_used"
255
+ | "entities"
256
+ | "referrals"
257
+ >;
258
+ },
259
+ any
260
+ >;
261
+ listProducts: FunctionReference<"action", "public", {}, any>;
262
+ track: FunctionReference<
263
+ "action",
264
+ "public",
265
+ {
266
+ customerData?: { email?: string; fingerprint?: string; name?: string };
267
+ entityData?: any;
268
+ entityId?: string;
269
+ eventName?: string;
270
+ featureId?: string;
271
+ idempotencyKey?: string;
272
+ properties?: Record<string, any>;
273
+ value?: number;
274
+ },
275
+ any
276
+ >;
277
+ };
278
+ billing: {
279
+ checkCredits: FunctionReference<
280
+ "action",
281
+ "public",
282
+ {
283
+ featureId:
284
+ | "credits"
285
+ | "exports"
286
+ | "ai_tokens"
287
+ | "storage"
288
+ | "seats"
289
+ | "transcription_minutes"
290
+ | "compose"
291
+ | "generate"
292
+ | "video_understanding"
293
+ | "brand_kits"
294
+ | "priority_processing"
295
+ | "compose_verify"
296
+ | "compose_capture"
297
+ | "concurrent_sessions"
298
+ | "resource_import"
299
+ | "perception";
300
+ requiredBalance?: number;
301
+ },
302
+ any
303
+ >;
304
+ trackUsage: FunctionReference<
305
+ "action",
306
+ "public",
307
+ {
308
+ featureId:
309
+ | "credits"
310
+ | "exports"
311
+ | "ai_tokens"
312
+ | "storage"
313
+ | "seats"
314
+ | "transcription_minutes"
315
+ | "compose"
316
+ | "generate"
317
+ | "video_understanding"
318
+ | "brand_kits"
319
+ | "priority_processing"
320
+ | "compose_verify"
321
+ | "compose_capture"
322
+ | "concurrent_sessions"
323
+ | "resource_import"
324
+ | "perception";
325
+ jobId?: string;
326
+ jobKind?: string;
327
+ orgId?: string;
328
+ projectId?: string;
329
+ value?: number;
330
+ },
331
+ any
332
+ >;
333
+ };
334
+ brandKits: {
335
+ list: FunctionReference<"query", "public", {}, any>;
336
+ remove: FunctionReference<"mutation", "public", { kitId: string }, any>;
337
+ upsert: FunctionReference<
338
+ "mutation",
339
+ "public",
340
+ {
341
+ bodyFont: { fontFamily: string; fontWeight: number };
342
+ captionProfile?: {
343
+ backgroundColor?: string;
344
+ color?: string;
345
+ emphasisColor?: string;
346
+ emphasisFontFamily?: string;
347
+ emphasisFontStyle?: "normal" | "italic";
348
+ emphasisFontWeight?: number;
349
+ emphasisLetterSpacing?: number;
350
+ emphasisScale?: number;
351
+ emphasisTextTransform?: "none" | "uppercase";
352
+ fontFamily?: string;
353
+ fontSize?: number;
354
+ fontWeight?: number;
355
+ highlightColor?: string;
356
+ position?: "top" | "center" | "bottom";
357
+ textTransform?: "none" | "uppercase";
358
+ };
359
+ colors: {
360
+ accent: string;
361
+ background: string;
362
+ primary: string;
363
+ secondary: string;
364
+ text: string;
365
+ };
366
+ createdAt: number;
367
+ description?: string;
368
+ extraColors?: Array<{ hex: string; label: string; usage?: string }>;
369
+ headingFont: { fontFamily: string; fontWeight: number };
370
+ kitId: string;
371
+ modifiedAt: number;
372
+ name: string;
373
+ secondaryTagline?: string;
374
+ syncCaptions?: boolean;
375
+ tagline?: string;
376
+ voiceGuidelines?: string;
377
+ },
378
+ any
379
+ >;
380
+ };
381
+ clipRuns: {
382
+ getLatest: FunctionReference<
383
+ "query",
384
+ "public",
385
+ { mediaItemId: Id<"mediaItems"> },
386
+ any
387
+ >;
388
+ hardReset: FunctionReference<
389
+ "mutation",
390
+ "public",
391
+ { mediaItemId: Id<"mediaItems"> },
392
+ any
393
+ >;
394
+ reanalyze: FunctionReference<
395
+ "action",
396
+ "public",
397
+ { mediaItemId: Id<"mediaItems"> },
398
+ any
399
+ >;
400
+ };
401
+ clips: {
402
+ dashboardStats: FunctionReference<
403
+ "query",
404
+ "public",
405
+ {},
406
+ {
407
+ analyzed: { deltaThisWeek: number; total: number };
408
+ clipsReady: { deltaThisWeek: number; total: number };
409
+ exportsCompleted: { deltaThisWeek: number; total: number };
410
+ lastAnalyzedAt?: number;
411
+ library: { deltaThisWeek: number; total: number };
412
+ }
413
+ >;
414
+ keep: FunctionReference<"mutation", "public", { clipId: Id<"clips"> }, any>;
415
+ listByMedia: FunctionReference<
416
+ "query",
417
+ "public",
418
+ {
419
+ cursor?: {
420
+ creationTime: number;
421
+ score: number;
422
+ status: "kept" | "draft";
423
+ };
424
+ format?: string;
425
+ limit?: number;
426
+ mediaItemId: Id<"mediaItems">;
427
+ platform?: string;
428
+ topic?: string;
429
+ },
430
+ any
431
+ >;
432
+ listKept: FunctionReference<
433
+ "query",
434
+ "public",
435
+ { mediaItemId?: Id<"mediaItems"> },
436
+ any
437
+ >;
438
+ listReadyToPublish: FunctionReference<
439
+ "query",
440
+ "public",
441
+ { limit?: number; minScore?: number; sinceHours?: number },
442
+ Array<{
443
+ analyzedAt: number;
444
+ clipId: string;
445
+ endTime: number;
446
+ exported: boolean;
447
+ format: string;
448
+ hook: string;
449
+ mediaItemId: Id<"mediaItems">;
450
+ mediaItemName: string;
451
+ platforms: Array<string>;
452
+ score: number;
453
+ startTime: number;
454
+ thumbnailUrl?: string;
455
+ title: string;
456
+ }>
457
+ >;
458
+ listRecent: FunctionReference<
459
+ "query",
460
+ "public",
461
+ { limit?: number; sinceHours?: number },
462
+ Array<{
463
+ analyzedAt: number;
464
+ clipId: string;
465
+ endTime: number;
466
+ exported: boolean;
467
+ format: string;
468
+ hook: string;
469
+ mediaItemId: Id<"mediaItems">;
470
+ mediaItemName: string;
471
+ platforms: Array<string>;
472
+ score: number;
473
+ startTime: number;
474
+ thumbnailUrl?: string;
475
+ title: string;
476
+ }>
477
+ >;
478
+ softDelete: FunctionReference<
479
+ "mutation",
480
+ "public",
481
+ { clipId: Id<"clips"> },
482
+ any
483
+ >;
484
+ unkeep: FunctionReference<
485
+ "mutation",
486
+ "public",
487
+ { clipId: Id<"clips"> },
488
+ any
489
+ >;
490
+ update: FunctionReference<
491
+ "mutation",
492
+ "public",
493
+ {
494
+ clipId: Id<"clips">;
495
+ fields: {
496
+ caption?: string;
497
+ editingNotes?: string;
498
+ endTime?: number;
499
+ enrichmentSuggestions?: Array<{
500
+ duration: number;
501
+ fetchStatus?: "ok" | "no_results" | "failed";
502
+ intensity?: number;
503
+ kenBurns?: "in" | "out" | "pan-l" | "pan-r" | "none";
504
+ kind: "video" | "photo" | "sfx" | "gif";
505
+ loop?: boolean;
506
+ moment: string;
507
+ rationale: string;
508
+ searchTerms: Array<string>;
509
+ startTime: number;
510
+ }>;
511
+ format?: string;
512
+ hashtags?: Array<string>;
513
+ hook?: string;
514
+ motionStyle?: {
515
+ captionStyle: string;
516
+ colorMood: string;
517
+ textAnimation: string;
518
+ transitions: string;
519
+ };
520
+ platforms?: Array<string>;
521
+ reason?: string;
522
+ refinedScore?: number;
523
+ score?: number;
524
+ startTime?: number;
525
+ textOverlays?: Array<string>;
526
+ thumbnailConcept?: string;
527
+ title?: string;
528
+ topic?: string;
529
+ verdict?: string;
530
+ visualTreatment?: Array<{ time: string; visual: string }>;
531
+ };
532
+ },
533
+ any
534
+ >;
535
+ };
536
+ components: {
537
+ jsSourcesByComponentIds: FunctionReference<
538
+ "query",
539
+ "public",
540
+ { componentIds: Array<string> },
541
+ any
542
+ >;
543
+ listForOrg: FunctionReference<"query", "public", {}, any>;
544
+ };
545
+ composition: {
546
+ restorePoints: {
547
+ forgetForConversation: FunctionReference<
548
+ "mutation",
549
+ "public",
550
+ { conversationKey: string },
551
+ any
552
+ >;
553
+ listForConversation: FunctionReference<
554
+ "query",
555
+ "public",
556
+ { conversationKey: string },
557
+ any
558
+ >;
559
+ restoreToPoint: FunctionReference<
560
+ "mutation",
561
+ "public",
562
+ { conversationKey: string; ifMatch?: string; messageId: string },
563
+ any
564
+ >;
565
+ };
566
+ };
567
+ compositions: {
568
+ getForProject: FunctionReference<
569
+ "query",
570
+ "public",
571
+ { projectId: Id<"projects"> },
572
+ any
573
+ >;
574
+ saveForProject: FunctionReference<
575
+ "mutation",
576
+ "public",
577
+ { composition: any; ifMatch?: string; projectId: Id<"projects"> },
578
+ any
579
+ >;
580
+ };
581
+ context: {
582
+ getAllContent: FunctionReference<"query", "public", {}, any>;
583
+ getDirectorContext: FunctionReference<"query", "public", {}, any>;
584
+ getFile: FunctionReference<"query", "public", { filename: string }, any>;
585
+ init: FunctionReference<
586
+ "action",
587
+ "public",
588
+ {
589
+ competitorYoutubeUrls?: Array<string>;
590
+ instagramHandle?: string;
591
+ websiteUrl?: string;
592
+ youtubeUrl?: string;
593
+ },
594
+ any
595
+ >;
596
+ listFiles: FunctionReference<"query", "public", {}, any>;
597
+ updateFile: FunctionReference<
598
+ "mutation",
599
+ "public",
600
+ { content: string; filename: string },
601
+ any
602
+ >;
603
+ };
604
+ conversations: {
605
+ adoptIntoProject: FunctionReference<
606
+ "mutation",
607
+ "public",
608
+ {
609
+ clientId: string;
610
+ createdAt: number;
611
+ messages: string;
612
+ project?: { home: "local" | "cloud"; id: string };
613
+ title: string;
614
+ updatedAt: number;
615
+ },
616
+ any
617
+ >;
618
+ get: FunctionReference<
619
+ "query",
620
+ "public",
621
+ { clientId: string; project?: { home: "local" | "cloud"; id: string } },
622
+ any
623
+ >;
624
+ list: FunctionReference<
625
+ "query",
626
+ "public",
627
+ { project?: { home: "local" | "cloud"; id: string } },
628
+ any
629
+ >;
630
+ remove: FunctionReference<"mutation", "public", { clientId: string }, any>;
631
+ save: FunctionReference<
632
+ "mutation",
633
+ "public",
634
+ {
635
+ clientId: string;
636
+ createdAt: number;
637
+ messages: string;
638
+ project?: { home: "local" | "cloud"; id: string };
639
+ title: string;
640
+ updatedAt: number;
641
+ },
642
+ any
643
+ >;
644
+ };
645
+ corrections: {
646
+ getByKey: FunctionReference<
647
+ "query",
648
+ "public",
649
+ { key: string; projectId: Id<"projects"> },
650
+ any
651
+ >;
652
+ listByProject: FunctionReference<
653
+ "query",
654
+ "public",
655
+ { projectId: Id<"projects"> },
656
+ any
657
+ >;
658
+ remove: FunctionReference<
659
+ "mutation",
660
+ "public",
661
+ { key: string; projectId: Id<"projects"> },
662
+ any
663
+ >;
664
+ save: FunctionReference<
665
+ "mutation",
666
+ "public",
667
+ { key: string; projectId: Id<"projects">; text: string },
668
+ any
669
+ >;
670
+ };
671
+ critics: {
672
+ list: FunctionReference<"query", "public", {}, any>;
673
+ remove: FunctionReference<"mutation", "public", { criticId: string }, any>;
674
+ upsert: FunctionReference<
675
+ "mutation",
676
+ "public",
677
+ {
678
+ criticId: string;
679
+ enabled: boolean;
680
+ floor: number;
681
+ label: string;
682
+ phase: "static" | "temporal";
683
+ rubric?: string;
684
+ rulesJson?: string;
685
+ secret?: string;
686
+ tier: "rules" | "rubric" | "evaluator";
687
+ url?: string;
688
+ },
689
+ any
690
+ >;
691
+ };
692
+ directorProfiles: {
693
+ addCalibration: FunctionReference<
694
+ "mutation",
695
+ "public",
696
+ {
697
+ context: string;
698
+ correction?: string;
699
+ score: number;
700
+ userId: string;
701
+ userVerdict: string;
702
+ },
703
+ any
704
+ >;
705
+ addPreference: FunctionReference<
706
+ "mutation",
707
+ "public",
708
+ {
709
+ category: string;
710
+ confidence: number;
711
+ rule: string;
712
+ source: string;
713
+ userId: string;
714
+ },
715
+ any
716
+ >;
717
+ getByUser: FunctionReference<"query", "public", { userId: string }, any>;
718
+ upsert: FunctionReference<
719
+ "mutation",
720
+ "public",
721
+ {
722
+ calibrationExamples?: Array<{
723
+ context: string;
724
+ correction?: string;
725
+ score: number;
726
+ userVerdict: string;
727
+ }>;
728
+ preferences?: Array<{
729
+ category: string;
730
+ confidence: number;
731
+ createdAt: number;
732
+ rule: string;
733
+ source: string;
734
+ }>;
735
+ userId: string;
736
+ },
737
+ any
738
+ >;
739
+ };
740
+ directorState: {
741
+ acquireLock: FunctionReference<
742
+ "mutation",
743
+ "public",
744
+ { expiryMs: number; lockId: string; projectId: Id<"projects"> },
745
+ any
746
+ >;
747
+ getProjectState: FunctionReference<
748
+ "query",
749
+ "public",
750
+ { projectId: Id<"projects"> },
751
+ any
752
+ >;
753
+ releaseLock: FunctionReference<
754
+ "mutation",
755
+ "public",
756
+ { lockId: string; projectId: Id<"projects"> },
757
+ any
758
+ >;
759
+ };
760
+ directorWorkflows: {
761
+ create: FunctionReference<
762
+ "mutation",
763
+ "public",
764
+ {
765
+ description?: string;
766
+ name: string;
767
+ outputTemplates?: Array<{
768
+ formatRules: string;
769
+ name: string;
770
+ platform?: string;
771
+ referenceContent: string;
772
+ }>;
773
+ phases: Array<{
774
+ description: string;
775
+ evaluationPasses: number;
776
+ name: string;
777
+ output: string;
778
+ tools: Array<string>;
779
+ }>;
780
+ userId: string;
781
+ },
782
+ any
783
+ >;
784
+ evolve: FunctionReference<
785
+ "mutation",
786
+ "public",
787
+ {
788
+ change: string;
789
+ id: Id<"directorWorkflows">;
790
+ instruction: string;
791
+ updatedPhases?: Array<{
792
+ description: string;
793
+ evaluationPasses: number;
794
+ name: string;
795
+ output: string;
796
+ tools: Array<string>;
797
+ }>;
798
+ },
799
+ any
800
+ >;
801
+ get: FunctionReference<
802
+ "query",
803
+ "public",
804
+ { id: Id<"directorWorkflows"> },
805
+ any
806
+ >;
807
+ getByName: FunctionReference<
808
+ "query",
809
+ "public",
810
+ { name: string; userId: string },
811
+ any
812
+ >;
813
+ list: FunctionReference<"query", "public", { userId: string }, any>;
814
+ remove: FunctionReference<
815
+ "mutation",
816
+ "public",
817
+ { id: Id<"directorWorkflows"> },
818
+ any
819
+ >;
820
+ };
821
+ exports: {
822
+ cancel: FunctionReference<
823
+ "action",
824
+ "public",
825
+ { jobId: Id<"exports"> },
826
+ any
827
+ >;
828
+ create: FunctionReference<
829
+ "action",
830
+ "public",
831
+ {
832
+ clipSuggestionId: string;
833
+ format: "videoClip" | "fcpxml" | "premiere";
834
+ mediaItemId: Id<"mediaItems">;
835
+ },
836
+ any
837
+ >;
838
+ createFromRow: FunctionReference<
839
+ "action",
840
+ "public",
841
+ { jobId: Id<"exports"> },
842
+ any
843
+ >;
844
+ get: FunctionReference<"query", "public", { jobId: Id<"exports"> }, any>;
845
+ getCurrentSpecHash: FunctionReference<
846
+ "query",
847
+ "public",
848
+ { format: "videoClip" | "fcpxml" | "premiere"; publicId: string },
849
+ any
850
+ >;
851
+ getDownloadUrl: FunctionReference<
852
+ "query",
853
+ "public",
854
+ { jobId: Id<"exports"> },
855
+ any
856
+ >;
857
+ getLatestForPublicId: FunctionReference<
858
+ "query",
859
+ "public",
860
+ { format: "videoClip" | "fcpxml" | "premiere"; publicId: string },
861
+ any
862
+ >;
863
+ listByClip: FunctionReference<
864
+ "query",
865
+ "public",
866
+ { clipId: Id<"clips">; format?: "videoClip" | "fcpxml" | "premiere" },
867
+ any
868
+ >;
869
+ markDownloaded: FunctionReference<
870
+ "mutation",
871
+ "public",
872
+ { jobId: Id<"exports"> },
873
+ any
874
+ >;
875
+ };
876
+ mediaItems: {
877
+ cancelProcessing: FunctionReference<
878
+ "mutation",
879
+ "public",
880
+ { id: Id<"mediaItems"> },
881
+ any
882
+ >;
883
+ create: FunctionReference<
884
+ "mutation",
885
+ "public",
886
+ {
887
+ filePath: string;
888
+ fileSize: number;
889
+ mimeType: string;
890
+ name: string;
891
+ processingPhase?:
892
+ | "idle"
893
+ | "pending_import"
894
+ | "pending_upload"
895
+ | "uploading"
896
+ | "extracting"
897
+ | "loading_model"
898
+ | "transcribing"
899
+ | "proxy"
900
+ | "embedding"
901
+ | "analyzing"
902
+ | "indexing"
903
+ | "generating"
904
+ | "rendering"
905
+ | "processing"
906
+ | "complete"
907
+ | "error"
908
+ | "cancelled";
909
+ projectId?: Id<"projects">;
910
+ },
911
+ any
912
+ >;
913
+ get: FunctionReference<"query", "public", { id: Id<"mediaItems"> }, any>;
914
+ getWithDetails: FunctionReference<
915
+ "query",
916
+ "public",
917
+ { id: Id<"mediaItems"> },
918
+ any
919
+ >;
920
+ listByOrg: FunctionReference<"query", "public", {}, any>;
921
+ listByProject: FunctionReference<
922
+ "query",
923
+ "public",
924
+ { projectId: Id<"projects"> },
925
+ any
926
+ >;
927
+ remove: FunctionReference<
928
+ "mutation",
929
+ "public",
930
+ { id: Id<"mediaItems"> },
931
+ any
932
+ >;
933
+ rename: FunctionReference<
934
+ "mutation",
935
+ "public",
936
+ { id: Id<"mediaItems">; name: string },
937
+ any
938
+ >;
939
+ reprocess: FunctionReference<
940
+ "action",
941
+ "public",
942
+ { mediaItemId: Id<"mediaItems"> },
943
+ any
944
+ >;
945
+ search: FunctionReference<"query", "public", { query: string }, any>;
946
+ toggleFavorite: FunctionReference<
947
+ "mutation",
948
+ "public",
949
+ { id: Id<"mediaItems"> },
950
+ any
951
+ >;
952
+ };
953
+ mediaUnderstanding: {
954
+ getByMediaItem: FunctionReference<
955
+ "query",
956
+ "public",
957
+ { mediaItemId: Id<"mediaItems"> },
958
+ any
959
+ >;
960
+ listByUser: FunctionReference<"query", "public", {}, any>;
961
+ };
962
+ overlays: {
963
+ get: FunctionReference<"query", "public", { id: Id<"overlays"> }, any>;
964
+ listByProject: FunctionReference<
965
+ "query",
966
+ "public",
967
+ { projectId: Id<"projects"> },
968
+ any
969
+ >;
970
+ remove: FunctionReference<
971
+ "mutation",
972
+ "public",
973
+ { localId: string; projectId: Id<"projects"> },
974
+ any
975
+ >;
976
+ save: FunctionReference<
977
+ "mutation",
978
+ "public",
979
+ {
980
+ duration: number;
981
+ localId: string;
982
+ params: Record<string, string | number | boolean | null>;
983
+ projectId: Id<"projects">;
984
+ rippled?: boolean;
985
+ startTime: number;
986
+ template: string;
987
+ templateId?: string;
988
+ },
989
+ any
990
+ >;
991
+ };
992
+ processingEvents: {
993
+ listByMediaItem: FunctionReference<
994
+ "query",
995
+ "public",
996
+ { mediaItemId: Id<"mediaItems"> },
997
+ any
998
+ >;
999
+ };
1000
+ projects: {
1001
+ create: FunctionReference<
1002
+ "mutation",
1003
+ "public",
1004
+ {
1005
+ description?: string;
1006
+ name: string;
1007
+ settings?: { height: number; width: number };
1008
+ },
1009
+ any
1010
+ >;
1011
+ get: FunctionReference<"query", "public", { id: Id<"projects"> }, any>;
1012
+ list: FunctionReference<"query", "public", {}, any>;
1013
+ remove: FunctionReference<
1014
+ "mutation",
1015
+ "public",
1016
+ { id: Id<"projects"> },
1017
+ any
1018
+ >;
1019
+ update: FunctionReference<
1020
+ "mutation",
1021
+ "public",
1022
+ {
1023
+ description?: string;
1024
+ id: Id<"projects">;
1025
+ name?: string;
1026
+ settings?: { height: number; width: number };
1027
+ },
1028
+ any
1029
+ >;
1030
+ };
1031
+ providerStates: {
1032
+ getByMediaItem: FunctionReference<
1033
+ "query",
1034
+ "public",
1035
+ { mediaItemId: Id<"mediaItems"> },
1036
+ any
1037
+ >;
1038
+ };
1039
+ r2: {
1040
+ generateUploadUrl: FunctionReference<
1041
+ "mutation",
1042
+ "public",
1043
+ {},
1044
+ { key: string; url: string }
1045
+ >;
1046
+ generateUploadUrlWithKey: FunctionReference<
1047
+ "mutation",
1048
+ "public",
1049
+ { key: string },
1050
+ any
1051
+ >;
1052
+ getFileUrl: FunctionReference<"action", "public", { key: string }, any>;
1053
+ listFiles: FunctionReference<"action", "public", { prefix: string }, any>;
1054
+ readFile: FunctionReference<"action", "public", { key: string }, any>;
1055
+ removeFile: FunctionReference<"action", "public", { key: string }, any>;
1056
+ syncMetadata: FunctionReference<
1057
+ "mutation",
1058
+ "public",
1059
+ { key: string },
1060
+ null
1061
+ >;
1062
+ uploadBinary: FunctionReference<
1063
+ "action",
1064
+ "public",
1065
+ { base64Data: string; contentType: string; key: string },
1066
+ any
1067
+ >;
1068
+ writeFile: FunctionReference<
1069
+ "action",
1070
+ "public",
1071
+ { content: string; key: string },
1072
+ any
1073
+ >;
1074
+ };
1075
+ renderJobs: {
1076
+ getRenderJob: FunctionReference<
1077
+ "query",
1078
+ "public",
1079
+ { jobId: Id<"renderJobs"> },
1080
+ any
1081
+ >;
1082
+ listForProject: FunctionReference<
1083
+ "query",
1084
+ "public",
1085
+ { projectId: Id<"projects"> },
1086
+ any
1087
+ >;
1088
+ presignOutput: FunctionReference<
1089
+ "action",
1090
+ "public",
1091
+ { jobId: Id<"renderJobs"> },
1092
+ any
1093
+ >;
1094
+ };
1095
+ runs: {
1096
+ complete: FunctionReference<
1097
+ "mutation",
1098
+ "public",
1099
+ {
1100
+ error?: string;
1101
+ outputUrl?: string;
1102
+ runId: Id<"runs">;
1103
+ status: string;
1104
+ usage?: {
1105
+ estimatedCost: number;
1106
+ inputTokens: number;
1107
+ outputTokens: number;
1108
+ };
1109
+ },
1110
+ any
1111
+ >;
1112
+ create: FunctionReference<
1113
+ "mutation",
1114
+ "public",
1115
+ {
1116
+ phases?: Array<{ name: string; output: string; status: string }>;
1117
+ projectId: Id<"projects">;
1118
+ prompt?: string;
1119
+ temporalRunId: string;
1120
+ traceId?: string;
1121
+ type: string;
1122
+ userId: string;
1123
+ workflowId?: string;
1124
+ },
1125
+ any
1126
+ >;
1127
+ getByProject: FunctionReference<
1128
+ "query",
1129
+ "public",
1130
+ { projectId: Id<"projects"> },
1131
+ any
1132
+ >;
1133
+ updateProgress: FunctionReference<
1134
+ "mutation",
1135
+ "public",
1136
+ {
1137
+ currentPhase?: number;
1138
+ phases?: Array<{ name: string; output: string; status: string }>;
1139
+ progress?: { message: string; percent: number };
1140
+ runId: Id<"runs">;
1141
+ },
1142
+ any
1143
+ >;
1144
+ };
1145
+ search: {
1146
+ logQuery: FunctionReference<
1147
+ "mutation",
1148
+ "public",
1149
+ {
1150
+ executionTimeMs?: number;
1151
+ queryText: string;
1152
+ resultsCount?: number;
1153
+ searchType: string;
1154
+ userId: string;
1155
+ },
1156
+ any
1157
+ >;
1158
+ recentQueries: FunctionReference<
1159
+ "query",
1160
+ "public",
1161
+ { limit?: number; userId: string },
1162
+ any
1163
+ >;
1164
+ searchMedia: FunctionReference<
1165
+ "query",
1166
+ "public",
1167
+ { queryText: string; userId: string },
1168
+ any
1169
+ >;
1170
+ };
1171
+ settings: {
1172
+ get: FunctionReference<"query", "public", { key: string }, any>;
1173
+ list: FunctionReference<"query", "public", {}, any>;
1174
+ remove: FunctionReference<"mutation", "public", { key: string }, any>;
1175
+ set: FunctionReference<
1176
+ "mutation",
1177
+ "public",
1178
+ { key: string; value?: string },
1179
+ any
1180
+ >;
1181
+ };
1182
+ social: {
1183
+ disconnectAccount: FunctionReference<
1184
+ "mutation",
1185
+ "public",
1186
+ { accountId: Id<"socialAccounts"> },
1187
+ any
1188
+ >;
1189
+ getConnectUrl: FunctionReference<
1190
+ "action",
1191
+ "public",
1192
+ { origin?: string; platform: string; redirect?: string },
1193
+ any
1194
+ >;
1195
+ getInsightsHistory: FunctionReference<
1196
+ "query",
1197
+ "public",
1198
+ { mediaId: Id<"socialMediaItems"> },
1199
+ any
1200
+ >;
1201
+ getLatestInsights: FunctionReference<
1202
+ "query",
1203
+ "public",
1204
+ { mediaId: Id<"socialMediaItems"> },
1205
+ any
1206
+ >;
1207
+ listAccounts: FunctionReference<"query", "public", {}, any>;
1208
+ listLatestInsights: FunctionReference<
1209
+ "query",
1210
+ "public",
1211
+ { accountId: Id<"socialAccounts"> },
1212
+ any
1213
+ >;
1214
+ listMedia: FunctionReference<
1215
+ "query",
1216
+ "public",
1217
+ { accountId: Id<"socialAccounts"> },
1218
+ any
1219
+ >;
1220
+ refreshSingleMedia: FunctionReference<
1221
+ "action",
1222
+ "public",
1223
+ { mediaId: Id<"socialMediaItems"> },
1224
+ any
1225
+ >;
1226
+ };
1227
+ templateEmbeddings: {
1228
+ listByTemplate: FunctionReference<
1229
+ "query",
1230
+ "public",
1231
+ { templateId: Id<"templates"> },
1232
+ any
1233
+ >;
1234
+ };
1235
+ templates: {
1236
+ approveTemplate: FunctionReference<
1237
+ "mutation",
1238
+ "public",
1239
+ { id: Id<"templates"> },
1240
+ any
1241
+ >;
1242
+ create: FunctionReference<
1243
+ "mutation",
1244
+ "public",
1245
+ {
1246
+ category: string;
1247
+ checksum?: string;
1248
+ description: string;
1249
+ examples?: Array<string>;
1250
+ isBuiltin?: boolean;
1251
+ name: string;
1252
+ orgId?: string;
1253
+ paramDefaults?: Record<string, string>;
1254
+ params?: Array<string>;
1255
+ previewUrl?: string;
1256
+ r2Key?: string;
1257
+ source?: string;
1258
+ status?: string;
1259
+ tier?: string;
1260
+ },
1261
+ any
1262
+ >;
1263
+ get: FunctionReference<"query", "public", { id: Id<"templates"> }, any>;
1264
+ getSource: FunctionReference<
1265
+ "action",
1266
+ "public",
1267
+ { id: Id<"templates"> },
1268
+ any
1269
+ >;
1270
+ incrementInstallCount: FunctionReference<
1271
+ "mutation",
1272
+ "public",
1273
+ { id: Id<"templates"> },
1274
+ any
1275
+ >;
1276
+ list: FunctionReference<"query", "public", any, any>;
1277
+ listAccessible: FunctionReference<
1278
+ "query",
1279
+ "public",
1280
+ { category?: string; tier?: string },
1281
+ any
1282
+ >;
1283
+ listByCategory: FunctionReference<
1284
+ "query",
1285
+ "public",
1286
+ { category: string },
1287
+ any
1288
+ >;
1289
+ listByOrg: FunctionReference<"query", "public", { orgId: string }, any>;
1290
+ listMine: FunctionReference<"query", "public", {}, any>;
1291
+ listPendingReview: FunctionReference<"query", "public", {}, any>;
1292
+ rejectTemplate: FunctionReference<
1293
+ "mutation",
1294
+ "public",
1295
+ { id: Id<"templates"> },
1296
+ any
1297
+ >;
1298
+ remove: FunctionReference<
1299
+ "mutation",
1300
+ "public",
1301
+ { id: Id<"templates"> },
1302
+ any
1303
+ >;
1304
+ submitForReview: FunctionReference<
1305
+ "mutation",
1306
+ "public",
1307
+ {
1308
+ category: string;
1309
+ checksum?: string;
1310
+ description: string;
1311
+ examples?: Array<string>;
1312
+ name: string;
1313
+ paramDefaults?: Record<string, string>;
1314
+ params?: Array<string>;
1315
+ r2Key?: string;
1316
+ source?: string;
1317
+ },
1318
+ any
1319
+ >;
1320
+ update: FunctionReference<
1321
+ "mutation",
1322
+ "public",
1323
+ {
1324
+ category?: string;
1325
+ checksum?: string;
1326
+ description?: string;
1327
+ examples?: Array<string>;
1328
+ id: Id<"templates">;
1329
+ isBuiltin?: boolean;
1330
+ name?: string;
1331
+ paramDefaults?: Record<string, string>;
1332
+ params?: Array<string>;
1333
+ previewUrl?: string;
1334
+ r2Key?: string;
1335
+ source?: string;
1336
+ status?: string;
1337
+ tier?: string;
1338
+ },
1339
+ any
1340
+ >;
1341
+ };
1342
+ testing: {
1343
+ clearAll: FunctionReference<"mutation", "public", {}, any>;
1344
+ createTranscript: FunctionReference<
1345
+ "mutation",
1346
+ "public",
1347
+ {
1348
+ durationSeconds?: number;
1349
+ fullText?: string;
1350
+ language?: string;
1351
+ mediaItemId: Id<"mediaItems">;
1352
+ model?: string;
1353
+ speakerCount?: number;
1354
+ transcriptKey: string;
1355
+ utteranceCount: number;
1356
+ wordCount: number;
1357
+ },
1358
+ any
1359
+ >;
1360
+ setMediaMetadata: FunctionReference<
1361
+ "mutation",
1362
+ "public",
1363
+ {
1364
+ cloudStorageUrl?: string;
1365
+ codec?: string;
1366
+ duration?: number;
1367
+ frameRate?: number;
1368
+ height?: number;
1369
+ id: Id<"mediaItems">;
1370
+ width?: number;
1371
+ },
1372
+ any
1373
+ >;
1374
+ };
1375
+ timelineClips: {
1376
+ get: FunctionReference<"query", "public", { id: Id<"timelineClips"> }, any>;
1377
+ listByMediaItem: FunctionReference<
1378
+ "query",
1379
+ "public",
1380
+ { mediaItemId: Id<"mediaItems"> },
1381
+ any
1382
+ >;
1383
+ listByProject: FunctionReference<
1384
+ "query",
1385
+ "public",
1386
+ { projectId: Id<"projects"> },
1387
+ any
1388
+ >;
1389
+ };
1390
+ transcripts: {
1391
+ getByMediaItem: FunctionReference<
1392
+ "query",
1393
+ "public",
1394
+ { mediaItemId: Id<"mediaItems"> },
1395
+ any
1396
+ >;
1397
+ getTranscriptUrl: FunctionReference<
1398
+ "query",
1399
+ "public",
1400
+ { mediaItemId: Id<"mediaItems"> },
1401
+ any
1402
+ >;
1403
+ listByOrg: FunctionReference<"query", "public", {}, any>;
1404
+ listByProject: FunctionReference<
1405
+ "query",
1406
+ "public",
1407
+ { projectId: Id<"projects"> },
1408
+ any
1409
+ >;
1410
+ retranscribe: FunctionReference<
1411
+ "action",
1412
+ "public",
1413
+ { language: string; mediaItemId: Id<"mediaItems"> },
1414
+ any
1415
+ >;
1416
+ searchCandidates: FunctionReference<
1417
+ "query",
1418
+ "public",
1419
+ { limit?: number; q: string },
1420
+ any
1421
+ >;
1422
+ };
1423
+ uploads: {
1424
+ createToken: FunctionReference<
1425
+ "mutation",
1426
+ "public",
1427
+ { projectId?: string },
1428
+ any
1429
+ >;
1430
+ };
1431
+ users: {
1432
+ currentUser: FunctionReference<"query", "public", {}, any>;
1433
+ currentUserId: FunctionReference<"query", "public", {}, any>;
1434
+ };
1435
+ userSettings: {
1436
+ getMySettings: FunctionReference<"query", "public", {}, any>;
1437
+ updateProcessingSettings: FunctionReference<
1438
+ "mutation",
1439
+ "public",
1440
+ { activeBrandKitId?: string; enableUnderstanding?: boolean },
1441
+ any
1442
+ >;
1443
+ };
1444
+ };