@distilled.cloud/stackit 0.0.0-stage → 1.0.0-rc.14

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