@distilled.cloud/stackit 1.0.0-rc.15 → 1.0.0-rc.17

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 (346) hide show
  1. package/lib/.lazy.json +1 -0
  2. package/lib/_bundle/lazy.js +4 -0
  3. package/lib/_bundle/sdk.js +2 -0
  4. package/lib/_bundle/sdk.js.map +1 -0
  5. package/lib/credentials.d.ts +2 -2
  6. package/lib/credentials.d.ts.map +1 -1
  7. package/lib/credentials.js +1 -49
  8. package/lib/errors.d.ts +13 -13
  9. package/lib/errors.d.ts.map +1 -1
  10. package/lib/errors.js +1 -26
  11. package/lib/index.d.ts +2 -2
  12. package/lib/index.js +1 -24
  13. package/lib/index.lazy.js +7 -0
  14. package/lib/pagination.d.ts +1 -1
  15. package/lib/pagination.js +1 -45
  16. package/lib/protocol.d.ts +3 -3
  17. package/lib/protocol.d.ts.map +1 -1
  18. package/lib/protocol.js +1 -147
  19. package/lib/retry.d.ts +1 -1
  20. package/lib/retry.d.ts.map +1 -1
  21. package/lib/retry.js +1 -31
  22. package/lib/services/alb.d.ts +10 -87
  23. package/lib/services/alb.d.ts.map +1 -1
  24. package/lib/services/alb.js +28 -512
  25. package/lib/services/alb.js.map +1 -1
  26. package/lib/services/alb_waf.d.ts +9 -82
  27. package/lib/services/alb_waf.d.ts.map +1 -1
  28. package/lib/services/alb_waf.js +33 -520
  29. package/lib/services/alb_waf.js.map +1 -1
  30. package/lib/services/authorization.d.ts +5 -47
  31. package/lib/services/authorization.d.ts.map +1 -1
  32. package/lib/services/authorization.js +1 -322
  33. package/lib/services/authorization.js.map +1 -1
  34. package/lib/services/automation.d.ts +7 -47
  35. package/lib/services/automation.d.ts.map +1 -1
  36. package/lib/services/automation.js +1 -362
  37. package/lib/services/automation.js.map +1 -1
  38. package/lib/services/cdn.d.ts +8 -220
  39. package/lib/services/cdn.d.ts.map +1 -1
  40. package/lib/services/cdn.js +31 -905
  41. package/lib/services/cdn.js.map +1 -1
  42. package/lib/services/certificates.d.ts +8 -27
  43. package/lib/services/certificates.d.ts.map +1 -1
  44. package/lib/services/certificates.js +1 -178
  45. package/lib/services/certificates.js.map +1 -1
  46. package/lib/services/cost.d.ts +10 -37
  47. package/lib/services/cost.d.ts.map +1 -1
  48. package/lib/services/cost.js +1 -176
  49. package/lib/services/cost.js.map +1 -1
  50. package/lib/services/dns.d.ts +9 -104
  51. package/lib/services/dns.d.ts.map +1 -1
  52. package/lib/services/dns.js +40 -725
  53. package/lib/services/dns.js.map +1 -1
  54. package/lib/services/dremio.d.ts +8 -50
  55. package/lib/services/dremio.d.ts.map +1 -1
  56. package/lib/services/dremio.js +1 -316
  57. package/lib/services/dremio.js.map +1 -1
  58. package/lib/services/edge.d.ts +7 -40
  59. package/lib/services/edge.d.ts.map +1 -1
  60. package/lib/services/edge.js +1 -356
  61. package/lib/services/edge.js.map +1 -1
  62. package/lib/services/functions.d.ts +1 -48
  63. package/lib/services/functions.d.ts.map +1 -1
  64. package/lib/services/functions.js +1 -398
  65. package/lib/services/functions.js.map +1 -1
  66. package/lib/services/git.d.ts +8 -61
  67. package/lib/services/git.d.ts.map +1 -1
  68. package/lib/services/git.js +35 -519
  69. package/lib/services/git.js.map +1 -1
  70. package/lib/services/iaas.d.ts +9 -337
  71. package/lib/services/iaas.d.ts.map +1 -1
  72. package/lib/services/iaas.js +181 -3542
  73. package/lib/services/iaas.js.map +1 -1
  74. package/lib/services/index.js +0 -2
  75. package/lib/services/intake.d.ts +8 -75
  76. package/lib/services/intake.d.ts.map +1 -1
  77. package/lib/services/intake.js +29 -474
  78. package/lib/services/intake.js.map +1 -1
  79. package/lib/services/kms.d.ts +9 -92
  80. package/lib/services/kms.d.ts.map +1 -1
  81. package/lib/services/kms.js +41 -662
  82. package/lib/services/kms.js.map +1 -1
  83. package/lib/services/lb_ip_lists.d.ts +9 -25
  84. package/lib/services/lb_ip_lists.d.ts.map +1 -1
  85. package/lib/services/lb_ip_lists.js +1 -153
  86. package/lib/services/lb_ip_lists.js.map +1 -1
  87. package/lib/services/load_balancer.d.ts +10 -81
  88. package/lib/services/load_balancer.d.ts.map +1 -1
  89. package/lib/services/load_balancer.js +29 -496
  90. package/lib/services/load_balancer.js.map +1 -1
  91. package/lib/services/logme.d.ts +8 -69
  92. package/lib/services/logme.d.ts.map +1 -1
  93. package/lib/services/logme.js +33 -573
  94. package/lib/services/logme.js.map +1 -1
  95. package/lib/services/logs.d.ts +8 -64
  96. package/lib/services/logs.d.ts.map +1 -1
  97. package/lib/services/logs.js +34 -474
  98. package/lib/services/logs.js.map +1 -1
  99. package/lib/services/mariadb.d.ts +8 -65
  100. package/lib/services/mariadb.d.ts.map +1 -1
  101. package/lib/services/mariadb.js +34 -550
  102. package/lib/services/mariadb.js.map +1 -1
  103. package/lib/services/model_experiments.d.ts +9 -48
  104. package/lib/services/model_experiments.d.ts.map +1 -1
  105. package/lib/services/model_experiments.js +1 -335
  106. package/lib/services/model_experiments.js.map +1 -1
  107. package/lib/services/model_serving.d.ts +7 -47
  108. package/lib/services/model_serving.d.ts.map +1 -1
  109. package/lib/services/model_serving.js +1 -286
  110. package/lib/services/model_serving.js.map +1 -1
  111. package/lib/services/mongodb_flex.d.ts +8 -137
  112. package/lib/services/mongodb_flex.d.ts.map +1 -1
  113. package/lib/services/mongodb_flex.js +42 -802
  114. package/lib/services/mongodb_flex.js.map +1 -1
  115. package/lib/services/object_storage.d.ts +12 -59
  116. package/lib/services/object_storage.d.ts.map +1 -1
  117. package/lib/services/object_storage.js +38 -539
  118. package/lib/services/object_storage.js.map +1 -1
  119. package/lib/services/observability.d.ts +8 -407
  120. package/lib/services/observability.d.ts.map +1 -1
  121. package/lib/services/observability.js +159 -3157
  122. package/lib/services/observability.js.map +1 -1
  123. package/lib/services/opensearch.d.ts +8 -71
  124. package/lib/services/opensearch.d.ts.map +1 -1
  125. package/lib/services/opensearch.js +34 -562
  126. package/lib/services/opensearch.js.map +1 -1
  127. package/lib/services/pim.d.ts +12 -108
  128. package/lib/services/pim.d.ts.map +1 -1
  129. package/lib/services/pim.js +31 -735
  130. package/lib/services/pim.js.map +1 -1
  131. package/lib/services/postgres_flex.d.ts +14 -136
  132. package/lib/services/postgres_flex.d.ts.map +1 -1
  133. package/lib/services/postgres_flex.js +47 -852
  134. package/lib/services/postgres_flex.js.map +1 -1
  135. package/lib/services/pubsub.d.ts +11 -73
  136. package/lib/services/pubsub.d.ts.map +1 -1
  137. package/lib/services/pubsub.js +37 -518
  138. package/lib/services/pubsub.js.map +1 -1
  139. package/lib/services/rabbitmq.d.ts +8 -76
  140. package/lib/services/rabbitmq.d.ts.map +1 -1
  141. package/lib/services/rabbitmq.js +35 -573
  142. package/lib/services/rabbitmq.js.map +1 -1
  143. package/lib/services/registry.d.ts +10 -28
  144. package/lib/services/registry.d.ts.map +1 -1
  145. package/lib/services/registry.js +1 -197
  146. package/lib/services/registry.js.map +1 -1
  147. package/lib/services/resource_manager.d.ts +9 -61
  148. package/lib/services/resource_manager.d.ts.map +1 -1
  149. package/lib/services/resource_manager.js +36 -472
  150. package/lib/services/resource_manager.js.map +1 -1
  151. package/lib/services/run_command.d.ts +5 -28
  152. package/lib/services/run_command.d.ts.map +1 -1
  153. package/lib/services/run_command.js +1 -184
  154. package/lib/services/run_command.js.map +1 -1
  155. package/lib/services/sca.d.ts +8 -79
  156. package/lib/services/sca.d.ts.map +1 -1
  157. package/lib/services/sca.js +25 -444
  158. package/lib/services/sca.js.map +1 -1
  159. package/lib/services/scf.d.ts +8 -64
  160. package/lib/services/scf.d.ts.map +1 -1
  161. package/lib/services/scf.js +40 -669
  162. package/lib/services/scf.js.map +1 -1
  163. package/lib/services/secrets_manager.d.ts +8 -61
  164. package/lib/services/secrets_manager.d.ts.map +1 -1
  165. package/lib/services/secrets_manager.js +42 -612
  166. package/lib/services/secrets_manager.js.map +1 -1
  167. package/lib/services/server_backup.d.ts +7 -50
  168. package/lib/services/server_backup.d.ts.map +1 -1
  169. package/lib/services/server_backup.js +29 -453
  170. package/lib/services/server_backup.js.map +1 -1
  171. package/lib/services/server_update.d.ts +7 -35
  172. package/lib/services/server_update.d.ts.map +1 -1
  173. package/lib/services/server_update.js +1 -351
  174. package/lib/services/server_update.js.map +1 -1
  175. package/lib/services/service_account.d.ts +10 -68
  176. package/lib/services/service_account.d.ts.map +1 -1
  177. package/lib/services/service_account.js +30 -505
  178. package/lib/services/service_account.js.map +1 -1
  179. package/lib/services/service_enablement.d.ts +7 -29
  180. package/lib/services/service_enablement.d.ts.map +1 -1
  181. package/lib/services/service_enablement.js +1 -156
  182. package/lib/services/service_enablement.js.map +1 -1
  183. package/lib/services/sfs.d.ts +4 -96
  184. package/lib/services/sfs.d.ts.map +1 -1
  185. package/lib/services/sfs.js +46 -789
  186. package/lib/services/sfs.js.map +1 -1
  187. package/lib/services/ske.d.ts +9 -108
  188. package/lib/services/ske.d.ts.map +1 -1
  189. package/lib/services/ske.js +26 -557
  190. package/lib/services/ske.js.map +1 -1
  191. package/lib/services/sqlserverflex.d.ts +11 -152
  192. package/lib/services/sqlserverflex.d.ts.map +1 -1
  193. package/lib/services/sqlserverflex.js +46 -935
  194. package/lib/services/sqlserverflex.js.map +1 -1
  195. package/lib/services/stackit_marketplace.d.ts +9 -38
  196. package/lib/services/stackit_marketplace.d.ts.map +1 -1
  197. package/lib/services/stackit_marketplace.js +26 -378
  198. package/lib/services/stackit_marketplace.js.map +1 -1
  199. package/lib/services/telemetry_link.d.ts +8 -61
  200. package/lib/services/telemetry_link.d.ts.map +1 -1
  201. package/lib/services/telemetry_link.js +34 -531
  202. package/lib/services/telemetry_link.js.map +1 -1
  203. package/lib/services/telemetry_router.d.ts +8 -72
  204. package/lib/services/telemetry_router.d.ts.map +1 -1
  205. package/lib/services/telemetry_router.js +29 -483
  206. package/lib/services/telemetry_router.js.map +1 -1
  207. package/lib/services/ufw.d.ts +7 -42
  208. package/lib/services/ufw.d.ts.map +1 -1
  209. package/lib/services/ufw.js +1 -278
  210. package/lib/services/ufw.js.map +1 -1
  211. package/lib/services/valkey.d.ts +8 -68
  212. package/lib/services/valkey.d.ts.map +1 -1
  213. package/lib/services/valkey.js +34 -566
  214. package/lib/services/valkey.js.map +1 -1
  215. package/lib/services/vpn.d.ts +21 -186
  216. package/lib/services/vpn.d.ts.map +1 -1
  217. package/lib/services/vpn.js +43 -930
  218. package/lib/services/vpn.js.map +1 -1
  219. package/lib/services/workflows.d.ts +15 -84
  220. package/lib/services/workflows.d.ts.map +1 -1
  221. package/lib/services/workflows.js +27 -507
  222. package/lib/services/workflows.js.map +1 -1
  223. package/lib/services.lazy/alb.js +4 -0
  224. package/lib/services.lazy/alb_waf.js +4 -0
  225. package/lib/services.lazy/authorization.js +1 -0
  226. package/lib/services.lazy/automation.js +1 -0
  227. package/lib/services.lazy/cdn.js +4 -0
  228. package/lib/services.lazy/certificates.js +1 -0
  229. package/lib/services.lazy/cost.js +1 -0
  230. package/lib/services.lazy/dns.js +4 -0
  231. package/lib/services.lazy/dremio.js +1 -0
  232. package/lib/services.lazy/edge.js +1 -0
  233. package/lib/services.lazy/functions.js +1 -0
  234. package/lib/services.lazy/git.js +4 -0
  235. package/lib/services.lazy/iaas.js +4 -0
  236. package/lib/services.lazy/index.js +3 -0
  237. package/lib/services.lazy/intake.js +4 -0
  238. package/lib/services.lazy/kms.js +4 -0
  239. package/lib/services.lazy/lb_ip_lists.js +1 -0
  240. package/lib/services.lazy/load_balancer.js +4 -0
  241. package/lib/services.lazy/logme.js +4 -0
  242. package/lib/services.lazy/logs.js +4 -0
  243. package/lib/services.lazy/mariadb.js +4 -0
  244. package/lib/services.lazy/model_experiments.js +1 -0
  245. package/lib/services.lazy/model_serving.js +1 -0
  246. package/lib/services.lazy/mongodb_flex.js +4 -0
  247. package/lib/services.lazy/object_storage.js +4 -0
  248. package/lib/services.lazy/observability.js +4 -0
  249. package/lib/services.lazy/opensearch.js +4 -0
  250. package/lib/services.lazy/pim.js +4 -0
  251. package/lib/services.lazy/postgres_flex.js +4 -0
  252. package/lib/services.lazy/pubsub.js +4 -0
  253. package/lib/services.lazy/rabbitmq.js +4 -0
  254. package/lib/services.lazy/registry.js +1 -0
  255. package/lib/services.lazy/resource_manager.js +4 -0
  256. package/lib/services.lazy/run_command.js +1 -0
  257. package/lib/services.lazy/sca.js +4 -0
  258. package/lib/services.lazy/scf.js +4 -0
  259. package/lib/services.lazy/secrets_manager.js +4 -0
  260. package/lib/services.lazy/server_backup.js +4 -0
  261. package/lib/services.lazy/server_update.js +1 -0
  262. package/lib/services.lazy/service_account.js +4 -0
  263. package/lib/services.lazy/service_enablement.js +1 -0
  264. package/lib/services.lazy/sfs.js +4 -0
  265. package/lib/services.lazy/ske.js +4 -0
  266. package/lib/services.lazy/sqlserverflex.js +4 -0
  267. package/lib/services.lazy/stackit_marketplace.js +4 -0
  268. package/lib/services.lazy/telemetry_link.js +4 -0
  269. package/lib/services.lazy/telemetry_router.js +4 -0
  270. package/lib/services.lazy/ufw.js +1 -0
  271. package/lib/services.lazy/valkey.js +4 -0
  272. package/lib/services.lazy/vpn.js +4 -0
  273. package/lib/services.lazy/workflows.js +4 -0
  274. package/lib/traits.d.ts +1 -1
  275. package/lib/traits.js +1 -15
  276. package/package.json +9 -7
  277. package/src/credentials.ts +21 -18
  278. package/src/errors.ts +10 -14
  279. package/src/index.ts +2 -2
  280. package/src/pagination.ts +2 -2
  281. package/src/protocol.ts +12 -9
  282. package/src/retry.ts +6 -4
  283. package/src/services/alb.ts +599 -655
  284. package/src/services/alb_waf.ts +597 -637
  285. package/src/services/authorization.ts +400 -383
  286. package/src/services/automation.ts +422 -405
  287. package/src/services/cdn.ts +817 -1375
  288. package/src/services/certificates.ts +209 -190
  289. package/src/services/cost.ts +100 -207
  290. package/src/services/dns.ts +793 -833
  291. package/src/services/dremio.ts +356 -349
  292. package/src/services/edge.ts +406 -366
  293. package/src/services/functions.ts +465 -463
  294. package/src/services/git.ts +602 -547
  295. package/src/services/iaas.ts +3931 -3821
  296. package/src/services/intake.ts +521 -549
  297. package/src/services/kms.ts +715 -692
  298. package/src/services/lb_ip_lists.ts +173 -152
  299. package/src/services/load_balancer.ts +576 -619
  300. package/src/services/logme.ts +696 -641
  301. package/src/services/logs.ts +510 -493
  302. package/src/services/mariadb.ts +671 -604
  303. package/src/services/model_experiments.ts +343 -356
  304. package/src/services/model_serving.ts +337 -328
  305. package/src/services/mongodb_flex.ts +955 -1007
  306. package/src/services/object_storage.ts +614 -557
  307. package/src/services/observability.ts +3469 -3866
  308. package/src/services/opensearch.ts +679 -628
  309. package/src/services/pim.ts +672 -909
  310. package/src/services/postgres_flex.ts +966 -986
  311. package/src/services/pubsub.ts +524 -546
  312. package/src/services/rabbitmq.ts +693 -654
  313. package/src/services/registry.ts +227 -194
  314. package/src/services/resource_manager.ts +520 -517
  315. package/src/services/run_command.ts +219 -211
  316. package/src/services/sca.ts +543 -570
  317. package/src/services/scf.ts +790 -716
  318. package/src/services/secrets_manager.ts +707 -622
  319. package/src/services/server_backup.ts +490 -475
  320. package/src/services/server_update.ts +353 -356
  321. package/src/services/service_account.ts +515 -553
  322. package/src/services/service_enablement.ts +162 -166
  323. package/src/services/sfs.ts +879 -958
  324. package/src/services/ske.ts +694 -769
  325. package/src/services/sqlserverflex.ts +1042 -1117
  326. package/src/services/stackit_marketplace.ts +377 -372
  327. package/src/services/telemetry_link.ts +530 -531
  328. package/src/services/telemetry_router.ts +509 -534
  329. package/src/services/ufw.ts +305 -307
  330. package/src/services/valkey.ts +684 -629
  331. package/src/services/vpn.ts +935 -1195
  332. package/src/services/workflows.ts +426 -586
  333. package/src/traits.ts +1 -1
  334. package/lib/credentials.js.map +0 -1
  335. package/lib/errors.js.map +0 -1
  336. package/lib/pagination.js.map +0 -1
  337. package/lib/protocol.js.map +0 -1
  338. package/lib/protocol.test.d.ts +0 -2
  339. package/lib/protocol.test.d.ts.map +0 -1
  340. package/lib/protocol.test.js +0 -181
  341. package/lib/protocol.test.js.map +0 -1
  342. package/lib/retry.js.map +0 -1
  343. package/lib/services/index.js.map +0 -1
  344. package/lib/traits.js.map +0 -1
  345. package/src/protocol.test.ts +0 -304
  346. /package/lib/{index.js.map → index.lazy.js.map} +0 -0
