@adbjs/sdk 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1594 @@
1
+ /**
2
+ * Configuration options for the AllDebrid client
3
+ */
4
+ interface AllDebridConfig {
5
+ /**
6
+ * Your AllDebrid API key (Bearer token)
7
+ */
8
+ apiKey: string;
9
+ /**
10
+ * User agent string to identify your application
11
+ * @default '@alldebrid/sdk'
12
+ */
13
+ agent?: string;
14
+ /**
15
+ * Base URL for the AllDebrid API
16
+ * @default 'https://api.alldebrid.com/v4'
17
+ */
18
+ baseUrl?: string;
19
+ /**
20
+ * Request timeout in milliseconds
21
+ * @default 30000
22
+ */
23
+ timeout?: number;
24
+ /**
25
+ * Enable automatic retries on failed requests
26
+ * @default true
27
+ */
28
+ retry?: boolean;
29
+ /**
30
+ * Maximum number of retry attempts
31
+ * @default 3
32
+ */
33
+ maxRetries?: number;
34
+ }
35
+ /**
36
+ * Standard API response wrapper
37
+ */
38
+ interface ApiResponse<T> {
39
+ status: 'success' | 'error';
40
+ data?: T;
41
+ error?: ApiError;
42
+ }
43
+ /**
44
+ * API error structure
45
+ */
46
+ interface ApiError {
47
+ code: string;
48
+ message: string;
49
+ }
50
+ /**
51
+ * Extract the data type from a generated response type.
52
+ * Generated types incorrectly wrap the data as { status, data }, so we extract just the data.
53
+ */
54
+ type ExtractData<T> = T extends {
55
+ data?: infer D;
56
+ } ? NonNullable<D> | undefined : T;
57
+
58
+ /**
59
+ * Base class for all resources
60
+ * Provides access to HTTP methods
61
+ * @internal
62
+ */
63
+ declare abstract class BaseResource {
64
+ protected readonly client: AllDebridClient;
65
+ constructor(client: AllDebridClient);
66
+ /**
67
+ * Make a GET request
68
+ * @param T - The generated response type (e.g., GetLinkUnlockResponse)
69
+ * @returns The extracted data from the response (without the { status, data } wrapper)
70
+ */
71
+ protected get<T>(path: string, params?: Record<string, unknown>): Promise<ExtractData<T>>;
72
+ /**
73
+ * Make a POST request
74
+ * @param T - The generated response type
75
+ * @returns The extracted data from the response (without the { status, data } wrapper)
76
+ */
77
+ protected post<T>(path: string, body?: unknown, params?: Record<string, unknown>): Promise<ExtractData<T>>;
78
+ /**
79
+ * Make a POST request with FormData (multipart/form-data)
80
+ * @param T - The generated response type
81
+ * @returns The extracted data from the response (without the { status, data } wrapper)
82
+ */
83
+ protected postFormData<T>(path: string, formData: FormData, params?: Record<string, unknown>): Promise<ExtractData<T>>;
84
+ }
85
+
86
+ /**
87
+ * Host resource for getting information about supported hosts
88
+ */
89
+ declare class HostResource extends BaseResource {
90
+ /**
91
+ * Get list of all supported hosts with their information
92
+ *
93
+ * @param hostOnly - If true, only return hosts (exclude streams and redirectors)
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * const hosts = await client.host.list()
98
+ * console.log(hosts.hosts) // All supported file hosts
99
+ * console.log(hosts.streams) // Streaming hosts
100
+ * console.log(hosts.redirectors) // Link redirectors
101
+ * ```
102
+ */
103
+ list(hostOnly?: boolean): Promise<{
104
+ hosts?: {
105
+ [key: string]: {
106
+ name?: string;
107
+ type?: string;
108
+ domains?: Array<(string)>;
109
+ regexp?: string;
110
+ regexps?: Array<(string)>;
111
+ status?: boolean;
112
+ };
113
+ };
114
+ streams?: {
115
+ [key: string]: {
116
+ name?: string;
117
+ type?: string;
118
+ domains?: Array<(string)>;
119
+ regexp?: string;
120
+ regexps?: Array<(string)>;
121
+ status?: boolean;
122
+ };
123
+ };
124
+ redirectors?: {
125
+ [key: string]: {
126
+ name?: string;
127
+ type?: string;
128
+ domains?: Array<(string)>;
129
+ regexp?: string;
130
+ regexps?: Array<(string)>;
131
+ status?: boolean;
132
+ };
133
+ };
134
+ } | undefined>;
135
+ /**
136
+ * Get array of all supported domain names
137
+ *
138
+ * @example
139
+ * ```ts
140
+ * const domains = await client.host.domains()
141
+ * console.log(domains) // ['rapidgator.net', 'uploaded.net', ...]
142
+ * ```
143
+ */
144
+ domains(): Promise<{
145
+ hosts?: Array<(string)>;
146
+ streams?: Array<(string)>;
147
+ redirectors?: Array<(string)>;
148
+ } | undefined>;
149
+ /**
150
+ * Get hosts ordered by restriction level (priority list)
151
+ *
152
+ * @example
153
+ * ```ts
154
+ * const priority = await client.host.priority()
155
+ * console.log(priority.hosts) // Ordered list with restriction levels
156
+ * ```
157
+ */
158
+ priority(): Promise<{
159
+ hosts?: {
160
+ [key: string]: (number);
161
+ };
162
+ } | undefined>;
163
+ }
164
+
165
+ /**
166
+ * Options for polling delayed link generation
167
+ */
168
+ interface PollOptions {
169
+ /**
170
+ * Polling interval in milliseconds
171
+ * @default 2000
172
+ */
173
+ interval?: number;
174
+ /**
175
+ * Maximum number of polling attempts
176
+ * @default 30
177
+ */
178
+ maxAttempts?: number;
179
+ /**
180
+ * Callback called on each polling attempt
181
+ */
182
+ onPoll?: (attempt: number) => void;
183
+ }
184
+ /**
185
+ * Link resource for unlocking and managing download links
186
+ */
187
+ declare class LinkResource extends BaseResource {
188
+ /**
189
+ * Get information about one or more links
190
+ *
191
+ * @param links - Single link or array of links to get info for
192
+ *
193
+ * @example
194
+ * ```ts
195
+ * const info = await client.link.infos('https://example.com/file.zip')
196
+ * console.log(info)
197
+ * ```
198
+ */
199
+ infos(links: string | string[]): Promise<{
200
+ link?: string;
201
+ filename?: string;
202
+ size?: number;
203
+ host?: string;
204
+ hostDomain?: string;
205
+ }[] | undefined>;
206
+ /**
207
+ * Extract links from redirectors/link protectors
208
+ *
209
+ * @param link - The redirector link to extract from
210
+ *
211
+ * @example
212
+ * ```ts
213
+ * const links = await client.link.redirector('https://linkprotector.com/abc123')
214
+ * ```
215
+ */
216
+ redirector(link: string): Promise<string[] | undefined>;
217
+ /**
218
+ * Unlock a download link
219
+ *
220
+ * @param link - The link to unlock
221
+ *
222
+ * @example
223
+ * ```ts
224
+ * const result = await client.link.unlock('https://example.com/file.zip')
225
+ * if (result.link) {
226
+ * console.log('Direct link:', result.link)
227
+ * } else if (result.delayed) {
228
+ * // Handle delayed generation
229
+ * const delayedResult = await client.link.delayed(result.delayed)
230
+ * }
231
+ * ```
232
+ */
233
+ unlock(link: string): Promise<{
234
+ filename?: string;
235
+ filesize?: number;
236
+ host?: string;
237
+ hostDomain?: string;
238
+ id?: string;
239
+ link?: string;
240
+ paws?: boolean;
241
+ streams?: Array<{
242
+ id?: string;
243
+ ext?: string;
244
+ quality?: string;
245
+ filesize?: number;
246
+ proto?: string;
247
+ name?: string;
248
+ link?: string;
249
+ tb?: number;
250
+ abr?: number;
251
+ }>;
252
+ } | undefined>;
253
+ /**
254
+ * Unlock a link and automatically poll if delayed
255
+ * Note: The API response format doesn't include a delayed field in the current OpenAPI spec.
256
+ * This method will be updated once the delayed mechanism is documented.
257
+ *
258
+ * @param link - The link to unlock
259
+ * @param _options - Polling options (currently unused)
260
+ *
261
+ * @example
262
+ * ```ts
263
+ * const result = await client.link.unlockWithPolling('https://example.com/file.zip')
264
+ * console.log('Direct link:', result.link)
265
+ * ```
266
+ */
267
+ unlockWithPolling(link: string, _options?: PollOptions): Promise<{
268
+ filename?: string;
269
+ filesize?: number;
270
+ host?: string;
271
+ hostDomain?: string;
272
+ id?: string;
273
+ link?: string;
274
+ paws?: boolean;
275
+ streams?: Array<{
276
+ id?: string;
277
+ ext?: string;
278
+ quality?: string;
279
+ filesize?: number;
280
+ proto?: string;
281
+ name?: string;
282
+ link?: string;
283
+ tb?: number;
284
+ abr?: number;
285
+ }>;
286
+ } | undefined>;
287
+ /**
288
+ * Get streaming options for a generated link
289
+ *
290
+ * @param id - The generated link ID or streaming ID
291
+ *
292
+ * @example
293
+ * ```ts
294
+ * const streams = await client.link.streaming('abc123')
295
+ * ```
296
+ */
297
+ streaming(id: string): Promise<{
298
+ filename?: string;
299
+ filesize?: number;
300
+ host?: string;
301
+ hostDomain?: string;
302
+ id?: string;
303
+ link?: string;
304
+ paws?: boolean;
305
+ streams?: Array<{
306
+ id?: string;
307
+ ext?: string;
308
+ quality?: string;
309
+ filesize?: number;
310
+ proto?: string;
311
+ name?: string;
312
+ link?: string;
313
+ tb?: number;
314
+ abr?: number;
315
+ }>;
316
+ } | undefined>;
317
+ /**
318
+ * Get the status/result of a delayed link generation
319
+ *
320
+ * @param id - The delayed generation ID
321
+ *
322
+ * @example
323
+ * ```ts
324
+ * const result = await client.link.delayed('delayed_id_123')
325
+ * ```
326
+ */
327
+ delayed(id: string): Promise<{
328
+ status?: number;
329
+ time_left?: number;
330
+ link?: string;
331
+ } | undefined>;
332
+ }
333
+
334
+ /**
335
+ * Options for watching magnet status
336
+ */
337
+ interface WatchOptions {
338
+ /**
339
+ * Polling interval in milliseconds
340
+ * @default 3000
341
+ */
342
+ interval?: number;
343
+ /**
344
+ * Maximum number of polling attempts (0 = infinite)
345
+ * @default 0
346
+ */
347
+ maxAttempts?: number;
348
+ /**
349
+ * Callback called on each status update
350
+ */
351
+ onUpdate?: (status: any) => void;
352
+ /**
353
+ * Stop watching when magnet reaches this status
354
+ * @default 'Ready'
355
+ */
356
+ stopOnStatus?: string;
357
+ }
358
+ /**
359
+ * Magnet/Torrent resource for managing torrent downloads
360
+ */
361
+ declare class MagnetResource extends BaseResource {
362
+ /**
363
+ * Upload magnets by URI or hash
364
+ *
365
+ * @param magnets - Single magnet URI/hash or array of magnets
366
+ *
367
+ * @example
368
+ * ```ts
369
+ * const result = await client.magnet.upload('magnet:?xt=urn:btih:...')
370
+ * console.log('Magnet ID:', result.magnets[0].id)
371
+ * ```
372
+ */
373
+ upload(magnets: string | string[]): Promise<{
374
+ magnets?: Array<{
375
+ magnet?: string;
376
+ hash?: string;
377
+ name?: string;
378
+ size?: number;
379
+ ready?: boolean;
380
+ id?: number;
381
+ error?: {
382
+ code?: string;
383
+ message?: string;
384
+ };
385
+ }>;
386
+ } | undefined>;
387
+ /**
388
+ * Upload a torrent file
389
+ *
390
+ * @param file - The torrent file (Blob or File)
391
+ * @param filename - Optional filename (defaults to 'torrent.torrent' for Blob, or file.name for File)
392
+ *
393
+ * @example
394
+ * ```ts
395
+ * const file = new File([buffer], 'torrent.torrent')
396
+ * const result = await client.magnet.uploadFile(file)
397
+ *
398
+ * // Or with a Blob and custom filename
399
+ * const blob = new Blob([buffer])
400
+ * const result = await client.magnet.uploadFile(blob, 'my-torrent.torrent')
401
+ * ```
402
+ */
403
+ uploadFile(file: Blob | File, filename?: string): Promise<{
404
+ files?: Array<{
405
+ file?: string;
406
+ hash?: string;
407
+ name?: string;
408
+ size?: number;
409
+ ready?: boolean;
410
+ id?: number;
411
+ error?: {
412
+ code?: string;
413
+ message?: string;
414
+ };
415
+ }>;
416
+ } | undefined>;
417
+ /**
418
+ * Get the status of one or more magnets
419
+ *
420
+ * @param id - Optional magnet ID to get status for a specific magnet
421
+ *
422
+ * @example
423
+ * ```ts
424
+ * // Get all magnets status
425
+ * const allStatus = await client.magnet.status()
426
+ *
427
+ * // Get specific magnet status
428
+ * const status = await client.magnet.status('123')
429
+ * console.log(status.magnets[0]?.status) // 'Downloading', 'Ready', etc.
430
+ * ```
431
+ */
432
+ status(id?: string): Promise<{
433
+ magnets?: Array<{
434
+ id?: number;
435
+ filename?: string;
436
+ size?: number;
437
+ status?: string;
438
+ statusCode?: number;
439
+ downloaded?: number;
440
+ uploaded?: number;
441
+ seeders?: number;
442
+ downloadSpeed?: number;
443
+ uploadSpeed?: number;
444
+ uploadDate?: number;
445
+ completionDate?: number;
446
+ links?: Array<{
447
+ link?: string;
448
+ filename?: string;
449
+ size?: number;
450
+ }>;
451
+ }>;
452
+ } | undefined>;
453
+ /**
454
+ * Delete a magnet
455
+ *
456
+ * @param id - The magnet ID to delete (string)
457
+ *
458
+ * @example
459
+ * ```ts
460
+ * await client.magnet.delete('123')
461
+ * ```
462
+ */
463
+ delete(id: string): Promise<{
464
+ message?: string;
465
+ } | undefined>;
466
+ /**
467
+ * Restart one or more failed magnets
468
+ *
469
+ * @param ids - Single magnet ID or array of magnet IDs to restart (strings)
470
+ *
471
+ * @example
472
+ * ```ts
473
+ * // Restart single magnet
474
+ * await client.magnet.restart('123')
475
+ *
476
+ * // Restart multiple magnets
477
+ * await client.magnet.restart(['123', '456'])
478
+ * ```
479
+ */
480
+ restart(ids: string | string[]): Promise<{
481
+ magnets?: Array<{
482
+ magnet?: string;
483
+ message?: string;
484
+ error?: {
485
+ code?: string;
486
+ message?: string;
487
+ };
488
+ }>;
489
+ } | undefined>;
490
+ /**
491
+ * Check instant availability of magnets
492
+ *
493
+ * @param magnets - Single magnet hash or array of hashes
494
+ *
495
+ * @example
496
+ * ```ts
497
+ * const available = await client.magnet.instant(['hash1', 'hash2'])
498
+ * console.log(available.magnets)
499
+ * ```
500
+ */
501
+ instant(magnets: string | string[]): Promise<{
502
+ magnets?: Array<{
503
+ magnet?: string;
504
+ hash?: string;
505
+ instant?: boolean;
506
+ error?: {
507
+ code?: string;
508
+ message?: string;
509
+ };
510
+ }>;
511
+ } | undefined>;
512
+ /**
513
+ * Watch a magnet's status with automatic polling
514
+ *
515
+ * @param id - The magnet ID to watch (string)
516
+ * @param options - Watch options
517
+ *
518
+ * @example
519
+ * ```ts
520
+ * await client.magnet.watch('123', {
521
+ * onUpdate: (status) => console.log('Status:', status.magnets[0]?.status),
522
+ * stopOnStatus: 'Ready'
523
+ * })
524
+ * ```
525
+ */
526
+ watch(id: string, options?: WatchOptions): Promise<{
527
+ magnets?: Array<{
528
+ id?: number;
529
+ filename?: string;
530
+ size?: number;
531
+ status?: string;
532
+ statusCode?: number;
533
+ downloaded?: number;
534
+ uploaded?: number;
535
+ seeders?: number;
536
+ downloadSpeed?: number;
537
+ uploadSpeed?: number;
538
+ uploadDate?: number;
539
+ completionDate?: number;
540
+ links?: Array<{
541
+ link?: string;
542
+ filename?: string;
543
+ size?: number;
544
+ }>;
545
+ }>;
546
+ } | undefined>;
547
+ }
548
+
549
+ /**
550
+ * User resource for managing user account information
551
+ */
552
+ declare class UserResource extends BaseResource {
553
+ /**
554
+ * Get user profile information including premium status and quotas
555
+ *
556
+ * @example
557
+ * ```ts
558
+ * const user = await client.user.getInfo()
559
+ * console.log(user.username, user.isPremium)
560
+ * ```
561
+ */
562
+ getInfo(): Promise<{
563
+ username?: string;
564
+ email?: string;
565
+ isPremium?: boolean;
566
+ isSubscribed?: boolean;
567
+ isTrial?: boolean;
568
+ premiumUntil?: number;
569
+ lang?: string;
570
+ preferedDomain?: string;
571
+ fidelityPoints?: number;
572
+ limitedHostersQuotas?: {
573
+ [key: string]: (number);
574
+ };
575
+ notifications?: Array<(string)>;
576
+ } | undefined>;
577
+ /**
578
+ * Get available hosts for the current user based on their subscription
579
+ *
580
+ * @param hostOnly - If true, only return hosts data (exclude streams and redirectors)
581
+ *
582
+ * @example
583
+ * ```ts
584
+ * const hosts = await client.user.getHosts()
585
+ * console.log(Object.keys(hosts.hosts))
586
+ * ```
587
+ */
588
+ getHosts(hostOnly?: boolean): Promise<{
589
+ hosts?: {
590
+ [key: string]: {
591
+ name?: string;
592
+ type?: string;
593
+ domains?: Array<(string)>;
594
+ regexp?: string;
595
+ regexps?: Array<(string)>;
596
+ status?: boolean;
597
+ };
598
+ };
599
+ streams?: {
600
+ [key: string]: {
601
+ name?: string;
602
+ type?: string;
603
+ domains?: Array<(string)>;
604
+ regexp?: string;
605
+ regexps?: Array<(string)>;
606
+ status?: boolean;
607
+ };
608
+ };
609
+ redirectors?: {
610
+ [key: string]: {
611
+ name?: string;
612
+ type?: string;
613
+ domains?: Array<(string)>;
614
+ regexp?: string;
615
+ regexps?: Array<(string)>;
616
+ status?: boolean;
617
+ };
618
+ };
619
+ } | undefined>;
620
+ /**
621
+ * Clear a specific notification by code
622
+ *
623
+ * @param code - The notification code to clear
624
+ *
625
+ * @example
626
+ * ```ts
627
+ * await client.user.clearNotification('SOME_NOTIF_CODE')
628
+ * ```
629
+ */
630
+ clearNotification(code: string): Promise<void>;
631
+ /**
632
+ * Get all saved links
633
+ *
634
+ * @example
635
+ * ```ts
636
+ * const savedLinks = await client.user.getLinks()
637
+ * console.log(savedLinks.links)
638
+ * ```
639
+ */
640
+ getLinks(): Promise<{
641
+ links?: Array<{
642
+ link?: string;
643
+ filename?: string;
644
+ size?: number;
645
+ date?: number;
646
+ host?: string;
647
+ }>;
648
+ } | undefined>;
649
+ /**
650
+ * Save a link for later use
651
+ *
652
+ * @param link - The link to save
653
+ *
654
+ * @example
655
+ * ```ts
656
+ * await client.user.saveLink('https://example.com/file.zip')
657
+ * ```
658
+ */
659
+ saveLink(link: string): Promise<{
660
+ message?: string;
661
+ } | undefined>;
662
+ /**
663
+ * Delete a saved link
664
+ *
665
+ * @param link - The link to delete (can be the saved link ID or URL)
666
+ *
667
+ * @example
668
+ * ```ts
669
+ * await client.user.deleteLink('saved-link-id')
670
+ * ```
671
+ */
672
+ deleteLink(link: string): Promise<{
673
+ message?: string;
674
+ } | undefined>;
675
+ /**
676
+ * Get user history (if enabled in account settings)
677
+ *
678
+ * @example
679
+ * ```ts
680
+ * const history = await client.user.getHistory()
681
+ * console.log(history.links)
682
+ * ```
683
+ */
684
+ getHistory(): Promise<{
685
+ links?: Array<{
686
+ link?: string;
687
+ filename?: string;
688
+ size?: number;
689
+ date?: number;
690
+ host?: string;
691
+ }>;
692
+ } | undefined>;
693
+ /**
694
+ * Clear user history
695
+ *
696
+ * @example
697
+ * ```ts
698
+ * await client.user.clearHistory()
699
+ * ```
700
+ */
701
+ clearHistory(): Promise<{
702
+ message?: string;
703
+ } | undefined>;
704
+ }
705
+
706
+ /**
707
+ * Main AllDebrid client class
708
+ */
709
+ declare class AllDebridClient {
710
+ private readonly config;
711
+ /**
712
+ * User resource for managing user account
713
+ */
714
+ readonly user: UserResource;
715
+ /**
716
+ * Link resource for unlocking and managing download links
717
+ */
718
+ readonly link: LinkResource;
719
+ /**
720
+ * Magnet resource for managing torrents
721
+ */
722
+ readonly magnet: MagnetResource;
723
+ /**
724
+ * Host resource for getting information about supported hosts
725
+ */
726
+ readonly host: HostResource;
727
+ constructor(config: AllDebridConfig);
728
+ /**
729
+ * Build query string from params
730
+ */
731
+ private buildUrl;
732
+ /**
733
+ * Make a GET request
734
+ * @param T - The generated response type (e.g., GetLinkUnlockResponse)
735
+ * @returns The extracted data from the response (without the { status, data } wrapper)
736
+ */
737
+ protected get<T>(path: string, params?: Record<string, unknown>): Promise<ExtractData<T>>;
738
+ /**
739
+ * Make a POST request
740
+ * @param T - The generated response type
741
+ * @returns The extracted data from the response (without the { status, data } wrapper)
742
+ */
743
+ protected post<T>(path: string, body?: unknown, params?: Record<string, unknown>): Promise<ExtractData<T>>;
744
+ /**
745
+ * Make a POST request with FormData (multipart/form-data)
746
+ * @param T - The generated response type
747
+ * @returns The extracted data from the response (without the { status, data } wrapper)
748
+ */
749
+ protected postFormData<T>(path: string, formData: FormData, params?: Record<string, unknown>): Promise<ExtractData<T>>;
750
+ /**
751
+ * Test the API connection
752
+ */
753
+ ping(): Promise<boolean>;
754
+ }
755
+
756
+ /**
757
+ * Base error class for AllDebrid SDK errors
758
+ */
759
+ declare class AllDebridError extends Error {
760
+ readonly code: string;
761
+ readonly isAllDebridError = true;
762
+ constructor(code: string, message: string);
763
+ /**
764
+ * Create an AllDebridError from an API error response
765
+ */
766
+ static fromApiError(error: ApiError): AllDebridError;
767
+ }
768
+ /**
769
+ * Authentication related errors
770
+ */
771
+ declare class AuthenticationError extends AllDebridError {
772
+ constructor(code: string, message: string);
773
+ }
774
+ /**
775
+ * Link processing errors
776
+ */
777
+ declare class LinkError extends AllDebridError {
778
+ constructor(code: string, message: string);
779
+ }
780
+ /**
781
+ * Magnet/Torrent related errors
782
+ */
783
+ declare class MagnetError extends AllDebridError {
784
+ constructor(code: string, message: string);
785
+ }
786
+ /**
787
+ * Network/HTTP errors
788
+ */
789
+ declare class NetworkError extends AllDebridError {
790
+ readonly statusCode?: number | undefined;
791
+ constructor(message: string, statusCode?: number | undefined);
792
+ }
793
+ /**
794
+ * Helper to determine error type from error code
795
+ */
796
+ declare function createTypedError(code: string, message: string): AllDebridError;
797
+
798
+ /**
799
+ * You can find all possible errors here, available in PHP array and JSON format if needed.<br /> Some errors will return an HTTP code 401 or 429, depending of the error.<br />
800
+ */
801
+ type ErrorCodes = 'GENERIC' | 404 | 'AUTH_MISSING_AGENT' | 'AUTH_BAD_AGENT' | 'AUTH_MISSING_APIKEY' | 'AUTH_BAD_APIKEY' | 'AUTH_BLOCKED' | 'AUTH_USER_BANNED' | 'LINK_IS_MISSING' | 'LINK_HOST_NOT_SUPPORTED' | 'LINK_DOWN' | 'LINK_PASS_PROTECTED' | 'LINK_HOST_UNAVAILABLE' | 'LINK_TOO_MANY_DOWNLOADS' | 'LINK_HOST_FULL' | 'LINK_HOST_LIMIT_REACHED' | 'LINK_ERROR' | 'REDIRECTOR_NOT_SUPPORTED' | 'REDIRECTOR_ERROR' | 'STREAM_INVALID_GEN_ID' | 'STREAM_INVALID_STREAM_ID' | 'DELAYED_INVALID_ID' | 'FREE_TRIAL_LIMIT_REACHED' | 'MUST_BE_PREMIUM' | 'MAGNET_INVALID_ID' | 'MAGNET_INVALID_URI' | 'MAGNET_INVALID_FILE' | 'MAGNET_FILE_UPLOAD_FAILED' | 'MAGNET_NO_URI' | 'MAGNET_PROCESSING' | 'MAGNET_TOO_MANY_ACTIVE' | 'MAGNET_MUST_BE_PREMIUM' | 'MAGNET_NO_SERVER' | 'MAGNET_TOO_LARGE' | 'PIN_ALREADY_AUTHED' | 'PIN_EXPIRED' | 'PIN_INVALID' | 'USER_LINK_MISSING' | 'USER_LINK_INVALID' | 'NO_SERVER' | 'MISSING_NOTIF_ENDPOINT';
802
+ type GetHostsData = {
803
+ query: {
804
+ /**
805
+ * Your software user-agent.
806
+ */
807
+ agent: string;
808
+ /**
809
+ * Endpoint will only return "hosts" data
810
+ */
811
+ hostOnly?: string;
812
+ };
813
+ };
814
+ type GetHostsResponse = ({
815
+ status?: string;
816
+ data?: {
817
+ hosts?: {
818
+ [key: string]: {
819
+ name?: string;
820
+ type?: string;
821
+ domains?: Array<(string)>;
822
+ regexp?: string;
823
+ regexps?: Array<(string)>;
824
+ status?: boolean;
825
+ };
826
+ };
827
+ streams?: {
828
+ [key: string]: {
829
+ name?: string;
830
+ type?: string;
831
+ domains?: Array<(string)>;
832
+ regexp?: string;
833
+ regexps?: Array<(string)>;
834
+ status?: boolean;
835
+ };
836
+ };
837
+ redirectors?: {
838
+ [key: string]: {
839
+ name?: string;
840
+ type?: string;
841
+ domains?: Array<(string)>;
842
+ regexp?: string;
843
+ regexps?: Array<(string)>;
844
+ status?: boolean;
845
+ };
846
+ };
847
+ };
848
+ error?: {
849
+ code?: string;
850
+ message?: string;
851
+ };
852
+ });
853
+ type GetHostsError = unknown;
854
+ type GetHostsDomainsData = {
855
+ query: {
856
+ /**
857
+ * Your software user-agent.
858
+ */
859
+ agent: string;
860
+ };
861
+ };
862
+ type GetHostsDomainsResponse = ({
863
+ status?: string;
864
+ data?: {
865
+ hosts?: Array<(string)>;
866
+ streams?: Array<(string)>;
867
+ redirectors?: Array<(string)>;
868
+ };
869
+ error?: {
870
+ code?: string;
871
+ message?: string;
872
+ };
873
+ });
874
+ type GetHostsDomainsError = unknown;
875
+ type GetHostsPriorityData = {
876
+ query: {
877
+ /**
878
+ * Your software user-agent.
879
+ */
880
+ agent: string;
881
+ };
882
+ };
883
+ type GetHostsPriorityResponse = ({
884
+ status?: string;
885
+ data?: {
886
+ hosts?: {
887
+ [key: string]: (number);
888
+ };
889
+ };
890
+ error?: {
891
+ code?: string;
892
+ message?: string;
893
+ };
894
+ });
895
+ type GetHostsPriorityError = unknown;
896
+ type GetUserData = {
897
+ query: {
898
+ /**
899
+ * Your software user-agent.
900
+ */
901
+ agent: string;
902
+ /**
903
+ * Deprecated User apikey (Use Bearer Auth in header).
904
+ */
905
+ apikey?: string;
906
+ };
907
+ };
908
+ type GetUserResponse = ({
909
+ status?: string;
910
+ data?: {
911
+ user?: {
912
+ username?: string;
913
+ email?: string;
914
+ isPremium?: boolean;
915
+ isSubscribed?: boolean;
916
+ isTrial?: boolean;
917
+ premiumUntil?: number;
918
+ lang?: string;
919
+ preferedDomain?: string;
920
+ fidelityPoints?: number;
921
+ limitedHostersQuotas?: {
922
+ [key: string]: (number);
923
+ };
924
+ notifications?: Array<(string)>;
925
+ };
926
+ };
927
+ error?: {
928
+ code?: string;
929
+ message?: string;
930
+ };
931
+ });
932
+ type GetUserError = unknown;
933
+ type GetUserHostsData = {
934
+ query: {
935
+ /**
936
+ * Your software user-agent.
937
+ */
938
+ agent: string;
939
+ /**
940
+ * Deprecated User apikey (Use Bearer Auth in header).
941
+ */
942
+ apikey?: string;
943
+ /**
944
+ * Endpoint will only return "hosts" data
945
+ */
946
+ hostOnly?: string;
947
+ };
948
+ };
949
+ type GetUserHostsResponse = ({
950
+ status?: string;
951
+ data?: {
952
+ hosts?: {
953
+ [key: string]: {
954
+ name?: string;
955
+ type?: string;
956
+ domains?: Array<(string)>;
957
+ regexp?: string;
958
+ regexps?: Array<(string)>;
959
+ status?: boolean;
960
+ };
961
+ };
962
+ streams?: {
963
+ [key: string]: {
964
+ name?: string;
965
+ type?: string;
966
+ domains?: Array<(string)>;
967
+ regexp?: string;
968
+ regexps?: Array<(string)>;
969
+ status?: boolean;
970
+ };
971
+ };
972
+ redirectors?: {
973
+ [key: string]: {
974
+ name?: string;
975
+ type?: string;
976
+ domains?: Array<(string)>;
977
+ regexp?: string;
978
+ regexps?: Array<(string)>;
979
+ status?: boolean;
980
+ };
981
+ };
982
+ };
983
+ error?: {
984
+ code?: string;
985
+ message?: string;
986
+ };
987
+ });
988
+ type GetUserHostsError = unknown;
989
+ type GetUserNotificationClearData = {
990
+ query: {
991
+ /**
992
+ * Your software user-agent.
993
+ */
994
+ agent: string;
995
+ /**
996
+ * Deprecated User apikey (Use Bearer Auth in header).
997
+ */
998
+ apikey?: string;
999
+ /**
1000
+ * Notification code to clear
1001
+ */
1002
+ code: string;
1003
+ };
1004
+ };
1005
+ type GetUserNotificationClearResponse = ({
1006
+ status?: string;
1007
+ data?: {
1008
+ message?: string;
1009
+ };
1010
+ error?: {
1011
+ code?: string;
1012
+ message?: string;
1013
+ };
1014
+ });
1015
+ type GetUserNotificationClearError = unknown;
1016
+ type GetLinkInfosData = {
1017
+ query: {
1018
+ /**
1019
+ * Your software user-agent.
1020
+ */
1021
+ agent: string;
1022
+ /**
1023
+ * Deprecated User apikey (Use Bearer Auth in header).
1024
+ */
1025
+ apikey?: string;
1026
+ /**
1027
+ * The link or array of links you request informations about.
1028
+ */
1029
+ 'link[]': Array<(string)>;
1030
+ /**
1031
+ * Link password (supported on uptobox / 1fichier).
1032
+ */
1033
+ password?: string;
1034
+ };
1035
+ };
1036
+ type GetLinkInfosResponse = ({
1037
+ status?: string;
1038
+ data?: {
1039
+ /**
1040
+ * Array of info objects
1041
+ */
1042
+ infos?: Array<{
1043
+ /**
1044
+ * Requested link
1045
+ */
1046
+ link?: string;
1047
+ /**
1048
+ * Link's file filename.
1049
+ */
1050
+ filename?: string;
1051
+ /**
1052
+ * Link's file size in bytes.
1053
+ */
1054
+ size?: number;
1055
+ /**
1056
+ * Link host.
1057
+ */
1058
+ host?: string;
1059
+ /**
1060
+ * Host main domain
1061
+ */
1062
+ hostDomain?: string;
1063
+ }>;
1064
+ };
1065
+ error?: {
1066
+ code?: string;
1067
+ message?: string;
1068
+ };
1069
+ });
1070
+ type GetLinkInfosError = unknown;
1071
+ type GetLinkRedirectorData = {
1072
+ query: {
1073
+ /**
1074
+ * Your software user-agent.
1075
+ */
1076
+ agent: string;
1077
+ /**
1078
+ * Deprecated User apikey (Use Bearer Auth in header).
1079
+ */
1080
+ apikey?: string;
1081
+ /**
1082
+ * The redirector or protector link to extract links.
1083
+ */
1084
+ link: string;
1085
+ };
1086
+ };
1087
+ type GetLinkRedirectorResponse = ({
1088
+ status?: string;
1089
+ data?: {
1090
+ /**
1091
+ * Link(s) extracted.
1092
+ */
1093
+ links?: Array<(string)>;
1094
+ };
1095
+ error?: {
1096
+ code?: string;
1097
+ message?: string;
1098
+ };
1099
+ });
1100
+ type GetLinkRedirectorError = unknown;
1101
+ type GetLinkUnlockData = {
1102
+ query: {
1103
+ /**
1104
+ * Your software user-agent.
1105
+ */
1106
+ agent: string;
1107
+ /**
1108
+ * Deprecated User apikey (Use Bearer Auth in header).
1109
+ */
1110
+ apikey?: string;
1111
+ /**
1112
+ * The redirector or protector link to extract links.
1113
+ */
1114
+ link: string;
1115
+ /**
1116
+ * Link password (supported on uptobox / 1fichier).
1117
+ */
1118
+ password?: string;
1119
+ };
1120
+ };
1121
+ type GetLinkUnlockResponse = ({
1122
+ status?: string;
1123
+ data?: {
1124
+ filename?: string;
1125
+ filesize?: number;
1126
+ host?: string;
1127
+ hostDomain?: string;
1128
+ id?: string;
1129
+ link?: string;
1130
+ paws?: boolean;
1131
+ streams?: Array<{
1132
+ id?: string;
1133
+ ext?: string;
1134
+ quality?: string;
1135
+ filesize?: number;
1136
+ proto?: string;
1137
+ name?: string;
1138
+ link?: string;
1139
+ tb?: number;
1140
+ abr?: number;
1141
+ }>;
1142
+ };
1143
+ error?: {
1144
+ code?: string;
1145
+ message?: string;
1146
+ };
1147
+ });
1148
+ type GetLinkUnlockError = unknown;
1149
+ type GetLinkStreamingData = {
1150
+ query: {
1151
+ /**
1152
+ * Your software user-agent.
1153
+ */
1154
+ agent: string;
1155
+ /**
1156
+ * Deprecated User apikey (Use Bearer Auth in header).
1157
+ */
1158
+ apikey?: string;
1159
+ /**
1160
+ * The link ID you received from the /link/unlock call.
1161
+ */
1162
+ id: string;
1163
+ /**
1164
+ * The stream ID you choosed from the stream qualities list returned by /link/unlock.
1165
+ */
1166
+ stream: string;
1167
+ };
1168
+ };
1169
+ type GetLinkStreamingResponse = ({
1170
+ status?: string;
1171
+ data?: {
1172
+ filename?: string;
1173
+ filesize?: number;
1174
+ host?: string;
1175
+ hostDomain?: string;
1176
+ id?: string;
1177
+ link?: string;
1178
+ paws?: boolean;
1179
+ streams?: Array<{
1180
+ id?: string;
1181
+ ext?: string;
1182
+ quality?: string;
1183
+ filesize?: number;
1184
+ proto?: string;
1185
+ name?: string;
1186
+ link?: string;
1187
+ tb?: number;
1188
+ abr?: number;
1189
+ }>;
1190
+ };
1191
+ error?: {
1192
+ code?: string;
1193
+ message?: string;
1194
+ };
1195
+ });
1196
+ type GetLinkStreamingError = unknown;
1197
+ type GetLinkDelayedData = {
1198
+ query: {
1199
+ /**
1200
+ * Your software user-agent.
1201
+ */
1202
+ agent: string;
1203
+ /**
1204
+ * Deprecated User apikey (Use Bearer Auth in header).
1205
+ */
1206
+ apikey?: string;
1207
+ /**
1208
+ * Delayed ID received in /link/unlock.
1209
+ */
1210
+ id: string;
1211
+ };
1212
+ };
1213
+ type GetLinkDelayedResponse = ({
1214
+ status?: string;
1215
+ data?: {
1216
+ status?: number;
1217
+ time_left?: number;
1218
+ link?: string;
1219
+ };
1220
+ error?: {
1221
+ code?: string;
1222
+ message?: string;
1223
+ };
1224
+ });
1225
+ type GetLinkDelayedError = unknown;
1226
+ type GetMagnetUploadData = {
1227
+ query: {
1228
+ /**
1229
+ * Your software user-agent.
1230
+ */
1231
+ agent: string;
1232
+ /**
1233
+ * Deprecated User apikey (Use Bearer Auth in header).
1234
+ */
1235
+ apikey?: string;
1236
+ /**
1237
+ * Magnet(s) URI or hash. Must send magnet either in GET param or in POST data.
1238
+ */
1239
+ 'magnets[]': Array<(string)>;
1240
+ };
1241
+ };
1242
+ type GetMagnetUploadResponse = ({
1243
+ status?: string;
1244
+ data?: {
1245
+ magnets?: Array<{
1246
+ magnet?: string;
1247
+ hash?: string;
1248
+ name?: string;
1249
+ size?: number;
1250
+ ready?: boolean;
1251
+ id?: number;
1252
+ error?: {
1253
+ code?: string;
1254
+ message?: string;
1255
+ };
1256
+ }>;
1257
+ };
1258
+ error?: {
1259
+ code?: string;
1260
+ message?: string;
1261
+ };
1262
+ });
1263
+ type GetMagnetUploadError = unknown;
1264
+ type PostMagnetUploadFileData = {
1265
+ body?: {
1266
+ '[]file'?: (Blob | File);
1267
+ };
1268
+ query: {
1269
+ /**
1270
+ * Your software user-agent.
1271
+ */
1272
+ agent: string;
1273
+ /**
1274
+ * Deprecated User apikey (Use Bearer Auth in header).
1275
+ */
1276
+ apikey?: string;
1277
+ };
1278
+ };
1279
+ type PostMagnetUploadFileResponse = ({
1280
+ status?: string;
1281
+ data?: {
1282
+ files?: Array<{
1283
+ file?: string;
1284
+ hash?: string;
1285
+ name?: string;
1286
+ size?: number;
1287
+ ready?: boolean;
1288
+ id?: number;
1289
+ error?: {
1290
+ code?: string;
1291
+ message?: string;
1292
+ };
1293
+ }>;
1294
+ };
1295
+ error?: {
1296
+ code?: string;
1297
+ message?: string;
1298
+ };
1299
+ });
1300
+ type PostMagnetUploadFileError = unknown;
1301
+ type GetMagnetStatusData = {
1302
+ query: {
1303
+ /**
1304
+ * Your software user-agent.
1305
+ */
1306
+ agent: string;
1307
+ /**
1308
+ * Deprecated User apikey (Use Bearer Auth in header).
1309
+ */
1310
+ apikey?: string;
1311
+ /**
1312
+ * Counter for Live mode (see Live Mode).
1313
+ */
1314
+ counter?: string;
1315
+ /**
1316
+ * Magnet ID.
1317
+ */
1318
+ id?: string;
1319
+ /**
1320
+ * Session ID for Live mode (see Live Mode).
1321
+ */
1322
+ session?: string;
1323
+ /**
1324
+ * Magnets status filter. Either active, ready, expired or error
1325
+ */
1326
+ status?: string;
1327
+ };
1328
+ };
1329
+ type GetMagnetStatusResponse = ({
1330
+ status?: string;
1331
+ data?: {
1332
+ magnets?: Array<{
1333
+ id?: number;
1334
+ filename?: string;
1335
+ size?: number;
1336
+ status?: string;
1337
+ statusCode?: number;
1338
+ downloaded?: number;
1339
+ uploaded?: number;
1340
+ seeders?: number;
1341
+ downloadSpeed?: number;
1342
+ uploadSpeed?: number;
1343
+ uploadDate?: number;
1344
+ completionDate?: number;
1345
+ links?: Array<{
1346
+ link?: string;
1347
+ filename?: string;
1348
+ size?: number;
1349
+ }>;
1350
+ }>;
1351
+ };
1352
+ error?: {
1353
+ code?: string;
1354
+ message?: string;
1355
+ };
1356
+ });
1357
+ type GetMagnetStatusError = unknown;
1358
+ type GetMagnetDeleteData = {
1359
+ query: {
1360
+ /**
1361
+ * Your software user-agent.
1362
+ */
1363
+ agent: string;
1364
+ /**
1365
+ * Deprecated User apikey (Use Bearer Auth in header).
1366
+ */
1367
+ apikey?: string;
1368
+ /**
1369
+ * Magnet ID.
1370
+ */
1371
+ id: string;
1372
+ };
1373
+ };
1374
+ type GetMagnetDeleteResponse = ({
1375
+ status?: string;
1376
+ data?: {
1377
+ message?: string;
1378
+ };
1379
+ error?: {
1380
+ code?: string;
1381
+ message?: string;
1382
+ };
1383
+ });
1384
+ type GetMagnetDeleteError = unknown;
1385
+ type GetMagnetRestartData = {
1386
+ query: {
1387
+ /**
1388
+ * Your software user-agent.
1389
+ */
1390
+ agent: string;
1391
+ /**
1392
+ * Deprecated User apikey (Use Bearer Auth in header).
1393
+ */
1394
+ apikey?: string;
1395
+ /**
1396
+ * Array of Magnet ID.
1397
+ */
1398
+ ids: Array<(string)>;
1399
+ };
1400
+ };
1401
+ type GetMagnetRestartResponse = ({
1402
+ status?: string;
1403
+ data?: {
1404
+ magnets?: Array<{
1405
+ magnet?: string;
1406
+ message?: string;
1407
+ error?: {
1408
+ code?: string;
1409
+ message?: string;
1410
+ };
1411
+ }>;
1412
+ };
1413
+ error?: {
1414
+ code?: string;
1415
+ message?: string;
1416
+ };
1417
+ });
1418
+ type GetMagnetRestartError = unknown;
1419
+ type GetMagnetInstantData = {
1420
+ query: {
1421
+ /**
1422
+ * Your software user-agent.
1423
+ */
1424
+ agent: string;
1425
+ /**
1426
+ * Deprecated User apikey (Use Bearer Auth in header).
1427
+ */
1428
+ apikey?: string;
1429
+ /**
1430
+ * Magnets URI or hash you wish to check instant availability, can be one or many links
1431
+ */
1432
+ 'magnets[]': Array<(string)>;
1433
+ };
1434
+ };
1435
+ type GetMagnetInstantResponse = ({
1436
+ status?: string;
1437
+ data?: {
1438
+ magnets?: Array<{
1439
+ magnet?: string;
1440
+ hash?: string;
1441
+ instant?: boolean;
1442
+ error?: {
1443
+ code?: string;
1444
+ message?: string;
1445
+ };
1446
+ }>;
1447
+ };
1448
+ error?: {
1449
+ code?: string;
1450
+ message?: string;
1451
+ };
1452
+ });
1453
+ type GetMagnetInstantError = unknown;
1454
+ type GetUserLinksData = {
1455
+ query: {
1456
+ /**
1457
+ * Your software user-agent.
1458
+ */
1459
+ agent: string;
1460
+ /**
1461
+ * Deprecated User apikey (Use Bearer Auth in header).
1462
+ */
1463
+ apikey?: string;
1464
+ };
1465
+ };
1466
+ type GetUserLinksResponse = ({
1467
+ status?: string;
1468
+ data?: {
1469
+ links?: Array<{
1470
+ link?: string;
1471
+ filename?: string;
1472
+ size?: number;
1473
+ date?: number;
1474
+ host?: string;
1475
+ }>;
1476
+ };
1477
+ error?: {
1478
+ code?: string;
1479
+ message?: string;
1480
+ };
1481
+ });
1482
+ type GetUserLinksError = unknown;
1483
+ type GetUserLinksSaveData = {
1484
+ query: {
1485
+ /**
1486
+ * Your software user-agent.
1487
+ */
1488
+ agent: string;
1489
+ /**
1490
+ * Deprecated User apikey (Use Bearer Auth in header).
1491
+ */
1492
+ apikey?: string;
1493
+ /**
1494
+ * Links to save.
1495
+ */
1496
+ 'link[]': Array<(string)>;
1497
+ };
1498
+ };
1499
+ type GetUserLinksSaveResponse = ({
1500
+ status?: string;
1501
+ data?: {
1502
+ message?: string;
1503
+ };
1504
+ error?: {
1505
+ code?: string;
1506
+ message?: string;
1507
+ };
1508
+ });
1509
+ type GetUserLinksSaveError = unknown;
1510
+ type GetUserLinksDeleteData = {
1511
+ query: {
1512
+ /**
1513
+ * Your software user-agent.
1514
+ */
1515
+ agent: string;
1516
+ /**
1517
+ * Deprecated User apikey (Use Bearer Auth in header).
1518
+ */
1519
+ apikey?: string;
1520
+ /**
1521
+ * Link to delete.
1522
+ */
1523
+ link?: string;
1524
+ /**
1525
+ * Links to delete.
1526
+ */
1527
+ 'link[]'?: Array<(string)>;
1528
+ };
1529
+ };
1530
+ type GetUserLinksDeleteResponse = ({
1531
+ status?: string;
1532
+ data?: {
1533
+ message?: string;
1534
+ };
1535
+ error?: {
1536
+ code?: string;
1537
+ message?: string;
1538
+ };
1539
+ });
1540
+ type GetUserLinksDeleteError = unknown;
1541
+ type GetUserHistoryData = {
1542
+ query: {
1543
+ /**
1544
+ * Your software user-agent.
1545
+ */
1546
+ agent: string;
1547
+ /**
1548
+ * Deprecated User apikey (Use Bearer Auth in header).
1549
+ */
1550
+ apikey?: string;
1551
+ };
1552
+ };
1553
+ type GetUserHistoryResponse = ({
1554
+ status?: string;
1555
+ data?: {
1556
+ links?: Array<{
1557
+ link?: string;
1558
+ filename?: string;
1559
+ size?: number;
1560
+ date?: number;
1561
+ host?: string;
1562
+ }>;
1563
+ };
1564
+ error?: {
1565
+ code?: string;
1566
+ message?: string;
1567
+ };
1568
+ });
1569
+ type GetUserHistoryError = unknown;
1570
+ type GetUserHistoryDeleteData = {
1571
+ query: {
1572
+ /**
1573
+ * Your software user-agent.
1574
+ */
1575
+ agent: string;
1576
+ /**
1577
+ * Deprecated User apikey (Use Bearer Auth in header).
1578
+ */
1579
+ apikey?: string;
1580
+ };
1581
+ };
1582
+ type GetUserHistoryDeleteResponse = ({
1583
+ status?: string;
1584
+ data?: {
1585
+ message?: string;
1586
+ };
1587
+ error?: {
1588
+ code?: string;
1589
+ message?: string;
1590
+ };
1591
+ });
1592
+ type GetUserHistoryDeleteError = unknown;
1593
+
1594
+ export { AllDebridClient, type AllDebridConfig, AllDebridError, type ApiError, type ApiResponse, AuthenticationError, type ErrorCodes, type GetHostsData, type GetHostsDomainsData, type GetHostsDomainsError, type GetHostsDomainsResponse, type GetHostsError, type GetHostsPriorityData, type GetHostsPriorityError, type GetHostsPriorityResponse, type GetHostsResponse, type GetLinkDelayedData, type GetLinkDelayedError, type GetLinkDelayedResponse, type GetLinkInfosData, type GetLinkInfosError, type GetLinkInfosResponse, type GetLinkRedirectorData, type GetLinkRedirectorError, type GetLinkRedirectorResponse, type GetLinkStreamingData, type GetLinkStreamingError, type GetLinkStreamingResponse, type GetLinkUnlockData, type GetLinkUnlockError, type GetLinkUnlockResponse, type GetMagnetDeleteData, type GetMagnetDeleteError, type GetMagnetDeleteResponse, type GetMagnetInstantData, type GetMagnetInstantError, type GetMagnetInstantResponse, type GetMagnetRestartData, type GetMagnetRestartError, type GetMagnetRestartResponse, type GetMagnetStatusData, type GetMagnetStatusError, type GetMagnetStatusResponse, type GetMagnetUploadData, type GetMagnetUploadError, type GetMagnetUploadResponse, type GetUserData, type GetUserError, type GetUserHistoryData, type GetUserHistoryDeleteData, type GetUserHistoryDeleteError, type GetUserHistoryDeleteResponse, type GetUserHistoryError, type GetUserHistoryResponse, type GetUserHostsData, type GetUserHostsError, type GetUserHostsResponse, type GetUserLinksData, type GetUserLinksDeleteData, type GetUserLinksDeleteError, type GetUserLinksDeleteResponse, type GetUserLinksError, type GetUserLinksResponse, type GetUserLinksSaveData, type GetUserLinksSaveError, type GetUserLinksSaveResponse, type GetUserNotificationClearData, type GetUserNotificationClearError, type GetUserNotificationClearResponse, type GetUserResponse, HostResource, LinkError, LinkResource, MagnetError, MagnetResource, NetworkError, type PollOptions, type PostMagnetUploadFileData, type PostMagnetUploadFileError, type PostMagnetUploadFileResponse, UserResource, type WatchOptions, createTypedError };