@distilled.cloud/stackit 0.0.0-placeholder → 1.0.0-rc.13

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 (298) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +34 -0
  3. package/lib/credentials.d.ts +29 -0
  4. package/lib/credentials.d.ts.map +1 -0
  5. package/lib/credentials.js +49 -0
  6. package/lib/credentials.js.map +1 -0
  7. package/lib/errors.d.ts +36 -0
  8. package/lib/errors.d.ts.map +1 -0
  9. package/lib/errors.js +26 -0
  10. package/lib/errors.js.map +1 -0
  11. package/lib/index.d.ts +30 -0
  12. package/lib/index.d.ts.map +1 -0
  13. package/lib/index.js +30 -0
  14. package/lib/index.js.map +1 -0
  15. package/lib/pagination.d.ts +9 -0
  16. package/lib/pagination.d.ts.map +1 -0
  17. package/lib/pagination.js +48 -0
  18. package/lib/pagination.js.map +1 -0
  19. package/lib/protocol.d.ts +32 -0
  20. package/lib/protocol.d.ts.map +1 -0
  21. package/lib/protocol.js +148 -0
  22. package/lib/protocol.js.map +1 -0
  23. package/lib/response-validation.test.d.ts +4 -0
  24. package/lib/response-validation.test.d.ts.map +1 -0
  25. package/lib/response-validation.test.js +31 -0
  26. package/lib/response-validation.test.js.map +1 -0
  27. package/lib/retry.d.ts +31 -0
  28. package/lib/retry.d.ts.map +1 -0
  29. package/lib/retry.js +31 -0
  30. package/lib/retry.js.map +1 -0
  31. package/lib/services/alb.d.ts +603 -0
  32. package/lib/services/alb.d.ts.map +1 -0
  33. package/lib/services/alb.js +562 -0
  34. package/lib/services/alb.js.map +1 -0
  35. package/lib/services/alb_waf.d.ts +526 -0
  36. package/lib/services/alb_waf.d.ts.map +1 -0
  37. package/lib/services/alb_waf.js +545 -0
  38. package/lib/services/alb_waf.js.map +1 -0
  39. package/lib/services/authorization.d.ts +251 -0
  40. package/lib/services/authorization.d.ts.map +1 -0
  41. package/lib/services/authorization.js +353 -0
  42. package/lib/services/authorization.js.map +1 -0
  43. package/lib/services/automation.d.ts +358 -0
  44. package/lib/services/automation.d.ts.map +1 -0
  45. package/lib/services/automation.js +426 -0
  46. package/lib/services/automation.js.map +1 -0
  47. package/lib/services/cdn.d.ts +1239 -0
  48. package/lib/services/cdn.d.ts.map +1 -0
  49. package/lib/services/cdn.js +992 -0
  50. package/lib/services/cdn.js.map +1 -0
  51. package/lib/services/certificates.d.ts +201 -0
  52. package/lib/services/certificates.d.ts.map +1 -0
  53. package/lib/services/certificates.js +197 -0
  54. package/lib/services/certificates.js.map +1 -0
  55. package/lib/services/cost.d.ts +222 -0
  56. package/lib/services/cost.d.ts.map +1 -0
  57. package/lib/services/cost.js +188 -0
  58. package/lib/services/cost.js.map +1 -0
  59. package/lib/services/dns.d.ts +875 -0
  60. package/lib/services/dns.d.ts.map +1 -0
  61. package/lib/services/dns.js +854 -0
  62. package/lib/services/dns.js.map +1 -0
  63. package/lib/services/dremio.d.ts +358 -0
  64. package/lib/services/dremio.d.ts.map +1 -0
  65. package/lib/services/dremio.js +339 -0
  66. package/lib/services/dremio.js.map +1 -0
  67. package/lib/services/edge.d.ts +312 -0
  68. package/lib/services/edge.d.ts.map +1 -0
  69. package/lib/services/edge.js +375 -0
  70. package/lib/services/edge.js.map +1 -0
  71. package/lib/services/functions.d.ts +409 -0
  72. package/lib/services/functions.d.ts.map +1 -0
  73. package/lib/services/functions.js +423 -0
  74. package/lib/services/functions.js.map +1 -0
  75. package/lib/services/git.d.ts +497 -0
  76. package/lib/services/git.d.ts.map +1 -0
  77. package/lib/services/git.js +552 -0
  78. package/lib/services/git.js.map +1 -0
  79. package/lib/services/iaas.d.ts +2965 -0
  80. package/lib/services/iaas.d.ts.map +1 -0
  81. package/lib/services/iaas.js +3768 -0
  82. package/lib/services/iaas.js.map +1 -0
  83. package/lib/services/index.d.ts +51 -0
  84. package/lib/services/index.d.ts.map +1 -0
  85. package/lib/services/index.js +52 -0
  86. package/lib/services/index.js.map +1 -0
  87. package/lib/services/intake.d.ts +555 -0
  88. package/lib/services/intake.d.ts.map +1 -0
  89. package/lib/services/intake.js +513 -0
  90. package/lib/services/intake.js.map +1 -0
  91. package/lib/services/kms.d.ts +654 -0
  92. package/lib/services/kms.d.ts.map +1 -0
  93. package/lib/services/kms.js +703 -0
  94. package/lib/services/kms.js.map +1 -0
  95. package/lib/services/lb_ip_lists.d.ts +162 -0
  96. package/lib/services/lb_ip_lists.d.ts.map +1 -0
  97. package/lib/services/lb_ip_lists.js +173 -0
  98. package/lib/services/lb_ip_lists.js.map +1 -0
  99. package/lib/services/load_balancer.d.ts +563 -0
  100. package/lib/services/load_balancer.d.ts.map +1 -0
  101. package/lib/services/load_balancer.js +542 -0
  102. package/lib/services/load_balancer.js.map +1 -0
  103. package/lib/services/logme.d.ts +516 -0
  104. package/lib/services/logme.d.ts.map +1 -0
  105. package/lib/services/logme.js +636 -0
  106. package/lib/services/logme.js.map +1 -0
  107. package/lib/services/logs.d.ts +436 -0
  108. package/lib/services/logs.d.ts.map +1 -0
  109. package/lib/services/logs.js +498 -0
  110. package/lib/services/logs.js.map +1 -0
  111. package/lib/services/mariadb.d.ts +479 -0
  112. package/lib/services/mariadb.d.ts.map +1 -0
  113. package/lib/services/mariadb.js +611 -0
  114. package/lib/services/mariadb.js.map +1 -0
  115. package/lib/services/model_experiments.d.ts +306 -0
  116. package/lib/services/model_experiments.d.ts.map +1 -0
  117. package/lib/services/model_experiments.js +356 -0
  118. package/lib/services/model_experiments.js.map +1 -0
  119. package/lib/services/model_serving.d.ts +289 -0
  120. package/lib/services/model_serving.d.ts.map +1 -0
  121. package/lib/services/model_serving.js +319 -0
  122. package/lib/services/model_serving.js.map +1 -0
  123. package/lib/services/mongodb_flex.d.ts +826 -0
  124. package/lib/services/mongodb_flex.d.ts.map +1 -0
  125. package/lib/services/mongodb_flex.js +889 -0
  126. package/lib/services/mongodb_flex.js.map +1 -0
  127. package/lib/services/object_storage.d.ts +446 -0
  128. package/lib/services/object_storage.d.ts.map +1 -0
  129. package/lib/services/object_storage.js +577 -0
  130. package/lib/services/object_storage.js.map +1 -0
  131. package/lib/services/observability.d.ts +2750 -0
  132. package/lib/services/observability.d.ts.map +1 -0
  133. package/lib/services/observability.js +3407 -0
  134. package/lib/services/observability.js.map +1 -0
  135. package/lib/services/opensearch.d.ts +505 -0
  136. package/lib/services/opensearch.d.ts.map +1 -0
  137. package/lib/services/opensearch.js +623 -0
  138. package/lib/services/opensearch.js.map +1 -0
  139. package/lib/services/pim.d.ts +997 -0
  140. package/lib/services/pim.d.ts.map +1 -0
  141. package/lib/services/pim.js +789 -0
  142. package/lib/services/pim.js.map +1 -0
  143. package/lib/services/postgres_flex.d.ts +854 -0
  144. package/lib/services/postgres_flex.d.ts.map +1 -0
  145. package/lib/services/postgres_flex.js +1018 -0
  146. package/lib/services/postgres_flex.js.map +1 -0
  147. package/lib/services/pubsub.d.ts +489 -0
  148. package/lib/services/pubsub.d.ts.map +1 -0
  149. package/lib/services/pubsub.js +614 -0
  150. package/lib/services/pubsub.js.map +1 -0
  151. package/lib/services/rabbitmq.d.ts +523 -0
  152. package/lib/services/rabbitmq.d.ts.map +1 -0
  153. package/lib/services/rabbitmq.js +636 -0
  154. package/lib/services/rabbitmq.js.map +1 -0
  155. package/lib/services/registry.d.ts +212 -0
  156. package/lib/services/registry.d.ts.map +1 -0
  157. package/lib/services/registry.js +221 -0
  158. package/lib/services/registry.js.map +1 -0
  159. package/lib/services/resource_manager.d.ts +458 -0
  160. package/lib/services/resource_manager.d.ts.map +1 -0
  161. package/lib/services/resource_manager.js +503 -0
  162. package/lib/services/resource_manager.js.map +1 -0
  163. package/lib/services/run_command.d.ts +175 -0
  164. package/lib/services/run_command.d.ts.map +1 -0
  165. package/lib/services/run_command.js +203 -0
  166. package/lib/services/run_command.js.map +1 -0
  167. package/lib/services/sca.d.ts +541 -0
  168. package/lib/services/sca.d.ts.map +1 -0
  169. package/lib/services/sca.js +478 -0
  170. package/lib/services/sca.js.map +1 -0
  171. package/lib/services/scf.d.ts +498 -0
  172. package/lib/services/scf.d.ts.map +1 -0
  173. package/lib/services/scf.js +718 -0
  174. package/lib/services/scf.js.map +1 -0
  175. package/lib/services/secrets_manager.d.ts +505 -0
  176. package/lib/services/secrets_manager.d.ts.map +1 -0
  177. package/lib/services/secrets_manager.js +659 -0
  178. package/lib/services/secrets_manager.js.map +1 -0
  179. package/lib/services/server_backup.d.ts +380 -0
  180. package/lib/services/server_backup.d.ts.map +1 -0
  181. package/lib/services/server_backup.js +474 -0
  182. package/lib/services/server_backup.js.map +1 -0
  183. package/lib/services/server_update.d.ts +292 -0
  184. package/lib/services/server_update.d.ts.map +1 -0
  185. package/lib/services/server_update.js +364 -0
  186. package/lib/services/server_update.js.map +1 -0
  187. package/lib/services/service_account.d.ts +465 -0
  188. package/lib/services/service_account.d.ts.map +1 -0
  189. package/lib/services/service_account.js +523 -0
  190. package/lib/services/service_account.js.map +1 -0
  191. package/lib/services/service_enablement.d.ts +149 -0
  192. package/lib/services/service_enablement.d.ts.map +1 -0
  193. package/lib/services/service_enablement.js +159 -0
  194. package/lib/services/service_enablement.js.map +1 -0
  195. package/lib/services/sfs.d.ts +721 -0
  196. package/lib/services/sfs.d.ts.map +1 -0
  197. package/lib/services/sfs.js +845 -0
  198. package/lib/services/sfs.js.map +1 -0
  199. package/lib/services/ske.d.ts +536 -0
  200. package/lib/services/ske.d.ts.map +1 -0
  201. package/lib/services/ske.js +598 -0
  202. package/lib/services/ske.js.map +1 -0
  203. package/lib/services/sqlserverflex.d.ts +956 -0
  204. package/lib/services/sqlserverflex.d.ts.map +1 -0
  205. package/lib/services/sqlserverflex.js +1087 -0
  206. package/lib/services/sqlserverflex.js.map +1 -0
  207. package/lib/services/stackit_marketplace.d.ts +288 -0
  208. package/lib/services/stackit_marketplace.d.ts.map +1 -0
  209. package/lib/services/stackit_marketplace.js +393 -0
  210. package/lib/services/stackit_marketplace.js.map +1 -0
  211. package/lib/services/telemetry_link.d.ts +443 -0
  212. package/lib/services/telemetry_link.d.ts.map +1 -0
  213. package/lib/services/telemetry_link.js +550 -0
  214. package/lib/services/telemetry_link.js.map +1 -0
  215. package/lib/services/telemetry_router.d.ts +493 -0
  216. package/lib/services/telemetry_router.d.ts.map +1 -0
  217. package/lib/services/telemetry_router.js +523 -0
  218. package/lib/services/telemetry_router.js.map +1 -0
  219. package/lib/services/ufw.d.ts +295 -0
  220. package/lib/services/ufw.d.ts.map +1 -0
  221. package/lib/services/ufw.js +301 -0
  222. package/lib/services/ufw.js.map +1 -0
  223. package/lib/services/valkey.d.ts +505 -0
  224. package/lib/services/valkey.d.ts.map +1 -0
  225. package/lib/services/valkey.js +627 -0
  226. package/lib/services/valkey.js.map +1 -0
  227. package/lib/services/vpn.d.ts +1024 -0
  228. package/lib/services/vpn.d.ts.map +1 -0
  229. package/lib/services/vpn.js +1013 -0
  230. package/lib/services/vpn.js.map +1 -0
  231. package/lib/services/workflows.d.ts +600 -0
  232. package/lib/services/workflows.d.ts.map +1 -0
  233. package/lib/services/workflows.js +556 -0
  234. package/lib/services/workflows.js.map +1 -0
  235. package/lib/traits.d.ts +24 -0
  236. package/lib/traits.d.ts.map +1 -0
  237. package/lib/traits.js +15 -0
  238. package/lib/traits.js.map +1 -0
  239. package/package.json +78 -7
  240. package/src/credentials.ts +90 -0
  241. package/src/errors.ts +50 -0
  242. package/src/index.ts +34 -0
  243. package/src/pagination.ts +73 -0
  244. package/src/protocol.ts +243 -0
  245. package/src/response-validation.test.ts +45 -0
  246. package/src/retry.ts +53 -0
  247. package/src/services/alb.ts +1409 -0
  248. package/src/services/alb_waf.ts +1347 -0
  249. package/src/services/authorization.ts +740 -0
  250. package/src/services/automation.ts +966 -0
  251. package/src/services/cdn.ts +2736 -0
  252. package/src/services/certificates.ts +450 -0
  253. package/src/services/cost.ts +484 -0
  254. package/src/services/dns.ts +2271 -0
  255. package/src/services/dremio.ts +803 -0
  256. package/src/services/edge.ts +839 -0
  257. package/src/services/functions.ts +1010 -0
  258. package/src/services/git.ts +1275 -0
  259. package/src/services/iaas.ts +8670 -0
  260. package/src/services/index.ts +51 -0
  261. package/src/services/intake.ts +1233 -0
  262. package/src/services/kms.ts +1638 -0
  263. package/src/services/lb_ip_lists.ts +377 -0
  264. package/src/services/load_balancer.ts +1342 -0
  265. package/src/services/logme.ts +1379 -0
  266. package/src/services/logs.ts +1150 -0
  267. package/src/services/mariadb.ts +1293 -0
  268. package/src/services/model_experiments.ts +797 -0
  269. package/src/services/model_serving.ts +697 -0
  270. package/src/services/mongodb_flex.ts +2078 -0
  271. package/src/services/object_storage.ts +1248 -0
  272. package/src/services/observability.ts +7856 -0
  273. package/src/services/opensearch.ts +1354 -0
  274. package/src/services/pim.ts +2090 -0
  275. package/src/services/postgres_flex.ts +2326 -0
  276. package/src/services/pubsub.ts +1336 -0
  277. package/src/services/rabbitmq.ts +1402 -0
  278. package/src/services/registry.ts +494 -0
  279. package/src/services/resource_manager.ts +1155 -0
  280. package/src/services/run_command.ts +441 -0
  281. package/src/services/sca.ts +1222 -0
  282. package/src/services/scf.ts +1537 -0
  283. package/src/services/secrets_manager.ts +1399 -0
  284. package/src/services/server_backup.ts +1032 -0
  285. package/src/services/server_update.ts +767 -0
  286. package/src/services/service_account.ts +1208 -0
  287. package/src/services/service_enablement.ts +359 -0
  288. package/src/services/sfs.ts +1913 -0
  289. package/src/services/ske.ts +1408 -0
  290. package/src/services/sqlserverflex.ts +2543 -0
  291. package/src/services/stackit_marketplace.ts +853 -0
  292. package/src/services/telemetry_link.ts +1245 -0
  293. package/src/services/telemetry_router.ts +1205 -0
  294. package/src/services/ufw.ts +704 -0
  295. package/src/services/valkey.ts +1357 -0
  296. package/src/services/vpn.ts +2554 -0
  297. package/src/services/workflows.ts +1361 -0
  298. package/src/traits.ts +65 -0
