@distilled.cloud/stackit 0.0.0-placeholder → 1.0.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +34 -0
- package/lib/credentials.d.ts +29 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +49 -0
- package/lib/credentials.js.map +1 -0
- package/lib/errors.d.ts +36 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +26 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +30 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +30 -0
- package/lib/index.js.map +1 -0
- package/lib/pagination.d.ts +9 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +48 -0
- package/lib/pagination.js.map +1 -0
- package/lib/protocol.d.ts +32 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +148 -0
- package/lib/protocol.js.map +1 -0
- package/lib/response-validation.test.d.ts +4 -0
- package/lib/response-validation.test.d.ts.map +1 -0
- package/lib/response-validation.test.js +31 -0
- package/lib/response-validation.test.js.map +1 -0
- package/lib/retry.d.ts +31 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +31 -0
- package/lib/retry.js.map +1 -0
- package/lib/services/alb.d.ts +603 -0
- package/lib/services/alb.d.ts.map +1 -0
- package/lib/services/alb.js +562 -0
- package/lib/services/alb.js.map +1 -0
- package/lib/services/alb_waf.d.ts +526 -0
- package/lib/services/alb_waf.d.ts.map +1 -0
- package/lib/services/alb_waf.js +545 -0
- package/lib/services/alb_waf.js.map +1 -0
- package/lib/services/authorization.d.ts +251 -0
- package/lib/services/authorization.d.ts.map +1 -0
- package/lib/services/authorization.js +353 -0
- package/lib/services/authorization.js.map +1 -0
- package/lib/services/automation.d.ts +358 -0
- package/lib/services/automation.d.ts.map +1 -0
- package/lib/services/automation.js +426 -0
- package/lib/services/automation.js.map +1 -0
- package/lib/services/cdn.d.ts +1239 -0
- package/lib/services/cdn.d.ts.map +1 -0
- package/lib/services/cdn.js +992 -0
- package/lib/services/cdn.js.map +1 -0
- package/lib/services/certificates.d.ts +201 -0
- package/lib/services/certificates.d.ts.map +1 -0
- package/lib/services/certificates.js +197 -0
- package/lib/services/certificates.js.map +1 -0
- package/lib/services/cost.d.ts +222 -0
- package/lib/services/cost.d.ts.map +1 -0
- package/lib/services/cost.js +188 -0
- package/lib/services/cost.js.map +1 -0
- package/lib/services/dns.d.ts +875 -0
- package/lib/services/dns.d.ts.map +1 -0
- package/lib/services/dns.js +854 -0
- package/lib/services/dns.js.map +1 -0
- package/lib/services/dremio.d.ts +358 -0
- package/lib/services/dremio.d.ts.map +1 -0
- package/lib/services/dremio.js +339 -0
- package/lib/services/dremio.js.map +1 -0
- package/lib/services/edge.d.ts +312 -0
- package/lib/services/edge.d.ts.map +1 -0
- package/lib/services/edge.js +375 -0
- package/lib/services/edge.js.map +1 -0
- package/lib/services/functions.d.ts +409 -0
- package/lib/services/functions.d.ts.map +1 -0
- package/lib/services/functions.js +423 -0
- package/lib/services/functions.js.map +1 -0
- package/lib/services/git.d.ts +497 -0
- package/lib/services/git.d.ts.map +1 -0
- package/lib/services/git.js +552 -0
- package/lib/services/git.js.map +1 -0
- package/lib/services/iaas.d.ts +2965 -0
- package/lib/services/iaas.d.ts.map +1 -0
- package/lib/services/iaas.js +3768 -0
- package/lib/services/iaas.js.map +1 -0
- package/lib/services/index.d.ts +51 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +52 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/intake.d.ts +555 -0
- package/lib/services/intake.d.ts.map +1 -0
- package/lib/services/intake.js +513 -0
- package/lib/services/intake.js.map +1 -0
- package/lib/services/kms.d.ts +654 -0
- package/lib/services/kms.d.ts.map +1 -0
- package/lib/services/kms.js +703 -0
- package/lib/services/kms.js.map +1 -0
- package/lib/services/lb_ip_lists.d.ts +162 -0
- package/lib/services/lb_ip_lists.d.ts.map +1 -0
- package/lib/services/lb_ip_lists.js +173 -0
- package/lib/services/lb_ip_lists.js.map +1 -0
- package/lib/services/load_balancer.d.ts +563 -0
- package/lib/services/load_balancer.d.ts.map +1 -0
- package/lib/services/load_balancer.js +542 -0
- package/lib/services/load_balancer.js.map +1 -0
- package/lib/services/logme.d.ts +516 -0
- package/lib/services/logme.d.ts.map +1 -0
- package/lib/services/logme.js +636 -0
- package/lib/services/logme.js.map +1 -0
- package/lib/services/logs.d.ts +436 -0
- package/lib/services/logs.d.ts.map +1 -0
- package/lib/services/logs.js +498 -0
- package/lib/services/logs.js.map +1 -0
- package/lib/services/mariadb.d.ts +479 -0
- package/lib/services/mariadb.d.ts.map +1 -0
- package/lib/services/mariadb.js +611 -0
- package/lib/services/mariadb.js.map +1 -0
- package/lib/services/model_experiments.d.ts +306 -0
- package/lib/services/model_experiments.d.ts.map +1 -0
- package/lib/services/model_experiments.js +356 -0
- package/lib/services/model_experiments.js.map +1 -0
- package/lib/services/model_serving.d.ts +289 -0
- package/lib/services/model_serving.d.ts.map +1 -0
- package/lib/services/model_serving.js +319 -0
- package/lib/services/model_serving.js.map +1 -0
- package/lib/services/mongodb_flex.d.ts +826 -0
- package/lib/services/mongodb_flex.d.ts.map +1 -0
- package/lib/services/mongodb_flex.js +889 -0
- package/lib/services/mongodb_flex.js.map +1 -0
- package/lib/services/object_storage.d.ts +446 -0
- package/lib/services/object_storage.d.ts.map +1 -0
- package/lib/services/object_storage.js +577 -0
- package/lib/services/object_storage.js.map +1 -0
- package/lib/services/observability.d.ts +2750 -0
- package/lib/services/observability.d.ts.map +1 -0
- package/lib/services/observability.js +3407 -0
- package/lib/services/observability.js.map +1 -0
- package/lib/services/opensearch.d.ts +505 -0
- package/lib/services/opensearch.d.ts.map +1 -0
- package/lib/services/opensearch.js +623 -0
- package/lib/services/opensearch.js.map +1 -0
- package/lib/services/pim.d.ts +997 -0
- package/lib/services/pim.d.ts.map +1 -0
- package/lib/services/pim.js +789 -0
- package/lib/services/pim.js.map +1 -0
- package/lib/services/postgres_flex.d.ts +854 -0
- package/lib/services/postgres_flex.d.ts.map +1 -0
- package/lib/services/postgres_flex.js +1018 -0
- package/lib/services/postgres_flex.js.map +1 -0
- package/lib/services/pubsub.d.ts +489 -0
- package/lib/services/pubsub.d.ts.map +1 -0
- package/lib/services/pubsub.js +614 -0
- package/lib/services/pubsub.js.map +1 -0
- package/lib/services/rabbitmq.d.ts +523 -0
- package/lib/services/rabbitmq.d.ts.map +1 -0
- package/lib/services/rabbitmq.js +636 -0
- package/lib/services/rabbitmq.js.map +1 -0
- package/lib/services/registry.d.ts +212 -0
- package/lib/services/registry.d.ts.map +1 -0
- package/lib/services/registry.js +221 -0
- package/lib/services/registry.js.map +1 -0
- package/lib/services/resource_manager.d.ts +458 -0
- package/lib/services/resource_manager.d.ts.map +1 -0
- package/lib/services/resource_manager.js +503 -0
- package/lib/services/resource_manager.js.map +1 -0
- package/lib/services/run_command.d.ts +175 -0
- package/lib/services/run_command.d.ts.map +1 -0
- package/lib/services/run_command.js +203 -0
- package/lib/services/run_command.js.map +1 -0
- package/lib/services/sca.d.ts +541 -0
- package/lib/services/sca.d.ts.map +1 -0
- package/lib/services/sca.js +478 -0
- package/lib/services/sca.js.map +1 -0
- package/lib/services/scf.d.ts +498 -0
- package/lib/services/scf.d.ts.map +1 -0
- package/lib/services/scf.js +718 -0
- package/lib/services/scf.js.map +1 -0
- package/lib/services/secrets_manager.d.ts +505 -0
- package/lib/services/secrets_manager.d.ts.map +1 -0
- package/lib/services/secrets_manager.js +659 -0
- package/lib/services/secrets_manager.js.map +1 -0
- package/lib/services/server_backup.d.ts +380 -0
- package/lib/services/server_backup.d.ts.map +1 -0
- package/lib/services/server_backup.js +474 -0
- package/lib/services/server_backup.js.map +1 -0
- package/lib/services/server_update.d.ts +292 -0
- package/lib/services/server_update.d.ts.map +1 -0
- package/lib/services/server_update.js +364 -0
- package/lib/services/server_update.js.map +1 -0
- package/lib/services/service_account.d.ts +465 -0
- package/lib/services/service_account.d.ts.map +1 -0
- package/lib/services/service_account.js +523 -0
- package/lib/services/service_account.js.map +1 -0
- package/lib/services/service_enablement.d.ts +149 -0
- package/lib/services/service_enablement.d.ts.map +1 -0
- package/lib/services/service_enablement.js +159 -0
- package/lib/services/service_enablement.js.map +1 -0
- package/lib/services/sfs.d.ts +721 -0
- package/lib/services/sfs.d.ts.map +1 -0
- package/lib/services/sfs.js +845 -0
- package/lib/services/sfs.js.map +1 -0
- package/lib/services/ske.d.ts +536 -0
- package/lib/services/ske.d.ts.map +1 -0
- package/lib/services/ske.js +598 -0
- package/lib/services/ske.js.map +1 -0
- package/lib/services/sqlserverflex.d.ts +956 -0
- package/lib/services/sqlserverflex.d.ts.map +1 -0
- package/lib/services/sqlserverflex.js +1087 -0
- package/lib/services/sqlserverflex.js.map +1 -0
- package/lib/services/stackit_marketplace.d.ts +288 -0
- package/lib/services/stackit_marketplace.d.ts.map +1 -0
- package/lib/services/stackit_marketplace.js +393 -0
- package/lib/services/stackit_marketplace.js.map +1 -0
- package/lib/services/telemetry_link.d.ts +443 -0
- package/lib/services/telemetry_link.d.ts.map +1 -0
- package/lib/services/telemetry_link.js +550 -0
- package/lib/services/telemetry_link.js.map +1 -0
- package/lib/services/telemetry_router.d.ts +493 -0
- package/lib/services/telemetry_router.d.ts.map +1 -0
- package/lib/services/telemetry_router.js +523 -0
- package/lib/services/telemetry_router.js.map +1 -0
- package/lib/services/ufw.d.ts +295 -0
- package/lib/services/ufw.d.ts.map +1 -0
- package/lib/services/ufw.js +301 -0
- package/lib/services/ufw.js.map +1 -0
- package/lib/services/valkey.d.ts +505 -0
- package/lib/services/valkey.d.ts.map +1 -0
- package/lib/services/valkey.js +627 -0
- package/lib/services/valkey.js.map +1 -0
- package/lib/services/vpn.d.ts +1024 -0
- package/lib/services/vpn.d.ts.map +1 -0
- package/lib/services/vpn.js +1013 -0
- package/lib/services/vpn.js.map +1 -0
- package/lib/services/workflows.d.ts +600 -0
- package/lib/services/workflows.d.ts.map +1 -0
- package/lib/services/workflows.js +556 -0
- package/lib/services/workflows.js.map +1 -0
- package/lib/traits.d.ts +24 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +15 -0
- package/lib/traits.js.map +1 -0
- package/package.json +78 -7
- package/src/credentials.ts +90 -0
- package/src/errors.ts +50 -0
- package/src/index.ts +34 -0
- package/src/pagination.ts +73 -0
- package/src/protocol.ts +243 -0
- package/src/response-validation.test.ts +45 -0
- package/src/retry.ts +53 -0
- package/src/services/alb.ts +1409 -0
- package/src/services/alb_waf.ts +1347 -0
- package/src/services/authorization.ts +740 -0
- package/src/services/automation.ts +966 -0
- package/src/services/cdn.ts +2736 -0
- package/src/services/certificates.ts +450 -0
- package/src/services/cost.ts +484 -0
- package/src/services/dns.ts +2271 -0
- package/src/services/dremio.ts +803 -0
- package/src/services/edge.ts +839 -0
- package/src/services/functions.ts +1010 -0
- package/src/services/git.ts +1275 -0
- package/src/services/iaas.ts +8670 -0
- package/src/services/index.ts +51 -0
- package/src/services/intake.ts +1233 -0
- package/src/services/kms.ts +1638 -0
- package/src/services/lb_ip_lists.ts +377 -0
- package/src/services/load_balancer.ts +1342 -0
- package/src/services/logme.ts +1379 -0
- package/src/services/logs.ts +1150 -0
- package/src/services/mariadb.ts +1293 -0
- package/src/services/model_experiments.ts +797 -0
- package/src/services/model_serving.ts +697 -0
- package/src/services/mongodb_flex.ts +2078 -0
- package/src/services/object_storage.ts +1248 -0
- package/src/services/observability.ts +7856 -0
- package/src/services/opensearch.ts +1354 -0
- package/src/services/pim.ts +2090 -0
- package/src/services/postgres_flex.ts +2326 -0
- package/src/services/pubsub.ts +1336 -0
- package/src/services/rabbitmq.ts +1402 -0
- package/src/services/registry.ts +494 -0
- package/src/services/resource_manager.ts +1155 -0
- package/src/services/run_command.ts +441 -0
- package/src/services/sca.ts +1222 -0
- package/src/services/scf.ts +1537 -0
- package/src/services/secrets_manager.ts +1399 -0
- package/src/services/server_backup.ts +1032 -0
- package/src/services/server_update.ts +767 -0
- package/src/services/service_account.ts +1208 -0
- package/src/services/service_enablement.ts +359 -0
- package/src/services/sfs.ts +1913 -0
- package/src/services/ske.ts +1408 -0
- package/src/services/sqlserverflex.ts +2543 -0
- package/src/services/stackit_marketplace.ts +853 -0
- package/src/services/telemetry_link.ts +1245 -0
- package/src/services/telemetry_router.ts +1205 -0
- package/src/services/ufw.ts +704 -0
- package/src/services/valkey.ts +1357 -0
- package/src/services/vpn.ts +2554 -0
- package/src/services/workflows.ts +1361 -0
- package/src/traits.ts +65 -0
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-stackit). Do not edit.
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as C from "@distilled.cloud/core/category";
|
|
5
|
+
import * as T from "../traits.ts";
|
|
6
|
+
import {
|
|
7
|
+
StackitProtocol,
|
|
8
|
+
type StackitOpError,
|
|
9
|
+
type StackitOpContext,
|
|
10
|
+
} from "../protocol.ts";
|
|
11
|
+
import { UnknownStackitError } from "../errors.ts";
|
|
12
|
+
import * as Retry from "../retry.ts";
|
|
13
|
+
|
|
14
|
+
export type { StackitOpError, StackitOpContext };
|
|
15
|
+
|
|
16
|
+
export class BadRequest
|
|
17
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
18
|
+
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
19
|
+
code: S.Number,
|
|
20
|
+
message: S.String,
|
|
21
|
+
}).pipe(C.withBadRequestError),
|
|
22
|
+
[{ status: 400 }],
|
|
23
|
+
) {}
|
|
24
|
+
|
|
25
|
+
export class Forbidden
|
|
26
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
27
|
+
/*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
|
|
28
|
+
code: S.Number,
|
|
29
|
+
message: S.String,
|
|
30
|
+
}).pipe(C.withAuthError),
|
|
31
|
+
[{ status: 403 }],
|
|
32
|
+
) {}
|
|
33
|
+
|
|
34
|
+
export class NotFound
|
|
35
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
36
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
37
|
+
code: S.Number,
|
|
38
|
+
message: S.String,
|
|
39
|
+
}).pipe(C.withBadRequestError),
|
|
40
|
+
[{ status: 404 }],
|
|
41
|
+
) {}
|
|
42
|
+
|
|
43
|
+
export type GetCostsForProjectRequestDepth = "project" | "service" | "auto";
|
|
44
|
+
export const GetCostsForProjectRequestDepth = /*@__PURE__*/ S.String;
|
|
45
|
+
|
|
46
|
+
export type GetCostsForProjectRequestGranularity =
|
|
47
|
+
| "daily"
|
|
48
|
+
| "weekly"
|
|
49
|
+
| "monthly"
|
|
50
|
+
| "yearly"
|
|
51
|
+
| "none";
|
|
52
|
+
export const GetCostsForProjectRequestGranularity = /*@__PURE__*/ S.String;
|
|
53
|
+
|
|
54
|
+
export interface GetCostsForProjectRequest {
|
|
55
|
+
/** ID of a customer account */
|
|
56
|
+
customerAccountId: string;
|
|
57
|
+
/** ID of a project */
|
|
58
|
+
projectId: string;
|
|
59
|
+
/** Inclusive start date of the selection range. Internally, usages are recorded in UTC. This means all usages starting on and after 00:00:00 UTC on the specified date are included. */
|
|
60
|
+
from: string;
|
|
61
|
+
/** Inclusive end date of the selection range. Internally, usages are recorded in UTC. This means all usages starting up to and including 23:59:59 UTC on the specified date are included. */
|
|
62
|
+
to: string;
|
|
63
|
+
/** Depth of desired cost information. "project" provides costs grouped by project, without services. "service" provides costs separated on service level. */
|
|
64
|
+
depth?: GetCostsForProjectRequestDepth | (string & {});
|
|
65
|
+
/** 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. */
|
|
66
|
+
granularity?: GetCostsForProjectRequestGranularity | (string & {});
|
|
67
|
+
/** Whether costs of 0 should be included in the response */
|
|
68
|
+
includeZeroCosts?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export const GetCostsForProjectRequest = /*@__PURE__*/ S.suspend(() =>
|
|
71
|
+
S.Struct({
|
|
72
|
+
customerAccountId: S.String.pipe(T.Label()),
|
|
73
|
+
projectId: S.String.pipe(T.Label()),
|
|
74
|
+
from: S.String.pipe(T.Query()),
|
|
75
|
+
to: S.String.pipe(T.Query()),
|
|
76
|
+
depth: S.optional(GetCostsForProjectRequestDepth.pipe(T.Query())),
|
|
77
|
+
granularity: S.optional(
|
|
78
|
+
GetCostsForProjectRequestGranularity.pipe(T.Query()),
|
|
79
|
+
),
|
|
80
|
+
includeZeroCosts: S.optional(S.Boolean.pipe(T.Query())),
|
|
81
|
+
}).pipe(
|
|
82
|
+
T.Http({
|
|
83
|
+
method: "GET",
|
|
84
|
+
uri: "/v3/costs/{customerAccountId}/projects/{projectId}",
|
|
85
|
+
code: 200,
|
|
86
|
+
baseUrl: "https://cost.api.stackit.cloud",
|
|
87
|
+
}),
|
|
88
|
+
),
|
|
89
|
+
).annotate({
|
|
90
|
+
identifier: "GetCostsForProjectRequest",
|
|
91
|
+
}) as any as S.Schema<GetCostsForProjectRequest>;
|
|
92
|
+
|
|
93
|
+
/** Summarized costs for a project */
|
|
94
|
+
export interface SummarizedProjectCost {
|
|
95
|
+
customerAccountId: string;
|
|
96
|
+
projectId: string;
|
|
97
|
+
projectName: string;
|
|
98
|
+
/** Total charge (including discounts) for all services and the whole requested date range (value in cents) */
|
|
99
|
+
totalCharge: number;
|
|
100
|
+
/** Total discount for all services and the whole requested date range (value in cents) */
|
|
101
|
+
totalDiscount: number;
|
|
102
|
+
}
|
|
103
|
+
export const SummarizedProjectCost = /*@__PURE__*/ S.suspend(() =>
|
|
104
|
+
S.Struct({
|
|
105
|
+
customerAccountId: S.String,
|
|
106
|
+
projectId: S.String,
|
|
107
|
+
projectName: S.String,
|
|
108
|
+
totalCharge: S.Number,
|
|
109
|
+
totalDiscount: S.Number,
|
|
110
|
+
}),
|
|
111
|
+
).annotate({
|
|
112
|
+
identifier: "SummarizedProjectCost",
|
|
113
|
+
}) as any as S.Schema<SummarizedProjectCost>;
|
|
114
|
+
|
|
115
|
+
/** Time period according to desired granularity */
|
|
116
|
+
export interface ReportDataTimePeriod {
|
|
117
|
+
end?: string;
|
|
118
|
+
start?: string;
|
|
119
|
+
}
|
|
120
|
+
export const ReportDataTimePeriod = /*@__PURE__*/ S.suspend(() =>
|
|
121
|
+
S.Struct({
|
|
122
|
+
end: S.optional(S.String),
|
|
123
|
+
start: S.optional(S.String),
|
|
124
|
+
}),
|
|
125
|
+
).annotate({
|
|
126
|
+
identifier: "ReportDataTimePeriod",
|
|
127
|
+
}) as any as S.Schema<ReportDataTimePeriod>;
|
|
128
|
+
|
|
129
|
+
/** Costs report for a certain period of time */
|
|
130
|
+
export interface ReportData {
|
|
131
|
+
/** Charge, value in cents */
|
|
132
|
+
charge: number;
|
|
133
|
+
/** Discount, value in cents */
|
|
134
|
+
discount: number;
|
|
135
|
+
/** Quantity */
|
|
136
|
+
quantity: number;
|
|
137
|
+
/** Quantity in decimal format, returned as string to preserve precision. NOTE: This field will be removed in future versions and `totalQuantity` will become a decimal. */
|
|
138
|
+
quantityDecimal: string;
|
|
139
|
+
/** Time period according to desired granularity */
|
|
140
|
+
timePeriod: ReportDataTimePeriod;
|
|
141
|
+
}
|
|
142
|
+
export const ReportData = /*@__PURE__*/ S.suspend(() =>
|
|
143
|
+
S.Struct({
|
|
144
|
+
charge: S.Number,
|
|
145
|
+
discount: S.Number,
|
|
146
|
+
quantity: S.Number,
|
|
147
|
+
quantityDecimal: S.String,
|
|
148
|
+
timePeriod: ReportDataTimePeriod,
|
|
149
|
+
}),
|
|
150
|
+
).annotate({ identifier: "ReportData" }) as any as S.Schema<ReportData>;
|
|
151
|
+
|
|
152
|
+
/** Detailed project costs which are ONLY included if granularity is provided AND depth is "project" */
|
|
153
|
+
export type ProjectCostWithReportsReportDataList = Array<ReportData>;
|
|
154
|
+
export const ProjectCostWithReportsReportDataList = /*@__PURE__*/ S.Array(
|
|
155
|
+
ReportData,
|
|
156
|
+
) as any as S.Schema<ProjectCostWithReportsReportDataList>;
|
|
157
|
+
|
|
158
|
+
/** Detailed costs for a project */
|
|
159
|
+
export interface ProjectCostWithReports {
|
|
160
|
+
customerAccountId: string;
|
|
161
|
+
projectId: string;
|
|
162
|
+
projectName: string;
|
|
163
|
+
/** Detailed project costs which are ONLY included if granularity is provided AND depth is "project" */
|
|
164
|
+
reportData?: ProjectCostWithReportsReportDataList;
|
|
165
|
+
/** Total charge (including discounts) for all services and the whole requested date range (value in cents) */
|
|
166
|
+
totalCharge: number;
|
|
167
|
+
/** Total discount for all services and the whole requested date range (value in cents) */
|
|
168
|
+
totalDiscount: number;
|
|
169
|
+
}
|
|
170
|
+
export const ProjectCostWithReports = /*@__PURE__*/ S.suspend(() =>
|
|
171
|
+
S.Struct({
|
|
172
|
+
customerAccountId: S.String,
|
|
173
|
+
projectId: S.String,
|
|
174
|
+
projectName: S.String,
|
|
175
|
+
reportData: S.optional(ProjectCostWithReportsReportDataList),
|
|
176
|
+
totalCharge: S.Number,
|
|
177
|
+
totalDiscount: S.Number,
|
|
178
|
+
}),
|
|
179
|
+
).annotate({
|
|
180
|
+
identifier: "ProjectCostWithReports",
|
|
181
|
+
}) as any as S.Schema<ProjectCostWithReports>;
|
|
182
|
+
|
|
183
|
+
/** Summarized costs for a project */
|
|
184
|
+
export type SummarizedServiceCost = SummarizedProjectCost;
|
|
185
|
+
export const SummarizedServiceCost = SummarizedProjectCost;
|
|
186
|
+
|
|
187
|
+
/** Summarized service costs */
|
|
188
|
+
export type ProjectCostWithSummarizedServicesServicesList =
|
|
189
|
+
Array<SummarizedProjectCost>;
|
|
190
|
+
export const ProjectCostWithSummarizedServicesServicesList =
|
|
191
|
+
/*@__PURE__*/ S.Array(
|
|
192
|
+
SummarizedProjectCost,
|
|
193
|
+
) as any as S.Schema<ProjectCostWithSummarizedServicesServicesList>;
|
|
194
|
+
|
|
195
|
+
/** Costs for a project including summarized service costs */
|
|
196
|
+
export interface ProjectCostWithSummarizedServices {
|
|
197
|
+
customerAccountId: string;
|
|
198
|
+
projectId: string;
|
|
199
|
+
projectName: string;
|
|
200
|
+
/** Summarized service costs */
|
|
201
|
+
services?: ProjectCostWithSummarizedServicesServicesList;
|
|
202
|
+
/** Total charge (including discounts) for all services and the whole requested date range (value in cents) */
|
|
203
|
+
totalCharge: number;
|
|
204
|
+
/** Total discount for all services and the whole requested date range (value in cents) */
|
|
205
|
+
totalDiscount: number;
|
|
206
|
+
}
|
|
207
|
+
export const ProjectCostWithSummarizedServices = /*@__PURE__*/ S.suspend(() =>
|
|
208
|
+
S.Struct({
|
|
209
|
+
customerAccountId: S.String,
|
|
210
|
+
projectId: S.String,
|
|
211
|
+
projectName: S.String,
|
|
212
|
+
services: S.optional(ProjectCostWithSummarizedServicesServicesList),
|
|
213
|
+
totalCharge: S.Number,
|
|
214
|
+
totalDiscount: S.Number,
|
|
215
|
+
}),
|
|
216
|
+
).annotate({
|
|
217
|
+
identifier: "ProjectCostWithSummarizedServices",
|
|
218
|
+
}) as any as S.Schema<ProjectCostWithSummarizedServices>;
|
|
219
|
+
|
|
220
|
+
/** Detailed service costs which are ONLY included if granularity is provided */
|
|
221
|
+
export type DetailedServiceCostReportDataList = Array<ReportData>;
|
|
222
|
+
export const DetailedServiceCostReportDataList = /*@__PURE__*/ S.Array(
|
|
223
|
+
ReportData,
|
|
224
|
+
) as any as S.Schema<DetailedServiceCostReportDataList>;
|
|
225
|
+
|
|
226
|
+
/** Costs for a single service */
|
|
227
|
+
export interface DetailedServiceCost {
|
|
228
|
+
/** Detailed service costs which are ONLY included if granularity is provided */
|
|
229
|
+
reportData?: DetailedServiceCostReportDataList;
|
|
230
|
+
/** Service category name */
|
|
231
|
+
serviceCategoryName: string;
|
|
232
|
+
/** Name of the service */
|
|
233
|
+
serviceName: string;
|
|
234
|
+
/** Service key */
|
|
235
|
+
sku: string;
|
|
236
|
+
/** Total charge (including discounts) for all services and the whole requested date range (value in cents) */
|
|
237
|
+
totalCharge: number;
|
|
238
|
+
/** Total discount for all services and the whole requested date range (value in cents) */
|
|
239
|
+
totalDiscount: number;
|
|
240
|
+
/** Total quantity */
|
|
241
|
+
totalQuantity: number;
|
|
242
|
+
/** Total quantity in decimal format, returned as string to preserve precision. NOTE: This field will be removed in future versions and `totalQuantity` will become a decimal. */
|
|
243
|
+
totalQuantityDecimal: string;
|
|
244
|
+
/** Label for unit */
|
|
245
|
+
unitLabel: string;
|
|
246
|
+
}
|
|
247
|
+
export const DetailedServiceCost = /*@__PURE__*/ S.suspend(() =>
|
|
248
|
+
S.Struct({
|
|
249
|
+
reportData: S.optional(DetailedServiceCostReportDataList),
|
|
250
|
+
serviceCategoryName: S.String,
|
|
251
|
+
serviceName: S.String,
|
|
252
|
+
sku: S.String,
|
|
253
|
+
totalCharge: S.Number,
|
|
254
|
+
totalDiscount: S.Number,
|
|
255
|
+
totalQuantity: S.Number,
|
|
256
|
+
totalQuantityDecimal: S.String,
|
|
257
|
+
unitLabel: S.String,
|
|
258
|
+
}),
|
|
259
|
+
).annotate({
|
|
260
|
+
identifier: "DetailedServiceCost",
|
|
261
|
+
}) as any as S.Schema<DetailedServiceCost>;
|
|
262
|
+
|
|
263
|
+
/** Total discount for all services and the whole requested date range (value in cents). Please see "depth" parameter for more details. */
|
|
264
|
+
export type ProjectCostWithDetailedServicesServicesList =
|
|
265
|
+
Array<DetailedServiceCost>;
|
|
266
|
+
export const ProjectCostWithDetailedServicesServicesList =
|
|
267
|
+
/*@__PURE__*/ S.Array(
|
|
268
|
+
DetailedServiceCost,
|
|
269
|
+
) as any as S.Schema<ProjectCostWithDetailedServicesServicesList>;
|
|
270
|
+
|
|
271
|
+
/** Detailed costs for a project including service costs */
|
|
272
|
+
export interface ProjectCostWithDetailedServices {
|
|
273
|
+
customerAccountId: string;
|
|
274
|
+
projectId: string;
|
|
275
|
+
projectName: string;
|
|
276
|
+
/** Total discount for all services and the whole requested date range (value in cents). Please see "depth" parameter for more details. */
|
|
277
|
+
services?: ProjectCostWithDetailedServicesServicesList;
|
|
278
|
+
/** Total charge (including discounts) for all services and the whole requested date range (value in cents) */
|
|
279
|
+
totalCharge: number;
|
|
280
|
+
/** Total discount for all services and the whole requested date range (value in cents) */
|
|
281
|
+
totalDiscount: number;
|
|
282
|
+
}
|
|
283
|
+
export const ProjectCostWithDetailedServices = /*@__PURE__*/ S.suspend(() =>
|
|
284
|
+
S.Struct({
|
|
285
|
+
customerAccountId: S.String,
|
|
286
|
+
projectId: S.String,
|
|
287
|
+
projectName: S.String,
|
|
288
|
+
services: S.optional(ProjectCostWithDetailedServicesServicesList),
|
|
289
|
+
totalCharge: S.Number,
|
|
290
|
+
totalDiscount: S.Number,
|
|
291
|
+
}),
|
|
292
|
+
).annotate({
|
|
293
|
+
identifier: "ProjectCostWithDetailedServices",
|
|
294
|
+
}) as any as S.Schema<ProjectCostWithDetailedServices>;
|
|
295
|
+
|
|
296
|
+
export type ProjectCost =
|
|
297
|
+
| SummarizedProjectCost
|
|
298
|
+
| ProjectCostWithReports
|
|
299
|
+
| ProjectCostWithSummarizedServices
|
|
300
|
+
| ProjectCostWithDetailedServices;
|
|
301
|
+
export const ProjectCost =
|
|
302
|
+
/*@__PURE__*/ S.Unknown as any as S.Schema<ProjectCost>;
|
|
303
|
+
|
|
304
|
+
export type GetCostsForProjectResponse = ProjectCost;
|
|
305
|
+
export const GetCostsForProjectResponse = /*@__PURE__*/ S.suspend(() =>
|
|
306
|
+
ProjectCost.pipe(T.RawResponseRoot()),
|
|
307
|
+
).annotate({
|
|
308
|
+
identifier: "GetCostsForProjectResponse",
|
|
309
|
+
}) as any as S.Schema<GetCostsForProjectResponse>;
|
|
310
|
+
|
|
311
|
+
export type ListCostsForCustomerRequestDepth = "project" | "service" | "auto";
|
|
312
|
+
export const ListCostsForCustomerRequestDepth = /*@__PURE__*/ S.String;
|
|
313
|
+
|
|
314
|
+
export type ListCostsForCustomerRequestGranularity =
|
|
315
|
+
| "daily"
|
|
316
|
+
| "weekly"
|
|
317
|
+
| "monthly"
|
|
318
|
+
| "yearly"
|
|
319
|
+
| "none";
|
|
320
|
+
export const ListCostsForCustomerRequestGranularity = /*@__PURE__*/ S.String;
|
|
321
|
+
|
|
322
|
+
export interface ListCostsForCustomerRequest {
|
|
323
|
+
/** ID of a customer account */
|
|
324
|
+
customerAccountId: string;
|
|
325
|
+
/** Inclusive start date of the selection range. Internally, usages are recorded in UTC. This means all usages starting on and after 00:00:00 UTC on the specified date are included. */
|
|
326
|
+
from: string;
|
|
327
|
+
/** Inclusive end date of the selection range. Internally, usages are recorded in UTC. This means all usages starting up to and including 23:59:59 UTC on the specified date are included. */
|
|
328
|
+
to: string;
|
|
329
|
+
/** Depth of desired cost information. "project" provides costs grouped by project, without services. "service" provides costs separated on service level. */
|
|
330
|
+
depth?: ListCostsForCustomerRequestDepth | (string & {});
|
|
331
|
+
/** 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. */
|
|
332
|
+
granularity?: ListCostsForCustomerRequestGranularity | (string & {});
|
|
333
|
+
/** Whether costs of 0 should be included in the response */
|
|
334
|
+
includeZeroCosts?: boolean;
|
|
335
|
+
}
|
|
336
|
+
export const ListCostsForCustomerRequest = /*@__PURE__*/ S.suspend(() =>
|
|
337
|
+
S.Struct({
|
|
338
|
+
customerAccountId: S.String.pipe(T.Label()),
|
|
339
|
+
from: S.String.pipe(T.Query()),
|
|
340
|
+
to: S.String.pipe(T.Query()),
|
|
341
|
+
depth: S.optional(ListCostsForCustomerRequestDepth.pipe(T.Query())),
|
|
342
|
+
granularity: S.optional(
|
|
343
|
+
ListCostsForCustomerRequestGranularity.pipe(T.Query()),
|
|
344
|
+
),
|
|
345
|
+
includeZeroCosts: S.optional(S.Boolean.pipe(T.Query())),
|
|
346
|
+
}).pipe(
|
|
347
|
+
T.Http({
|
|
348
|
+
method: "GET",
|
|
349
|
+
uri: "/v3/costs/{customerAccountId}",
|
|
350
|
+
code: 200,
|
|
351
|
+
baseUrl: "https://cost.api.stackit.cloud",
|
|
352
|
+
}),
|
|
353
|
+
),
|
|
354
|
+
).annotate({
|
|
355
|
+
identifier: "ListCostsForCustomerRequest",
|
|
356
|
+
}) as any as S.Schema<ListCostsForCustomerRequest>;
|
|
357
|
+
|
|
358
|
+
export type ListCostsForCustomerResponseBodyList = Array<ProjectCost>;
|
|
359
|
+
export const ListCostsForCustomerResponseBodyList = /*@__PURE__*/ S.Array(
|
|
360
|
+
ProjectCost,
|
|
361
|
+
) as any as S.Schema<ListCostsForCustomerResponseBodyList>;
|
|
362
|
+
|
|
363
|
+
export type ListCostsForCustomerResponse = ListCostsForCustomerResponseBodyList;
|
|
364
|
+
export const ListCostsForCustomerResponse = /*@__PURE__*/ S.suspend(() =>
|
|
365
|
+
ListCostsForCustomerResponseBodyList.pipe(T.RawResponseRoot()),
|
|
366
|
+
).annotate({
|
|
367
|
+
identifier: "ListCostsForCustomerResponse",
|
|
368
|
+
}) as any as S.Schema<ListCostsForCustomerResponse>;
|
|
369
|
+
|
|
370
|
+
export type ListCostsForResellerRequestDepth = "project" | "service" | "auto";
|
|
371
|
+
export const ListCostsForResellerRequestDepth = /*@__PURE__*/ S.String;
|
|
372
|
+
|
|
373
|
+
export type ListCostsForResellerRequestGranularity =
|
|
374
|
+
| "daily"
|
|
375
|
+
| "weekly"
|
|
376
|
+
| "monthly"
|
|
377
|
+
| "yearly"
|
|
378
|
+
| "none";
|
|
379
|
+
export const ListCostsForResellerRequestGranularity = /*@__PURE__*/ S.String;
|
|
380
|
+
|
|
381
|
+
export interface ListCostsForResellerRequest {
|
|
382
|
+
/** ID of a customer account */
|
|
383
|
+
customerAccountId: string;
|
|
384
|
+
/** Inclusive start date of the selection range. Internally, usages are recorded in UTC. This means all usages starting on and after 00:00:00 UTC on the specified date are included. */
|
|
385
|
+
from: string;
|
|
386
|
+
/** Inclusive end date of the selection range. Internally, usages are recorded in UTC. This means all usages starting up to and including 23:59:59 UTC on the specified date are included. */
|
|
387
|
+
to: string;
|
|
388
|
+
/** Depth of desired cost information. "project" provides costs grouped by project, without services. "service" provides costs separated on service level. */
|
|
389
|
+
depth?: ListCostsForResellerRequestDepth | (string & {});
|
|
390
|
+
/** 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. */
|
|
391
|
+
granularity?: ListCostsForResellerRequestGranularity | (string & {});
|
|
392
|
+
/** Whether costs of 0 should be included in the response */
|
|
393
|
+
includeZeroCosts?: boolean;
|
|
394
|
+
}
|
|
395
|
+
export const ListCostsForResellerRequest = /*@__PURE__*/ S.suspend(() =>
|
|
396
|
+
S.Struct({
|
|
397
|
+
customerAccountId: S.String.pipe(T.Label()),
|
|
398
|
+
from: S.String.pipe(T.Query()),
|
|
399
|
+
to: S.String.pipe(T.Query()),
|
|
400
|
+
depth: S.optional(ListCostsForResellerRequestDepth.pipe(T.Query())),
|
|
401
|
+
granularity: S.optional(
|
|
402
|
+
ListCostsForResellerRequestGranularity.pipe(T.Query()),
|
|
403
|
+
),
|
|
404
|
+
includeZeroCosts: S.optional(S.Boolean.pipe(T.Query())),
|
|
405
|
+
}).pipe(
|
|
406
|
+
T.Http({
|
|
407
|
+
method: "GET",
|
|
408
|
+
uri: "/v3/costs/{customerAccountId}/customers",
|
|
409
|
+
code: 200,
|
|
410
|
+
baseUrl: "https://cost.api.stackit.cloud",
|
|
411
|
+
}),
|
|
412
|
+
),
|
|
413
|
+
).annotate({
|
|
414
|
+
identifier: "ListCostsForResellerRequest",
|
|
415
|
+
}) as any as S.Schema<ListCostsForResellerRequest>;
|
|
416
|
+
|
|
417
|
+
export type ListCostsForResellerResponseBodyList = Array<ProjectCost>;
|
|
418
|
+
export const ListCostsForResellerResponseBodyList = /*@__PURE__*/ S.Array(
|
|
419
|
+
ProjectCost,
|
|
420
|
+
) as any as S.Schema<ListCostsForResellerResponseBodyList>;
|
|
421
|
+
|
|
422
|
+
export type ListCostsForResellerResponse = ListCostsForResellerResponseBodyList;
|
|
423
|
+
export const ListCostsForResellerResponse = /*@__PURE__*/ S.suspend(() =>
|
|
424
|
+
ListCostsForResellerResponseBodyList.pipe(T.RawResponseRoot()),
|
|
425
|
+
).annotate({
|
|
426
|
+
identifier: "ListCostsForResellerResponse",
|
|
427
|
+
}) as any as S.Schema<ListCostsForResellerResponse>;
|
|
428
|
+
|
|
429
|
+
export type GetCostsForProjectError =
|
|
430
|
+
| BadRequest
|
|
431
|
+
| Forbidden
|
|
432
|
+
| NotFound
|
|
433
|
+
| StackitOpError;
|
|
434
|
+
/** V3 Costs for a certain project Get costs for a certain project in a customer account */
|
|
435
|
+
export const getCostsForProject: API.OperationMethod<
|
|
436
|
+
GetCostsForProjectRequest,
|
|
437
|
+
GetCostsForProjectResponse,
|
|
438
|
+
GetCostsForProjectError,
|
|
439
|
+
StackitOpContext
|
|
440
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
441
|
+
input: GetCostsForProjectRequest,
|
|
442
|
+
output: GetCostsForProjectResponse,
|
|
443
|
+
errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
|
|
444
|
+
protocol: StackitProtocol,
|
|
445
|
+
retry: Retry.Retry,
|
|
446
|
+
}));
|
|
447
|
+
|
|
448
|
+
export type ListCostsForCustomerError =
|
|
449
|
+
| BadRequest
|
|
450
|
+
| Forbidden
|
|
451
|
+
| NotFound
|
|
452
|
+
| StackitOpError;
|
|
453
|
+
/** V3 Costs for all projects Get costs for all projects in a customer account */
|
|
454
|
+
export const listCostsForCustomer: API.OperationMethod<
|
|
455
|
+
ListCostsForCustomerRequest,
|
|
456
|
+
ListCostsForCustomerResponse,
|
|
457
|
+
ListCostsForCustomerError,
|
|
458
|
+
StackitOpContext
|
|
459
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
460
|
+
input: ListCostsForCustomerRequest,
|
|
461
|
+
output: ListCostsForCustomerResponse,
|
|
462
|
+
errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
|
|
463
|
+
protocol: StackitProtocol,
|
|
464
|
+
retry: Retry.Retry,
|
|
465
|
+
}));
|
|
466
|
+
|
|
467
|
+
export type ListCostsForResellerError =
|
|
468
|
+
| BadRequest
|
|
469
|
+
| Forbidden
|
|
470
|
+
| NotFound
|
|
471
|
+
| StackitOpError;
|
|
472
|
+
/** V3 Costs for all projects of all related sub-customers Get costs for all projects of all related sub-customer accounts */
|
|
473
|
+
export const listCostsForReseller: API.OperationMethod<
|
|
474
|
+
ListCostsForResellerRequest,
|
|
475
|
+
ListCostsForResellerResponse,
|
|
476
|
+
ListCostsForResellerError,
|
|
477
|
+
StackitOpContext
|
|
478
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
479
|
+
input: ListCostsForResellerRequest,
|
|
480
|
+
output: ListCostsForResellerResponse,
|
|
481
|
+
errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
|
|
482
|
+
protocol: StackitProtocol,
|
|
483
|
+
retry: Retry.Retry,
|
|
484
|
+
}));
|