@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.
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +1 -49
- package/lib/errors.d.ts +13 -13
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -26
- package/lib/index.d.ts +2 -2
- package/lib/index.js +1 -24
- package/lib/index.lazy.js +7 -0
- package/lib/pagination.d.ts +1 -1
- package/lib/pagination.js +1 -45
- package/lib/protocol.d.ts +3 -3
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +1 -147
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -31
- package/lib/services/alb.d.ts +10 -87
- package/lib/services/alb.d.ts.map +1 -1
- package/lib/services/alb.js +28 -512
- package/lib/services/alb.js.map +1 -1
- package/lib/services/alb_waf.d.ts +9 -82
- package/lib/services/alb_waf.d.ts.map +1 -1
- package/lib/services/alb_waf.js +33 -520
- package/lib/services/alb_waf.js.map +1 -1
- package/lib/services/authorization.d.ts +5 -47
- package/lib/services/authorization.d.ts.map +1 -1
- package/lib/services/authorization.js +1 -322
- package/lib/services/authorization.js.map +1 -1
- package/lib/services/automation.d.ts +7 -47
- package/lib/services/automation.d.ts.map +1 -1
- package/lib/services/automation.js +1 -362
- package/lib/services/automation.js.map +1 -1
- package/lib/services/cdn.d.ts +8 -220
- package/lib/services/cdn.d.ts.map +1 -1
- package/lib/services/cdn.js +31 -905
- package/lib/services/cdn.js.map +1 -1
- package/lib/services/certificates.d.ts +8 -27
- package/lib/services/certificates.d.ts.map +1 -1
- package/lib/services/certificates.js +1 -178
- package/lib/services/certificates.js.map +1 -1
- package/lib/services/cost.d.ts +10 -37
- package/lib/services/cost.d.ts.map +1 -1
- package/lib/services/cost.js +1 -176
- package/lib/services/cost.js.map +1 -1
- package/lib/services/dns.d.ts +9 -104
- package/lib/services/dns.d.ts.map +1 -1
- package/lib/services/dns.js +40 -725
- package/lib/services/dns.js.map +1 -1
- package/lib/services/dremio.d.ts +8 -50
- package/lib/services/dremio.d.ts.map +1 -1
- package/lib/services/dremio.js +1 -316
- package/lib/services/dremio.js.map +1 -1
- package/lib/services/edge.d.ts +7 -40
- package/lib/services/edge.d.ts.map +1 -1
- package/lib/services/edge.js +1 -356
- package/lib/services/edge.js.map +1 -1
- package/lib/services/functions.d.ts +1 -48
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +1 -398
- package/lib/services/functions.js.map +1 -1
- package/lib/services/git.d.ts +8 -61
- package/lib/services/git.d.ts.map +1 -1
- package/lib/services/git.js +35 -519
- package/lib/services/git.js.map +1 -1
- package/lib/services/iaas.d.ts +9 -337
- package/lib/services/iaas.d.ts.map +1 -1
- package/lib/services/iaas.js +181 -3542
- package/lib/services/iaas.js.map +1 -1
- package/lib/services/index.js +0 -2
- package/lib/services/intake.d.ts +8 -75
- package/lib/services/intake.d.ts.map +1 -1
- package/lib/services/intake.js +29 -474
- package/lib/services/intake.js.map +1 -1
- package/lib/services/kms.d.ts +9 -92
- package/lib/services/kms.d.ts.map +1 -1
- package/lib/services/kms.js +41 -662
- package/lib/services/kms.js.map +1 -1
- package/lib/services/lb_ip_lists.d.ts +9 -25
- package/lib/services/lb_ip_lists.d.ts.map +1 -1
- package/lib/services/lb_ip_lists.js +1 -153
- package/lib/services/lb_ip_lists.js.map +1 -1
- package/lib/services/load_balancer.d.ts +10 -81
- package/lib/services/load_balancer.d.ts.map +1 -1
- package/lib/services/load_balancer.js +29 -496
- package/lib/services/load_balancer.js.map +1 -1
- package/lib/services/logme.d.ts +8 -69
- package/lib/services/logme.d.ts.map +1 -1
- package/lib/services/logme.js +33 -573
- package/lib/services/logme.js.map +1 -1
- package/lib/services/logs.d.ts +8 -64
- package/lib/services/logs.d.ts.map +1 -1
- package/lib/services/logs.js +34 -474
- package/lib/services/logs.js.map +1 -1
- package/lib/services/mariadb.d.ts +8 -65
- package/lib/services/mariadb.d.ts.map +1 -1
- package/lib/services/mariadb.js +34 -550
- package/lib/services/mariadb.js.map +1 -1
- package/lib/services/model_experiments.d.ts +9 -48
- package/lib/services/model_experiments.d.ts.map +1 -1
- package/lib/services/model_experiments.js +1 -335
- package/lib/services/model_experiments.js.map +1 -1
- package/lib/services/model_serving.d.ts +7 -47
- package/lib/services/model_serving.d.ts.map +1 -1
- package/lib/services/model_serving.js +1 -286
- package/lib/services/model_serving.js.map +1 -1
- package/lib/services/mongodb_flex.d.ts +8 -137
- package/lib/services/mongodb_flex.d.ts.map +1 -1
- package/lib/services/mongodb_flex.js +42 -802
- package/lib/services/mongodb_flex.js.map +1 -1
- package/lib/services/object_storage.d.ts +12 -59
- package/lib/services/object_storage.d.ts.map +1 -1
- package/lib/services/object_storage.js +38 -539
- package/lib/services/object_storage.js.map +1 -1
- package/lib/services/observability.d.ts +8 -407
- package/lib/services/observability.d.ts.map +1 -1
- package/lib/services/observability.js +159 -3157
- package/lib/services/observability.js.map +1 -1
- package/lib/services/opensearch.d.ts +8 -71
- package/lib/services/opensearch.d.ts.map +1 -1
- package/lib/services/opensearch.js +34 -562
- package/lib/services/opensearch.js.map +1 -1
- package/lib/services/pim.d.ts +12 -108
- package/lib/services/pim.d.ts.map +1 -1
- package/lib/services/pim.js +31 -735
- package/lib/services/pim.js.map +1 -1
- package/lib/services/postgres_flex.d.ts +14 -136
- package/lib/services/postgres_flex.d.ts.map +1 -1
- package/lib/services/postgres_flex.js +47 -852
- package/lib/services/postgres_flex.js.map +1 -1
- package/lib/services/pubsub.d.ts +11 -73
- package/lib/services/pubsub.d.ts.map +1 -1
- package/lib/services/pubsub.js +37 -518
- package/lib/services/pubsub.js.map +1 -1
- package/lib/services/rabbitmq.d.ts +8 -76
- package/lib/services/rabbitmq.d.ts.map +1 -1
- package/lib/services/rabbitmq.js +35 -573
- package/lib/services/rabbitmq.js.map +1 -1
- package/lib/services/registry.d.ts +10 -28
- package/lib/services/registry.d.ts.map +1 -1
- package/lib/services/registry.js +1 -197
- package/lib/services/registry.js.map +1 -1
- package/lib/services/resource_manager.d.ts +9 -61
- package/lib/services/resource_manager.d.ts.map +1 -1
- package/lib/services/resource_manager.js +36 -472
- package/lib/services/resource_manager.js.map +1 -1
- package/lib/services/run_command.d.ts +5 -28
- package/lib/services/run_command.d.ts.map +1 -1
- package/lib/services/run_command.js +1 -184
- package/lib/services/run_command.js.map +1 -1
- package/lib/services/sca.d.ts +8 -79
- package/lib/services/sca.d.ts.map +1 -1
- package/lib/services/sca.js +25 -444
- package/lib/services/sca.js.map +1 -1
- package/lib/services/scf.d.ts +8 -64
- package/lib/services/scf.d.ts.map +1 -1
- package/lib/services/scf.js +40 -669
- package/lib/services/scf.js.map +1 -1
- package/lib/services/secrets_manager.d.ts +8 -61
- package/lib/services/secrets_manager.d.ts.map +1 -1
- package/lib/services/secrets_manager.js +42 -612
- package/lib/services/secrets_manager.js.map +1 -1
- package/lib/services/server_backup.d.ts +7 -50
- package/lib/services/server_backup.d.ts.map +1 -1
- package/lib/services/server_backup.js +29 -453
- package/lib/services/server_backup.js.map +1 -1
- package/lib/services/server_update.d.ts +7 -35
- package/lib/services/server_update.d.ts.map +1 -1
- package/lib/services/server_update.js +1 -351
- package/lib/services/server_update.js.map +1 -1
- package/lib/services/service_account.d.ts +10 -68
- package/lib/services/service_account.d.ts.map +1 -1
- package/lib/services/service_account.js +30 -505
- package/lib/services/service_account.js.map +1 -1
- package/lib/services/service_enablement.d.ts +7 -29
- package/lib/services/service_enablement.d.ts.map +1 -1
- package/lib/services/service_enablement.js +1 -156
- package/lib/services/service_enablement.js.map +1 -1
- package/lib/services/sfs.d.ts +4 -96
- package/lib/services/sfs.d.ts.map +1 -1
- package/lib/services/sfs.js +46 -789
- package/lib/services/sfs.js.map +1 -1
- package/lib/services/ske.d.ts +9 -108
- package/lib/services/ske.d.ts.map +1 -1
- package/lib/services/ske.js +26 -557
- package/lib/services/ske.js.map +1 -1
- package/lib/services/sqlserverflex.d.ts +11 -152
- package/lib/services/sqlserverflex.d.ts.map +1 -1
- package/lib/services/sqlserverflex.js +46 -935
- package/lib/services/sqlserverflex.js.map +1 -1
- package/lib/services/stackit_marketplace.d.ts +9 -38
- package/lib/services/stackit_marketplace.d.ts.map +1 -1
- package/lib/services/stackit_marketplace.js +26 -378
- package/lib/services/stackit_marketplace.js.map +1 -1
- package/lib/services/telemetry_link.d.ts +8 -61
- package/lib/services/telemetry_link.d.ts.map +1 -1
- package/lib/services/telemetry_link.js +34 -531
- package/lib/services/telemetry_link.js.map +1 -1
- package/lib/services/telemetry_router.d.ts +8 -72
- package/lib/services/telemetry_router.d.ts.map +1 -1
- package/lib/services/telemetry_router.js +29 -483
- package/lib/services/telemetry_router.js.map +1 -1
- package/lib/services/ufw.d.ts +7 -42
- package/lib/services/ufw.d.ts.map +1 -1
- package/lib/services/ufw.js +1 -278
- package/lib/services/ufw.js.map +1 -1
- package/lib/services/valkey.d.ts +8 -68
- package/lib/services/valkey.d.ts.map +1 -1
- package/lib/services/valkey.js +34 -566
- package/lib/services/valkey.js.map +1 -1
- package/lib/services/vpn.d.ts +21 -186
- package/lib/services/vpn.d.ts.map +1 -1
- package/lib/services/vpn.js +43 -930
- package/lib/services/vpn.js.map +1 -1
- package/lib/services/workflows.d.ts +15 -84
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +27 -507
- package/lib/services/workflows.js.map +1 -1
- package/lib/services.lazy/alb.js +4 -0
- package/lib/services.lazy/alb_waf.js +4 -0
- package/lib/services.lazy/authorization.js +1 -0
- package/lib/services.lazy/automation.js +1 -0
- package/lib/services.lazy/cdn.js +4 -0
- package/lib/services.lazy/certificates.js +1 -0
- package/lib/services.lazy/cost.js +1 -0
- package/lib/services.lazy/dns.js +4 -0
- package/lib/services.lazy/dremio.js +1 -0
- package/lib/services.lazy/edge.js +1 -0
- package/lib/services.lazy/functions.js +1 -0
- package/lib/services.lazy/git.js +4 -0
- package/lib/services.lazy/iaas.js +4 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/intake.js +4 -0
- package/lib/services.lazy/kms.js +4 -0
- package/lib/services.lazy/lb_ip_lists.js +1 -0
- package/lib/services.lazy/load_balancer.js +4 -0
- package/lib/services.lazy/logme.js +4 -0
- package/lib/services.lazy/logs.js +4 -0
- package/lib/services.lazy/mariadb.js +4 -0
- package/lib/services.lazy/model_experiments.js +1 -0
- package/lib/services.lazy/model_serving.js +1 -0
- package/lib/services.lazy/mongodb_flex.js +4 -0
- package/lib/services.lazy/object_storage.js +4 -0
- package/lib/services.lazy/observability.js +4 -0
- package/lib/services.lazy/opensearch.js +4 -0
- package/lib/services.lazy/pim.js +4 -0
- package/lib/services.lazy/postgres_flex.js +4 -0
- package/lib/services.lazy/pubsub.js +4 -0
- package/lib/services.lazy/rabbitmq.js +4 -0
- package/lib/services.lazy/registry.js +1 -0
- package/lib/services.lazy/resource_manager.js +4 -0
- package/lib/services.lazy/run_command.js +1 -0
- package/lib/services.lazy/sca.js +4 -0
- package/lib/services.lazy/scf.js +4 -0
- package/lib/services.lazy/secrets_manager.js +4 -0
- package/lib/services.lazy/server_backup.js +4 -0
- package/lib/services.lazy/server_update.js +1 -0
- package/lib/services.lazy/service_account.js +4 -0
- package/lib/services.lazy/service_enablement.js +1 -0
- package/lib/services.lazy/sfs.js +4 -0
- package/lib/services.lazy/ske.js +4 -0
- package/lib/services.lazy/sqlserverflex.js +4 -0
- package/lib/services.lazy/stackit_marketplace.js +4 -0
- package/lib/services.lazy/telemetry_link.js +4 -0
- package/lib/services.lazy/telemetry_router.js +4 -0
- package/lib/services.lazy/ufw.js +1 -0
- package/lib/services.lazy/valkey.js +4 -0
- package/lib/services.lazy/vpn.js +4 -0
- package/lib/services.lazy/workflows.js +4 -0
- package/lib/traits.d.ts +1 -1
- package/lib/traits.js +1 -15
- package/package.json +9 -7
- package/src/credentials.ts +21 -18
- package/src/errors.ts +10 -14
- package/src/index.ts +2 -2
- package/src/pagination.ts +2 -2
- package/src/protocol.ts +12 -9
- package/src/retry.ts +6 -4
- package/src/services/alb.ts +599 -655
- package/src/services/alb_waf.ts +597 -637
- package/src/services/authorization.ts +400 -383
- package/src/services/automation.ts +422 -405
- package/src/services/cdn.ts +817 -1375
- package/src/services/certificates.ts +209 -190
- package/src/services/cost.ts +100 -207
- package/src/services/dns.ts +793 -833
- package/src/services/dremio.ts +356 -349
- package/src/services/edge.ts +406 -366
- package/src/services/functions.ts +465 -463
- package/src/services/git.ts +602 -547
- package/src/services/iaas.ts +3931 -3821
- package/src/services/intake.ts +521 -549
- package/src/services/kms.ts +715 -692
- package/src/services/lb_ip_lists.ts +173 -152
- package/src/services/load_balancer.ts +576 -619
- package/src/services/logme.ts +696 -641
- package/src/services/logs.ts +510 -493
- package/src/services/mariadb.ts +671 -604
- package/src/services/model_experiments.ts +343 -356
- package/src/services/model_serving.ts +337 -328
- package/src/services/mongodb_flex.ts +955 -1007
- package/src/services/object_storage.ts +614 -557
- package/src/services/observability.ts +3469 -3866
- package/src/services/opensearch.ts +679 -628
- package/src/services/pim.ts +672 -909
- package/src/services/postgres_flex.ts +966 -986
- package/src/services/pubsub.ts +524 -546
- package/src/services/rabbitmq.ts +693 -654
- package/src/services/registry.ts +227 -194
- package/src/services/resource_manager.ts +520 -517
- package/src/services/run_command.ts +219 -211
- package/src/services/sca.ts +543 -570
- package/src/services/scf.ts +790 -716
- package/src/services/secrets_manager.ts +707 -622
- package/src/services/server_backup.ts +490 -475
- package/src/services/server_update.ts +353 -356
- package/src/services/service_account.ts +515 -553
- package/src/services/service_enablement.ts +162 -166
- package/src/services/sfs.ts +879 -958
- package/src/services/ske.ts +694 -769
- package/src/services/sqlserverflex.ts +1042 -1117
- package/src/services/stackit_marketplace.ts +377 -372
- package/src/services/telemetry_link.ts +530 -531
- package/src/services/telemetry_router.ts +509 -534
- package/src/services/ufw.ts +305 -307
- package/src/services/valkey.ts +684 -629
- package/src/services/vpn.ts +935 -1195
- package/src/services/workflows.ts +426 -586
- package/src/traits.ts +1 -1
- package/lib/credentials.js.map +0 -1
- package/lib/errors.js.map +0 -1
- package/lib/pagination.js.map +0 -1
- package/lib/protocol.js.map +0 -1
- package/lib/protocol.test.d.ts +0 -2
- package/lib/protocol.test.d.ts.map +0 -1
- package/lib/protocol.test.js +0 -181
- package/lib/protocol.test.js.map +0 -1
- package/lib/retry.js.map +0 -1
- package/lib/services/index.js.map +0 -1
- package/lib/traits.js.map +0 -1
- package/src/protocol.test.ts +0 -304
- /package/lib/{index.js.map → index.lazy.js.map} +0 -0
package/lib/services/cost.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import * as API from "@distilled.cloud/core/api";
|
|
2
|
-
import * as S from "@distilled.cloud/core/schema";
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
3
3
|
import { type StackitOpError, type StackitOpContext } from "../protocol.ts";
|
|
4
4
|
export type { StackitOpError, StackitOpContext };
|
|
5
|
-
declare const BadRequest_base: S.
|
|
5
|
+
declare const BadRequest_base: S.TaggedErrorClass<"BadRequest", {
|
|
6
6
|
readonly code: any;
|
|
7
7
|
readonly message: any;
|
|
8
|
-
}
|
|
8
|
+
}> & (new (...args: any[]) => {
|
|
9
9
|
"@distilled.cloud/error/categories": {
|
|
10
10
|
BadRequestError: true;
|
|
11
11
|
};
|
|
12
12
|
});
|
|
13
13
|
export declare class BadRequest extends /*@__PURE__*/ BadRequest_base {
|
|
14
14
|
}
|
|
15
|
-
declare const Forbidden_base: S.
|
|
15
|
+
declare const Forbidden_base: S.TaggedErrorClass<"Forbidden", {
|
|
16
16
|
readonly code: any;
|
|
17
17
|
readonly message: any;
|
|
18
|
-
}
|
|
18
|
+
}> & (new (...args: any[]) => {
|
|
19
19
|
"@distilled.cloud/error/categories": {
|
|
20
20
|
AuthError: true;
|
|
21
21
|
};
|
|
22
22
|
});
|
|
23
23
|
export declare class Forbidden extends /*@__PURE__*/ Forbidden_base {
|
|
24
24
|
}
|
|
25
|
-
declare const NotFound_base: S.
|
|
25
|
+
declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
|
|
26
26
|
readonly code: any;
|
|
27
27
|
readonly message: any;
|
|
28
|
-
}
|
|
28
|
+
}> & (new (...args: any[]) => {
|
|
29
29
|
"@distilled.cloud/error/categories": {
|
|
30
30
|
BadRequestError: true;
|
|
31
31
|
};
|
|
@@ -33,9 +33,7 @@ declare const NotFound_base: S.Class<NotFound, S.TaggedStruct<"NotFound", {
|
|
|
33
33
|
export declare class NotFound extends /*@__PURE__*/ NotFound_base {
|
|
34
34
|
}
|
|
35
35
|
export type GetCostsForProjectRequestDepth = "project" | "service" | "auto";
|
|
36
|
-
export declare const GetCostsForProjectRequestDepth: any;
|
|
37
36
|
export type GetCostsForProjectRequestGranularity = "daily" | "weekly" | "monthly" | "yearly" | "none";
|
|
38
|
-
export declare const GetCostsForProjectRequestGranularity: any;
|
|
39
37
|
export interface GetCostsForProjectRequest {
|
|
40
38
|
/** ID of a customer account */
|
|
41
39
|
customerAccountId: string;
|
|
@@ -47,12 +45,11 @@ export interface GetCostsForProjectRequest {
|
|
|
47
45
|
to: string;
|
|
48
46
|
/** Depth of desired cost information. "project" provides costs grouped by project, without services. "service" provides costs separated on service level. */
|
|
49
47
|
depth?: GetCostsForProjectRequestDepth | (string & {});
|
|
50
|
-
/** Define granularity of costs
|
|
48
|
+
/** 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. */
|
|
51
49
|
granularity?: GetCostsForProjectRequestGranularity | (string & {});
|
|
52
50
|
/** Whether costs of 0 should be included in the response */
|
|
53
51
|
includeZeroCosts?: boolean;
|
|
54
52
|
}
|
|
55
|
-
export declare const GetCostsForProjectRequest: S.Schema<GetCostsForProjectRequest>;
|
|
56
53
|
/** Summarized costs for a project */
|
|
57
54
|
export interface SummarizedProjectCost {
|
|
58
55
|
customerAccountId: string;
|
|
@@ -63,13 +60,11 @@ export interface SummarizedProjectCost {
|
|
|
63
60
|
/** Total discount for all services and the whole requested date range (value in cents) */
|
|
64
61
|
totalDiscount: number;
|
|
65
62
|
}
|
|
66
|
-
export declare const SummarizedProjectCost: S.Schema<SummarizedProjectCost>;
|
|
67
63
|
/** Time period according to desired granularity */
|
|
68
64
|
export interface ReportDataTimePeriod {
|
|
69
65
|
end?: string;
|
|
70
66
|
start?: string;
|
|
71
67
|
}
|
|
72
|
-
export declare const ReportDataTimePeriod: S.Schema<ReportDataTimePeriod>;
|
|
73
68
|
/** Costs report for a certain period of time */
|
|
74
69
|
export interface ReportData {
|
|
75
70
|
/** Charge, value in cents */
|
|
@@ -83,10 +78,8 @@ export interface ReportData {
|
|
|
83
78
|
/** Time period according to desired granularity */
|
|
84
79
|
timePeriod: ReportDataTimePeriod;
|
|
85
80
|
}
|
|
86
|
-
export declare const ReportData: S.Schema<ReportData>;
|
|
87
81
|
/** Detailed project costs which are ONLY included if granularity is provided AND depth is "project" */
|
|
88
82
|
export type ProjectCostWithReportsReportDataList = Array<ReportData>;
|
|
89
|
-
export declare const ProjectCostWithReportsReportDataList: S.Schema<ProjectCostWithReportsReportDataList>;
|
|
90
83
|
/** Detailed costs for a project */
|
|
91
84
|
export interface ProjectCostWithReports {
|
|
92
85
|
customerAccountId: string;
|
|
@@ -99,13 +92,10 @@ export interface ProjectCostWithReports {
|
|
|
99
92
|
/** Total discount for all services and the whole requested date range (value in cents) */
|
|
100
93
|
totalDiscount: number;
|
|
101
94
|
}
|
|
102
|
-
export declare const ProjectCostWithReports: S.Schema<ProjectCostWithReports>;
|
|
103
95
|
/** Summarized costs for a project */
|
|
104
96
|
export type SummarizedServiceCost = SummarizedProjectCost;
|
|
105
|
-
export declare const SummarizedServiceCost: S.Schema<SummarizedProjectCost>;
|
|
106
97
|
/** Summarized service costs */
|
|
107
98
|
export type ProjectCostWithSummarizedServicesServicesList = Array<SummarizedProjectCost>;
|
|
108
|
-
export declare const ProjectCostWithSummarizedServicesServicesList: S.Schema<ProjectCostWithSummarizedServicesServicesList>;
|
|
109
99
|
/** Costs for a project including summarized service costs */
|
|
110
100
|
export interface ProjectCostWithSummarizedServices {
|
|
111
101
|
customerAccountId: string;
|
|
@@ -118,10 +108,8 @@ export interface ProjectCostWithSummarizedServices {
|
|
|
118
108
|
/** Total discount for all services and the whole requested date range (value in cents) */
|
|
119
109
|
totalDiscount: number;
|
|
120
110
|
}
|
|
121
|
-
export declare const ProjectCostWithSummarizedServices: S.Schema<ProjectCostWithSummarizedServices>;
|
|
122
111
|
/** Detailed service costs which are ONLY included if granularity is provided */
|
|
123
112
|
export type DetailedServiceCostReportDataList = Array<ReportData>;
|
|
124
|
-
export declare const DetailedServiceCostReportDataList: S.Schema<DetailedServiceCostReportDataList>;
|
|
125
113
|
/** Costs for a single service */
|
|
126
114
|
export interface DetailedServiceCost {
|
|
127
115
|
/** Detailed service costs which are ONLY included if granularity is provided */
|
|
@@ -143,10 +131,8 @@ export interface DetailedServiceCost {
|
|
|
143
131
|
/** Label for unit */
|
|
144
132
|
unitLabel: string;
|
|
145
133
|
}
|
|
146
|
-
export declare const DetailedServiceCost: S.Schema<DetailedServiceCost>;
|
|
147
134
|
/** Total discount for all services and the whole requested date range (value in cents). Please see "depth" parameter for more details. */
|
|
148
135
|
export type ProjectCostWithDetailedServicesServicesList = Array<DetailedServiceCost>;
|
|
149
|
-
export declare const ProjectCostWithDetailedServicesServicesList: S.Schema<ProjectCostWithDetailedServicesServicesList>;
|
|
150
136
|
/** Detailed costs for a project including service costs */
|
|
151
137
|
export interface ProjectCostWithDetailedServices {
|
|
152
138
|
customerAccountId: string;
|
|
@@ -159,15 +145,10 @@ export interface ProjectCostWithDetailedServices {
|
|
|
159
145
|
/** Total discount for all services and the whole requested date range (value in cents) */
|
|
160
146
|
totalDiscount: number;
|
|
161
147
|
}
|
|
162
|
-
export declare const ProjectCostWithDetailedServices: S.Schema<ProjectCostWithDetailedServices>;
|
|
163
148
|
export type ProjectCost = SummarizedProjectCost | ProjectCostWithReports | ProjectCostWithSummarizedServices | ProjectCostWithDetailedServices;
|
|
164
|
-
export declare const ProjectCost: S.Schema<ProjectCost>;
|
|
165
149
|
export type GetCostsForProjectResponse = ProjectCost;
|
|
166
|
-
export declare const GetCostsForProjectResponse: S.Schema<GetCostsForProjectResponse>;
|
|
167
150
|
export type ListCostsForCustomerRequestDepth = "project" | "service" | "auto";
|
|
168
|
-
export declare const ListCostsForCustomerRequestDepth: any;
|
|
169
151
|
export type ListCostsForCustomerRequestGranularity = "daily" | "weekly" | "monthly" | "yearly" | "none";
|
|
170
|
-
export declare const ListCostsForCustomerRequestGranularity: any;
|
|
171
152
|
export interface ListCostsForCustomerRequest {
|
|
172
153
|
/** ID of a customer account */
|
|
173
154
|
customerAccountId: string;
|
|
@@ -177,20 +158,15 @@ export interface ListCostsForCustomerRequest {
|
|
|
177
158
|
to: string;
|
|
178
159
|
/** Depth of desired cost information. "project" provides costs grouped by project, without services. "service" provides costs separated on service level. */
|
|
179
160
|
depth?: ListCostsForCustomerRequestDepth | (string & {});
|
|
180
|
-
/** Define granularity of costs
|
|
161
|
+
/** 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. */
|
|
181
162
|
granularity?: ListCostsForCustomerRequestGranularity | (string & {});
|
|
182
163
|
/** Whether costs of 0 should be included in the response */
|
|
183
164
|
includeZeroCosts?: boolean;
|
|
184
165
|
}
|
|
185
|
-
export declare const ListCostsForCustomerRequest: S.Schema<ListCostsForCustomerRequest>;
|
|
186
166
|
export type ListCostsForCustomerResponseBodyList = Array<ProjectCost>;
|
|
187
|
-
export declare const ListCostsForCustomerResponseBodyList: S.Schema<ListCostsForCustomerResponseBodyList>;
|
|
188
167
|
export type ListCostsForCustomerResponse = ListCostsForCustomerResponseBodyList;
|
|
189
|
-
export declare const ListCostsForCustomerResponse: S.Schema<ListCostsForCustomerResponse>;
|
|
190
168
|
export type ListCostsForResellerRequestDepth = "project" | "service" | "auto";
|
|
191
|
-
export declare const ListCostsForResellerRequestDepth: any;
|
|
192
169
|
export type ListCostsForResellerRequestGranularity = "daily" | "weekly" | "monthly" | "yearly" | "none";
|
|
193
|
-
export declare const ListCostsForResellerRequestGranularity: any;
|
|
194
170
|
export interface ListCostsForResellerRequest {
|
|
195
171
|
/** ID of a customer account */
|
|
196
172
|
customerAccountId: string;
|
|
@@ -200,16 +176,13 @@ export interface ListCostsForResellerRequest {
|
|
|
200
176
|
to: string;
|
|
201
177
|
/** Depth of desired cost information. "project" provides costs grouped by project, without services. "service" provides costs separated on service level. */
|
|
202
178
|
depth?: ListCostsForResellerRequestDepth | (string & {});
|
|
203
|
-
/** Define granularity of costs
|
|
179
|
+
/** 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. */
|
|
204
180
|
granularity?: ListCostsForResellerRequestGranularity | (string & {});
|
|
205
181
|
/** Whether costs of 0 should be included in the response */
|
|
206
182
|
includeZeroCosts?: boolean;
|
|
207
183
|
}
|
|
208
|
-
export declare const ListCostsForResellerRequest: S.Schema<ListCostsForResellerRequest>;
|
|
209
184
|
export type ListCostsForResellerResponseBodyList = Array<ProjectCost>;
|
|
210
|
-
export declare const ListCostsForResellerResponseBodyList: S.Schema<ListCostsForResellerResponseBodyList>;
|
|
211
185
|
export type ListCostsForResellerResponse = ListCostsForResellerResponseBodyList;
|
|
212
|
-
export declare const ListCostsForResellerResponse: S.Schema<ListCostsForResellerResponse>;
|
|
213
186
|
export type GetCostsForProjectError = BadRequest | Forbidden | NotFound | StackitOpError;
|
|
214
187
|
/** V3 Costs for a certain project Get costs for a certain project in a customer account */
|
|
215
188
|
export declare const getCostsForProject: API.OperationMethod<GetCostsForProjectRequest, GetCostsForProjectResponse, GetCostsForProjectError, StackitOpContext>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/services/cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAGjD,OAAO,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/services/cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAGjD,OAAO,KAAK,CAAC,MAAM,mCAAmC,CAAC;AAGvD,OAAO,EAAmB,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAM7F,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;;;;;;;;;AAEjD,qBAAa,UACX,SAAQ,aAAa,CAAC,eAMrB;CAAG;;;;;;;;;AAEN,qBAAa,SACX,SAAQ,aAAa,CAAC,cAMrB;CAAG;;;;;;;;;AAEN,qBAAa,QACX,SAAQ,aAAa,CAAC,aAMrB;CAAG;AAEN,MAAM,MAAM,8BAA8B,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAC5E,MAAM,MAAM,oCAAoC,GAC5C,OAAO,GACP,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,MAAM,CAAC;AACX,MAAM,WAAW,yBAAyB;IACxC,+BAA+B;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sBAAsB;IACtB,SAAS,EAAE,MAAM,CAA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ED 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 { UnknownStackitError } from "../errors.js";
|
|
6
|
-
import { StackitProtocol } from "../protocol.js";
|
|
7
|
-
import * as Retry from "../retry.js";
|
|
8
|
-
import * as T from "../traits.js";
|
|
9
|
-
export class BadRequest extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
10
|
-
/*@__PURE__*/ S.TaggedError()("BadRequest", {
|
|
11
|
-
code: S.Number,
|
|
12
|
-
message: S.String,
|
|
13
|
-
}).pipe(C.withBadRequestError), [{ status: 400 }]) {
|
|
14
|
-
}
|
|
15
|
-
export class Forbidden extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
16
|
-
/*@__PURE__*/ S.TaggedError()("Forbidden", {
|
|
17
|
-
code: S.Number,
|
|
18
|
-
message: S.String,
|
|
19
|
-
}).pipe(C.withAuthError), [{ status: 403 }]) {
|
|
20
|
-
}
|
|
21
|
-
export class NotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
22
|
-
/*@__PURE__*/ S.TaggedError()("NotFound", {
|
|
23
|
-
code: S.Number,
|
|
24
|
-
message: S.String,
|
|
25
|
-
}).pipe(C.withBadRequestError), [{ status: 404 }]) {
|
|
26
|
-
}
|
|
27
|
-
export const GetCostsForProjectRequestDepth = S.String;
|
|
28
|
-
export const GetCostsForProjectRequestGranularity = S.String;
|
|
29
|
-
export const GetCostsForProjectRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
30
|
-
customerAccountId: S.String.pipe(T.Label()),
|
|
31
|
-
projectId: S.String.pipe(T.Label()),
|
|
32
|
-
from: S.String.pipe(T.Query()),
|
|
33
|
-
to: S.String.pipe(T.Query()),
|
|
34
|
-
depth: S.optional(GetCostsForProjectRequestDepth.pipe(T.Query())),
|
|
35
|
-
granularity: S.optional(GetCostsForProjectRequestGranularity.pipe(T.Query())),
|
|
36
|
-
includeZeroCosts: S.optional(S.Boolean.pipe(T.Query())),
|
|
37
|
-
}).pipe(T.Http({
|
|
38
|
-
method: "GET",
|
|
39
|
-
uri: "/v3/costs/{customerAccountId}/projects/{projectId}",
|
|
40
|
-
code: 200,
|
|
41
|
-
baseUrl: "https://cost.api.stackit.cloud",
|
|
42
|
-
}))).annotate({
|
|
43
|
-
identifier: "GetCostsForProjectRequest",
|
|
44
|
-
});
|
|
45
|
-
export const SummarizedProjectCost = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
46
|
-
customerAccountId: S.String,
|
|
47
|
-
projectId: S.String,
|
|
48
|
-
projectName: S.String,
|
|
49
|
-
totalCharge: S.Number,
|
|
50
|
-
totalDiscount: S.Number,
|
|
51
|
-
})).annotate({ identifier: "SummarizedProjectCost" });
|
|
52
|
-
export const ReportDataTimePeriod = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
53
|
-
end: S.optional(S.String),
|
|
54
|
-
start: S.optional(S.String),
|
|
55
|
-
})).annotate({ identifier: "ReportDataTimePeriod" });
|
|
56
|
-
export const ReportData = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
57
|
-
charge: S.Number,
|
|
58
|
-
discount: S.Number,
|
|
59
|
-
quantity: S.Number,
|
|
60
|
-
quantityDecimal: S.String,
|
|
61
|
-
timePeriod: ReportDataTimePeriod,
|
|
62
|
-
})).annotate({ identifier: "ReportData" });
|
|
63
|
-
export const ProjectCostWithReportsReportDataList = /*@__PURE__*/ S.Array(ReportData);
|
|
64
|
-
export const ProjectCostWithReports = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
65
|
-
customerAccountId: S.String,
|
|
66
|
-
projectId: S.String,
|
|
67
|
-
projectName: S.String,
|
|
68
|
-
reportData: S.optional(ProjectCostWithReportsReportDataList),
|
|
69
|
-
totalCharge: S.Number,
|
|
70
|
-
totalDiscount: S.Number,
|
|
71
|
-
})).annotate({ identifier: "ProjectCostWithReports" });
|
|
72
|
-
export const SummarizedServiceCost = SummarizedProjectCost;
|
|
73
|
-
export const ProjectCostWithSummarizedServicesServicesList = /*@__PURE__*/ S.Array(SummarizedProjectCost);
|
|
74
|
-
export const ProjectCostWithSummarizedServices = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
75
|
-
customerAccountId: S.String,
|
|
76
|
-
projectId: S.String,
|
|
77
|
-
projectName: S.String,
|
|
78
|
-
services: S.optional(ProjectCostWithSummarizedServicesServicesList),
|
|
79
|
-
totalCharge: S.Number,
|
|
80
|
-
totalDiscount: S.Number,
|
|
81
|
-
})).annotate({
|
|
82
|
-
identifier: "ProjectCostWithSummarizedServices",
|
|
83
|
-
});
|
|
84
|
-
export const DetailedServiceCostReportDataList = /*@__PURE__*/ S.Array(ReportData);
|
|
85
|
-
export const DetailedServiceCost = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
86
|
-
reportData: S.optional(DetailedServiceCostReportDataList),
|
|
87
|
-
serviceCategoryName: S.String,
|
|
88
|
-
serviceName: S.String,
|
|
89
|
-
sku: S.String,
|
|
90
|
-
totalCharge: S.Number,
|
|
91
|
-
totalDiscount: S.Number,
|
|
92
|
-
totalQuantity: S.Number,
|
|
93
|
-
totalQuantityDecimal: S.String,
|
|
94
|
-
unitLabel: S.String,
|
|
95
|
-
})).annotate({ identifier: "DetailedServiceCost" });
|
|
96
|
-
export const ProjectCostWithDetailedServicesServicesList = /*@__PURE__*/ S.Array(DetailedServiceCost);
|
|
97
|
-
export const ProjectCostWithDetailedServices = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
98
|
-
customerAccountId: S.String,
|
|
99
|
-
projectId: S.String,
|
|
100
|
-
projectName: S.String,
|
|
101
|
-
services: S.optional(ProjectCostWithDetailedServicesServicesList),
|
|
102
|
-
totalCharge: S.Number,
|
|
103
|
-
totalDiscount: S.Number,
|
|
104
|
-
})).annotate({
|
|
105
|
-
identifier: "ProjectCostWithDetailedServices",
|
|
106
|
-
});
|
|
107
|
-
export const ProjectCost = /*@__PURE__*/ S.Unknown;
|
|
108
|
-
export const GetCostsForProjectResponse = /*@__PURE__*/ S.suspend(() => ProjectCost.pipe(T.RawResponseRoot())).annotate({
|
|
109
|
-
identifier: "GetCostsForProjectResponse",
|
|
110
|
-
});
|
|
111
|
-
export const ListCostsForCustomerRequestDepth = S.String;
|
|
112
|
-
export const ListCostsForCustomerRequestGranularity = S.String;
|
|
113
|
-
export const ListCostsForCustomerRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
114
|
-
customerAccountId: S.String.pipe(T.Label()),
|
|
115
|
-
from: S.String.pipe(T.Query()),
|
|
116
|
-
to: S.String.pipe(T.Query()),
|
|
117
|
-
depth: S.optional(ListCostsForCustomerRequestDepth.pipe(T.Query())),
|
|
118
|
-
granularity: S.optional(ListCostsForCustomerRequestGranularity.pipe(T.Query())),
|
|
119
|
-
includeZeroCosts: S.optional(S.Boolean.pipe(T.Query())),
|
|
120
|
-
}).pipe(T.Http({
|
|
121
|
-
method: "GET",
|
|
122
|
-
uri: "/v3/costs/{customerAccountId}",
|
|
123
|
-
code: 200,
|
|
124
|
-
baseUrl: "https://cost.api.stackit.cloud",
|
|
125
|
-
}))).annotate({
|
|
126
|
-
identifier: "ListCostsForCustomerRequest",
|
|
127
|
-
});
|
|
128
|
-
export const ListCostsForCustomerResponseBodyList = /*@__PURE__*/ S.Array(ProjectCost);
|
|
129
|
-
export const ListCostsForCustomerResponse = /*@__PURE__*/ S.suspend(() => ListCostsForCustomerResponseBodyList.pipe(T.RawResponseRoot())).annotate({
|
|
130
|
-
identifier: "ListCostsForCustomerResponse",
|
|
131
|
-
});
|
|
132
|
-
export const ListCostsForResellerRequestDepth = S.String;
|
|
133
|
-
export const ListCostsForResellerRequestGranularity = S.String;
|
|
134
|
-
export const ListCostsForResellerRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
135
|
-
customerAccountId: S.String.pipe(T.Label()),
|
|
136
|
-
from: S.String.pipe(T.Query()),
|
|
137
|
-
to: S.String.pipe(T.Query()),
|
|
138
|
-
depth: S.optional(ListCostsForResellerRequestDepth.pipe(T.Query())),
|
|
139
|
-
granularity: S.optional(ListCostsForResellerRequestGranularity.pipe(T.Query())),
|
|
140
|
-
includeZeroCosts: S.optional(S.Boolean.pipe(T.Query())),
|
|
141
|
-
}).pipe(T.Http({
|
|
142
|
-
method: "GET",
|
|
143
|
-
uri: "/v3/costs/{customerAccountId}/customers",
|
|
144
|
-
code: 200,
|
|
145
|
-
baseUrl: "https://cost.api.stackit.cloud",
|
|
146
|
-
}))).annotate({
|
|
147
|
-
identifier: "ListCostsForResellerRequest",
|
|
148
|
-
});
|
|
149
|
-
export const ListCostsForResellerResponseBodyList = /*@__PURE__*/ S.Array(ProjectCost);
|
|
150
|
-
export const ListCostsForResellerResponse = /*@__PURE__*/ S.suspend(() => ListCostsForResellerResponseBodyList.pipe(T.RawResponseRoot())).annotate({
|
|
151
|
-
identifier: "ListCostsForResellerResponse",
|
|
152
|
-
});
|
|
153
|
-
/** V3 Costs for a certain project Get costs for a certain project in a customer account */
|
|
154
|
-
export const getCostsForProject = /*@__PURE__*/ API.make(() => ({
|
|
155
|
-
input: GetCostsForProjectRequest,
|
|
156
|
-
output: GetCostsForProjectResponse,
|
|
157
|
-
errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
|
|
158
|
-
protocol: StackitProtocol,
|
|
159
|
-
retry: Retry.Retry,
|
|
160
|
-
}));
|
|
161
|
-
/** V3 Costs for all projects Get costs for all projects in a customer account */
|
|
162
|
-
export const listCostsForCustomer = /*@__PURE__*/ API.make(() => ({
|
|
163
|
-
input: ListCostsForCustomerRequest,
|
|
164
|
-
output: ListCostsForCustomerResponse,
|
|
165
|
-
errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
|
|
166
|
-
protocol: StackitProtocol,
|
|
167
|
-
retry: Retry.Retry,
|
|
168
|
-
}));
|
|
169
|
-
/** V3 Costs for all projects of all related sub-customers Get costs for all projects of all related sub-customer accounts */
|
|
170
|
-
export const listCostsForReseller = /*@__PURE__*/ API.make(() => ({
|
|
171
|
-
input: ListCostsForResellerRequest,
|
|
172
|
-
output: ListCostsForResellerResponse,
|
|
173
|
-
errors: [BadRequest, Forbidden, NotFound, UnknownStackitError],
|
|
174
|
-
protocol: StackitProtocol,
|
|
175
|
-
retry: Retry.Retry,
|
|
176
|
-
}));
|
|
1
|
+
import{_ as e,b as t,c as n,d as r,errors$UnknownStackitError as i,f as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,protocol$StackitProtocol as p,retry$Retry as m,s as h,t as g,traits$Http as _,traits$Label as v,traits$Query as y,traits$RawResponseRoot as b,traits$applyErrorMatchers as x,u as S,v as C,x as w}from"../_bundle/sdk.js";const T=/*@__PURE__*/ o(function BadRequest(t){return e(t,new.target,[`$5($4()("BadRequest",{code:$2,message:$3}).pipe($1),[{status:400}])`,[S,w,s,d,n,x]])});const E=/*@__PURE__*/ o(function Forbidden(r){return e(r,new.target,[`$5($4()("Forbidden",{code:$2,message:$3}).pipe($1),[{status:403}])`,[S,t,s,d,n,x]])});const D=/*@__PURE__*/ o(function NotFound(t){return e(t,new.target,[`$5($4()("NotFound",{code:$2,message:$3}).pipe($1),[{status:404}])`,[S,w,s,d,n,x]])});const O=/*@__PURE__*/ C(e=>e===f?[`{input:#1,output:#2,errors:[$11,$12,$13,$14],protocol:$15,retry:$16};$8(>3)@"GetCostsForProjectRequest";$8(>4)@"GetCostsForProjectResponse";$7({customerAccountId:$3.pipe($2()),projectId:$3.pipe($2()),from:$3.pipe($4()),to:$3.pipe($4()),depth:$5($3.pipe($4())),granularity:$5($3.pipe($4())),includeZeroCosts:$5($6.pipe($4()))}).pipe($1({method:"GET",uri:"/v3/costs/{customerAccountId}/projects/{projectId}",code:200,baseUrl:"https://cost.api.stackit.cloud"}));$10.pipe($9())`,[S,_,v,d,y,r,u,h,a,b,c,T,E,D,i,p,m]]:l(O,e));const k=/*@__PURE__*/ C(e=>e===f?[`{input:#1,output:#2:1,errors:[$4,$5,$6,$7],protocol:$8,retry:$9};$3(>2)@"ListCostsForCustomerRequest";~2:2.pipe($1({method:"GET",uri:"/v3/costs/{customerAccountId}",code:200,baseUrl:"https://cost.api.stackit.cloud"}))`,[S,_,__d0,a,T,E,D,i,p,m]]:l(k,e));const A=/*@__PURE__*/ C(e=>e===f?[`{input:#1,output:#2:1,errors:[$4,$5,$6,$7],protocol:$8,retry:$9};$3(>2)@"ListCostsForResellerRequest";~2:2.pipe($1({method:"GET",uri:"/v3/costs/{customerAccountId}/customers",code:200,baseUrl:"https://cost.api.stackit.cloud"}))`,[S,_,__d0,a,T,E,D,i,p,m]]:l(A,e));function __d0(){return[`$2($1);$4(>3)@"ListCostsForCustomerResponse";$10({customerAccountId:$6.pipe($5()),from:$6.pipe($7()),to:$6.pipe($7()),depth:$8($6.pipe($7())),granularity:$8($6.pipe($7())),includeZeroCosts:$8($9.pipe($7()))});#0.pipe($3())`,[S,c,g,b,a,v,d,y,r,u,h]]}export{T as BadRequest,E as Forbidden,D as NotFound,O as getCostsForProject,k as listCostsForCustomer,A as listCostsForReseller};
|
|
177
2
|
//# sourceMappingURL=cost.js.map
|
package/lib/services/cost.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost.js","
|
|
1
|
+
{"version":3,"file":"cost.js","names":["API.newError","__L.at","C.withBadRequestError","S.Number","S.String","S.TaggedError","T.applyErrorMatchers","C.withAuthError","API.D","T.Http","T.Label","T.Query","S.optional","S.Boolean","S.Struct","S.suspend","T.RawResponseRoot","S.Unknown","Retry.Retry","API.call","S.Array","newError","withAuthError","TaggedError","optional","UnknownStackitError","suspend","error","Number","Unknown","call","Boolean","String","D","StackitProtocol","Retry","Struct","Array","Http","Label","Query","RawResponseRoot","applyErrorMatchers","at","op","withBadRequestError","BadRequest","i","Forbidden","NotFound","getCostsForProject","listCostsForCustomer","listCostsForReseller"],"sources":["../../src/services/cost.ts"],"mappings":"qVAYA,MAAa8C,EAAgC,gBAAU,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