@@ -0,0 +1,2326 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-stackit). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as Redacted from "effect/Redacted";
4
+ import * as API from "@distilled.cloud/core/api";
5
+ import * as C from "@distilled.cloud/core/category";
6
+ import * as T from "../traits.ts";
7
+ import {
8
+ StackitProtocol,
9
+ type StackitOpError,
10
+ type StackitOpContext,
11
+ } from "../protocol.ts";
12
+ import { UnknownStackitError } from "../errors.ts";
13
+ import * as Retry from "../retry.ts";
14
+
15
+ export type { StackitOpError, StackitOpContext };
16
+
17
+ export class BadRequest
18
+ extends /*@__PURE__*/ T.applyErrorMatchers(
19
+ /*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
20
+ code: S.Number,
21
+ message: S.String,
22
+ }).pipe(C.withBadRequestError),
23
+ [{ status: 400 }],
24
+ ) {}
25
+
26
+ export class Conflict
27
+ extends /*@__PURE__*/ T.applyErrorMatchers(
28
+ /*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
29
+ code: S.Number,
30
+ message: S.String,
31
+ }).pipe(C.withConflictError),
32
+ [{ status: 409 }],
33
+ ) {}
34
+
35
+ export class Forbidden
36
+ extends /*@__PURE__*/ T.applyErrorMatchers(
37
+ /*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
38
+ code: S.Number,
39
+ message: S.String,
40
+ }).pipe(C.withAuthError),
41
+ [{ status: 403 }],
42
+ ) {}
43
+
44
+ export class NotFound
45
+ extends /*@__PURE__*/ T.applyErrorMatchers(
46
+ /*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
47
+ code: S.Number,
48
+ message: S.String,
49
+ }).pipe(C.withBadRequestError),
50
+ [{ status: 404 }],
51
+ ) {}
52
+
53
+ export class UnprocessableEntity
54
+ extends /*@__PURE__*/ T.applyErrorMatchers(
55
+ /*@__PURE__*/ S.TaggedError<UnprocessableEntity>()("UnprocessableEntity", {
56
+ code: S.Number,
57
+ message: S.String,
58
+ }).pipe(C.withBadRequestError),
59
+ [{ status: 422 }],
60
+ ) {}
61
+
62
+ export type CloneInstanceRequestRegion = "eu01" | "eu02";
63
+ export const CloneInstanceRequestRegion = /*@__PURE__*/ S.String;
64
+
65
+ export interface CloneInstanceOverrides {
66
+ class: string;
67
+ name?: string;
68
+ size: number;
69
+ }
70
+ export const CloneInstanceOverrides = /*@__PURE__*/ S.suspend(() =>
71
+ S.Struct({
72
+ class: S.String,
73
+ name: S.optional(S.String),
74
+ size: S.Number,
75
+ }),
76
+ ).annotate({
77
+ identifier: "CloneInstanceOverrides",
78
+ }) as any as S.Schema<CloneInstanceOverrides>;
79
+
80
+ export interface CloneInstanceRequest {
81
+ /** The STACKIT project ID. */
82
+ projectId: string;
83
+ /** The region which should be addressed */
84
+ region: CloneInstanceRequestRegion | (string & {});
85
+ /** The ID of the instance. */
86
+ instanceId: string;
87
+ instanceOverrides: CloneInstanceOverrides;
88
+ pointInTime: string;
89
+ }
90
+ export const CloneInstanceRequest = /*@__PURE__*/ S.suspend(() =>
91
+ S.Struct({
92
+ projectId: S.String.pipe(T.Label()),
93
+ region: CloneInstanceRequestRegion.pipe(T.Label()),
94
+ instanceId: S.String.pipe(T.Label()),
95
+ instanceOverrides: CloneInstanceOverrides,
96
+ pointInTime: S.String,
97
+ }).pipe(
98
+ T.Http({
99
+ method: "POST",
100
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/clone",
101
+ code: 200,
102
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
103
+ }),
104
+ ),
105
+ ).annotate({
106
+ identifier: "CloneInstanceRequest",
107
+ }) as any as S.Schema<CloneInstanceRequest>;
108
+
109
+ export interface CloneInstanceResponse {
110
+ id: string;
111
+ }
112
+ export const CloneInstanceResponse = /*@__PURE__*/ S.suspend(() =>
113
+ S.Struct({
114
+ id: S.String,
115
+ }),
116
+ ).annotate({
117
+ identifier: "CloneInstanceResponse",
118
+ }) as any as S.Schema<CloneInstanceResponse>;
119
+
120
+ export type CreateDatabaseRequestRegion = "eu01" | "eu02";
121
+ export const CreateDatabaseRequestRegion = /*@__PURE__*/ S.String;
122
+
123
+ export interface CreateDatabaseRequest {
124
+ /** The STACKIT project ID. */
125
+ projectId: string;
126
+ /** The region which should be addressed */
127
+ region: CreateDatabaseRequestRegion | (string & {});
128
+ /** The ID of the instance. */
129
+ instanceId: string;
130
+ name: string;
131
+ owner?: string;
132
+ }
133
+ export const CreateDatabaseRequest = /*@__PURE__*/ S.suspend(() =>
134
+ S.Struct({
135
+ projectId: S.String.pipe(T.Label()),
136
+ region: CreateDatabaseRequestRegion.pipe(T.Label()),
137
+ instanceId: S.String.pipe(T.Label()),
138
+ name: S.String,
139
+ owner: S.optional(S.String),
140
+ }).pipe(
141
+ T.Http({
142
+ method: "POST",
143
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases",
144
+ code: 200,
145
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
146
+ }),
147
+ ),
148
+ ).annotate({
149
+ identifier: "CreateDatabaseRequest",
150
+ }) as any as S.Schema<CreateDatabaseRequest>;
151
+
152
+ export interface CreateDatabaseResponse {
153
+ id: number;
154
+ }
155
+ export const CreateDatabaseResponse = /*@__PURE__*/ S.suspend(() =>
156
+ S.Struct({
157
+ id: S.Number,
158
+ }),
159
+ ).annotate({
160
+ identifier: "CreateDatabaseResponse",
161
+ }) as any as S.Schema<CreateDatabaseResponse>;
162
+
163
+ export type CreateInstanceRequestRegion = "eu01" | "eu02";
164
+ export const CreateInstanceRequestRegion = /*@__PURE__*/ S.String;
165
+
166
+ /** The configuration for instance's volume and backup storage encryption. ⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected. */
167
+ export interface InstanceEncryption {
168
+ /** The encryption-key key identifier */
169
+ kekKeyId: string;
170
+ /** The encryption-key keyring identifier */
171
+ kekKeyRingId: string;
172
+ /** The encryption-key version */
173
+ kekKeyVersion: string;
174
+ serviceAccount: string;
175
+ }
176
+ export const InstanceEncryption = /*@__PURE__*/ S.suspend(() =>
177
+ S.Struct({
178
+ kekKeyId: S.String,
179
+ kekKeyRingId: S.String,
180
+ kekKeyVersion: S.String,
181
+ serviceAccount: S.String,
182
+ }),
183
+ ).annotate({
184
+ identifier: "InstanceEncryption",
185
+ }) as any as S.Schema<InstanceEncryption>;
186
+
187
+ /** Key-value pairs, 63 characters max, begin and end with an alphanumerical character, may contain dashes (-), underscores (_), dots (.), and alphanumerics between. Key MUST be at least 1 character. Max 64 labels Regex for keys: ^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ Regex for values: ^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$ The stackit- prefix is reserved and cannot be used for Keys. */
188
+ export type Labels = { [key: string]: string | undefined };
189
+ export const Labels = /*@__PURE__*/ S.Record(
190
+ S.String,
191
+ S.String,
192
+ ) as any as S.Schema<Labels>;
193
+
194
+ /** The access scope of the instance. It defines if the instance is public or airgapped. ⚠️ **Note:** "SNA" value for the "network.accessScope" field is only permitted for enabled accounts. If your account does not have access, the request will be rejected. */
195
+ export type InstanceNetworkAccessScope = "PUBLIC" | "SNA";
196
+ export const InstanceNetworkAccessScope = /*@__PURE__*/ S.String;
197
+
198
+ /** List of IPV4 cidr. */
199
+ export type Acl = Array<string>;
200
+ export const Acl = /*@__PURE__*/ S.Array(S.String) as any as S.Schema<Acl>;
201
+
202
+ /** The access configuration of the instance */
203
+ export interface InstanceNetworkCreate {
204
+ accessScope?: InstanceNetworkAccessScope | (string & {});
205
+ acl: Acl;
206
+ }
207
+ export const InstanceNetworkCreate = /*@__PURE__*/ S.suspend(() =>
208
+ S.Struct({
209
+ accessScope: S.optional(InstanceNetworkAccessScope),
210
+ acl: Acl,
211
+ }),
212
+ ).annotate({
213
+ identifier: "InstanceNetworkCreate",
214
+ }) as any as S.Schema<InstanceNetworkCreate>;
215
+
216
+ /** The object containing information about the storage size and class. */
217
+ export interface StorageCreate {
218
+ class: string;
219
+ size: number;
220
+ }
221
+ export const StorageCreate = /*@__PURE__*/ S.suspend(() =>
222
+ S.Struct({
223
+ class: S.String,
224
+ size: S.Number,
225
+ }),
226
+ ).annotate({ identifier: "StorageCreate" }) as any as S.Schema<StorageCreate>;
227
+
228
+ export interface CreateInstanceRequest {
229
+ /** The STACKIT project ID. */
230
+ projectId: string;
231
+ /** The region which should be addressed */
232
+ region: CreateInstanceRequestRegion | (string & {});
233
+ backupSchedule: string;
234
+ encryption?: InstanceEncryption;
235
+ flavorId: string;
236
+ labels?: Labels;
237
+ name: string;
238
+ network: InstanceNetworkCreate;
239
+ retentionDays: number | null;
240
+ storage: StorageCreate;
241
+ version: string;
242
+ }
243
+ export const CreateInstanceRequest = /*@__PURE__*/ S.suspend(() =>
244
+ S.Struct({
245
+ projectId: S.String.pipe(T.Label()),
246
+ region: CreateInstanceRequestRegion.pipe(T.Label()),
247
+ backupSchedule: S.String,
248
+ encryption: S.optional(InstanceEncryption),
249
+ flavorId: S.String,
250
+ labels: S.optional(Labels),
251
+ name: S.String,
252
+ network: InstanceNetworkCreate,
253
+ retentionDays: S.NullOr(S.Number),
254
+ storage: StorageCreate,
255
+ version: S.String,
256
+ }).pipe(
257
+ T.Http({
258
+ method: "POST",
259
+ uri: "/v3/projects/{projectId}/regions/{region}/instances",
260
+ code: 200,
261
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
262
+ }),
263
+ ),
264
+ ).annotate({
265
+ identifier: "CreateInstanceRequest",
266
+ }) as any as S.Schema<CreateInstanceRequest>;
267
+
268
+ export interface CreateInstanceResponse {
269
+ id: string;
270
+ }
271
+ export const CreateInstanceResponse = /*@__PURE__*/ S.suspend(() =>
272
+ S.Struct({
273
+ id: S.String,
274
+ }),
275
+ ).annotate({
276
+ identifier: "CreateInstanceResponse",
277
+ }) as any as S.Schema<CreateInstanceResponse>;
278
+
279
+ export type CreateUserRequestRegion = "eu01" | "eu02";
280
+ export const CreateUserRequestRegion = /*@__PURE__*/ S.String;
281
+
282
+ /** A list containing the user roles for the instance. Please refer to the List Roles endpoint for a list of all available Roles. */
283
+ export type CreateUserRequestRolesList = Array<string>;
284
+ export const CreateUserRequestRolesList = /*@__PURE__*/ S.Array(
285
+ S.String,
286
+ ) as any as S.Schema<CreateUserRequestRolesList>;
287
+
288
+ export interface CreateUserRequest {
289
+ /** The STACKIT project ID. */
290
+ projectId: string;
291
+ /** The region which should be addressed */
292
+ region: CreateUserRequestRegion | (string & {});
293
+ /** The ID of the instance. */
294
+ instanceId: string;
295
+ name: string;
296
+ /** A list containing the user roles for the instance. Please refer to the List Roles endpoint for a list of all available Roles. */
297
+ roles?: CreateUserRequestRolesList;
298
+ }
299
+ export const CreateUserRequest = /*@__PURE__*/ S.suspend(() =>
300
+ S.Struct({
301
+ projectId: S.String.pipe(T.Label()),
302
+ region: CreateUserRequestRegion.pipe(T.Label()),
303
+ instanceId: S.String.pipe(T.Label()),
304
+ name: S.String,
305
+ roles: S.optional(CreateUserRequestRolesList),
306
+ }).pipe(
307
+ T.Http({
308
+ method: "POST",
309
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users",
310
+ code: 200,
311
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
312
+ }),
313
+ ),
314
+ ).annotate({
315
+ identifier: "CreateUserRequest",
316
+ }) as any as S.Schema<CreateUserRequest>;
317
+
318
+ export interface CreateUserResponse {
319
+ id: number;
320
+ name: string;
321
+ password: string | Redacted.Redacted<string>;
322
+ state: string;
323
+ }
324
+ export const CreateUserResponse = /*@__PURE__*/ S.suspend(() =>
325
+ S.Struct({
326
+ id: S.Number,
327
+ name: S.String,
328
+ password: S.String.pipe(T.SensitiveValue({})),
329
+ state: S.String,
330
+ }),
331
+ ).annotate({
332
+ identifier: "CreateUserResponse",
333
+ }) as any as S.Schema<CreateUserResponse>;
334
+
335
+ export type DeleteDatabaseRequestRegion = "eu01" | "eu02";
336
+ export const DeleteDatabaseRequestRegion = /*@__PURE__*/ S.String;
337
+
338
+ export interface DeleteDatabaseRequest {
339
+ /** The STACKIT project ID. */
340
+ projectId: string;
341
+ /** The region which should be addressed */
342
+ region: DeleteDatabaseRequestRegion | (string & {});
343
+ /** The ID of the instance. */
344
+ instanceId: string;
345
+ /** The ID of the database. */
346
+ databaseId: number;
347
+ }
348
+ export const DeleteDatabaseRequest = /*@__PURE__*/ S.suspend(() =>
349
+ S.Struct({
350
+ projectId: S.String.pipe(T.Label()),
351
+ region: DeleteDatabaseRequestRegion.pipe(T.Label()),
352
+ instanceId: S.String.pipe(T.Label()),
353
+ databaseId: S.Number.pipe(T.Label()),
354
+ }).pipe(
355
+ T.Http({
356
+ method: "DELETE",
357
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseId}",
358
+ code: 200,
359
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
360
+ }),
361
+ ),
362
+ ).annotate({
363
+ identifier: "DeleteDatabaseRequest",
364
+ }) as any as S.Schema<DeleteDatabaseRequest>;
365
+
366
+ export interface DeleteDatabaseResponse {}
367
+ export const DeleteDatabaseResponse = /*@__PURE__*/ S.suspend(() =>
368
+ S.Struct({}),
369
+ ).annotate({
370
+ identifier: "DeleteDatabaseResponse",
371
+ }) as any as S.Schema<DeleteDatabaseResponse>;
372
+
373
+ export type DeleteInstanceRequestRegion = "eu01" | "eu02";
374
+ export const DeleteInstanceRequestRegion = /*@__PURE__*/ S.String;
375
+
376
+ export interface DeleteInstanceRequest {
377
+ /** The STACKIT project ID. */
378
+ projectId: string;
379
+ /** The region which should be addressed */
380
+ region: DeleteInstanceRequestRegion | (string & {});
381
+ /** The ID of the instance. */
382
+ instanceId: string;
383
+ }
384
+ export const DeleteInstanceRequest = /*@__PURE__*/ S.suspend(() =>
385
+ S.Struct({
386
+ projectId: S.String.pipe(T.Label()),
387
+ region: DeleteInstanceRequestRegion.pipe(T.Label()),
388
+ instanceId: S.String.pipe(T.Label()),
389
+ }).pipe(
390
+ T.Http({
391
+ method: "DELETE",
392
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}",
393
+ code: 200,
394
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
395
+ }),
396
+ ),
397
+ ).annotate({
398
+ identifier: "DeleteInstanceRequest",
399
+ }) as any as S.Schema<DeleteInstanceRequest>;
400
+
401
+ export interface DeleteInstanceResponse {}
402
+ export const DeleteInstanceResponse = /*@__PURE__*/ S.suspend(() =>
403
+ S.Struct({}),
404
+ ).annotate({
405
+ identifier: "DeleteInstanceResponse",
406
+ }) as any as S.Schema<DeleteInstanceResponse>;
407
+
408
+ export type DeleteUserRequestRegion = "eu01" | "eu02";
409
+ export const DeleteUserRequestRegion = /*@__PURE__*/ S.String;
410
+
411
+ export interface DeleteUserRequest {
412
+ /** The STACKIT project ID. */
413
+ projectId: string;
414
+ /** The region which should be addressed */
415
+ region: DeleteUserRequestRegion | (string & {});
416
+ /** The ID of the instance. */
417
+ instanceId: string;
418
+ /** The ID of the user. */
419
+ userId: number;
420
+ }
421
+ export const DeleteUserRequest = /*@__PURE__*/ S.suspend(() =>
422
+ S.Struct({
423
+ projectId: S.String.pipe(T.Label()),
424
+ region: DeleteUserRequestRegion.pipe(T.Label()),
425
+ instanceId: S.String.pipe(T.Label()),
426
+ userId: S.Number.pipe(T.Label()),
427
+ }).pipe(
428
+ T.Http({
429
+ method: "DELETE",
430
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}",
431
+ code: 200,
432
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
433
+ }),
434
+ ),
435
+ ).annotate({
436
+ identifier: "DeleteUserRequest",
437
+ }) as any as S.Schema<DeleteUserRequest>;
438
+
439
+ export interface DeleteUserResponse {}
440
+ export const DeleteUserResponse = /*@__PURE__*/ S.suspend(() =>
441
+ S.Struct({}),
442
+ ).annotate({
443
+ identifier: "DeleteUserResponse",
444
+ }) as any as S.Schema<DeleteUserResponse>;
445
+
446
+ export type GetBackupRequestRegion = "eu01" | "eu02";
447
+ export const GetBackupRequestRegion = /*@__PURE__*/ S.String;
448
+
449
+ export interface GetBackupRequest {
450
+ /** The STACKIT project ID. */
451
+ projectId: string;
452
+ /** The region which should be addressed */
453
+ region: GetBackupRequestRegion | (string & {});
454
+ /** The ID of the instance. */
455
+ instanceId: string;
456
+ /** The ID of the backup. */
457
+ backupId: number;
458
+ }
459
+ export const GetBackupRequest = /*@__PURE__*/ S.suspend(() =>
460
+ S.Struct({
461
+ projectId: S.String.pipe(T.Label()),
462
+ region: GetBackupRequestRegion.pipe(T.Label()),
463
+ instanceId: S.String.pipe(T.Label()),
464
+ backupId: S.Number.pipe(T.Label()),
465
+ }).pipe(
466
+ T.Http({
467
+ method: "GET",
468
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/{backupId}",
469
+ code: 200,
470
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
471
+ }),
472
+ ),
473
+ ).annotate({
474
+ identifier: "GetBackupRequest",
475
+ }) as any as S.Schema<GetBackupRequest>;
476
+
477
+ export interface BackupData {
478
+ completionTime: string;
479
+ id: number;
480
+ name: string;
481
+ retainedUntil: string;
482
+ size: number;
483
+ type: string;
484
+ }
485
+ export const BackupData = /*@__PURE__*/ S.suspend(() =>
486
+ S.Struct({
487
+ completionTime: S.String,
488
+ id: S.Number,
489
+ name: S.String,
490
+ retainedUntil: S.String,
491
+ size: S.Number,
492
+ type: S.String,
493
+ }),
494
+ ).annotate({ identifier: "BackupData" }) as any as S.Schema<BackupData>;
495
+
496
+ export type GetDatabaseRequestRegion = "eu01" | "eu02";
497
+ export const GetDatabaseRequestRegion = /*@__PURE__*/ S.String;
498
+
499
+ export interface GetDatabaseRequest {
500
+ /** The STACKIT project ID. */
501
+ projectId: string;
502
+ /** The region which should be addressed */
503
+ region: GetDatabaseRequestRegion | (string & {});
504
+ /** The ID of the instance. */
505
+ instanceId: string;
506
+ /** The ID of the database. */
507
+ databaseId: number;
508
+ }
509
+ export const GetDatabaseRequest = /*@__PURE__*/ S.suspend(() =>
510
+ S.Struct({
511
+ projectId: S.String.pipe(T.Label()),
512
+ region: GetDatabaseRequestRegion.pipe(T.Label()),
513
+ instanceId: S.String.pipe(T.Label()),
514
+ databaseId: S.Number.pipe(T.Label()),
515
+ }).pipe(
516
+ T.Http({
517
+ method: "GET",
518
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseId}",
519
+ code: 200,
520
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
521
+ }),
522
+ ),
523
+ ).annotate({
524
+ identifier: "GetDatabaseRequest",
525
+ }) as any as S.Schema<GetDatabaseRequest>;
526
+
527
+ export interface GetDatabaseResponse {
528
+ id: number;
529
+ name: string;
530
+ owner: string;
531
+ }
532
+ export const GetDatabaseResponse = /*@__PURE__*/ S.suspend(() =>
533
+ S.Struct({
534
+ id: S.Number,
535
+ name: S.String,
536
+ owner: S.String,
537
+ }),
538
+ ).annotate({
539
+ identifier: "GetDatabaseResponse",
540
+ }) as any as S.Schema<GetDatabaseResponse>;
541
+
542
+ export type GetInstanceRequestRegion = "eu01" | "eu02";
543
+ export const GetInstanceRequestRegion = /*@__PURE__*/ S.String;
544
+
545
+ export interface GetInstanceRequest {
546
+ /** The STACKIT project ID. */
547
+ projectId: string;
548
+ /** The region which should be addressed */
549
+ region: GetInstanceRequestRegion | (string & {});
550
+ /** The ID of the instance. */
551
+ instanceId: string;
552
+ }
553
+ export const GetInstanceRequest = /*@__PURE__*/ S.suspend(() =>
554
+ S.Struct({
555
+ projectId: S.String.pipe(T.Label()),
556
+ region: GetInstanceRequestRegion.pipe(T.Label()),
557
+ instanceId: S.String.pipe(T.Label()),
558
+ }).pipe(
559
+ T.Http({
560
+ method: "GET",
561
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}",
562
+ code: 200,
563
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
564
+ }),
565
+ ),
566
+ ).annotate({
567
+ identifier: "GetInstanceRequest",
568
+ }) as any as S.Schema<GetInstanceRequest>;
569
+
570
+ /** The DNS name and port in the instance overview */
571
+ export interface InstanceConnectionInfoWrite {
572
+ /** The host of the instance. */
573
+ host: string;
574
+ /** The port of the instance. */
575
+ port: number;
576
+ }
577
+ export const InstanceConnectionInfoWrite = /*@__PURE__*/ S.suspend(() =>
578
+ S.Struct({
579
+ host: S.String,
580
+ port: S.Number,
581
+ }),
582
+ ).annotate({
583
+ identifier: "InstanceConnectionInfoWrite",
584
+ }) as any as S.Schema<InstanceConnectionInfoWrite>;
585
+
586
+ /** The connection information of the instance */
587
+ export interface InstanceConnectionInfo {
588
+ write: InstanceConnectionInfoWrite;
589
+ }
590
+ export const InstanceConnectionInfo = /*@__PURE__*/ S.suspend(() =>
591
+ S.Struct({
592
+ write: InstanceConnectionInfoWrite,
593
+ }),
594
+ ).annotate({
595
+ identifier: "InstanceConnectionInfo",
596
+ }) as any as S.Schema<InstanceConnectionInfo>;
597
+
598
+ /** The access configuration of the instance */
599
+ export interface InstanceNetwork {
600
+ accessScope?: InstanceNetworkAccessScope;
601
+ acl: Acl;
602
+ instanceAddress?: string;
603
+ routerAddress?: string;
604
+ }
605
+ export const InstanceNetwork = /*@__PURE__*/ S.suspend(() =>
606
+ S.Struct({
607
+ accessScope: S.optional(InstanceNetworkAccessScope),
608
+ acl: Acl,
609
+ instanceAddress: S.optional(S.String),
610
+ routerAddress: S.optional(S.String),
611
+ }),
612
+ ).annotate({
613
+ identifier: "InstanceNetwork",
614
+ }) as any as S.Schema<InstanceNetwork>;
615
+
616
+ /** The current state of the instance. */
617
+ export type State =
618
+ | "READY"
619
+ | "PENDING"
620
+ | "PROGRESSING"
621
+ | "FAILURE"
622
+ | "UNKNOWN"
623
+ | "TERMINATING";
624
+ export const State = /*@__PURE__*/ S.String;
625
+
626
+ /** The object containing information about the storage size and class. */
627
+ export interface Storage {
628
+ class?: string;
629
+ size?: number;
630
+ }
631
+ export const Storage = /*@__PURE__*/ S.suspend(() =>
632
+ S.Struct({
633
+ class: S.optional(S.String),
634
+ size: S.optional(S.Number),
635
+ }),
636
+ ).annotate({ identifier: "Storage" }) as any as S.Schema<Storage>;
637
+
638
+ export interface GetInstanceResponse {
639
+ backupSchedule: string;
640
+ connectionInfo: InstanceConnectionInfo;
641
+ encryption?: InstanceEncryption;
642
+ flavorId: string;
643
+ id: string;
644
+ isDeletable: boolean;
645
+ labels?: Labels;
646
+ name: string;
647
+ network: InstanceNetwork;
648
+ retentionDays: number | null;
649
+ state: State;
650
+ storage: Storage;
651
+ version: string;
652
+ }
653
+ export const GetInstanceResponse = /*@__PURE__*/ S.suspend(() =>
654
+ S.Struct({
655
+ backupSchedule: S.String,
656
+ connectionInfo: InstanceConnectionInfo,
657
+ encryption: S.optional(InstanceEncryption),
658
+ flavorId: S.String,
659
+ id: S.String,
660
+ isDeletable: S.Boolean,
661
+ labels: S.optional(Labels),
662
+ name: S.String,
663
+ network: InstanceNetwork,
664
+ retentionDays: S.NullOr(S.Number),
665
+ state: State,
666
+ storage: Storage,
667
+ version: S.String,
668
+ }),
669
+ ).annotate({
670
+ identifier: "GetInstanceResponse",
671
+ }) as any as S.Schema<GetInstanceResponse>;
672
+
673
+ export type GetUserRequestRegion = "eu01" | "eu02";
674
+ export const GetUserRequestRegion = /*@__PURE__*/ S.String;
675
+
676
+ export interface GetUserRequest {
677
+ /** The STACKIT project ID. */
678
+ projectId: string;
679
+ /** The region which should be addressed */
680
+ region: GetUserRequestRegion | (string & {});
681
+ /** The ID of the instance. */
682
+ instanceId: string;
683
+ /** The ID of the user. */
684
+ userId: number;
685
+ }
686
+ export const GetUserRequest = /*@__PURE__*/ S.suspend(() =>
687
+ S.Struct({
688
+ projectId: S.String.pipe(T.Label()),
689
+ region: GetUserRequestRegion.pipe(T.Label()),
690
+ instanceId: S.String.pipe(T.Label()),
691
+ userId: S.Number.pipe(T.Label()),
692
+ }).pipe(
693
+ T.Http({
694
+ method: "GET",
695
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}",
696
+ code: 200,
697
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
698
+ }),
699
+ ),
700
+ ).annotate({ identifier: "GetUserRequest" }) as any as S.Schema<GetUserRequest>;
701
+
702
+ /** A list of user roles. */
703
+ export type GetUserResponseRolesList = Array<string>;
704
+ export const GetUserResponseRolesList = /*@__PURE__*/ S.Array(
705
+ S.String,
706
+ ) as any as S.Schema<GetUserResponseRolesList>;
707
+
708
+ export interface GetUserResponse {
709
+ id: number;
710
+ name: string;
711
+ /** A list of user roles. */
712
+ roles: GetUserResponseRolesList;
713
+ state: string;
714
+ }
715
+ export const GetUserResponse = /*@__PURE__*/ S.suspend(() =>
716
+ S.Struct({
717
+ id: S.Number,
718
+ name: S.String,
719
+ roles: GetUserResponseRolesList,
720
+ state: S.String,
721
+ }),
722
+ ).annotate({
723
+ identifier: "GetUserResponse",
724
+ }) as any as S.Schema<GetUserResponse>;
725
+
726
+ export type ListBackupsRequestRegion = "eu01" | "eu02";
727
+ export const ListBackupsRequestRegion = /*@__PURE__*/ S.String;
728
+
729
+ export type BackupSort =
730
+ | "completion_time.desc"
731
+ | "completion_time.asc"
732
+ | "end_time.desc"
733
+ | "end_time.asc"
734
+ | "name.desc"
735
+ | "name.asc"
736
+ | "retained_until.desc"
737
+ | "retained_until.asc"
738
+ | "size.desc"
739
+ | "size.asc"
740
+ | "type.desc"
741
+ | "type.asc";
742
+ export const BackupSort = /*@__PURE__*/ S.String;
743
+
744
+ export interface ListBackupsRequest {
745
+ /** The STACKIT project ID. */
746
+ projectId: string;
747
+ /** The region which should be addressed */
748
+ region: ListBackupsRequestRegion | (string & {});
749
+ /** The ID of the instance. */
750
+ instanceId: string;
751
+ /** Number of the page of items list to be returned. */
752
+ page?: number;
753
+ /** Number of items to be returned on each page. */
754
+ size?: number;
755
+ /** Sorting of the backups to be returned on each page. */
756
+ sort?: BackupSort | (string & {});
757
+ }
758
+ export const ListBackupsRequest = /*@__PURE__*/ S.suspend(() =>
759
+ S.Struct({
760
+ projectId: S.String.pipe(T.Label()),
761
+ region: ListBackupsRequestRegion.pipe(T.Label()),
762
+ instanceId: S.String.pipe(T.Label()),
763
+ page: S.optional(S.Number.pipe(T.Query())),
764
+ size: S.optional(S.Number.pipe(T.Query())),
765
+ sort: S.optional(BackupSort.pipe(T.Query())),
766
+ }).pipe(
767
+ T.Http({
768
+ method: "GET",
769
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups",
770
+ code: 200,
771
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
772
+ }),
773
+ ),
774
+ ).annotate({
775
+ identifier: "ListBackupsRequest",
776
+ }) as any as S.Schema<ListBackupsRequest>;
777
+
778
+ /** The list containing the information about the backups. */
779
+ export type ListBackupsResponseBackupsList = Array<BackupData>;
780
+ export const ListBackupsResponseBackupsList = /*@__PURE__*/ S.Array(
781
+ BackupData,
782
+ ) as any as S.Schema<ListBackupsResponseBackupsList>;
783
+
784
+ export interface Pagination {
785
+ page: number;
786
+ size: number;
787
+ sort: string;
788
+ totalPages: number;
789
+ totalRows: number;
790
+ }
791
+ export const Pagination = /*@__PURE__*/ S.suspend(() =>
792
+ S.Struct({
793
+ page: S.Number,
794
+ size: S.Number,
795
+ sort: S.String,
796
+ totalPages: S.Number,
797
+ totalRows: S.Number,
798
+ }),
799
+ ).annotate({ identifier: "Pagination" }) as any as S.Schema<Pagination>;
800
+
801
+ export interface ListBackupsResponse {
802
+ /** The list containing the information about the backups. */
803
+ backups: ListBackupsResponseBackupsList;
804
+ pagination: Pagination;
805
+ }
806
+ export const ListBackupsResponse = /*@__PURE__*/ S.suspend(() =>
807
+ S.Struct({
808
+ backups: ListBackupsResponseBackupsList,
809
+ pagination: Pagination,
810
+ }),
811
+ ).annotate({
812
+ identifier: "ListBackupsResponse",
813
+ }) as any as S.Schema<ListBackupsResponse>;
814
+
815
+ export type ListCollationsRequestRegion = "eu01" | "eu02";
816
+ export const ListCollationsRequestRegion = /*@__PURE__*/ S.String;
817
+
818
+ export interface ListCollationsRequest {
819
+ /** The STACKIT project ID. */
820
+ projectId: string;
821
+ /** The region which should be addressed */
822
+ region: ListCollationsRequestRegion | (string & {});
823
+ /** The ID of the instance. */
824
+ instanceId: string;
825
+ }
826
+ export const ListCollationsRequest = /*@__PURE__*/ S.suspend(() =>
827
+ S.Struct({
828
+ projectId: S.String.pipe(T.Label()),
829
+ region: ListCollationsRequestRegion.pipe(T.Label()),
830
+ instanceId: S.String.pipe(T.Label()),
831
+ }).pipe(
832
+ T.Http({
833
+ method: "GET",
834
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/collations",
835
+ code: 200,
836
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
837
+ }),
838
+ ),
839
+ ).annotate({
840
+ identifier: "ListCollationsRequest",
841
+ }) as any as S.Schema<ListCollationsRequest>;
842
+
843
+ /** List of collations available for the instance. */
844
+ export type ListCollationsResponseCollationsList = Array<string>;
845
+ export const ListCollationsResponseCollationsList = /*@__PURE__*/ S.Array(
846
+ S.String,
847
+ ) as any as S.Schema<ListCollationsResponseCollationsList>;
848
+
849
+ export interface ListCollationsResponse {
850
+ /** List of collations available for the instance. */
851
+ collations: ListCollationsResponseCollationsList;
852
+ }
853
+ export const ListCollationsResponse = /*@__PURE__*/ S.suspend(() =>
854
+ S.Struct({
855
+ collations: ListCollationsResponseCollationsList,
856
+ }),
857
+ ).annotate({
858
+ identifier: "ListCollationsResponse",
859
+ }) as any as S.Schema<ListCollationsResponse>;
860
+
861
+ export type ListDatabasesRequestRegion = "eu01" | "eu02";
862
+ export const ListDatabasesRequestRegion = /*@__PURE__*/ S.String;
863
+
864
+ export type DatabaseSort =
865
+ | "created_at.desc"
866
+ | "created_at.asc"
867
+ | "database_id.desc"
868
+ | "database_id.asc"
869
+ | "database_name.desc"
870
+ | "database_name.asc"
871
+ | "database_owner.desc"
872
+ | "database_owner.asc";
873
+ export const DatabaseSort = /*@__PURE__*/ S.String;
874
+
875
+ export interface ListDatabasesRequest {
876
+ /** The STACKIT project ID. */
877
+ projectId: string;
878
+ /** The region which should be addressed */
879
+ region: ListDatabasesRequestRegion | (string & {});
880
+ /** The ID of the instance. */
881
+ instanceId: string;
882
+ /** Number of the page of items list to be returned. */
883
+ page?: number;
884
+ /** Number of items to be returned on each page. */
885
+ size?: number;
886
+ /** Sorting of the databases to be returned on each page. */
887
+ sort?: DatabaseSort | (string & {});
888
+ }
889
+ export const ListDatabasesRequest = /*@__PURE__*/ S.suspend(() =>
890
+ S.Struct({
891
+ projectId: S.String.pipe(T.Label()),
892
+ region: ListDatabasesRequestRegion.pipe(T.Label()),
893
+ instanceId: S.String.pipe(T.Label()),
894
+ page: S.optional(S.Number.pipe(T.Query())),
895
+ size: S.optional(S.Number.pipe(T.Query())),
896
+ sort: S.optional(DatabaseSort.pipe(T.Query())),
897
+ }).pipe(
898
+ T.Http({
899
+ method: "GET",
900
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases",
901
+ code: 200,
902
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
903
+ }),
904
+ ),
905
+ ).annotate({
906
+ identifier: "ListDatabasesRequest",
907
+ }) as any as S.Schema<ListDatabasesRequest>;
908
+
909
+ export interface ListDatabase {
910
+ id: number;
911
+ name: string;
912
+ owner: string;
913
+ }
914
+ export const ListDatabase = /*@__PURE__*/ S.suspend(() =>
915
+ S.Struct({
916
+ id: S.Number,
917
+ name: S.String,
918
+ owner: S.String,
919
+ }),
920
+ ).annotate({ identifier: "ListDatabase" }) as any as S.Schema<ListDatabase>;
921
+
922
+ /** A list containing all databases for the instance. */
923
+ export type ListDatabasesResponseDatabasesList = Array<ListDatabase>;
924
+ export const ListDatabasesResponseDatabasesList = /*@__PURE__*/ S.Array(
925
+ ListDatabase,
926
+ ) as any as S.Schema<ListDatabasesResponseDatabasesList>;
927
+
928
+ export interface ListDatabasesResponse {
929
+ /** A list containing all databases for the instance. */
930
+ databases: ListDatabasesResponseDatabasesList;
931
+ pagination: Pagination;
932
+ }
933
+ export const ListDatabasesResponse = /*@__PURE__*/ S.suspend(() =>
934
+ S.Struct({
935
+ databases: ListDatabasesResponseDatabasesList,
936
+ pagination: Pagination,
937
+ }),
938
+ ).annotate({
939
+ identifier: "ListDatabasesResponse",
940
+ }) as any as S.Schema<ListDatabasesResponse>;
941
+
942
+ export type ListFlavorsRequestRegion = "eu01" | "eu02";
943
+ export const ListFlavorsRequestRegion = /*@__PURE__*/ S.String;
944
+
945
+ export type FlavorSort =
946
+ | "cpu.desc"
947
+ | "cpu.asc"
948
+ | "flavor_description.asc"
949
+ | "flavor_description.desc"
950
+ | "id.desc"
951
+ | "id.asc"
952
+ | "size_max.desc"
953
+ | "size_max.asc"
954
+ | "ram.desc"
955
+ | "ram.asc"
956
+ | "size_min.desc"
957
+ | "size_min.asc"
958
+ | "storage_class.asc"
959
+ | "storage_class.desc"
960
+ | "node_type.asc"
961
+ | "node_type.desc";
962
+ export const FlavorSort = /*@__PURE__*/ S.String;
963
+
964
+ export interface ListFlavorsRequest {
965
+ /** The STACKIT project ID. */
966
+ projectId: string;
967
+ /** The region which should be addressed */
968
+ region: ListFlavorsRequestRegion | (string & {});
969
+ /** Number of the page of items list to be returned. */
970
+ page?: number;
971
+ /** Number of items to be returned on each page. */
972
+ size?: number;
973
+ /** Sorting of the flavors to be returned on each page. */
974
+ sort?: FlavorSort | (string & {});
975
+ }
976
+ export const ListFlavorsRequest = /*@__PURE__*/ S.suspend(() =>
977
+ S.Struct({
978
+ projectId: S.String.pipe(T.Label()),
979
+ region: ListFlavorsRequestRegion.pipe(T.Label()),
980
+ page: S.optional(S.Number.pipe(T.Query())),
981
+ size: S.optional(S.Number.pipe(T.Query())),
982
+ sort: S.optional(FlavorSort.pipe(T.Query())),
983
+ }).pipe(
984
+ T.Http({
985
+ method: "GET",
986
+ uri: "/v3/projects/{projectId}/regions/{region}/flavors",
987
+ code: 200,
988
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
989
+ }),
990
+ ),
991
+ ).annotate({
992
+ identifier: "ListFlavorsRequest",
993
+ }) as any as S.Schema<ListFlavorsRequest>;
994
+
995
+ /** a storageClass defines how efficient the storage can work */
996
+ export interface FlavorStorageClassesStorageClass {
997
+ class: string;
998
+ maxIoPerSec: number;
999
+ maxThroughInMb: number;
1000
+ }
1001
+ export const FlavorStorageClassesStorageClass = /*@__PURE__*/ S.suspend(() =>
1002
+ S.Struct({
1003
+ class: S.String,
1004
+ maxIoPerSec: S.Number,
1005
+ maxThroughInMb: S.Number,
1006
+ }),
1007
+ ).annotate({
1008
+ identifier: "FlavorStorageClassesStorageClass",
1009
+ }) as any as S.Schema<FlavorStorageClassesStorageClass>;
1010
+
1011
+ /** maximum storage which can be ordered for the flavor in Gigabyte. */
1012
+ export type FlavorStorageClasses = Array<FlavorStorageClassesStorageClass>;
1013
+ export const FlavorStorageClasses = /*@__PURE__*/ S.Array(
1014
+ FlavorStorageClassesStorageClass,
1015
+ ) as any as S.Schema<FlavorStorageClasses>;
1016
+
1017
+ /** The flavor of the instance containing the technical features. */
1018
+ export interface ListFlavors {
1019
+ cpu: number;
1020
+ description: string;
1021
+ id: string;
1022
+ maxGB: number;
1023
+ memory: number;
1024
+ minGB: number;
1025
+ nodeType: string;
1026
+ storageClasses: FlavorStorageClasses;
1027
+ }
1028
+ export const ListFlavors = /*@__PURE__*/ S.suspend(() =>
1029
+ S.Struct({
1030
+ cpu: S.Number,
1031
+ description: S.String,
1032
+ id: S.String,
1033
+ maxGB: S.Number,
1034
+ memory: S.Number,
1035
+ minGB: S.Number,
1036
+ nodeType: S.String,
1037
+ storageClasses: FlavorStorageClasses,
1038
+ }),
1039
+ ).annotate({ identifier: "ListFlavors" }) as any as S.Schema<ListFlavors>;
1040
+
1041
+ /** List of flavors available for the project. */
1042
+ export type ListFlavorsResponseFlavorsList = Array<ListFlavors>;
1043
+ export const ListFlavorsResponseFlavorsList = /*@__PURE__*/ S.Array(
1044
+ ListFlavors,
1045
+ ) as any as S.Schema<ListFlavorsResponseFlavorsList>;
1046
+
1047
+ export interface ListFlavorsResponse {
1048
+ /** List of flavors available for the project. */
1049
+ flavors: ListFlavorsResponseFlavorsList;
1050
+ pagination: Pagination;
1051
+ }
1052
+ export const ListFlavorsResponse = /*@__PURE__*/ S.suspend(() =>
1053
+ S.Struct({
1054
+ flavors: ListFlavorsResponseFlavorsList,
1055
+ pagination: Pagination,
1056
+ }),
1057
+ ).annotate({
1058
+ identifier: "ListFlavorsResponse",
1059
+ }) as any as S.Schema<ListFlavorsResponse>;
1060
+
1061
+ export type ListInstancesRequestRegion = "eu01" | "eu02";
1062
+ export const ListInstancesRequestRegion = /*@__PURE__*/ S.String;
1063
+
1064
+ export type InstanceSort =
1065
+ | "id.desc"
1066
+ | "id.asc"
1067
+ | "is_deletable.desc"
1068
+ | "is_deletable.asc"
1069
+ | "name.asc"
1070
+ | "name.desc"
1071
+ | "state.asc"
1072
+ | "state.desc";
1073
+ export const InstanceSort = /*@__PURE__*/ S.String;
1074
+
1075
+ export interface ListInstancesRequest {
1076
+ /** The STACKIT project ID. */
1077
+ projectId: string;
1078
+ /** The region which should be addressed */
1079
+ region: ListInstancesRequestRegion | (string & {});
1080
+ /** Number of the page of items list to be returned. */
1081
+ page?: number;
1082
+ /** Number of items to be returned on each page. */
1083
+ size?: number;
1084
+ /** Sorting of the items to be returned on each page. */
1085
+ sort?: InstanceSort | (string & {});
1086
+ }
1087
+ export const ListInstancesRequest = /*@__PURE__*/ S.suspend(() =>
1088
+ S.Struct({
1089
+ projectId: S.String.pipe(T.Label()),
1090
+ region: ListInstancesRequestRegion.pipe(T.Label()),
1091
+ page: S.optional(S.Number.pipe(T.Query())),
1092
+ size: S.optional(S.Number.pipe(T.Query())),
1093
+ sort: S.optional(InstanceSort.pipe(T.Query())),
1094
+ }).pipe(
1095
+ T.Http({
1096
+ method: "GET",
1097
+ uri: "/v3/projects/{projectId}/regions/{region}/instances",
1098
+ code: 200,
1099
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
1100
+ }),
1101
+ ),
1102
+ ).annotate({
1103
+ identifier: "ListInstancesRequest",
1104
+ }) as any as S.Schema<ListInstancesRequest>;
1105
+
1106
+ export interface ListInstance {
1107
+ id: string;
1108
+ isDeletable: boolean;
1109
+ name: string;
1110
+ state: State;
1111
+ }
1112
+ export const ListInstance = /*@__PURE__*/ S.suspend(() =>
1113
+ S.Struct({
1114
+ id: S.String,
1115
+ isDeletable: S.Boolean,
1116
+ name: S.String,
1117
+ state: State,
1118
+ }),
1119
+ ).annotate({ identifier: "ListInstance" }) as any as S.Schema<ListInstance>;
1120
+
1121
+ /** List of owned instances and their current state. */
1122
+ export type ListInstancesResponseInstancesList = Array<ListInstance>;
1123
+ export const ListInstancesResponseInstancesList = /*@__PURE__*/ S.Array(
1124
+ ListInstance,
1125
+ ) as any as S.Schema<ListInstancesResponseInstancesList>;
1126
+
1127
+ export interface ListInstancesResponse {
1128
+ /** List of owned instances and their current state. */
1129
+ instances: ListInstancesResponseInstancesList;
1130
+ pagination: Pagination;
1131
+ }
1132
+ export const ListInstancesResponse = /*@__PURE__*/ S.suspend(() =>
1133
+ S.Struct({
1134
+ instances: ListInstancesResponseInstancesList,
1135
+ pagination: Pagination,
1136
+ }),
1137
+ ).annotate({
1138
+ identifier: "ListInstancesResponse",
1139
+ }) as any as S.Schema<ListInstancesResponse>;
1140
+
1141
+ export type ListRolesRequestRegion = "eu01" | "eu02";
1142
+ export const ListRolesRequestRegion = /*@__PURE__*/ S.String;
1143
+
1144
+ export interface ListRolesRequest {
1145
+ /** The STACKIT project ID. */
1146
+ projectId: string;
1147
+ /** The region which should be addressed */
1148
+ region: ListRolesRequestRegion | (string & {});
1149
+ /** The ID of the instance. */
1150
+ instanceId: string;
1151
+ }
1152
+ export const ListRolesRequest = /*@__PURE__*/ S.suspend(() =>
1153
+ S.Struct({
1154
+ projectId: S.String.pipe(T.Label()),
1155
+ region: ListRolesRequestRegion.pipe(T.Label()),
1156
+ instanceId: S.String.pipe(T.Label()),
1157
+ }).pipe(
1158
+ T.Http({
1159
+ method: "GET",
1160
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/roles",
1161
+ code: 200,
1162
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
1163
+ }),
1164
+ ),
1165
+ ).annotate({
1166
+ identifier: "ListRolesRequest",
1167
+ }) as any as S.Schema<ListRolesRequest>;
1168
+
1169
+ /** List of all role names available in the instance */
1170
+ export type ListRolesResponseRolesList = Array<string>;
1171
+ export const ListRolesResponseRolesList = /*@__PURE__*/ S.Array(
1172
+ S.String,
1173
+ ) as any as S.Schema<ListRolesResponseRolesList>;
1174
+
1175
+ export interface ListRolesResponse {
1176
+ /** List of all role names available in the instance */
1177
+ roles: ListRolesResponseRolesList;
1178
+ }
1179
+ export const ListRolesResponse = /*@__PURE__*/ S.suspend(() =>
1180
+ S.Struct({
1181
+ roles: ListRolesResponseRolesList,
1182
+ }),
1183
+ ).annotate({
1184
+ identifier: "ListRolesResponse",
1185
+ }) as any as S.Schema<ListRolesResponse>;
1186
+
1187
+ export type ListUsersRequestRegion = "eu01" | "eu02";
1188
+ export const ListUsersRequestRegion = /*@__PURE__*/ S.String;
1189
+
1190
+ export type UserSort =
1191
+ | "id.asc"
1192
+ | "id.desc"
1193
+ | "name.desc"
1194
+ | "name.asc"
1195
+ | "state.desc"
1196
+ | "state.asc";
1197
+ export const UserSort = /*@__PURE__*/ S.String;
1198
+
1199
+ export interface ListUsersRequest {
1200
+ /** The STACKIT project ID. */
1201
+ projectId: string;
1202
+ /** The region which should be addressed */
1203
+ region: ListUsersRequestRegion | (string & {});
1204
+ /** The ID of the instance. */
1205
+ instanceId: string;
1206
+ /** Number of the page of items list to be returned. */
1207
+ page?: number;
1208
+ /** Number of items to be returned on each page. */
1209
+ size?: number;
1210
+ /** Sorting of the users to be returned on each page. */
1211
+ sort?: UserSort | (string & {});
1212
+ }
1213
+ export const ListUsersRequest = /*@__PURE__*/ S.suspend(() =>
1214
+ S.Struct({
1215
+ projectId: S.String.pipe(T.Label()),
1216
+ region: ListUsersRequestRegion.pipe(T.Label()),
1217
+ instanceId: S.String.pipe(T.Label()),
1218
+ page: S.optional(S.Number.pipe(T.Query())),
1219
+ size: S.optional(S.Number.pipe(T.Query())),
1220
+ sort: S.optional(UserSort.pipe(T.Query())),
1221
+ }).pipe(
1222
+ T.Http({
1223
+ method: "GET",
1224
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users",
1225
+ code: 200,
1226
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
1227
+ }),
1228
+ ),
1229
+ ).annotate({
1230
+ identifier: "ListUsersRequest",
1231
+ }) as any as S.Schema<ListUsersRequest>;
1232
+
1233
+ export interface ListUser {
1234
+ id: number;
1235
+ name: string;
1236
+ state: string;
1237
+ }
1238
+ export const ListUser = /*@__PURE__*/ S.suspend(() =>
1239
+ S.Struct({
1240
+ id: S.Number,
1241
+ name: S.String,
1242
+ state: S.String,
1243
+ }),
1244
+ ).annotate({ identifier: "ListUser" }) as any as S.Schema<ListUser>;
1245
+
1246
+ /** List of all users inside an instance */
1247
+ export type ListUsersResponseUsersList = Array<ListUser>;
1248
+ export const ListUsersResponseUsersList = /*@__PURE__*/ S.Array(
1249
+ ListUser,
1250
+ ) as any as S.Schema<ListUsersResponseUsersList>;
1251
+
1252
+ export interface ListUsersResponse {
1253
+ pagination: Pagination;
1254
+ /** List of all users inside an instance */
1255
+ users: ListUsersResponseUsersList;
1256
+ }
1257
+ export const ListUsersResponse = /*@__PURE__*/ S.suspend(() =>
1258
+ S.Struct({
1259
+ pagination: Pagination,
1260
+ users: ListUsersResponseUsersList,
1261
+ }),
1262
+ ).annotate({
1263
+ identifier: "ListUsersResponse",
1264
+ }) as any as S.Schema<ListUsersResponse>;
1265
+
1266
+ export type ListVersionsRequestRegion = "eu01" | "eu02";
1267
+ export const ListVersionsRequestRegion = /*@__PURE__*/ S.String;
1268
+
1269
+ export interface ListVersionsRequest {
1270
+ /** The STACKIT project ID. */
1271
+ projectId: string;
1272
+ /** The region which should be addressed */
1273
+ region: ListVersionsRequestRegion | (string & {});
1274
+ }
1275
+ export const ListVersionsRequest = /*@__PURE__*/ S.suspend(() =>
1276
+ S.Struct({
1277
+ projectId: S.String.pipe(T.Label()),
1278
+ region: ListVersionsRequestRegion.pipe(T.Label()),
1279
+ }).pipe(
1280
+ T.Http({
1281
+ method: "GET",
1282
+ uri: "/v3/projects/{projectId}/regions/{region}/versions",
1283
+ code: 200,
1284
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
1285
+ }),
1286
+ ),
1287
+ ).annotate({
1288
+ identifier: "ListVersionsRequest",
1289
+ }) as any as S.Schema<ListVersionsRequest>;
1290
+
1291
+ /** The version of the postgres instance and more details. */
1292
+ export interface Version {
1293
+ /** Flag if the version is a beta version. If set the version may contain bugs and is not fully tested. */
1294
+ beta: boolean;
1295
+ /** Timestamp in RFC3339 format which says when the version will no longer be supported by STACKIT. */
1296
+ deprecated: string;
1297
+ /** Flag if the version is recommend by the STACKIT Team. */
1298
+ recommend: boolean;
1299
+ /** The postgres version used for the instance. */
1300
+ version: string;
1301
+ }
1302
+ export const Version = /*@__PURE__*/ S.suspend(() =>
1303
+ S.Struct({
1304
+ beta: S.Boolean,
1305
+ deprecated: S.String,
1306
+ recommend: S.Boolean,
1307
+ version: S.String,
1308
+ }),
1309
+ ).annotate({ identifier: "Version" }) as any as S.Schema<Version>;
1310
+
1311
+ /** A list containing available postgres versions. */
1312
+ export type ListVersionsResponseVersionsList = Array<Version>;
1313
+ export const ListVersionsResponseVersionsList = /*@__PURE__*/ S.Array(
1314
+ Version,
1315
+ ) as any as S.Schema<ListVersionsResponseVersionsList>;
1316
+
1317
+ export interface ListVersionsResponse {
1318
+ /** A list containing available postgres versions. */
1319
+ versions: ListVersionsResponseVersionsList;
1320
+ }
1321
+ export const ListVersionsResponse = /*@__PURE__*/ S.suspend(() =>
1322
+ S.Struct({
1323
+ versions: ListVersionsResponseVersionsList,
1324
+ }),
1325
+ ).annotate({
1326
+ identifier: "ListVersionsResponse",
1327
+ }) as any as S.Schema<ListVersionsResponse>;
1328
+
1329
+ export type PartialUpdateDatabaseRequestRegion = "eu01" | "eu02";
1330
+ export const PartialUpdateDatabaseRequestRegion = /*@__PURE__*/ S.String;
1331
+
1332
+ export interface PartialUpdateDatabaseRequest {
1333
+ /** The STACKIT project ID. */
1334
+ projectId: string;
1335
+ /** The region which should be addressed */
1336
+ region: PartialUpdateDatabaseRequestRegion | (string & {});
1337
+ /** The ID of the instance. */
1338
+ instanceId: string;
1339
+ /** The ID of the database. */
1340
+ databaseId: number;
1341
+ name?: string;
1342
+ owner?: string;
1343
+ }
1344
+ export const PartialUpdateDatabaseRequest = /*@__PURE__*/ S.suspend(() =>
1345
+ S.Struct({
1346
+ projectId: S.String.pipe(T.Label()),
1347
+ region: PartialUpdateDatabaseRequestRegion.pipe(T.Label()),
1348
+ instanceId: S.String.pipe(T.Label()),
1349
+ databaseId: S.Number.pipe(T.Label()),
1350
+ name: S.optional(S.String),
1351
+ owner: S.optional(S.String),
1352
+ }).pipe(
1353
+ T.Http({
1354
+ method: "PATCH",
1355
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseId}",
1356
+ code: 200,
1357
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
1358
+ }),
1359
+ ),
1360
+ ).annotate({
1361
+ identifier: "PartialUpdateDatabaseRequest",
1362
+ }) as any as S.Schema<PartialUpdateDatabaseRequest>;
1363
+
1364
+ export interface PartialUpdateDatabaseResponse {}
1365
+ export const PartialUpdateDatabaseResponse = /*@__PURE__*/ S.suspend(() =>
1366
+ S.Struct({}),
1367
+ ).annotate({
1368
+ identifier: "PartialUpdateDatabaseResponse",
1369
+ }) as any as S.Schema<PartialUpdateDatabaseResponse>;
1370
+
1371
+ export type PartialUpdateInstanceRequestRegion = "eu01" | "eu02";
1372
+ export const PartialUpdateInstanceRequestRegion = /*@__PURE__*/ S.String;
1373
+
1374
+ /** List of IPV4 cidr. */
1375
+ export type AclOpt = Array<string>;
1376
+ export const AclOpt = /*@__PURE__*/ S.Array(
1377
+ S.String,
1378
+ ) as any as S.Schema<AclOpt>;
1379
+
1380
+ /** The access configuration of the instance */
1381
+ export interface InstanceNetworkOpt {
1382
+ acl?: AclOpt;
1383
+ }
1384
+ export const InstanceNetworkOpt = /*@__PURE__*/ S.suspend(() =>
1385
+ S.Struct({
1386
+ acl: S.optional(AclOpt),
1387
+ }),
1388
+ ).annotate({
1389
+ identifier: "InstanceNetworkOpt",
1390
+ }) as any as S.Schema<InstanceNetworkOpt>;
1391
+
1392
+ /** The object containing information about the storage size and class. */
1393
+ export interface StorageUpdate {
1394
+ size?: number;
1395
+ }
1396
+ export const StorageUpdate = /*@__PURE__*/ S.suspend(() =>
1397
+ S.Struct({
1398
+ size: S.optional(S.Number),
1399
+ }),
1400
+ ).annotate({ identifier: "StorageUpdate" }) as any as S.Schema<StorageUpdate>;
1401
+
1402
+ export interface PartialUpdateInstanceRequest {
1403
+ /** The STACKIT project ID. */
1404
+ projectId: string;
1405
+ /** The region which should be addressed */
1406
+ region: PartialUpdateInstanceRequestRegion | (string & {});
1407
+ /** The ID of the instance. */
1408
+ instanceId: string;
1409
+ backupSchedule?: string;
1410
+ flavorId?: string;
1411
+ labels?: Labels;
1412
+ name?: string;
1413
+ network?: InstanceNetworkOpt;
1414
+ retentionDays?: number;
1415
+ storage?: StorageUpdate;
1416
+ version?: string;
1417
+ }
1418
+ export const PartialUpdateInstanceRequest = /*@__PURE__*/ S.suspend(() =>
1419
+ S.Struct({
1420
+ projectId: S.String.pipe(T.Label()),
1421
+ region: PartialUpdateInstanceRequestRegion.pipe(T.Label()),
1422
+ instanceId: S.String.pipe(T.Label()),
1423
+ backupSchedule: S.optional(S.String),
1424
+ flavorId: S.optional(S.String),
1425
+ labels: S.optional(Labels),
1426
+ name: S.optional(S.String),
1427
+ network: S.optional(InstanceNetworkOpt),
1428
+ retentionDays: S.optional(S.Number),
1429
+ storage: S.optional(StorageUpdate),
1430
+ version: S.optional(S.String),
1431
+ }).pipe(
1432
+ T.Http({
1433
+ method: "PATCH",
1434
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}",
1435
+ code: 200,
1436
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
1437
+ }),
1438
+ ),
1439
+ ).annotate({
1440
+ identifier: "PartialUpdateInstanceRequest",
1441
+ }) as any as S.Schema<PartialUpdateInstanceRequest>;
1442
+
1443
+ export interface PartialUpdateInstanceResponse {}
1444
+ export const PartialUpdateInstanceResponse = /*@__PURE__*/ S.suspend(() =>
1445
+ S.Struct({}),
1446
+ ).annotate({
1447
+ identifier: "PartialUpdateInstanceResponse",
1448
+ }) as any as S.Schema<PartialUpdateInstanceResponse>;
1449
+
1450
+ export type PartialUpdateUserRequestRegion = "eu01" | "eu02";
1451
+ export const PartialUpdateUserRequestRegion = /*@__PURE__*/ S.String;
1452
+
1453
+ /** A list containing the user roles for the instance. Please refer to the List Roles endpoint for a list of all available Roles. */
1454
+ export type PartialUpdateUserRequestRolesList = Array<string>;
1455
+ export const PartialUpdateUserRequestRolesList = /*@__PURE__*/ S.Array(
1456
+ S.String,
1457
+ ) as any as S.Schema<PartialUpdateUserRequestRolesList>;
1458
+
1459
+ export interface PartialUpdateUserRequest {
1460
+ /** The STACKIT project ID. */
1461
+ projectId: string;
1462
+ /** The region which should be addressed */
1463
+ region: PartialUpdateUserRequestRegion | (string & {});
1464
+ /** The ID of the instance. */
1465
+ instanceId: string;
1466
+ /** The ID of the user. */
1467
+ userId: number;
1468
+ name?: string;
1469
+ /** A list containing the user roles for the instance. Please refer to the List Roles endpoint for a list of all available Roles. */
1470
+ roles?: PartialUpdateUserRequestRolesList;
1471
+ }
1472
+ export const PartialUpdateUserRequest = /*@__PURE__*/ S.suspend(() =>
1473
+ S.Struct({
1474
+ projectId: S.String.pipe(T.Label()),
1475
+ region: PartialUpdateUserRequestRegion.pipe(T.Label()),
1476
+ instanceId: S.String.pipe(T.Label()),
1477
+ userId: S.Number.pipe(T.Label()),
1478
+ name: S.optional(S.String),
1479
+ roles: S.optional(PartialUpdateUserRequestRolesList),
1480
+ }).pipe(
1481
+ T.Http({
1482
+ method: "PATCH",
1483
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}",
1484
+ code: 200,
1485
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
1486
+ }),
1487
+ ),
1488
+ ).annotate({
1489
+ identifier: "PartialUpdateUserRequest",
1490
+ }) as any as S.Schema<PartialUpdateUserRequest>;
1491
+
1492
+ export interface PartialUpdateUserResponse {}
1493
+ export const PartialUpdateUserResponse = /*@__PURE__*/ S.suspend(() =>
1494
+ S.Struct({}),
1495
+ ).annotate({
1496
+ identifier: "PartialUpdateUserResponse",
1497
+ }) as any as S.Schema<PartialUpdateUserResponse>;
1498
+
1499
+ export type ResetUserPasswordRequestRegion = "eu01" | "eu02";
1500
+ export const ResetUserPasswordRequestRegion = /*@__PURE__*/ S.String;
1501
+
1502
+ export interface ResetUserPasswordRequest {
1503
+ /** The STACKIT project ID. */
1504
+ projectId: string;
1505
+ /** The region which should be addressed */
1506
+ region: ResetUserPasswordRequestRegion | (string & {});
1507
+ /** The ID of the instance. */
1508
+ instanceId: string;
1509
+ /** The ID of the user. */
1510
+ userId: number;
1511
+ }
1512
+ export const ResetUserPasswordRequest = /*@__PURE__*/ S.suspend(() =>
1513
+ S.Struct({
1514
+ projectId: S.String.pipe(T.Label()),
1515
+ region: ResetUserPasswordRequestRegion.pipe(T.Label()),
1516
+ instanceId: S.String.pipe(T.Label()),
1517
+ userId: S.Number.pipe(T.Label()),
1518
+ }).pipe(
1519
+ T.Http({
1520
+ method: "POST",
1521
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}/reset",
1522
+ code: 200,
1523
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
1524
+ }),
1525
+ ),
1526
+ ).annotate({
1527
+ identifier: "ResetUserPasswordRequest",
1528
+ }) as any as S.Schema<ResetUserPasswordRequest>;
1529
+
1530
+ export interface ResetUserPasswordResponse {
1531
+ name: string;
1532
+ password: string | Redacted.Redacted<string>;
1533
+ state: string;
1534
+ }
1535
+ export const ResetUserPasswordResponse = /*@__PURE__*/ S.suspend(() =>
1536
+ S.Struct({
1537
+ name: S.String,
1538
+ password: S.String.pipe(T.SensitiveValue({})),
1539
+ state: S.String,
1540
+ }),
1541
+ ).annotate({
1542
+ identifier: "ResetUserPasswordResponse",
1543
+ }) as any as S.Schema<ResetUserPasswordResponse>;
1544
+
1545
+ export type UpdateDatabaseRequestRegion = "eu01" | "eu02";
1546
+ export const UpdateDatabaseRequestRegion = /*@__PURE__*/ S.String;
1547
+
1548
+ export interface UpdateDatabaseRequest {
1549
+ /** The STACKIT project ID. */
1550
+ projectId: string;
1551
+ /** The region which should be addressed */
1552
+ region: UpdateDatabaseRequestRegion | (string & {});
1553
+ /** The ID of the instance. */
1554
+ instanceId: string;
1555
+ /** The ID of the database. */
1556
+ databaseId: number;
1557
+ name: string;
1558
+ owner: string;
1559
+ }
1560
+ export const UpdateDatabaseRequest = /*@__PURE__*/ S.suspend(() =>
1561
+ S.Struct({
1562
+ projectId: S.String.pipe(T.Label()),
1563
+ region: UpdateDatabaseRequestRegion.pipe(T.Label()),
1564
+ instanceId: S.String.pipe(T.Label()),
1565
+ databaseId: S.Number.pipe(T.Label()),
1566
+ name: S.String,
1567
+ owner: S.String,
1568
+ }).pipe(
1569
+ T.Http({
1570
+ method: "PUT",
1571
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseId}",
1572
+ code: 200,
1573
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
1574
+ }),
1575
+ ),
1576
+ ).annotate({
1577
+ identifier: "UpdateDatabaseRequest",
1578
+ }) as any as S.Schema<UpdateDatabaseRequest>;
1579
+
1580
+ export interface UpdateDatabaseResponse {}
1581
+ export const UpdateDatabaseResponse = /*@__PURE__*/ S.suspend(() =>
1582
+ S.Struct({}),
1583
+ ).annotate({
1584
+ identifier: "UpdateDatabaseResponse",
1585
+ }) as any as S.Schema<UpdateDatabaseResponse>;
1586
+
1587
+ export type UpdateInstanceRequestRegion = "eu01" | "eu02";
1588
+ export const UpdateInstanceRequestRegion = /*@__PURE__*/ S.String;
1589
+
1590
+ /** The access configuration of the instance */
1591
+ export interface InstanceNetworkUpdate {
1592
+ acl: Acl;
1593
+ }
1594
+ export const InstanceNetworkUpdate = /*@__PURE__*/ S.suspend(() =>
1595
+ S.Struct({
1596
+ acl: Acl,
1597
+ }),
1598
+ ).annotate({
1599
+ identifier: "InstanceNetworkUpdate",
1600
+ }) as any as S.Schema<InstanceNetworkUpdate>;
1601
+
1602
+ export interface UpdateInstanceRequest {
1603
+ /** The STACKIT project ID. */
1604
+ projectId: string;
1605
+ /** The region which should be addressed */
1606
+ region: UpdateInstanceRequestRegion | (string & {});
1607
+ /** The ID of the instance. */
1608
+ instanceId: string;
1609
+ backupSchedule: string;
1610
+ flavorId: string;
1611
+ labels?: Labels;
1612
+ name: string;
1613
+ network: InstanceNetworkUpdate;
1614
+ retentionDays: number | null;
1615
+ storage: StorageUpdate;
1616
+ version: string;
1617
+ }
1618
+ export const UpdateInstanceRequest = /*@__PURE__*/ S.suspend(() =>
1619
+ S.Struct({
1620
+ projectId: S.String.pipe(T.Label()),
1621
+ region: UpdateInstanceRequestRegion.pipe(T.Label()),
1622
+ instanceId: S.String.pipe(T.Label()),
1623
+ backupSchedule: S.String,
1624
+ flavorId: S.String,
1625
+ labels: S.optional(Labels),
1626
+ name: S.String,
1627
+ network: InstanceNetworkUpdate,
1628
+ retentionDays: S.NullOr(S.Number),
1629
+ storage: StorageUpdate,
1630
+ version: S.String,
1631
+ }).pipe(
1632
+ T.Http({
1633
+ method: "PUT",
1634
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}",
1635
+ code: 200,
1636
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
1637
+ }),
1638
+ ),
1639
+ ).annotate({
1640
+ identifier: "UpdateInstanceRequest",
1641
+ }) as any as S.Schema<UpdateInstanceRequest>;
1642
+
1643
+ export interface UpdateInstanceResponse {}
1644
+ export const UpdateInstanceResponse = /*@__PURE__*/ S.suspend(() =>
1645
+ S.Struct({}),
1646
+ ).annotate({
1647
+ identifier: "UpdateInstanceResponse",
1648
+ }) as any as S.Schema<UpdateInstanceResponse>;
1649
+
1650
+ export type UpdateInstanceProtectionRequestRegion = "eu01" | "eu02";
1651
+ export const UpdateInstanceProtectionRequestRegion = /*@__PURE__*/ S.String;
1652
+
1653
+ export interface UpdateInstanceProtectionRequest {
1654
+ /** The STACKIT project ID. */
1655
+ projectId: string;
1656
+ /** The region which should be addressed */
1657
+ region: UpdateInstanceProtectionRequestRegion | (string & {});
1658
+ /** The ID of the instance. */
1659
+ instanceId: string;
1660
+ isDeletable: boolean;
1661
+ }
1662
+ export const UpdateInstanceProtectionRequest = /*@__PURE__*/ S.suspend(() =>
1663
+ S.Struct({
1664
+ projectId: S.String.pipe(T.Label()),
1665
+ region: UpdateInstanceProtectionRequestRegion.pipe(T.Label()),
1666
+ instanceId: S.String.pipe(T.Label()),
1667
+ isDeletable: S.Boolean,
1668
+ }).pipe(
1669
+ T.Http({
1670
+ method: "POST",
1671
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/protections",
1672
+ code: 200,
1673
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
1674
+ }),
1675
+ ),
1676
+ ).annotate({
1677
+ identifier: "UpdateInstanceProtectionRequest",
1678
+ }) as any as S.Schema<UpdateInstanceProtectionRequest>;
1679
+
1680
+ export interface UpdateInstanceProtectionResponse {
1681
+ isDeletable: boolean;
1682
+ }
1683
+ export const UpdateInstanceProtectionResponse = /*@__PURE__*/ S.suspend(() =>
1684
+ S.Struct({
1685
+ isDeletable: S.Boolean,
1686
+ }),
1687
+ ).annotate({
1688
+ identifier: "UpdateInstanceProtectionResponse",
1689
+ }) as any as S.Schema<UpdateInstanceProtectionResponse>;
1690
+
1691
+ export type UpdateUserRequestRegion = "eu01" | "eu02";
1692
+ export const UpdateUserRequestRegion = /*@__PURE__*/ S.String;
1693
+
1694
+ /** A list containing the user roles for the instance. Please refer to the List Roles endpoint for a list of all available Roles. */
1695
+ export type UpdateUserRequestRolesList = Array<string>;
1696
+ export const UpdateUserRequestRolesList = /*@__PURE__*/ S.Array(
1697
+ S.String,
1698
+ ) as any as S.Schema<UpdateUserRequestRolesList>;
1699
+
1700
+ export interface UpdateUserRequest {
1701
+ /** The STACKIT project ID. */
1702
+ projectId: string;
1703
+ /** The region which should be addressed */
1704
+ region: UpdateUserRequestRegion | (string & {});
1705
+ /** The ID of the instance. */
1706
+ instanceId: string;
1707
+ /** The ID of the user. */
1708
+ userId: number;
1709
+ name?: string;
1710
+ /** A list containing the user roles for the instance. Please refer to the List Roles endpoint for a list of all available Roles. */
1711
+ roles: UpdateUserRequestRolesList;
1712
+ }
1713
+ export const UpdateUserRequest = /*@__PURE__*/ S.suspend(() =>
1714
+ S.Struct({
1715
+ projectId: S.String.pipe(T.Label()),
1716
+ region: UpdateUserRequestRegion.pipe(T.Label()),
1717
+ instanceId: S.String.pipe(T.Label()),
1718
+ userId: S.Number.pipe(T.Label()),
1719
+ name: S.optional(S.String),
1720
+ roles: UpdateUserRequestRolesList,
1721
+ }).pipe(
1722
+ T.Http({
1723
+ method: "PUT",
1724
+ uri: "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}",
1725
+ code: 200,
1726
+ baseUrl: "https://postgres-flex-service.api.stackit.cloud",
1727
+ }),
1728
+ ),
1729
+ ).annotate({
1730
+ identifier: "UpdateUserRequest",
1731
+ }) as any as S.Schema<UpdateUserRequest>;
1732
+
1733
+ export interface UpdateUserResponse {}
1734
+ export const UpdateUserResponse = /*@__PURE__*/ S.suspend(() =>
1735
+ S.Struct({}),
1736
+ ).annotate({
1737
+ identifier: "UpdateUserResponse",
1738
+ }) as any as S.Schema<UpdateUserResponse>;
1739
+
1740
+ export type CloneInstanceError =
1741
+ | BadRequest
1742
+ | Forbidden
1743
+ | NotFound
1744
+ | Conflict
1745
+ | UnprocessableEntity
1746
+ | StackitOpError;
1747
+ /** Clone Instance Clone Instance */
1748
+ export const cloneInstance: API.OperationMethod<
1749
+ CloneInstanceRequest,
1750
+ CloneInstanceResponse,
1751
+ CloneInstanceError,
1752
+ StackitOpContext
1753
+ > = /*@__PURE__*/ API.make(() => ({
1754
+ input: CloneInstanceRequest,
1755
+ output: CloneInstanceResponse,
1756
+ errors: [
1757
+ BadRequest,
1758
+ Forbidden,
1759
+ NotFound,
1760
+ Conflict,
1761
+ UnprocessableEntity,
1762
+ UnknownStackitError,
1763
+ ],
1764
+ protocol: StackitProtocol,
1765
+ retry: Retry.Retry,
1766
+ }));
1767
+
1768
+ export type CreateDatabaseError =
1769
+ | BadRequest
1770
+ | Forbidden
1771
+ | NotFound
1772
+ | Conflict
1773
+ | UnprocessableEntity
1774
+ | StackitOpError;
1775
+ /** Create Database Create database for a user. Note: The name of a valid user must be provided in the 'options' map field using the key 'owner' */
1776
+ export const createDatabase: API.OperationMethod<
1777
+ CreateDatabaseRequest,
1778
+ CreateDatabaseResponse,
1779
+ CreateDatabaseError,
1780
+ StackitOpContext
1781
+ > = /*@__PURE__*/ API.make(() => ({
1782
+ input: CreateDatabaseRequest,
1783
+ output: CreateDatabaseResponse,
1784
+ errors: [
1785
+ BadRequest,
1786
+ Forbidden,
1787
+ NotFound,
1788
+ Conflict,
1789
+ UnprocessableEntity,
1790
+ UnknownStackitError,
1791
+ ],
1792
+ protocol: StackitProtocol,
1793
+ retry: Retry.Retry,
1794
+ }));
1795
+
1796
+ export type CreateInstanceError =
1797
+ | BadRequest
1798
+ | Forbidden
1799
+ | NotFound
1800
+ | UnprocessableEntity
1801
+ | StackitOpError;
1802
+ /** Create Instance Create a new instance of a postgres database instance. */
1803
+ export const createInstance: API.OperationMethod<
1804
+ CreateInstanceRequest,
1805
+ CreateInstanceResponse,
1806
+ CreateInstanceError,
1807
+ StackitOpContext
1808
+ > = /*@__PURE__*/ API.make(() => ({
1809
+ input: CreateInstanceRequest,
1810
+ output: CreateInstanceResponse,
1811
+ errors: [
1812
+ BadRequest,
1813
+ Forbidden,
1814
+ NotFound,
1815
+ UnprocessableEntity,
1816
+ UnknownStackitError,
1817
+ ],
1818
+ protocol: StackitProtocol,
1819
+ retry: Retry.Retry,
1820
+ }));
1821
+
1822
+ export type CreateUserError =
1823
+ | BadRequest
1824
+ | Forbidden
1825
+ | NotFound
1826
+ | Conflict
1827
+ | UnprocessableEntity
1828
+ | StackitOpError;
1829
+ /** Create User Create user for an instance. */
1830
+ export const createUser: API.OperationMethod<
1831
+ CreateUserRequest,
1832
+ CreateUserResponse,
1833
+ CreateUserError,
1834
+ StackitOpContext
1835
+ > = /*@__PURE__*/ API.make(() => ({
1836
+ input: CreateUserRequest,
1837
+ output: CreateUserResponse,
1838
+ errors: [
1839
+ BadRequest,
1840
+ Forbidden,
1841
+ NotFound,
1842
+ Conflict,
1843
+ UnprocessableEntity,
1844
+ UnknownStackitError,
1845
+ ],
1846
+ protocol: StackitProtocol,
1847
+ retry: Retry.Retry,
1848
+ }));
1849
+
1850
+ export type DeleteDatabaseError =
1851
+ | BadRequest
1852
+ | Forbidden
1853
+ | NotFound
1854
+ | StackitOpError;
1855
+ /** Delete Database Delete database for an instance. */
1856
+ export const deleteDatabase: API.OperationMethod<
1857
+ DeleteDatabaseRequest,
1858
+ DeleteDatabaseResponse,
1859
+ DeleteDatabaseError,
1860
+ StackitOpContext
1861
+ > = /*@__PURE__*/ API.make(() => ({
1862
+ input: DeleteDatabaseRequest,
1863
+ output: DeleteDatabaseResponse,
1864
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
1865
+ protocol: StackitProtocol,
1866
+ retry: Retry.Retry,
1867
+ }));
1868
+
1869
+ export type DeleteInstanceError =
1870
+ | BadRequest
1871
+ | Forbidden
1872
+ | NotFound
1873
+ | StackitOpError;
1874
+ /** Delete Instance Delete an available postgres instance. */
1875
+ export const deleteInstance: API.OperationMethod<
1876
+ DeleteInstanceRequest,
1877
+ DeleteInstanceResponse,
1878
+ DeleteInstanceError,
1879
+ StackitOpContext
1880
+ > = /*@__PURE__*/ API.make(() => ({
1881
+ input: DeleteInstanceRequest,
1882
+ output: DeleteInstanceResponse,
1883
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
1884
+ protocol: StackitProtocol,
1885
+ retry: Retry.Retry,
1886
+ }));
1887
+
1888
+ export type DeleteUserError =
1889
+ | BadRequest
1890
+ | Forbidden
1891
+ | NotFound
1892
+ | Conflict
1893
+ | StackitOpError;
1894
+ /** Delete User Delete an user from a specific instance. */
1895
+ export const deleteUser: API.OperationMethod<
1896
+ DeleteUserRequest,
1897
+ DeleteUserResponse,
1898
+ DeleteUserError,
1899
+ StackitOpContext
1900
+ > = /*@__PURE__*/ API.make(() => ({
1901
+ input: DeleteUserRequest,
1902
+ output: DeleteUserResponse,
1903
+ errors: [BadRequest, Forbidden, NotFound, Conflict, UnknownStackitError],
1904
+ protocol: StackitProtocol,
1905
+ retry: Retry.Retry,
1906
+ }));
1907
+
1908
+ export type GetBackupError = BadRequest | Forbidden | NotFound | StackitOpError;
1909
+ /** Get specific backup Get information about a specific backup for an instance. */
1910
+ export const getBackup: API.OperationMethod<
1911
+ GetBackupRequest,
1912
+ BackupData,
1913
+ GetBackupError,
1914
+ StackitOpContext
1915
+ > = /*@__PURE__*/ API.make(() => ({
1916
+ input: GetBackupRequest,
1917
+ output: BackupData,
1918
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
1919
+ protocol: StackitProtocol,
1920
+ retry: Retry.Retry,
1921
+ }));
1922
+
1923
+ export type GetDatabaseError =
1924
+ | BadRequest
1925
+ | Forbidden
1926
+ | NotFound
1927
+ | StackitOpError;
1928
+ /** Get Specific Database Get information about a specific database in an instance. */
1929
+ export const getDatabase: API.OperationMethod<
1930
+ GetDatabaseRequest,
1931
+ GetDatabaseResponse,
1932
+ GetDatabaseError,
1933
+ StackitOpContext
1934
+ > = /*@__PURE__*/ API.make(() => ({
1935
+ input: GetDatabaseRequest,
1936
+ output: GetDatabaseResponse,
1937
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
1938
+ protocol: StackitProtocol,
1939
+ retry: Retry.Retry,
1940
+ }));
1941
+
1942
+ export type GetInstanceError =
1943
+ | BadRequest
1944
+ | Forbidden
1945
+ | NotFound
1946
+ | StackitOpError;
1947
+ /** Get Specific Instance Get information about a specific available instance */
1948
+ export const getInstance: API.OperationMethod<
1949
+ GetInstanceRequest,
1950
+ GetInstanceResponse,
1951
+ GetInstanceError,
1952
+ StackitOpContext
1953
+ > = /*@__PURE__*/ API.make(() => ({
1954
+ input: GetInstanceRequest,
1955
+ output: GetInstanceResponse,
1956
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
1957
+ protocol: StackitProtocol,
1958
+ retry: Retry.Retry,
1959
+ }));
1960
+
1961
+ export type GetUserError = BadRequest | Forbidden | NotFound | StackitOpError;
1962
+ /** Get User Get a specific available user for an instance. */
1963
+ export const getUser: API.OperationMethod<
1964
+ GetUserRequest,
1965
+ GetUserResponse,
1966
+ GetUserError,
1967
+ StackitOpContext
1968
+ > = /*@__PURE__*/ API.make(() => ({
1969
+ input: GetUserRequest,
1970
+ output: GetUserResponse,
1971
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
1972
+ protocol: StackitProtocol,
1973
+ retry: Retry.Retry,
1974
+ }));
1975
+
1976
+ export type ListBackupsError =
1977
+ | BadRequest
1978
+ | Forbidden
1979
+ | NotFound
1980
+ | StackitOpError;
1981
+ /** List backups List all backups which are available for a specific instance. */
1982
+ export const listBackups: API.OperationMethod<
1983
+ ListBackupsRequest,
1984
+ ListBackupsResponse,
1985
+ ListBackupsError,
1986
+ StackitOpContext
1987
+ > = /*@__PURE__*/ API.make(() => ({
1988
+ input: ListBackupsRequest,
1989
+ output: ListBackupsResponse,
1990
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
1991
+ protocol: StackitProtocol,
1992
+ retry: Retry.Retry,
1993
+ }));
1994
+
1995
+ export type ListCollationsError =
1996
+ | BadRequest
1997
+ | Forbidden
1998
+ | NotFound
1999
+ | StackitOpError;
2000
+ /** Get Collations for an Instance Get available collations for an instance */
2001
+ export const listCollations: API.OperationMethod<
2002
+ ListCollationsRequest,
2003
+ ListCollationsResponse,
2004
+ ListCollationsError,
2005
+ StackitOpContext
2006
+ > = /*@__PURE__*/ API.make(() => ({
2007
+ input: ListCollationsRequest,
2008
+ output: ListCollationsResponse,
2009
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
2010
+ protocol: StackitProtocol,
2011
+ retry: Retry.Retry,
2012
+ }));
2013
+
2014
+ export type ListDatabasesError =
2015
+ | BadRequest
2016
+ | Forbidden
2017
+ | NotFound
2018
+ | StackitOpError;
2019
+ /** List Databases List available databases for an instance. */
2020
+ export const listDatabases: API.OperationMethod<
2021
+ ListDatabasesRequest,
2022
+ ListDatabasesResponse,
2023
+ ListDatabasesError,
2024
+ StackitOpContext
2025
+ > = /*@__PURE__*/ API.make(() => ({
2026
+ input: ListDatabasesRequest,
2027
+ output: ListDatabasesResponse,
2028
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
2029
+ protocol: StackitProtocol,
2030
+ retry: Retry.Retry,
2031
+ }));
2032
+
2033
+ export type ListFlavors2Error =
2034
+ | BadRequest
2035
+ | Forbidden
2036
+ | NotFound
2037
+ | StackitOpError;
2038
+ /** Get Flavors Get all available flavors for a project. */
2039
+ export const listFlavors2: API.OperationMethod<
2040
+ ListFlavorsRequest,
2041
+ ListFlavorsResponse,
2042
+ ListFlavors2Error,
2043
+ StackitOpContext
2044
+ > = /*@__PURE__*/ API.make(() => ({
2045
+ input: ListFlavorsRequest,
2046
+ output: ListFlavorsResponse,
2047
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
2048
+ protocol: StackitProtocol,
2049
+ retry: Retry.Retry,
2050
+ }));
2051
+
2052
+ export type ListInstancesError =
2053
+ | BadRequest
2054
+ | Forbidden
2055
+ | NotFound
2056
+ | StackitOpError;
2057
+ /** List Instances List all available instances for your project. */
2058
+ export const listInstances: API.OperationMethod<
2059
+ ListInstancesRequest,
2060
+ ListInstancesResponse,
2061
+ ListInstancesError,
2062
+ StackitOpContext
2063
+ > = /*@__PURE__*/ API.make(() => ({
2064
+ input: ListInstancesRequest,
2065
+ output: ListInstancesResponse,
2066
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
2067
+ protocol: StackitProtocol,
2068
+ retry: Retry.Retry,
2069
+ }));
2070
+
2071
+ export type ListRolesError = BadRequest | Forbidden | NotFound | StackitOpError;
2072
+ /** List Roles List available roles for an instance. */
2073
+ export const listRoles: API.OperationMethod<
2074
+ ListRolesRequest,
2075
+ ListRolesResponse,
2076
+ ListRolesError,
2077
+ StackitOpContext
2078
+ > = /*@__PURE__*/ API.make(() => ({
2079
+ input: ListRolesRequest,
2080
+ output: ListRolesResponse,
2081
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
2082
+ protocol: StackitProtocol,
2083
+ retry: Retry.Retry,
2084
+ }));
2085
+
2086
+ export type ListUsersError = BadRequest | Forbidden | NotFound | StackitOpError;
2087
+ /** List Users List available users for an instance. */
2088
+ export const listUsers: API.OperationMethod<
2089
+ ListUsersRequest,
2090
+ ListUsersResponse,
2091
+ ListUsersError,
2092
+ StackitOpContext
2093
+ > = /*@__PURE__*/ API.make(() => ({
2094
+ input: ListUsersRequest,
2095
+ output: ListUsersResponse,
2096
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
2097
+ protocol: StackitProtocol,
2098
+ retry: Retry.Retry,
2099
+ }));
2100
+
2101
+ export type ListVersionsError =
2102
+ | BadRequest
2103
+ | Forbidden
2104
+ | NotFound
2105
+ | StackitOpError;
2106
+ /** Get Versions Get available postgres versions for the project. */
2107
+ export const listVersions: API.OperationMethod<
2108
+ ListVersionsRequest,
2109
+ ListVersionsResponse,
2110
+ ListVersionsError,
2111
+ StackitOpContext
2112
+ > = /*@__PURE__*/ API.make(() => ({
2113
+ input: ListVersionsRequest,
2114
+ output: ListVersionsResponse,
2115
+ errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
2116
+ protocol: StackitProtocol,
2117
+ retry: Retry.Retry,
2118
+ }));
2119
+
2120
+ export type PartialUpdateDatabaseError =
2121
+ | BadRequest
2122
+ | Forbidden
2123
+ | NotFound
2124
+ | UnprocessableEntity
2125
+ | StackitOpError;
2126
+ /** Update Database partially Update a database partially in an instance. */
2127
+ export const partialUpdateDatabase: API.OperationMethod<
2128
+ PartialUpdateDatabaseRequest,
2129
+ PartialUpdateDatabaseResponse,
2130
+ PartialUpdateDatabaseError,
2131
+ StackitOpContext
2132
+ > = /*@__PURE__*/ API.make(() => ({
2133
+ input: PartialUpdateDatabaseRequest,
2134
+ output: PartialUpdateDatabaseResponse,
2135
+ errors: [
2136
+ BadRequest,
2137
+ Forbidden,
2138
+ NotFound,
2139
+ UnprocessableEntity,
2140
+ UnknownStackitError,
2141
+ ],
2142
+ protocol: StackitProtocol,
2143
+ retry: Retry.Retry,
2144
+ }));
2145
+
2146
+ export type PartialUpdateInstanceError =
2147
+ | BadRequest
2148
+ | Forbidden
2149
+ | NotFound
2150
+ | UnprocessableEntity
2151
+ | StackitOpError;
2152
+ /** Update Instance Partially Update an available instance of a postgres database. No fields are required. */
2153
+ export const partialUpdateInstance: API.OperationMethod<
2154
+ PartialUpdateInstanceRequest,
2155
+ PartialUpdateInstanceResponse,
2156
+ PartialUpdateInstanceError,
2157
+ StackitOpContext
2158
+ > = /*@__PURE__*/ API.make(() => ({
2159
+ input: PartialUpdateInstanceRequest,
2160
+ output: PartialUpdateInstanceResponse,
2161
+ errors: [
2162
+ BadRequest,
2163
+ Forbidden,
2164
+ NotFound,
2165
+ UnprocessableEntity,
2166
+ UnknownStackitError,
2167
+ ],
2168
+ protocol: StackitProtocol,
2169
+ retry: Retry.Retry,
2170
+ }));
2171
+
2172
+ export type PartialUpdateUserError =
2173
+ | BadRequest
2174
+ | Forbidden
2175
+ | NotFound
2176
+ | UnprocessableEntity
2177
+ | StackitOpError;
2178
+ /** Update User Partially Update an user partially for an instance. */
2179
+ export const partialUpdateUser: API.OperationMethod<
2180
+ PartialUpdateUserRequest,
2181
+ PartialUpdateUserResponse,
2182
+ PartialUpdateUserError,
2183
+ StackitOpContext
2184
+ > = /*@__PURE__*/ API.make(() => ({
2185
+ input: PartialUpdateUserRequest,
2186
+ output: PartialUpdateUserResponse,
2187
+ errors: [
2188
+ BadRequest,
2189
+ Forbidden,
2190
+ NotFound,
2191
+ UnprocessableEntity,
2192
+ UnknownStackitError,
2193
+ ],
2194
+ protocol: StackitProtocol,
2195
+ retry: Retry.Retry,
2196
+ }));
2197
+
2198
+ export type ResetUserPasswordError =
2199
+ | BadRequest
2200
+ | Forbidden
2201
+ | NotFound
2202
+ | UnprocessableEntity
2203
+ | StackitOpError;
2204
+ /** Reset User Reset an user from an specific instance. */
2205
+ export const resetUserPassword: API.OperationMethod<
2206
+ ResetUserPasswordRequest,
2207
+ ResetUserPasswordResponse,
2208
+ ResetUserPasswordError,
2209
+ StackitOpContext
2210
+ > = /*@__PURE__*/ API.make(() => ({
2211
+ input: ResetUserPasswordRequest,
2212
+ output: ResetUserPasswordResponse,
2213
+ errors: [
2214
+ BadRequest,
2215
+ Forbidden,
2216
+ NotFound,
2217
+ UnprocessableEntity,
2218
+ UnknownStackitError,
2219
+ ],
2220
+ protocol: StackitProtocol,
2221
+ retry: Retry.Retry,
2222
+ }));
2223
+
2224
+ export type UpdateDatabaseError =
2225
+ | BadRequest
2226
+ | Forbidden
2227
+ | NotFound
2228
+ | UnprocessableEntity
2229
+ | StackitOpError;
2230
+ /** Update Database Update a database in an instance. */
2231
+ export const updateDatabase: API.OperationMethod<
2232
+ UpdateDatabaseRequest,
2233
+ UpdateDatabaseResponse,
2234
+ UpdateDatabaseError,
2235
+ StackitOpContext
2236
+ > = /*@__PURE__*/ API.make(() => ({
2237
+ input: UpdateDatabaseRequest,
2238
+ output: UpdateDatabaseResponse,
2239
+ errors: [
2240
+ BadRequest,
2241
+ Forbidden,
2242
+ NotFound,
2243
+ UnprocessableEntity,
2244
+ UnknownStackitError,
2245
+ ],
2246
+ protocol: StackitProtocol,
2247
+ retry: Retry.Retry,
2248
+ }));
2249
+
2250
+ export type UpdateInstanceError =
2251
+ | BadRequest
2252
+ | Forbidden
2253
+ | NotFound
2254
+ | UnprocessableEntity
2255
+ | StackitOpError;
2256
+ /** Update Instance Updates an available instance of a postgres database */
2257
+ export const updateInstance: API.OperationMethod<
2258
+ UpdateInstanceRequest,
2259
+ UpdateInstanceResponse,
2260
+ UpdateInstanceError,
2261
+ StackitOpContext
2262
+ > = /*@__PURE__*/ API.make(() => ({
2263
+ input: UpdateInstanceRequest,
2264
+ output: UpdateInstanceResponse,
2265
+ errors: [
2266
+ BadRequest,
2267
+ Forbidden,
2268
+ NotFound,
2269
+ UnprocessableEntity,
2270
+ UnknownStackitError,
2271
+ ],
2272
+ protocol: StackitProtocol,
2273
+ retry: Retry.Retry,
2274
+ }));
2275
+
2276
+ export type UpdateInstanceProtectionError =
2277
+ | BadRequest
2278
+ | Forbidden
2279
+ | NotFound
2280
+ | UnprocessableEntity
2281
+ | StackitOpError;
2282
+ /** Toggle Instance Protection Toggle the deletion protection for an instance. */
2283
+ export const updateInstanceProtection: API.OperationMethod<
2284
+ UpdateInstanceProtectionRequest,
2285
+ UpdateInstanceProtectionResponse,
2286
+ UpdateInstanceProtectionError,
2287
+ StackitOpContext
2288
+ > = /*@__PURE__*/ API.make(() => ({
2289
+ input: UpdateInstanceProtectionRequest,
2290
+ output: UpdateInstanceProtectionResponse,
2291
+ errors: [
2292
+ BadRequest,
2293
+ Forbidden,
2294
+ NotFound,
2295
+ UnprocessableEntity,
2296
+ UnknownStackitError,
2297
+ ],
2298
+ protocol: StackitProtocol,
2299
+ retry: Retry.Retry,
2300
+ }));
2301
+
2302
+ export type UpdateUserError =
2303
+ | BadRequest
2304
+ | Forbidden
2305
+ | NotFound
2306
+ | UnprocessableEntity
2307
+ | StackitOpError;
2308
+ /** Update User Update user for an instance. */
2309
+ export const updateUser: API.OperationMethod<
2310
+ UpdateUserRequest,
2311
+ UpdateUserResponse,
2312
+ UpdateUserError,
2313
+ StackitOpContext
2314
+ > = /*@__PURE__*/ API.make(() => ({
2315
+ input: UpdateUserRequest,
2316
+ output: UpdateUserResponse,
2317
+ errors: [
2318
+ BadRequest,
2319
+ Forbidden,
2320
+ NotFound,
2321
+ UnprocessableEntity,
2322
+ UnknownStackitError,
2323
+ ],
2324
+ protocol: StackitProtocol,
2325
+ retry: Retry.Retry,
2326
+ }));