@distilled.cloud/stackit 1.0.0-rc.15 → 1.0.0-rc.16
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/credentials.d.ts +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +32 -28
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +13 -13
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +16 -16
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +22 -22
- package/lib/pagination.d.ts +1 -1
- package/lib/pagination.js +15 -15
- package/lib/protocol.d.ts +3 -3
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +31 -29
- package/lib/protocol.js.map +1 -1
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +24 -23
- package/lib/retry.js.map +1 -1
- package/lib/services/alb.d.ts +10 -87
- package/lib/services/alb.d.ts.map +1 -1
- package/lib/services/alb.js +73 -502
- 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 +84 -510
- package/lib/services/authorization.d.ts +5 -47
- package/lib/services/authorization.d.ts.map +1 -1
- package/lib/services/authorization.js +67 -314
- package/lib/services/automation.d.ts +7 -47
- package/lib/services/automation.d.ts.map +1 -1
- package/lib/services/automation.js +58 -353
- package/lib/services/cdn.d.ts +8 -220
- package/lib/services/cdn.d.ts.map +1 -1
- package/lib/services/cdn.js +81 -896
- package/lib/services/certificates.d.ts +8 -27
- package/lib/services/certificates.d.ts.map +1 -1
- package/lib/services/certificates.js +45 -171
- package/lib/services/cost.d.ts +10 -37
- package/lib/services/cost.d.ts.map +1 -1
- package/lib/services/cost.js +39 -169
- package/lib/services/dns.d.ts +9 -104
- package/lib/services/dns.d.ts.map +1 -1
- package/lib/services/dns.js +98 -714
- package/lib/services/dremio.d.ts +8 -50
- package/lib/services/dremio.d.ts.map +1 -1
- package/lib/services/dremio.js +56 -307
- package/lib/services/edge.d.ts +7 -40
- package/lib/services/edge.d.ts.map +1 -1
- package/lib/services/edge.js +66 -347
- package/lib/services/functions.d.ts +1 -48
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +64 -393
- package/lib/services/git.d.ts +8 -61
- package/lib/services/git.d.ts.map +1 -1
- package/lib/services/git.js +87 -510
- package/lib/services/iaas.d.ts +9 -337
- package/lib/services/iaas.d.ts.map +1 -1
- package/lib/services/iaas.js +409 -3532
- package/lib/services/intake.d.ts +8 -75
- package/lib/services/intake.d.ts.map +1 -1
- package/lib/services/intake.js +74 -465
- package/lib/services/kms.d.ts +9 -92
- package/lib/services/kms.d.ts.map +1 -1
- package/lib/services/kms.js +95 -650
- 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 +45 -146
- 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 +76 -486
- package/lib/services/logme.d.ts +8 -69
- package/lib/services/logme.d.ts.map +1 -1
- package/lib/services/logme.js +82 -564
- package/lib/services/logs.d.ts +8 -64
- package/lib/services/logs.d.ts.map +1 -1
- package/lib/services/logs.js +84 -465
- package/lib/services/mariadb.d.ts +8 -65
- package/lib/services/mariadb.d.ts.map +1 -1
- package/lib/services/mariadb.js +84 -541
- 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 +66 -325
- 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 +55 -277
- 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 +102 -793
- 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 +93 -528
- package/lib/services/observability.d.ts +8 -407
- package/lib/services/observability.d.ts.map +1 -1
- package/lib/services/observability.js +375 -3148
- package/lib/services/opensearch.d.ts +8 -71
- package/lib/services/opensearch.d.ts.map +1 -1
- package/lib/services/opensearch.js +85 -553
- package/lib/services/pim.d.ts +12 -108
- package/lib/services/pim.d.ts.map +1 -1
- package/lib/services/pim.js +81 -726
- 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 +114 -841
- package/lib/services/pubsub.d.ts +11 -73
- package/lib/services/pubsub.d.ts.map +1 -1
- package/lib/services/pubsub.js +92 -507
- package/lib/services/rabbitmq.d.ts +8 -76
- package/lib/services/rabbitmq.d.ts.map +1 -1
- package/lib/services/rabbitmq.js +88 -564
- package/lib/services/registry.d.ts +10 -28
- package/lib/services/registry.d.ts.map +1 -1
- package/lib/services/registry.js +49 -189
- 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 +92 -462
- 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 +38 -176
- package/lib/services/sca.d.ts +8 -79
- package/lib/services/sca.d.ts.map +1 -1
- package/lib/services/sca.js +63 -435
- package/lib/services/scf.d.ts +8 -64
- package/lib/services/scf.d.ts.map +1 -1
- package/lib/services/scf.js +99 -660
- 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 +99 -601
- 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 +70 -444
- 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 +58 -342
- 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 +75 -495
- 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 +40 -147
- package/lib/services/sfs.d.ts +4 -96
- package/lib/services/sfs.d.ts.map +1 -1
- package/lib/services/sfs.js +117 -782
- package/lib/services/ske.d.ts +9 -108
- package/lib/services/ske.d.ts.map +1 -1
- package/lib/services/ske.js +67 -549
- package/lib/services/sqlserverflex.d.ts +11 -152
- package/lib/services/sqlserverflex.d.ts.map +1 -1
- package/lib/services/sqlserverflex.js +112 -925
- 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 +64 -369
- 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 +81 -522
- 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 +73 -474
- package/lib/services/ufw.d.ts +7 -42
- package/lib/services/ufw.d.ts.map +1 -1
- package/lib/services/ufw.js +55 -269
- package/lib/services/valkey.d.ts +8 -68
- package/lib/services/valkey.d.ts.map +1 -1
- package/lib/services/valkey.js +85 -557
- package/lib/services/vpn.d.ts +21 -186
- package/lib/services/vpn.d.ts.map +1 -1
- package/lib/services/vpn.js +105 -920
- package/lib/services/workflows.d.ts +15 -84
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +67 -497
- package/lib/traits.d.ts +1 -1
- package/lib/traits.js +10 -10
- package/package.json +13 -9
- 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/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/services/alb.js.map +0 -1
- package/lib/services/alb_waf.js.map +0 -1
- package/lib/services/authorization.js.map +0 -1
- package/lib/services/automation.js.map +0 -1
- package/lib/services/cdn.js.map +0 -1
- package/lib/services/certificates.js.map +0 -1
- package/lib/services/cost.js.map +0 -1
- package/lib/services/dns.js.map +0 -1
- package/lib/services/dremio.js.map +0 -1
- package/lib/services/edge.js.map +0 -1
- package/lib/services/functions.js.map +0 -1
- package/lib/services/git.js.map +0 -1
- package/lib/services/iaas.js.map +0 -1
- package/lib/services/intake.js.map +0 -1
- package/lib/services/kms.js.map +0 -1
- package/lib/services/lb_ip_lists.js.map +0 -1
- package/lib/services/load_balancer.js.map +0 -1
- package/lib/services/logme.js.map +0 -1
- package/lib/services/logs.js.map +0 -1
- package/lib/services/mariadb.js.map +0 -1
- package/lib/services/model_experiments.js.map +0 -1
- package/lib/services/model_serving.js.map +0 -1
- package/lib/services/mongodb_flex.js.map +0 -1
- package/lib/services/object_storage.js.map +0 -1
- package/lib/services/observability.js.map +0 -1
- package/lib/services/opensearch.js.map +0 -1
- package/lib/services/pim.js.map +0 -1
- package/lib/services/postgres_flex.js.map +0 -1
- package/lib/services/pubsub.js.map +0 -1
- package/lib/services/rabbitmq.js.map +0 -1
- package/lib/services/registry.js.map +0 -1
- package/lib/services/resource_manager.js.map +0 -1
- package/lib/services/run_command.js.map +0 -1
- package/lib/services/sca.js.map +0 -1
- package/lib/services/scf.js.map +0 -1
- package/lib/services/secrets_manager.js.map +0 -1
- package/lib/services/server_backup.js.map +0 -1
- package/lib/services/server_update.js.map +0 -1
- package/lib/services/service_account.js.map +0 -1
- package/lib/services/service_enablement.js.map +0 -1
- package/lib/services/sfs.js.map +0 -1
- package/lib/services/ske.js.map +0 -1
- package/lib/services/sqlserverflex.js.map +0 -1
- package/lib/services/stackit_marketplace.js.map +0 -1
- package/lib/services/telemetry_link.js.map +0 -1
- package/lib/services/telemetry_router.js.map +0 -1
- package/lib/services/ufw.js.map +0 -1
- package/lib/services/valkey.js.map +0 -1
- package/lib/services/vpn.js.map +0 -1
- package/lib/services/workflows.js.map +0 -1
- package/src/protocol.test.ts +0 -304
package/src/services/cdn.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import * as API from "@distilled.cloud/core/api";
|
|
2
2
|
import * as C from "@distilled.cloud/core/category";
|
|
3
3
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-stackit). Do not edit.
|
|
4
|
-
import * as S from "@distilled.cloud/core/schema";
|
|
5
|
-
import * as
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import type * as Redacted from "effect/Redacted";
|
|
6
7
|
import { UnknownStackitError } from "../errors.ts";
|
|
7
8
|
import { StackitProtocol, type StackitOpError, type StackitOpContext } from "../protocol.ts";
|
|
8
9
|
import * as Retry from "../retry.ts";
|
|
9
10
|
import * as T from "../traits.ts";
|
|
11
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
12
|
+
const __s: any[] = [];
|
|
10
13
|
|
|
11
14
|
export type { StackitOpError, StackitOpContext };
|
|
12
15
|
|
|
@@ -38,30 +41,14 @@ export class UnprocessableEntity
|
|
|
38
41
|
) {}
|
|
39
42
|
|
|
40
43
|
export type HttpBackendCreateGeofencingValueList = Array<string>;
|
|
41
|
-
export const HttpBackendCreateGeofencingValueList = /*@__PURE__*/ S.Array(
|
|
42
|
-
S.String,
|
|
43
|
-
) as any as S.Schema<HttpBackendCreateGeofencingValueList>;
|
|
44
|
-
|
|
45
44
|
/** An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. */
|
|
46
45
|
export type HttpBackendCreateGeofencingMap = {
|
|
47
46
|
[key: string]: HttpBackendCreateGeofencingValueList | undefined;
|
|
48
47
|
};
|
|
49
|
-
export const HttpBackendCreateGeofencingMap = /*@__PURE__*/ S.Record(
|
|
50
|
-
S.String,
|
|
51
|
-
HttpBackendCreateGeofencingValueList,
|
|
52
|
-
) as any as S.Schema<HttpBackendCreateGeofencingMap>;
|
|
53
|
-
|
|
54
48
|
/** Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. */
|
|
55
49
|
export type HttpBackendCreateOriginRequestHeadersMap = { [key: string]: string | undefined };
|
|
56
|
-
export const HttpBackendCreateOriginRequestHeadersMap = /*@__PURE__*/ S.Record(
|
|
57
|
-
S.String,
|
|
58
|
-
S.String,
|
|
59
|
-
) as any as S.Schema<HttpBackendCreateOriginRequestHeadersMap>;
|
|
60
|
-
|
|
61
50
|
/** Defines the type of content origin. For this schema, it must be set to `http`. */
|
|
62
51
|
export type HttpBackendCreateType = "http";
|
|
63
|
-
export const HttpBackendCreateType = S.String;
|
|
64
|
-
|
|
65
52
|
export interface HttpBackendCreate {
|
|
66
53
|
/** An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. */
|
|
67
54
|
geofencing?: HttpBackendCreateGeofencingMap;
|
|
@@ -72,30 +59,12 @@ export interface HttpBackendCreate {
|
|
|
72
59
|
/** Defines the type of content origin. For this schema, it must be set to `http`. */
|
|
73
60
|
type: HttpBackendCreateType;
|
|
74
61
|
}
|
|
75
|
-
export const HttpBackendCreate = /*@__PURE__*/ S.suspend(() =>
|
|
76
|
-
S.Struct({
|
|
77
|
-
geofencing: S.optional(HttpBackendCreateGeofencingMap),
|
|
78
|
-
originRequestHeaders: S.optional(HttpBackendCreateOriginRequestHeadersMap),
|
|
79
|
-
originUrl: S.String,
|
|
80
|
-
type: HttpBackendCreateType,
|
|
81
|
-
}),
|
|
82
|
-
).annotate({ identifier: "HttpBackendCreate" }) as any as S.Schema<HttpBackendCreate>;
|
|
83
|
-
|
|
84
62
|
export interface BucketCredentials {
|
|
85
63
|
accessKeyId: string | Redacted.Redacted<string>;
|
|
86
64
|
secretAccessKey: string | Redacted.Redacted<string>;
|
|
87
65
|
}
|
|
88
|
-
export const BucketCredentials = /*@__PURE__*/ S.suspend(() =>
|
|
89
|
-
S.Struct({
|
|
90
|
-
accessKeyId: S.String.pipe(T.SensitiveValue({})),
|
|
91
|
-
secretAccessKey: S.String.pipe(T.SensitiveValue({})),
|
|
92
|
-
}),
|
|
93
|
-
).annotate({ identifier: "BucketCredentials" }) as any as S.Schema<BucketCredentials>;
|
|
94
|
-
|
|
95
66
|
/** Defines the type of content origin. For this schema, it must be set to `bucket`. */
|
|
96
67
|
export type BucketBackendCreateType = "bucket";
|
|
97
|
-
export const BucketBackendCreateType = S.String;
|
|
98
|
-
|
|
99
68
|
export interface BucketBackendCreate {
|
|
100
69
|
/** The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`). */
|
|
101
70
|
bucketUrl: string;
|
|
@@ -105,44 +74,16 @@ export interface BucketBackendCreate {
|
|
|
105
74
|
/** Defines the type of content origin. For this schema, it must be set to `bucket`. */
|
|
106
75
|
type: BucketBackendCreateType;
|
|
107
76
|
}
|
|
108
|
-
export const BucketBackendCreate = /*@__PURE__*/ S.suspend(() =>
|
|
109
|
-
S.Struct({
|
|
110
|
-
bucketUrl: S.String,
|
|
111
|
-
credentials: BucketCredentials,
|
|
112
|
-
region: S.String,
|
|
113
|
-
type: BucketBackendCreateType,
|
|
114
|
-
}),
|
|
115
|
-
).annotate({ identifier: "BucketBackendCreate" }) as any as S.Schema<BucketBackendCreate>;
|
|
116
|
-
|
|
117
77
|
/** Configuration for the content origin backend. */
|
|
118
78
|
export type CreateDistributionRequestBackend = HttpBackendCreate | BucketBackendCreate;
|
|
119
|
-
export const CreateDistributionRequestBackend =
|
|
120
|
-
/*@__PURE__*/ S.Unknown as any as S.Schema<CreateDistributionRequestBackend>;
|
|
121
|
-
|
|
122
79
|
/** Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g., DE, ES, GB). This setting blocks users from the specified countries. */
|
|
123
80
|
export type CreateDistributionRequestBlockedCountriesList = Array<string>;
|
|
124
|
-
export const CreateDistributionRequestBlockedCountriesList = /*@__PURE__*/ S.Array(
|
|
125
|
-
S.String,
|
|
126
|
-
) as any as S.Schema<CreateDistributionRequestBlockedCountriesList>;
|
|
127
|
-
|
|
128
81
|
/** Restricts access to your content by specifying a list of blocked IPv4 addresses. This feature enhances security and privacy by preventing these addresses from accessing your distribution. */
|
|
129
82
|
export type CreateDistributionRequestBlockedIpsList = Array<string>;
|
|
130
|
-
export const CreateDistributionRequestBlockedIpsList = /*@__PURE__*/ S.Array(
|
|
131
|
-
S.String,
|
|
132
|
-
) as any as S.Schema<CreateDistributionRequestBlockedIpsList>;
|
|
133
|
-
|
|
134
83
|
/** HTTP request header names whose values participate in the cache key. Each entry multiplies the number of cache variants by the number of distinct values observed for that header. */
|
|
135
84
|
export type CacheConfigCreateCacheKeyHeadersList = Array<string>;
|
|
136
|
-
export const CacheConfigCreateCacheKeyHeadersList = /*@__PURE__*/ S.Array(
|
|
137
|
-
S.String,
|
|
138
|
-
) as any as S.Schema<CacheConfigCreateCacheKeyHeadersList>;
|
|
139
|
-
|
|
140
85
|
/** Allowlist of query-string parameter names that participate in the cache key when `queryStringVaryEnabled` is true. Ignored while `queryStringVaryEnabled` is false, but still stored so it can be re-activated without losing the list. */
|
|
141
86
|
export type CacheConfigCreateQueryStringVaryParametersList = Array<string>;
|
|
142
|
-
export const CacheConfigCreateQueryStringVaryParametersList = /*@__PURE__*/ S.Array(
|
|
143
|
-
S.String,
|
|
144
|
-
) as any as S.Schema<CacheConfigCreateQueryStringVaryParametersList>;
|
|
145
|
-
|
|
146
87
|
/** Groups the cache options that influence how the CDN builds its cache key on distribution creation. **Cache cardinality warning:** enabling query-string vary produces one cache entry per unique query-string combination (**unbounded** when `queryStringVaryParameters` is empty). Each entry in `cacheKeyHeaders` multiplies the number of cache variants by the number of distinct values observed for that header. Use these settings sparingly. `queryStringVaryParameters` is stored independently of `queryStringVaryEnabled` so that this feature can be toggled on and off without losing the configured allowlist. Only `queryStringVaryEnabled` gates whether the parameter allowlist actually varies the cache. **Optimizer interaction:** when the Optimizer is enabled, the CDN automatically enables query-string vary for image responses regardless of this setting. */
|
|
147
88
|
export interface CacheConfigCreate {
|
|
148
89
|
/** HTTP request header names whose values participate in the cache key. Each entry multiplies the number of cache variants by the number of distinct values observed for that header. */
|
|
@@ -152,21 +93,8 @@ export interface CacheConfigCreate {
|
|
|
152
93
|
/** Allowlist of query-string parameter names that participate in the cache key when `queryStringVaryEnabled` is true. Ignored while `queryStringVaryEnabled` is false, but still stored so it can be re-activated without losing the list. */
|
|
153
94
|
queryStringVaryParameters?: CacheConfigCreateQueryStringVaryParametersList;
|
|
154
95
|
}
|
|
155
|
-
export const CacheConfigCreate = /*@__PURE__*/ S.suspend(() =>
|
|
156
|
-
S.Struct({
|
|
157
|
-
cacheKeyHeaders: S.optional(CacheConfigCreateCacheKeyHeadersList),
|
|
158
|
-
queryStringVaryEnabled: S.optional(S.Boolean),
|
|
159
|
-
queryStringVaryParameters: S.optional(CacheConfigCreateQueryStringVaryParametersList),
|
|
160
|
-
}),
|
|
161
|
-
).annotate({ identifier: "CacheConfigCreate" }) as any as S.Schema<CacheConfigCreate>;
|
|
162
|
-
|
|
163
96
|
/** Labels are key-value string pairs that can be attached to a distribution. */
|
|
164
97
|
export type CreateDistributionRequestLabelsMap = { [key: string]: string | undefined };
|
|
165
|
-
export const CreateDistributionRequestLabelsMap = /*@__PURE__*/ S.Record(
|
|
166
|
-
S.String,
|
|
167
|
-
S.String,
|
|
168
|
-
) as any as S.Schema<CreateDistributionRequestLabelsMap>;
|
|
169
|
-
|
|
170
98
|
/** The authentication credentials required for the CDN to push logs to your Loki instance. */
|
|
171
99
|
export interface LokiLogSinkCredentials {
|
|
172
100
|
/** The password corresponding to your username. */
|
|
@@ -174,17 +102,8 @@ export interface LokiLogSinkCredentials {
|
|
|
174
102
|
/** The username used to authenticate against your Loki instance. */
|
|
175
103
|
username: string;
|
|
176
104
|
}
|
|
177
|
-
export const LokiLogSinkCredentials = /*@__PURE__*/ S.suspend(() =>
|
|
178
|
-
S.Struct({
|
|
179
|
-
password: S.String.pipe(T.SensitiveValue({})),
|
|
180
|
-
username: S.String,
|
|
181
|
-
}),
|
|
182
|
-
).annotate({ identifier: "LokiLogSinkCredentials" }) as any as S.Schema<LokiLogSinkCredentials>;
|
|
183
|
-
|
|
184
105
|
/** Defines the type of the log sink. For Grafana Loki, this must be set to `loki`. */
|
|
185
106
|
export type LokiLogSinkCreateType = "loki";
|
|
186
|
-
export const LokiLogSinkCreateType = S.String;
|
|
187
|
-
|
|
188
107
|
export interface LokiLogSinkCreate {
|
|
189
108
|
credentials: LokiLogSinkCredentials;
|
|
190
109
|
/** The fully qualified URL where the CDN should push logs to your Loki instance (for example, `https://loki.example.com/loki/api/v1/push`). */
|
|
@@ -192,18 +111,8 @@ export interface LokiLogSinkCreate {
|
|
|
192
111
|
/** Defines the type of the log sink. For Grafana Loki, this must be set to `loki`. */
|
|
193
112
|
type: LokiLogSinkCreateType;
|
|
194
113
|
}
|
|
195
|
-
export const LokiLogSinkCreate = /*@__PURE__*/ S.suspend(() =>
|
|
196
|
-
S.Struct({
|
|
197
|
-
credentials: LokiLogSinkCredentials,
|
|
198
|
-
pushUrl: S.String,
|
|
199
|
-
type: LokiLogSinkCreateType,
|
|
200
|
-
}),
|
|
201
|
-
).annotate({ identifier: "LokiLogSinkCreate" }) as any as S.Schema<LokiLogSinkCreate>;
|
|
202
|
-
|
|
203
114
|
/** Defines bearer token authentication. */
|
|
204
115
|
export type OtlpLogSinkBearerCredentialsType = "bearer";
|
|
205
|
-
export const OtlpLogSinkBearerCredentialsType = S.String;
|
|
206
|
-
|
|
207
116
|
/** Bearer token authentication credentials for OTLP. */
|
|
208
117
|
export interface OtlpLogSinkBearerCredentials {
|
|
209
118
|
/** The bearer token used to authenticate against your OTLP endpoint. */
|
|
@@ -211,19 +120,8 @@ export interface OtlpLogSinkBearerCredentials {
|
|
|
211
120
|
/** Defines bearer token authentication. */
|
|
212
121
|
type: OtlpLogSinkBearerCredentialsType;
|
|
213
122
|
}
|
|
214
|
-
export const OtlpLogSinkBearerCredentials = /*@__PURE__*/ S.suspend(() =>
|
|
215
|
-
S.Struct({
|
|
216
|
-
token: S.String,
|
|
217
|
-
type: OtlpLogSinkBearerCredentialsType,
|
|
218
|
-
}),
|
|
219
|
-
).annotate({
|
|
220
|
-
identifier: "OtlpLogSinkBearerCredentials",
|
|
221
|
-
}) as any as S.Schema<OtlpLogSinkBearerCredentials>;
|
|
222
|
-
|
|
223
123
|
/** Defines basic authentication. */
|
|
224
124
|
export type OtlpLogSinkBasicCredentialsType = "basic";
|
|
225
|
-
export const OtlpLogSinkBasicCredentialsType = S.String;
|
|
226
|
-
|
|
227
125
|
/** Basic authentication credentials for OTLP. */
|
|
228
126
|
export interface OtlpLogSinkBasicCredentials {
|
|
229
127
|
/** The password corresponding to your username. */
|
|
@@ -233,27 +131,12 @@ export interface OtlpLogSinkBasicCredentials {
|
|
|
233
131
|
/** The username used to authenticate against your OTLP endpoint. */
|
|
234
132
|
username: string;
|
|
235
133
|
}
|
|
236
|
-
export const OtlpLogSinkBasicCredentials = /*@__PURE__*/ S.suspend(() =>
|
|
237
|
-
S.Struct({
|
|
238
|
-
password: S.String.pipe(T.SensitiveValue({})),
|
|
239
|
-
type: OtlpLogSinkBasicCredentialsType,
|
|
240
|
-
username: S.String,
|
|
241
|
-
}),
|
|
242
|
-
).annotate({
|
|
243
|
-
identifier: "OtlpLogSinkBasicCredentials",
|
|
244
|
-
}) as any as S.Schema<OtlpLogSinkBasicCredentials>;
|
|
245
|
-
|
|
246
134
|
/** The authentication credentials required for the CDN to push logs to your OTLP endpoint. */
|
|
247
135
|
export type OtlpLogSinkCreateCredentials =
|
|
248
136
|
| OtlpLogSinkBearerCredentials
|
|
249
137
|
| OtlpLogSinkBasicCredentials;
|
|
250
|
-
export const OtlpLogSinkCreateCredentials =
|
|
251
|
-
/*@__PURE__*/ S.Unknown as any as S.Schema<OtlpLogSinkCreateCredentials>;
|
|
252
|
-
|
|
253
138
|
/** Defines the type of the log sink. */
|
|
254
139
|
export type OtlpLogSinkCreateType = "otlp";
|
|
255
|
-
export const OtlpLogSinkCreateType = S.String;
|
|
256
|
-
|
|
257
140
|
export interface OtlpLogSinkCreate {
|
|
258
141
|
/** The authentication credentials required for the CDN to push logs to your OTLP endpoint. */
|
|
259
142
|
credentials: OtlpLogSinkCreateCredentials;
|
|
@@ -262,62 +145,26 @@ export interface OtlpLogSinkCreate {
|
|
|
262
145
|
/** Defines the type of the log sink. */
|
|
263
146
|
type: OtlpLogSinkCreateType;
|
|
264
147
|
}
|
|
265
|
-
export const OtlpLogSinkCreate = /*@__PURE__*/ S.suspend(() =>
|
|
266
|
-
S.Struct({
|
|
267
|
-
credentials: OtlpLogSinkCreateCredentials,
|
|
268
|
-
pushUrl: S.String,
|
|
269
|
-
type: OtlpLogSinkCreateType,
|
|
270
|
-
}),
|
|
271
|
-
).annotate({ identifier: "OtlpLogSinkCreate" }) as any as S.Schema<OtlpLogSinkCreate>;
|
|
272
|
-
|
|
273
148
|
export type CreateDistributionRequestLogSink = LokiLogSinkCreate | OtlpLogSinkCreate;
|
|
274
|
-
export const CreateDistributionRequestLogSink =
|
|
275
|
-
/*@__PURE__*/ S.Unknown as any as S.Schema<CreateDistributionRequestLogSink>;
|
|
276
|
-
|
|
277
149
|
/** Optimizer is paid feature, a real-time on the fly image manipulation and optimization service that automatically optimizes your images for faster image delivery. */
|
|
278
150
|
export interface Optimizer {
|
|
279
151
|
/** Determines if the optimizer should be enabled for this distribution and incurs a monthly fee */
|
|
280
152
|
enabled: boolean;
|
|
281
153
|
}
|
|
282
|
-
export const Optimizer = /*@__PURE__*/ S.suspend(() =>
|
|
283
|
-
S.Struct({
|
|
284
|
-
enabled: S.Boolean,
|
|
285
|
-
}),
|
|
286
|
-
).annotate({ identifier: "Optimizer" }) as any as S.Schema<Optimizer>;
|
|
287
|
-
|
|
288
154
|
/** Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY. */
|
|
289
155
|
export type MatchCondition = "ANY" | "ALL" | "NONE";
|
|
290
|
-
export const MatchCondition = S.String;
|
|
291
|
-
|
|
292
156
|
/** A list of glob patterns to match against the request path. At least one value is required. Examples: "/shop/*" or "*\/img/*" */
|
|
293
157
|
export type MatcherValuesList = Array<string>;
|
|
294
|
-
export const MatcherValuesList = /*@__PURE__*/ S.Array(
|
|
295
|
-
S.String,
|
|
296
|
-
) as any as S.Schema<MatcherValuesList>;
|
|
297
|
-
|
|
298
158
|
/** A matcher containing a list of string values to compare against the request path. */
|
|
299
159
|
export interface Matcher {
|
|
300
160
|
valueMatchCondition?: MatchCondition | (string & {});
|
|
301
161
|
/** A list of glob patterns to match against the request path. At least one value is required. Examples: "/shop/*" or "*\/img/*" */
|
|
302
162
|
values: MatcherValuesList;
|
|
303
163
|
}
|
|
304
|
-
export const Matcher = /*@__PURE__*/ S.suspend(() =>
|
|
305
|
-
S.Struct({
|
|
306
|
-
valueMatchCondition: S.optional(MatchCondition),
|
|
307
|
-
values: MatcherValuesList,
|
|
308
|
-
}),
|
|
309
|
-
).annotate({ identifier: "Matcher" }) as any as S.Schema<Matcher>;
|
|
310
|
-
|
|
311
164
|
/** A list of matchers that define when this rule should apply. At least one matcher is required. */
|
|
312
165
|
export type RedirectRuleMatchersList = Array<Matcher>;
|
|
313
|
-
export const RedirectRuleMatchersList = /*@__PURE__*/ S.Array(
|
|
314
|
-
Matcher,
|
|
315
|
-
) as any as S.Schema<RedirectRuleMatchersList>;
|
|
316
|
-
|
|
317
166
|
/** The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308. */
|
|
318
167
|
export type RedirectRuleStatusCode = 301 | 302 | 303 | 307 | 308;
|
|
319
|
-
export const RedirectRuleStatusCode = S.Number;
|
|
320
|
-
|
|
321
168
|
/** A single redirect rule defining a source pattern and a target URL. */
|
|
322
169
|
export interface RedirectRule {
|
|
323
170
|
/** An optional description for the redirect rule. */
|
|
@@ -332,44 +179,17 @@ export interface RedirectRule {
|
|
|
332
179
|
/** The target URL to redirect to. Must be a valid URI. */
|
|
333
180
|
targetUrl: string;
|
|
334
181
|
}
|
|
335
|
-
export const RedirectRule = /*@__PURE__*/ S.suspend(() =>
|
|
336
|
-
S.Struct({
|
|
337
|
-
description: S.optional(S.String),
|
|
338
|
-
enabled: S.optional(S.Boolean),
|
|
339
|
-
matchers: RedirectRuleMatchersList,
|
|
340
|
-
ruleMatchCondition: S.optional(MatchCondition),
|
|
341
|
-
statusCode: RedirectRuleStatusCode,
|
|
342
|
-
targetUrl: S.String,
|
|
343
|
-
}),
|
|
344
|
-
).annotate({ identifier: "RedirectRule" }) as any as S.Schema<RedirectRule>;
|
|
345
|
-
|
|
346
182
|
/** A list of redirect rules. The order of rules matters for evaluation. */
|
|
347
183
|
export type RedirectConfigRulesList = Array<RedirectRule>;
|
|
348
|
-
export const RedirectConfigRulesList = /*@__PURE__*/ S.Array(
|
|
349
|
-
RedirectRule,
|
|
350
|
-
) as any as S.Schema<RedirectConfigRulesList>;
|
|
351
|
-
|
|
352
184
|
/** A wrapper for a list of redirect rules that allows for redirect settings on a distribution. */
|
|
353
185
|
export interface RedirectConfig {
|
|
354
186
|
/** A list of redirect rules. The order of rules matters for evaluation. */
|
|
355
187
|
rules?: RedirectConfigRulesList;
|
|
356
188
|
}
|
|
357
|
-
export const RedirectConfig = /*@__PURE__*/ S.suspend(() =>
|
|
358
|
-
S.Struct({
|
|
359
|
-
rules: S.optional(RedirectConfigRulesList),
|
|
360
|
-
}),
|
|
361
|
-
).annotate({ identifier: "RedirectConfig" }) as any as S.Schema<RedirectConfig>;
|
|
362
|
-
|
|
363
189
|
/** The following regions exist: - `EU` - Europe - `US` - United States / North America - `AF` - Africa - `SA` - South America - `ASIA` - Asia and Oceania */
|
|
364
190
|
export type Region = "EU" | "US" | "AF" | "SA" | "ASIA";
|
|
365
|
-
export const Region = S.String;
|
|
366
|
-
|
|
367
191
|
/** Define in which regions you would like your content to be cached. */
|
|
368
192
|
export type CreateDistributionRequestRegionsList = Array<Region | (string & {})>;
|
|
369
|
-
export const CreateDistributionRequestRegionsList = /*@__PURE__*/ S.Array(
|
|
370
|
-
Region,
|
|
371
|
-
) as any as S.Schema<CreateDistributionRequestRegionsList>;
|
|
372
|
-
|
|
373
193
|
/** Configuration for TLS protocol versions. Note: Enabling older TLS versions (1.0, 1.1) is generally discouraged for security reasons. */
|
|
374
194
|
export interface TlsConfig {
|
|
375
195
|
/** If set to true, the distribution will accept connections using TLS 1.0. */
|
|
@@ -377,96 +197,35 @@ export interface TlsConfig {
|
|
|
377
197
|
/** If set to true, the distribution will accept connections using TLS 1.1. */
|
|
378
198
|
enableTls11: boolean;
|
|
379
199
|
}
|
|
380
|
-
export const TlsConfig = /*@__PURE__*/ S.suspend(() =>
|
|
381
|
-
S.Struct({
|
|
382
|
-
enableTls10: S.Boolean,
|
|
383
|
-
enableTls11: S.Boolean,
|
|
384
|
-
}),
|
|
385
|
-
).annotate({ identifier: "TlsConfig" }) as any as S.Schema<TlsConfig>;
|
|
386
|
-
|
|
387
200
|
/** This whitelist restricts which HTTP methods the distribution accepts. Requests using non-whitelisted methods are blocked by the WAF before reaching the origin. Common methods: `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`, `CONNECT`, `TRACE` Validation ensures: 1. At least one method is allowed 2. No duplicate methods (e.g., `GET` appearing twice) 3. Each method is valid per HTTP standards */
|
|
388
201
|
export type WafConfigAllowedHttpMethodsList = Array<string>;
|
|
389
|
-
export const WafConfigAllowedHttpMethodsList = /*@__PURE__*/ S.Array(
|
|
390
|
-
S.String,
|
|
391
|
-
) as any as S.Schema<WafConfigAllowedHttpMethodsList>;
|
|
392
|
-
|
|
393
202
|
export type WafConfigAllowedHttpVersionsList = Array<string>;
|
|
394
|
-
export const WafConfigAllowedHttpVersionsList = /*@__PURE__*/ S.Array(
|
|
395
|
-
S.String,
|
|
396
|
-
) as any as S.Schema<WafConfigAllowedHttpVersionsList>;
|
|
397
|
-
|
|
398
203
|
/** This allow list restricts which Content-Type headers are accepted in request bodies. Format: Must be `type/subtype` with no spaces. Common content types: - `application/json` - `application/x-www-form-urlencoded` - `multipart/form-data` - `text/html` - `text/plain` - `application/xml` */
|
|
399
204
|
export type WafConfigAllowedRequestContentTypesList = Array<string>;
|
|
400
|
-
export const WafConfigAllowedRequestContentTypesList = /*@__PURE__*/ S.Array(
|
|
401
|
-
S.String,
|
|
402
|
-
) as any as S.Schema<WafConfigAllowedRequestContentTypesList>;
|
|
403
|
-
|
|
404
205
|
/** Ids of WAF Collections to mark as disabled */
|
|
405
206
|
export type WafConfigDisabledRuleCollectionIdsList = Array<string>;
|
|
406
|
-
export const WafConfigDisabledRuleCollectionIdsList = /*@__PURE__*/ S.Array(
|
|
407
|
-
S.String,
|
|
408
|
-
) as any as S.Schema<WafConfigDisabledRuleCollectionIdsList>;
|
|
409
|
-
|
|
410
207
|
/** Ids of WAF Rule Groups to mark as disabled */
|
|
411
208
|
export type WafConfigDisabledRuleGroupIdsList = Array<string>;
|
|
412
|
-
export const WafConfigDisabledRuleGroupIdsList = /*@__PURE__*/ S.Array(
|
|
413
|
-
S.String,
|
|
414
|
-
) as any as S.Schema<WafConfigDisabledRuleGroupIdsList>;
|
|
415
|
-
|
|
416
209
|
/** Ids of WAF Rules that are **explicitly** disabled for this distribution. */
|
|
417
210
|
export type WafConfigDisabledRuleIdsList = Array<string>;
|
|
418
|
-
export const WafConfigDisabledRuleIdsList = /*@__PURE__*/ S.Array(
|
|
419
|
-
S.String,
|
|
420
|
-
) as any as S.Schema<WafConfigDisabledRuleIdsList>;
|
|
421
|
-
|
|
422
211
|
/** Ids of WAF Collections to mark as enabled */
|
|
423
212
|
export type WafConfigEnabledRuleCollectionIdsList = Array<string>;
|
|
424
|
-
export const WafConfigEnabledRuleCollectionIdsList = /*@__PURE__*/ S.Array(
|
|
425
|
-
S.String,
|
|
426
|
-
) as any as S.Schema<WafConfigEnabledRuleCollectionIdsList>;
|
|
427
|
-
|
|
428
213
|
/** Ids of WAF Rule Groups to mark as enabled */
|
|
429
214
|
export type WafConfigEnabledRuleGroupIdsList = Array<string>;
|
|
430
|
-
export const WafConfigEnabledRuleGroupIdsList = /*@__PURE__*/ S.Array(
|
|
431
|
-
S.String,
|
|
432
|
-
) as any as S.Schema<WafConfigEnabledRuleGroupIdsList>;
|
|
433
|
-
|
|
434
215
|
/** Ids of the WAF rules that are **explicitly** enabled for this distribution. If this rule is in a disabled / log Only RuleGroup or Collection, it will be enabled regardless as `enabledRuleIds` overrides those in specificity. Do note that rules can also be enabled because a Rulegroup or Collection is enabled. **DO NOT** use this property to find all active rules. Instead, pass `?withWafStatus=true` as a query parameter to `GetDistribution` or `ListDistributions`. This will expose the `waf` Property on distribution Level. From there you can `$.waf.enabledRules.map(e => e.id)` to get a list of all enabled rules. */
|
|
435
216
|
export type WafConfigEnabledRuleIdsList = Array<string>;
|
|
436
|
-
export const WafConfigEnabledRuleIdsList = /*@__PURE__*/ S.Array(
|
|
437
|
-
S.String,
|
|
438
|
-
) as any as S.Schema<WafConfigEnabledRuleIdsList>;
|
|
439
|
-
|
|
440
217
|
/** Ids of WAF Collections to mark as log Only. */
|
|
441
218
|
export type WafConfigLogOnlyRuleCollectionIdsList = Array<string>;
|
|
442
|
-
export const WafConfigLogOnlyRuleCollectionIdsList = /*@__PURE__*/ S.Array(
|
|
443
|
-
S.String,
|
|
444
|
-
) as any as S.Schema<WafConfigLogOnlyRuleCollectionIdsList>;
|
|
445
|
-
|
|
446
219
|
/** Ids of WAF Rule Groups to mark as log Only. */
|
|
447
220
|
export type WafConfigLogOnlyRuleGroupIdsList = Array<string>;
|
|
448
|
-
export const WafConfigLogOnlyRuleGroupIdsList = /*@__PURE__*/ S.Array(
|
|
449
|
-
S.String,
|
|
450
|
-
) as any as S.Schema<WafConfigLogOnlyRuleGroupIdsList>;
|
|
451
|
-
|
|
452
221
|
/** Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. */
|
|
453
222
|
export type WafConfigLogOnlyRuleIdsList = Array<string>;
|
|
454
|
-
export const WafConfigLogOnlyRuleIdsList = /*@__PURE__*/ S.Array(
|
|
455
|
-
S.String,
|
|
456
|
-
) as any as S.Schema<WafConfigLogOnlyRuleIdsList>;
|
|
457
|
-
|
|
458
223
|
/** - `ENABLED`: The WAF actively inspects and blocks malicious requests. - `DISABLED`: The WAF is completely off. No inspection occurs. - `LOG_ONLY`: The WAF inspects requests and logs matches but never blocks. */
|
|
459
224
|
export type WafMode = "DISABLED" | "ENABLED" | "LOG_ONLY";
|
|
460
|
-
export const WafMode = S.String;
|
|
461
|
-
|
|
462
225
|
/** The paranoia level defines how aggressively the WAF should action on requests. It ranges from `L1` (least strict, lowest chance of false positives) to `L4` (most strict, highest chance of false positives). A higher paranoia level is more effective at catching attacks but can also block legitimate traffic. */
|
|
463
226
|
export type WafParanoiaLevel = "L1" | "L2" | "L3" | "L4";
|
|
464
|
-
export const WafParanoiaLevel = S.String;
|
|
465
|
-
|
|
466
227
|
/** Enable or disable the Premium WAF. Do note that enabling the Premium WAF will cause additional fees. Some features are gated behind the Premium WAF, like additional, **premium-only rules** and the ability to create **custom rules** (not yet implemented) */
|
|
467
228
|
export type WafType = "FREE" | "PREMIUM";
|
|
468
|
-
export const WafType = S.String;
|
|
469
|
-
|
|
470
229
|
/** Configuration of the WAF of a distribution A WAF Config always contains a WAF Mode and Type. If a WAF was never enabled, most of the properties are not present. To **enable** the WAF for your Distribution, you must set the `mode` to `ENABLED` or `LOG_ONLY`. This causes the other properties to be populated. ## Rules There are 9 properties used to control which Rules are enabled, disabled or set to Log-Only. These properties can be grouped in 3 groups of 3. Each of these groups varies in specificity: Rules are more specific than Rule Groups, which in turn are more specific than Collections. More specific definitions override more generic definitions. ### Collections - `enabledRuleCollectionIds` - `disabledRuleCollectionIds` - `logOnlyRuleCollectionIds` These are the least specific selectors. As of 2025, only two collections exist: - `@builtin/crs/response`, containing all Rules regarding Responses - `@builtin/crs/request`, containing all Rules regarding Requests More collections may be added in the future ### Rule Groups - `enabledRuleGroupIds` - `disabledRuleGroupIds` - `logOnlyRuleGroupIds` These are more specific than Collections and will override their selector. You can find all available Rule Groups by calling the `ListWafCollections` Operation. ### Rules - `enabledRuleIds` - `disabledRuleIds` - `logOnlyRuleGds` Being the most specific selectors, these will override both Collection and Rule Group selectors. You can find all available Rule Groups by calling the `ListWafCollections` Operation. ### TIP: Review resolved config If you call `GetDistribution` with `?withWafStatus=true`, you get back a resolved WAF Rules Config which contains a `waf` property which you can inspect to see why a Rule is either enabled, disabled or logOnly. */
|
|
471
230
|
export interface WafConfig {
|
|
472
231
|
/** This whitelist restricts which HTTP methods the distribution accepts. Requests using non-whitelisted methods are blocked by the WAF before reaching the origin. Common methods: `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`, `CONNECT`, `TRACE` Validation ensures: 1. At least one method is allowed 2. No duplicate methods (e.g., `GET` appearing twice) 3. Each method is valid per HTTP standards */
|
|
@@ -496,26 +255,6 @@ export interface WafConfig {
|
|
|
496
255
|
paranoiaLevel?: WafParanoiaLevel | (string & {});
|
|
497
256
|
type: WafType | (string & {});
|
|
498
257
|
}
|
|
499
|
-
export const WafConfig = /*@__PURE__*/ S.suspend(() =>
|
|
500
|
-
S.Struct({
|
|
501
|
-
allowedHttpMethods: S.optional(WafConfigAllowedHttpMethodsList),
|
|
502
|
-
allowedHttpVersions: S.optional(WafConfigAllowedHttpVersionsList),
|
|
503
|
-
allowedRequestContentTypes: S.optional(WafConfigAllowedRequestContentTypesList),
|
|
504
|
-
disabledRuleCollectionIds: S.optional(WafConfigDisabledRuleCollectionIdsList),
|
|
505
|
-
disabledRuleGroupIds: S.optional(WafConfigDisabledRuleGroupIdsList),
|
|
506
|
-
disabledRuleIds: S.optional(WafConfigDisabledRuleIdsList),
|
|
507
|
-
enabledRuleCollectionIds: S.optional(WafConfigEnabledRuleCollectionIdsList),
|
|
508
|
-
enabledRuleGroupIds: S.optional(WafConfigEnabledRuleGroupIdsList),
|
|
509
|
-
enabledRuleIds: WafConfigEnabledRuleIdsList,
|
|
510
|
-
logOnlyRuleCollectionIds: S.optional(WafConfigLogOnlyRuleCollectionIdsList),
|
|
511
|
-
logOnlyRuleGroupIds: S.optional(WafConfigLogOnlyRuleGroupIdsList),
|
|
512
|
-
logOnlyRuleIds: S.optional(WafConfigLogOnlyRuleIdsList),
|
|
513
|
-
mode: WafMode,
|
|
514
|
-
paranoiaLevel: S.optional(WafParanoiaLevel),
|
|
515
|
-
type: WafType,
|
|
516
|
-
}),
|
|
517
|
-
).annotate({ identifier: "WafConfig" }) as any as S.Schema<WafConfig>;
|
|
518
|
-
|
|
519
258
|
export interface CreateDistributionRequest {
|
|
520
259
|
/** Your STACKIT Project Id */
|
|
521
260
|
projectId: string;
|
|
@@ -546,62 +285,15 @@ export interface CreateDistributionRequest {
|
|
|
546
285
|
tls?: TlsConfig;
|
|
547
286
|
waf?: WafConfig;
|
|
548
287
|
}
|
|
549
|
-
export const CreateDistributionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
550
|
-
S.Struct({
|
|
551
|
-
projectId: S.String.pipe(T.Label()),
|
|
552
|
-
backend: CreateDistributionRequestBackend,
|
|
553
|
-
blockedCountries: S.optional(CreateDistributionRequestBlockedCountriesList),
|
|
554
|
-
blockedIps: S.optional(CreateDistributionRequestBlockedIpsList),
|
|
555
|
-
cacheConfig: S.optional(CacheConfigCreate),
|
|
556
|
-
defaultCacheDuration: S.optional(S.String),
|
|
557
|
-
forwardHostHeader: S.optional(S.Boolean),
|
|
558
|
-
intentId: S.optional(S.String),
|
|
559
|
-
labels: S.optional(CreateDistributionRequestLabelsMap),
|
|
560
|
-
logSink: S.optional(CreateDistributionRequestLogSink),
|
|
561
|
-
monthlyLimitBytes: S.optional(S.Number),
|
|
562
|
-
optimizer: S.optional(Optimizer),
|
|
563
|
-
redirects: S.optional(RedirectConfig),
|
|
564
|
-
regions: CreateDistributionRequestRegionsList,
|
|
565
|
-
stripResponseCookies: S.optional(S.Boolean),
|
|
566
|
-
tls: S.optional(TlsConfig),
|
|
567
|
-
waf: S.optional(WafConfig),
|
|
568
|
-
}).pipe(
|
|
569
|
-
T.Http({
|
|
570
|
-
method: "POST",
|
|
571
|
-
uri: "/v1/projects/{projectId}/distributions",
|
|
572
|
-
code: 200,
|
|
573
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
574
|
-
}),
|
|
575
|
-
),
|
|
576
|
-
).annotate({
|
|
577
|
-
identifier: "CreateDistributionRequest",
|
|
578
|
-
}) as any as S.Schema<CreateDistributionRequest>;
|
|
579
|
-
|
|
580
288
|
export type HttpBackendGeofencingValueList = Array<string>;
|
|
581
|
-
export const HttpBackendGeofencingValueList = /*@__PURE__*/ S.Array(
|
|
582
|
-
S.String,
|
|
583
|
-
) as any as S.Schema<HttpBackendGeofencingValueList>;
|
|
584
|
-
|
|
585
289
|
/** An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. */
|
|
586
290
|
export type HttpBackendGeofencingMap = {
|
|
587
291
|
[key: string]: HttpBackendGeofencingValueList | undefined;
|
|
588
292
|
};
|
|
589
|
-
export const HttpBackendGeofencingMap = /*@__PURE__*/ S.Record(
|
|
590
|
-
S.String,
|
|
591
|
-
HttpBackendGeofencingValueList,
|
|
592
|
-
) as any as S.Schema<HttpBackendGeofencingMap>;
|
|
593
|
-
|
|
594
293
|
/** Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. */
|
|
595
294
|
export type HttpBackendOriginRequestHeadersMap = { [key: string]: string | undefined };
|
|
596
|
-
export const HttpBackendOriginRequestHeadersMap = /*@__PURE__*/ S.Record(
|
|
597
|
-
S.String,
|
|
598
|
-
S.String,
|
|
599
|
-
) as any as S.Schema<HttpBackendOriginRequestHeadersMap>;
|
|
600
|
-
|
|
601
295
|
/** Defines the type of content origin. For this schema, it must be set to `http`. */
|
|
602
296
|
export type HttpBackendType = "http";
|
|
603
|
-
export const HttpBackendType = S.String;
|
|
604
|
-
|
|
605
297
|
export interface HttpBackend {
|
|
606
298
|
/** An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. */
|
|
607
299
|
geofencing: HttpBackendGeofencingMap;
|
|
@@ -612,19 +304,8 @@ export interface HttpBackend {
|
|
|
612
304
|
/** Defines the type of content origin. For this schema, it must be set to `http`. */
|
|
613
305
|
type: HttpBackendType;
|
|
614
306
|
}
|
|
615
|
-
export const HttpBackend = /*@__PURE__*/ S.suspend(() =>
|
|
616
|
-
S.Struct({
|
|
617
|
-
geofencing: HttpBackendGeofencingMap,
|
|
618
|
-
originRequestHeaders: HttpBackendOriginRequestHeadersMap,
|
|
619
|
-
originUrl: S.String,
|
|
620
|
-
type: HttpBackendType,
|
|
621
|
-
}),
|
|
622
|
-
).annotate({ identifier: "HttpBackend" }) as any as S.Schema<HttpBackend>;
|
|
623
|
-
|
|
624
307
|
/** Defines the type of content origin. For this schema, it must be set to `bucket`. */
|
|
625
308
|
export type BucketBackendType = "bucket";
|
|
626
|
-
export const BucketBackendType = S.String;
|
|
627
|
-
|
|
628
309
|
export interface BucketBackend {
|
|
629
310
|
/** The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`). */
|
|
630
311
|
bucketUrl: string;
|
|
@@ -633,41 +314,15 @@ export interface BucketBackend {
|
|
|
633
314
|
/** Defines the type of content origin. For this schema, it must be set to `bucket`. */
|
|
634
315
|
type: BucketBackendType;
|
|
635
316
|
}
|
|
636
|
-
export const BucketBackend = /*@__PURE__*/ S.suspend(() =>
|
|
637
|
-
S.Struct({
|
|
638
|
-
bucketUrl: S.String,
|
|
639
|
-
region: S.String,
|
|
640
|
-
type: BucketBackendType,
|
|
641
|
-
}),
|
|
642
|
-
).annotate({ identifier: "BucketBackend" }) as any as S.Schema<BucketBackend>;
|
|
643
|
-
|
|
644
317
|
export type ConfigBackend = HttpBackend | BucketBackend;
|
|
645
|
-
export const ConfigBackend = /*@__PURE__*/ S.Unknown as any as S.Schema<ConfigBackend>;
|
|
646
|
-
|
|
647
318
|
/** Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g. DE, ES, GB). This setting blocks users from the specified countries. */
|
|
648
319
|
export type ConfigBlockedCountriesList = Array<string>;
|
|
649
|
-
export const ConfigBlockedCountriesList = /*@__PURE__*/ S.Array(
|
|
650
|
-
S.String,
|
|
651
|
-
) as any as S.Schema<ConfigBlockedCountriesList>;
|
|
652
|
-
|
|
653
320
|
/** Restricts access to your content by specifying a list of blocked IPv4 addresses. This feature enhances security and privacy by preventing these addresses from accessing your distribution. */
|
|
654
321
|
export type ConfigBlockedIpsList = Array<string>;
|
|
655
|
-
export const ConfigBlockedIpsList = /*@__PURE__*/ S.Array(
|
|
656
|
-
S.String,
|
|
657
|
-
) as any as S.Schema<ConfigBlockedIpsList>;
|
|
658
|
-
|
|
659
322
|
/** HTTP request header names whose values participate in the cache key. Each entry multiplies the number of cache variants by the number of distinct values observed for that header. */
|
|
660
323
|
export type CacheConfigCacheKeyHeadersList = Array<string>;
|
|
661
|
-
export const CacheConfigCacheKeyHeadersList = /*@__PURE__*/ S.Array(
|
|
662
|
-
S.String,
|
|
663
|
-
) as any as S.Schema<CacheConfigCacheKeyHeadersList>;
|
|
664
|
-
|
|
665
324
|
/** Allowlist of query-string parameter names that participate in the cache key when `queryStringVaryEnabled` is true. Ignored while `queryStringVaryEnabled` is false, but still stored so it can be re-activated without losing the list. */
|
|
666
325
|
export type CacheConfigQueryStringVaryParametersList = Array<string>;
|
|
667
|
-
export const CacheConfigQueryStringVaryParametersList = /*@__PURE__*/ S.Array(
|
|
668
|
-
S.String,
|
|
669
|
-
) as any as S.Schema<CacheConfigQueryStringVaryParametersList>;
|
|
670
|
-
|
|
671
326
|
/** Groups the cache options that influence how the CDN builds its cache key. **Cache cardinality warning:** enabling query-string vary produces one cache entry per unique query-string combination (**unbounded** when `queryStringVaryParameters` is empty). Each entry in `cacheKeyHeaders` multiplies the number of cache variants by the number of distinct values observed for that header. Use these settings sparingly. `queryStringVaryParameters` is stored independently of `queryStringVaryEnabled` so that this feature can be toggled on and off without losing the configured allowlist. Only `queryStringVaryEnabled` gates whether the parameter allowlist actually varies the cache. **Optimizer interaction:** when the Optimizer is enabled, the CDN automatically enables query-string vary for image responses regardless of this setting. */
|
|
672
327
|
export interface CacheConfig {
|
|
673
328
|
/** HTTP request header names whose values participate in the cache key. Each entry multiplies the number of cache variants by the number of distinct values observed for that header. */
|
|
@@ -677,63 +332,26 @@ export interface CacheConfig {
|
|
|
677
332
|
/** Allowlist of query-string parameter names that participate in the cache key when `queryStringVaryEnabled` is true. Ignored while `queryStringVaryEnabled` is false, but still stored so it can be re-activated without losing the list. */
|
|
678
333
|
queryStringVaryParameters: CacheConfigQueryStringVaryParametersList;
|
|
679
334
|
}
|
|
680
|
-
export const CacheConfig = /*@__PURE__*/ S.suspend(() =>
|
|
681
|
-
S.Struct({
|
|
682
|
-
cacheKeyHeaders: CacheConfigCacheKeyHeadersList,
|
|
683
|
-
queryStringVaryEnabled: S.Boolean,
|
|
684
|
-
queryStringVaryParameters: CacheConfigQueryStringVaryParametersList,
|
|
685
|
-
}),
|
|
686
|
-
).annotate({ identifier: "CacheConfig" }) as any as S.Schema<CacheConfig>;
|
|
687
|
-
|
|
688
335
|
/** Labels are key-value string pairs that can be attached to a distribution. */
|
|
689
336
|
export type ConfigLabelsMap = { [key: string]: string | undefined };
|
|
690
|
-
export const ConfigLabelsMap = /*@__PURE__*/ S.Record(
|
|
691
|
-
S.String,
|
|
692
|
-
S.String,
|
|
693
|
-
) as any as S.Schema<ConfigLabelsMap>;
|
|
694
|
-
|
|
695
337
|
/** Defines the type of the log sink. */
|
|
696
338
|
export type LokiLogSinkType = "loki";
|
|
697
|
-
export const LokiLogSinkType = S.String;
|
|
698
|
-
|
|
699
339
|
export interface LokiLogSink {
|
|
700
340
|
/** The fully qualified URL where the CDN should push logs to your Loki instance (for example, `https://loki.example.com/loki/api/v1/push`). */
|
|
701
341
|
pushUrl: string;
|
|
702
342
|
/** Defines the type of the log sink. */
|
|
703
343
|
type: LokiLogSinkType;
|
|
704
344
|
}
|
|
705
|
-
export const LokiLogSink = /*@__PURE__*/ S.suspend(() =>
|
|
706
|
-
S.Struct({
|
|
707
|
-
pushUrl: S.String,
|
|
708
|
-
type: LokiLogSinkType,
|
|
709
|
-
}),
|
|
710
|
-
).annotate({ identifier: "LokiLogSink" }) as any as S.Schema<LokiLogSink>;
|
|
711
|
-
|
|
712
345
|
/** Defines the type of the log sink. */
|
|
713
346
|
export type OtlpLogSinkType = "otlp";
|
|
714
|
-
export const OtlpLogSinkType = S.String;
|
|
715
|
-
|
|
716
347
|
export interface OtlpLogSink {
|
|
717
348
|
/** The fully qualified URL where the CDN should push logs to your OTLP endpoint (for example, `https://otlp.example.com/otlp/v1/logs`). */
|
|
718
349
|
pushUrl: string;
|
|
719
350
|
/** Defines the type of the log sink. */
|
|
720
351
|
type: OtlpLogSinkType;
|
|
721
352
|
}
|
|
722
|
-
export const OtlpLogSink = /*@__PURE__*/ S.suspend(() =>
|
|
723
|
-
S.Struct({
|
|
724
|
-
pushUrl: S.String,
|
|
725
|
-
type: OtlpLogSinkType,
|
|
726
|
-
}),
|
|
727
|
-
).annotate({ identifier: "OtlpLogSink" }) as any as S.Schema<OtlpLogSink>;
|
|
728
|
-
|
|
729
353
|
export type ConfigLogSink = LokiLogSink | OtlpLogSink;
|
|
730
|
-
export const ConfigLogSink = /*@__PURE__*/ S.Unknown as any as S.Schema<ConfigLogSink>;
|
|
731
|
-
|
|
732
354
|
export type ConfigRegionsList = Array<Region>;
|
|
733
|
-
export const ConfigRegionsList = /*@__PURE__*/ S.Array(
|
|
734
|
-
Region,
|
|
735
|
-
) as any as S.Schema<ConfigRegionsList>;
|
|
736
|
-
|
|
737
355
|
export interface Config {
|
|
738
356
|
backend: ConfigBackend;
|
|
739
357
|
/** Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g. DE, ES, GB). This setting blocks users from the specified countries. */
|
|
@@ -758,29 +376,7 @@ export interface Config {
|
|
|
758
376
|
tls: TlsConfig;
|
|
759
377
|
waf: WafConfig;
|
|
760
378
|
}
|
|
761
|
-
export const Config = /*@__PURE__*/ S.suspend(() =>
|
|
762
|
-
S.Struct({
|
|
763
|
-
backend: ConfigBackend,
|
|
764
|
-
blockedCountries: ConfigBlockedCountriesList,
|
|
765
|
-
blockedIps: ConfigBlockedIpsList,
|
|
766
|
-
cacheConfig: CacheConfig,
|
|
767
|
-
defaultCacheDuration: S.optional(S.NullOr(S.String)),
|
|
768
|
-
forwardHostHeader: S.Boolean,
|
|
769
|
-
labels: S.optional(ConfigLabelsMap),
|
|
770
|
-
logSink: S.optional(ConfigLogSink),
|
|
771
|
-
monthlyLimitBytes: S.optional(S.NullOr(S.Number)),
|
|
772
|
-
optimizer: S.optional(Optimizer),
|
|
773
|
-
redirects: S.optional(RedirectConfig),
|
|
774
|
-
regions: ConfigRegionsList,
|
|
775
|
-
stripResponseCookies: S.Boolean,
|
|
776
|
-
tls: TlsConfig,
|
|
777
|
-
waf: WafConfig,
|
|
778
|
-
}),
|
|
779
|
-
).annotate({ identifier: "Config" }) as any as S.Schema<Config>;
|
|
780
|
-
|
|
781
379
|
export type DomainCertificateType = "managed" | "custom";
|
|
782
|
-
export const DomainCertificateType = S.String;
|
|
783
|
-
|
|
784
380
|
/** An enum value that describes a Status Error. */
|
|
785
381
|
export type StatusErrorKey =
|
|
786
382
|
| "UNKNOWN"
|
|
@@ -789,8 +385,6 @@ export type StatusErrorKey =
|
|
|
789
385
|
| "PUBLIC_BETA_QUOTA_REACHED"
|
|
790
386
|
| "LOG_SINK_INSTANCE_UNAVAILABLE"
|
|
791
387
|
| "EXTERNAL_QUOTA_REACHED";
|
|
792
|
-
export const StatusErrorKey = S.String;
|
|
793
|
-
|
|
794
388
|
export interface StatusError {
|
|
795
389
|
/** A german translation string corresponding to the error key. Note that we do not guarantee german translations are present. */
|
|
796
390
|
de?: string;
|
|
@@ -799,28 +393,12 @@ export interface StatusError {
|
|
|
799
393
|
/** An enum value that describes a Status Error. */
|
|
800
394
|
key: StatusErrorKey;
|
|
801
395
|
}
|
|
802
|
-
export const StatusError = /*@__PURE__*/ S.suspend(() =>
|
|
803
|
-
S.Struct({
|
|
804
|
-
de: S.optional(S.String),
|
|
805
|
-
en: S.String,
|
|
806
|
-
key: StatusErrorKey,
|
|
807
|
-
}),
|
|
808
|
-
).annotate({ identifier: "StatusError" }) as any as S.Schema<StatusError>;
|
|
809
|
-
|
|
810
396
|
/** This object is present if the custom domain has errors. */
|
|
811
397
|
export type DomainErrorsList = Array<StatusError>;
|
|
812
|
-
export const DomainErrorsList = /*@__PURE__*/ S.Array(
|
|
813
|
-
StatusError,
|
|
814
|
-
) as any as S.Schema<DomainErrorsList>;
|
|
815
|
-
|
|
816
398
|
/** The status of the domain: CREATING indicates that the custom domain is being set up. UPDATING means that requested changes are being applied to the custom domain. ACTIVE means the custom domain is currently configured and active. DELETING means that the domain is in the process of being removed from the distribution. In case the domain has the ERROR state, more information will be available in the errors list. */
|
|
817
399
|
export type DomainStatus = "CREATING" | "ACTIVE" | "UPDATING" | "DELETING" | "ERROR";
|
|
818
|
-
export const DomainStatus = S.String;
|
|
819
|
-
|
|
820
400
|
/** Specifies the type of this Domain. Custom Domain can be further queries using the GetCustomDomain Endpoint */
|
|
821
401
|
export type DomainType = "managed" | "custom";
|
|
822
|
-
export const DomainType = S.String;
|
|
823
|
-
|
|
824
402
|
/** Definition of a custom or managed domain without any certificates or keys */
|
|
825
403
|
export interface Domain {
|
|
826
404
|
certificateType: DomainCertificateType;
|
|
@@ -832,107 +410,40 @@ export interface Domain {
|
|
|
832
410
|
/** Specifies the type of this Domain. Custom Domain can be further queries using the GetCustomDomain Endpoint */
|
|
833
411
|
type: DomainType;
|
|
834
412
|
}
|
|
835
|
-
export const Domain = /*@__PURE__*/ S.suspend(() =>
|
|
836
|
-
S.Struct({
|
|
837
|
-
certificateType: DomainCertificateType,
|
|
838
|
-
errors: S.optional(DomainErrorsList),
|
|
839
|
-
name: S.String,
|
|
840
|
-
status: DomainStatus,
|
|
841
|
-
type: DomainType,
|
|
842
|
-
}),
|
|
843
|
-
).annotate({ identifier: "Domain" }) as any as S.Schema<Domain>;
|
|
844
|
-
|
|
845
413
|
export type DistributionDomainsList = Array<Domain>;
|
|
846
|
-
export const DistributionDomainsList = /*@__PURE__*/ S.Array(
|
|
847
|
-
Domain,
|
|
848
|
-
) as any as S.Schema<DistributionDomainsList>;
|
|
849
|
-
|
|
850
414
|
/** This object may be present if, and only if the distribution has encountered an error state. */
|
|
851
415
|
export type DistributionErrorsList = Array<StatusError>;
|
|
852
|
-
export const DistributionErrorsList = /*@__PURE__*/ S.Array(
|
|
853
|
-
StatusError,
|
|
854
|
-
) as any as S.Schema<DistributionErrorsList>;
|
|
855
|
-
|
|
856
416
|
/** - `CREATING`: The distribution was just created. All the relevant resources are created in the background. Once fully reconciled, this switches to `ACTIVE`. If there are any issues, the status changes to `ERROR`. You can look at the `errors` array to get more infos. - `ACTIVE`: The usual state. The desired configuration is synced, there are no errors - `UPDATING`: The state when there is a discrepancy between the desired and actual configuration state. This occurs right after an update. Will switch to `ACTIVE` or `ERROR`, depending on if synchronizing succeeds or not. - `DELETING`: The state right after a delete request was received. The distribution will stay in this status until all resources have been successfully removed, or until we encounter an `ERROR` state. **NOTE:** You can keep fetching the distribution while it is deleting. After successful deletion, trying to get a distribution will return a 404 Not Found response - `ERROR`: The error state. Look at the `errors` array for more info. */
|
|
857
417
|
export type DistributionStatus = "CREATING" | "ACTIVE" | "UPDATING" | "DELETING" | "ERROR";
|
|
858
|
-
export const DistributionStatus = S.String;
|
|
859
|
-
|
|
860
418
|
/** This object only ever shows up in the disabled rules section. If rules are never defined (e.g. no collection, rule group, or the rule itself is ever mentioned), they are implicitly disabled */
|
|
861
419
|
export interface WafStatusRuleBlockReasonNeverDefined {
|
|
862
420
|
/** This is always `neverDefined` */
|
|
863
421
|
type: string;
|
|
864
422
|
}
|
|
865
|
-
export const WafStatusRuleBlockReasonNeverDefined = /*@__PURE__*/ S.suspend(() =>
|
|
866
|
-
S.Struct({
|
|
867
|
-
type: S.String,
|
|
868
|
-
}),
|
|
869
|
-
).annotate({
|
|
870
|
-
identifier: "WafStatusRuleBlockReasonNeverDefined",
|
|
871
|
-
}) as any as S.Schema<WafStatusRuleBlockReasonNeverDefined>;
|
|
872
|
-
|
|
873
423
|
export interface WafStatusRuleBlockReasonDirectlyDefined {
|
|
874
424
|
/** This is always `directlyDefined` */
|
|
875
425
|
type: string;
|
|
876
426
|
}
|
|
877
|
-
export const WafStatusRuleBlockReasonDirectlyDefined = /*@__PURE__*/ S.suspend(() =>
|
|
878
|
-
S.Struct({
|
|
879
|
-
type: S.String,
|
|
880
|
-
}),
|
|
881
|
-
).annotate({
|
|
882
|
-
identifier: "WafStatusRuleBlockReasonDirectlyDefined",
|
|
883
|
-
}) as any as S.Schema<WafStatusRuleBlockReasonDirectlyDefined>;
|
|
884
|
-
|
|
885
427
|
/** A list containing all WAF Types which can use this Rule. You must patch you WAF to one of these WAF Types to make use of this rule. Rules show up with this state if they would have been enabled or logOnly otherwise. */
|
|
886
428
|
export type WafStatusRuleBlockReasonInvalidWafTypeAllowedWafTypesList = Array<WafType>;
|
|
887
|
-
export const WafStatusRuleBlockReasonInvalidWafTypeAllowedWafTypesList = /*@__PURE__*/ S.Array(
|
|
888
|
-
WafType,
|
|
889
|
-
) as any as S.Schema<WafStatusRuleBlockReasonInvalidWafTypeAllowedWafTypesList>;
|
|
890
|
-
|
|
891
429
|
export interface WafStatusRuleBlockReasonInvalidWafType {
|
|
892
430
|
/** A list containing all WAF Types which can use this Rule. You must patch you WAF to one of these WAF Types to make use of this rule. Rules show up with this state if they would have been enabled or logOnly otherwise. */
|
|
893
431
|
allowedWafTypes: WafStatusRuleBlockReasonInvalidWafTypeAllowedWafTypesList;
|
|
894
432
|
/** This is always `invalidWafType` */
|
|
895
433
|
type: string;
|
|
896
434
|
}
|
|
897
|
-
export const WafStatusRuleBlockReasonInvalidWafType = /*@__PURE__*/ S.suspend(() =>
|
|
898
|
-
S.Struct({
|
|
899
|
-
allowedWafTypes: WafStatusRuleBlockReasonInvalidWafTypeAllowedWafTypesList,
|
|
900
|
-
type: S.String,
|
|
901
|
-
}),
|
|
902
|
-
).annotate({
|
|
903
|
-
identifier: "WafStatusRuleBlockReasonInvalidWafType",
|
|
904
|
-
}) as any as S.Schema<WafStatusRuleBlockReasonInvalidWafType>;
|
|
905
|
-
|
|
906
435
|
export interface WafStatusRuleBlockReasonInheritedFromCollection {
|
|
907
436
|
/** The Collection that caused this rule to be in its current state. */
|
|
908
437
|
collectionId: string;
|
|
909
438
|
/** This is always `inheritedFromCollection` */
|
|
910
439
|
type: string;
|
|
911
440
|
}
|
|
912
|
-
export const WafStatusRuleBlockReasonInheritedFromCollection = /*@__PURE__*/ S.suspend(() =>
|
|
913
|
-
S.Struct({
|
|
914
|
-
collectionId: S.String,
|
|
915
|
-
type: S.String,
|
|
916
|
-
}),
|
|
917
|
-
).annotate({
|
|
918
|
-
identifier: "WafStatusRuleBlockReasonInheritedFromCollection",
|
|
919
|
-
}) as any as S.Schema<WafStatusRuleBlockReasonInheritedFromCollection>;
|
|
920
|
-
|
|
921
441
|
export interface WafStatusRuleBlockReasonInheritedFromGroup {
|
|
922
442
|
/** The Group that caused this rule to be in its current state. */
|
|
923
443
|
groupId: string;
|
|
924
444
|
/** This is always `inheritedFromGroup` */
|
|
925
445
|
type: string;
|
|
926
446
|
}
|
|
927
|
-
export const WafStatusRuleBlockReasonInheritedFromGroup = /*@__PURE__*/ S.suspend(() =>
|
|
928
|
-
S.Struct({
|
|
929
|
-
groupId: S.String,
|
|
930
|
-
type: S.String,
|
|
931
|
-
}),
|
|
932
|
-
).annotate({
|
|
933
|
-
identifier: "WafStatusRuleBlockReasonInheritedFromGroup",
|
|
934
|
-
}) as any as S.Schema<WafStatusRuleBlockReasonInheritedFromGroup>;
|
|
935
|
-
|
|
936
447
|
/** Defines the Reason why a Rule is in the specified state (set to be enabled, disabled or logOnly). */
|
|
937
448
|
export type WafStatusRuleBlockReason =
|
|
938
449
|
| WafStatusRuleBlockReasonNeverDefined
|
|
@@ -940,50 +451,20 @@ export type WafStatusRuleBlockReason =
|
|
|
940
451
|
| WafStatusRuleBlockReasonInvalidWafType
|
|
941
452
|
| WafStatusRuleBlockReasonInheritedFromCollection
|
|
942
453
|
| WafStatusRuleBlockReasonInheritedFromGroup;
|
|
943
|
-
export const WafStatusRuleBlockReason =
|
|
944
|
-
/*@__PURE__*/ S.Unknown as any as S.Schema<WafStatusRuleBlockReason>;
|
|
945
|
-
|
|
946
454
|
export interface WafStatusRuleBlock {
|
|
947
455
|
/** Specifies the Id of the Rule. */
|
|
948
456
|
id: string;
|
|
949
457
|
reason: WafStatusRuleBlockReason;
|
|
950
458
|
}
|
|
951
|
-
export const WafStatusRuleBlock = /*@__PURE__*/ S.suspend(() =>
|
|
952
|
-
S.Struct({
|
|
953
|
-
id: S.String,
|
|
954
|
-
reason: WafStatusRuleBlockReason,
|
|
955
|
-
}),
|
|
956
|
-
).annotate({ identifier: "WafStatusRuleBlock" }) as any as S.Schema<WafStatusRuleBlock>;
|
|
957
|
-
|
|
958
459
|
export type DistributionWafDisabledRulesList = Array<WafStatusRuleBlock>;
|
|
959
|
-
export const DistributionWafDisabledRulesList = /*@__PURE__*/ S.Array(
|
|
960
|
-
WafStatusRuleBlock,
|
|
961
|
-
) as any as S.Schema<DistributionWafDisabledRulesList>;
|
|
962
|
-
|
|
963
460
|
export type DistributionWafEnabledRulesList = Array<WafStatusRuleBlock>;
|
|
964
|
-
export const DistributionWafEnabledRulesList = /*@__PURE__*/ S.Array(
|
|
965
|
-
WafStatusRuleBlock,
|
|
966
|
-
) as any as S.Schema<DistributionWafEnabledRulesList>;
|
|
967
|
-
|
|
968
461
|
export type DistributionWafLogOnlyRulesList = Array<WafStatusRuleBlock>;
|
|
969
|
-
export const DistributionWafLogOnlyRulesList = /*@__PURE__*/ S.Array(
|
|
970
|
-
WafStatusRuleBlock,
|
|
971
|
-
) as any as S.Schema<DistributionWafLogOnlyRulesList>;
|
|
972
|
-
|
|
973
462
|
/** For this property to be present two pre-conditions must be met: - the WAF was enabled at least once - the query parameter ?withWafStatus is truthy This property contains the waf Status. At this point in time, this contains all resolved rules. Rules are split into 3 groups: - enabledRules - logOnlyRules - disabledRules **Do note that the global waf mode (Disabled, LogOnly, Enabled) is *NOT* reflected in this list!** */
|
|
974
463
|
export interface DistributionWaf {
|
|
975
464
|
disabledRules: DistributionWafDisabledRulesList;
|
|
976
465
|
enabledRules: DistributionWafEnabledRulesList;
|
|
977
466
|
logOnlyRules: DistributionWafLogOnlyRulesList;
|
|
978
467
|
}
|
|
979
|
-
export const DistributionWaf = /*@__PURE__*/ S.suspend(() =>
|
|
980
|
-
S.Struct({
|
|
981
|
-
disabledRules: DistributionWafDisabledRulesList,
|
|
982
|
-
enabledRules: DistributionWafEnabledRulesList,
|
|
983
|
-
logOnlyRules: DistributionWafLogOnlyRulesList,
|
|
984
|
-
}),
|
|
985
|
-
).annotate({ identifier: "DistributionWaf" }) as any as S.Schema<DistributionWaf>;
|
|
986
|
-
|
|
987
468
|
export interface Distribution {
|
|
988
469
|
config: Config;
|
|
989
470
|
/** RFC3339 string defining when the distribution was created */
|
|
@@ -1000,31 +481,9 @@ export interface Distribution {
|
|
|
1000
481
|
/** For this property to be present two pre-conditions must be met: - the WAF was enabled at least once - the query parameter ?withWafStatus is truthy This property contains the waf Status. At this point in time, this contains all resolved rules. Rules are split into 3 groups: - enabledRules - logOnlyRules - disabledRules **Do note that the global waf mode (Disabled, LogOnly, Enabled) is *NOT* reflected in this list!** */
|
|
1001
482
|
waf?: DistributionWaf;
|
|
1002
483
|
}
|
|
1003
|
-
export const Distribution = /*@__PURE__*/ S.suspend(() =>
|
|
1004
|
-
S.Struct({
|
|
1005
|
-
config: Config,
|
|
1006
|
-
createdAt: S.String,
|
|
1007
|
-
domains: DistributionDomainsList,
|
|
1008
|
-
errors: S.optional(DistributionErrorsList),
|
|
1009
|
-
id: S.String,
|
|
1010
|
-
projectId: S.String,
|
|
1011
|
-
status: DistributionStatus,
|
|
1012
|
-
updatedAt: S.String,
|
|
1013
|
-
waf: S.optional(DistributionWaf),
|
|
1014
|
-
}),
|
|
1015
|
-
).annotate({ identifier: "Distribution" }) as any as S.Schema<Distribution>;
|
|
1016
|
-
|
|
1017
484
|
export interface CreateDistributionResponse {
|
|
1018
485
|
distribution: Distribution;
|
|
1019
486
|
}
|
|
1020
|
-
export const CreateDistributionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1021
|
-
S.Struct({
|
|
1022
|
-
distribution: Distribution,
|
|
1023
|
-
}),
|
|
1024
|
-
).annotate({
|
|
1025
|
-
identifier: "CreateDistributionResponse",
|
|
1026
|
-
}) as any as S.Schema<CreateDistributionResponse>;
|
|
1027
|
-
|
|
1028
487
|
export interface DeleteCustomDomainRequest {
|
|
1029
488
|
/** Your STACKIT Project Id */
|
|
1030
489
|
projectId: string;
|
|
@@ -1032,30 +491,8 @@ export interface DeleteCustomDomainRequest {
|
|
|
1032
491
|
domain: string;
|
|
1033
492
|
intentId?: string;
|
|
1034
493
|
}
|
|
1035
|
-
export const DeleteCustomDomainRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1036
|
-
S.Struct({
|
|
1037
|
-
projectId: S.String.pipe(T.Label()),
|
|
1038
|
-
distributionId: S.String.pipe(T.Label()),
|
|
1039
|
-
domain: S.String.pipe(T.Label()),
|
|
1040
|
-
intentId: S.optional(S.String.pipe(T.Query())),
|
|
1041
|
-
}).pipe(
|
|
1042
|
-
T.Http({
|
|
1043
|
-
method: "DELETE",
|
|
1044
|
-
uri: "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}",
|
|
1045
|
-
code: 200,
|
|
1046
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1047
|
-
}),
|
|
1048
|
-
),
|
|
1049
|
-
).annotate({
|
|
1050
|
-
identifier: "DeleteCustomDomainRequest",
|
|
1051
|
-
}) as any as S.Schema<DeleteCustomDomainRequest>;
|
|
1052
|
-
|
|
1053
494
|
/** This object is present if the custom domain has errors. */
|
|
1054
495
|
export type CustomDomainErrorsList = Array<StatusError>;
|
|
1055
|
-
export const CustomDomainErrorsList = /*@__PURE__*/ S.Array(
|
|
1056
|
-
StatusError,
|
|
1057
|
-
) as any as S.Schema<CustomDomainErrorsList>;
|
|
1058
|
-
|
|
1059
496
|
/** Definition of a custom domain */
|
|
1060
497
|
export interface CustomDomain {
|
|
1061
498
|
/** This object is present if the custom domain has errors. */
|
|
@@ -1064,26 +501,10 @@ export interface CustomDomain {
|
|
|
1064
501
|
name: string;
|
|
1065
502
|
status: DomainStatus;
|
|
1066
503
|
}
|
|
1067
|
-
export const CustomDomain = /*@__PURE__*/ S.suspend(() =>
|
|
1068
|
-
S.Struct({
|
|
1069
|
-
errors: S.optional(CustomDomainErrorsList),
|
|
1070
|
-
name: S.String,
|
|
1071
|
-
status: DomainStatus,
|
|
1072
|
-
}),
|
|
1073
|
-
).annotate({ identifier: "CustomDomain" }) as any as S.Schema<CustomDomain>;
|
|
1074
|
-
|
|
1075
504
|
/** Returns the custom domain that was deleted while the deletion has not completed yet. After the deletion was successful the response will be empty. */
|
|
1076
505
|
export interface DeleteCustomDomainResponse {
|
|
1077
506
|
customDomain?: CustomDomain;
|
|
1078
507
|
}
|
|
1079
|
-
export const DeleteCustomDomainResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1080
|
-
S.Struct({
|
|
1081
|
-
customDomain: S.optional(CustomDomain),
|
|
1082
|
-
}),
|
|
1083
|
-
).annotate({
|
|
1084
|
-
identifier: "DeleteCustomDomainResponse",
|
|
1085
|
-
}) as any as S.Schema<DeleteCustomDomainResponse>;
|
|
1086
|
-
|
|
1087
508
|
export interface DeleteDistributionRequest {
|
|
1088
509
|
/** Your STACKIT Project Id */
|
|
1089
510
|
projectId: string;
|
|
@@ -1091,34 +512,9 @@ export interface DeleteDistributionRequest {
|
|
|
1091
512
|
/** While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple DELETE-Requests with the same `intentId` are received, all but the first request are dropped. */
|
|
1092
513
|
intentId?: string;
|
|
1093
514
|
}
|
|
1094
|
-
export const DeleteDistributionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1095
|
-
S.Struct({
|
|
1096
|
-
projectId: S.String.pipe(T.Label()),
|
|
1097
|
-
distributionId: S.String.pipe(T.Label()),
|
|
1098
|
-
intentId: S.optional(S.String.pipe(T.Query())),
|
|
1099
|
-
}).pipe(
|
|
1100
|
-
T.Http({
|
|
1101
|
-
method: "DELETE",
|
|
1102
|
-
uri: "/v1/projects/{projectId}/distributions/{distributionId}",
|
|
1103
|
-
code: 200,
|
|
1104
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1105
|
-
}),
|
|
1106
|
-
),
|
|
1107
|
-
).annotate({
|
|
1108
|
-
identifier: "DeleteDistributionRequest",
|
|
1109
|
-
}) as any as S.Schema<DeleteDistributionRequest>;
|
|
1110
|
-
|
|
1111
515
|
export interface DeleteDistributionResponse {
|
|
1112
516
|
distribution?: Distribution;
|
|
1113
517
|
}
|
|
1114
|
-
export const DeleteDistributionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1115
|
-
S.Struct({
|
|
1116
|
-
distribution: S.optional(Distribution),
|
|
1117
|
-
}),
|
|
1118
|
-
).annotate({
|
|
1119
|
-
identifier: "DeleteDistributionResponse",
|
|
1120
|
-
}) as any as S.Schema<DeleteDistributionResponse>;
|
|
1121
|
-
|
|
1122
518
|
export interface FindCachePathsRequest {
|
|
1123
519
|
/** Your STACKIT Project Id */
|
|
1124
520
|
projectId: string;
|
|
@@ -1126,134 +522,41 @@ export interface FindCachePathsRequest {
|
|
|
1126
522
|
/** A substring of the search query. */
|
|
1127
523
|
path: string;
|
|
1128
524
|
}
|
|
1129
|
-
export const FindCachePathsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1130
|
-
S.Struct({
|
|
1131
|
-
projectId: S.String.pipe(T.Label()),
|
|
1132
|
-
distributionId: S.String.pipe(T.Label()),
|
|
1133
|
-
path: S.String.pipe(T.Query()),
|
|
1134
|
-
}).pipe(
|
|
1135
|
-
T.Http({
|
|
1136
|
-
method: "GET",
|
|
1137
|
-
uri: "/v1/projects/{projectId}/distributions/{distributionId}/cache/paths",
|
|
1138
|
-
code: 200,
|
|
1139
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1140
|
-
}),
|
|
1141
|
-
),
|
|
1142
|
-
).annotate({ identifier: "FindCachePathsRequest" }) as any as S.Schema<FindCachePathsRequest>;
|
|
1143
|
-
|
|
1144
525
|
export interface FindCachePathsResponseEntry {
|
|
1145
526
|
/** Defines one path that was previously used as part of a granular purge */
|
|
1146
527
|
path: string;
|
|
1147
528
|
}
|
|
1148
|
-
export const FindCachePathsResponseEntry = /*@__PURE__*/ S.suspend(() =>
|
|
1149
|
-
S.Struct({
|
|
1150
|
-
path: S.String,
|
|
1151
|
-
}),
|
|
1152
|
-
).annotate({
|
|
1153
|
-
identifier: "FindCachePathsResponseEntry",
|
|
1154
|
-
}) as any as S.Schema<FindCachePathsResponseEntry>;
|
|
1155
|
-
|
|
1156
529
|
export type FindCachePathsResponseResponseList = Array<FindCachePathsResponseEntry>;
|
|
1157
|
-
export const FindCachePathsResponseResponseList = /*@__PURE__*/ S.Array(
|
|
1158
|
-
FindCachePathsResponseEntry,
|
|
1159
|
-
) as any as S.Schema<FindCachePathsResponseResponseList>;
|
|
1160
|
-
|
|
1161
530
|
export interface FindCachePathsResponse {
|
|
1162
531
|
response: FindCachePathsResponseResponseList;
|
|
1163
532
|
}
|
|
1164
|
-
export const FindCachePathsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1165
|
-
S.Struct({
|
|
1166
|
-
response: FindCachePathsResponseResponseList,
|
|
1167
|
-
}),
|
|
1168
|
-
).annotate({ identifier: "FindCachePathsResponse" }) as any as S.Schema<FindCachePathsResponse>;
|
|
1169
|
-
|
|
1170
533
|
export interface GetCacheInfoRequest {
|
|
1171
534
|
/** Your STACKIT Project Id */
|
|
1172
535
|
projectId: string;
|
|
1173
536
|
distributionId: string;
|
|
1174
537
|
purgePath?: string;
|
|
1175
538
|
}
|
|
1176
|
-
export const GetCacheInfoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1177
|
-
S.Struct({
|
|
1178
|
-
projectId: S.String.pipe(T.Label()),
|
|
1179
|
-
distributionId: S.String.pipe(T.Label()),
|
|
1180
|
-
purgePath: S.optional(S.String.pipe(T.Query())),
|
|
1181
|
-
}).pipe(
|
|
1182
|
-
T.Http({
|
|
1183
|
-
method: "GET",
|
|
1184
|
-
uri: "/v1/projects/{projectId}/distributions/{distributionId}/cache",
|
|
1185
|
-
code: 200,
|
|
1186
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1187
|
-
}),
|
|
1188
|
-
),
|
|
1189
|
-
).annotate({ identifier: "GetCacheInfoRequest" }) as any as S.Schema<GetCacheInfoRequest>;
|
|
1190
|
-
|
|
1191
539
|
export type GetCacheInfoResponseHistoryEntryType = "full" | "granular";
|
|
1192
|
-
export const GetCacheInfoResponseHistoryEntryType = S.String;
|
|
1193
|
-
|
|
1194
540
|
export interface GetCacheInfoResponseHistoryEntry {
|
|
1195
541
|
occurredAt: string;
|
|
1196
542
|
type: GetCacheInfoResponseHistoryEntryType;
|
|
1197
543
|
}
|
|
1198
|
-
export const GetCacheInfoResponseHistoryEntry = /*@__PURE__*/ S.suspend(() =>
|
|
1199
|
-
S.Struct({
|
|
1200
|
-
occurredAt: S.String,
|
|
1201
|
-
type: GetCacheInfoResponseHistoryEntryType,
|
|
1202
|
-
}),
|
|
1203
|
-
).annotate({
|
|
1204
|
-
identifier: "GetCacheInfoResponseHistoryEntry",
|
|
1205
|
-
}) as any as S.Schema<GetCacheInfoResponseHistoryEntry>;
|
|
1206
|
-
|
|
1207
544
|
export type GetCacheInfoResponseHistoryList = Array<GetCacheInfoResponseHistoryEntry>;
|
|
1208
|
-
export const GetCacheInfoResponseHistoryList = /*@__PURE__*/ S.Array(
|
|
1209
|
-
GetCacheInfoResponseHistoryEntry,
|
|
1210
|
-
) as any as S.Schema<GetCacheInfoResponseHistoryList>;
|
|
1211
|
-
|
|
1212
545
|
export interface GetCacheInfoResponse {
|
|
1213
546
|
history: GetCacheInfoResponseHistoryList;
|
|
1214
547
|
/** Returns the last time the cache was purged by calling the PurgeCache endpoint. Time represented as RFC3339 compliant string. If the cache was never purged, this returns `null` */
|
|
1215
548
|
lastPurgeTime: string | null;
|
|
1216
549
|
}
|
|
1217
|
-
export const GetCacheInfoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1218
|
-
S.Struct({
|
|
1219
|
-
history: GetCacheInfoResponseHistoryList,
|
|
1220
|
-
lastPurgeTime: S.NullOr(S.String),
|
|
1221
|
-
}),
|
|
1222
|
-
).annotate({ identifier: "GetCacheInfoResponse" }) as any as S.Schema<GetCacheInfoResponse>;
|
|
1223
|
-
|
|
1224
550
|
export interface GetCustomDomainRequest {
|
|
1225
551
|
/** Your STACKIT Project Id */
|
|
1226
552
|
projectId: string;
|
|
1227
553
|
distributionId: string;
|
|
1228
554
|
domain: string;
|
|
1229
555
|
}
|
|
1230
|
-
export const GetCustomDomainRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1231
|
-
S.Struct({
|
|
1232
|
-
projectId: S.String.pipe(T.Label()),
|
|
1233
|
-
distributionId: S.String.pipe(T.Label()),
|
|
1234
|
-
domain: S.String.pipe(T.Label()),
|
|
1235
|
-
}).pipe(
|
|
1236
|
-
T.Http({
|
|
1237
|
-
method: "GET",
|
|
1238
|
-
uri: "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}",
|
|
1239
|
-
code: 200,
|
|
1240
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1241
|
-
}),
|
|
1242
|
-
),
|
|
1243
|
-
).annotate({ identifier: "GetCustomDomainRequest" }) as any as S.Schema<GetCustomDomainRequest>;
|
|
1244
|
-
|
|
1245
556
|
/** This is returned when no custom certificate is used. We provision and manage a Let's Encrypt Certificate for you */
|
|
1246
557
|
export interface GetCustomDomainManagedCertificate {
|
|
1247
558
|
type: string;
|
|
1248
559
|
}
|
|
1249
|
-
export const GetCustomDomainManagedCertificate = /*@__PURE__*/ S.suspend(() =>
|
|
1250
|
-
S.Struct({
|
|
1251
|
-
type: S.String,
|
|
1252
|
-
}),
|
|
1253
|
-
).annotate({
|
|
1254
|
-
identifier: "GetCustomDomainManagedCertificate",
|
|
1255
|
-
}) as any as S.Schema<GetCustomDomainManagedCertificate>;
|
|
1256
|
-
|
|
1257
560
|
/** Returned if a custom certificate is used. Response does not contain the certificate or key. */
|
|
1258
561
|
export interface GetCustomDomainCustomCertificate {
|
|
1259
562
|
/** Returns if the CNAME Check has been disabled for this Custom Domain. This is usually set for migrations to allow for no downtime. */
|
|
@@ -1262,33 +565,13 @@ export interface GetCustomDomainCustomCertificate {
|
|
|
1262
565
|
/** Whenever a new custom certificate is added the version is increased by 1. */
|
|
1263
566
|
version: number;
|
|
1264
567
|
}
|
|
1265
|
-
export const GetCustomDomainCustomCertificate = /*@__PURE__*/ S.suspend(() =>
|
|
1266
|
-
S.Struct({
|
|
1267
|
-
skipDnsCheck: S.Boolean,
|
|
1268
|
-
type: S.String,
|
|
1269
|
-
version: S.Number,
|
|
1270
|
-
}),
|
|
1271
|
-
).annotate({
|
|
1272
|
-
identifier: "GetCustomDomainCustomCertificate",
|
|
1273
|
-
}) as any as S.Schema<GetCustomDomainCustomCertificate>;
|
|
1274
|
-
|
|
1275
568
|
export type GetCustomDomainResponseCertificate =
|
|
1276
569
|
| GetCustomDomainManagedCertificate
|
|
1277
570
|
| GetCustomDomainCustomCertificate;
|
|
1278
|
-
export const GetCustomDomainResponseCertificate =
|
|
1279
|
-
/*@__PURE__*/ S.Unknown as any as S.Schema<GetCustomDomainResponseCertificate>;
|
|
1280
|
-
|
|
1281
571
|
export interface GetCustomDomainResponse {
|
|
1282
572
|
certificate: GetCustomDomainResponseCertificate;
|
|
1283
573
|
customDomain: CustomDomain;
|
|
1284
574
|
}
|
|
1285
|
-
export const GetCustomDomainResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1286
|
-
S.Struct({
|
|
1287
|
-
certificate: GetCustomDomainResponseCertificate,
|
|
1288
|
-
customDomain: CustomDomain,
|
|
1289
|
-
}),
|
|
1290
|
-
).annotate({ identifier: "GetCustomDomainResponse" }) as any as S.Schema<GetCustomDomainResponse>;
|
|
1291
|
-
|
|
1292
575
|
export interface GetDistributionRequest {
|
|
1293
576
|
/** Your STACKIT Project Id */
|
|
1294
577
|
projectId: string;
|
|
@@ -1296,30 +579,9 @@ export interface GetDistributionRequest {
|
|
|
1296
579
|
/** If set, the top level of a distribution contains a `waf` property, which defines the status of the waf. This includes a list of all resolved rules. */
|
|
1297
580
|
withWafStatus?: boolean;
|
|
1298
581
|
}
|
|
1299
|
-
export const GetDistributionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1300
|
-
S.Struct({
|
|
1301
|
-
projectId: S.String.pipe(T.Label()),
|
|
1302
|
-
distributionId: S.String.pipe(T.Label()),
|
|
1303
|
-
withWafStatus: S.optional(S.Boolean.pipe(T.Query())),
|
|
1304
|
-
}).pipe(
|
|
1305
|
-
T.Http({
|
|
1306
|
-
method: "GET",
|
|
1307
|
-
uri: "/v1/projects/{projectId}/distributions/{distributionId}",
|
|
1308
|
-
code: 200,
|
|
1309
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1310
|
-
}),
|
|
1311
|
-
),
|
|
1312
|
-
).annotate({ identifier: "GetDistributionRequest" }) as any as S.Schema<GetDistributionRequest>;
|
|
1313
|
-
|
|
1314
582
|
export interface GetDistributionResponse {
|
|
1315
583
|
distribution: Distribution;
|
|
1316
584
|
}
|
|
1317
|
-
export const GetDistributionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1318
|
-
S.Struct({
|
|
1319
|
-
distribution: Distribution,
|
|
1320
|
-
}),
|
|
1321
|
-
).annotate({ identifier: "GetDistributionResponse" }) as any as S.Schema<GetDistributionResponse>;
|
|
1322
|
-
|
|
1323
585
|
export type GetLogsRequestSortBy =
|
|
1324
586
|
| "timestamp"
|
|
1325
587
|
| "dataCenterRegion"
|
|
@@ -1329,15 +591,9 @@ export type GetLogsRequestSortBy =
|
|
|
1329
591
|
| "size"
|
|
1330
592
|
| "path"
|
|
1331
593
|
| "host";
|
|
1332
|
-
export const GetLogsRequestSortBy = S.String;
|
|
1333
|
-
|
|
1334
594
|
export type GetLogsRequestSortOrder = "ascending" | "descending";
|
|
1335
|
-
export const GetLogsRequestSortOrder = S.String;
|
|
1336
|
-
|
|
1337
595
|
/** The action a WAF rule can take based on a request */
|
|
1338
596
|
export type WAFRuleAction = "BLOCKED" | "LOGGED" | "ALLOWED";
|
|
1339
|
-
export const WAFRuleAction = S.String;
|
|
1340
|
-
|
|
1341
597
|
export interface GetLogsRequest {
|
|
1342
598
|
/** Your STACKIT Project Id */
|
|
1343
599
|
projectId: string;
|
|
@@ -1365,37 +621,7 @@ export interface GetLogsRequest {
|
|
|
1365
621
|
/** Filters based on whether the request was served from the CDN cache. Can be combined with other filters */
|
|
1366
622
|
cacheHit?: boolean;
|
|
1367
623
|
}
|
|
1368
|
-
export const GetLogsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1369
|
-
S.Struct({
|
|
1370
|
-
projectId: S.String.pipe(T.Label()),
|
|
1371
|
-
distributionId: S.String.pipe(T.Label()),
|
|
1372
|
-
from: S.optional(S.String.pipe(T.Query())),
|
|
1373
|
-
to: S.optional(S.String.pipe(T.Query())),
|
|
1374
|
-
pageSize: S.optional(S.Number.pipe(T.Query())),
|
|
1375
|
-
pageIdentifier: S.optional(S.String.pipe(T.Query())),
|
|
1376
|
-
sortBy: S.optional(GetLogsRequestSortBy.pipe(T.Query())),
|
|
1377
|
-
sortOrder: S.optional(GetLogsRequestSortOrder.pipe(T.Query())),
|
|
1378
|
-
wafAction: S.optional(WAFRuleAction.pipe(T.Query())),
|
|
1379
|
-
dataCenterRegion: S.optional(S.String.pipe(T.Query())),
|
|
1380
|
-
requestCountryCode: S.optional(S.String.pipe(T.Query())),
|
|
1381
|
-
statusCode: S.optional(S.Number.pipe(T.Query())),
|
|
1382
|
-
cacheHit: S.optional(S.Boolean.pipe(T.Query())),
|
|
1383
|
-
}).pipe(
|
|
1384
|
-
T.Http({
|
|
1385
|
-
method: "GET",
|
|
1386
|
-
uri: "/v1/projects/{projectId}/distributions/{distributionId}/logs",
|
|
1387
|
-
code: 200,
|
|
1388
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1389
|
-
}),
|
|
1390
|
-
),
|
|
1391
|
-
).annotate({ identifier: "GetLogsRequest" }) as any as S.Schema<GetLogsRequest>;
|
|
1392
|
-
|
|
1393
624
|
export type WAFViolationRequestHeadersMap = { [key: string]: string | undefined };
|
|
1394
|
-
export const WAFViolationRequestHeadersMap = /*@__PURE__*/ S.Record(
|
|
1395
|
-
S.String,
|
|
1396
|
-
S.String,
|
|
1397
|
-
) as any as S.Schema<WAFViolationRequestHeadersMap>;
|
|
1398
|
-
|
|
1399
625
|
/** Information about a violated WAF rule in case the WAF is enabled and a rule was triggered (either in BLOCK or LOG_ONLY mode) */
|
|
1400
626
|
export interface WAFViolation {
|
|
1401
627
|
action: WAFRuleAction;
|
|
@@ -1409,17 +635,6 @@ export interface WAFViolation {
|
|
|
1409
635
|
/** ID of the WAF rule that was triggered */
|
|
1410
636
|
ruleId: string;
|
|
1411
637
|
}
|
|
1412
|
-
export const WAFViolation = /*@__PURE__*/ S.suspend(() =>
|
|
1413
|
-
S.Struct({
|
|
1414
|
-
action: WAFRuleAction,
|
|
1415
|
-
asn: S.String,
|
|
1416
|
-
message: S.String,
|
|
1417
|
-
method: S.String,
|
|
1418
|
-
requestHeaders: WAFViolationRequestHeadersMap,
|
|
1419
|
-
ruleId: S.String,
|
|
1420
|
-
}),
|
|
1421
|
-
).annotate({ identifier: "WAFViolation" }) as any as S.Schema<WAFViolation>;
|
|
1422
|
-
|
|
1423
638
|
export interface DistributionLogsRecord {
|
|
1424
639
|
cacheHit: boolean;
|
|
1425
640
|
dataCenterRegion: string;
|
|
@@ -1433,37 +648,11 @@ export interface DistributionLogsRecord {
|
|
|
1433
648
|
timestamp: string;
|
|
1434
649
|
wafViolation?: WAFViolation;
|
|
1435
650
|
}
|
|
1436
|
-
export const DistributionLogsRecord = /*@__PURE__*/ S.suspend(() =>
|
|
1437
|
-
S.Struct({
|
|
1438
|
-
cacheHit: S.Boolean,
|
|
1439
|
-
dataCenterRegion: S.String,
|
|
1440
|
-
distributionId: S.String,
|
|
1441
|
-
host: S.String,
|
|
1442
|
-
path: S.String,
|
|
1443
|
-
requestCountryCode: S.String,
|
|
1444
|
-
size: S.Number,
|
|
1445
|
-
statusCode: S.Number,
|
|
1446
|
-
timestamp: S.String,
|
|
1447
|
-
wafViolation: S.optional(WAFViolation),
|
|
1448
|
-
}),
|
|
1449
|
-
).annotate({ identifier: "DistributionLogsRecord" }) as any as S.Schema<DistributionLogsRecord>;
|
|
1450
|
-
|
|
1451
651
|
export type GetLogsResponseLogsList = Array<DistributionLogsRecord>;
|
|
1452
|
-
export const GetLogsResponseLogsList = /*@__PURE__*/ S.Array(
|
|
1453
|
-
DistributionLogsRecord,
|
|
1454
|
-
) as any as S.Schema<GetLogsResponseLogsList>;
|
|
1455
|
-
|
|
1456
652
|
export interface GetLogsResponse {
|
|
1457
653
|
logs: GetLogsResponseLogsList;
|
|
1458
654
|
nextPageIdentifier?: string;
|
|
1459
655
|
}
|
|
1460
|
-
export const GetLogsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1461
|
-
S.Struct({
|
|
1462
|
-
logs: GetLogsResponseLogsList,
|
|
1463
|
-
nextPageIdentifier: S.optional(S.String),
|
|
1464
|
-
}),
|
|
1465
|
-
).annotate({ identifier: "GetLogsResponse" }) as any as S.Schema<GetLogsResponse>;
|
|
1466
|
-
|
|
1467
656
|
export interface GetLogsSearchFiltersRequest {
|
|
1468
657
|
/** Your STACKIT Project ID. */
|
|
1469
658
|
projectId: string;
|
|
@@ -1472,75 +661,23 @@ export interface GetLogsSearchFiltersRequest {
|
|
|
1472
661
|
/** Optional search string. Will search the **values** for the text input. */
|
|
1473
662
|
filter?: string;
|
|
1474
663
|
}
|
|
1475
|
-
export const GetLogsSearchFiltersRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1476
|
-
S.Struct({
|
|
1477
|
-
projectId: S.String.pipe(T.Label()),
|
|
1478
|
-
distributionId: S.String.pipe(T.Label()),
|
|
1479
|
-
filter: S.optional(S.String.pipe(T.Query())),
|
|
1480
|
-
}).pipe(
|
|
1481
|
-
T.Http({
|
|
1482
|
-
method: "GET",
|
|
1483
|
-
uri: "/v1/projects/{projectId}/distributions/{distributionId}/logs/searchFilters",
|
|
1484
|
-
code: 200,
|
|
1485
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1486
|
-
}),
|
|
1487
|
-
),
|
|
1488
|
-
).annotate({
|
|
1489
|
-
identifier: "GetLogsSearchFiltersRequest",
|
|
1490
|
-
}) as any as S.Schema<GetLogsSearchFiltersRequest>;
|
|
1491
|
-
|
|
1492
664
|
export type GetLogsSearchFiltersResponseCacheItem = "HIT" | "MISS";
|
|
1493
|
-
export const GetLogsSearchFiltersResponseCacheItem = S.String;
|
|
1494
|
-
|
|
1495
665
|
export type GetLogsSearchFiltersResponseCacheList = Array<GetLogsSearchFiltersResponseCacheItem>;
|
|
1496
|
-
export const GetLogsSearchFiltersResponseCacheList = /*@__PURE__*/ S.Array(
|
|
1497
|
-
GetLogsSearchFiltersResponseCacheItem,
|
|
1498
|
-
) as any as S.Schema<GetLogsSearchFiltersResponseCacheList>;
|
|
1499
|
-
|
|
1500
666
|
/** A datacenter. The `id` defines the key needed to filter against the logs endpoint, while the `displayName` defines a human-readable Name. */
|
|
1501
667
|
export interface GetLogsSearchFiltersResponseDatacenterBlockItem {
|
|
1502
668
|
displayName: string;
|
|
1503
669
|
id: string;
|
|
1504
670
|
}
|
|
1505
|
-
export const GetLogsSearchFiltersResponseDatacenterBlockItem = /*@__PURE__*/ S.suspend(() =>
|
|
1506
|
-
S.Struct({
|
|
1507
|
-
displayName: S.String,
|
|
1508
|
-
id: S.String,
|
|
1509
|
-
}),
|
|
1510
|
-
).annotate({
|
|
1511
|
-
identifier: "GetLogsSearchFiltersResponseDatacenterBlockItem",
|
|
1512
|
-
}) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlockItem>;
|
|
1513
|
-
|
|
1514
671
|
export type GetLogsSearchFiltersResponseDatacenterBlockAFList =
|
|
1515
672
|
Array<GetLogsSearchFiltersResponseDatacenterBlockItem>;
|
|
1516
|
-
export const GetLogsSearchFiltersResponseDatacenterBlockAFList = /*@__PURE__*/ S.Array(
|
|
1517
|
-
GetLogsSearchFiltersResponseDatacenterBlockItem,
|
|
1518
|
-
) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlockAFList>;
|
|
1519
|
-
|
|
1520
673
|
export type GetLogsSearchFiltersResponseDatacenterBlockASIAList =
|
|
1521
674
|
Array<GetLogsSearchFiltersResponseDatacenterBlockItem>;
|
|
1522
|
-
export const GetLogsSearchFiltersResponseDatacenterBlockASIAList = /*@__PURE__*/ S.Array(
|
|
1523
|
-
GetLogsSearchFiltersResponseDatacenterBlockItem,
|
|
1524
|
-
) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlockASIAList>;
|
|
1525
|
-
|
|
1526
675
|
export type GetLogsSearchFiltersResponseDatacenterBlockEUList =
|
|
1527
676
|
Array<GetLogsSearchFiltersResponseDatacenterBlockItem>;
|
|
1528
|
-
export const GetLogsSearchFiltersResponseDatacenterBlockEUList = /*@__PURE__*/ S.Array(
|
|
1529
|
-
GetLogsSearchFiltersResponseDatacenterBlockItem,
|
|
1530
|
-
) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlockEUList>;
|
|
1531
|
-
|
|
1532
677
|
export type GetLogsSearchFiltersResponseDatacenterBlockNAList =
|
|
1533
678
|
Array<GetLogsSearchFiltersResponseDatacenterBlockItem>;
|
|
1534
|
-
export const GetLogsSearchFiltersResponseDatacenterBlockNAList = /*@__PURE__*/ S.Array(
|
|
1535
|
-
GetLogsSearchFiltersResponseDatacenterBlockItem,
|
|
1536
|
-
) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlockNAList>;
|
|
1537
|
-
|
|
1538
679
|
export type GetLogsSearchFiltersResponseDatacenterBlockSAList =
|
|
1539
680
|
Array<GetLogsSearchFiltersResponseDatacenterBlockItem>;
|
|
1540
|
-
export const GetLogsSearchFiltersResponseDatacenterBlockSAList = /*@__PURE__*/ S.Array(
|
|
1541
|
-
GetLogsSearchFiltersResponseDatacenterBlockItem,
|
|
1542
|
-
) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlockSAList>;
|
|
1543
|
-
|
|
1544
681
|
/** Object containing Datacenters to filter for. Each datacenter is grouped to the respective region. */
|
|
1545
682
|
export interface GetLogsSearchFiltersResponseDatacenterBlock {
|
|
1546
683
|
AF: GetLogsSearchFiltersResponseDatacenterBlockAFList;
|
|
@@ -1549,30 +686,10 @@ export interface GetLogsSearchFiltersResponseDatacenterBlock {
|
|
|
1549
686
|
NA: GetLogsSearchFiltersResponseDatacenterBlockNAList;
|
|
1550
687
|
SA: GetLogsSearchFiltersResponseDatacenterBlockSAList;
|
|
1551
688
|
}
|
|
1552
|
-
export const GetLogsSearchFiltersResponseDatacenterBlock = /*@__PURE__*/ S.suspend(() =>
|
|
1553
|
-
S.Struct({
|
|
1554
|
-
AF: GetLogsSearchFiltersResponseDatacenterBlockAFList,
|
|
1555
|
-
ASIA: GetLogsSearchFiltersResponseDatacenterBlockASIAList,
|
|
1556
|
-
EU: GetLogsSearchFiltersResponseDatacenterBlockEUList,
|
|
1557
|
-
NA: GetLogsSearchFiltersResponseDatacenterBlockNAList,
|
|
1558
|
-
SA: GetLogsSearchFiltersResponseDatacenterBlockSAList,
|
|
1559
|
-
}),
|
|
1560
|
-
).annotate({
|
|
1561
|
-
identifier: "GetLogsSearchFiltersResponseDatacenterBlock",
|
|
1562
|
-
}) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlock>;
|
|
1563
|
-
|
|
1564
689
|
/** List of ISO-3166 Alpha2 Country Codes matching the input filter. Response is ordered in ascending order. For more Info about the country codes, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */
|
|
1565
690
|
export type GetLogsSearchFiltersResponseRemoteCountryList = Array<string>;
|
|
1566
|
-
export const GetLogsSearchFiltersResponseRemoteCountryList = /*@__PURE__*/ S.Array(
|
|
1567
|
-
S.String,
|
|
1568
|
-
) as any as S.Schema<GetLogsSearchFiltersResponseRemoteCountryList>;
|
|
1569
|
-
|
|
1570
691
|
/** List of Status Codes matching the input filter. Response is ordered in ascending order. */
|
|
1571
692
|
export type GetLogsSearchFiltersResponseStatusList = Array<number>;
|
|
1572
|
-
export const GetLogsSearchFiltersResponseStatusList = /*@__PURE__*/ S.Array(
|
|
1573
|
-
S.Number,
|
|
1574
|
-
) as any as S.Schema<GetLogsSearchFiltersResponseStatusList>;
|
|
1575
|
-
|
|
1576
693
|
export interface GetLogsSearchFiltersResponse {
|
|
1577
694
|
cache: GetLogsSearchFiltersResponseCacheList;
|
|
1578
695
|
dataCenter: GetLogsSearchFiltersResponseDatacenterBlock;
|
|
@@ -1581,20 +698,7 @@ export interface GetLogsSearchFiltersResponse {
|
|
|
1581
698
|
/** List of Status Codes matching the input filter. Response is ordered in ascending order. */
|
|
1582
699
|
status: GetLogsSearchFiltersResponseStatusList;
|
|
1583
700
|
}
|
|
1584
|
-
export const GetLogsSearchFiltersResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1585
|
-
S.Struct({
|
|
1586
|
-
cache: GetLogsSearchFiltersResponseCacheList,
|
|
1587
|
-
dataCenter: GetLogsSearchFiltersResponseDatacenterBlock,
|
|
1588
|
-
remoteCountry: GetLogsSearchFiltersResponseRemoteCountryList,
|
|
1589
|
-
status: GetLogsSearchFiltersResponseStatusList,
|
|
1590
|
-
}),
|
|
1591
|
-
).annotate({
|
|
1592
|
-
identifier: "GetLogsSearchFiltersResponse",
|
|
1593
|
-
}) as any as S.Schema<GetLogsSearchFiltersResponse>;
|
|
1594
|
-
|
|
1595
701
|
export type GetStatisticsRequestInterval = "hourly" | "daily" | "monthly" | "yearly";
|
|
1596
|
-
export const GetStatisticsRequestInterval = S.String;
|
|
1597
|
-
|
|
1598
702
|
export interface GetStatisticsRequest {
|
|
1599
703
|
/** Your STACKIT Project Id */
|
|
1600
704
|
projectId: string;
|
|
@@ -1606,23 +710,6 @@ export interface GetStatisticsRequest {
|
|
|
1606
710
|
/** Over which interval should statistics be aggregated? defaults to hourly resolution **NOTE**: Intervals are grouped in buckets that start and end based on a day in UTC+0 time. So for the `daily` interval, the group starts (inclusive) and ends (exclusive) at `00:00Z` */
|
|
1607
711
|
interval?: GetStatisticsRequestInterval | (string & {});
|
|
1608
712
|
}
|
|
1609
|
-
export const GetStatisticsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1610
|
-
S.Struct({
|
|
1611
|
-
projectId: S.String.pipe(T.Label()),
|
|
1612
|
-
distributionId: S.String.pipe(T.Label()),
|
|
1613
|
-
from: S.String.pipe(T.Query()),
|
|
1614
|
-
to: S.optional(S.String.pipe(T.Query())),
|
|
1615
|
-
interval: S.optional(GetStatisticsRequestInterval.pipe(T.Query())),
|
|
1616
|
-
}).pipe(
|
|
1617
|
-
T.Http({
|
|
1618
|
-
method: "GET",
|
|
1619
|
-
uri: "/v1/projects/{projectId}/distributions/{distributionId}/statistics",
|
|
1620
|
-
code: 200,
|
|
1621
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1622
|
-
}),
|
|
1623
|
-
),
|
|
1624
|
-
).annotate({ identifier: "GetStatisticsRequest" }) as any as S.Schema<GetStatisticsRequest>;
|
|
1625
|
-
|
|
1626
713
|
export interface DistributionStatisticsRecordEntry {
|
|
1627
714
|
/** Number of cached requests that were served */
|
|
1628
715
|
cachedRequests: number;
|
|
@@ -1631,16 +718,6 @@ export interface DistributionStatisticsRecordEntry {
|
|
|
1631
718
|
/** Total traffic in bytes that occurred during the time interval */
|
|
1632
719
|
totalTrafficBytes: number;
|
|
1633
720
|
}
|
|
1634
|
-
export const DistributionStatisticsRecordEntry = /*@__PURE__*/ S.suspend(() =>
|
|
1635
|
-
S.Struct({
|
|
1636
|
-
cachedRequests: S.Number,
|
|
1637
|
-
totalRequests: S.Number,
|
|
1638
|
-
totalTrafficBytes: S.Number,
|
|
1639
|
-
}),
|
|
1640
|
-
).annotate({
|
|
1641
|
-
identifier: "DistributionStatisticsRecordEntry",
|
|
1642
|
-
}) as any as S.Schema<DistributionStatisticsRecordEntry>;
|
|
1643
|
-
|
|
1644
721
|
/** Mapping of regions to the metrics for this region for the defined time interval All regions are always present. If no traffic was reported for a region, it will still contain 0-filled properties */
|
|
1645
722
|
export interface DistributionStatisticsRecordRegions {
|
|
1646
723
|
AF: DistributionStatisticsRecordEntry;
|
|
@@ -1649,18 +726,6 @@ export interface DistributionStatisticsRecordRegions {
|
|
|
1649
726
|
SA: DistributionStatisticsRecordEntry;
|
|
1650
727
|
US: DistributionStatisticsRecordEntry;
|
|
1651
728
|
}
|
|
1652
|
-
export const DistributionStatisticsRecordRegions = /*@__PURE__*/ S.suspend(() =>
|
|
1653
|
-
S.Struct({
|
|
1654
|
-
AF: DistributionStatisticsRecordEntry,
|
|
1655
|
-
ASIA: DistributionStatisticsRecordEntry,
|
|
1656
|
-
EU: DistributionStatisticsRecordEntry,
|
|
1657
|
-
SA: DistributionStatisticsRecordEntry,
|
|
1658
|
-
US: DistributionStatisticsRecordEntry,
|
|
1659
|
-
}),
|
|
1660
|
-
).annotate({
|
|
1661
|
-
identifier: "DistributionStatisticsRecordRegions",
|
|
1662
|
-
}) as any as S.Schema<DistributionStatisticsRecordRegions>;
|
|
1663
|
-
|
|
1664
729
|
/** Aggregated statistics of a distribution during a time interval */
|
|
1665
730
|
export interface DistributionStatisticsRecord {
|
|
1666
731
|
/** Number of cached requests that were served */
|
|
@@ -1675,33 +740,10 @@ export interface DistributionStatisticsRecord {
|
|
|
1675
740
|
/** Start of the time interval the statistics refer to */
|
|
1676
741
|
start: string;
|
|
1677
742
|
}
|
|
1678
|
-
export const DistributionStatisticsRecord = /*@__PURE__*/ S.suspend(() =>
|
|
1679
|
-
S.Struct({
|
|
1680
|
-
cachedRequests: S.Number,
|
|
1681
|
-
totalRequests: S.Number,
|
|
1682
|
-
totalTrafficBytes: S.Number,
|
|
1683
|
-
end: S.String,
|
|
1684
|
-
regions: DistributionStatisticsRecordRegions,
|
|
1685
|
-
start: S.String,
|
|
1686
|
-
}),
|
|
1687
|
-
).annotate({
|
|
1688
|
-
identifier: "DistributionStatisticsRecord",
|
|
1689
|
-
}) as any as S.Schema<DistributionStatisticsRecord>;
|
|
1690
|
-
|
|
1691
743
|
export type GetStatisticsResponseRecordsList = Array<DistributionStatisticsRecord>;
|
|
1692
|
-
export const GetStatisticsResponseRecordsList = /*@__PURE__*/ S.Array(
|
|
1693
|
-
DistributionStatisticsRecord,
|
|
1694
|
-
) as any as S.Schema<GetStatisticsResponseRecordsList>;
|
|
1695
|
-
|
|
1696
744
|
export interface GetStatisticsResponse {
|
|
1697
745
|
records: GetStatisticsResponseRecordsList;
|
|
1698
746
|
}
|
|
1699
|
-
export const GetStatisticsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1700
|
-
S.Struct({
|
|
1701
|
-
records: GetStatisticsResponseRecordsList,
|
|
1702
|
-
}),
|
|
1703
|
-
).annotate({ identifier: "GetStatisticsResponse" }) as any as S.Schema<GetStatisticsResponse>;
|
|
1704
|
-
|
|
1705
747
|
export type ListDistributionsRequestSortBy =
|
|
1706
748
|
| "id"
|
|
1707
749
|
| "updatedAt"
|
|
@@ -1709,11 +751,7 @@ export type ListDistributionsRequestSortBy =
|
|
|
1709
751
|
| "originUrl"
|
|
1710
752
|
| "status"
|
|
1711
753
|
| "originUrlRelated";
|
|
1712
|
-
export const ListDistributionsRequestSortBy = S.String;
|
|
1713
|
-
|
|
1714
754
|
export type ListDistributionsRequestSortOrder = "ascending" | "descending";
|
|
1715
|
-
export const ListDistributionsRequestSortOrder = S.String;
|
|
1716
|
-
|
|
1717
755
|
export interface ListDistributionsRequest {
|
|
1718
756
|
/** Your STACKIT Project Id */
|
|
1719
757
|
projectId: string;
|
|
@@ -1727,159 +765,48 @@ export interface ListDistributionsRequest {
|
|
|
1727
765
|
sortBy?: ListDistributionsRequestSortBy | (string & {});
|
|
1728
766
|
sortOrder?: ListDistributionsRequestSortOrder | (string & {});
|
|
1729
767
|
}
|
|
1730
|
-
export const ListDistributionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1731
|
-
S.Struct({
|
|
1732
|
-
projectId: S.String.pipe(T.Label()),
|
|
1733
|
-
pageSize: S.optional(S.Number.pipe(T.Query())),
|
|
1734
|
-
withWafStatus: S.optional(S.Boolean.pipe(T.Query())),
|
|
1735
|
-
pageIdentifier: S.optional(S.String.pipe(T.Query())),
|
|
1736
|
-
sortBy: S.optional(ListDistributionsRequestSortBy.pipe(T.Query())),
|
|
1737
|
-
sortOrder: S.optional(ListDistributionsRequestSortOrder.pipe(T.Query())),
|
|
1738
|
-
}).pipe(
|
|
1739
|
-
T.Http({
|
|
1740
|
-
method: "GET",
|
|
1741
|
-
uri: "/v1/projects/{projectId}/distributions",
|
|
1742
|
-
code: 200,
|
|
1743
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1744
|
-
}),
|
|
1745
|
-
),
|
|
1746
|
-
).annotate({ identifier: "ListDistributionsRequest" }) as any as S.Schema<ListDistributionsRequest>;
|
|
1747
|
-
|
|
1748
768
|
export type ListDistributionsResponseDistributionsList = Array<Distribution>;
|
|
1749
|
-
export const ListDistributionsResponseDistributionsList = /*@__PURE__*/ S.Array(
|
|
1750
|
-
Distribution,
|
|
1751
|
-
) as any as S.Schema<ListDistributionsResponseDistributionsList>;
|
|
1752
|
-
|
|
1753
769
|
export interface ListDistributionsResponse {
|
|
1754
770
|
distributions: ListDistributionsResponseDistributionsList;
|
|
1755
771
|
nextPageIdentifier?: string;
|
|
1756
772
|
}
|
|
1757
|
-
export const ListDistributionsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1758
|
-
S.Struct({
|
|
1759
|
-
distributions: ListDistributionsResponseDistributionsList,
|
|
1760
|
-
nextPageIdentifier: S.optional(S.String),
|
|
1761
|
-
}),
|
|
1762
|
-
).annotate({
|
|
1763
|
-
identifier: "ListDistributionsResponse",
|
|
1764
|
-
}) as any as S.Schema<ListDistributionsResponse>;
|
|
1765
|
-
|
|
1766
773
|
export interface ListWafCollectionsRequest {
|
|
1767
774
|
/** Your STACKIT Project Id */
|
|
1768
775
|
projectId: string;
|
|
1769
776
|
}
|
|
1770
|
-
export const ListWafCollectionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1771
|
-
S.Struct({
|
|
1772
|
-
projectId: S.String.pipe(T.Label()),
|
|
1773
|
-
}).pipe(
|
|
1774
|
-
T.Http({
|
|
1775
|
-
method: "GET",
|
|
1776
|
-
uri: "/v1/projects/{projectId}/waf/collections",
|
|
1777
|
-
code: 200,
|
|
1778
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1779
|
-
}),
|
|
1780
|
-
),
|
|
1781
|
-
).annotate({
|
|
1782
|
-
identifier: "ListWafCollectionsRequest",
|
|
1783
|
-
}) as any as S.Schema<ListWafCollectionsRequest>;
|
|
1784
|
-
|
|
1785
777
|
/** LocalizedString is a map from language to string value */
|
|
1786
778
|
export type LocalizedString = { [key: string]: string | undefined };
|
|
1787
|
-
export const LocalizedString = /*@__PURE__*/ S.Record(
|
|
1788
|
-
S.String,
|
|
1789
|
-
S.String,
|
|
1790
|
-
) as any as S.Schema<LocalizedString>;
|
|
1791
|
-
|
|
1792
779
|
export interface WafRule {
|
|
1793
780
|
/** Optional CoreRuleSet rule Id in case this is a CRS rule */
|
|
1794
781
|
code?: string;
|
|
1795
782
|
description: LocalizedString;
|
|
1796
783
|
id: string;
|
|
1797
784
|
}
|
|
1798
|
-
export const WafRule = /*@__PURE__*/ S.suspend(() =>
|
|
1799
|
-
S.Struct({
|
|
1800
|
-
code: S.optional(S.String),
|
|
1801
|
-
description: LocalizedString,
|
|
1802
|
-
id: S.String,
|
|
1803
|
-
}),
|
|
1804
|
-
).annotate({ identifier: "WafRule" }) as any as S.Schema<WafRule>;
|
|
1805
|
-
|
|
1806
785
|
export type WafRuleGroupRulesList = Array<WafRule>;
|
|
1807
|
-
export const WafRuleGroupRulesList = /*@__PURE__*/ S.Array(
|
|
1808
|
-
WafRule,
|
|
1809
|
-
) as any as S.Schema<WafRuleGroupRulesList>;
|
|
1810
|
-
|
|
1811
786
|
export interface WafRuleGroup {
|
|
1812
787
|
description: LocalizedString;
|
|
1813
788
|
name: LocalizedString;
|
|
1814
789
|
rules: WafRuleGroupRulesList;
|
|
1815
790
|
}
|
|
1816
|
-
export const WafRuleGroup = /*@__PURE__*/ S.suspend(() =>
|
|
1817
|
-
S.Struct({
|
|
1818
|
-
description: LocalizedString,
|
|
1819
|
-
name: LocalizedString,
|
|
1820
|
-
rules: WafRuleGroupRulesList,
|
|
1821
|
-
}),
|
|
1822
|
-
).annotate({ identifier: "WafRuleGroup" }) as any as S.Schema<WafRuleGroup>;
|
|
1823
|
-
|
|
1824
791
|
export type WafRuleCollectionGroupsList = Array<WafRuleGroup>;
|
|
1825
|
-
export const WafRuleCollectionGroupsList = /*@__PURE__*/ S.Array(
|
|
1826
|
-
WafRuleGroup,
|
|
1827
|
-
) as any as S.Schema<WafRuleCollectionGroupsList>;
|
|
1828
|
-
|
|
1829
792
|
export interface WafRuleCollection {
|
|
1830
793
|
groups: WafRuleCollectionGroupsList;
|
|
1831
794
|
id: string;
|
|
1832
795
|
name: LocalizedString;
|
|
1833
796
|
}
|
|
1834
|
-
export const WafRuleCollection = /*@__PURE__*/ S.suspend(() =>
|
|
1835
|
-
S.Struct({
|
|
1836
|
-
groups: WafRuleCollectionGroupsList,
|
|
1837
|
-
id: S.String,
|
|
1838
|
-
name: LocalizedString,
|
|
1839
|
-
}),
|
|
1840
|
-
).annotate({ identifier: "WafRuleCollection" }) as any as S.Schema<WafRuleCollection>;
|
|
1841
|
-
|
|
1842
797
|
export type ListWafCollectionsResponseCollectionsList = Array<WafRuleCollection>;
|
|
1843
|
-
export const ListWafCollectionsResponseCollectionsList = /*@__PURE__*/ S.Array(
|
|
1844
|
-
WafRuleCollection,
|
|
1845
|
-
) as any as S.Schema<ListWafCollectionsResponseCollectionsList>;
|
|
1846
|
-
|
|
1847
798
|
export interface ListWafCollectionsResponse {
|
|
1848
799
|
collections: ListWafCollectionsResponseCollectionsList;
|
|
1849
800
|
}
|
|
1850
|
-
export const ListWafCollectionsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1851
|
-
S.Struct({
|
|
1852
|
-
collections: ListWafCollectionsResponseCollectionsList,
|
|
1853
|
-
}),
|
|
1854
|
-
).annotate({
|
|
1855
|
-
identifier: "ListWafCollectionsResponse",
|
|
1856
|
-
}) as any as S.Schema<ListWafCollectionsResponse>;
|
|
1857
|
-
|
|
1858
801
|
export type HttpBackendPatchGeofencingValueList = Array<string>;
|
|
1859
|
-
export const HttpBackendPatchGeofencingValueList = /*@__PURE__*/ S.Array(
|
|
1860
|
-
S.String,
|
|
1861
|
-
) as any as S.Schema<HttpBackendPatchGeofencingValueList>;
|
|
1862
|
-
|
|
1863
802
|
/** An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. */
|
|
1864
803
|
export type HttpBackendPatchGeofencingMap = {
|
|
1865
804
|
[key: string]: HttpBackendPatchGeofencingValueList | undefined;
|
|
1866
805
|
};
|
|
1867
|
-
export const HttpBackendPatchGeofencingMap = /*@__PURE__*/ S.Record(
|
|
1868
|
-
S.String,
|
|
1869
|
-
HttpBackendPatchGeofencingValueList,
|
|
1870
|
-
) as any as S.Schema<HttpBackendPatchGeofencingMap>;
|
|
1871
|
-
|
|
1872
806
|
/** Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. */
|
|
1873
807
|
export type HttpBackendPatchOriginRequestHeadersMap = { [key: string]: string | undefined };
|
|
1874
|
-
export const HttpBackendPatchOriginRequestHeadersMap = /*@__PURE__*/ S.Record(
|
|
1875
|
-
S.String,
|
|
1876
|
-
S.String,
|
|
1877
|
-
) as any as S.Schema<HttpBackendPatchOriginRequestHeadersMap>;
|
|
1878
|
-
|
|
1879
808
|
/** Defines the type of content origin. For this schema, it must be set to `http`. */
|
|
1880
809
|
export type HttpBackendPatchType = "http";
|
|
1881
|
-
export const HttpBackendPatchType = S.String;
|
|
1882
|
-
|
|
1883
810
|
/** A partial HTTP Backend */
|
|
1884
811
|
export interface HttpBackendPatch {
|
|
1885
812
|
/** An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. */
|
|
@@ -1891,19 +818,8 @@ export interface HttpBackendPatch {
|
|
|
1891
818
|
/** Defines the type of content origin. For this schema, it must be set to `http`. */
|
|
1892
819
|
type: HttpBackendPatchType;
|
|
1893
820
|
}
|
|
1894
|
-
export const HttpBackendPatch = /*@__PURE__*/ S.suspend(() =>
|
|
1895
|
-
S.Struct({
|
|
1896
|
-
geofencing: S.optional(HttpBackendPatchGeofencingMap),
|
|
1897
|
-
originRequestHeaders: S.optional(HttpBackendPatchOriginRequestHeadersMap),
|
|
1898
|
-
originUrl: S.optional(S.String),
|
|
1899
|
-
type: HttpBackendPatchType,
|
|
1900
|
-
}),
|
|
1901
|
-
).annotate({ identifier: "HttpBackendPatch" }) as any as S.Schema<HttpBackendPatch>;
|
|
1902
|
-
|
|
1903
821
|
/** Defines the type of content origin. For this schema, it must be set to `bucket`. */
|
|
1904
822
|
export type BucketBackendPatchType = "bucket";
|
|
1905
|
-
export const BucketBackendPatchType = S.String;
|
|
1906
|
-
|
|
1907
823
|
export interface BucketBackendPatch {
|
|
1908
824
|
/** The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`). */
|
|
1909
825
|
bucketUrl?: string;
|
|
@@ -1913,42 +829,15 @@ export interface BucketBackendPatch {
|
|
|
1913
829
|
/** Defines the type of content origin. For this schema, it must be set to `bucket`. */
|
|
1914
830
|
type: BucketBackendPatchType;
|
|
1915
831
|
}
|
|
1916
|
-
export const BucketBackendPatch = /*@__PURE__*/ S.suspend(() =>
|
|
1917
|
-
S.Struct({
|
|
1918
|
-
bucketUrl: S.optional(S.String),
|
|
1919
|
-
credentials: S.optional(BucketCredentials),
|
|
1920
|
-
region: S.optional(S.String),
|
|
1921
|
-
type: BucketBackendPatchType,
|
|
1922
|
-
}),
|
|
1923
|
-
).annotate({ identifier: "BucketBackendPatch" }) as any as S.Schema<BucketBackendPatch>;
|
|
1924
|
-
|
|
1925
832
|
export type ConfigPatchBackend = HttpBackendPatch | BucketBackendPatch;
|
|
1926
|
-
export const ConfigPatchBackend = /*@__PURE__*/ S.Unknown as any as S.Schema<ConfigPatchBackend>;
|
|
1927
|
-
|
|
1928
833
|
/** Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g., DE, ES, GB). This setting blocks users from the specified countries. */
|
|
1929
834
|
export type ConfigPatchBlockedCountriesList = Array<string>;
|
|
1930
|
-
export const ConfigPatchBlockedCountriesList = /*@__PURE__*/ S.Array(
|
|
1931
|
-
S.String,
|
|
1932
|
-
) as any as S.Schema<ConfigPatchBlockedCountriesList>;
|
|
1933
|
-
|
|
1934
835
|
/** Restricts access to your content by specifying a list of blocked IPv4 addresses. This feature enhances security and privacy by preventing these addresses from accessing your distribution. */
|
|
1935
836
|
export type ConfigPatchBlockedIpsList = Array<string>;
|
|
1936
|
-
export const ConfigPatchBlockedIpsList = /*@__PURE__*/ S.Array(
|
|
1937
|
-
S.String,
|
|
1938
|
-
) as any as S.Schema<ConfigPatchBlockedIpsList>;
|
|
1939
|
-
|
|
1940
837
|
/** HTTP request header names that participate in the cache key. Omit to leave unchanged; send `[]` to clear. */
|
|
1941
838
|
export type CacheConfigPatchCacheKeyHeadersList = Array<string>;
|
|
1942
|
-
export const CacheConfigPatchCacheKeyHeadersList = /*@__PURE__*/ S.Array(
|
|
1943
|
-
S.String,
|
|
1944
|
-
) as any as S.Schema<CacheConfigPatchCacheKeyHeadersList>;
|
|
1945
|
-
|
|
1946
839
|
/** Allowlist of query-string parameter names. Omit to leave unchanged; send `[]` to clear. */
|
|
1947
840
|
export type CacheConfigPatchQueryStringVaryParametersList = Array<string>;
|
|
1948
|
-
export const CacheConfigPatchQueryStringVaryParametersList = /*@__PURE__*/ S.Array(
|
|
1949
|
-
S.String,
|
|
1950
|
-
) as any as S.Schema<CacheConfigPatchQueryStringVaryParametersList>;
|
|
1951
|
-
|
|
1952
841
|
/** PATCH variant of `CacheConfig`. Follows the standard PATCH conventions for this API: - Field omitted from the request: current value is left unchanged. - Array field sent as `[]`: current list is cleared. - `queryStringVaryEnabled` is a plain boolean (non-nullable); omit it to leave unchanged. `queryStringVaryParameters` is stored independently of `queryStringVaryEnabled`. Sending a non-empty `queryStringVaryParameters` together with `queryStringVaryEnabled=false` is accepted: the list is persisted for later re-activation but does not affect the cache while the flag is false. */
|
|
1953
842
|
export interface CacheConfigPatch {
|
|
1954
843
|
/** HTTP request header names that participate in the cache key. Omit to leave unchanged; send `[]` to clear. */
|
|
@@ -1958,25 +847,10 @@ export interface CacheConfigPatch {
|
|
|
1958
847
|
/** Allowlist of query-string parameter names. Omit to leave unchanged; send `[]` to clear. */
|
|
1959
848
|
queryStringVaryParameters?: CacheConfigPatchQueryStringVaryParametersList;
|
|
1960
849
|
}
|
|
1961
|
-
export const CacheConfigPatch = /*@__PURE__*/ S.suspend(() =>
|
|
1962
|
-
S.Struct({
|
|
1963
|
-
cacheKeyHeaders: S.optional(CacheConfigPatchCacheKeyHeadersList),
|
|
1964
|
-
queryStringVaryEnabled: S.optional(S.Boolean),
|
|
1965
|
-
queryStringVaryParameters: S.optional(CacheConfigPatchQueryStringVaryParametersList),
|
|
1966
|
-
}),
|
|
1967
|
-
).annotate({ identifier: "CacheConfigPatch" }) as any as S.Schema<CacheConfigPatch>;
|
|
1968
|
-
|
|
1969
850
|
/** Labels are key-value string pairs that can be attached to a distribution. JSON Merge Patch is supported, meaning setting a key to null will remove it. */
|
|
1970
851
|
export type ConfigPatchLabelsMap = { [key: string]: string | null | undefined };
|
|
1971
|
-
export const ConfigPatchLabelsMap = /*@__PURE__*/ S.Record(
|
|
1972
|
-
S.String,
|
|
1973
|
-
S.NullOr(S.String),
|
|
1974
|
-
) as any as S.Schema<ConfigPatchLabelsMap>;
|
|
1975
|
-
|
|
1976
852
|
/** Defines the type of the log sink. For Grafana Loki, this must be set to `loki`. */
|
|
1977
853
|
export type LokiLogSinkPatchType = "loki";
|
|
1978
|
-
export const LokiLogSinkPatchType = S.String;
|
|
1979
|
-
|
|
1980
854
|
export interface LokiLogSinkPatch {
|
|
1981
855
|
credentials?: LokiLogSinkCredentials;
|
|
1982
856
|
/** The fully qualified URL where the CDN should push logs to your Loki instance (for example, `https://loki.example.com/loki/api/v1/push`). */
|
|
@@ -1984,25 +858,12 @@ export interface LokiLogSinkPatch {
|
|
|
1984
858
|
/** Defines the type of the log sink. For Grafana Loki, this must be set to `loki`. */
|
|
1985
859
|
type: LokiLogSinkPatchType;
|
|
1986
860
|
}
|
|
1987
|
-
export const LokiLogSinkPatch = /*@__PURE__*/ S.suspend(() =>
|
|
1988
|
-
S.Struct({
|
|
1989
|
-
credentials: S.optional(LokiLogSinkCredentials),
|
|
1990
|
-
pushUrl: S.optional(S.String),
|
|
1991
|
-
type: LokiLogSinkPatchType,
|
|
1992
|
-
}),
|
|
1993
|
-
).annotate({ identifier: "LokiLogSinkPatch" }) as any as S.Schema<LokiLogSinkPatch>;
|
|
1994
|
-
|
|
1995
861
|
/** The authentication credentials required for the CDN to push logs to your OTLP endpoint. */
|
|
1996
862
|
export type OtlpLogSinkPatchCredentials =
|
|
1997
863
|
| OtlpLogSinkBearerCredentials
|
|
1998
864
|
| OtlpLogSinkBasicCredentials;
|
|
1999
|
-
export const OtlpLogSinkPatchCredentials =
|
|
2000
|
-
/*@__PURE__*/ S.Unknown as any as S.Schema<OtlpLogSinkPatchCredentials>;
|
|
2001
|
-
|
|
2002
865
|
/** Defines the type of the log sink. */
|
|
2003
866
|
export type OtlpLogSinkPatchType = "otlp";
|
|
2004
|
-
export const OtlpLogSinkPatchType = S.String;
|
|
2005
|
-
|
|
2006
867
|
export interface OtlpLogSinkPatch {
|
|
2007
868
|
/** The authentication credentials required for the CDN to push logs to your OTLP endpoint. */
|
|
2008
869
|
credentials?: OtlpLogSinkPatchCredentials;
|
|
@@ -2011,31 +872,11 @@ export interface OtlpLogSinkPatch {
|
|
|
2011
872
|
/** Defines the type of the log sink. */
|
|
2012
873
|
type: OtlpLogSinkPatchType;
|
|
2013
874
|
}
|
|
2014
|
-
export const OtlpLogSinkPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2015
|
-
S.Struct({
|
|
2016
|
-
credentials: S.optional(OtlpLogSinkPatchCredentials),
|
|
2017
|
-
pushUrl: S.optional(S.String),
|
|
2018
|
-
type: OtlpLogSinkPatchType,
|
|
2019
|
-
}),
|
|
2020
|
-
).annotate({ identifier: "OtlpLogSinkPatch" }) as any as S.Schema<OtlpLogSinkPatch>;
|
|
2021
|
-
|
|
2022
875
|
export type ConfigPatchLogSink = LokiLogSinkPatch | OtlpLogSinkPatch;
|
|
2023
|
-
export const ConfigPatchLogSink = /*@__PURE__*/ S.Unknown as any as S.Schema<ConfigPatchLogSink>;
|
|
2024
|
-
|
|
2025
876
|
export interface OptimizerPatch {
|
|
2026
877
|
enabled?: boolean;
|
|
2027
878
|
}
|
|
2028
|
-
export const OptimizerPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2029
|
-
S.Struct({
|
|
2030
|
-
enabled: S.optional(S.Boolean),
|
|
2031
|
-
}),
|
|
2032
|
-
).annotate({ identifier: "OptimizerPatch" }) as any as S.Schema<OptimizerPatch>;
|
|
2033
|
-
|
|
2034
879
|
export type ConfigPatchRegionsList = Array<Region | (string & {})>;
|
|
2035
|
-
export const ConfigPatchRegionsList = /*@__PURE__*/ S.Array(
|
|
2036
|
-
Region,
|
|
2037
|
-
) as any as S.Schema<ConfigPatchRegionsList>;
|
|
2038
|
-
|
|
2039
880
|
/** Configuration for TLS protocol versions. Note: Enabling older TLS versions (1.0, 1.1) is generally discouraged for security reasons. */
|
|
2040
881
|
export interface TlsConfigPatch {
|
|
2041
882
|
/** If set to true, the distribution will accept connections using TLS 1.0. */
|
|
@@ -2043,82 +884,27 @@ export interface TlsConfigPatch {
|
|
|
2043
884
|
/** If set to true, the distribution will accept connections using TLS 1.1. */
|
|
2044
885
|
enableTls11?: boolean;
|
|
2045
886
|
}
|
|
2046
|
-
export const TlsConfigPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2047
|
-
S.Struct({
|
|
2048
|
-
enableTls10: S.optional(S.Boolean),
|
|
2049
|
-
enableTls11: S.optional(S.Boolean),
|
|
2050
|
-
}),
|
|
2051
|
-
).annotate({ identifier: "TlsConfigPatch" }) as any as S.Schema<TlsConfigPatch>;
|
|
2052
|
-
|
|
2053
887
|
export type WafConfigPatchAllowedHttpMethodsList = Array<string>;
|
|
2054
|
-
export const WafConfigPatchAllowedHttpMethodsList = /*@__PURE__*/ S.Array(
|
|
2055
|
-
S.String,
|
|
2056
|
-
) as any as S.Schema<WafConfigPatchAllowedHttpMethodsList>;
|
|
2057
|
-
|
|
2058
888
|
export type WafConfigPatchAllowedHttpVersionsList = Array<string>;
|
|
2059
|
-
export const WafConfigPatchAllowedHttpVersionsList = /*@__PURE__*/ S.Array(
|
|
2060
|
-
S.String,
|
|
2061
|
-
) as any as S.Schema<WafConfigPatchAllowedHttpVersionsList>;
|
|
2062
|
-
|
|
2063
889
|
export type WafConfigPatchAllowedRequestContentTypesList = Array<string>;
|
|
2064
|
-
export const WafConfigPatchAllowedRequestContentTypesList = /*@__PURE__*/ S.Array(
|
|
2065
|
-
S.String,
|
|
2066
|
-
) as any as S.Schema<WafConfigPatchAllowedRequestContentTypesList>;
|
|
2067
|
-
|
|
2068
890
|
/** Ids of WAF Collections to mark as disabled */
|
|
2069
891
|
export type WafConfigPatchDisabledRuleCollectionIdsList = Array<string>;
|
|
2070
|
-
export const WafConfigPatchDisabledRuleCollectionIdsList = /*@__PURE__*/ S.Array(
|
|
2071
|
-
S.String,
|
|
2072
|
-
) as any as S.Schema<WafConfigPatchDisabledRuleCollectionIdsList>;
|
|
2073
|
-
|
|
2074
892
|
/** Ids of WAF Rule Groups to mark as disabled */
|
|
2075
893
|
export type WafConfigPatchDisabledRuleGroupIdsList = Array<string>;
|
|
2076
|
-
export const WafConfigPatchDisabledRuleGroupIdsList = /*@__PURE__*/ S.Array(
|
|
2077
|
-
S.String,
|
|
2078
|
-
) as any as S.Schema<WafConfigPatchDisabledRuleGroupIdsList>;
|
|
2079
|
-
|
|
2080
894
|
/** Ids of WAF Rules that are **explicitly** disabled for this distribution. */
|
|
2081
895
|
export type WafConfigPatchDisabledRuleIdsList = Array<string>;
|
|
2082
|
-
export const WafConfigPatchDisabledRuleIdsList = /*@__PURE__*/ S.Array(
|
|
2083
|
-
S.String,
|
|
2084
|
-
) as any as S.Schema<WafConfigPatchDisabledRuleIdsList>;
|
|
2085
|
-
|
|
2086
896
|
/** Ids of WAF Collections to mark as enabled */
|
|
2087
897
|
export type WafConfigPatchEnabledRuleCollectionIdsList = Array<string>;
|
|
2088
|
-
export const WafConfigPatchEnabledRuleCollectionIdsList = /*@__PURE__*/ S.Array(
|
|
2089
|
-
S.String,
|
|
2090
|
-
) as any as S.Schema<WafConfigPatchEnabledRuleCollectionIdsList>;
|
|
2091
|
-
|
|
2092
898
|
/** Ids of WAF Rule Groups to mark as enabled */
|
|
2093
899
|
export type WafConfigPatchEnabledRuleGroupIdsList = Array<string>;
|
|
2094
|
-
export const WafConfigPatchEnabledRuleGroupIdsList = /*@__PURE__*/ S.Array(
|
|
2095
|
-
S.String,
|
|
2096
|
-
) as any as S.Schema<WafConfigPatchEnabledRuleGroupIdsList>;
|
|
2097
|
-
|
|
2098
900
|
/** Ids of WAF Rules that are **explicitly** enabled for this distribution. */
|
|
2099
901
|
export type WafConfigPatchEnabledRuleIdsList = Array<string>;
|
|
2100
|
-
export const WafConfigPatchEnabledRuleIdsList = /*@__PURE__*/ S.Array(
|
|
2101
|
-
S.String,
|
|
2102
|
-
) as any as S.Schema<WafConfigPatchEnabledRuleIdsList>;
|
|
2103
|
-
|
|
2104
902
|
/** Ids of WAF Collections to mark as log Only. */
|
|
2105
903
|
export type WafConfigPatchLogOnlyRuleCollectionIdsList = Array<string>;
|
|
2106
|
-
export const WafConfigPatchLogOnlyRuleCollectionIdsList = /*@__PURE__*/ S.Array(
|
|
2107
|
-
S.String,
|
|
2108
|
-
) as any as S.Schema<WafConfigPatchLogOnlyRuleCollectionIdsList>;
|
|
2109
|
-
|
|
2110
904
|
/** Ids of WAF Rule Groups to mark as log Only. */
|
|
2111
905
|
export type WafConfigPatchLogOnlyRuleGroupIdsList = Array<string>;
|
|
2112
|
-
export const WafConfigPatchLogOnlyRuleGroupIdsList = /*@__PURE__*/ S.Array(
|
|
2113
|
-
S.String,
|
|
2114
|
-
) as any as S.Schema<WafConfigPatchLogOnlyRuleGroupIdsList>;
|
|
2115
|
-
|
|
2116
906
|
/** Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. */
|
|
2117
907
|
export type WafConfigPatchLogOnlyRuleIdsList = Array<string>;
|
|
2118
|
-
export const WafConfigPatchLogOnlyRuleIdsList = /*@__PURE__*/ S.Array(
|
|
2119
|
-
S.String,
|
|
2120
|
-
) as any as S.Schema<WafConfigPatchLogOnlyRuleIdsList>;
|
|
2121
|
-
|
|
2122
908
|
/** Modify the WAF Configuration ## WAF Rules You can modify the set of enabled, disabled and log-only Rules by modifying these 9 properties: - enabledRuleIds - disabledRuleIds - logOnlyRuleIds - enabledRuleGroupIds - disabledRuleGroupIds - logOnlyRuleGroupIds - enabledRuleCollectionIds - disabledRuleCollectionIds - logOnlyRuleCollectionIds Please inquire the `WafConfig` Description on how the effective configuration is determined. For patching, if an ID is already used in one of the properties, it will be removed (and effectively moved) to the new property. If patching multiple properties with the same ID (e.g. writing `@builtin/crs/response` to `logOnlyRuleCollectionIds` and `enabledRuleCollectionIds`), the request will be rejected with a 400. */
|
|
2123
909
|
export interface WafConfigPatch {
|
|
2124
910
|
allowedHttpMethods?: WafConfigPatchAllowedHttpMethodsList;
|
|
@@ -2146,26 +932,6 @@ export interface WafConfigPatch {
|
|
|
2146
932
|
paranoiaLevel?: WafParanoiaLevel | (string & {});
|
|
2147
933
|
type?: WafType | (string & {});
|
|
2148
934
|
}
|
|
2149
|
-
export const WafConfigPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2150
|
-
S.Struct({
|
|
2151
|
-
allowedHttpMethods: S.optional(WafConfigPatchAllowedHttpMethodsList),
|
|
2152
|
-
allowedHttpVersions: S.optional(WafConfigPatchAllowedHttpVersionsList),
|
|
2153
|
-
allowedRequestContentTypes: S.optional(WafConfigPatchAllowedRequestContentTypesList),
|
|
2154
|
-
disabledRuleCollectionIds: S.optional(WafConfigPatchDisabledRuleCollectionIdsList),
|
|
2155
|
-
disabledRuleGroupIds: S.optional(WafConfigPatchDisabledRuleGroupIdsList),
|
|
2156
|
-
disabledRuleIds: S.optional(WafConfigPatchDisabledRuleIdsList),
|
|
2157
|
-
enabledRuleCollectionIds: S.optional(WafConfigPatchEnabledRuleCollectionIdsList),
|
|
2158
|
-
enabledRuleGroupIds: S.optional(WafConfigPatchEnabledRuleGroupIdsList),
|
|
2159
|
-
enabledRuleIds: S.optional(WafConfigPatchEnabledRuleIdsList),
|
|
2160
|
-
logOnlyRuleCollectionIds: S.optional(WafConfigPatchLogOnlyRuleCollectionIdsList),
|
|
2161
|
-
logOnlyRuleGroupIds: S.optional(WafConfigPatchLogOnlyRuleGroupIdsList),
|
|
2162
|
-
logOnlyRuleIds: S.optional(WafConfigPatchLogOnlyRuleIdsList),
|
|
2163
|
-
mode: S.optional(WafMode),
|
|
2164
|
-
paranoiaLevel: S.optional(WafParanoiaLevel),
|
|
2165
|
-
type: S.optional(WafType),
|
|
2166
|
-
}),
|
|
2167
|
-
).annotate({ identifier: "WafConfigPatch" }) as any as S.Schema<WafConfigPatch>;
|
|
2168
|
-
|
|
2169
935
|
export interface ConfigPatch {
|
|
2170
936
|
backend?: ConfigPatchBackend;
|
|
2171
937
|
/** Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g., DE, ES, GB). This setting blocks users from the specified countries. */
|
|
@@ -2190,26 +956,6 @@ export interface ConfigPatch {
|
|
|
2190
956
|
tls?: TlsConfigPatch;
|
|
2191
957
|
waf?: WafConfigPatch;
|
|
2192
958
|
}
|
|
2193
|
-
export const ConfigPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2194
|
-
S.Struct({
|
|
2195
|
-
backend: S.optional(ConfigPatchBackend),
|
|
2196
|
-
blockedCountries: S.optional(ConfigPatchBlockedCountriesList),
|
|
2197
|
-
blockedIps: S.optional(ConfigPatchBlockedIpsList),
|
|
2198
|
-
cacheConfig: S.optional(CacheConfigPatch),
|
|
2199
|
-
defaultCacheDuration: S.optional(S.NullOr(S.String)),
|
|
2200
|
-
forwardHostHeader: S.optional(S.Boolean),
|
|
2201
|
-
labels: S.optional(ConfigPatchLabelsMap),
|
|
2202
|
-
logSink: S.optional(S.NullOr(ConfigPatchLogSink)),
|
|
2203
|
-
monthlyLimitBytes: S.optional(S.NullOr(S.Number)),
|
|
2204
|
-
optimizer: S.optional(OptimizerPatch),
|
|
2205
|
-
redirects: S.optional(RedirectConfig),
|
|
2206
|
-
regions: S.optional(ConfigPatchRegionsList),
|
|
2207
|
-
stripResponseCookies: S.optional(S.Boolean),
|
|
2208
|
-
tls: S.optional(TlsConfigPatch),
|
|
2209
|
-
waf: S.optional(WafConfigPatch),
|
|
2210
|
-
}),
|
|
2211
|
-
).annotate({ identifier: "ConfigPatch" }) as any as S.Schema<ConfigPatch>;
|
|
2212
|
-
|
|
2213
959
|
export interface PatchDistributionRequest {
|
|
2214
960
|
/** Your STACKIT Project Id */
|
|
2215
961
|
projectId: string;
|
|
@@ -2218,33 +964,9 @@ export interface PatchDistributionRequest {
|
|
|
2218
964
|
/** While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple modifying requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. */
|
|
2219
965
|
intentId?: string;
|
|
2220
966
|
}
|
|
2221
|
-
export const PatchDistributionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2222
|
-
S.Struct({
|
|
2223
|
-
projectId: S.String.pipe(T.Label()),
|
|
2224
|
-
distributionId: S.String.pipe(T.Label()),
|
|
2225
|
-
config: S.optional(ConfigPatch),
|
|
2226
|
-
intentId: S.optional(S.String),
|
|
2227
|
-
}).pipe(
|
|
2228
|
-
T.Http({
|
|
2229
|
-
method: "PATCH",
|
|
2230
|
-
uri: "/v1/projects/{projectId}/distributions/{distributionId}",
|
|
2231
|
-
code: 200,
|
|
2232
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
2233
|
-
}),
|
|
2234
|
-
),
|
|
2235
|
-
).annotate({ identifier: "PatchDistributionRequest" }) as any as S.Schema<PatchDistributionRequest>;
|
|
2236
|
-
|
|
2237
967
|
export interface PatchDistributionResponse {
|
|
2238
968
|
distribution: Distribution;
|
|
2239
969
|
}
|
|
2240
|
-
export const PatchDistributionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2241
|
-
S.Struct({
|
|
2242
|
-
distribution: Distribution,
|
|
2243
|
-
}),
|
|
2244
|
-
).annotate({
|
|
2245
|
-
identifier: "PatchDistributionResponse",
|
|
2246
|
-
}) as any as S.Schema<PatchDistributionResponse>;
|
|
2247
|
-
|
|
2248
970
|
export interface PurgeCacheRequest {
|
|
2249
971
|
/** Your STACKIT Project Id */
|
|
2250
972
|
projectId: string;
|
|
@@ -2252,30 +974,9 @@ export interface PurgeCacheRequest {
|
|
|
2252
974
|
/** Defines an optional path. If this is set, a granular purge is done. If missing, the entire cache is invalidated. During a granular cache purge, only the provided path is purged. Please do not that for example `/some/path` and `/some/path.txt` are considered different paths. */
|
|
2253
975
|
path?: string;
|
|
2254
976
|
}
|
|
2255
|
-
export const PurgeCacheRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2256
|
-
S.Struct({
|
|
2257
|
-
projectId: S.String.pipe(T.Label()),
|
|
2258
|
-
distributionId: S.String.pipe(T.Label()),
|
|
2259
|
-
path: S.optional(S.String),
|
|
2260
|
-
}).pipe(
|
|
2261
|
-
T.Http({
|
|
2262
|
-
method: "POST",
|
|
2263
|
-
uri: "/v1/projects/{projectId}/distributions/{distributionId}/cache/purge",
|
|
2264
|
-
code: 200,
|
|
2265
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
2266
|
-
}),
|
|
2267
|
-
),
|
|
2268
|
-
).annotate({ identifier: "PurgeCacheRequest" }) as any as S.Schema<PurgeCacheRequest>;
|
|
2269
|
-
|
|
2270
977
|
export type PurgeCacheResponse2 = unknown;
|
|
2271
|
-
export const PurgeCacheResponse2 = /*@__PURE__*/ S.suspend(() =>
|
|
2272
|
-
S.Unknown.pipe(T.RawResponseRoot()),
|
|
2273
|
-
).annotate({ identifier: "PurgeCacheResponse2" }) as any as S.Schema<PurgeCacheResponse2>;
|
|
2274
|
-
|
|
2275
978
|
/** This is returned when no custom certificate is used. We provision and manage a Let's Encrypt Certificate for you */
|
|
2276
979
|
export type PutCustomDomainManagedCertificate = GetCustomDomainManagedCertificate;
|
|
2277
|
-
export const PutCustomDomainManagedCertificate = GetCustomDomainManagedCertificate;
|
|
2278
|
-
|
|
2279
980
|
/** Returned if a custom certificate is used. Response does not contain the certificate or key. */
|
|
2280
981
|
export interface PutCustomDomainCustomCertificate {
|
|
2281
982
|
/** base64-encoded PEM-encoded certificate */
|
|
@@ -2286,24 +987,10 @@ export interface PutCustomDomainCustomCertificate {
|
|
|
2286
987
|
skipDnsCheck?: boolean;
|
|
2287
988
|
type: string;
|
|
2288
989
|
}
|
|
2289
|
-
export const PutCustomDomainCustomCertificate = /*@__PURE__*/ S.suspend(() =>
|
|
2290
|
-
S.Struct({
|
|
2291
|
-
certificate: S.String,
|
|
2292
|
-
key: S.String,
|
|
2293
|
-
skipDnsCheck: S.optional(S.Boolean),
|
|
2294
|
-
type: S.String,
|
|
2295
|
-
}),
|
|
2296
|
-
).annotate({
|
|
2297
|
-
identifier: "PutCustomDomainCustomCertificate",
|
|
2298
|
-
}) as any as S.Schema<PutCustomDomainCustomCertificate>;
|
|
2299
|
-
|
|
2300
990
|
/** Pass a custom certificate to be served by the CDN when calling the custom domain. Will use a managed certificate when omitted */
|
|
2301
991
|
export type PutCustomDomainRequestCertificate =
|
|
2302
992
|
| GetCustomDomainManagedCertificate
|
|
2303
993
|
| PutCustomDomainCustomCertificate;
|
|
2304
|
-
export const PutCustomDomainRequestCertificate =
|
|
2305
|
-
/*@__PURE__*/ S.Unknown as any as S.Schema<PutCustomDomainRequestCertificate>;
|
|
2306
|
-
|
|
2307
994
|
export interface PutCustomDomainRequest {
|
|
2308
995
|
/** Your STACKIT Project Id */
|
|
2309
996
|
projectId: string;
|
|
@@ -2314,42 +1001,15 @@ export interface PutCustomDomainRequest {
|
|
|
2314
1001
|
/** While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple modifying Requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. */
|
|
2315
1002
|
intentId?: string;
|
|
2316
1003
|
}
|
|
2317
|
-
export const PutCustomDomainRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2318
|
-
S.Struct({
|
|
2319
|
-
projectId: S.String.pipe(T.Label()),
|
|
2320
|
-
distributionId: S.String.pipe(T.Label()),
|
|
2321
|
-
domain: S.String.pipe(T.Label()),
|
|
2322
|
-
certificate: S.optional(PutCustomDomainRequestCertificate),
|
|
2323
|
-
intentId: S.optional(S.String),
|
|
2324
|
-
}).pipe(
|
|
2325
|
-
T.Http({
|
|
2326
|
-
method: "PUT",
|
|
2327
|
-
uri: "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}",
|
|
2328
|
-
code: 200,
|
|
2329
|
-
baseUrl: "https://cdn.api.stackit.cloud",
|
|
2330
|
-
}),
|
|
2331
|
-
),
|
|
2332
|
-
).annotate({ identifier: "PutCustomDomainRequest" }) as any as S.Schema<PutCustomDomainRequest>;
|
|
2333
|
-
|
|
2334
1004
|
/** Pass a custom certificate to be served by the CDN when calling the custom domain. Will use a managed certificate when omitted */
|
|
2335
1005
|
export type PutCustomDomainResponseCertificate =
|
|
2336
1006
|
| GetCustomDomainManagedCertificate
|
|
2337
1007
|
| GetCustomDomainCustomCertificate;
|
|
2338
|
-
export const PutCustomDomainResponseCertificate =
|
|
2339
|
-
/*@__PURE__*/ S.Unknown as any as S.Schema<PutCustomDomainResponseCertificate>;
|
|
2340
|
-
|
|
2341
1008
|
export interface PutCustomDomainResponse {
|
|
2342
1009
|
/** Pass a custom certificate to be served by the CDN when calling the custom domain. Will use a managed certificate when omitted */
|
|
2343
1010
|
certificate?: PutCustomDomainResponseCertificate;
|
|
2344
1011
|
customDomain: CustomDomain;
|
|
2345
1012
|
}
|
|
2346
|
-
export const PutCustomDomainResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2347
|
-
S.Struct({
|
|
2348
|
-
certificate: S.optional(PutCustomDomainResponseCertificate),
|
|
2349
|
-
customDomain: CustomDomain,
|
|
2350
|
-
}),
|
|
2351
|
-
).annotate({ identifier: "PutCustomDomainResponse" }) as any as S.Schema<PutCustomDomainResponse>;
|
|
2352
|
-
|
|
2353
1013
|
export type CreateDistributionError = BadRequest | UnprocessableEntity | StackitOpError;
|
|
2354
1014
|
/** Create new distribution CreateDistribution will create a new CDN distribution */
|
|
2355
1015
|
export const createDistribution: API.OperationMethod<
|
|
@@ -2358,8 +1018,8 @@ export const createDistribution: API.OperationMethod<
|
|
|
2358
1018
|
CreateDistributionError,
|
|
2359
1019
|
StackitOpContext
|
|
2360
1020
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2361
|
-
input: CreateDistributionRequest
|
|
2362
|
-
output: CreateDistributionResponse
|
|
1021
|
+
input: __S(128, __c8, 0) as any as S.Schema<CreateDistributionRequest>,
|
|
1022
|
+
output: __S(224, __c14, 0) as any as S.Schema<CreateDistributionResponse>,
|
|
2363
1023
|
errors: [BadRequest, UnprocessableEntity, UnknownStackitError],
|
|
2364
1024
|
protocol: StackitProtocol,
|
|
2365
1025
|
retry: Retry.Retry,
|
|
@@ -2373,8 +1033,8 @@ export const deleteCustomDomain: API.OperationMethod<
|
|
|
2373
1033
|
DeleteCustomDomainError,
|
|
2374
1034
|
StackitOpContext
|
|
2375
1035
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2376
|
-
input: DeleteCustomDomainRequest
|
|
2377
|
-
output: DeleteCustomDomainResponse
|
|
1036
|
+
input: __S(240, __c15, 0) as any as S.Schema<DeleteCustomDomainRequest>,
|
|
1037
|
+
output: __S(241, __c15, 1) as any as S.Schema<DeleteCustomDomainResponse>,
|
|
2378
1038
|
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2379
1039
|
protocol: StackitProtocol,
|
|
2380
1040
|
retry: Retry.Retry,
|
|
@@ -2388,8 +1048,8 @@ export const deleteDistribution: API.OperationMethod<
|
|
|
2388
1048
|
DeleteDistributionError,
|
|
2389
1049
|
StackitOpContext
|
|
2390
1050
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2391
|
-
input: DeleteDistributionRequest
|
|
2392
|
-
output: DeleteDistributionResponse
|
|
1051
|
+
input: __S(272, __c17, 0) as any as S.Schema<DeleteDistributionRequest>,
|
|
1052
|
+
output: __S(273, __c17, 1) as any as S.Schema<DeleteDistributionResponse>,
|
|
2393
1053
|
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2394
1054
|
protocol: StackitProtocol,
|
|
2395
1055
|
retry: Retry.Retry,
|
|
@@ -2403,8 +1063,8 @@ export const findCachePaths: API.OperationMethod<
|
|
|
2403
1063
|
FindCachePathsError,
|
|
2404
1064
|
StackitOpContext
|
|
2405
1065
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2406
|
-
input: FindCachePathsRequest
|
|
2407
|
-
output: FindCachePathsResponse
|
|
1066
|
+
input: __S(288, __c18, 0) as any as S.Schema<FindCachePathsRequest>,
|
|
1067
|
+
output: __S(291, __c18, 3) as any as S.Schema<FindCachePathsResponse>,
|
|
2408
1068
|
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2409
1069
|
protocol: StackitProtocol,
|
|
2410
1070
|
retry: Retry.Retry,
|
|
@@ -2418,8 +1078,8 @@ export const getCacheInfo: API.OperationMethod<
|
|
|
2418
1078
|
GetCacheInfoError,
|
|
2419
1079
|
StackitOpContext
|
|
2420
1080
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2421
|
-
input: GetCacheInfoRequest
|
|
2422
|
-
output: GetCacheInfoResponse
|
|
1081
|
+
input: __S(304, __c19, 0) as any as S.Schema<GetCacheInfoRequest>,
|
|
1082
|
+
output: __S(307, __c19, 3) as any as S.Schema<GetCacheInfoResponse>,
|
|
2423
1083
|
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2424
1084
|
protocol: StackitProtocol,
|
|
2425
1085
|
retry: Retry.Retry,
|
|
@@ -2433,8 +1093,8 @@ export const getCustomDomain: API.OperationMethod<
|
|
|
2433
1093
|
GetCustomDomainError,
|
|
2434
1094
|
StackitOpContext
|
|
2435
1095
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2436
|
-
input: GetCustomDomainRequest
|
|
2437
|
-
output: GetCustomDomainResponse
|
|
1096
|
+
input: __S(320, __c20, 0) as any as S.Schema<GetCustomDomainRequest>,
|
|
1097
|
+
output: __S(321, __c20, 1) as any as S.Schema<GetCustomDomainResponse>,
|
|
2438
1098
|
errors: [NotFound, UnprocessableEntity, UnknownStackitError],
|
|
2439
1099
|
protocol: StackitProtocol,
|
|
2440
1100
|
retry: Retry.Retry,
|
|
@@ -2448,8 +1108,8 @@ export const getDistribution: API.OperationMethod<
|
|
|
2448
1108
|
GetDistributionError,
|
|
2449
1109
|
StackitOpContext
|
|
2450
1110
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2451
|
-
input: GetDistributionRequest
|
|
2452
|
-
output: GetDistributionResponse
|
|
1111
|
+
input: __S(336, __c21, 0) as any as S.Schema<GetDistributionRequest>,
|
|
1112
|
+
output: __S(224, __c14, 0) as any as S.Schema<GetDistributionResponse>,
|
|
2453
1113
|
errors: [NotFound, UnprocessableEntity, UnknownStackitError],
|
|
2454
1114
|
protocol: StackitProtocol,
|
|
2455
1115
|
retry: Retry.Retry,
|
|
@@ -2463,8 +1123,8 @@ export const getLogs: API.OperationMethod<
|
|
|
2463
1123
|
GetLogsError,
|
|
2464
1124
|
StackitOpContext
|
|
2465
1125
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2466
|
-
input: GetLogsRequest
|
|
2467
|
-
output: GetLogsResponse
|
|
1126
|
+
input: __S(0, __c0, 0) as any as S.Schema<GetLogsRequest>,
|
|
1127
|
+
output: __S(4, __c0, 4) as any as S.Schema<GetLogsResponse>,
|
|
2468
1128
|
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2469
1129
|
protocol: StackitProtocol,
|
|
2470
1130
|
retry: Retry.Retry,
|
|
@@ -2478,8 +1138,8 @@ export const getLogsSearchFilters: API.OperationMethod<
|
|
|
2478
1138
|
GetLogsSearchFiltersError,
|
|
2479
1139
|
StackitOpContext
|
|
2480
1140
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2481
|
-
input: GetLogsSearchFiltersRequest
|
|
2482
|
-
output: GetLogsSearchFiltersResponse
|
|
1141
|
+
input: __S(16, __c1, 0) as any as S.Schema<GetLogsSearchFiltersRequest>,
|
|
1142
|
+
output: __S(21, __c1, 5) as any as S.Schema<GetLogsSearchFiltersResponse>,
|
|
2483
1143
|
errors: [BadRequest, UnprocessableEntity, UnknownStackitError],
|
|
2484
1144
|
protocol: StackitProtocol,
|
|
2485
1145
|
retry: Retry.Retry,
|
|
@@ -2493,8 +1153,8 @@ export const getStatistics: API.OperationMethod<
|
|
|
2493
1153
|
GetStatisticsError,
|
|
2494
1154
|
StackitOpContext
|
|
2495
1155
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2496
|
-
input: GetStatisticsRequest
|
|
2497
|
-
output: GetStatisticsResponse
|
|
1156
|
+
input: __S(32, __c2, 0) as any as S.Schema<GetStatisticsRequest>,
|
|
1157
|
+
output: __S(37, __c2, 5) as any as S.Schema<GetStatisticsResponse>,
|
|
2498
1158
|
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2499
1159
|
protocol: StackitProtocol,
|
|
2500
1160
|
retry: Retry.Retry,
|
|
@@ -2508,8 +1168,8 @@ export const listDistributions: API.OperationMethod<
|
|
|
2508
1168
|
ListDistributionsError,
|
|
2509
1169
|
StackitOpContext
|
|
2510
1170
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2511
|
-
input: ListDistributionsRequest
|
|
2512
|
-
output: ListDistributionsResponse
|
|
1171
|
+
input: __S(48, __c3, 0) as any as S.Schema<ListDistributionsRequest>,
|
|
1172
|
+
output: __S(50, __c3, 2) as any as S.Schema<ListDistributionsResponse>,
|
|
2513
1173
|
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2514
1174
|
protocol: StackitProtocol,
|
|
2515
1175
|
retry: Retry.Retry,
|
|
@@ -2523,8 +1183,8 @@ export const listWafCollections: API.OperationMethod<
|
|
|
2523
1183
|
ListWafCollectionsError,
|
|
2524
1184
|
StackitOpContext
|
|
2525
1185
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2526
|
-
input: ListWafCollectionsRequest
|
|
2527
|
-
output: ListWafCollectionsResponse
|
|
1186
|
+
input: __S(64, __c4, 0) as any as S.Schema<ListWafCollectionsRequest>,
|
|
1187
|
+
output: __S(71, __c4, 7) as any as S.Schema<ListWafCollectionsResponse>,
|
|
2528
1188
|
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2529
1189
|
protocol: StackitProtocol,
|
|
2530
1190
|
retry: Retry.Retry,
|
|
@@ -2538,8 +1198,8 @@ export const patchDistribution: API.OperationMethod<
|
|
|
2538
1198
|
PatchDistributionError,
|
|
2539
1199
|
StackitOpContext
|
|
2540
1200
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2541
|
-
input: PatchDistributionRequest
|
|
2542
|
-
output: PatchDistributionResponse
|
|
1201
|
+
input: __S(85, __c5, 5) as any as S.Schema<PatchDistributionRequest>,
|
|
1202
|
+
output: __S(224, __c14, 0) as any as S.Schema<PatchDistributionResponse>,
|
|
2543
1203
|
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2544
1204
|
protocol: StackitProtocol,
|
|
2545
1205
|
retry: Retry.Retry,
|
|
@@ -2553,8 +1213,8 @@ export const purgeCache: API.OperationMethod<
|
|
|
2553
1213
|
PurgeCacheError,
|
|
2554
1214
|
StackitOpContext
|
|
2555
1215
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2556
|
-
input: PurgeCacheRequest
|
|
2557
|
-
output: PurgeCacheResponse2
|
|
1216
|
+
input: __S(96, __c6, 0) as any as S.Schema<PurgeCacheRequest>,
|
|
1217
|
+
output: __S(97, __c6, 1) as any as S.Schema<PurgeCacheResponse2>,
|
|
2558
1218
|
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2559
1219
|
protocol: StackitProtocol,
|
|
2560
1220
|
retry: Retry.Retry,
|
|
@@ -2568,9 +1228,791 @@ export const putCustomDomain: API.OperationMethod<
|
|
|
2568
1228
|
PutCustomDomainError,
|
|
2569
1229
|
StackitOpContext
|
|
2570
1230
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2571
|
-
input: PutCustomDomainRequest
|
|
2572
|
-
output: PutCustomDomainResponse
|
|
1231
|
+
input: __S(112, __c7, 0) as any as S.Schema<PutCustomDomainRequest>,
|
|
1232
|
+
output: __S(113, __c7, 1) as any as S.Schema<PutCustomDomainResponse>,
|
|
2573
1233
|
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2574
1234
|
protocol: StackitProtocol,
|
|
2575
1235
|
retry: Retry.Retry,
|
|
2576
1236
|
}));
|
|
1237
|
+
|
|
1238
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
1239
|
+
function __c0(j: number): any {
|
|
1240
|
+
switch (j) {
|
|
1241
|
+
case 0:
|
|
1242
|
+
return S.suspend(() =>
|
|
1243
|
+
S.Struct({
|
|
1244
|
+
projectId: S.String.pipe(T.Label()),
|
|
1245
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1246
|
+
from: S.optional(S.String.pipe(T.Query())),
|
|
1247
|
+
to: S.optional(S.String.pipe(T.Query())),
|
|
1248
|
+
pageSize: S.optional(S.Number.pipe(T.Query())),
|
|
1249
|
+
pageIdentifier: S.optional(S.String.pipe(T.Query())),
|
|
1250
|
+
sortBy: S.optional(S.String.pipe(T.Query())),
|
|
1251
|
+
sortOrder: S.optional(S.String.pipe(T.Query())),
|
|
1252
|
+
wafAction: S.optional(S.String.pipe(T.Query())),
|
|
1253
|
+
dataCenterRegion: S.optional(S.String.pipe(T.Query())),
|
|
1254
|
+
requestCountryCode: S.optional(S.String.pipe(T.Query())),
|
|
1255
|
+
statusCode: S.optional(S.Number.pipe(T.Query())),
|
|
1256
|
+
cacheHit: S.optional(S.Boolean.pipe(T.Query())),
|
|
1257
|
+
}).pipe(
|
|
1258
|
+
T.Http({
|
|
1259
|
+
method: "GET",
|
|
1260
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/logs",
|
|
1261
|
+
code: 200,
|
|
1262
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1263
|
+
}),
|
|
1264
|
+
),
|
|
1265
|
+
).annotate({ identifier: "GetLogsRequest" });
|
|
1266
|
+
case 1:
|
|
1267
|
+
return S.suspend(() =>
|
|
1268
|
+
S.Struct({
|
|
1269
|
+
action: S.String,
|
|
1270
|
+
asn: S.String,
|
|
1271
|
+
message: S.String,
|
|
1272
|
+
method: S.String,
|
|
1273
|
+
requestHeaders: __S(176, __c11, 0),
|
|
1274
|
+
ruleId: S.String,
|
|
1275
|
+
}),
|
|
1276
|
+
).annotate({ identifier: "WAFViolation" });
|
|
1277
|
+
case 2:
|
|
1278
|
+
return S.suspend(() =>
|
|
1279
|
+
S.Struct({
|
|
1280
|
+
cacheHit: S.Boolean,
|
|
1281
|
+
dataCenterRegion: S.String,
|
|
1282
|
+
distributionId: S.String,
|
|
1283
|
+
host: S.String,
|
|
1284
|
+
path: S.String,
|
|
1285
|
+
requestCountryCode: S.String,
|
|
1286
|
+
size: S.Number,
|
|
1287
|
+
statusCode: S.Number,
|
|
1288
|
+
timestamp: S.String,
|
|
1289
|
+
wafViolation: S.optional(__S(1, __c0, 1)),
|
|
1290
|
+
}),
|
|
1291
|
+
).annotate({ identifier: "DistributionLogsRecord" });
|
|
1292
|
+
case 3:
|
|
1293
|
+
return S.Array(__S(2, __c0, 2));
|
|
1294
|
+
case 4:
|
|
1295
|
+
return S.suspend(() =>
|
|
1296
|
+
S.Struct({
|
|
1297
|
+
logs: __S(3, __c0, 3),
|
|
1298
|
+
nextPageIdentifier: S.optional(S.String),
|
|
1299
|
+
}),
|
|
1300
|
+
).annotate({ identifier: "GetLogsResponse" });
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
function __c1(j: number): any {
|
|
1304
|
+
switch (j) {
|
|
1305
|
+
case 0:
|
|
1306
|
+
return S.suspend(() =>
|
|
1307
|
+
S.Struct({
|
|
1308
|
+
projectId: S.String.pipe(T.Label()),
|
|
1309
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1310
|
+
filter: S.optional(S.String.pipe(T.Query())),
|
|
1311
|
+
}).pipe(
|
|
1312
|
+
T.Http({
|
|
1313
|
+
method: "GET",
|
|
1314
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/logs/searchFilters",
|
|
1315
|
+
code: 200,
|
|
1316
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1317
|
+
}),
|
|
1318
|
+
),
|
|
1319
|
+
).annotate({ identifier: "GetLogsSearchFiltersRequest" });
|
|
1320
|
+
case 1:
|
|
1321
|
+
return S.suspend(() =>
|
|
1322
|
+
S.Struct({
|
|
1323
|
+
displayName: S.String,
|
|
1324
|
+
id: S.String,
|
|
1325
|
+
}),
|
|
1326
|
+
).annotate({ identifier: "GetLogsSearchFiltersResponseDatacenterBlockItem" });
|
|
1327
|
+
case 2:
|
|
1328
|
+
return S.Array(__S(17, __c1, 1));
|
|
1329
|
+
case 3:
|
|
1330
|
+
return S.suspend(() =>
|
|
1331
|
+
S.Struct({
|
|
1332
|
+
AF: __S(18, __c1, 2),
|
|
1333
|
+
ASIA: __S(18, __c1, 2),
|
|
1334
|
+
EU: __S(18, __c1, 2),
|
|
1335
|
+
NA: __S(18, __c1, 2),
|
|
1336
|
+
SA: __S(18, __c1, 2),
|
|
1337
|
+
}),
|
|
1338
|
+
).annotate({ identifier: "GetLogsSearchFiltersResponseDatacenterBlock" });
|
|
1339
|
+
case 4:
|
|
1340
|
+
return S.Array(S.Number);
|
|
1341
|
+
case 5:
|
|
1342
|
+
return S.suspend(() =>
|
|
1343
|
+
S.Struct({
|
|
1344
|
+
cache: __S(193, __c12, 1),
|
|
1345
|
+
dataCenter: __S(19, __c1, 3),
|
|
1346
|
+
remoteCountry: __S(192, __c12, 0),
|
|
1347
|
+
status: __S(20, __c1, 4),
|
|
1348
|
+
}),
|
|
1349
|
+
).annotate({ identifier: "GetLogsSearchFiltersResponse" });
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
function __c2(j: number): any {
|
|
1353
|
+
switch (j) {
|
|
1354
|
+
case 0:
|
|
1355
|
+
return S.suspend(() =>
|
|
1356
|
+
S.Struct({
|
|
1357
|
+
projectId: S.String.pipe(T.Label()),
|
|
1358
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1359
|
+
from: S.String.pipe(T.Query()),
|
|
1360
|
+
to: S.optional(S.String.pipe(T.Query())),
|
|
1361
|
+
interval: S.optional(S.String.pipe(T.Query())),
|
|
1362
|
+
}).pipe(
|
|
1363
|
+
T.Http({
|
|
1364
|
+
method: "GET",
|
|
1365
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/statistics",
|
|
1366
|
+
code: 200,
|
|
1367
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1368
|
+
}),
|
|
1369
|
+
),
|
|
1370
|
+
).annotate({ identifier: "GetStatisticsRequest" });
|
|
1371
|
+
case 1:
|
|
1372
|
+
return S.suspend(() =>
|
|
1373
|
+
S.Struct({
|
|
1374
|
+
cachedRequests: S.Number,
|
|
1375
|
+
totalRequests: S.Number,
|
|
1376
|
+
totalTrafficBytes: S.Number,
|
|
1377
|
+
}),
|
|
1378
|
+
).annotate({ identifier: "DistributionStatisticsRecordEntry" });
|
|
1379
|
+
case 2:
|
|
1380
|
+
return S.suspend(() =>
|
|
1381
|
+
S.Struct({
|
|
1382
|
+
AF: __S(33, __c2, 1),
|
|
1383
|
+
ASIA: __S(33, __c2, 1),
|
|
1384
|
+
EU: __S(33, __c2, 1),
|
|
1385
|
+
SA: __S(33, __c2, 1),
|
|
1386
|
+
US: __S(33, __c2, 1),
|
|
1387
|
+
}),
|
|
1388
|
+
).annotate({ identifier: "DistributionStatisticsRecordRegions" });
|
|
1389
|
+
case 3:
|
|
1390
|
+
return S.suspend(() =>
|
|
1391
|
+
S.Struct({
|
|
1392
|
+
cachedRequests: S.Number,
|
|
1393
|
+
totalRequests: S.Number,
|
|
1394
|
+
totalTrafficBytes: S.Number,
|
|
1395
|
+
end: S.String,
|
|
1396
|
+
regions: __S(34, __c2, 2),
|
|
1397
|
+
start: S.String,
|
|
1398
|
+
}),
|
|
1399
|
+
).annotate({ identifier: "DistributionStatisticsRecord" });
|
|
1400
|
+
case 4:
|
|
1401
|
+
return S.Array(__S(35, __c2, 3));
|
|
1402
|
+
case 5:
|
|
1403
|
+
return S.suspend(() =>
|
|
1404
|
+
S.Struct({
|
|
1405
|
+
records: __S(36, __c2, 4),
|
|
1406
|
+
}),
|
|
1407
|
+
).annotate({ identifier: "GetStatisticsResponse" });
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
function __c3(j: number): any {
|
|
1411
|
+
switch (j) {
|
|
1412
|
+
case 0:
|
|
1413
|
+
return S.suspend(() =>
|
|
1414
|
+
S.Struct({
|
|
1415
|
+
projectId: S.String.pipe(T.Label()),
|
|
1416
|
+
pageSize: S.optional(S.Number.pipe(T.Query())),
|
|
1417
|
+
withWafStatus: S.optional(S.Boolean.pipe(T.Query())),
|
|
1418
|
+
pageIdentifier: S.optional(S.String.pipe(T.Query())),
|
|
1419
|
+
sortBy: S.optional(S.String.pipe(T.Query())),
|
|
1420
|
+
sortOrder: S.optional(S.String.pipe(T.Query())),
|
|
1421
|
+
}).pipe(
|
|
1422
|
+
T.Http({
|
|
1423
|
+
method: "GET",
|
|
1424
|
+
uri: "/v1/projects/{projectId}/distributions",
|
|
1425
|
+
code: 200,
|
|
1426
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1427
|
+
}),
|
|
1428
|
+
),
|
|
1429
|
+
).annotate({ identifier: "ListDistributionsRequest" });
|
|
1430
|
+
case 1:
|
|
1431
|
+
return S.Array(__S(223, __c13, 15));
|
|
1432
|
+
case 2:
|
|
1433
|
+
return S.suspend(() =>
|
|
1434
|
+
S.Struct({
|
|
1435
|
+
distributions: __S(49, __c3, 1),
|
|
1436
|
+
nextPageIdentifier: S.optional(S.String),
|
|
1437
|
+
}),
|
|
1438
|
+
).annotate({ identifier: "ListDistributionsResponse" });
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
function __c4(j: number): any {
|
|
1442
|
+
switch (j) {
|
|
1443
|
+
case 0:
|
|
1444
|
+
return S.suspend(() =>
|
|
1445
|
+
S.Struct({
|
|
1446
|
+
projectId: S.String.pipe(T.Label()),
|
|
1447
|
+
}).pipe(
|
|
1448
|
+
T.Http({
|
|
1449
|
+
method: "GET",
|
|
1450
|
+
uri: "/v1/projects/{projectId}/waf/collections",
|
|
1451
|
+
code: 200,
|
|
1452
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1453
|
+
}),
|
|
1454
|
+
),
|
|
1455
|
+
).annotate({ identifier: "ListWafCollectionsRequest" });
|
|
1456
|
+
case 1:
|
|
1457
|
+
return S.suspend(() =>
|
|
1458
|
+
S.Struct({
|
|
1459
|
+
code: S.optional(S.String),
|
|
1460
|
+
description: __S(176, __c11, 0),
|
|
1461
|
+
id: S.String,
|
|
1462
|
+
}),
|
|
1463
|
+
).annotate({ identifier: "WafRule" });
|
|
1464
|
+
case 2:
|
|
1465
|
+
return S.Array(__S(65, __c4, 1));
|
|
1466
|
+
case 3:
|
|
1467
|
+
return S.suspend(() =>
|
|
1468
|
+
S.Struct({
|
|
1469
|
+
description: __S(176, __c11, 0),
|
|
1470
|
+
name: __S(176, __c11, 0),
|
|
1471
|
+
rules: __S(66, __c4, 2),
|
|
1472
|
+
}),
|
|
1473
|
+
).annotate({ identifier: "WafRuleGroup" });
|
|
1474
|
+
case 4:
|
|
1475
|
+
return S.Array(__S(67, __c4, 3));
|
|
1476
|
+
case 5:
|
|
1477
|
+
return S.suspend(() =>
|
|
1478
|
+
S.Struct({
|
|
1479
|
+
groups: __S(68, __c4, 4),
|
|
1480
|
+
id: S.String,
|
|
1481
|
+
name: __S(176, __c11, 0),
|
|
1482
|
+
}),
|
|
1483
|
+
).annotate({ identifier: "WafRuleCollection" });
|
|
1484
|
+
case 6:
|
|
1485
|
+
return S.Array(__S(69, __c4, 5));
|
|
1486
|
+
case 7:
|
|
1487
|
+
return S.suspend(() =>
|
|
1488
|
+
S.Struct({
|
|
1489
|
+
collections: __S(70, __c4, 6),
|
|
1490
|
+
}),
|
|
1491
|
+
).annotate({ identifier: "ListWafCollectionsResponse" });
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
function __c5(j: number): any {
|
|
1495
|
+
switch (j) {
|
|
1496
|
+
case 0:
|
|
1497
|
+
return S.Record(S.String, /*@__PURE__*/ S.NullOr(S.String));
|
|
1498
|
+
case 1:
|
|
1499
|
+
return S.suspend(() =>
|
|
1500
|
+
S.Struct({
|
|
1501
|
+
enabled: S.optional(S.Boolean),
|
|
1502
|
+
}),
|
|
1503
|
+
).annotate({ identifier: "OptimizerPatch" });
|
|
1504
|
+
case 2:
|
|
1505
|
+
return S.suspend(() =>
|
|
1506
|
+
S.Struct({
|
|
1507
|
+
enableTls10: S.optional(S.Boolean),
|
|
1508
|
+
enableTls11: S.optional(S.Boolean),
|
|
1509
|
+
}),
|
|
1510
|
+
).annotate({ identifier: "TlsConfigPatch" });
|
|
1511
|
+
case 3:
|
|
1512
|
+
return S.suspend(() =>
|
|
1513
|
+
S.Struct({
|
|
1514
|
+
allowedHttpMethods: S.optional(__S(192, __c12, 0)),
|
|
1515
|
+
allowedHttpVersions: S.optional(__S(192, __c12, 0)),
|
|
1516
|
+
allowedRequestContentTypes: S.optional(__S(192, __c12, 0)),
|
|
1517
|
+
disabledRuleCollectionIds: S.optional(__S(192, __c12, 0)),
|
|
1518
|
+
disabledRuleGroupIds: S.optional(__S(192, __c12, 0)),
|
|
1519
|
+
disabledRuleIds: S.optional(__S(192, __c12, 0)),
|
|
1520
|
+
enabledRuleCollectionIds: S.optional(__S(192, __c12, 0)),
|
|
1521
|
+
enabledRuleGroupIds: S.optional(__S(192, __c12, 0)),
|
|
1522
|
+
enabledRuleIds: S.optional(__S(192, __c12, 0)),
|
|
1523
|
+
logOnlyRuleCollectionIds: S.optional(__S(192, __c12, 0)),
|
|
1524
|
+
logOnlyRuleGroupIds: S.optional(__S(192, __c12, 0)),
|
|
1525
|
+
logOnlyRuleIds: S.optional(__S(192, __c12, 0)),
|
|
1526
|
+
mode: S.optional(S.String),
|
|
1527
|
+
paranoiaLevel: S.optional(S.String),
|
|
1528
|
+
type: S.optional(S.String),
|
|
1529
|
+
}),
|
|
1530
|
+
).annotate({ identifier: "WafConfigPatch" });
|
|
1531
|
+
case 4:
|
|
1532
|
+
return S.suspend(() =>
|
|
1533
|
+
S.Struct({
|
|
1534
|
+
backend: S.optional(S.Unknown),
|
|
1535
|
+
blockedCountries: S.optional(__S(192, __c12, 0)),
|
|
1536
|
+
blockedIps: S.optional(__S(192, __c12, 0)),
|
|
1537
|
+
cacheConfig: S.optional(__S(144, __c9, 0)),
|
|
1538
|
+
defaultCacheDuration: S.optional(S.NullOr(S.String)),
|
|
1539
|
+
forwardHostHeader: S.optional(S.Boolean),
|
|
1540
|
+
labels: S.optional(__S(80, __c5, 0)),
|
|
1541
|
+
logSink: S.optional(S.NullOr(S.Unknown)),
|
|
1542
|
+
monthlyLimitBytes: S.optional(S.NullOr(S.Number)),
|
|
1543
|
+
optimizer: S.optional(__S(81, __c5, 1)),
|
|
1544
|
+
redirects: S.optional(__S(213, __c13, 5)),
|
|
1545
|
+
regions: S.optional(__S(193, __c12, 1)),
|
|
1546
|
+
stripResponseCookies: S.optional(S.Boolean),
|
|
1547
|
+
tls: S.optional(__S(82, __c5, 2)),
|
|
1548
|
+
waf: S.optional(__S(83, __c5, 3)),
|
|
1549
|
+
}),
|
|
1550
|
+
).annotate({ identifier: "ConfigPatch" });
|
|
1551
|
+
case 5:
|
|
1552
|
+
return S.suspend(() =>
|
|
1553
|
+
S.Struct({
|
|
1554
|
+
projectId: S.String.pipe(T.Label()),
|
|
1555
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1556
|
+
config: S.optional(__S(84, __c5, 4)),
|
|
1557
|
+
intentId: S.optional(S.String),
|
|
1558
|
+
}).pipe(
|
|
1559
|
+
T.Http({
|
|
1560
|
+
method: "PATCH",
|
|
1561
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}",
|
|
1562
|
+
code: 200,
|
|
1563
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1564
|
+
}),
|
|
1565
|
+
),
|
|
1566
|
+
).annotate({ identifier: "PatchDistributionRequest" });
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
function __c6(j: number): any {
|
|
1570
|
+
switch (j) {
|
|
1571
|
+
case 0:
|
|
1572
|
+
return S.suspend(() =>
|
|
1573
|
+
S.Struct({
|
|
1574
|
+
projectId: S.String.pipe(T.Label()),
|
|
1575
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1576
|
+
path: S.optional(S.String),
|
|
1577
|
+
}).pipe(
|
|
1578
|
+
T.Http({
|
|
1579
|
+
method: "POST",
|
|
1580
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/cache/purge",
|
|
1581
|
+
code: 200,
|
|
1582
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1583
|
+
}),
|
|
1584
|
+
),
|
|
1585
|
+
).annotate({ identifier: "PurgeCacheRequest" });
|
|
1586
|
+
case 1:
|
|
1587
|
+
return S.suspend(() => S.Unknown.pipe(T.RawResponseRoot())).annotate({
|
|
1588
|
+
identifier: "PurgeCacheResponse2",
|
|
1589
|
+
});
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
function __c7(j: number): any {
|
|
1593
|
+
switch (j) {
|
|
1594
|
+
case 0:
|
|
1595
|
+
return S.suspend(() =>
|
|
1596
|
+
S.Struct({
|
|
1597
|
+
projectId: S.String.pipe(T.Label()),
|
|
1598
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1599
|
+
domain: S.String.pipe(T.Label()),
|
|
1600
|
+
certificate: S.optional(S.Unknown),
|
|
1601
|
+
intentId: S.optional(S.String),
|
|
1602
|
+
}).pipe(
|
|
1603
|
+
T.Http({
|
|
1604
|
+
method: "PUT",
|
|
1605
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}",
|
|
1606
|
+
code: 200,
|
|
1607
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1608
|
+
}),
|
|
1609
|
+
),
|
|
1610
|
+
).annotate({ identifier: "PutCustomDomainRequest" });
|
|
1611
|
+
case 1:
|
|
1612
|
+
return S.suspend(() =>
|
|
1613
|
+
S.Struct({
|
|
1614
|
+
certificate: S.optional(S.Unknown),
|
|
1615
|
+
customDomain: __S(256, __c16, 0),
|
|
1616
|
+
}),
|
|
1617
|
+
).annotate({ identifier: "PutCustomDomainResponse" });
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
function __c8(j: number): any {
|
|
1621
|
+
switch (j) {
|
|
1622
|
+
case 0:
|
|
1623
|
+
return S.suspend(() =>
|
|
1624
|
+
S.Struct({
|
|
1625
|
+
projectId: S.String.pipe(T.Label()),
|
|
1626
|
+
backend: S.Unknown,
|
|
1627
|
+
blockedCountries: S.optional(__S(192, __c12, 0)),
|
|
1628
|
+
blockedIps: S.optional(__S(192, __c12, 0)),
|
|
1629
|
+
cacheConfig: S.optional(__S(144, __c9, 0)),
|
|
1630
|
+
defaultCacheDuration: S.optional(S.String),
|
|
1631
|
+
forwardHostHeader: S.optional(S.Boolean),
|
|
1632
|
+
intentId: S.optional(S.String),
|
|
1633
|
+
labels: S.optional(__S(176, __c11, 0)),
|
|
1634
|
+
logSink: S.optional(S.Unknown),
|
|
1635
|
+
monthlyLimitBytes: S.optional(S.Number),
|
|
1636
|
+
optimizer: S.optional(__S(208, __c13, 0)),
|
|
1637
|
+
redirects: S.optional(__S(213, __c13, 5)),
|
|
1638
|
+
regions: __S(193, __c12, 1),
|
|
1639
|
+
stripResponseCookies: S.optional(S.Boolean),
|
|
1640
|
+
tls: S.optional(__S(214, __c13, 6)),
|
|
1641
|
+
waf: S.optional(__S(215, __c13, 7)),
|
|
1642
|
+
}).pipe(
|
|
1643
|
+
T.Http({
|
|
1644
|
+
method: "POST",
|
|
1645
|
+
uri: "/v1/projects/{projectId}/distributions",
|
|
1646
|
+
code: 200,
|
|
1647
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1648
|
+
}),
|
|
1649
|
+
),
|
|
1650
|
+
).annotate({ identifier: "CreateDistributionRequest" });
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
function __c9(j: number): any {
|
|
1654
|
+
switch (j) {
|
|
1655
|
+
case 0:
|
|
1656
|
+
return S.suspend(() =>
|
|
1657
|
+
S.Struct({
|
|
1658
|
+
cacheKeyHeaders: S.optional(__S(192, __c12, 0)),
|
|
1659
|
+
queryStringVaryEnabled: S.optional(S.Boolean),
|
|
1660
|
+
queryStringVaryParameters: S.optional(__S(192, __c12, 0)),
|
|
1661
|
+
}),
|
|
1662
|
+
).annotate({ identifier: "CacheConfigCreate" });
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
function __c10(j: number): any {
|
|
1666
|
+
switch (j) {
|
|
1667
|
+
case 0:
|
|
1668
|
+
return S.suspend(() =>
|
|
1669
|
+
S.Struct({
|
|
1670
|
+
de: S.optional(S.String),
|
|
1671
|
+
en: S.String,
|
|
1672
|
+
key: S.String,
|
|
1673
|
+
}),
|
|
1674
|
+
).annotate({ identifier: "StatusError" });
|
|
1675
|
+
case 1:
|
|
1676
|
+
return S.Array(__S(160, __c10, 0));
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
function __c11(j: number): any {
|
|
1680
|
+
switch (j) {
|
|
1681
|
+
case 0:
|
|
1682
|
+
return S.Record(S.String, S.String);
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
function __c12(j: number): any {
|
|
1686
|
+
switch (j) {
|
|
1687
|
+
case 0:
|
|
1688
|
+
return S.Array(S.String);
|
|
1689
|
+
case 1:
|
|
1690
|
+
return S.Array(S.String);
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
function __c13(j: number): any {
|
|
1694
|
+
switch (j) {
|
|
1695
|
+
case 0:
|
|
1696
|
+
return S.suspend(() =>
|
|
1697
|
+
S.Struct({
|
|
1698
|
+
enabled: S.Boolean,
|
|
1699
|
+
}),
|
|
1700
|
+
).annotate({ identifier: "Optimizer" });
|
|
1701
|
+
case 1:
|
|
1702
|
+
return S.suspend(() =>
|
|
1703
|
+
S.Struct({
|
|
1704
|
+
valueMatchCondition: S.optional(S.String),
|
|
1705
|
+
values: __S(192, __c12, 0),
|
|
1706
|
+
}),
|
|
1707
|
+
).annotate({ identifier: "Matcher" });
|
|
1708
|
+
case 2:
|
|
1709
|
+
return S.Array(__S(209, __c13, 1));
|
|
1710
|
+
case 3:
|
|
1711
|
+
return S.suspend(() =>
|
|
1712
|
+
S.Struct({
|
|
1713
|
+
description: S.optional(S.String),
|
|
1714
|
+
enabled: S.optional(S.Boolean),
|
|
1715
|
+
matchers: __S(210, __c13, 2),
|
|
1716
|
+
ruleMatchCondition: S.optional(S.String),
|
|
1717
|
+
statusCode: S.Number,
|
|
1718
|
+
targetUrl: S.String,
|
|
1719
|
+
}),
|
|
1720
|
+
).annotate({ identifier: "RedirectRule" });
|
|
1721
|
+
case 4:
|
|
1722
|
+
return S.Array(__S(211, __c13, 3));
|
|
1723
|
+
case 5:
|
|
1724
|
+
return S.suspend(() =>
|
|
1725
|
+
S.Struct({
|
|
1726
|
+
rules: S.optional(__S(212, __c13, 4)),
|
|
1727
|
+
}),
|
|
1728
|
+
).annotate({ identifier: "RedirectConfig" });
|
|
1729
|
+
case 6:
|
|
1730
|
+
return S.suspend(() =>
|
|
1731
|
+
S.Struct({
|
|
1732
|
+
enableTls10: S.Boolean,
|
|
1733
|
+
enableTls11: S.Boolean,
|
|
1734
|
+
}),
|
|
1735
|
+
).annotate({ identifier: "TlsConfig" });
|
|
1736
|
+
case 7:
|
|
1737
|
+
return S.suspend(() =>
|
|
1738
|
+
S.Struct({
|
|
1739
|
+
allowedHttpMethods: S.optional(__S(192, __c12, 0)),
|
|
1740
|
+
allowedHttpVersions: S.optional(__S(192, __c12, 0)),
|
|
1741
|
+
allowedRequestContentTypes: S.optional(__S(192, __c12, 0)),
|
|
1742
|
+
disabledRuleCollectionIds: S.optional(__S(192, __c12, 0)),
|
|
1743
|
+
disabledRuleGroupIds: S.optional(__S(192, __c12, 0)),
|
|
1744
|
+
disabledRuleIds: S.optional(__S(192, __c12, 0)),
|
|
1745
|
+
enabledRuleCollectionIds: S.optional(__S(192, __c12, 0)),
|
|
1746
|
+
enabledRuleGroupIds: S.optional(__S(192, __c12, 0)),
|
|
1747
|
+
enabledRuleIds: __S(192, __c12, 0),
|
|
1748
|
+
logOnlyRuleCollectionIds: S.optional(__S(192, __c12, 0)),
|
|
1749
|
+
logOnlyRuleGroupIds: S.optional(__S(192, __c12, 0)),
|
|
1750
|
+
logOnlyRuleIds: S.optional(__S(192, __c12, 0)),
|
|
1751
|
+
mode: S.String,
|
|
1752
|
+
paranoiaLevel: S.optional(S.String),
|
|
1753
|
+
type: S.String,
|
|
1754
|
+
}),
|
|
1755
|
+
).annotate({ identifier: "WafConfig" });
|
|
1756
|
+
case 8:
|
|
1757
|
+
return S.suspend(() =>
|
|
1758
|
+
S.Struct({
|
|
1759
|
+
cacheKeyHeaders: __S(192, __c12, 0),
|
|
1760
|
+
queryStringVaryEnabled: S.Boolean,
|
|
1761
|
+
queryStringVaryParameters: __S(192, __c12, 0),
|
|
1762
|
+
}),
|
|
1763
|
+
).annotate({ identifier: "CacheConfig" });
|
|
1764
|
+
case 9:
|
|
1765
|
+
return S.suspend(() =>
|
|
1766
|
+
S.Struct({
|
|
1767
|
+
backend: S.Unknown,
|
|
1768
|
+
blockedCountries: __S(192, __c12, 0),
|
|
1769
|
+
blockedIps: __S(192, __c12, 0),
|
|
1770
|
+
cacheConfig: __S(216, __c13, 8),
|
|
1771
|
+
defaultCacheDuration: S.optional(S.NullOr(S.String)),
|
|
1772
|
+
forwardHostHeader: S.Boolean,
|
|
1773
|
+
labels: S.optional(__S(176, __c11, 0)),
|
|
1774
|
+
logSink: S.optional(S.Unknown),
|
|
1775
|
+
monthlyLimitBytes: S.optional(S.NullOr(S.Number)),
|
|
1776
|
+
optimizer: S.optional(__S(208, __c13, 0)),
|
|
1777
|
+
redirects: S.optional(__S(213, __c13, 5)),
|
|
1778
|
+
regions: __S(193, __c12, 1),
|
|
1779
|
+
stripResponseCookies: S.Boolean,
|
|
1780
|
+
tls: __S(214, __c13, 6),
|
|
1781
|
+
waf: __S(215, __c13, 7),
|
|
1782
|
+
}),
|
|
1783
|
+
).annotate({ identifier: "Config" });
|
|
1784
|
+
case 10:
|
|
1785
|
+
return S.suspend(() =>
|
|
1786
|
+
S.Struct({
|
|
1787
|
+
certificateType: S.String,
|
|
1788
|
+
errors: S.optional(__S(161, __c10, 1)),
|
|
1789
|
+
name: S.String,
|
|
1790
|
+
status: S.String,
|
|
1791
|
+
type: S.String,
|
|
1792
|
+
}),
|
|
1793
|
+
).annotate({ identifier: "Domain" });
|
|
1794
|
+
case 11:
|
|
1795
|
+
return S.Array(__S(218, __c13, 10));
|
|
1796
|
+
case 12:
|
|
1797
|
+
return S.suspend(() =>
|
|
1798
|
+
S.Struct({
|
|
1799
|
+
id: S.String,
|
|
1800
|
+
reason: S.Unknown,
|
|
1801
|
+
}),
|
|
1802
|
+
).annotate({ identifier: "WafStatusRuleBlock" });
|
|
1803
|
+
case 13:
|
|
1804
|
+
return S.Array(__S(220, __c13, 12));
|
|
1805
|
+
case 14:
|
|
1806
|
+
return S.suspend(() =>
|
|
1807
|
+
S.Struct({
|
|
1808
|
+
disabledRules: __S(221, __c13, 13),
|
|
1809
|
+
enabledRules: __S(221, __c13, 13),
|
|
1810
|
+
logOnlyRules: __S(221, __c13, 13),
|
|
1811
|
+
}),
|
|
1812
|
+
).annotate({ identifier: "DistributionWaf" });
|
|
1813
|
+
case 15:
|
|
1814
|
+
return S.suspend(() =>
|
|
1815
|
+
S.Struct({
|
|
1816
|
+
config: __S(217, __c13, 9),
|
|
1817
|
+
createdAt: S.String,
|
|
1818
|
+
domains: __S(219, __c13, 11),
|
|
1819
|
+
errors: S.optional(__S(161, __c10, 1)),
|
|
1820
|
+
id: S.String,
|
|
1821
|
+
projectId: S.String,
|
|
1822
|
+
status: S.String,
|
|
1823
|
+
updatedAt: S.String,
|
|
1824
|
+
waf: S.optional(__S(222, __c13, 14)),
|
|
1825
|
+
}),
|
|
1826
|
+
).annotate({ identifier: "Distribution" });
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
function __c14(j: number): any {
|
|
1830
|
+
switch (j) {
|
|
1831
|
+
case 0:
|
|
1832
|
+
return S.suspend(() =>
|
|
1833
|
+
S.Struct({
|
|
1834
|
+
distribution: __S(223, __c13, 15),
|
|
1835
|
+
}),
|
|
1836
|
+
).annotate({ identifier: "CreateDistributionResponse" });
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
function __c15(j: number): any {
|
|
1840
|
+
switch (j) {
|
|
1841
|
+
case 0:
|
|
1842
|
+
return S.suspend(() =>
|
|
1843
|
+
S.Struct({
|
|
1844
|
+
projectId: S.String.pipe(T.Label()),
|
|
1845
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1846
|
+
domain: S.String.pipe(T.Label()),
|
|
1847
|
+
intentId: S.optional(S.String.pipe(T.Query())),
|
|
1848
|
+
}).pipe(
|
|
1849
|
+
T.Http({
|
|
1850
|
+
method: "DELETE",
|
|
1851
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}",
|
|
1852
|
+
code: 200,
|
|
1853
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1854
|
+
}),
|
|
1855
|
+
),
|
|
1856
|
+
).annotate({ identifier: "DeleteCustomDomainRequest" });
|
|
1857
|
+
case 1:
|
|
1858
|
+
return S.suspend(() =>
|
|
1859
|
+
S.Struct({
|
|
1860
|
+
customDomain: S.optional(__S(256, __c16, 0)),
|
|
1861
|
+
}),
|
|
1862
|
+
).annotate({ identifier: "DeleteCustomDomainResponse" });
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
function __c16(j: number): any {
|
|
1866
|
+
switch (j) {
|
|
1867
|
+
case 0:
|
|
1868
|
+
return S.suspend(() =>
|
|
1869
|
+
S.Struct({
|
|
1870
|
+
errors: S.optional(__S(161, __c10, 1)),
|
|
1871
|
+
name: S.String,
|
|
1872
|
+
status: S.String,
|
|
1873
|
+
}),
|
|
1874
|
+
).annotate({ identifier: "CustomDomain" });
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
function __c17(j: number): any {
|
|
1878
|
+
switch (j) {
|
|
1879
|
+
case 0:
|
|
1880
|
+
return S.suspend(() =>
|
|
1881
|
+
S.Struct({
|
|
1882
|
+
projectId: S.String.pipe(T.Label()),
|
|
1883
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1884
|
+
intentId: S.optional(S.String.pipe(T.Query())),
|
|
1885
|
+
}).pipe(
|
|
1886
|
+
T.Http({
|
|
1887
|
+
method: "DELETE",
|
|
1888
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}",
|
|
1889
|
+
code: 200,
|
|
1890
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1891
|
+
}),
|
|
1892
|
+
),
|
|
1893
|
+
).annotate({ identifier: "DeleteDistributionRequest" });
|
|
1894
|
+
case 1:
|
|
1895
|
+
return S.suspend(() =>
|
|
1896
|
+
S.Struct({
|
|
1897
|
+
distribution: S.optional(__S(223, __c13, 15)),
|
|
1898
|
+
}),
|
|
1899
|
+
).annotate({ identifier: "DeleteDistributionResponse" });
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
function __c18(j: number): any {
|
|
1903
|
+
switch (j) {
|
|
1904
|
+
case 0:
|
|
1905
|
+
return S.suspend(() =>
|
|
1906
|
+
S.Struct({
|
|
1907
|
+
projectId: S.String.pipe(T.Label()),
|
|
1908
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1909
|
+
path: S.String.pipe(T.Query()),
|
|
1910
|
+
}).pipe(
|
|
1911
|
+
T.Http({
|
|
1912
|
+
method: "GET",
|
|
1913
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/cache/paths",
|
|
1914
|
+
code: 200,
|
|
1915
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1916
|
+
}),
|
|
1917
|
+
),
|
|
1918
|
+
).annotate({ identifier: "FindCachePathsRequest" });
|
|
1919
|
+
case 1:
|
|
1920
|
+
return S.suspend(() =>
|
|
1921
|
+
S.Struct({
|
|
1922
|
+
path: S.String,
|
|
1923
|
+
}),
|
|
1924
|
+
).annotate({ identifier: "FindCachePathsResponseEntry" });
|
|
1925
|
+
case 2:
|
|
1926
|
+
return S.Array(__S(289, __c18, 1));
|
|
1927
|
+
case 3:
|
|
1928
|
+
return S.suspend(() =>
|
|
1929
|
+
S.Struct({
|
|
1930
|
+
response: __S(290, __c18, 2),
|
|
1931
|
+
}),
|
|
1932
|
+
).annotate({ identifier: "FindCachePathsResponse" });
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
function __c19(j: number): any {
|
|
1936
|
+
switch (j) {
|
|
1937
|
+
case 0:
|
|
1938
|
+
return S.suspend(() =>
|
|
1939
|
+
S.Struct({
|
|
1940
|
+
projectId: S.String.pipe(T.Label()),
|
|
1941
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1942
|
+
purgePath: S.optional(S.String.pipe(T.Query())),
|
|
1943
|
+
}).pipe(
|
|
1944
|
+
T.Http({
|
|
1945
|
+
method: "GET",
|
|
1946
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/cache",
|
|
1947
|
+
code: 200,
|
|
1948
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1949
|
+
}),
|
|
1950
|
+
),
|
|
1951
|
+
).annotate({ identifier: "GetCacheInfoRequest" });
|
|
1952
|
+
case 1:
|
|
1953
|
+
return S.suspend(() =>
|
|
1954
|
+
S.Struct({
|
|
1955
|
+
occurredAt: S.String,
|
|
1956
|
+
type: S.String,
|
|
1957
|
+
}),
|
|
1958
|
+
).annotate({ identifier: "GetCacheInfoResponseHistoryEntry" });
|
|
1959
|
+
case 2:
|
|
1960
|
+
return S.Array(__S(305, __c19, 1));
|
|
1961
|
+
case 3:
|
|
1962
|
+
return S.suspend(() =>
|
|
1963
|
+
S.Struct({
|
|
1964
|
+
history: __S(306, __c19, 2),
|
|
1965
|
+
lastPurgeTime: S.NullOr(S.String),
|
|
1966
|
+
}),
|
|
1967
|
+
).annotate({ identifier: "GetCacheInfoResponse" });
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
function __c20(j: number): any {
|
|
1971
|
+
switch (j) {
|
|
1972
|
+
case 0:
|
|
1973
|
+
return S.suspend(() =>
|
|
1974
|
+
S.Struct({
|
|
1975
|
+
projectId: S.String.pipe(T.Label()),
|
|
1976
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1977
|
+
domain: S.String.pipe(T.Label()),
|
|
1978
|
+
}).pipe(
|
|
1979
|
+
T.Http({
|
|
1980
|
+
method: "GET",
|
|
1981
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}",
|
|
1982
|
+
code: 200,
|
|
1983
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1984
|
+
}),
|
|
1985
|
+
),
|
|
1986
|
+
).annotate({ identifier: "GetCustomDomainRequest" });
|
|
1987
|
+
case 1:
|
|
1988
|
+
return S.suspend(() =>
|
|
1989
|
+
S.Struct({
|
|
1990
|
+
certificate: S.Unknown,
|
|
1991
|
+
customDomain: __S(256, __c16, 0),
|
|
1992
|
+
}),
|
|
1993
|
+
).annotate({ identifier: "GetCustomDomainResponse" });
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
function __c21(j: number): any {
|
|
1997
|
+
switch (j) {
|
|
1998
|
+
case 0:
|
|
1999
|
+
return S.suspend(() =>
|
|
2000
|
+
S.Struct({
|
|
2001
|
+
projectId: S.String.pipe(T.Label()),
|
|
2002
|
+
distributionId: S.String.pipe(T.Label()),
|
|
2003
|
+
withWafStatus: S.optional(S.Boolean.pipe(T.Query())),
|
|
2004
|
+
}).pipe(
|
|
2005
|
+
T.Http({
|
|
2006
|
+
method: "GET",
|
|
2007
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}",
|
|
2008
|
+
code: 200,
|
|
2009
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
2010
|
+
}),
|
|
2011
|
+
),
|
|
2012
|
+
).annotate({ identifier: "GetDistributionRequest" });
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
2016
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
2017
|
+
return (__s[i] ??= __L.at(f, j));
|
|
2018
|
+
}
|