flashdata 1.0.0__py3-none-any.whl

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.
flashdata/types.py ADDED
@@ -0,0 +1,1016 @@
1
+ """Generated API wire types. Unknown provider fields remain available in dictionaries."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Any, Literal
6
+
7
+ from typing_extensions import TypedDict, Required, Unpack
8
+
9
+ ApiAccess = TypedDict(
10
+ "ApiAccess", {"sources": Required["list[ApiAccessSource]"], "result_origin": Required["str | None"]}, total=False
11
+ )
12
+
13
+ ApiAccessBalance = TypedDict(
14
+ "ApiAccessBalance",
15
+ {
16
+ "scope": Required["Literal['account']"],
17
+ "unit": Required["Literal['Credits']"],
18
+ "balanceCredits": Required["float"],
19
+ "availableCredits": Required["float"],
20
+ "updatedAt": Required["str | None"],
21
+ "note": Required["str"],
22
+ },
23
+ total=False,
24
+ )
25
+
26
+ ApiAccessLimits = TypedDict(
27
+ "ApiAccessLimits",
28
+ {
29
+ "scope": Required["Literal['account']"],
30
+ "plan": Required["ApiAccessPlan"],
31
+ "limits": Required["dict[str, Any]"],
32
+ "current": Required["dict[str, Any]"],
33
+ "note": Required["str"],
34
+ },
35
+ total=False,
36
+ )
37
+
38
+ ApiAccessPlan = TypedDict(
39
+ "ApiAccessPlan", {"name": "str", "type": "str", "billingMode": "str", "status": "str"}, total=False
40
+ )
41
+
42
+ ApiAccessPricing = TypedDict(
43
+ "ApiAccessPricing",
44
+ {
45
+ "unit": Required["Literal['Credits']"],
46
+ "plan": Required["ApiAccessPlan"],
47
+ "requestCount": Required["int"],
48
+ "prices": Required["list[dict[str, Any]]"],
49
+ "note": Required["str"],
50
+ },
51
+ total=False,
52
+ )
53
+
54
+ ApiAccessSource = Literal[
55
+ "google_search",
56
+ "google_images",
57
+ "google_news",
58
+ "google_shopping",
59
+ "google_videos",
60
+ "google_places",
61
+ "youtube_search",
62
+ "youtube_search_extended",
63
+ "youtube_metadata",
64
+ "youtube_transcript",
65
+ "youtube_captions",
66
+ "youtube_trainability",
67
+ "youtube_channel",
68
+ "youtube_suggestions",
69
+ "youtube_download",
70
+ ]
71
+
72
+ ApiKeyUsage = TypedDict(
73
+ "ApiKeyUsage",
74
+ {
75
+ "scope": Required["Literal['account_authorized_sources']"],
76
+ "unit": Required["Literal['Credits']"],
77
+ "from": Required["str"],
78
+ "to": Required["str"],
79
+ "observedAt": Required["str"],
80
+ "totals": Required["UsageCounts"],
81
+ "bySource": Required["list[dict[str, Any]]"],
82
+ "updating": Required["bool"],
83
+ "note": Required["str"],
84
+ },
85
+ total=False,
86
+ )
87
+
88
+ AsyncQuery_google_images = TypedDict(
89
+ "AsyncQuery_google_images",
90
+ {
91
+ "source": Required["Literal['google_images']"],
92
+ "query": Required["str"],
93
+ "params": "GoogleImagesParams",
94
+ "callback_url": "str | None",
95
+ },
96
+ total=False,
97
+ )
98
+
99
+ AsyncQuery_google_news = TypedDict(
100
+ "AsyncQuery_google_news",
101
+ {
102
+ "source": Required["Literal['google_news']"],
103
+ "query": Required["str"],
104
+ "params": "GoogleNewsParams",
105
+ "callback_url": "str | None",
106
+ },
107
+ total=False,
108
+ )
109
+
110
+ AsyncQuery_google_places = TypedDict(
111
+ "AsyncQuery_google_places",
112
+ {
113
+ "source": Required["Literal['google_places']"],
114
+ "query": Required["str"],
115
+ "params": "GooglePlacesParams",
116
+ "callback_url": "str | None",
117
+ },
118
+ total=False,
119
+ )
120
+
121
+ AsyncQuery_google_search = TypedDict(
122
+ "AsyncQuery_google_search",
123
+ {
124
+ "source": Required["Literal['google_search']"],
125
+ "query": Required["str"],
126
+ "params": "GoogleSearchParams",
127
+ "callback_url": "str | None",
128
+ },
129
+ total=False,
130
+ )
131
+
132
+ AsyncQuery_google_shopping = TypedDict(
133
+ "AsyncQuery_google_shopping",
134
+ {
135
+ "source": Required["Literal['google_shopping']"],
136
+ "query": Required["str"],
137
+ "params": "GoogleShoppingParams",
138
+ "callback_url": "str | None",
139
+ },
140
+ total=False,
141
+ )
142
+
143
+ AsyncQuery_google_videos = TypedDict(
144
+ "AsyncQuery_google_videos",
145
+ {
146
+ "source": Required["Literal['google_videos']"],
147
+ "query": Required["str"],
148
+ "params": "GoogleVideosParams",
149
+ "callback_url": "str | None",
150
+ },
151
+ total=False,
152
+ )
153
+
154
+ AsyncQuery_youtube_captions = TypedDict(
155
+ "AsyncQuery_youtube_captions",
156
+ {
157
+ "source": Required["Literal['youtube_captions']"],
158
+ "video_id": Required["str"],
159
+ "params": "YoutubeCaptionsParams",
160
+ "callback_url": "str | None",
161
+ },
162
+ total=False,
163
+ )
164
+
165
+ AsyncQuery_youtube_channel = TypedDict(
166
+ "AsyncQuery_youtube_channel",
167
+ {
168
+ "source": Required["Literal['youtube_channel']"],
169
+ "handle": Required["str"],
170
+ "params": "YoutubeChannelParams",
171
+ "callback_url": "str | None",
172
+ },
173
+ total=False,
174
+ )
175
+
176
+ AsyncQuery_youtube_download = TypedDict(
177
+ "AsyncQuery_youtube_download",
178
+ {
179
+ "source": Required["Literal['youtube_download']"],
180
+ "video_id": Required["str"],
181
+ "params": Required["YoutubeDownloadParams"],
182
+ "callback_url": "str | None",
183
+ },
184
+ total=False,
185
+ )
186
+
187
+ AsyncQuery_youtube_metadata = TypedDict(
188
+ "AsyncQuery_youtube_metadata",
189
+ {
190
+ "source": Required["Literal['youtube_metadata']"],
191
+ "video_id": Required["str"],
192
+ "params": "YoutubeMetadataParams",
193
+ "callback_url": "str | None",
194
+ },
195
+ total=False,
196
+ )
197
+
198
+ AsyncQuery_youtube_search = TypedDict(
199
+ "AsyncQuery_youtube_search",
200
+ {
201
+ "source": Required["Literal['youtube_search']"],
202
+ "query": Required["str"],
203
+ "params": "YoutubeSearchParams",
204
+ "callback_url": "str | None",
205
+ },
206
+ total=False,
207
+ )
208
+
209
+ AsyncQuery_youtube_search_extended = TypedDict(
210
+ "AsyncQuery_youtube_search_extended",
211
+ {
212
+ "source": Required["Literal['youtube_search_extended']"],
213
+ "query": Required["str"],
214
+ "params": "YoutubeSearchExtendedParams",
215
+ "callback_url": "str | None",
216
+ },
217
+ total=False,
218
+ )
219
+
220
+ AsyncQuery_youtube_suggestions = TypedDict(
221
+ "AsyncQuery_youtube_suggestions",
222
+ {
223
+ "source": Required["Literal['youtube_suggestions']"],
224
+ "query": Required["str"],
225
+ "params": "YoutubeSuggestionsParams",
226
+ "callback_url": "str | None",
227
+ },
228
+ total=False,
229
+ )
230
+
231
+ AsyncQuery_youtube_trainability = TypedDict(
232
+ "AsyncQuery_youtube_trainability",
233
+ {
234
+ "source": Required["Literal['youtube_trainability']"],
235
+ "video_id": Required["str"],
236
+ "params": "YoutubeTrainabilityParams",
237
+ "callback_url": "str | None",
238
+ },
239
+ total=False,
240
+ )
241
+
242
+ AsyncQuery_youtube_transcript = TypedDict(
243
+ "AsyncQuery_youtube_transcript",
244
+ {
245
+ "source": Required["Literal['youtube_transcript']"],
246
+ "video_id": Required["str"],
247
+ "params": "YoutubeTranscriptParams",
248
+ "callback_url": "str | None",
249
+ },
250
+ total=False,
251
+ )
252
+
253
+ AsyncSubmission = TypedDict(
254
+ "AsyncSubmission",
255
+ {
256
+ "id": Required["str"],
257
+ "source": Required["str"],
258
+ "status": Required["str"],
259
+ "created_at": Required["str"],
260
+ "links": Required["list[JobLink]"],
261
+ "usage": Required["dict[str, Any]"],
262
+ },
263
+ total=False,
264
+ )
265
+
266
+ BulkJobCreated = TypedDict(
267
+ "BulkJobCreated", {"job": Required["BulkJob"], "upload": Required["dict[str, Any]"]}, total=False
268
+ )
269
+
270
+ BulkJob = TypedDict(
271
+ "BulkJob",
272
+ {
273
+ "id": Required["str"],
274
+ "source": Required[
275
+ "Literal['youtube_metadata', 'youtube_transcript', 'youtube_captions', 'youtube_trainability', 'youtube_download']"
276
+ ],
277
+ "status": Required[
278
+ "Literal['awaiting_upload', 'running', 'paused', 'finalizing', 'completed', 'failed', 'cancelled']"
279
+ ],
280
+ "input": Required["dict[str, Any]"],
281
+ "counts": Required["dict[str, Any]"],
282
+ "pauseReason": Required["str | None"],
283
+ "delivery": Required["dict[str, Any]"],
284
+ "error": Required["None | dict[str, Any]"],
285
+ "createdAt": Required["str"],
286
+ "startedAt": Required["str | None"],
287
+ "completedAt": Required["str | None"],
288
+ "expiresAt": Required["str | None"],
289
+ "links": Required["list[JobLink]"],
290
+ },
291
+ total=False,
292
+ )
293
+
294
+ BulkJobPage = TypedDict(
295
+ "BulkJobPage", {"data": Required["list[BulkJob]"], "pagination": Required["Pagination"]}, total=False
296
+ )
297
+
298
+ BulkJobResponse = TypedDict("BulkJobResponse", {"job": Required["BulkJob"]}, total=False)
299
+
300
+ ConsoleJob = TypedDict(
301
+ "ConsoleJob",
302
+ {
303
+ "createdAt": Required["str"],
304
+ "credits": Required["float"],
305
+ "durationMs": Required["float | None"],
306
+ "error": Required["str | None"],
307
+ "id": Required["str"],
308
+ "params": Required["dict[str, Any]"],
309
+ "progress": Required["int"],
310
+ "result": Required["dict[str, Any] | None"],
311
+ "source": Required["str"],
312
+ "status": Required["Literal['completed', 'failed', 'pending', 'processing']"],
313
+ "updatedAt": Required["str | None"],
314
+ "videoId": Required["str | None"],
315
+ "links": "list[JobLink]",
316
+ },
317
+ total=False,
318
+ )
319
+
320
+
321
+ DataQueryResponse = TypedDict(
322
+ "DataQueryResponse",
323
+ {
324
+ "source": Required["str"],
325
+ "status": Required["str"],
326
+ "created_at": Required["str"],
327
+ "results": Required["list[Any]"],
328
+ "usage": Required["dict[str, Any]"],
329
+ },
330
+ total=False,
331
+ )
332
+
333
+ DataSource = TypedDict(
334
+ "DataSource",
335
+ {
336
+ "id": Required[
337
+ "Literal['google_search', 'google_images', 'google_news', 'google_shopping', 'google_videos', 'google_places', 'youtube_search', 'youtube_search_extended', 'youtube_metadata', 'youtube_transcript', 'youtube_captions', 'youtube_trainability', 'youtube_channel', 'youtube_suggestions', 'youtube_download']"
338
+ ],
339
+ "name": Required["str"],
340
+ "category": Required["Literal['google', 'youtube']"],
341
+ "product": Required["Literal['google_search', 'youtube_data', 'youtube_download']"],
342
+ "modes": Required["list[Literal['realtime', 'async', 'batch']]"],
343
+ "inputSchema": Required["dict[str, Any]"],
344
+ "estimatedCredits": Required["float"],
345
+ "requiresStorageDestination": Required["bool"],
346
+ },
347
+ total=False,
348
+ )
349
+
350
+ Health = TypedDict(
351
+ "Health",
352
+ {
353
+ "status": Required["Literal['healthy', 'degraded']"],
354
+ "service": Required["str"],
355
+ "version": Required["str"],
356
+ "time": Required["str"],
357
+ },
358
+ total=False,
359
+ )
360
+
361
+ JobLink = TypedDict(
362
+ "JobLink",
363
+ {
364
+ "rel": Required["Literal['self', 'results', 'content', 'download']"],
365
+ "href": Required["str"],
366
+ "method": Required["Literal['GET']"],
367
+ "expires_at": "str",
368
+ "filename": "str",
369
+ "content_type": "str",
370
+ "size_bytes": "int",
371
+ },
372
+ total=False,
373
+ )
374
+
375
+ Pagination = TypedDict(
376
+ "Pagination",
377
+ {"nextCursor": "str | None", "previousCursor": "str | None", "hasMore": Required["bool"], "limit": Required["int"]},
378
+ total=False,
379
+ )
380
+
381
+ PlanCatalog = TypedDict(
382
+ "PlanCatalog",
383
+ {
384
+ "trialOffer": "PublicTrialOffer | None",
385
+ "data": Required["list[Plan]"],
386
+ "currency": Required["Literal['USD']"],
387
+ "creditValueUsd": Required["float"],
388
+ "billingAvailability": Required["Literal['available', 'unconfigured', 'unavailable']"],
389
+ "billingMessage": "str | None",
390
+ },
391
+ total=False,
392
+ )
393
+
394
+ Plan = TypedDict(
395
+ "Plan",
396
+ {
397
+ "id": Required["str"],
398
+ "slug": Required["str"],
399
+ "name": Required["str"],
400
+ "description": Required["str"],
401
+ "includedCredits": Required["float"],
402
+ "limits": Required["PlanLimits"],
403
+ "prices": Required["list[PlanPrice]"],
404
+ "features": Required["list[str]"],
405
+ "usagePrices": Required["PlanUsagePrices"],
406
+ },
407
+ total=False,
408
+ )
409
+
410
+ PlanLimits = TypedDict(
411
+ "PlanLimits",
412
+ {"concurrency": Required["int"], "maxBatchSize": Required["int"], "maxPendingJobs": Required["int"]},
413
+ total=False,
414
+ )
415
+
416
+ PlanPrice = TypedDict(
417
+ "PlanPrice",
418
+ {
419
+ "id": Required["str"],
420
+ "currency": Required["Literal['USD']"],
421
+ "unitAmount": Required["int"],
422
+ "credits": Required["float"],
423
+ "type": Required["Literal['recurring', 'one_time']"],
424
+ "interval": Required["Literal['month', 'year', None]"],
425
+ },
426
+ total=False,
427
+ )
428
+
429
+ PlanUsagePrices = TypedDict(
430
+ "PlanUsagePrices",
431
+ {"googlePer1kCents": Required["int"], "youtubePer1kCents": Required["int"], "downloadPerTbCents": Required["int"]},
432
+ total=False,
433
+ )
434
+
435
+ Problem = TypedDict(
436
+ "Problem",
437
+ {
438
+ "type": Required["str"],
439
+ "title": Required["str"],
440
+ "status": Required["int"],
441
+ "code": Required["str"],
442
+ "detail": "str",
443
+ "requestId": Required["str"],
444
+ "fieldErrors": "list[FieldError]",
445
+ },
446
+ total=False,
447
+ )
448
+
449
+ FieldError = TypedDict(
450
+ "FieldError", {"field": Required["str"], "code": Required["str"], "message": Required["str"]}, total=False
451
+ )
452
+
453
+ PublicStatus = TypedDict(
454
+ "PublicStatus",
455
+ {
456
+ "status": Required["Literal['healthy', 'degraded', 'outage']"],
457
+ "updatedAt": Required["str"],
458
+ "components": Required["list[PublicStatusComponent]"],
459
+ },
460
+ total=False,
461
+ )
462
+
463
+ PublicStatusComponent = TypedDict(
464
+ "PublicStatusComponent",
465
+ {
466
+ "id": Required["str"],
467
+ "name": Required["str"],
468
+ "status": Required["Literal['operational', 'degraded', 'outage']"],
469
+ },
470
+ total=False,
471
+ )
472
+
473
+ PublicTrialOffer = TypedDict(
474
+ "PublicTrialOffer",
475
+ {
476
+ "maxApiRequests": "int",
477
+ "googleSearchRequests": Required["int"],
478
+ "youtubeDataRequests": Required["int"],
479
+ "downloadGigabytes": Required["float"],
480
+ },
481
+ total=False,
482
+ )
483
+
484
+ Query_google_images = TypedDict(
485
+ "Query_google_images",
486
+ {"source": Required["Literal['google_images']"], "query": Required["str"], "params": "GoogleImagesParams"},
487
+ total=False,
488
+ )
489
+
490
+ Query_google_news = TypedDict(
491
+ "Query_google_news",
492
+ {"source": Required["Literal['google_news']"], "query": Required["str"], "params": "GoogleNewsParams"},
493
+ total=False,
494
+ )
495
+
496
+ Query_google_places = TypedDict(
497
+ "Query_google_places",
498
+ {"source": Required["Literal['google_places']"], "query": Required["str"], "params": "GooglePlacesParams"},
499
+ total=False,
500
+ )
501
+
502
+ Query_google_search = TypedDict(
503
+ "Query_google_search",
504
+ {"source": Required["Literal['google_search']"], "query": Required["str"], "params": "GoogleSearchParams"},
505
+ total=False,
506
+ )
507
+
508
+ Query_google_shopping = TypedDict(
509
+ "Query_google_shopping",
510
+ {"source": Required["Literal['google_shopping']"], "query": Required["str"], "params": "GoogleShoppingParams"},
511
+ total=False,
512
+ )
513
+
514
+ Query_google_videos = TypedDict(
515
+ "Query_google_videos",
516
+ {"source": Required["Literal['google_videos']"], "query": Required["str"], "params": "GoogleVideosParams"},
517
+ total=False,
518
+ )
519
+
520
+ Query_youtube_captions = TypedDict(
521
+ "Query_youtube_captions",
522
+ {"source": Required["Literal['youtube_captions']"], "video_id": Required["str"], "params": "YoutubeCaptionsParams"},
523
+ total=False,
524
+ )
525
+
526
+ Query_youtube_channel = TypedDict(
527
+ "Query_youtube_channel",
528
+ {"source": Required["Literal['youtube_channel']"], "handle": Required["str"], "params": "YoutubeChannelParams"},
529
+ total=False,
530
+ )
531
+
532
+ Query_youtube_download = TypedDict(
533
+ "Query_youtube_download",
534
+ {
535
+ "source": Required["Literal['youtube_download']"],
536
+ "video_id": Required["str"],
537
+ "params": Required["YoutubeDownloadParams"],
538
+ },
539
+ total=False,
540
+ )
541
+
542
+ Query_youtube_metadata = TypedDict(
543
+ "Query_youtube_metadata",
544
+ {"source": Required["Literal['youtube_metadata']"], "video_id": Required["str"], "params": "YoutubeMetadataParams"},
545
+ total=False,
546
+ )
547
+
548
+ Query_youtube_search = TypedDict(
549
+ "Query_youtube_search",
550
+ {"source": Required["Literal['youtube_search']"], "query": Required["str"], "params": "YoutubeSearchParams"},
551
+ total=False,
552
+ )
553
+
554
+ Query_youtube_search_extended = TypedDict(
555
+ "Query_youtube_search_extended",
556
+ {
557
+ "source": Required["Literal['youtube_search_extended']"],
558
+ "query": Required["str"],
559
+ "params": "YoutubeSearchExtendedParams",
560
+ },
561
+ total=False,
562
+ )
563
+
564
+ Query_youtube_suggestions = TypedDict(
565
+ "Query_youtube_suggestions",
566
+ {
567
+ "source": Required["Literal['youtube_suggestions']"],
568
+ "query": Required["str"],
569
+ "params": "YoutubeSuggestionsParams",
570
+ },
571
+ total=False,
572
+ )
573
+
574
+ Query_youtube_trainability = TypedDict(
575
+ "Query_youtube_trainability",
576
+ {
577
+ "source": Required["Literal['youtube_trainability']"],
578
+ "video_id": Required["str"],
579
+ "params": "YoutubeTrainabilityParams",
580
+ },
581
+ total=False,
582
+ )
583
+
584
+ Query_youtube_transcript = TypedDict(
585
+ "Query_youtube_transcript",
586
+ {
587
+ "source": Required["Literal['youtube_transcript']"],
588
+ "video_id": Required["str"],
589
+ "params": "YoutubeTranscriptParams",
590
+ },
591
+ total=False,
592
+ )
593
+
594
+ UpdateBulkJobRequest = TypedDict(
595
+ "UpdateBulkJobRequest", {"options": "dict[str, Any]", "callback_url": "str | None"}, total=False
596
+ )
597
+
598
+ UsageCounts = TypedDict(
599
+ "UsageCounts",
600
+ {
601
+ "requests": Required["int"],
602
+ "completed": Required["int"],
603
+ "failed": Required["int"],
604
+ "credits": Required["float"],
605
+ },
606
+ total=False,
607
+ )
608
+
609
+ GoogleSearchParams = TypedDict(
610
+ "GoogleSearchParams",
611
+ {"gl": "str", "hl": "str", "location": "str", "num": "int", "page": "int", "tbs": "str", "autocorrect": "bool"},
612
+ total=False,
613
+ )
614
+
615
+ GoogleImagesParams = TypedDict(
616
+ "GoogleImagesParams",
617
+ {"gl": "str", "hl": "str", "location": "str", "num": "int", "page": "int", "tbs": "str", "autocorrect": "bool"},
618
+ total=False,
619
+ )
620
+
621
+ GoogleNewsParams = TypedDict(
622
+ "GoogleNewsParams",
623
+ {"gl": "str", "hl": "str", "location": "str", "num": "int", "page": "int", "tbs": "str", "autocorrect": "bool"},
624
+ total=False,
625
+ )
626
+
627
+ GoogleShoppingParams = TypedDict(
628
+ "GoogleShoppingParams",
629
+ {"gl": "str", "hl": "str", "location": "str", "num": "int", "page": "int", "tbs": "str", "autocorrect": "bool"},
630
+ total=False,
631
+ )
632
+
633
+ GoogleVideosParams = TypedDict(
634
+ "GoogleVideosParams",
635
+ {"gl": "str", "hl": "str", "location": "str", "num": "int", "page": "int", "tbs": "str", "autocorrect": "bool"},
636
+ total=False,
637
+ )
638
+
639
+ GooglePlacesParams = TypedDict(
640
+ "GooglePlacesParams",
641
+ {"gl": "str", "hl": "str", "location": "str", "num": "int", "page": "int", "tbs": "str", "autocorrect": "bool"},
642
+ total=False,
643
+ )
644
+
645
+ YoutubeSearchParams = TypedDict(
646
+ "YoutubeSearchParams", {"max_results": "int", "filters": "YouTubeSearchFilters"}, total=False
647
+ )
648
+
649
+ YoutubeSearchExtendedParams = TypedDict(
650
+ "YoutubeSearchExtendedParams", {"max_results": "int", "filters": "YouTubeSearchFilters"}, total=False
651
+ )
652
+
653
+ YoutubeMetadataParams = TypedDict(
654
+ "YoutubeMetadataParams", {"include_formats": "bool", "include_chapters": "bool"}, total=False
655
+ )
656
+
657
+ YoutubeTranscriptParams = TypedDict("YoutubeTranscriptParams", {"language": "str", "auto": "bool"}, total=False)
658
+
659
+ YoutubeCaptionsParams = TypedDict("YoutubeCaptionsParams", {"language": "str", "auto": "bool"}, total=False)
660
+
661
+ YoutubeTrainabilityParams = TypedDict("YoutubeTrainabilityParams", {}, total=False)
662
+
663
+ YoutubeChannelParams = TypedDict("YoutubeChannelParams", {"video_limit": "int"}, total=False)
664
+
665
+ YoutubeSuggestionsParams = TypedDict("YoutubeSuggestionsParams", {"language": "str", "region": "str"}, total=False)
666
+
667
+ YoutubeDownloadParams = TypedDict(
668
+ "YoutubeDownloadParams",
669
+ {
670
+ "download_type": "Literal['audio_video', 'video', 'audio']",
671
+ "video_quality": "Literal['best', 'worst', '<=144', '==144', '>=144', '<=360', '==360', '>=360', '<=480', '==480', '>=480', '<=720', '==720', '>=720', '<=1080', '==1080', '>=1080', '<=1440', '==1440', '>=1440', '<=2160', '==2160', '>=2160', '<=4320', '==4320', '>=4320']",
672
+ "fps": "str",
673
+ "audio_language": "Literal['default', 'original']",
674
+ "audio_quality": "Literal['best', '320', '256', '192', '128']",
675
+ "yt_dlp_format": "str",
676
+ "upload_metadata": "bool",
677
+ "output_format": "Literal['mp4', 'webm', 'mkv', 'm4a', 'mp3', 'opus']",
678
+ "start_at": "str",
679
+ "end_at": "str",
680
+ "storage": Required["StorageConfig"],
681
+ },
682
+ total=False,
683
+ )
684
+
685
+ RealtimeQuery = (
686
+ Query_google_search
687
+ | Query_google_images
688
+ | Query_google_news
689
+ | Query_google_shopping
690
+ | Query_google_videos
691
+ | Query_google_places
692
+ | Query_youtube_search
693
+ | Query_youtube_search_extended
694
+ | Query_youtube_metadata
695
+ | Query_youtube_transcript
696
+ | Query_youtube_captions
697
+ | Query_youtube_trainability
698
+ | Query_youtube_channel
699
+ | Query_youtube_suggestions
700
+ )
701
+
702
+ AsyncQuery = (
703
+ AsyncQuery_google_search
704
+ | AsyncQuery_google_images
705
+ | AsyncQuery_google_news
706
+ | AsyncQuery_google_shopping
707
+ | AsyncQuery_google_videos
708
+ | AsyncQuery_google_places
709
+ | AsyncQuery_youtube_search
710
+ | AsyncQuery_youtube_search_extended
711
+ | AsyncQuery_youtube_metadata
712
+ | AsyncQuery_youtube_transcript
713
+ | AsyncQuery_youtube_captions
714
+ | AsyncQuery_youtube_trainability
715
+ | AsyncQuery_youtube_channel
716
+ | AsyncQuery_youtube_suggestions
717
+ | AsyncQuery_youtube_download
718
+ )
719
+
720
+ Source = Literal[
721
+ "google_search",
722
+ "google_images",
723
+ "google_news",
724
+ "google_shopping",
725
+ "google_videos",
726
+ "google_places",
727
+ "youtube_search",
728
+ "youtube_search_extended",
729
+ "youtube_metadata",
730
+ "youtube_transcript",
731
+ "youtube_captions",
732
+ "youtube_trainability",
733
+ "youtube_channel",
734
+ "youtube_suggestions",
735
+ "youtube_download",
736
+ ]
737
+
738
+ GoogleSearchResponse = TypedDict(
739
+ "GoogleSearchResponse",
740
+ {
741
+ "source": Required["Literal['google_search']"],
742
+ "status": Required["str"],
743
+ "created_at": Required["str"],
744
+ "results": Required["list[dict[str, Any]]"],
745
+ "usage": Required["dict[str, Any]"],
746
+ },
747
+ total=False,
748
+ )
749
+
750
+ GoogleImagesResponse = TypedDict(
751
+ "GoogleImagesResponse",
752
+ {
753
+ "source": Required["Literal['google_images']"],
754
+ "status": Required["str"],
755
+ "created_at": Required["str"],
756
+ "results": Required["list[dict[str, Any]]"],
757
+ "usage": Required["dict[str, Any]"],
758
+ },
759
+ total=False,
760
+ )
761
+
762
+ GoogleNewsResponse = TypedDict(
763
+ "GoogleNewsResponse",
764
+ {
765
+ "source": Required["Literal['google_news']"],
766
+ "status": Required["str"],
767
+ "created_at": Required["str"],
768
+ "results": Required["list[dict[str, Any]]"],
769
+ "usage": Required["dict[str, Any]"],
770
+ },
771
+ total=False,
772
+ )
773
+
774
+ GoogleShoppingResponse = TypedDict(
775
+ "GoogleShoppingResponse",
776
+ {
777
+ "source": Required["Literal['google_shopping']"],
778
+ "status": Required["str"],
779
+ "created_at": Required["str"],
780
+ "results": Required["list[dict[str, Any]]"],
781
+ "usage": Required["dict[str, Any]"],
782
+ },
783
+ total=False,
784
+ )
785
+
786
+ GoogleVideosResponse = TypedDict(
787
+ "GoogleVideosResponse",
788
+ {
789
+ "source": Required["Literal['google_videos']"],
790
+ "status": Required["str"],
791
+ "created_at": Required["str"],
792
+ "results": Required["list[dict[str, Any]]"],
793
+ "usage": Required["dict[str, Any]"],
794
+ },
795
+ total=False,
796
+ )
797
+
798
+ GooglePlacesResponse = TypedDict(
799
+ "GooglePlacesResponse",
800
+ {
801
+ "source": Required["Literal['google_places']"],
802
+ "status": Required["str"],
803
+ "created_at": Required["str"],
804
+ "results": Required["list[dict[str, Any]]"],
805
+ "usage": Required["dict[str, Any]"],
806
+ },
807
+ total=False,
808
+ )
809
+
810
+ YoutubeSearchResponse = TypedDict(
811
+ "YoutubeSearchResponse",
812
+ {
813
+ "source": Required["Literal['youtube_search']"],
814
+ "status": Required["str"],
815
+ "created_at": Required["str"],
816
+ "results": Required["list[dict[str, Any]]"],
817
+ "usage": Required["dict[str, Any]"],
818
+ },
819
+ total=False,
820
+ )
821
+
822
+ YoutubeSearchExtendedResponse = TypedDict(
823
+ "YoutubeSearchExtendedResponse",
824
+ {
825
+ "source": Required["Literal['youtube_search_extended']"],
826
+ "status": Required["str"],
827
+ "created_at": Required["str"],
828
+ "results": Required["list[dict[str, Any]]"],
829
+ "usage": Required["dict[str, Any]"],
830
+ },
831
+ total=False,
832
+ )
833
+
834
+ YoutubeMetadataResponse = TypedDict(
835
+ "YoutubeMetadataResponse",
836
+ {
837
+ "source": Required["Literal['youtube_metadata']"],
838
+ "status": Required["str"],
839
+ "created_at": Required["str"],
840
+ "results": Required["list[dict[str, Any]]"],
841
+ "usage": Required["dict[str, Any]"],
842
+ },
843
+ total=False,
844
+ )
845
+
846
+ YoutubeTranscriptResponse = TypedDict(
847
+ "YoutubeTranscriptResponse",
848
+ {
849
+ "source": Required["Literal['youtube_transcript']"],
850
+ "status": Required["str"],
851
+ "created_at": Required["str"],
852
+ "results": Required["list[dict[str, Any]]"],
853
+ "usage": Required["dict[str, Any]"],
854
+ },
855
+ total=False,
856
+ )
857
+
858
+ YoutubeCaptionsResponse = TypedDict(
859
+ "YoutubeCaptionsResponse",
860
+ {
861
+ "source": Required["Literal['youtube_captions']"],
862
+ "status": Required["str"],
863
+ "created_at": Required["str"],
864
+ "results": Required["list[dict[str, Any]]"],
865
+ "usage": Required["dict[str, Any]"],
866
+ },
867
+ total=False,
868
+ )
869
+
870
+ YoutubeTrainabilityResponse = TypedDict(
871
+ "YoutubeTrainabilityResponse",
872
+ {
873
+ "source": Required["Literal['youtube_trainability']"],
874
+ "status": Required["str"],
875
+ "created_at": Required["str"],
876
+ "results": Required["list[dict[str, Any]]"],
877
+ "usage": Required["dict[str, Any]"],
878
+ },
879
+ total=False,
880
+ )
881
+
882
+ YoutubeChannelResponse = TypedDict(
883
+ "YoutubeChannelResponse",
884
+ {
885
+ "source": Required["Literal['youtube_channel']"],
886
+ "status": Required["str"],
887
+ "created_at": Required["str"],
888
+ "results": Required["list[dict[str, Any]]"],
889
+ "usage": Required["dict[str, Any]"],
890
+ },
891
+ total=False,
892
+ )
893
+
894
+ YoutubeSuggestionsResponse = TypedDict(
895
+ "YoutubeSuggestionsResponse",
896
+ {
897
+ "source": Required["Literal['youtube_suggestions']"],
898
+ "status": Required["str"],
899
+ "created_at": Required["str"],
900
+ "results": Required["list[list[Any]]"],
901
+ "usage": Required["dict[str, Any]"],
902
+ },
903
+ total=False,
904
+ )
905
+
906
+
907
+ YouTubeSearchFilters = TypedDict(
908
+ "YouTubeSearchFilters",
909
+ {
910
+ "duration": "Literal['<4', '4-20', '>20']",
911
+ "sort_by": "Literal['rating', 'relevance', 'view_count', 'upload_date']",
912
+ "type": "Literal['video', 'channel', 'playlist', 'movie']",
913
+ "upload_date": "Literal['today', 'last_hour', 'this_week', 'this_month', 'this_year']",
914
+ "360": "bool",
915
+ "3d": "bool",
916
+ "4k": "bool",
917
+ "creative_commons": "bool",
918
+ "hd": "bool",
919
+ "hdr": "bool",
920
+ "live": "bool",
921
+ "location": "bool",
922
+ "purchased": "bool",
923
+ "subtitles": "bool",
924
+ "vr180": "bool",
925
+ },
926
+ total=False,
927
+ )
928
+
929
+ StorageConfig = TypedDict(
930
+ "StorageConfig",
931
+ {
932
+ "storage_type": Required["Literal['s3', 's3_compatible', 'oss', 'gcs', 'azure', 'cos', 'bos', 'tos']"],
933
+ "storage_url": Required["str"],
934
+ "object_prefix": "str",
935
+ "access_key": "str",
936
+ "secret_key": "str",
937
+ "region": "str",
938
+ "endpoint_url": "str",
939
+ "service_account": "dict[str, str]",
940
+ "account_name": "str",
941
+ "sas_token": "str",
942
+ },
943
+ total=False,
944
+ )
945
+
946
+ BatchResponse = TypedDict(
947
+ "BatchResponse",
948
+ {"queries": Required["list[AsyncSubmission]"], "total_credits": Required["float"], "usage": "dict[str, Any]"},
949
+ total=False,
950
+ )
951
+
952
+
953
+ class BulkMetadataOptions(YoutubeMetadataParams, total=False):
954
+ result_storage: StorageConfig | None
955
+
956
+
957
+ class BulkSubtitleOptions(YoutubeTranscriptParams, total=False):
958
+ result_storage: StorageConfig | None
959
+
960
+
961
+ class BulkTrainabilityOptions(TypedDict, total=False):
962
+ result_storage: StorageConfig | None
963
+
964
+
965
+ BulkMetadataRequest = TypedDict(
966
+ "BulkMetadataRequest",
967
+ {
968
+ "source": Required[Literal["youtube_metadata"]],
969
+ "options": BulkMetadataOptions,
970
+ "callback_url": str | None,
971
+ },
972
+ total=False,
973
+ )
974
+ BulkSubtitleRequest = TypedDict(
975
+ "BulkSubtitleRequest",
976
+ {
977
+ "source": Required[Literal["youtube_transcript", "youtube_captions"]],
978
+ "options": BulkSubtitleOptions,
979
+ "callback_url": str | None,
980
+ },
981
+ total=False,
982
+ )
983
+ BulkTrainabilityRequest = TypedDict(
984
+ "BulkTrainabilityRequest",
985
+ {
986
+ "source": Required[Literal["youtube_trainability"]],
987
+ "options": BulkTrainabilityOptions,
988
+ "callback_url": str | None,
989
+ },
990
+ total=False,
991
+ )
992
+ BulkDownloadRequest = TypedDict(
993
+ "BulkDownloadRequest",
994
+ {
995
+ "source": Required[Literal["youtube_download"]],
996
+ "options": Required[YoutubeDownloadParams],
997
+ "callback_url": str | None,
998
+ },
999
+ total=False,
1000
+ )
1001
+ CreateBulkJobRequest = BulkMetadataRequest | BulkSubtitleRequest | BulkTrainabilityRequest | BulkDownloadRequest
1002
+
1003
+ SourceCatalog = TypedDict("SourceCatalog", {"data": list[DataSource]})
1004
+ JobResult = TypedDict(
1005
+ "JobResult",
1006
+ {
1007
+ "id": Required[str],
1008
+ "source": Required[Source],
1009
+ "status": Required[Literal["completed"]],
1010
+ "results": Required[list[Any]],
1011
+ "usage": dict[str, Any],
1012
+ "completed_at": Required[str],
1013
+ "expires_at": Required[str],
1014
+ },
1015
+ total=False,
1016
+ )