@blitzreels/sdk 0.2.27 → 0.2.29

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 (36) hide show
  1. package/README.md +12 -0
  2. package/dist/client.d.ts +12 -0
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +6 -0
  5. package/dist/client.js.map +1 -1
  6. package/dist/index.d.ts +6 -3
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +2 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/resources/auth-projects.d.ts +8 -0
  11. package/dist/resources/auth-projects.d.ts.map +1 -1
  12. package/dist/resources/auth-projects.js +10 -0
  13. package/dist/resources/auth-projects.js.map +1 -1
  14. package/dist/resources/carousels.d.ts +56 -1
  15. package/dist/resources/carousels.d.ts.map +1 -1
  16. package/dist/resources/carousels.js +70 -0
  17. package/dist/resources/carousels.js.map +1 -1
  18. package/dist/resources/characters.d.ts +59 -1
  19. package/dist/resources/characters.d.ts.map +1 -1
  20. package/dist/resources/characters.js +41 -0
  21. package/dist/resources/characters.js.map +1 -1
  22. package/dist/resources/generation.d.ts +3 -1
  23. package/dist/resources/generation.d.ts.map +1 -1
  24. package/dist/resources/generation.js +25 -4
  25. package/dist/resources/generation.js.map +1 -1
  26. package/dist/resources/hooks.d.ts +9 -0
  27. package/dist/resources/hooks.d.ts.map +1 -0
  28. package/dist/resources/hooks.js +15 -0
  29. package/dist/resources/hooks.js.map +1 -0
  30. package/dist/resources/trends.d.ts +1086 -0
  31. package/dist/resources/trends.d.ts.map +1 -0
  32. package/dist/resources/trends.js +227 -0
  33. package/dist/resources/trends.js.map +1 -0
  34. package/dist/types/generation.d.ts +33 -1
  35. package/dist/types/generation.d.ts.map +1 -1
  36. package/package.json +2 -2
@@ -0,0 +1,1086 @@
1
+ import { collectionCreateInputSchema, collectionDeleteInputSchema, collectionExportInputSchema, collectionRenameInputSchema, corpusCreatorInputSchema, corpusNicheFollowInputSchema, corpusPatternsInputSchema, corpusPostInputSchema, corpusSearchInputSchema, savedPostsInputSchema, savePostInputSchema, trendDraftInputSchema, trendsSettingsUpdateInputSchema, trendsWriteInputSchema, unsavePostInputSchema, watchlistAddInputSchema, watchlistRemoveInputSchema } from "@blitzreels/contracts";
2
+ import type { z } from "zod/v4";
3
+ import type { SdkRequest } from "../transport.js";
4
+ export declare function trendsWriteRequest(input: z.input<typeof trendsWriteInputSchema>): {
5
+ method: "POST";
6
+ path: string;
7
+ body: {};
8
+ idempotencyKey: string;
9
+ };
10
+ export declare function createTrendsResource({ request }: {
11
+ request: SdkRequest;
12
+ }): {
13
+ overview: () => Promise<{
14
+ niches: {
15
+ slug: string;
16
+ name: string;
17
+ description: string;
18
+ followed: boolean;
19
+ creators: number;
20
+ posts: number;
21
+ analyzed: number;
22
+ lastCollectedAt: string | null;
23
+ }[];
24
+ regions: {
25
+ code: string;
26
+ creators: number;
27
+ }[];
28
+ totals: {
29
+ creators: number;
30
+ posts: number;
31
+ analyzed: number;
32
+ outliers: number;
33
+ };
34
+ lastCollectedAt: string | null;
35
+ spend: {
36
+ monthUsd: number;
37
+ capUsd: number;
38
+ };
39
+ topFormats: {
40
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
41
+ posts: number;
42
+ medianOutlier: number | null;
43
+ }[];
44
+ topHookTypes: {
45
+ hookType: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
46
+ posts: number;
47
+ medianOutlier: number | null;
48
+ }[];
49
+ risingPatterns: {
50
+ id: string;
51
+ niche: string;
52
+ kind: "format" | "hook" | "topic";
53
+ label: string;
54
+ template: string | null;
55
+ description: string;
56
+ whyItWorks: string;
57
+ postCount: number;
58
+ medianOutlier: number | null;
59
+ momentum: "fading" | "new" | "rising" | "steady" | null;
60
+ examples: {
61
+ id: string;
62
+ platform: "instagram" | "tiktok";
63
+ kind: "carousel" | "video";
64
+ url: string;
65
+ caption: string | null;
66
+ coverUrl: string | null;
67
+ publishedAt: string | null;
68
+ durationSeconds: number | null;
69
+ slideCount: number | null;
70
+ creator: {
71
+ id: string;
72
+ platform: "instagram" | "tiktok";
73
+ handle: string;
74
+ displayName: string | null;
75
+ followers: number | null;
76
+ avatarUrl: string | null;
77
+ medianViews: number | null;
78
+ region: string | null;
79
+ };
80
+ metrics: {
81
+ views: number | null;
82
+ likes: number | null;
83
+ comments: number | null;
84
+ shares: number | null;
85
+ saves: number | null;
86
+ observedAt: string;
87
+ };
88
+ scores: {
89
+ outlier: number | null;
90
+ outlierBasis: "likes" | "views" | null;
91
+ engagementRate: number | null;
92
+ viewsPerHour: number | null;
93
+ };
94
+ niches: string[];
95
+ analysis: {
96
+ version: number;
97
+ language: string;
98
+ nicheFit: number;
99
+ topic: string;
100
+ angle: string;
101
+ hook: {
102
+ text: string;
103
+ type: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
104
+ visual: string | null;
105
+ };
106
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
107
+ faceOnCamera: boolean | null;
108
+ structure: string[];
109
+ cta: string | null;
110
+ whyItWorks: string;
111
+ howToReplicate: string;
112
+ effort: "high" | "low" | "medium";
113
+ } | null;
114
+ }[];
115
+ updatedAt: string;
116
+ }[];
117
+ breakouts: {
118
+ id: string;
119
+ platform: "instagram" | "tiktok";
120
+ kind: "carousel" | "video";
121
+ url: string;
122
+ caption: string | null;
123
+ coverUrl: string | null;
124
+ publishedAt: string | null;
125
+ durationSeconds: number | null;
126
+ slideCount: number | null;
127
+ creator: {
128
+ id: string;
129
+ platform: "instagram" | "tiktok";
130
+ handle: string;
131
+ displayName: string | null;
132
+ followers: number | null;
133
+ avatarUrl: string | null;
134
+ medianViews: number | null;
135
+ region: string | null;
136
+ };
137
+ metrics: {
138
+ views: number | null;
139
+ likes: number | null;
140
+ comments: number | null;
141
+ shares: number | null;
142
+ saves: number | null;
143
+ observedAt: string;
144
+ };
145
+ scores: {
146
+ outlier: number | null;
147
+ outlierBasis: "likes" | "views" | null;
148
+ engagementRate: number | null;
149
+ viewsPerHour: number | null;
150
+ };
151
+ niches: string[];
152
+ analysis: {
153
+ version: number;
154
+ language: string;
155
+ nicheFit: number;
156
+ topic: string;
157
+ angle: string;
158
+ hook: {
159
+ text: string;
160
+ type: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
161
+ visual: string | null;
162
+ };
163
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
164
+ faceOnCamera: boolean | null;
165
+ structure: string[];
166
+ cta: string | null;
167
+ whyItWorks: string;
168
+ howToReplicate: string;
169
+ effort: "high" | "low" | "medium";
170
+ } | null;
171
+ }[];
172
+ }>;
173
+ search: (input: z.input<typeof corpusSearchInputSchema>) => Promise<{
174
+ posts: {
175
+ id: string;
176
+ platform: "instagram" | "tiktok";
177
+ kind: "carousel" | "video";
178
+ url: string;
179
+ caption: string | null;
180
+ coverUrl: string | null;
181
+ publishedAt: string | null;
182
+ durationSeconds: number | null;
183
+ slideCount: number | null;
184
+ creator: {
185
+ id: string;
186
+ platform: "instagram" | "tiktok";
187
+ handle: string;
188
+ displayName: string | null;
189
+ followers: number | null;
190
+ avatarUrl: string | null;
191
+ medianViews: number | null;
192
+ region: string | null;
193
+ };
194
+ metrics: {
195
+ views: number | null;
196
+ likes: number | null;
197
+ comments: number | null;
198
+ shares: number | null;
199
+ saves: number | null;
200
+ observedAt: string;
201
+ };
202
+ scores: {
203
+ outlier: number | null;
204
+ outlierBasis: "likes" | "views" | null;
205
+ engagementRate: number | null;
206
+ viewsPerHour: number | null;
207
+ };
208
+ niches: string[];
209
+ analysis: {
210
+ version: number;
211
+ language: string;
212
+ nicheFit: number;
213
+ topic: string;
214
+ angle: string;
215
+ hook: {
216
+ text: string;
217
+ type: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
218
+ visual: string | null;
219
+ };
220
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
221
+ faceOnCamera: boolean | null;
222
+ structure: string[];
223
+ cta: string | null;
224
+ whyItWorks: string;
225
+ howToReplicate: string;
226
+ effort: "high" | "low" | "medium";
227
+ } | null;
228
+ }[];
229
+ nextCursor: string | null;
230
+ }>;
231
+ post: (input: z.input<typeof corpusPostInputSchema>) => Promise<{
232
+ id: string;
233
+ platform: "instagram" | "tiktok";
234
+ kind: "carousel" | "video";
235
+ url: string;
236
+ caption: string | null;
237
+ coverUrl: string | null;
238
+ publishedAt: string | null;
239
+ durationSeconds: number | null;
240
+ slideCount: number | null;
241
+ creator: {
242
+ id: string;
243
+ platform: "instagram" | "tiktok";
244
+ handle: string;
245
+ displayName: string | null;
246
+ followers: number | null;
247
+ avatarUrl: string | null;
248
+ medianViews: number | null;
249
+ region: string | null;
250
+ };
251
+ metrics: {
252
+ views: number | null;
253
+ likes: number | null;
254
+ comments: number | null;
255
+ shares: number | null;
256
+ saves: number | null;
257
+ observedAt: string;
258
+ };
259
+ scores: {
260
+ outlier: number | null;
261
+ outlierBasis: "likes" | "views" | null;
262
+ engagementRate: number | null;
263
+ viewsPerHour: number | null;
264
+ };
265
+ niches: string[];
266
+ analysis: {
267
+ version: number;
268
+ language: string;
269
+ nicheFit: number;
270
+ topic: string;
271
+ angle: string;
272
+ hook: {
273
+ text: string;
274
+ type: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
275
+ visual: string | null;
276
+ };
277
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
278
+ faceOnCamera: boolean | null;
279
+ structure: string[];
280
+ cta: string | null;
281
+ whyItWorks: string;
282
+ howToReplicate: string;
283
+ effort: "high" | "low" | "medium";
284
+ } | null;
285
+ transcript: string | null;
286
+ history: {
287
+ observedAt: string;
288
+ views: number | null;
289
+ likes: number | null;
290
+ comments: number | null;
291
+ shares: number | null;
292
+ }[];
293
+ patterns: {
294
+ id: string;
295
+ niche: string;
296
+ kind: "format" | "hook" | "topic";
297
+ label: string;
298
+ template: string | null;
299
+ description: string;
300
+ whyItWorks: string;
301
+ postCount: number;
302
+ medianOutlier: number | null;
303
+ momentum: "fading" | "new" | "rising" | "steady" | null;
304
+ updatedAt: string;
305
+ }[];
306
+ related: {
307
+ id: string;
308
+ platform: "instagram" | "tiktok";
309
+ kind: "carousel" | "video";
310
+ url: string;
311
+ caption: string | null;
312
+ coverUrl: string | null;
313
+ publishedAt: string | null;
314
+ durationSeconds: number | null;
315
+ slideCount: number | null;
316
+ creator: {
317
+ id: string;
318
+ platform: "instagram" | "tiktok";
319
+ handle: string;
320
+ displayName: string | null;
321
+ followers: number | null;
322
+ avatarUrl: string | null;
323
+ medianViews: number | null;
324
+ region: string | null;
325
+ };
326
+ metrics: {
327
+ views: number | null;
328
+ likes: number | null;
329
+ comments: number | null;
330
+ shares: number | null;
331
+ saves: number | null;
332
+ observedAt: string;
333
+ };
334
+ scores: {
335
+ outlier: number | null;
336
+ outlierBasis: "likes" | "views" | null;
337
+ engagementRate: number | null;
338
+ viewsPerHour: number | null;
339
+ };
340
+ niches: string[];
341
+ analysis: {
342
+ version: number;
343
+ language: string;
344
+ nicheFit: number;
345
+ topic: string;
346
+ angle: string;
347
+ hook: {
348
+ text: string;
349
+ type: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
350
+ visual: string | null;
351
+ };
352
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
353
+ faceOnCamera: boolean | null;
354
+ structure: string[];
355
+ cta: string | null;
356
+ whyItWorks: string;
357
+ howToReplicate: string;
358
+ effort: "high" | "low" | "medium";
359
+ } | null;
360
+ }[];
361
+ creatorPosts: {
362
+ id: string;
363
+ publishedAt: string;
364
+ value: number;
365
+ }[];
366
+ usual: {
367
+ views: number | null;
368
+ likes: number | null;
369
+ comments: number | null;
370
+ shares: number | null;
371
+ saves: number | null;
372
+ engagementRate: number | null;
373
+ };
374
+ visuals: {
375
+ kind: "frame" | "slide";
376
+ index: number;
377
+ url: string;
378
+ }[];
379
+ }>;
380
+ creator: (input: z.input<typeof corpusCreatorInputSchema>) => Promise<{
381
+ id: string;
382
+ platform: "instagram" | "tiktok";
383
+ handle: string;
384
+ displayName: string | null;
385
+ followers: number | null;
386
+ avatarUrl: string | null;
387
+ medianViews: number | null;
388
+ region: string | null;
389
+ url: string;
390
+ niches: string[];
391
+ postsObserved: number;
392
+ lastCollectedAt: string | null;
393
+ topPosts: {
394
+ id: string;
395
+ platform: "instagram" | "tiktok";
396
+ kind: "carousel" | "video";
397
+ url: string;
398
+ caption: string | null;
399
+ coverUrl: string | null;
400
+ publishedAt: string | null;
401
+ durationSeconds: number | null;
402
+ slideCount: number | null;
403
+ creator: {
404
+ id: string;
405
+ platform: "instagram" | "tiktok";
406
+ handle: string;
407
+ displayName: string | null;
408
+ followers: number | null;
409
+ avatarUrl: string | null;
410
+ medianViews: number | null;
411
+ region: string | null;
412
+ };
413
+ metrics: {
414
+ views: number | null;
415
+ likes: number | null;
416
+ comments: number | null;
417
+ shares: number | null;
418
+ saves: number | null;
419
+ observedAt: string;
420
+ };
421
+ scores: {
422
+ outlier: number | null;
423
+ outlierBasis: "likes" | "views" | null;
424
+ engagementRate: number | null;
425
+ viewsPerHour: number | null;
426
+ };
427
+ niches: string[];
428
+ analysis: {
429
+ version: number;
430
+ language: string;
431
+ nicheFit: number;
432
+ topic: string;
433
+ angle: string;
434
+ hook: {
435
+ text: string;
436
+ type: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
437
+ visual: string | null;
438
+ };
439
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
440
+ faceOnCamera: boolean | null;
441
+ structure: string[];
442
+ cta: string | null;
443
+ whyItWorks: string;
444
+ howToReplicate: string;
445
+ effort: "high" | "low" | "medium";
446
+ } | null;
447
+ }[];
448
+ }>;
449
+ patterns: (input: z.input<typeof corpusPatternsInputSchema>) => Promise<{
450
+ id: string;
451
+ niche: string;
452
+ kind: "format" | "hook" | "topic";
453
+ label: string;
454
+ template: string | null;
455
+ description: string;
456
+ whyItWorks: string;
457
+ postCount: number;
458
+ medianOutlier: number | null;
459
+ momentum: "fading" | "new" | "rising" | "steady" | null;
460
+ examples: {
461
+ id: string;
462
+ platform: "instagram" | "tiktok";
463
+ kind: "carousel" | "video";
464
+ url: string;
465
+ caption: string | null;
466
+ coverUrl: string | null;
467
+ publishedAt: string | null;
468
+ durationSeconds: number | null;
469
+ slideCount: number | null;
470
+ creator: {
471
+ id: string;
472
+ platform: "instagram" | "tiktok";
473
+ handle: string;
474
+ displayName: string | null;
475
+ followers: number | null;
476
+ avatarUrl: string | null;
477
+ medianViews: number | null;
478
+ region: string | null;
479
+ };
480
+ metrics: {
481
+ views: number | null;
482
+ likes: number | null;
483
+ comments: number | null;
484
+ shares: number | null;
485
+ saves: number | null;
486
+ observedAt: string;
487
+ };
488
+ scores: {
489
+ outlier: number | null;
490
+ outlierBasis: "likes" | "views" | null;
491
+ engagementRate: number | null;
492
+ viewsPerHour: number | null;
493
+ };
494
+ niches: string[];
495
+ analysis: {
496
+ version: number;
497
+ language: string;
498
+ nicheFit: number;
499
+ topic: string;
500
+ angle: string;
501
+ hook: {
502
+ text: string;
503
+ type: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
504
+ visual: string | null;
505
+ };
506
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
507
+ faceOnCamera: boolean | null;
508
+ structure: string[];
509
+ cta: string | null;
510
+ whyItWorks: string;
511
+ howToReplicate: string;
512
+ effort: "high" | "low" | "medium";
513
+ } | null;
514
+ }[];
515
+ updatedAt: string;
516
+ }[]>;
517
+ niches: () => Promise<{
518
+ slug: string;
519
+ name: string;
520
+ description: string;
521
+ followed: boolean;
522
+ creators: number;
523
+ posts: number;
524
+ analyzed: number;
525
+ lastCollectedAt: string | null;
526
+ }[]>;
527
+ followNiche: (input: z.input<typeof corpusNicheFollowInputSchema>) => Promise<{
528
+ slug: string;
529
+ name: string;
530
+ description: string;
531
+ followed: boolean;
532
+ creators: number;
533
+ posts: number;
534
+ analyzed: number;
535
+ lastCollectedAt: string | null;
536
+ }[]>;
537
+ ideas: () => Promise<{
538
+ generatedAt: string;
539
+ niches: string[];
540
+ ideas: {
541
+ id: string;
542
+ title: string;
543
+ hook: string;
544
+ kind: "carousel" | "video";
545
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
546
+ angle: string;
547
+ beats: string[];
548
+ evidence: string;
549
+ patternIds: string[];
550
+ sourcePostIds: string[];
551
+ }[];
552
+ sources: {
553
+ id: string;
554
+ platform: "instagram" | "tiktok";
555
+ kind: "carousel" | "video";
556
+ url: string;
557
+ caption: string | null;
558
+ coverUrl: string | null;
559
+ publishedAt: string | null;
560
+ durationSeconds: number | null;
561
+ slideCount: number | null;
562
+ creator: {
563
+ id: string;
564
+ platform: "instagram" | "tiktok";
565
+ handle: string;
566
+ displayName: string | null;
567
+ followers: number | null;
568
+ avatarUrl: string | null;
569
+ medianViews: number | null;
570
+ region: string | null;
571
+ };
572
+ metrics: {
573
+ views: number | null;
574
+ likes: number | null;
575
+ comments: number | null;
576
+ shares: number | null;
577
+ saves: number | null;
578
+ observedAt: string;
579
+ };
580
+ scores: {
581
+ outlier: number | null;
582
+ outlierBasis: "likes" | "views" | null;
583
+ engagementRate: number | null;
584
+ viewsPerHour: number | null;
585
+ };
586
+ niches: string[];
587
+ analysis: {
588
+ version: number;
589
+ language: string;
590
+ nicheFit: number;
591
+ topic: string;
592
+ angle: string;
593
+ hook: {
594
+ text: string;
595
+ type: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
596
+ visual: string | null;
597
+ };
598
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
599
+ faceOnCamera: boolean | null;
600
+ structure: string[];
601
+ cta: string | null;
602
+ whyItWorks: string;
603
+ howToReplicate: string;
604
+ effort: "high" | "low" | "medium";
605
+ } | null;
606
+ }[];
607
+ drafts: {
608
+ id: string;
609
+ ideaId: string;
610
+ ideaTitle: string;
611
+ kind: "carousel" | "video";
612
+ origin: "autopilot" | "manual";
613
+ status: "drafting" | "failed" | "queued" | "ready";
614
+ href: string | null;
615
+ createdAt: string;
616
+ }[];
617
+ } | null>;
618
+ writeIdeas: (input: z.input<typeof trendsWriteInputSchema>) => Promise<{
619
+ generatedAt: string;
620
+ niches: string[];
621
+ ideas: {
622
+ id: string;
623
+ title: string;
624
+ hook: string;
625
+ kind: "carousel" | "video";
626
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
627
+ angle: string;
628
+ beats: string[];
629
+ evidence: string;
630
+ patternIds: string[];
631
+ sourcePostIds: string[];
632
+ }[];
633
+ sources: {
634
+ id: string;
635
+ platform: "instagram" | "tiktok";
636
+ kind: "carousel" | "video";
637
+ url: string;
638
+ caption: string | null;
639
+ coverUrl: string | null;
640
+ publishedAt: string | null;
641
+ durationSeconds: number | null;
642
+ slideCount: number | null;
643
+ creator: {
644
+ id: string;
645
+ platform: "instagram" | "tiktok";
646
+ handle: string;
647
+ displayName: string | null;
648
+ followers: number | null;
649
+ avatarUrl: string | null;
650
+ medianViews: number | null;
651
+ region: string | null;
652
+ };
653
+ metrics: {
654
+ views: number | null;
655
+ likes: number | null;
656
+ comments: number | null;
657
+ shares: number | null;
658
+ saves: number | null;
659
+ observedAt: string;
660
+ };
661
+ scores: {
662
+ outlier: number | null;
663
+ outlierBasis: "likes" | "views" | null;
664
+ engagementRate: number | null;
665
+ viewsPerHour: number | null;
666
+ };
667
+ niches: string[];
668
+ analysis: {
669
+ version: number;
670
+ language: string;
671
+ nicheFit: number;
672
+ topic: string;
673
+ angle: string;
674
+ hook: {
675
+ text: string;
676
+ type: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
677
+ visual: string | null;
678
+ };
679
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
680
+ faceOnCamera: boolean | null;
681
+ structure: string[];
682
+ cta: string | null;
683
+ whyItWorks: string;
684
+ howToReplicate: string;
685
+ effort: "high" | "low" | "medium";
686
+ } | null;
687
+ }[];
688
+ drafts: {
689
+ id: string;
690
+ ideaId: string;
691
+ ideaTitle: string;
692
+ kind: "carousel" | "video";
693
+ origin: "autopilot" | "manual";
694
+ status: "drafting" | "failed" | "queued" | "ready";
695
+ href: string | null;
696
+ createdAt: string;
697
+ }[];
698
+ mutationReceipt: {
699
+ id: string | null;
700
+ key: string | null;
701
+ operation: string;
702
+ status: "completed";
703
+ replayed: boolean;
704
+ };
705
+ }>;
706
+ watchlist: () => Promise<{
707
+ id: string;
708
+ platform: "instagram" | "tiktok";
709
+ handle: string;
710
+ displayName: string | null;
711
+ followers: number | null;
712
+ avatarUrl: string | null;
713
+ medianViews: number | null;
714
+ region: string | null;
715
+ url: string;
716
+ addedAt: string;
717
+ status: "collecting" | "failed" | "not_found" | "private" | "ready";
718
+ postsObserved: number;
719
+ lastCollectedAt: string | null;
720
+ topPost: {
721
+ id: string;
722
+ platform: "instagram" | "tiktok";
723
+ kind: "carousel" | "video";
724
+ url: string;
725
+ caption: string | null;
726
+ coverUrl: string | null;
727
+ publishedAt: string | null;
728
+ durationSeconds: number | null;
729
+ slideCount: number | null;
730
+ creator: {
731
+ id: string;
732
+ platform: "instagram" | "tiktok";
733
+ handle: string;
734
+ displayName: string | null;
735
+ followers: number | null;
736
+ avatarUrl: string | null;
737
+ medianViews: number | null;
738
+ region: string | null;
739
+ };
740
+ metrics: {
741
+ views: number | null;
742
+ likes: number | null;
743
+ comments: number | null;
744
+ shares: number | null;
745
+ saves: number | null;
746
+ observedAt: string;
747
+ };
748
+ scores: {
749
+ outlier: number | null;
750
+ outlierBasis: "likes" | "views" | null;
751
+ engagementRate: number | null;
752
+ viewsPerHour: number | null;
753
+ };
754
+ niches: string[];
755
+ analysis: {
756
+ version: number;
757
+ language: string;
758
+ nicheFit: number;
759
+ topic: string;
760
+ angle: string;
761
+ hook: {
762
+ text: string;
763
+ type: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
764
+ visual: string | null;
765
+ };
766
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
767
+ faceOnCamera: boolean | null;
768
+ structure: string[];
769
+ cta: string | null;
770
+ whyItWorks: string;
771
+ howToReplicate: string;
772
+ effort: "high" | "low" | "medium";
773
+ } | null;
774
+ } | null;
775
+ }[]>;
776
+ addWatchlist: (input: z.input<typeof watchlistAddInputSchema> & {
777
+ idempotencyKey: string;
778
+ }) => Promise<{
779
+ id: string;
780
+ platform: "instagram" | "tiktok";
781
+ handle: string;
782
+ displayName: string | null;
783
+ followers: number | null;
784
+ avatarUrl: string | null;
785
+ medianViews: number | null;
786
+ region: string | null;
787
+ url: string;
788
+ addedAt: string;
789
+ status: "collecting" | "failed" | "not_found" | "private" | "ready";
790
+ postsObserved: number;
791
+ lastCollectedAt: string | null;
792
+ topPost: {
793
+ id: string;
794
+ platform: "instagram" | "tiktok";
795
+ kind: "carousel" | "video";
796
+ url: string;
797
+ caption: string | null;
798
+ coverUrl: string | null;
799
+ publishedAt: string | null;
800
+ durationSeconds: number | null;
801
+ slideCount: number | null;
802
+ creator: {
803
+ id: string;
804
+ platform: "instagram" | "tiktok";
805
+ handle: string;
806
+ displayName: string | null;
807
+ followers: number | null;
808
+ avatarUrl: string | null;
809
+ medianViews: number | null;
810
+ region: string | null;
811
+ };
812
+ metrics: {
813
+ views: number | null;
814
+ likes: number | null;
815
+ comments: number | null;
816
+ shares: number | null;
817
+ saves: number | null;
818
+ observedAt: string;
819
+ };
820
+ scores: {
821
+ outlier: number | null;
822
+ outlierBasis: "likes" | "views" | null;
823
+ engagementRate: number | null;
824
+ viewsPerHour: number | null;
825
+ };
826
+ niches: string[];
827
+ analysis: {
828
+ version: number;
829
+ language: string;
830
+ nicheFit: number;
831
+ topic: string;
832
+ angle: string;
833
+ hook: {
834
+ text: string;
835
+ type: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
836
+ visual: string | null;
837
+ };
838
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
839
+ faceOnCamera: boolean | null;
840
+ structure: string[];
841
+ cta: string | null;
842
+ whyItWorks: string;
843
+ howToReplicate: string;
844
+ effort: "high" | "low" | "medium";
845
+ } | null;
846
+ } | null;
847
+ }>;
848
+ removeWatchlist: (input: z.input<typeof watchlistRemoveInputSchema> & {
849
+ idempotencyKey: string;
850
+ }) => Promise<{
851
+ id: string;
852
+ platform: "instagram" | "tiktok";
853
+ handle: string;
854
+ displayName: string | null;
855
+ followers: number | null;
856
+ avatarUrl: string | null;
857
+ medianViews: number | null;
858
+ region: string | null;
859
+ url: string;
860
+ addedAt: string;
861
+ status: "collecting" | "failed" | "not_found" | "private" | "ready";
862
+ postsObserved: number;
863
+ lastCollectedAt: string | null;
864
+ topPost: {
865
+ id: string;
866
+ platform: "instagram" | "tiktok";
867
+ kind: "carousel" | "video";
868
+ url: string;
869
+ caption: string | null;
870
+ coverUrl: string | null;
871
+ publishedAt: string | null;
872
+ durationSeconds: number | null;
873
+ slideCount: number | null;
874
+ creator: {
875
+ id: string;
876
+ platform: "instagram" | "tiktok";
877
+ handle: string;
878
+ displayName: string | null;
879
+ followers: number | null;
880
+ avatarUrl: string | null;
881
+ medianViews: number | null;
882
+ region: string | null;
883
+ };
884
+ metrics: {
885
+ views: number | null;
886
+ likes: number | null;
887
+ comments: number | null;
888
+ shares: number | null;
889
+ saves: number | null;
890
+ observedAt: string;
891
+ };
892
+ scores: {
893
+ outlier: number | null;
894
+ outlierBasis: "likes" | "views" | null;
895
+ engagementRate: number | null;
896
+ viewsPerHour: number | null;
897
+ };
898
+ niches: string[];
899
+ analysis: {
900
+ version: number;
901
+ language: string;
902
+ nicheFit: number;
903
+ topic: string;
904
+ angle: string;
905
+ hook: {
906
+ text: string;
907
+ type: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
908
+ visual: string | null;
909
+ };
910
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
911
+ faceOnCamera: boolean | null;
912
+ structure: string[];
913
+ cta: string | null;
914
+ whyItWorks: string;
915
+ howToReplicate: string;
916
+ effort: "high" | "low" | "medium";
917
+ } | null;
918
+ } | null;
919
+ }[]>;
920
+ collections: () => Promise<{
921
+ id: string;
922
+ name: string;
923
+ postCount: number;
924
+ coverUrls: string[];
925
+ updatedAt: string;
926
+ }[]>;
927
+ createCollection: (input: z.input<typeof collectionCreateInputSchema> & {
928
+ idempotencyKey: string;
929
+ }) => Promise<{
930
+ id: string;
931
+ name: string;
932
+ postCount: number;
933
+ coverUrls: string[];
934
+ updatedAt: string;
935
+ }>;
936
+ renameCollection: (input: z.input<typeof collectionRenameInputSchema> & {
937
+ idempotencyKey: string;
938
+ }) => Promise<{
939
+ id: string;
940
+ name: string;
941
+ postCount: number;
942
+ coverUrls: string[];
943
+ updatedAt: string;
944
+ }>;
945
+ deleteCollection: (input: z.input<typeof collectionDeleteInputSchema> & {
946
+ idempotencyKey: string;
947
+ }) => Promise<{
948
+ deleted: boolean;
949
+ }>;
950
+ savedPosts: (input: z.input<typeof savedPostsInputSchema>) => Promise<{
951
+ items: {
952
+ post: {
953
+ id: string;
954
+ platform: "instagram" | "tiktok";
955
+ kind: "carousel" | "video";
956
+ url: string;
957
+ caption: string | null;
958
+ coverUrl: string | null;
959
+ publishedAt: string | null;
960
+ durationSeconds: number | null;
961
+ slideCount: number | null;
962
+ creator: {
963
+ id: string;
964
+ platform: "instagram" | "tiktok";
965
+ handle: string;
966
+ displayName: string | null;
967
+ followers: number | null;
968
+ avatarUrl: string | null;
969
+ medianViews: number | null;
970
+ region: string | null;
971
+ };
972
+ metrics: {
973
+ views: number | null;
974
+ likes: number | null;
975
+ comments: number | null;
976
+ shares: number | null;
977
+ saves: number | null;
978
+ observedAt: string;
979
+ };
980
+ scores: {
981
+ outlier: number | null;
982
+ outlierBasis: "likes" | "views" | null;
983
+ engagementRate: number | null;
984
+ viewsPerHour: number | null;
985
+ };
986
+ niches: string[];
987
+ analysis: {
988
+ version: number;
989
+ language: string;
990
+ nicheFit: number;
991
+ topic: string;
992
+ angle: string;
993
+ hook: {
994
+ text: string;
995
+ type: "bold_claim" | "challenge" | "contrarian" | "curiosity_gap" | "demo" | "how_to" | "list" | "news" | "other" | "question" | "relatable" | "result_first" | "story";
996
+ visual: string | null;
997
+ };
998
+ formatKey: "ai_avatar" | "before_after" | "green_screen" | "interview" | "listicle" | "meme" | "other" | "reaction" | "screen_recording" | "skit" | "slideshow" | "talking_head" | "text_on_screen" | "tutorial_steps" | "voiceover_broll";
999
+ faceOnCamera: boolean | null;
1000
+ structure: string[];
1001
+ cta: string | null;
1002
+ whyItWorks: string;
1003
+ howToReplicate: string;
1004
+ effort: "high" | "low" | "medium";
1005
+ } | null;
1006
+ };
1007
+ collectionId: string;
1008
+ note: string | null;
1009
+ savedAt: string;
1010
+ }[];
1011
+ nextCursor: string | null;
1012
+ }>;
1013
+ savedPostRefs: () => Promise<{
1014
+ postId: string;
1015
+ collectionIds: string[];
1016
+ }[]>;
1017
+ savePost: (input: z.input<typeof savePostInputSchema> & {
1018
+ idempotencyKey: string;
1019
+ }) => Promise<{
1020
+ postId: string;
1021
+ collectionIds: string[];
1022
+ }[]>;
1023
+ unsavePost: (input: z.input<typeof unsavePostInputSchema> & {
1024
+ idempotencyKey: string;
1025
+ }) => Promise<{
1026
+ postId: string;
1027
+ collectionIds: string[];
1028
+ }[]>;
1029
+ exportCollection: (input: z.input<typeof collectionExportInputSchema>) => Promise<{
1030
+ filename: string;
1031
+ csv: string;
1032
+ rows: number;
1033
+ }>;
1034
+ settings: () => Promise<{
1035
+ autopilot: {
1036
+ enabled: boolean;
1037
+ draftsPerWeek: number;
1038
+ lastRunAt: string | null;
1039
+ nextRunAt: string | null;
1040
+ };
1041
+ digest: {
1042
+ enabled: boolean;
1043
+ lastSentAt: string | null;
1044
+ nextSendAt: string | null;
1045
+ };
1046
+ refresh: {
1047
+ lastRunAt: string | null;
1048
+ lastStatus: "budget-stopped" | "failed" | "running" | "succeeded" | null;
1049
+ nextRunAt: string | null;
1050
+ };
1051
+ }>;
1052
+ updateSettings: (input: z.input<typeof trendsSettingsUpdateInputSchema> & {
1053
+ idempotencyKey: string;
1054
+ }) => Promise<{
1055
+ autopilot: {
1056
+ enabled: boolean;
1057
+ draftsPerWeek: number;
1058
+ lastRunAt: string | null;
1059
+ nextRunAt: string | null;
1060
+ };
1061
+ digest: {
1062
+ enabled: boolean;
1063
+ lastSentAt: string | null;
1064
+ nextSendAt: string | null;
1065
+ };
1066
+ refresh: {
1067
+ lastRunAt: string | null;
1068
+ lastStatus: "budget-stopped" | "failed" | "running" | "succeeded" | null;
1069
+ nextRunAt: string | null;
1070
+ };
1071
+ }>;
1072
+ draftIdea: (input: z.input<typeof trendDraftInputSchema> & {
1073
+ idempotencyKey: string;
1074
+ }) => Promise<{
1075
+ id: string;
1076
+ ideaId: string;
1077
+ ideaTitle: string;
1078
+ kind: "carousel" | "video";
1079
+ origin: "autopilot" | "manual";
1080
+ status: "drafting" | "failed" | "queued" | "ready";
1081
+ href: string | null;
1082
+ createdAt: string;
1083
+ }>;
1084
+ };
1085
+ export type TrendsResource = ReturnType<typeof createTrendsResource>;
1086
+ //# sourceMappingURL=trends.d.ts.map