zerobyte/app/client/api-client/sdk.gen.ts
dependabot[bot] c75e5cb21f
chore(deps): bump the minor-patch group with 9 updates (#355)
* chore(deps): bump the minor-patch group with 9 updates

Bumps the minor-patch group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [@inquirer/prompts](https://github.com/SBoudrias/Inquirer.js) | `8.1.0` | `8.2.0` |
| [better-auth](https://github.com/better-auth/better-auth/tree/HEAD/packages/better-auth) | `1.4.10` | `1.4.12` |
| [react-hook-form](https://github.com/react-hook-form/react-hook-form) | `7.70.0` | `7.71.0` |
| [@hey-api/openapi-ts](https://github.com/hey-api/openapi-ts) | `0.90.2` | `0.90.3` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `25.0.3` | `25.0.7` |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `19.2.7` | `19.2.8` |
| [oxfmt](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxfmt) | `0.23.0` | `0.24.0` |
| [oxlint](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxlint) | `1.38.0` | `1.39.0` |
| [vite-tsconfig-paths](https://github.com/aleclarson/vite-tsconfig-paths) | `6.0.3` | `6.0.4` |


Updates `@inquirer/prompts` from 8.1.0 to 8.2.0
- [Release notes](https://github.com/SBoudrias/Inquirer.js/releases)
- [Commits](https://github.com/SBoudrias/Inquirer.js/compare/@inquirer/prompts@8.1.0...@inquirer/prompts@8.2.0)

Updates `better-auth` from 1.4.10 to 1.4.12
- [Release notes](https://github.com/better-auth/better-auth/releases)
- [Commits](https://github.com/better-auth/better-auth/commits/v1.4.12/packages/better-auth)

Updates `react-hook-form` from 7.70.0 to 7.71.0
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.70.0...v7.71.0)

Updates `@hey-api/openapi-ts` from 0.90.2 to 0.90.3
- [Release notes](https://github.com/hey-api/openapi-ts/releases)
- [Changelog](https://github.com/hey-api/openapi-ts/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/hey-api/openapi-ts/compare/@hey-api/openapi-ts@0.90.2...@hey-api/openapi-ts@0.90.3)

Updates `@types/node` from 25.0.3 to 25.0.7
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@types/react` from 19.2.7 to 19.2.8
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `oxfmt` from 0.23.0 to 0.24.0
- [Release notes](https://github.com/oxc-project/oxc/releases)
- [Changelog](https://github.com/oxc-project/oxc/blob/main/npm/oxfmt/CHANGELOG.md)
- [Commits](https://github.com/oxc-project/oxc/commits/oxfmt_v0.24.0/npm/oxfmt)

Updates `oxlint` from 1.38.0 to 1.39.0
- [Release notes](https://github.com/oxc-project/oxc/releases)
- [Changelog](https://github.com/oxc-project/oxc/blob/main/npm/oxlint/CHANGELOG.md)
- [Commits](https://github.com/oxc-project/oxc/commits/oxlint_v1.39.0/npm/oxlint)

Updates `vite-tsconfig-paths` from 6.0.3 to 6.0.4
- [Release notes](https://github.com/aleclarson/vite-tsconfig-paths/releases)
- [Commits](https://github.com/aleclarson/vite-tsconfig-paths/compare/v6.0.3...v6.0.4)

---
updated-dependencies:
- dependency-name: "@inquirer/prompts"
  dependency-version: 8.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-patch
- dependency-name: better-auth
  dependency-version: 1.4.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-patch
- dependency-name: react-hook-form
  dependency-version: 7.71.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-patch
- dependency-name: "@hey-api/openapi-ts"
  dependency-version: 0.90.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-patch
- dependency-name: "@types/node"
  dependency-version: 25.0.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-patch
- dependency-name: "@types/react"
  dependency-version: 19.2.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-patch
- dependency-name: oxfmt
  dependency-version: 0.24.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-patch
- dependency-name: oxlint
  dependency-version: 1.39.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-patch
- dependency-name: vite-tsconfig-paths
  dependency-version: 6.0.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: gen api client

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicolas Meienberger <github@thisprops.com>
2026-01-13 07:52:27 +01:00

723 lines
21 KiB
TypeScript

// This file is auto-generated by @hey-api/openapi-ts
import type { Client, Options as Options2, TDataShape } from "./client";
import { client } from "./client.gen";
import type {
BrowseFilesystemData,
BrowseFilesystemResponses,
CreateBackupScheduleData,
CreateBackupScheduleResponses,
CreateNotificationDestinationData,
CreateNotificationDestinationResponses,
CreateRepositoryData,
CreateRepositoryResponses,
CreateVolumeData,
CreateVolumeResponses,
DeleteBackupScheduleData,
DeleteBackupScheduleResponses,
DeleteNotificationDestinationData,
DeleteNotificationDestinationErrors,
DeleteNotificationDestinationResponses,
DeleteRepositoryData,
DeleteRepositoryResponses,
DeleteSnapshotData,
DeleteSnapshotResponses,
DeleteSnapshotsData,
DeleteSnapshotsResponses,
DeleteVolumeData,
DeleteVolumeResponses,
DoctorRepositoryData,
DoctorRepositoryResponses,
DownloadResticPasswordData,
DownloadResticPasswordResponses,
GetBackupScheduleData,
GetBackupScheduleForVolumeData,
GetBackupScheduleForVolumeResponses,
GetBackupScheduleResponses,
GetMirrorCompatibilityData,
GetMirrorCompatibilityResponses,
GetNotificationDestinationData,
GetNotificationDestinationErrors,
GetNotificationDestinationResponses,
GetRepositoryData,
GetRepositoryResponses,
GetScheduleMirrorsData,
GetScheduleMirrorsResponses,
GetScheduleNotificationsData,
GetScheduleNotificationsResponses,
GetSnapshotDetailsData,
GetSnapshotDetailsResponses,
GetStatusData,
GetStatusResponses,
GetSystemInfoData,
GetSystemInfoResponses,
GetUpdatesData,
GetUpdatesResponses,
GetVolumeData,
GetVolumeErrors,
GetVolumeResponses,
HealthCheckVolumeData,
HealthCheckVolumeErrors,
HealthCheckVolumeResponses,
ListBackupSchedulesData,
ListBackupSchedulesResponses,
ListFilesData,
ListFilesResponses,
ListNotificationDestinationsData,
ListNotificationDestinationsResponses,
ListRcloneRemotesData,
ListRcloneRemotesResponses,
ListRepositoriesData,
ListRepositoriesResponses,
ListSnapshotFilesData,
ListSnapshotFilesResponses,
ListSnapshotsData,
ListSnapshotsResponses,
ListVolumesData,
ListVolumesResponses,
MountVolumeData,
MountVolumeResponses,
ReorderBackupSchedulesData,
ReorderBackupSchedulesResponses,
RestoreSnapshotData,
RestoreSnapshotResponses,
RunBackupNowData,
RunBackupNowResponses,
RunForgetData,
RunForgetResponses,
StopBackupData,
StopBackupErrors,
StopBackupResponses,
TagSnapshotsData,
TagSnapshotsResponses,
TestConnectionData,
TestConnectionResponses,
TestNotificationDestinationData,
TestNotificationDestinationErrors,
TestNotificationDestinationResponses,
UnmountVolumeData,
UnmountVolumeResponses,
UpdateBackupScheduleData,
UpdateBackupScheduleResponses,
UpdateNotificationDestinationData,
UpdateNotificationDestinationErrors,
UpdateNotificationDestinationResponses,
UpdateRepositoryData,
UpdateRepositoryErrors,
UpdateRepositoryResponses,
UpdateScheduleMirrorsData,
UpdateScheduleMirrorsResponses,
UpdateScheduleNotificationsData,
UpdateScheduleNotificationsResponses,
UpdateVolumeData,
UpdateVolumeErrors,
UpdateVolumeResponses,
} from "./types.gen";
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<
TData,
ThrowOnError
> & {
/**
* You can provide a client instance returned by `createClient()` instead of
* individual options. This might be also useful if you want to implement a
* custom client.
*/
client?: Client;
/**
* You can pass arbitrary values through the `meta` object. This can be
* used to access values that aren't defined as part of the SDK function.
*/
meta?: Record<string, unknown>;
};
/**
* Get authentication system status
*/
export const getStatus = <ThrowOnError extends boolean = false>(options?: Options<GetStatusData, ThrowOnError>) =>
(options?.client ?? client).get<GetStatusResponses, unknown, ThrowOnError>({
url: "/api/v1/auth/status",
...options,
});
/**
* List all volumes
*/
export const listVolumes = <ThrowOnError extends boolean = false>(options?: Options<ListVolumesData, ThrowOnError>) =>
(options?.client ?? client).get<ListVolumesResponses, unknown, ThrowOnError>({ url: "/api/v1/volumes", ...options });
/**
* Create a new volume
*/
export const createVolume = <ThrowOnError extends boolean = false>(options?: Options<CreateVolumeData, ThrowOnError>) =>
(options?.client ?? client).post<CreateVolumeResponses, unknown, ThrowOnError>({
url: "/api/v1/volumes",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
/**
* Test connection to backend
*/
export const testConnection = <ThrowOnError extends boolean = false>(
options?: Options<TestConnectionData, ThrowOnError>,
) =>
(options?.client ?? client).post<TestConnectionResponses, unknown, ThrowOnError>({
url: "/api/v1/volumes/test-connection",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
/**
* Delete a volume
*/
export const deleteVolume = <ThrowOnError extends boolean = false>(options: Options<DeleteVolumeData, ThrowOnError>) =>
(options.client ?? client).delete<DeleteVolumeResponses, unknown, ThrowOnError>({
url: "/api/v1/volumes/{name}",
...options,
});
/**
* Get a volume by name
*/
export const getVolume = <ThrowOnError extends boolean = false>(options: Options<GetVolumeData, ThrowOnError>) =>
(options.client ?? client).get<GetVolumeResponses, GetVolumeErrors, ThrowOnError>({
url: "/api/v1/volumes/{name}",
...options,
});
/**
* Update a volume's configuration
*/
export const updateVolume = <ThrowOnError extends boolean = false>(options: Options<UpdateVolumeData, ThrowOnError>) =>
(options.client ?? client).put<UpdateVolumeResponses, UpdateVolumeErrors, ThrowOnError>({
url: "/api/v1/volumes/{name}",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
});
/**
* Mount a volume
*/
export const mountVolume = <ThrowOnError extends boolean = false>(options: Options<MountVolumeData, ThrowOnError>) =>
(options.client ?? client).post<MountVolumeResponses, unknown, ThrowOnError>({
url: "/api/v1/volumes/{name}/mount",
...options,
});
/**
* Unmount a volume
*/
export const unmountVolume = <ThrowOnError extends boolean = false>(
options: Options<UnmountVolumeData, ThrowOnError>,
) =>
(options.client ?? client).post<UnmountVolumeResponses, unknown, ThrowOnError>({
url: "/api/v1/volumes/{name}/unmount",
...options,
});
/**
* Perform a health check on a volume
*/
export const healthCheckVolume = <ThrowOnError extends boolean = false>(
options: Options<HealthCheckVolumeData, ThrowOnError>,
) =>
(options.client ?? client).post<HealthCheckVolumeResponses, HealthCheckVolumeErrors, ThrowOnError>({
url: "/api/v1/volumes/{name}/health-check",
...options,
});
/**
* List files in a volume directory
*/
export const listFiles = <ThrowOnError extends boolean = false>(options: Options<ListFilesData, ThrowOnError>) =>
(options.client ?? client).get<ListFilesResponses, unknown, ThrowOnError>({
url: "/api/v1/volumes/{name}/files",
...options,
});
/**
* Browse directories on the host filesystem
*/
export const browseFilesystem = <ThrowOnError extends boolean = false>(
options?: Options<BrowseFilesystemData, ThrowOnError>,
) =>
(options?.client ?? client).get<BrowseFilesystemResponses, unknown, ThrowOnError>({
url: "/api/v1/volumes/filesystem/browse",
...options,
});
/**
* List all repositories
*/
export const listRepositories = <ThrowOnError extends boolean = false>(
options?: Options<ListRepositoriesData, ThrowOnError>,
) =>
(options?.client ?? client).get<ListRepositoriesResponses, unknown, ThrowOnError>({
url: "/api/v1/repositories",
...options,
});
/**
* Create a new restic repository
*/
export const createRepository = <ThrowOnError extends boolean = false>(
options?: Options<CreateRepositoryData, ThrowOnError>,
) =>
(options?.client ?? client).post<CreateRepositoryResponses, unknown, ThrowOnError>({
url: "/api/v1/repositories",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
/**
* List all configured rclone remotes on the host system
*/
export const listRcloneRemotes = <ThrowOnError extends boolean = false>(
options?: Options<ListRcloneRemotesData, ThrowOnError>,
) =>
(options?.client ?? client).get<ListRcloneRemotesResponses, unknown, ThrowOnError>({
url: "/api/v1/repositories/rclone-remotes",
...options,
});
/**
* Delete a repository
*/
export const deleteRepository = <ThrowOnError extends boolean = false>(
options: Options<DeleteRepositoryData, ThrowOnError>,
) =>
(options.client ?? client).delete<DeleteRepositoryResponses, unknown, ThrowOnError>({
url: "/api/v1/repositories/{id}",
...options,
});
/**
* Get a single repository by ID
*/
export const getRepository = <ThrowOnError extends boolean = false>(
options: Options<GetRepositoryData, ThrowOnError>,
) =>
(options.client ?? client).get<GetRepositoryResponses, unknown, ThrowOnError>({
url: "/api/v1/repositories/{id}",
...options,
});
/**
* Update a repository's name or settings
*/
export const updateRepository = <ThrowOnError extends boolean = false>(
options: Options<UpdateRepositoryData, ThrowOnError>,
) =>
(options.client ?? client).patch<UpdateRepositoryResponses, UpdateRepositoryErrors, ThrowOnError>({
url: "/api/v1/repositories/{id}",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
});
/**
* Delete multiple snapshots from a repository
*/
export const deleteSnapshots = <ThrowOnError extends boolean = false>(
options: Options<DeleteSnapshotsData, ThrowOnError>,
) =>
(options.client ?? client).delete<DeleteSnapshotsResponses, unknown, ThrowOnError>({
url: "/api/v1/repositories/{id}/snapshots",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
});
/**
* List all snapshots in a repository
*/
export const listSnapshots = <ThrowOnError extends boolean = false>(
options: Options<ListSnapshotsData, ThrowOnError>,
) =>
(options.client ?? client).get<ListSnapshotsResponses, unknown, ThrowOnError>({
url: "/api/v1/repositories/{id}/snapshots",
...options,
});
/**
* Delete a specific snapshot from a repository
*/
export const deleteSnapshot = <ThrowOnError extends boolean = false>(
options: Options<DeleteSnapshotData, ThrowOnError>,
) =>
(options.client ?? client).delete<DeleteSnapshotResponses, unknown, ThrowOnError>({
url: "/api/v1/repositories/{id}/snapshots/{snapshotId}",
...options,
});
/**
* Get details of a specific snapshot
*/
export const getSnapshotDetails = <ThrowOnError extends boolean = false>(
options: Options<GetSnapshotDetailsData, ThrowOnError>,
) =>
(options.client ?? client).get<GetSnapshotDetailsResponses, unknown, ThrowOnError>({
url: "/api/v1/repositories/{id}/snapshots/{snapshotId}",
...options,
});
/**
* List files and directories in a snapshot
*/
export const listSnapshotFiles = <ThrowOnError extends boolean = false>(
options: Options<ListSnapshotFilesData, ThrowOnError>,
) =>
(options.client ?? client).get<ListSnapshotFilesResponses, unknown, ThrowOnError>({
url: "/api/v1/repositories/{id}/snapshots/{snapshotId}/files",
...options,
});
/**
* Restore a snapshot to a target path on the filesystem
*/
export const restoreSnapshot = <ThrowOnError extends boolean = false>(
options: Options<RestoreSnapshotData, ThrowOnError>,
) =>
(options.client ?? client).post<RestoreSnapshotResponses, unknown, ThrowOnError>({
url: "/api/v1/repositories/{id}/restore",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
});
/**
* Run doctor operations on a repository to fix common issues (unlock, check, repair index). Use this when the repository is locked or has errors.
*/
export const doctorRepository = <ThrowOnError extends boolean = false>(
options: Options<DoctorRepositoryData, ThrowOnError>,
) =>
(options.client ?? client).post<DoctorRepositoryResponses, unknown, ThrowOnError>({
url: "/api/v1/repositories/{id}/doctor",
...options,
});
/**
* Tag multiple snapshots in a repository
*/
export const tagSnapshots = <ThrowOnError extends boolean = false>(options: Options<TagSnapshotsData, ThrowOnError>) =>
(options.client ?? client).post<TagSnapshotsResponses, unknown, ThrowOnError>({
url: "/api/v1/repositories/{id}/snapshots/tag",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
});
/**
* List all backup schedules
*/
export const listBackupSchedules = <ThrowOnError extends boolean = false>(
options?: Options<ListBackupSchedulesData, ThrowOnError>,
) =>
(options?.client ?? client).get<ListBackupSchedulesResponses, unknown, ThrowOnError>({
url: "/api/v1/backups",
...options,
});
/**
* Create a new backup schedule for a volume
*/
export const createBackupSchedule = <ThrowOnError extends boolean = false>(
options?: Options<CreateBackupScheduleData, ThrowOnError>,
) =>
(options?.client ?? client).post<CreateBackupScheduleResponses, unknown, ThrowOnError>({
url: "/api/v1/backups",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
/**
* Delete a backup schedule
*/
export const deleteBackupSchedule = <ThrowOnError extends boolean = false>(
options: Options<DeleteBackupScheduleData, ThrowOnError>,
) =>
(options.client ?? client).delete<DeleteBackupScheduleResponses, unknown, ThrowOnError>({
url: "/api/v1/backups/{scheduleId}",
...options,
});
/**
* Get a backup schedule by ID
*/
export const getBackupSchedule = <ThrowOnError extends boolean = false>(
options: Options<GetBackupScheduleData, ThrowOnError>,
) =>
(options.client ?? client).get<GetBackupScheduleResponses, unknown, ThrowOnError>({
url: "/api/v1/backups/{scheduleId}",
...options,
});
/**
* Update a backup schedule
*/
export const updateBackupSchedule = <ThrowOnError extends boolean = false>(
options: Options<UpdateBackupScheduleData, ThrowOnError>,
) =>
(options.client ?? client).patch<UpdateBackupScheduleResponses, unknown, ThrowOnError>({
url: "/api/v1/backups/{scheduleId}",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
});
/**
* Get a backup schedule for a specific volume
*/
export const getBackupScheduleForVolume = <ThrowOnError extends boolean = false>(
options: Options<GetBackupScheduleForVolumeData, ThrowOnError>,
) =>
(options.client ?? client).get<GetBackupScheduleForVolumeResponses, unknown, ThrowOnError>({
url: "/api/v1/backups/volume/{volumeId}",
...options,
});
/**
* Trigger a backup immediately for a schedule
*/
export const runBackupNow = <ThrowOnError extends boolean = false>(options: Options<RunBackupNowData, ThrowOnError>) =>
(options.client ?? client).post<RunBackupNowResponses, unknown, ThrowOnError>({
url: "/api/v1/backups/{scheduleId}/run",
...options,
});
/**
* Stop a backup that is currently in progress
*/
export const stopBackup = <ThrowOnError extends boolean = false>(options: Options<StopBackupData, ThrowOnError>) =>
(options.client ?? client).post<StopBackupResponses, StopBackupErrors, ThrowOnError>({
url: "/api/v1/backups/{scheduleId}/stop",
...options,
});
/**
* Manually apply retention policy to clean up old snapshots
*/
export const runForget = <ThrowOnError extends boolean = false>(options: Options<RunForgetData, ThrowOnError>) =>
(options.client ?? client).post<RunForgetResponses, unknown, ThrowOnError>({
url: "/api/v1/backups/{scheduleId}/forget",
...options,
});
/**
* Get notification assignments for a backup schedule
*/
export const getScheduleNotifications = <ThrowOnError extends boolean = false>(
options: Options<GetScheduleNotificationsData, ThrowOnError>,
) =>
(options.client ?? client).get<GetScheduleNotificationsResponses, unknown, ThrowOnError>({
url: "/api/v1/backups/{scheduleId}/notifications",
...options,
});
/**
* Update notification assignments for a backup schedule
*/
export const updateScheduleNotifications = <ThrowOnError extends boolean = false>(
options: Options<UpdateScheduleNotificationsData, ThrowOnError>,
) =>
(options.client ?? client).put<UpdateScheduleNotificationsResponses, unknown, ThrowOnError>({
url: "/api/v1/backups/{scheduleId}/notifications",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
});
/**
* Get mirror repository assignments for a backup schedule
*/
export const getScheduleMirrors = <ThrowOnError extends boolean = false>(
options: Options<GetScheduleMirrorsData, ThrowOnError>,
) =>
(options.client ?? client).get<GetScheduleMirrorsResponses, unknown, ThrowOnError>({
url: "/api/v1/backups/{scheduleId}/mirrors",
...options,
});
/**
* Update mirror repository assignments for a backup schedule
*/
export const updateScheduleMirrors = <ThrowOnError extends boolean = false>(
options: Options<UpdateScheduleMirrorsData, ThrowOnError>,
) =>
(options.client ?? client).put<UpdateScheduleMirrorsResponses, unknown, ThrowOnError>({
url: "/api/v1/backups/{scheduleId}/mirrors",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
});
/**
* Get mirror compatibility info for all repositories relative to a backup schedule's primary repository
*/
export const getMirrorCompatibility = <ThrowOnError extends boolean = false>(
options: Options<GetMirrorCompatibilityData, ThrowOnError>,
) =>
(options.client ?? client).get<GetMirrorCompatibilityResponses, unknown, ThrowOnError>({
url: "/api/v1/backups/{scheduleId}/mirrors/compatibility",
...options,
});
/**
* Reorder backup schedules by providing an array of schedule IDs in the desired order
*/
export const reorderBackupSchedules = <ThrowOnError extends boolean = false>(
options?: Options<ReorderBackupSchedulesData, ThrowOnError>,
) =>
(options?.client ?? client).post<ReorderBackupSchedulesResponses, unknown, ThrowOnError>({
url: "/api/v1/backups/reorder",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
/**
* List all notification destinations
*/
export const listNotificationDestinations = <ThrowOnError extends boolean = false>(
options?: Options<ListNotificationDestinationsData, ThrowOnError>,
) =>
(options?.client ?? client).get<ListNotificationDestinationsResponses, unknown, ThrowOnError>({
url: "/api/v1/notifications/destinations",
...options,
});
/**
* Create a new notification destination
*/
export const createNotificationDestination = <ThrowOnError extends boolean = false>(
options?: Options<CreateNotificationDestinationData, ThrowOnError>,
) =>
(options?.client ?? client).post<CreateNotificationDestinationResponses, unknown, ThrowOnError>({
url: "/api/v1/notifications/destinations",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
/**
* Delete a notification destination
*/
export const deleteNotificationDestination = <ThrowOnError extends boolean = false>(
options: Options<DeleteNotificationDestinationData, ThrowOnError>,
) =>
(options.client ?? client).delete<
DeleteNotificationDestinationResponses,
DeleteNotificationDestinationErrors,
ThrowOnError
>({ url: "/api/v1/notifications/destinations/{id}", ...options });
/**
* Get a notification destination by ID
*/
export const getNotificationDestination = <ThrowOnError extends boolean = false>(
options: Options<GetNotificationDestinationData, ThrowOnError>,
) =>
(options.client ?? client).get<GetNotificationDestinationResponses, GetNotificationDestinationErrors, ThrowOnError>({
url: "/api/v1/notifications/destinations/{id}",
...options,
});
/**
* Update a notification destination
*/
export const updateNotificationDestination = <ThrowOnError extends boolean = false>(
options: Options<UpdateNotificationDestinationData, ThrowOnError>,
) =>
(options.client ?? client).patch<
UpdateNotificationDestinationResponses,
UpdateNotificationDestinationErrors,
ThrowOnError
>({
url: "/api/v1/notifications/destinations/{id}",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
});
/**
* Test a notification destination by sending a test message
*/
export const testNotificationDestination = <ThrowOnError extends boolean = false>(
options: Options<TestNotificationDestinationData, ThrowOnError>,
) =>
(options.client ?? client).post<
TestNotificationDestinationResponses,
TestNotificationDestinationErrors,
ThrowOnError
>({ url: "/api/v1/notifications/destinations/{id}/test", ...options });
/**
* Get system information including available capabilities
*/
export const getSystemInfo = <ThrowOnError extends boolean = false>(
options?: Options<GetSystemInfoData, ThrowOnError>,
) =>
(options?.client ?? client).get<GetSystemInfoResponses, unknown, ThrowOnError>({
url: "/api/v1/system/info",
...options,
});
/**
* Check for application updates from GitHub
*/
export const getUpdates = <ThrowOnError extends boolean = false>(options?: Options<GetUpdatesData, ThrowOnError>) =>
(options?.client ?? client).get<GetUpdatesResponses, unknown, ThrowOnError>({
url: "/api/v1/system/updates",
...options,
});
/**
* Download the Restic password file for backup recovery. Requires password re-authentication.
*/
export const downloadResticPassword = <ThrowOnError extends boolean = false>(
options?: Options<DownloadResticPasswordData, ThrowOnError>,
) =>
(options?.client ?? client).post<DownloadResticPasswordResponses, unknown, ThrowOnError>({
url: "/api/v1/system/restic-password",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});