tsarr 2.9.0 → 2.10.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 +7 -5
- package/dist/cli/commands/bazarr.d.ts +2 -0
- package/dist/cli/commands/bazarr.d.ts.map +1 -1
- package/dist/cli/commands/config.d.ts.map +1 -1
- package/dist/cli/commands/lidarr.d.ts +2 -0
- package/dist/cli/commands/lidarr.d.ts.map +1 -1
- package/dist/cli/commands/radarr.d.ts.map +1 -1
- package/dist/cli/commands/readarr.d.ts +2 -0
- package/dist/cli/commands/readarr.d.ts.map +1 -1
- package/dist/cli/commands/sonarr.d.ts.map +1 -1
- package/dist/cli/index.js +2138 -2405
- package/dist/clients/base.d.ts +136 -0
- package/dist/clients/base.d.ts.map +1 -0
- package/dist/clients/bazarr.d.ts +1 -1
- package/dist/clients/bazarr.d.ts.map +1 -1
- package/dist/clients/bazarr.js +100 -3
- package/dist/clients/lidarr.d.ts +24 -681
- package/dist/clients/lidarr.d.ts.map +1 -1
- package/dist/clients/lidarr.js +323 -196
- package/dist/clients/prowlarr.d.ts +25 -638
- package/dist/clients/prowlarr.d.ts.map +1 -1
- package/dist/clients/prowlarr.js +331 -175
- package/dist/clients/qbittorrent.d.ts +1 -17
- package/dist/clients/qbittorrent.d.ts.map +1 -1
- package/dist/clients/qbittorrent.js +97 -2
- package/dist/clients/radarr.d.ts +4 -657
- package/dist/clients/radarr.d.ts.map +1 -1
- package/dist/clients/radarr.js +323 -164
- package/dist/clients/readarr.d.ts +4 -635
- package/dist/clients/readarr.d.ts.map +1 -1
- package/dist/clients/readarr.js +323 -164
- package/dist/clients/seerr.d.ts +1 -1
- package/dist/clients/seerr.d.ts.map +1 -1
- package/dist/clients/seerr.js +100 -3
- package/dist/clients/sonarr.d.ts +181 -772
- package/dist/clients/sonarr.d.ts.map +1 -1
- package/dist/clients/sonarr.js +346 -157
- package/dist/core/client.d.ts +3 -0
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/fetch.d.ts +23 -0
- package/dist/core/fetch.d.ts.map +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/types.d.ts +7 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/tsarr-2.10.0.tgz +0 -0
- package/package.json +2 -4
- package/dist/tsarr-2.9.0.tgz +0 -0
package/dist/cli/index.js
CHANGED
|
@@ -592,6 +592,93 @@ var init_errors = __esm(() => {
|
|
|
592
592
|
};
|
|
593
593
|
});
|
|
594
594
|
|
|
595
|
+
// src/core/fetch.ts
|
|
596
|
+
function isRetryable(error) {
|
|
597
|
+
if (error instanceof DOMException && error.name === "AbortError") {
|
|
598
|
+
return false;
|
|
599
|
+
}
|
|
600
|
+
if (error instanceof TypeError) {
|
|
601
|
+
return true;
|
|
602
|
+
}
|
|
603
|
+
return false;
|
|
604
|
+
}
|
|
605
|
+
function getRetryDelay(attempt, initialDelayMs, maxDelayMs) {
|
|
606
|
+
const delay = initialDelayMs * 2 ** attempt;
|
|
607
|
+
const jitter = delay * 0.2 * Math.random();
|
|
608
|
+
return Math.min(delay + jitter, maxDelayMs);
|
|
609
|
+
}
|
|
610
|
+
function createResilientFetch(options = {}) {
|
|
611
|
+
const timeout = options.timeout ?? DEFAULT_TIMEOUT;
|
|
612
|
+
const maxRetries = options.retry ? options.retry.maxRetries ?? DEFAULT_MAX_RETRIES : 0;
|
|
613
|
+
const initialDelayMs = options.retry?.initialDelayMs ?? DEFAULT_INITIAL_DELAY;
|
|
614
|
+
const maxDelayMs = options.retry?.maxDelayMs ?? DEFAULT_MAX_DELAY;
|
|
615
|
+
const resilientFetch = async (input, init) => {
|
|
616
|
+
let lastError;
|
|
617
|
+
const template = createRequestTemplate(input, init);
|
|
618
|
+
for (let attempt = 0;attempt <= maxRetries; attempt++) {
|
|
619
|
+
const controller = new AbortController;
|
|
620
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
621
|
+
const callerSignal = init?.signal;
|
|
622
|
+
if (callerSignal?.aborted) {
|
|
623
|
+
clearTimeout(timeoutId);
|
|
624
|
+
throw callerSignal.reason ?? new DOMException("The operation was aborted.", "AbortError");
|
|
625
|
+
}
|
|
626
|
+
const onCallerAbort = () => controller.abort(callerSignal.reason);
|
|
627
|
+
callerSignal?.addEventListener("abort", onCallerAbort, { once: true });
|
|
628
|
+
try {
|
|
629
|
+
const response = await globalThis.fetch(new Request(template.clone(), { signal: controller.signal }));
|
|
630
|
+
clearTimeout(timeoutId);
|
|
631
|
+
callerSignal?.removeEventListener("abort", onCallerAbort);
|
|
632
|
+
if (RETRYABLE_STATUS_CODES.has(response.status) && attempt < maxRetries) {
|
|
633
|
+
lastError = new ConnectionError(`Request failed with status ${response.status}`);
|
|
634
|
+
const delay = getRetryDelay(attempt, initialDelayMs, maxDelayMs);
|
|
635
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
636
|
+
continue;
|
|
637
|
+
}
|
|
638
|
+
return response;
|
|
639
|
+
} catch (error) {
|
|
640
|
+
clearTimeout(timeoutId);
|
|
641
|
+
callerSignal?.removeEventListener("abort", onCallerAbort);
|
|
642
|
+
if (callerSignal?.aborted) {
|
|
643
|
+
throw callerSignal.reason ?? new DOMException("The operation was aborted.", "AbortError");
|
|
644
|
+
}
|
|
645
|
+
if (error instanceof DOMException && error.name === "AbortError") {
|
|
646
|
+
lastError = new ConnectionError(`Request timed out after ${timeout}ms`);
|
|
647
|
+
if (attempt < maxRetries) {
|
|
648
|
+
const delay = getRetryDelay(attempt, initialDelayMs, maxDelayMs);
|
|
649
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
650
|
+
continue;
|
|
651
|
+
}
|
|
652
|
+
throw lastError;
|
|
653
|
+
}
|
|
654
|
+
if (isRetryable(error) && attempt < maxRetries) {
|
|
655
|
+
lastError = error;
|
|
656
|
+
const delay = getRetryDelay(attempt, initialDelayMs, maxDelayMs);
|
|
657
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
658
|
+
continue;
|
|
659
|
+
}
|
|
660
|
+
throw error;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
throw lastError;
|
|
664
|
+
};
|
|
665
|
+
return Object.assign(resilientFetch, {
|
|
666
|
+
preconnect: globalThis.fetch.preconnect?.bind(globalThis.fetch)
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
function createRequestTemplate(input, init) {
|
|
670
|
+
const { signal: _signal, ...requestInit } = init ?? {};
|
|
671
|
+
if (input instanceof Request) {
|
|
672
|
+
return init ? new Request(input.clone(), requestInit) : input.clone();
|
|
673
|
+
}
|
|
674
|
+
return new Request(input, requestInit);
|
|
675
|
+
}
|
|
676
|
+
var DEFAULT_TIMEOUT = 30000, DEFAULT_MAX_RETRIES = 3, DEFAULT_INITIAL_DELAY = 1000, DEFAULT_MAX_DELAY = 1e4, RETRYABLE_STATUS_CODES;
|
|
677
|
+
var init_fetch = __esm(() => {
|
|
678
|
+
init_errors();
|
|
679
|
+
RETRYABLE_STATUS_CODES = new Set([408, 429, 502, 503, 504]);
|
|
680
|
+
});
|
|
681
|
+
|
|
595
682
|
// src/core/client.ts
|
|
596
683
|
function createServarrClient(config) {
|
|
597
684
|
if (!config.apiKey) {
|
|
@@ -604,6 +691,11 @@ function createServarrClient(config) {
|
|
|
604
691
|
...config,
|
|
605
692
|
baseUrl: config.baseUrl.replace(/\/$/, "")
|
|
606
693
|
};
|
|
694
|
+
const timeoutMs = validatedConfig.timeout ?? DEFAULT_TIMEOUT_MS;
|
|
695
|
+
const resilientFetch = createResilientFetch({
|
|
696
|
+
timeout: timeoutMs,
|
|
697
|
+
retry: validatedConfig.retry
|
|
698
|
+
});
|
|
607
699
|
return {
|
|
608
700
|
config: validatedConfig,
|
|
609
701
|
getHeaders: () => ({
|
|
@@ -611,11 +703,192 @@ function createServarrClient(config) {
|
|
|
611
703
|
"Content-Type": "application/json",
|
|
612
704
|
...validatedConfig.headers
|
|
613
705
|
}),
|
|
614
|
-
getBaseUrl: () => validatedConfig.baseUrl
|
|
706
|
+
getBaseUrl: () => validatedConfig.baseUrl,
|
|
707
|
+
getTimeout: () => timeoutMs,
|
|
708
|
+
getFetch: () => resilientFetch
|
|
615
709
|
};
|
|
616
710
|
}
|
|
711
|
+
var DEFAULT_TIMEOUT_MS = 30000;
|
|
617
712
|
var init_client = __esm(() => {
|
|
618
713
|
init_errors();
|
|
714
|
+
init_fetch();
|
|
715
|
+
});
|
|
716
|
+
|
|
717
|
+
// src/clients/base.ts
|
|
718
|
+
class ServarrBaseClient {
|
|
719
|
+
clientConfig;
|
|
720
|
+
rawClient;
|
|
721
|
+
constructor(config, rawClient) {
|
|
722
|
+
this.rawClient = rawClient;
|
|
723
|
+
this.clientConfig = createServarrClient(config);
|
|
724
|
+
this.configureRawClient();
|
|
725
|
+
}
|
|
726
|
+
configureRawClient() {
|
|
727
|
+
this.rawClient.setConfig(this.getClientConfig());
|
|
728
|
+
}
|
|
729
|
+
getClientConfig() {
|
|
730
|
+
return {
|
|
731
|
+
baseUrl: this.clientConfig.getBaseUrl(),
|
|
732
|
+
headers: this.clientConfig.getHeaders(),
|
|
733
|
+
fetch: this.clientConfig.getFetch()
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
async getSystemStatus() {
|
|
737
|
+
return this.ops.getSystemStatus();
|
|
738
|
+
}
|
|
739
|
+
async getHealth() {
|
|
740
|
+
return this.ops.getHealth();
|
|
741
|
+
}
|
|
742
|
+
async getTags() {
|
|
743
|
+
return this.ops.getTags();
|
|
744
|
+
}
|
|
745
|
+
async addTag(tag) {
|
|
746
|
+
return this.ops.createTag({ body: tag });
|
|
747
|
+
}
|
|
748
|
+
async getTag(id) {
|
|
749
|
+
return this.ops.getTagById({ path: { id } });
|
|
750
|
+
}
|
|
751
|
+
async updateTag(id, tag) {
|
|
752
|
+
return this.ops.updateTagById({ path: { id: String(id) }, body: tag });
|
|
753
|
+
}
|
|
754
|
+
async deleteTag(id) {
|
|
755
|
+
return this.ops.deleteTagById({ path: { id } });
|
|
756
|
+
}
|
|
757
|
+
async getTagDetails() {
|
|
758
|
+
return this.ops.getTagDetails();
|
|
759
|
+
}
|
|
760
|
+
async getTagDetailById(id) {
|
|
761
|
+
return this.ops.getTagDetailById({ path: { id } });
|
|
762
|
+
}
|
|
763
|
+
async getNotifications() {
|
|
764
|
+
return this.ops.getNotifications();
|
|
765
|
+
}
|
|
766
|
+
async getNotification(id) {
|
|
767
|
+
return this.ops.getNotificationById({ path: { id } });
|
|
768
|
+
}
|
|
769
|
+
async addNotification(notification) {
|
|
770
|
+
return this.ops.createNotification({ body: notification });
|
|
771
|
+
}
|
|
772
|
+
async updateNotification(id, notification) {
|
|
773
|
+
return this.ops.updateNotificationById({ path: { id: String(id) }, body: notification });
|
|
774
|
+
}
|
|
775
|
+
async deleteNotification(id) {
|
|
776
|
+
return this.ops.deleteNotificationById({ path: { id } });
|
|
777
|
+
}
|
|
778
|
+
async getNotificationSchema() {
|
|
779
|
+
return this.ops.getNotificationSchema();
|
|
780
|
+
}
|
|
781
|
+
async testNotification(notification) {
|
|
782
|
+
return this.ops.testNotification({ body: notification });
|
|
783
|
+
}
|
|
784
|
+
async testAllNotifications() {
|
|
785
|
+
return this.ops.testAllNotifications();
|
|
786
|
+
}
|
|
787
|
+
async getDownloadClients() {
|
|
788
|
+
return this.ops.getDownloadClients();
|
|
789
|
+
}
|
|
790
|
+
async getDownloadClient(id) {
|
|
791
|
+
return this.ops.getDownloadClientById({ path: { id } });
|
|
792
|
+
}
|
|
793
|
+
async addDownloadClient(client) {
|
|
794
|
+
return this.ops.createDownloadClient({ body: client });
|
|
795
|
+
}
|
|
796
|
+
async updateDownloadClient(id, client) {
|
|
797
|
+
return this.ops.updateDownloadClientById({ path: { id: String(id) }, body: client });
|
|
798
|
+
}
|
|
799
|
+
async deleteDownloadClient(id) {
|
|
800
|
+
return this.ops.deleteDownloadClientById({ path: { id } });
|
|
801
|
+
}
|
|
802
|
+
async getDownloadClientSchema() {
|
|
803
|
+
return this.ops.getDownloadClientSchema();
|
|
804
|
+
}
|
|
805
|
+
async testDownloadClient(client) {
|
|
806
|
+
return this.ops.testDownloadClient({ body: client });
|
|
807
|
+
}
|
|
808
|
+
async testAllDownloadClients() {
|
|
809
|
+
return this.ops.testAllDownloadClients();
|
|
810
|
+
}
|
|
811
|
+
async getIndexers() {
|
|
812
|
+
return this.ops.getIndexers();
|
|
813
|
+
}
|
|
814
|
+
async getIndexer(id) {
|
|
815
|
+
return this.ops.getIndexerById({ path: { id } });
|
|
816
|
+
}
|
|
817
|
+
async addIndexer(indexer) {
|
|
818
|
+
return this.ops.createIndexer({ body: indexer });
|
|
819
|
+
}
|
|
820
|
+
async updateIndexer(id, indexer) {
|
|
821
|
+
return this.ops.updateIndexerById({ path: { id: String(id) }, body: indexer });
|
|
822
|
+
}
|
|
823
|
+
async deleteIndexer(id) {
|
|
824
|
+
return this.ops.deleteIndexerById({ path: { id } });
|
|
825
|
+
}
|
|
826
|
+
async getIndexerSchema() {
|
|
827
|
+
return this.ops.getIndexerSchema();
|
|
828
|
+
}
|
|
829
|
+
async testIndexer(indexer) {
|
|
830
|
+
return this.ops.testIndexer({ body: indexer });
|
|
831
|
+
}
|
|
832
|
+
async testAllIndexers() {
|
|
833
|
+
return this.ops.testAllIndexers();
|
|
834
|
+
}
|
|
835
|
+
async restartSystem() {
|
|
836
|
+
return this.ops.restartSystem();
|
|
837
|
+
}
|
|
838
|
+
async shutdownSystem() {
|
|
839
|
+
return this.ops.shutdownSystem();
|
|
840
|
+
}
|
|
841
|
+
async getSystemBackups() {
|
|
842
|
+
return this.ops.getBackups();
|
|
843
|
+
}
|
|
844
|
+
async deleteSystemBackup(id) {
|
|
845
|
+
return this.ops.deleteBackup({ path: { id } });
|
|
846
|
+
}
|
|
847
|
+
async restoreSystemBackup(id) {
|
|
848
|
+
return this.ops.restoreBackup({ path: { id } });
|
|
849
|
+
}
|
|
850
|
+
async uploadSystemBackup() {
|
|
851
|
+
return this.ops.uploadBackup();
|
|
852
|
+
}
|
|
853
|
+
async getLogFiles() {
|
|
854
|
+
return this.ops.getLogFiles();
|
|
855
|
+
}
|
|
856
|
+
async getLogFileByName(filename) {
|
|
857
|
+
return this.ops.getLogFileByName({ path: { filename } });
|
|
858
|
+
}
|
|
859
|
+
async runCommand(command) {
|
|
860
|
+
return this.ops.runCommand({ body: command });
|
|
861
|
+
}
|
|
862
|
+
async getCommands() {
|
|
863
|
+
return this.ops.getCommands();
|
|
864
|
+
}
|
|
865
|
+
async getHostConfig() {
|
|
866
|
+
return this.ops.getHostConfig();
|
|
867
|
+
}
|
|
868
|
+
async getHostConfigById(id) {
|
|
869
|
+
return this.ops.getHostConfigById({ path: { id } });
|
|
870
|
+
}
|
|
871
|
+
async updateHostConfig(id, config) {
|
|
872
|
+
return this.ops.updateHostConfig({ path: { id: String(id) }, body: config });
|
|
873
|
+
}
|
|
874
|
+
async getUiConfig() {
|
|
875
|
+
return this.ops.getUiConfig();
|
|
876
|
+
}
|
|
877
|
+
async getUiConfigById(id) {
|
|
878
|
+
return this.ops.getUiConfigById({ path: { id } });
|
|
879
|
+
}
|
|
880
|
+
async updateUiConfig(id, config) {
|
|
881
|
+
return this.ops.updateUiConfig({ path: { id: String(id) }, body: config });
|
|
882
|
+
}
|
|
883
|
+
updateConfig(newConfig) {
|
|
884
|
+
const updatedConfig = { ...this.clientConfig.config, ...newConfig };
|
|
885
|
+
this.clientConfig = createServarrClient(updatedConfig);
|
|
886
|
+
this.configureRawClient();
|
|
887
|
+
return this.clientConfig.config;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
var init_base = __esm(() => {
|
|
891
|
+
init_client();
|
|
619
892
|
});
|
|
620
893
|
|
|
621
894
|
// src/generated/radarr/core/bodySerializer.gen.ts
|
|
@@ -2554,573 +2827,463 @@ var exports_radarr = {};
|
|
|
2554
2827
|
__export(exports_radarr, {
|
|
2555
2828
|
RadarrClient: () => RadarrClient
|
|
2556
2829
|
});
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2830
|
+
var RadarrClient;
|
|
2831
|
+
var init_radarr2 = __esm(() => {
|
|
2832
|
+
init_base();
|
|
2833
|
+
init_client_gen2();
|
|
2834
|
+
init_radarr();
|
|
2835
|
+
RadarrClient = class RadarrClient extends ServarrBaseClient {
|
|
2836
|
+
ops = {
|
|
2837
|
+
getSystemStatus: getApiV3SystemStatus,
|
|
2838
|
+
getHealth: getApiV3Health,
|
|
2839
|
+
getTags: getApiV3Tag,
|
|
2840
|
+
createTag: postApiV3Tag,
|
|
2841
|
+
getTagById: getApiV3TagById,
|
|
2842
|
+
updateTagById: putApiV3TagById,
|
|
2843
|
+
deleteTagById: deleteApiV3TagById,
|
|
2844
|
+
getTagDetails: getApiV3TagDetail,
|
|
2845
|
+
getTagDetailById: getApiV3TagDetailById,
|
|
2846
|
+
getNotifications: getApiV3Notification,
|
|
2847
|
+
createNotification: postApiV3Notification,
|
|
2848
|
+
getNotificationById: getApiV3NotificationById,
|
|
2849
|
+
updateNotificationById: putApiV3NotificationById,
|
|
2850
|
+
deleteNotificationById: deleteApiV3NotificationById,
|
|
2851
|
+
getNotificationSchema: getApiV3NotificationSchema,
|
|
2852
|
+
testNotification: postApiV3NotificationTest,
|
|
2853
|
+
testAllNotifications: postApiV3NotificationTestall,
|
|
2854
|
+
getDownloadClients: getApiV3Downloadclient,
|
|
2855
|
+
createDownloadClient: postApiV3Downloadclient,
|
|
2856
|
+
getDownloadClientById: getApiV3DownloadclientById,
|
|
2857
|
+
updateDownloadClientById: putApiV3DownloadclientById,
|
|
2858
|
+
deleteDownloadClientById: deleteApiV3DownloadclientById,
|
|
2859
|
+
getDownloadClientSchema: getApiV3DownloadclientSchema,
|
|
2860
|
+
testDownloadClient: postApiV3DownloadclientTest,
|
|
2861
|
+
testAllDownloadClients: postApiV3DownloadclientTestall,
|
|
2862
|
+
getIndexers: getApiV3Indexer,
|
|
2863
|
+
createIndexer: postApiV3Indexer,
|
|
2864
|
+
getIndexerById: getApiV3IndexerById,
|
|
2865
|
+
updateIndexerById: putApiV3IndexerById,
|
|
2866
|
+
deleteIndexerById: deleteApiV3IndexerById,
|
|
2867
|
+
getIndexerSchema: getApiV3IndexerSchema,
|
|
2868
|
+
testIndexer: postApiV3IndexerTest,
|
|
2869
|
+
testAllIndexers: postApiV3IndexerTestall,
|
|
2870
|
+
restartSystem: postApiV3SystemRestart,
|
|
2871
|
+
shutdownSystem: postApiV3SystemShutdown,
|
|
2872
|
+
getBackups: getApiV3SystemBackup,
|
|
2873
|
+
deleteBackup: deleteApiV3SystemBackupById,
|
|
2874
|
+
restoreBackup: postApiV3SystemBackupRestoreById,
|
|
2875
|
+
uploadBackup: postApiV3SystemBackupRestoreUpload,
|
|
2876
|
+
getLogFiles: getApiV3LogFile,
|
|
2877
|
+
getLogFileByName: getApiV3LogFileByFilename,
|
|
2878
|
+
runCommand: postApiV3Command,
|
|
2879
|
+
getCommands: getApiV3Command,
|
|
2880
|
+
getHostConfig: getApiV3ConfigHost,
|
|
2881
|
+
getHostConfigById: getApiV3ConfigHostById,
|
|
2882
|
+
updateHostConfig: putApiV3ConfigHostById,
|
|
2883
|
+
getUiConfig: getApiV3ConfigUi,
|
|
2884
|
+
getUiConfigById: getApiV3ConfigUiById,
|
|
2885
|
+
updateUiConfig: putApiV3ConfigUiById
|
|
2886
|
+
};
|
|
2887
|
+
constructor(config) {
|
|
2888
|
+
super(config, client);
|
|
2889
|
+
}
|
|
2890
|
+
async getMovies() {
|
|
2891
|
+
return getApiV3Movie();
|
|
2604
2892
|
}
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
throw new Error('Invalid ID format. Both provider and value must be non-empty. Use "tmdb:123" or "imdb:tt0175142"');
|
|
2893
|
+
async getMovie(id) {
|
|
2894
|
+
return getApiV3MovieById({ path: { id } });
|
|
2608
2895
|
}
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
throw new Error(`Invalid provider "${providerRaw}". Must be either "tmdb" or "imdb"`);
|
|
2896
|
+
async addMovie(movie) {
|
|
2897
|
+
return postApiV3Movie({ body: movie });
|
|
2612
2898
|
}
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2899
|
+
async updateMovie(id, movie) {
|
|
2900
|
+
return putApiV3MovieById({ path: { id: String(id) }, body: movie });
|
|
2901
|
+
}
|
|
2902
|
+
async deleteMovie(id, options) {
|
|
2903
|
+
return deleteApiV3MovieById({
|
|
2904
|
+
path: { id },
|
|
2905
|
+
...options ? { query: options } : {}
|
|
2906
|
+
});
|
|
2907
|
+
}
|
|
2908
|
+
async searchMovies(term) {
|
|
2909
|
+
return getApiV3MovieLookup({ query: { term } });
|
|
2910
|
+
}
|
|
2911
|
+
async lookupMovieByTmdbId(tmdbId) {
|
|
2912
|
+
return getApiV3MovieLookupTmdb({ query: { tmdbId } });
|
|
2913
|
+
}
|
|
2914
|
+
async lookupMovieByImdbId(imdbId) {
|
|
2915
|
+
return getApiV3MovieLookupImdb({ query: { imdbId } });
|
|
2916
|
+
}
|
|
2917
|
+
async lookupMovieById(id) {
|
|
2918
|
+
const parts = id.split(":");
|
|
2919
|
+
if (parts.length !== 2) {
|
|
2920
|
+
throw new Error('Invalid ID format. Must contain exactly one colon. Use "tmdb:123" or "imdb:tt0175142"');
|
|
2617
2921
|
}
|
|
2618
|
-
|
|
2619
|
-
|
|
2922
|
+
const [providerRaw, value] = parts;
|
|
2923
|
+
if (!providerRaw || !value) {
|
|
2924
|
+
throw new Error('Invalid ID format. Both provider and value must be non-empty. Use "tmdb:123" or "imdb:tt0175142"');
|
|
2620
2925
|
}
|
|
2621
|
-
|
|
2926
|
+
const provider = providerRaw.toLowerCase();
|
|
2927
|
+
if (provider !== "tmdb" && provider !== "imdb") {
|
|
2928
|
+
throw new Error(`Invalid provider "${providerRaw}". Must be either "tmdb" or "imdb"`);
|
|
2929
|
+
}
|
|
2930
|
+
if (provider === "tmdb") {
|
|
2931
|
+
const tmdbId = Number.parseInt(value, 10);
|
|
2932
|
+
if (Number.isNaN(tmdbId)) {
|
|
2933
|
+
throw new Error(`Invalid TMDB ID "${value}". Must be a numeric value`);
|
|
2934
|
+
}
|
|
2935
|
+
if (!Number.isInteger(tmdbId) || tmdbId <= 0) {
|
|
2936
|
+
throw new Error(`Invalid TMDB ID "${value}". Must be a positive integer`);
|
|
2937
|
+
}
|
|
2938
|
+
return getApiV3MovieLookupTmdb({ query: { tmdbId } });
|
|
2939
|
+
}
|
|
2940
|
+
const imdbPattern = /^tt\d+$/;
|
|
2941
|
+
if (!imdbPattern.test(value)) {
|
|
2942
|
+
throw new Error(`Invalid IMDB ID "${value}". Must match pattern "tt" followed by digits (e.g., "tt0175142")`);
|
|
2943
|
+
}
|
|
2944
|
+
return getApiV3MovieLookupImdb({ query: { imdbId: value } });
|
|
2622
2945
|
}
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
throw new Error(`Invalid IMDB ID "${value}". Must match pattern "tt" followed by digits (e.g., "tt0175142")`);
|
|
2946
|
+
async getRootFolders() {
|
|
2947
|
+
return getApiV3Rootfolder();
|
|
2626
2948
|
}
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2949
|
+
async addRootFolder(path) {
|
|
2950
|
+
return postApiV3Rootfolder({
|
|
2951
|
+
body: { path }
|
|
2952
|
+
});
|
|
2953
|
+
}
|
|
2954
|
+
async deleteRootFolder(id) {
|
|
2955
|
+
return deleteApiV3RootfolderById({ path: { id } });
|
|
2956
|
+
}
|
|
2957
|
+
async getFilesystem(path) {
|
|
2958
|
+
return getApiV3Filesystem(path ? { query: { path } } : {});
|
|
2959
|
+
}
|
|
2960
|
+
async getMediaFiles(path) {
|
|
2961
|
+
return getApiV3FilesystemMediafiles({ query: { path } });
|
|
2962
|
+
}
|
|
2963
|
+
async importMovies(movies) {
|
|
2964
|
+
return postApiV3MovieImport({ body: movies });
|
|
2965
|
+
}
|
|
2966
|
+
async getMovieFiles(movieId, movieFileIds) {
|
|
2967
|
+
const query = {};
|
|
2968
|
+
if (movieId !== undefined)
|
|
2969
|
+
query.movieId = movieId;
|
|
2970
|
+
if (movieFileIds !== undefined)
|
|
2971
|
+
query.movieFileIds = movieFileIds;
|
|
2972
|
+
return getApiV3Moviefile(Object.keys(query).length > 0 ? { query } : {});
|
|
2973
|
+
}
|
|
2974
|
+
async getMovieFile(id) {
|
|
2975
|
+
return getApiV3MoviefileById({ path: { id } });
|
|
2976
|
+
}
|
|
2977
|
+
async updateMovieFile(id, movieFile) {
|
|
2978
|
+
return putApiV3MoviefileById({ path: { id }, body: movieFile });
|
|
2979
|
+
}
|
|
2980
|
+
async deleteMovieFile(id) {
|
|
2981
|
+
return deleteApiV3MoviefileById({ path: { id } });
|
|
2982
|
+
}
|
|
2983
|
+
async updateMovieFilesEditor(movieFileList) {
|
|
2984
|
+
return putApiV3MoviefileEditor({ body: movieFileList });
|
|
2985
|
+
}
|
|
2986
|
+
async deleteMovieFilesBulk(movieFileList) {
|
|
2987
|
+
return deleteApiV3MoviefileBulk({ body: movieFileList });
|
|
2988
|
+
}
|
|
2989
|
+
async updateMovieFilesBulk(movieFiles) {
|
|
2990
|
+
return putApiV3MoviefileBulk({ body: movieFiles });
|
|
2991
|
+
}
|
|
2992
|
+
async getQualityProfiles() {
|
|
2993
|
+
return getApiV3Qualityprofile();
|
|
2994
|
+
}
|
|
2995
|
+
async getQualityProfile(id) {
|
|
2996
|
+
return getApiV3QualityprofileById({ path: { id } });
|
|
2997
|
+
}
|
|
2998
|
+
async addQualityProfile(profile) {
|
|
2999
|
+
return postApiV3Qualityprofile({ body: profile });
|
|
3000
|
+
}
|
|
3001
|
+
async updateQualityProfile(id, profile) {
|
|
3002
|
+
return putApiV3QualityprofileById({ path: { id: String(id) }, body: profile });
|
|
3003
|
+
}
|
|
3004
|
+
async deleteQualityProfile(id) {
|
|
3005
|
+
return deleteApiV3QualityprofileById({ path: { id } });
|
|
3006
|
+
}
|
|
3007
|
+
async getQualityProfileSchema() {
|
|
3008
|
+
return getApiV3QualityprofileSchema();
|
|
3009
|
+
}
|
|
3010
|
+
async getCustomFormats() {
|
|
3011
|
+
return getApiV3Customformat();
|
|
3012
|
+
}
|
|
3013
|
+
async getCustomFormat(id) {
|
|
3014
|
+
return getApiV3CustomformatById({ path: { id } });
|
|
3015
|
+
}
|
|
3016
|
+
async addCustomFormat(format) {
|
|
3017
|
+
return postApiV3Customformat({ body: format });
|
|
3018
|
+
}
|
|
3019
|
+
async updateCustomFormat(id, format) {
|
|
3020
|
+
return putApiV3CustomformatById({ path: { id: String(id) }, body: format });
|
|
3021
|
+
}
|
|
3022
|
+
async deleteCustomFormat(id) {
|
|
3023
|
+
return deleteApiV3CustomformatById({ path: { id } });
|
|
3024
|
+
}
|
|
3025
|
+
async updateCustomFormatsBulk(formats) {
|
|
3026
|
+
return putApiV3CustomformatBulk({ body: formats });
|
|
3027
|
+
}
|
|
3028
|
+
async deleteCustomFormatsBulk(ids) {
|
|
3029
|
+
return deleteApiV3CustomformatBulk({ body: { ids } });
|
|
3030
|
+
}
|
|
3031
|
+
async getCustomFormatSchema() {
|
|
3032
|
+
return getApiV3CustomformatSchema();
|
|
3033
|
+
}
|
|
3034
|
+
async updateDownloadClientsBulk(clients) {
|
|
3035
|
+
return putApiV3DownloadclientBulk({ body: clients });
|
|
3036
|
+
}
|
|
3037
|
+
async deleteDownloadClientsBulk(ids) {
|
|
3038
|
+
return deleteApiV3DownloadclientBulk({ body: { ids } });
|
|
3039
|
+
}
|
|
3040
|
+
async getCalendar(startDate, endDate, unmonitored) {
|
|
3041
|
+
const query = {};
|
|
3042
|
+
if (startDate)
|
|
3043
|
+
query.start = startDate;
|
|
3044
|
+
if (endDate)
|
|
3045
|
+
query.end = endDate;
|
|
3046
|
+
if (unmonitored !== undefined)
|
|
3047
|
+
query.unmonitored = unmonitored;
|
|
3048
|
+
return getApiV3Calendar(Object.keys(query).length > 0 ? { query } : {});
|
|
3049
|
+
}
|
|
3050
|
+
async getCalendarFeed(pastDays, futureDays, tags) {
|
|
3051
|
+
const query = {};
|
|
3052
|
+
if (pastDays !== undefined)
|
|
3053
|
+
query.pastDays = pastDays;
|
|
3054
|
+
if (futureDays !== undefined)
|
|
3055
|
+
query.futureDays = futureDays;
|
|
3056
|
+
if (tags)
|
|
3057
|
+
query.tags = tags;
|
|
3058
|
+
return getFeedV3CalendarRadarrIcs(Object.keys(query).length > 0 ? { query } : {});
|
|
3059
|
+
}
|
|
3060
|
+
async getQueue(page, pageSize, sortKey, sortDirection, includeUnknownMovieItems) {
|
|
3061
|
+
const query = {};
|
|
3062
|
+
if (page !== undefined)
|
|
3063
|
+
query.page = page;
|
|
3064
|
+
if (pageSize !== undefined)
|
|
3065
|
+
query.pageSize = pageSize;
|
|
3066
|
+
if (sortKey)
|
|
3067
|
+
query.sortKey = sortKey;
|
|
3068
|
+
if (sortDirection)
|
|
3069
|
+
query.sortDirection = sortDirection;
|
|
3070
|
+
if (includeUnknownMovieItems !== undefined)
|
|
3071
|
+
query.includeUnknownMovieItems = includeUnknownMovieItems;
|
|
3072
|
+
return getApiV3Queue(Object.keys(query).length > 0 ? { query } : {});
|
|
3073
|
+
}
|
|
3074
|
+
async removeQueueItem(id, removeFromClient, blocklist) {
|
|
3075
|
+
const query = {};
|
|
3076
|
+
if (removeFromClient !== undefined)
|
|
3077
|
+
query.removeFromClient = removeFromClient;
|
|
3078
|
+
if (blocklist !== undefined)
|
|
3079
|
+
query.blocklist = blocklist;
|
|
3080
|
+
return deleteApiV3QueueById({
|
|
3081
|
+
path: { id },
|
|
3082
|
+
...Object.keys(query).length > 0 ? { query } : {}
|
|
3083
|
+
});
|
|
3084
|
+
}
|
|
3085
|
+
async removeQueueItemsBulk(ids, removeFromClient, blocklist) {
|
|
3086
|
+
const body = { ids };
|
|
3087
|
+
if (removeFromClient !== undefined)
|
|
3088
|
+
body.removeFromClient = removeFromClient;
|
|
3089
|
+
if (blocklist !== undefined)
|
|
3090
|
+
body.blocklist = blocklist;
|
|
3091
|
+
return deleteApiV3QueueBulk({ body });
|
|
3092
|
+
}
|
|
3093
|
+
async grabQueueItem(id) {
|
|
3094
|
+
return postApiV3QueueGrabById({ path: { id } });
|
|
3095
|
+
}
|
|
3096
|
+
async grabQueueItemsBulk(ids) {
|
|
3097
|
+
return postApiV3QueueGrabBulk({ body: { ids } });
|
|
3098
|
+
}
|
|
3099
|
+
async getQueueDetails(movieId, includeMovie) {
|
|
3100
|
+
const query = {};
|
|
3101
|
+
if (movieId !== undefined)
|
|
3102
|
+
query.movieId = movieId;
|
|
3103
|
+
if (includeMovie !== undefined)
|
|
3104
|
+
query.includeMovie = includeMovie;
|
|
3105
|
+
return getApiV3QueueDetails(Object.keys(query).length > 0 ? { query } : {});
|
|
3106
|
+
}
|
|
3107
|
+
async getQueueStatus() {
|
|
3108
|
+
return getApiV3QueueStatus();
|
|
3109
|
+
}
|
|
3110
|
+
async getImportLists() {
|
|
3111
|
+
return getApiV3Importlist();
|
|
3112
|
+
}
|
|
3113
|
+
async getImportList(id) {
|
|
3114
|
+
return getApiV3ImportlistById({ path: { id } });
|
|
3115
|
+
}
|
|
3116
|
+
async addImportList(importList) {
|
|
3117
|
+
return postApiV3Importlist({ body: importList });
|
|
3118
|
+
}
|
|
3119
|
+
async updateImportList(id, importList) {
|
|
3120
|
+
return putApiV3ImportlistById({ path: { id }, body: importList });
|
|
3121
|
+
}
|
|
3122
|
+
async deleteImportList(id) {
|
|
3123
|
+
return deleteApiV3ImportlistById({ path: { id } });
|
|
3124
|
+
}
|
|
3125
|
+
async getImportListSchema() {
|
|
3126
|
+
return getApiV3ImportlistSchema();
|
|
3127
|
+
}
|
|
3128
|
+
async testImportList(importList) {
|
|
3129
|
+
return postApiV3ImportlistTest({ body: importList });
|
|
3130
|
+
}
|
|
3131
|
+
async testAllImportLists() {
|
|
3132
|
+
return postApiV3ImportlistTestall();
|
|
3133
|
+
}
|
|
3134
|
+
async getHistory(page, pageSize, sortKey, sortDirection, movieId, downloadId) {
|
|
3135
|
+
const query = {};
|
|
3136
|
+
if (page !== undefined)
|
|
3137
|
+
query.page = page;
|
|
3138
|
+
if (pageSize !== undefined)
|
|
3139
|
+
query.pageSize = pageSize;
|
|
3140
|
+
if (sortKey)
|
|
3141
|
+
query.sortKey = sortKey;
|
|
3142
|
+
if (sortDirection)
|
|
3143
|
+
query.sortDirection = sortDirection;
|
|
3144
|
+
if (movieId !== undefined)
|
|
3145
|
+
query.movieId = movieId;
|
|
3146
|
+
if (downloadId)
|
|
3147
|
+
query.downloadId = downloadId;
|
|
3148
|
+
return getApiV3History(Object.keys(query).length > 0 ? { query } : {});
|
|
3149
|
+
}
|
|
3150
|
+
async getHistorySince(date, movieId) {
|
|
3151
|
+
const query = { date };
|
|
3152
|
+
if (movieId !== undefined)
|
|
3153
|
+
query.movieId = movieId;
|
|
3154
|
+
return getApiV3HistorySince({ query });
|
|
3155
|
+
}
|
|
3156
|
+
async getMovieHistory(movieId, eventType) {
|
|
3157
|
+
const query = { movieId };
|
|
3158
|
+
if (eventType !== undefined)
|
|
3159
|
+
query.eventType = eventType;
|
|
3160
|
+
return getApiV3HistoryMovie({ query });
|
|
3161
|
+
}
|
|
3162
|
+
async markHistoryItemFailed(id) {
|
|
3163
|
+
return postApiV3HistoryFailedById({ path: { id } });
|
|
3164
|
+
}
|
|
3165
|
+
async getBlocklist(page, pageSize, sortKey, sortDirection) {
|
|
3166
|
+
const query = {};
|
|
3167
|
+
if (page !== undefined)
|
|
3168
|
+
query.page = page;
|
|
3169
|
+
if (pageSize !== undefined)
|
|
3170
|
+
query.pageSize = pageSize;
|
|
3171
|
+
if (sortKey)
|
|
3172
|
+
query.sortKey = sortKey;
|
|
3173
|
+
if (sortDirection)
|
|
3174
|
+
query.sortDirection = sortDirection;
|
|
3175
|
+
return getApiV3Blocklist(Object.keys(query).length > 0 ? { query } : {});
|
|
3176
|
+
}
|
|
3177
|
+
async removeBlocklistItem(id) {
|
|
3178
|
+
return deleteApiV3BlocklistById({ path: { id } });
|
|
3179
|
+
}
|
|
3180
|
+
async removeBlocklistItemsBulk(ids) {
|
|
3181
|
+
return deleteApiV3BlocklistBulk({ body: { ids } });
|
|
3182
|
+
}
|
|
3183
|
+
async getWantedMissing(page, pageSize) {
|
|
3184
|
+
const query = {};
|
|
3185
|
+
if (page !== undefined)
|
|
3186
|
+
query.page = page;
|
|
3187
|
+
if (pageSize !== undefined)
|
|
3188
|
+
query.pageSize = pageSize;
|
|
3189
|
+
return getApiV3WantedMissing(Object.keys(query).length > 0 ? { query } : {});
|
|
3190
|
+
}
|
|
3191
|
+
async getWantedCutoff(page, pageSize) {
|
|
3192
|
+
const query = {};
|
|
3193
|
+
if (page !== undefined)
|
|
3194
|
+
query.page = page;
|
|
3195
|
+
if (pageSize !== undefined)
|
|
3196
|
+
query.pageSize = pageSize;
|
|
3197
|
+
return getApiV3WantedCutoff(Object.keys(query).length > 0 ? { query } : {});
|
|
3198
|
+
}
|
|
3199
|
+
async getNamingConfig() {
|
|
3200
|
+
return getApiV3ConfigNaming();
|
|
3201
|
+
}
|
|
3202
|
+
async getNamingConfigById(id) {
|
|
3203
|
+
return getApiV3ConfigNamingById({ path: { id } });
|
|
3204
|
+
}
|
|
3205
|
+
async updateNamingConfig(id, config) {
|
|
3206
|
+
return putApiV3ConfigNamingById({ path: { id: String(id) }, body: config });
|
|
3207
|
+
}
|
|
3208
|
+
async getNamingConfigExamples() {
|
|
3209
|
+
return getApiV3ConfigNamingExamples();
|
|
3210
|
+
}
|
|
3211
|
+
async getMediaManagementConfig() {
|
|
3212
|
+
return getApiV3ConfigMediamanagement();
|
|
3213
|
+
}
|
|
3214
|
+
async getMediaManagementConfigById(id) {
|
|
3215
|
+
return getApiV3ConfigMediamanagementById({ path: { id } });
|
|
3216
|
+
}
|
|
3217
|
+
async updateMediaManagementConfig(id, config) {
|
|
3218
|
+
return putApiV3ConfigMediamanagementById({ path: { id: String(id) }, body: config });
|
|
3219
|
+
}
|
|
3220
|
+
async getSystemLogs() {
|
|
3221
|
+
return getApiV3Log();
|
|
3222
|
+
}
|
|
3223
|
+
async getDiskSpace() {
|
|
3224
|
+
return getApiV3Diskspace();
|
|
3225
|
+
}
|
|
3226
|
+
};
|
|
3227
|
+
});
|
|
3228
|
+
|
|
3229
|
+
// node_modules/consola/dist/core.mjs
|
|
3230
|
+
function isPlainObject$1(value) {
|
|
3231
|
+
if (value === null || typeof value !== "object") {
|
|
3232
|
+
return false;
|
|
2648
3233
|
}
|
|
2649
|
-
|
|
2650
|
-
|
|
3234
|
+
const prototype = Object.getPrototypeOf(value);
|
|
3235
|
+
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
|
|
3236
|
+
return false;
|
|
2651
3237
|
}
|
|
2652
|
-
|
|
2653
|
-
return
|
|
3238
|
+
if (Symbol.iterator in value) {
|
|
3239
|
+
return false;
|
|
2654
3240
|
}
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
if (movieId !== undefined)
|
|
2658
|
-
query.movieId = movieId;
|
|
2659
|
-
if (movieFileIds !== undefined)
|
|
2660
|
-
query.movieFileIds = movieFileIds;
|
|
2661
|
-
return getApiV3Moviefile(Object.keys(query).length > 0 ? { query } : {});
|
|
3241
|
+
if (Symbol.toStringTag in value) {
|
|
3242
|
+
return Object.prototype.toString.call(value) === "[object Module]";
|
|
2662
3243
|
}
|
|
2663
|
-
|
|
2664
|
-
|
|
3244
|
+
return true;
|
|
3245
|
+
}
|
|
3246
|
+
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
3247
|
+
if (!isPlainObject$1(defaults)) {
|
|
3248
|
+
return _defu(baseObject, {}, namespace, merger);
|
|
2665
3249
|
}
|
|
2666
|
-
|
|
2667
|
-
|
|
3250
|
+
const object = Object.assign({}, defaults);
|
|
3251
|
+
for (const key in baseObject) {
|
|
3252
|
+
if (key === "__proto__" || key === "constructor") {
|
|
3253
|
+
continue;
|
|
3254
|
+
}
|
|
3255
|
+
const value = baseObject[key];
|
|
3256
|
+
if (value === null || value === undefined) {
|
|
3257
|
+
continue;
|
|
3258
|
+
}
|
|
3259
|
+
if (merger && merger(object, key, value, namespace)) {
|
|
3260
|
+
continue;
|
|
3261
|
+
}
|
|
3262
|
+
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
3263
|
+
object[key] = [...value, ...object[key]];
|
|
3264
|
+
} else if (isPlainObject$1(value) && isPlainObject$1(object[key])) {
|
|
3265
|
+
object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
|
|
3266
|
+
} else {
|
|
3267
|
+
object[key] = value;
|
|
3268
|
+
}
|
|
2668
3269
|
}
|
|
2669
|
-
|
|
2670
|
-
|
|
3270
|
+
return object;
|
|
3271
|
+
}
|
|
3272
|
+
function createDefu(merger) {
|
|
3273
|
+
return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
|
|
3274
|
+
}
|
|
3275
|
+
function isPlainObject(obj) {
|
|
3276
|
+
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
3277
|
+
}
|
|
3278
|
+
function isLogObj(arg) {
|
|
3279
|
+
if (!isPlainObject(arg)) {
|
|
3280
|
+
return false;
|
|
2671
3281
|
}
|
|
2672
|
-
|
|
2673
|
-
return
|
|
3282
|
+
if (!arg.message && !arg.args) {
|
|
3283
|
+
return false;
|
|
2674
3284
|
}
|
|
2675
|
-
|
|
2676
|
-
return
|
|
2677
|
-
}
|
|
2678
|
-
async updateMovieFilesBulk(movieFiles) {
|
|
2679
|
-
return putApiV3MoviefileBulk({ body: movieFiles });
|
|
2680
|
-
}
|
|
2681
|
-
async getQualityProfiles() {
|
|
2682
|
-
return getApiV3Qualityprofile();
|
|
2683
|
-
}
|
|
2684
|
-
async getQualityProfile(id) {
|
|
2685
|
-
return getApiV3QualityprofileById({ path: { id } });
|
|
2686
|
-
}
|
|
2687
|
-
async addQualityProfile(profile) {
|
|
2688
|
-
return postApiV3Qualityprofile({ body: profile });
|
|
2689
|
-
}
|
|
2690
|
-
async updateQualityProfile(id, profile) {
|
|
2691
|
-
return putApiV3QualityprofileById({ path: { id: String(id) }, body: profile });
|
|
2692
|
-
}
|
|
2693
|
-
async deleteQualityProfile(id) {
|
|
2694
|
-
return deleteApiV3QualityprofileById({ path: { id } });
|
|
2695
|
-
}
|
|
2696
|
-
async getQualityProfileSchema() {
|
|
2697
|
-
return getApiV3QualityprofileSchema();
|
|
2698
|
-
}
|
|
2699
|
-
async getCustomFormats() {
|
|
2700
|
-
return getApiV3Customformat();
|
|
2701
|
-
}
|
|
2702
|
-
async getCustomFormat(id) {
|
|
2703
|
-
return getApiV3CustomformatById({ path: { id } });
|
|
2704
|
-
}
|
|
2705
|
-
async addCustomFormat(format) {
|
|
2706
|
-
return postApiV3Customformat({ body: format });
|
|
2707
|
-
}
|
|
2708
|
-
async updateCustomFormat(id, format) {
|
|
2709
|
-
return putApiV3CustomformatById({ path: { id: String(id) }, body: format });
|
|
2710
|
-
}
|
|
2711
|
-
async deleteCustomFormat(id) {
|
|
2712
|
-
return deleteApiV3CustomformatById({ path: { id } });
|
|
2713
|
-
}
|
|
2714
|
-
async updateCustomFormatsBulk(formats) {
|
|
2715
|
-
return putApiV3CustomformatBulk({ body: formats });
|
|
2716
|
-
}
|
|
2717
|
-
async deleteCustomFormatsBulk(ids) {
|
|
2718
|
-
return deleteApiV3CustomformatBulk({ body: { ids } });
|
|
2719
|
-
}
|
|
2720
|
-
async getCustomFormatSchema() {
|
|
2721
|
-
return getApiV3CustomformatSchema();
|
|
2722
|
-
}
|
|
2723
|
-
async getDownloadClients() {
|
|
2724
|
-
return getApiV3Downloadclient();
|
|
2725
|
-
}
|
|
2726
|
-
async getDownloadClient(id) {
|
|
2727
|
-
return getApiV3DownloadclientById({ path: { id } });
|
|
2728
|
-
}
|
|
2729
|
-
async addDownloadClient(client2) {
|
|
2730
|
-
return postApiV3Downloadclient({ body: client2 });
|
|
2731
|
-
}
|
|
2732
|
-
async updateDownloadClient(id, client2) {
|
|
2733
|
-
return putApiV3DownloadclientById({ path: { id }, body: client2 });
|
|
2734
|
-
}
|
|
2735
|
-
async deleteDownloadClient(id) {
|
|
2736
|
-
return deleteApiV3DownloadclientById({ path: { id } });
|
|
2737
|
-
}
|
|
2738
|
-
async updateDownloadClientsBulk(clients) {
|
|
2739
|
-
return putApiV3DownloadclientBulk({ body: clients });
|
|
2740
|
-
}
|
|
2741
|
-
async deleteDownloadClientsBulk(ids) {
|
|
2742
|
-
return deleteApiV3DownloadclientBulk({ body: { ids } });
|
|
2743
|
-
}
|
|
2744
|
-
async getDownloadClientSchema() {
|
|
2745
|
-
return getApiV3DownloadclientSchema();
|
|
2746
|
-
}
|
|
2747
|
-
async testDownloadClient(client2) {
|
|
2748
|
-
return postApiV3DownloadclientTest({ body: client2 });
|
|
2749
|
-
}
|
|
2750
|
-
async testAllDownloadClients() {
|
|
2751
|
-
return postApiV3DownloadclientTestall();
|
|
2752
|
-
}
|
|
2753
|
-
async getNotifications() {
|
|
2754
|
-
return getApiV3Notification();
|
|
2755
|
-
}
|
|
2756
|
-
async getNotification(id) {
|
|
2757
|
-
return getApiV3NotificationById({ path: { id } });
|
|
2758
|
-
}
|
|
2759
|
-
async addNotification(notification) {
|
|
2760
|
-
return postApiV3Notification({ body: notification });
|
|
2761
|
-
}
|
|
2762
|
-
async updateNotification(id, notification) {
|
|
2763
|
-
return putApiV3NotificationById({ path: { id }, body: notification });
|
|
2764
|
-
}
|
|
2765
|
-
async deleteNotification(id) {
|
|
2766
|
-
return deleteApiV3NotificationById({ path: { id } });
|
|
2767
|
-
}
|
|
2768
|
-
async getNotificationSchema() {
|
|
2769
|
-
return getApiV3NotificationSchema();
|
|
2770
|
-
}
|
|
2771
|
-
async testNotification(notification) {
|
|
2772
|
-
return postApiV3NotificationTest({ body: notification });
|
|
2773
|
-
}
|
|
2774
|
-
async testAllNotifications() {
|
|
2775
|
-
return postApiV3NotificationTestall();
|
|
2776
|
-
}
|
|
2777
|
-
async getCalendar(startDate, endDate, unmonitored) {
|
|
2778
|
-
const query = {};
|
|
2779
|
-
if (startDate)
|
|
2780
|
-
query.start = startDate;
|
|
2781
|
-
if (endDate)
|
|
2782
|
-
query.end = endDate;
|
|
2783
|
-
if (unmonitored !== undefined)
|
|
2784
|
-
query.unmonitored = unmonitored;
|
|
2785
|
-
return getApiV3Calendar(Object.keys(query).length > 0 ? { query } : {});
|
|
2786
|
-
}
|
|
2787
|
-
async getCalendarFeed(pastDays, futureDays, tags) {
|
|
2788
|
-
const query = {};
|
|
2789
|
-
if (pastDays !== undefined)
|
|
2790
|
-
query.pastDays = pastDays;
|
|
2791
|
-
if (futureDays !== undefined)
|
|
2792
|
-
query.futureDays = futureDays;
|
|
2793
|
-
if (tags)
|
|
2794
|
-
query.tags = tags;
|
|
2795
|
-
return getFeedV3CalendarRadarrIcs(Object.keys(query).length > 0 ? { query } : {});
|
|
2796
|
-
}
|
|
2797
|
-
async getQueue(page, pageSize, sortKey, sortDirection, includeUnknownMovieItems) {
|
|
2798
|
-
const query = {};
|
|
2799
|
-
if (page !== undefined)
|
|
2800
|
-
query.page = page;
|
|
2801
|
-
if (pageSize !== undefined)
|
|
2802
|
-
query.pageSize = pageSize;
|
|
2803
|
-
if (sortKey)
|
|
2804
|
-
query.sortKey = sortKey;
|
|
2805
|
-
if (sortDirection)
|
|
2806
|
-
query.sortDirection = sortDirection;
|
|
2807
|
-
if (includeUnknownMovieItems !== undefined)
|
|
2808
|
-
query.includeUnknownMovieItems = includeUnknownMovieItems;
|
|
2809
|
-
return getApiV3Queue(Object.keys(query).length > 0 ? { query } : {});
|
|
2810
|
-
}
|
|
2811
|
-
async removeQueueItem(id, removeFromClient, blocklist) {
|
|
2812
|
-
const query = {};
|
|
2813
|
-
if (removeFromClient !== undefined)
|
|
2814
|
-
query.removeFromClient = removeFromClient;
|
|
2815
|
-
if (blocklist !== undefined)
|
|
2816
|
-
query.blocklist = blocklist;
|
|
2817
|
-
return deleteApiV3QueueById({
|
|
2818
|
-
path: { id },
|
|
2819
|
-
...Object.keys(query).length > 0 ? { query } : {}
|
|
2820
|
-
});
|
|
2821
|
-
}
|
|
2822
|
-
async removeQueueItemsBulk(ids, removeFromClient, blocklist) {
|
|
2823
|
-
const body = { ids };
|
|
2824
|
-
if (removeFromClient !== undefined)
|
|
2825
|
-
body.removeFromClient = removeFromClient;
|
|
2826
|
-
if (blocklist !== undefined)
|
|
2827
|
-
body.blocklist = blocklist;
|
|
2828
|
-
return deleteApiV3QueueBulk({ body });
|
|
2829
|
-
}
|
|
2830
|
-
async grabQueueItem(id) {
|
|
2831
|
-
return postApiV3QueueGrabById({ path: { id } });
|
|
2832
|
-
}
|
|
2833
|
-
async grabQueueItemsBulk(ids) {
|
|
2834
|
-
return postApiV3QueueGrabBulk({ body: { ids } });
|
|
2835
|
-
}
|
|
2836
|
-
async getQueueDetails(movieId, includeMovie) {
|
|
2837
|
-
const query = {};
|
|
2838
|
-
if (movieId !== undefined)
|
|
2839
|
-
query.movieId = movieId;
|
|
2840
|
-
if (includeMovie !== undefined)
|
|
2841
|
-
query.includeMovie = includeMovie;
|
|
2842
|
-
return getApiV3QueueDetails(Object.keys(query).length > 0 ? { query } : {});
|
|
2843
|
-
}
|
|
2844
|
-
async getQueueStatus() {
|
|
2845
|
-
return getApiV3QueueStatus();
|
|
2846
|
-
}
|
|
2847
|
-
async getImportLists() {
|
|
2848
|
-
return getApiV3Importlist();
|
|
2849
|
-
}
|
|
2850
|
-
async getImportList(id) {
|
|
2851
|
-
return getApiV3ImportlistById({ path: { id } });
|
|
2852
|
-
}
|
|
2853
|
-
async addImportList(importList) {
|
|
2854
|
-
return postApiV3Importlist({ body: importList });
|
|
2855
|
-
}
|
|
2856
|
-
async updateImportList(id, importList) {
|
|
2857
|
-
return putApiV3ImportlistById({ path: { id }, body: importList });
|
|
2858
|
-
}
|
|
2859
|
-
async deleteImportList(id) {
|
|
2860
|
-
return deleteApiV3ImportlistById({ path: { id } });
|
|
2861
|
-
}
|
|
2862
|
-
async getImportListSchema() {
|
|
2863
|
-
return getApiV3ImportlistSchema();
|
|
2864
|
-
}
|
|
2865
|
-
async testImportList(importList) {
|
|
2866
|
-
return postApiV3ImportlistTest({ body: importList });
|
|
2867
|
-
}
|
|
2868
|
-
async testAllImportLists() {
|
|
2869
|
-
return postApiV3ImportlistTestall();
|
|
2870
|
-
}
|
|
2871
|
-
async getIndexers() {
|
|
2872
|
-
return getApiV3Indexer();
|
|
2873
|
-
}
|
|
2874
|
-
async getIndexer(id) {
|
|
2875
|
-
return getApiV3IndexerById({ path: { id } });
|
|
2876
|
-
}
|
|
2877
|
-
async addIndexer(indexer) {
|
|
2878
|
-
return postApiV3Indexer({ body: indexer });
|
|
2879
|
-
}
|
|
2880
|
-
async updateIndexer(id, indexer) {
|
|
2881
|
-
return putApiV3IndexerById({ path: { id }, body: indexer });
|
|
2882
|
-
}
|
|
2883
|
-
async deleteIndexer(id) {
|
|
2884
|
-
return deleteApiV3IndexerById({ path: { id } });
|
|
2885
|
-
}
|
|
2886
|
-
async getIndexerSchema() {
|
|
2887
|
-
return getApiV3IndexerSchema();
|
|
2888
|
-
}
|
|
2889
|
-
async testIndexer(indexer) {
|
|
2890
|
-
return postApiV3IndexerTest({ body: indexer });
|
|
2891
|
-
}
|
|
2892
|
-
async testAllIndexers() {
|
|
2893
|
-
return postApiV3IndexerTestall();
|
|
2894
|
-
}
|
|
2895
|
-
async getHistory(page, pageSize, sortKey, sortDirection, movieId, downloadId) {
|
|
2896
|
-
const query = {};
|
|
2897
|
-
if (page !== undefined)
|
|
2898
|
-
query.page = page;
|
|
2899
|
-
if (pageSize !== undefined)
|
|
2900
|
-
query.pageSize = pageSize;
|
|
2901
|
-
if (sortKey)
|
|
2902
|
-
query.sortKey = sortKey;
|
|
2903
|
-
if (sortDirection)
|
|
2904
|
-
query.sortDirection = sortDirection;
|
|
2905
|
-
if (movieId !== undefined)
|
|
2906
|
-
query.movieId = movieId;
|
|
2907
|
-
if (downloadId)
|
|
2908
|
-
query.downloadId = downloadId;
|
|
2909
|
-
return getApiV3History(Object.keys(query).length > 0 ? { query } : {});
|
|
2910
|
-
}
|
|
2911
|
-
async getHistorySince(date, movieId) {
|
|
2912
|
-
const query = { date };
|
|
2913
|
-
if (movieId !== undefined)
|
|
2914
|
-
query.movieId = movieId;
|
|
2915
|
-
return getApiV3HistorySince({ query });
|
|
2916
|
-
}
|
|
2917
|
-
async getMovieHistory(movieId, eventType) {
|
|
2918
|
-
const query = { movieId };
|
|
2919
|
-
if (eventType !== undefined)
|
|
2920
|
-
query.eventType = eventType;
|
|
2921
|
-
return getApiV3HistoryMovie({ query });
|
|
2922
|
-
}
|
|
2923
|
-
async markHistoryItemFailed(id) {
|
|
2924
|
-
return postApiV3HistoryFailedById({ path: { id } });
|
|
2925
|
-
}
|
|
2926
|
-
async getBlocklist(page, pageSize, sortKey, sortDirection) {
|
|
2927
|
-
const query = {};
|
|
2928
|
-
if (page !== undefined)
|
|
2929
|
-
query.page = page;
|
|
2930
|
-
if (pageSize !== undefined)
|
|
2931
|
-
query.pageSize = pageSize;
|
|
2932
|
-
if (sortKey)
|
|
2933
|
-
query.sortKey = sortKey;
|
|
2934
|
-
if (sortDirection)
|
|
2935
|
-
query.sortDirection = sortDirection;
|
|
2936
|
-
return getApiV3Blocklist(Object.keys(query).length > 0 ? { query } : {});
|
|
2937
|
-
}
|
|
2938
|
-
async removeBlocklistItem(id) {
|
|
2939
|
-
return deleteApiV3BlocklistById({ path: { id } });
|
|
2940
|
-
}
|
|
2941
|
-
async removeBlocklistItemsBulk(ids) {
|
|
2942
|
-
return deleteApiV3BlocklistBulk({ body: { ids } });
|
|
2943
|
-
}
|
|
2944
|
-
async getWantedMissing(page, pageSize) {
|
|
2945
|
-
const query = {};
|
|
2946
|
-
if (page !== undefined)
|
|
2947
|
-
query.page = page;
|
|
2948
|
-
if (pageSize !== undefined)
|
|
2949
|
-
query.pageSize = pageSize;
|
|
2950
|
-
return getApiV3WantedMissing(Object.keys(query).length > 0 ? { query } : {});
|
|
2951
|
-
}
|
|
2952
|
-
async getWantedCutoff(page, pageSize) {
|
|
2953
|
-
const query = {};
|
|
2954
|
-
if (page !== undefined)
|
|
2955
|
-
query.page = page;
|
|
2956
|
-
if (pageSize !== undefined)
|
|
2957
|
-
query.pageSize = pageSize;
|
|
2958
|
-
return getApiV3WantedCutoff(Object.keys(query).length > 0 ? { query } : {});
|
|
2959
|
-
}
|
|
2960
|
-
async getHostConfig() {
|
|
2961
|
-
return getApiV3ConfigHost();
|
|
2962
|
-
}
|
|
2963
|
-
async getHostConfigById(id) {
|
|
2964
|
-
return getApiV3ConfigHostById({ path: { id } });
|
|
2965
|
-
}
|
|
2966
|
-
async updateHostConfig(id, config) {
|
|
2967
|
-
return putApiV3ConfigHostById({ path: { id: String(id) }, body: config });
|
|
2968
|
-
}
|
|
2969
|
-
async getNamingConfig() {
|
|
2970
|
-
return getApiV3ConfigNaming();
|
|
2971
|
-
}
|
|
2972
|
-
async getNamingConfigById(id) {
|
|
2973
|
-
return getApiV3ConfigNamingById({ path: { id } });
|
|
2974
|
-
}
|
|
2975
|
-
async updateNamingConfig(id, config) {
|
|
2976
|
-
return putApiV3ConfigNamingById({ path: { id: String(id) }, body: config });
|
|
2977
|
-
}
|
|
2978
|
-
async getNamingConfigExamples() {
|
|
2979
|
-
return getApiV3ConfigNamingExamples();
|
|
2980
|
-
}
|
|
2981
|
-
async getMediaManagementConfig() {
|
|
2982
|
-
return getApiV3ConfigMediamanagement();
|
|
2983
|
-
}
|
|
2984
|
-
async getMediaManagementConfigById(id) {
|
|
2985
|
-
return getApiV3ConfigMediamanagementById({ path: { id } });
|
|
2986
|
-
}
|
|
2987
|
-
async updateMediaManagementConfig(id, config) {
|
|
2988
|
-
return putApiV3ConfigMediamanagementById({ path: { id: String(id) }, body: config });
|
|
2989
|
-
}
|
|
2990
|
-
async getUiConfig() {
|
|
2991
|
-
return getApiV3ConfigUi();
|
|
2992
|
-
}
|
|
2993
|
-
async getUiConfigById(id) {
|
|
2994
|
-
return getApiV3ConfigUiById({ path: { id } });
|
|
2995
|
-
}
|
|
2996
|
-
async updateUiConfig(id, config) {
|
|
2997
|
-
return putApiV3ConfigUiById({ path: { id: String(id) }, body: config });
|
|
2998
|
-
}
|
|
2999
|
-
async restartSystem() {
|
|
3000
|
-
return postApiV3SystemRestart();
|
|
3001
|
-
}
|
|
3002
|
-
async shutdownSystem() {
|
|
3003
|
-
return postApiV3SystemShutdown();
|
|
3004
|
-
}
|
|
3005
|
-
async getSystemBackups() {
|
|
3006
|
-
return getApiV3SystemBackup();
|
|
3007
|
-
}
|
|
3008
|
-
async deleteSystemBackup(id) {
|
|
3009
|
-
return deleteApiV3SystemBackupById({ path: { id } });
|
|
3010
|
-
}
|
|
3011
|
-
async restoreSystemBackup(id) {
|
|
3012
|
-
return postApiV3SystemBackupRestoreById({ path: { id } });
|
|
3013
|
-
}
|
|
3014
|
-
async uploadSystemBackup() {
|
|
3015
|
-
return postApiV3SystemBackupRestoreUpload();
|
|
3016
|
-
}
|
|
3017
|
-
async getSystemLogs() {
|
|
3018
|
-
return getApiV3Log();
|
|
3019
|
-
}
|
|
3020
|
-
async getLogFiles() {
|
|
3021
|
-
return getApiV3LogFile();
|
|
3022
|
-
}
|
|
3023
|
-
async getLogFileByName(filename) {
|
|
3024
|
-
return getApiV3LogFileByFilename({ path: { filename } });
|
|
3025
|
-
}
|
|
3026
|
-
async getDiskSpace() {
|
|
3027
|
-
return getApiV3Diskspace();
|
|
3028
|
-
}
|
|
3029
|
-
async getTags() {
|
|
3030
|
-
return getApiV3Tag();
|
|
3031
|
-
}
|
|
3032
|
-
async addTag(tag) {
|
|
3033
|
-
return postApiV3Tag({ body: tag });
|
|
3034
|
-
}
|
|
3035
|
-
async getTag(id) {
|
|
3036
|
-
return getApiV3TagById({ path: { id } });
|
|
3037
|
-
}
|
|
3038
|
-
async updateTag(id, tag) {
|
|
3039
|
-
return putApiV3TagById({ path: { id: String(id) }, body: tag });
|
|
3040
|
-
}
|
|
3041
|
-
async deleteTag(id) {
|
|
3042
|
-
return deleteApiV3TagById({ path: { id } });
|
|
3043
|
-
}
|
|
3044
|
-
async getTagDetails() {
|
|
3045
|
-
return getApiV3TagDetail();
|
|
3046
|
-
}
|
|
3047
|
-
async getTagDetailById(id) {
|
|
3048
|
-
return getApiV3TagDetailById({ path: { id } });
|
|
3049
|
-
}
|
|
3050
|
-
updateConfig(newConfig) {
|
|
3051
|
-
const updatedConfig = { ...this.clientConfig.config, ...newConfig };
|
|
3052
|
-
this.clientConfig = createServarrClient(updatedConfig);
|
|
3053
|
-
client.setConfig({
|
|
3054
|
-
baseUrl: this.clientConfig.getBaseUrl(),
|
|
3055
|
-
headers: this.clientConfig.getHeaders()
|
|
3056
|
-
});
|
|
3057
|
-
return this.clientConfig.config;
|
|
3058
|
-
}
|
|
3059
|
-
}
|
|
3060
|
-
var init_radarr2 = __esm(() => {
|
|
3061
|
-
init_client();
|
|
3062
|
-
init_client_gen2();
|
|
3063
|
-
init_radarr();
|
|
3064
|
-
});
|
|
3065
|
-
|
|
3066
|
-
// node_modules/consola/dist/core.mjs
|
|
3067
|
-
function isPlainObject$1(value) {
|
|
3068
|
-
if (value === null || typeof value !== "object") {
|
|
3069
|
-
return false;
|
|
3070
|
-
}
|
|
3071
|
-
const prototype = Object.getPrototypeOf(value);
|
|
3072
|
-
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
|
|
3073
|
-
return false;
|
|
3074
|
-
}
|
|
3075
|
-
if (Symbol.iterator in value) {
|
|
3076
|
-
return false;
|
|
3077
|
-
}
|
|
3078
|
-
if (Symbol.toStringTag in value) {
|
|
3079
|
-
return Object.prototype.toString.call(value) === "[object Module]";
|
|
3080
|
-
}
|
|
3081
|
-
return true;
|
|
3082
|
-
}
|
|
3083
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
3084
|
-
if (!isPlainObject$1(defaults)) {
|
|
3085
|
-
return _defu(baseObject, {}, namespace, merger);
|
|
3086
|
-
}
|
|
3087
|
-
const object = Object.assign({}, defaults);
|
|
3088
|
-
for (const key in baseObject) {
|
|
3089
|
-
if (key === "__proto__" || key === "constructor") {
|
|
3090
|
-
continue;
|
|
3091
|
-
}
|
|
3092
|
-
const value = baseObject[key];
|
|
3093
|
-
if (value === null || value === undefined) {
|
|
3094
|
-
continue;
|
|
3095
|
-
}
|
|
3096
|
-
if (merger && merger(object, key, value, namespace)) {
|
|
3097
|
-
continue;
|
|
3098
|
-
}
|
|
3099
|
-
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
3100
|
-
object[key] = [...value, ...object[key]];
|
|
3101
|
-
} else if (isPlainObject$1(value) && isPlainObject$1(object[key])) {
|
|
3102
|
-
object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
|
|
3103
|
-
} else {
|
|
3104
|
-
object[key] = value;
|
|
3105
|
-
}
|
|
3106
|
-
}
|
|
3107
|
-
return object;
|
|
3108
|
-
}
|
|
3109
|
-
function createDefu(merger) {
|
|
3110
|
-
return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
|
|
3111
|
-
}
|
|
3112
|
-
function isPlainObject(obj) {
|
|
3113
|
-
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
3114
|
-
}
|
|
3115
|
-
function isLogObj(arg) {
|
|
3116
|
-
if (!isPlainObject(arg)) {
|
|
3117
|
-
return false;
|
|
3118
|
-
}
|
|
3119
|
-
if (!arg.message && !arg.args) {
|
|
3120
|
-
return false;
|
|
3121
|
-
}
|
|
3122
|
-
if (arg.stack) {
|
|
3123
|
-
return false;
|
|
3285
|
+
if (arg.stack) {
|
|
3286
|
+
return false;
|
|
3124
3287
|
}
|
|
3125
3288
|
return true;
|
|
3126
3289
|
}
|
|
@@ -7722,6 +7885,22 @@ var getApi2 = (options) => (options?.client ?? client2).get({
|
|
|
7722
7885
|
}],
|
|
7723
7886
|
url: "/api/v3/log",
|
|
7724
7887
|
...options
|
|
7888
|
+
}), getApiV3LogFile2 = (options) => (options?.client ?? client2).get({
|
|
7889
|
+
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
7890
|
+
in: "query",
|
|
7891
|
+
name: "apikey",
|
|
7892
|
+
type: "apiKey"
|
|
7893
|
+
}],
|
|
7894
|
+
url: "/api/v3/log/file",
|
|
7895
|
+
...options
|
|
7896
|
+
}), getApiV3LogFileByFilename2 = (options) => (options.client ?? client2).get({
|
|
7897
|
+
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
7898
|
+
in: "query",
|
|
7899
|
+
name: "apikey",
|
|
7900
|
+
type: "apiKey"
|
|
7901
|
+
}],
|
|
7902
|
+
url: "/api/v3/log/file/{filename}",
|
|
7903
|
+
...options
|
|
7725
7904
|
}), getApiV3Manualimport2 = (options) => (options?.client ?? client2).get({
|
|
7726
7905
|
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
7727
7906
|
in: "query",
|
|
@@ -8241,548 +8420,450 @@ var exports_sonarr = {};
|
|
|
8241
8420
|
__export(exports_sonarr, {
|
|
8242
8421
|
SonarrClient: () => SonarrClient
|
|
8243
8422
|
});
|
|
8244
|
-
|
|
8245
|
-
class SonarrClient {
|
|
8246
|
-
clientConfig;
|
|
8247
|
-
constructor(config) {
|
|
8248
|
-
this.clientConfig = createServarrClient(config);
|
|
8249
|
-
client2.setConfig({
|
|
8250
|
-
baseUrl: this.clientConfig.getBaseUrl(),
|
|
8251
|
-
headers: this.clientConfig.getHeaders()
|
|
8252
|
-
});
|
|
8253
|
-
}
|
|
8254
|
-
async getApi() {
|
|
8255
|
-
return getApi2();
|
|
8256
|
-
}
|
|
8257
|
-
async getSystemStatus() {
|
|
8258
|
-
return client2.get({
|
|
8259
|
-
url: "/api/v3/system/status",
|
|
8260
|
-
headers: this.clientConfig.getHeaders(),
|
|
8261
|
-
baseUrl: this.clientConfig.getBaseUrl()
|
|
8262
|
-
});
|
|
8263
|
-
}
|
|
8264
|
-
async getHealth() {
|
|
8265
|
-
return client2.get({
|
|
8266
|
-
url: "/api/v3/health",
|
|
8267
|
-
headers: this.clientConfig.getHeaders(),
|
|
8268
|
-
baseUrl: this.clientConfig.getBaseUrl()
|
|
8269
|
-
});
|
|
8270
|
-
}
|
|
8271
|
-
async getSeries() {
|
|
8272
|
-
return getApiV3Series();
|
|
8273
|
-
}
|
|
8274
|
-
async getSeriesById(id) {
|
|
8275
|
-
return getApiV3SeriesById({ path: { id } });
|
|
8276
|
-
}
|
|
8277
|
-
async addSeries(series) {
|
|
8278
|
-
return postApiV3Series({ body: series });
|
|
8279
|
-
}
|
|
8280
|
-
async updateSeries(id, series) {
|
|
8281
|
-
return putApiV3SeriesById({ path: { id }, body: series });
|
|
8282
|
-
}
|
|
8283
|
-
async deleteSeries(id, options) {
|
|
8284
|
-
return deleteApiV3SeriesById({
|
|
8285
|
-
path: { id },
|
|
8286
|
-
...options ? { query: options } : {}
|
|
8287
|
-
});
|
|
8288
|
-
}
|
|
8289
|
-
async getSeriesFolder(id) {
|
|
8290
|
-
return getApiV3SeriesByIdFolder({ path: { id } });
|
|
8291
|
-
}
|
|
8292
|
-
async searchSeries(term) {
|
|
8293
|
-
return getApiV3SeriesLookup({ query: { term } });
|
|
8294
|
-
}
|
|
8295
|
-
async getRootFolders() {
|
|
8296
|
-
return getApiV3Rootfolder2();
|
|
8297
|
-
}
|
|
8298
|
-
async addRootFolder(path) {
|
|
8299
|
-
return postApiV3Rootfolder2({
|
|
8300
|
-
body: { path }
|
|
8301
|
-
});
|
|
8302
|
-
}
|
|
8303
|
-
async deleteRootFolder(id) {
|
|
8304
|
-
return deleteApiV3RootfolderById2({ path: { id } });
|
|
8305
|
-
}
|
|
8306
|
-
async getLogs(page, pageSize, sortKey, sortDirection, level) {
|
|
8307
|
-
const query = {};
|
|
8308
|
-
if (page !== undefined)
|
|
8309
|
-
query.page = page;
|
|
8310
|
-
if (pageSize !== undefined)
|
|
8311
|
-
query.pageSize = pageSize;
|
|
8312
|
-
if (sortKey)
|
|
8313
|
-
query.sortKey = sortKey;
|
|
8314
|
-
if (sortDirection)
|
|
8315
|
-
query.sortDirection = sortDirection;
|
|
8316
|
-
if (level)
|
|
8317
|
-
query.level = level;
|
|
8318
|
-
return getApiV3Log2(Object.keys(query).length > 0 ? { query } : {});
|
|
8319
|
-
}
|
|
8320
|
-
async getUpdates() {
|
|
8321
|
-
return getApiV3Update2();
|
|
8322
|
-
}
|
|
8323
|
-
async getUpdateSettings() {
|
|
8324
|
-
return getApiV3Update2();
|
|
8325
|
-
}
|
|
8326
|
-
async getUpdateSetting() {
|
|
8327
|
-
return getApiV3Update2();
|
|
8328
|
-
}
|
|
8329
|
-
async getHostConfig() {
|
|
8330
|
-
return getApiV3ConfigHost2();
|
|
8331
|
-
}
|
|
8332
|
-
async getHostConfigById(id) {
|
|
8333
|
-
return getApiV3ConfigHostById2({ path: { id } });
|
|
8334
|
-
}
|
|
8335
|
-
async updateHostConfig(id, config) {
|
|
8336
|
-
return putApiV3ConfigHostById2({ path: { id }, body: config });
|
|
8337
|
-
}
|
|
8338
|
-
async getNamingConfig() {
|
|
8339
|
-
return getApiV3ConfigNaming2();
|
|
8340
|
-
}
|
|
8341
|
-
async getNamingConfigById(id) {
|
|
8342
|
-
return getApiV3ConfigNamingById2({ path: { id } });
|
|
8343
|
-
}
|
|
8344
|
-
async updateNamingConfig(id, config) {
|
|
8345
|
-
return putApiV3ConfigNamingById2({ path: { id }, body: config });
|
|
8346
|
-
}
|
|
8347
|
-
async getNamingConfigExamples() {
|
|
8348
|
-
return getApiV3ConfigNamingExamples2();
|
|
8349
|
-
}
|
|
8350
|
-
async getMediaManagementConfig() {
|
|
8351
|
-
return getApiV3ConfigMediamanagement2();
|
|
8352
|
-
}
|
|
8353
|
-
async getMediaManagementConfigById(id) {
|
|
8354
|
-
return getApiV3ConfigMediamanagementById2({ path: { id } });
|
|
8355
|
-
}
|
|
8356
|
-
async updateMediaManagementConfig(id, config) {
|
|
8357
|
-
return putApiV3ConfigMediamanagementById2({ path: { id }, body: config });
|
|
8358
|
-
}
|
|
8359
|
-
async getUiConfig() {
|
|
8360
|
-
return getApiV3ConfigUi2();
|
|
8361
|
-
}
|
|
8362
|
-
async getUiConfigById(id) {
|
|
8363
|
-
return getApiV3ConfigUiById2({ path: { id } });
|
|
8364
|
-
}
|
|
8365
|
-
async updateUiConfig(id, config) {
|
|
8366
|
-
return putApiV3ConfigUiById2({ path: { id }, body: config });
|
|
8367
|
-
}
|
|
8368
|
-
async restartSystem() {
|
|
8369
|
-
return postApiV3SystemRestart2();
|
|
8370
|
-
}
|
|
8371
|
-
async shutdownSystem() {
|
|
8372
|
-
return postApiV3SystemShutdown2();
|
|
8373
|
-
}
|
|
8374
|
-
async getSystemBackups() {
|
|
8375
|
-
return getApiV3SystemBackup2();
|
|
8376
|
-
}
|
|
8377
|
-
async deleteSystemBackup(id) {
|
|
8378
|
-
return deleteApiV3SystemBackupById2({ path: { id } });
|
|
8379
|
-
}
|
|
8380
|
-
async restoreSystemBackup(id) {
|
|
8381
|
-
return postApiV3SystemBackupRestoreById2({ path: { id } });
|
|
8382
|
-
}
|
|
8383
|
-
async uploadSystemBackup() {
|
|
8384
|
-
return postApiV3SystemBackupRestoreUpload2();
|
|
8385
|
-
}
|
|
8386
|
-
async getDiskSpace() {
|
|
8387
|
-
return getApiV3Diskspace2();
|
|
8388
|
-
}
|
|
8389
|
-
async getTags() {
|
|
8390
|
-
return getApiV3Tag2();
|
|
8391
|
-
}
|
|
8392
|
-
async addTag(tag) {
|
|
8393
|
-
return postApiV3Tag2({ body: tag });
|
|
8394
|
-
}
|
|
8395
|
-
async getTag(id) {
|
|
8396
|
-
return getApiV3TagById2({ path: { id } });
|
|
8397
|
-
}
|
|
8398
|
-
async updateTag(id, tag) {
|
|
8399
|
-
return putApiV3TagById2({ path: { id }, body: tag });
|
|
8400
|
-
}
|
|
8401
|
-
async deleteTag(id) {
|
|
8402
|
-
return deleteApiV3TagById2({ path: { id } });
|
|
8403
|
-
}
|
|
8404
|
-
async getTagDetails() {
|
|
8405
|
-
return getApiV3TagDetail2();
|
|
8406
|
-
}
|
|
8407
|
-
async getTagDetailById(id) {
|
|
8408
|
-
return getApiV3TagDetailById2({ path: { id } });
|
|
8409
|
-
}
|
|
8410
|
-
async getEpisodes(seriesId, episodeIds) {
|
|
8411
|
-
const query = {};
|
|
8412
|
-
if (seriesId !== undefined)
|
|
8413
|
-
query.seriesId = seriesId;
|
|
8414
|
-
if (episodeIds !== undefined)
|
|
8415
|
-
query.episodeIds = episodeIds;
|
|
8416
|
-
return getApiV3Episode(Object.keys(query).length > 0 ? { query } : {});
|
|
8417
|
-
}
|
|
8418
|
-
async getEpisode(id) {
|
|
8419
|
-
return getApiV3EpisodeById({ path: { id } });
|
|
8420
|
-
}
|
|
8421
|
-
async updateEpisode(id, episode) {
|
|
8422
|
-
return putApiV3EpisodeById({ path: { id }, body: episode });
|
|
8423
|
-
}
|
|
8424
|
-
async getEpisodeFiles(seriesId, episodeFileIds) {
|
|
8425
|
-
const query = {};
|
|
8426
|
-
if (seriesId !== undefined)
|
|
8427
|
-
query.seriesId = seriesId;
|
|
8428
|
-
if (episodeFileIds !== undefined)
|
|
8429
|
-
query.episodeFileIds = episodeFileIds;
|
|
8430
|
-
return getApiV3Episodefile(Object.keys(query).length > 0 ? { query } : {});
|
|
8431
|
-
}
|
|
8432
|
-
async getEpisodeFile(id) {
|
|
8433
|
-
return getApiV3EpisodefileById({ path: { id } });
|
|
8434
|
-
}
|
|
8435
|
-
async updateEpisodeFile(id, episodeFile) {
|
|
8436
|
-
return putApiV3EpisodefileById({ path: { id }, body: episodeFile });
|
|
8437
|
-
}
|
|
8438
|
-
async deleteEpisodeFile(id) {
|
|
8439
|
-
return deleteApiV3EpisodefileById({ path: { id } });
|
|
8440
|
-
}
|
|
8441
|
-
async updateEpisodeFilesEditor(episodeFileList) {
|
|
8442
|
-
return putApiV3EpisodefileEditor({ body: episodeFileList });
|
|
8443
|
-
}
|
|
8444
|
-
async deleteEpisodeFilesBulk(episodeFileList) {
|
|
8445
|
-
return deleteApiV3EpisodefileBulk({ body: episodeFileList });
|
|
8446
|
-
}
|
|
8447
|
-
async updateEpisodeFilesBulk(episodeFiles) {
|
|
8448
|
-
return putApiV3EpisodefileBulk({ body: episodeFiles });
|
|
8449
|
-
}
|
|
8450
|
-
async getQualityProfiles() {
|
|
8451
|
-
return getApiV3Qualityprofile2();
|
|
8452
|
-
}
|
|
8453
|
-
async getQualityProfile(id) {
|
|
8454
|
-
return getApiV3QualityprofileById2({ path: { id } });
|
|
8455
|
-
}
|
|
8456
|
-
async addQualityProfile(profile) {
|
|
8457
|
-
return postApiV3Qualityprofile2({ body: profile });
|
|
8458
|
-
}
|
|
8459
|
-
async updateQualityProfile(id, profile) {
|
|
8460
|
-
return putApiV3QualityprofileById2({ path: { id }, body: profile });
|
|
8461
|
-
}
|
|
8462
|
-
async deleteQualityProfile(id) {
|
|
8463
|
-
return deleteApiV3QualityprofileById2({ path: { id } });
|
|
8464
|
-
}
|
|
8465
|
-
async getQualityProfileSchema() {
|
|
8466
|
-
return getApiV3QualityprofileSchema2();
|
|
8467
|
-
}
|
|
8468
|
-
async getCustomFormats() {
|
|
8469
|
-
return getApiV3Customformat2();
|
|
8470
|
-
}
|
|
8471
|
-
async getCustomFormat(id) {
|
|
8472
|
-
return getApiV3CustomformatById2({ path: { id } });
|
|
8473
|
-
}
|
|
8474
|
-
async addCustomFormat(format) {
|
|
8475
|
-
return postApiV3Customformat2({ body: format });
|
|
8476
|
-
}
|
|
8477
|
-
async updateCustomFormat(id, format) {
|
|
8478
|
-
return putApiV3CustomformatById2({ path: { id }, body: format });
|
|
8479
|
-
}
|
|
8480
|
-
async deleteCustomFormat(id) {
|
|
8481
|
-
return deleteApiV3CustomformatById2({ path: { id } });
|
|
8482
|
-
}
|
|
8483
|
-
async updateCustomFormatsBulk(formats) {
|
|
8484
|
-
return putApiV3CustomformatBulk2({ body: formats });
|
|
8485
|
-
}
|
|
8486
|
-
async deleteCustomFormatsBulk(ids) {
|
|
8487
|
-
return deleteApiV3CustomformatBulk2({ body: { ids } });
|
|
8488
|
-
}
|
|
8489
|
-
async getCustomFormatSchema() {
|
|
8490
|
-
return getApiV3CustomformatSchema2();
|
|
8491
|
-
}
|
|
8492
|
-
async getDownloadClients() {
|
|
8493
|
-
return getApiV3Downloadclient2();
|
|
8494
|
-
}
|
|
8495
|
-
async getDownloadClient(id) {
|
|
8496
|
-
return getApiV3DownloadclientById2({ path: { id } });
|
|
8497
|
-
}
|
|
8498
|
-
async addDownloadClient(client3) {
|
|
8499
|
-
return postApiV3Downloadclient2({ body: client3 });
|
|
8500
|
-
}
|
|
8501
|
-
async updateDownloadClient(id, client3) {
|
|
8502
|
-
return putApiV3DownloadclientById2({ path: { id }, body: client3 });
|
|
8503
|
-
}
|
|
8504
|
-
async deleteDownloadClient(id) {
|
|
8505
|
-
return deleteApiV3DownloadclientById2({ path: { id } });
|
|
8506
|
-
}
|
|
8507
|
-
async updateDownloadClientsBulk(clients) {
|
|
8508
|
-
return putApiV3DownloadclientBulk2({ body: clients });
|
|
8509
|
-
}
|
|
8510
|
-
async deleteDownloadClientsBulk(ids) {
|
|
8511
|
-
return deleteApiV3DownloadclientBulk2({ body: { ids } });
|
|
8512
|
-
}
|
|
8513
|
-
async getDownloadClientSchema() {
|
|
8514
|
-
return getApiV3DownloadclientSchema2();
|
|
8515
|
-
}
|
|
8516
|
-
async testDownloadClient(client3) {
|
|
8517
|
-
return postApiV3DownloadclientTest2({ body: client3 });
|
|
8518
|
-
}
|
|
8519
|
-
async testAllDownloadClients() {
|
|
8520
|
-
return postApiV3DownloadclientTestall2();
|
|
8521
|
-
}
|
|
8522
|
-
async getIndexers() {
|
|
8523
|
-
return getApiV3Indexer2();
|
|
8524
|
-
}
|
|
8525
|
-
async getIndexer(id) {
|
|
8526
|
-
return getApiV3IndexerById2({ path: { id } });
|
|
8527
|
-
}
|
|
8528
|
-
async addIndexer(indexer) {
|
|
8529
|
-
return postApiV3Indexer2({ body: indexer });
|
|
8530
|
-
}
|
|
8531
|
-
async updateIndexer(id, indexer) {
|
|
8532
|
-
return putApiV3IndexerById2({ path: { id }, body: indexer });
|
|
8533
|
-
}
|
|
8534
|
-
async deleteIndexer(id) {
|
|
8535
|
-
return deleteApiV3IndexerById2({ path: { id } });
|
|
8536
|
-
}
|
|
8537
|
-
async getIndexerSchema() {
|
|
8538
|
-
return getApiV3IndexerSchema2();
|
|
8539
|
-
}
|
|
8540
|
-
async testIndexer(indexer) {
|
|
8541
|
-
return postApiV3IndexerTest2({ body: indexer });
|
|
8542
|
-
}
|
|
8543
|
-
async testAllIndexers() {
|
|
8544
|
-
return postApiV3IndexerTestall2();
|
|
8545
|
-
}
|
|
8546
|
-
async getImportLists() {
|
|
8547
|
-
return getApiV3Importlist2();
|
|
8548
|
-
}
|
|
8549
|
-
async getImportList(id) {
|
|
8550
|
-
return getApiV3ImportlistById2({ path: { id } });
|
|
8551
|
-
}
|
|
8552
|
-
async addImportList(importList) {
|
|
8553
|
-
return postApiV3Importlist2({ body: importList });
|
|
8554
|
-
}
|
|
8555
|
-
async updateImportList(id, importList) {
|
|
8556
|
-
return putApiV3ImportlistById2({ path: { id }, body: importList });
|
|
8557
|
-
}
|
|
8558
|
-
async deleteImportList(id) {
|
|
8559
|
-
return deleteApiV3ImportlistById2({ path: { id } });
|
|
8560
|
-
}
|
|
8561
|
-
async getImportListSchema() {
|
|
8562
|
-
return getApiV3ImportlistSchema2();
|
|
8563
|
-
}
|
|
8564
|
-
async testImportList(importList) {
|
|
8565
|
-
return postApiV3ImportlistTest2({ body: importList });
|
|
8566
|
-
}
|
|
8567
|
-
async testAllImportLists() {
|
|
8568
|
-
return postApiV3ImportlistTestall2();
|
|
8569
|
-
}
|
|
8570
|
-
async getNotifications() {
|
|
8571
|
-
return getApiV3Notification2();
|
|
8572
|
-
}
|
|
8573
|
-
async getNotification(id) {
|
|
8574
|
-
return getApiV3NotificationById2({ path: { id } });
|
|
8575
|
-
}
|
|
8576
|
-
async addNotification(notification) {
|
|
8577
|
-
return postApiV3Notification2({ body: notification });
|
|
8578
|
-
}
|
|
8579
|
-
async updateNotification(id, notification) {
|
|
8580
|
-
return putApiV3NotificationById2({ path: { id }, body: notification });
|
|
8581
|
-
}
|
|
8582
|
-
async deleteNotification(id) {
|
|
8583
|
-
return deleteApiV3NotificationById2({ path: { id } });
|
|
8584
|
-
}
|
|
8585
|
-
async getNotificationSchema() {
|
|
8586
|
-
return getApiV3NotificationSchema2();
|
|
8587
|
-
}
|
|
8588
|
-
async testNotification(notification) {
|
|
8589
|
-
return postApiV3NotificationTest2({ body: notification });
|
|
8590
|
-
}
|
|
8591
|
-
async testAllNotifications() {
|
|
8592
|
-
return postApiV3NotificationTestall2();
|
|
8593
|
-
}
|
|
8594
|
-
async runCommand(command) {
|
|
8595
|
-
return postApiV3Command2({ body: command });
|
|
8596
|
-
}
|
|
8597
|
-
async getCommands() {
|
|
8598
|
-
return getApiV3Command2();
|
|
8599
|
-
}
|
|
8600
|
-
async getCommand(id) {
|
|
8601
|
-
return getApiV3CommandById2({ path: { id } });
|
|
8602
|
-
}
|
|
8603
|
-
async getHistory(page, pageSize, sortKey, sortDirection, seriesId, downloadId) {
|
|
8604
|
-
const query = {};
|
|
8605
|
-
if (page !== undefined)
|
|
8606
|
-
query.page = page;
|
|
8607
|
-
if (pageSize !== undefined)
|
|
8608
|
-
query.pageSize = pageSize;
|
|
8609
|
-
if (sortKey)
|
|
8610
|
-
query.sortKey = sortKey;
|
|
8611
|
-
if (sortDirection)
|
|
8612
|
-
query.sortDirection = sortDirection;
|
|
8613
|
-
if (seriesId !== undefined)
|
|
8614
|
-
query.seriesIds = [seriesId];
|
|
8615
|
-
if (downloadId)
|
|
8616
|
-
query.downloadId = downloadId;
|
|
8617
|
-
return getApiV3History2(Object.keys(query).length > 0 ? { query } : {});
|
|
8618
|
-
}
|
|
8619
|
-
async getHistorySince(date, seriesId) {
|
|
8620
|
-
const query = { date };
|
|
8621
|
-
if (seriesId !== undefined)
|
|
8622
|
-
query.seriesId = seriesId;
|
|
8623
|
-
return getApiV3HistorySince2({ query });
|
|
8624
|
-
}
|
|
8625
|
-
async getSeriesHistory(seriesId, seasonNumber, eventType) {
|
|
8626
|
-
const query = { seriesId };
|
|
8627
|
-
if (seasonNumber !== undefined)
|
|
8628
|
-
query.seasonNumber = seasonNumber;
|
|
8629
|
-
if (eventType !== undefined)
|
|
8630
|
-
query.eventType = eventType;
|
|
8631
|
-
return getApiV3HistorySeries({ query });
|
|
8632
|
-
}
|
|
8633
|
-
async markHistoryItemFailed(id) {
|
|
8634
|
-
return postApiV3HistoryFailedById2({ path: { id } });
|
|
8635
|
-
}
|
|
8636
|
-
async getCalendar(startDate, endDate, unmonitored) {
|
|
8637
|
-
const query = {};
|
|
8638
|
-
if (startDate)
|
|
8639
|
-
query.start = startDate;
|
|
8640
|
-
if (endDate)
|
|
8641
|
-
query.end = endDate;
|
|
8642
|
-
if (unmonitored !== undefined)
|
|
8643
|
-
query.unmonitored = unmonitored;
|
|
8644
|
-
query.includeSeries = true;
|
|
8645
|
-
return getApiV3Calendar2(Object.keys(query).length > 0 ? { query } : {});
|
|
8646
|
-
}
|
|
8647
|
-
async getCalendarFeed(pastDays, futureDays, tags) {
|
|
8648
|
-
const query = {};
|
|
8649
|
-
if (pastDays !== undefined)
|
|
8650
|
-
query.pastDays = pastDays;
|
|
8651
|
-
if (futureDays !== undefined)
|
|
8652
|
-
query.futureDays = futureDays;
|
|
8653
|
-
if (tags)
|
|
8654
|
-
query.tags = tags;
|
|
8655
|
-
return getFeedV3CalendarSonarrIcs(Object.keys(query).length > 0 ? { query } : {});
|
|
8656
|
-
}
|
|
8657
|
-
async getQueue(page, pageSize, sortKey, sortDirection, includeUnknownSeriesItems, seriesId) {
|
|
8658
|
-
const query = {};
|
|
8659
|
-
if (page !== undefined)
|
|
8660
|
-
query.page = page;
|
|
8661
|
-
if (pageSize !== undefined)
|
|
8662
|
-
query.pageSize = pageSize;
|
|
8663
|
-
if (sortKey)
|
|
8664
|
-
query.sortKey = sortKey;
|
|
8665
|
-
if (sortDirection)
|
|
8666
|
-
query.sortDirection = sortDirection;
|
|
8667
|
-
if (includeUnknownSeriesItems !== undefined)
|
|
8668
|
-
query.includeUnknownSeriesItems = includeUnknownSeriesItems;
|
|
8669
|
-
if (seriesId !== undefined)
|
|
8670
|
-
query.seriesIds = [seriesId];
|
|
8671
|
-
return getApiV3Queue2(Object.keys(query).length > 0 ? { query } : {});
|
|
8672
|
-
}
|
|
8673
|
-
async removeQueueItem(id, removeFromClient, blocklist) {
|
|
8674
|
-
const query = {};
|
|
8675
|
-
if (removeFromClient !== undefined)
|
|
8676
|
-
query.removeFromClient = removeFromClient;
|
|
8677
|
-
if (blocklist !== undefined)
|
|
8678
|
-
query.blocklist = blocklist;
|
|
8679
|
-
return deleteApiV3QueueById2({
|
|
8680
|
-
path: { id },
|
|
8681
|
-
...Object.keys(query).length > 0 ? { query } : {}
|
|
8682
|
-
});
|
|
8683
|
-
}
|
|
8684
|
-
async removeQueueItemsBulk(ids, removeFromClient, blocklist) {
|
|
8685
|
-
const query = {};
|
|
8686
|
-
if (removeFromClient !== undefined)
|
|
8687
|
-
query.removeFromClient = removeFromClient;
|
|
8688
|
-
if (blocklist !== undefined)
|
|
8689
|
-
query.blocklist = blocklist;
|
|
8690
|
-
return deleteApiV3QueueBulk2({
|
|
8691
|
-
body: { ids },
|
|
8692
|
-
...Object.keys(query).length > 0 ? { query } : {}
|
|
8693
|
-
});
|
|
8694
|
-
}
|
|
8695
|
-
async grabQueueItem(id) {
|
|
8696
|
-
return postApiV3QueueGrabById2({ path: { id } });
|
|
8697
|
-
}
|
|
8698
|
-
async grabQueueItemsBulk(ids) {
|
|
8699
|
-
return postApiV3QueueGrabBulk2({ body: { ids } });
|
|
8700
|
-
}
|
|
8701
|
-
async getQueueDetails(seriesId, includeUnknownSeriesItems) {
|
|
8702
|
-
const query = {};
|
|
8703
|
-
if (seriesId !== undefined)
|
|
8704
|
-
query.seriesId = seriesId;
|
|
8705
|
-
if (includeUnknownSeriesItems !== undefined)
|
|
8706
|
-
query.includeUnknownSeriesItems = includeUnknownSeriesItems;
|
|
8707
|
-
return getApiV3QueueDetails2(Object.keys(query).length > 0 ? { query } : {});
|
|
8708
|
-
}
|
|
8709
|
-
async getQueueStatus() {
|
|
8710
|
-
return getApiV3QueueStatus2();
|
|
8711
|
-
}
|
|
8712
|
-
async getBlocklist(page, pageSize, sortKey, sortDirection) {
|
|
8713
|
-
const query = {};
|
|
8714
|
-
if (page !== undefined)
|
|
8715
|
-
query.page = page;
|
|
8716
|
-
if (pageSize !== undefined)
|
|
8717
|
-
query.pageSize = pageSize;
|
|
8718
|
-
if (sortKey)
|
|
8719
|
-
query.sortKey = sortKey;
|
|
8720
|
-
if (sortDirection)
|
|
8721
|
-
query.sortDirection = sortDirection;
|
|
8722
|
-
return getApiV3Blocklist2(Object.keys(query).length > 0 ? { query } : {});
|
|
8723
|
-
}
|
|
8724
|
-
async removeBlocklistItem(id) {
|
|
8725
|
-
return deleteApiV3BlocklistById2({ path: { id } });
|
|
8726
|
-
}
|
|
8727
|
-
async removeBlocklistItemsBulk(ids) {
|
|
8728
|
-
return deleteApiV3BlocklistBulk2({ body: { ids } });
|
|
8729
|
-
}
|
|
8730
|
-
async getWantedMissing(page, pageSize, sortKey, sortDirection) {
|
|
8731
|
-
const query = {};
|
|
8732
|
-
if (page !== undefined)
|
|
8733
|
-
query.page = page;
|
|
8734
|
-
if (pageSize !== undefined)
|
|
8735
|
-
query.pageSize = pageSize;
|
|
8736
|
-
if (sortKey)
|
|
8737
|
-
query.sortKey = sortKey;
|
|
8738
|
-
if (sortDirection)
|
|
8739
|
-
query.sortDirection = sortDirection;
|
|
8740
|
-
return getApiV3WantedMissing2(Object.keys(query).length > 0 ? { query } : {});
|
|
8741
|
-
}
|
|
8742
|
-
async getWantedCutoff(page, pageSize, sortKey, sortDirection) {
|
|
8743
|
-
const query = {};
|
|
8744
|
-
if (page !== undefined)
|
|
8745
|
-
query.page = page;
|
|
8746
|
-
if (pageSize !== undefined)
|
|
8747
|
-
query.pageSize = pageSize;
|
|
8748
|
-
if (sortKey)
|
|
8749
|
-
query.sortKey = sortKey;
|
|
8750
|
-
if (sortDirection)
|
|
8751
|
-
query.sortDirection = sortDirection;
|
|
8752
|
-
return getApiV3WantedCutoff2(Object.keys(query).length > 0 ? { query } : {});
|
|
8753
|
-
}
|
|
8754
|
-
async parseEpisodeInfo(title) {
|
|
8755
|
-
return getApiV3Parse2({ query: { title } });
|
|
8756
|
-
}
|
|
8757
|
-
async getManualImport(folder, downloadId, seriesId, filterExistingFiles) {
|
|
8758
|
-
const query = {};
|
|
8759
|
-
if (folder)
|
|
8760
|
-
query.folder = folder;
|
|
8761
|
-
if (downloadId)
|
|
8762
|
-
query.downloadId = downloadId;
|
|
8763
|
-
if (seriesId !== undefined)
|
|
8764
|
-
query.seriesId = seriesId;
|
|
8765
|
-
if (filterExistingFiles !== undefined)
|
|
8766
|
-
query.filterExistingFiles = filterExistingFiles;
|
|
8767
|
-
return getApiV3Manualimport2(Object.keys(query).length > 0 ? { query } : {});
|
|
8768
|
-
}
|
|
8769
|
-
async processManualImport(files) {
|
|
8770
|
-
return postApiV3Manualimport2({ body: files });
|
|
8771
|
-
}
|
|
8772
|
-
updateConfig(newConfig) {
|
|
8773
|
-
const updatedConfig = { ...this.clientConfig.config, ...newConfig };
|
|
8774
|
-
this.clientConfig = createServarrClient(updatedConfig);
|
|
8775
|
-
client2.setConfig({
|
|
8776
|
-
baseUrl: this.clientConfig.getBaseUrl(),
|
|
8777
|
-
headers: this.clientConfig.getHeaders()
|
|
8778
|
-
});
|
|
8779
|
-
return this.clientConfig.config;
|
|
8780
|
-
}
|
|
8781
|
-
}
|
|
8423
|
+
var SonarrClient;
|
|
8782
8424
|
var init_sonarr2 = __esm(() => {
|
|
8783
|
-
|
|
8425
|
+
init_base();
|
|
8784
8426
|
init_client_gen4();
|
|
8785
8427
|
init_sonarr();
|
|
8428
|
+
SonarrClient = class SonarrClient extends ServarrBaseClient {
|
|
8429
|
+
ops = {
|
|
8430
|
+
getSystemStatus: () => Promise.resolve(),
|
|
8431
|
+
getHealth: () => Promise.resolve(),
|
|
8432
|
+
getTags: getApiV3Tag2,
|
|
8433
|
+
createTag: postApiV3Tag2,
|
|
8434
|
+
getTagById: getApiV3TagById2,
|
|
8435
|
+
updateTagById: putApiV3TagById2,
|
|
8436
|
+
deleteTagById: deleteApiV3TagById2,
|
|
8437
|
+
getTagDetails: getApiV3TagDetail2,
|
|
8438
|
+
getTagDetailById: getApiV3TagDetailById2,
|
|
8439
|
+
getNotifications: getApiV3Notification2,
|
|
8440
|
+
createNotification: postApiV3Notification2,
|
|
8441
|
+
getNotificationById: getApiV3NotificationById2,
|
|
8442
|
+
updateNotificationById: putApiV3NotificationById2,
|
|
8443
|
+
deleteNotificationById: deleteApiV3NotificationById2,
|
|
8444
|
+
getNotificationSchema: getApiV3NotificationSchema2,
|
|
8445
|
+
testNotification: postApiV3NotificationTest2,
|
|
8446
|
+
testAllNotifications: postApiV3NotificationTestall2,
|
|
8447
|
+
getDownloadClients: getApiV3Downloadclient2,
|
|
8448
|
+
createDownloadClient: postApiV3Downloadclient2,
|
|
8449
|
+
getDownloadClientById: getApiV3DownloadclientById2,
|
|
8450
|
+
updateDownloadClientById: putApiV3DownloadclientById2,
|
|
8451
|
+
deleteDownloadClientById: deleteApiV3DownloadclientById2,
|
|
8452
|
+
getDownloadClientSchema: getApiV3DownloadclientSchema2,
|
|
8453
|
+
testDownloadClient: postApiV3DownloadclientTest2,
|
|
8454
|
+
testAllDownloadClients: postApiV3DownloadclientTestall2,
|
|
8455
|
+
getIndexers: getApiV3Indexer2,
|
|
8456
|
+
createIndexer: postApiV3Indexer2,
|
|
8457
|
+
getIndexerById: getApiV3IndexerById2,
|
|
8458
|
+
updateIndexerById: putApiV3IndexerById2,
|
|
8459
|
+
deleteIndexerById: deleteApiV3IndexerById2,
|
|
8460
|
+
getIndexerSchema: getApiV3IndexerSchema2,
|
|
8461
|
+
testIndexer: postApiV3IndexerTest2,
|
|
8462
|
+
testAllIndexers: postApiV3IndexerTestall2,
|
|
8463
|
+
restartSystem: postApiV3SystemRestart2,
|
|
8464
|
+
shutdownSystem: postApiV3SystemShutdown2,
|
|
8465
|
+
getBackups: getApiV3SystemBackup2,
|
|
8466
|
+
deleteBackup: deleteApiV3SystemBackupById2,
|
|
8467
|
+
restoreBackup: postApiV3SystemBackupRestoreById2,
|
|
8468
|
+
uploadBackup: postApiV3SystemBackupRestoreUpload2,
|
|
8469
|
+
getLogFiles: getApiV3LogFile2,
|
|
8470
|
+
getLogFileByName: getApiV3LogFileByFilename2,
|
|
8471
|
+
runCommand: postApiV3Command2,
|
|
8472
|
+
getCommands: getApiV3Command2,
|
|
8473
|
+
getHostConfig: getApiV3ConfigHost2,
|
|
8474
|
+
getHostConfigById: getApiV3ConfigHostById2,
|
|
8475
|
+
updateHostConfig: putApiV3ConfigHostById2,
|
|
8476
|
+
getUiConfig: getApiV3ConfigUi2,
|
|
8477
|
+
getUiConfigById: getApiV3ConfigUiById2,
|
|
8478
|
+
updateUiConfig: putApiV3ConfigUiById2
|
|
8479
|
+
};
|
|
8480
|
+
constructor(config) {
|
|
8481
|
+
super(config, client2);
|
|
8482
|
+
}
|
|
8483
|
+
async getSystemStatus() {
|
|
8484
|
+
return client2.get({
|
|
8485
|
+
url: "/api/v3/system/status",
|
|
8486
|
+
headers: this.clientConfig.getHeaders(),
|
|
8487
|
+
baseUrl: this.clientConfig.getBaseUrl()
|
|
8488
|
+
});
|
|
8489
|
+
}
|
|
8490
|
+
async getHealth() {
|
|
8491
|
+
return client2.get({
|
|
8492
|
+
url: "/api/v3/health",
|
|
8493
|
+
headers: this.clientConfig.getHeaders(),
|
|
8494
|
+
baseUrl: this.clientConfig.getBaseUrl()
|
|
8495
|
+
});
|
|
8496
|
+
}
|
|
8497
|
+
async getApi() {
|
|
8498
|
+
return getApi2();
|
|
8499
|
+
}
|
|
8500
|
+
async getSeries() {
|
|
8501
|
+
return getApiV3Series();
|
|
8502
|
+
}
|
|
8503
|
+
async getSeriesById(id) {
|
|
8504
|
+
return getApiV3SeriesById({ path: { id } });
|
|
8505
|
+
}
|
|
8506
|
+
async addSeries(series) {
|
|
8507
|
+
return postApiV3Series({ body: series });
|
|
8508
|
+
}
|
|
8509
|
+
async updateSeries(id, series) {
|
|
8510
|
+
return putApiV3SeriesById({ path: { id }, body: series });
|
|
8511
|
+
}
|
|
8512
|
+
async deleteSeries(id, options) {
|
|
8513
|
+
return deleteApiV3SeriesById({
|
|
8514
|
+
path: { id },
|
|
8515
|
+
...options ? { query: options } : {}
|
|
8516
|
+
});
|
|
8517
|
+
}
|
|
8518
|
+
async getSeriesFolder(id) {
|
|
8519
|
+
return getApiV3SeriesByIdFolder({ path: { id } });
|
|
8520
|
+
}
|
|
8521
|
+
async searchSeries(term) {
|
|
8522
|
+
return getApiV3SeriesLookup({ query: { term } });
|
|
8523
|
+
}
|
|
8524
|
+
async getRootFolders() {
|
|
8525
|
+
return getApiV3Rootfolder2();
|
|
8526
|
+
}
|
|
8527
|
+
async addRootFolder(path) {
|
|
8528
|
+
return postApiV3Rootfolder2({
|
|
8529
|
+
body: { path }
|
|
8530
|
+
});
|
|
8531
|
+
}
|
|
8532
|
+
async deleteRootFolder(id) {
|
|
8533
|
+
return deleteApiV3RootfolderById2({ path: { id } });
|
|
8534
|
+
}
|
|
8535
|
+
async getLogs(page, pageSize, sortKey, sortDirection, level) {
|
|
8536
|
+
const query = {};
|
|
8537
|
+
if (page !== undefined)
|
|
8538
|
+
query.page = page;
|
|
8539
|
+
if (pageSize !== undefined)
|
|
8540
|
+
query.pageSize = pageSize;
|
|
8541
|
+
if (sortKey)
|
|
8542
|
+
query.sortKey = sortKey;
|
|
8543
|
+
if (sortDirection)
|
|
8544
|
+
query.sortDirection = sortDirection;
|
|
8545
|
+
if (level)
|
|
8546
|
+
query.level = level;
|
|
8547
|
+
return getApiV3Log2(Object.keys(query).length > 0 ? { query } : {});
|
|
8548
|
+
}
|
|
8549
|
+
async getUpdates() {
|
|
8550
|
+
return getApiV3Update2();
|
|
8551
|
+
}
|
|
8552
|
+
async getUpdateSettings() {
|
|
8553
|
+
return getApiV3Update2();
|
|
8554
|
+
}
|
|
8555
|
+
async getUpdateSetting() {
|
|
8556
|
+
return getApiV3Update2();
|
|
8557
|
+
}
|
|
8558
|
+
async getNamingConfig() {
|
|
8559
|
+
return getApiV3ConfigNaming2();
|
|
8560
|
+
}
|
|
8561
|
+
async getNamingConfigById(id) {
|
|
8562
|
+
return getApiV3ConfigNamingById2({ path: { id } });
|
|
8563
|
+
}
|
|
8564
|
+
async updateNamingConfig(id, config) {
|
|
8565
|
+
return putApiV3ConfigNamingById2({ path: { id }, body: config });
|
|
8566
|
+
}
|
|
8567
|
+
async getNamingConfigExamples() {
|
|
8568
|
+
return getApiV3ConfigNamingExamples2();
|
|
8569
|
+
}
|
|
8570
|
+
async getMediaManagementConfig() {
|
|
8571
|
+
return getApiV3ConfigMediamanagement2();
|
|
8572
|
+
}
|
|
8573
|
+
async getMediaManagementConfigById(id) {
|
|
8574
|
+
return getApiV3ConfigMediamanagementById2({ path: { id } });
|
|
8575
|
+
}
|
|
8576
|
+
async updateMediaManagementConfig(id, config) {
|
|
8577
|
+
return putApiV3ConfigMediamanagementById2({ path: { id }, body: config });
|
|
8578
|
+
}
|
|
8579
|
+
async getDiskSpace() {
|
|
8580
|
+
return getApiV3Diskspace2();
|
|
8581
|
+
}
|
|
8582
|
+
async getEpisodes(seriesId, episodeIds) {
|
|
8583
|
+
const query = {};
|
|
8584
|
+
if (seriesId !== undefined)
|
|
8585
|
+
query.seriesId = seriesId;
|
|
8586
|
+
if (episodeIds !== undefined)
|
|
8587
|
+
query.episodeIds = episodeIds;
|
|
8588
|
+
return getApiV3Episode(Object.keys(query).length > 0 ? { query } : {});
|
|
8589
|
+
}
|
|
8590
|
+
async getEpisode(id) {
|
|
8591
|
+
return getApiV3EpisodeById({ path: { id } });
|
|
8592
|
+
}
|
|
8593
|
+
async updateEpisode(id, episode) {
|
|
8594
|
+
return putApiV3EpisodeById({ path: { id }, body: episode });
|
|
8595
|
+
}
|
|
8596
|
+
async getEpisodeFiles(seriesId, episodeFileIds) {
|
|
8597
|
+
const query = {};
|
|
8598
|
+
if (seriesId !== undefined)
|
|
8599
|
+
query.seriesId = seriesId;
|
|
8600
|
+
if (episodeFileIds !== undefined)
|
|
8601
|
+
query.episodeFileIds = episodeFileIds;
|
|
8602
|
+
return getApiV3Episodefile(Object.keys(query).length > 0 ? { query } : {});
|
|
8603
|
+
}
|
|
8604
|
+
async getEpisodeFile(id) {
|
|
8605
|
+
return getApiV3EpisodefileById({ path: { id } });
|
|
8606
|
+
}
|
|
8607
|
+
async updateEpisodeFile(id, episodeFile) {
|
|
8608
|
+
return putApiV3EpisodefileById({ path: { id }, body: episodeFile });
|
|
8609
|
+
}
|
|
8610
|
+
async deleteEpisodeFile(id) {
|
|
8611
|
+
return deleteApiV3EpisodefileById({ path: { id } });
|
|
8612
|
+
}
|
|
8613
|
+
async updateEpisodeFilesEditor(episodeFileList) {
|
|
8614
|
+
return putApiV3EpisodefileEditor({ body: episodeFileList });
|
|
8615
|
+
}
|
|
8616
|
+
async deleteEpisodeFilesBulk(episodeFileList) {
|
|
8617
|
+
return deleteApiV3EpisodefileBulk({ body: episodeFileList });
|
|
8618
|
+
}
|
|
8619
|
+
async updateEpisodeFilesBulk(episodeFiles) {
|
|
8620
|
+
return putApiV3EpisodefileBulk({ body: episodeFiles });
|
|
8621
|
+
}
|
|
8622
|
+
async getQualityProfiles() {
|
|
8623
|
+
return getApiV3Qualityprofile2();
|
|
8624
|
+
}
|
|
8625
|
+
async getQualityProfile(id) {
|
|
8626
|
+
return getApiV3QualityprofileById2({ path: { id } });
|
|
8627
|
+
}
|
|
8628
|
+
async addQualityProfile(profile) {
|
|
8629
|
+
return postApiV3Qualityprofile2({ body: profile });
|
|
8630
|
+
}
|
|
8631
|
+
async updateQualityProfile(id, profile) {
|
|
8632
|
+
return putApiV3QualityprofileById2({ path: { id }, body: profile });
|
|
8633
|
+
}
|
|
8634
|
+
async deleteQualityProfile(id) {
|
|
8635
|
+
return deleteApiV3QualityprofileById2({ path: { id } });
|
|
8636
|
+
}
|
|
8637
|
+
async getQualityProfileSchema() {
|
|
8638
|
+
return getApiV3QualityprofileSchema2();
|
|
8639
|
+
}
|
|
8640
|
+
async getCustomFormats() {
|
|
8641
|
+
return getApiV3Customformat2();
|
|
8642
|
+
}
|
|
8643
|
+
async getCustomFormat(id) {
|
|
8644
|
+
return getApiV3CustomformatById2({ path: { id } });
|
|
8645
|
+
}
|
|
8646
|
+
async addCustomFormat(format) {
|
|
8647
|
+
return postApiV3Customformat2({ body: format });
|
|
8648
|
+
}
|
|
8649
|
+
async updateCustomFormat(id, format) {
|
|
8650
|
+
return putApiV3CustomformatById2({ path: { id }, body: format });
|
|
8651
|
+
}
|
|
8652
|
+
async deleteCustomFormat(id) {
|
|
8653
|
+
return deleteApiV3CustomformatById2({ path: { id } });
|
|
8654
|
+
}
|
|
8655
|
+
async updateCustomFormatsBulk(formats) {
|
|
8656
|
+
return putApiV3CustomformatBulk2({ body: formats });
|
|
8657
|
+
}
|
|
8658
|
+
async deleteCustomFormatsBulk(ids) {
|
|
8659
|
+
return deleteApiV3CustomformatBulk2({ body: { ids } });
|
|
8660
|
+
}
|
|
8661
|
+
async getCustomFormatSchema() {
|
|
8662
|
+
return getApiV3CustomformatSchema2();
|
|
8663
|
+
}
|
|
8664
|
+
async updateDownloadClientsBulk(clients) {
|
|
8665
|
+
return putApiV3DownloadclientBulk2({ body: clients });
|
|
8666
|
+
}
|
|
8667
|
+
async deleteDownloadClientsBulk(ids) {
|
|
8668
|
+
return deleteApiV3DownloadclientBulk2({ body: { ids } });
|
|
8669
|
+
}
|
|
8670
|
+
async getImportLists() {
|
|
8671
|
+
return getApiV3Importlist2();
|
|
8672
|
+
}
|
|
8673
|
+
async getImportList(id) {
|
|
8674
|
+
return getApiV3ImportlistById2({ path: { id } });
|
|
8675
|
+
}
|
|
8676
|
+
async addImportList(importList) {
|
|
8677
|
+
return postApiV3Importlist2({ body: importList });
|
|
8678
|
+
}
|
|
8679
|
+
async updateImportList(id, importList) {
|
|
8680
|
+
return putApiV3ImportlistById2({ path: { id }, body: importList });
|
|
8681
|
+
}
|
|
8682
|
+
async deleteImportList(id) {
|
|
8683
|
+
return deleteApiV3ImportlistById2({ path: { id } });
|
|
8684
|
+
}
|
|
8685
|
+
async getImportListSchema() {
|
|
8686
|
+
return getApiV3ImportlistSchema2();
|
|
8687
|
+
}
|
|
8688
|
+
async testImportList(importList) {
|
|
8689
|
+
return postApiV3ImportlistTest2({ body: importList });
|
|
8690
|
+
}
|
|
8691
|
+
async testAllImportLists() {
|
|
8692
|
+
return postApiV3ImportlistTestall2();
|
|
8693
|
+
}
|
|
8694
|
+
async getHistory(page, pageSize, sortKey, sortDirection, seriesId, downloadId) {
|
|
8695
|
+
const query = {};
|
|
8696
|
+
if (page !== undefined)
|
|
8697
|
+
query.page = page;
|
|
8698
|
+
if (pageSize !== undefined)
|
|
8699
|
+
query.pageSize = pageSize;
|
|
8700
|
+
if (sortKey)
|
|
8701
|
+
query.sortKey = sortKey;
|
|
8702
|
+
if (sortDirection)
|
|
8703
|
+
query.sortDirection = sortDirection;
|
|
8704
|
+
if (seriesId !== undefined)
|
|
8705
|
+
query.seriesIds = [seriesId];
|
|
8706
|
+
if (downloadId)
|
|
8707
|
+
query.downloadId = downloadId;
|
|
8708
|
+
return getApiV3History2(Object.keys(query).length > 0 ? { query } : {});
|
|
8709
|
+
}
|
|
8710
|
+
async getHistorySince(date, seriesId) {
|
|
8711
|
+
const query = { date };
|
|
8712
|
+
if (seriesId !== undefined)
|
|
8713
|
+
query.seriesId = seriesId;
|
|
8714
|
+
return getApiV3HistorySince2({ query });
|
|
8715
|
+
}
|
|
8716
|
+
async getSeriesHistory(seriesId, seasonNumber, eventType) {
|
|
8717
|
+
const query = { seriesId };
|
|
8718
|
+
if (seasonNumber !== undefined)
|
|
8719
|
+
query.seasonNumber = seasonNumber;
|
|
8720
|
+
if (eventType !== undefined)
|
|
8721
|
+
query.eventType = eventType;
|
|
8722
|
+
return getApiV3HistorySeries({ query });
|
|
8723
|
+
}
|
|
8724
|
+
async markHistoryItemFailed(id) {
|
|
8725
|
+
return postApiV3HistoryFailedById2({ path: { id } });
|
|
8726
|
+
}
|
|
8727
|
+
async getCalendar(startDate, endDate, unmonitored) {
|
|
8728
|
+
const query = {};
|
|
8729
|
+
if (startDate)
|
|
8730
|
+
query.start = startDate;
|
|
8731
|
+
if (endDate)
|
|
8732
|
+
query.end = endDate;
|
|
8733
|
+
if (unmonitored !== undefined)
|
|
8734
|
+
query.unmonitored = unmonitored;
|
|
8735
|
+
query.includeSeries = true;
|
|
8736
|
+
return getApiV3Calendar2(Object.keys(query).length > 0 ? { query } : {});
|
|
8737
|
+
}
|
|
8738
|
+
async getCalendarFeed(pastDays, futureDays, tags) {
|
|
8739
|
+
const query = {};
|
|
8740
|
+
if (pastDays !== undefined)
|
|
8741
|
+
query.pastDays = pastDays;
|
|
8742
|
+
if (futureDays !== undefined)
|
|
8743
|
+
query.futureDays = futureDays;
|
|
8744
|
+
if (tags)
|
|
8745
|
+
query.tags = tags;
|
|
8746
|
+
return getFeedV3CalendarSonarrIcs(Object.keys(query).length > 0 ? { query } : {});
|
|
8747
|
+
}
|
|
8748
|
+
async getQueue(page, pageSize, sortKey, sortDirection, includeUnknownSeriesItems, seriesId) {
|
|
8749
|
+
const query = {};
|
|
8750
|
+
if (page !== undefined)
|
|
8751
|
+
query.page = page;
|
|
8752
|
+
if (pageSize !== undefined)
|
|
8753
|
+
query.pageSize = pageSize;
|
|
8754
|
+
if (sortKey)
|
|
8755
|
+
query.sortKey = sortKey;
|
|
8756
|
+
if (sortDirection)
|
|
8757
|
+
query.sortDirection = sortDirection;
|
|
8758
|
+
if (includeUnknownSeriesItems !== undefined)
|
|
8759
|
+
query.includeUnknownSeriesItems = includeUnknownSeriesItems;
|
|
8760
|
+
if (seriesId !== undefined)
|
|
8761
|
+
query.seriesIds = [seriesId];
|
|
8762
|
+
return getApiV3Queue2(Object.keys(query).length > 0 ? { query } : {});
|
|
8763
|
+
}
|
|
8764
|
+
async removeQueueItem(id, removeFromClient, blocklist) {
|
|
8765
|
+
const query = {};
|
|
8766
|
+
if (removeFromClient !== undefined)
|
|
8767
|
+
query.removeFromClient = removeFromClient;
|
|
8768
|
+
if (blocklist !== undefined)
|
|
8769
|
+
query.blocklist = blocklist;
|
|
8770
|
+
return deleteApiV3QueueById2({
|
|
8771
|
+
path: { id },
|
|
8772
|
+
...Object.keys(query).length > 0 ? { query } : {}
|
|
8773
|
+
});
|
|
8774
|
+
}
|
|
8775
|
+
async removeQueueItemsBulk(ids, removeFromClient, blocklist) {
|
|
8776
|
+
const query = {};
|
|
8777
|
+
if (removeFromClient !== undefined)
|
|
8778
|
+
query.removeFromClient = removeFromClient;
|
|
8779
|
+
if (blocklist !== undefined)
|
|
8780
|
+
query.blocklist = blocklist;
|
|
8781
|
+
return deleteApiV3QueueBulk2({
|
|
8782
|
+
body: { ids },
|
|
8783
|
+
...Object.keys(query).length > 0 ? { query } : {}
|
|
8784
|
+
});
|
|
8785
|
+
}
|
|
8786
|
+
async grabQueueItem(id) {
|
|
8787
|
+
return postApiV3QueueGrabById2({ path: { id } });
|
|
8788
|
+
}
|
|
8789
|
+
async grabQueueItemsBulk(ids) {
|
|
8790
|
+
return postApiV3QueueGrabBulk2({ body: { ids } });
|
|
8791
|
+
}
|
|
8792
|
+
async getQueueDetails(seriesId, includeUnknownSeriesItems) {
|
|
8793
|
+
const query = {};
|
|
8794
|
+
if (seriesId !== undefined)
|
|
8795
|
+
query.seriesId = seriesId;
|
|
8796
|
+
if (includeUnknownSeriesItems !== undefined)
|
|
8797
|
+
query.includeUnknownSeriesItems = includeUnknownSeriesItems;
|
|
8798
|
+
return getApiV3QueueDetails2(Object.keys(query).length > 0 ? { query } : {});
|
|
8799
|
+
}
|
|
8800
|
+
async getQueueStatus() {
|
|
8801
|
+
return getApiV3QueueStatus2();
|
|
8802
|
+
}
|
|
8803
|
+
async getBlocklist(page, pageSize, sortKey, sortDirection) {
|
|
8804
|
+
const query = {};
|
|
8805
|
+
if (page !== undefined)
|
|
8806
|
+
query.page = page;
|
|
8807
|
+
if (pageSize !== undefined)
|
|
8808
|
+
query.pageSize = pageSize;
|
|
8809
|
+
if (sortKey)
|
|
8810
|
+
query.sortKey = sortKey;
|
|
8811
|
+
if (sortDirection)
|
|
8812
|
+
query.sortDirection = sortDirection;
|
|
8813
|
+
return getApiV3Blocklist2(Object.keys(query).length > 0 ? { query } : {});
|
|
8814
|
+
}
|
|
8815
|
+
async removeBlocklistItem(id) {
|
|
8816
|
+
return deleteApiV3BlocklistById2({ path: { id } });
|
|
8817
|
+
}
|
|
8818
|
+
async removeBlocklistItemsBulk(ids) {
|
|
8819
|
+
return deleteApiV3BlocklistBulk2({ body: { ids } });
|
|
8820
|
+
}
|
|
8821
|
+
async getWantedMissing(page, pageSize, sortKey, sortDirection) {
|
|
8822
|
+
const query = {};
|
|
8823
|
+
if (page !== undefined)
|
|
8824
|
+
query.page = page;
|
|
8825
|
+
if (pageSize !== undefined)
|
|
8826
|
+
query.pageSize = pageSize;
|
|
8827
|
+
if (sortKey)
|
|
8828
|
+
query.sortKey = sortKey;
|
|
8829
|
+
if (sortDirection)
|
|
8830
|
+
query.sortDirection = sortDirection;
|
|
8831
|
+
return getApiV3WantedMissing2(Object.keys(query).length > 0 ? { query } : {});
|
|
8832
|
+
}
|
|
8833
|
+
async getWantedCutoff(page, pageSize, sortKey, sortDirection) {
|
|
8834
|
+
const query = {};
|
|
8835
|
+
if (page !== undefined)
|
|
8836
|
+
query.page = page;
|
|
8837
|
+
if (pageSize !== undefined)
|
|
8838
|
+
query.pageSize = pageSize;
|
|
8839
|
+
if (sortKey)
|
|
8840
|
+
query.sortKey = sortKey;
|
|
8841
|
+
if (sortDirection)
|
|
8842
|
+
query.sortDirection = sortDirection;
|
|
8843
|
+
return getApiV3WantedCutoff2(Object.keys(query).length > 0 ? { query } : {});
|
|
8844
|
+
}
|
|
8845
|
+
async parseEpisodeInfo(title) {
|
|
8846
|
+
return getApiV3Parse2({ query: { title } });
|
|
8847
|
+
}
|
|
8848
|
+
async getManualImport(folder, downloadId, seriesId, filterExistingFiles) {
|
|
8849
|
+
const query = {};
|
|
8850
|
+
if (folder)
|
|
8851
|
+
query.folder = folder;
|
|
8852
|
+
if (downloadId)
|
|
8853
|
+
query.downloadId = downloadId;
|
|
8854
|
+
if (seriesId !== undefined)
|
|
8855
|
+
query.seriesId = seriesId;
|
|
8856
|
+
if (filterExistingFiles !== undefined)
|
|
8857
|
+
query.filterExistingFiles = filterExistingFiles;
|
|
8858
|
+
return getApiV3Manualimport2(Object.keys(query).length > 0 ? { query } : {});
|
|
8859
|
+
}
|
|
8860
|
+
async processManualImport(files) {
|
|
8861
|
+
return postApiV3Manualimport2({ body: files });
|
|
8862
|
+
}
|
|
8863
|
+
async getCommand(id) {
|
|
8864
|
+
return getApiV3CommandById2({ path: { id } });
|
|
8865
|
+
}
|
|
8866
|
+
};
|
|
8786
8867
|
});
|
|
8787
8868
|
|
|
8788
8869
|
// src/cli/commands/sonarr.ts
|
|
@@ -10582,30 +10663,6 @@ var getApiV1Album = (options) => (options?.client ?? client3).get({
|
|
|
10582
10663
|
"Content-Type": "application/json",
|
|
10583
10664
|
...options?.headers
|
|
10584
10665
|
}
|
|
10585
|
-
}), deleteApiV1DownloadclientBulk = (options) => (options?.client ?? client3).delete({
|
|
10586
|
-
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
10587
|
-
in: "query",
|
|
10588
|
-
name: "apikey",
|
|
10589
|
-
type: "apiKey"
|
|
10590
|
-
}],
|
|
10591
|
-
url: "/api/v1/downloadclient/bulk",
|
|
10592
|
-
...options,
|
|
10593
|
-
headers: {
|
|
10594
|
-
"Content-Type": "application/json",
|
|
10595
|
-
...options?.headers
|
|
10596
|
-
}
|
|
10597
|
-
}), putApiV1DownloadclientBulk = (options) => (options?.client ?? client3).put({
|
|
10598
|
-
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
10599
|
-
in: "query",
|
|
10600
|
-
name: "apikey",
|
|
10601
|
-
type: "apiKey"
|
|
10602
|
-
}],
|
|
10603
|
-
url: "/api/v1/downloadclient/bulk",
|
|
10604
|
-
...options,
|
|
10605
|
-
headers: {
|
|
10606
|
-
"Content-Type": "application/json",
|
|
10607
|
-
...options?.headers
|
|
10608
|
-
}
|
|
10609
10666
|
}), getApiV1DownloadclientSchema = (options) => (options?.client ?? client3).get({
|
|
10610
10667
|
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
10611
10668
|
in: "query",
|
|
@@ -11393,515 +11450,400 @@ var exports_lidarr = {};
|
|
|
11393
11450
|
__export(exports_lidarr, {
|
|
11394
11451
|
LidarrClient: () => LidarrClient
|
|
11395
11452
|
});
|
|
11396
|
-
|
|
11397
|
-
class LidarrClient {
|
|
11398
|
-
clientConfig;
|
|
11399
|
-
constructor(config) {
|
|
11400
|
-
this.clientConfig = createServarrClient(config);
|
|
11401
|
-
client3.setConfig({
|
|
11402
|
-
baseUrl: this.clientConfig.getBaseUrl(),
|
|
11403
|
-
headers: this.clientConfig.getHeaders()
|
|
11404
|
-
});
|
|
11405
|
-
}
|
|
11406
|
-
async getSystemStatus() {
|
|
11407
|
-
return getApiV1SystemStatus();
|
|
11408
|
-
}
|
|
11409
|
-
async getHealth() {
|
|
11410
|
-
return getApiV1Health();
|
|
11411
|
-
}
|
|
11412
|
-
async getArtists() {
|
|
11413
|
-
return getApiV1Artist();
|
|
11414
|
-
}
|
|
11415
|
-
async getArtist(id) {
|
|
11416
|
-
return getApiV1ArtistById({ path: { id } });
|
|
11417
|
-
}
|
|
11418
|
-
async addArtist(artist) {
|
|
11419
|
-
return postApiV1Artist({ body: artist });
|
|
11420
|
-
}
|
|
11421
|
-
async updateArtist(id, artist) {
|
|
11422
|
-
return putApiV1ArtistById({ path: { id: String(id) }, body: artist });
|
|
11423
|
-
}
|
|
11424
|
-
async deleteArtist(id) {
|
|
11425
|
-
return deleteApiV1ArtistById({ path: { id } });
|
|
11426
|
-
}
|
|
11427
|
-
async getAlbums() {
|
|
11428
|
-
return getApiV1Album();
|
|
11429
|
-
}
|
|
11430
|
-
async getAlbum(id) {
|
|
11431
|
-
return getApiV1AlbumById({ path: { id } });
|
|
11432
|
-
}
|
|
11433
|
-
async searchArtists(term) {
|
|
11434
|
-
return getApiV1ArtistLookup({ query: { term } });
|
|
11435
|
-
}
|
|
11436
|
-
async runCommand(command) {
|
|
11437
|
-
return postApiV1Command({ body: command });
|
|
11438
|
-
}
|
|
11439
|
-
async getCommands() {
|
|
11440
|
-
return getApiV1Command();
|
|
11441
|
-
}
|
|
11442
|
-
async getRootFolders() {
|
|
11443
|
-
return getApiV1Rootfolder();
|
|
11444
|
-
}
|
|
11445
|
-
async addRootFolder(path) {
|
|
11446
|
-
return postApiV1Rootfolder({
|
|
11447
|
-
body: { path }
|
|
11448
|
-
});
|
|
11449
|
-
}
|
|
11450
|
-
async deleteRootFolder(id) {
|
|
11451
|
-
return deleteApiV1RootfolderById({ path: { id } });
|
|
11452
|
-
}
|
|
11453
|
-
async addAlbum(album) {
|
|
11454
|
-
return postApiV1Album({ body: album });
|
|
11455
|
-
}
|
|
11456
|
-
async updateAlbum(id, album) {
|
|
11457
|
-
return putApiV1AlbumById({ path: { id: String(id) }, body: album });
|
|
11458
|
-
}
|
|
11459
|
-
async deleteAlbum(id) {
|
|
11460
|
-
return deleteApiV1AlbumById({ path: { id } });
|
|
11461
|
-
}
|
|
11462
|
-
async searchAlbums(term) {
|
|
11463
|
-
return getApiV1AlbumLookup({ query: { term } });
|
|
11464
|
-
}
|
|
11465
|
-
async getCalendar(start, end, unmonitored) {
|
|
11466
|
-
const query = {};
|
|
11467
|
-
if (start)
|
|
11468
|
-
query.start = start;
|
|
11469
|
-
if (end)
|
|
11470
|
-
query.end = end;
|
|
11471
|
-
if (unmonitored !== undefined)
|
|
11472
|
-
query.unmonitored = unmonitored;
|
|
11473
|
-
query.includeArtist = true;
|
|
11474
|
-
return getApiV1Calendar(Object.keys(query).length > 0 ? { query } : {});
|
|
11475
|
-
}
|
|
11476
|
-
async getCalendarFeed(pastDays, futureDays, tags) {
|
|
11477
|
-
const query = {};
|
|
11478
|
-
if (pastDays !== undefined)
|
|
11479
|
-
query.pastDays = pastDays;
|
|
11480
|
-
if (futureDays !== undefined)
|
|
11481
|
-
query.futureDays = futureDays;
|
|
11482
|
-
if (tags)
|
|
11483
|
-
query.tags = tags;
|
|
11484
|
-
return getFeedV1CalendarLidarrIcs(Object.keys(query).length > 0 ? { query } : {});
|
|
11485
|
-
}
|
|
11486
|
-
async getTrackFiles(artistId, trackFileIds, albumId, unmapped) {
|
|
11487
|
-
const query = {};
|
|
11488
|
-
if (artistId !== undefined)
|
|
11489
|
-
query.artistId = artistId;
|
|
11490
|
-
if (trackFileIds !== undefined)
|
|
11491
|
-
query.trackFileIds = trackFileIds;
|
|
11492
|
-
if (albumId !== undefined)
|
|
11493
|
-
query.albumId = albumId;
|
|
11494
|
-
if (unmapped !== undefined)
|
|
11495
|
-
query.unmapped = unmapped;
|
|
11496
|
-
return getApiV1Trackfile(Object.keys(query).length > 0 ? { query } : {});
|
|
11497
|
-
}
|
|
11498
|
-
async getTrackFile(id) {
|
|
11499
|
-
return getApiV1TrackfileById({ path: { id } });
|
|
11500
|
-
}
|
|
11501
|
-
async updateTrackFile(id, trackFile) {
|
|
11502
|
-
return putApiV1TrackfileById({ path: { id }, body: trackFile });
|
|
11503
|
-
}
|
|
11504
|
-
async deleteTrackFile(id) {
|
|
11505
|
-
return deleteApiV1TrackfileById({ path: { id } });
|
|
11506
|
-
}
|
|
11507
|
-
async updateTrackFilesEditor(trackFileList) {
|
|
11508
|
-
return putApiV1TrackfileEditor({ body: trackFileList });
|
|
11509
|
-
}
|
|
11510
|
-
async deleteTrackFilesBulk(trackFileList) {
|
|
11511
|
-
return deleteApiV1TrackfileBulk({ body: trackFileList });
|
|
11512
|
-
}
|
|
11513
|
-
async getQualityProfiles() {
|
|
11514
|
-
return getApiV1Qualityprofile();
|
|
11515
|
-
}
|
|
11516
|
-
async getQualityProfile(id) {
|
|
11517
|
-
return getApiV1QualityprofileById({ path: { id } });
|
|
11518
|
-
}
|
|
11519
|
-
async addQualityProfile(profile) {
|
|
11520
|
-
return postApiV1Qualityprofile({ body: profile });
|
|
11521
|
-
}
|
|
11522
|
-
async updateQualityProfile(id, profile) {
|
|
11523
|
-
return putApiV1QualityprofileById({ path: { id: String(id) }, body: profile });
|
|
11524
|
-
}
|
|
11525
|
-
async deleteQualityProfile(id) {
|
|
11526
|
-
return deleteApiV1QualityprofileById({ path: { id } });
|
|
11527
|
-
}
|
|
11528
|
-
async getQualityProfileSchema() {
|
|
11529
|
-
return getApiV1QualityprofileSchema();
|
|
11530
|
-
}
|
|
11531
|
-
async getCustomFormats() {
|
|
11532
|
-
return getApiV1Customformat();
|
|
11533
|
-
}
|
|
11534
|
-
async getCustomFormat(id) {
|
|
11535
|
-
return getApiV1CustomformatById({ path: { id } });
|
|
11536
|
-
}
|
|
11537
|
-
async addCustomFormat(format) {
|
|
11538
|
-
return postApiV1Customformat({ body: format });
|
|
11539
|
-
}
|
|
11540
|
-
async updateCustomFormat(id, format) {
|
|
11541
|
-
return putApiV1CustomformatById({ path: { id: String(id) }, body: format });
|
|
11542
|
-
}
|
|
11543
|
-
async deleteCustomFormat(id) {
|
|
11544
|
-
return deleteApiV1CustomformatById({ path: { id } });
|
|
11545
|
-
}
|
|
11546
|
-
async updateCustomFormatsBulk(formats) {
|
|
11547
|
-
return putApiV1CustomformatBulk({ body: formats });
|
|
11548
|
-
}
|
|
11549
|
-
async deleteCustomFormatsBulk(ids) {
|
|
11550
|
-
return deleteApiV1CustomformatBulk({ body: { ids } });
|
|
11551
|
-
}
|
|
11552
|
-
async getCustomFormatSchema() {
|
|
11553
|
-
return getApiV1CustomformatSchema();
|
|
11554
|
-
}
|
|
11555
|
-
async getHostConfig() {
|
|
11556
|
-
return getApiV1ConfigHost();
|
|
11557
|
-
}
|
|
11558
|
-
async getHostConfigById(id) {
|
|
11559
|
-
return getApiV1ConfigHostById({ path: { id } });
|
|
11560
|
-
}
|
|
11561
|
-
async updateHostConfig(id, config) {
|
|
11562
|
-
return putApiV1ConfigHostById({ path: { id: String(id) }, body: config });
|
|
11563
|
-
}
|
|
11564
|
-
async getNamingConfig() {
|
|
11565
|
-
return getApiV1ConfigNaming();
|
|
11566
|
-
}
|
|
11567
|
-
async getNamingConfigById(id) {
|
|
11568
|
-
return getApiV1ConfigNamingById({ path: { id } });
|
|
11569
|
-
}
|
|
11570
|
-
async updateNamingConfig(id, config) {
|
|
11571
|
-
return putApiV1ConfigNamingById({ path: { id: String(id) }, body: config });
|
|
11572
|
-
}
|
|
11573
|
-
async getNamingConfigExamples() {
|
|
11574
|
-
return getApiV1ConfigNamingExamples();
|
|
11575
|
-
}
|
|
11576
|
-
async getMediaManagementConfig() {
|
|
11577
|
-
return getApiV1ConfigMediamanagement();
|
|
11578
|
-
}
|
|
11579
|
-
async getMediaManagementConfigById(id) {
|
|
11580
|
-
return getApiV1ConfigMediamanagementById({ path: { id } });
|
|
11581
|
-
}
|
|
11582
|
-
async updateMediaManagementConfig(id, config) {
|
|
11583
|
-
return putApiV1ConfigMediamanagementById({ path: { id: String(id) }, body: config });
|
|
11584
|
-
}
|
|
11585
|
-
async getUiConfig() {
|
|
11586
|
-
return getApiV1ConfigUi();
|
|
11587
|
-
}
|
|
11588
|
-
async getUiConfigById(id) {
|
|
11589
|
-
return getApiV1ConfigUiById({ path: { id } });
|
|
11590
|
-
}
|
|
11591
|
-
async updateUiConfig(id, config) {
|
|
11592
|
-
return putApiV1ConfigUiById({ path: { id: String(id) }, body: config });
|
|
11593
|
-
}
|
|
11594
|
-
async getMetadataProviderConfig() {
|
|
11595
|
-
return getApiV1ConfigMetadataprovider();
|
|
11596
|
-
}
|
|
11597
|
-
async getMetadataProviderConfigById(id) {
|
|
11598
|
-
return getApiV1ConfigMetadataproviderById({ path: { id } });
|
|
11599
|
-
}
|
|
11600
|
-
async updateMetadataProviderConfig(id, config) {
|
|
11601
|
-
return putApiV1ConfigMetadataproviderById({ path: { id: String(id) }, body: config });
|
|
11602
|
-
}
|
|
11603
|
-
async restartSystem() {
|
|
11604
|
-
return postApiV1SystemRestart();
|
|
11605
|
-
}
|
|
11606
|
-
async shutdownSystem() {
|
|
11607
|
-
return postApiV1SystemShutdown();
|
|
11608
|
-
}
|
|
11609
|
-
async getSystemBackups() {
|
|
11610
|
-
return getApiV1SystemBackup();
|
|
11611
|
-
}
|
|
11612
|
-
async deleteSystemBackup(id) {
|
|
11613
|
-
return deleteApiV1SystemBackupById({ path: { id } });
|
|
11614
|
-
}
|
|
11615
|
-
async restoreSystemBackup(id) {
|
|
11616
|
-
return postApiV1SystemBackupRestoreById({ path: { id } });
|
|
11617
|
-
}
|
|
11618
|
-
async uploadSystemBackup() {
|
|
11619
|
-
return postApiV1SystemBackupRestoreUpload();
|
|
11620
|
-
}
|
|
11621
|
-
async getSystemLogs() {
|
|
11622
|
-
return getApiV1Log();
|
|
11623
|
-
}
|
|
11624
|
-
async getLogFiles() {
|
|
11625
|
-
return getApiV1LogFile();
|
|
11626
|
-
}
|
|
11627
|
-
async getLogFileByName(filename) {
|
|
11628
|
-
return getApiV1LogFileByFilename({ path: { filename } });
|
|
11629
|
-
}
|
|
11630
|
-
async getDiskSpace() {
|
|
11631
|
-
return getApiV1Diskspace();
|
|
11632
|
-
}
|
|
11633
|
-
async getTags() {
|
|
11634
|
-
return getApiV1Tag();
|
|
11635
|
-
}
|
|
11636
|
-
async addTag(tag) {
|
|
11637
|
-
return postApiV1Tag({ body: tag });
|
|
11638
|
-
}
|
|
11639
|
-
async getTag(id) {
|
|
11640
|
-
return getApiV1TagById({ path: { id } });
|
|
11641
|
-
}
|
|
11642
|
-
async updateTag(id, tag) {
|
|
11643
|
-
return putApiV1TagById({ path: { id: String(id) }, body: tag });
|
|
11644
|
-
}
|
|
11645
|
-
async deleteTag(id) {
|
|
11646
|
-
return deleteApiV1TagById({ path: { id } });
|
|
11647
|
-
}
|
|
11648
|
-
async getTagDetails() {
|
|
11649
|
-
return getApiV1TagDetail();
|
|
11650
|
-
}
|
|
11651
|
-
async getTagDetailById(id) {
|
|
11652
|
-
return getApiV1TagDetailById({ path: { id } });
|
|
11653
|
-
}
|
|
11654
|
-
async getDownloadClients() {
|
|
11655
|
-
return getApiV1Downloadclient();
|
|
11656
|
-
}
|
|
11657
|
-
async getDownloadClient(id) {
|
|
11658
|
-
return getApiV1DownloadclientById({ path: { id } });
|
|
11659
|
-
}
|
|
11660
|
-
async addDownloadClient(client4) {
|
|
11661
|
-
return postApiV1Downloadclient({ body: client4 });
|
|
11662
|
-
}
|
|
11663
|
-
async updateDownloadClient(id, client4) {
|
|
11664
|
-
return putApiV1DownloadclientById({ path: { id }, body: client4 });
|
|
11665
|
-
}
|
|
11666
|
-
async deleteDownloadClient(id) {
|
|
11667
|
-
return deleteApiV1DownloadclientById({ path: { id } });
|
|
11668
|
-
}
|
|
11669
|
-
async updateDownloadClientsBulk(clients) {
|
|
11670
|
-
return putApiV1DownloadclientBulk({ body: clients });
|
|
11671
|
-
}
|
|
11672
|
-
async deleteDownloadClientsBulk(ids) {
|
|
11673
|
-
return deleteApiV1DownloadclientBulk({ body: { ids } });
|
|
11674
|
-
}
|
|
11675
|
-
async getDownloadClientSchema() {
|
|
11676
|
-
return getApiV1DownloadclientSchema();
|
|
11677
|
-
}
|
|
11678
|
-
async testDownloadClient(client4) {
|
|
11679
|
-
return postApiV1DownloadclientTest({ body: client4 });
|
|
11680
|
-
}
|
|
11681
|
-
async testAllDownloadClients() {
|
|
11682
|
-
return postApiV1DownloadclientTestall();
|
|
11683
|
-
}
|
|
11684
|
-
async getIndexers() {
|
|
11685
|
-
return getApiV1Indexer();
|
|
11686
|
-
}
|
|
11687
|
-
async getIndexer(id) {
|
|
11688
|
-
return getApiV1IndexerById({ path: { id } });
|
|
11689
|
-
}
|
|
11690
|
-
async addIndexer(indexer) {
|
|
11691
|
-
return postApiV1Indexer({ body: indexer });
|
|
11692
|
-
}
|
|
11693
|
-
async updateIndexer(id, indexer) {
|
|
11694
|
-
return putApiV1IndexerById({ path: { id }, body: indexer });
|
|
11695
|
-
}
|
|
11696
|
-
async deleteIndexer(id) {
|
|
11697
|
-
return deleteApiV1IndexerById({ path: { id } });
|
|
11698
|
-
}
|
|
11699
|
-
async getIndexerSchema() {
|
|
11700
|
-
return getApiV1IndexerSchema();
|
|
11701
|
-
}
|
|
11702
|
-
async testIndexer(indexer) {
|
|
11703
|
-
return postApiV1IndexerTest({ body: indexer });
|
|
11704
|
-
}
|
|
11705
|
-
async testAllIndexers() {
|
|
11706
|
-
return postApiV1IndexerTestall();
|
|
11707
|
-
}
|
|
11708
|
-
async getImportLists() {
|
|
11709
|
-
return getApiV1Importlist();
|
|
11710
|
-
}
|
|
11711
|
-
async getImportList(id) {
|
|
11712
|
-
return getApiV1ImportlistById({ path: { id } });
|
|
11713
|
-
}
|
|
11714
|
-
async addImportList(importList) {
|
|
11715
|
-
return postApiV1Importlist({ body: importList });
|
|
11716
|
-
}
|
|
11717
|
-
async updateImportList(id, importList) {
|
|
11718
|
-
return putApiV1ImportlistById({ path: { id }, body: importList });
|
|
11719
|
-
}
|
|
11720
|
-
async deleteImportList(id) {
|
|
11721
|
-
return deleteApiV1ImportlistById({ path: { id } });
|
|
11722
|
-
}
|
|
11723
|
-
async getImportListSchema() {
|
|
11724
|
-
return getApiV1ImportlistSchema();
|
|
11725
|
-
}
|
|
11726
|
-
async testImportList(importList) {
|
|
11727
|
-
return postApiV1ImportlistTest({ body: importList });
|
|
11728
|
-
}
|
|
11729
|
-
async testAllImportLists() {
|
|
11730
|
-
return postApiV1ImportlistTestall();
|
|
11731
|
-
}
|
|
11732
|
-
async getNotifications() {
|
|
11733
|
-
return getApiV1Notification();
|
|
11734
|
-
}
|
|
11735
|
-
async getNotification(id) {
|
|
11736
|
-
return getApiV1NotificationById({ path: { id } });
|
|
11737
|
-
}
|
|
11738
|
-
async addNotification(notification) {
|
|
11739
|
-
return postApiV1Notification({ body: notification });
|
|
11740
|
-
}
|
|
11741
|
-
async updateNotification(id, notification) {
|
|
11742
|
-
return putApiV1NotificationById({ path: { id }, body: notification });
|
|
11743
|
-
}
|
|
11744
|
-
async deleteNotification(id) {
|
|
11745
|
-
return deleteApiV1NotificationById({ path: { id } });
|
|
11746
|
-
}
|
|
11747
|
-
async getNotificationSchema() {
|
|
11748
|
-
return getApiV1NotificationSchema();
|
|
11749
|
-
}
|
|
11750
|
-
async testNotification(notification) {
|
|
11751
|
-
return postApiV1NotificationTest({ body: notification });
|
|
11752
|
-
}
|
|
11753
|
-
async testAllNotifications() {
|
|
11754
|
-
return postApiV1NotificationTestall();
|
|
11755
|
-
}
|
|
11756
|
-
async getHistory(page, pageSize, sortKey, sortDirection, artistId, downloadId) {
|
|
11757
|
-
const query = {};
|
|
11758
|
-
if (page !== undefined)
|
|
11759
|
-
query.page = page;
|
|
11760
|
-
if (pageSize !== undefined)
|
|
11761
|
-
query.pageSize = pageSize;
|
|
11762
|
-
if (sortKey)
|
|
11763
|
-
query.sortKey = sortKey;
|
|
11764
|
-
if (sortDirection)
|
|
11765
|
-
query.sortDirection = sortDirection;
|
|
11766
|
-
if (artistId !== undefined)
|
|
11767
|
-
query.artistId = artistId;
|
|
11768
|
-
if (downloadId)
|
|
11769
|
-
query.downloadId = downloadId;
|
|
11770
|
-
return getApiV1History(Object.keys(query).length > 0 ? { query } : {});
|
|
11771
|
-
}
|
|
11772
|
-
async getHistorySince(date, artistId) {
|
|
11773
|
-
const query = { date };
|
|
11774
|
-
if (artistId !== undefined)
|
|
11775
|
-
query.artistId = artistId;
|
|
11776
|
-
return getApiV1HistorySince({ query });
|
|
11777
|
-
}
|
|
11778
|
-
async getArtistHistory(artistId, eventType) {
|
|
11779
|
-
const query = { artistId };
|
|
11780
|
-
if (eventType !== undefined)
|
|
11781
|
-
query.eventType = eventType;
|
|
11782
|
-
return getApiV1HistoryArtist({ query });
|
|
11783
|
-
}
|
|
11784
|
-
async markHistoryItemFailed(id) {
|
|
11785
|
-
return postApiV1HistoryFailedById({ path: { id } });
|
|
11786
|
-
}
|
|
11787
|
-
async getQueue(page, pageSize, sortKey, sortDirection, includeUnknownArtistItems) {
|
|
11788
|
-
const query = {};
|
|
11789
|
-
if (page !== undefined)
|
|
11790
|
-
query.page = page;
|
|
11791
|
-
if (pageSize !== undefined)
|
|
11792
|
-
query.pageSize = pageSize;
|
|
11793
|
-
if (sortKey)
|
|
11794
|
-
query.sortKey = sortKey;
|
|
11795
|
-
if (sortDirection)
|
|
11796
|
-
query.sortDirection = sortDirection;
|
|
11797
|
-
if (includeUnknownArtistItems !== undefined)
|
|
11798
|
-
query.includeUnknownArtistItems = includeUnknownArtistItems;
|
|
11799
|
-
return getApiV1Queue(Object.keys(query).length > 0 ? { query } : {});
|
|
11800
|
-
}
|
|
11801
|
-
async removeQueueItem(id, removeFromClient, blocklist) {
|
|
11802
|
-
const query = {};
|
|
11803
|
-
if (removeFromClient !== undefined)
|
|
11804
|
-
query.removeFromClient = removeFromClient;
|
|
11805
|
-
if (blocklist !== undefined)
|
|
11806
|
-
query.blocklist = blocklist;
|
|
11807
|
-
return deleteApiV1QueueById({
|
|
11808
|
-
path: { id },
|
|
11809
|
-
...Object.keys(query).length > 0 ? { query } : {}
|
|
11810
|
-
});
|
|
11811
|
-
}
|
|
11812
|
-
async removeQueueItemsBulk(ids, removeFromClient, blocklist) {
|
|
11813
|
-
const query = {};
|
|
11814
|
-
if (removeFromClient !== undefined)
|
|
11815
|
-
query.removeFromClient = removeFromClient;
|
|
11816
|
-
if (blocklist !== undefined)
|
|
11817
|
-
query.blocklist = blocklist;
|
|
11818
|
-
return deleteApiV1QueueBulk({
|
|
11819
|
-
body: { ids },
|
|
11820
|
-
...Object.keys(query).length > 0 ? { query } : {}
|
|
11821
|
-
});
|
|
11822
|
-
}
|
|
11823
|
-
async grabQueueItem(id) {
|
|
11824
|
-
return postApiV1QueueGrabById({ path: { id } });
|
|
11825
|
-
}
|
|
11826
|
-
async grabQueueItemsBulk(ids) {
|
|
11827
|
-
return postApiV1QueueGrabBulk({ body: { ids } });
|
|
11828
|
-
}
|
|
11829
|
-
async getQueueDetails(artistId, includeUnknownArtistItems) {
|
|
11830
|
-
const query = {};
|
|
11831
|
-
if (artistId !== undefined)
|
|
11832
|
-
query.artistId = artistId;
|
|
11833
|
-
if (includeUnknownArtistItems !== undefined)
|
|
11834
|
-
query.includeUnknownArtistItems = includeUnknownArtistItems;
|
|
11835
|
-
return getApiV1QueueDetails(Object.keys(query).length > 0 ? { query } : {});
|
|
11836
|
-
}
|
|
11837
|
-
async getQueueStatus() {
|
|
11838
|
-
return getApiV1QueueStatus();
|
|
11839
|
-
}
|
|
11840
|
-
async getBlocklist(page, pageSize, sortKey, sortDirection) {
|
|
11841
|
-
const query = {};
|
|
11842
|
-
if (page !== undefined)
|
|
11843
|
-
query.page = page;
|
|
11844
|
-
if (pageSize !== undefined)
|
|
11845
|
-
query.pageSize = pageSize;
|
|
11846
|
-
if (sortKey)
|
|
11847
|
-
query.sortKey = sortKey;
|
|
11848
|
-
if (sortDirection)
|
|
11849
|
-
query.sortDirection = sortDirection;
|
|
11850
|
-
return getApiV1Blocklist(Object.keys(query).length > 0 ? { query } : {});
|
|
11851
|
-
}
|
|
11852
|
-
async removeBlocklistItem(id) {
|
|
11853
|
-
return deleteApiV1BlocklistById({ path: { id } });
|
|
11854
|
-
}
|
|
11855
|
-
async removeBlocklistItemsBulk(ids) {
|
|
11856
|
-
return deleteApiV1BlocklistBulk({ body: { ids } });
|
|
11857
|
-
}
|
|
11858
|
-
async getWantedMissing(page, pageSize, sortKey, sortDirection, monitored) {
|
|
11859
|
-
const query = { includeArtist: true };
|
|
11860
|
-
if (page !== undefined)
|
|
11861
|
-
query.page = page;
|
|
11862
|
-
if (pageSize !== undefined)
|
|
11863
|
-
query.pageSize = pageSize;
|
|
11864
|
-
if (sortKey)
|
|
11865
|
-
query.sortKey = sortKey;
|
|
11866
|
-
if (sortDirection)
|
|
11867
|
-
query.sortDirection = sortDirection;
|
|
11868
|
-
if (monitored !== undefined)
|
|
11869
|
-
query.monitored = monitored;
|
|
11870
|
-
return getApiV1WantedMissing(Object.keys(query).length > 0 ? { query } : {});
|
|
11871
|
-
}
|
|
11872
|
-
async getWantedCutoff(page, pageSize, sortKey, sortDirection, monitored) {
|
|
11873
|
-
const query = { includeArtist: true };
|
|
11874
|
-
if (page !== undefined)
|
|
11875
|
-
query.page = page;
|
|
11876
|
-
if (pageSize !== undefined)
|
|
11877
|
-
query.pageSize = pageSize;
|
|
11878
|
-
if (sortKey)
|
|
11879
|
-
query.sortKey = sortKey;
|
|
11880
|
-
if (sortDirection)
|
|
11881
|
-
query.sortDirection = sortDirection;
|
|
11882
|
-
if (monitored !== undefined)
|
|
11883
|
-
query.monitored = monitored;
|
|
11884
|
-
return getApiV1WantedCutoff(Object.keys(query).length > 0 ? { query } : {});
|
|
11885
|
-
}
|
|
11886
|
-
updateConfig(newConfig) {
|
|
11887
|
-
const updatedConfig = { ...this.clientConfig.config, ...newConfig };
|
|
11888
|
-
this.clientConfig = createServarrClient(updatedConfig);
|
|
11889
|
-
client3.setConfig({
|
|
11890
|
-
baseUrl: this.clientConfig.getBaseUrl(),
|
|
11891
|
-
headers: this.clientConfig.getHeaders()
|
|
11892
|
-
});
|
|
11893
|
-
return this.clientConfig.config;
|
|
11894
|
-
}
|
|
11895
|
-
}
|
|
11453
|
+
var LidarrClient;
|
|
11896
11454
|
var init_lidarr2 = __esm(() => {
|
|
11897
|
-
|
|
11455
|
+
init_base();
|
|
11898
11456
|
init_client_gen6();
|
|
11899
11457
|
init_lidarr();
|
|
11458
|
+
LidarrClient = class LidarrClient extends ServarrBaseClient {
|
|
11459
|
+
ops = {
|
|
11460
|
+
getSystemStatus: getApiV1SystemStatus,
|
|
11461
|
+
getHealth: getApiV1Health,
|
|
11462
|
+
getTags: getApiV1Tag,
|
|
11463
|
+
createTag: postApiV1Tag,
|
|
11464
|
+
getTagById: getApiV1TagById,
|
|
11465
|
+
updateTagById: putApiV1TagById,
|
|
11466
|
+
deleteTagById: deleteApiV1TagById,
|
|
11467
|
+
getTagDetails: getApiV1TagDetail,
|
|
11468
|
+
getTagDetailById: getApiV1TagDetailById,
|
|
11469
|
+
getNotifications: getApiV1Notification,
|
|
11470
|
+
createNotification: postApiV1Notification,
|
|
11471
|
+
getNotificationById: getApiV1NotificationById,
|
|
11472
|
+
updateNotificationById: putApiV1NotificationById,
|
|
11473
|
+
deleteNotificationById: deleteApiV1NotificationById,
|
|
11474
|
+
getNotificationSchema: getApiV1NotificationSchema,
|
|
11475
|
+
testNotification: postApiV1NotificationTest,
|
|
11476
|
+
testAllNotifications: postApiV1NotificationTestall,
|
|
11477
|
+
getDownloadClients: getApiV1Downloadclient,
|
|
11478
|
+
createDownloadClient: postApiV1Downloadclient,
|
|
11479
|
+
getDownloadClientById: getApiV1DownloadclientById,
|
|
11480
|
+
updateDownloadClientById: putApiV1DownloadclientById,
|
|
11481
|
+
deleteDownloadClientById: deleteApiV1DownloadclientById,
|
|
11482
|
+
getDownloadClientSchema: getApiV1DownloadclientSchema,
|
|
11483
|
+
testDownloadClient: postApiV1DownloadclientTest,
|
|
11484
|
+
testAllDownloadClients: postApiV1DownloadclientTestall,
|
|
11485
|
+
getIndexers: getApiV1Indexer,
|
|
11486
|
+
createIndexer: postApiV1Indexer,
|
|
11487
|
+
getIndexerById: getApiV1IndexerById,
|
|
11488
|
+
updateIndexerById: putApiV1IndexerById,
|
|
11489
|
+
deleteIndexerById: deleteApiV1IndexerById,
|
|
11490
|
+
getIndexerSchema: getApiV1IndexerSchema,
|
|
11491
|
+
testIndexer: postApiV1IndexerTest,
|
|
11492
|
+
testAllIndexers: postApiV1IndexerTestall,
|
|
11493
|
+
restartSystem: postApiV1SystemRestart,
|
|
11494
|
+
shutdownSystem: postApiV1SystemShutdown,
|
|
11495
|
+
getBackups: getApiV1SystemBackup,
|
|
11496
|
+
deleteBackup: deleteApiV1SystemBackupById,
|
|
11497
|
+
restoreBackup: postApiV1SystemBackupRestoreById,
|
|
11498
|
+
uploadBackup: postApiV1SystemBackupRestoreUpload,
|
|
11499
|
+
getLogFiles: getApiV1LogFile,
|
|
11500
|
+
getLogFileByName: getApiV1LogFileByFilename,
|
|
11501
|
+
runCommand: postApiV1Command,
|
|
11502
|
+
getCommands: getApiV1Command,
|
|
11503
|
+
getHostConfig: getApiV1ConfigHost,
|
|
11504
|
+
getHostConfigById: getApiV1ConfigHostById,
|
|
11505
|
+
updateHostConfig: putApiV1ConfigHostById,
|
|
11506
|
+
getUiConfig: getApiV1ConfigUi,
|
|
11507
|
+
getUiConfigById: getApiV1ConfigUiById,
|
|
11508
|
+
updateUiConfig: putApiV1ConfigUiById
|
|
11509
|
+
};
|
|
11510
|
+
constructor(config) {
|
|
11511
|
+
super(config, client3);
|
|
11512
|
+
}
|
|
11513
|
+
async getArtists() {
|
|
11514
|
+
return getApiV1Artist();
|
|
11515
|
+
}
|
|
11516
|
+
async getArtist(id) {
|
|
11517
|
+
return getApiV1ArtistById({ path: { id } });
|
|
11518
|
+
}
|
|
11519
|
+
async addArtist(artist) {
|
|
11520
|
+
return postApiV1Artist({ body: artist });
|
|
11521
|
+
}
|
|
11522
|
+
async updateArtist(id, artist) {
|
|
11523
|
+
return putApiV1ArtistById({ path: { id: String(id) }, body: artist });
|
|
11524
|
+
}
|
|
11525
|
+
async deleteArtist(id) {
|
|
11526
|
+
return deleteApiV1ArtistById({ path: { id } });
|
|
11527
|
+
}
|
|
11528
|
+
async getAlbums() {
|
|
11529
|
+
return getApiV1Album();
|
|
11530
|
+
}
|
|
11531
|
+
async getAlbum(id) {
|
|
11532
|
+
return getApiV1AlbumById({ path: { id } });
|
|
11533
|
+
}
|
|
11534
|
+
async searchArtists(term) {
|
|
11535
|
+
return getApiV1ArtistLookup({ query: { term } });
|
|
11536
|
+
}
|
|
11537
|
+
async getRootFolders() {
|
|
11538
|
+
return getApiV1Rootfolder();
|
|
11539
|
+
}
|
|
11540
|
+
async addRootFolder(path) {
|
|
11541
|
+
return postApiV1Rootfolder({
|
|
11542
|
+
body: { path }
|
|
11543
|
+
});
|
|
11544
|
+
}
|
|
11545
|
+
async deleteRootFolder(id) {
|
|
11546
|
+
return deleteApiV1RootfolderById({ path: { id } });
|
|
11547
|
+
}
|
|
11548
|
+
async addAlbum(album) {
|
|
11549
|
+
return postApiV1Album({ body: album });
|
|
11550
|
+
}
|
|
11551
|
+
async updateAlbum(id, album) {
|
|
11552
|
+
return putApiV1AlbumById({ path: { id: String(id) }, body: album });
|
|
11553
|
+
}
|
|
11554
|
+
async deleteAlbum(id) {
|
|
11555
|
+
return deleteApiV1AlbumById({ path: { id } });
|
|
11556
|
+
}
|
|
11557
|
+
async searchAlbums(term) {
|
|
11558
|
+
return getApiV1AlbumLookup({ query: { term } });
|
|
11559
|
+
}
|
|
11560
|
+
async getCalendar(start, end, unmonitored) {
|
|
11561
|
+
const query = {};
|
|
11562
|
+
if (start)
|
|
11563
|
+
query.start = start;
|
|
11564
|
+
if (end)
|
|
11565
|
+
query.end = end;
|
|
11566
|
+
if (unmonitored !== undefined)
|
|
11567
|
+
query.unmonitored = unmonitored;
|
|
11568
|
+
query.includeArtist = true;
|
|
11569
|
+
return getApiV1Calendar(Object.keys(query).length > 0 ? { query } : {});
|
|
11570
|
+
}
|
|
11571
|
+
async getCalendarFeed(pastDays, futureDays, tags) {
|
|
11572
|
+
const query = {};
|
|
11573
|
+
if (pastDays !== undefined)
|
|
11574
|
+
query.pastDays = pastDays;
|
|
11575
|
+
if (futureDays !== undefined)
|
|
11576
|
+
query.futureDays = futureDays;
|
|
11577
|
+
if (tags)
|
|
11578
|
+
query.tags = tags;
|
|
11579
|
+
return getFeedV1CalendarLidarrIcs(Object.keys(query).length > 0 ? { query } : {});
|
|
11580
|
+
}
|
|
11581
|
+
async getTrackFiles(artistId, trackFileIds, albumId, unmapped) {
|
|
11582
|
+
const query = {};
|
|
11583
|
+
if (artistId !== undefined)
|
|
11584
|
+
query.artistId = artistId;
|
|
11585
|
+
if (trackFileIds !== undefined)
|
|
11586
|
+
query.trackFileIds = trackFileIds;
|
|
11587
|
+
if (albumId !== undefined)
|
|
11588
|
+
query.albumId = albumId;
|
|
11589
|
+
if (unmapped !== undefined)
|
|
11590
|
+
query.unmapped = unmapped;
|
|
11591
|
+
return getApiV1Trackfile(Object.keys(query).length > 0 ? { query } : {});
|
|
11592
|
+
}
|
|
11593
|
+
async getTrackFile(id) {
|
|
11594
|
+
return getApiV1TrackfileById({ path: { id } });
|
|
11595
|
+
}
|
|
11596
|
+
async updateTrackFile(id, trackFile) {
|
|
11597
|
+
return putApiV1TrackfileById({ path: { id }, body: trackFile });
|
|
11598
|
+
}
|
|
11599
|
+
async deleteTrackFile(id) {
|
|
11600
|
+
return deleteApiV1TrackfileById({ path: { id } });
|
|
11601
|
+
}
|
|
11602
|
+
async updateTrackFilesEditor(trackFileList) {
|
|
11603
|
+
return putApiV1TrackfileEditor({ body: trackFileList });
|
|
11604
|
+
}
|
|
11605
|
+
async deleteTrackFilesBulk(trackFileList) {
|
|
11606
|
+
return deleteApiV1TrackfileBulk({ body: trackFileList });
|
|
11607
|
+
}
|
|
11608
|
+
async getQualityProfiles() {
|
|
11609
|
+
return getApiV1Qualityprofile();
|
|
11610
|
+
}
|
|
11611
|
+
async getQualityProfile(id) {
|
|
11612
|
+
return getApiV1QualityprofileById({ path: { id } });
|
|
11613
|
+
}
|
|
11614
|
+
async addQualityProfile(profile) {
|
|
11615
|
+
return postApiV1Qualityprofile({ body: profile });
|
|
11616
|
+
}
|
|
11617
|
+
async updateQualityProfile(id, profile) {
|
|
11618
|
+
return putApiV1QualityprofileById({ path: { id: String(id) }, body: profile });
|
|
11619
|
+
}
|
|
11620
|
+
async deleteQualityProfile(id) {
|
|
11621
|
+
return deleteApiV1QualityprofileById({ path: { id } });
|
|
11622
|
+
}
|
|
11623
|
+
async getQualityProfileSchema() {
|
|
11624
|
+
return getApiV1QualityprofileSchema();
|
|
11625
|
+
}
|
|
11626
|
+
async getCustomFormats() {
|
|
11627
|
+
return getApiV1Customformat();
|
|
11628
|
+
}
|
|
11629
|
+
async getCustomFormat(id) {
|
|
11630
|
+
return getApiV1CustomformatById({ path: { id } });
|
|
11631
|
+
}
|
|
11632
|
+
async addCustomFormat(format) {
|
|
11633
|
+
return postApiV1Customformat({ body: format });
|
|
11634
|
+
}
|
|
11635
|
+
async updateCustomFormat(id, format) {
|
|
11636
|
+
return putApiV1CustomformatById({ path: { id: String(id) }, body: format });
|
|
11637
|
+
}
|
|
11638
|
+
async deleteCustomFormat(id) {
|
|
11639
|
+
return deleteApiV1CustomformatById({ path: { id } });
|
|
11640
|
+
}
|
|
11641
|
+
async updateCustomFormatsBulk(formats) {
|
|
11642
|
+
return putApiV1CustomformatBulk({ body: formats });
|
|
11643
|
+
}
|
|
11644
|
+
async deleteCustomFormatsBulk(ids) {
|
|
11645
|
+
return deleteApiV1CustomformatBulk({ body: { ids } });
|
|
11646
|
+
}
|
|
11647
|
+
async getCustomFormatSchema() {
|
|
11648
|
+
return getApiV1CustomformatSchema();
|
|
11649
|
+
}
|
|
11650
|
+
async getNamingConfig() {
|
|
11651
|
+
return getApiV1ConfigNaming();
|
|
11652
|
+
}
|
|
11653
|
+
async getNamingConfigById(id) {
|
|
11654
|
+
return getApiV1ConfigNamingById({ path: { id } });
|
|
11655
|
+
}
|
|
11656
|
+
async updateNamingConfig(id, config) {
|
|
11657
|
+
return putApiV1ConfigNamingById({ path: { id: String(id) }, body: config });
|
|
11658
|
+
}
|
|
11659
|
+
async getNamingConfigExamples() {
|
|
11660
|
+
return getApiV1ConfigNamingExamples();
|
|
11661
|
+
}
|
|
11662
|
+
async getMediaManagementConfig() {
|
|
11663
|
+
return getApiV1ConfigMediamanagement();
|
|
11664
|
+
}
|
|
11665
|
+
async getMediaManagementConfigById(id) {
|
|
11666
|
+
return getApiV1ConfigMediamanagementById({ path: { id } });
|
|
11667
|
+
}
|
|
11668
|
+
async updateMediaManagementConfig(id, config) {
|
|
11669
|
+
return putApiV1ConfigMediamanagementById({ path: { id: String(id) }, body: config });
|
|
11670
|
+
}
|
|
11671
|
+
async getMetadataProviderConfig() {
|
|
11672
|
+
return getApiV1ConfigMetadataprovider();
|
|
11673
|
+
}
|
|
11674
|
+
async getMetadataProviderConfigById(id) {
|
|
11675
|
+
return getApiV1ConfigMetadataproviderById({ path: { id } });
|
|
11676
|
+
}
|
|
11677
|
+
async updateMetadataProviderConfig(id, config) {
|
|
11678
|
+
return putApiV1ConfigMetadataproviderById({ path: { id: String(id) }, body: config });
|
|
11679
|
+
}
|
|
11680
|
+
async getSystemLogs() {
|
|
11681
|
+
return getApiV1Log();
|
|
11682
|
+
}
|
|
11683
|
+
async getDiskSpace() {
|
|
11684
|
+
return getApiV1Diskspace();
|
|
11685
|
+
}
|
|
11686
|
+
async getImportLists() {
|
|
11687
|
+
return getApiV1Importlist();
|
|
11688
|
+
}
|
|
11689
|
+
async getImportList(id) {
|
|
11690
|
+
return getApiV1ImportlistById({ path: { id } });
|
|
11691
|
+
}
|
|
11692
|
+
async addImportList(importList) {
|
|
11693
|
+
return postApiV1Importlist({ body: importList });
|
|
11694
|
+
}
|
|
11695
|
+
async updateImportList(id, importList) {
|
|
11696
|
+
return putApiV1ImportlistById({ path: { id }, body: importList });
|
|
11697
|
+
}
|
|
11698
|
+
async deleteImportList(id) {
|
|
11699
|
+
return deleteApiV1ImportlistById({ path: { id } });
|
|
11700
|
+
}
|
|
11701
|
+
async getImportListSchema() {
|
|
11702
|
+
return getApiV1ImportlistSchema();
|
|
11703
|
+
}
|
|
11704
|
+
async testImportList(importList) {
|
|
11705
|
+
return postApiV1ImportlistTest({ body: importList });
|
|
11706
|
+
}
|
|
11707
|
+
async testAllImportLists() {
|
|
11708
|
+
return postApiV1ImportlistTestall();
|
|
11709
|
+
}
|
|
11710
|
+
async getHistory(page, pageSize, sortKey, sortDirection, artistId, downloadId) {
|
|
11711
|
+
const query = {};
|
|
11712
|
+
if (page !== undefined)
|
|
11713
|
+
query.page = page;
|
|
11714
|
+
if (pageSize !== undefined)
|
|
11715
|
+
query.pageSize = pageSize;
|
|
11716
|
+
if (sortKey)
|
|
11717
|
+
query.sortKey = sortKey;
|
|
11718
|
+
if (sortDirection)
|
|
11719
|
+
query.sortDirection = sortDirection;
|
|
11720
|
+
if (artistId !== undefined)
|
|
11721
|
+
query.artistId = artistId;
|
|
11722
|
+
if (downloadId)
|
|
11723
|
+
query.downloadId = downloadId;
|
|
11724
|
+
return getApiV1History(Object.keys(query).length > 0 ? { query } : {});
|
|
11725
|
+
}
|
|
11726
|
+
async getHistorySince(date, artistId) {
|
|
11727
|
+
const query = { date };
|
|
11728
|
+
if (artistId !== undefined)
|
|
11729
|
+
query.artistId = artistId;
|
|
11730
|
+
return getApiV1HistorySince({ query });
|
|
11731
|
+
}
|
|
11732
|
+
async getArtistHistory(artistId, eventType) {
|
|
11733
|
+
const query = { artistId };
|
|
11734
|
+
if (eventType !== undefined)
|
|
11735
|
+
query.eventType = eventType;
|
|
11736
|
+
return getApiV1HistoryArtist({ query });
|
|
11737
|
+
}
|
|
11738
|
+
async markHistoryItemFailed(id) {
|
|
11739
|
+
return postApiV1HistoryFailedById({ path: { id } });
|
|
11740
|
+
}
|
|
11741
|
+
async getQueue(page, pageSize, sortKey, sortDirection, includeUnknownArtistItems) {
|
|
11742
|
+
const query = {};
|
|
11743
|
+
if (page !== undefined)
|
|
11744
|
+
query.page = page;
|
|
11745
|
+
if (pageSize !== undefined)
|
|
11746
|
+
query.pageSize = pageSize;
|
|
11747
|
+
if (sortKey)
|
|
11748
|
+
query.sortKey = sortKey;
|
|
11749
|
+
if (sortDirection)
|
|
11750
|
+
query.sortDirection = sortDirection;
|
|
11751
|
+
if (includeUnknownArtistItems !== undefined)
|
|
11752
|
+
query.includeUnknownArtistItems = includeUnknownArtistItems;
|
|
11753
|
+
return getApiV1Queue(Object.keys(query).length > 0 ? { query } : {});
|
|
11754
|
+
}
|
|
11755
|
+
async removeQueueItem(id, removeFromClient, blocklist) {
|
|
11756
|
+
const query = {};
|
|
11757
|
+
if (removeFromClient !== undefined)
|
|
11758
|
+
query.removeFromClient = removeFromClient;
|
|
11759
|
+
if (blocklist !== undefined)
|
|
11760
|
+
query.blocklist = blocklist;
|
|
11761
|
+
return deleteApiV1QueueById({
|
|
11762
|
+
path: { id },
|
|
11763
|
+
...Object.keys(query).length > 0 ? { query } : {}
|
|
11764
|
+
});
|
|
11765
|
+
}
|
|
11766
|
+
async removeQueueItemsBulk(ids, removeFromClient, blocklist) {
|
|
11767
|
+
const query = {};
|
|
11768
|
+
if (removeFromClient !== undefined)
|
|
11769
|
+
query.removeFromClient = removeFromClient;
|
|
11770
|
+
if (blocklist !== undefined)
|
|
11771
|
+
query.blocklist = blocklist;
|
|
11772
|
+
return deleteApiV1QueueBulk({
|
|
11773
|
+
body: { ids },
|
|
11774
|
+
...Object.keys(query).length > 0 ? { query } : {}
|
|
11775
|
+
});
|
|
11776
|
+
}
|
|
11777
|
+
async grabQueueItem(id) {
|
|
11778
|
+
return postApiV1QueueGrabById({ path: { id } });
|
|
11779
|
+
}
|
|
11780
|
+
async grabQueueItemsBulk(ids) {
|
|
11781
|
+
return postApiV1QueueGrabBulk({ body: { ids } });
|
|
11782
|
+
}
|
|
11783
|
+
async getQueueDetails(artistId, includeUnknownArtistItems) {
|
|
11784
|
+
const query = {};
|
|
11785
|
+
if (artistId !== undefined)
|
|
11786
|
+
query.artistId = artistId;
|
|
11787
|
+
if (includeUnknownArtistItems !== undefined)
|
|
11788
|
+
query.includeUnknownArtistItems = includeUnknownArtistItems;
|
|
11789
|
+
return getApiV1QueueDetails(Object.keys(query).length > 0 ? { query } : {});
|
|
11790
|
+
}
|
|
11791
|
+
async getQueueStatus() {
|
|
11792
|
+
return getApiV1QueueStatus();
|
|
11793
|
+
}
|
|
11794
|
+
async getBlocklist(page, pageSize, sortKey, sortDirection) {
|
|
11795
|
+
const query = {};
|
|
11796
|
+
if (page !== undefined)
|
|
11797
|
+
query.page = page;
|
|
11798
|
+
if (pageSize !== undefined)
|
|
11799
|
+
query.pageSize = pageSize;
|
|
11800
|
+
if (sortKey)
|
|
11801
|
+
query.sortKey = sortKey;
|
|
11802
|
+
if (sortDirection)
|
|
11803
|
+
query.sortDirection = sortDirection;
|
|
11804
|
+
return getApiV1Blocklist(Object.keys(query).length > 0 ? { query } : {});
|
|
11805
|
+
}
|
|
11806
|
+
async removeBlocklistItem(id) {
|
|
11807
|
+
return deleteApiV1BlocklistById({ path: { id } });
|
|
11808
|
+
}
|
|
11809
|
+
async removeBlocklistItemsBulk(ids) {
|
|
11810
|
+
return deleteApiV1BlocklistBulk({ body: { ids } });
|
|
11811
|
+
}
|
|
11812
|
+
async getWantedMissing(page, pageSize, sortKey, sortDirection, monitored) {
|
|
11813
|
+
const query = { includeArtist: true };
|
|
11814
|
+
if (page !== undefined)
|
|
11815
|
+
query.page = page;
|
|
11816
|
+
if (pageSize !== undefined)
|
|
11817
|
+
query.pageSize = pageSize;
|
|
11818
|
+
if (sortKey)
|
|
11819
|
+
query.sortKey = sortKey;
|
|
11820
|
+
if (sortDirection)
|
|
11821
|
+
query.sortDirection = sortDirection;
|
|
11822
|
+
if (monitored !== undefined)
|
|
11823
|
+
query.monitored = monitored;
|
|
11824
|
+
return getApiV1WantedMissing(Object.keys(query).length > 0 ? { query } : {});
|
|
11825
|
+
}
|
|
11826
|
+
async getWantedCutoff(page, pageSize, sortKey, sortDirection, monitored) {
|
|
11827
|
+
const query = { includeArtist: true };
|
|
11828
|
+
if (page !== undefined)
|
|
11829
|
+
query.page = page;
|
|
11830
|
+
if (pageSize !== undefined)
|
|
11831
|
+
query.pageSize = pageSize;
|
|
11832
|
+
if (sortKey)
|
|
11833
|
+
query.sortKey = sortKey;
|
|
11834
|
+
if (sortDirection)
|
|
11835
|
+
query.sortDirection = sortDirection;
|
|
11836
|
+
if (monitored !== undefined)
|
|
11837
|
+
query.monitored = monitored;
|
|
11838
|
+
return getApiV1WantedCutoff(Object.keys(query).length > 0 ? { query } : {});
|
|
11839
|
+
}
|
|
11840
|
+
};
|
|
11900
11841
|
});
|
|
11901
11842
|
|
|
11902
11843
|
// src/cli/commands/lidarr.ts
|
|
11903
11844
|
var exports_lidarr3 = {};
|
|
11904
11845
|
__export(exports_lidarr3, {
|
|
11846
|
+
resources: () => resources3,
|
|
11905
11847
|
lidarr: () => lidarr
|
|
11906
11848
|
});
|
|
11907
11849
|
function withArtistName(item) {
|
|
@@ -14363,572 +14305,463 @@ var getApiV1Author = (options) => (options?.client ?? client4).get({
|
|
|
14363
14305
|
}), getApiV1TagDetail2 = (options) => (options?.client ?? client4).get({
|
|
14364
14306
|
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
14365
14307
|
in: "query",
|
|
14366
|
-
name: "apikey",
|
|
14367
|
-
type: "apiKey"
|
|
14368
|
-
}],
|
|
14369
|
-
url: "/api/v1/tag/detail",
|
|
14370
|
-
...options
|
|
14371
|
-
}), getApiV1TagDetailById2 = (options) => (options.client ?? client4).get({
|
|
14372
|
-
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
14373
|
-
in: "query",
|
|
14374
|
-
name: "apikey",
|
|
14375
|
-
type: "apiKey"
|
|
14376
|
-
}],
|
|
14377
|
-
url: "/api/v1/tag/detail/{id}",
|
|
14378
|
-
...options
|
|
14379
|
-
}), getApiV1ConfigUiById2 = (options) => (options.client ?? client4).get({
|
|
14380
|
-
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
14381
|
-
in: "query",
|
|
14382
|
-
name: "apikey",
|
|
14383
|
-
type: "apiKey"
|
|
14384
|
-
}],
|
|
14385
|
-
url: "/api/v1/config/ui/{id}",
|
|
14386
|
-
...options
|
|
14387
|
-
}), putApiV1ConfigUiById2 = (options) => (options.client ?? client4).put({
|
|
14388
|
-
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
14389
|
-
in: "query",
|
|
14390
|
-
name: "apikey",
|
|
14391
|
-
type: "apiKey"
|
|
14392
|
-
}],
|
|
14393
|
-
url: "/api/v1/config/ui/{id}",
|
|
14394
|
-
...options,
|
|
14395
|
-
headers: {
|
|
14396
|
-
"Content-Type": "application/json",
|
|
14397
|
-
...options.headers
|
|
14398
|
-
}
|
|
14399
|
-
}), getApiV1ConfigUi2 = (options) => (options?.client ?? client4).get({
|
|
14400
|
-
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
14401
|
-
in: "query",
|
|
14402
|
-
name: "apikey",
|
|
14403
|
-
type: "apiKey"
|
|
14404
|
-
}],
|
|
14405
|
-
url: "/api/v1/config/ui",
|
|
14406
|
-
...options
|
|
14407
|
-
});
|
|
14408
|
-
var init_sdk_gen4 = __esm(() => {
|
|
14409
|
-
init_client_gen8();
|
|
14410
|
-
});
|
|
14411
|
-
|
|
14412
|
-
// src/generated/readarr/index.ts
|
|
14413
|
-
var init_readarr = __esm(() => {
|
|
14414
|
-
init_sdk_gen4();
|
|
14415
|
-
});
|
|
14416
|
-
|
|
14417
|
-
// src/clients/readarr.ts
|
|
14418
|
-
var exports_readarr = {};
|
|
14419
|
-
__export(exports_readarr, {
|
|
14420
|
-
ReadarrClient: () => ReadarrClient
|
|
14421
|
-
});
|
|
14422
|
-
|
|
14423
|
-
class ReadarrClient {
|
|
14424
|
-
clientConfig;
|
|
14425
|
-
constructor(config) {
|
|
14426
|
-
this.clientConfig = createServarrClient(config);
|
|
14427
|
-
client4.setConfig({
|
|
14428
|
-
baseUrl: this.clientConfig.getBaseUrl(),
|
|
14429
|
-
headers: this.clientConfig.getHeaders()
|
|
14430
|
-
});
|
|
14431
|
-
}
|
|
14432
|
-
async getSystemStatus() {
|
|
14433
|
-
return getApiV1SystemStatus2();
|
|
14434
|
-
}
|
|
14435
|
-
async getHealth() {
|
|
14436
|
-
return getApiV1Health2();
|
|
14437
|
-
}
|
|
14438
|
-
async getAuthors() {
|
|
14439
|
-
return getApiV1Author();
|
|
14440
|
-
}
|
|
14441
|
-
async getAuthor(id) {
|
|
14442
|
-
return getApiV1AuthorById({ path: { id } });
|
|
14443
|
-
}
|
|
14444
|
-
async addAuthor(author) {
|
|
14445
|
-
return postApiV1Author({ body: author });
|
|
14446
|
-
}
|
|
14447
|
-
async updateAuthor(id, author) {
|
|
14448
|
-
return putApiV1AuthorById({ path: { id: String(id) }, body: author });
|
|
14449
|
-
}
|
|
14450
|
-
async deleteAuthor(id) {
|
|
14451
|
-
return deleteApiV1AuthorById({ path: { id } });
|
|
14452
|
-
}
|
|
14453
|
-
async getBooks() {
|
|
14454
|
-
return getApiV1Book();
|
|
14455
|
-
}
|
|
14456
|
-
async getBook(id) {
|
|
14457
|
-
return getApiV1BookById({ path: { id } });
|
|
14458
|
-
}
|
|
14459
|
-
async searchAuthors(term) {
|
|
14460
|
-
return getApiV1AuthorLookup({ query: { term } });
|
|
14461
|
-
}
|
|
14462
|
-
async runCommand(command) {
|
|
14463
|
-
return postApiV1Command2({ body: command });
|
|
14464
|
-
}
|
|
14465
|
-
async getCommands() {
|
|
14466
|
-
return getApiV1Command2();
|
|
14467
|
-
}
|
|
14468
|
-
async getRootFolders() {
|
|
14469
|
-
return getApiV1Rootfolder2();
|
|
14470
|
-
}
|
|
14471
|
-
async addRootFolder(path) {
|
|
14472
|
-
return postApiV1Rootfolder2({
|
|
14473
|
-
body: { path }
|
|
14474
|
-
});
|
|
14475
|
-
}
|
|
14476
|
-
async deleteRootFolder(id) {
|
|
14477
|
-
return deleteApiV1RootfolderById2({ path: { id } });
|
|
14478
|
-
}
|
|
14479
|
-
async getHostConfig() {
|
|
14480
|
-
return getApiV1ConfigHost2();
|
|
14481
|
-
}
|
|
14482
|
-
async getHostConfigById(id) {
|
|
14483
|
-
return getApiV1ConfigHostById2({ path: { id } });
|
|
14484
|
-
}
|
|
14485
|
-
async updateHostConfig(id, config) {
|
|
14486
|
-
return putApiV1ConfigHostById2({ path: { id: String(id) }, body: config });
|
|
14487
|
-
}
|
|
14488
|
-
async getNamingConfig() {
|
|
14489
|
-
return getApiV1ConfigNaming2();
|
|
14490
|
-
}
|
|
14491
|
-
async getNamingConfigById(id) {
|
|
14492
|
-
return getApiV1ConfigNamingById2({ path: { id } });
|
|
14493
|
-
}
|
|
14494
|
-
async updateNamingConfig(id, config) {
|
|
14495
|
-
return putApiV1ConfigNamingById2({ path: { id: String(id) }, body: config });
|
|
14496
|
-
}
|
|
14497
|
-
async getNamingConfigExamples() {
|
|
14498
|
-
return getApiV1ConfigNamingExamples2();
|
|
14499
|
-
}
|
|
14500
|
-
async getMediaManagementConfig() {
|
|
14501
|
-
return getApiV1ConfigMediamanagement2();
|
|
14502
|
-
}
|
|
14503
|
-
async getMediaManagementConfigById(id) {
|
|
14504
|
-
return getApiV1ConfigMediamanagementById2({ path: { id } });
|
|
14505
|
-
}
|
|
14506
|
-
async updateMediaManagementConfig(id, config) {
|
|
14507
|
-
return putApiV1ConfigMediamanagementById2({ path: { id: String(id) }, body: config });
|
|
14508
|
-
}
|
|
14509
|
-
async getUiConfig() {
|
|
14510
|
-
return getApiV1ConfigUi2();
|
|
14511
|
-
}
|
|
14512
|
-
async getUiConfigById(id) {
|
|
14513
|
-
return getApiV1ConfigUiById2({ path: { id } });
|
|
14514
|
-
}
|
|
14515
|
-
async updateUiConfig(id, config) {
|
|
14516
|
-
return putApiV1ConfigUiById2({ path: { id: String(id) }, body: config });
|
|
14517
|
-
}
|
|
14518
|
-
async getDevelopmentConfig() {
|
|
14519
|
-
return getApiV1ConfigDevelopment();
|
|
14520
|
-
}
|
|
14521
|
-
async getDevelopmentConfigById(id) {
|
|
14522
|
-
return getApiV1ConfigDevelopmentById({ path: { id } });
|
|
14523
|
-
}
|
|
14524
|
-
async updateDevelopmentConfig(id, config) {
|
|
14525
|
-
return putApiV1ConfigDevelopmentById({ path: { id: String(id) }, body: config });
|
|
14526
|
-
}
|
|
14527
|
-
async getMetadataProviderConfig() {
|
|
14528
|
-
return getApiV1ConfigMetadataprovider2();
|
|
14529
|
-
}
|
|
14530
|
-
async getMetadataProviderConfigById(id) {
|
|
14531
|
-
return getApiV1ConfigMetadataproviderById2({ path: { id } });
|
|
14532
|
-
}
|
|
14533
|
-
async updateMetadataProviderConfig(id, config) {
|
|
14534
|
-
return putApiV1ConfigMetadataproviderById2({
|
|
14535
|
-
path: { id: String(id) },
|
|
14536
|
-
body: config
|
|
14537
|
-
});
|
|
14538
|
-
}
|
|
14539
|
-
async restartSystem() {
|
|
14540
|
-
return postApiV1SystemRestart2();
|
|
14541
|
-
}
|
|
14542
|
-
async shutdownSystem() {
|
|
14543
|
-
return postApiV1SystemShutdown2();
|
|
14544
|
-
}
|
|
14545
|
-
async getSystemBackups() {
|
|
14546
|
-
return getApiV1SystemBackup2();
|
|
14547
|
-
}
|
|
14548
|
-
async deleteSystemBackup(id) {
|
|
14549
|
-
return deleteApiV1SystemBackupById2({ path: { id } });
|
|
14550
|
-
}
|
|
14551
|
-
async restoreSystemBackup(id) {
|
|
14552
|
-
return postApiV1SystemBackupRestoreById2({ path: { id } });
|
|
14553
|
-
}
|
|
14554
|
-
async uploadSystemBackup() {
|
|
14555
|
-
return postApiV1SystemBackupRestoreUpload2();
|
|
14556
|
-
}
|
|
14557
|
-
async getSystemLogs() {
|
|
14558
|
-
return getApiV1Log2();
|
|
14559
|
-
}
|
|
14560
|
-
async getLogFiles() {
|
|
14561
|
-
return getApiV1LogFile2();
|
|
14562
|
-
}
|
|
14563
|
-
async getLogFileByName(filename) {
|
|
14564
|
-
return getApiV1LogFileByFilename2({ path: { filename } });
|
|
14565
|
-
}
|
|
14566
|
-
async getDiskSpace() {
|
|
14567
|
-
return getApiV1Diskspace2();
|
|
14568
|
-
}
|
|
14569
|
-
async getTags() {
|
|
14570
|
-
return getApiV1Tag2();
|
|
14571
|
-
}
|
|
14572
|
-
async addTag(tag) {
|
|
14573
|
-
return postApiV1Tag2({ body: tag });
|
|
14574
|
-
}
|
|
14575
|
-
async getTag(id) {
|
|
14576
|
-
return getApiV1TagById2({ path: { id } });
|
|
14577
|
-
}
|
|
14578
|
-
async updateTag(id, tag) {
|
|
14579
|
-
return putApiV1TagById2({ path: { id: String(id) }, body: tag });
|
|
14580
|
-
}
|
|
14581
|
-
async deleteTag(id) {
|
|
14582
|
-
return deleteApiV1TagById2({ path: { id } });
|
|
14583
|
-
}
|
|
14584
|
-
async getTagDetails() {
|
|
14585
|
-
return getApiV1TagDetail2();
|
|
14586
|
-
}
|
|
14587
|
-
async getTagDetailById(id) {
|
|
14588
|
-
return getApiV1TagDetailById2({ path: { id } });
|
|
14589
|
-
}
|
|
14590
|
-
async addBook(book) {
|
|
14591
|
-
return postApiV1Book({ body: book });
|
|
14592
|
-
}
|
|
14593
|
-
async updateBook(id, book) {
|
|
14594
|
-
return putApiV1BookById({ path: { id: String(id) }, body: book });
|
|
14595
|
-
}
|
|
14596
|
-
async deleteBook(id) {
|
|
14597
|
-
return deleteApiV1BookById({ path: { id } });
|
|
14598
|
-
}
|
|
14599
|
-
async searchBooks(term) {
|
|
14600
|
-
return getApiV1BookLookup({ query: { term } });
|
|
14601
|
-
}
|
|
14602
|
-
async getCalendar(start, end, unmonitored) {
|
|
14603
|
-
const query = { includeAuthor: true };
|
|
14604
|
-
if (start)
|
|
14605
|
-
query.start = start;
|
|
14606
|
-
if (end)
|
|
14607
|
-
query.end = end;
|
|
14608
|
-
if (unmonitored !== undefined)
|
|
14609
|
-
query.unmonitored = unmonitored;
|
|
14610
|
-
return getApiV1Calendar2(Object.keys(query).length > 0 ? { query } : {});
|
|
14611
|
-
}
|
|
14612
|
-
async getCalendarFeed(pastDays, futureDays, tagList) {
|
|
14613
|
-
const query = {};
|
|
14614
|
-
if (pastDays !== undefined)
|
|
14615
|
-
query.pastDays = pastDays;
|
|
14616
|
-
if (futureDays !== undefined)
|
|
14617
|
-
query.futureDays = futureDays;
|
|
14618
|
-
if (tagList)
|
|
14619
|
-
query.tagList = tagList;
|
|
14620
|
-
return getFeedV1CalendarReadarrIcs(Object.keys(query).length > 0 ? { query } : {});
|
|
14621
|
-
}
|
|
14622
|
-
async getBookFiles(authorId, bookFileIds, bookId, unmapped) {
|
|
14623
|
-
const query = {};
|
|
14624
|
-
if (authorId !== undefined)
|
|
14625
|
-
query.authorId = authorId;
|
|
14626
|
-
if (bookFileIds !== undefined)
|
|
14627
|
-
query.bookFileIds = bookFileIds;
|
|
14628
|
-
if (bookId !== undefined)
|
|
14629
|
-
query.bookId = bookId;
|
|
14630
|
-
if (unmapped !== undefined)
|
|
14631
|
-
query.unmapped = unmapped;
|
|
14632
|
-
return getApiV1Bookfile(Object.keys(query).length > 0 ? { query } : {});
|
|
14633
|
-
}
|
|
14634
|
-
async getBookFile(id) {
|
|
14635
|
-
return getApiV1BookfileById({ path: { id } });
|
|
14636
|
-
}
|
|
14637
|
-
async updateBookFile(id, bookFile) {
|
|
14638
|
-
return putApiV1BookfileById({ path: { id }, body: bookFile });
|
|
14639
|
-
}
|
|
14640
|
-
async deleteBookFile(id) {
|
|
14641
|
-
return deleteApiV1BookfileById({ path: { id } });
|
|
14642
|
-
}
|
|
14643
|
-
async updateBookFilesEditor(bookFileList) {
|
|
14644
|
-
return putApiV1BookfileEditor({ body: bookFileList });
|
|
14645
|
-
}
|
|
14646
|
-
async deleteBookFilesBulk(bookFileList) {
|
|
14647
|
-
return deleteApiV1BookfileBulk({ body: bookFileList });
|
|
14648
|
-
}
|
|
14649
|
-
async getQualityProfiles() {
|
|
14650
|
-
return getApiV1Qualityprofile2();
|
|
14651
|
-
}
|
|
14652
|
-
async getQualityProfile(id) {
|
|
14653
|
-
return getApiV1QualityprofileById2({ path: { id } });
|
|
14654
|
-
}
|
|
14655
|
-
async addQualityProfile(profile) {
|
|
14656
|
-
return postApiV1Qualityprofile2({ body: profile });
|
|
14657
|
-
}
|
|
14658
|
-
async updateQualityProfile(id, profile) {
|
|
14659
|
-
return putApiV1QualityprofileById2({ path: { id: String(id) }, body: profile });
|
|
14660
|
-
}
|
|
14661
|
-
async deleteQualityProfile(id) {
|
|
14662
|
-
return deleteApiV1QualityprofileById2({ path: { id } });
|
|
14663
|
-
}
|
|
14664
|
-
async getQualityProfileSchema() {
|
|
14665
|
-
return getApiV1QualityprofileSchema2();
|
|
14666
|
-
}
|
|
14667
|
-
async getCustomFormats() {
|
|
14668
|
-
return getApiV1Customformat2();
|
|
14669
|
-
}
|
|
14670
|
-
async getCustomFormat(id) {
|
|
14671
|
-
return getApiV1CustomformatById2({ path: { id } });
|
|
14672
|
-
}
|
|
14673
|
-
async addCustomFormat(format) {
|
|
14674
|
-
return postApiV1Customformat2({ body: format });
|
|
14675
|
-
}
|
|
14676
|
-
async updateCustomFormat(id, format) {
|
|
14677
|
-
return putApiV1CustomformatById2({ path: { id: String(id) }, body: format });
|
|
14678
|
-
}
|
|
14679
|
-
async deleteCustomFormat(id) {
|
|
14680
|
-
return deleteApiV1CustomformatById2({ path: { id } });
|
|
14681
|
-
}
|
|
14682
|
-
async getCustomFormatSchema() {
|
|
14683
|
-
return getApiV1CustomformatSchema2();
|
|
14684
|
-
}
|
|
14685
|
-
async getDownloadClients() {
|
|
14686
|
-
return getApiV1Downloadclient2();
|
|
14687
|
-
}
|
|
14688
|
-
async getDownloadClient(id) {
|
|
14689
|
-
return getApiV1DownloadclientById2({ path: { id } });
|
|
14690
|
-
}
|
|
14691
|
-
async addDownloadClient(client5) {
|
|
14692
|
-
return postApiV1Downloadclient2({ body: client5 });
|
|
14693
|
-
}
|
|
14694
|
-
async updateDownloadClient(id, client5) {
|
|
14695
|
-
return putApiV1DownloadclientById2({ path: { id: String(id) }, body: client5 });
|
|
14696
|
-
}
|
|
14697
|
-
async deleteDownloadClient(id) {
|
|
14698
|
-
return deleteApiV1DownloadclientById2({ path: { id } });
|
|
14699
|
-
}
|
|
14700
|
-
async getDownloadClientSchema() {
|
|
14701
|
-
return getApiV1DownloadclientSchema2();
|
|
14702
|
-
}
|
|
14703
|
-
async testDownloadClient(client5) {
|
|
14704
|
-
return postApiV1DownloadclientTest2({ body: client5 });
|
|
14705
|
-
}
|
|
14706
|
-
async testAllDownloadClients() {
|
|
14707
|
-
return postApiV1DownloadclientTestall2();
|
|
14708
|
-
}
|
|
14709
|
-
async getIndexers() {
|
|
14710
|
-
return getApiV1Indexer2();
|
|
14711
|
-
}
|
|
14712
|
-
async getIndexer(id) {
|
|
14713
|
-
return getApiV1IndexerById2({ path: { id } });
|
|
14714
|
-
}
|
|
14715
|
-
async addIndexer(indexer) {
|
|
14716
|
-
return postApiV1Indexer2({ body: indexer });
|
|
14717
|
-
}
|
|
14718
|
-
async updateIndexer(id, indexer) {
|
|
14719
|
-
return putApiV1IndexerById2({ path: { id: String(id) }, body: indexer });
|
|
14720
|
-
}
|
|
14721
|
-
async deleteIndexer(id) {
|
|
14722
|
-
return deleteApiV1IndexerById2({ path: { id } });
|
|
14723
|
-
}
|
|
14724
|
-
async getIndexerSchema() {
|
|
14725
|
-
return getApiV1IndexerSchema2();
|
|
14726
|
-
}
|
|
14727
|
-
async testIndexer(indexer) {
|
|
14728
|
-
return postApiV1IndexerTest2({ body: indexer });
|
|
14729
|
-
}
|
|
14730
|
-
async testAllIndexers() {
|
|
14731
|
-
return postApiV1IndexerTestall2();
|
|
14732
|
-
}
|
|
14733
|
-
async getImportLists() {
|
|
14734
|
-
return getApiV1Importlist2();
|
|
14735
|
-
}
|
|
14736
|
-
async getImportList(id) {
|
|
14737
|
-
return getApiV1ImportlistById2({ path: { id } });
|
|
14738
|
-
}
|
|
14739
|
-
async addImportList(importList) {
|
|
14740
|
-
return postApiV1Importlist2({ body: importList });
|
|
14741
|
-
}
|
|
14742
|
-
async updateImportList(id, importList) {
|
|
14743
|
-
return putApiV1ImportlistById2({ path: { id: String(id) }, body: importList });
|
|
14744
|
-
}
|
|
14745
|
-
async deleteImportList(id) {
|
|
14746
|
-
return deleteApiV1ImportlistById2({ path: { id } });
|
|
14747
|
-
}
|
|
14748
|
-
async getImportListSchema() {
|
|
14749
|
-
return getApiV1ImportlistSchema2();
|
|
14750
|
-
}
|
|
14751
|
-
async testImportList(importList) {
|
|
14752
|
-
return postApiV1ImportlistTest2({ body: importList });
|
|
14753
|
-
}
|
|
14754
|
-
async testAllImportLists() {
|
|
14755
|
-
return postApiV1ImportlistTestall2();
|
|
14756
|
-
}
|
|
14757
|
-
async getNotifications() {
|
|
14758
|
-
return getApiV1Notification2();
|
|
14759
|
-
}
|
|
14760
|
-
async getNotification(id) {
|
|
14761
|
-
return getApiV1NotificationById2({ path: { id } });
|
|
14762
|
-
}
|
|
14763
|
-
async addNotification(notification) {
|
|
14764
|
-
return postApiV1Notification2({ body: notification });
|
|
14765
|
-
}
|
|
14766
|
-
async updateNotification(id, notification) {
|
|
14767
|
-
return putApiV1NotificationById2({ path: { id: String(id) }, body: notification });
|
|
14768
|
-
}
|
|
14769
|
-
async deleteNotification(id) {
|
|
14770
|
-
return deleteApiV1NotificationById2({ path: { id } });
|
|
14771
|
-
}
|
|
14772
|
-
async getNotificationSchema() {
|
|
14773
|
-
return getApiV1NotificationSchema2();
|
|
14774
|
-
}
|
|
14775
|
-
async testNotification(notification) {
|
|
14776
|
-
return postApiV1NotificationTest2({ body: notification });
|
|
14777
|
-
}
|
|
14778
|
-
async testAllNotifications() {
|
|
14779
|
-
return postApiV1NotificationTestall2();
|
|
14780
|
-
}
|
|
14781
|
-
async getHistory(page, pageSize, sortKey, sortDirection, authorId, downloadId) {
|
|
14782
|
-
const query = {};
|
|
14783
|
-
if (page !== undefined)
|
|
14784
|
-
query.page = page;
|
|
14785
|
-
if (pageSize !== undefined)
|
|
14786
|
-
query.pageSize = pageSize;
|
|
14787
|
-
if (sortKey)
|
|
14788
|
-
query.sortKey = sortKey;
|
|
14789
|
-
if (sortDirection)
|
|
14790
|
-
query.sortDirection = sortDirection;
|
|
14791
|
-
if (authorId !== undefined)
|
|
14792
|
-
query.authorId = authorId;
|
|
14793
|
-
if (downloadId)
|
|
14794
|
-
query.downloadId = downloadId;
|
|
14795
|
-
return getApiV1History2(Object.keys(query).length > 0 ? { query } : {});
|
|
14796
|
-
}
|
|
14797
|
-
async getHistorySince(date, authorId) {
|
|
14798
|
-
const query = { date };
|
|
14799
|
-
if (authorId !== undefined)
|
|
14800
|
-
query.authorId = authorId;
|
|
14801
|
-
return getApiV1HistorySince2({ query });
|
|
14802
|
-
}
|
|
14803
|
-
async getAuthorHistory(authorId, bookId, eventType) {
|
|
14804
|
-
const query = { authorId };
|
|
14805
|
-
if (bookId !== undefined)
|
|
14806
|
-
query.bookId = bookId;
|
|
14807
|
-
if (eventType !== undefined)
|
|
14808
|
-
query.eventType = eventType;
|
|
14809
|
-
return getApiV1HistoryAuthor({ query });
|
|
14810
|
-
}
|
|
14811
|
-
async markHistoryItemFailed(id) {
|
|
14812
|
-
return postApiV1HistoryFailedById2({ path: { id } });
|
|
14813
|
-
}
|
|
14814
|
-
async getQueue(page, pageSize, sortKey, sortDirection, includeUnknownAuthorItems) {
|
|
14815
|
-
const query = {};
|
|
14816
|
-
if (page !== undefined)
|
|
14817
|
-
query.page = page;
|
|
14818
|
-
if (pageSize !== undefined)
|
|
14819
|
-
query.pageSize = pageSize;
|
|
14820
|
-
if (sortKey)
|
|
14821
|
-
query.sortKey = sortKey;
|
|
14822
|
-
if (sortDirection)
|
|
14823
|
-
query.sortDirection = sortDirection;
|
|
14824
|
-
if (includeUnknownAuthorItems !== undefined)
|
|
14825
|
-
query.includeUnknownAuthorItems = includeUnknownAuthorItems;
|
|
14826
|
-
return getApiV1Queue2(Object.keys(query).length > 0 ? { query } : {});
|
|
14827
|
-
}
|
|
14828
|
-
async removeQueueItem(id, removeFromClient, blocklist) {
|
|
14829
|
-
const query = {};
|
|
14830
|
-
if (removeFromClient !== undefined)
|
|
14831
|
-
query.removeFromClient = removeFromClient;
|
|
14832
|
-
if (blocklist !== undefined)
|
|
14833
|
-
query.blocklist = blocklist;
|
|
14834
|
-
return deleteApiV1QueueById2({
|
|
14835
|
-
path: { id },
|
|
14836
|
-
...Object.keys(query).length > 0 ? { query } : {}
|
|
14837
|
-
});
|
|
14838
|
-
}
|
|
14839
|
-
async removeQueueItemsBulk(ids, removeFromClient, blocklist) {
|
|
14840
|
-
const query = {};
|
|
14841
|
-
if (removeFromClient !== undefined)
|
|
14842
|
-
query.removeFromClient = removeFromClient;
|
|
14843
|
-
if (blocklist !== undefined)
|
|
14844
|
-
query.blocklist = blocklist;
|
|
14845
|
-
return deleteApiV1QueueBulk2({
|
|
14846
|
-
body: { ids },
|
|
14847
|
-
...Object.keys(query).length > 0 ? { query } : {}
|
|
14848
|
-
});
|
|
14849
|
-
}
|
|
14850
|
-
async grabQueueItem(id) {
|
|
14851
|
-
return postApiV1QueueGrabById2({ path: { id } });
|
|
14852
|
-
}
|
|
14853
|
-
async grabQueueItemsBulk(ids) {
|
|
14854
|
-
return postApiV1QueueGrabBulk2({ body: { ids } });
|
|
14855
|
-
}
|
|
14856
|
-
async getQueueDetails(authorId, includeUnknownAuthorItems) {
|
|
14857
|
-
const query = {};
|
|
14858
|
-
if (authorId !== undefined)
|
|
14859
|
-
query.authorId = authorId;
|
|
14860
|
-
if (includeUnknownAuthorItems !== undefined)
|
|
14861
|
-
query.includeUnknownAuthorItems = includeUnknownAuthorItems;
|
|
14862
|
-
return getApiV1QueueDetails2(Object.keys(query).length > 0 ? { query } : {});
|
|
14863
|
-
}
|
|
14864
|
-
async getQueueStatus() {
|
|
14865
|
-
return getApiV1QueueStatus2();
|
|
14866
|
-
}
|
|
14867
|
-
async getBlocklist(page, pageSize, sortKey, sortDirection) {
|
|
14868
|
-
const query = {};
|
|
14869
|
-
if (page !== undefined)
|
|
14870
|
-
query.page = page;
|
|
14871
|
-
if (pageSize !== undefined)
|
|
14872
|
-
query.pageSize = pageSize;
|
|
14873
|
-
if (sortKey)
|
|
14874
|
-
query.sortKey = sortKey;
|
|
14875
|
-
if (sortDirection)
|
|
14876
|
-
query.sortDirection = sortDirection;
|
|
14877
|
-
return getApiV1Blocklist2(Object.keys(query).length > 0 ? { query } : {});
|
|
14878
|
-
}
|
|
14879
|
-
async removeBlocklistItem(id) {
|
|
14880
|
-
return deleteApiV1BlocklistById2({ path: { id } });
|
|
14881
|
-
}
|
|
14882
|
-
async removeBlocklistItemsBulk(ids) {
|
|
14883
|
-
return deleteApiV1BlocklistBulk2({ body: { ids } });
|
|
14884
|
-
}
|
|
14885
|
-
async getWantedMissing(page, pageSize, sortKey, sortDirection, monitored) {
|
|
14886
|
-
const query = { includeAuthor: true };
|
|
14887
|
-
if (page !== undefined)
|
|
14888
|
-
query.page = page;
|
|
14889
|
-
if (pageSize !== undefined)
|
|
14890
|
-
query.pageSize = pageSize;
|
|
14891
|
-
if (sortKey)
|
|
14892
|
-
query.sortKey = sortKey;
|
|
14893
|
-
if (sortDirection)
|
|
14894
|
-
query.sortDirection = sortDirection;
|
|
14895
|
-
if (monitored !== undefined)
|
|
14896
|
-
query.monitored = monitored;
|
|
14897
|
-
return getApiV1WantedMissing2(Object.keys(query).length > 0 ? { query } : {});
|
|
14898
|
-
}
|
|
14899
|
-
async getWantedCutoff(page, pageSize, sortKey, sortDirection, monitored) {
|
|
14900
|
-
const query = { includeAuthor: true };
|
|
14901
|
-
if (page !== undefined)
|
|
14902
|
-
query.page = page;
|
|
14903
|
-
if (pageSize !== undefined)
|
|
14904
|
-
query.pageSize = pageSize;
|
|
14905
|
-
if (sortKey)
|
|
14906
|
-
query.sortKey = sortKey;
|
|
14907
|
-
if (sortDirection)
|
|
14908
|
-
query.sortDirection = sortDirection;
|
|
14909
|
-
if (monitored !== undefined)
|
|
14910
|
-
query.monitored = monitored;
|
|
14911
|
-
return getApiV1WantedCutoff2(Object.keys(query).length > 0 ? { query } : {});
|
|
14912
|
-
}
|
|
14913
|
-
updateConfig(newConfig) {
|
|
14914
|
-
const updatedConfig = { ...this.clientConfig.config, ...newConfig };
|
|
14915
|
-
this.clientConfig = createServarrClient(updatedConfig);
|
|
14916
|
-
client4.setConfig({
|
|
14917
|
-
baseUrl: this.clientConfig.getBaseUrl(),
|
|
14918
|
-
headers: this.clientConfig.getHeaders()
|
|
14919
|
-
});
|
|
14920
|
-
return this.clientConfig.config;
|
|
14308
|
+
name: "apikey",
|
|
14309
|
+
type: "apiKey"
|
|
14310
|
+
}],
|
|
14311
|
+
url: "/api/v1/tag/detail",
|
|
14312
|
+
...options
|
|
14313
|
+
}), getApiV1TagDetailById2 = (options) => (options.client ?? client4).get({
|
|
14314
|
+
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
14315
|
+
in: "query",
|
|
14316
|
+
name: "apikey",
|
|
14317
|
+
type: "apiKey"
|
|
14318
|
+
}],
|
|
14319
|
+
url: "/api/v1/tag/detail/{id}",
|
|
14320
|
+
...options
|
|
14321
|
+
}), getApiV1ConfigUiById2 = (options) => (options.client ?? client4).get({
|
|
14322
|
+
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
14323
|
+
in: "query",
|
|
14324
|
+
name: "apikey",
|
|
14325
|
+
type: "apiKey"
|
|
14326
|
+
}],
|
|
14327
|
+
url: "/api/v1/config/ui/{id}",
|
|
14328
|
+
...options
|
|
14329
|
+
}), putApiV1ConfigUiById2 = (options) => (options.client ?? client4).put({
|
|
14330
|
+
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
14331
|
+
in: "query",
|
|
14332
|
+
name: "apikey",
|
|
14333
|
+
type: "apiKey"
|
|
14334
|
+
}],
|
|
14335
|
+
url: "/api/v1/config/ui/{id}",
|
|
14336
|
+
...options,
|
|
14337
|
+
headers: {
|
|
14338
|
+
"Content-Type": "application/json",
|
|
14339
|
+
...options.headers
|
|
14921
14340
|
}
|
|
14922
|
-
}
|
|
14341
|
+
}), getApiV1ConfigUi2 = (options) => (options?.client ?? client4).get({
|
|
14342
|
+
security: [{ name: "X-Api-Key", type: "apiKey" }, {
|
|
14343
|
+
in: "query",
|
|
14344
|
+
name: "apikey",
|
|
14345
|
+
type: "apiKey"
|
|
14346
|
+
}],
|
|
14347
|
+
url: "/api/v1/config/ui",
|
|
14348
|
+
...options
|
|
14349
|
+
});
|
|
14350
|
+
var init_sdk_gen4 = __esm(() => {
|
|
14351
|
+
init_client_gen8();
|
|
14352
|
+
});
|
|
14353
|
+
|
|
14354
|
+
// src/generated/readarr/index.ts
|
|
14355
|
+
var init_readarr = __esm(() => {
|
|
14356
|
+
init_sdk_gen4();
|
|
14357
|
+
});
|
|
14358
|
+
|
|
14359
|
+
// src/clients/readarr.ts
|
|
14360
|
+
var exports_readarr = {};
|
|
14361
|
+
__export(exports_readarr, {
|
|
14362
|
+
ReadarrClient: () => ReadarrClient
|
|
14363
|
+
});
|
|
14364
|
+
var ReadarrClient;
|
|
14923
14365
|
var init_readarr2 = __esm(() => {
|
|
14924
|
-
|
|
14366
|
+
init_base();
|
|
14925
14367
|
init_client_gen8();
|
|
14926
14368
|
init_readarr();
|
|
14369
|
+
ReadarrClient = class ReadarrClient extends ServarrBaseClient {
|
|
14370
|
+
ops = {
|
|
14371
|
+
getSystemStatus: getApiV1SystemStatus2,
|
|
14372
|
+
getHealth: getApiV1Health2,
|
|
14373
|
+
getTags: getApiV1Tag2,
|
|
14374
|
+
createTag: postApiV1Tag2,
|
|
14375
|
+
getTagById: getApiV1TagById2,
|
|
14376
|
+
updateTagById: putApiV1TagById2,
|
|
14377
|
+
deleteTagById: deleteApiV1TagById2,
|
|
14378
|
+
getTagDetails: getApiV1TagDetail2,
|
|
14379
|
+
getTagDetailById: getApiV1TagDetailById2,
|
|
14380
|
+
getNotifications: getApiV1Notification2,
|
|
14381
|
+
createNotification: postApiV1Notification2,
|
|
14382
|
+
getNotificationById: getApiV1NotificationById2,
|
|
14383
|
+
updateNotificationById: putApiV1NotificationById2,
|
|
14384
|
+
deleteNotificationById: deleteApiV1NotificationById2,
|
|
14385
|
+
getNotificationSchema: getApiV1NotificationSchema2,
|
|
14386
|
+
testNotification: postApiV1NotificationTest2,
|
|
14387
|
+
testAllNotifications: postApiV1NotificationTestall2,
|
|
14388
|
+
getDownloadClients: getApiV1Downloadclient2,
|
|
14389
|
+
createDownloadClient: postApiV1Downloadclient2,
|
|
14390
|
+
getDownloadClientById: getApiV1DownloadclientById2,
|
|
14391
|
+
updateDownloadClientById: putApiV1DownloadclientById2,
|
|
14392
|
+
deleteDownloadClientById: deleteApiV1DownloadclientById2,
|
|
14393
|
+
getDownloadClientSchema: getApiV1DownloadclientSchema2,
|
|
14394
|
+
testDownloadClient: postApiV1DownloadclientTest2,
|
|
14395
|
+
testAllDownloadClients: postApiV1DownloadclientTestall2,
|
|
14396
|
+
getIndexers: getApiV1Indexer2,
|
|
14397
|
+
createIndexer: postApiV1Indexer2,
|
|
14398
|
+
getIndexerById: getApiV1IndexerById2,
|
|
14399
|
+
updateIndexerById: putApiV1IndexerById2,
|
|
14400
|
+
deleteIndexerById: deleteApiV1IndexerById2,
|
|
14401
|
+
getIndexerSchema: getApiV1IndexerSchema2,
|
|
14402
|
+
testIndexer: postApiV1IndexerTest2,
|
|
14403
|
+
testAllIndexers: postApiV1IndexerTestall2,
|
|
14404
|
+
restartSystem: postApiV1SystemRestart2,
|
|
14405
|
+
shutdownSystem: postApiV1SystemShutdown2,
|
|
14406
|
+
getBackups: getApiV1SystemBackup2,
|
|
14407
|
+
deleteBackup: deleteApiV1SystemBackupById2,
|
|
14408
|
+
restoreBackup: postApiV1SystemBackupRestoreById2,
|
|
14409
|
+
uploadBackup: postApiV1SystemBackupRestoreUpload2,
|
|
14410
|
+
getLogFiles: getApiV1LogFile2,
|
|
14411
|
+
getLogFileByName: getApiV1LogFileByFilename2,
|
|
14412
|
+
runCommand: postApiV1Command2,
|
|
14413
|
+
getCommands: getApiV1Command2,
|
|
14414
|
+
getHostConfig: getApiV1ConfigHost2,
|
|
14415
|
+
getHostConfigById: getApiV1ConfigHostById2,
|
|
14416
|
+
updateHostConfig: putApiV1ConfigHostById2,
|
|
14417
|
+
getUiConfig: getApiV1ConfigUi2,
|
|
14418
|
+
getUiConfigById: getApiV1ConfigUiById2,
|
|
14419
|
+
updateUiConfig: putApiV1ConfigUiById2
|
|
14420
|
+
};
|
|
14421
|
+
constructor(config) {
|
|
14422
|
+
super(config, client4);
|
|
14423
|
+
}
|
|
14424
|
+
async getAuthors() {
|
|
14425
|
+
return getApiV1Author();
|
|
14426
|
+
}
|
|
14427
|
+
async getAuthor(id) {
|
|
14428
|
+
return getApiV1AuthorById({ path: { id } });
|
|
14429
|
+
}
|
|
14430
|
+
async addAuthor(author) {
|
|
14431
|
+
return postApiV1Author({ body: author });
|
|
14432
|
+
}
|
|
14433
|
+
async updateAuthor(id, author) {
|
|
14434
|
+
return putApiV1AuthorById({ path: { id: String(id) }, body: author });
|
|
14435
|
+
}
|
|
14436
|
+
async deleteAuthor(id) {
|
|
14437
|
+
return deleteApiV1AuthorById({ path: { id } });
|
|
14438
|
+
}
|
|
14439
|
+
async getBooks() {
|
|
14440
|
+
return getApiV1Book();
|
|
14441
|
+
}
|
|
14442
|
+
async getBook(id) {
|
|
14443
|
+
return getApiV1BookById({ path: { id } });
|
|
14444
|
+
}
|
|
14445
|
+
async searchAuthors(term) {
|
|
14446
|
+
return getApiV1AuthorLookup({ query: { term } });
|
|
14447
|
+
}
|
|
14448
|
+
async getRootFolders() {
|
|
14449
|
+
return getApiV1Rootfolder2();
|
|
14450
|
+
}
|
|
14451
|
+
async addRootFolder(path) {
|
|
14452
|
+
return postApiV1Rootfolder2({
|
|
14453
|
+
body: { path }
|
|
14454
|
+
});
|
|
14455
|
+
}
|
|
14456
|
+
async deleteRootFolder(id) {
|
|
14457
|
+
return deleteApiV1RootfolderById2({ path: { id } });
|
|
14458
|
+
}
|
|
14459
|
+
async getNamingConfig() {
|
|
14460
|
+
return getApiV1ConfigNaming2();
|
|
14461
|
+
}
|
|
14462
|
+
async getNamingConfigById(id) {
|
|
14463
|
+
return getApiV1ConfigNamingById2({ path: { id } });
|
|
14464
|
+
}
|
|
14465
|
+
async updateNamingConfig(id, config) {
|
|
14466
|
+
return putApiV1ConfigNamingById2({ path: { id: String(id) }, body: config });
|
|
14467
|
+
}
|
|
14468
|
+
async getNamingConfigExamples() {
|
|
14469
|
+
return getApiV1ConfigNamingExamples2();
|
|
14470
|
+
}
|
|
14471
|
+
async getMediaManagementConfig() {
|
|
14472
|
+
return getApiV1ConfigMediamanagement2();
|
|
14473
|
+
}
|
|
14474
|
+
async getMediaManagementConfigById(id) {
|
|
14475
|
+
return getApiV1ConfigMediamanagementById2({ path: { id } });
|
|
14476
|
+
}
|
|
14477
|
+
async updateMediaManagementConfig(id, config) {
|
|
14478
|
+
return putApiV1ConfigMediamanagementById2({ path: { id: String(id) }, body: config });
|
|
14479
|
+
}
|
|
14480
|
+
async getDevelopmentConfig() {
|
|
14481
|
+
return getApiV1ConfigDevelopment();
|
|
14482
|
+
}
|
|
14483
|
+
async getDevelopmentConfigById(id) {
|
|
14484
|
+
return getApiV1ConfigDevelopmentById({ path: { id } });
|
|
14485
|
+
}
|
|
14486
|
+
async updateDevelopmentConfig(id, config) {
|
|
14487
|
+
return putApiV1ConfigDevelopmentById({ path: { id: String(id) }, body: config });
|
|
14488
|
+
}
|
|
14489
|
+
async getMetadataProviderConfig() {
|
|
14490
|
+
return getApiV1ConfigMetadataprovider2();
|
|
14491
|
+
}
|
|
14492
|
+
async getMetadataProviderConfigById(id) {
|
|
14493
|
+
return getApiV1ConfigMetadataproviderById2({ path: { id } });
|
|
14494
|
+
}
|
|
14495
|
+
async updateMetadataProviderConfig(id, config) {
|
|
14496
|
+
return putApiV1ConfigMetadataproviderById2({
|
|
14497
|
+
path: { id: String(id) },
|
|
14498
|
+
body: config
|
|
14499
|
+
});
|
|
14500
|
+
}
|
|
14501
|
+
async getSystemLogs() {
|
|
14502
|
+
return getApiV1Log2();
|
|
14503
|
+
}
|
|
14504
|
+
async getDiskSpace() {
|
|
14505
|
+
return getApiV1Diskspace2();
|
|
14506
|
+
}
|
|
14507
|
+
async addBook(book) {
|
|
14508
|
+
return postApiV1Book({ body: book });
|
|
14509
|
+
}
|
|
14510
|
+
async updateBook(id, book) {
|
|
14511
|
+
return putApiV1BookById({ path: { id: String(id) }, body: book });
|
|
14512
|
+
}
|
|
14513
|
+
async deleteBook(id) {
|
|
14514
|
+
return deleteApiV1BookById({ path: { id } });
|
|
14515
|
+
}
|
|
14516
|
+
async searchBooks(term) {
|
|
14517
|
+
return getApiV1BookLookup({ query: { term } });
|
|
14518
|
+
}
|
|
14519
|
+
async getCalendar(start, end, unmonitored) {
|
|
14520
|
+
const query = { includeAuthor: true };
|
|
14521
|
+
if (start)
|
|
14522
|
+
query.start = start;
|
|
14523
|
+
if (end)
|
|
14524
|
+
query.end = end;
|
|
14525
|
+
if (unmonitored !== undefined)
|
|
14526
|
+
query.unmonitored = unmonitored;
|
|
14527
|
+
return getApiV1Calendar2(Object.keys(query).length > 0 ? { query } : {});
|
|
14528
|
+
}
|
|
14529
|
+
async getCalendarFeed(pastDays, futureDays, tagList) {
|
|
14530
|
+
const query = {};
|
|
14531
|
+
if (pastDays !== undefined)
|
|
14532
|
+
query.pastDays = pastDays;
|
|
14533
|
+
if (futureDays !== undefined)
|
|
14534
|
+
query.futureDays = futureDays;
|
|
14535
|
+
if (tagList)
|
|
14536
|
+
query.tagList = tagList;
|
|
14537
|
+
return getFeedV1CalendarReadarrIcs(Object.keys(query).length > 0 ? { query } : {});
|
|
14538
|
+
}
|
|
14539
|
+
async getBookFiles(authorId, bookFileIds, bookId, unmapped) {
|
|
14540
|
+
const query = {};
|
|
14541
|
+
if (authorId !== undefined)
|
|
14542
|
+
query.authorId = authorId;
|
|
14543
|
+
if (bookFileIds !== undefined)
|
|
14544
|
+
query.bookFileIds = bookFileIds;
|
|
14545
|
+
if (bookId !== undefined)
|
|
14546
|
+
query.bookId = bookId;
|
|
14547
|
+
if (unmapped !== undefined)
|
|
14548
|
+
query.unmapped = unmapped;
|
|
14549
|
+
return getApiV1Bookfile(Object.keys(query).length > 0 ? { query } : {});
|
|
14550
|
+
}
|
|
14551
|
+
async getBookFile(id) {
|
|
14552
|
+
return getApiV1BookfileById({ path: { id } });
|
|
14553
|
+
}
|
|
14554
|
+
async updateBookFile(id, bookFile) {
|
|
14555
|
+
return putApiV1BookfileById({ path: { id }, body: bookFile });
|
|
14556
|
+
}
|
|
14557
|
+
async deleteBookFile(id) {
|
|
14558
|
+
return deleteApiV1BookfileById({ path: { id } });
|
|
14559
|
+
}
|
|
14560
|
+
async updateBookFilesEditor(bookFileList) {
|
|
14561
|
+
return putApiV1BookfileEditor({ body: bookFileList });
|
|
14562
|
+
}
|
|
14563
|
+
async deleteBookFilesBulk(bookFileList) {
|
|
14564
|
+
return deleteApiV1BookfileBulk({ body: bookFileList });
|
|
14565
|
+
}
|
|
14566
|
+
async getQualityProfiles() {
|
|
14567
|
+
return getApiV1Qualityprofile2();
|
|
14568
|
+
}
|
|
14569
|
+
async getQualityProfile(id) {
|
|
14570
|
+
return getApiV1QualityprofileById2({ path: { id } });
|
|
14571
|
+
}
|
|
14572
|
+
async addQualityProfile(profile) {
|
|
14573
|
+
return postApiV1Qualityprofile2({ body: profile });
|
|
14574
|
+
}
|
|
14575
|
+
async updateQualityProfile(id, profile) {
|
|
14576
|
+
return putApiV1QualityprofileById2({ path: { id: String(id) }, body: profile });
|
|
14577
|
+
}
|
|
14578
|
+
async deleteQualityProfile(id) {
|
|
14579
|
+
return deleteApiV1QualityprofileById2({ path: { id } });
|
|
14580
|
+
}
|
|
14581
|
+
async getQualityProfileSchema() {
|
|
14582
|
+
return getApiV1QualityprofileSchema2();
|
|
14583
|
+
}
|
|
14584
|
+
async getCustomFormats() {
|
|
14585
|
+
return getApiV1Customformat2();
|
|
14586
|
+
}
|
|
14587
|
+
async getCustomFormat(id) {
|
|
14588
|
+
return getApiV1CustomformatById2({ path: { id } });
|
|
14589
|
+
}
|
|
14590
|
+
async addCustomFormat(format) {
|
|
14591
|
+
return postApiV1Customformat2({ body: format });
|
|
14592
|
+
}
|
|
14593
|
+
async updateCustomFormat(id, format) {
|
|
14594
|
+
return putApiV1CustomformatById2({ path: { id: String(id) }, body: format });
|
|
14595
|
+
}
|
|
14596
|
+
async deleteCustomFormat(id) {
|
|
14597
|
+
return deleteApiV1CustomformatById2({ path: { id } });
|
|
14598
|
+
}
|
|
14599
|
+
async getCustomFormatSchema() {
|
|
14600
|
+
return getApiV1CustomformatSchema2();
|
|
14601
|
+
}
|
|
14602
|
+
async getImportLists() {
|
|
14603
|
+
return getApiV1Importlist2();
|
|
14604
|
+
}
|
|
14605
|
+
async getImportList(id) {
|
|
14606
|
+
return getApiV1ImportlistById2({ path: { id } });
|
|
14607
|
+
}
|
|
14608
|
+
async addImportList(importList) {
|
|
14609
|
+
return postApiV1Importlist2({ body: importList });
|
|
14610
|
+
}
|
|
14611
|
+
async updateImportList(id, importList) {
|
|
14612
|
+
return putApiV1ImportlistById2({ path: { id: String(id) }, body: importList });
|
|
14613
|
+
}
|
|
14614
|
+
async deleteImportList(id) {
|
|
14615
|
+
return deleteApiV1ImportlistById2({ path: { id } });
|
|
14616
|
+
}
|
|
14617
|
+
async getImportListSchema() {
|
|
14618
|
+
return getApiV1ImportlistSchema2();
|
|
14619
|
+
}
|
|
14620
|
+
async testImportList(importList) {
|
|
14621
|
+
return postApiV1ImportlistTest2({ body: importList });
|
|
14622
|
+
}
|
|
14623
|
+
async testAllImportLists() {
|
|
14624
|
+
return postApiV1ImportlistTestall2();
|
|
14625
|
+
}
|
|
14626
|
+
async getHistory(page, pageSize, sortKey, sortDirection, authorId, downloadId) {
|
|
14627
|
+
const query = {};
|
|
14628
|
+
if (page !== undefined)
|
|
14629
|
+
query.page = page;
|
|
14630
|
+
if (pageSize !== undefined)
|
|
14631
|
+
query.pageSize = pageSize;
|
|
14632
|
+
if (sortKey)
|
|
14633
|
+
query.sortKey = sortKey;
|
|
14634
|
+
if (sortDirection)
|
|
14635
|
+
query.sortDirection = sortDirection;
|
|
14636
|
+
if (authorId !== undefined)
|
|
14637
|
+
query.authorId = authorId;
|
|
14638
|
+
if (downloadId)
|
|
14639
|
+
query.downloadId = downloadId;
|
|
14640
|
+
return getApiV1History2(Object.keys(query).length > 0 ? { query } : {});
|
|
14641
|
+
}
|
|
14642
|
+
async getHistorySince(date, authorId) {
|
|
14643
|
+
const query = { date };
|
|
14644
|
+
if (authorId !== undefined)
|
|
14645
|
+
query.authorId = authorId;
|
|
14646
|
+
return getApiV1HistorySince2({ query });
|
|
14647
|
+
}
|
|
14648
|
+
async getAuthorHistory(authorId, bookId, eventType) {
|
|
14649
|
+
const query = { authorId };
|
|
14650
|
+
if (bookId !== undefined)
|
|
14651
|
+
query.bookId = bookId;
|
|
14652
|
+
if (eventType !== undefined)
|
|
14653
|
+
query.eventType = eventType;
|
|
14654
|
+
return getApiV1HistoryAuthor({ query });
|
|
14655
|
+
}
|
|
14656
|
+
async markHistoryItemFailed(id) {
|
|
14657
|
+
return postApiV1HistoryFailedById2({ path: { id } });
|
|
14658
|
+
}
|
|
14659
|
+
async getQueue(page, pageSize, sortKey, sortDirection, includeUnknownAuthorItems) {
|
|
14660
|
+
const query = {};
|
|
14661
|
+
if (page !== undefined)
|
|
14662
|
+
query.page = page;
|
|
14663
|
+
if (pageSize !== undefined)
|
|
14664
|
+
query.pageSize = pageSize;
|
|
14665
|
+
if (sortKey)
|
|
14666
|
+
query.sortKey = sortKey;
|
|
14667
|
+
if (sortDirection)
|
|
14668
|
+
query.sortDirection = sortDirection;
|
|
14669
|
+
if (includeUnknownAuthorItems !== undefined)
|
|
14670
|
+
query.includeUnknownAuthorItems = includeUnknownAuthorItems;
|
|
14671
|
+
return getApiV1Queue2(Object.keys(query).length > 0 ? { query } : {});
|
|
14672
|
+
}
|
|
14673
|
+
async removeQueueItem(id, removeFromClient, blocklist) {
|
|
14674
|
+
const query = {};
|
|
14675
|
+
if (removeFromClient !== undefined)
|
|
14676
|
+
query.removeFromClient = removeFromClient;
|
|
14677
|
+
if (blocklist !== undefined)
|
|
14678
|
+
query.blocklist = blocklist;
|
|
14679
|
+
return deleteApiV1QueueById2({
|
|
14680
|
+
path: { id },
|
|
14681
|
+
...Object.keys(query).length > 0 ? { query } : {}
|
|
14682
|
+
});
|
|
14683
|
+
}
|
|
14684
|
+
async removeQueueItemsBulk(ids, removeFromClient, blocklist) {
|
|
14685
|
+
const query = {};
|
|
14686
|
+
if (removeFromClient !== undefined)
|
|
14687
|
+
query.removeFromClient = removeFromClient;
|
|
14688
|
+
if (blocklist !== undefined)
|
|
14689
|
+
query.blocklist = blocklist;
|
|
14690
|
+
return deleteApiV1QueueBulk2({
|
|
14691
|
+
body: { ids },
|
|
14692
|
+
...Object.keys(query).length > 0 ? { query } : {}
|
|
14693
|
+
});
|
|
14694
|
+
}
|
|
14695
|
+
async grabQueueItem(id) {
|
|
14696
|
+
return postApiV1QueueGrabById2({ path: { id } });
|
|
14697
|
+
}
|
|
14698
|
+
async grabQueueItemsBulk(ids) {
|
|
14699
|
+
return postApiV1QueueGrabBulk2({ body: { ids } });
|
|
14700
|
+
}
|
|
14701
|
+
async getQueueDetails(authorId, includeUnknownAuthorItems) {
|
|
14702
|
+
const query = {};
|
|
14703
|
+
if (authorId !== undefined)
|
|
14704
|
+
query.authorId = authorId;
|
|
14705
|
+
if (includeUnknownAuthorItems !== undefined)
|
|
14706
|
+
query.includeUnknownAuthorItems = includeUnknownAuthorItems;
|
|
14707
|
+
return getApiV1QueueDetails2(Object.keys(query).length > 0 ? { query } : {});
|
|
14708
|
+
}
|
|
14709
|
+
async getQueueStatus() {
|
|
14710
|
+
return getApiV1QueueStatus2();
|
|
14711
|
+
}
|
|
14712
|
+
async getBlocklist(page, pageSize, sortKey, sortDirection) {
|
|
14713
|
+
const query = {};
|
|
14714
|
+
if (page !== undefined)
|
|
14715
|
+
query.page = page;
|
|
14716
|
+
if (pageSize !== undefined)
|
|
14717
|
+
query.pageSize = pageSize;
|
|
14718
|
+
if (sortKey)
|
|
14719
|
+
query.sortKey = sortKey;
|
|
14720
|
+
if (sortDirection)
|
|
14721
|
+
query.sortDirection = sortDirection;
|
|
14722
|
+
return getApiV1Blocklist2(Object.keys(query).length > 0 ? { query } : {});
|
|
14723
|
+
}
|
|
14724
|
+
async removeBlocklistItem(id) {
|
|
14725
|
+
return deleteApiV1BlocklistById2({ path: { id } });
|
|
14726
|
+
}
|
|
14727
|
+
async removeBlocklistItemsBulk(ids) {
|
|
14728
|
+
return deleteApiV1BlocklistBulk2({ body: { ids } });
|
|
14729
|
+
}
|
|
14730
|
+
async getWantedMissing(page, pageSize, sortKey, sortDirection, monitored) {
|
|
14731
|
+
const query = { includeAuthor: true };
|
|
14732
|
+
if (page !== undefined)
|
|
14733
|
+
query.page = page;
|
|
14734
|
+
if (pageSize !== undefined)
|
|
14735
|
+
query.pageSize = pageSize;
|
|
14736
|
+
if (sortKey)
|
|
14737
|
+
query.sortKey = sortKey;
|
|
14738
|
+
if (sortDirection)
|
|
14739
|
+
query.sortDirection = sortDirection;
|
|
14740
|
+
if (monitored !== undefined)
|
|
14741
|
+
query.monitored = monitored;
|
|
14742
|
+
return getApiV1WantedMissing2(Object.keys(query).length > 0 ? { query } : {});
|
|
14743
|
+
}
|
|
14744
|
+
async getWantedCutoff(page, pageSize, sortKey, sortDirection, monitored) {
|
|
14745
|
+
const query = { includeAuthor: true };
|
|
14746
|
+
if (page !== undefined)
|
|
14747
|
+
query.page = page;
|
|
14748
|
+
if (pageSize !== undefined)
|
|
14749
|
+
query.pageSize = pageSize;
|
|
14750
|
+
if (sortKey)
|
|
14751
|
+
query.sortKey = sortKey;
|
|
14752
|
+
if (sortDirection)
|
|
14753
|
+
query.sortDirection = sortDirection;
|
|
14754
|
+
if (monitored !== undefined)
|
|
14755
|
+
query.monitored = monitored;
|
|
14756
|
+
return getApiV1WantedCutoff2(Object.keys(query).length > 0 ? { query } : {});
|
|
14757
|
+
}
|
|
14758
|
+
};
|
|
14927
14759
|
});
|
|
14928
14760
|
|
|
14929
14761
|
// src/cli/commands/readarr.ts
|
|
14930
14762
|
var exports_readarr3 = {};
|
|
14931
14763
|
__export(exports_readarr3, {
|
|
14764
|
+
resources: () => resources4,
|
|
14932
14765
|
readarr: () => readarr
|
|
14933
14766
|
});
|
|
14934
14767
|
function withAuthorName(item) {
|
|
@@ -16894,227 +16727,114 @@ var exports_prowlarr = {};
|
|
|
16894
16727
|
__export(exports_prowlarr, {
|
|
16895
16728
|
ProwlarrClient: () => ProwlarrClient
|
|
16896
16729
|
});
|
|
16897
|
-
|
|
16898
|
-
class ProwlarrClient {
|
|
16899
|
-
clientConfig;
|
|
16900
|
-
constructor(config) {
|
|
16901
|
-
this.clientConfig = createServarrClient(config);
|
|
16902
|
-
client5.setConfig({
|
|
16903
|
-
baseUrl: this.clientConfig.getBaseUrl(),
|
|
16904
|
-
headers: this.clientConfig.getHeaders()
|
|
16905
|
-
});
|
|
16906
|
-
}
|
|
16907
|
-
async getSystemStatus() {
|
|
16908
|
-
return getApiV1SystemStatus3();
|
|
16909
|
-
}
|
|
16910
|
-
async getHealth() {
|
|
16911
|
-
return getApiV1Health3();
|
|
16912
|
-
}
|
|
16913
|
-
async getIndexers() {
|
|
16914
|
-
return getApiV1Indexer3();
|
|
16915
|
-
}
|
|
16916
|
-
async getIndexer(id) {
|
|
16917
|
-
return getApiV1IndexerById3({ path: { id } });
|
|
16918
|
-
}
|
|
16919
|
-
async addIndexer(indexer) {
|
|
16920
|
-
return postApiV1Indexer3({ body: indexer });
|
|
16921
|
-
}
|
|
16922
|
-
async updateIndexer(id, indexer) {
|
|
16923
|
-
return putApiV1IndexerById3({ path: { id: String(id) }, body: indexer });
|
|
16924
|
-
}
|
|
16925
|
-
async deleteIndexer(id) {
|
|
16926
|
-
return deleteApiV1IndexerById3({ path: { id } });
|
|
16927
|
-
}
|
|
16928
|
-
async getIndexerStats() {
|
|
16929
|
-
return getApiV1Indexerstats();
|
|
16930
|
-
}
|
|
16931
|
-
async getDownloadClients() {
|
|
16932
|
-
return getApiV1Downloadclient3();
|
|
16933
|
-
}
|
|
16934
|
-
async getDownloadClient(id) {
|
|
16935
|
-
return getApiV1DownloadclientById3({ path: { id } });
|
|
16936
|
-
}
|
|
16937
|
-
async addDownloadClient(downloadClient) {
|
|
16938
|
-
return postApiV1Downloadclient3({ body: downloadClient });
|
|
16939
|
-
}
|
|
16940
|
-
async updateDownloadClient(id, downloadClient) {
|
|
16941
|
-
return putApiV1DownloadclientById3({
|
|
16942
|
-
path: { id: String(id) },
|
|
16943
|
-
body: downloadClient
|
|
16944
|
-
});
|
|
16945
|
-
}
|
|
16946
|
-
async deleteDownloadClient(id) {
|
|
16947
|
-
return deleteApiV1DownloadclientById3({ path: { id } });
|
|
16948
|
-
}
|
|
16949
|
-
async testDownloadClient(downloadClient) {
|
|
16950
|
-
return postApiV1DownloadclientTest3({ body: downloadClient });
|
|
16951
|
-
}
|
|
16952
|
-
async testAllDownloadClients() {
|
|
16953
|
-
return postApiV1DownloadclientTestall3();
|
|
16954
|
-
}
|
|
16955
|
-
async getDownloadClientSchema() {
|
|
16956
|
-
return getApiV1DownloadclientSchema3();
|
|
16957
|
-
}
|
|
16958
|
-
async search(query, indexerIds) {
|
|
16959
|
-
return getApiV1Search3({
|
|
16960
|
-
query: {
|
|
16961
|
-
query,
|
|
16962
|
-
...indexerIds && { indexerIds }
|
|
16963
|
-
}
|
|
16964
|
-
});
|
|
16965
|
-
}
|
|
16966
|
-
async getApplications() {
|
|
16967
|
-
return getApiV1Applications();
|
|
16968
|
-
}
|
|
16969
|
-
async runCommand(command) {
|
|
16970
|
-
return postApiV1Command3({ body: command });
|
|
16971
|
-
}
|
|
16972
|
-
async getCommands() {
|
|
16973
|
-
return getApiV1Command3();
|
|
16974
|
-
}
|
|
16975
|
-
async getHostConfig() {
|
|
16976
|
-
return getApiV1ConfigHost3();
|
|
16977
|
-
}
|
|
16978
|
-
async getHostConfigById(id) {
|
|
16979
|
-
return getApiV1ConfigHostById3({ path: { id } });
|
|
16980
|
-
}
|
|
16981
|
-
async updateHostConfig(id, config) {
|
|
16982
|
-
return putApiV1ConfigHostById3({ path: { id: String(id) }, body: config });
|
|
16983
|
-
}
|
|
16984
|
-
async getUiConfig() {
|
|
16985
|
-
return getApiV1ConfigUi3();
|
|
16986
|
-
}
|
|
16987
|
-
async getUiConfigById(id) {
|
|
16988
|
-
return getApiV1ConfigUiById3({ path: { id } });
|
|
16989
|
-
}
|
|
16990
|
-
async updateUiConfig(id, config) {
|
|
16991
|
-
return putApiV1ConfigUiById3({ path: { id: String(id) }, body: config });
|
|
16992
|
-
}
|
|
16993
|
-
async getDevelopmentConfig() {
|
|
16994
|
-
return getApiV1ConfigDevelopment2();
|
|
16995
|
-
}
|
|
16996
|
-
async getDevelopmentConfigById(id) {
|
|
16997
|
-
return getApiV1ConfigDevelopmentById2({ path: { id } });
|
|
16998
|
-
}
|
|
16999
|
-
async updateDevelopmentConfig(id, config) {
|
|
17000
|
-
return putApiV1ConfigDevelopmentById2({ path: { id: String(id) }, body: config });
|
|
17001
|
-
}
|
|
17002
|
-
async restartSystem() {
|
|
17003
|
-
return postApiV1SystemRestart3();
|
|
17004
|
-
}
|
|
17005
|
-
async shutdownSystem() {
|
|
17006
|
-
return postApiV1SystemShutdown3();
|
|
17007
|
-
}
|
|
17008
|
-
async getSystemBackups() {
|
|
17009
|
-
return getApiV1SystemBackup3();
|
|
17010
|
-
}
|
|
17011
|
-
async deleteSystemBackup(id) {
|
|
17012
|
-
return deleteApiV1SystemBackupById3({ path: { id } });
|
|
17013
|
-
}
|
|
17014
|
-
async restoreSystemBackup(id) {
|
|
17015
|
-
return postApiV1SystemBackupRestoreById3({ path: { id } });
|
|
17016
|
-
}
|
|
17017
|
-
async uploadSystemBackup() {
|
|
17018
|
-
return postApiV1SystemBackupRestoreUpload3();
|
|
17019
|
-
}
|
|
17020
|
-
async getSystemLogs() {
|
|
17021
|
-
return getApiV1Log3();
|
|
17022
|
-
}
|
|
17023
|
-
async getLogFiles() {
|
|
17024
|
-
return getApiV1LogFile3();
|
|
17025
|
-
}
|
|
17026
|
-
async getLogFileByName(filename) {
|
|
17027
|
-
return getApiV1LogFileByFilename3({ path: { filename } });
|
|
17028
|
-
}
|
|
17029
|
-
async getTags() {
|
|
17030
|
-
return getApiV1Tag3();
|
|
17031
|
-
}
|
|
17032
|
-
async addTag(tag) {
|
|
17033
|
-
return postApiV1Tag3({ body: tag });
|
|
17034
|
-
}
|
|
17035
|
-
async getTag(id) {
|
|
17036
|
-
return getApiV1TagById3({ path: { id } });
|
|
17037
|
-
}
|
|
17038
|
-
async updateTag(id, tag) {
|
|
17039
|
-
return putApiV1TagById3({ path: { id: String(id) }, body: tag });
|
|
17040
|
-
}
|
|
17041
|
-
async deleteTag(id) {
|
|
17042
|
-
return deleteApiV1TagById3({ path: { id } });
|
|
17043
|
-
}
|
|
17044
|
-
async getTagDetails() {
|
|
17045
|
-
return getApiV1TagDetail3();
|
|
17046
|
-
}
|
|
17047
|
-
async getTagDetailById(id) {
|
|
17048
|
-
return getApiV1TagDetailById3({ path: { id } });
|
|
17049
|
-
}
|
|
17050
|
-
async getApplication(id) {
|
|
17051
|
-
return getApiV1ApplicationsById({ path: { id } });
|
|
17052
|
-
}
|
|
17053
|
-
async addApplication(application) {
|
|
17054
|
-
return postApiV1Applications({ body: application });
|
|
17055
|
-
}
|
|
17056
|
-
async updateApplication(id, application) {
|
|
17057
|
-
return putApiV1ApplicationsById({ path: { id: String(id) }, body: application });
|
|
17058
|
-
}
|
|
17059
|
-
async deleteApplication(id) {
|
|
17060
|
-
return deleteApiV1ApplicationsById({ path: { id } });
|
|
17061
|
-
}
|
|
17062
|
-
async testApplication(application) {
|
|
17063
|
-
return postApiV1ApplicationsTest({ body: application });
|
|
17064
|
-
}
|
|
17065
|
-
async testAllApplications() {
|
|
17066
|
-
return postApiV1ApplicationsTestall();
|
|
17067
|
-
}
|
|
17068
|
-
async getApplicationSchema() {
|
|
17069
|
-
return getApiV1ApplicationsSchema();
|
|
17070
|
-
}
|
|
17071
|
-
async getIndexerSchema() {
|
|
17072
|
-
return getApiV1IndexerSchema3();
|
|
17073
|
-
}
|
|
17074
|
-
async testIndexer(indexer) {
|
|
17075
|
-
return postApiV1IndexerTest3({ body: indexer });
|
|
17076
|
-
}
|
|
17077
|
-
async testAllIndexers() {
|
|
17078
|
-
return postApiV1IndexerTestall3();
|
|
17079
|
-
}
|
|
17080
|
-
async getNotifications() {
|
|
17081
|
-
return getApiV1Notification3();
|
|
17082
|
-
}
|
|
17083
|
-
async getNotification(id) {
|
|
17084
|
-
return getApiV1NotificationById3({ path: { id } });
|
|
17085
|
-
}
|
|
17086
|
-
async addNotification(notification) {
|
|
17087
|
-
return postApiV1Notification3({ body: notification });
|
|
17088
|
-
}
|
|
17089
|
-
async updateNotification(id, notification) {
|
|
17090
|
-
return putApiV1NotificationById3({ path: { id: String(id) }, body: notification });
|
|
17091
|
-
}
|
|
17092
|
-
async deleteNotification(id) {
|
|
17093
|
-
return deleteApiV1NotificationById3({ path: { id } });
|
|
17094
|
-
}
|
|
17095
|
-
async getNotificationSchema() {
|
|
17096
|
-
return getApiV1NotificationSchema3();
|
|
17097
|
-
}
|
|
17098
|
-
async testNotification(notification) {
|
|
17099
|
-
return postApiV1NotificationTest3({ body: notification });
|
|
17100
|
-
}
|
|
17101
|
-
async testAllNotifications() {
|
|
17102
|
-
return postApiV1NotificationTestall3();
|
|
17103
|
-
}
|
|
17104
|
-
updateConfig(newConfig) {
|
|
17105
|
-
const updatedConfig = { ...this.clientConfig.config, ...newConfig };
|
|
17106
|
-
this.clientConfig = createServarrClient(updatedConfig);
|
|
17107
|
-
client5.setConfig({
|
|
17108
|
-
baseUrl: this.clientConfig.getBaseUrl(),
|
|
17109
|
-
headers: this.clientConfig.getHeaders()
|
|
17110
|
-
});
|
|
17111
|
-
return this.clientConfig.config;
|
|
17112
|
-
}
|
|
17113
|
-
}
|
|
16730
|
+
var ProwlarrClient;
|
|
17114
16731
|
var init_prowlarr2 = __esm(() => {
|
|
17115
|
-
|
|
16732
|
+
init_base();
|
|
17116
16733
|
init_client_gen10();
|
|
17117
16734
|
init_prowlarr();
|
|
16735
|
+
ProwlarrClient = class ProwlarrClient extends ServarrBaseClient {
|
|
16736
|
+
ops = {
|
|
16737
|
+
getSystemStatus: getApiV1SystemStatus3,
|
|
16738
|
+
getHealth: getApiV1Health3,
|
|
16739
|
+
getTags: getApiV1Tag3,
|
|
16740
|
+
createTag: postApiV1Tag3,
|
|
16741
|
+
getTagById: getApiV1TagById3,
|
|
16742
|
+
updateTagById: putApiV1TagById3,
|
|
16743
|
+
deleteTagById: deleteApiV1TagById3,
|
|
16744
|
+
getTagDetails: getApiV1TagDetail3,
|
|
16745
|
+
getTagDetailById: getApiV1TagDetailById3,
|
|
16746
|
+
getNotifications: getApiV1Notification3,
|
|
16747
|
+
createNotification: postApiV1Notification3,
|
|
16748
|
+
getNotificationById: getApiV1NotificationById3,
|
|
16749
|
+
updateNotificationById: putApiV1NotificationById3,
|
|
16750
|
+
deleteNotificationById: deleteApiV1NotificationById3,
|
|
16751
|
+
getNotificationSchema: getApiV1NotificationSchema3,
|
|
16752
|
+
testNotification: postApiV1NotificationTest3,
|
|
16753
|
+
testAllNotifications: postApiV1NotificationTestall3,
|
|
16754
|
+
getDownloadClients: getApiV1Downloadclient3,
|
|
16755
|
+
createDownloadClient: postApiV1Downloadclient3,
|
|
16756
|
+
getDownloadClientById: getApiV1DownloadclientById3,
|
|
16757
|
+
updateDownloadClientById: putApiV1DownloadclientById3,
|
|
16758
|
+
deleteDownloadClientById: deleteApiV1DownloadclientById3,
|
|
16759
|
+
getDownloadClientSchema: getApiV1DownloadclientSchema3,
|
|
16760
|
+
testDownloadClient: postApiV1DownloadclientTest3,
|
|
16761
|
+
testAllDownloadClients: postApiV1DownloadclientTestall3,
|
|
16762
|
+
getIndexers: getApiV1Indexer3,
|
|
16763
|
+
createIndexer: postApiV1Indexer3,
|
|
16764
|
+
getIndexerById: getApiV1IndexerById3,
|
|
16765
|
+
updateIndexerById: putApiV1IndexerById3,
|
|
16766
|
+
deleteIndexerById: deleteApiV1IndexerById3,
|
|
16767
|
+
getIndexerSchema: getApiV1IndexerSchema3,
|
|
16768
|
+
testIndexer: postApiV1IndexerTest3,
|
|
16769
|
+
testAllIndexers: postApiV1IndexerTestall3,
|
|
16770
|
+
restartSystem: postApiV1SystemRestart3,
|
|
16771
|
+
shutdownSystem: postApiV1SystemShutdown3,
|
|
16772
|
+
getBackups: getApiV1SystemBackup3,
|
|
16773
|
+
deleteBackup: deleteApiV1SystemBackupById3,
|
|
16774
|
+
restoreBackup: postApiV1SystemBackupRestoreById3,
|
|
16775
|
+
uploadBackup: postApiV1SystemBackupRestoreUpload3,
|
|
16776
|
+
getLogFiles: getApiV1LogFile3,
|
|
16777
|
+
getLogFileByName: getApiV1LogFileByFilename3,
|
|
16778
|
+
runCommand: postApiV1Command3,
|
|
16779
|
+
getCommands: getApiV1Command3,
|
|
16780
|
+
getHostConfig: getApiV1ConfigHost3,
|
|
16781
|
+
getHostConfigById: getApiV1ConfigHostById3,
|
|
16782
|
+
updateHostConfig: putApiV1ConfigHostById3,
|
|
16783
|
+
getUiConfig: getApiV1ConfigUi3,
|
|
16784
|
+
getUiConfigById: getApiV1ConfigUiById3,
|
|
16785
|
+
updateUiConfig: putApiV1ConfigUiById3
|
|
16786
|
+
};
|
|
16787
|
+
constructor(config) {
|
|
16788
|
+
super(config, client5);
|
|
16789
|
+
}
|
|
16790
|
+
async getIndexerStats() {
|
|
16791
|
+
return getApiV1Indexerstats();
|
|
16792
|
+
}
|
|
16793
|
+
async search(query, indexerIds) {
|
|
16794
|
+
return getApiV1Search3({
|
|
16795
|
+
query: {
|
|
16796
|
+
query,
|
|
16797
|
+
...indexerIds && { indexerIds }
|
|
16798
|
+
}
|
|
16799
|
+
});
|
|
16800
|
+
}
|
|
16801
|
+
async getApplications() {
|
|
16802
|
+
return getApiV1Applications();
|
|
16803
|
+
}
|
|
16804
|
+
async getApplication(id) {
|
|
16805
|
+
return getApiV1ApplicationsById({ path: { id } });
|
|
16806
|
+
}
|
|
16807
|
+
async addApplication(application) {
|
|
16808
|
+
return postApiV1Applications({ body: application });
|
|
16809
|
+
}
|
|
16810
|
+
async updateApplication(id, application) {
|
|
16811
|
+
return putApiV1ApplicationsById({ path: { id: String(id) }, body: application });
|
|
16812
|
+
}
|
|
16813
|
+
async deleteApplication(id) {
|
|
16814
|
+
return deleteApiV1ApplicationsById({ path: { id } });
|
|
16815
|
+
}
|
|
16816
|
+
async testApplication(application) {
|
|
16817
|
+
return postApiV1ApplicationsTest({ body: application });
|
|
16818
|
+
}
|
|
16819
|
+
async testAllApplications() {
|
|
16820
|
+
return postApiV1ApplicationsTestall();
|
|
16821
|
+
}
|
|
16822
|
+
async getApplicationSchema() {
|
|
16823
|
+
return getApiV1ApplicationsSchema();
|
|
16824
|
+
}
|
|
16825
|
+
async getDevelopmentConfig() {
|
|
16826
|
+
return getApiV1ConfigDevelopment2();
|
|
16827
|
+
}
|
|
16828
|
+
async getDevelopmentConfigById(id) {
|
|
16829
|
+
return getApiV1ConfigDevelopmentById2({ path: { id } });
|
|
16830
|
+
}
|
|
16831
|
+
async updateDevelopmentConfig(id, config) {
|
|
16832
|
+
return putApiV1ConfigDevelopmentById2({ path: { id: String(id) }, body: config });
|
|
16833
|
+
}
|
|
16834
|
+
async getSystemLogs() {
|
|
16835
|
+
return getApiV1Log3();
|
|
16836
|
+
}
|
|
16837
|
+
};
|
|
17118
16838
|
});
|
|
17119
16839
|
|
|
17120
16840
|
// src/cli/commands/prowlarr.ts
|
|
@@ -18590,7 +18310,8 @@ class BazarrClient {
|
|
|
18590
18310
|
client6.setConfig({
|
|
18591
18311
|
baseUrl: getBazarrApiBaseUrl(this.clientConfig.getBaseUrl()),
|
|
18592
18312
|
headers: getBazarrHeaders(this.clientConfig),
|
|
18593
|
-
auth: this.clientConfig.config.apiKey
|
|
18313
|
+
auth: this.clientConfig.config.apiKey,
|
|
18314
|
+
fetch: this.clientConfig.getFetch()
|
|
18594
18315
|
});
|
|
18595
18316
|
}
|
|
18596
18317
|
async getSystemStatus() {
|
|
@@ -18931,7 +18652,8 @@ class BazarrClient {
|
|
|
18931
18652
|
client6.setConfig({
|
|
18932
18653
|
baseUrl: getBazarrApiBaseUrl(this.clientConfig.getBaseUrl()),
|
|
18933
18654
|
headers: getBazarrHeaders(this.clientConfig),
|
|
18934
|
-
auth: this.clientConfig.config.apiKey
|
|
18655
|
+
auth: this.clientConfig.config.apiKey,
|
|
18656
|
+
fetch: this.clientConfig.getFetch()
|
|
18935
18657
|
});
|
|
18936
18658
|
return this.clientConfig.config;
|
|
18937
18659
|
}
|
|
@@ -18945,6 +18667,7 @@ var init_bazarr2 = __esm(() => {
|
|
|
18945
18667
|
// src/cli/commands/bazarr.ts
|
|
18946
18668
|
var exports_bazarr3 = {};
|
|
18947
18669
|
__export(exports_bazarr3, {
|
|
18670
|
+
resources: () => resources6,
|
|
18948
18671
|
bazarr: () => bazarr
|
|
18949
18672
|
});
|
|
18950
18673
|
var resources6, bazarr;
|
|
@@ -19964,6 +19687,7 @@ class QBittorrentClient {
|
|
|
19964
19687
|
username;
|
|
19965
19688
|
password;
|
|
19966
19689
|
sid = null;
|
|
19690
|
+
fetch;
|
|
19967
19691
|
constructor(config) {
|
|
19968
19692
|
if (!config.baseUrl) {
|
|
19969
19693
|
throw new ConnectionError("No base URL provided");
|
|
@@ -19971,9 +19695,14 @@ class QBittorrentClient {
|
|
|
19971
19695
|
this.baseUrl = config.baseUrl.replace(/\/$/, "");
|
|
19972
19696
|
this.username = config.username;
|
|
19973
19697
|
this.password = config.password;
|
|
19698
|
+
this.fetch = createResilientFetch({
|
|
19699
|
+
timeout: config.timeout ?? DEFAULT_TIMEOUT_MS2,
|
|
19700
|
+
retry: config.retry
|
|
19701
|
+
});
|
|
19974
19702
|
client7.setConfig({
|
|
19975
19703
|
baseUrl: `${this.baseUrl}/api/v2`,
|
|
19976
|
-
auth: () => this.ensureAuth()
|
|
19704
|
+
auth: () => this.ensureAuth(),
|
|
19705
|
+
fetch: this.fetch
|
|
19977
19706
|
});
|
|
19978
19707
|
}
|
|
19979
19708
|
async ensureAuth() {
|
|
@@ -19983,7 +19712,7 @@ class QBittorrentClient {
|
|
|
19983
19712
|
return this.sid;
|
|
19984
19713
|
}
|
|
19985
19714
|
async login() {
|
|
19986
|
-
const response = await fetch(`${this.baseUrl}/api/v2/auth/login`, {
|
|
19715
|
+
const response = await this.fetch(`${this.baseUrl}/api/v2/auth/login`, {
|
|
19987
19716
|
method: "POST",
|
|
19988
19717
|
headers: {
|
|
19989
19718
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
@@ -20048,8 +19777,10 @@ class QBittorrentClient {
|
|
|
20048
19777
|
});
|
|
20049
19778
|
}
|
|
20050
19779
|
}
|
|
19780
|
+
var DEFAULT_TIMEOUT_MS2 = 30000;
|
|
20051
19781
|
var init_qbittorrent2 = __esm(() => {
|
|
20052
19782
|
init_errors();
|
|
19783
|
+
init_fetch();
|
|
20053
19784
|
init_client_gen14();
|
|
20054
19785
|
init_qbittorrent();
|
|
20055
19786
|
});
|
|
@@ -21053,7 +20784,8 @@ class SeerrClient {
|
|
|
21053
20784
|
headers: {
|
|
21054
20785
|
"X-Api-Key": this.clientConfig.config.apiKey,
|
|
21055
20786
|
...this.clientConfig.config.headers ?? {}
|
|
21056
|
-
}
|
|
20787
|
+
},
|
|
20788
|
+
fetch: this.clientConfig.getFetch()
|
|
21057
20789
|
});
|
|
21058
20790
|
}
|
|
21059
20791
|
async getSystemStatus() {
|
|
@@ -21128,7 +20860,8 @@ class SeerrClient {
|
|
|
21128
20860
|
headers: {
|
|
21129
20861
|
"X-Api-Key": this.clientConfig.config.apiKey,
|
|
21130
20862
|
...this.clientConfig.config.headers ?? {}
|
|
21131
|
-
}
|
|
20863
|
+
},
|
|
20864
|
+
fetch: this.clientConfig.getFetch()
|
|
21132
20865
|
});
|
|
21133
20866
|
return this.clientConfig.config;
|
|
21134
20867
|
}
|
|
@@ -21304,7 +21037,8 @@ function classifyError(error) {
|
|
|
21304
21037
|
return msg;
|
|
21305
21038
|
}
|
|
21306
21039
|
function extractVersion(service, status) {
|
|
21307
|
-
const
|
|
21040
|
+
const statusObj = status;
|
|
21041
|
+
const data = statusObj?.data ?? status;
|
|
21308
21042
|
if (typeof data === "string") {
|
|
21309
21043
|
return null;
|
|
21310
21044
|
}
|
|
@@ -21314,7 +21048,7 @@ function extractVersion(service, status) {
|
|
|
21314
21048
|
if (service === "qbittorrent" || service === "seerr") {
|
|
21315
21049
|
return data?.version ?? null;
|
|
21316
21050
|
}
|
|
21317
|
-
return data?.version ??
|
|
21051
|
+
return data?.version ?? statusObj?.version ?? null;
|
|
21318
21052
|
}
|
|
21319
21053
|
var clientFactories, doctor;
|
|
21320
21054
|
var init_doctor = __esm(() => {
|
|
@@ -21493,8 +21227,9 @@ async function testConnection(service, serviceConfig) {
|
|
|
21493
21227
|
consola.success(`Connected to ${service}${serviceConfig.name ? ` (${serviceConfig.name})` : ""} v${version}`);
|
|
21494
21228
|
}
|
|
21495
21229
|
}
|
|
21496
|
-
} catch {
|
|
21230
|
+
} catch (error) {
|
|
21497
21231
|
consola.warn(`Could not connect to ${service}${serviceConfig.name ? ` (${serviceConfig.name})` : ""} — config saved anyway.`);
|
|
21232
|
+
consola.debug("Connection test error:", error);
|
|
21498
21233
|
}
|
|
21499
21234
|
}
|
|
21500
21235
|
var DEFAULT_PORTS, configInit, configSet, configGet, configShow, config;
|
|
@@ -21879,7 +21614,7 @@ init_dist();
|
|
|
21879
21614
|
// package.json
|
|
21880
21615
|
var package_default = {
|
|
21881
21616
|
name: "tsarr",
|
|
21882
|
-
version: "2.
|
|
21617
|
+
version: "2.10.0",
|
|
21883
21618
|
author: "Robbe Verhelst",
|
|
21884
21619
|
repository: {
|
|
21885
21620
|
type: "git",
|
|
@@ -21966,7 +21701,7 @@ var package_default = {
|
|
|
21966
21701
|
},
|
|
21967
21702
|
description: "Type-safe TypeScript SDK for Servarr APIs (Radarr, Sonarr, etc.)",
|
|
21968
21703
|
engines: {
|
|
21969
|
-
node: ">=24.
|
|
21704
|
+
node: ">=24.15.0"
|
|
21970
21705
|
},
|
|
21971
21706
|
files: [
|
|
21972
21707
|
"dist",
|
|
@@ -22011,8 +21746,6 @@ var package_default = {
|
|
|
22011
21746
|
generate: "bun run scripts/generate.ts",
|
|
22012
21747
|
"refresh:specs": "bun run scripts/refresh-specs.ts",
|
|
22013
21748
|
"generate:types": "bun run scripts/generate-type-exports.ts",
|
|
22014
|
-
"generate:radarr": "bun run scripts/generate-radarr.ts",
|
|
22015
|
-
"generate:sonarr": "bun run scripts/generate-sonarr.ts",
|
|
22016
21749
|
clean: "rm -rf src/generated && rm -rf dist",
|
|
22017
21750
|
docs: "typedoc",
|
|
22018
21751
|
"docs:serve": "typedoc --serve",
|