@homeflare/distilled-proxmox-backup 0.2.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.
Files changed (113) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +102 -0
  3. package/dist/credentials.d.ts +50 -0
  4. package/dist/credentials.d.ts.map +1 -0
  5. package/dist/credentials.js +105 -0
  6. package/dist/credentials.js.map +1 -0
  7. package/dist/errors.d.ts +100 -0
  8. package/dist/errors.d.ts.map +1 -0
  9. package/dist/errors.js +73 -0
  10. package/dist/errors.js.map +1 -0
  11. package/dist/index.d.ts +33 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +33 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/protocol.d.ts +19 -0
  16. package/dist/protocol.d.ts.map +1 -0
  17. package/dist/protocol.js +158 -0
  18. package/dist/protocol.js.map +1 -0
  19. package/dist/protocol.test.d.ts +2 -0
  20. package/dist/protocol.test.d.ts.map +1 -0
  21. package/dist/protocol.test.js +75 -0
  22. package/dist/protocol.test.js.map +1 -0
  23. package/dist/retry.d.ts +53 -0
  24. package/dist/retry.d.ts.map +1 -0
  25. package/dist/retry.js +46 -0
  26. package/dist/retry.js.map +1 -0
  27. package/dist/services/access.d.ts +587 -0
  28. package/dist/services/access.d.ts.map +1 -0
  29. package/dist/services/access.js +787 -0
  30. package/dist/services/access.js.map +1 -0
  31. package/dist/services/admin.d.ts +1110 -0
  32. package/dist/services/admin.d.ts.map +1 -0
  33. package/dist/services/admin.js +1428 -0
  34. package/dist/services/admin.js.map +1 -0
  35. package/dist/services/backup.d.ts +224 -0
  36. package/dist/services/backup.d.ts.map +1 -0
  37. package/dist/services/backup.js +325 -0
  38. package/dist/services/backup.js.map +1 -0
  39. package/dist/services/config.d.ts +3662 -0
  40. package/dist/services/config.d.ts.map +1 -0
  41. package/dist/services/config.js +4445 -0
  42. package/dist/services/config.js.map +1 -0
  43. package/dist/services/index.d.ts +14 -0
  44. package/dist/services/index.d.ts.map +1 -0
  45. package/dist/services/index.js +15 -0
  46. package/dist/services/index.js.map +1 -0
  47. package/dist/services/nodes.d.ts +1441 -0
  48. package/dist/services/nodes.d.ts.map +1 -0
  49. package/dist/services/nodes.js +1829 -0
  50. package/dist/services/nodes.js.map +1 -0
  51. package/dist/services/ping.d.ts +15 -0
  52. package/dist/services/ping.d.ts.map +1 -0
  53. package/dist/services/ping.js +21 -0
  54. package/dist/services/ping.js.map +1 -0
  55. package/dist/services/pull.d.ts +54 -0
  56. package/dist/services/pull.d.ts.map +1 -0
  57. package/dist/services/pull.js +47 -0
  58. package/dist/services/pull.js.map +1 -0
  59. package/dist/services/push.d.ts +50 -0
  60. package/dist/services/push.d.ts.map +1 -0
  61. package/dist/services/push.js +45 -0
  62. package/dist/services/push.js.map +1 -0
  63. package/dist/services/reader.d.ts +68 -0
  64. package/dist/services/reader.d.ts.map +1 -0
  65. package/dist/services/reader.js +89 -0
  66. package/dist/services/reader.js.map +1 -0
  67. package/dist/services/root.d.ts +14 -0
  68. package/dist/services/root.d.ts.map +1 -0
  69. package/dist/services/root.js +19 -0
  70. package/dist/services/root.js.map +1 -0
  71. package/dist/services/status.d.ts +78 -0
  72. package/dist/services/status.d.ts.map +1 -0
  73. package/dist/services/status.js +97 -0
  74. package/dist/services/status.js.map +1 -0
  75. package/dist/services/tape.d.ts +711 -0
  76. package/dist/services/tape.d.ts.map +1 -0
  77. package/dist/services/tape.js +986 -0
  78. package/dist/services/tape.js.map +1 -0
  79. package/dist/services/version.d.ts +17 -0
  80. package/dist/services/version.d.ts.map +1 -0
  81. package/dist/services/version.js +25 -0
  82. package/dist/services/version.js.map +1 -0
  83. package/dist/task.d.ts +48 -0
  84. package/dist/task.d.ts.map +1 -0
  85. package/dist/task.js +57 -0
  86. package/dist/task.js.map +1 -0
  87. package/dist/traits.d.ts +13 -0
  88. package/dist/traits.d.ts.map +1 -0
  89. package/dist/traits.js +15 -0
  90. package/dist/traits.js.map +1 -0
  91. package/package.json +81 -0
  92. package/src/credentials.ts +139 -0
  93. package/src/errors.ts +126 -0
  94. package/src/index.ts +36 -0
  95. package/src/protocol.test.ts +128 -0
  96. package/src/protocol.ts +196 -0
  97. package/src/retry.ts +79 -0
  98. package/src/services/access.ts +1787 -0
  99. package/src/services/admin.ts +3258 -0
  100. package/src/services/backup.ts +698 -0
  101. package/src/services/config.ts +10561 -0
  102. package/src/services/index.ts +14 -0
  103. package/src/services/nodes.ts +4313 -0
  104. package/src/services/ping.ts +43 -0
  105. package/src/services/pull.ts +118 -0
  106. package/src/services/push.ts +108 -0
  107. package/src/services/reader.ts +196 -0
  108. package/src/services/root.ts +39 -0
  109. package/src/services/status.ts +233 -0
  110. package/src/services/tape.ts +2257 -0
  111. package/src/services/version.ts +49 -0
  112. package/src/task.ts +84 -0
  113. package/src/traits.ts +46 -0
