tsarr 2.4.12 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -3
- package/dist/cli/commands/config.d.ts.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/lidarr.d.ts.map +1 -1
- package/dist/cli/commands/qbit.d.ts +4 -0
- package/dist/cli/commands/qbit.d.ts.map +1 -0
- package/dist/cli/commands/radarr.d.ts.map +1 -1
- package/dist/cli/commands/readarr.d.ts.map +1 -1
- package/dist/cli/commands/service.d.ts +1 -2
- package/dist/cli/commands/service.d.ts.map +1 -1
- package/dist/cli/commands/sonarr.d.ts.map +1 -1
- package/dist/cli/config.d.ts +6 -4
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/index.js +2009 -235
- package/dist/clients/bazarr.js +7 -7
- package/dist/clients/lidarr.d.ts +79 -1
- package/dist/clients/lidarr.d.ts.map +1 -1
- package/dist/clients/lidarr.js +100 -7
- package/dist/clients/prowlarr.js +7 -7
- package/dist/clients/qbittorrent-types.d.ts +2 -0
- package/dist/clients/qbittorrent-types.d.ts.map +1 -0
- package/dist/clients/qbittorrent.d.ts +40 -0
- package/dist/clients/qbittorrent.d.ts.map +1 -0
- package/dist/clients/qbittorrent.js +1011 -0
- package/dist/clients/radarr.d.ts +92 -1
- package/dist/clients/radarr.d.ts.map +1 -1
- package/dist/clients/radarr.js +112 -7
- package/dist/clients/readarr.d.ts +79 -1
- package/dist/clients/readarr.d.ts.map +1 -1
- package/dist/clients/readarr.js +100 -7
- package/dist/clients/sonarr.d.ts +92 -1
- package/dist/clients/sonarr.d.ts.map +1 -1
- package/dist/clients/sonarr.js +112 -7
- package/dist/core/types.d.ts +6 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/generated/bazarr/client/client.gen.d.ts.map +1 -1
- package/dist/generated/bazarr/client/types.gen.d.ts +1 -1
- package/dist/generated/bazarr/core/serverSentEvents.gen.d.ts +1 -1
- package/dist/generated/bazarr/core/serverSentEvents.gen.d.ts.map +1 -1
- package/dist/generated/bazarr/core/types.gen.d.ts +1 -1
- package/dist/generated/bazarr/sdk.gen.d.ts +1 -1
- package/dist/generated/bazarr/sdk.gen.d.ts.map +1 -1
- package/dist/generated/lidarr/client/client.gen.d.ts.map +1 -1
- package/dist/generated/lidarr/client/types.gen.d.ts +1 -1
- package/dist/generated/lidarr/core/serverSentEvents.gen.d.ts +1 -1
- package/dist/generated/lidarr/core/serverSentEvents.gen.d.ts.map +1 -1
- package/dist/generated/lidarr/core/types.gen.d.ts +1 -1
- package/dist/generated/lidarr/sdk.gen.d.ts +1 -1
- package/dist/generated/lidarr/sdk.gen.d.ts.map +1 -1
- package/dist/generated/prowlarr/client/client.gen.d.ts.map +1 -1
- package/dist/generated/prowlarr/client/types.gen.d.ts +1 -1
- package/dist/generated/prowlarr/core/serverSentEvents.gen.d.ts +1 -1
- package/dist/generated/prowlarr/core/serverSentEvents.gen.d.ts.map +1 -1
- package/dist/generated/prowlarr/core/types.gen.d.ts +1 -1
- package/dist/generated/prowlarr/sdk.gen.d.ts +1 -1
- package/dist/generated/prowlarr/sdk.gen.d.ts.map +1 -1
- package/dist/generated/qbittorrent/client/client.gen.d.ts +3 -0
- package/dist/generated/qbittorrent/client/client.gen.d.ts.map +1 -0
- package/dist/generated/qbittorrent/client/index.d.ts +9 -0
- package/dist/generated/qbittorrent/client/index.d.ts.map +1 -0
- package/dist/generated/qbittorrent/client/types.gen.d.ts +118 -0
- package/dist/generated/qbittorrent/client/types.gen.d.ts.map +1 -0
- package/dist/generated/qbittorrent/client/utils.gen.d.ts +34 -0
- package/dist/generated/qbittorrent/client/utils.gen.d.ts.map +1 -0
- package/dist/generated/qbittorrent/client.gen.d.ts +13 -0
- package/dist/generated/qbittorrent/client.gen.d.ts.map +1 -0
- package/dist/generated/qbittorrent/core/auth.gen.d.ts +19 -0
- package/dist/generated/qbittorrent/core/auth.gen.d.ts.map +1 -0
- package/dist/generated/qbittorrent/core/bodySerializer.gen.d.ts +26 -0
- package/dist/generated/qbittorrent/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/generated/qbittorrent/core/params.gen.d.ts +44 -0
- package/dist/generated/qbittorrent/core/params.gen.d.ts.map +1 -0
- package/dist/generated/qbittorrent/core/pathSerializer.gen.d.ts +34 -0
- package/dist/generated/qbittorrent/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/generated/qbittorrent/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/generated/qbittorrent/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/generated/qbittorrent/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/generated/qbittorrent/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/generated/qbittorrent/core/types.gen.d.ts +79 -0
- package/dist/generated/qbittorrent/core/types.gen.d.ts.map +1 -0
- package/dist/generated/qbittorrent/core/utils.gen.d.ts +20 -0
- package/dist/generated/qbittorrent/core/utils.gen.d.ts.map +1 -0
- package/dist/generated/qbittorrent/index.d.ts +3 -0
- package/dist/generated/qbittorrent/index.d.ts.map +1 -0
- package/dist/generated/qbittorrent/sdk.gen.d.ts +453 -0
- package/dist/generated/qbittorrent/sdk.gen.d.ts.map +1 -0
- package/dist/generated/qbittorrent/types.gen.d.ts +3689 -0
- package/dist/generated/qbittorrent/types.gen.d.ts.map +1 -0
- package/dist/generated/radarr/client/client.gen.d.ts.map +1 -1
- package/dist/generated/radarr/client/types.gen.d.ts +1 -1
- package/dist/generated/radarr/core/serverSentEvents.gen.d.ts +1 -1
- package/dist/generated/radarr/core/serverSentEvents.gen.d.ts.map +1 -1
- package/dist/generated/radarr/core/types.gen.d.ts +1 -1
- package/dist/generated/radarr/sdk.gen.d.ts +1 -1
- package/dist/generated/radarr/sdk.gen.d.ts.map +1 -1
- package/dist/generated/readarr/client/client.gen.d.ts.map +1 -1
- package/dist/generated/readarr/client/types.gen.d.ts +1 -1
- package/dist/generated/readarr/core/serverSentEvents.gen.d.ts +1 -1
- package/dist/generated/readarr/core/serverSentEvents.gen.d.ts.map +1 -1
- package/dist/generated/readarr/core/types.gen.d.ts +1 -1
- package/dist/generated/readarr/sdk.gen.d.ts +1 -1
- package/dist/generated/readarr/sdk.gen.d.ts.map +1 -1
- package/dist/generated/sonarr/client/client.gen.d.ts.map +1 -1
- package/dist/generated/sonarr/client/types.gen.d.ts +1 -1
- package/dist/generated/sonarr/core/serverSentEvents.gen.d.ts +1 -1
- package/dist/generated/sonarr/core/serverSentEvents.gen.d.ts.map +1 -1
- package/dist/generated/sonarr/core/types.gen.d.ts +1 -1
- package/dist/generated/sonarr/sdk.gen.d.ts +1 -1
- package/dist/generated/sonarr/sdk.gen.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -31
- package/dist/tsarr-2.6.0.tgz +0 -0
- package/package.json +17 -9
- package/dist/tsarr-2.4.12.tgz +0 -0
|
@@ -0,0 +1,3689 @@
|
|
|
1
|
+
export type ClientOptions = {
|
|
2
|
+
baseUrl: 'http://localhost:8080/api/v2' | (string & {});
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* The response is a JSON object containing the following fields
|
|
6
|
+
*/
|
|
7
|
+
export type BuildInfo = {
|
|
8
|
+
qt?: string;
|
|
9
|
+
libtorrent?: string;
|
|
10
|
+
boost?: string;
|
|
11
|
+
openssl?: string;
|
|
12
|
+
bitness?: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Possible fields:
|
|
16
|
+
*/
|
|
17
|
+
export type Preferences = {
|
|
18
|
+
/**
|
|
19
|
+
* Currently selected language (e.g. en_GB for English)
|
|
20
|
+
*/
|
|
21
|
+
locale?: string;
|
|
22
|
+
/**
|
|
23
|
+
* True if a subfolder should be created when adding a torrent
|
|
24
|
+
*/
|
|
25
|
+
create_subfolder_enabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* True if torrents should be added in a Paused state
|
|
28
|
+
*/
|
|
29
|
+
start_paused_enabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* TODO
|
|
32
|
+
*/
|
|
33
|
+
auto_delete_mode?: number;
|
|
34
|
+
/**
|
|
35
|
+
* True if disk space should be pre-allocated for all files
|
|
36
|
+
*/
|
|
37
|
+
preallocate_all?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* True if ".!qB" should be appended to incomplete files
|
|
40
|
+
*/
|
|
41
|
+
incomplete_files_ext?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* True if Automatic Torrent Management is enabled by default
|
|
44
|
+
*/
|
|
45
|
+
auto_tmm_enabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* True if torrent should be relocated when its Category changes
|
|
48
|
+
*/
|
|
49
|
+
torrent_changed_tmm_enabled?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* True if torrent should be relocated when the default save path changes
|
|
52
|
+
*/
|
|
53
|
+
save_path_changed_tmm_enabled?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* True if torrent should be relocated when its Category's save path changes
|
|
56
|
+
*/
|
|
57
|
+
category_changed_tmm_enabled?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Default save path for torrents, separated by slashes
|
|
60
|
+
*/
|
|
61
|
+
save_path?: string;
|
|
62
|
+
/**
|
|
63
|
+
* True if folder for incomplete torrents is enabled
|
|
64
|
+
*/
|
|
65
|
+
temp_path_enabled?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Path for incomplete torrents, separated by slashes
|
|
68
|
+
*/
|
|
69
|
+
temp_path?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Property: directory to watch for torrent files, value: where torrents loaded from this directory should be downloaded to (see list of possible values below). Slashes are used as path separators; multiple key/value pairs can be specified
|
|
72
|
+
*
|
|
73
|
+
* | Value | Description |
|
|
74
|
+
* | ---------------------- | --------------------------------- |
|
|
75
|
+
* | 0 | Download to the monitored folder |
|
|
76
|
+
* | 1 | Download to the default save path |
|
|
77
|
+
* | "/path/to/download/to" | Download to this path |
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
80
|
+
scan_dirs?: {
|
|
81
|
+
[key: string]: 0 | 1 | string;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Path to directory to copy .torrent files to. Slashes are used as path separators
|
|
85
|
+
*/
|
|
86
|
+
export_dir?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Path to directory to copy .torrent files of completed downloads to. Slashes are used as path separators
|
|
89
|
+
*/
|
|
90
|
+
export_dir_fin?: string;
|
|
91
|
+
/**
|
|
92
|
+
* True if e-mail notification should be enabled
|
|
93
|
+
*/
|
|
94
|
+
mail_notification_enabled?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* e-mail where notifications should originate from
|
|
97
|
+
*/
|
|
98
|
+
mail_notification_sender?: string;
|
|
99
|
+
/**
|
|
100
|
+
* e-mail to send notifications to
|
|
101
|
+
*/
|
|
102
|
+
mail_notification_email?: string;
|
|
103
|
+
/**
|
|
104
|
+
* smtp server for e-mail notifications
|
|
105
|
+
*/
|
|
106
|
+
mail_notification_smtp?: string;
|
|
107
|
+
/**
|
|
108
|
+
* True if smtp server requires SSL connection
|
|
109
|
+
*/
|
|
110
|
+
mail_notification_ssl_enabled?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* True if smtp server requires authentication
|
|
113
|
+
*/
|
|
114
|
+
mail_notification_auth_enabled?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Username for smtp authentication
|
|
117
|
+
*/
|
|
118
|
+
mail_notification_username?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Password for smtp authentication
|
|
121
|
+
*/
|
|
122
|
+
mail_notification_password?: string;
|
|
123
|
+
/**
|
|
124
|
+
* True if external program should be run after torrent has finished downloading
|
|
125
|
+
*/
|
|
126
|
+
autorun_enabled?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Program path/name/arguments to run if `autorun_enabled` is enabled; path is separated by slashes; you can use `%f` and `%n` arguments, which will be expanded by qBittorent as path_to_torrent_file and torrent_name (from the GUI; not the .torrent file name) respectively
|
|
129
|
+
*/
|
|
130
|
+
autorun_program?: string;
|
|
131
|
+
/**
|
|
132
|
+
* True if torrent queuing is enabled
|
|
133
|
+
*/
|
|
134
|
+
queueing_enabled?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Maximum number of active simultaneous downloads
|
|
137
|
+
*/
|
|
138
|
+
max_active_downloads?: number;
|
|
139
|
+
/**
|
|
140
|
+
* Maximum number of active simultaneous downloads and uploads
|
|
141
|
+
*/
|
|
142
|
+
max_active_torrents?: number;
|
|
143
|
+
/**
|
|
144
|
+
* Maximum number of active simultaneous uploads
|
|
145
|
+
*/
|
|
146
|
+
max_active_uploads?: number;
|
|
147
|
+
/**
|
|
148
|
+
* If true torrents w/o any activity (stalled ones) will not be counted towards `max_active_*` limits; see [dont_count_slow_torrents](https://www.libtorrent.org/reference-Settings.html#dont_count_slow_torrents) for more information
|
|
149
|
+
*/
|
|
150
|
+
dont_count_slow_torrents?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Download rate in KiB/s for a torrent to be considered "slow"
|
|
153
|
+
*/
|
|
154
|
+
slow_torrent_dl_rate_threshold?: number;
|
|
155
|
+
/**
|
|
156
|
+
* Upload rate in KiB/s for a torrent to be considered "slow"
|
|
157
|
+
*/
|
|
158
|
+
slow_torrent_ul_rate_threshold?: number;
|
|
159
|
+
/**
|
|
160
|
+
* Seconds a torrent should be inactive before considered "slow"
|
|
161
|
+
*/
|
|
162
|
+
slow_torrent_inactive_timer?: number;
|
|
163
|
+
/**
|
|
164
|
+
* True if share ratio limit is enabled
|
|
165
|
+
*/
|
|
166
|
+
max_ratio_enabled?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Get the global share ratio limit
|
|
169
|
+
*/
|
|
170
|
+
max_ratio?: number;
|
|
171
|
+
/**
|
|
172
|
+
* Action performed when a torrent reaches the maximum share ratio. See list of possible values here below.
|
|
173
|
+
*
|
|
174
|
+
* | Value | Description |
|
|
175
|
+
* | ----- | -------------- |
|
|
176
|
+
* | 0 | Pause torrent |
|
|
177
|
+
* | 1 | Remove torrent |
|
|
178
|
+
*
|
|
179
|
+
*/
|
|
180
|
+
max_ratio_act?: 0 | 1;
|
|
181
|
+
/**
|
|
182
|
+
* Port for incoming connections
|
|
183
|
+
*/
|
|
184
|
+
listen_port?: number;
|
|
185
|
+
/**
|
|
186
|
+
* True if UPnP/NAT-PMP is enabled
|
|
187
|
+
*/
|
|
188
|
+
upnp?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* True if the port is randomly selected
|
|
191
|
+
*/
|
|
192
|
+
random_port?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Global download speed limit in KiB/s; `-1` means no limit is applied
|
|
195
|
+
*/
|
|
196
|
+
dl_limit?: number;
|
|
197
|
+
/**
|
|
198
|
+
* Global upload speed limit in KiB/s; `-1` means no limit is applied
|
|
199
|
+
*/
|
|
200
|
+
up_limit?: number;
|
|
201
|
+
/**
|
|
202
|
+
* Maximum global number of simultaneous connections
|
|
203
|
+
*/
|
|
204
|
+
max_connec?: number;
|
|
205
|
+
/**
|
|
206
|
+
* Maximum number of simultaneous connections per torrent
|
|
207
|
+
*/
|
|
208
|
+
max_connec_per_torrent?: number;
|
|
209
|
+
/**
|
|
210
|
+
* Maximum number of upload slots
|
|
211
|
+
*/
|
|
212
|
+
max_uploads?: number;
|
|
213
|
+
/**
|
|
214
|
+
* Maximum number of upload slots per torrent
|
|
215
|
+
*/
|
|
216
|
+
max_uploads_per_torrent?: number;
|
|
217
|
+
/**
|
|
218
|
+
* Timeout in seconds for a `stopped` announce request to trackers
|
|
219
|
+
*/
|
|
220
|
+
stop_tracker_timeout?: number;
|
|
221
|
+
/**
|
|
222
|
+
* True if the advanced libtorrent option `piece_extent_affinity` is enabled
|
|
223
|
+
*/
|
|
224
|
+
enable_piece_extent_affinity?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Bittorrent Protocol to use (see list of possible values below)
|
|
227
|
+
*
|
|
228
|
+
* | Value | Description |
|
|
229
|
+
* | ----- | ----------- |
|
|
230
|
+
* | 0 | TCP and μTP |
|
|
231
|
+
* | 1 | TCP |
|
|
232
|
+
* | 2 | μTP |
|
|
233
|
+
*
|
|
234
|
+
*/
|
|
235
|
+
bittorrent_protocol?: 0 | 1 | 2;
|
|
236
|
+
/**
|
|
237
|
+
* True if `[du]l_limit` should be applied to uTP connections; this option is only available in qBittorent built against libtorrent version 0.16.X and higher
|
|
238
|
+
*/
|
|
239
|
+
limit_utp_rate?: boolean;
|
|
240
|
+
/**
|
|
241
|
+
* True if `[du]l_limit` should be applied to estimated TCP overhead (service data: e.g. packet headers)
|
|
242
|
+
*/
|
|
243
|
+
limit_tcp_overhead?: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* True if `[du]l_limit` should be applied to peers on the LAN
|
|
246
|
+
*/
|
|
247
|
+
limit_lan_peers?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Alternative global download speed limit in KiB/s
|
|
250
|
+
*/
|
|
251
|
+
alt_dl_limit?: number;
|
|
252
|
+
/**
|
|
253
|
+
* Alternative global upload speed limit in KiB/s
|
|
254
|
+
*/
|
|
255
|
+
alt_up_limit?: number;
|
|
256
|
+
/**
|
|
257
|
+
* True if alternative limits should be applied according to schedule
|
|
258
|
+
*/
|
|
259
|
+
scheduler_enabled?: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* Scheduler starting hour
|
|
262
|
+
*/
|
|
263
|
+
schedule_from_hour?: number;
|
|
264
|
+
/**
|
|
265
|
+
* Scheduler starting minute
|
|
266
|
+
*/
|
|
267
|
+
schedule_from_min?: number;
|
|
268
|
+
/**
|
|
269
|
+
* Scheduler ending hour
|
|
270
|
+
*/
|
|
271
|
+
schedule_to_hour?: number;
|
|
272
|
+
/**
|
|
273
|
+
* Scheduler ending minute
|
|
274
|
+
*/
|
|
275
|
+
schedule_to_min?: number;
|
|
276
|
+
/**
|
|
277
|
+
* Scheduler days. See possible values here below
|
|
278
|
+
*
|
|
279
|
+
* | Value | Description |
|
|
280
|
+
* | ----- | --------------- |
|
|
281
|
+
* | 0 | Every day |
|
|
282
|
+
* | 1 | Every weekday |
|
|
283
|
+
* | 2 | Every weekend |
|
|
284
|
+
* | 3 | Every Monday |
|
|
285
|
+
* | 4 | Every Tuesday |
|
|
286
|
+
* | 5 | Every Wednesday |
|
|
287
|
+
* | 6 | Every Thursday |
|
|
288
|
+
* | 7 | Every Friday |
|
|
289
|
+
* | 8 | Every Saturday |
|
|
290
|
+
* | 9 | Every Sunday |
|
|
291
|
+
*
|
|
292
|
+
*/
|
|
293
|
+
scheduler_days?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
294
|
+
/**
|
|
295
|
+
* True if DHT is enabled
|
|
296
|
+
*/
|
|
297
|
+
dht?: boolean;
|
|
298
|
+
/**
|
|
299
|
+
* True if PeX is enabled
|
|
300
|
+
*/
|
|
301
|
+
pex?: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* True if LSD is enabled
|
|
304
|
+
*/
|
|
305
|
+
lsd?: boolean;
|
|
306
|
+
/**
|
|
307
|
+
* See list of possible values here below
|
|
308
|
+
*
|
|
309
|
+
* | Value | Description |
|
|
310
|
+
* | ----- | -------------------- |
|
|
311
|
+
* | 0 | Prefer encryption |
|
|
312
|
+
* | 1 | Force encryption on |
|
|
313
|
+
* | 2 | Force encryption off |
|
|
314
|
+
*
|
|
315
|
+
*/
|
|
316
|
+
encryption?: 0 | 1 | 2;
|
|
317
|
+
/**
|
|
318
|
+
* If true anonymous mode will be enabled; read more [here](https://github.com/qbittorrent/qBittorrent/wiki/Anonymous-Mode); this option is only available in qBittorent built against libtorrent version 0.16.X and higher
|
|
319
|
+
*/
|
|
320
|
+
anonymous_mode?: boolean;
|
|
321
|
+
/**
|
|
322
|
+
* See list of possible values here below
|
|
323
|
+
*
|
|
324
|
+
* | Value | Description |
|
|
325
|
+
* | ----- | ----------------------------------- |
|
|
326
|
+
* | -1 | Proxy is disabled |
|
|
327
|
+
* | 0 | Prefer encryption |
|
|
328
|
+
* | 1 | HTTP proxy without authentication |
|
|
329
|
+
* | 2 | SOCKS5 proxy without authentication |
|
|
330
|
+
* | 3 | HTTP proxy with authentication |
|
|
331
|
+
* | 4 | SOCKS5 proxy with authentication |
|
|
332
|
+
* | 5 | SOCKS4 proxy without authentication |
|
|
333
|
+
*
|
|
334
|
+
*/
|
|
335
|
+
proxy_type?: -1 | 0 | 1 | 2 | 3 | 4 | 5;
|
|
336
|
+
/**
|
|
337
|
+
* Proxy IP address or domain name
|
|
338
|
+
*/
|
|
339
|
+
proxy_ip?: string;
|
|
340
|
+
/**
|
|
341
|
+
* Proxy port
|
|
342
|
+
*/
|
|
343
|
+
proxy_port?: number;
|
|
344
|
+
/**
|
|
345
|
+
* True if peer and web seed connections should be proxified; this option will have any effect only in qBittorent built against libtorrent version 0.16.X and higher
|
|
346
|
+
*/
|
|
347
|
+
proxy_peer_connections?: boolean;
|
|
348
|
+
/**
|
|
349
|
+
* True proxy requires authentication; doesn't apply to SOCKS4 proxies
|
|
350
|
+
*/
|
|
351
|
+
proxy_auth_enabled?: boolean;
|
|
352
|
+
/**
|
|
353
|
+
* Username for proxy authentication
|
|
354
|
+
*/
|
|
355
|
+
proxy_username?: string;
|
|
356
|
+
/**
|
|
357
|
+
* Password for proxy authentication
|
|
358
|
+
*/
|
|
359
|
+
proxy_password?: string;
|
|
360
|
+
/**
|
|
361
|
+
* True if proxy is only used for torrents
|
|
362
|
+
*/
|
|
363
|
+
proxy_torrents_only?: boolean;
|
|
364
|
+
/**
|
|
365
|
+
* True if external IP filter should be enabled
|
|
366
|
+
*/
|
|
367
|
+
ip_filter_enabled?: boolean;
|
|
368
|
+
/**
|
|
369
|
+
* Path to IP filter file (.dat, .p2p, .p2b files are supported); path is separated by slashes
|
|
370
|
+
*/
|
|
371
|
+
ip_filter_path?: string;
|
|
372
|
+
/**
|
|
373
|
+
* True if IP filters are applied to trackers
|
|
374
|
+
*/
|
|
375
|
+
ip_filter_trackers?: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* Comma-separated list of domains to accept when performing Host header validation
|
|
378
|
+
*/
|
|
379
|
+
web_ui_domain_list?: Array<string>;
|
|
380
|
+
/**
|
|
381
|
+
* IP address to use for the WebUI
|
|
382
|
+
*/
|
|
383
|
+
web_ui_address?: string;
|
|
384
|
+
/**
|
|
385
|
+
* WebUI port
|
|
386
|
+
*/
|
|
387
|
+
web_ui_port?: number;
|
|
388
|
+
/**
|
|
389
|
+
* True if UPnP is used for the WebUI port
|
|
390
|
+
*/
|
|
391
|
+
web_ui_upnp?: boolean;
|
|
392
|
+
/**
|
|
393
|
+
* WebUI username
|
|
394
|
+
*/
|
|
395
|
+
web_ui_username?: string;
|
|
396
|
+
/**
|
|
397
|
+
* True if WebUI CSRF protection is enabled
|
|
398
|
+
*/
|
|
399
|
+
web_ui_csrf_protection_enabled?: boolean;
|
|
400
|
+
/**
|
|
401
|
+
* True if WebUI clickjacking protection is enabled
|
|
402
|
+
*/
|
|
403
|
+
web_ui_clickjacking_protection_enabled?: boolean;
|
|
404
|
+
/**
|
|
405
|
+
* True if WebUI cookie `Secure` flag is enabled
|
|
406
|
+
*/
|
|
407
|
+
web_ui_secure_cookie_enabled?: boolean;
|
|
408
|
+
/**
|
|
409
|
+
* Maximum number of authentication failures before WebUI access ban
|
|
410
|
+
*/
|
|
411
|
+
web_ui_max_auth_fail_count?: number;
|
|
412
|
+
/**
|
|
413
|
+
* WebUI access ban duration in seconds
|
|
414
|
+
*/
|
|
415
|
+
web_ui_ban_duration?: number;
|
|
416
|
+
/**
|
|
417
|
+
* Seconds until WebUI is automatically signed off
|
|
418
|
+
*/
|
|
419
|
+
web_ui_session_timeout?: number;
|
|
420
|
+
/**
|
|
421
|
+
* True if WebUI host header validation is enabled
|
|
422
|
+
*/
|
|
423
|
+
web_ui_host_header_validation_enabled?: boolean;
|
|
424
|
+
/**
|
|
425
|
+
* True if authentication challenge for loopback address (127.0.0.1) should be disabled
|
|
426
|
+
*/
|
|
427
|
+
bypass_local_auth?: boolean;
|
|
428
|
+
/**
|
|
429
|
+
* True if webui authentication should be bypassed for clients whose ip resides within (at least) one of the subnets on the whitelist
|
|
430
|
+
*/
|
|
431
|
+
bypass_auth_subnet_whitelist_enabled?: boolean;
|
|
432
|
+
/**
|
|
433
|
+
* (White)list of ipv4/ipv6 subnets for which webui authentication should be bypassed; list entries are separated by commas
|
|
434
|
+
*/
|
|
435
|
+
bypass_auth_subnet_whitelist?: Array<string>;
|
|
436
|
+
/**
|
|
437
|
+
* True if an alternative WebUI should be used
|
|
438
|
+
*/
|
|
439
|
+
alternative_webui_enabled?: boolean;
|
|
440
|
+
/**
|
|
441
|
+
* File path to the alternative WebUI
|
|
442
|
+
*/
|
|
443
|
+
alternative_webui_path?: string;
|
|
444
|
+
/**
|
|
445
|
+
* True if WebUI HTTPS access is enabled
|
|
446
|
+
*/
|
|
447
|
+
use_https?: boolean;
|
|
448
|
+
/**
|
|
449
|
+
* For API < v2.0.1: SSL keyfile contents (this is a not a path)
|
|
450
|
+
*/
|
|
451
|
+
ssl_key?: string;
|
|
452
|
+
/**
|
|
453
|
+
* For API < v2.0.1: SSL certificate contents (this is a not a path)
|
|
454
|
+
*/
|
|
455
|
+
ssl_cert?: string;
|
|
456
|
+
/**
|
|
457
|
+
* For API ≥ v2.0.1: Path to SSL keyfile
|
|
458
|
+
*/
|
|
459
|
+
web_ui_https_key_path?: string;
|
|
460
|
+
/**
|
|
461
|
+
* For API ≥ v2.0.1: Path to SSL certificate
|
|
462
|
+
*/
|
|
463
|
+
web_ui_https_cert_path?: string;
|
|
464
|
+
/**
|
|
465
|
+
* True if server DNS should be updated dynamically
|
|
466
|
+
*/
|
|
467
|
+
dyndns_enabled?: boolean;
|
|
468
|
+
/**
|
|
469
|
+
* See list of possible values here below
|
|
470
|
+
*
|
|
471
|
+
* | Value | Description |
|
|
472
|
+
* | ----- | ----------- |
|
|
473
|
+
* | 0 | Use DyDNS |
|
|
474
|
+
* | 1 | Use NOIP |
|
|
475
|
+
*
|
|
476
|
+
*/
|
|
477
|
+
dyndns_service?: 0 | 1;
|
|
478
|
+
/**
|
|
479
|
+
* Username for DDNS service
|
|
480
|
+
*/
|
|
481
|
+
dyndns_username?: string;
|
|
482
|
+
/**
|
|
483
|
+
* Password for DDNS service
|
|
484
|
+
*/
|
|
485
|
+
dyndns_password?: string;
|
|
486
|
+
/**
|
|
487
|
+
* Your DDNS domain name
|
|
488
|
+
*/
|
|
489
|
+
dyndns_domain?: string;
|
|
490
|
+
/**
|
|
491
|
+
* RSS refresh interval
|
|
492
|
+
*/
|
|
493
|
+
rss_refresh_interval?: number;
|
|
494
|
+
/**
|
|
495
|
+
* Max stored articles per RSS feed
|
|
496
|
+
*/
|
|
497
|
+
rss_max_articles_per_feed?: number;
|
|
498
|
+
/**
|
|
499
|
+
* Enable processing of RSS feeds
|
|
500
|
+
*/
|
|
501
|
+
rss_processing_enabled?: boolean;
|
|
502
|
+
/**
|
|
503
|
+
* Enable auto-downloading of torrents from the RSS feeds
|
|
504
|
+
*/
|
|
505
|
+
rss_auto_downloading_enabled?: boolean;
|
|
506
|
+
/**
|
|
507
|
+
* For API ≥ v2.5.1: Enable downloading of repack/proper Episodes
|
|
508
|
+
*/
|
|
509
|
+
rss_download_repack_proper_episodes?: boolean;
|
|
510
|
+
/**
|
|
511
|
+
* For API ≥ v2.5.1: List of RSS Smart Episode Filters
|
|
512
|
+
*/
|
|
513
|
+
rss_smart_episode_filters?: string;
|
|
514
|
+
/**
|
|
515
|
+
* Enable automatic adding of trackers to new torrents
|
|
516
|
+
*/
|
|
517
|
+
add_trackers_enabled?: boolean;
|
|
518
|
+
/**
|
|
519
|
+
* List of trackers to add to new torrent
|
|
520
|
+
*/
|
|
521
|
+
add_trackers?: string;
|
|
522
|
+
/**
|
|
523
|
+
* For API ≥ v2.5.1: Enable custom http headers
|
|
524
|
+
*/
|
|
525
|
+
web_ui_use_custom_http_headers_enabled?: boolean;
|
|
526
|
+
/**
|
|
527
|
+
* For API ≥ v2.5.1: List of custom http headers
|
|
528
|
+
*/
|
|
529
|
+
web_ui_custom_http_headers?: string;
|
|
530
|
+
/**
|
|
531
|
+
* True enables max seeding time
|
|
532
|
+
*/
|
|
533
|
+
max_seeding_time_enabled?: boolean;
|
|
534
|
+
/**
|
|
535
|
+
* Number of minutes to seed a torrent
|
|
536
|
+
*/
|
|
537
|
+
max_seeding_time?: number;
|
|
538
|
+
/**
|
|
539
|
+
* TODO
|
|
540
|
+
*/
|
|
541
|
+
announce_ip?: string;
|
|
542
|
+
/**
|
|
543
|
+
* True always announce to all tiers
|
|
544
|
+
*/
|
|
545
|
+
announce_to_all_tiers?: boolean;
|
|
546
|
+
/**
|
|
547
|
+
* True always announce to all trackers in a tier
|
|
548
|
+
*/
|
|
549
|
+
announce_to_all_trackers?: boolean;
|
|
550
|
+
/**
|
|
551
|
+
* Number of asynchronous I/O threads
|
|
552
|
+
*/
|
|
553
|
+
async_io_threads?: number;
|
|
554
|
+
/**
|
|
555
|
+
* List of banned IPs
|
|
556
|
+
*/
|
|
557
|
+
banned_IPs?: string;
|
|
558
|
+
/**
|
|
559
|
+
* Outstanding memory when checking torrents in MiB
|
|
560
|
+
*/
|
|
561
|
+
checking_memory_use?: number;
|
|
562
|
+
/**
|
|
563
|
+
* IP Address to bind to. Empty String means All addresses
|
|
564
|
+
*/
|
|
565
|
+
current_interface_address?: string;
|
|
566
|
+
/**
|
|
567
|
+
* Network Interface used
|
|
568
|
+
*/
|
|
569
|
+
current_network_interface?: string;
|
|
570
|
+
/**
|
|
571
|
+
* Disk cache used in MiB
|
|
572
|
+
*/
|
|
573
|
+
disk_cache?: number;
|
|
574
|
+
/**
|
|
575
|
+
* Disk cache expiry interval in seconds
|
|
576
|
+
*/
|
|
577
|
+
disk_cache_ttl?: number;
|
|
578
|
+
/**
|
|
579
|
+
* Port used for embedded tracker
|
|
580
|
+
*/
|
|
581
|
+
embedded_tracker_port?: number;
|
|
582
|
+
/**
|
|
583
|
+
* True enables coalesce reads & writes
|
|
584
|
+
*/
|
|
585
|
+
enable_coalesce_read_write?: boolean;
|
|
586
|
+
/**
|
|
587
|
+
* True enables embedded tracker
|
|
588
|
+
*/
|
|
589
|
+
enable_embedded_tracker?: boolean;
|
|
590
|
+
/**
|
|
591
|
+
* True allows multiple connections from the same IP address
|
|
592
|
+
*/
|
|
593
|
+
enable_multi_connections_from_same_ip?: boolean;
|
|
594
|
+
/**
|
|
595
|
+
* True enables os cache
|
|
596
|
+
*/
|
|
597
|
+
enable_os_cache?: boolean;
|
|
598
|
+
/**
|
|
599
|
+
* True enables sending of upload piece suggestions
|
|
600
|
+
*/
|
|
601
|
+
enable_upload_suggestions?: boolean;
|
|
602
|
+
/**
|
|
603
|
+
* File pool size
|
|
604
|
+
*/
|
|
605
|
+
file_pool_size?: number;
|
|
606
|
+
/**
|
|
607
|
+
* Maximal outgoing port (0: Disabled)
|
|
608
|
+
*/
|
|
609
|
+
outgoing_ports_max?: number;
|
|
610
|
+
/**
|
|
611
|
+
* Minimal outgoing port (0: Disabled)
|
|
612
|
+
*/
|
|
613
|
+
outgoing_ports_min?: number;
|
|
614
|
+
/**
|
|
615
|
+
* True rechecks torrents on completion
|
|
616
|
+
*/
|
|
617
|
+
recheck_completed_torrents?: boolean;
|
|
618
|
+
/**
|
|
619
|
+
* True resolves peer countries
|
|
620
|
+
*/
|
|
621
|
+
resolve_peer_countries?: boolean;
|
|
622
|
+
/**
|
|
623
|
+
* Save resume data interval in min
|
|
624
|
+
*/
|
|
625
|
+
save_resume_data_interval?: number;
|
|
626
|
+
/**
|
|
627
|
+
* Send buffer low watermark in KiB
|
|
628
|
+
*/
|
|
629
|
+
send_buffer_low_watermark?: number;
|
|
630
|
+
/**
|
|
631
|
+
* Send buffer watermark in KiB
|
|
632
|
+
*/
|
|
633
|
+
send_buffer_watermark?: number;
|
|
634
|
+
/**
|
|
635
|
+
* Send buffer watermark factor in percent
|
|
636
|
+
*/
|
|
637
|
+
send_buffer_watermark_factor?: number;
|
|
638
|
+
/**
|
|
639
|
+
* Socket backlog size
|
|
640
|
+
*/
|
|
641
|
+
socket_backlog_size?: number;
|
|
642
|
+
/**
|
|
643
|
+
* Upload choking algorithm used (see list of possible values below)
|
|
644
|
+
*
|
|
645
|
+
* | Value | Description |
|
|
646
|
+
* | ----- | -------------- |
|
|
647
|
+
* | 0 | Round-robin |
|
|
648
|
+
* | 1 | Fastest upload |
|
|
649
|
+
* | 2 | Anti-leech |
|
|
650
|
+
*
|
|
651
|
+
*/
|
|
652
|
+
upload_choking_algorithm?: 0 | 1 | 2;
|
|
653
|
+
/**
|
|
654
|
+
* Upload slots behavior used (see list of possible values below)
|
|
655
|
+
*
|
|
656
|
+
* | Value | Description |
|
|
657
|
+
* | ----- | ----------------- |
|
|
658
|
+
* | 0 | Fixed slots |
|
|
659
|
+
* | 1 | Upload rate based |
|
|
660
|
+
*
|
|
661
|
+
*/
|
|
662
|
+
upload_slots_behavior?: 0 | 1;
|
|
663
|
+
/**
|
|
664
|
+
* UPnP lease duration (0: Permanent lease)
|
|
665
|
+
*/
|
|
666
|
+
upnp_lease_duration?: number;
|
|
667
|
+
/**
|
|
668
|
+
* μTP-TCP mixed mode algorithm (see list of possible values below)
|
|
669
|
+
*
|
|
670
|
+
* | Value | Description |
|
|
671
|
+
* | ----- | ----------------- |
|
|
672
|
+
* | 0 | Prefer TCP |
|
|
673
|
+
* | 1 | Peer proportional |
|
|
674
|
+
*
|
|
675
|
+
*/
|
|
676
|
+
utp_tcp_mixed_mode?: 0 | 1;
|
|
677
|
+
[key: string]: unknown;
|
|
678
|
+
};
|
|
679
|
+
/**
|
|
680
|
+
* A json object with key-value pairs of the settings you want to change and their new values.
|
|
681
|
+
*/
|
|
682
|
+
export type SetPreferences = Preferences & {
|
|
683
|
+
/**
|
|
684
|
+
* For API ≥ v2.3.0: Plaintext WebUI password, not readable, write-only. For API < v2.3.0: MD5 hash of WebUI password, hash is generated from the following string: `username:Web UI Access:plain_text_web_ui_password`
|
|
685
|
+
*/
|
|
686
|
+
web_ui_password?: string;
|
|
687
|
+
};
|
|
688
|
+
export type MainLog = {
|
|
689
|
+
/**
|
|
690
|
+
* ID of the message
|
|
691
|
+
*/
|
|
692
|
+
id?: number;
|
|
693
|
+
/**
|
|
694
|
+
* Text of the message
|
|
695
|
+
*/
|
|
696
|
+
message?: string;
|
|
697
|
+
/**
|
|
698
|
+
* Milliseconds since epoch
|
|
699
|
+
*/
|
|
700
|
+
timestamp?: number;
|
|
701
|
+
/**
|
|
702
|
+
* Type of the message: Log::NORMAL: `1`, Log::INFO: `2`, Log::WARNING: `4`, Log::CRITICAL: `8`
|
|
703
|
+
*/
|
|
704
|
+
type?: 1 | 2 | 4 | 8;
|
|
705
|
+
};
|
|
706
|
+
export type PeersLog = {
|
|
707
|
+
/**
|
|
708
|
+
* ID of the peer
|
|
709
|
+
*/
|
|
710
|
+
id?: number;
|
|
711
|
+
/**
|
|
712
|
+
* IP of the peer
|
|
713
|
+
*/
|
|
714
|
+
ip?: string;
|
|
715
|
+
/**
|
|
716
|
+
* Milliseconds since epoch
|
|
717
|
+
*/
|
|
718
|
+
timestamp?: number;
|
|
719
|
+
/**
|
|
720
|
+
* Whether or not the peer was blocked
|
|
721
|
+
*/
|
|
722
|
+
blocked?: boolean;
|
|
723
|
+
/**
|
|
724
|
+
* Reason of the block
|
|
725
|
+
*/
|
|
726
|
+
reason?: string;
|
|
727
|
+
};
|
|
728
|
+
/**
|
|
729
|
+
* The response is a JSON object with the following possible fields
|
|
730
|
+
*/
|
|
731
|
+
export type MainData = {
|
|
732
|
+
/**
|
|
733
|
+
* Response ID
|
|
734
|
+
*/
|
|
735
|
+
rid?: number;
|
|
736
|
+
/**
|
|
737
|
+
* Whether the response contains all the data or partial data
|
|
738
|
+
*/
|
|
739
|
+
full_update?: boolean;
|
|
740
|
+
/**
|
|
741
|
+
* Property: torrent hash, value: same as [torrent list](https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#get-torrent-list)
|
|
742
|
+
*/
|
|
743
|
+
torrents?: {
|
|
744
|
+
[key: string]: TorrentInfo;
|
|
745
|
+
};
|
|
746
|
+
/**
|
|
747
|
+
* List of hashes of torrents removed since last request
|
|
748
|
+
*/
|
|
749
|
+
torrents_removed?: Array<string>;
|
|
750
|
+
/**
|
|
751
|
+
* Info for categories added since last request
|
|
752
|
+
*/
|
|
753
|
+
categories?: {
|
|
754
|
+
[key: string]: TorrentsCategory;
|
|
755
|
+
};
|
|
756
|
+
/**
|
|
757
|
+
* List of categories removed since last request
|
|
758
|
+
*/
|
|
759
|
+
categories_removed?: Array<string>;
|
|
760
|
+
/**
|
|
761
|
+
* List of tags added since last request
|
|
762
|
+
*/
|
|
763
|
+
tags?: Array<string>;
|
|
764
|
+
/**
|
|
765
|
+
* List of tags removed since last request
|
|
766
|
+
*/
|
|
767
|
+
tags_removed?: Array<string>;
|
|
768
|
+
server_state?: TransferInfo;
|
|
769
|
+
};
|
|
770
|
+
/**
|
|
771
|
+
* The response is TODO
|
|
772
|
+
*/
|
|
773
|
+
export type TorrentPeers = {
|
|
774
|
+
[key: string]: unknown;
|
|
775
|
+
};
|
|
776
|
+
/**
|
|
777
|
+
* The response is a JSON object with the following fields
|
|
778
|
+
*
|
|
779
|
+
* In addition to the above in partial data requests (see [Get partial data](https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#get-partial-data) for more info):
|
|
780
|
+
*
|
|
781
|
+
*/
|
|
782
|
+
export type TransferInfo = {
|
|
783
|
+
/**
|
|
784
|
+
* Global download rate (bytes/s)
|
|
785
|
+
*/
|
|
786
|
+
dl_info_speed?: number;
|
|
787
|
+
/**
|
|
788
|
+
* Data downloaded this session (bytes)
|
|
789
|
+
*/
|
|
790
|
+
dl_info_data?: number;
|
|
791
|
+
/**
|
|
792
|
+
* Global upload rate (bytes/s)
|
|
793
|
+
*/
|
|
794
|
+
up_info_speed?: number;
|
|
795
|
+
/**
|
|
796
|
+
* Data uploaded this session (bytes)
|
|
797
|
+
*/
|
|
798
|
+
up_info_data?: number;
|
|
799
|
+
/**
|
|
800
|
+
* Download rate limit (bytes/s)
|
|
801
|
+
*/
|
|
802
|
+
dl_rate_limit?: number;
|
|
803
|
+
/**
|
|
804
|
+
* Upload rate limit (bytes/s)
|
|
805
|
+
*/
|
|
806
|
+
up_rate_limit?: number;
|
|
807
|
+
/**
|
|
808
|
+
* DHT nodes connected to
|
|
809
|
+
*/
|
|
810
|
+
dht_nodes?: number;
|
|
811
|
+
/**
|
|
812
|
+
* Connection status. See possible values here below
|
|
813
|
+
*
|
|
814
|
+
* Possible values of connection_status:
|
|
815
|
+
* | Value |
|
|
816
|
+
* | ------------ |
|
|
817
|
+
* | connected |
|
|
818
|
+
* | firewalled |
|
|
819
|
+
* | disconnected |
|
|
820
|
+
*
|
|
821
|
+
*/
|
|
822
|
+
connection_status?: string;
|
|
823
|
+
/**
|
|
824
|
+
* True if torrent queueing is enabled
|
|
825
|
+
*/
|
|
826
|
+
queueing?: boolean;
|
|
827
|
+
/**
|
|
828
|
+
* True if alternative speed limits are enabled
|
|
829
|
+
*/
|
|
830
|
+
use_alt_speed_limits?: boolean;
|
|
831
|
+
/**
|
|
832
|
+
* Transfer list refresh interval (milliseconds)
|
|
833
|
+
*/
|
|
834
|
+
refresh_interval?: number;
|
|
835
|
+
};
|
|
836
|
+
export type TorrentInfo = {
|
|
837
|
+
/**
|
|
838
|
+
* Time (Unix Epoch) when the torrent was added to the client
|
|
839
|
+
*/
|
|
840
|
+
added_on?: number;
|
|
841
|
+
/**
|
|
842
|
+
* Amount of data left to download (bytes)
|
|
843
|
+
*/
|
|
844
|
+
amount_left?: number;
|
|
845
|
+
/**
|
|
846
|
+
* Whether this torrent is managed by Automatic Torrent Management
|
|
847
|
+
*/
|
|
848
|
+
auto_tmm?: boolean;
|
|
849
|
+
/**
|
|
850
|
+
* Percentage of file pieces currently available
|
|
851
|
+
*/
|
|
852
|
+
availability?: number;
|
|
853
|
+
/**
|
|
854
|
+
* Category of the torrent
|
|
855
|
+
*/
|
|
856
|
+
category?: string;
|
|
857
|
+
/**
|
|
858
|
+
* Amount of transfer data completed (bytes)
|
|
859
|
+
*/
|
|
860
|
+
completed?: number;
|
|
861
|
+
/**
|
|
862
|
+
* Time (Unix Epoch) when the torrent completed
|
|
863
|
+
*/
|
|
864
|
+
completion_on?: number;
|
|
865
|
+
/**
|
|
866
|
+
* Absolute path of torrent content (root path for multifile torrents, absolute file path for singlefile torrents)
|
|
867
|
+
*/
|
|
868
|
+
content_path?: string;
|
|
869
|
+
/**
|
|
870
|
+
* Torrent download speed limit (bytes/s). `-1` if ulimited.
|
|
871
|
+
*/
|
|
872
|
+
dl_limit?: number;
|
|
873
|
+
/**
|
|
874
|
+
* Torrent download speed (bytes/s)
|
|
875
|
+
*/
|
|
876
|
+
dlspeed?: number;
|
|
877
|
+
/**
|
|
878
|
+
* Amount of data downloaded
|
|
879
|
+
*/
|
|
880
|
+
downloaded?: number;
|
|
881
|
+
/**
|
|
882
|
+
* Amount of data downloaded this session
|
|
883
|
+
*/
|
|
884
|
+
downloaded_session?: number;
|
|
885
|
+
/**
|
|
886
|
+
* Torrent ETA (seconds)
|
|
887
|
+
*/
|
|
888
|
+
eta?: number;
|
|
889
|
+
/**
|
|
890
|
+
* True if first last piece are prioritized
|
|
891
|
+
*/
|
|
892
|
+
f_l_piece_prio?: boolean;
|
|
893
|
+
/**
|
|
894
|
+
* True if force start is enabled for this torrent
|
|
895
|
+
*/
|
|
896
|
+
force_start?: boolean;
|
|
897
|
+
/**
|
|
898
|
+
* Torrent hash
|
|
899
|
+
*/
|
|
900
|
+
hash?: string;
|
|
901
|
+
/**
|
|
902
|
+
* Last time (Unix Epoch) when a chunk was downloaded/uploaded
|
|
903
|
+
*/
|
|
904
|
+
last_activity?: number;
|
|
905
|
+
/**
|
|
906
|
+
* Magnet URI corresponding to this torrent
|
|
907
|
+
*/
|
|
908
|
+
magnet_uri?: string;
|
|
909
|
+
/**
|
|
910
|
+
* Maximum share ratio until torrent is stopped from seeding/uploading
|
|
911
|
+
*/
|
|
912
|
+
max_ratio?: number;
|
|
913
|
+
/**
|
|
914
|
+
* Maximum seeding time (seconds) until torrent is stopped from seeding
|
|
915
|
+
*/
|
|
916
|
+
max_seeding_time?: number;
|
|
917
|
+
/**
|
|
918
|
+
* Torrent name
|
|
919
|
+
*/
|
|
920
|
+
name?: string;
|
|
921
|
+
/**
|
|
922
|
+
* Number of seeds in the swarm
|
|
923
|
+
*/
|
|
924
|
+
num_complete?: number;
|
|
925
|
+
/**
|
|
926
|
+
* Number of leechers in the swarm
|
|
927
|
+
*/
|
|
928
|
+
num_incomplete?: number;
|
|
929
|
+
/**
|
|
930
|
+
* Number of leechers connected to
|
|
931
|
+
*/
|
|
932
|
+
num_leechs?: number;
|
|
933
|
+
/**
|
|
934
|
+
* Number of seeds connected to
|
|
935
|
+
*/
|
|
936
|
+
num_seeds?: number;
|
|
937
|
+
/**
|
|
938
|
+
* Torrent priority. Returns -1 if queuing is disabled or torrent is in seed mode
|
|
939
|
+
*/
|
|
940
|
+
priority?: number;
|
|
941
|
+
/**
|
|
942
|
+
* Torrent progress (percentage/100)
|
|
943
|
+
*/
|
|
944
|
+
progress?: number;
|
|
945
|
+
/**
|
|
946
|
+
* Torrent share ratio. Max ratio value: 9999.
|
|
947
|
+
*/
|
|
948
|
+
ratio?: number;
|
|
949
|
+
/**
|
|
950
|
+
* TODO (what is different from max_ratio?)
|
|
951
|
+
*/
|
|
952
|
+
ratio_limit?: number;
|
|
953
|
+
/**
|
|
954
|
+
* Path where this torrent's data is stored
|
|
955
|
+
*/
|
|
956
|
+
save_path?: string;
|
|
957
|
+
/**
|
|
958
|
+
* Torrent elapsed time while complete (seconds)
|
|
959
|
+
*/
|
|
960
|
+
seeding_time?: number;
|
|
961
|
+
/**
|
|
962
|
+
* TODO (what is different from `max_seeding_time`?) seeding_time_limit is a per torrent setting, when Automatic Torrent Management is disabled, furthermore then max_seeding_time is set to seeding_time_limit for this torrent. If Automatic Torrent Management is enabled, the value is -2. And if max_seeding_time is unset it have a default value -1.
|
|
963
|
+
*/
|
|
964
|
+
seeding_time_limit?: number;
|
|
965
|
+
/**
|
|
966
|
+
* Time (Unix Epoch) when this torrent was last seen complete
|
|
967
|
+
*/
|
|
968
|
+
seen_complete?: number;
|
|
969
|
+
/**
|
|
970
|
+
* True if sequential download is enabled
|
|
971
|
+
*/
|
|
972
|
+
seq_dl?: boolean;
|
|
973
|
+
/**
|
|
974
|
+
* Total size (bytes) of files selected for download
|
|
975
|
+
*/
|
|
976
|
+
size?: number;
|
|
977
|
+
/**
|
|
978
|
+
* Torrent state. See table here below for the possible values
|
|
979
|
+
*
|
|
980
|
+
* | Value | Description |
|
|
981
|
+
* | ------------------ | ------------------------------------------------------------- |
|
|
982
|
+
* | error | Some error occurred, applies to paused torrents |
|
|
983
|
+
* | missingFiles | Torrent data files is missing |
|
|
984
|
+
* | uploading | Torrent is being seeded and data is being transferred |
|
|
985
|
+
* | pausedUP | Torrent is paused and has finished downloading |
|
|
986
|
+
* | queuedUP | Queuing is enabled and torrent is queued for upload |
|
|
987
|
+
* | stalledUP | Torrent is being seeded, but no connection were made |
|
|
988
|
+
* | checkingUP | Torrent has finished downloading and is being checked |
|
|
989
|
+
* | forcedUP | Torrent is forced to uploading and ignore queue limit |
|
|
990
|
+
* | allocating | Torrent is allocating disk space for download |
|
|
991
|
+
* | downloading | Torrent is being downloaded and data is being transferred |
|
|
992
|
+
* | metaDL | Torrent has just started downloading and is fetching metadata |
|
|
993
|
+
* | pausedDL | Torrent is paused and has NOT finished downloading |
|
|
994
|
+
* | queuedDL | Queuing is enabled and torrent is queued for download |
|
|
995
|
+
* | stalledDL | Torrent is being downloaded, but no connection were made |
|
|
996
|
+
* | checkingDL | Same as checkingUP, but torrent has NOT finished downloading |
|
|
997
|
+
* | forcedDL | Torrent is forced to downloading to ignore queue limit |
|
|
998
|
+
* | checkingResumeData | Checking resume data on qBt startup |
|
|
999
|
+
* | moving | Torrent is moving to another location |
|
|
1000
|
+
* | unknown | Unknown status |
|
|
1001
|
+
*
|
|
1002
|
+
*/
|
|
1003
|
+
state?: 'error' | 'missingFiles' | 'uploading' | 'pausedUP' | 'queuedUP' | 'stalledUP' | 'checkingUP' | 'forcedUP' | 'allocating' | 'downloading' | 'metaDL' | 'pausedDL' | 'queuedDL' | 'stalledDL' | 'checkingDL' | 'forcedDL' | 'checkingResumeData' | 'moving' | 'unknown';
|
|
1004
|
+
/**
|
|
1005
|
+
* True if super seeding is enabled
|
|
1006
|
+
*/
|
|
1007
|
+
super_seeding?: boolean;
|
|
1008
|
+
/**
|
|
1009
|
+
* Comma-concatenated tag list of the torrent
|
|
1010
|
+
*/
|
|
1011
|
+
tags?: string;
|
|
1012
|
+
/**
|
|
1013
|
+
* Total active time (seconds)
|
|
1014
|
+
*/
|
|
1015
|
+
time_active?: number;
|
|
1016
|
+
/**
|
|
1017
|
+
* Total size (bytes) of all file in this torrent (including unselected ones)
|
|
1018
|
+
*/
|
|
1019
|
+
total_size?: number;
|
|
1020
|
+
/**
|
|
1021
|
+
* The first tracker with working status. Returns empty string if no tracker is working.
|
|
1022
|
+
*/
|
|
1023
|
+
tracker?: string;
|
|
1024
|
+
/**
|
|
1025
|
+
* Torrent upload speed limit (bytes/s). `-1` if ulimited.
|
|
1026
|
+
*/
|
|
1027
|
+
up_limit?: number;
|
|
1028
|
+
/**
|
|
1029
|
+
* Amount of data uploaded
|
|
1030
|
+
*/
|
|
1031
|
+
uploaded?: number;
|
|
1032
|
+
/**
|
|
1033
|
+
* Amount of data uploaded this session
|
|
1034
|
+
*/
|
|
1035
|
+
uploaded_session?: number;
|
|
1036
|
+
/**
|
|
1037
|
+
* Torrent upload speed (bytes/s)
|
|
1038
|
+
*/
|
|
1039
|
+
upspeed?: number;
|
|
1040
|
+
};
|
|
1041
|
+
/**
|
|
1042
|
+
* The response is:
|
|
1043
|
+
* - empty, if the torrent hash is invalid
|
|
1044
|
+
* - otherwise, a JSON object with the following fields
|
|
1045
|
+
*
|
|
1046
|
+
* NB: `-1` is returned if the type of the property is integer but its value is not known.
|
|
1047
|
+
*
|
|
1048
|
+
*/
|
|
1049
|
+
export type TorrentsProperties = {
|
|
1050
|
+
/**
|
|
1051
|
+
* Torrent save path
|
|
1052
|
+
*/
|
|
1053
|
+
save_path?: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* Torrent creation date (Unix timestamp)
|
|
1056
|
+
*/
|
|
1057
|
+
creation_date?: number;
|
|
1058
|
+
/**
|
|
1059
|
+
* Torrent piece size (bytes)
|
|
1060
|
+
*/
|
|
1061
|
+
piece_size?: number;
|
|
1062
|
+
/**
|
|
1063
|
+
* Torrent comment
|
|
1064
|
+
*/
|
|
1065
|
+
comment?: string;
|
|
1066
|
+
/**
|
|
1067
|
+
* Total data wasted for torrent (bytes)
|
|
1068
|
+
*/
|
|
1069
|
+
total_wasted?: number;
|
|
1070
|
+
/**
|
|
1071
|
+
* Total data uploaded for torrent (bytes)
|
|
1072
|
+
*/
|
|
1073
|
+
total_uploaded?: number;
|
|
1074
|
+
/**
|
|
1075
|
+
* Total data uploaded this session (bytes)
|
|
1076
|
+
*/
|
|
1077
|
+
total_uploaded_session?: number;
|
|
1078
|
+
/**
|
|
1079
|
+
* Total data downloaded for torrent (bytes)
|
|
1080
|
+
*/
|
|
1081
|
+
total_downloaded?: number;
|
|
1082
|
+
/**
|
|
1083
|
+
* Total data downloaded this session (bytes)
|
|
1084
|
+
*/
|
|
1085
|
+
total_downloaded_session?: number;
|
|
1086
|
+
/**
|
|
1087
|
+
* Torrent upload limit (bytes/s)
|
|
1088
|
+
*/
|
|
1089
|
+
up_limit?: number;
|
|
1090
|
+
/**
|
|
1091
|
+
* Torrent download limit (bytes/s)
|
|
1092
|
+
*/
|
|
1093
|
+
dl_limit?: number;
|
|
1094
|
+
/**
|
|
1095
|
+
* Torrent elapsed time (seconds)
|
|
1096
|
+
*/
|
|
1097
|
+
time_elapsed?: number;
|
|
1098
|
+
/**
|
|
1099
|
+
* Torrent elapsed time while complete (seconds)
|
|
1100
|
+
*/
|
|
1101
|
+
seeding_time?: number;
|
|
1102
|
+
/**
|
|
1103
|
+
* Torrent connection count
|
|
1104
|
+
*/
|
|
1105
|
+
nb_connections?: number;
|
|
1106
|
+
/**
|
|
1107
|
+
* Torrent connection count limit
|
|
1108
|
+
*/
|
|
1109
|
+
nb_connections_limit?: number;
|
|
1110
|
+
/**
|
|
1111
|
+
* Torrent share ratio
|
|
1112
|
+
*/
|
|
1113
|
+
share_ratio?: number;
|
|
1114
|
+
/**
|
|
1115
|
+
* When this torrent was added (unix timestamp)
|
|
1116
|
+
*/
|
|
1117
|
+
addition_date?: number;
|
|
1118
|
+
/**
|
|
1119
|
+
* Torrent completion date (unix timestamp)
|
|
1120
|
+
*/
|
|
1121
|
+
completion_date?: number;
|
|
1122
|
+
/**
|
|
1123
|
+
* Torrent creator
|
|
1124
|
+
*/
|
|
1125
|
+
created_by?: string;
|
|
1126
|
+
/**
|
|
1127
|
+
* Torrent average download speed (bytes/second)
|
|
1128
|
+
*/
|
|
1129
|
+
dl_speed_avg?: number;
|
|
1130
|
+
/**
|
|
1131
|
+
* Torrent download speed (bytes/second)
|
|
1132
|
+
*/
|
|
1133
|
+
dl_speed?: number;
|
|
1134
|
+
/**
|
|
1135
|
+
* Torrent ETA (seconds)
|
|
1136
|
+
*/
|
|
1137
|
+
eta?: number;
|
|
1138
|
+
/**
|
|
1139
|
+
* Last seen complete date (unix timestamp)
|
|
1140
|
+
*/
|
|
1141
|
+
last_seen?: number;
|
|
1142
|
+
/**
|
|
1143
|
+
* Number of peers connected to
|
|
1144
|
+
*/
|
|
1145
|
+
peers?: number;
|
|
1146
|
+
/**
|
|
1147
|
+
* Number of peers in the swarm
|
|
1148
|
+
*/
|
|
1149
|
+
peers_total?: number;
|
|
1150
|
+
/**
|
|
1151
|
+
* Number of pieces owned
|
|
1152
|
+
*/
|
|
1153
|
+
pieces_have?: number;
|
|
1154
|
+
/**
|
|
1155
|
+
* Number of pieces of the torrent
|
|
1156
|
+
*/
|
|
1157
|
+
pieces_num?: number;
|
|
1158
|
+
/**
|
|
1159
|
+
* Number of seconds until the next announce
|
|
1160
|
+
*/
|
|
1161
|
+
reannounce?: number;
|
|
1162
|
+
/**
|
|
1163
|
+
* Number of seeds connected to
|
|
1164
|
+
*/
|
|
1165
|
+
seeds?: number;
|
|
1166
|
+
/**
|
|
1167
|
+
* Number of seeds in the swarm
|
|
1168
|
+
*/
|
|
1169
|
+
seeds_total?: number;
|
|
1170
|
+
/**
|
|
1171
|
+
* Torrent total size (bytes)
|
|
1172
|
+
*/
|
|
1173
|
+
total_size?: number;
|
|
1174
|
+
/**
|
|
1175
|
+
* Torrent average upload speed (bytes/second)
|
|
1176
|
+
*/
|
|
1177
|
+
up_speed_avg?: number;
|
|
1178
|
+
/**
|
|
1179
|
+
* Torrent upload speed (bytes/second)
|
|
1180
|
+
*/
|
|
1181
|
+
up_speed?: number;
|
|
1182
|
+
};
|
|
1183
|
+
export type TorrentsTrackers = {
|
|
1184
|
+
/**
|
|
1185
|
+
* Tracker url
|
|
1186
|
+
*/
|
|
1187
|
+
url?: string;
|
|
1188
|
+
/**
|
|
1189
|
+
* Tracker status. See the table below for possible values
|
|
1190
|
+
*
|
|
1191
|
+
* | Value | Description |
|
|
1192
|
+
* | ----- | ---------------------------------------------------------------------------------- |
|
|
1193
|
+
* | 0 | Tracker is disabled (used for DHT, PeX, and LSD) |
|
|
1194
|
+
* | 1 | Tracker has not been contacted yet |
|
|
1195
|
+
* | 2 | Tracker has been contacted and is working |
|
|
1196
|
+
* | 3 | Tracker is updating |
|
|
1197
|
+
* | 4 | Tracker has been contacted, but it is not working (or doesn't send proper replies) |
|
|
1198
|
+
*
|
|
1199
|
+
*/
|
|
1200
|
+
status?: 0 | 1 | 2 | 3 | 4;
|
|
1201
|
+
/**
|
|
1202
|
+
* Tracker priority tier. Lower tier trackers are tried before higher tiers. Tier numbers are valid when `>= 0`, `< 0` is used as placeholder when `tier` does not exist for special entries (such as DHT).
|
|
1203
|
+
*/
|
|
1204
|
+
tier?: number;
|
|
1205
|
+
/**
|
|
1206
|
+
* Number of peers for current torrent, as reported by the tracker
|
|
1207
|
+
*/
|
|
1208
|
+
num_peers?: number;
|
|
1209
|
+
/**
|
|
1210
|
+
* Number of seeds for current torrent, asreported by the tracker
|
|
1211
|
+
*/
|
|
1212
|
+
num_seeds?: number;
|
|
1213
|
+
/**
|
|
1214
|
+
* Number of leeches for current torrent, as reported by the tracker
|
|
1215
|
+
*/
|
|
1216
|
+
num_leeches?: number;
|
|
1217
|
+
/**
|
|
1218
|
+
* Number of completed downlods for current torrent, as reported by the tracker
|
|
1219
|
+
*/
|
|
1220
|
+
num_downloaded?: number;
|
|
1221
|
+
/**
|
|
1222
|
+
* Tracker message (there is no way of knowing what this message is - it's up to tracker admins)
|
|
1223
|
+
*/
|
|
1224
|
+
msg?: string;
|
|
1225
|
+
};
|
|
1226
|
+
export type TorrentsWebseeds = {
|
|
1227
|
+
/**
|
|
1228
|
+
* URL of the web seed
|
|
1229
|
+
*/
|
|
1230
|
+
url?: string;
|
|
1231
|
+
};
|
|
1232
|
+
export type TorrentsFiles = {
|
|
1233
|
+
/**
|
|
1234
|
+
* File index
|
|
1235
|
+
*/
|
|
1236
|
+
index?: number;
|
|
1237
|
+
/**
|
|
1238
|
+
* File name (including relative path)
|
|
1239
|
+
*/
|
|
1240
|
+
name?: string;
|
|
1241
|
+
/**
|
|
1242
|
+
* File size (bytes)
|
|
1243
|
+
*/
|
|
1244
|
+
size?: number;
|
|
1245
|
+
/**
|
|
1246
|
+
* File progress (percentage/100)
|
|
1247
|
+
*/
|
|
1248
|
+
progress?: number;
|
|
1249
|
+
/**
|
|
1250
|
+
* File priority. See possible values here below
|
|
1251
|
+
*
|
|
1252
|
+
* | Value | Description |
|
|
1253
|
+
* | ----- | ---------------- |
|
|
1254
|
+
* | 0 | Do not download |
|
|
1255
|
+
* | 1 | Normal priority |
|
|
1256
|
+
* | 6 | High priority |
|
|
1257
|
+
* | 7 | Maximal priority |
|
|
1258
|
+
*
|
|
1259
|
+
*/
|
|
1260
|
+
priority?: 0 | 1 | 6 | 7;
|
|
1261
|
+
/**
|
|
1262
|
+
* True if file is seeding/complete
|
|
1263
|
+
*/
|
|
1264
|
+
is_seed?: boolean;
|
|
1265
|
+
/**
|
|
1266
|
+
* The first number is the starting piece index and the second number is the ending piece index (inclusive)
|
|
1267
|
+
*/
|
|
1268
|
+
piece_range?: Array<number>;
|
|
1269
|
+
/**
|
|
1270
|
+
* Percentage of file pieces currently available (percentage/100)
|
|
1271
|
+
*/
|
|
1272
|
+
availability?: number;
|
|
1273
|
+
};
|
|
1274
|
+
export type Hashes = {
|
|
1275
|
+
hashes: Array<string>;
|
|
1276
|
+
};
|
|
1277
|
+
export type AddTorrentsUrls = {
|
|
1278
|
+
/**
|
|
1279
|
+
* URLs separated with newlines
|
|
1280
|
+
*/
|
|
1281
|
+
urls: string;
|
|
1282
|
+
} & AddTorrentsCommon;
|
|
1283
|
+
export type AddTorrentsFiles = {
|
|
1284
|
+
/**
|
|
1285
|
+
* Raw data of torrent file. `torrents` can be presented multiple times.
|
|
1286
|
+
*/
|
|
1287
|
+
torrents: Array<Blob | File>;
|
|
1288
|
+
} & AddTorrentsCommon;
|
|
1289
|
+
export type AddTorrentsCommon = {
|
|
1290
|
+
/**
|
|
1291
|
+
* Download folder
|
|
1292
|
+
*/
|
|
1293
|
+
savepath?: string;
|
|
1294
|
+
/**
|
|
1295
|
+
* Cookie sent to download the .torrent file
|
|
1296
|
+
*/
|
|
1297
|
+
cookie?: string;
|
|
1298
|
+
/**
|
|
1299
|
+
* Category for the torrent
|
|
1300
|
+
*/
|
|
1301
|
+
category?: string;
|
|
1302
|
+
/**
|
|
1303
|
+
* Tags for the torrent, split by ','
|
|
1304
|
+
*/
|
|
1305
|
+
tags?: Array<string>;
|
|
1306
|
+
/**
|
|
1307
|
+
* Skip hash checking. Possible values are `true`, `false` (default)
|
|
1308
|
+
*/
|
|
1309
|
+
skip_checking?: 'true' | 'false';
|
|
1310
|
+
/**
|
|
1311
|
+
* Add torrents in the paused state. Possible values are `true`, `false` (default)
|
|
1312
|
+
*/
|
|
1313
|
+
paused?: 'true' | 'false';
|
|
1314
|
+
/**
|
|
1315
|
+
* Create the root folder. Possible values are `true`, `false`, unset (default)
|
|
1316
|
+
*/
|
|
1317
|
+
root_folder?: 'true' | 'false' | 'unset';
|
|
1318
|
+
/**
|
|
1319
|
+
* Rename torrent
|
|
1320
|
+
*/
|
|
1321
|
+
rename?: string;
|
|
1322
|
+
/**
|
|
1323
|
+
* Set torrent upload speed limit. Unit in bytes/second
|
|
1324
|
+
*/
|
|
1325
|
+
upLimit?: number;
|
|
1326
|
+
/**
|
|
1327
|
+
* Set torrent download speed limit. Unit in bytes/second
|
|
1328
|
+
*/
|
|
1329
|
+
dlLimit?: number;
|
|
1330
|
+
/**
|
|
1331
|
+
* Set torrent share ratio limit
|
|
1332
|
+
*/
|
|
1333
|
+
ratioLimit?: number;
|
|
1334
|
+
/**
|
|
1335
|
+
* Set torrent seeding time limit. Unit in seconds
|
|
1336
|
+
*/
|
|
1337
|
+
seedingTimeLimit?: number;
|
|
1338
|
+
/**
|
|
1339
|
+
* Whether Automatic Torrent Management should be used
|
|
1340
|
+
*/
|
|
1341
|
+
autoTMM?: boolean;
|
|
1342
|
+
/**
|
|
1343
|
+
* Enable sequential download. Possible values are `true`, `false` (default)
|
|
1344
|
+
*/
|
|
1345
|
+
sequentialDownload?: 'true' | 'false';
|
|
1346
|
+
/**
|
|
1347
|
+
* Prioritize download first last piece. Possible values are `true`, `false` (default)
|
|
1348
|
+
*/
|
|
1349
|
+
firstLastPiecePrio?: 'true' | 'false';
|
|
1350
|
+
};
|
|
1351
|
+
export type TorrentsLimit = {
|
|
1352
|
+
[key: string]: number;
|
|
1353
|
+
};
|
|
1354
|
+
export type SetTorrentsLimit = Hashes & {
|
|
1355
|
+
limit: number;
|
|
1356
|
+
};
|
|
1357
|
+
export type TorrentsCategory = {
|
|
1358
|
+
name?: string;
|
|
1359
|
+
savePath?: string;
|
|
1360
|
+
};
|
|
1361
|
+
export type Category = {
|
|
1362
|
+
category: string;
|
|
1363
|
+
savePath: string;
|
|
1364
|
+
};
|
|
1365
|
+
export type TorrentsTags = Hashes & {
|
|
1366
|
+
tags: Array<string>;
|
|
1367
|
+
};
|
|
1368
|
+
export type SetTorrentsValue = Hashes & {
|
|
1369
|
+
/**
|
|
1370
|
+
* `value` is a boolean, affects the torrents listed in `hashes`, default is `false`
|
|
1371
|
+
*/
|
|
1372
|
+
value: boolean;
|
|
1373
|
+
};
|
|
1374
|
+
export type RenameTorrentFiles = {
|
|
1375
|
+
/**
|
|
1376
|
+
* The hash of the torrent
|
|
1377
|
+
*/
|
|
1378
|
+
hash: string;
|
|
1379
|
+
/**
|
|
1380
|
+
* The old path of the torrent
|
|
1381
|
+
*/
|
|
1382
|
+
oldPath: string;
|
|
1383
|
+
/**
|
|
1384
|
+
* The new path to use for the file
|
|
1385
|
+
*/
|
|
1386
|
+
newPath: string;
|
|
1387
|
+
};
|
|
1388
|
+
/**
|
|
1389
|
+
* JSON encoded rule definition
|
|
1390
|
+
*
|
|
1391
|
+
* Rule definition is JSON encoded dictionary with the following fields:
|
|
1392
|
+
* | Field | Type | Description |
|
|
1393
|
+
* | ------------------------- | ------ | ------------------------------------------------------- |
|
|
1394
|
+
* | enabled | bool | Whether the rule is enabled |
|
|
1395
|
+
* | mustContain | string | The substring that the torrent name must contain |
|
|
1396
|
+
* | mustNotContain | string | The substring that the torrent name must not contain |
|
|
1397
|
+
* | useRegex | bool | Enable regex mode in "mustContain" and "mustNotContain" |
|
|
1398
|
+
* | episodeFilter | string | Episode filter definition |
|
|
1399
|
+
* | smartFilter | bool | Enable smart episode filter |
|
|
1400
|
+
* | previouslyMatchedEpisodes | list | The list of episode IDs already matched by smart filter |
|
|
1401
|
+
* | affectedFeeds | list | The feed URLs the rule applied to |
|
|
1402
|
+
* | ignoreDays | number | Ignore sunsequent rule matches |
|
|
1403
|
+
* | lastMatch | string | The rule last match time |
|
|
1404
|
+
* | addPaused | bool | Add matched torrent in paused mode |
|
|
1405
|
+
* | assignedCategory | string | Assign category to the torrent |
|
|
1406
|
+
* | savePath | string | Save torrent to the given directory |
|
|
1407
|
+
*
|
|
1408
|
+
*/
|
|
1409
|
+
export type RssRuleDef = {
|
|
1410
|
+
/**
|
|
1411
|
+
* Whether the rule is enabled
|
|
1412
|
+
*/
|
|
1413
|
+
enabled?: boolean;
|
|
1414
|
+
/**
|
|
1415
|
+
* The substring that the torrent name must contain
|
|
1416
|
+
*/
|
|
1417
|
+
mustContain?: string;
|
|
1418
|
+
/**
|
|
1419
|
+
* The substring that the torrent name must not contain
|
|
1420
|
+
*/
|
|
1421
|
+
mustNotContain?: string;
|
|
1422
|
+
/**
|
|
1423
|
+
* Enable regex mode in "mustContain" and "mustNotContain"
|
|
1424
|
+
*/
|
|
1425
|
+
useRegex?: boolean;
|
|
1426
|
+
/**
|
|
1427
|
+
* Episode filter definition
|
|
1428
|
+
*/
|
|
1429
|
+
episodeFilter?: string;
|
|
1430
|
+
/**
|
|
1431
|
+
* Enable smart episode filter
|
|
1432
|
+
*/
|
|
1433
|
+
smartFilter?: boolean;
|
|
1434
|
+
/**
|
|
1435
|
+
* The list of episode IDs already matched by smart filter
|
|
1436
|
+
*/
|
|
1437
|
+
previouslyMatchedEpisodes?: Array<number>;
|
|
1438
|
+
/**
|
|
1439
|
+
* The feed URLs the rule applied to
|
|
1440
|
+
*/
|
|
1441
|
+
affectedFeeds?: Array<string>;
|
|
1442
|
+
/**
|
|
1443
|
+
* Ignore sunsequent rule matches
|
|
1444
|
+
*/
|
|
1445
|
+
ignoreDays?: number;
|
|
1446
|
+
/**
|
|
1447
|
+
* The rule last match time
|
|
1448
|
+
*/
|
|
1449
|
+
lastMatch?: string;
|
|
1450
|
+
/**
|
|
1451
|
+
* Add matched torrent in paused mode
|
|
1452
|
+
*/
|
|
1453
|
+
addPaused?: boolean;
|
|
1454
|
+
/**
|
|
1455
|
+
* Assign category to the torrent
|
|
1456
|
+
*/
|
|
1457
|
+
assignedCategory?: string;
|
|
1458
|
+
/**
|
|
1459
|
+
* Save torrent to the given directory
|
|
1460
|
+
*/
|
|
1461
|
+
savePath?: string;
|
|
1462
|
+
};
|
|
1463
|
+
/**
|
|
1464
|
+
* The response is a JSON object with the following fields
|
|
1465
|
+
*/
|
|
1466
|
+
export type SearchJob = {
|
|
1467
|
+
/**
|
|
1468
|
+
* ID of the search job
|
|
1469
|
+
*/
|
|
1470
|
+
id?: number;
|
|
1471
|
+
};
|
|
1472
|
+
export type SearchJobStatus = SearchJob & {
|
|
1473
|
+
/**
|
|
1474
|
+
* Current status of the search job (either `Running` or `Stopped`)
|
|
1475
|
+
*/
|
|
1476
|
+
status?: 'Running' | 'Stopped';
|
|
1477
|
+
/**
|
|
1478
|
+
* Total number of results. If the status is `Running` this number may contineu to increase
|
|
1479
|
+
*/
|
|
1480
|
+
total?: number;
|
|
1481
|
+
};
|
|
1482
|
+
export type SearchResult = {
|
|
1483
|
+
/**
|
|
1484
|
+
* URL of the torrent's description page
|
|
1485
|
+
*/
|
|
1486
|
+
descrLink?: string;
|
|
1487
|
+
/**
|
|
1488
|
+
* Name of the file
|
|
1489
|
+
*/
|
|
1490
|
+
fileName?: string;
|
|
1491
|
+
/**
|
|
1492
|
+
* Size of the file in Bytes
|
|
1493
|
+
*/
|
|
1494
|
+
fileSize?: number;
|
|
1495
|
+
/**
|
|
1496
|
+
* Torrent download link (usually either .torrent file or magnet link)
|
|
1497
|
+
*/
|
|
1498
|
+
fileUrl?: string;
|
|
1499
|
+
/**
|
|
1500
|
+
* Number of leechers
|
|
1501
|
+
*/
|
|
1502
|
+
nbLeechers?: number;
|
|
1503
|
+
/**
|
|
1504
|
+
* Number of seeders
|
|
1505
|
+
*/
|
|
1506
|
+
nbSeeders?: number;
|
|
1507
|
+
/**
|
|
1508
|
+
* URL of the torrent site
|
|
1509
|
+
*/
|
|
1510
|
+
siteUrl?: string;
|
|
1511
|
+
};
|
|
1512
|
+
export type SearchResults = {
|
|
1513
|
+
results?: Array<SearchResult>;
|
|
1514
|
+
/**
|
|
1515
|
+
* Current status of the search job (either `Running` or `Stopped`)
|
|
1516
|
+
*/
|
|
1517
|
+
status?: 'Running' | 'Stopped';
|
|
1518
|
+
/**
|
|
1519
|
+
* Total number of results. If the status is `Running` this number may continue to increase
|
|
1520
|
+
*/
|
|
1521
|
+
total?: number;
|
|
1522
|
+
};
|
|
1523
|
+
export type SearchPlugin = {
|
|
1524
|
+
/**
|
|
1525
|
+
* Whether the plugin is enabled
|
|
1526
|
+
*/
|
|
1527
|
+
enabled?: boolean;
|
|
1528
|
+
/**
|
|
1529
|
+
* Full name of the plugin
|
|
1530
|
+
*/
|
|
1531
|
+
fullName?: string;
|
|
1532
|
+
/**
|
|
1533
|
+
* Short name of the plugin
|
|
1534
|
+
*/
|
|
1535
|
+
name?: string;
|
|
1536
|
+
/**
|
|
1537
|
+
* List of category objects
|
|
1538
|
+
*/
|
|
1539
|
+
supportedCategories?: Array<{
|
|
1540
|
+
id?: string;
|
|
1541
|
+
name?: string;
|
|
1542
|
+
}>;
|
|
1543
|
+
/**
|
|
1544
|
+
* URL of the torrent site
|
|
1545
|
+
*/
|
|
1546
|
+
url?: string;
|
|
1547
|
+
/**
|
|
1548
|
+
* Installed version of the plugin
|
|
1549
|
+
*/
|
|
1550
|
+
version?: string;
|
|
1551
|
+
};
|
|
1552
|
+
export type AuthLoginPostData = {
|
|
1553
|
+
/**
|
|
1554
|
+
* Example showing how to login and execute a command that requires authentication using `curl`:
|
|
1555
|
+
*
|
|
1556
|
+
* ```
|
|
1557
|
+
* $ curl -i --header 'Referer: http://localhost:8080' --data 'username=admin&password=adminadmin' http://localhost:8080/api/v2/auth/login
|
|
1558
|
+
* HTTP/1.1 200 OK
|
|
1559
|
+
* Content-Encoding:
|
|
1560
|
+
* Content-Length: 3
|
|
1561
|
+
* Content-Type: text/plain; charset=UTF-8
|
|
1562
|
+
* Set-Cookie: SID=hBc7TxF76ERhvIw0jQQ4LZ7Z1jQUV0tQ; path=/
|
|
1563
|
+
* $ curl http://localhost:8080/api/v2/torrents/info --cookie "SID=hBc7TxF76ERhvIw0jQQ4LZ7Z1jQUV0tQ"
|
|
1564
|
+
* ```
|
|
1565
|
+
*
|
|
1566
|
+
* Note: Set `Referer` or `Origin` header to the exact same domain and port as used in the HTTP query `Host` header.
|
|
1567
|
+
*
|
|
1568
|
+
*/
|
|
1569
|
+
body: {
|
|
1570
|
+
username: string;
|
|
1571
|
+
password: string;
|
|
1572
|
+
};
|
|
1573
|
+
headers?: {
|
|
1574
|
+
Referer?: string;
|
|
1575
|
+
Origin?: string;
|
|
1576
|
+
};
|
|
1577
|
+
path?: never;
|
|
1578
|
+
query?: never;
|
|
1579
|
+
url: '/auth/login';
|
|
1580
|
+
};
|
|
1581
|
+
export type AuthLoginPostErrors = {
|
|
1582
|
+
/**
|
|
1583
|
+
* User's IP is banned for too many failed login attempts
|
|
1584
|
+
*/
|
|
1585
|
+
403: unknown;
|
|
1586
|
+
};
|
|
1587
|
+
export type AuthLoginPostResponses = {
|
|
1588
|
+
/**
|
|
1589
|
+
* All other scenarios
|
|
1590
|
+
*/
|
|
1591
|
+
200: string;
|
|
1592
|
+
};
|
|
1593
|
+
export type AuthLoginPostResponse = AuthLoginPostResponses[keyof AuthLoginPostResponses];
|
|
1594
|
+
export type AuthLogoutPostData = {
|
|
1595
|
+
body?: never;
|
|
1596
|
+
path?: never;
|
|
1597
|
+
query?: never;
|
|
1598
|
+
url: '/auth/logout';
|
|
1599
|
+
};
|
|
1600
|
+
export type AuthLogoutPostResponses = {
|
|
1601
|
+
/**
|
|
1602
|
+
* All scenarios
|
|
1603
|
+
*/
|
|
1604
|
+
200: unknown;
|
|
1605
|
+
};
|
|
1606
|
+
export type AppVersionGetData = {
|
|
1607
|
+
body?: never;
|
|
1608
|
+
path?: never;
|
|
1609
|
+
query?: never;
|
|
1610
|
+
url: '/app/version';
|
|
1611
|
+
};
|
|
1612
|
+
export type AppVersionGetResponses = {
|
|
1613
|
+
/**
|
|
1614
|
+
* The response is a string with the application version, e.g. `v4.1.3`
|
|
1615
|
+
*/
|
|
1616
|
+
200: string;
|
|
1617
|
+
};
|
|
1618
|
+
export type AppVersionGetResponse = AppVersionGetResponses[keyof AppVersionGetResponses];
|
|
1619
|
+
export type AppWebapiVersionGetData = {
|
|
1620
|
+
body?: never;
|
|
1621
|
+
path?: never;
|
|
1622
|
+
query?: never;
|
|
1623
|
+
url: '/app/webapiVersion';
|
|
1624
|
+
};
|
|
1625
|
+
export type AppWebapiVersionGetResponses = {
|
|
1626
|
+
/**
|
|
1627
|
+
* The response is a string with the WebAPI version, e.g. `2.0`
|
|
1628
|
+
*/
|
|
1629
|
+
200: string;
|
|
1630
|
+
};
|
|
1631
|
+
export type AppWebapiVersionGetResponse = AppWebapiVersionGetResponses[keyof AppWebapiVersionGetResponses];
|
|
1632
|
+
export type AppBuildInfoGetData = {
|
|
1633
|
+
body?: never;
|
|
1634
|
+
path?: never;
|
|
1635
|
+
query?: never;
|
|
1636
|
+
url: '/app/buildInfo';
|
|
1637
|
+
};
|
|
1638
|
+
export type AppBuildInfoGetResponses = {
|
|
1639
|
+
/**
|
|
1640
|
+
* All scenarios- see JSON below
|
|
1641
|
+
*/
|
|
1642
|
+
200: BuildInfo;
|
|
1643
|
+
};
|
|
1644
|
+
export type AppBuildInfoGetResponse = AppBuildInfoGetResponses[keyof AppBuildInfoGetResponses];
|
|
1645
|
+
export type AppShutdownGetData = {
|
|
1646
|
+
body?: never;
|
|
1647
|
+
path?: never;
|
|
1648
|
+
query?: never;
|
|
1649
|
+
url: '/app/shutdown';
|
|
1650
|
+
};
|
|
1651
|
+
export type AppShutdownGetResponses = {
|
|
1652
|
+
/**
|
|
1653
|
+
* All scenarios
|
|
1654
|
+
*/
|
|
1655
|
+
200: unknown;
|
|
1656
|
+
};
|
|
1657
|
+
export type AppPreferencesGetData = {
|
|
1658
|
+
body?: never;
|
|
1659
|
+
path?: never;
|
|
1660
|
+
query?: never;
|
|
1661
|
+
url: '/app/preferences';
|
|
1662
|
+
};
|
|
1663
|
+
export type AppPreferencesGetResponses = {
|
|
1664
|
+
/**
|
|
1665
|
+
* All scenarios- see JSON below
|
|
1666
|
+
*/
|
|
1667
|
+
200: Preferences;
|
|
1668
|
+
};
|
|
1669
|
+
export type AppPreferencesGetResponse = AppPreferencesGetResponses[keyof AppPreferencesGetResponses];
|
|
1670
|
+
export type AppSetPreferencesPostData = {
|
|
1671
|
+
body: {
|
|
1672
|
+
json: SetPreferences;
|
|
1673
|
+
};
|
|
1674
|
+
path?: never;
|
|
1675
|
+
query?: never;
|
|
1676
|
+
url: '/app/setPreferences';
|
|
1677
|
+
};
|
|
1678
|
+
export type AppSetPreferencesPostResponses = {
|
|
1679
|
+
/**
|
|
1680
|
+
* All scenarios
|
|
1681
|
+
*/
|
|
1682
|
+
200: unknown;
|
|
1683
|
+
};
|
|
1684
|
+
export type AppDefaultSavePathGetData = {
|
|
1685
|
+
body?: never;
|
|
1686
|
+
path?: never;
|
|
1687
|
+
query?: never;
|
|
1688
|
+
url: '/app/defaultSavePath';
|
|
1689
|
+
};
|
|
1690
|
+
export type AppDefaultSavePathGetResponses = {
|
|
1691
|
+
/**
|
|
1692
|
+
* The response is a string with the default save path, e.g. `C:/Users/Dayman/Downloads`.
|
|
1693
|
+
*/
|
|
1694
|
+
200: string;
|
|
1695
|
+
};
|
|
1696
|
+
export type AppDefaultSavePathGetResponse = AppDefaultSavePathGetResponses[keyof AppDefaultSavePathGetResponses];
|
|
1697
|
+
export type LogMainPostData = {
|
|
1698
|
+
body: {
|
|
1699
|
+
/**
|
|
1700
|
+
* Include normal messages (default: `true`)
|
|
1701
|
+
*/
|
|
1702
|
+
normal: boolean;
|
|
1703
|
+
/**
|
|
1704
|
+
* Include info messages (default: `true`)
|
|
1705
|
+
*/
|
|
1706
|
+
info: boolean;
|
|
1707
|
+
/**
|
|
1708
|
+
* Include warning messages (default: `true`)
|
|
1709
|
+
*/
|
|
1710
|
+
warning: boolean;
|
|
1711
|
+
/**
|
|
1712
|
+
* Include critical messages (default: `true`)
|
|
1713
|
+
*/
|
|
1714
|
+
critical: boolean;
|
|
1715
|
+
/**
|
|
1716
|
+
* Exclude messages with "message id" <= `last_known_id` (default: `-1`)
|
|
1717
|
+
*/
|
|
1718
|
+
last_known_id: number;
|
|
1719
|
+
};
|
|
1720
|
+
path?: never;
|
|
1721
|
+
query?: never;
|
|
1722
|
+
url: '/log/main';
|
|
1723
|
+
};
|
|
1724
|
+
export type LogMainPostResponses = {
|
|
1725
|
+
/**
|
|
1726
|
+
* The response is a JSON array in which each element is an entry of the log.
|
|
1727
|
+
*
|
|
1728
|
+
* Each element of the array has the following properties:
|
|
1729
|
+
*
|
|
1730
|
+
*/
|
|
1731
|
+
200: Array<MainLog>;
|
|
1732
|
+
};
|
|
1733
|
+
export type LogMainPostResponse = LogMainPostResponses[keyof LogMainPostResponses];
|
|
1734
|
+
export type LogPeersPostData = {
|
|
1735
|
+
body: {
|
|
1736
|
+
/**
|
|
1737
|
+
* Exclude messages with "message id" <= `last_known_id` (default: `-1`)
|
|
1738
|
+
*/
|
|
1739
|
+
last_known_id: number;
|
|
1740
|
+
};
|
|
1741
|
+
path?: never;
|
|
1742
|
+
query?: never;
|
|
1743
|
+
url: '/log/peers';
|
|
1744
|
+
};
|
|
1745
|
+
export type LogPeersPostResponses = {
|
|
1746
|
+
/**
|
|
1747
|
+
* The response a JSON array. Each element of the array of objects (each object is the information relative to a peer) containing the following fields
|
|
1748
|
+
*/
|
|
1749
|
+
200: Array<PeersLog>;
|
|
1750
|
+
};
|
|
1751
|
+
export type LogPeersPostResponse = LogPeersPostResponses[keyof LogPeersPostResponses];
|
|
1752
|
+
export type SyncMaindataPostData = {
|
|
1753
|
+
body: {
|
|
1754
|
+
/**
|
|
1755
|
+
* Response ID. If not provided, `rid=0` will be assumed. If the given `rid` is different from the one of last server reply, `full_update` will be `true` (see the server reply details for more info)
|
|
1756
|
+
*/
|
|
1757
|
+
rid?: number;
|
|
1758
|
+
};
|
|
1759
|
+
path?: never;
|
|
1760
|
+
query?: never;
|
|
1761
|
+
url: '/sync/maindata';
|
|
1762
|
+
};
|
|
1763
|
+
export type SyncMaindataPostResponses = {
|
|
1764
|
+
/**
|
|
1765
|
+
* All scenarios- see JSON below
|
|
1766
|
+
*/
|
|
1767
|
+
200: MainData;
|
|
1768
|
+
};
|
|
1769
|
+
export type SyncMaindataPostResponse = SyncMaindataPostResponses[keyof SyncMaindataPostResponses];
|
|
1770
|
+
export type SyncTorrentPeersPostData = {
|
|
1771
|
+
body: {
|
|
1772
|
+
/**
|
|
1773
|
+
* Torrent hash
|
|
1774
|
+
*/
|
|
1775
|
+
hash: string;
|
|
1776
|
+
/**
|
|
1777
|
+
* Response ID. If not provided, `rid=0` will be assumed. If the given `rid` is different from the one of last server reply, `full_update` will be `true` (see the server reply details for more info)
|
|
1778
|
+
*/
|
|
1779
|
+
rid?: number;
|
|
1780
|
+
};
|
|
1781
|
+
path?: never;
|
|
1782
|
+
query?: never;
|
|
1783
|
+
url: '/sync/torrentPeers';
|
|
1784
|
+
};
|
|
1785
|
+
export type SyncTorrentPeersPostErrors = {
|
|
1786
|
+
/**
|
|
1787
|
+
* Torrent hash was not found
|
|
1788
|
+
*/
|
|
1789
|
+
404: unknown;
|
|
1790
|
+
};
|
|
1791
|
+
export type SyncTorrentPeersPostResponses = {
|
|
1792
|
+
/**
|
|
1793
|
+
* All other scenarios- see JSON below
|
|
1794
|
+
*/
|
|
1795
|
+
200: TorrentPeers;
|
|
1796
|
+
};
|
|
1797
|
+
export type SyncTorrentPeersPostResponse = SyncTorrentPeersPostResponses[keyof SyncTorrentPeersPostResponses];
|
|
1798
|
+
export type TransferInfoGetData = {
|
|
1799
|
+
body?: never;
|
|
1800
|
+
path?: never;
|
|
1801
|
+
query?: never;
|
|
1802
|
+
url: '/transfer/info';
|
|
1803
|
+
};
|
|
1804
|
+
export type TransferInfoGetResponses = {
|
|
1805
|
+
/**
|
|
1806
|
+
* All scenarios- see JSON below
|
|
1807
|
+
*/
|
|
1808
|
+
200: TransferInfo;
|
|
1809
|
+
};
|
|
1810
|
+
export type TransferInfoGetResponse = TransferInfoGetResponses[keyof TransferInfoGetResponses];
|
|
1811
|
+
export type TransferSpeedLimitsModeGetData = {
|
|
1812
|
+
body?: never;
|
|
1813
|
+
path?: never;
|
|
1814
|
+
query?: never;
|
|
1815
|
+
url: '/transfer/speedLimitsMode';
|
|
1816
|
+
};
|
|
1817
|
+
export type TransferSpeedLimitsModeGetResponses = {
|
|
1818
|
+
/**
|
|
1819
|
+
* The response is `1` if alternative speed limits are enabled, `0` otherwise.
|
|
1820
|
+
*/
|
|
1821
|
+
200: 0 | 1;
|
|
1822
|
+
};
|
|
1823
|
+
export type TransferSpeedLimitsModeGetResponse = TransferSpeedLimitsModeGetResponses[keyof TransferSpeedLimitsModeGetResponses];
|
|
1824
|
+
export type TransferToggleSpeedLimitsModeGetData = {
|
|
1825
|
+
body?: never;
|
|
1826
|
+
path?: never;
|
|
1827
|
+
query?: never;
|
|
1828
|
+
url: '/transfer/toggleSpeedLimitsMode';
|
|
1829
|
+
};
|
|
1830
|
+
export type TransferToggleSpeedLimitsModeGetResponses = {
|
|
1831
|
+
/**
|
|
1832
|
+
* All scenarios
|
|
1833
|
+
*/
|
|
1834
|
+
200: unknown;
|
|
1835
|
+
};
|
|
1836
|
+
export type TransferDownloadLimitGetData = {
|
|
1837
|
+
body?: never;
|
|
1838
|
+
path?: never;
|
|
1839
|
+
query?: never;
|
|
1840
|
+
url: '/transfer/downloadLimit';
|
|
1841
|
+
};
|
|
1842
|
+
export type TransferDownloadLimitGetResponses = {
|
|
1843
|
+
/**
|
|
1844
|
+
* The response is the value of current global download speed limit in bytes/second; this value will be zero if no limit is applied.
|
|
1845
|
+
*/
|
|
1846
|
+
200: number;
|
|
1847
|
+
};
|
|
1848
|
+
export type TransferDownloadLimitGetResponse = TransferDownloadLimitGetResponses[keyof TransferDownloadLimitGetResponses];
|
|
1849
|
+
export type TransferSetDownloadLimitPostData = {
|
|
1850
|
+
body: {
|
|
1851
|
+
/**
|
|
1852
|
+
* The global download speed limit to set in bytes/second
|
|
1853
|
+
*/
|
|
1854
|
+
limit?: number;
|
|
1855
|
+
};
|
|
1856
|
+
path?: never;
|
|
1857
|
+
query?: never;
|
|
1858
|
+
url: '/transfer/setDownloadLimit';
|
|
1859
|
+
};
|
|
1860
|
+
export type TransferSetDownloadLimitPostResponses = {
|
|
1861
|
+
/**
|
|
1862
|
+
* All scenarios
|
|
1863
|
+
*/
|
|
1864
|
+
200: unknown;
|
|
1865
|
+
};
|
|
1866
|
+
export type TransferUploadLimitGetData = {
|
|
1867
|
+
body?: never;
|
|
1868
|
+
path?: never;
|
|
1869
|
+
query?: never;
|
|
1870
|
+
url: '/transfer/uploadLimit';
|
|
1871
|
+
};
|
|
1872
|
+
export type TransferUploadLimitGetResponses = {
|
|
1873
|
+
/**
|
|
1874
|
+
* The response is the value of current global upload speed limit in bytes/second; this value will be zero if no limit is applied.
|
|
1875
|
+
*/
|
|
1876
|
+
200: number;
|
|
1877
|
+
};
|
|
1878
|
+
export type TransferUploadLimitGetResponse = TransferUploadLimitGetResponses[keyof TransferUploadLimitGetResponses];
|
|
1879
|
+
export type TransferSetUploadLimitPostData = {
|
|
1880
|
+
body: {
|
|
1881
|
+
/**
|
|
1882
|
+
* The global upload speed limit to set in bytes/second
|
|
1883
|
+
*/
|
|
1884
|
+
limit?: number;
|
|
1885
|
+
};
|
|
1886
|
+
path?: never;
|
|
1887
|
+
query?: never;
|
|
1888
|
+
url: '/transfer/setUploadLimit';
|
|
1889
|
+
};
|
|
1890
|
+
export type TransferSetUploadLimitPostResponses = {
|
|
1891
|
+
/**
|
|
1892
|
+
* All scenarios
|
|
1893
|
+
*/
|
|
1894
|
+
200: unknown;
|
|
1895
|
+
};
|
|
1896
|
+
export type TransferBanPeersPostData = {
|
|
1897
|
+
body: {
|
|
1898
|
+
/**
|
|
1899
|
+
* The peer to ban, or multiple peers separated by a pipe `|`. Each peer is a colon-separated `host:port`
|
|
1900
|
+
*/
|
|
1901
|
+
peers?: Array<string>;
|
|
1902
|
+
};
|
|
1903
|
+
path?: never;
|
|
1904
|
+
query?: never;
|
|
1905
|
+
url: '/transfer/banPeers';
|
|
1906
|
+
};
|
|
1907
|
+
export type TransferBanPeersPostResponses = {
|
|
1908
|
+
/**
|
|
1909
|
+
* All scenarios
|
|
1910
|
+
*/
|
|
1911
|
+
200: unknown;
|
|
1912
|
+
};
|
|
1913
|
+
export type TorrentsInfoPostData = {
|
|
1914
|
+
body: {
|
|
1915
|
+
/**
|
|
1916
|
+
* Filter torrent list by state. Allowed state filters: `all`, `downloading`, `seeding`, `completed`, `paused`, `active`, `inactive`, `resumed`, `stalled`, `stalled_uploading`, `stalled_downloading`, `errored`
|
|
1917
|
+
*/
|
|
1918
|
+
filter?: 'all' | 'downloading' | 'seeding' | 'completed' | 'paused' | 'active' | 'inactive' | 'resumed' | 'stalled' | 'stalled_uploading' | 'stalled_downloading' | 'errored';
|
|
1919
|
+
/**
|
|
1920
|
+
* Get torrents with the given category (empty string means "without category"; no "category" parameter means "any category" <- broken until [#11748](https://github.com/qbittorrent/qBittorrent/issues/11748) is resolved). Remember to URL-encode the category name. For example, `My category` becomes `My%20category`
|
|
1921
|
+
*/
|
|
1922
|
+
category?: string;
|
|
1923
|
+
/**
|
|
1924
|
+
* Get torrents with the given tag (empty string means "without tag"; no "tag" parameter means "any tag". Remember to URL-encode the category name. For example, `My tag` becomes `My%20tag`
|
|
1925
|
+
*/
|
|
1926
|
+
tag?: string;
|
|
1927
|
+
/**
|
|
1928
|
+
* Sort torrents by given key. They can be sorted using any field of the response's JSON array (which are documented below) as the sort key.
|
|
1929
|
+
*/
|
|
1930
|
+
sort?: string;
|
|
1931
|
+
/**
|
|
1932
|
+
* Enable reverse sorting. Defaults to `false`
|
|
1933
|
+
*/
|
|
1934
|
+
reverse?: boolean;
|
|
1935
|
+
/**
|
|
1936
|
+
* Limit the number of torrents returned
|
|
1937
|
+
*/
|
|
1938
|
+
limit?: number;
|
|
1939
|
+
/**
|
|
1940
|
+
* Set offset (if less than 0, offset from end)
|
|
1941
|
+
*/
|
|
1942
|
+
offset?: number;
|
|
1943
|
+
/**
|
|
1944
|
+
* Filter by hashes. Can contain multiple hashes separated by `|`
|
|
1945
|
+
*/
|
|
1946
|
+
hashes?: Array<string>;
|
|
1947
|
+
};
|
|
1948
|
+
path?: never;
|
|
1949
|
+
query?: never;
|
|
1950
|
+
url: '/torrents/info';
|
|
1951
|
+
};
|
|
1952
|
+
export type TorrentsInfoPostResponses = {
|
|
1953
|
+
/**
|
|
1954
|
+
* The response is a JSON array with the following fields
|
|
1955
|
+
*/
|
|
1956
|
+
200: Array<TorrentInfo>;
|
|
1957
|
+
};
|
|
1958
|
+
export type TorrentsInfoPostResponse = TorrentsInfoPostResponses[keyof TorrentsInfoPostResponses];
|
|
1959
|
+
export type TorrentsPropertiesPostData = {
|
|
1960
|
+
body: {
|
|
1961
|
+
/**
|
|
1962
|
+
* The hash of the torrent you want to get the generic properties of
|
|
1963
|
+
*/
|
|
1964
|
+
hash: string;
|
|
1965
|
+
};
|
|
1966
|
+
path?: never;
|
|
1967
|
+
query?: never;
|
|
1968
|
+
url: '/torrents/properties';
|
|
1969
|
+
};
|
|
1970
|
+
export type TorrentsPropertiesPostErrors = {
|
|
1971
|
+
/**
|
|
1972
|
+
* Torrent hash was not found
|
|
1973
|
+
*/
|
|
1974
|
+
404: unknown;
|
|
1975
|
+
};
|
|
1976
|
+
export type TorrentsPropertiesPostResponses = {
|
|
1977
|
+
/**
|
|
1978
|
+
* All other scenarios- see JSON below
|
|
1979
|
+
*/
|
|
1980
|
+
200: TorrentsProperties;
|
|
1981
|
+
};
|
|
1982
|
+
export type TorrentsPropertiesPostResponse = TorrentsPropertiesPostResponses[keyof TorrentsPropertiesPostResponses];
|
|
1983
|
+
export type TorrentsTrackersPostData = {
|
|
1984
|
+
body: {
|
|
1985
|
+
/**
|
|
1986
|
+
* The hash of the torrent you want to get the trackers of
|
|
1987
|
+
*/
|
|
1988
|
+
hash: string;
|
|
1989
|
+
};
|
|
1990
|
+
path?: never;
|
|
1991
|
+
query?: never;
|
|
1992
|
+
url: '/torrents/trackers';
|
|
1993
|
+
};
|
|
1994
|
+
export type TorrentsTrackersPostErrors = {
|
|
1995
|
+
/**
|
|
1996
|
+
* Torrent hash was not found
|
|
1997
|
+
*/
|
|
1998
|
+
404: unknown;
|
|
1999
|
+
};
|
|
2000
|
+
export type TorrentsTrackersPostResponses = {
|
|
2001
|
+
/**
|
|
2002
|
+
* The response is a JSON array, where each element contains info about one tracker, with the following fields
|
|
2003
|
+
*/
|
|
2004
|
+
200: Array<TorrentsTrackers>;
|
|
2005
|
+
};
|
|
2006
|
+
export type TorrentsTrackersPostResponse = TorrentsTrackersPostResponses[keyof TorrentsTrackersPostResponses];
|
|
2007
|
+
export type TorrentWebseedsPostData = {
|
|
2008
|
+
body: {
|
|
2009
|
+
/**
|
|
2010
|
+
* The hash of the torrent you want to get the webseeds of
|
|
2011
|
+
*/
|
|
2012
|
+
hash: string;
|
|
2013
|
+
};
|
|
2014
|
+
path?: never;
|
|
2015
|
+
query?: never;
|
|
2016
|
+
url: '/torrents/webseeds';
|
|
2017
|
+
};
|
|
2018
|
+
export type TorrentWebseedsPostErrors = {
|
|
2019
|
+
/**
|
|
2020
|
+
* Torrent hash was not found
|
|
2021
|
+
*/
|
|
2022
|
+
404: unknown;
|
|
2023
|
+
};
|
|
2024
|
+
export type TorrentWebseedsPostResponses = {
|
|
2025
|
+
/**
|
|
2026
|
+
* The response is a JSON array, where each element is information about one webseed, with the following fields
|
|
2027
|
+
*/
|
|
2028
|
+
200: Array<TorrentsWebseeds>;
|
|
2029
|
+
};
|
|
2030
|
+
export type TorrentWebseedsPostResponse = TorrentWebseedsPostResponses[keyof TorrentWebseedsPostResponses];
|
|
2031
|
+
export type TorrentsFilesPostData = {
|
|
2032
|
+
body: {
|
|
2033
|
+
/**
|
|
2034
|
+
* The hash of the torrent you want to get the contents of
|
|
2035
|
+
*/
|
|
2036
|
+
hash: string;
|
|
2037
|
+
/**
|
|
2038
|
+
* The indexes of the files you want to retrieve. `indexes` can contain multiple values separated by `|`.
|
|
2039
|
+
*/
|
|
2040
|
+
indexes?: Array<string>;
|
|
2041
|
+
};
|
|
2042
|
+
path?: never;
|
|
2043
|
+
query?: never;
|
|
2044
|
+
url: '/torrents/files';
|
|
2045
|
+
};
|
|
2046
|
+
export type TorrentsFilesPostErrors = {
|
|
2047
|
+
/**
|
|
2048
|
+
* Torrent hash was not found
|
|
2049
|
+
*/
|
|
2050
|
+
404: unknown;
|
|
2051
|
+
};
|
|
2052
|
+
export type TorrentsFilesPostResponses = {
|
|
2053
|
+
/**
|
|
2054
|
+
* The response is:
|
|
2055
|
+
* - empty, if the torrent hash is invalid
|
|
2056
|
+
* - otherwise, a JSON array, where each element contains info about one file, with the following fields
|
|
2057
|
+
*
|
|
2058
|
+
*/
|
|
2059
|
+
200: Array<TorrentsFiles>;
|
|
2060
|
+
};
|
|
2061
|
+
export type TorrentsFilesPostResponse = TorrentsFilesPostResponses[keyof TorrentsFilesPostResponses];
|
|
2062
|
+
export type TorrentsPieceStatesPostData = {
|
|
2063
|
+
body: {
|
|
2064
|
+
/**
|
|
2065
|
+
* The hash of the torrent you want to get the pieces' states of
|
|
2066
|
+
*/
|
|
2067
|
+
hash: string;
|
|
2068
|
+
};
|
|
2069
|
+
path?: never;
|
|
2070
|
+
query?: never;
|
|
2071
|
+
url: '/torrents/pieceStates';
|
|
2072
|
+
};
|
|
2073
|
+
export type TorrentsPieceStatesPostErrors = {
|
|
2074
|
+
/**
|
|
2075
|
+
* Torrent hash was not found
|
|
2076
|
+
*/
|
|
2077
|
+
404: unknown;
|
|
2078
|
+
};
|
|
2079
|
+
export type TorrentsPieceStatesPostResponses = {
|
|
2080
|
+
/**
|
|
2081
|
+
* The response is:
|
|
2082
|
+
* - empty, if the torrent hash is invalid
|
|
2083
|
+
* - otherwise, an array of states (integers) of all pieces (in order) of a specific torrent.
|
|
2084
|
+
*
|
|
2085
|
+
* Value meanings are defined as below:
|
|
2086
|
+
* | Value | Description |
|
|
2087
|
+
* | ----- | ------------------ |
|
|
2088
|
+
* | 0 | Not downloaded yet |
|
|
2089
|
+
* | 1 | Now downloading |
|
|
2090
|
+
* | 2 | Already downloaded |
|
|
2091
|
+
*
|
|
2092
|
+
*/
|
|
2093
|
+
200: Array<0 | 1 | 2>;
|
|
2094
|
+
};
|
|
2095
|
+
export type TorrentsPieceStatesPostResponse = TorrentsPieceStatesPostResponses[keyof TorrentsPieceStatesPostResponses];
|
|
2096
|
+
export type TorrentsPieceHashesPostData = {
|
|
2097
|
+
body: {
|
|
2098
|
+
/**
|
|
2099
|
+
* The hash of the torrent you want to get the pieces' hashes of
|
|
2100
|
+
*/
|
|
2101
|
+
hash: string;
|
|
2102
|
+
};
|
|
2103
|
+
path?: never;
|
|
2104
|
+
query?: never;
|
|
2105
|
+
url: '/torrents/pieceHashes';
|
|
2106
|
+
};
|
|
2107
|
+
export type TorrentsPieceHashesPostErrors = {
|
|
2108
|
+
/**
|
|
2109
|
+
* Torrent hash was not found
|
|
2110
|
+
*/
|
|
2111
|
+
404: unknown;
|
|
2112
|
+
};
|
|
2113
|
+
export type TorrentsPieceHashesPostResponses = {
|
|
2114
|
+
/**
|
|
2115
|
+
* The response is:
|
|
2116
|
+
* - empty, if the torrent hash is invalid
|
|
2117
|
+
* - otherwise, an array of hashes (strings) of all pieces (in order) of a specific torrent.
|
|
2118
|
+
*
|
|
2119
|
+
*/
|
|
2120
|
+
200: Array<string>;
|
|
2121
|
+
};
|
|
2122
|
+
export type TorrentsPieceHashesPostResponse = TorrentsPieceHashesPostResponses[keyof TorrentsPieceHashesPostResponses];
|
|
2123
|
+
export type TorrentsPausePostData = {
|
|
2124
|
+
/**
|
|
2125
|
+
* The hashes of the torrents you want to pause. `hashes` can contain multiple hashes separated by `|`, to pause multiple torrents, or set to `all`, to pause all torrents.
|
|
2126
|
+
*/
|
|
2127
|
+
body: Hashes;
|
|
2128
|
+
path?: never;
|
|
2129
|
+
query?: never;
|
|
2130
|
+
url: '/torrents/pause';
|
|
2131
|
+
};
|
|
2132
|
+
export type TorrentsPausePostResponses = {
|
|
2133
|
+
/**
|
|
2134
|
+
* All scenarios
|
|
2135
|
+
*/
|
|
2136
|
+
200: unknown;
|
|
2137
|
+
};
|
|
2138
|
+
export type TorrentsResumePostData = {
|
|
2139
|
+
/**
|
|
2140
|
+
* The hashes of the torrents you want to resume. `hashes` can contain multiple hashes separated by `|`, to resume multiple torrents, or set to `all`, to resume all torrents.
|
|
2141
|
+
*/
|
|
2142
|
+
body: Hashes;
|
|
2143
|
+
path?: never;
|
|
2144
|
+
query?: never;
|
|
2145
|
+
url: '/torrents/resume';
|
|
2146
|
+
};
|
|
2147
|
+
export type TorrentsResumePostResponses = {
|
|
2148
|
+
/**
|
|
2149
|
+
* All scenarios
|
|
2150
|
+
*/
|
|
2151
|
+
200: unknown;
|
|
2152
|
+
};
|
|
2153
|
+
export type TorrentsDeletePostData = {
|
|
2154
|
+
/**
|
|
2155
|
+
* The hashes of the torrents you want to delete. `hashes` can contain multiple hashes separated by `|`, to delete multiple torrents, or set to `all`, to delete all torrents.
|
|
2156
|
+
*/
|
|
2157
|
+
body: Hashes & {
|
|
2158
|
+
/**
|
|
2159
|
+
* If set to `true`, the downloaded data will also be deleted, otherwise has no effect.
|
|
2160
|
+
*/
|
|
2161
|
+
deleteFiles: boolean;
|
|
2162
|
+
};
|
|
2163
|
+
path?: never;
|
|
2164
|
+
query?: never;
|
|
2165
|
+
url: '/torrents/delete';
|
|
2166
|
+
};
|
|
2167
|
+
export type TorrentsDeletePostResponses = {
|
|
2168
|
+
/**
|
|
2169
|
+
* All scenarios
|
|
2170
|
+
*/
|
|
2171
|
+
200: unknown;
|
|
2172
|
+
};
|
|
2173
|
+
export type TorrentsRecheckPostData = {
|
|
2174
|
+
/**
|
|
2175
|
+
* The hashes of the torrents you want to recheck. `hashes` can contain multiple hashes separated by `|`, to recheck multiple torrents, or set to `all`, to recheck all torrents.
|
|
2176
|
+
*/
|
|
2177
|
+
body: Hashes;
|
|
2178
|
+
path?: never;
|
|
2179
|
+
query?: never;
|
|
2180
|
+
url: '/torrents/recheck';
|
|
2181
|
+
};
|
|
2182
|
+
export type TorrentsRecheckPostResponses = {
|
|
2183
|
+
/**
|
|
2184
|
+
* All scenarios
|
|
2185
|
+
*/
|
|
2186
|
+
200: unknown;
|
|
2187
|
+
};
|
|
2188
|
+
export type TorrentsReannouncePostData = {
|
|
2189
|
+
/**
|
|
2190
|
+
* The hashes of the torrents you want to reannounce. `hashes` can contain multiple hashes separated by `|`, to reannounce multiple torrents, or set to `all`, to reannounce all torrents.
|
|
2191
|
+
*/
|
|
2192
|
+
body: Hashes;
|
|
2193
|
+
path?: never;
|
|
2194
|
+
query?: never;
|
|
2195
|
+
url: '/torrents/reannounce';
|
|
2196
|
+
};
|
|
2197
|
+
export type TorrentsReannouncePostResponses = {
|
|
2198
|
+
/**
|
|
2199
|
+
* All scenarios
|
|
2200
|
+
*/
|
|
2201
|
+
200: unknown;
|
|
2202
|
+
};
|
|
2203
|
+
export type TorrentsAddPostData = {
|
|
2204
|
+
/**
|
|
2205
|
+
* Add torrent from URLs example:
|
|
2206
|
+
* ```
|
|
2207
|
+
* POST /api/v2/torrents/add HTTP/1.1
|
|
2208
|
+
* User-Agent: Fiddler
|
|
2209
|
+
* Host: 127.0.0.1
|
|
2210
|
+
* Cookie: SID=your_sid
|
|
2211
|
+
* Content-Type: multipart/form-data; boundary=---------------------------6688794727912
|
|
2212
|
+
* Content-Length: length
|
|
2213
|
+
*
|
|
2214
|
+
* -----------------------------6688794727912
|
|
2215
|
+
* Content-Disposition: form-data; name="urls"
|
|
2216
|
+
*
|
|
2217
|
+
* https://torcache.net/torrent/3B1A1469C180F447B77021074DBBCCAEF62611E7.torrent
|
|
2218
|
+
* https://torcache.net/torrent/3B1A1469C180F447B77021074DBBCCAEF62611E8.torrent
|
|
2219
|
+
* -----------------------------6688794727912
|
|
2220
|
+
* Content-Disposition: form-data; name="savepath"
|
|
2221
|
+
*
|
|
2222
|
+
* C:/Users/qBit/Downloads
|
|
2223
|
+
* -----------------------------6688794727912
|
|
2224
|
+
* Content-Disposition: form-data; name="cookie"
|
|
2225
|
+
*
|
|
2226
|
+
* ui=28979218048197
|
|
2227
|
+
* -----------------------------6688794727912
|
|
2228
|
+
* Content-Disposition: form-data; name="category"
|
|
2229
|
+
*
|
|
2230
|
+
* movies
|
|
2231
|
+
* -----------------------------6688794727912
|
|
2232
|
+
* Content-Disposition: form-data; name="skip_checking"
|
|
2233
|
+
*
|
|
2234
|
+
* true
|
|
2235
|
+
* -----------------------------6688794727912
|
|
2236
|
+
* Content-Disposition: form-data; name="paused"
|
|
2237
|
+
*
|
|
2238
|
+
* true
|
|
2239
|
+
* -----------------------------6688794727912
|
|
2240
|
+
* Content-Disposition: form-data; name="root_folder"
|
|
2241
|
+
*
|
|
2242
|
+
* true
|
|
2243
|
+
* -----------------------------6688794727912--
|
|
2244
|
+
* ```
|
|
2245
|
+
*
|
|
2246
|
+
* Add torrents from files example:
|
|
2247
|
+
* ```
|
|
2248
|
+
* POST /api/v2/torrents/add HTTP/1.1
|
|
2249
|
+
* Content-Type: multipart/form-data; boundary=-------------------------acebdf13572468
|
|
2250
|
+
* User-Agent: Fiddler
|
|
2251
|
+
* Host: 127.0.0.1
|
|
2252
|
+
* Cookie: SID=your_sid
|
|
2253
|
+
* Content-Length: length
|
|
2254
|
+
*
|
|
2255
|
+
* ---------------------------acebdf13572468
|
|
2256
|
+
* Content-Disposition: form-data; name="torrents"; filename="8f18036b7a205c9347cb84a253975e12f7adddf2.torrent"
|
|
2257
|
+
* Content-Type: application/x-bittorrent
|
|
2258
|
+
*
|
|
2259
|
+
* file_binary_data_goes_here
|
|
2260
|
+
* ---------------------------acebdf13572468
|
|
2261
|
+
* Content-Disposition: form-data; name="torrents"; filename="UFS.torrent"
|
|
2262
|
+
* Content-Type: application/x-bittorrent
|
|
2263
|
+
*
|
|
2264
|
+
* file_binary_data_goes_here
|
|
2265
|
+
* ---------------------------acebdf13572468--
|
|
2266
|
+
* ```
|
|
2267
|
+
* The above example will add two torrent files. `file_binary_data_goes_here` represents raw data of torrent file (basically a byte array).
|
|
2268
|
+
*
|
|
2269
|
+
*/
|
|
2270
|
+
body: AddTorrentsUrls | AddTorrentsFiles;
|
|
2271
|
+
path?: never;
|
|
2272
|
+
query?: never;
|
|
2273
|
+
url: '/torrents/add';
|
|
2274
|
+
};
|
|
2275
|
+
export type TorrentsAddPostErrors = {
|
|
2276
|
+
/**
|
|
2277
|
+
* Torrent file is not valid
|
|
2278
|
+
*/
|
|
2279
|
+
415: unknown;
|
|
2280
|
+
};
|
|
2281
|
+
export type TorrentsAddPostResponses = {
|
|
2282
|
+
/**
|
|
2283
|
+
* All other scenarios
|
|
2284
|
+
*/
|
|
2285
|
+
200: unknown;
|
|
2286
|
+
};
|
|
2287
|
+
export type TorrentsAddTrackersPostData = {
|
|
2288
|
+
/**
|
|
2289
|
+
* ```
|
|
2290
|
+
* POST /api/v2/torrents/addTrackers HTTP/1.1
|
|
2291
|
+
* User-Agent: Fiddler
|
|
2292
|
+
* Host: 127.0.0.1
|
|
2293
|
+
* Cookie: SID=your_sid
|
|
2294
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2295
|
+
* Content-Length: length
|
|
2296
|
+
*
|
|
2297
|
+
* hash=8c212779b4abde7c6bc608063a0d008b7e40ce32&urls=http://192.168.0.1/announce%0Audp://192.168.0.1:3333/dummyAnnounce
|
|
2298
|
+
* ```
|
|
2299
|
+
* This adds two trackers to torrent with hash `8c212779b4abde7c6bc608063a0d008b7e40ce32`. Note `%0A` (aka LF newline) between trackers. Ampersand in tracker urls MUST be escaped.
|
|
2300
|
+
*
|
|
2301
|
+
*/
|
|
2302
|
+
body: {
|
|
2303
|
+
hash: string;
|
|
2304
|
+
urls: string;
|
|
2305
|
+
};
|
|
2306
|
+
path?: never;
|
|
2307
|
+
query?: never;
|
|
2308
|
+
url: '/torrents/addTrackers';
|
|
2309
|
+
};
|
|
2310
|
+
export type TorrentsAddTrackersPostErrors = {
|
|
2311
|
+
/**
|
|
2312
|
+
* Torrent hash was not found
|
|
2313
|
+
*/
|
|
2314
|
+
404: unknown;
|
|
2315
|
+
};
|
|
2316
|
+
export type TorrentsAddTrackersPostResponses = {
|
|
2317
|
+
/**
|
|
2318
|
+
* All other scenarios- see JSON below
|
|
2319
|
+
*/
|
|
2320
|
+
200: unknown;
|
|
2321
|
+
};
|
|
2322
|
+
export type TorrentsEditTrackerPostData = {
|
|
2323
|
+
body: {
|
|
2324
|
+
/**
|
|
2325
|
+
* The hash of the torrent
|
|
2326
|
+
*/
|
|
2327
|
+
hash: string;
|
|
2328
|
+
/**
|
|
2329
|
+
* The tracker URL you want to edit
|
|
2330
|
+
*/
|
|
2331
|
+
origUrl: string;
|
|
2332
|
+
/**
|
|
2333
|
+
* The new URL to replace the `origUrl`
|
|
2334
|
+
*/
|
|
2335
|
+
newUrl: string;
|
|
2336
|
+
};
|
|
2337
|
+
path?: never;
|
|
2338
|
+
query?: never;
|
|
2339
|
+
url: '/torrents/editTracker';
|
|
2340
|
+
};
|
|
2341
|
+
export type TorrentsEditTrackerPostErrors = {
|
|
2342
|
+
/**
|
|
2343
|
+
* `newUrl` is not a valid URL
|
|
2344
|
+
*/
|
|
2345
|
+
400: unknown;
|
|
2346
|
+
/**
|
|
2347
|
+
* Torrent hash was not found
|
|
2348
|
+
*/
|
|
2349
|
+
404: unknown;
|
|
2350
|
+
/**
|
|
2351
|
+
* `newUrl` already exists for the torrent or `origUrl` was not found
|
|
2352
|
+
*/
|
|
2353
|
+
409: unknown;
|
|
2354
|
+
};
|
|
2355
|
+
export type TorrentsEditTrackerPostResponses = {
|
|
2356
|
+
/**
|
|
2357
|
+
* All other scenarios
|
|
2358
|
+
*/
|
|
2359
|
+
200: unknown;
|
|
2360
|
+
};
|
|
2361
|
+
export type TorrentsRemoveTrackersPostData = {
|
|
2362
|
+
body: {
|
|
2363
|
+
/**
|
|
2364
|
+
* The hash of the torrent
|
|
2365
|
+
*/
|
|
2366
|
+
hash: string;
|
|
2367
|
+
/**
|
|
2368
|
+
* URLs to remove, separated by `|`
|
|
2369
|
+
*/
|
|
2370
|
+
urls: Array<string>;
|
|
2371
|
+
};
|
|
2372
|
+
path?: never;
|
|
2373
|
+
query?: never;
|
|
2374
|
+
url: '/torrents/removeTrackers';
|
|
2375
|
+
};
|
|
2376
|
+
export type TorrentsRemoveTrackersPostErrors = {
|
|
2377
|
+
/**
|
|
2378
|
+
* Torrent hash was not found
|
|
2379
|
+
*/
|
|
2380
|
+
404: unknown;
|
|
2381
|
+
/**
|
|
2382
|
+
* All `urls` were not found
|
|
2383
|
+
*/
|
|
2384
|
+
409: unknown;
|
|
2385
|
+
};
|
|
2386
|
+
export type TorrentsRemoveTrackersPostResponses = {
|
|
2387
|
+
/**
|
|
2388
|
+
* All other scenarios
|
|
2389
|
+
*/
|
|
2390
|
+
200: unknown;
|
|
2391
|
+
};
|
|
2392
|
+
export type TorrentsAddPeersPostData = {
|
|
2393
|
+
body: {
|
|
2394
|
+
/**
|
|
2395
|
+
* The hash of the torrent, or multiple hashes separated by a pipe `|`
|
|
2396
|
+
*/
|
|
2397
|
+
hashes: Array<string>;
|
|
2398
|
+
/**
|
|
2399
|
+
* The peer to add, or multiple peers separated by a pipe `|`. Each peer is a colon-separated `host:port`
|
|
2400
|
+
*/
|
|
2401
|
+
peers: Array<string>;
|
|
2402
|
+
};
|
|
2403
|
+
path?: never;
|
|
2404
|
+
query?: never;
|
|
2405
|
+
url: '/torrents/addPeers';
|
|
2406
|
+
};
|
|
2407
|
+
export type TorrentsAddPeersPostErrors = {
|
|
2408
|
+
/**
|
|
2409
|
+
* None of the supplied peers are valid
|
|
2410
|
+
*/
|
|
2411
|
+
400: unknown;
|
|
2412
|
+
};
|
|
2413
|
+
export type TorrentsAddPeersPostResponses = {
|
|
2414
|
+
/**
|
|
2415
|
+
* All other scenarios
|
|
2416
|
+
*/
|
|
2417
|
+
200: unknown;
|
|
2418
|
+
};
|
|
2419
|
+
export type TorrentsIncreasePrioPostData = {
|
|
2420
|
+
/**
|
|
2421
|
+
* The hashes of the torrents you want to increase the priority of. `hashes` can contain multiple hashes separated by `|`, to increase the priority of multiple torrents, or set to `all`, to increase the priority of all torrents.
|
|
2422
|
+
*/
|
|
2423
|
+
body: Hashes;
|
|
2424
|
+
path?: never;
|
|
2425
|
+
query?: never;
|
|
2426
|
+
url: '/torrents/increasePrio';
|
|
2427
|
+
};
|
|
2428
|
+
export type TorrentsIncreasePrioPostErrors = {
|
|
2429
|
+
/**
|
|
2430
|
+
* Torrent queueing is not enabled
|
|
2431
|
+
*/
|
|
2432
|
+
409: unknown;
|
|
2433
|
+
};
|
|
2434
|
+
export type TorrentsIncreasePrioPostResponses = {
|
|
2435
|
+
/**
|
|
2436
|
+
* All other scenarios
|
|
2437
|
+
*/
|
|
2438
|
+
200: unknown;
|
|
2439
|
+
};
|
|
2440
|
+
export type TorrentsDecreasePrioPostData = {
|
|
2441
|
+
/**
|
|
2442
|
+
* The hashes of the torrents you want to decrease the priority of. `hashes` can contain multiple hashes separated by `|`, to decrease the priority of multiple torrents, or set to `all`, to decrease the priority of all torrents.
|
|
2443
|
+
*/
|
|
2444
|
+
body: Hashes;
|
|
2445
|
+
path?: never;
|
|
2446
|
+
query?: never;
|
|
2447
|
+
url: '/torrents/decreasePrio';
|
|
2448
|
+
};
|
|
2449
|
+
export type TorrentsDecreasePrioPostErrors = {
|
|
2450
|
+
/**
|
|
2451
|
+
* Torrent queueing is not enabled
|
|
2452
|
+
*/
|
|
2453
|
+
409: unknown;
|
|
2454
|
+
};
|
|
2455
|
+
export type TorrentsDecreasePrioPostResponses = {
|
|
2456
|
+
/**
|
|
2457
|
+
* All other scenarios
|
|
2458
|
+
*/
|
|
2459
|
+
200: unknown;
|
|
2460
|
+
};
|
|
2461
|
+
export type TorrentsTopPrioPostData = {
|
|
2462
|
+
/**
|
|
2463
|
+
* The hashes of the torrents you want to set to the maximum priority. `hashes` can contain multiple hashes separated by `|`, to set multiple torrents to the maximum priority, or set to `all`, to set all torrents to the maximum priority.
|
|
2464
|
+
*/
|
|
2465
|
+
body: Hashes;
|
|
2466
|
+
path?: never;
|
|
2467
|
+
query?: never;
|
|
2468
|
+
url: '/torrents/topPrio';
|
|
2469
|
+
};
|
|
2470
|
+
export type TorrentsTopPrioPostErrors = {
|
|
2471
|
+
/**
|
|
2472
|
+
* Torrent queueing is not enabled
|
|
2473
|
+
*/
|
|
2474
|
+
409: unknown;
|
|
2475
|
+
};
|
|
2476
|
+
export type TorrentsTopPrioPostResponses = {
|
|
2477
|
+
/**
|
|
2478
|
+
* All other scenarios
|
|
2479
|
+
*/
|
|
2480
|
+
200: unknown;
|
|
2481
|
+
};
|
|
2482
|
+
export type TorrentsBottomPrioPostData = {
|
|
2483
|
+
/**
|
|
2484
|
+
* The hashes of the torrents you want to set to the minimum priority. `hashes` can contain multiple hashes separated by `|`, to set multiple torrents to the minimum priority, or set to `all`, to set all torrents to the minimum priority.
|
|
2485
|
+
*/
|
|
2486
|
+
body: Hashes;
|
|
2487
|
+
path?: never;
|
|
2488
|
+
query?: never;
|
|
2489
|
+
url: '/torrents/bottomPrio';
|
|
2490
|
+
};
|
|
2491
|
+
export type TorrentsBottomPrioPostErrors = {
|
|
2492
|
+
/**
|
|
2493
|
+
* Torrent queueing is not enabled
|
|
2494
|
+
*/
|
|
2495
|
+
409: unknown;
|
|
2496
|
+
};
|
|
2497
|
+
export type TorrentsBottomPrioPostResponses = {
|
|
2498
|
+
/**
|
|
2499
|
+
* All other scenarios
|
|
2500
|
+
*/
|
|
2501
|
+
200: unknown;
|
|
2502
|
+
};
|
|
2503
|
+
export type TorrentsFilePrioPostData = {
|
|
2504
|
+
/**
|
|
2505
|
+
* `id` values correspond to file position inside the array returned by [torrent contents API](https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#get-torrent-contents), e.g. `id=0` for first file, `id=1` for second file, etc.
|
|
2506
|
+
*
|
|
2507
|
+
* Since 2.8.2 it is reccomended to use `index` field returned by [torrent contents API](https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#get-torrent-contents) (since the files can be filtered and the `index` value may differ from the position inside the response array).
|
|
2508
|
+
*
|
|
2509
|
+
*/
|
|
2510
|
+
body: {
|
|
2511
|
+
/**
|
|
2512
|
+
* The hash of the torrent
|
|
2513
|
+
*/
|
|
2514
|
+
hash: string;
|
|
2515
|
+
/**
|
|
2516
|
+
* File ids, separated by `|`
|
|
2517
|
+
*/
|
|
2518
|
+
id: Array<number>;
|
|
2519
|
+
/**
|
|
2520
|
+
* File priority to set (consult [torrent contents API](https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#get-torrent-contents) for possible values)
|
|
2521
|
+
*/
|
|
2522
|
+
priority: 0 | 1 | 6 | 7;
|
|
2523
|
+
};
|
|
2524
|
+
path?: never;
|
|
2525
|
+
query?: never;
|
|
2526
|
+
url: '/torrents/filePrio';
|
|
2527
|
+
};
|
|
2528
|
+
export type TorrentsFilePrioPostErrors = {
|
|
2529
|
+
/**
|
|
2530
|
+
* Priority is invalid or At least one file `id` is not a valid integer
|
|
2531
|
+
*/
|
|
2532
|
+
400: unknown;
|
|
2533
|
+
/**
|
|
2534
|
+
* Torrent hash was not found
|
|
2535
|
+
*/
|
|
2536
|
+
404: unknown;
|
|
2537
|
+
/**
|
|
2538
|
+
* Torrent metadata hasn't downloaded yet or At least one file `id` was not found
|
|
2539
|
+
*/
|
|
2540
|
+
409: unknown;
|
|
2541
|
+
};
|
|
2542
|
+
export type TorrentsFilePrioPostResponses = {
|
|
2543
|
+
/**
|
|
2544
|
+
* All other scenarios
|
|
2545
|
+
*/
|
|
2546
|
+
200: unknown;
|
|
2547
|
+
};
|
|
2548
|
+
export type TorrentsDownloadLimitPostData = {
|
|
2549
|
+
/**
|
|
2550
|
+
* ```
|
|
2551
|
+
* POST /api/v2/torrents/downloadLimit HTTP/1.1
|
|
2552
|
+
* User-Agent: Fiddler
|
|
2553
|
+
* Host: 127.0.0.1
|
|
2554
|
+
* Cookie: SID=your_sid
|
|
2555
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2556
|
+
* Content-Length: length
|
|
2557
|
+
*
|
|
2558
|
+
* hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0
|
|
2559
|
+
* ```
|
|
2560
|
+
* `hashes` can contain multiple hashes separated by `|` or set to `all`
|
|
2561
|
+
*
|
|
2562
|
+
* Server reply (example):
|
|
2563
|
+
* ```
|
|
2564
|
+
* HTTP/1.1 200 OK
|
|
2565
|
+
* content-type: application/json
|
|
2566
|
+
* content-length: length
|
|
2567
|
+
*
|
|
2568
|
+
* {"8c212779b4abde7c6bc608063a0d008b7e40ce32":338944,"284b83c9c7935002391129fd97f43db5d7cc2ba0":123}
|
|
2569
|
+
* ```
|
|
2570
|
+
* `8c212779b4abde7c6bc608063a0d008b7e40ce32` is the hash of the torrent and `338944` its download speed limit in bytes per second; this value will be zero if no limit is applied.
|
|
2571
|
+
*
|
|
2572
|
+
*/
|
|
2573
|
+
body: Hashes;
|
|
2574
|
+
path?: never;
|
|
2575
|
+
query?: never;
|
|
2576
|
+
url: '/torrents/downloadLimit';
|
|
2577
|
+
};
|
|
2578
|
+
export type TorrentsDownloadLimitPostResponses = {
|
|
2579
|
+
/**
|
|
2580
|
+
* All scenarios
|
|
2581
|
+
*/
|
|
2582
|
+
200: TorrentsLimit;
|
|
2583
|
+
};
|
|
2584
|
+
export type TorrentsDownloadLimitPostResponse = TorrentsDownloadLimitPostResponses[keyof TorrentsDownloadLimitPostResponses];
|
|
2585
|
+
export type TorrentsSetDownloadLimitPostData = {
|
|
2586
|
+
/**
|
|
2587
|
+
* ```
|
|
2588
|
+
* POST /api/v2/torrents/setDownloadLimit HTTP/1.1
|
|
2589
|
+
* User-Agent: Fiddler
|
|
2590
|
+
* Host: 127.0.0.1
|
|
2591
|
+
* Cookie: SID=your_sid
|
|
2592
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2593
|
+
* Content-Length: length
|
|
2594
|
+
*
|
|
2595
|
+
* hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&limit=131072
|
|
2596
|
+
* ```
|
|
2597
|
+
* `hashes` can contain multiple hashes separated by `|` or set to `all` `limit` is the download speed limit in bytes per second you want to set.
|
|
2598
|
+
*
|
|
2599
|
+
*/
|
|
2600
|
+
body: SetTorrentsLimit;
|
|
2601
|
+
path?: never;
|
|
2602
|
+
query?: never;
|
|
2603
|
+
url: '/torrents/setDownloadLimit';
|
|
2604
|
+
};
|
|
2605
|
+
export type TorrentsSetDownloadLimitPostResponses = {
|
|
2606
|
+
/**
|
|
2607
|
+
* All scenarios
|
|
2608
|
+
*/
|
|
2609
|
+
200: unknown;
|
|
2610
|
+
};
|
|
2611
|
+
export type TorrentsSetShareLimitsPostData = {
|
|
2612
|
+
/**
|
|
2613
|
+
* ```
|
|
2614
|
+
* POST /api/v2/torrents/setShareLimits HTTP/1.1
|
|
2615
|
+
* User-Agent: Fiddler
|
|
2616
|
+
* Host: 127.0.0.1
|
|
2617
|
+
* Cookie: SID=your_sid
|
|
2618
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2619
|
+
* Content-Length: length
|
|
2620
|
+
*
|
|
2621
|
+
* hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&ratioLimit=1.0&seedingTimeLimit=60
|
|
2622
|
+
* ```
|
|
2623
|
+
* `hashes` can contain multiple hashes separated by `|` or set to `all`
|
|
2624
|
+
*
|
|
2625
|
+
*/
|
|
2626
|
+
body: Hashes & {
|
|
2627
|
+
/**
|
|
2628
|
+
* `ratioLimit` is the max ratio the torrent should be seeded until. `-2` means the global limit should be used, -1 means no limit.
|
|
2629
|
+
*/
|
|
2630
|
+
ratioLimit: number;
|
|
2631
|
+
/**
|
|
2632
|
+
* `seedingTimeLimit` is the max amount of time the torrent should be seeded. `-2` means the global limit should be used, `-1` means no limit.
|
|
2633
|
+
*/
|
|
2634
|
+
seedingTimeLimit: number;
|
|
2635
|
+
};
|
|
2636
|
+
path?: never;
|
|
2637
|
+
query?: never;
|
|
2638
|
+
url: '/torrents/setShareLimits';
|
|
2639
|
+
};
|
|
2640
|
+
export type TorrentsSetShareLimitsPostResponses = {
|
|
2641
|
+
/**
|
|
2642
|
+
* All scenarios
|
|
2643
|
+
*/
|
|
2644
|
+
200: unknown;
|
|
2645
|
+
};
|
|
2646
|
+
export type TorrentsUploadLimitPostData = {
|
|
2647
|
+
/**
|
|
2648
|
+
* ```
|
|
2649
|
+
* POST /api/v2/torrents/uploadLimit HTTP/1.1
|
|
2650
|
+
* User-Agent: Fiddler
|
|
2651
|
+
* Host: 127.0.0.1
|
|
2652
|
+
* Cookie: SID=your_sid
|
|
2653
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2654
|
+
* Content-Length: length
|
|
2655
|
+
*
|
|
2656
|
+
* hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0
|
|
2657
|
+
* ```
|
|
2658
|
+
* `hashes` can contain multiple hashes separated by `|` or set to `all`
|
|
2659
|
+
*
|
|
2660
|
+
* Server reply (example):
|
|
2661
|
+
* ```
|
|
2662
|
+
* HTTP/1.1 200 OK
|
|
2663
|
+
* content-type: application/json
|
|
2664
|
+
* content-length: length
|
|
2665
|
+
*
|
|
2666
|
+
* {"8c212779b4abde7c6bc608063a0d008b7e40ce32":338944,"284b83c9c7935002391129fd97f43db5d7cc2ba0":123}
|
|
2667
|
+
* ```
|
|
2668
|
+
* `8c212779b4abde7c6bc608063a0d008b7e40ce32` is the hash of the torrent in the request and `338944` its upload speed limit in bytes per second; this value will be zero if no limit is applied.
|
|
2669
|
+
*
|
|
2670
|
+
*/
|
|
2671
|
+
body: Hashes;
|
|
2672
|
+
path?: never;
|
|
2673
|
+
query?: never;
|
|
2674
|
+
url: '/torrents/uploadLimit';
|
|
2675
|
+
};
|
|
2676
|
+
export type TorrentsUploadLimitPostResponses = {
|
|
2677
|
+
/**
|
|
2678
|
+
* All scenarios
|
|
2679
|
+
*/
|
|
2680
|
+
200: TorrentsLimit;
|
|
2681
|
+
};
|
|
2682
|
+
export type TorrentsUploadLimitPostResponse = TorrentsUploadLimitPostResponses[keyof TorrentsUploadLimitPostResponses];
|
|
2683
|
+
export type TorrentsSetUploadLimitPostData = {
|
|
2684
|
+
/**
|
|
2685
|
+
* ```
|
|
2686
|
+
* POST /api/v2/torrents/setUploadLimit HTTP/1.1
|
|
2687
|
+
* User-Agent: Fiddler
|
|
2688
|
+
* Host: 127.0.0.1
|
|
2689
|
+
* Cookie: SID=your_sid
|
|
2690
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2691
|
+
* Content-Length: length
|
|
2692
|
+
*
|
|
2693
|
+
* hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&limit=131072
|
|
2694
|
+
* ```
|
|
2695
|
+
* `hashes` can contain multiple hashes separated by `|` or set to `all` `limit` is the upload speed limit in bytes per second you want to set.
|
|
2696
|
+
*
|
|
2697
|
+
*/
|
|
2698
|
+
body: SetTorrentsLimit;
|
|
2699
|
+
path?: never;
|
|
2700
|
+
query?: never;
|
|
2701
|
+
url: '/torrents/setUploadLimit';
|
|
2702
|
+
};
|
|
2703
|
+
export type TorrentsSetUploadLimitPostResponses = {
|
|
2704
|
+
/**
|
|
2705
|
+
* All scenarios
|
|
2706
|
+
*/
|
|
2707
|
+
200: unknown;
|
|
2708
|
+
};
|
|
2709
|
+
export type TorrentsSetLocationPostData = {
|
|
2710
|
+
/**
|
|
2711
|
+
* ```
|
|
2712
|
+
* POST /api/v2/torrents/setLocation HTTP/1.1
|
|
2713
|
+
* User-Agent: Fiddler
|
|
2714
|
+
* Host: 127.0.0.1
|
|
2715
|
+
* Cookie: SID=your_sid
|
|
2716
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2717
|
+
* Content-Length: length
|
|
2718
|
+
*
|
|
2719
|
+
* hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&location=/mnt/nfs/media
|
|
2720
|
+
* ```
|
|
2721
|
+
* `hashes` can contain multiple hashes separated by `|` or set to `all`
|
|
2722
|
+
*
|
|
2723
|
+
*/
|
|
2724
|
+
body: Hashes & {
|
|
2725
|
+
/**
|
|
2726
|
+
* `location` is the location to download the torrent to. If the location doesn't exist, the torrent's location is unchanged.
|
|
2727
|
+
*/
|
|
2728
|
+
location: string;
|
|
2729
|
+
};
|
|
2730
|
+
path?: never;
|
|
2731
|
+
query?: never;
|
|
2732
|
+
url: '/torrents/setLocation';
|
|
2733
|
+
};
|
|
2734
|
+
export type TorrentsSetLocationPostErrors = {
|
|
2735
|
+
/**
|
|
2736
|
+
* Save path is empty
|
|
2737
|
+
*/
|
|
2738
|
+
400: unknown;
|
|
2739
|
+
/**
|
|
2740
|
+
* User does not have write access to directory
|
|
2741
|
+
*/
|
|
2742
|
+
403: unknown;
|
|
2743
|
+
/**
|
|
2744
|
+
* Unable to create save path directory
|
|
2745
|
+
*/
|
|
2746
|
+
409: unknown;
|
|
2747
|
+
};
|
|
2748
|
+
export type TorrentsSetLocationPostResponses = {
|
|
2749
|
+
/**
|
|
2750
|
+
* All other scenarios
|
|
2751
|
+
*/
|
|
2752
|
+
200: unknown;
|
|
2753
|
+
};
|
|
2754
|
+
export type TorrentsRenamePostData = {
|
|
2755
|
+
/**
|
|
2756
|
+
* ```
|
|
2757
|
+
* POST /api/v2/torrents/rename HTTP/1.1
|
|
2758
|
+
* User-Agent: Fiddler
|
|
2759
|
+
* Host: 127.0.0.1
|
|
2760
|
+
* Cookie: SID=your_sid
|
|
2761
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2762
|
+
* Content-Length: length
|
|
2763
|
+
*
|
|
2764
|
+
* hash=8c212779b4abde7c6bc608063a0d008b7e40ce32&name=This%20is%20a%20test
|
|
2765
|
+
* ```
|
|
2766
|
+
*
|
|
2767
|
+
*/
|
|
2768
|
+
body: {
|
|
2769
|
+
hash: string;
|
|
2770
|
+
name: string;
|
|
2771
|
+
};
|
|
2772
|
+
path?: never;
|
|
2773
|
+
query?: never;
|
|
2774
|
+
url: '/torrents/rename';
|
|
2775
|
+
};
|
|
2776
|
+
export type TorrentsRenamePostErrors = {
|
|
2777
|
+
/**
|
|
2778
|
+
* Torrent hash is invalid
|
|
2779
|
+
*/
|
|
2780
|
+
404: unknown;
|
|
2781
|
+
/**
|
|
2782
|
+
* Torrent name is empty
|
|
2783
|
+
*/
|
|
2784
|
+
409: unknown;
|
|
2785
|
+
};
|
|
2786
|
+
export type TorrentsRenamePostResponses = {
|
|
2787
|
+
/**
|
|
2788
|
+
* All other scenarios
|
|
2789
|
+
*/
|
|
2790
|
+
200: unknown;
|
|
2791
|
+
};
|
|
2792
|
+
export type TorrentsSetCategoryPostData = {
|
|
2793
|
+
/**
|
|
2794
|
+
* ```
|
|
2795
|
+
* POST /api/v2/torrents/setCategory HTTP/1.1
|
|
2796
|
+
* User-Agent: Fiddler
|
|
2797
|
+
* Host: 127.0.0.1
|
|
2798
|
+
* Cookie: SID=your_sid
|
|
2799
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2800
|
+
* Content-Length: length
|
|
2801
|
+
*
|
|
2802
|
+
* hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&category=CategoryName
|
|
2803
|
+
* ```
|
|
2804
|
+
* `hashes` can contain multiple hashes separated by `|` or set to `all`
|
|
2805
|
+
*
|
|
2806
|
+
*/
|
|
2807
|
+
body: Hashes & {
|
|
2808
|
+
/**
|
|
2809
|
+
* `category` is the torrent category you want to set.
|
|
2810
|
+
*/
|
|
2811
|
+
category: string;
|
|
2812
|
+
};
|
|
2813
|
+
path?: never;
|
|
2814
|
+
query?: never;
|
|
2815
|
+
url: '/torrents/setCategory';
|
|
2816
|
+
};
|
|
2817
|
+
export type TorrentsSetCategoryPostErrors = {
|
|
2818
|
+
/**
|
|
2819
|
+
* Category name does not exist
|
|
2820
|
+
*/
|
|
2821
|
+
409: unknown;
|
|
2822
|
+
};
|
|
2823
|
+
export type TorrentsSetCategoryPostResponses = {
|
|
2824
|
+
/**
|
|
2825
|
+
* All other scenarios
|
|
2826
|
+
*/
|
|
2827
|
+
200: unknown;
|
|
2828
|
+
};
|
|
2829
|
+
export type TorrentsCategoriesGetData = {
|
|
2830
|
+
body?: never;
|
|
2831
|
+
path?: never;
|
|
2832
|
+
query?: never;
|
|
2833
|
+
url: '/torrents/categories';
|
|
2834
|
+
};
|
|
2835
|
+
export type TorrentsCategoriesGetResponses = {
|
|
2836
|
+
/**
|
|
2837
|
+
* All scenarios
|
|
2838
|
+
*/
|
|
2839
|
+
200: {
|
|
2840
|
+
[key: string]: TorrentsCategory;
|
|
2841
|
+
};
|
|
2842
|
+
};
|
|
2843
|
+
export type TorrentsCategoriesGetResponse = TorrentsCategoriesGetResponses[keyof TorrentsCategoriesGetResponses];
|
|
2844
|
+
export type TorrentsCreateCategoryPostData = {
|
|
2845
|
+
/**
|
|
2846
|
+
* ```
|
|
2847
|
+
* POST /api/v2/torrents/createCategory HTTP/1.1
|
|
2848
|
+
* User-Agent: Fiddler
|
|
2849
|
+
* Host: 127.0.0.1
|
|
2850
|
+
* Cookie: SID=your_sid
|
|
2851
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2852
|
+
* Content-Length: length
|
|
2853
|
+
*
|
|
2854
|
+
* category=CategoryName&savePath=/path/to/dir
|
|
2855
|
+
* ```
|
|
2856
|
+
* `category` is the category you want to create.
|
|
2857
|
+
*
|
|
2858
|
+
*/
|
|
2859
|
+
body: Category;
|
|
2860
|
+
path?: never;
|
|
2861
|
+
query?: never;
|
|
2862
|
+
url: '/torrents/createCategory';
|
|
2863
|
+
};
|
|
2864
|
+
export type TorrentsCreateCategoryPostErrors = {
|
|
2865
|
+
/**
|
|
2866
|
+
* Category name is empty
|
|
2867
|
+
*/
|
|
2868
|
+
400: unknown;
|
|
2869
|
+
/**
|
|
2870
|
+
* Category name is invalid
|
|
2871
|
+
*/
|
|
2872
|
+
409: unknown;
|
|
2873
|
+
};
|
|
2874
|
+
export type TorrentsCreateCategoryPostResponses = {
|
|
2875
|
+
/**
|
|
2876
|
+
* All other scenarios
|
|
2877
|
+
*/
|
|
2878
|
+
200: unknown;
|
|
2879
|
+
};
|
|
2880
|
+
export type TorrentsEditCategoryPostData = {
|
|
2881
|
+
/**
|
|
2882
|
+
* ```
|
|
2883
|
+
* POST /api/v2/torrents/editCategory HTTP/1.1
|
|
2884
|
+
* User-Agent: Fiddler
|
|
2885
|
+
* Host: 127.0.0.1
|
|
2886
|
+
* Cookie: SID=your_sid
|
|
2887
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2888
|
+
* Content-Length: length
|
|
2889
|
+
*
|
|
2890
|
+
* category=CategoryName&savePath=/path/to/save/torrents/to
|
|
2891
|
+
* ```
|
|
2892
|
+
*
|
|
2893
|
+
*/
|
|
2894
|
+
body: Category;
|
|
2895
|
+
path?: never;
|
|
2896
|
+
query?: never;
|
|
2897
|
+
url: '/torrents/editCategory';
|
|
2898
|
+
};
|
|
2899
|
+
export type TorrentsEditCategoryPostErrors = {
|
|
2900
|
+
/**
|
|
2901
|
+
* Category name is empty
|
|
2902
|
+
*/
|
|
2903
|
+
400: unknown;
|
|
2904
|
+
/**
|
|
2905
|
+
* Category editing failed
|
|
2906
|
+
*/
|
|
2907
|
+
409: unknown;
|
|
2908
|
+
};
|
|
2909
|
+
export type TorrentsEditCategoryPostResponses = {
|
|
2910
|
+
/**
|
|
2911
|
+
* All other scenarios
|
|
2912
|
+
*/
|
|
2913
|
+
200: unknown;
|
|
2914
|
+
};
|
|
2915
|
+
export type TorrentsRemoveCategoriesPostData = {
|
|
2916
|
+
/**
|
|
2917
|
+
* ```
|
|
2918
|
+
* POST /api/v2/torrents/removeCategories HTTP/1.1
|
|
2919
|
+
* User-Agent: Fiddler
|
|
2920
|
+
* Host: 127.0.0.1
|
|
2921
|
+
* Cookie: SID=your_sid
|
|
2922
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2923
|
+
* Content-Length: length
|
|
2924
|
+
*
|
|
2925
|
+
* categories=Category1%0ACategory2
|
|
2926
|
+
* ```
|
|
2927
|
+
*
|
|
2928
|
+
*/
|
|
2929
|
+
body: {
|
|
2930
|
+
/**
|
|
2931
|
+
* `categories` can contain multiple cateogies separated by `\n` (%0A urlencoded)
|
|
2932
|
+
*/
|
|
2933
|
+
categories: string;
|
|
2934
|
+
};
|
|
2935
|
+
path?: never;
|
|
2936
|
+
query?: never;
|
|
2937
|
+
url: '/torrents/removeCategories';
|
|
2938
|
+
};
|
|
2939
|
+
export type TorrentsRemoveCategoriesPostResponses = {
|
|
2940
|
+
/**
|
|
2941
|
+
* All scenarios
|
|
2942
|
+
*/
|
|
2943
|
+
200: unknown;
|
|
2944
|
+
};
|
|
2945
|
+
export type TorrentsAddTagsPostData = {
|
|
2946
|
+
/**
|
|
2947
|
+
* ```
|
|
2948
|
+
* POST /api/v2/torrents/addTags HTTP/1.1
|
|
2949
|
+
* User-Agent: Fiddler
|
|
2950
|
+
* Host: 127.0.0.1
|
|
2951
|
+
* Cookie: SID=your_sid
|
|
2952
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2953
|
+
* Content-Length: length
|
|
2954
|
+
*
|
|
2955
|
+
* hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&tags=TagName1,TagName2
|
|
2956
|
+
* ```
|
|
2957
|
+
* `hashes` can contain multiple hashes separated by `|` or set to `all`
|
|
2958
|
+
*
|
|
2959
|
+
* `tags` is the list of tags you want to add to passed torrents.
|
|
2960
|
+
*
|
|
2961
|
+
*/
|
|
2962
|
+
body: TorrentsTags;
|
|
2963
|
+
path?: never;
|
|
2964
|
+
query?: never;
|
|
2965
|
+
url: '/torrents/addTags';
|
|
2966
|
+
};
|
|
2967
|
+
export type TorrentsAddTagsPostResponses = {
|
|
2968
|
+
/**
|
|
2969
|
+
* All scenarios
|
|
2970
|
+
*/
|
|
2971
|
+
200: unknown;
|
|
2972
|
+
};
|
|
2973
|
+
export type TorrentsRemoveTagsPostData = {
|
|
2974
|
+
/**
|
|
2975
|
+
* ```
|
|
2976
|
+
* POST /api/v2/torrents/removeTags HTTP/1.1
|
|
2977
|
+
* User-Agent: Fiddler
|
|
2978
|
+
* Host: 127.0.0.1
|
|
2979
|
+
* Cookie: SID=your_sid
|
|
2980
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2981
|
+
* Content-Length: length
|
|
2982
|
+
*
|
|
2983
|
+
* hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&tags=TagName1,TagName2
|
|
2984
|
+
* ```
|
|
2985
|
+
* `hashes` can contain multiple hashes separated by `|` or set to `all`
|
|
2986
|
+
*
|
|
2987
|
+
* `tags` is the list of tags you want to remove from passed torrents. Empty list removes all tags from relevant torrents.
|
|
2988
|
+
*
|
|
2989
|
+
*/
|
|
2990
|
+
body: TorrentsTags;
|
|
2991
|
+
path?: never;
|
|
2992
|
+
query?: never;
|
|
2993
|
+
url: '/torrents/removeTags';
|
|
2994
|
+
};
|
|
2995
|
+
export type TorrentsRemoveTagsPostResponses = {
|
|
2996
|
+
/**
|
|
2997
|
+
* All scenarios
|
|
2998
|
+
*/
|
|
2999
|
+
200: unknown;
|
|
3000
|
+
};
|
|
3001
|
+
export type TorrentsTagsGetData = {
|
|
3002
|
+
body?: never;
|
|
3003
|
+
path?: never;
|
|
3004
|
+
query?: never;
|
|
3005
|
+
url: '/torrents/tags';
|
|
3006
|
+
};
|
|
3007
|
+
export type TorrentsTagsGetResponses = {
|
|
3008
|
+
/**
|
|
3009
|
+
* Returns all tags in JSON format, e.g.:
|
|
3010
|
+
*/
|
|
3011
|
+
200: Array<string>;
|
|
3012
|
+
};
|
|
3013
|
+
export type TorrentsTagsGetResponse = TorrentsTagsGetResponses[keyof TorrentsTagsGetResponses];
|
|
3014
|
+
export type TorrentsCreateTagsPostData = {
|
|
3015
|
+
/**
|
|
3016
|
+
* ```
|
|
3017
|
+
* POST /api/v2/torrents/createTags HTTP/1.1
|
|
3018
|
+
* User-Agent: Fiddler
|
|
3019
|
+
* Host: 127.0.0.1
|
|
3020
|
+
* Cookie: SID=your_sid
|
|
3021
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
3022
|
+
* Content-Length: length
|
|
3023
|
+
*
|
|
3024
|
+
* tags=TagName1,TagName2
|
|
3025
|
+
* ```
|
|
3026
|
+
*
|
|
3027
|
+
*/
|
|
3028
|
+
body: {
|
|
3029
|
+
/**
|
|
3030
|
+
* `tags` is a list of tags you want to create. Can contain multiple tags separated by `,`.
|
|
3031
|
+
*/
|
|
3032
|
+
tags: Array<string>;
|
|
3033
|
+
};
|
|
3034
|
+
path?: never;
|
|
3035
|
+
query?: never;
|
|
3036
|
+
url: '/torrents/createTags';
|
|
3037
|
+
};
|
|
3038
|
+
export type TorrentsCreateTagsPostResponses = {
|
|
3039
|
+
/**
|
|
3040
|
+
* All scenarios
|
|
3041
|
+
*/
|
|
3042
|
+
200: unknown;
|
|
3043
|
+
};
|
|
3044
|
+
export type TorrentsDeleteTagsPostData = {
|
|
3045
|
+
/**
|
|
3046
|
+
* ```
|
|
3047
|
+
* POST /api/v2/torrents/deleteTags HTTP/1.1
|
|
3048
|
+
* User-Agent: Fiddler
|
|
3049
|
+
* Host: 127.0.0.1
|
|
3050
|
+
* Cookie: SID=your_sid
|
|
3051
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
3052
|
+
* Content-Length: length
|
|
3053
|
+
*
|
|
3054
|
+
* tags=TagName1,TagName2
|
|
3055
|
+
* ```
|
|
3056
|
+
*
|
|
3057
|
+
*/
|
|
3058
|
+
body: {
|
|
3059
|
+
/**
|
|
3060
|
+
* `tags` is a list of tags you want to delete. Can contain multiple tags separated by `,`.
|
|
3061
|
+
*/
|
|
3062
|
+
tags: Array<string>;
|
|
3063
|
+
};
|
|
3064
|
+
path?: never;
|
|
3065
|
+
query?: never;
|
|
3066
|
+
url: '/torrents/deleteTags';
|
|
3067
|
+
};
|
|
3068
|
+
export type TorrentsDeleteTagsPostResponses = {
|
|
3069
|
+
/**
|
|
3070
|
+
* All scenarios
|
|
3071
|
+
*/
|
|
3072
|
+
200: unknown;
|
|
3073
|
+
};
|
|
3074
|
+
export type TorrentsSetAutoManagementPostData = {
|
|
3075
|
+
/**
|
|
3076
|
+
* ```
|
|
3077
|
+
* POST /api/v2/torrents/setAutoManagement HTTP/1.1
|
|
3078
|
+
* User-Agent: Fiddler
|
|
3079
|
+
* Host: 127.0.0.1
|
|
3080
|
+
* Cookie: SID=your_sid
|
|
3081
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
3082
|
+
* Content-Length: length
|
|
3083
|
+
*
|
|
3084
|
+
* hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&enable=true
|
|
3085
|
+
* ```
|
|
3086
|
+
* `hashes` can contain multiple hashes separated by `|` or set to `all`
|
|
3087
|
+
*
|
|
3088
|
+
*/
|
|
3089
|
+
body: Hashes & {
|
|
3090
|
+
/**
|
|
3091
|
+
* `enable` is a boolean, affects the torrents listed in `hashes`, default is `false`
|
|
3092
|
+
*/
|
|
3093
|
+
enable: boolean;
|
|
3094
|
+
};
|
|
3095
|
+
path?: never;
|
|
3096
|
+
query?: never;
|
|
3097
|
+
url: '/torrents/setAutoManagement';
|
|
3098
|
+
};
|
|
3099
|
+
export type TorrentsSetAutoManagementPostResponses = {
|
|
3100
|
+
/**
|
|
3101
|
+
* All scenarios
|
|
3102
|
+
*/
|
|
3103
|
+
200: unknown;
|
|
3104
|
+
};
|
|
3105
|
+
export type TorrentsToggleSequentialDownloadPostData = {
|
|
3106
|
+
/**
|
|
3107
|
+
* The hashes of the torrents you want to toggle sequential download for. `hashes` can contain multiple hashes separated by `|`, to toggle sequential download for multiple torrents, or set to `all`, to toggle sequential download for all torrents.
|
|
3108
|
+
*/
|
|
3109
|
+
body: Hashes;
|
|
3110
|
+
path?: never;
|
|
3111
|
+
query?: never;
|
|
3112
|
+
url: '/torrents/toggleSequentialDownload';
|
|
3113
|
+
};
|
|
3114
|
+
export type TorrentsToggleSequentialDownloadPostResponses = {
|
|
3115
|
+
/**
|
|
3116
|
+
* All scenarios
|
|
3117
|
+
*/
|
|
3118
|
+
200: unknown;
|
|
3119
|
+
};
|
|
3120
|
+
export type TorrentsToggleFirstLastPiecePrioPostData = {
|
|
3121
|
+
/**
|
|
3122
|
+
* The hashes of the torrents you want to toggle the first/last piece priority for. `hashes` can contain multiple hashes separated by `|`, to toggle the first/last piece priority for multiple torrents, or set to `all`, to toggle the first/last piece priority for all torrents.
|
|
3123
|
+
*/
|
|
3124
|
+
body: Hashes;
|
|
3125
|
+
path?: never;
|
|
3126
|
+
query?: never;
|
|
3127
|
+
url: '/torrents/toggleFirstLastPiecePrio';
|
|
3128
|
+
};
|
|
3129
|
+
export type TorrentsToggleFirstLastPiecePrioPostResponses = {
|
|
3130
|
+
/**
|
|
3131
|
+
* All scenarios
|
|
3132
|
+
*/
|
|
3133
|
+
200: unknown;
|
|
3134
|
+
};
|
|
3135
|
+
export type TorrentsSetForceStartPostData = {
|
|
3136
|
+
/**
|
|
3137
|
+
* ```
|
|
3138
|
+
* POST /api/v2/torrents/setForceStart HTTP/1.1
|
|
3139
|
+
* User-Agent: Fiddler
|
|
3140
|
+
* Host: 127.0.0.1
|
|
3141
|
+
* Cookie: SID=your_sid
|
|
3142
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
3143
|
+
* Content-Length: length
|
|
3144
|
+
*
|
|
3145
|
+
* hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32?value=true
|
|
3146
|
+
* ```
|
|
3147
|
+
* `hashes` can contain multiple hashes separated by `|` or set to `all`
|
|
3148
|
+
*
|
|
3149
|
+
*/
|
|
3150
|
+
body: SetTorrentsValue;
|
|
3151
|
+
path?: never;
|
|
3152
|
+
query?: never;
|
|
3153
|
+
url: '/torrents/setForceStart';
|
|
3154
|
+
};
|
|
3155
|
+
export type TorrentsSetForceStartPostResponses = {
|
|
3156
|
+
/**
|
|
3157
|
+
* All scenarios
|
|
3158
|
+
*/
|
|
3159
|
+
200: unknown;
|
|
3160
|
+
};
|
|
3161
|
+
export type TorrentsSetSuperSeedingPostData = {
|
|
3162
|
+
/**
|
|
3163
|
+
* ```
|
|
3164
|
+
* POST /api/v2/torrents/setSuperSeeding HTTP/1.1
|
|
3165
|
+
* User-Agent: Fiddler
|
|
3166
|
+
* Host: 127.0.0.1
|
|
3167
|
+
* Cookie: SID=your_sid
|
|
3168
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
3169
|
+
* Content-Length: length
|
|
3170
|
+
*
|
|
3171
|
+
* hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32?value=true
|
|
3172
|
+
* ```
|
|
3173
|
+
* `hashes` can contain multiple hashes separated by `|` or set to `all`
|
|
3174
|
+
*
|
|
3175
|
+
*/
|
|
3176
|
+
body: SetTorrentsValue;
|
|
3177
|
+
path?: never;
|
|
3178
|
+
query?: never;
|
|
3179
|
+
url: '/torrents/setSuperSeeding';
|
|
3180
|
+
};
|
|
3181
|
+
export type TorrentsSetSuperSeedingPostResponses = {
|
|
3182
|
+
/**
|
|
3183
|
+
* All scenarios
|
|
3184
|
+
*/
|
|
3185
|
+
200: unknown;
|
|
3186
|
+
};
|
|
3187
|
+
export type TorrentsRenameFilePostData = {
|
|
3188
|
+
body: RenameTorrentFiles;
|
|
3189
|
+
path?: never;
|
|
3190
|
+
query?: never;
|
|
3191
|
+
url: '/torrents/renameFile';
|
|
3192
|
+
};
|
|
3193
|
+
export type TorrentsRenameFilePostErrors = {
|
|
3194
|
+
/**
|
|
3195
|
+
* Missing `newPath` parameter
|
|
3196
|
+
*/
|
|
3197
|
+
400: unknown;
|
|
3198
|
+
/**
|
|
3199
|
+
* Invalid `newPath` or `oldPath`, or `newPath` already in use
|
|
3200
|
+
*/
|
|
3201
|
+
409: unknown;
|
|
3202
|
+
};
|
|
3203
|
+
export type TorrentsRenameFilePostResponses = {
|
|
3204
|
+
/**
|
|
3205
|
+
* All other scenarios
|
|
3206
|
+
*/
|
|
3207
|
+
200: unknown;
|
|
3208
|
+
};
|
|
3209
|
+
export type TorrentsRenameFolderPostData = {
|
|
3210
|
+
body: RenameTorrentFiles;
|
|
3211
|
+
path?: never;
|
|
3212
|
+
query?: never;
|
|
3213
|
+
url: '/torrents/renameFolder';
|
|
3214
|
+
};
|
|
3215
|
+
export type TorrentsRenameFolderPostErrors = {
|
|
3216
|
+
/**
|
|
3217
|
+
* Missing `newPath` parameter
|
|
3218
|
+
*/
|
|
3219
|
+
400: unknown;
|
|
3220
|
+
/**
|
|
3221
|
+
* Invalid `newPath` or `oldPath`, or `newPath` already in use
|
|
3222
|
+
*/
|
|
3223
|
+
409: unknown;
|
|
3224
|
+
};
|
|
3225
|
+
export type TorrentsRenameFolderPostResponses = {
|
|
3226
|
+
/**
|
|
3227
|
+
* All other scenarios
|
|
3228
|
+
*/
|
|
3229
|
+
200: unknown;
|
|
3230
|
+
};
|
|
3231
|
+
export type RssAddFolderPostData = {
|
|
3232
|
+
body: {
|
|
3233
|
+
/**
|
|
3234
|
+
* Full path of added folder (e.g. "The Pirate Bay\Top100")
|
|
3235
|
+
*/
|
|
3236
|
+
path: string;
|
|
3237
|
+
};
|
|
3238
|
+
path?: never;
|
|
3239
|
+
query?: never;
|
|
3240
|
+
url: '/rss/addFolder';
|
|
3241
|
+
};
|
|
3242
|
+
export type RssAddFolderPostErrors = {
|
|
3243
|
+
/**
|
|
3244
|
+
* Failure to add folder
|
|
3245
|
+
*/
|
|
3246
|
+
409: unknown;
|
|
3247
|
+
};
|
|
3248
|
+
export type RssAddFolderPostResponses = {
|
|
3249
|
+
/**
|
|
3250
|
+
* All other scenarios
|
|
3251
|
+
*/
|
|
3252
|
+
200: unknown;
|
|
3253
|
+
};
|
|
3254
|
+
export type RssAddFeedPostData = {
|
|
3255
|
+
body: {
|
|
3256
|
+
/**
|
|
3257
|
+
* URL of RSS feed (e.g. "http://thepiratebay.org/rss//top100/200")
|
|
3258
|
+
*/
|
|
3259
|
+
url: string;
|
|
3260
|
+
/**
|
|
3261
|
+
* Full path of added folder (e.g. "The Pirate Bay\Top100\Video")
|
|
3262
|
+
*/
|
|
3263
|
+
path?: string;
|
|
3264
|
+
};
|
|
3265
|
+
path?: never;
|
|
3266
|
+
query?: never;
|
|
3267
|
+
url: '/rss/addFeed';
|
|
3268
|
+
};
|
|
3269
|
+
export type RssAddFeedPostErrors = {
|
|
3270
|
+
/**
|
|
3271
|
+
* Failure to add feed
|
|
3272
|
+
*/
|
|
3273
|
+
409: unknown;
|
|
3274
|
+
};
|
|
3275
|
+
export type RssAddFeedPostResponses = {
|
|
3276
|
+
/**
|
|
3277
|
+
* All other scenarios
|
|
3278
|
+
*/
|
|
3279
|
+
200: unknown;
|
|
3280
|
+
};
|
|
3281
|
+
export type RssRemoveItemPostData = {
|
|
3282
|
+
body: {
|
|
3283
|
+
/**
|
|
3284
|
+
* Full path of removed item (e.g. "The Pirate Bay\Top100")
|
|
3285
|
+
*/
|
|
3286
|
+
path: string;
|
|
3287
|
+
};
|
|
3288
|
+
path?: never;
|
|
3289
|
+
query?: never;
|
|
3290
|
+
url: '/rss/removeItem';
|
|
3291
|
+
};
|
|
3292
|
+
export type RssRemoveItemPostErrors = {
|
|
3293
|
+
/**
|
|
3294
|
+
* Failure to remove item
|
|
3295
|
+
*/
|
|
3296
|
+
409: unknown;
|
|
3297
|
+
};
|
|
3298
|
+
export type RssRemoveItemPostResponses = {
|
|
3299
|
+
/**
|
|
3300
|
+
* All other scenarios
|
|
3301
|
+
*/
|
|
3302
|
+
200: unknown;
|
|
3303
|
+
};
|
|
3304
|
+
export type RssMoveItemPostData = {
|
|
3305
|
+
body: {
|
|
3306
|
+
/**
|
|
3307
|
+
* Current full path of item (e.g. "The Pirate Bay\Top100")
|
|
3308
|
+
*/
|
|
3309
|
+
itemPath: string;
|
|
3310
|
+
/**
|
|
3311
|
+
* New full path of item (e.g. "The Pirate Bay")
|
|
3312
|
+
*/
|
|
3313
|
+
destPath: string;
|
|
3314
|
+
};
|
|
3315
|
+
path?: never;
|
|
3316
|
+
query?: never;
|
|
3317
|
+
url: '/rss/moveItem';
|
|
3318
|
+
};
|
|
3319
|
+
export type RssMoveItemPostErrors = {
|
|
3320
|
+
/**
|
|
3321
|
+
* Failure to move item
|
|
3322
|
+
*/
|
|
3323
|
+
409: unknown;
|
|
3324
|
+
};
|
|
3325
|
+
export type RssMoveItemPostResponses = {
|
|
3326
|
+
/**
|
|
3327
|
+
* All other scenarios
|
|
3328
|
+
*/
|
|
3329
|
+
200: unknown;
|
|
3330
|
+
};
|
|
3331
|
+
export type RssItemsPostData = {
|
|
3332
|
+
body: {
|
|
3333
|
+
/**
|
|
3334
|
+
* True if you need current feed articles
|
|
3335
|
+
*/
|
|
3336
|
+
withData?: boolean;
|
|
3337
|
+
};
|
|
3338
|
+
path?: never;
|
|
3339
|
+
query?: never;
|
|
3340
|
+
url: '/rss/items';
|
|
3341
|
+
};
|
|
3342
|
+
export type RssItemsPostResponses = {
|
|
3343
|
+
/**
|
|
3344
|
+
* Returns all RSS items in JSON format, e.g.:
|
|
3345
|
+
*/
|
|
3346
|
+
200: {
|
|
3347
|
+
[key: string]: unknown;
|
|
3348
|
+
};
|
|
3349
|
+
};
|
|
3350
|
+
export type RssItemsPostResponse = RssItemsPostResponses[keyof RssItemsPostResponses];
|
|
3351
|
+
export type RssMarkAsReadPostData = {
|
|
3352
|
+
body: {
|
|
3353
|
+
/**
|
|
3354
|
+
* Current full path of item (e.g. "The Pirate Bay\Top100")
|
|
3355
|
+
*/
|
|
3356
|
+
itemPath: string;
|
|
3357
|
+
/**
|
|
3358
|
+
* ID of article
|
|
3359
|
+
*/
|
|
3360
|
+
articleId?: string;
|
|
3361
|
+
};
|
|
3362
|
+
path?: never;
|
|
3363
|
+
query?: never;
|
|
3364
|
+
url: '/rss/markAsRead';
|
|
3365
|
+
};
|
|
3366
|
+
export type RssMarkAsReadPostResponses = {
|
|
3367
|
+
/**
|
|
3368
|
+
* All scenarios
|
|
3369
|
+
*/
|
|
3370
|
+
200: unknown;
|
|
3371
|
+
};
|
|
3372
|
+
export type RssRefreshItemPostData = {
|
|
3373
|
+
body: {
|
|
3374
|
+
/**
|
|
3375
|
+
* Current full path of item (e.g. "The Pirate Bay\Top100")
|
|
3376
|
+
*/
|
|
3377
|
+
itemPath: string;
|
|
3378
|
+
};
|
|
3379
|
+
path?: never;
|
|
3380
|
+
query?: never;
|
|
3381
|
+
url: '/rss/refreshItem';
|
|
3382
|
+
};
|
|
3383
|
+
export type RssRefreshItemPostResponses = {
|
|
3384
|
+
/**
|
|
3385
|
+
* All scenarios
|
|
3386
|
+
*/
|
|
3387
|
+
200: unknown;
|
|
3388
|
+
};
|
|
3389
|
+
export type RssSetRulePostData = {
|
|
3390
|
+
body: {
|
|
3391
|
+
/**
|
|
3392
|
+
* Rule name (e.g. "Punisher")
|
|
3393
|
+
*/
|
|
3394
|
+
ruleName: string;
|
|
3395
|
+
ruleDef: RssRuleDef;
|
|
3396
|
+
};
|
|
3397
|
+
path?: never;
|
|
3398
|
+
query?: never;
|
|
3399
|
+
url: '/rss/setRule';
|
|
3400
|
+
};
|
|
3401
|
+
export type RssSetRulePostResponses = {
|
|
3402
|
+
/**
|
|
3403
|
+
* All scenarios
|
|
3404
|
+
*/
|
|
3405
|
+
200: unknown;
|
|
3406
|
+
};
|
|
3407
|
+
export type RssRenameRulePostData = {
|
|
3408
|
+
body: {
|
|
3409
|
+
/**
|
|
3410
|
+
* Rule name (e.g. "Punisher")
|
|
3411
|
+
*/
|
|
3412
|
+
ruleName: string;
|
|
3413
|
+
/**
|
|
3414
|
+
* New rule name (e.g. "The Punisher")
|
|
3415
|
+
*/
|
|
3416
|
+
newRuleName: string;
|
|
3417
|
+
};
|
|
3418
|
+
path?: never;
|
|
3419
|
+
query?: never;
|
|
3420
|
+
url: '/rss/renameRule';
|
|
3421
|
+
};
|
|
3422
|
+
export type RssRenameRulePostResponses = {
|
|
3423
|
+
/**
|
|
3424
|
+
* All scenarios
|
|
3425
|
+
*/
|
|
3426
|
+
200: unknown;
|
|
3427
|
+
};
|
|
3428
|
+
export type RssRemoveRulePostData = {
|
|
3429
|
+
body: {
|
|
3430
|
+
/**
|
|
3431
|
+
* Rule name (e.g. "Punisher")
|
|
3432
|
+
*/
|
|
3433
|
+
ruleName: string;
|
|
3434
|
+
};
|
|
3435
|
+
path?: never;
|
|
3436
|
+
query?: never;
|
|
3437
|
+
url: '/rss/removeRule';
|
|
3438
|
+
};
|
|
3439
|
+
export type RssRemoveRulePostResponses = {
|
|
3440
|
+
/**
|
|
3441
|
+
* All scenarios
|
|
3442
|
+
*/
|
|
3443
|
+
200: unknown;
|
|
3444
|
+
};
|
|
3445
|
+
export type RssRulesGetData = {
|
|
3446
|
+
body?: never;
|
|
3447
|
+
path?: never;
|
|
3448
|
+
query?: never;
|
|
3449
|
+
url: '/rss/rules';
|
|
3450
|
+
};
|
|
3451
|
+
export type RssRulesGetResponses = {
|
|
3452
|
+
/**
|
|
3453
|
+
* Returns all auto-downloading rules in JSON format, e.g.:
|
|
3454
|
+
*/
|
|
3455
|
+
200: {
|
|
3456
|
+
[key: string]: RssRuleDef;
|
|
3457
|
+
};
|
|
3458
|
+
};
|
|
3459
|
+
export type RssRulesGetResponse = RssRulesGetResponses[keyof RssRulesGetResponses];
|
|
3460
|
+
export type RssMatchingArticlesPostData = {
|
|
3461
|
+
body: {
|
|
3462
|
+
/**
|
|
3463
|
+
* Rule name (e.g. "Linux")
|
|
3464
|
+
*/
|
|
3465
|
+
ruleName: string;
|
|
3466
|
+
};
|
|
3467
|
+
path?: never;
|
|
3468
|
+
query?: never;
|
|
3469
|
+
url: '/rss/matchingArticles';
|
|
3470
|
+
};
|
|
3471
|
+
export type RssMatchingArticlesPostResponses = {
|
|
3472
|
+
/**
|
|
3473
|
+
* Returns all articles that match a rule by feed name in JSON format, e.g.:
|
|
3474
|
+
*/
|
|
3475
|
+
200: {
|
|
3476
|
+
[key: string]: Array<string>;
|
|
3477
|
+
};
|
|
3478
|
+
};
|
|
3479
|
+
export type RssMatchingArticlesPostResponse = RssMatchingArticlesPostResponses[keyof RssMatchingArticlesPostResponses];
|
|
3480
|
+
export type SearchStartPostData = {
|
|
3481
|
+
body: {
|
|
3482
|
+
/**
|
|
3483
|
+
* Pattern to search for (e.g. "Ubuntu 18.04")
|
|
3484
|
+
*/
|
|
3485
|
+
pattern: string;
|
|
3486
|
+
/**
|
|
3487
|
+
* Plugins to use for searching (e.g. "legittorrents"). Supports multiple plugins separated by `|`. Also supports `all` and `enabled`
|
|
3488
|
+
*/
|
|
3489
|
+
plugins: Array<string>;
|
|
3490
|
+
/**
|
|
3491
|
+
* Categories to limit your search to (e.g. "legittorrents"). Available categories depend on the specified `plugins`. Also supports `all`
|
|
3492
|
+
*/
|
|
3493
|
+
category: Array<string>;
|
|
3494
|
+
};
|
|
3495
|
+
path?: never;
|
|
3496
|
+
query?: never;
|
|
3497
|
+
url: '/search/start';
|
|
3498
|
+
};
|
|
3499
|
+
export type SearchStartPostErrors = {
|
|
3500
|
+
/**
|
|
3501
|
+
* User has reached the limit of max `Running` searches (currently set to 5)
|
|
3502
|
+
*/
|
|
3503
|
+
409: unknown;
|
|
3504
|
+
};
|
|
3505
|
+
export type SearchStartPostResponses = {
|
|
3506
|
+
/**
|
|
3507
|
+
* All other scenarios- see JSON below
|
|
3508
|
+
*/
|
|
3509
|
+
200: SearchJob;
|
|
3510
|
+
};
|
|
3511
|
+
export type SearchStartPostResponse = SearchStartPostResponses[keyof SearchStartPostResponses];
|
|
3512
|
+
export type SearchStopPostData = {
|
|
3513
|
+
body: SearchJob;
|
|
3514
|
+
path?: never;
|
|
3515
|
+
query?: never;
|
|
3516
|
+
url: '/search/stop';
|
|
3517
|
+
};
|
|
3518
|
+
export type SearchStopPostErrors = {
|
|
3519
|
+
/**
|
|
3520
|
+
* Search job was not found
|
|
3521
|
+
*/
|
|
3522
|
+
404: unknown;
|
|
3523
|
+
};
|
|
3524
|
+
export type SearchStopPostResponses = {
|
|
3525
|
+
/**
|
|
3526
|
+
* All other scenarios
|
|
3527
|
+
*/
|
|
3528
|
+
200: unknown;
|
|
3529
|
+
};
|
|
3530
|
+
export type SearchStatusPostData = {
|
|
3531
|
+
body: {
|
|
3532
|
+
/**
|
|
3533
|
+
* ID of the search job. If not specified, all search jobs are returned
|
|
3534
|
+
*/
|
|
3535
|
+
id?: number;
|
|
3536
|
+
};
|
|
3537
|
+
path?: never;
|
|
3538
|
+
query?: never;
|
|
3539
|
+
url: '/search/status';
|
|
3540
|
+
};
|
|
3541
|
+
export type SearchStatusPostErrors = {
|
|
3542
|
+
/**
|
|
3543
|
+
* Search job was not found
|
|
3544
|
+
*/
|
|
3545
|
+
404: unknown;
|
|
3546
|
+
};
|
|
3547
|
+
export type SearchStatusPostResponses = {
|
|
3548
|
+
/**
|
|
3549
|
+
* The response is a JSON array of objects containing the following fields
|
|
3550
|
+
*/
|
|
3551
|
+
200: Array<SearchJobStatus>;
|
|
3552
|
+
};
|
|
3553
|
+
export type SearchStatusPostResponse = SearchStatusPostResponses[keyof SearchStatusPostResponses];
|
|
3554
|
+
export type SearchResultsPostData = {
|
|
3555
|
+
body: SearchJob & {
|
|
3556
|
+
/**
|
|
3557
|
+
* max number of results to return. 0 or negative means no limit
|
|
3558
|
+
*/
|
|
3559
|
+
limit?: number;
|
|
3560
|
+
/**
|
|
3561
|
+
* result to start at. A negative number means count backwards (e.g. -2 returns the 2 most recent results)
|
|
3562
|
+
*/
|
|
3563
|
+
offset?: number;
|
|
3564
|
+
};
|
|
3565
|
+
path?: never;
|
|
3566
|
+
query?: never;
|
|
3567
|
+
url: '/search/results';
|
|
3568
|
+
};
|
|
3569
|
+
export type SearchResultsPostErrors = {
|
|
3570
|
+
/**
|
|
3571
|
+
* Search job was not found
|
|
3572
|
+
*/
|
|
3573
|
+
404: unknown;
|
|
3574
|
+
/**
|
|
3575
|
+
* Offset is too large, or too small (e.g. absolute value of negative number is greater than # results)
|
|
3576
|
+
*/
|
|
3577
|
+
409: unknown;
|
|
3578
|
+
};
|
|
3579
|
+
export type SearchResultsPostResponses = {
|
|
3580
|
+
/**
|
|
3581
|
+
* All other scenarios- see JSON below
|
|
3582
|
+
*/
|
|
3583
|
+
200: SearchResults;
|
|
3584
|
+
};
|
|
3585
|
+
export type SearchResultsPostResponse = SearchResultsPostResponses[keyof SearchResultsPostResponses];
|
|
3586
|
+
export type SearchDeletePostData = {
|
|
3587
|
+
body: {
|
|
3588
|
+
/**
|
|
3589
|
+
* ID of the search job
|
|
3590
|
+
*/
|
|
3591
|
+
id: number;
|
|
3592
|
+
};
|
|
3593
|
+
path?: never;
|
|
3594
|
+
query?: never;
|
|
3595
|
+
url: '/search/delete';
|
|
3596
|
+
};
|
|
3597
|
+
export type SearchDeletePostErrors = {
|
|
3598
|
+
/**
|
|
3599
|
+
* Search job was not found
|
|
3600
|
+
*/
|
|
3601
|
+
404: unknown;
|
|
3602
|
+
};
|
|
3603
|
+
export type SearchDeletePostResponses = {
|
|
3604
|
+
/**
|
|
3605
|
+
* All other scenarios
|
|
3606
|
+
*/
|
|
3607
|
+
200: unknown;
|
|
3608
|
+
};
|
|
3609
|
+
export type SearchPluginsGetData = {
|
|
3610
|
+
body?: never;
|
|
3611
|
+
path?: never;
|
|
3612
|
+
query?: never;
|
|
3613
|
+
url: '/search/plugins';
|
|
3614
|
+
};
|
|
3615
|
+
export type SearchPluginsGetResponses = {
|
|
3616
|
+
/**
|
|
3617
|
+
* The response is a JSON array of objects containing the following fields
|
|
3618
|
+
*/
|
|
3619
|
+
200: Array<SearchPlugin>;
|
|
3620
|
+
};
|
|
3621
|
+
export type SearchPluginsGetResponse = SearchPluginsGetResponses[keyof SearchPluginsGetResponses];
|
|
3622
|
+
export type SearchInstallPluginPostData = {
|
|
3623
|
+
body: {
|
|
3624
|
+
/**
|
|
3625
|
+
* Url or file path of the plugin to install (e.g. "https://raw.githubusercontent.com/qbittorrent/search-plugins/master/nova3/engines/legittorrents.py"). Supports multiple sources separated by `|`
|
|
3626
|
+
*/
|
|
3627
|
+
sources: Array<string>;
|
|
3628
|
+
};
|
|
3629
|
+
path?: never;
|
|
3630
|
+
query?: never;
|
|
3631
|
+
url: '/search/installPlugin';
|
|
3632
|
+
};
|
|
3633
|
+
export type SearchInstallPluginPostResponses = {
|
|
3634
|
+
/**
|
|
3635
|
+
* All scenarios
|
|
3636
|
+
*/
|
|
3637
|
+
200: unknown;
|
|
3638
|
+
};
|
|
3639
|
+
export type SearchUninstallPluginPostData = {
|
|
3640
|
+
body: {
|
|
3641
|
+
/**
|
|
3642
|
+
* Name of the plugin to uninstall (e.g. "legittorrents"). Supports multiple names separated by `|`
|
|
3643
|
+
*/
|
|
3644
|
+
names: Array<string>;
|
|
3645
|
+
};
|
|
3646
|
+
path?: never;
|
|
3647
|
+
query?: never;
|
|
3648
|
+
url: '/search/uninstallPlugin';
|
|
3649
|
+
};
|
|
3650
|
+
export type SearchUninstallPluginPostResponses = {
|
|
3651
|
+
/**
|
|
3652
|
+
* All scenarios
|
|
3653
|
+
*/
|
|
3654
|
+
200: unknown;
|
|
3655
|
+
};
|
|
3656
|
+
export type SearchEnablePluginPostData = {
|
|
3657
|
+
body: {
|
|
3658
|
+
/**
|
|
3659
|
+
* Name of the plugin to enable/disable (e.g. "legittorrents"). Supports multiple names separated by `|`
|
|
3660
|
+
*/
|
|
3661
|
+
names: Array<string>;
|
|
3662
|
+
/**
|
|
3663
|
+
* Whether the plugins should be enabled
|
|
3664
|
+
*/
|
|
3665
|
+
enable: boolean;
|
|
3666
|
+
};
|
|
3667
|
+
path?: never;
|
|
3668
|
+
query?: never;
|
|
3669
|
+
url: '/search/enablePlugin';
|
|
3670
|
+
};
|
|
3671
|
+
export type SearchEnablePluginPostResponses = {
|
|
3672
|
+
/**
|
|
3673
|
+
* All scenarios
|
|
3674
|
+
*/
|
|
3675
|
+
200: unknown;
|
|
3676
|
+
};
|
|
3677
|
+
export type SearchUpdatePluginsPostData = {
|
|
3678
|
+
body?: never;
|
|
3679
|
+
path?: never;
|
|
3680
|
+
query?: never;
|
|
3681
|
+
url: '/search/updatePlugins';
|
|
3682
|
+
};
|
|
3683
|
+
export type SearchUpdatePluginsPostResponses = {
|
|
3684
|
+
/**
|
|
3685
|
+
* All scenarios
|
|
3686
|
+
*/
|
|
3687
|
+
200: unknown;
|
|
3688
|
+
};
|
|
3689
|
+
//# sourceMappingURL=types.gen.d.ts.map
|