fix: properly catch before fallback mount
This commit is contained in:
parent
583393eb47
commit
02fe55b533
8 changed files with 325 additions and 256 deletions
|
|
@ -3,12 +3,7 @@
|
||||||
import { createSseClient } from "../core/serverSentEvents.gen";
|
import { createSseClient } from "../core/serverSentEvents.gen";
|
||||||
import type { HttpMethod } from "../core/types.gen";
|
import type { HttpMethod } from "../core/types.gen";
|
||||||
import { getValidRequestBody } from "../core/utils.gen";
|
import { getValidRequestBody } from "../core/utils.gen";
|
||||||
import type {
|
import type { Client, Config, RequestOptions, ResolvedRequestOptions } from "./types.gen";
|
||||||
Client,
|
|
||||||
Config,
|
|
||||||
RequestOptions,
|
|
||||||
ResolvedRequestOptions,
|
|
||||||
} from "./types.gen";
|
|
||||||
import {
|
import {
|
||||||
buildUrl,
|
buildUrl,
|
||||||
createConfig,
|
createConfig,
|
||||||
|
|
@ -34,12 +29,7 @@ export const createClient = (config: Config = {}): Client => {
|
||||||
return getConfig();
|
return getConfig();
|
||||||
};
|
};
|
||||||
|
|
||||||
const interceptors = createInterceptors<
|
const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();
|
||||||
Request,
|
|
||||||
Response,
|
|
||||||
unknown,
|
|
||||||
ResolvedRequestOptions
|
|
||||||
>();
|
|
||||||
|
|
||||||
const beforeRequest = async (options: RequestOptions) => {
|
const beforeRequest = async (options: RequestOptions) => {
|
||||||
const opts = {
|
const opts = {
|
||||||
|
|
@ -105,12 +95,7 @@ export const createClient = (config: Config = {}): Client => {
|
||||||
|
|
||||||
for (const fn of interceptors.error.fns) {
|
for (const fn of interceptors.error.fns) {
|
||||||
if (fn) {
|
if (fn) {
|
||||||
finalError = (await fn(
|
finalError = (await fn(error, undefined as any, request, opts)) as unknown;
|
||||||
error,
|
|
||||||
undefined as any,
|
|
||||||
request,
|
|
||||||
opts,
|
|
||||||
)) as unknown;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -143,14 +128,9 @@ export const createClient = (config: Config = {}): Client => {
|
||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
const parseAs =
|
const parseAs =
|
||||||
(opts.parseAs === "auto"
|
(opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
|
||||||
? getParseAs(response.headers.get("Content-Type"))
|
|
||||||
: opts.parseAs) ?? "json";
|
|
||||||
|
|
||||||
if (
|
if (response.status === 204 || response.headers.get("Content-Length") === "0") {
|
||||||
response.status === 204 ||
|
|
||||||
response.headers.get("Content-Length") === "0"
|
|
||||||
) {
|
|
||||||
let emptyData: any;
|
let emptyData: any;
|
||||||
switch (parseAs) {
|
switch (parseAs) {
|
||||||
case "arrayBuffer":
|
case "arrayBuffer":
|
||||||
|
|
@ -246,30 +226,28 @@ export const createClient = (config: Config = {}): Client => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const makeMethodFn =
|
const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) => request({ ...options, method });
|
||||||
(method: Uppercase<HttpMethod>) => (options: RequestOptions) =>
|
|
||||||
request({ ...options, method });
|
|
||||||
|
|
||||||
const makeSseFn =
|
const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {
|
||||||
(method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {
|
const { opts, url } = await beforeRequest(options);
|
||||||
const { opts, url } = await beforeRequest(options);
|
return createSseClient({
|
||||||
return createSseClient({
|
...opts,
|
||||||
...opts,
|
body: opts.body as BodyInit | null | undefined,
|
||||||
body: opts.body as BodyInit | null | undefined,
|
headers: opts.headers as unknown as Record<string, string>,
|
||||||
headers: opts.headers as unknown as Record<string, string>,
|
method,
|
||||||
method,
|
onRequest: async (url, init) => {
|
||||||
onRequest: async (url, init) => {
|
let request = new Request(url, init);
|
||||||
let request = new Request(url, init);
|
for (const fn of interceptors.request.fns) {
|
||||||
for (const fn of interceptors.request.fns) {
|
if (fn) {
|
||||||
if (fn) {
|
request = await fn(request, opts);
|
||||||
request = await fn(request, opts);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return request;
|
}
|
||||||
},
|
return request;
|
||||||
url,
|
},
|
||||||
});
|
serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,
|
||||||
};
|
url,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
buildUrl,
|
buildUrl,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,217 @@
|
||||||
// This file is auto-generated by @hey-api/openapi-ts
|
// This file is auto-generated by @hey-api/openapi-ts
|
||||||
|
|
||||||
export type * from "./types.gen";
|
export {
|
||||||
export * from "./sdk.gen";
|
browseFilesystem,
|
||||||
|
createBackupSchedule,
|
||||||
|
createNotificationDestination,
|
||||||
|
createRepository,
|
||||||
|
createVolume,
|
||||||
|
deleteBackupSchedule,
|
||||||
|
deleteNotificationDestination,
|
||||||
|
deleteRepository,
|
||||||
|
deleteSnapshot,
|
||||||
|
deleteSnapshots,
|
||||||
|
deleteVolume,
|
||||||
|
doctorRepository,
|
||||||
|
downloadResticPassword,
|
||||||
|
getBackupSchedule,
|
||||||
|
getBackupScheduleForVolume,
|
||||||
|
getMirrorCompatibility,
|
||||||
|
getNotificationDestination,
|
||||||
|
getRepository,
|
||||||
|
getScheduleMirrors,
|
||||||
|
getScheduleNotifications,
|
||||||
|
getSnapshotDetails,
|
||||||
|
getStatus,
|
||||||
|
getSystemInfo,
|
||||||
|
getUpdates,
|
||||||
|
getVolume,
|
||||||
|
healthCheckVolume,
|
||||||
|
listBackupSchedules,
|
||||||
|
listFiles,
|
||||||
|
listNotificationDestinations,
|
||||||
|
listRcloneRemotes,
|
||||||
|
listRepositories,
|
||||||
|
listSnapshotFiles,
|
||||||
|
listSnapshots,
|
||||||
|
listVolumes,
|
||||||
|
mountVolume,
|
||||||
|
type Options,
|
||||||
|
reorderBackupSchedules,
|
||||||
|
restoreSnapshot,
|
||||||
|
runBackupNow,
|
||||||
|
runForget,
|
||||||
|
stopBackup,
|
||||||
|
tagSnapshots,
|
||||||
|
testConnection,
|
||||||
|
testNotificationDestination,
|
||||||
|
unmountVolume,
|
||||||
|
updateBackupSchedule,
|
||||||
|
updateNotificationDestination,
|
||||||
|
updateRepository,
|
||||||
|
updateScheduleMirrors,
|
||||||
|
updateScheduleNotifications,
|
||||||
|
updateVolume,
|
||||||
|
} from "./sdk.gen";
|
||||||
|
export type {
|
||||||
|
BrowseFilesystemData,
|
||||||
|
BrowseFilesystemResponse,
|
||||||
|
BrowseFilesystemResponses,
|
||||||
|
ClientOptions,
|
||||||
|
CreateBackupScheduleData,
|
||||||
|
CreateBackupScheduleResponse,
|
||||||
|
CreateBackupScheduleResponses,
|
||||||
|
CreateNotificationDestinationData,
|
||||||
|
CreateNotificationDestinationResponse,
|
||||||
|
CreateNotificationDestinationResponses,
|
||||||
|
CreateRepositoryData,
|
||||||
|
CreateRepositoryResponse,
|
||||||
|
CreateRepositoryResponses,
|
||||||
|
CreateVolumeData,
|
||||||
|
CreateVolumeResponse,
|
||||||
|
CreateVolumeResponses,
|
||||||
|
DeleteBackupScheduleData,
|
||||||
|
DeleteBackupScheduleResponse,
|
||||||
|
DeleteBackupScheduleResponses,
|
||||||
|
DeleteNotificationDestinationData,
|
||||||
|
DeleteNotificationDestinationErrors,
|
||||||
|
DeleteNotificationDestinationResponse,
|
||||||
|
DeleteNotificationDestinationResponses,
|
||||||
|
DeleteRepositoryData,
|
||||||
|
DeleteRepositoryResponse,
|
||||||
|
DeleteRepositoryResponses,
|
||||||
|
DeleteSnapshotData,
|
||||||
|
DeleteSnapshotResponse,
|
||||||
|
DeleteSnapshotResponses,
|
||||||
|
DeleteSnapshotsData,
|
||||||
|
DeleteSnapshotsResponse,
|
||||||
|
DeleteSnapshotsResponses,
|
||||||
|
DeleteVolumeData,
|
||||||
|
DeleteVolumeResponse,
|
||||||
|
DeleteVolumeResponses,
|
||||||
|
DoctorRepositoryData,
|
||||||
|
DoctorRepositoryResponse,
|
||||||
|
DoctorRepositoryResponses,
|
||||||
|
DownloadResticPasswordData,
|
||||||
|
DownloadResticPasswordResponse,
|
||||||
|
DownloadResticPasswordResponses,
|
||||||
|
GetBackupScheduleData,
|
||||||
|
GetBackupScheduleForVolumeData,
|
||||||
|
GetBackupScheduleForVolumeResponse,
|
||||||
|
GetBackupScheduleForVolumeResponses,
|
||||||
|
GetBackupScheduleResponse,
|
||||||
|
GetBackupScheduleResponses,
|
||||||
|
GetMirrorCompatibilityData,
|
||||||
|
GetMirrorCompatibilityResponse,
|
||||||
|
GetMirrorCompatibilityResponses,
|
||||||
|
GetNotificationDestinationData,
|
||||||
|
GetNotificationDestinationErrors,
|
||||||
|
GetNotificationDestinationResponse,
|
||||||
|
GetNotificationDestinationResponses,
|
||||||
|
GetRepositoryData,
|
||||||
|
GetRepositoryResponse,
|
||||||
|
GetRepositoryResponses,
|
||||||
|
GetScheduleMirrorsData,
|
||||||
|
GetScheduleMirrorsResponse,
|
||||||
|
GetScheduleMirrorsResponses,
|
||||||
|
GetScheduleNotificationsData,
|
||||||
|
GetScheduleNotificationsResponse,
|
||||||
|
GetScheduleNotificationsResponses,
|
||||||
|
GetSnapshotDetailsData,
|
||||||
|
GetSnapshotDetailsResponse,
|
||||||
|
GetSnapshotDetailsResponses,
|
||||||
|
GetStatusData,
|
||||||
|
GetStatusResponse,
|
||||||
|
GetStatusResponses,
|
||||||
|
GetSystemInfoData,
|
||||||
|
GetSystemInfoResponse,
|
||||||
|
GetSystemInfoResponses,
|
||||||
|
GetUpdatesData,
|
||||||
|
GetUpdatesResponse,
|
||||||
|
GetUpdatesResponses,
|
||||||
|
GetVolumeData,
|
||||||
|
GetVolumeErrors,
|
||||||
|
GetVolumeResponse,
|
||||||
|
GetVolumeResponses,
|
||||||
|
HealthCheckVolumeData,
|
||||||
|
HealthCheckVolumeErrors,
|
||||||
|
HealthCheckVolumeResponse,
|
||||||
|
HealthCheckVolumeResponses,
|
||||||
|
ListBackupSchedulesData,
|
||||||
|
ListBackupSchedulesResponse,
|
||||||
|
ListBackupSchedulesResponses,
|
||||||
|
ListFilesData,
|
||||||
|
ListFilesResponse,
|
||||||
|
ListFilesResponses,
|
||||||
|
ListNotificationDestinationsData,
|
||||||
|
ListNotificationDestinationsResponse,
|
||||||
|
ListNotificationDestinationsResponses,
|
||||||
|
ListRcloneRemotesData,
|
||||||
|
ListRcloneRemotesResponse,
|
||||||
|
ListRcloneRemotesResponses,
|
||||||
|
ListRepositoriesData,
|
||||||
|
ListRepositoriesResponse,
|
||||||
|
ListRepositoriesResponses,
|
||||||
|
ListSnapshotFilesData,
|
||||||
|
ListSnapshotFilesResponse,
|
||||||
|
ListSnapshotFilesResponses,
|
||||||
|
ListSnapshotsData,
|
||||||
|
ListSnapshotsResponse,
|
||||||
|
ListSnapshotsResponses,
|
||||||
|
ListVolumesData,
|
||||||
|
ListVolumesResponse,
|
||||||
|
ListVolumesResponses,
|
||||||
|
MountVolumeData,
|
||||||
|
MountVolumeResponse,
|
||||||
|
MountVolumeResponses,
|
||||||
|
ReorderBackupSchedulesData,
|
||||||
|
ReorderBackupSchedulesResponse,
|
||||||
|
ReorderBackupSchedulesResponses,
|
||||||
|
RestoreSnapshotData,
|
||||||
|
RestoreSnapshotResponse,
|
||||||
|
RestoreSnapshotResponses,
|
||||||
|
RunBackupNowData,
|
||||||
|
RunBackupNowResponse,
|
||||||
|
RunBackupNowResponses,
|
||||||
|
RunForgetData,
|
||||||
|
RunForgetResponse,
|
||||||
|
RunForgetResponses,
|
||||||
|
StopBackupData,
|
||||||
|
StopBackupErrors,
|
||||||
|
StopBackupResponse,
|
||||||
|
StopBackupResponses,
|
||||||
|
TagSnapshotsData,
|
||||||
|
TagSnapshotsResponse,
|
||||||
|
TagSnapshotsResponses,
|
||||||
|
TestConnectionData,
|
||||||
|
TestConnectionResponse,
|
||||||
|
TestConnectionResponses,
|
||||||
|
TestNotificationDestinationData,
|
||||||
|
TestNotificationDestinationErrors,
|
||||||
|
TestNotificationDestinationResponse,
|
||||||
|
TestNotificationDestinationResponses,
|
||||||
|
UnmountVolumeData,
|
||||||
|
UnmountVolumeResponse,
|
||||||
|
UnmountVolumeResponses,
|
||||||
|
UpdateBackupScheduleData,
|
||||||
|
UpdateBackupScheduleResponse,
|
||||||
|
UpdateBackupScheduleResponses,
|
||||||
|
UpdateNotificationDestinationData,
|
||||||
|
UpdateNotificationDestinationErrors,
|
||||||
|
UpdateNotificationDestinationResponse,
|
||||||
|
UpdateNotificationDestinationResponses,
|
||||||
|
UpdateRepositoryData,
|
||||||
|
UpdateRepositoryErrors,
|
||||||
|
UpdateRepositoryResponse,
|
||||||
|
UpdateRepositoryResponses,
|
||||||
|
UpdateScheduleMirrorsData,
|
||||||
|
UpdateScheduleMirrorsResponse,
|
||||||
|
UpdateScheduleMirrorsResponses,
|
||||||
|
UpdateScheduleNotificationsData,
|
||||||
|
UpdateScheduleNotificationsResponse,
|
||||||
|
UpdateScheduleNotificationsResponses,
|
||||||
|
UpdateVolumeData,
|
||||||
|
UpdateVolumeErrors,
|
||||||
|
UpdateVolumeResponse,
|
||||||
|
UpdateVolumeResponses,
|
||||||
|
} from "./types.gen";
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ export type ListVolumesResponses = {
|
||||||
server: string;
|
server: string;
|
||||||
share: string;
|
share: string;
|
||||||
username: string;
|
username: string;
|
||||||
vers?: "1.0" | "2.0" | "2.1" | "3.0";
|
vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto";
|
||||||
port?: number;
|
port?: number;
|
||||||
domain?: string;
|
domain?: string;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
|
|
@ -100,8 +100,7 @@ export type ListVolumesResponses = {
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ListVolumesResponse =
|
export type ListVolumesResponse = ListVolumesResponses[keyof ListVolumesResponses];
|
||||||
ListVolumesResponses[keyof ListVolumesResponses];
|
|
||||||
|
|
||||||
export type CreateVolumeData = {
|
export type CreateVolumeData = {
|
||||||
body?: {
|
body?: {
|
||||||
|
|
@ -143,7 +142,7 @@ export type CreateVolumeData = {
|
||||||
server: string;
|
server: string;
|
||||||
share: string;
|
share: string;
|
||||||
username: string;
|
username: string;
|
||||||
vers?: "1.0" | "2.0" | "2.1" | "3.0";
|
vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto";
|
||||||
port?: number;
|
port?: number;
|
||||||
domain?: string;
|
domain?: string;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
|
|
@ -209,7 +208,7 @@ export type CreateVolumeResponses = {
|
||||||
server: string;
|
server: string;
|
||||||
share: string;
|
share: string;
|
||||||
username: string;
|
username: string;
|
||||||
vers?: "1.0" | "2.0" | "2.1" | "3.0";
|
vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto";
|
||||||
port?: number;
|
port?: number;
|
||||||
domain?: string;
|
domain?: string;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
|
|
@ -236,8 +235,7 @@ export type CreateVolumeResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type CreateVolumeResponse =
|
export type CreateVolumeResponse = CreateVolumeResponses[keyof CreateVolumeResponses];
|
||||||
CreateVolumeResponses[keyof CreateVolumeResponses];
|
|
||||||
|
|
||||||
export type TestConnectionData = {
|
export type TestConnectionData = {
|
||||||
body?: {
|
body?: {
|
||||||
|
|
@ -279,7 +277,7 @@ export type TestConnectionData = {
|
||||||
server: string;
|
server: string;
|
||||||
share: string;
|
share: string;
|
||||||
username: string;
|
username: string;
|
||||||
vers?: "1.0" | "2.0" | "2.1" | "3.0";
|
vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto";
|
||||||
port?: number;
|
port?: number;
|
||||||
domain?: string;
|
domain?: string;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
|
|
@ -310,8 +308,7 @@ export type TestConnectionResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TestConnectionResponse =
|
export type TestConnectionResponse = TestConnectionResponses[keyof TestConnectionResponses];
|
||||||
TestConnectionResponses[keyof TestConnectionResponses];
|
|
||||||
|
|
||||||
export type DeleteVolumeData = {
|
export type DeleteVolumeData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -331,8 +328,7 @@ export type DeleteVolumeResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DeleteVolumeResponse =
|
export type DeleteVolumeResponse = DeleteVolumeResponses[keyof DeleteVolumeResponses];
|
||||||
DeleteVolumeResponses[keyof DeleteVolumeResponses];
|
|
||||||
|
|
||||||
export type GetVolumeData = {
|
export type GetVolumeData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -400,7 +396,7 @@ export type GetVolumeResponses = {
|
||||||
server: string;
|
server: string;
|
||||||
share: string;
|
share: string;
|
||||||
username: string;
|
username: string;
|
||||||
vers?: "1.0" | "2.0" | "2.1" | "3.0";
|
vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto";
|
||||||
port?: number;
|
port?: number;
|
||||||
domain?: string;
|
domain?: string;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
|
|
@ -471,7 +467,7 @@ export type UpdateVolumeData = {
|
||||||
server: string;
|
server: string;
|
||||||
share: string;
|
share: string;
|
||||||
username: string;
|
username: string;
|
||||||
vers?: "1.0" | "2.0" | "2.1" | "3.0";
|
vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto";
|
||||||
port?: number;
|
port?: number;
|
||||||
domain?: string;
|
domain?: string;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
|
|
@ -546,7 +542,7 @@ export type UpdateVolumeResponses = {
|
||||||
server: string;
|
server: string;
|
||||||
share: string;
|
share: string;
|
||||||
username: string;
|
username: string;
|
||||||
vers?: "1.0" | "2.0" | "2.1" | "3.0";
|
vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto";
|
||||||
port?: number;
|
port?: number;
|
||||||
domain?: string;
|
domain?: string;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
|
|
@ -573,8 +569,7 @@ export type UpdateVolumeResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type UpdateVolumeResponse =
|
export type UpdateVolumeResponse = UpdateVolumeResponses[keyof UpdateVolumeResponses];
|
||||||
UpdateVolumeResponses[keyof UpdateVolumeResponses];
|
|
||||||
|
|
||||||
export type MountVolumeData = {
|
export type MountVolumeData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -595,8 +590,7 @@ export type MountVolumeResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type MountVolumeResponse =
|
export type MountVolumeResponse = MountVolumeResponses[keyof MountVolumeResponses];
|
||||||
MountVolumeResponses[keyof MountVolumeResponses];
|
|
||||||
|
|
||||||
export type UnmountVolumeData = {
|
export type UnmountVolumeData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -617,8 +611,7 @@ export type UnmountVolumeResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type UnmountVolumeResponse =
|
export type UnmountVolumeResponse = UnmountVolumeResponses[keyof UnmountVolumeResponses];
|
||||||
UnmountVolumeResponses[keyof UnmountVolumeResponses];
|
|
||||||
|
|
||||||
export type HealthCheckVolumeData = {
|
export type HealthCheckVolumeData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -646,8 +639,7 @@ export type HealthCheckVolumeResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type HealthCheckVolumeResponse =
|
export type HealthCheckVolumeResponse = HealthCheckVolumeResponses[keyof HealthCheckVolumeResponses];
|
||||||
HealthCheckVolumeResponses[keyof HealthCheckVolumeResponses];
|
|
||||||
|
|
||||||
export type ListFilesData = {
|
export type ListFilesData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -709,8 +701,7 @@ export type BrowseFilesystemResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type BrowseFilesystemResponse =
|
export type BrowseFilesystemResponse = BrowseFilesystemResponses[keyof BrowseFilesystemResponses];
|
||||||
BrowseFilesystemResponses[keyof BrowseFilesystemResponses];
|
|
||||||
|
|
||||||
export type ListRepositoriesData = {
|
export type ListRepositoriesData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -824,8 +815,7 @@ export type ListRepositoriesResponses = {
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ListRepositoriesResponse =
|
export type ListRepositoriesResponse = ListRepositoriesResponses[keyof ListRepositoriesResponses];
|
||||||
ListRepositoriesResponses[keyof ListRepositoriesResponses];
|
|
||||||
|
|
||||||
export type CreateRepositoryData = {
|
export type CreateRepositoryData = {
|
||||||
body?: {
|
body?: {
|
||||||
|
|
@ -938,8 +928,7 @@ export type CreateRepositoryResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type CreateRepositoryResponse =
|
export type CreateRepositoryResponse = CreateRepositoryResponses[keyof CreateRepositoryResponses];
|
||||||
CreateRepositoryResponses[keyof CreateRepositoryResponses];
|
|
||||||
|
|
||||||
export type ListRcloneRemotesData = {
|
export type ListRcloneRemotesData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -958,8 +947,7 @@ export type ListRcloneRemotesResponses = {
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ListRcloneRemotesResponse =
|
export type ListRcloneRemotesResponse = ListRcloneRemotesResponses[keyof ListRcloneRemotesResponses];
|
||||||
ListRcloneRemotesResponses[keyof ListRcloneRemotesResponses];
|
|
||||||
|
|
||||||
export type DeleteRepositoryData = {
|
export type DeleteRepositoryData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -979,8 +967,7 @@ export type DeleteRepositoryResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DeleteRepositoryResponse =
|
export type DeleteRepositoryResponse = DeleteRepositoryResponses[keyof DeleteRepositoryResponses];
|
||||||
DeleteRepositoryResponses[keyof DeleteRepositoryResponses];
|
|
||||||
|
|
||||||
export type GetRepositoryData = {
|
export type GetRepositoryData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -1096,8 +1083,7 @@ export type GetRepositoryResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type GetRepositoryResponse =
|
export type GetRepositoryResponse = GetRepositoryResponses[keyof GetRepositoryResponses];
|
||||||
GetRepositoryResponses[keyof GetRepositoryResponses];
|
|
||||||
|
|
||||||
export type UpdateRepositoryData = {
|
export type UpdateRepositoryData = {
|
||||||
body?: {
|
body?: {
|
||||||
|
|
@ -1227,8 +1213,7 @@ export type UpdateRepositoryResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type UpdateRepositoryResponse =
|
export type UpdateRepositoryResponse = UpdateRepositoryResponses[keyof UpdateRepositoryResponses];
|
||||||
UpdateRepositoryResponses[keyof UpdateRepositoryResponses];
|
|
||||||
|
|
||||||
export type DeleteSnapshotsData = {
|
export type DeleteSnapshotsData = {
|
||||||
body?: {
|
body?: {
|
||||||
|
|
@ -1250,8 +1235,7 @@ export type DeleteSnapshotsResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DeleteSnapshotsResponse =
|
export type DeleteSnapshotsResponse = DeleteSnapshotsResponses[keyof DeleteSnapshotsResponses];
|
||||||
DeleteSnapshotsResponses[keyof DeleteSnapshotsResponses];
|
|
||||||
|
|
||||||
export type ListSnapshotsData = {
|
export type ListSnapshotsData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -1278,8 +1262,7 @@ export type ListSnapshotsResponses = {
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ListSnapshotsResponse =
|
export type ListSnapshotsResponse = ListSnapshotsResponses[keyof ListSnapshotsResponses];
|
||||||
ListSnapshotsResponses[keyof ListSnapshotsResponses];
|
|
||||||
|
|
||||||
export type DeleteSnapshotData = {
|
export type DeleteSnapshotData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -1300,8 +1283,7 @@ export type DeleteSnapshotResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DeleteSnapshotResponse =
|
export type DeleteSnapshotResponse = DeleteSnapshotResponses[keyof DeleteSnapshotResponses];
|
||||||
DeleteSnapshotResponses[keyof DeleteSnapshotResponses];
|
|
||||||
|
|
||||||
export type GetSnapshotDetailsData = {
|
export type GetSnapshotDetailsData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -1327,8 +1309,7 @@ export type GetSnapshotDetailsResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type GetSnapshotDetailsResponse =
|
export type GetSnapshotDetailsResponse = GetSnapshotDetailsResponses[keyof GetSnapshotDetailsResponses];
|
||||||
GetSnapshotDetailsResponses[keyof GetSnapshotDetailsResponses];
|
|
||||||
|
|
||||||
export type ListSnapshotFilesData = {
|
export type ListSnapshotFilesData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -1369,8 +1350,7 @@ export type ListSnapshotFilesResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ListSnapshotFilesResponse =
|
export type ListSnapshotFilesResponse = ListSnapshotFilesResponses[keyof ListSnapshotFilesResponses];
|
||||||
ListSnapshotFilesResponses[keyof ListSnapshotFilesResponses];
|
|
||||||
|
|
||||||
export type RestoreSnapshotData = {
|
export type RestoreSnapshotData = {
|
||||||
body?: {
|
body?: {
|
||||||
|
|
@ -1401,8 +1381,7 @@ export type RestoreSnapshotResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type RestoreSnapshotResponse =
|
export type RestoreSnapshotResponse = RestoreSnapshotResponses[keyof RestoreSnapshotResponses];
|
||||||
RestoreSnapshotResponses[keyof RestoreSnapshotResponses];
|
|
||||||
|
|
||||||
export type DoctorRepositoryData = {
|
export type DoctorRepositoryData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -1428,8 +1407,7 @@ export type DoctorRepositoryResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DoctorRepositoryResponse =
|
export type DoctorRepositoryResponse = DoctorRepositoryResponses[keyof DoctorRepositoryResponses];
|
||||||
DoctorRepositoryResponses[keyof DoctorRepositoryResponses];
|
|
||||||
|
|
||||||
export type TagSnapshotsData = {
|
export type TagSnapshotsData = {
|
||||||
body?: {
|
body?: {
|
||||||
|
|
@ -1454,8 +1432,7 @@ export type TagSnapshotsResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TagSnapshotsResponse =
|
export type TagSnapshotsResponse = TagSnapshotsResponses[keyof TagSnapshotsResponses];
|
||||||
TagSnapshotsResponses[keyof TagSnapshotsResponses];
|
|
||||||
|
|
||||||
export type ListBackupSchedulesData = {
|
export type ListBackupSchedulesData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -1578,15 +1555,7 @@ export type ListBackupSchedulesResponses = {
|
||||||
name: string;
|
name: string;
|
||||||
shortId: string;
|
shortId: string;
|
||||||
status: "error" | "healthy" | "unknown" | null;
|
status: "error" | "healthy" | "unknown" | null;
|
||||||
type:
|
type: "azure" | "gcs" | "local" | "r2" | "rclone" | "rest" | "s3" | "sftp";
|
||||||
| "azure"
|
|
||||||
| "gcs"
|
|
||||||
| "local"
|
|
||||||
| "r2"
|
|
||||||
| "rclone"
|
|
||||||
| "rest"
|
|
||||||
| "s3"
|
|
||||||
| "sftp";
|
|
||||||
updatedAt: number;
|
updatedAt: number;
|
||||||
};
|
};
|
||||||
repositoryId: string;
|
repositoryId: string;
|
||||||
|
|
@ -1641,7 +1610,7 @@ export type ListBackupSchedulesResponses = {
|
||||||
server: string;
|
server: string;
|
||||||
share: string;
|
share: string;
|
||||||
username: string;
|
username: string;
|
||||||
vers?: "1.0" | "2.0" | "2.1" | "3.0";
|
vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto";
|
||||||
port?: number;
|
port?: number;
|
||||||
domain?: string;
|
domain?: string;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
|
|
@ -1670,8 +1639,7 @@ export type ListBackupSchedulesResponses = {
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ListBackupSchedulesResponse =
|
export type ListBackupSchedulesResponse = ListBackupSchedulesResponses[keyof ListBackupSchedulesResponses];
|
||||||
ListBackupSchedulesResponses[keyof ListBackupSchedulesResponses];
|
|
||||||
|
|
||||||
export type CreateBackupScheduleData = {
|
export type CreateBackupScheduleData = {
|
||||||
body?: {
|
body?: {
|
||||||
|
|
@ -1734,8 +1702,7 @@ export type CreateBackupScheduleResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type CreateBackupScheduleResponse =
|
export type CreateBackupScheduleResponse = CreateBackupScheduleResponses[keyof CreateBackupScheduleResponses];
|
||||||
CreateBackupScheduleResponses[keyof CreateBackupScheduleResponses];
|
|
||||||
|
|
||||||
export type DeleteBackupScheduleData = {
|
export type DeleteBackupScheduleData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -1755,8 +1722,7 @@ export type DeleteBackupScheduleResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DeleteBackupScheduleResponse =
|
export type DeleteBackupScheduleResponse = DeleteBackupScheduleResponses[keyof DeleteBackupScheduleResponses];
|
||||||
DeleteBackupScheduleResponses[keyof DeleteBackupScheduleResponses];
|
|
||||||
|
|
||||||
export type GetBackupScheduleData = {
|
export type GetBackupScheduleData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -1881,15 +1847,7 @@ export type GetBackupScheduleResponses = {
|
||||||
name: string;
|
name: string;
|
||||||
shortId: string;
|
shortId: string;
|
||||||
status: "error" | "healthy" | "unknown" | null;
|
status: "error" | "healthy" | "unknown" | null;
|
||||||
type:
|
type: "azure" | "gcs" | "local" | "r2" | "rclone" | "rest" | "s3" | "sftp";
|
||||||
| "azure"
|
|
||||||
| "gcs"
|
|
||||||
| "local"
|
|
||||||
| "r2"
|
|
||||||
| "rclone"
|
|
||||||
| "rest"
|
|
||||||
| "s3"
|
|
||||||
| "sftp";
|
|
||||||
updatedAt: number;
|
updatedAt: number;
|
||||||
};
|
};
|
||||||
repositoryId: string;
|
repositoryId: string;
|
||||||
|
|
@ -1944,7 +1902,7 @@ export type GetBackupScheduleResponses = {
|
||||||
server: string;
|
server: string;
|
||||||
share: string;
|
share: string;
|
||||||
username: string;
|
username: string;
|
||||||
vers?: "1.0" | "2.0" | "2.1" | "3.0";
|
vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto";
|
||||||
port?: number;
|
port?: number;
|
||||||
domain?: string;
|
domain?: string;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
|
|
@ -1973,8 +1931,7 @@ export type GetBackupScheduleResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type GetBackupScheduleResponse =
|
export type GetBackupScheduleResponse = GetBackupScheduleResponses[keyof GetBackupScheduleResponses];
|
||||||
GetBackupScheduleResponses[keyof GetBackupScheduleResponses];
|
|
||||||
|
|
||||||
export type UpdateBackupScheduleData = {
|
export type UpdateBackupScheduleData = {
|
||||||
body?: {
|
body?: {
|
||||||
|
|
@ -2038,8 +1995,7 @@ export type UpdateBackupScheduleResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type UpdateBackupScheduleResponse =
|
export type UpdateBackupScheduleResponse = UpdateBackupScheduleResponses[keyof UpdateBackupScheduleResponses];
|
||||||
UpdateBackupScheduleResponses[keyof UpdateBackupScheduleResponses];
|
|
||||||
|
|
||||||
export type GetBackupScheduleForVolumeData = {
|
export type GetBackupScheduleForVolumeData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -2164,15 +2120,7 @@ export type GetBackupScheduleForVolumeResponses = {
|
||||||
name: string;
|
name: string;
|
||||||
shortId: string;
|
shortId: string;
|
||||||
status: "error" | "healthy" | "unknown" | null;
|
status: "error" | "healthy" | "unknown" | null;
|
||||||
type:
|
type: "azure" | "gcs" | "local" | "r2" | "rclone" | "rest" | "s3" | "sftp";
|
||||||
| "azure"
|
|
||||||
| "gcs"
|
|
||||||
| "local"
|
|
||||||
| "r2"
|
|
||||||
| "rclone"
|
|
||||||
| "rest"
|
|
||||||
| "s3"
|
|
||||||
| "sftp";
|
|
||||||
updatedAt: number;
|
updatedAt: number;
|
||||||
};
|
};
|
||||||
repositoryId: string;
|
repositoryId: string;
|
||||||
|
|
@ -2227,7 +2175,7 @@ export type GetBackupScheduleForVolumeResponses = {
|
||||||
server: string;
|
server: string;
|
||||||
share: string;
|
share: string;
|
||||||
username: string;
|
username: string;
|
||||||
vers?: "1.0" | "2.0" | "2.1" | "3.0";
|
vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto";
|
||||||
port?: number;
|
port?: number;
|
||||||
domain?: string;
|
domain?: string;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
|
|
@ -2277,8 +2225,7 @@ export type RunBackupNowResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type RunBackupNowResponse =
|
export type RunBackupNowResponse = RunBackupNowResponses[keyof RunBackupNowResponses];
|
||||||
RunBackupNowResponses[keyof RunBackupNowResponses];
|
|
||||||
|
|
||||||
export type StopBackupData = {
|
export type StopBackupData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -2414,16 +2361,7 @@ export type GetScheduleNotificationsResponses = {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
type:
|
type: "custom" | "discord" | "email" | "generic" | "gotify" | "ntfy" | "pushover" | "slack" | "telegram";
|
||||||
| "custom"
|
|
||||||
| "discord"
|
|
||||||
| "email"
|
|
||||||
| "generic"
|
|
||||||
| "gotify"
|
|
||||||
| "ntfy"
|
|
||||||
| "pushover"
|
|
||||||
| "slack"
|
|
||||||
| "telegram";
|
|
||||||
updatedAt: number;
|
updatedAt: number;
|
||||||
};
|
};
|
||||||
destinationId: number;
|
destinationId: number;
|
||||||
|
|
@ -2533,16 +2471,7 @@ export type UpdateScheduleNotificationsResponses = {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
type:
|
type: "custom" | "discord" | "email" | "generic" | "gotify" | "ntfy" | "pushover" | "slack" | "telegram";
|
||||||
| "custom"
|
|
||||||
| "discord"
|
|
||||||
| "email"
|
|
||||||
| "generic"
|
|
||||||
| "gotify"
|
|
||||||
| "ntfy"
|
|
||||||
| "pushover"
|
|
||||||
| "slack"
|
|
||||||
| "telegram";
|
|
||||||
updatedAt: number;
|
updatedAt: number;
|
||||||
};
|
};
|
||||||
destinationId: number;
|
destinationId: number;
|
||||||
|
|
@ -2672,15 +2601,7 @@ export type GetScheduleMirrorsResponses = {
|
||||||
name: string;
|
name: string;
|
||||||
shortId: string;
|
shortId: string;
|
||||||
status: "error" | "healthy" | "unknown" | null;
|
status: "error" | "healthy" | "unknown" | null;
|
||||||
type:
|
type: "azure" | "gcs" | "local" | "r2" | "rclone" | "rest" | "s3" | "sftp";
|
||||||
| "azure"
|
|
||||||
| "gcs"
|
|
||||||
| "local"
|
|
||||||
| "r2"
|
|
||||||
| "rclone"
|
|
||||||
| "rest"
|
|
||||||
| "s3"
|
|
||||||
| "sftp";
|
|
||||||
updatedAt: number;
|
updatedAt: number;
|
||||||
};
|
};
|
||||||
repositoryId: string;
|
repositoryId: string;
|
||||||
|
|
@ -2688,8 +2609,7 @@ export type GetScheduleMirrorsResponses = {
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type GetScheduleMirrorsResponse =
|
export type GetScheduleMirrorsResponse = GetScheduleMirrorsResponses[keyof GetScheduleMirrorsResponses];
|
||||||
GetScheduleMirrorsResponses[keyof GetScheduleMirrorsResponses];
|
|
||||||
|
|
||||||
export type UpdateScheduleMirrorsData = {
|
export type UpdateScheduleMirrorsData = {
|
||||||
body?: {
|
body?: {
|
||||||
|
|
@ -2811,15 +2731,7 @@ export type UpdateScheduleMirrorsResponses = {
|
||||||
name: string;
|
name: string;
|
||||||
shortId: string;
|
shortId: string;
|
||||||
status: "error" | "healthy" | "unknown" | null;
|
status: "error" | "healthy" | "unknown" | null;
|
||||||
type:
|
type: "azure" | "gcs" | "local" | "r2" | "rclone" | "rest" | "s3" | "sftp";
|
||||||
| "azure"
|
|
||||||
| "gcs"
|
|
||||||
| "local"
|
|
||||||
| "r2"
|
|
||||||
| "rclone"
|
|
||||||
| "rest"
|
|
||||||
| "s3"
|
|
||||||
| "sftp";
|
|
||||||
updatedAt: number;
|
updatedAt: number;
|
||||||
};
|
};
|
||||||
repositoryId: string;
|
repositoryId: string;
|
||||||
|
|
@ -2827,8 +2739,7 @@ export type UpdateScheduleMirrorsResponses = {
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type UpdateScheduleMirrorsResponse =
|
export type UpdateScheduleMirrorsResponse = UpdateScheduleMirrorsResponses[keyof UpdateScheduleMirrorsResponses];
|
||||||
UpdateScheduleMirrorsResponses[keyof UpdateScheduleMirrorsResponses];
|
|
||||||
|
|
||||||
export type GetMirrorCompatibilityData = {
|
export type GetMirrorCompatibilityData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -2850,8 +2761,7 @@ export type GetMirrorCompatibilityResponses = {
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type GetMirrorCompatibilityResponse =
|
export type GetMirrorCompatibilityResponse = GetMirrorCompatibilityResponses[keyof GetMirrorCompatibilityResponses];
|
||||||
GetMirrorCompatibilityResponses[keyof GetMirrorCompatibilityResponses];
|
|
||||||
|
|
||||||
export type ReorderBackupSchedulesData = {
|
export type ReorderBackupSchedulesData = {
|
||||||
body?: {
|
body?: {
|
||||||
|
|
@ -2871,8 +2781,7 @@ export type ReorderBackupSchedulesResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ReorderBackupSchedulesResponse =
|
export type ReorderBackupSchedulesResponse = ReorderBackupSchedulesResponses[keyof ReorderBackupSchedulesResponses];
|
||||||
ReorderBackupSchedulesResponses[keyof ReorderBackupSchedulesResponses];
|
|
||||||
|
|
||||||
export type ListNotificationDestinationsData = {
|
export type ListNotificationDestinationsData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -2957,16 +2866,7 @@ export type ListNotificationDestinationsResponses = {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
type:
|
type: "custom" | "discord" | "email" | "generic" | "gotify" | "ntfy" | "pushover" | "slack" | "telegram";
|
||||||
| "custom"
|
|
||||||
| "discord"
|
|
||||||
| "email"
|
|
||||||
| "generic"
|
|
||||||
| "gotify"
|
|
||||||
| "ntfy"
|
|
||||||
| "pushover"
|
|
||||||
| "slack"
|
|
||||||
| "telegram";
|
|
||||||
updatedAt: number;
|
updatedAt: number;
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
|
@ -3126,16 +3026,7 @@ export type CreateNotificationDestinationResponses = {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
type:
|
type: "custom" | "discord" | "email" | "generic" | "gotify" | "ntfy" | "pushover" | "slack" | "telegram";
|
||||||
| "custom"
|
|
||||||
| "discord"
|
|
||||||
| "email"
|
|
||||||
| "generic"
|
|
||||||
| "gotify"
|
|
||||||
| "ntfy"
|
|
||||||
| "pushover"
|
|
||||||
| "slack"
|
|
||||||
| "telegram";
|
|
||||||
updatedAt: number;
|
updatedAt: number;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -3263,16 +3154,7 @@ export type GetNotificationDestinationResponses = {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
type:
|
type: "custom" | "discord" | "email" | "generic" | "gotify" | "ntfy" | "pushover" | "slack" | "telegram";
|
||||||
| "custom"
|
|
||||||
| "discord"
|
|
||||||
| "email"
|
|
||||||
| "generic"
|
|
||||||
| "gotify"
|
|
||||||
| "ntfy"
|
|
||||||
| "pushover"
|
|
||||||
| "slack"
|
|
||||||
| "telegram";
|
|
||||||
updatedAt: number;
|
updatedAt: number;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -3442,16 +3324,7 @@ export type UpdateNotificationDestinationResponses = {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
type:
|
type: "custom" | "discord" | "email" | "generic" | "gotify" | "ntfy" | "pushover" | "slack" | "telegram";
|
||||||
| "custom"
|
|
||||||
| "discord"
|
|
||||||
| "email"
|
|
||||||
| "generic"
|
|
||||||
| "gotify"
|
|
||||||
| "ntfy"
|
|
||||||
| "pushover"
|
|
||||||
| "slack"
|
|
||||||
| "telegram";
|
|
||||||
updatedAt: number;
|
updatedAt: number;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -3514,8 +3387,7 @@ export type GetSystemInfoResponses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type GetSystemInfoResponse =
|
export type GetSystemInfoResponse = GetSystemInfoResponses[keyof GetSystemInfoResponses];
|
||||||
GetSystemInfoResponses[keyof GetSystemInfoResponses];
|
|
||||||
|
|
||||||
export type GetUpdatesData = {
|
export type GetUpdatesData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
|
@ -3559,5 +3431,4 @@ export type DownloadResticPasswordResponses = {
|
||||||
200: string;
|
200: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DownloadResticPasswordResponse =
|
export type DownloadResticPasswordResponse = DownloadResticPasswordResponses[keyof DownloadResticPasswordResponses];
|
||||||
DownloadResticPasswordResponses[keyof DownloadResticPasswordResponses];
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ export const smbConfigSchema = type({
|
||||||
share: "string",
|
share: "string",
|
||||||
username: "string",
|
username: "string",
|
||||||
password: "string",
|
password: "string",
|
||||||
vers: type("'1.0' | '2.0' | '2.1' | '3.0'").default("3.0"),
|
vers: type("'1.0' | '2.0' | '2.1' | '3.0' | 'auto'").default("auto"),
|
||||||
domain: "string?",
|
domain: "string?",
|
||||||
port: type("string.integer").or(type("number")).to("1 <= number <= 65535").default(445),
|
port: type("string.integer").or(type("number")).to("1 <= number <= 65535").default(445),
|
||||||
readOnly: "boolean?",
|
readOnly: "boolean?",
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,13 @@ const mount = async (config: BackendConfig, path: string) => {
|
||||||
logger.debug(`Mounting volume ${path}...`);
|
logger.debug(`Mounting volume ${path}...`);
|
||||||
logger.info(`Executing mount: mount ${args.join(" ")}`);
|
logger.info(`Executing mount: mount ${args.join(" ")}`);
|
||||||
|
|
||||||
await executeMount(args);
|
try {
|
||||||
|
await executeMount(args);
|
||||||
// Fallback with -i flag if the first mount fails using the mount helper
|
} catch (error) {
|
||||||
await executeMount(["-i", ...args]);
|
logger.warn(`Initial NFS mount failed, retrying with -i flag: ${toMessage(error)}`);
|
||||||
|
// Fallback with -i flag if the first mount fails using the mount helper
|
||||||
|
await executeMount(["-i", ...args]);
|
||||||
|
}
|
||||||
|
|
||||||
logger.info(`NFS volume at ${path} mounted successfully.`);
|
logger.info(`NFS volume at ${path} mounted successfully.`);
|
||||||
return { status: BACKEND_STATUS.mounted };
|
return { status: BACKEND_STATUS.mounted };
|
||||||
|
|
|
||||||
|
|
@ -40,14 +40,11 @@ const mount = async (config: BackendConfig, path: string) => {
|
||||||
|
|
||||||
const source = `//${config.server}/${config.share}`;
|
const source = `//${config.server}/${config.share}`;
|
||||||
const { uid, gid } = os.userInfo();
|
const { uid, gid } = os.userInfo();
|
||||||
const options = [
|
const options = [`user=${config.username}`, `pass=${password}`, `port=${config.port}`, `uid=${uid}`, `gid=${gid}`];
|
||||||
`user=${config.username}`,
|
|
||||||
`pass=${password}`,
|
if (config.vers && config.vers !== "auto") {
|
||||||
`vers=${config.vers}`,
|
options.push(`vers=${config.vers}`);
|
||||||
`port=${config.port}`,
|
}
|
||||||
`uid=${uid}`,
|
|
||||||
`gid=${gid}`,
|
|
||||||
];
|
|
||||||
|
|
||||||
if (config.domain) {
|
if (config.domain) {
|
||||||
options.push(`domain=${config.domain}`);
|
options.push(`domain=${config.domain}`);
|
||||||
|
|
@ -62,10 +59,13 @@ const mount = async (config: BackendConfig, path: string) => {
|
||||||
logger.debug(`Mounting SMB volume ${path}...`);
|
logger.debug(`Mounting SMB volume ${path}...`);
|
||||||
logger.info(`Executing mount: mount ${args.join(" ")}`);
|
logger.info(`Executing mount: mount ${args.join(" ")}`);
|
||||||
|
|
||||||
await executeMount(args);
|
try {
|
||||||
|
await executeMount(args);
|
||||||
// Fallback with -i flag if the first mount fails using the mount helper
|
} catch (error) {
|
||||||
await executeMount(["-i", ...args]);
|
logger.warn(`Initial SMB mount failed, retrying with -i flag: ${toMessage(error)}`);
|
||||||
|
// Fallback with -i flag if the first mount fails using the mount helper
|
||||||
|
await executeMount(["-i", ...args]);
|
||||||
|
}
|
||||||
|
|
||||||
logger.info(`SMB volume at ${path} mounted successfully.`);
|
logger.info(`SMB volume at ${path} mounted successfully.`);
|
||||||
return { status: BACKEND_STATUS.mounted };
|
return { status: BACKEND_STATUS.mounted };
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ import { logger } from "../../../utils/logger";
|
||||||
export const executeMount = async (args: string[]): Promise<void> => {
|
export const executeMount = async (args: string[]): Promise<void> => {
|
||||||
const shouldBeVerbose = process.env.LOG_LEVEL === "debug" || process.env.NODE_ENV !== "production";
|
const shouldBeVerbose = process.env.LOG_LEVEL === "debug" || process.env.NODE_ENV !== "production";
|
||||||
const hasVerboseFlag = args.some((arg) => arg === "-v" || arg.startsWith("-vv"));
|
const hasVerboseFlag = args.some((arg) => arg === "-v" || arg.startsWith("-vv"));
|
||||||
const effectiveArgs = shouldBeVerbose && !hasVerboseFlag ? ["-vvv", ...args] : args;
|
const effectiveArgs = shouldBeVerbose && !hasVerboseFlag ? ["-v", ...args] : args;
|
||||||
|
|
||||||
logger.debug(`Executing mount ${effectiveArgs.join(" ")}`);
|
logger.debug(`Executing mount ${effectiveArgs.join(" ")}`);
|
||||||
const result = await $`mount ${effectiveArgs}`.nothrow();
|
let result = await $`mount ${effectiveArgs}`.nothrow();
|
||||||
|
|
||||||
const stdout = result.stdout.toString().trim();
|
const stdout = result.stdout.toString().trim();
|
||||||
const stderr = result.stderr.toString().trim();
|
const stderr = result.stderr.toString().trim();
|
||||||
|
|
|
||||||
|
|
@ -58,10 +58,14 @@ const mount = async (config: BackendConfig, path: string) => {
|
||||||
logger.debug(`Mounting WebDAV volume ${path}...`);
|
logger.debug(`Mounting WebDAV volume ${path}...`);
|
||||||
|
|
||||||
const args = ["-t", "davfs", "-o", options.join(","), source, path];
|
const args = ["-t", "davfs", "-o", options.join(","), source, path];
|
||||||
await executeMount(args);
|
|
||||||
|
|
||||||
// Fallback with -i flag if the first mount fails using the mount helper
|
try {
|
||||||
await executeMount(["-i", ...args]);
|
await executeMount(args);
|
||||||
|
} catch (error) {
|
||||||
|
logger.warn(`Initial WebDAV mount failed, retrying with -i flag: ${toMessage(error)}`);
|
||||||
|
// Fallback with -i flag if the first mount fails using the mount helper
|
||||||
|
await executeMount(["-i", ...args]);
|
||||||
|
}
|
||||||
|
|
||||||
logger.info(`WebDAV volume at ${path} mounted successfully.`);
|
logger.info(`WebDAV volume at ${path} mounted successfully.`);
|
||||||
return { status: BACKEND_STATUS.mounted };
|
return { status: BACKEND_STATUS.mounted };
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue