@distilled.cloud/stackit 1.0.0-rc.20 → 1.0.0-rc.21
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/README.md +13 -2
- package/lib/.lazy.json +1 -1
- package/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/credentials.d.ts +17 -3
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +1 -1
- package/lib/errors.d.ts +8 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/index.d.ts +9 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/lib/pagination.d.ts.map +1 -1
- package/lib/protocol.d.ts +33 -12
- package/lib/protocol.d.ts.map +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/services/alb.d.ts +8 -0
- package/lib/services/alb.d.ts.map +1 -1
- package/lib/services/alb.js +26 -26
- package/lib/services/alb.js.map +1 -1
- package/lib/services/alb_waf.d.ts +8 -0
- package/lib/services/alb_waf.d.ts.map +1 -1
- package/lib/services/alb_waf.js +31 -31
- package/lib/services/alb_waf.js.map +1 -1
- package/lib/services/authorization.d.ts +13 -0
- package/lib/services/authorization.d.ts.map +1 -1
- package/lib/services/authorization.js +1 -1
- package/lib/services/authorization.js.map +1 -1
- package/lib/services/automation.d.ts +23 -0
- package/lib/services/automation.d.ts.map +1 -1
- package/lib/services/automation.js +23 -22
- package/lib/services/automation.js.map +1 -1
- package/lib/services/cdn.d.ts +39 -1
- package/lib/services/cdn.d.ts.map +1 -1
- package/lib/services/cdn.js +31 -30
- package/lib/services/cdn.js.map +1 -1
- package/lib/services/certificates.d.ts +6 -0
- package/lib/services/certificates.d.ts.map +1 -1
- package/lib/services/certificates.js +1 -1
- package/lib/services/certificates.js.map +1 -1
- package/lib/services/cost.d.ts +19 -0
- package/lib/services/cost.d.ts.map +1 -1
- package/lib/services/cost.js +1 -1
- package/lib/services/cost.js.map +1 -1
- package/lib/services/dns.d.ts +16 -0
- package/lib/services/dns.d.ts.map +1 -1
- package/lib/services/dns.js +40 -40
- package/lib/services/dns.js.map +1 -1
- package/lib/services/iaas.d.ts +17 -0
- package/lib/services/iaas.d.ts.map +1 -1
- package/lib/services/iaas.js +181 -180
- package/lib/services/iaas.js.map +1 -1
- package/lib/services/identity.d.ts +19 -0
- package/lib/services/identity.d.ts.map +1 -1
- package/lib/services/identity.js +1 -1
- package/lib/services/identity.js.map +1 -1
- package/lib/services/index.d.ts +0 -10
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +0 -10
- package/lib/services/kms.d.ts +16 -0
- package/lib/services/kms.d.ts.map +1 -1
- package/lib/services/kms.js +41 -40
- package/lib/services/kms.js.map +1 -1
- package/lib/services/load_balancer.d.ts +8 -0
- package/lib/services/load_balancer.d.ts.map +1 -1
- package/lib/services/load_balancer.js +27 -27
- package/lib/services/load_balancer.js.map +1 -1
- package/lib/services/logme.d.ts +14 -1
- package/lib/services/logme.d.ts.map +1 -1
- package/lib/services/logme.js +36 -35
- package/lib/services/logme.js.map +1 -1
- package/lib/services/logs.d.ts +6 -0
- package/lib/services/logs.d.ts.map +1 -1
- package/lib/services/logs.js +34 -34
- package/lib/services/logs.js.map +1 -1
- package/lib/services/mariadb.d.ts +14 -1
- package/lib/services/mariadb.d.ts.map +1 -1
- package/lib/services/mariadb.js +37 -36
- package/lib/services/mariadb.js.map +1 -1
- package/lib/services/model_experiments.d.ts +20 -0
- package/lib/services/model_experiments.d.ts.map +1 -1
- package/lib/services/model_experiments.js +1 -1
- package/lib/services/model_experiments.js.map +1 -1
- package/lib/services/model_serving.d.ts +13 -0
- package/lib/services/model_serving.d.ts.map +1 -1
- package/lib/services/model_serving.js +1 -1
- package/lib/services/model_serving.js.map +1 -1
- package/lib/services/mongodb_flex.d.ts +19 -0
- package/lib/services/mongodb_flex.d.ts.map +1 -1
- package/lib/services/mongodb_flex.js +42 -41
- package/lib/services/mongodb_flex.js.map +1 -1
- package/lib/services/object_storage.d.ts +34 -0
- package/lib/services/object_storage.d.ts.map +1 -1
- package/lib/services/object_storage.js +38 -37
- package/lib/services/object_storage.js.map +1 -1
- package/lib/services/observability.d.ts +34 -8
- package/lib/services/observability.d.ts.map +1 -1
- package/lib/services/observability.js +159 -158
- package/lib/services/observability.js.map +1 -1
- package/lib/services/opensearch.d.ts +14 -1
- package/lib/services/opensearch.d.ts.map +1 -1
- package/lib/services/opensearch.js +37 -36
- package/lib/services/opensearch.js.map +1 -1
- package/lib/services/pim.d.ts +22 -0
- package/lib/services/pim.d.ts.map +1 -1
- package/lib/services/pim.js +31 -30
- package/lib/services/pim.js.map +1 -1
- package/lib/services/postgres_flex.d.ts +37 -0
- package/lib/services/postgres_flex.d.ts.map +1 -1
- package/lib/services/postgres_flex.js +48 -47
- package/lib/services/postgres_flex.js.map +1 -1
- package/lib/services/rabbitmq.d.ts +14 -1
- package/lib/services/rabbitmq.d.ts.map +1 -1
- package/lib/services/rabbitmq.js +38 -37
- package/lib/services/rabbitmq.js.map +1 -1
- package/lib/services/registry.d.ts +37 -0
- package/lib/services/registry.d.ts.map +1 -1
- package/lib/services/registry.js +1 -1
- package/lib/services/registry.js.map +1 -1
- package/lib/services/resource_manager.d.ts +24 -0
- package/lib/services/resource_manager.d.ts.map +1 -1
- package/lib/services/resource_manager.js +36 -35
- package/lib/services/resource_manager.js.map +1 -1
- package/lib/services/run_command.d.ts +12 -0
- package/lib/services/run_command.d.ts.map +1 -1
- package/lib/services/run_command.js +1 -1
- package/lib/services/run_command.js.map +1 -1
- package/lib/services/scf.d.ts +13 -0
- package/lib/services/scf.d.ts.map +1 -1
- package/lib/services/scf.js +40 -39
- package/lib/services/scf.js.map +1 -1
- package/lib/services/secrets_manager.d.ts +21 -0
- package/lib/services/secrets_manager.d.ts.map +1 -1
- package/lib/services/secrets_manager.js +42 -41
- package/lib/services/secrets_manager.js.map +1 -1
- package/lib/services/server_backup.d.ts +6 -0
- package/lib/services/server_backup.d.ts.map +1 -1
- package/lib/services/server_backup.js +28 -28
- package/lib/services/server_backup.js.map +1 -1
- package/lib/services/server_update.d.ts +6 -0
- package/lib/services/server_update.d.ts.map +1 -1
- package/lib/services/server_update.js +1 -1
- package/lib/services/server_update.js.map +1 -1
- package/lib/services/service_account.d.ts +28 -0
- package/lib/services/service_account.d.ts.map +1 -1
- package/lib/services/service_account.js +30 -29
- package/lib/services/service_account.js.map +1 -1
- package/lib/services/service_enablement.d.ts +14 -0
- package/lib/services/service_enablement.d.ts.map +1 -1
- package/lib/services/service_enablement.js +1 -1
- package/lib/services/service_enablement.js.map +1 -1
- package/lib/services/sfs.d.ts +33 -0
- package/lib/services/sfs.d.ts.map +1 -1
- package/lib/services/sfs.js +46 -46
- package/lib/services/sfs.js.map +1 -1
- package/lib/services/ske.d.ts +8 -3
- package/lib/services/ske.d.ts.map +1 -1
- package/lib/services/ske.js +25 -25
- package/lib/services/ske.js.map +1 -1
- package/lib/services/sqlserverflex.d.ts +34 -0
- package/lib/services/sqlserverflex.d.ts.map +1 -1
- package/lib/services/sqlserverflex.js +46 -45
- package/lib/services/sqlserverflex.js.map +1 -1
- package/lib/services/stackit_marketplace.d.ts +26 -1
- package/lib/services/stackit_marketplace.d.ts.map +1 -1
- package/lib/services/stackit_marketplace.js +26 -25
- package/lib/services/stackit_marketplace.js.map +1 -1
- package/lib/services/telemetry_link.d.ts +12 -0
- package/lib/services/telemetry_link.d.ts.map +1 -1
- package/lib/services/telemetry_link.js +35 -34
- package/lib/services/telemetry_link.js.map +1 -1
- package/lib/services/telemetry_router.d.ts +49 -3
- package/lib/services/telemetry_router.d.ts.map +1 -1
- package/lib/services/telemetry_router.js +33 -31
- package/lib/services/telemetry_router.js.map +1 -1
- package/lib/services/ufw.d.ts +15 -0
- package/lib/services/ufw.d.ts.map +1 -1
- package/lib/services/ufw.js +1 -1
- package/lib/services/ufw.js.map +1 -1
- package/lib/services/valkey.d.ts +14 -1
- package/lib/services/valkey.d.ts.map +1 -1
- package/lib/services/valkey.js +37 -36
- package/lib/services/valkey.js.map +1 -1
- package/lib/services/vpn.d.ts +43 -1
- package/lib/services/vpn.d.ts.map +1 -1
- package/lib/services/vpn.js +43 -42
- package/lib/services/vpn.js.map +1 -1
- package/lib/services.lazy/alb.js +1 -1
- package/lib/services.lazy/alb_waf.js +1 -1
- package/lib/services.lazy/automation.js +1 -1
- package/lib/services.lazy/cdn.js +1 -1
- package/lib/services.lazy/dns.js +1 -1
- package/lib/services.lazy/iaas.js +1 -1
- package/lib/services.lazy/index.js +2 -2
- package/lib/services.lazy/kms.js +1 -1
- package/lib/services.lazy/load_balancer.js +1 -1
- package/lib/services.lazy/logme.js +1 -1
- package/lib/services.lazy/logs.js +1 -1
- package/lib/services.lazy/mariadb.js +1 -1
- package/lib/services.lazy/mongodb_flex.js +1 -1
- package/lib/services.lazy/object_storage.js +1 -1
- package/lib/services.lazy/observability.js +1 -1
- package/lib/services.lazy/opensearch.js +1 -1
- package/lib/services.lazy/pim.js +1 -1
- package/lib/services.lazy/postgres_flex.js +1 -1
- package/lib/services.lazy/rabbitmq.js +1 -1
- package/lib/services.lazy/resource_manager.js +1 -1
- package/lib/services.lazy/scf.js +1 -1
- package/lib/services.lazy/secrets_manager.js +1 -1
- package/lib/services.lazy/server_backup.js +1 -1
- package/lib/services.lazy/service_account.js +1 -1
- package/lib/services.lazy/sfs.js +1 -1
- package/lib/services.lazy/ske.js +1 -1
- package/lib/services.lazy/sqlserverflex.js +1 -1
- package/lib/services.lazy/stackit_marketplace.js +1 -1
- package/lib/services.lazy/telemetry_link.js +1 -1
- package/lib/services.lazy/telemetry_router.js +1 -1
- package/lib/services.lazy/valkey.js +1 -1
- package/lib/services.lazy/vpn.js +1 -1
- package/lib/traits.d.ts.map +1 -1
- package/lib/{services → unstable-services}/dremio.d.ts +19 -4
- package/lib/unstable-services/dremio.d.ts.map +1 -0
- package/lib/unstable-services/dremio.js +2 -0
- package/lib/unstable-services/dremio.js.map +1 -0
- package/lib/{services → unstable-services}/edge.d.ts +13 -1
- package/lib/unstable-services/edge.d.ts.map +1 -0
- package/lib/unstable-services/edge.js +29 -0
- package/lib/unstable-services/edge.js.map +1 -0
- package/lib/unstable-services/functions.d.ts.map +1 -0
- package/lib/unstable-services/functions.js +28 -0
- package/lib/unstable-services/functions.js.map +1 -0
- package/lib/{services → unstable-services}/git.d.ts +42 -1
- package/lib/unstable-services/git.d.ts.map +1 -0
- package/lib/unstable-services/git.js +43 -0
- package/lib/unstable-services/git.js.map +1 -0
- package/lib/unstable-services/index.d.ts +11 -0
- package/lib/unstable-services/index.d.ts.map +1 -0
- package/lib/unstable-services/index.js +10 -0
- package/lib/{services → unstable-services}/intake.d.ts +8 -2
- package/lib/unstable-services/intake.d.ts.map +1 -0
- package/lib/unstable-services/intake.js +31 -0
- package/lib/unstable-services/intake.js.map +1 -0
- package/lib/{services → unstable-services}/lb_ip_lists.d.ts +9 -1
- package/lib/unstable-services/lb_ip_lists.d.ts.map +1 -0
- package/lib/unstable-services/lb_ip_lists.js +2 -0
- package/lib/unstable-services/lb_ip_lists.js.map +1 -0
- package/lib/{services → unstable-services}/mailout.d.ts +95 -126
- package/lib/unstable-services/mailout.d.ts.map +1 -0
- package/lib/unstable-services/mailout.js +30 -0
- package/lib/unstable-services/mailout.js.map +1 -0
- package/lib/{services → unstable-services}/pubsub.d.ts +10 -0
- package/lib/unstable-services/pubsub.d.ts.map +1 -0
- package/lib/unstable-services/pubsub.js +39 -0
- package/lib/unstable-services/pubsub.js.map +1 -0
- package/lib/{services → unstable-services}/sca.d.ts +73 -23
- package/lib/unstable-services/sca.d.ts.map +1 -0
- package/lib/unstable-services/sca.js +41 -0
- package/lib/unstable-services/sca.js.map +1 -0
- package/lib/{services → unstable-services}/workflows.d.ts +29 -1
- package/lib/unstable-services/workflows.d.ts.map +1 -0
- package/lib/unstable-services/workflows.js +30 -0
- package/lib/unstable-services/workflows.js.map +1 -0
- package/lib/unstable-services.lazy/dremio.js +1 -0
- package/lib/{services.lazy → unstable-services.lazy}/edge.js +1 -1
- package/lib/{services.lazy → unstable-services.lazy}/functions.js +1 -1
- package/lib/{services.lazy → unstable-services.lazy}/git.js +2 -2
- package/lib/unstable-services.lazy/index.js +3 -0
- package/lib/{services.lazy → unstable-services.lazy}/intake.js +1 -1
- package/lib/unstable-services.lazy/lb_ip_lists.js +1 -0
- package/lib/unstable-services.lazy/mailout.js +4 -0
- package/lib/{services.lazy → unstable-services.lazy}/pubsub.js +1 -1
- package/lib/{services.lazy → unstable-services.lazy}/sca.js +2 -2
- package/lib/{services.lazy → unstable-services.lazy}/workflows.js +1 -1
- package/package.json +12 -6
- package/src/credentials.ts +44 -7
- package/src/errors.ts +10 -1
- package/src/index.ts +9 -6
- package/src/protocol.ts +108 -127
- package/src/services/alb.ts +35 -14
- package/src/services/alb_waf.ts +41 -17
- package/src/services/authorization.ts +121 -75
- package/src/services/automation.ts +151 -76
- package/src/services/cdn.ts +284 -187
- package/src/services/certificates.ts +17 -6
- package/src/services/cost.ts +75 -17
- package/src/services/dns.ts +219 -149
- package/src/services/iaas.ts +888 -708
- package/src/services/identity.ts +109 -51
- package/src/services/index.ts +0 -10
- package/src/services/kms.ts +185 -118
- package/src/services/load_balancer.ts +35 -14
- package/src/services/logme.ts +181 -123
- package/src/services/logs.ts +43 -19
- package/src/services/mariadb.ts +179 -121
- package/src/services/model_experiments.ts +122 -64
- package/src/services/model_serving.ts +102 -58
- package/src/services/mongodb_flex.ts +196 -131
- package/src/services/object_storage.ts +226 -106
- package/src/services/observability.ts +880 -709
- package/src/services/opensearch.ts +182 -124
- package/src/services/pim.ts +166 -104
- package/src/services/postgres_flex.ts +291 -170
- package/src/services/rabbitmq.ts +188 -130
- package/src/services/registry.ts +146 -40
- package/src/services/resource_manager.ts +180 -110
- package/src/services/run_command.ts +73 -37
- package/src/services/scf.ts +178 -119
- package/src/services/secrets_manager.ts +198 -129
- package/src/services/server_backup.ts +39 -17
- package/src/services/server_update.ts +31 -13
- package/src/services/service_account.ts +180 -85
- package/src/services/service_enablement.ts +64 -28
- package/src/services/sfs.ts +265 -163
- package/src/services/ske.ts +39 -20
- package/src/services/sqlserverflex.ts +290 -175
- package/src/services/stackit_marketplace.ts +138 -70
- package/src/services/telemetry_link.ts +151 -100
- package/src/services/telemetry_router.ts +241 -109
- package/src/services/ufw.ts +97 -50
- package/src/services/valkey.ts +179 -121
- package/src/services/vpn.ts +305 -194
- package/src/{services → unstable-services}/dremio.ts +113 -74
- package/src/{services → unstable-services}/edge.ts +113 -72
- package/src/{services → unstable-services}/functions.ts +31 -16
- package/src/{services → unstable-services}/git.ts +285 -133
- package/src/unstable-services/index.ts +11 -0
- package/src/{services → unstable-services}/intake.ts +41 -20
- package/src/{services → unstable-services}/lb_ip_lists.ts +20 -7
- package/src/{services → unstable-services}/mailout.ts +290 -381
- package/src/{services → unstable-services}/pubsub.ts +47 -19
- package/src/{services → unstable-services}/sca.ts +349 -172
- package/src/{services → unstable-services}/workflows.ts +149 -76
- package/lib/index.lazy.js +0 -7
- package/lib/index.lazy.js.map +0 -1
- package/lib/services/dremio.d.ts.map +0 -1
- package/lib/services/dremio.js +0 -2
- package/lib/services/dremio.js.map +0 -1
- package/lib/services/edge.d.ts.map +0 -1
- package/lib/services/edge.js +0 -29
- package/lib/services/edge.js.map +0 -1
- package/lib/services/functions.d.ts.map +0 -1
- package/lib/services/functions.js +0 -28
- package/lib/services/functions.js.map +0 -1
- package/lib/services/git.d.ts.map +0 -1
- package/lib/services/git.js +0 -41
- package/lib/services/git.js.map +0 -1
- package/lib/services/intake.d.ts.map +0 -1
- package/lib/services/intake.js +0 -31
- package/lib/services/intake.js.map +0 -1
- package/lib/services/lb_ip_lists.d.ts.map +0 -1
- package/lib/services/lb_ip_lists.js +0 -2
- package/lib/services/lb_ip_lists.js.map +0 -1
- package/lib/services/mailout.d.ts.map +0 -1
- package/lib/services/mailout.js +0 -33
- package/lib/services/mailout.js.map +0 -1
- package/lib/services/pubsub.d.ts.map +0 -1
- package/lib/services/pubsub.js +0 -39
- package/lib/services/pubsub.js.map +0 -1
- package/lib/services/sca.d.ts.map +0 -1
- package/lib/services/sca.js +0 -35
- package/lib/services/sca.js.map +0 -1
- package/lib/services/workflows.d.ts.map +0 -1
- package/lib/services/workflows.js +0 -29
- package/lib/services/workflows.js.map +0 -1
- package/lib/services.lazy/dremio.js +0 -1
- package/lib/services.lazy/lb_ip_lists.js +0 -1
- package/lib/services.lazy/mailout.js +0 -4
- /package/lib/{services → unstable-services}/functions.d.ts +0 -0
package/src/protocol.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { Checked } from "@distilled.cloud/core/config";
|
|
2
|
+
import { InternalServerError } from "@distilled.cloud/core/errors";
|
|
3
|
+
import type {
|
|
4
|
+
DecodeArgs,
|
|
5
|
+
EncodeArgs,
|
|
6
|
+
ErrorOf,
|
|
7
|
+
Protocol,
|
|
8
|
+
ProtocolOf,
|
|
9
|
+
} from "@distilled.cloud/core/protocol";
|
|
8
10
|
import {
|
|
9
11
|
buildRequest,
|
|
10
12
|
getAnn,
|
|
@@ -12,6 +14,7 @@ import {
|
|
|
12
14
|
matchTypedError,
|
|
13
15
|
} from "@distilled.cloud/core/protocol-http";
|
|
14
16
|
import {
|
|
17
|
+
declaredStatusClass,
|
|
15
18
|
type RestErrorEnvelope,
|
|
16
19
|
unwrapRedactedDeep,
|
|
17
20
|
validateSuccess,
|
|
@@ -32,34 +35,26 @@ import { httpSymbol } from "@distilled.cloud/core/trait";
|
|
|
32
35
|
* Auth is `Authorization: Bearer <token>`. The API version is a PATH
|
|
33
36
|
* segment (`/v1`, `/v2`, ...), so the generated operations carry versioned
|
|
34
37
|
* routes against a version-less host.
|
|
38
|
+
*
|
|
39
|
+
* A failed status becomes the operation's typed error, then core's class
|
|
40
|
+
* for the status, which the service declares (`StackitServiceErrors`).
|
|
35
41
|
*/
|
|
36
42
|
import * as Effect from "effect/Effect";
|
|
37
43
|
import type * as HttpClient from "effect/http/HttpClient";
|
|
38
|
-
import type * as HttpClientError from "effect/http/HttpClientError";
|
|
39
|
-
import type * as HttpClientRequest from "effect/http/HttpClientRequest";
|
|
40
|
-
import type * as HttpClientResponse from "effect/http/HttpClientResponse";
|
|
41
|
-
import * as Layer from "effect/Layer";
|
|
42
44
|
import * as Redacted from "effect/Redacted";
|
|
43
45
|
import type * as AST from "effect/SchemaAST";
|
|
44
46
|
import { Credentials, type Config } from "./credentials.ts";
|
|
45
|
-
import { StackitParseError, UnknownStackitError } from "./errors.ts";
|
|
46
|
-
import type { DefaultErrors } from "./errors.ts";
|
|
47
|
+
import { StackitParseError, UnknownStackitError, type StackitServiceError } from "./errors.ts";
|
|
47
48
|
import type { StackitHttpTrait } from "./traits.ts";
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
|
-
*
|
|
51
|
-
* service
|
|
52
|
-
*
|
|
53
|
-
*
|
|
51
|
+
* What every generated STACKIT operation fails with besides its own errors:
|
|
52
|
+
* the service's errors, the protocol's, and what resolving the credentials
|
|
53
|
+
* fails with. Generated service files annotate operations with
|
|
54
|
+
* `API.OperationMethod<I, O, StackitOpError, StackitOpContext>` explicitly
|
|
55
|
+
* so the compiler never infers these back out of the schema generics.
|
|
54
56
|
*/
|
|
55
|
-
export type StackitOpError =
|
|
56
|
-
| DefaultErrors
|
|
57
|
-
| UnknownStackitError
|
|
58
|
-
| StackitParseError
|
|
59
|
-
| ConfigError
|
|
60
|
-
| HttpClientError.HttpClientError
|
|
61
|
-
| InvalidInput
|
|
62
|
-
| SdkError;
|
|
57
|
+
export type StackitOpError = StackitServiceError | ErrorOf<typeof StackitProtocol>;
|
|
63
58
|
|
|
64
59
|
/** Context (requirements) shared by every generated STACKIT operation. */
|
|
65
60
|
export type StackitOpContext = Credentials | HttpClient.HttpClient;
|
|
@@ -104,12 +99,12 @@ const errorEnvelope = (body: unknown): RestErrorEnvelope | undefined => {
|
|
|
104
99
|
return { code, message };
|
|
105
100
|
};
|
|
106
101
|
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
const baseUrlFor = (creds: Config, inputAst: AST.AST): string | SdkError => {
|
|
102
|
+
const baseUrlFor = (creds: Checked<Config>, inputAst: AST.AST): string | SdkError => {
|
|
110
103
|
if (creds.apiBaseUrl !== undefined && creds.apiBaseUrl !== "") {
|
|
111
104
|
return creds.apiBaseUrl;
|
|
112
105
|
}
|
|
106
|
+
// The region becomes a label of the host name; `check` in
|
|
107
|
+
// ./credentials.ts made sure it can.
|
|
113
108
|
const http = getAnn(inputAst, httpSymbol) as StackitHttpTrait | undefined;
|
|
114
109
|
const specUrl = http?.baseUrl;
|
|
115
110
|
if (typeof specUrl !== "string" || specUrl === "") {
|
|
@@ -120,112 +115,98 @@ const baseUrlFor = (creds: Config, inputAst: AST.AST): string | SdkError => {
|
|
|
120
115
|
return applyRegion(specUrl, creds.region);
|
|
121
116
|
};
|
|
122
117
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}) =>
|
|
150
|
-
Effect.gen(function* () {
|
|
151
|
-
const text = (yield* response.text.pipe(Effect.catch(fail))) ?? "";
|
|
152
|
-
let json: unknown;
|
|
153
|
-
let nonJson = false;
|
|
154
|
-
if (text.trim().length > 0) {
|
|
155
|
-
try {
|
|
156
|
-
json = JSON.parse(text);
|
|
157
|
-
} catch {
|
|
158
|
-
nonJson = true;
|
|
159
|
-
}
|
|
118
|
+
const stackitProtocolMethods = {
|
|
119
|
+
encode: ({ input, inputAst }: EncodeArgs) =>
|
|
120
|
+
Effect.gen(function* () {
|
|
121
|
+
const resolve = yield* Credentials;
|
|
122
|
+
const creds = yield* resolve;
|
|
123
|
+
const baseUrl = baseUrlFor(creds, inputAst);
|
|
124
|
+
if (typeof baseUrl !== "string") return yield* baseUrl;
|
|
125
|
+
return yield* buildRequest({
|
|
126
|
+
input: unwrapRedactedDeep(input),
|
|
127
|
+
inputAst,
|
|
128
|
+
baseUrl,
|
|
129
|
+
headers: {
|
|
130
|
+
Authorization: `Bearer ${Redacted.value(creds.token)}`,
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
}),
|
|
134
|
+
decode: ({ response, outputAst, errors: errorClasses }: DecodeArgs) =>
|
|
135
|
+
Effect.gen(function* () {
|
|
136
|
+
const text = (yield* response.text) ?? "";
|
|
137
|
+
let json: unknown;
|
|
138
|
+
let nonJson = false;
|
|
139
|
+
if (text.trim().length > 0) {
|
|
140
|
+
try {
|
|
141
|
+
json = JSON.parse(text);
|
|
142
|
+
} catch {
|
|
143
|
+
nonJson = true;
|
|
160
144
|
}
|
|
161
|
-
|
|
162
|
-
|
|
145
|
+
}
|
|
146
|
+
const status = response.status;
|
|
147
|
+
const headers = response.headers as Record<string, string | undefined>;
|
|
163
148
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
149
|
+
if (status >= 400) {
|
|
150
|
+
const env = (nonJson ? undefined : errorEnvelope(json)) ?? {};
|
|
151
|
+
const message = env.message ?? (nonJson && text.trim() ? text.trim() : `HTTP ${status}`);
|
|
167
152
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
const StatusErrorClass = (
|
|
182
|
-
HTTP_STATUS_MAP as Record<
|
|
183
|
-
number,
|
|
184
|
-
(new (args: { message: string; retryAfter?: unknown }) => unknown) | undefined
|
|
185
|
-
>
|
|
186
|
-
)[status];
|
|
187
|
-
if (StatusErrorClass) {
|
|
188
|
-
return yield* fail(
|
|
189
|
-
new StatusErrorClass({
|
|
190
|
-
message,
|
|
191
|
-
retryAfter: parseRetryAfterForStatus(status, headers),
|
|
192
|
-
}),
|
|
193
|
-
);
|
|
194
|
-
}
|
|
153
|
+
const typed = matchTypedError(
|
|
154
|
+
errorClasses,
|
|
155
|
+
status,
|
|
156
|
+
[
|
|
157
|
+
{
|
|
158
|
+
code: typeof env.code === "number" ? env.code : undefined,
|
|
159
|
+
message,
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
{ body: nonJson ? text : json, headers },
|
|
163
|
+
);
|
|
164
|
+
if (typed !== undefined) return yield* Effect.fail(typed);
|
|
195
165
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
)
|
|
203
|
-
|
|
166
|
+
const StatusErrorClass = declaredStatusClass(status, errorClasses);
|
|
167
|
+
if (StatusErrorClass) {
|
|
168
|
+
return yield* Effect.fail(
|
|
169
|
+
new StatusErrorClass({
|
|
170
|
+
message,
|
|
171
|
+
retryAfter: parseRetryAfterForStatus(status, headers),
|
|
172
|
+
}),
|
|
173
|
+
);
|
|
174
|
+
}
|
|
204
175
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
code:
|
|
209
|
-
typeof env.code === "string"
|
|
210
|
-
? env.code
|
|
211
|
-
: env.code !== undefined
|
|
212
|
-
? String(env.code)
|
|
213
|
-
: undefined,
|
|
176
|
+
if (status >= 500) {
|
|
177
|
+
return yield* Effect.fail(
|
|
178
|
+
new InternalServerError({
|
|
214
179
|
message,
|
|
215
|
-
|
|
180
|
+
retryAfter: parseRetryAfterForStatus(status, headers),
|
|
216
181
|
}),
|
|
217
182
|
);
|
|
218
183
|
}
|
|
219
184
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
)
|
|
185
|
+
return yield* Effect.fail(
|
|
186
|
+
new UnknownStackitError({
|
|
187
|
+
status,
|
|
188
|
+
code:
|
|
189
|
+
typeof env.code === "string"
|
|
190
|
+
? env.code
|
|
191
|
+
: env.code !== undefined
|
|
192
|
+
? String(env.code)
|
|
193
|
+
: undefined,
|
|
194
|
+
message,
|
|
195
|
+
body: nonJson ? text : json,
|
|
196
|
+
}),
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Strict mode checks the mapped body against the output schema, and
|
|
201
|
+
// parse errors withhold a body that can hold a secret (core
|
|
202
|
+
// `validateSuccess`).
|
|
203
|
+
const body: unknown = nonJson ? text : json === undefined ? {} : json;
|
|
204
|
+
return yield* validateSuccess(
|
|
205
|
+
outputAst,
|
|
206
|
+
{ value: mapKeys(outputAst, body, "decode"), body: nonJson ? text : json, nonJson },
|
|
207
|
+
(info) => new StackitParseError(info),
|
|
208
|
+
);
|
|
209
|
+
}),
|
|
210
|
+
} satisfies Protocol<unknown, unknown>;
|
|
211
|
+
|
|
212
|
+
export const StackitProtocol: ProtocolOf<typeof stackitProtocolMethods> = stackitProtocolMethods;
|
package/src/services/alb.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as C from "@distilled.cloud/core/category";
|
|
|
4
4
|
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
5
|
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
6
|
import type * as Redacted from "effect/Redacted";
|
|
7
|
-
import {
|
|
7
|
+
import { StackitServiceErrors } from "../errors.ts";
|
|
8
8
|
import { StackitProtocol, type StackitOpError, type StackitOpContext } from "../protocol.ts";
|
|
9
9
|
import * as Retry from "../retry.ts";
|
|
10
10
|
import * as T from "../traits.ts";
|
|
@@ -31,6 +31,8 @@ export class BadRequest
|
|
|
31
31
|
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
32
32
|
code: S.Number,
|
|
33
33
|
message: S.String,
|
|
34
|
+
body: /*@__PURE__*/ S.optional(S.Unknown),
|
|
35
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
34
36
|
}).pipe(C.withBadRequestError),
|
|
35
37
|
[{ status: 400 }],
|
|
36
38
|
) {}
|
|
@@ -40,6 +42,8 @@ export class Conflict
|
|
|
40
42
|
/*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
|
|
41
43
|
code: S.Number,
|
|
42
44
|
message: S.String,
|
|
45
|
+
body: /*@__PURE__*/ S.optional(S.Unknown),
|
|
46
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
43
47
|
}).pipe(C.withConflictError),
|
|
44
48
|
[{ status: 409 }],
|
|
45
49
|
) {}
|
|
@@ -49,6 +53,8 @@ export class Forbidden
|
|
|
49
53
|
/*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
|
|
50
54
|
code: S.Number,
|
|
51
55
|
message: S.String,
|
|
56
|
+
body: /*@__PURE__*/ S.optional(S.Unknown),
|
|
57
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
52
58
|
}).pipe(C.withAuthError),
|
|
53
59
|
[{ status: 403 }],
|
|
54
60
|
) {}
|
|
@@ -58,6 +64,8 @@ export class NotFound
|
|
|
58
64
|
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
59
65
|
code: S.Number,
|
|
60
66
|
message: S.String,
|
|
67
|
+
body: /*@__PURE__*/ S.optional(S.Unknown),
|
|
68
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
61
69
|
}).pipe(C.withBadRequestError),
|
|
62
70
|
[{ status: 404 }],
|
|
63
71
|
) {}
|
|
@@ -531,7 +539,8 @@ export const createCredentials: API.OperationMethod<
|
|
|
531
539
|
> = /*@__PURE__*/ API.make(() => ({
|
|
532
540
|
input: __S(224, __c7, 0) as any as S.Schema<CreateCredentialsRequest>,
|
|
533
541
|
output: __S(288, __c9, 0) as any as S.Schema<CreateCredentialsResponse>,
|
|
534
|
-
errors: [BadRequest, Forbidden
|
|
542
|
+
errors: [BadRequest, Forbidden],
|
|
543
|
+
serviceErrors: StackitServiceErrors,
|
|
535
544
|
protocol: StackitProtocol,
|
|
536
545
|
retry: Retry.Retry,
|
|
537
546
|
telemetry: TELEMETRY,
|
|
@@ -548,7 +557,8 @@ export const createLoadBalancer: API.OperationMethod<
|
|
|
548
557
|
> = /*@__PURE__*/ API.make(() => ({
|
|
549
558
|
input: __S(320, __c10, 0) as any as S.Schema<CreateLoadBalancerRequest>,
|
|
550
559
|
output: __S(376, __c11, 24) as any as S.Schema<LoadBalancer>,
|
|
551
|
-
errors: [BadRequest, Forbidden, Conflict
|
|
560
|
+
errors: [BadRequest, Forbidden, Conflict],
|
|
561
|
+
serviceErrors: StackitServiceErrors,
|
|
552
562
|
protocol: StackitProtocol,
|
|
553
563
|
retry: Retry.Retry,
|
|
554
564
|
telemetry: TELEMETRY,
|
|
@@ -565,7 +575,8 @@ export const deleteCredentials: API.OperationMethod<
|
|
|
565
575
|
> = /*@__PURE__*/ API.make(() => ({
|
|
566
576
|
input: __S(416, __c13, 0) as any as S.Schema<DeleteCredentialsRequest>,
|
|
567
577
|
output: __S(448, __c14, 0) as any as S.Schema<DeleteCredentialsResponse2>,
|
|
568
|
-
errors: [BadRequest, Forbidden
|
|
578
|
+
errors: [BadRequest, Forbidden],
|
|
579
|
+
serviceErrors: StackitServiceErrors,
|
|
569
580
|
protocol: StackitProtocol,
|
|
570
581
|
retry: Retry.Retry,
|
|
571
582
|
telemetry: TELEMETRY,
|
|
@@ -582,7 +593,8 @@ export const deleteLoadBalancer: API.OperationMethod<
|
|
|
582
593
|
> = /*@__PURE__*/ API.make(() => ({
|
|
583
594
|
input: __S(480, __c15, 0) as any as S.Schema<DeleteLoadBalancerRequest>,
|
|
584
595
|
output: __S(448, __c14, 0) as any as S.Schema<DeleteLoadBalancerResponse2>,
|
|
585
|
-
errors: [BadRequest, Forbidden
|
|
596
|
+
errors: [BadRequest, Forbidden],
|
|
597
|
+
serviceErrors: StackitServiceErrors,
|
|
586
598
|
protocol: StackitProtocol,
|
|
587
599
|
retry: Retry.Retry,
|
|
588
600
|
telemetry: TELEMETRY,
|
|
@@ -599,7 +611,8 @@ export const getCredentials: API.OperationMethod<
|
|
|
599
611
|
> = /*@__PURE__*/ API.make(() => ({
|
|
600
612
|
input: __S(512, __c16, 0) as any as S.Schema<GetCredentialsRequest>,
|
|
601
613
|
output: __S(288, __c9, 0) as any as S.Schema<GetCredentialsResponse>,
|
|
602
|
-
errors: [BadRequest, Forbidden, NotFound
|
|
614
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
615
|
+
serviceErrors: StackitServiceErrors,
|
|
603
616
|
protocol: StackitProtocol,
|
|
604
617
|
retry: Retry.Retry,
|
|
605
618
|
telemetry: TELEMETRY,
|
|
@@ -616,7 +629,8 @@ export const getLoadBalancer: API.OperationMethod<
|
|
|
616
629
|
> = /*@__PURE__*/ API.make(() => ({
|
|
617
630
|
input: __S(544, __c17, 0) as any as S.Schema<GetLoadBalancerRequest>,
|
|
618
631
|
output: __S(376, __c11, 24) as any as S.Schema<LoadBalancer>,
|
|
619
|
-
errors: [BadRequest, Forbidden, NotFound
|
|
632
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
633
|
+
serviceErrors: StackitServiceErrors,
|
|
620
634
|
protocol: StackitProtocol,
|
|
621
635
|
retry: Retry.Retry,
|
|
622
636
|
telemetry: TELEMETRY,
|
|
@@ -633,7 +647,8 @@ export const getQuota: API.OperationMethod<
|
|
|
633
647
|
> = /*@__PURE__*/ API.make(() => ({
|
|
634
648
|
input: __S(0, __c0, 0) as any as S.Schema<GetQuotaRequest>,
|
|
635
649
|
output: __S(1, __c0, 1) as any as S.Schema<GetQuotaResponse>,
|
|
636
|
-
errors: [BadRequest, Forbidden
|
|
650
|
+
errors: [BadRequest, Forbidden],
|
|
651
|
+
serviceErrors: StackitServiceErrors,
|
|
637
652
|
protocol: StackitProtocol,
|
|
638
653
|
retry: Retry.Retry,
|
|
639
654
|
telemetry: TELEMETRY,
|
|
@@ -650,7 +665,8 @@ export const listCredentials: API.OperationMethod<
|
|
|
650
665
|
> = /*@__PURE__*/ API.make(() => ({
|
|
651
666
|
input: __S(32, __c1, 0) as any as S.Schema<ListCredentialsRequest>,
|
|
652
667
|
output: __S(34, __c1, 2) as any as S.Schema<ListCredentialsResponse>,
|
|
653
|
-
errors: [BadRequest, Forbidden
|
|
668
|
+
errors: [BadRequest, Forbidden],
|
|
669
|
+
serviceErrors: StackitServiceErrors,
|
|
654
670
|
protocol: StackitProtocol,
|
|
655
671
|
retry: Retry.Retry,
|
|
656
672
|
telemetry: TELEMETRY,
|
|
@@ -667,7 +683,8 @@ export const listLoadBalancers: API.OperationMethod<
|
|
|
667
683
|
> = /*@__PURE__*/ API.make(() => ({
|
|
668
684
|
input: __S(64, __c2, 0) as any as S.Schema<ListLoadBalancersRequest>,
|
|
669
685
|
output: __S(66, __c2, 2) as any as S.Schema<ListLoadBalancersResponse>,
|
|
670
|
-
errors: [BadRequest, Forbidden
|
|
686
|
+
errors: [BadRequest, Forbidden],
|
|
687
|
+
serviceErrors: StackitServiceErrors,
|
|
671
688
|
protocol: StackitProtocol,
|
|
672
689
|
retry: Retry.Retry,
|
|
673
690
|
telemetry: TELEMETRY,
|
|
@@ -684,7 +701,8 @@ export const listPlans: API.OperationMethod<
|
|
|
684
701
|
> = /*@__PURE__*/ API.make(() => ({
|
|
685
702
|
input: __S(96, __c3, 0) as any as S.Schema<ListPlansRequest>,
|
|
686
703
|
output: __S(99, __c3, 3) as any as S.Schema<ListPlansResponse>,
|
|
687
|
-
errors: [BadRequest, Forbidden
|
|
704
|
+
errors: [BadRequest, Forbidden],
|
|
705
|
+
serviceErrors: StackitServiceErrors,
|
|
688
706
|
protocol: StackitProtocol,
|
|
689
707
|
retry: Retry.Retry,
|
|
690
708
|
telemetry: TELEMETRY,
|
|
@@ -701,7 +719,8 @@ export const updateCredentials: API.OperationMethod<
|
|
|
701
719
|
> = /*@__PURE__*/ API.make(() => ({
|
|
702
720
|
input: __S(128, __c4, 0) as any as S.Schema<UpdateCredentialsRequest>,
|
|
703
721
|
output: __S(288, __c9, 0) as any as S.Schema<UpdateCredentialsResponse>,
|
|
704
|
-
errors: [BadRequest, Forbidden, NotFound
|
|
722
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
723
|
+
serviceErrors: StackitServiceErrors,
|
|
705
724
|
protocol: StackitProtocol,
|
|
706
725
|
retry: Retry.Retry,
|
|
707
726
|
telemetry: TELEMETRY,
|
|
@@ -718,7 +737,8 @@ export const updateLoadBalancer: API.OperationMethod<
|
|
|
718
737
|
> = /*@__PURE__*/ API.make(() => ({
|
|
719
738
|
input: __S(160, __c5, 0) as any as S.Schema<UpdateLoadBalancerRequest>,
|
|
720
739
|
output: __S(376, __c11, 24) as any as S.Schema<LoadBalancer>,
|
|
721
|
-
errors: [BadRequest, Forbidden, Conflict
|
|
740
|
+
errors: [BadRequest, Forbidden, Conflict],
|
|
741
|
+
serviceErrors: StackitServiceErrors,
|
|
722
742
|
protocol: StackitProtocol,
|
|
723
743
|
retry: Retry.Retry,
|
|
724
744
|
telemetry: TELEMETRY,
|
|
@@ -735,7 +755,8 @@ export const updateTargetPool: API.OperationMethod<
|
|
|
735
755
|
> = /*@__PURE__*/ API.make(() => ({
|
|
736
756
|
input: __S(192, __c6, 0) as any as S.Schema<UpdateTargetPoolRequest>,
|
|
737
757
|
output: __S(390, __c12, 6) as any as S.Schema<TargetPool>,
|
|
738
|
-
errors: [BadRequest, Forbidden
|
|
758
|
+
errors: [BadRequest, Forbidden],
|
|
759
|
+
serviceErrors: StackitServiceErrors,
|
|
739
760
|
protocol: StackitProtocol,
|
|
740
761
|
retry: Retry.Retry,
|
|
741
762
|
telemetry: TELEMETRY,
|
package/src/services/alb_waf.ts
CHANGED
|
@@ -3,7 +3,7 @@ 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
4
|
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
5
|
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
-
import {
|
|
6
|
+
import { StackitServiceErrors } from "../errors.ts";
|
|
7
7
|
import { StackitProtocol, type StackitOpError, type StackitOpContext } from "../protocol.ts";
|
|
8
8
|
import * as Retry from "../retry.ts";
|
|
9
9
|
import * as T from "../traits.ts";
|
|
@@ -30,6 +30,8 @@ export class BadRequest
|
|
|
30
30
|
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
31
31
|
code: S.Number,
|
|
32
32
|
message: S.String,
|
|
33
|
+
body: /*@__PURE__*/ S.optional(S.Unknown),
|
|
34
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
33
35
|
}).pipe(C.withBadRequestError),
|
|
34
36
|
[{ status: 400 }],
|
|
35
37
|
) {}
|
|
@@ -39,6 +41,8 @@ export class Conflict
|
|
|
39
41
|
/*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
|
|
40
42
|
code: S.Number,
|
|
41
43
|
message: S.String,
|
|
44
|
+
body: /*@__PURE__*/ S.optional(S.Unknown),
|
|
45
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
42
46
|
}).pipe(C.withConflictError),
|
|
43
47
|
[{ status: 409 }],
|
|
44
48
|
) {}
|
|
@@ -48,6 +52,8 @@ export class Forbidden
|
|
|
48
52
|
/*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
|
|
49
53
|
code: S.Number,
|
|
50
54
|
message: S.String,
|
|
55
|
+
body: /*@__PURE__*/ S.optional(S.Unknown),
|
|
56
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
51
57
|
}).pipe(C.withAuthError),
|
|
52
58
|
[{ status: 403 }],
|
|
53
59
|
) {}
|
|
@@ -57,6 +63,8 @@ export class NotFound
|
|
|
57
63
|
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
58
64
|
code: S.Number,
|
|
59
65
|
message: S.String,
|
|
66
|
+
body: /*@__PURE__*/ S.optional(S.Unknown),
|
|
67
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
60
68
|
}).pipe(C.withBadRequestError),
|
|
61
69
|
[{ status: 404 }],
|
|
62
70
|
) {}
|
|
@@ -469,7 +477,8 @@ export const createCustomRuleGroup: API.OperationMethod<
|
|
|
469
477
|
> = /*@__PURE__*/ API.make(() => ({
|
|
470
478
|
input: __S(80, __c10, 0) as any as S.Schema<CreateCustomRuleGroupRequest>,
|
|
471
479
|
output: __S(95, __c11, 7) as any as S.Schema<GetCustomRuleGroupResponse>,
|
|
472
|
-
errors: [BadRequest, Forbidden
|
|
480
|
+
errors: [BadRequest, Forbidden],
|
|
481
|
+
serviceErrors: StackitServiceErrors,
|
|
473
482
|
protocol: StackitProtocol,
|
|
474
483
|
retry: Retry.Retry,
|
|
475
484
|
telemetry: TELEMETRY,
|
|
@@ -486,7 +495,8 @@ export const createManagedRuleSet: API.OperationMethod<
|
|
|
486
495
|
> = /*@__PURE__*/ API.make(() => ({
|
|
487
496
|
input: __S(120, __c15, 0) as any as S.Schema<CreateManagedRuleSetRequest>,
|
|
488
497
|
output: __S(132, __c16, 4) as any as S.Schema<GetManagedRuleSetResponse>,
|
|
489
|
-
errors: [BadRequest, Forbidden
|
|
498
|
+
errors: [BadRequest, Forbidden],
|
|
499
|
+
serviceErrors: StackitServiceErrors,
|
|
490
500
|
protocol: StackitProtocol,
|
|
491
501
|
retry: Retry.Retry,
|
|
492
502
|
telemetry: TELEMETRY,
|
|
@@ -503,7 +513,8 @@ export const createWAF: API.OperationMethod<
|
|
|
503
513
|
> = /*@__PURE__*/ API.make(() => ({
|
|
504
514
|
input: __S(136, __c17, 0) as any as S.Schema<CreateWAFRequest>,
|
|
505
515
|
output: __S(148, __c18, 4) as any as S.Schema<GetWAFResponse>,
|
|
506
|
-
errors: [BadRequest, Forbidden
|
|
516
|
+
errors: [BadRequest, Forbidden],
|
|
517
|
+
serviceErrors: StackitServiceErrors,
|
|
507
518
|
protocol: StackitProtocol,
|
|
508
519
|
retry: Retry.Retry,
|
|
509
520
|
telemetry: TELEMETRY,
|
|
@@ -520,7 +531,8 @@ export const deleteCustomRuleGroup: API.OperationMethod<
|
|
|
520
531
|
> = /*@__PURE__*/ API.make(() => ({
|
|
521
532
|
input: __S(152, __c19, 0) as any as S.Schema<DeleteCustomRuleGroupRequest>,
|
|
522
533
|
output: __S(160, __c20, 0) as any as S.Schema<DeleteCustomRuleGroupResponse2>,
|
|
523
|
-
errors: [BadRequest, Forbidden
|
|
534
|
+
errors: [BadRequest, Forbidden],
|
|
535
|
+
serviceErrors: StackitServiceErrors,
|
|
524
536
|
protocol: StackitProtocol,
|
|
525
537
|
retry: Retry.Retry,
|
|
526
538
|
telemetry: TELEMETRY,
|
|
@@ -537,7 +549,8 @@ export const deleteManagedRuleSet: API.OperationMethod<
|
|
|
537
549
|
> = /*@__PURE__*/ API.make(() => ({
|
|
538
550
|
input: __S(168, __c21, 0) as any as S.Schema<DeleteManagedRuleSetRequest>,
|
|
539
551
|
output: __S(160, __c20, 0) as any as S.Schema<DeleteManagedRuleSetResponse2>,
|
|
540
|
-
errors: [BadRequest, Forbidden
|
|
552
|
+
errors: [BadRequest, Forbidden],
|
|
553
|
+
serviceErrors: StackitServiceErrors,
|
|
541
554
|
protocol: StackitProtocol,
|
|
542
555
|
retry: Retry.Retry,
|
|
543
556
|
telemetry: TELEMETRY,
|
|
@@ -554,7 +567,8 @@ export const deleteWAF: API.OperationMethod<
|
|
|
554
567
|
> = /*@__PURE__*/ API.make(() => ({
|
|
555
568
|
input: __S(176, __c22, 0) as any as S.Schema<DeleteWAFRequest>,
|
|
556
569
|
output: __S(160, __c20, 0) as any as S.Schema<DeleteWAFResponse2>,
|
|
557
|
-
errors: [BadRequest, Forbidden
|
|
570
|
+
errors: [BadRequest, Forbidden],
|
|
571
|
+
serviceErrors: StackitServiceErrors,
|
|
558
572
|
protocol: StackitProtocol,
|
|
559
573
|
retry: Retry.Retry,
|
|
560
574
|
telemetry: TELEMETRY,
|
|
@@ -571,7 +585,8 @@ export const getCustomRuleGroup: API.OperationMethod<
|
|
|
571
585
|
> = /*@__PURE__*/ API.make(() => ({
|
|
572
586
|
input: __S(0, __c0, 0) as any as S.Schema<GetCustomRuleGroupRequest>,
|
|
573
587
|
output: __S(95, __c11, 7) as any as S.Schema<GetCustomRuleGroupResponse>,
|
|
574
|
-
errors: [BadRequest, Forbidden, NotFound
|
|
588
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
589
|
+
serviceErrors: StackitServiceErrors,
|
|
575
590
|
protocol: StackitProtocol,
|
|
576
591
|
retry: Retry.Retry,
|
|
577
592
|
telemetry: TELEMETRY,
|
|
@@ -588,7 +603,8 @@ export const getManagedRuleSet: API.OperationMethod<
|
|
|
588
603
|
> = /*@__PURE__*/ API.make(() => ({
|
|
589
604
|
input: __S(8, __c1, 0) as any as S.Schema<GetManagedRuleSetRequest>,
|
|
590
605
|
output: __S(132, __c16, 4) as any as S.Schema<GetManagedRuleSetResponse>,
|
|
591
|
-
errors: [BadRequest, Forbidden, NotFound
|
|
606
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
607
|
+
serviceErrors: StackitServiceErrors,
|
|
592
608
|
protocol: StackitProtocol,
|
|
593
609
|
retry: Retry.Retry,
|
|
594
610
|
telemetry: TELEMETRY,
|
|
@@ -605,7 +621,8 @@ export const getQuota: API.OperationMethod<
|
|
|
605
621
|
> = /*@__PURE__*/ API.make(() => ({
|
|
606
622
|
input: __S(16, __c2, 0) as any as S.Schema<GetQuotaRequest>,
|
|
607
623
|
output: __S(19, __c2, 3) as any as S.Schema<GetQuotaResponse>,
|
|
608
|
-
errors: [BadRequest, Forbidden
|
|
624
|
+
errors: [BadRequest, Forbidden],
|
|
625
|
+
serviceErrors: StackitServiceErrors,
|
|
609
626
|
protocol: StackitProtocol,
|
|
610
627
|
retry: Retry.Retry,
|
|
611
628
|
telemetry: TELEMETRY,
|
|
@@ -622,7 +639,8 @@ export const getWAF: API.OperationMethod<
|
|
|
622
639
|
> = /*@__PURE__*/ API.make(() => ({
|
|
623
640
|
input: __S(24, __c3, 0) as any as S.Schema<GetWAFRequest>,
|
|
624
641
|
output: __S(148, __c18, 4) as any as S.Schema<GetWAFResponse>,
|
|
625
|
-
errors: [BadRequest, Forbidden, NotFound
|
|
642
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
643
|
+
serviceErrors: StackitServiceErrors,
|
|
626
644
|
protocol: StackitProtocol,
|
|
627
645
|
retry: Retry.Retry,
|
|
628
646
|
telemetry: TELEMETRY,
|
|
@@ -639,7 +657,8 @@ export const listCustomRuleGroup: API.OperationMethod<
|
|
|
639
657
|
> = /*@__PURE__*/ API.make(() => ({
|
|
640
658
|
input: __S(32, __c4, 0) as any as S.Schema<ListCustomRuleGroupRequest>,
|
|
641
659
|
output: __S(34, __c4, 2) as any as S.Schema<ListCustomRuleGroupResponse>,
|
|
642
|
-
errors: [BadRequest, Forbidden
|
|
660
|
+
errors: [BadRequest, Forbidden],
|
|
661
|
+
serviceErrors: StackitServiceErrors,
|
|
643
662
|
protocol: StackitProtocol,
|
|
644
663
|
retry: Retry.Retry,
|
|
645
664
|
telemetry: TELEMETRY,
|
|
@@ -656,7 +675,8 @@ export const listManagedRuleSets: API.OperationMethod<
|
|
|
656
675
|
> = /*@__PURE__*/ API.make(() => ({
|
|
657
676
|
input: __S(40, __c5, 0) as any as S.Schema<ListManagedRuleSetsRequest>,
|
|
658
677
|
output: __S(43, __c5, 3) as any as S.Schema<ListManagedRuleSetResponse>,
|
|
659
|
-
errors: [BadRequest, Forbidden
|
|
678
|
+
errors: [BadRequest, Forbidden],
|
|
679
|
+
serviceErrors: StackitServiceErrors,
|
|
660
680
|
protocol: StackitProtocol,
|
|
661
681
|
retry: Retry.Retry,
|
|
662
682
|
telemetry: TELEMETRY,
|
|
@@ -673,7 +693,8 @@ export const listWAF: API.OperationMethod<
|
|
|
673
693
|
> = /*@__PURE__*/ API.make(() => ({
|
|
674
694
|
input: __S(48, __c6, 0) as any as S.Schema<ListWAFRequest>,
|
|
675
695
|
output: __S(50, __c6, 2) as any as S.Schema<ListWAFResponse>,
|
|
676
|
-
errors: [BadRequest, Forbidden
|
|
696
|
+
errors: [BadRequest, Forbidden],
|
|
697
|
+
serviceErrors: StackitServiceErrors,
|
|
677
698
|
protocol: StackitProtocol,
|
|
678
699
|
retry: Retry.Retry,
|
|
679
700
|
telemetry: TELEMETRY,
|
|
@@ -690,7 +711,8 @@ export const patchManagedRuleSet: API.OperationMethod<
|
|
|
690
711
|
> = /*@__PURE__*/ API.make(() => ({
|
|
691
712
|
input: __S(60, __c7, 4) as any as S.Schema<PatchManagedRuleSetRequest>,
|
|
692
713
|
output: __S(132, __c16, 4) as any as S.Schema<GetManagedRuleSetResponse>,
|
|
693
|
-
errors: [BadRequest, Forbidden, NotFound
|
|
714
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
715
|
+
serviceErrors: StackitServiceErrors,
|
|
694
716
|
protocol: StackitProtocol,
|
|
695
717
|
retry: Retry.Retry,
|
|
696
718
|
telemetry: TELEMETRY,
|
|
@@ -707,7 +729,8 @@ export const updateCustomRuleGroup: API.OperationMethod<
|
|
|
707
729
|
> = /*@__PURE__*/ API.make(() => ({
|
|
708
730
|
input: __S(64, __c8, 0) as any as S.Schema<UpdateCustomRuleGroupRequest>,
|
|
709
731
|
output: __S(95, __c11, 7) as any as S.Schema<GetCustomRuleGroupResponse>,
|
|
710
|
-
errors: [BadRequest, Forbidden
|
|
732
|
+
errors: [BadRequest, Forbidden],
|
|
733
|
+
serviceErrors: StackitServiceErrors,
|
|
711
734
|
protocol: StackitProtocol,
|
|
712
735
|
retry: Retry.Retry,
|
|
713
736
|
telemetry: TELEMETRY,
|
|
@@ -724,7 +747,8 @@ export const updateWAF: API.OperationMethod<
|
|
|
724
747
|
> = /*@__PURE__*/ API.make(() => ({
|
|
725
748
|
input: __S(72, __c9, 0) as any as S.Schema<UpdateWAFRequest>,
|
|
726
749
|
output: __S(148, __c18, 4) as any as S.Schema<GetWAFResponse>,
|
|
727
|
-
errors: [BadRequest, Forbidden, Conflict
|
|
750
|
+
errors: [BadRequest, Forbidden, Conflict],
|
|
751
|
+
serviceErrors: StackitServiceErrors,
|
|
728
752
|
protocol: StackitProtocol,
|
|
729
753
|
retry: Retry.Retry,
|
|
730
754
|
telemetry: TELEMETRY,
|