tsarr 2.6.0 → 2.7.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 +4 -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/seerr.d.ts +4 -0
- package/dist/cli/commands/seerr.d.ts.map +1 -0
- package/dist/cli/completions.d.ts.map +1 -1
- package/dist/cli/config.d.ts +1 -1
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/index.js +1164 -56
- package/dist/clients/seerr-types.d.ts +2 -0
- package/dist/clients/seerr-types.d.ts.map +1 -0
- package/dist/clients/seerr.d.ts +158 -0
- package/dist/clients/seerr.d.ts.map +1 -0
- package/dist/clients/seerr.js +1009 -0
- package/dist/generated/seerr/client/client.gen.d.ts +3 -0
- package/dist/generated/seerr/client/client.gen.d.ts.map +1 -0
- package/dist/generated/seerr/client/index.d.ts +9 -0
- package/dist/generated/seerr/client/index.d.ts.map +1 -0
- package/dist/generated/seerr/client/types.gen.d.ts +118 -0
- package/dist/generated/seerr/client/types.gen.d.ts.map +1 -0
- package/dist/generated/seerr/client/utils.gen.d.ts +34 -0
- package/dist/generated/seerr/client/utils.gen.d.ts.map +1 -0
- package/dist/generated/seerr/client.gen.d.ts +13 -0
- package/dist/generated/seerr/client.gen.d.ts.map +1 -0
- package/dist/generated/seerr/core/auth.gen.d.ts +19 -0
- package/dist/generated/seerr/core/auth.gen.d.ts.map +1 -0
- package/dist/generated/seerr/core/bodySerializer.gen.d.ts +26 -0
- package/dist/generated/seerr/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/generated/seerr/core/params.gen.d.ts +44 -0
- package/dist/generated/seerr/core/params.gen.d.ts.map +1 -0
- package/dist/generated/seerr/core/pathSerializer.gen.d.ts +34 -0
- package/dist/generated/seerr/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/generated/seerr/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/generated/seerr/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/generated/seerr/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/generated/seerr/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/generated/seerr/core/types.gen.d.ts +79 -0
- package/dist/generated/seerr/core/types.gen.d.ts.map +1 -0
- package/dist/generated/seerr/core/utils.gen.d.ts +20 -0
- package/dist/generated/seerr/core/utils.gen.d.ts.map +1 -0
- package/dist/generated/seerr/index.d.ts +3 -0
- package/dist/generated/seerr/index.d.ts.map +1 -0
- package/dist/generated/seerr/sdk.gen.d.ts +1309 -0
- package/dist/generated/seerr/sdk.gen.d.ts.map +1 -0
- package/dist/generated/seerr/types.gen.d.ts +4867 -0
- package/dist/generated/seerr/types.gen.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -36
- package/dist/tsarr-2.7.0.tgz +0 -0
- package/package.json +12 -2
- package/dist/tsarr-2.6.0.tgz +0 -0
package/dist/cli/index.js
CHANGED
|
@@ -5080,7 +5080,8 @@ var init_config = __esm(() => {
|
|
|
5080
5080
|
"readarr",
|
|
5081
5081
|
"prowlarr",
|
|
5082
5082
|
"bazarr",
|
|
5083
|
-
"qbittorrent"
|
|
5083
|
+
"qbittorrent",
|
|
5084
|
+
"seerr"
|
|
5084
5085
|
];
|
|
5085
5086
|
GLOBAL_CONFIG_DIR = join(homedir(), ".config", "tsarr");
|
|
5086
5087
|
GLOBAL_CONFIG_PATH = join(GLOBAL_CONFIG_DIR, "config.json");
|
|
@@ -20064,48 +20065,1133 @@ var init_qbit = __esm(() => {
|
|
|
20064
20065
|
qbit = buildServiceCommand("qbittorrent", "Manage qBittorrent", (config) => new QBittorrentClient(config), resources7);
|
|
20065
20066
|
});
|
|
20066
20067
|
|
|
20067
|
-
// src/
|
|
20068
|
-
|
|
20069
|
-
|
|
20070
|
-
|
|
20071
|
-
|
|
20072
|
-
|
|
20073
|
-
|
|
20074
|
-
|
|
20075
|
-
|
|
20076
|
-
|
|
20077
|
-
|
|
20078
|
-
|
|
20079
|
-
|
|
20080
|
-
|
|
20081
|
-
|
|
20082
|
-
|
|
20083
|
-
|
|
20084
|
-
|
|
20068
|
+
// src/generated/seerr/core/serverSentEvents.gen.ts
|
|
20069
|
+
function createSseClient8({
|
|
20070
|
+
onRequest,
|
|
20071
|
+
onSseError,
|
|
20072
|
+
onSseEvent,
|
|
20073
|
+
responseTransformer,
|
|
20074
|
+
responseValidator,
|
|
20075
|
+
sseDefaultRetryDelay,
|
|
20076
|
+
sseMaxRetryAttempts,
|
|
20077
|
+
sseMaxRetryDelay,
|
|
20078
|
+
sseSleepFn,
|
|
20079
|
+
url,
|
|
20080
|
+
...options
|
|
20081
|
+
}) {
|
|
20082
|
+
let lastEventId;
|
|
20083
|
+
const sleep = sseSleepFn ?? ((ms) => new Promise((resolve2) => setTimeout(resolve2, ms)));
|
|
20084
|
+
const createStream = async function* () {
|
|
20085
|
+
let retryDelay = sseDefaultRetryDelay ?? 3000;
|
|
20086
|
+
let attempt = 0;
|
|
20087
|
+
const signal = options.signal ?? new AbortController().signal;
|
|
20088
|
+
while (true) {
|
|
20089
|
+
if (signal.aborted)
|
|
20090
|
+
break;
|
|
20091
|
+
attempt++;
|
|
20092
|
+
const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
|
|
20093
|
+
if (lastEventId !== undefined) {
|
|
20094
|
+
headers.set("Last-Event-ID", lastEventId);
|
|
20095
|
+
}
|
|
20096
|
+
try {
|
|
20097
|
+
const requestInit = {
|
|
20098
|
+
redirect: "follow",
|
|
20099
|
+
...options,
|
|
20100
|
+
body: options.serializedBody,
|
|
20101
|
+
headers,
|
|
20102
|
+
signal
|
|
20103
|
+
};
|
|
20104
|
+
let request = new Request(url, requestInit);
|
|
20105
|
+
if (onRequest) {
|
|
20106
|
+
request = await onRequest(url, requestInit);
|
|
20107
|
+
}
|
|
20108
|
+
const _fetch = options.fetch ?? globalThis.fetch;
|
|
20109
|
+
const response = await _fetch(request);
|
|
20110
|
+
if (!response.ok)
|
|
20111
|
+
throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
|
|
20112
|
+
if (!response.body)
|
|
20113
|
+
throw new Error("No body in SSE response");
|
|
20114
|
+
const reader = response.body.pipeThrough(new TextDecoderStream).getReader();
|
|
20115
|
+
let buffer = "";
|
|
20116
|
+
const abortHandler = () => {
|
|
20117
|
+
try {
|
|
20118
|
+
reader.cancel();
|
|
20119
|
+
} catch {}
|
|
20120
|
+
};
|
|
20121
|
+
signal.addEventListener("abort", abortHandler);
|
|
20122
|
+
try {
|
|
20123
|
+
while (true) {
|
|
20124
|
+
const { done, value } = await reader.read();
|
|
20125
|
+
if (done)
|
|
20126
|
+
break;
|
|
20127
|
+
buffer += value;
|
|
20128
|
+
buffer = buffer.replace(/\r\n?/g, `
|
|
20129
|
+
`);
|
|
20130
|
+
const chunks = buffer.split(`
|
|
20131
|
+
|
|
20132
|
+
`);
|
|
20133
|
+
buffer = chunks.pop() ?? "";
|
|
20134
|
+
for (const chunk of chunks) {
|
|
20135
|
+
const lines = chunk.split(`
|
|
20136
|
+
`);
|
|
20137
|
+
const dataLines = [];
|
|
20138
|
+
let eventName;
|
|
20139
|
+
for (const line of lines) {
|
|
20140
|
+
if (line.startsWith("data:")) {
|
|
20141
|
+
dataLines.push(line.replace(/^data:\s*/, ""));
|
|
20142
|
+
} else if (line.startsWith("event:")) {
|
|
20143
|
+
eventName = line.replace(/^event:\s*/, "");
|
|
20144
|
+
} else if (line.startsWith("id:")) {
|
|
20145
|
+
lastEventId = line.replace(/^id:\s*/, "");
|
|
20146
|
+
} else if (line.startsWith("retry:")) {
|
|
20147
|
+
const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
|
|
20148
|
+
if (!Number.isNaN(parsed)) {
|
|
20149
|
+
retryDelay = parsed;
|
|
20150
|
+
}
|
|
20151
|
+
}
|
|
20152
|
+
}
|
|
20153
|
+
let data;
|
|
20154
|
+
let parsedJson = false;
|
|
20155
|
+
if (dataLines.length) {
|
|
20156
|
+
const rawData = dataLines.join(`
|
|
20157
|
+
`);
|
|
20158
|
+
try {
|
|
20159
|
+
data = JSON.parse(rawData);
|
|
20160
|
+
parsedJson = true;
|
|
20161
|
+
} catch {
|
|
20162
|
+
data = rawData;
|
|
20163
|
+
}
|
|
20164
|
+
}
|
|
20165
|
+
if (parsedJson) {
|
|
20166
|
+
if (responseValidator) {
|
|
20167
|
+
await responseValidator(data);
|
|
20168
|
+
}
|
|
20169
|
+
if (responseTransformer) {
|
|
20170
|
+
data = await responseTransformer(data);
|
|
20171
|
+
}
|
|
20172
|
+
}
|
|
20173
|
+
onSseEvent?.({
|
|
20174
|
+
data,
|
|
20175
|
+
event: eventName,
|
|
20176
|
+
id: lastEventId,
|
|
20177
|
+
retry: retryDelay
|
|
20178
|
+
});
|
|
20179
|
+
if (dataLines.length) {
|
|
20180
|
+
yield data;
|
|
20181
|
+
}
|
|
20182
|
+
}
|
|
20183
|
+
}
|
|
20184
|
+
} finally {
|
|
20185
|
+
signal.removeEventListener("abort", abortHandler);
|
|
20186
|
+
reader.releaseLock();
|
|
20187
|
+
}
|
|
20188
|
+
break;
|
|
20189
|
+
} catch (error) {
|
|
20190
|
+
onSseError?.(error);
|
|
20191
|
+
if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {
|
|
20192
|
+
break;
|
|
20193
|
+
}
|
|
20194
|
+
const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);
|
|
20195
|
+
await sleep(backoff);
|
|
20196
|
+
}
|
|
20197
|
+
}
|
|
20198
|
+
};
|
|
20199
|
+
const stream = createStream();
|
|
20200
|
+
return { stream };
|
|
20201
|
+
}
|
|
20202
|
+
|
|
20203
|
+
// src/generated/seerr/core/pathSerializer.gen.ts
|
|
20204
|
+
var separatorArrayExplode8 = (style) => {
|
|
20205
|
+
switch (style) {
|
|
20206
|
+
case "label":
|
|
20207
|
+
return ".";
|
|
20208
|
+
case "matrix":
|
|
20209
|
+
return ";";
|
|
20210
|
+
case "simple":
|
|
20211
|
+
return ",";
|
|
20212
|
+
default:
|
|
20213
|
+
return "&";
|
|
20085
20214
|
}
|
|
20086
|
-
|
|
20087
|
-
|
|
20215
|
+
}, separatorArrayNoExplode8 = (style) => {
|
|
20216
|
+
switch (style) {
|
|
20217
|
+
case "form":
|
|
20218
|
+
return ",";
|
|
20219
|
+
case "pipeDelimited":
|
|
20220
|
+
return "|";
|
|
20221
|
+
case "spaceDelimited":
|
|
20222
|
+
return "%20";
|
|
20223
|
+
default:
|
|
20224
|
+
return ",";
|
|
20088
20225
|
}
|
|
20089
|
-
|
|
20090
|
-
|
|
20226
|
+
}, separatorObjectExplode8 = (style) => {
|
|
20227
|
+
switch (style) {
|
|
20228
|
+
case "label":
|
|
20229
|
+
return ".";
|
|
20230
|
+
case "matrix":
|
|
20231
|
+
return ";";
|
|
20232
|
+
case "simple":
|
|
20233
|
+
return ",";
|
|
20234
|
+
default:
|
|
20235
|
+
return "&";
|
|
20091
20236
|
}
|
|
20092
|
-
|
|
20093
|
-
|
|
20237
|
+
}, serializeArrayParam8 = ({
|
|
20238
|
+
allowReserved,
|
|
20239
|
+
explode,
|
|
20240
|
+
name,
|
|
20241
|
+
style,
|
|
20242
|
+
value
|
|
20243
|
+
}) => {
|
|
20244
|
+
if (!explode) {
|
|
20245
|
+
const joinedValues2 = (allowReserved ? value : value.map((v2) => encodeURIComponent(v2))).join(separatorArrayNoExplode8(style));
|
|
20246
|
+
switch (style) {
|
|
20247
|
+
case "label":
|
|
20248
|
+
return `.${joinedValues2}`;
|
|
20249
|
+
case "matrix":
|
|
20250
|
+
return `;${name}=${joinedValues2}`;
|
|
20251
|
+
case "simple":
|
|
20252
|
+
return joinedValues2;
|
|
20253
|
+
default:
|
|
20254
|
+
return `${name}=${joinedValues2}`;
|
|
20255
|
+
}
|
|
20094
20256
|
}
|
|
20095
|
-
|
|
20096
|
-
|
|
20257
|
+
const separator = separatorArrayExplode8(style);
|
|
20258
|
+
const joinedValues = value.map((v2) => {
|
|
20259
|
+
if (style === "label" || style === "simple") {
|
|
20260
|
+
return allowReserved ? v2 : encodeURIComponent(v2);
|
|
20261
|
+
}
|
|
20262
|
+
return serializePrimitiveParam8({
|
|
20263
|
+
allowReserved,
|
|
20264
|
+
name,
|
|
20265
|
+
value: v2
|
|
20266
|
+
});
|
|
20267
|
+
}).join(separator);
|
|
20268
|
+
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
20269
|
+
}, serializePrimitiveParam8 = ({
|
|
20270
|
+
allowReserved,
|
|
20271
|
+
name,
|
|
20272
|
+
value
|
|
20273
|
+
}) => {
|
|
20274
|
+
if (value === undefined || value === null) {
|
|
20275
|
+
return "";
|
|
20097
20276
|
}
|
|
20098
|
-
if (
|
|
20099
|
-
|
|
20277
|
+
if (typeof value === "object") {
|
|
20278
|
+
throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");
|
|
20100
20279
|
}
|
|
20101
|
-
|
|
20102
|
-
|
|
20280
|
+
return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
|
|
20281
|
+
}, serializeObjectParam8 = ({
|
|
20282
|
+
allowReserved,
|
|
20283
|
+
explode,
|
|
20284
|
+
name,
|
|
20285
|
+
style,
|
|
20286
|
+
value,
|
|
20287
|
+
valueOnly
|
|
20288
|
+
}) => {
|
|
20289
|
+
if (value instanceof Date) {
|
|
20290
|
+
return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
|
|
20103
20291
|
}
|
|
20104
|
-
if (
|
|
20105
|
-
|
|
20292
|
+
if (style !== "deepObject" && !explode) {
|
|
20293
|
+
let values = [];
|
|
20294
|
+
Object.entries(value).forEach(([key, v2]) => {
|
|
20295
|
+
values = [...values, key, allowReserved ? v2 : encodeURIComponent(v2)];
|
|
20296
|
+
});
|
|
20297
|
+
const joinedValues2 = values.join(",");
|
|
20298
|
+
switch (style) {
|
|
20299
|
+
case "form":
|
|
20300
|
+
return `${name}=${joinedValues2}`;
|
|
20301
|
+
case "label":
|
|
20302
|
+
return `.${joinedValues2}`;
|
|
20303
|
+
case "matrix":
|
|
20304
|
+
return `;${name}=${joinedValues2}`;
|
|
20305
|
+
default:
|
|
20306
|
+
return joinedValues2;
|
|
20307
|
+
}
|
|
20106
20308
|
}
|
|
20107
|
-
|
|
20108
|
-
|
|
20309
|
+
const separator = separatorObjectExplode8(style);
|
|
20310
|
+
const joinedValues = Object.entries(value).map(([key, v2]) => serializePrimitiveParam8({
|
|
20311
|
+
allowReserved,
|
|
20312
|
+
name: style === "deepObject" ? `${name}[${key}]` : key,
|
|
20313
|
+
value: v2
|
|
20314
|
+
})).join(separator);
|
|
20315
|
+
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
20316
|
+
};
|
|
20317
|
+
|
|
20318
|
+
// src/generated/seerr/core/utils.gen.ts
|
|
20319
|
+
function getValidRequestBody8(options) {
|
|
20320
|
+
const hasBody = options.body !== undefined;
|
|
20321
|
+
const isSerializedBody = hasBody && options.bodySerializer;
|
|
20322
|
+
if (isSerializedBody) {
|
|
20323
|
+
if ("serializedBody" in options) {
|
|
20324
|
+
const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== "";
|
|
20325
|
+
return hasSerializedBody ? options.serializedBody : null;
|
|
20326
|
+
}
|
|
20327
|
+
return options.body !== "" ? options.body : null;
|
|
20328
|
+
}
|
|
20329
|
+
if (hasBody) {
|
|
20330
|
+
return options.body;
|
|
20331
|
+
}
|
|
20332
|
+
return;
|
|
20333
|
+
}
|
|
20334
|
+
var PATH_PARAM_RE8, defaultPathSerializer8 = ({ path, url: _url }) => {
|
|
20335
|
+
let url = _url;
|
|
20336
|
+
const matches = _url.match(PATH_PARAM_RE8);
|
|
20337
|
+
if (matches) {
|
|
20338
|
+
for (const match of matches) {
|
|
20339
|
+
let explode = false;
|
|
20340
|
+
let name = match.substring(1, match.length - 1);
|
|
20341
|
+
let style = "simple";
|
|
20342
|
+
if (name.endsWith("*")) {
|
|
20343
|
+
explode = true;
|
|
20344
|
+
name = name.substring(0, name.length - 1);
|
|
20345
|
+
}
|
|
20346
|
+
if (name.startsWith(".")) {
|
|
20347
|
+
name = name.substring(1);
|
|
20348
|
+
style = "label";
|
|
20349
|
+
} else if (name.startsWith(";")) {
|
|
20350
|
+
name = name.substring(1);
|
|
20351
|
+
style = "matrix";
|
|
20352
|
+
}
|
|
20353
|
+
const value = path[name];
|
|
20354
|
+
if (value === undefined || value === null) {
|
|
20355
|
+
continue;
|
|
20356
|
+
}
|
|
20357
|
+
if (Array.isArray(value)) {
|
|
20358
|
+
url = url.replace(match, serializeArrayParam8({ explode, name, style, value }));
|
|
20359
|
+
continue;
|
|
20360
|
+
}
|
|
20361
|
+
if (typeof value === "object") {
|
|
20362
|
+
url = url.replace(match, serializeObjectParam8({
|
|
20363
|
+
explode,
|
|
20364
|
+
name,
|
|
20365
|
+
style,
|
|
20366
|
+
value,
|
|
20367
|
+
valueOnly: true
|
|
20368
|
+
}));
|
|
20369
|
+
continue;
|
|
20370
|
+
}
|
|
20371
|
+
if (style === "matrix") {
|
|
20372
|
+
url = url.replace(match, `;${serializePrimitiveParam8({
|
|
20373
|
+
name,
|
|
20374
|
+
value
|
|
20375
|
+
})}`);
|
|
20376
|
+
continue;
|
|
20377
|
+
}
|
|
20378
|
+
const replaceValue = encodeURIComponent(style === "label" ? `.${value}` : value);
|
|
20379
|
+
url = url.replace(match, replaceValue);
|
|
20380
|
+
}
|
|
20381
|
+
}
|
|
20382
|
+
return url;
|
|
20383
|
+
}, getUrl8 = ({
|
|
20384
|
+
baseUrl,
|
|
20385
|
+
path,
|
|
20386
|
+
query,
|
|
20387
|
+
querySerializer,
|
|
20388
|
+
url: _url
|
|
20389
|
+
}) => {
|
|
20390
|
+
const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
|
|
20391
|
+
let url = (baseUrl ?? "") + pathUrl;
|
|
20392
|
+
if (path) {
|
|
20393
|
+
url = defaultPathSerializer8({ path, url });
|
|
20394
|
+
}
|
|
20395
|
+
let search = query ? querySerializer(query) : "";
|
|
20396
|
+
if (search.startsWith("?")) {
|
|
20397
|
+
search = search.substring(1);
|
|
20398
|
+
}
|
|
20399
|
+
if (search) {
|
|
20400
|
+
url += `?${search}`;
|
|
20401
|
+
}
|
|
20402
|
+
return url;
|
|
20403
|
+
};
|
|
20404
|
+
var init_utils_gen15 = __esm(() => {
|
|
20405
|
+
PATH_PARAM_RE8 = /\{[^{}]+\}/g;
|
|
20406
|
+
});
|
|
20407
|
+
|
|
20408
|
+
// src/generated/seerr/core/auth.gen.ts
|
|
20409
|
+
var getAuthToken8 = async (auth, callback) => {
|
|
20410
|
+
const token = typeof callback === "function" ? await callback(auth) : callback;
|
|
20411
|
+
if (!token) {
|
|
20412
|
+
return;
|
|
20413
|
+
}
|
|
20414
|
+
if (auth.scheme === "bearer") {
|
|
20415
|
+
return `Bearer ${token}`;
|
|
20416
|
+
}
|
|
20417
|
+
if (auth.scheme === "basic") {
|
|
20418
|
+
return `Basic ${btoa(token)}`;
|
|
20419
|
+
}
|
|
20420
|
+
return token;
|
|
20421
|
+
};
|
|
20422
|
+
|
|
20423
|
+
// src/generated/seerr/core/bodySerializer.gen.ts
|
|
20424
|
+
var jsonBodySerializer8;
|
|
20425
|
+
var init_bodySerializer_gen8 = __esm(() => {
|
|
20426
|
+
jsonBodySerializer8 = {
|
|
20427
|
+
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
|
|
20428
|
+
};
|
|
20429
|
+
});
|
|
20430
|
+
|
|
20431
|
+
// src/generated/seerr/client/utils.gen.ts
|
|
20432
|
+
class Interceptors8 {
|
|
20433
|
+
fns = [];
|
|
20434
|
+
clear() {
|
|
20435
|
+
this.fns = [];
|
|
20436
|
+
}
|
|
20437
|
+
eject(id) {
|
|
20438
|
+
const index = this.getInterceptorIndex(id);
|
|
20439
|
+
if (this.fns[index]) {
|
|
20440
|
+
this.fns[index] = null;
|
|
20441
|
+
}
|
|
20442
|
+
}
|
|
20443
|
+
exists(id) {
|
|
20444
|
+
const index = this.getInterceptorIndex(id);
|
|
20445
|
+
return Boolean(this.fns[index]);
|
|
20446
|
+
}
|
|
20447
|
+
getInterceptorIndex(id) {
|
|
20448
|
+
if (typeof id === "number") {
|
|
20449
|
+
return this.fns[id] ? id : -1;
|
|
20450
|
+
}
|
|
20451
|
+
return this.fns.indexOf(id);
|
|
20452
|
+
}
|
|
20453
|
+
update(id, fn) {
|
|
20454
|
+
const index = this.getInterceptorIndex(id);
|
|
20455
|
+
if (this.fns[index]) {
|
|
20456
|
+
this.fns[index] = fn;
|
|
20457
|
+
return id;
|
|
20458
|
+
}
|
|
20459
|
+
return false;
|
|
20460
|
+
}
|
|
20461
|
+
use(fn) {
|
|
20462
|
+
this.fns.push(fn);
|
|
20463
|
+
return this.fns.length - 1;
|
|
20464
|
+
}
|
|
20465
|
+
}
|
|
20466
|
+
var createQuerySerializer8 = ({
|
|
20467
|
+
parameters = {},
|
|
20468
|
+
...args
|
|
20469
|
+
} = {}) => {
|
|
20470
|
+
const querySerializer = (queryParams) => {
|
|
20471
|
+
const search = [];
|
|
20472
|
+
if (queryParams && typeof queryParams === "object") {
|
|
20473
|
+
for (const name in queryParams) {
|
|
20474
|
+
const value = queryParams[name];
|
|
20475
|
+
if (value === undefined || value === null) {
|
|
20476
|
+
continue;
|
|
20477
|
+
}
|
|
20478
|
+
const options = parameters[name] || args;
|
|
20479
|
+
if (Array.isArray(value)) {
|
|
20480
|
+
const serializedArray = serializeArrayParam8({
|
|
20481
|
+
allowReserved: options.allowReserved,
|
|
20482
|
+
explode: true,
|
|
20483
|
+
name,
|
|
20484
|
+
style: "form",
|
|
20485
|
+
value,
|
|
20486
|
+
...options.array
|
|
20487
|
+
});
|
|
20488
|
+
if (serializedArray)
|
|
20489
|
+
search.push(serializedArray);
|
|
20490
|
+
} else if (typeof value === "object") {
|
|
20491
|
+
const serializedObject = serializeObjectParam8({
|
|
20492
|
+
allowReserved: options.allowReserved,
|
|
20493
|
+
explode: true,
|
|
20494
|
+
name,
|
|
20495
|
+
style: "deepObject",
|
|
20496
|
+
value,
|
|
20497
|
+
...options.object
|
|
20498
|
+
});
|
|
20499
|
+
if (serializedObject)
|
|
20500
|
+
search.push(serializedObject);
|
|
20501
|
+
} else {
|
|
20502
|
+
const serializedPrimitive = serializePrimitiveParam8({
|
|
20503
|
+
allowReserved: options.allowReserved,
|
|
20504
|
+
name,
|
|
20505
|
+
value
|
|
20506
|
+
});
|
|
20507
|
+
if (serializedPrimitive)
|
|
20508
|
+
search.push(serializedPrimitive);
|
|
20509
|
+
}
|
|
20510
|
+
}
|
|
20511
|
+
}
|
|
20512
|
+
return search.join("&");
|
|
20513
|
+
};
|
|
20514
|
+
return querySerializer;
|
|
20515
|
+
}, getParseAs8 = (contentType) => {
|
|
20516
|
+
if (!contentType) {
|
|
20517
|
+
return "stream";
|
|
20518
|
+
}
|
|
20519
|
+
const cleanContent = contentType.split(";")[0]?.trim();
|
|
20520
|
+
if (!cleanContent) {
|
|
20521
|
+
return;
|
|
20522
|
+
}
|
|
20523
|
+
if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
|
|
20524
|
+
return "json";
|
|
20525
|
+
}
|
|
20526
|
+
if (cleanContent === "multipart/form-data") {
|
|
20527
|
+
return "formData";
|
|
20528
|
+
}
|
|
20529
|
+
if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
|
|
20530
|
+
return "blob";
|
|
20531
|
+
}
|
|
20532
|
+
if (cleanContent.startsWith("text/")) {
|
|
20533
|
+
return "text";
|
|
20534
|
+
}
|
|
20535
|
+
return;
|
|
20536
|
+
}, checkForExistence8 = (options, name) => {
|
|
20537
|
+
if (!name) {
|
|
20538
|
+
return false;
|
|
20539
|
+
}
|
|
20540
|
+
if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
|
|
20541
|
+
return true;
|
|
20542
|
+
}
|
|
20543
|
+
return false;
|
|
20544
|
+
}, setAuthParams8 = async ({
|
|
20545
|
+
security,
|
|
20546
|
+
...options
|
|
20547
|
+
}) => {
|
|
20548
|
+
for (const auth of security) {
|
|
20549
|
+
if (checkForExistence8(options, auth.name)) {
|
|
20550
|
+
continue;
|
|
20551
|
+
}
|
|
20552
|
+
const token = await getAuthToken8(auth, options.auth);
|
|
20553
|
+
if (!token) {
|
|
20554
|
+
continue;
|
|
20555
|
+
}
|
|
20556
|
+
const name = auth.name ?? "Authorization";
|
|
20557
|
+
switch (auth.in) {
|
|
20558
|
+
case "query":
|
|
20559
|
+
if (!options.query) {
|
|
20560
|
+
options.query = {};
|
|
20561
|
+
}
|
|
20562
|
+
options.query[name] = token;
|
|
20563
|
+
break;
|
|
20564
|
+
case "cookie":
|
|
20565
|
+
options.headers.append("Cookie", `${name}=${token}`);
|
|
20566
|
+
break;
|
|
20567
|
+
case "header":
|
|
20568
|
+
default:
|
|
20569
|
+
options.headers.set(name, token);
|
|
20570
|
+
break;
|
|
20571
|
+
}
|
|
20572
|
+
}
|
|
20573
|
+
}, buildUrl8 = (options) => getUrl8({
|
|
20574
|
+
baseUrl: options.baseUrl,
|
|
20575
|
+
path: options.path,
|
|
20576
|
+
query: options.query,
|
|
20577
|
+
querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer8(options.querySerializer),
|
|
20578
|
+
url: options.url
|
|
20579
|
+
}), mergeConfigs8 = (a2, b2) => {
|
|
20580
|
+
const config = { ...a2, ...b2 };
|
|
20581
|
+
if (config.baseUrl?.endsWith("/")) {
|
|
20582
|
+
config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
|
|
20583
|
+
}
|
|
20584
|
+
config.headers = mergeHeaders8(a2.headers, b2.headers);
|
|
20585
|
+
return config;
|
|
20586
|
+
}, headersEntries8 = (headers) => {
|
|
20587
|
+
const entries = [];
|
|
20588
|
+
headers.forEach((value, key) => {
|
|
20589
|
+
entries.push([key, value]);
|
|
20590
|
+
});
|
|
20591
|
+
return entries;
|
|
20592
|
+
}, mergeHeaders8 = (...headers) => {
|
|
20593
|
+
const mergedHeaders = new Headers;
|
|
20594
|
+
for (const header of headers) {
|
|
20595
|
+
if (!header) {
|
|
20596
|
+
continue;
|
|
20597
|
+
}
|
|
20598
|
+
const iterator = header instanceof Headers ? headersEntries8(header) : Object.entries(header);
|
|
20599
|
+
for (const [key, value] of iterator) {
|
|
20600
|
+
if (value === null) {
|
|
20601
|
+
mergedHeaders.delete(key);
|
|
20602
|
+
} else if (Array.isArray(value)) {
|
|
20603
|
+
for (const v2 of value) {
|
|
20604
|
+
mergedHeaders.append(key, v2);
|
|
20605
|
+
}
|
|
20606
|
+
} else if (value !== undefined) {
|
|
20607
|
+
mergedHeaders.set(key, typeof value === "object" ? JSON.stringify(value) : value);
|
|
20608
|
+
}
|
|
20609
|
+
}
|
|
20610
|
+
}
|
|
20611
|
+
return mergedHeaders;
|
|
20612
|
+
}, createInterceptors8 = () => ({
|
|
20613
|
+
error: new Interceptors8,
|
|
20614
|
+
request: new Interceptors8,
|
|
20615
|
+
response: new Interceptors8
|
|
20616
|
+
}), defaultQuerySerializer8, defaultHeaders8, createConfig8 = (override = {}) => ({
|
|
20617
|
+
...jsonBodySerializer8,
|
|
20618
|
+
headers: defaultHeaders8,
|
|
20619
|
+
parseAs: "auto",
|
|
20620
|
+
querySerializer: defaultQuerySerializer8,
|
|
20621
|
+
...override
|
|
20622
|
+
});
|
|
20623
|
+
var init_utils_gen16 = __esm(() => {
|
|
20624
|
+
init_bodySerializer_gen8();
|
|
20625
|
+
init_utils_gen15();
|
|
20626
|
+
defaultQuerySerializer8 = createQuerySerializer8({
|
|
20627
|
+
allowReserved: false,
|
|
20628
|
+
array: {
|
|
20629
|
+
explode: true,
|
|
20630
|
+
style: "form"
|
|
20631
|
+
},
|
|
20632
|
+
object: {
|
|
20633
|
+
explode: true,
|
|
20634
|
+
style: "deepObject"
|
|
20635
|
+
}
|
|
20636
|
+
});
|
|
20637
|
+
defaultHeaders8 = {
|
|
20638
|
+
"Content-Type": "application/json"
|
|
20639
|
+
};
|
|
20640
|
+
});
|
|
20641
|
+
|
|
20642
|
+
// src/generated/seerr/client/client.gen.ts
|
|
20643
|
+
var createClient8 = (config = {}) => {
|
|
20644
|
+
let _config = mergeConfigs8(createConfig8(), config);
|
|
20645
|
+
const getConfig = () => ({ ..._config });
|
|
20646
|
+
const setConfig = (config2) => {
|
|
20647
|
+
_config = mergeConfigs8(_config, config2);
|
|
20648
|
+
return getConfig();
|
|
20649
|
+
};
|
|
20650
|
+
const interceptors = createInterceptors8();
|
|
20651
|
+
const beforeRequest = async (options) => {
|
|
20652
|
+
const opts = {
|
|
20653
|
+
..._config,
|
|
20654
|
+
...options,
|
|
20655
|
+
fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
|
|
20656
|
+
headers: mergeHeaders8(_config.headers, options.headers),
|
|
20657
|
+
serializedBody: undefined
|
|
20658
|
+
};
|
|
20659
|
+
if (opts.security) {
|
|
20660
|
+
await setAuthParams8({
|
|
20661
|
+
...opts,
|
|
20662
|
+
security: opts.security
|
|
20663
|
+
});
|
|
20664
|
+
}
|
|
20665
|
+
if (opts.requestValidator) {
|
|
20666
|
+
await opts.requestValidator(opts);
|
|
20667
|
+
}
|
|
20668
|
+
if (opts.body !== undefined && opts.bodySerializer) {
|
|
20669
|
+
opts.serializedBody = opts.bodySerializer(opts.body);
|
|
20670
|
+
}
|
|
20671
|
+
if (opts.body === undefined || opts.serializedBody === "") {
|
|
20672
|
+
opts.headers.delete("Content-Type");
|
|
20673
|
+
}
|
|
20674
|
+
const resolvedOpts = opts;
|
|
20675
|
+
const url = buildUrl8(resolvedOpts);
|
|
20676
|
+
return { opts: resolvedOpts, url };
|
|
20677
|
+
};
|
|
20678
|
+
const request = async (options) => {
|
|
20679
|
+
const { opts, url } = await beforeRequest(options);
|
|
20680
|
+
const requestInit = {
|
|
20681
|
+
redirect: "follow",
|
|
20682
|
+
...opts,
|
|
20683
|
+
body: getValidRequestBody8(opts)
|
|
20684
|
+
};
|
|
20685
|
+
let request2 = new Request(url, requestInit);
|
|
20686
|
+
for (const fn of interceptors.request.fns) {
|
|
20687
|
+
if (fn) {
|
|
20688
|
+
request2 = await fn(request2, opts);
|
|
20689
|
+
}
|
|
20690
|
+
}
|
|
20691
|
+
const _fetch = opts.fetch;
|
|
20692
|
+
let response;
|
|
20693
|
+
try {
|
|
20694
|
+
response = await _fetch(request2);
|
|
20695
|
+
} catch (error2) {
|
|
20696
|
+
let finalError2 = error2;
|
|
20697
|
+
for (const fn of interceptors.error.fns) {
|
|
20698
|
+
if (fn) {
|
|
20699
|
+
finalError2 = await fn(error2, undefined, request2, opts);
|
|
20700
|
+
}
|
|
20701
|
+
}
|
|
20702
|
+
finalError2 = finalError2 || {};
|
|
20703
|
+
if (opts.throwOnError) {
|
|
20704
|
+
throw finalError2;
|
|
20705
|
+
}
|
|
20706
|
+
return opts.responseStyle === "data" ? undefined : {
|
|
20707
|
+
error: finalError2,
|
|
20708
|
+
request: request2,
|
|
20709
|
+
response: undefined
|
|
20710
|
+
};
|
|
20711
|
+
}
|
|
20712
|
+
for (const fn of interceptors.response.fns) {
|
|
20713
|
+
if (fn) {
|
|
20714
|
+
response = await fn(response, request2, opts);
|
|
20715
|
+
}
|
|
20716
|
+
}
|
|
20717
|
+
const result = {
|
|
20718
|
+
request: request2,
|
|
20719
|
+
response
|
|
20720
|
+
};
|
|
20721
|
+
if (response.ok) {
|
|
20722
|
+
const parseAs = (opts.parseAs === "auto" ? getParseAs8(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
|
|
20723
|
+
if (response.status === 204 || response.headers.get("Content-Length") === "0") {
|
|
20724
|
+
let emptyData;
|
|
20725
|
+
switch (parseAs) {
|
|
20726
|
+
case "arrayBuffer":
|
|
20727
|
+
case "blob":
|
|
20728
|
+
case "text":
|
|
20729
|
+
emptyData = await response[parseAs]();
|
|
20730
|
+
break;
|
|
20731
|
+
case "formData":
|
|
20732
|
+
emptyData = new FormData;
|
|
20733
|
+
break;
|
|
20734
|
+
case "stream":
|
|
20735
|
+
emptyData = response.body;
|
|
20736
|
+
break;
|
|
20737
|
+
case "json":
|
|
20738
|
+
default:
|
|
20739
|
+
emptyData = {};
|
|
20740
|
+
break;
|
|
20741
|
+
}
|
|
20742
|
+
return opts.responseStyle === "data" ? emptyData : {
|
|
20743
|
+
data: emptyData,
|
|
20744
|
+
...result
|
|
20745
|
+
};
|
|
20746
|
+
}
|
|
20747
|
+
let data;
|
|
20748
|
+
switch (parseAs) {
|
|
20749
|
+
case "arrayBuffer":
|
|
20750
|
+
case "blob":
|
|
20751
|
+
case "formData":
|
|
20752
|
+
case "text":
|
|
20753
|
+
data = await response[parseAs]();
|
|
20754
|
+
break;
|
|
20755
|
+
case "json": {
|
|
20756
|
+
const text = await response.text();
|
|
20757
|
+
data = text ? JSON.parse(text) : {};
|
|
20758
|
+
break;
|
|
20759
|
+
}
|
|
20760
|
+
case "stream":
|
|
20761
|
+
return opts.responseStyle === "data" ? response.body : {
|
|
20762
|
+
data: response.body,
|
|
20763
|
+
...result
|
|
20764
|
+
};
|
|
20765
|
+
}
|
|
20766
|
+
if (parseAs === "json") {
|
|
20767
|
+
if (opts.responseValidator) {
|
|
20768
|
+
await opts.responseValidator(data);
|
|
20769
|
+
}
|
|
20770
|
+
if (opts.responseTransformer) {
|
|
20771
|
+
data = await opts.responseTransformer(data);
|
|
20772
|
+
}
|
|
20773
|
+
}
|
|
20774
|
+
return opts.responseStyle === "data" ? data : {
|
|
20775
|
+
data,
|
|
20776
|
+
...result
|
|
20777
|
+
};
|
|
20778
|
+
}
|
|
20779
|
+
const textError = await response.text();
|
|
20780
|
+
let jsonError;
|
|
20781
|
+
try {
|
|
20782
|
+
jsonError = JSON.parse(textError);
|
|
20783
|
+
} catch {}
|
|
20784
|
+
const error = jsonError ?? textError;
|
|
20785
|
+
let finalError = error;
|
|
20786
|
+
for (const fn of interceptors.error.fns) {
|
|
20787
|
+
if (fn) {
|
|
20788
|
+
finalError = await fn(error, response, request2, opts);
|
|
20789
|
+
}
|
|
20790
|
+
}
|
|
20791
|
+
finalError = finalError || {};
|
|
20792
|
+
if (opts.throwOnError) {
|
|
20793
|
+
throw finalError;
|
|
20794
|
+
}
|
|
20795
|
+
return opts.responseStyle === "data" ? undefined : {
|
|
20796
|
+
error: finalError,
|
|
20797
|
+
...result
|
|
20798
|
+
};
|
|
20799
|
+
};
|
|
20800
|
+
const makeMethodFn = (method) => (options) => request({ ...options, method });
|
|
20801
|
+
const makeSseFn = (method) => async (options) => {
|
|
20802
|
+
const { opts, url } = await beforeRequest(options);
|
|
20803
|
+
return createSseClient8({
|
|
20804
|
+
...opts,
|
|
20805
|
+
body: opts.body,
|
|
20806
|
+
headers: opts.headers,
|
|
20807
|
+
method,
|
|
20808
|
+
onRequest: async (url2, init2) => {
|
|
20809
|
+
let request2 = new Request(url2, init2);
|
|
20810
|
+
for (const fn of interceptors.request.fns) {
|
|
20811
|
+
if (fn) {
|
|
20812
|
+
request2 = await fn(request2, opts);
|
|
20813
|
+
}
|
|
20814
|
+
}
|
|
20815
|
+
return request2;
|
|
20816
|
+
},
|
|
20817
|
+
serializedBody: getValidRequestBody8(opts),
|
|
20818
|
+
url
|
|
20819
|
+
});
|
|
20820
|
+
};
|
|
20821
|
+
const _buildUrl = (options) => buildUrl8({ ..._config, ...options });
|
|
20822
|
+
return {
|
|
20823
|
+
buildUrl: _buildUrl,
|
|
20824
|
+
connect: makeMethodFn("CONNECT"),
|
|
20825
|
+
delete: makeMethodFn("DELETE"),
|
|
20826
|
+
get: makeMethodFn("GET"),
|
|
20827
|
+
getConfig,
|
|
20828
|
+
head: makeMethodFn("HEAD"),
|
|
20829
|
+
interceptors,
|
|
20830
|
+
options: makeMethodFn("OPTIONS"),
|
|
20831
|
+
patch: makeMethodFn("PATCH"),
|
|
20832
|
+
post: makeMethodFn("POST"),
|
|
20833
|
+
put: makeMethodFn("PUT"),
|
|
20834
|
+
request,
|
|
20835
|
+
setConfig,
|
|
20836
|
+
sse: {
|
|
20837
|
+
connect: makeSseFn("CONNECT"),
|
|
20838
|
+
delete: makeSseFn("DELETE"),
|
|
20839
|
+
get: makeSseFn("GET"),
|
|
20840
|
+
head: makeSseFn("HEAD"),
|
|
20841
|
+
options: makeSseFn("OPTIONS"),
|
|
20842
|
+
patch: makeSseFn("PATCH"),
|
|
20843
|
+
post: makeSseFn("POST"),
|
|
20844
|
+
put: makeSseFn("PUT"),
|
|
20845
|
+
trace: makeSseFn("TRACE")
|
|
20846
|
+
},
|
|
20847
|
+
trace: makeMethodFn("TRACE")
|
|
20848
|
+
};
|
|
20849
|
+
};
|
|
20850
|
+
var init_client_gen15 = __esm(() => {
|
|
20851
|
+
init_utils_gen15();
|
|
20852
|
+
init_utils_gen16();
|
|
20853
|
+
});
|
|
20854
|
+
|
|
20855
|
+
// src/generated/seerr/client/index.ts
|
|
20856
|
+
var init_client9 = __esm(() => {
|
|
20857
|
+
init_client_gen15();
|
|
20858
|
+
init_utils_gen16();
|
|
20859
|
+
});
|
|
20860
|
+
|
|
20861
|
+
// src/generated/seerr/client.gen.ts
|
|
20862
|
+
var client8;
|
|
20863
|
+
var init_client_gen16 = __esm(() => {
|
|
20864
|
+
init_client9();
|
|
20865
|
+
client8 = createClient8(createConfig8());
|
|
20866
|
+
});
|
|
20867
|
+
|
|
20868
|
+
// src/generated/seerr/sdk.gen.ts
|
|
20869
|
+
var getStatus = (options) => (options?.client ?? client8).get({ url: "/status", ...options }), getUser = (options) => (options?.client ?? client8).get({
|
|
20870
|
+
security: [{
|
|
20871
|
+
in: "cookie",
|
|
20872
|
+
name: "connect.sid",
|
|
20873
|
+
type: "apiKey"
|
|
20874
|
+
}, { name: "X-Api-Key", type: "apiKey" }],
|
|
20875
|
+
url: "/user",
|
|
20876
|
+
...options
|
|
20877
|
+
}), getUserByUserId = (options) => (options.client ?? client8).get({
|
|
20878
|
+
security: [{
|
|
20879
|
+
in: "cookie",
|
|
20880
|
+
name: "connect.sid",
|
|
20881
|
+
type: "apiKey"
|
|
20882
|
+
}, { name: "X-Api-Key", type: "apiKey" }],
|
|
20883
|
+
url: "/user/{userId}",
|
|
20884
|
+
...options
|
|
20885
|
+
}), getSearch = (options) => (options.client ?? client8).get({
|
|
20886
|
+
security: [{
|
|
20887
|
+
in: "cookie",
|
|
20888
|
+
name: "connect.sid",
|
|
20889
|
+
type: "apiKey"
|
|
20890
|
+
}, { name: "X-Api-Key", type: "apiKey" }],
|
|
20891
|
+
url: "/search",
|
|
20892
|
+
...options
|
|
20893
|
+
}), getRequest = (options) => (options?.client ?? client8).get({
|
|
20894
|
+
security: [{
|
|
20895
|
+
in: "cookie",
|
|
20896
|
+
name: "connect.sid",
|
|
20897
|
+
type: "apiKey"
|
|
20898
|
+
}, { name: "X-Api-Key", type: "apiKey" }],
|
|
20899
|
+
url: "/request",
|
|
20900
|
+
...options
|
|
20901
|
+
}), getRequestCount = (options) => (options?.client ?? client8).get({
|
|
20902
|
+
security: [{
|
|
20903
|
+
in: "cookie",
|
|
20904
|
+
name: "connect.sid",
|
|
20905
|
+
type: "apiKey"
|
|
20906
|
+
}, { name: "X-Api-Key", type: "apiKey" }],
|
|
20907
|
+
url: "/request/count",
|
|
20908
|
+
...options
|
|
20909
|
+
}), getRequestByRequestId = (options) => (options.client ?? client8).get({
|
|
20910
|
+
security: [{
|
|
20911
|
+
in: "cookie",
|
|
20912
|
+
name: "connect.sid",
|
|
20913
|
+
type: "apiKey"
|
|
20914
|
+
}, { name: "X-Api-Key", type: "apiKey" }],
|
|
20915
|
+
url: "/request/{requestId}",
|
|
20916
|
+
...options
|
|
20917
|
+
}), postRequestByRequestIdByStatus = (options) => (options.client ?? client8).post({
|
|
20918
|
+
security: [{
|
|
20919
|
+
in: "cookie",
|
|
20920
|
+
name: "connect.sid",
|
|
20921
|
+
type: "apiKey"
|
|
20922
|
+
}, { name: "X-Api-Key", type: "apiKey" }],
|
|
20923
|
+
url: "/request/{requestId}/{status}",
|
|
20924
|
+
...options
|
|
20925
|
+
}), getMedia = (options) => (options?.client ?? client8).get({
|
|
20926
|
+
security: [{
|
|
20927
|
+
in: "cookie",
|
|
20928
|
+
name: "connect.sid",
|
|
20929
|
+
type: "apiKey"
|
|
20930
|
+
}, { name: "X-Api-Key", type: "apiKey" }],
|
|
20931
|
+
url: "/media",
|
|
20932
|
+
...options
|
|
20933
|
+
});
|
|
20934
|
+
var init_sdk_gen8 = __esm(() => {
|
|
20935
|
+
init_client_gen16();
|
|
20936
|
+
});
|
|
20937
|
+
|
|
20938
|
+
// src/generated/seerr/index.ts
|
|
20939
|
+
var init_seerr = __esm(() => {
|
|
20940
|
+
init_sdk_gen8();
|
|
20941
|
+
});
|
|
20942
|
+
|
|
20943
|
+
// src/clients/seerr.ts
|
|
20944
|
+
var exports_seerr = {};
|
|
20945
|
+
__export(exports_seerr, {
|
|
20946
|
+
SeerrClient: () => SeerrClient
|
|
20947
|
+
});
|
|
20948
|
+
|
|
20949
|
+
class SeerrClient {
|
|
20950
|
+
clientConfig;
|
|
20951
|
+
constructor(config) {
|
|
20952
|
+
this.clientConfig = createServarrClient(config);
|
|
20953
|
+
client8.setConfig({
|
|
20954
|
+
baseUrl: `${this.clientConfig.getBaseUrl()}/api/v1`,
|
|
20955
|
+
headers: {
|
|
20956
|
+
"X-Api-Key": this.clientConfig.config.apiKey,
|
|
20957
|
+
...this.clientConfig.config.headers ?? {}
|
|
20958
|
+
}
|
|
20959
|
+
});
|
|
20960
|
+
}
|
|
20961
|
+
async getSystemStatus() {
|
|
20962
|
+
return getStatus();
|
|
20963
|
+
}
|
|
20964
|
+
async getRequests(options) {
|
|
20965
|
+
const query = {};
|
|
20966
|
+
if (options?.take)
|
|
20967
|
+
query.take = options.take;
|
|
20968
|
+
if (options?.skip)
|
|
20969
|
+
query.skip = options.skip;
|
|
20970
|
+
if (options?.filter)
|
|
20971
|
+
query.filter = options.filter;
|
|
20972
|
+
if (options?.sort)
|
|
20973
|
+
query.sort = options.sort;
|
|
20974
|
+
if (options?.sortDirection)
|
|
20975
|
+
query.sortDirection = options.sortDirection;
|
|
20976
|
+
return getRequest(Object.keys(query).length > 0 ? { query } : {});
|
|
20977
|
+
}
|
|
20978
|
+
async getRequestById(requestId) {
|
|
20979
|
+
return getRequestByRequestId({ path: { requestId } });
|
|
20980
|
+
}
|
|
20981
|
+
async getRequestCount() {
|
|
20982
|
+
return getRequestCount();
|
|
20983
|
+
}
|
|
20984
|
+
async approveRequest(requestId) {
|
|
20985
|
+
const result = await postRequestByRequestIdByStatus({
|
|
20986
|
+
path: { requestId, status: "approve" }
|
|
20987
|
+
});
|
|
20988
|
+
return result.data;
|
|
20989
|
+
}
|
|
20990
|
+
async declineRequest(requestId) {
|
|
20991
|
+
const result = await postRequestByRequestIdByStatus({
|
|
20992
|
+
path: { requestId, status: "decline" }
|
|
20993
|
+
});
|
|
20994
|
+
return result.data;
|
|
20995
|
+
}
|
|
20996
|
+
async search(query, page, language) {
|
|
20997
|
+
const searchQuery = { query };
|
|
20998
|
+
if (page)
|
|
20999
|
+
searchQuery.page = page;
|
|
21000
|
+
if (language)
|
|
21001
|
+
searchQuery.language = language;
|
|
21002
|
+
return getSearch({ query: searchQuery });
|
|
21003
|
+
}
|
|
21004
|
+
async getUsers(options) {
|
|
21005
|
+
const query = {};
|
|
21006
|
+
if (options?.take)
|
|
21007
|
+
query.take = options.take;
|
|
21008
|
+
if (options?.skip)
|
|
21009
|
+
query.skip = options.skip;
|
|
21010
|
+
if (options?.sort)
|
|
21011
|
+
query.sort = options.sort;
|
|
21012
|
+
return getUser(Object.keys(query).length > 0 ? { query } : {});
|
|
21013
|
+
}
|
|
21014
|
+
async getUserById(userId) {
|
|
21015
|
+
return getUserByUserId({ path: { userId } });
|
|
21016
|
+
}
|
|
21017
|
+
async getMedia(options) {
|
|
21018
|
+
const query = {};
|
|
21019
|
+
if (options?.take)
|
|
21020
|
+
query.take = options.take;
|
|
21021
|
+
if (options?.skip)
|
|
21022
|
+
query.skip = options.skip;
|
|
21023
|
+
return getMedia(Object.keys(query).length > 0 ? { query } : {});
|
|
21024
|
+
}
|
|
21025
|
+
updateConfig(newConfig) {
|
|
21026
|
+
const updatedConfig = { ...this.clientConfig.config, ...newConfig };
|
|
21027
|
+
this.clientConfig = createServarrClient(updatedConfig);
|
|
21028
|
+
client8.setConfig({
|
|
21029
|
+
baseUrl: `${this.clientConfig.getBaseUrl()}/api/v1`,
|
|
21030
|
+
headers: {
|
|
21031
|
+
"X-Api-Key": this.clientConfig.config.apiKey,
|
|
21032
|
+
...this.clientConfig.config.headers ?? {}
|
|
21033
|
+
}
|
|
21034
|
+
});
|
|
21035
|
+
return this.clientConfig.config;
|
|
21036
|
+
}
|
|
21037
|
+
}
|
|
21038
|
+
var init_seerr2 = __esm(() => {
|
|
21039
|
+
init_client();
|
|
21040
|
+
init_client_gen16();
|
|
21041
|
+
init_seerr();
|
|
21042
|
+
});
|
|
21043
|
+
|
|
21044
|
+
// src/cli/commands/seerr.ts
|
|
21045
|
+
var exports_seerr3 = {};
|
|
21046
|
+
__export(exports_seerr3, {
|
|
21047
|
+
seerr: () => seerr,
|
|
21048
|
+
resources: () => resources8
|
|
21049
|
+
});
|
|
21050
|
+
var resources8, seerr;
|
|
21051
|
+
var init_seerr3 = __esm(() => {
|
|
21052
|
+
init_seerr2();
|
|
21053
|
+
init_service();
|
|
21054
|
+
resources8 = [
|
|
21055
|
+
{
|
|
21056
|
+
name: "requests",
|
|
21057
|
+
description: "Manage media requests",
|
|
21058
|
+
actions: [
|
|
21059
|
+
{
|
|
21060
|
+
name: "list",
|
|
21061
|
+
description: "List media requests",
|
|
21062
|
+
args: [
|
|
21063
|
+
{
|
|
21064
|
+
name: "filter",
|
|
21065
|
+
description: "Filter (all|approved|available|pending|processing|unavailable|failed|deleted|completed)"
|
|
21066
|
+
}
|
|
21067
|
+
],
|
|
21068
|
+
columns: ["id", "status", "requestedBy", "createdAt", "updatedAt"],
|
|
21069
|
+
idField: "id",
|
|
21070
|
+
run: (c3, a2) => c3.getRequests(a2.filter ? { filter: a2.filter } : undefined)
|
|
21071
|
+
},
|
|
21072
|
+
{
|
|
21073
|
+
name: "count",
|
|
21074
|
+
description: "Get request counts",
|
|
21075
|
+
run: (c3) => c3.getRequestCount()
|
|
21076
|
+
},
|
|
21077
|
+
{
|
|
21078
|
+
name: "approve",
|
|
21079
|
+
description: "Approve a request",
|
|
21080
|
+
args: [
|
|
21081
|
+
{
|
|
21082
|
+
name: "id",
|
|
21083
|
+
description: "Request ID",
|
|
21084
|
+
required: true
|
|
21085
|
+
}
|
|
21086
|
+
],
|
|
21087
|
+
run: (c3, a2) => c3.approveRequest(a2.id)
|
|
21088
|
+
},
|
|
21089
|
+
{
|
|
21090
|
+
name: "decline",
|
|
21091
|
+
description: "Decline a request",
|
|
21092
|
+
args: [
|
|
21093
|
+
{
|
|
21094
|
+
name: "id",
|
|
21095
|
+
description: "Request ID",
|
|
21096
|
+
required: true
|
|
21097
|
+
}
|
|
21098
|
+
],
|
|
21099
|
+
confirmMessage: "Are you sure you want to decline this request?",
|
|
21100
|
+
run: (c3, a2) => c3.declineRequest(a2.id)
|
|
21101
|
+
}
|
|
21102
|
+
]
|
|
21103
|
+
},
|
|
21104
|
+
{
|
|
21105
|
+
name: "search",
|
|
21106
|
+
description: "Search media",
|
|
21107
|
+
actions: [
|
|
21108
|
+
{
|
|
21109
|
+
name: "query",
|
|
21110
|
+
description: "Search for movies and TV shows",
|
|
21111
|
+
args: [
|
|
21112
|
+
{
|
|
21113
|
+
name: "query",
|
|
21114
|
+
description: "Search query",
|
|
21115
|
+
required: true
|
|
21116
|
+
}
|
|
21117
|
+
],
|
|
21118
|
+
columns: ["id", "mediaType", "title", "releaseDate", "voteAverage"],
|
|
21119
|
+
idField: "id",
|
|
21120
|
+
run: (c3, a2) => c3.search(a2.query)
|
|
21121
|
+
}
|
|
21122
|
+
]
|
|
21123
|
+
},
|
|
21124
|
+
{
|
|
21125
|
+
name: "users",
|
|
21126
|
+
description: "Manage users",
|
|
21127
|
+
actions: [
|
|
21128
|
+
{
|
|
21129
|
+
name: "list",
|
|
21130
|
+
description: "List users",
|
|
21131
|
+
columns: ["id", "email", "username", "requestCount", "createdAt"],
|
|
21132
|
+
idField: "id",
|
|
21133
|
+
run: (c3) => c3.getUsers()
|
|
21134
|
+
}
|
|
21135
|
+
]
|
|
21136
|
+
},
|
|
21137
|
+
{
|
|
21138
|
+
name: "status",
|
|
21139
|
+
description: "Server status",
|
|
21140
|
+
actions: [
|
|
21141
|
+
{
|
|
21142
|
+
name: "show",
|
|
21143
|
+
description: "Show server status",
|
|
21144
|
+
columns: ["version", "commitTag", "updateAvailable", "commitsBehind"],
|
|
21145
|
+
run: (c3) => c3.getSystemStatus()
|
|
21146
|
+
}
|
|
21147
|
+
]
|
|
21148
|
+
}
|
|
21149
|
+
];
|
|
21150
|
+
seerr = buildServiceCommand("seerr", "Manage Seerr (Media Requests)", (config) => new SeerrClient(config), resources8);
|
|
21151
|
+
});
|
|
21152
|
+
|
|
21153
|
+
// src/cli/commands/doctor.ts
|
|
21154
|
+
var exports_doctor = {};
|
|
21155
|
+
__export(exports_doctor, {
|
|
21156
|
+
doctor: () => doctor
|
|
21157
|
+
});
|
|
21158
|
+
function classifyError(error) {
|
|
21159
|
+
if (!(error instanceof Error))
|
|
21160
|
+
return "Unknown error";
|
|
21161
|
+
const msg = error.message;
|
|
21162
|
+
const cause = error.cause;
|
|
21163
|
+
if (cause?.code === "ECONNREFUSED" || msg.includes("ECONNREFUSED")) {
|
|
21164
|
+
return "Connection refused - is the service running?";
|
|
21165
|
+
}
|
|
21166
|
+
if (cause?.code === "ENOTFOUND" || msg.includes("ENOTFOUND")) {
|
|
21167
|
+
return "Host not found - check the URL";
|
|
21168
|
+
}
|
|
21169
|
+
if (cause?.code === "ECONNRESET" || msg.includes("ECONNRESET")) {
|
|
21170
|
+
return "Connection reset - service may have crashed";
|
|
21171
|
+
}
|
|
21172
|
+
if (cause?.code === "ETIMEDOUT" || msg.includes("ETIMEDOUT") || msg.includes("timed out")) {
|
|
21173
|
+
return "Connection timed out - service may be unreachable";
|
|
21174
|
+
}
|
|
21175
|
+
if (msg.includes("fetch failed") || msg.includes("Failed to fetch")) {
|
|
21176
|
+
return `Service unreachable - ${cause?.message ?? "check URL and network"}`;
|
|
21177
|
+
}
|
|
21178
|
+
if (msg.includes("401") || msg.includes("Unauthorized")) {
|
|
21179
|
+
return "Authentication failed (401) - check your API key";
|
|
21180
|
+
}
|
|
21181
|
+
if (msg.includes("403") || msg.includes("Forbidden")) {
|
|
21182
|
+
return "Access denied (403) - check your API key permissions";
|
|
21183
|
+
}
|
|
21184
|
+
if (msg.includes("502") || msg.includes("Bad Gateway")) {
|
|
21185
|
+
return "Bad gateway (502) - reverse proxy or service issue";
|
|
21186
|
+
}
|
|
21187
|
+
if (msg.includes("503") || msg.includes("Service Unavailable")) {
|
|
21188
|
+
return "Service unavailable (503) - service may be starting up";
|
|
21189
|
+
}
|
|
21190
|
+
if (msg.includes("CERT") || msg.includes("certificate") || msg.includes("SSL")) {
|
|
21191
|
+
return "SSL/TLS certificate error - check HTTPS configuration";
|
|
21192
|
+
}
|
|
21193
|
+
return msg;
|
|
21194
|
+
}
|
|
20109
21195
|
function extractVersion(service, status) {
|
|
20110
21196
|
const data = status?.data ?? status;
|
|
20111
21197
|
if (typeof data === "string") {
|
|
@@ -20114,7 +21200,7 @@ function extractVersion(service, status) {
|
|
|
20114
21200
|
if (service === "bazarr") {
|
|
20115
21201
|
return data?.data?.bazarr_version ?? data?.bazarr_version ?? null;
|
|
20116
21202
|
}
|
|
20117
|
-
if (service === "qbittorrent") {
|
|
21203
|
+
if (service === "qbittorrent" || service === "seerr") {
|
|
20118
21204
|
return data?.version ?? null;
|
|
20119
21205
|
}
|
|
20120
21206
|
return data?.version ?? status?.version ?? null;
|
|
@@ -20129,6 +21215,7 @@ var init_doctor = __esm(() => {
|
|
|
20129
21215
|
init_qbittorrent2();
|
|
20130
21216
|
init_radarr2();
|
|
20131
21217
|
init_readarr2();
|
|
21218
|
+
init_seerr2();
|
|
20132
21219
|
init_sonarr2();
|
|
20133
21220
|
init_config();
|
|
20134
21221
|
init_output();
|
|
@@ -20139,7 +21226,8 @@ var init_doctor = __esm(() => {
|
|
|
20139
21226
|
readarr: (c3) => new ReadarrClient(c3),
|
|
20140
21227
|
prowlarr: (c3) => new ProwlarrClient(c3),
|
|
20141
21228
|
bazarr: (c3) => new BazarrClient(c3),
|
|
20142
|
-
qbittorrent: (c3) => new QBittorrentClient(c3)
|
|
21229
|
+
qbittorrent: (c3) => new QBittorrentClient(c3),
|
|
21230
|
+
seerr: (c3) => new SeerrClient(c3)
|
|
20143
21231
|
};
|
|
20144
21232
|
doctor = defineCommand({
|
|
20145
21233
|
meta: {
|
|
@@ -20184,8 +21272,8 @@ var init_doctor = __esm(() => {
|
|
|
20184
21272
|
});
|
|
20185
21273
|
continue;
|
|
20186
21274
|
}
|
|
20187
|
-
const
|
|
20188
|
-
const status = await
|
|
21275
|
+
const client9 = factory(svcConfig);
|
|
21276
|
+
const status = await client9.getSystemStatus();
|
|
20189
21277
|
const version = extractVersion(service, status) ?? "?";
|
|
20190
21278
|
if (version === "?") {
|
|
20191
21279
|
throw new Error("Unexpected response payload");
|
|
@@ -20242,7 +21330,8 @@ var init_config2 = __esm(() => {
|
|
|
20242
21330
|
readarr: 8787,
|
|
20243
21331
|
prowlarr: 9696,
|
|
20244
21332
|
bazarr: 6767,
|
|
20245
|
-
qbittorrent: 8080
|
|
21333
|
+
qbittorrent: 8080,
|
|
21334
|
+
seerr: 5055
|
|
20246
21335
|
};
|
|
20247
21336
|
configInit = defineCommand({
|
|
20248
21337
|
meta: {
|
|
@@ -20274,8 +21363,8 @@ var init_config2 = __esm(() => {
|
|
|
20274
21363
|
config.services[service] = { baseUrl, username, password };
|
|
20275
21364
|
try {
|
|
20276
21365
|
const { QBittorrentClient: QBittorrentClient2 } = await Promise.resolve().then(() => (init_qbittorrent2(), exports_qbittorrent));
|
|
20277
|
-
const
|
|
20278
|
-
const status = await
|
|
21366
|
+
const client9 = new QBittorrentClient2({ baseUrl, username, password });
|
|
21367
|
+
const status = await client9.getSystemStatus();
|
|
20279
21368
|
consola.success(`Connected to ${service} v${status.version}`);
|
|
20280
21369
|
} catch {
|
|
20281
21370
|
consola.warn(`Could not connect to ${service} — config saved anyway.`);
|
|
@@ -20290,17 +21379,19 @@ var init_config2 = __esm(() => {
|
|
|
20290
21379
|
const { ReadarrClient: ReadarrClient2 } = await Promise.resolve().then(() => (init_readarr2(), exports_readarr));
|
|
20291
21380
|
const { ProwlarrClient: ProwlarrClient2 } = await Promise.resolve().then(() => (init_prowlarr2(), exports_prowlarr));
|
|
20292
21381
|
const { BazarrClient: BazarrClient2 } = await Promise.resolve().then(() => (init_bazarr2(), exports_bazarr));
|
|
21382
|
+
const { SeerrClient: SeerrClient2 } = await Promise.resolve().then(() => (init_seerr2(), exports_seerr));
|
|
20293
21383
|
const factories = {
|
|
20294
21384
|
radarr: (c3) => new RadarrClient2(c3),
|
|
20295
21385
|
sonarr: (c3) => new SonarrClient2(c3),
|
|
20296
21386
|
lidarr: (c3) => new LidarrClient2(c3),
|
|
20297
21387
|
readarr: (c3) => new ReadarrClient2(c3),
|
|
20298
21388
|
prowlarr: (c3) => new ProwlarrClient2(c3),
|
|
20299
|
-
bazarr: (c3) => new BazarrClient2(c3)
|
|
21389
|
+
bazarr: (c3) => new BazarrClient2(c3),
|
|
21390
|
+
seerr: (c3) => new SeerrClient2(c3)
|
|
20300
21391
|
};
|
|
20301
|
-
const
|
|
20302
|
-
if (
|
|
20303
|
-
const status = await
|
|
21392
|
+
const client9 = factories[service]?.(config.services[service]);
|
|
21393
|
+
if (client9) {
|
|
21394
|
+
const status = await client9.getSystemStatus();
|
|
20304
21395
|
const version = status?.data?.version ?? status?.version ?? "?";
|
|
20305
21396
|
consola.success(`Connected to ${service} v${version}`);
|
|
20306
21397
|
}
|
|
@@ -20402,11 +21493,11 @@ __export(exports_completions, {
|
|
|
20402
21493
|
function generateBashCompletion() {
|
|
20403
21494
|
const services = Object.keys(SERVICE_COMMANDS).join(" ");
|
|
20404
21495
|
const globals = "doctor config completions";
|
|
20405
|
-
const resourceVars = Object.entries(SERVICE_COMMANDS).map(([svc,
|
|
21496
|
+
const resourceVars = Object.entries(SERVICE_COMMANDS).map(([svc, resources9]) => ` local ${svc}_resources="${Object.keys(resources9).join(" ")}"`).join(`
|
|
20406
21497
|
`);
|
|
20407
21498
|
const resourceCases = Object.keys(SERVICE_COMMANDS).map((svc) => ` ${svc}) COMPREPLY=( $(compgen -W "$${svc}_resources" -- "$cur") ) ;;`).join(`
|
|
20408
21499
|
`);
|
|
20409
|
-
const actionCases = Object.entries(SERVICE_COMMANDS).flatMap(([svc,
|
|
21500
|
+
const actionCases = Object.entries(SERVICE_COMMANDS).flatMap(([svc, resources9]) => Object.entries(resources9).map(([res, actions]) => ` ${res}) [[ "\${COMP_WORDS[1]}" == "${svc}" ]] && COMPREPLY=( $(compgen -W "${actions.join(" ")}" -- "$cur") ) ;;`)).join(`
|
|
20410
21501
|
`);
|
|
20411
21502
|
return `#!/bin/bash
|
|
20412
21503
|
_tsarr_completions() {
|
|
@@ -20440,9 +21531,9 @@ complete -F _tsarr_completions tsarr`;
|
|
|
20440
21531
|
}
|
|
20441
21532
|
function generateZshCompletion() {
|
|
20442
21533
|
const services = Object.keys(SERVICE_COMMANDS).join(" ");
|
|
20443
|
-
const resourceAssoc = Object.entries(SERVICE_COMMANDS).map(([svc,
|
|
21534
|
+
const resourceAssoc = Object.entries(SERVICE_COMMANDS).map(([svc, resources9]) => ` ${svc} "${Object.keys(resources9).join(" ")}"`).join(`
|
|
20444
21535
|
`);
|
|
20445
|
-
const actionAssoc = Object.entries(SERVICE_COMMANDS).flatMap(([svc,
|
|
21536
|
+
const actionAssoc = Object.entries(SERVICE_COMMANDS).flatMap(([svc, resources9]) => Object.entries(resources9).map(([res, actions]) => ` ${svc}:${res} "${actions.join(" ")}"`)).join(`
|
|
20446
21537
|
`);
|
|
20447
21538
|
return `#compdef tsarr
|
|
20448
21539
|
|
|
@@ -20499,12 +21590,12 @@ _tsarr "$@"`;
|
|
|
20499
21590
|
function generateFishCompletion() {
|
|
20500
21591
|
const services = Object.keys(SERVICE_COMMANDS).join(" ");
|
|
20501
21592
|
const globals = "doctor config completions";
|
|
20502
|
-
const resourceCompletions = Object.entries(SERVICE_COMMANDS).map(([svc,
|
|
20503
|
-
const res = Object.keys(
|
|
21593
|
+
const resourceCompletions = Object.entries(SERVICE_COMMANDS).map(([svc, resources9]) => {
|
|
21594
|
+
const res = Object.keys(resources9).join(" ");
|
|
20504
21595
|
return `complete -c tsarr -n "__fish_seen_subcommand_from ${svc}; and not __fish_seen_subcommand_from ${res}" -a "${res}"`;
|
|
20505
21596
|
}).join(`
|
|
20506
21597
|
`);
|
|
20507
|
-
const actionCompletions = Object.entries(SERVICE_COMMANDS).flatMap(([svc,
|
|
21598
|
+
const actionCompletions = Object.entries(SERVICE_COMMANDS).flatMap(([svc, resources9]) => Object.entries(resources9).map(([res, actions]) => `complete -c tsarr -n "__fish_seen_subcommand_from ${svc}; and __fish_seen_subcommand_from ${res}; and not __fish_seen_subcommand_from ${actions.join(" ")}" -a "${actions.join(" ")}"`)).join(`
|
|
20508
21599
|
`);
|
|
20509
21600
|
return `# Fish completions for tsarr
|
|
20510
21601
|
set -l services ${services}
|
|
@@ -20581,6 +21672,12 @@ var init_completions = __esm(() => {
|
|
|
20581
21672
|
provider: ["list"],
|
|
20582
21673
|
language: ["list", "profiles"],
|
|
20583
21674
|
system: ["status", "health", "badges"]
|
|
21675
|
+
},
|
|
21676
|
+
seerr: {
|
|
21677
|
+
requests: ["list", "count", "approve", "decline"],
|
|
21678
|
+
search: ["query"],
|
|
21679
|
+
users: ["list"],
|
|
21680
|
+
status: ["show"]
|
|
20584
21681
|
}
|
|
20585
21682
|
};
|
|
20586
21683
|
completions = defineCommand({
|
|
@@ -20619,7 +21716,7 @@ init_dist();
|
|
|
20619
21716
|
// package.json
|
|
20620
21717
|
var package_default = {
|
|
20621
21718
|
name: "tsarr",
|
|
20622
|
-
version: "2.
|
|
21719
|
+
version: "2.7.0",
|
|
20623
21720
|
author: "Robbe Verhelst",
|
|
20624
21721
|
repository: {
|
|
20625
21722
|
type: "git",
|
|
@@ -20675,6 +21772,10 @@ var package_default = {
|
|
|
20675
21772
|
import: "./dist/clients/qbittorrent.js",
|
|
20676
21773
|
types: "./dist/clients/qbittorrent.d.ts"
|
|
20677
21774
|
},
|
|
21775
|
+
"./seerr": {
|
|
21776
|
+
import: "./dist/clients/seerr.js",
|
|
21777
|
+
types: "./dist/clients/seerr.d.ts"
|
|
21778
|
+
},
|
|
20678
21779
|
"./radarr/types": {
|
|
20679
21780
|
types: "./dist/clients/radarr-types.d.ts"
|
|
20680
21781
|
},
|
|
@@ -20695,6 +21796,9 @@ var package_default = {
|
|
|
20695
21796
|
},
|
|
20696
21797
|
"./qbittorrent/types": {
|
|
20697
21798
|
types: "./dist/clients/qbittorrent-types.d.ts"
|
|
21799
|
+
},
|
|
21800
|
+
"./seerr/types": {
|
|
21801
|
+
types: "./dist/clients/seerr-types.d.ts"
|
|
20698
21802
|
}
|
|
20699
21803
|
},
|
|
20700
21804
|
description: "Type-safe TypeScript SDK for Servarr APIs (Radarr, Sonarr, etc.)",
|
|
@@ -20714,6 +21818,9 @@ var package_default = {
|
|
|
20714
21818
|
"prowlarr",
|
|
20715
21819
|
"bazarr",
|
|
20716
21820
|
"qbittorrent",
|
|
21821
|
+
"seerr",
|
|
21822
|
+
"jellyseerr",
|
|
21823
|
+
"overseerr",
|
|
20717
21824
|
"typescript",
|
|
20718
21825
|
"sdk",
|
|
20719
21826
|
"api",
|
|
@@ -20727,7 +21834,7 @@ var package_default = {
|
|
|
20727
21834
|
},
|
|
20728
21835
|
scripts: {
|
|
20729
21836
|
build: "bun run generate && bun run generate:types && bun run build:js && bun run build:cli && bun run build:types",
|
|
20730
|
-
"build:js": "bun build src/index.ts --outdir dist --target node --minify --splitting && bun build src/clients/radarr.ts --outdir dist/clients --target node --format esm && bun build src/clients/sonarr.ts --outdir dist/clients --target node --format esm && bun build src/clients/lidarr.ts --outdir dist/clients --target node --format esm && bun build src/clients/readarr.ts --outdir dist/clients --target node --format esm && bun build src/clients/prowlarr.ts --outdir dist/clients --target node --format esm && bun build src/clients/bazarr.ts --outdir dist/clients --target node --format esm && bun build src/clients/qbittorrent.ts --outdir dist/clients --target node --format esm",
|
|
21837
|
+
"build:js": "bun build src/index.ts --outdir dist --target node --minify --splitting && bun build src/clients/radarr.ts --outdir dist/clients --target node --format esm && bun build src/clients/sonarr.ts --outdir dist/clients --target node --format esm && bun build src/clients/lidarr.ts --outdir dist/clients --target node --format esm && bun build src/clients/readarr.ts --outdir dist/clients --target node --format esm && bun build src/clients/prowlarr.ts --outdir dist/clients --target node --format esm && bun build src/clients/bazarr.ts --outdir dist/clients --target node --format esm && bun build src/clients/qbittorrent.ts --outdir dist/clients --target node --format esm && bun build src/clients/seerr.ts --outdir dist/clients --target node --format esm",
|
|
20731
21838
|
"build:cli": "bun build src/cli/index.ts --outdir dist/cli --target node --format esm && chmod +x dist/cli/index.js",
|
|
20732
21839
|
"build:types": "tsc --project tsconfig.build.json",
|
|
20733
21840
|
prepublishOnly: "bun run build",
|
|
@@ -20765,7 +21872,7 @@ var main = defineCommand({
|
|
|
20765
21872
|
meta: {
|
|
20766
21873
|
name: "tsarr",
|
|
20767
21874
|
version,
|
|
20768
|
-
description: "Type-safe CLI for Servarr APIs (Radarr, Sonarr, Lidarr, Readarr, Prowlarr, Bazarr, qBittorrent)"
|
|
21875
|
+
description: "Type-safe CLI for Servarr APIs (Radarr, Sonarr, Lidarr, Readarr, Prowlarr, Bazarr, qBittorrent, Seerr)"
|
|
20769
21876
|
},
|
|
20770
21877
|
subCommands: {
|
|
20771
21878
|
radarr: () => Promise.resolve().then(() => (init_radarr3(), exports_radarr3)).then((m2) => m2.radarr),
|
|
@@ -20775,6 +21882,7 @@ var main = defineCommand({
|
|
|
20775
21882
|
prowlarr: () => Promise.resolve().then(() => (init_prowlarr3(), exports_prowlarr3)).then((m2) => m2.prowlarr),
|
|
20776
21883
|
bazarr: () => Promise.resolve().then(() => (init_bazarr3(), exports_bazarr3)).then((m2) => m2.bazarr),
|
|
20777
21884
|
qbit: () => Promise.resolve().then(() => (init_qbit(), exports_qbit)).then((m2) => m2.qbit),
|
|
21885
|
+
seerr: () => Promise.resolve().then(() => (init_seerr3(), exports_seerr3)).then((m2) => m2.seerr),
|
|
20778
21886
|
doctor: () => Promise.resolve().then(() => (init_doctor(), exports_doctor)).then((m2) => m2.doctor),
|
|
20779
21887
|
config: () => Promise.resolve().then(() => (init_config2(), exports_config)).then((m2) => m2.config),
|
|
20780
21888
|
completions: () => Promise.resolve().then(() => (init_completions(), exports_completions)).then((m2) => m2.completions)
|