@@ -1,11 +1,14 @@
1
1
  import * as API from "@distilled.cloud/core/api";
2
2
  import * as C from "@distilled.cloud/core/category";
3
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";
4
+ import * as S from "@distilled.cloud/core/schema-lite";
5
+ import * as __L from "@distilled.cloud/core/schema-lite";
5
6
  import { UnknownStackitError } from "../errors.ts";
6
7
  import { StackitProtocol, type StackitOpError, type StackitOpContext } from "../protocol.ts";
7
8
  import * as Retry from "../retry.ts";
8
9
  import * as T from "../traits.ts";
10
+ // Schema table, filled on first reach (see __S at the end).
11
+ const __s: any[] = [];
9
12
 
10
13
  export type { StackitOpError, StackitOpContext };
11
14
 
@@ -37,16 +40,12 @@ export class NotFound
37
40
  ) {}
38
41
 
39
42
  export type GetCostsForProjectRequestDepth = "project" | "service" | "auto";
40
- export const GetCostsForProjectRequestDepth = S.String;
41
-
42
43
  export type GetCostsForProjectRequestGranularity =
43
44
  | "daily"
44
45
  | "weekly"
45
46
  | "monthly"
46
47
  | "yearly"
47
48
  | "none";
48
- export const GetCostsForProjectRequestGranularity = S.String;
49
-
50
49
  export interface GetCostsForProjectRequest {
51
50
  /** ID of a customer account */
52
51
  customerAccountId: string;
@@ -58,32 +57,11 @@ export interface GetCostsForProjectRequest {
58
57
  to: string;
59
58
  /** Depth of desired cost information. "project" provides costs grouped by project, without services. "service" provides costs separated on service level. */
60
59
  depth?: GetCostsForProjectRequestDepth | (string & {});
61
- /** Define granularity of costs – Default is "none" which does NOT include detailed report data. If "monthly", "weekly" or "yearly" is requested, the "from" parameter SHOULD be the first day and the "to" parameter SHOULD be the last day of that time period. If not, they are normalized accordingly. If "daily" is requested, the date range defined by "from" and "to" MUST NOT be longer than 92 days. */
60
+ /** Define granularity of costs - Default is "none" which does NOT include detailed report data. If "monthly", "weekly" or "yearly" is requested, the "from" parameter SHOULD be the first day and the "to" parameter SHOULD be the last day of that time period. If not, they are normalized accordingly. If "daily" is requested, the date range defined by "from" and "to" MUST NOT be longer than 92 days. */
62
61
  granularity?: GetCostsForProjectRequestGranularity | (string & {});
63
62
  /** Whether costs of 0 should be included in the response */
64
63
  includeZeroCosts?: boolean;
65
64
  }
66
- export const GetCostsForProjectRequest = /*@__PURE__*/ S.suspend(() =>
67
- S.Struct({
68
- customerAccountId: S.String.pipe(T.Label()),
69
- projectId: S.String.pipe(T.Label()),
70
- from: S.String.pipe(T.Query()),
71
- to: S.String.pipe(T.Query()),
72
- depth: S.optional(GetCostsForProjectRequestDepth.pipe(T.Query())),
73
- granularity: S.optional(GetCostsForProjectRequestGranularity.pipe(T.Query())),
74
- includeZeroCosts: S.optional(S.Boolean.pipe(T.Query())),
75
- }).pipe(
76
- T.Http({
77
- method: "GET",
78
- uri: "/v3/costs/{customerAccountId}/projects/{projectId}",
79
- code: 200,
80
- baseUrl: "https://cost.api.stackit.cloud",
81
- }),
82
- ),
83
- ).annotate({
84
- identifier: "GetCostsForProjectRequest",
85
- }) as any as S.Schema<GetCostsForProjectRequest>;
86
-
87
65
  /** Summarized costs for a project */
88
66
  export interface SummarizedProjectCost {
89
67
  customerAccountId: string;
@@ -94,28 +72,11 @@ export interface SummarizedProjectCost {
94
72
  /** Total discount for all services and the whole requested date range (value in cents) */
95
73
  totalDiscount: number;
96
74
  }
97
- export const SummarizedProjectCost = /*@__PURE__*/ S.suspend(() =>
98
- S.Struct({
99
- customerAccountId: S.String,
100
- projectId: S.String,
101
- projectName: S.String,
102
- totalCharge: S.Number,
103
- totalDiscount: S.Number,
104
- }),
105
- ).annotate({ identifier: "SummarizedProjectCost" }) as any as S.Schema<SummarizedProjectCost>;
106
-
107
75
  /** Time period according to desired granularity */
108
76
  export interface ReportDataTimePeriod {
109
77
  end?: string;
110
78
  start?: string;
111
79
  }
112
- export const ReportDataTimePeriod = /*@__PURE__*/ S.suspend(() =>
113
- S.Struct({
114
- end: S.optional(S.String),
115
- start: S.optional(S.String),
116
- }),
117
- ).annotate({ identifier: "ReportDataTimePeriod" }) as any as S.Schema<ReportDataTimePeriod>;
118
-
119
80
  /** Costs report for a certain period of time */
120
81
  export interface ReportData {
121
82
  /** Charge, value in cents */
@@ -129,22 +90,8 @@ export interface ReportData {
129
90
  /** Time period according to desired granularity */
130
91
  timePeriod: ReportDataTimePeriod;
131
92
  }
132
- export const ReportData = /*@__PURE__*/ S.suspend(() =>
133
- S.Struct({
134
- charge: S.Number,
135
- discount: S.Number,
136
- quantity: S.Number,
137
- quantityDecimal: S.String,
138
- timePeriod: ReportDataTimePeriod,
139
- }),
140
- ).annotate({ identifier: "ReportData" }) as any as S.Schema<ReportData>;
141
-
142
93
  /** Detailed project costs which are ONLY included if granularity is provided AND depth is "project" */
143
94
  export type ProjectCostWithReportsReportDataList = Array<ReportData>;
144
- export const ProjectCostWithReportsReportDataList = /*@__PURE__*/ S.Array(
145
- ReportData,
146
- ) as any as S.Schema<ProjectCostWithReportsReportDataList>;
147
-
148
95
  /** Detailed costs for a project */
149
96
  export interface ProjectCostWithReports {
150
97
  customerAccountId: string;
@@ -157,27 +104,10 @@ export interface ProjectCostWithReports {
157
104
  /** Total discount for all services and the whole requested date range (value in cents) */
158
105
  totalDiscount: number;
159
106
  }
160
- export const ProjectCostWithReports = /*@__PURE__*/ S.suspend(() =>
161
- S.Struct({
162
- customerAccountId: S.String,
163
- projectId: S.String,
164
- projectName: S.String,
165
- reportData: S.optional(ProjectCostWithReportsReportDataList),
166
- totalCharge: S.Number,
167
- totalDiscount: S.Number,
168
- }),
169
- ).annotate({ identifier: "ProjectCostWithReports" }) as any as S.Schema<ProjectCostWithReports>;
170
-
171
107
  /** Summarized costs for a project */
172
108
  export type SummarizedServiceCost = SummarizedProjectCost;
173
- export const SummarizedServiceCost = SummarizedProjectCost;
174
-
175
109
  /** Summarized service costs */
176
110
  export type ProjectCostWithSummarizedServicesServicesList = Array<SummarizedProjectCost>;
177
- export const ProjectCostWithSummarizedServicesServicesList = /*@__PURE__*/ S.Array(
178
- SummarizedProjectCost,
179
- ) as any as S.Schema<ProjectCostWithSummarizedServicesServicesList>;
180
-
181
111
  /** Costs for a project including summarized service costs */
182
112
  export interface ProjectCostWithSummarizedServices {
183
113
  customerAccountId: string;
@@ -190,25 +120,8 @@ export interface ProjectCostWithSummarizedServices {
190
120
  /** Total discount for all services and the whole requested date range (value in cents) */
191
121
  totalDiscount: number;
192
122
  }
193
- export const ProjectCostWithSummarizedServices = /*@__PURE__*/ S.suspend(() =>
194
- S.Struct({
195
- customerAccountId: S.String,
196
- projectId: S.String,
197
- projectName: S.String,
198
- services: S.optional(ProjectCostWithSummarizedServicesServicesList),
199
- totalCharge: S.Number,
200
- totalDiscount: S.Number,
201
- }),
202
- ).annotate({
203
- identifier: "ProjectCostWithSummarizedServices",
204
- }) as any as S.Schema<ProjectCostWithSummarizedServices>;
205
-
206
123
  /** Detailed service costs which are ONLY included if granularity is provided */
207
124
  export type DetailedServiceCostReportDataList = Array<ReportData>;
208
- export const DetailedServiceCostReportDataList = /*@__PURE__*/ S.Array(
209
- ReportData,
210
- ) as any as S.Schema<DetailedServiceCostReportDataList>;
211
-
212
125
  /** Costs for a single service */
213
126
  export interface DetailedServiceCost {
214
127
  /** Detailed service costs which are ONLY included if granularity is provided */
@@ -230,26 +143,8 @@ export interface DetailedServiceCost {
230
143
  /** Label for unit */
231
144
  unitLabel: string;
232
145
  }
233
- export const DetailedServiceCost = /*@__PURE__*/ S.suspend(() =>
234
- S.Struct({
235
- reportData: S.optional(DetailedServiceCostReportDataList),
236
- serviceCategoryName: S.String,
237
- serviceName: S.String,
238
- sku: S.String,
239
- totalCharge: S.Number,
240
- totalDiscount: S.Number,
241
- totalQuantity: S.Number,
242
- totalQuantityDecimal: S.String,
243
- unitLabel: S.String,
244
- }),
245
- ).annotate({ identifier: "DetailedServiceCost" }) as any as S.Schema<DetailedServiceCost>;
246
-
247
146
  /** Total discount for all services and the whole requested date range (value in cents). Please see "depth" parameter for more details. */
248
147
  export type ProjectCostWithDetailedServicesServicesList = Array<DetailedServiceCost>;
249
- export const ProjectCostWithDetailedServicesServicesList = /*@__PURE__*/ S.Array(
250
- DetailedServiceCost,
251
- ) as any as S.Schema<ProjectCostWithDetailedServicesServicesList>;
252
-
253
148
  /** Detailed costs for a project including service costs */
254
149
  export interface ProjectCostWithDetailedServices {
255
150
  customerAccountId: string;
@@ -262,44 +157,19 @@ export interface ProjectCostWithDetailedServices {
262
157
  /** Total discount for all services and the whole requested date range (value in cents) */
263
158
  totalDiscount: number;
264
159
  }
265
- export const ProjectCostWithDetailedServices = /*@__PURE__*/ S.suspend(() =>
266
- S.Struct({
267
- customerAccountId: S.String,
268
- projectId: S.String,
269
- projectName: S.String,
270
- services: S.optional(ProjectCostWithDetailedServicesServicesList),
271
- totalCharge: S.Number,
272
- totalDiscount: S.Number,
273
- }),
274
- ).annotate({
275
- identifier: "ProjectCostWithDetailedServices",
276
- }) as any as S.Schema<ProjectCostWithDetailedServices>;
277
-
278
160
  export type ProjectCost =
279
161
  | SummarizedProjectCost
280
162
  | ProjectCostWithReports
281
163
  | ProjectCostWithSummarizedServices
282
164
  | ProjectCostWithDetailedServices;
283
- export const ProjectCost = /*@__PURE__*/ S.Unknown as any as S.Schema<ProjectCost>;
284
-
285
165
  export type GetCostsForProjectResponse = ProjectCost;
286
- export const GetCostsForProjectResponse = /*@__PURE__*/ S.suspend(() =>
287
- ProjectCost.pipe(T.RawResponseRoot()),
288
- ).annotate({
289
- identifier: "GetCostsForProjectResponse",
290
- }) as any as S.Schema<GetCostsForProjectResponse>;
291
-
292
166
  export type ListCostsForCustomerRequestDepth = "project" | "service" | "auto";
293
- export const ListCostsForCustomerRequestDepth = S.String;
294
-
295
167
  export type ListCostsForCustomerRequestGranularity =
296
168
  | "daily"
297
169
  | "weekly"
298
170
  | "monthly"
299
171
  | "yearly"
300
172
  | "none";
301
- export const ListCostsForCustomerRequestGranularity = S.String;
302
-
303
173
  export interface ListCostsForCustomerRequest {
304
174
  /** ID of a customer account */
305
175
  customerAccountId: string;
@@ -309,54 +179,20 @@ export interface ListCostsForCustomerRequest {
309
179
  to: string;
310
180
  /** Depth of desired cost information. "project" provides costs grouped by project, without services. "service" provides costs separated on service level. */
311
181
  depth?: ListCostsForCustomerRequestDepth | (string & {});
312
- /** Define granularity of costs – Default is "none" which does NOT include detailed report data. If "monthly", "weekly" or "yearly" is requested, the "from" parameter SHOULD be the first day and the "to" parameter SHOULD be the last day of that time period. If not, they are normalized accordingly. If "daily" is requested, the date range defined by "from" and "to" MUST NOT be longer than 92 days. */
182
+ /** Define granularity of costs - Default is "none" which does NOT include detailed report data. If "monthly", "weekly" or "yearly" is requested, the "from" parameter SHOULD be the first day and the "to" parameter SHOULD be the last day of that time period. If not, they are normalized accordingly. If "daily" is requested, the date range defined by "from" and "to" MUST NOT be longer than 92 days. */
313
183
  granularity?: ListCostsForCustomerRequestGranularity | (string & {});
314
184
  /** Whether costs of 0 should be included in the response */
315
185
  includeZeroCosts?: boolean;
316
186
  }
317
- export const ListCostsForCustomerRequest = /*@__PURE__*/ S.suspend(() =>
318
- S.Struct({
319
- customerAccountId: S.String.pipe(T.Label()),
320
- from: S.String.pipe(T.Query()),
321
- to: S.String.pipe(T.Query()),
322
- depth: S.optional(ListCostsForCustomerRequestDepth.pipe(T.Query())),
323
- granularity: S.optional(ListCostsForCustomerRequestGranularity.pipe(T.Query())),
324
- includeZeroCosts: S.optional(S.Boolean.pipe(T.Query())),
325
- }).pipe(
326
- T.Http({
327
- method: "GET",
328
- uri: "/v3/costs/{customerAccountId}",
329
- code: 200,
330
- baseUrl: "https://cost.api.stackit.cloud",
331
- }),
332
- ),
333
- ).annotate({
334
- identifier: "ListCostsForCustomerRequest",
335
- }) as any as S.Schema<ListCostsForCustomerRequest>;
336
-
337
187
  export type ListCostsForCustomerResponseBodyList = Array<ProjectCost>;
338
- export const ListCostsForCustomerResponseBodyList = /*@__PURE__*/ S.Array(
339
- ProjectCost,
340
- ) as any as S.Schema<ListCostsForCustomerResponseBodyList>;
341
-
342
188
  export type ListCostsForCustomerResponse = ListCostsForCustomerResponseBodyList;
343
- export const ListCostsForCustomerResponse = /*@__PURE__*/ S.suspend(() =>
344
- ListCostsForCustomerResponseBodyList.pipe(T.RawResponseRoot()),
345
- ).annotate({
346
- identifier: "ListCostsForCustomerResponse",
347
- }) as any as S.Schema<ListCostsForCustomerResponse>;
348
-
349
189
  export type ListCostsForResellerRequestDepth = "project" | "service" | "auto";
350
- export const ListCostsForResellerRequestDepth = S.String;
351
-
352
190
  export type ListCostsForResellerRequestGranularity =
353
191
  | "daily"
354
192
  | "weekly"
355
193
  | "monthly"
356
194
  | "yearly"
357
195
  | "none";
358
- export const ListCostsForResellerRequestGranularity = S.String;
359
-
360
196
  export interface ListCostsForResellerRequest {
361
197
  /** ID of a customer account */
362
198
  customerAccountId: string;
@@ -366,43 +202,13 @@ export interface ListCostsForResellerRequest {
366
202
  to: string;
367
203
  /** Depth of desired cost information. "project" provides costs grouped by project, without services. "service" provides costs separated on service level. */
368
204
  depth?: ListCostsForResellerRequestDepth | (string & {});
369
- /** Define granularity of costs – Default is "none" which does NOT include detailed report data. If "monthly", "weekly" or "yearly" is requested, the "from" parameter SHOULD be the first day and the "to" parameter SHOULD be the last day of that time period. If not, they are normalized accordingly. If "daily" is requested, the date range defined by "from" and "to" MUST NOT be longer than 92 days. */
205
+ /** Define granularity of costs - Default is "none" which does NOT include detailed report data. If "monthly", "weekly" or "yearly" is requested, the "from" parameter SHOULD be the first day and the "to" parameter SHOULD be the last day of that time period. If not, they are normalized accordingly. If "daily" is requested, the date range defined by "from" and "to" MUST NOT be longer than 92 days. */
370
206
  granularity?: ListCostsForResellerRequestGranularity | (string & {});
371
207
  /** Whether costs of 0 should be included in the response */
372
208
  includeZeroCosts?: boolean;
373
209
  }
374
- export const ListCostsForResellerRequest = /*@__PURE__*/ S.suspend(() =>
375
- S.Struct({
376
- customerAccountId: S.String.pipe(T.Label()),
377
- from: S.String.pipe(T.Query()),
378
- to: S.String.pipe(T.Query()),
379
- depth: S.optional(ListCostsForResellerRequestDepth.pipe(T.Query())),
380
- granularity: S.optional(ListCostsForResellerRequestGranularity.pipe(T.Query())),
381
- includeZeroCosts: S.optional(S.Boolean.pipe(T.Query())),
382
- }).pipe(
383
- T.Http({
384
- method: "GET",
385
- uri: "/v3/costs/{customerAccountId}/customers",
386
- code: 200,
387
- baseUrl: "https://cost.api.stackit.cloud",
388
- }),
389
- ),
390
- ).annotate({
391
- identifier: "ListCostsForResellerRequest",
392
- }) as any as S.Schema<ListCostsForResellerRequest>;
393
-
394
210
  export type ListCostsForResellerResponseBodyList = Array<ProjectCost>;
395
- export const ListCostsForResellerResponseBodyList = /*@__PURE__*/ S.Array(
396
- ProjectCost,
397
- ) as any as S.Schema<ListCostsForResellerResponseBodyList>;
398
-
399
211
  export type ListCostsForResellerResponse = ListCostsForResellerResponseBodyList;
400
- export const ListCostsForResellerResponse = /*@__PURE__*/ S.suspend(() =>
401
- ListCostsForResellerResponseBodyList.pipe(T.RawResponseRoot()),
402
- ).annotate({
403
- identifier: "ListCostsForResellerResponse",
404
- }) as any as S.Schema<ListCostsForResellerResponse>;
405
-
406
212
  export type GetCostsForProjectError = BadRequest | Forbidden | NotFound | StackitOpError;
407
213
  /** V3 Costs for a certain project Get costs for a certain project in a customer account */
408
214
  export const getCostsForProject: API.OperationMethod<
@@ -411,8 +217,8 @@ export const getCostsForProject: API.OperationMethod<
411
217
  GetCostsForProjectError,
412
218
  StackitOpContext
413
219
  > = /*@__PURE__*/ API.make(() => ({
414
- input: GetCostsForProjectRequest,
415
- output: GetCostsForProjectResponse,
220
+ input: __S(0, __c0, 0) as any as S.Schema<GetCostsForProjectRequest>,
221
+ output: __S(1, __c0, 1) as any as S.Schema<GetCostsForProjectResponse>,
416
222
  errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
417
223
  protocol: StackitProtocol,
418
224
  retry: Retry.Retry,
@@ -426,8 +232,8 @@ export const listCostsForCustomer: API.OperationMethod<
426
232
  ListCostsForCustomerError,
427
233
  StackitOpContext
428
234
  > = /*@__PURE__*/ API.make(() => ({
429
- input: ListCostsForCustomerRequest,
430
- output: ListCostsForCustomerResponse,
235
+ input: __S(2, __c1, 0) as any as S.Schema<ListCostsForCustomerRequest>,
236
+ output: __S(5, __c2, 1) as any as S.Schema<ListCostsForCustomerResponse>,
431
237
  errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
432
238
  protocol: StackitProtocol,
433
239
  retry: Retry.Retry,
@@ -441,9 +247,96 @@ export const listCostsForReseller: API.OperationMethod<
441
247
  ListCostsForResellerError,
442
248
  StackitOpContext
443
249
  > = /*@__PURE__*/ API.make(() => ({
444
- input: ListCostsForResellerRequest,
445
- output: ListCostsForResellerResponse,
250
+ input: __S(6, __c3, 0) as any as S.Schema<ListCostsForResellerRequest>,
251
+ output: __S(5, __c2, 1) as any as S.Schema<ListCostsForResellerResponse>,
446
252
  errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
447
253
  protocol: StackitProtocol,
448
254
  retry: Retry.Retry,
449
255
  }));
256
+
257
+ // Schema builders: each runs one schema initializer, on that schema's first use.
258
+ function __c0(j: number): any {
259
+ switch (j) {
260
+ case 0:
261
+ return S.suspend(() =>
262
+ S.Struct({
263
+ customerAccountId: S.String.pipe(T.Label()),
264
+ projectId: S.String.pipe(T.Label()),
265
+ from: S.String.pipe(T.Query()),
266
+ to: S.String.pipe(T.Query()),
267
+ depth: S.optional(S.String.pipe(T.Query())),
268
+ granularity: S.optional(S.String.pipe(T.Query())),
269
+ includeZeroCosts: S.optional(S.Boolean.pipe(T.Query())),
270
+ }).pipe(
271
+ T.Http({
272
+ method: "GET",
273
+ uri: "/v3/costs/{customerAccountId}/projects/{projectId}",
274
+ code: 200,
275
+ baseUrl: "https://cost.api.stackit.cloud",
276
+ }),
277
+ ),
278
+ ).annotate({ identifier: "GetCostsForProjectRequest" });
279
+ case 1:
280
+ return S.suspend(() => S.Unknown.pipe(T.RawResponseRoot())).annotate({
281
+ identifier: "GetCostsForProjectResponse",
282
+ });
283
+ }
284
+ }
285
+ function __c1(j: number): any {
286
+ switch (j) {
287
+ case 0:
288
+ return S.suspend(() =>
289
+ S.Struct({
290
+ customerAccountId: S.String.pipe(T.Label()),
291
+ from: S.String.pipe(T.Query()),
292
+ to: S.String.pipe(T.Query()),
293
+ depth: S.optional(S.String.pipe(T.Query())),
294
+ granularity: S.optional(S.String.pipe(T.Query())),
295
+ includeZeroCosts: S.optional(S.Boolean.pipe(T.Query())),
296
+ }).pipe(
297
+ T.Http({
298
+ method: "GET",
299
+ uri: "/v3/costs/{customerAccountId}",
300
+ code: 200,
301
+ baseUrl: "https://cost.api.stackit.cloud",
302
+ }),
303
+ ),
304
+ ).annotate({ identifier: "ListCostsForCustomerRequest" });
305
+ }
306
+ }
307
+ function __c2(j: number): any {
308
+ switch (j) {
309
+ case 0:
310
+ return S.Array(S.Unknown);
311
+ case 1:
312
+ return S.suspend(() => __S(4, __c2, 0).pipe(T.RawResponseRoot())).annotate({
313
+ identifier: "ListCostsForCustomerResponse",
314
+ });
315
+ }
316
+ }
317
+ function __c3(j: number): any {
318
+ switch (j) {
319
+ case 0:
320
+ return S.suspend(() =>
321
+ S.Struct({
322
+ customerAccountId: S.String.pipe(T.Label()),
323
+ from: S.String.pipe(T.Query()),
324
+ to: S.String.pipe(T.Query()),
325
+ depth: S.optional(S.String.pipe(T.Query())),
326
+ granularity: S.optional(S.String.pipe(T.Query())),
327
+ includeZeroCosts: S.optional(S.Boolean.pipe(T.Query())),
328
+ }).pipe(
329
+ T.Http({
330
+ method: "GET",
331
+ uri: "/v3/costs/{customerAccountId}/customers",
332
+ code: 200,
333
+ baseUrl: "https://cost.api.stackit.cloud",
334
+ }),
335
+ ),
336
+ ).annotate({ identifier: "ListCostsForResellerRequest" });
337
+ }
338
+ }
339
+ // Schema table: entry i is schema j of builder f, made on first reach.
340
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
341
+ return (__s[i] ??= __L.at(f, j));
342
+ }