@@ -0,0 +1,43 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (apidoc.js, via scripts/apidoc.ts — see its header). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.ts";
5
+ import {
6
+ ProxmoxBackupProtocol,
7
+ type ProxmoxBackupOpError,
8
+ type ProxmoxBackupOpContext,
9
+ } from "../protocol.ts";
10
+ import * as Retry from "../retry.ts";
11
+
12
+ export type { ProxmoxBackupOpError, ProxmoxBackupOpContext };
13
+
14
+ export interface GetPingRequest {}
15
+ export const GetPingRequest = /*@__PURE__*/ S.suspend(() =>
16
+ S.Struct({}).pipe(T.Http({ method: "GET", uri: "/ping", code: 200 })),
17
+ ).annotate({ identifier: "GetPingRequest" }) as any as S.Schema<GetPingRequest>;
18
+
19
+ export interface GetPingResponse {
20
+ pong: unknown;
21
+ }
22
+ export const GetPingResponse = /*@__PURE__*/ S.suspend(() =>
23
+ S.Struct({
24
+ pong: S.Unknown,
25
+ }),
26
+ ).annotate({
27
+ identifier: "GetPingResponse",
28
+ }) as any as S.Schema<GetPingResponse>;
29
+
30
+ export type GetPingError = ProxmoxBackupOpError;
31
+ /** Dummy method which replies with `{ "pong": True }` */
32
+ export const getPing: API.OperationMethod<
33
+ GetPingRequest,
34
+ GetPingResponse,
35
+ GetPingError,
36
+ ProxmoxBackupOpContext
37
+ > = /*@__PURE__*/ API.make(() => ({
38
+ input: GetPingRequest,
39
+ output: GetPingResponse,
40
+ errors: [],
41
+ protocol: ProxmoxBackupProtocol,
42
+ retry: Retry.Retry,
43
+ }));
@@ -0,0 +1,118 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (apidoc.js, via scripts/apidoc.ts — see its header). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.ts";
5
+ import {
6
+ ProxmoxBackupProtocol,
7
+ type ProxmoxBackupOpError,
8
+ type ProxmoxBackupOpContext,
9
+ } from "../protocol.ts";
10
+ import * as Retry from "../retry.ts";
11
+
12
+ export type { ProxmoxBackupOpError, ProxmoxBackupOpContext };
13
+
14
+ export type CreatePullRequestDecryptionKeysList = Array<string>;
15
+ export const CreatePullRequestDecryptionKeysList = /*@__PURE__*/ S.Array(
16
+ S.String,
17
+ ) as any as S.Schema<CreatePullRequestDecryptionKeysList>;
18
+
19
+ export type CreatePullRequestGroupFilterList = Array<string>;
20
+ export const CreatePullRequestGroupFilterList = /*@__PURE__*/ S.Array(
21
+ S.String,
22
+ ) as any as S.Schema<CreatePullRequestGroupFilterList>;
23
+
24
+ export interface CreatePullRequest {
25
+ /** Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...). */
26
+ burst_in?: string;
27
+ /** Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...). */
28
+ burst_out?: string;
29
+ /** List of decryption keys. */
30
+ decryption_keys?: CreatePullRequestDecryptionKeysList;
31
+ /** Only synchronize encrypted backup snapshots, exclude others. */
32
+ encrypted_only?: string;
33
+ /** List of group filters. */
34
+ group_filter?: CreatePullRequestGroupFilterList;
35
+ /** How many levels of namespaces should be operated on (0 == no recursion, empty == automatic full recursion, namespace depths reduce maximum allowed value) */
36
+ max_depth?: string;
37
+ /** Namespace. */
38
+ ns?: string;
39
+ /** Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...). */
40
+ rate_in?: string;
41
+ /** Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...). */
42
+ rate_out?: string;
43
+ /** Remote ID. */
44
+ remote?: string;
45
+ /** Namespace. */
46
+ remote_ns?: string;
47
+ /** Datastore name. */
48
+ remote_store: string;
49
+ /** Delete vanished backups. This removes the local copy if the remote backup was deleted. */
50
+ remove_vanished?: string;
51
+ /** If the verification failed for a local snapshot, try to pull it again. */
52
+ resync_corrupt?: string;
53
+ /** Datastore name. */
54
+ store: string;
55
+ /** Limit transfer to last N snapshots (per group), skipping others */
56
+ transfer_last?: string;
57
+ /** Only synchronize verified backup snapshots, exclude others. */
58
+ verified_only?: string;
59
+ /** The number of worker threads to process groups in parallel. */
60
+ worker_threads?: string;
61
+ }
62
+ export const CreatePullRequest = /*@__PURE__*/ S.suspend(() =>
63
+ S.Struct({
64
+ burst_in: S.optional(S.String.pipe(T.Body("burst-in"))),
65
+ burst_out: S.optional(S.String.pipe(T.Body("burst-out"))),
66
+ decryption_keys: S.optional(
67
+ CreatePullRequestDecryptionKeysList.pipe(T.Body("decryption-keys")),
68
+ ),
69
+ encrypted_only: S.optional(S.String.pipe(T.Body("encrypted-only"))),
70
+ group_filter: S.optional(
71
+ CreatePullRequestGroupFilterList.pipe(T.Body("group-filter")),
72
+ ),
73
+ max_depth: S.optional(S.String.pipe(T.Body("max-depth"))),
74
+ ns: S.optional(S.String),
75
+ rate_in: S.optional(S.String.pipe(T.Body("rate-in"))),
76
+ rate_out: S.optional(S.String.pipe(T.Body("rate-out"))),
77
+ remote: S.optional(S.String),
78
+ remote_ns: S.optional(S.String.pipe(T.Body("remote-ns"))),
79
+ remote_store: S.String.pipe(T.Body("remote-store")),
80
+ remove_vanished: S.optional(S.String.pipe(T.Body("remove-vanished"))),
81
+ resync_corrupt: S.optional(S.String.pipe(T.Body("resync-corrupt"))),
82
+ store: S.String,
83
+ transfer_last: S.optional(S.String.pipe(T.Body("transfer-last"))),
84
+ verified_only: S.optional(S.String.pipe(T.Body("verified-only"))),
85
+ worker_threads: S.optional(S.String.pipe(T.Body("worker-threads"))),
86
+ }).pipe(
87
+ T.Http({
88
+ method: "POST",
89
+ uri: "/pull",
90
+ code: 200,
91
+ contentType: "form-urlencoded",
92
+ }),
93
+ ),
94
+ ).annotate({
95
+ identifier: "CreatePullRequest",
96
+ }) as any as S.Schema<CreatePullRequest>;
97
+
98
+ export interface CreatePullResponse {}
99
+ export const CreatePullResponse = /*@__PURE__*/ S.suspend(() =>
100
+ S.Struct({}),
101
+ ).annotate({
102
+ identifier: "CreatePullResponse",
103
+ }) as any as S.Schema<CreatePullResponse>;
104
+
105
+ export type CreatePullError = ProxmoxBackupOpError;
106
+ /** Sync store from other repository */
107
+ export const createPull: API.OperationMethod<
108
+ CreatePullRequest,
109
+ CreatePullResponse,
110
+ CreatePullError,
111
+ ProxmoxBackupOpContext
112
+ > = /*@__PURE__*/ API.make(() => ({
113
+ input: CreatePullRequest,
114
+ output: CreatePullResponse,
115
+ errors: [],
116
+ protocol: ProxmoxBackupProtocol,
117
+ retry: Retry.Retry,
118
+ }));
@@ -0,0 +1,108 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (apidoc.js, via scripts/apidoc.ts — see its header). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.ts";
5
+ import {
6
+ ProxmoxBackupProtocol,
7
+ type ProxmoxBackupOpError,
8
+ type ProxmoxBackupOpContext,
9
+ } from "../protocol.ts";
10
+ import * as Retry from "../retry.ts";
11
+
12
+ export type { ProxmoxBackupOpError, ProxmoxBackupOpContext };
13
+
14
+ export type CreatePushRequestGroupFilterList = Array<string>;
15
+ export const CreatePushRequestGroupFilterList = /*@__PURE__*/ S.Array(
16
+ S.String,
17
+ ) as any as S.Schema<CreatePushRequestGroupFilterList>;
18
+
19
+ export interface CreatePushRequest {
20
+ /** Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...). */
21
+ burst_in?: string;
22
+ /** Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...). */
23
+ burst_out?: string;
24
+ /** Only synchronize encrypted backup snapshots, exclude others. */
25
+ encrypted_only?: string;
26
+ /** ID to uniquely identify encryption/decription key */
27
+ encryption_key?: string;
28
+ /** List of group filters. */
29
+ group_filter?: CreatePushRequestGroupFilterList;
30
+ /** How many levels of namespaces should be operated on (0 == no recursion, empty == automatic full recursion, namespace depths reduce maximum allowed value) */
31
+ max_depth?: string;
32
+ /** Namespace. */
33
+ ns?: string;
34
+ /** Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...). */
35
+ rate_in?: string;
36
+ /** Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...). */
37
+ rate_out?: string;
38
+ /** Remote ID. */
39
+ remote: string;
40
+ /** Namespace. */
41
+ remote_ns?: string;
42
+ /** Datastore name. */
43
+ remote_store: string;
44
+ /** Delete vanished backups. This removes the local copy if the remote backup was deleted. */
45
+ remove_vanished?: string;
46
+ /** Datastore name. */
47
+ store: string;
48
+ /** Limit transfer to last N snapshots (per group), skipping others */
49
+ transfer_last?: string;
50
+ /** Only synchronize verified backup snapshots, exclude others. */
51
+ verified_only?: string;
52
+ /** The number of worker threads to process groups in parallel. */
53
+ worker_threads?: string;
54
+ }
55
+ export const CreatePushRequest = /*@__PURE__*/ S.suspend(() =>
56
+ S.Struct({
57
+ burst_in: S.optional(S.String.pipe(T.Body("burst-in"))),
58
+ burst_out: S.optional(S.String.pipe(T.Body("burst-out"))),
59
+ encrypted_only: S.optional(S.String.pipe(T.Body("encrypted-only"))),
60
+ encryption_key: S.optional(S.String.pipe(T.Body("encryption-key"))),
61
+ group_filter: S.optional(
62
+ CreatePushRequestGroupFilterList.pipe(T.Body("group-filter")),
63
+ ),
64
+ max_depth: S.optional(S.String.pipe(T.Body("max-depth"))),
65
+ ns: S.optional(S.String),
66
+ rate_in: S.optional(S.String.pipe(T.Body("rate-in"))),
67
+ rate_out: S.optional(S.String.pipe(T.Body("rate-out"))),
68
+ remote: S.String,
69
+ remote_ns: S.optional(S.String.pipe(T.Body("remote-ns"))),
70
+ remote_store: S.String.pipe(T.Body("remote-store")),
71
+ remove_vanished: S.optional(S.String.pipe(T.Body("remove-vanished"))),
72
+ store: S.String,
73
+ transfer_last: S.optional(S.String.pipe(T.Body("transfer-last"))),
74
+ verified_only: S.optional(S.String.pipe(T.Body("verified-only"))),
75
+ worker_threads: S.optional(S.String.pipe(T.Body("worker-threads"))),
76
+ }).pipe(
77
+ T.Http({
78
+ method: "POST",
79
+ uri: "/push",
80
+ code: 200,
81
+ contentType: "form-urlencoded",
82
+ }),
83
+ ),
84
+ ).annotate({
85
+ identifier: "CreatePushRequest",
86
+ }) as any as S.Schema<CreatePushRequest>;
87
+
88
+ export interface CreatePushResponse {}
89
+ export const CreatePushResponse = /*@__PURE__*/ S.suspend(() =>
90
+ S.Struct({}),
91
+ ).annotate({
92
+ identifier: "CreatePushResponse",
93
+ }) as any as S.Schema<CreatePushResponse>;
94
+
95
+ export type CreatePushError = ProxmoxBackupOpError;
96
+ /** Push store to other repository */
97
+ export const createPush: API.OperationMethod<
98
+ CreatePushRequest,
99
+ CreatePushResponse,
100
+ CreatePushError,
101
+ ProxmoxBackupOpContext
102
+ > = /*@__PURE__*/ API.make(() => ({
103
+ input: CreatePushRequest,
104
+ output: CreatePushResponse,
105
+ errors: [],
106
+ protocol: ProxmoxBackupProtocol,
107
+ retry: Retry.Retry,
108
+ }));
@@ -0,0 +1,196 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (apidoc.js, via scripts/apidoc.ts — see its header). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.ts";
5
+ import {
6
+ ProxmoxBackupProtocol,
7
+ type ProxmoxBackupOpError,
8
+ type ProxmoxBackupOpContext,
9
+ } from "../protocol.ts";
10
+ import * as Retry from "../retry.ts";
11
+
12
+ export type { ProxmoxBackupOpError, ProxmoxBackupOpContext };
13
+
14
+ export type GetReaderRequestBackupType = "vm" | "ct" | "host";
15
+ export const GetReaderRequestBackupType = S.String;
16
+
17
+ export interface GetReaderRequest {
18
+ /** Backup ID. */
19
+ backup_id: string;
20
+ /** Backup time (Unix epoch.) */
21
+ backup_time: string;
22
+ /** Backup type. */
23
+ backup_type: GetReaderRequestBackupType | (string & {});
24
+ /** Enable verbose debug logging. */
25
+ debug?: string;
26
+ /** Namespace. */
27
+ ns?: string;
28
+ /** Datastore name. */
29
+ store: string;
30
+ }
31
+ export const GetReaderRequest = /*@__PURE__*/ S.suspend(() =>
32
+ S.Struct({
33
+ backup_id: S.String.pipe(T.Query("backup-id")),
34
+ backup_time: S.String.pipe(T.Query("backup-time")),
35
+ backup_type: GetReaderRequestBackupType.pipe(T.Query("backup-type")),
36
+ debug: S.optional(S.String.pipe(T.Query())),
37
+ ns: S.optional(S.String.pipe(T.Query())),
38
+ store: S.String.pipe(T.Query()),
39
+ }).pipe(T.Http({ method: "GET", uri: "/reader", code: 200 })),
40
+ ).annotate({
41
+ identifier: "GetReaderRequest",
42
+ }) as any as S.Schema<GetReaderRequest>;
43
+
44
+ export interface GetReaderResponse {}
45
+ export const GetReaderResponse = /*@__PURE__*/ S.suspend(() =>
46
+ S.Struct({}),
47
+ ).annotate({
48
+ identifier: "GetReaderResponse",
49
+ }) as any as S.Schema<GetReaderResponse>;
50
+
51
+ export interface GetReaderUpgradeRequest {}
52
+ export const GetReaderUpgradeRequest = /*@__PURE__*/ S.suspend(() =>
53
+ S.Struct({}).pipe(
54
+ T.Http({ method: "GET", uri: "/reader/_upgrade_", code: 200 }),
55
+ ),
56
+ ).annotate({
57
+ identifier: "GetReaderUpgradeRequest",
58
+ }) as any as S.Schema<GetReaderUpgradeRequest>;
59
+
60
+ export interface GetReaderUpgradeResponse {}
61
+ export const GetReaderUpgradeResponse = /*@__PURE__*/ S.suspend(() =>
62
+ S.Struct({}),
63
+ ).annotate({
64
+ identifier: "GetReaderUpgradeResponse",
65
+ }) as any as S.Schema<GetReaderUpgradeResponse>;
66
+
67
+ export interface GetReaderUpgradeChunkRequest {
68
+ /** Chunk digest (SHA256). */
69
+ digest: string;
70
+ }
71
+ export const GetReaderUpgradeChunkRequest = /*@__PURE__*/ S.suspend(() =>
72
+ S.Struct({
73
+ digest: S.String.pipe(T.Query()),
74
+ }).pipe(T.Http({ method: "GET", uri: "/reader/_upgrade_/chunk", code: 200 })),
75
+ ).annotate({
76
+ identifier: "GetReaderUpgradeChunkRequest",
77
+ }) as any as S.Schema<GetReaderUpgradeChunkRequest>;
78
+
79
+ export interface GetReaderUpgradeChunkResponse {}
80
+ export const GetReaderUpgradeChunkResponse = /*@__PURE__*/ S.suspend(() =>
81
+ S.Struct({}),
82
+ ).annotate({
83
+ identifier: "GetReaderUpgradeChunkResponse",
84
+ }) as any as S.Schema<GetReaderUpgradeChunkResponse>;
85
+
86
+ export interface GetReaderUpgradeDownloadRequest {
87
+ /** Backup archive name. */
88
+ file_name: string;
89
+ }
90
+ export const GetReaderUpgradeDownloadRequest = /*@__PURE__*/ S.suspend(() =>
91
+ S.Struct({
92
+ file_name: S.String.pipe(T.Query("file-name")),
93
+ }).pipe(
94
+ T.Http({ method: "GET", uri: "/reader/_upgrade_/download", code: 200 }),
95
+ ),
96
+ ).annotate({
97
+ identifier: "GetReaderUpgradeDownloadRequest",
98
+ }) as any as S.Schema<GetReaderUpgradeDownloadRequest>;
99
+
100
+ export interface GetReaderUpgradeDownloadResponse {}
101
+ export const GetReaderUpgradeDownloadResponse = /*@__PURE__*/ S.suspend(() =>
102
+ S.Struct({}),
103
+ ).annotate({
104
+ identifier: "GetReaderUpgradeDownloadResponse",
105
+ }) as any as S.Schema<GetReaderUpgradeDownloadResponse>;
106
+
107
+ export interface GetReaderUpgradeSpeedtestRequest {}
108
+ export const GetReaderUpgradeSpeedtestRequest = /*@__PURE__*/ S.suspend(() =>
109
+ S.Struct({}).pipe(
110
+ T.Http({ method: "GET", uri: "/reader/_upgrade_/speedtest", code: 200 }),
111
+ ),
112
+ ).annotate({
113
+ identifier: "GetReaderUpgradeSpeedtestRequest",
114
+ }) as any as S.Schema<GetReaderUpgradeSpeedtestRequest>;
115
+
116
+ export interface GetReaderUpgradeSpeedtestResponse {}
117
+ export const GetReaderUpgradeSpeedtestResponse = /*@__PURE__*/ S.suspend(() =>
118
+ S.Struct({}),
119
+ ).annotate({
120
+ identifier: "GetReaderUpgradeSpeedtestResponse",
121
+ }) as any as S.Schema<GetReaderUpgradeSpeedtestResponse>;
122
+
123
+ export type GetReaderError = ProxmoxBackupOpError;
124
+ /** Upgraded to backup protocol ('proxmox-backup-reader-protocol-v1'). */
125
+ export const getReader: API.OperationMethod<
126
+ GetReaderRequest,
127
+ GetReaderResponse,
128
+ GetReaderError,
129
+ ProxmoxBackupOpContext
130
+ > = /*@__PURE__*/ API.make(() => ({
131
+ input: GetReaderRequest,
132
+ output: GetReaderResponse,
133
+ errors: [],
134
+ protocol: ProxmoxBackupProtocol,
135
+ retry: Retry.Retry,
136
+ }));
137
+
138
+ export type GetReaderUpgradeError = ProxmoxBackupOpError;
139
+ /** Directory index. */
140
+ export const getReaderUpgrade: API.OperationMethod<
141
+ GetReaderUpgradeRequest,
142
+ GetReaderUpgradeResponse,
143
+ GetReaderUpgradeError,
144
+ ProxmoxBackupOpContext
145
+ > = /*@__PURE__*/ API.make(() => ({
146
+ input: GetReaderUpgradeRequest,
147
+ output: GetReaderUpgradeResponse,
148
+ errors: [],
149
+ protocol: ProxmoxBackupProtocol,
150
+ retry: Retry.Retry,
151
+ }));
152
+
153
+ export type GetReaderUpgradeChunkError = ProxmoxBackupOpError;
154
+ /** Download specified chunk. */
155
+ export const getReaderUpgradeChunk: API.OperationMethod<
156
+ GetReaderUpgradeChunkRequest,
157
+ GetReaderUpgradeChunkResponse,
158
+ GetReaderUpgradeChunkError,
159
+ ProxmoxBackupOpContext
160
+ > = /*@__PURE__*/ API.make(() => ({
161
+ input: GetReaderUpgradeChunkRequest,
162
+ output: GetReaderUpgradeChunkResponse,
163
+ errors: [],
164
+ protocol: ProxmoxBackupProtocol,
165
+ retry: Retry.Retry,
166
+ }));
167
+
168
+ export type GetReaderUpgradeDownloadError = ProxmoxBackupOpError;
169
+ /** Download specified file. */
170
+ export const getReaderUpgradeDownload: API.OperationMethod<
171
+ GetReaderUpgradeDownloadRequest,
172
+ GetReaderUpgradeDownloadResponse,
173
+ GetReaderUpgradeDownloadError,
174
+ ProxmoxBackupOpContext
175
+ > = /*@__PURE__*/ API.make(() => ({
176
+ input: GetReaderUpgradeDownloadRequest,
177
+ output: GetReaderUpgradeDownloadResponse,
178
+ errors: [],
179
+ protocol: ProxmoxBackupProtocol,
180
+ retry: Retry.Retry,
181
+ }));
182
+
183
+ export type GetReaderUpgradeSpeedtestError = ProxmoxBackupOpError;
184
+ /** Test 1M block download speed. */
185
+ export const getReaderUpgradeSpeedtest: API.OperationMethod<
186
+ GetReaderUpgradeSpeedtestRequest,
187
+ GetReaderUpgradeSpeedtestResponse,
188
+ GetReaderUpgradeSpeedtestError,
189
+ ProxmoxBackupOpContext
190
+ > = /*@__PURE__*/ API.make(() => ({
191
+ input: GetReaderUpgradeSpeedtestRequest,
192
+ output: GetReaderUpgradeSpeedtestResponse,
193
+ errors: [],
194
+ protocol: ProxmoxBackupProtocol,
195
+ retry: Retry.Retry,
196
+ }));
@@ -0,0 +1,39 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (apidoc.js, via scripts/apidoc.ts — see its header). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.ts";
5
+ import {
6
+ ProxmoxBackupProtocol,
7
+ type ProxmoxBackupOpError,
8
+ type ProxmoxBackupOpContext,
9
+ } from "../protocol.ts";
10
+ import * as Retry from "../retry.ts";
11
+
12
+ export type { ProxmoxBackupOpError, ProxmoxBackupOpContext };
13
+
14
+ export interface GetRootRequest {}
15
+ export const GetRootRequest = /*@__PURE__*/ S.suspend(() =>
16
+ S.Struct({}).pipe(T.Http({ method: "GET", uri: "/", code: 200 })),
17
+ ).annotate({ identifier: "GetRootRequest" }) as any as S.Schema<GetRootRequest>;
18
+
19
+ export interface GetRootResponse {}
20
+ export const GetRootResponse = /*@__PURE__*/ S.suspend(() =>
21
+ S.Struct({}),
22
+ ).annotate({
23
+ identifier: "GetRootResponse",
24
+ }) as any as S.Schema<GetRootResponse>;
25
+
26
+ export type GetRootError = ProxmoxBackupOpError;
27
+ /** Directory index. */
28
+ export const getRoot: API.OperationMethod<
29
+ GetRootRequest,
30
+ GetRootResponse,
31
+ GetRootError,
32
+ ProxmoxBackupOpContext
33
+ > = /*@__PURE__*/ API.make(() => ({
34
+ input: GetRootRequest,
35
+ output: GetRootResponse,
36
+ errors: [],
37
+ protocol: ProxmoxBackupProtocol,
38
+ retry: Retry.Retry,
39
+ }));