@distilled.cloud/clickhouse-cloud 0.0.0 → 1.0.0-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +134 -4
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +34 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +1 -0
- package/lib/errors.d.ts +58 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +1 -0
- package/lib/index.d.ts +49 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +6 -0
- package/lib/pagination.d.ts +10 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +1 -0
- package/lib/protocol.d.ts +19 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +1 -0
- package/lib/retry.d.ts +35 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +1 -0
- package/lib/services/api_keys.d.ts +175 -0
- package/lib/services/api_keys.d.ts.map +1 -0
- package/lib/services/api_keys.js +2 -0
- package/lib/services/api_keys.js.map +1 -0
- package/lib/services/backup.d.ts +117 -0
- package/lib/services/backup.d.ts.map +1 -0
- package/lib/services/backup.js +2 -0
- package/lib/services/backup.js.map +1 -0
- package/lib/services/billing.d.ts +69 -0
- package/lib/services/billing.d.ts.map +1 -0
- package/lib/services/billing.js +2 -0
- package/lib/services/billing.js.map +1 -0
- package/lib/services/click_pipes.d.ts +1637 -0
- package/lib/services/click_pipes.d.ts.map +1 -0
- package/lib/services/click_pipes.js +31 -0
- package/lib/services/click_pipes.js.map +1 -0
- package/lib/services/index.d.ts +14 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +13 -0
- package/lib/services/organization.d.ts +336 -0
- package/lib/services/organization.d.ts.map +1 -0
- package/lib/services/organization.js +2 -0
- package/lib/services/organization.js.map +1 -0
- package/lib/services/postgres.d.ts +726 -0
- package/lib/services/postgres.d.ts.map +1 -0
- package/lib/services/postgres.js +31 -0
- package/lib/services/postgres.js.map +1 -0
- package/lib/services/prometheus.d.ts +71 -0
- package/lib/services/prometheus.d.ts.map +1 -0
- package/lib/services/prometheus.js +2 -0
- package/lib/services/prometheus.js.map +1 -0
- package/lib/services/query_api_endpoints.d.ts +189 -0
- package/lib/services/query_api_endpoints.d.ts.map +1 -0
- package/lib/services/query_api_endpoints.js +2 -0
- package/lib/services/query_api_endpoints.js.map +1 -0
- package/lib/services/role_management.d.ts +159 -0
- package/lib/services/role_management.d.ts.map +1 -0
- package/lib/services/role_management.js +2 -0
- package/lib/services/role_management.js.map +1 -0
- package/lib/services/saved_queries.d.ts +129 -0
- package/lib/services/saved_queries.d.ts.map +1 -0
- package/lib/services/saved_queries.js +2 -0
- package/lib/services/saved_queries.js.map +1 -0
- package/lib/services/service.d.ts +886 -0
- package/lib/services/service.d.ts.map +1 -0
- package/lib/services/service.js +41 -0
- package/lib/services/service.js.map +1 -0
- package/lib/services/udf.d.ts +373 -0
- package/lib/services/udf.d.ts.map +1 -0
- package/lib/services/udf.js +24 -0
- package/lib/services/udf.js.map +1 -0
- package/lib/services/user_management.d.ts +150 -0
- package/lib/services/user_management.d.ts.map +1 -0
- package/lib/services/user_management.js +2 -0
- package/lib/services/user_management.js.map +1 -0
- package/lib/services.lazy/api_keys.js +1 -0
- package/lib/services.lazy/backup.js +1 -0
- package/lib/services.lazy/billing.js +1 -0
- package/lib/services.lazy/click_pipes.js +3 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/organization.js +1 -0
- package/lib/services.lazy/postgres.js +4 -0
- package/lib/services.lazy/prometheus.js +1 -0
- package/lib/services.lazy/query_api_endpoints.js +1 -0
- package/lib/services.lazy/role_management.js +1 -0
- package/lib/services.lazy/saved_queries.js +1 -0
- package/lib/services.lazy/service.js +4 -0
- package/lib/services.lazy/udf.js +3 -0
- package/lib/services.lazy/user_management.js +1 -0
- package/lib/traits.d.ts +11 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +1 -0
- package/lib/unstable-services/backup.d.ts +165 -0
- package/lib/unstable-services/backup.d.ts.map +1 -0
- package/lib/unstable-services/backup.js +2 -0
- package/lib/unstable-services/backup.js.map +1 -0
- package/lib/unstable-services/billing.d.ts +84 -0
- package/lib/unstable-services/billing.d.ts.map +1 -0
- package/lib/unstable-services/billing.js +2 -0
- package/lib/unstable-services/billing.js.map +1 -0
- package/lib/unstable-services/click_pipes.d.ts +324 -0
- package/lib/unstable-services/click_pipes.d.ts.map +1 -0
- package/lib/unstable-services/click_pipes.js +2 -0
- package/lib/unstable-services/click_pipes.js.map +1 -0
- package/lib/unstable-services/click_stack.d.ts +3538 -0
- package/lib/unstable-services/click_stack.d.ts.map +1 -0
- package/lib/unstable-services/click_stack.js +60 -0
- package/lib/unstable-services/click_stack.js.map +1 -0
- package/lib/unstable-services/index.d.ts +11 -0
- package/lib/unstable-services/index.d.ts.map +1 -0
- package/lib/unstable-services/index.js +10 -0
- package/lib/unstable-services/notifications.d.ts +166 -0
- package/lib/unstable-services/notifications.d.ts.map +1 -0
- package/lib/unstable-services/notifications.js +2 -0
- package/lib/unstable-services/notifications.js.map +1 -0
- package/lib/unstable-services/organization.d.ts +403 -0
- package/lib/unstable-services/organization.d.ts.map +1 -0
- package/lib/unstable-services/organization.js +26 -0
- package/lib/unstable-services/organization.js.map +1 -0
- package/lib/unstable-services/postgres.d.ts +415 -0
- package/lib/unstable-services/postgres.d.ts.map +1 -0
- package/lib/unstable-services/postgres.js +2 -0
- package/lib/unstable-services/postgres.js.map +1 -0
- package/lib/unstable-services/service.d.ts +244 -0
- package/lib/unstable-services/service.d.ts.map +1 -0
- package/lib/unstable-services/service.js +2 -0
- package/lib/unstable-services/service.js.map +1 -0
- package/lib/unstable-services/snapshot.d.ts +146 -0
- package/lib/unstable-services/snapshot.d.ts.map +1 -0
- package/lib/unstable-services/snapshot.js +2 -0
- package/lib/unstable-services/snapshot.js.map +1 -0
- package/lib/unstable-services/user_management.d.ts +41 -0
- package/lib/unstable-services/user_management.d.ts.map +1 -0
- package/lib/unstable-services/user_management.js +2 -0
- package/lib/unstable-services/user_management.js.map +1 -0
- package/lib/unstable-services.lazy/backup.js +1 -0
- package/lib/unstable-services.lazy/billing.js +1 -0
- package/lib/unstable-services.lazy/click_pipes.js +1 -0
- package/lib/unstable-services.lazy/click_stack.js +4 -0
- package/lib/unstable-services.lazy/index.js +3 -0
- package/lib/unstable-services.lazy/notifications.js +1 -0
- package/lib/unstable-services.lazy/organization.js +4 -0
- package/lib/unstable-services.lazy/postgres.js +1 -0
- package/lib/unstable-services.lazy/service.js +1 -0
- package/lib/unstable-services.lazy/snapshot.js +1 -0
- package/lib/unstable-services.lazy/user_management.js +1 -0
- package/package.json +89 -2
- package/src/credentials.ts +88 -0
- package/src/errors.ts +76 -0
- package/src/index.ts +53 -0
- package/src/pagination.ts +9 -0
- package/src/protocol.ts +76 -0
- package/src/retry.ts +53 -0
- package/src/services/api_keys.ts +466 -0
- package/src/services/backup.ts +347 -0
- package/src/services/billing.ts +170 -0
- package/src/services/click_pipes.ts +3483 -0
- package/src/services/index.ts +14 -0
- package/src/services/organization.ts +901 -0
- package/src/services/postgres.ts +1967 -0
- package/src/services/prometheus.ts +271 -0
- package/src/services/query_api_endpoints.ts +466 -0
- package/src/services/role_management.ts +436 -0
- package/src/services/saved_queries.ts +384 -0
- package/src/services/service.ts +2112 -0
- package/src/services/udf.ts +1019 -0
- package/src/services/user_management.ts +508 -0
- package/src/traits.ts +45 -0
- package/src/unstable-services/backup.ts +422 -0
- package/src/unstable-services/billing.ts +232 -0
- package/src/unstable-services/click_pipes.ts +702 -0
- package/src/unstable-services/click_stack.ts +7114 -0
- package/src/unstable-services/index.ts +11 -0
- package/src/unstable-services/notifications.ts +451 -0
- package/src/unstable-services/organization.ts +1107 -0
- package/src/unstable-services/postgres.ts +1061 -0
- package/src/unstable-services/service.ts +795 -0
- package/src/unstable-services/snapshot.ts +397 -0
- package/src/unstable-services/user_management.ts +127 -0
|
@@ -0,0 +1,795 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as C from "@distilled.cloud/core/category";
|
|
3
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-clickhouse-cloud/specs/openapi.json). Do not edit.
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import { ClickHouseCloudServiceErrors } from "../errors.ts";
|
|
7
|
+
import {
|
|
8
|
+
ClickHouseCloudProtocol,
|
|
9
|
+
type ClickHouseCloudOpError,
|
|
10
|
+
type ClickHouseCloudOpContext,
|
|
11
|
+
} from "../protocol.ts";
|
|
12
|
+
import * as Retry from "../retry.ts";
|
|
13
|
+
import * as T from "../traits.ts";
|
|
14
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
15
|
+
const __s: any[] = [];
|
|
16
|
+
|
|
17
|
+
export type { ClickHouseCloudOpError, ClickHouseCloudOpContext };
|
|
18
|
+
|
|
19
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
20
|
+
const TELEMETRY = {
|
|
21
|
+
system: "clickhouse-cloud-api",
|
|
22
|
+
responseHeaders: [
|
|
23
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
24
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
25
|
+
],
|
|
26
|
+
prefix: "ClickhouseCloud",
|
|
27
|
+
service: "Services",
|
|
28
|
+
labels: "clickhouse_cloud",
|
|
29
|
+
propagate: "w3c",
|
|
30
|
+
} as const;
|
|
31
|
+
|
|
32
|
+
/** The feature is not available to this organization or service: its plan does not include it, it is not enabled for the organization, or it is not set up. The message says which. */
|
|
33
|
+
export class FeatureUnavailable
|
|
34
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
35
|
+
/*@__PURE__*/ S.TaggedError<FeatureUnavailable>()("FeatureUnavailable", {
|
|
36
|
+
message: S.String,
|
|
37
|
+
body: /*@__PURE__*/ S.optional(S.Unknown),
|
|
38
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
39
|
+
}).pipe(C.withAuthError),
|
|
40
|
+
[
|
|
41
|
+
{ status: 403, message: { includes: "pricing package" } },
|
|
42
|
+
{ status: 403, message: { includes: "is not enabled for this organization" } },
|
|
43
|
+
{ status: 403, message: { includes: "early access API endpoint" } },
|
|
44
|
+
],
|
|
45
|
+
) {}
|
|
46
|
+
|
|
47
|
+
export interface CreateJwtProviderRequest {
|
|
48
|
+
/** ID of the organization that owns the service. */
|
|
49
|
+
organizationId: string;
|
|
50
|
+
/** ID of the service. */
|
|
51
|
+
serviceId: string;
|
|
52
|
+
/** Name of the JWT provider, unique within the service. Lowercase letters, digits and hyphens, at most 59 characters. Cannot be one of, or start with one of followed by a hyphen: `cloud`, `clickhouse`, `ch`, `internal`, `system`, `default`. */
|
|
53
|
+
name: string;
|
|
54
|
+
/** Expected `iss` claim of the tokens. Printable ASCII without whitespace, at most 256 characters. */
|
|
55
|
+
issuer: string;
|
|
56
|
+
/** Expected `aud` claim of the tokens. Printable ASCII without whitespace, at most 256 characters. */
|
|
57
|
+
audience: string;
|
|
58
|
+
/** Public `https://` URL of the JSON Web Key Set used to verify token signatures, at most 256 characters. The key set must contain at least one supported signing key: RS256 (RSA), or on ClickHouse 26.8 and later also ES256, ES384 or ES512 (EC); it is fetched and validated when the provider is created or updated. */
|
|
59
|
+
jwksUrl: string;
|
|
60
|
+
/** Name of the token claim that lists the ClickHouse roles to grant the user. Printable ASCII without whitespace, at most 256 characters, and not a registered JWT claim (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`). Omit to configure no roles claim. */
|
|
61
|
+
rolesClaim?: string | undefined;
|
|
62
|
+
}
|
|
63
|
+
export interface JwtProvider {
|
|
64
|
+
/** Name of the JWT provider, unique within the service. Lowercase letters, digits and hyphens, at most 59 characters. Cannot be one of, or start with one of followed by a hyphen: `cloud`, `clickhouse`, `ch`, `internal`, `system`, `default`. */
|
|
65
|
+
name: string;
|
|
66
|
+
/** Expected `iss` claim of the tokens. Printable ASCII without whitespace, at most 256 characters. */
|
|
67
|
+
issuer: string;
|
|
68
|
+
/** Expected `aud` claim of the tokens. Printable ASCII without whitespace, at most 256 characters. */
|
|
69
|
+
audience: string;
|
|
70
|
+
/** Public `https://` URL of the JSON Web Key Set used to verify token signatures, at most 256 characters. The key set must contain at least one supported signing key: RS256 (RSA), or on ClickHouse 26.8 and later also ES256, ES384 or ES512 (EC); it is fetched and validated when the provider is created or updated. */
|
|
71
|
+
jwksUrl: string;
|
|
72
|
+
/** Name of the token claim that lists the ClickHouse roles to grant the user. Printable ASCII without whitespace, at most 256 characters, and not a registered JWT claim (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`). Absent when no roles claim is configured. */
|
|
73
|
+
rolesClaim?: string | undefined;
|
|
74
|
+
}
|
|
75
|
+
export interface DeleteJwtProviderRequest {
|
|
76
|
+
/** ID of the organization that owns the service. */
|
|
77
|
+
organizationId: string;
|
|
78
|
+
/** ID of the service. */
|
|
79
|
+
serviceId: string;
|
|
80
|
+
/** Name of the JWT authentication provider. */
|
|
81
|
+
jwtProviderName: string;
|
|
82
|
+
}
|
|
83
|
+
export interface DeleteJwtProviderResponse {
|
|
84
|
+
/** HTTP status code. */
|
|
85
|
+
status?: number | undefined;
|
|
86
|
+
/** Unique id assigned to every request. UUIDv4 */
|
|
87
|
+
requestId?: string | undefined;
|
|
88
|
+
}
|
|
89
|
+
export interface DeleteServiceClickHouseSettingRequest {
|
|
90
|
+
/** ID of the organization that owns the service. */
|
|
91
|
+
organizationId: string;
|
|
92
|
+
/** ID of the service. */
|
|
93
|
+
serviceId: string;
|
|
94
|
+
/** Name of the setting to reset. */
|
|
95
|
+
settingName: string;
|
|
96
|
+
}
|
|
97
|
+
export interface ServiceClickhouseSettingWarning {
|
|
98
|
+
/** Name of the setting the warning applies to. */
|
|
99
|
+
name?: string | undefined;
|
|
100
|
+
/** Warning message. */
|
|
101
|
+
message?: string | undefined;
|
|
102
|
+
}
|
|
103
|
+
/** Warnings about how the reset takes effect, such as a ClickHouse server rollout restart. Omitted when the setting was not configured. */
|
|
104
|
+
export type ServiceClickhouseSettingDeleteResponseWarningsList =
|
|
105
|
+
Array<ServiceClickhouseSettingWarning>;
|
|
106
|
+
export interface ServiceClickhouseSettingDeleteResponse {
|
|
107
|
+
/** Warnings about how the reset takes effect, such as a ClickHouse server rollout restart. Omitted when the setting was not configured. */
|
|
108
|
+
warnings?: ServiceClickhouseSettingDeleteResponseWarningsList | undefined;
|
|
109
|
+
}
|
|
110
|
+
export interface GetJwtProviderRequest {
|
|
111
|
+
/** ID of the organization that owns the service. */
|
|
112
|
+
organizationId: string;
|
|
113
|
+
/** ID of the service. */
|
|
114
|
+
serviceId: string;
|
|
115
|
+
/** Name of the JWT authentication provider. */
|
|
116
|
+
jwtProviderName: string;
|
|
117
|
+
}
|
|
118
|
+
export interface GetReplicaAwareRoutingRequest {
|
|
119
|
+
/** ID of the organization that owns the service. */
|
|
120
|
+
organizationId: string;
|
|
121
|
+
/** ID of the service. */
|
|
122
|
+
serviceId: string;
|
|
123
|
+
}
|
|
124
|
+
export interface ReplicaAwareRouting {
|
|
125
|
+
/** Whether replica aware routing is enabled for HTTP connections. When enabled, clients must send the X-ClickHouse-Replica-Tag header. Enabling this changes HTTP connection behavior for the service. */
|
|
126
|
+
httpEnabled: boolean;
|
|
127
|
+
/** Whether replica aware routing is enabled for native protocol connections. */
|
|
128
|
+
nativeEnabled: boolean;
|
|
129
|
+
}
|
|
130
|
+
export interface GetServiceClickHouseSettingRequest {
|
|
131
|
+
/** ID of the organization that owns the service. */
|
|
132
|
+
organizationId: string;
|
|
133
|
+
/** ID of the service. */
|
|
134
|
+
serviceId: string;
|
|
135
|
+
/** Name of the setting to retrieve. */
|
|
136
|
+
settingName: string;
|
|
137
|
+
}
|
|
138
|
+
/** Setting value in its native JSON type. Use the settings schema endpoint for per-setting constraints. */
|
|
139
|
+
export type ServiceClickhouseSettingValue = string | number;
|
|
140
|
+
export interface ServiceClickhouseSetting {
|
|
141
|
+
/** Name of the setting. */
|
|
142
|
+
name?: string | undefined;
|
|
143
|
+
value?: ServiceClickhouseSettingValue | undefined;
|
|
144
|
+
}
|
|
145
|
+
export interface GetServiceClickHouseSettingsSchemaRequest {
|
|
146
|
+
/** ID of the organization that owns the service. */
|
|
147
|
+
organizationId: string;
|
|
148
|
+
/** ID of the service. */
|
|
149
|
+
serviceId: string;
|
|
150
|
+
}
|
|
151
|
+
/** List of allowed values, if the setting is an enum. */
|
|
152
|
+
export type ServiceClickhouseSettingSchemaEntryEnumList = Array<number>;
|
|
153
|
+
export interface ServiceClickhouseSettingSchemaEntry {
|
|
154
|
+
/** Name of the setting. */
|
|
155
|
+
name?: string | undefined;
|
|
156
|
+
/** Data type of the setting value. */
|
|
157
|
+
type?: string | undefined;
|
|
158
|
+
/** Description of the setting. */
|
|
159
|
+
description?: string | undefined;
|
|
160
|
+
/** List of allowed values, if the setting is an enum. */
|
|
161
|
+
enum?: ServiceClickhouseSettingSchemaEntryEnumList | undefined;
|
|
162
|
+
/** Warning message about potential disruptive effects of changing or resetting this setting. */
|
|
163
|
+
warning?: string | undefined;
|
|
164
|
+
/** Deprecation notice, if applicable. */
|
|
165
|
+
deprecationNotice?: string | undefined;
|
|
166
|
+
/** Example value for the setting. */
|
|
167
|
+
example?: string | undefined;
|
|
168
|
+
}
|
|
169
|
+
/** List of all configurable ClickHouse settings with their types, descriptions, and constraints. */
|
|
170
|
+
export type ServiceClickhouseSettingsSchemaSettingsList =
|
|
171
|
+
Array<ServiceClickhouseSettingSchemaEntry>;
|
|
172
|
+
export interface ServiceClickhouseSettingsSchema {
|
|
173
|
+
/** List of all configurable ClickHouse settings with their types, descriptions, and constraints. */
|
|
174
|
+
settings?: ServiceClickhouseSettingsSchemaSettingsList | undefined;
|
|
175
|
+
}
|
|
176
|
+
export interface ListJwtProvidersRequest {
|
|
177
|
+
/** ID of the organization that owns the service. */
|
|
178
|
+
organizationId: string;
|
|
179
|
+
/** ID of the service. */
|
|
180
|
+
serviceId: string;
|
|
181
|
+
}
|
|
182
|
+
export type ListJwtProvidersResponseBodyList = Array<JwtProvider>;
|
|
183
|
+
export type ListJwtProvidersResponse = ListJwtProvidersResponseBodyList;
|
|
184
|
+
export interface ListServiceClickHouseSettingsRequest {
|
|
185
|
+
/** ID of the organization that owns the service. */
|
|
186
|
+
organizationId: string;
|
|
187
|
+
/** ID of the service. */
|
|
188
|
+
serviceId: string;
|
|
189
|
+
}
|
|
190
|
+
/** List of ClickHouse settings with their current values. */
|
|
191
|
+
export type ServiceClickhouseSettingsListSettingsList = Array<ServiceClickhouseSetting>;
|
|
192
|
+
export interface ServiceClickhouseSettingsList {
|
|
193
|
+
/** List of ClickHouse settings with their current values. */
|
|
194
|
+
settings?: ServiceClickhouseSettingsListSettingsList | undefined;
|
|
195
|
+
}
|
|
196
|
+
export interface UpdateJwtProviderRequest {
|
|
197
|
+
/** ID of the organization that owns the service. */
|
|
198
|
+
organizationId: string;
|
|
199
|
+
/** ID of the service. */
|
|
200
|
+
serviceId: string;
|
|
201
|
+
/** Name of the JWT authentication provider. */
|
|
202
|
+
jwtProviderName: string;
|
|
203
|
+
/** Expected `iss` claim of the tokens. Printable ASCII without whitespace, at most 256 characters. */
|
|
204
|
+
issuer: string;
|
|
205
|
+
/** Expected `aud` claim of the tokens. Printable ASCII without whitespace, at most 256 characters. */
|
|
206
|
+
audience: string;
|
|
207
|
+
/** Public `https://` URL of the JSON Web Key Set used to verify token signatures, at most 256 characters. The key set must contain at least one supported signing key: RS256 (RSA), or on ClickHouse 26.8 and later also ES256, ES384 or ES512 (EC); it is fetched and validated when the provider is created or updated. */
|
|
208
|
+
jwksUrl: string;
|
|
209
|
+
/** Name of the token claim that lists the ClickHouse roles to grant the user. Printable ASCII without whitespace, at most 256 characters, and not a registered JWT claim (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`). The request replaces the whole provider configuration, so omitting this field removes an existing roles claim. */
|
|
210
|
+
rolesClaim?: string | undefined;
|
|
211
|
+
}
|
|
212
|
+
export interface UpdateReplicaAwareRoutingRequest {
|
|
213
|
+
/** ID of the organization that owns the service. */
|
|
214
|
+
organizationId: string;
|
|
215
|
+
/** ID of the service. */
|
|
216
|
+
serviceId: string;
|
|
217
|
+
/** Whether replica aware routing is enabled for HTTP connections. Omit to leave unchanged. */
|
|
218
|
+
httpEnabled?: boolean | undefined;
|
|
219
|
+
/** Whether replica aware routing is enabled for native protocol connections. Omit to leave unchanged. */
|
|
220
|
+
nativeEnabled?: boolean | undefined;
|
|
221
|
+
}
|
|
222
|
+
/** Nonempty object mapping configurable setting names to their values. Use DELETE to reset a setting. */
|
|
223
|
+
export type ServiceClickhouseSettingsMap = {
|
|
224
|
+
[key: string]: ServiceClickhouseSettingValue | undefined;
|
|
225
|
+
};
|
|
226
|
+
export interface UpdateServiceClickHouseSettingsRequest {
|
|
227
|
+
/** ID of the organization that owns the service. */
|
|
228
|
+
organizationId: string;
|
|
229
|
+
/** ID of the service. */
|
|
230
|
+
serviceId: string;
|
|
231
|
+
settings: ServiceClickhouseSettingsMap;
|
|
232
|
+
}
|
|
233
|
+
/** Warnings for settings that may have disruptive effects. */
|
|
234
|
+
export type ServiceClickhouseSettingsPatchResponseWarningsList =
|
|
235
|
+
Array<ServiceClickhouseSettingWarning>;
|
|
236
|
+
export interface ServiceClickhouseSettingsPatchResponse {
|
|
237
|
+
settings?: ServiceClickhouseSettingsMap | undefined;
|
|
238
|
+
/** Warnings for settings that may have disruptive effects. */
|
|
239
|
+
warnings?: ServiceClickhouseSettingsPatchResponseWarningsList | undefined;
|
|
240
|
+
}
|
|
241
|
+
export type CreateJwtProviderError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
242
|
+
/** Create service JWT provider **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Adds a JWT authentication provider to the service. Users can then connect to the service with a JWT issued by the provider; they are signed in as the `default` user and receive the roles listed in the roles claim. The JWKS URL is fetched and validated before the provider is saved. If the service already has a provider with this name and the same configuration, the request succeeds without changing it, so it is safe to retry. Errors: - 400: invalid field values, the JWKS URL is unreachable or does not return a key set with a supported signing key, or the service already has 5 providers. - 401: missing, invalid, or disabled API key. - 403: caller lacks `control-plane:service:manage` on the service, or the organization does not have the JWT authentication providers feature (Enterprise tier). - 404: service does not exist or is not visible to the caller. - 409: the service already has a provider with this name and a different configuration. */
|
|
243
|
+
export const createJwtProvider: API.OperationMethod<
|
|
244
|
+
CreateJwtProviderRequest,
|
|
245
|
+
JwtProvider,
|
|
246
|
+
CreateJwtProviderError,
|
|
247
|
+
ClickHouseCloudOpContext
|
|
248
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
249
|
+
input: __S(0, __c0, 0) as any as S.Schema<CreateJwtProviderRequest>,
|
|
250
|
+
output: __S(8, __c1, 0) as any as S.Schema<JwtProvider>,
|
|
251
|
+
errors: [FeatureUnavailable],
|
|
252
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
253
|
+
protocol: ClickHouseCloudProtocol,
|
|
254
|
+
retry: Retry.Retry,
|
|
255
|
+
telemetry: TELEMETRY,
|
|
256
|
+
span: "CreateJwtProvider",
|
|
257
|
+
}));
|
|
258
|
+
|
|
259
|
+
export type DeleteJwtProviderError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
260
|
+
/** Delete service JWT provider **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Removes a JWT authentication provider from the service. Tokens issued by the provider are no longer accepted. Errors: - 400: invalid provider name. - 401: missing, invalid, or disabled API key. - 403: caller lacks `control-plane:service:manage` on the service, or the organization does not have the JWT authentication providers feature (Enterprise tier). - 404: service does not exist, is not visible to the caller, or has no provider with this name. */
|
|
261
|
+
export const deleteJwtProvider: API.OperationMethod<
|
|
262
|
+
DeleteJwtProviderRequest,
|
|
263
|
+
DeleteJwtProviderResponse,
|
|
264
|
+
DeleteJwtProviderError,
|
|
265
|
+
ClickHouseCloudOpContext
|
|
266
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
267
|
+
input: __S(40, __c5, 0) as any as S.Schema<DeleteJwtProviderRequest>,
|
|
268
|
+
output: __S(41, __c5, 1) as any as S.Schema<DeleteJwtProviderResponse>,
|
|
269
|
+
errors: [FeatureUnavailable],
|
|
270
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
271
|
+
protocol: ClickHouseCloudProtocol,
|
|
272
|
+
retry: Retry.Retry,
|
|
273
|
+
telemetry: TELEMETRY,
|
|
274
|
+
span: "DeleteJwtProvider",
|
|
275
|
+
}));
|
|
276
|
+
|
|
277
|
+
export type DeleteServiceClickHouseSettingError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
278
|
+
/** Reset ClickHouse setting to default **Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Removes a previously-configured ClickHouse setting, reverting its effective value to the platform default. The reset is applied before this endpoint responds, so the response `warnings` describe what happens next and cannot prevent it. To find out beforehand, check the setting's `warning` field in the [schema endpoint](#tag/Service/operation/serviceClickhouseSettingsSchemaGet) (`GET /v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings/schema`, one entry per setting in `settings`). It says whether changing or resetting the setting triggers a ClickHouse server rollout restart (e.g. `compatibility`, `keep_alive_timeout`, `mark_cache_ram_ratio`) or takes effect after a short delay. When the setting was configured, the response `warnings` repeat that same message. Deleting a setting that was never configured is a no-op (200 OK) and returns no warnings. */
|
|
279
|
+
export const deleteServiceClickHouseSetting: API.OperationMethod<
|
|
280
|
+
DeleteServiceClickHouseSettingRequest,
|
|
281
|
+
ServiceClickhouseSettingDeleteResponse,
|
|
282
|
+
DeleteServiceClickHouseSettingError,
|
|
283
|
+
ClickHouseCloudOpContext
|
|
284
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
285
|
+
input: __S(48, __c6, 0) as any as S.Schema<DeleteServiceClickHouseSettingRequest>,
|
|
286
|
+
output: __S(49, __c6, 1) as any as S.Schema<ServiceClickhouseSettingDeleteResponse>,
|
|
287
|
+
errors: [FeatureUnavailable],
|
|
288
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
289
|
+
protocol: ClickHouseCloudProtocol,
|
|
290
|
+
retry: Retry.Retry,
|
|
291
|
+
telemetry: TELEMETRY,
|
|
292
|
+
span: "DeleteServiceClickHouseSetting",
|
|
293
|
+
}));
|
|
294
|
+
|
|
295
|
+
export type GetJwtProviderError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
296
|
+
/** Get service JWT provider **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns a single JWT authentication provider of the service. Errors: - 400: invalid provider name. - 401: missing, invalid, or disabled API key. - 403: caller lacks `control-plane:service:manage` on the service, or the organization does not have the JWT authentication providers feature (Enterprise tier). - 404: service does not exist, is not visible to the caller, or has no provider with this name. */
|
|
297
|
+
export const getJwtProvider: API.OperationMethod<
|
|
298
|
+
GetJwtProviderRequest,
|
|
299
|
+
JwtProvider,
|
|
300
|
+
GetJwtProviderError,
|
|
301
|
+
ClickHouseCloudOpContext
|
|
302
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
303
|
+
input: __S(64, __c8, 0) as any as S.Schema<GetJwtProviderRequest>,
|
|
304
|
+
output: __S(8, __c1, 0) as any as S.Schema<JwtProvider>,
|
|
305
|
+
errors: [FeatureUnavailable],
|
|
306
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
307
|
+
protocol: ClickHouseCloudProtocol,
|
|
308
|
+
retry: Retry.Retry,
|
|
309
|
+
telemetry: TELEMETRY,
|
|
310
|
+
span: "GetJwtProvider",
|
|
311
|
+
}));
|
|
312
|
+
|
|
313
|
+
export type GetReplicaAwareRoutingError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
314
|
+
/** Get replica aware routing **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns whether replica aware routing (sticky routing) is enabled for HTTP and native connections on the service. */
|
|
315
|
+
export const getReplicaAwareRouting: API.OperationMethod<
|
|
316
|
+
GetReplicaAwareRoutingRequest,
|
|
317
|
+
ReplicaAwareRouting,
|
|
318
|
+
GetReplicaAwareRoutingError,
|
|
319
|
+
ClickHouseCloudOpContext
|
|
320
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
321
|
+
input: __S(72, __c9, 0) as any as S.Schema<GetReplicaAwareRoutingRequest>,
|
|
322
|
+
output: __S(80, __c10, 0) as any as S.Schema<ReplicaAwareRouting>,
|
|
323
|
+
errors: [FeatureUnavailable],
|
|
324
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
325
|
+
protocol: ClickHouseCloudProtocol,
|
|
326
|
+
retry: Retry.Retry,
|
|
327
|
+
telemetry: TELEMETRY,
|
|
328
|
+
span: "GetReplicaAwareRouting",
|
|
329
|
+
}));
|
|
330
|
+
|
|
331
|
+
export type GetServiceClickHouseSettingError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
332
|
+
/** Get ClickHouse setting **Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Returns the current value of a ClickHouse setting for the service. Use the [schema endpoint](#tag/Service/operation/serviceClickhouseSettingsSchemaGet) to discover which settings are configurable. */
|
|
333
|
+
export const getServiceClickHouseSetting: API.OperationMethod<
|
|
334
|
+
GetServiceClickHouseSettingRequest,
|
|
335
|
+
ServiceClickhouseSetting,
|
|
336
|
+
GetServiceClickHouseSettingError,
|
|
337
|
+
ClickHouseCloudOpContext
|
|
338
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
339
|
+
input: __S(88, __c11, 0) as any as S.Schema<GetServiceClickHouseSettingRequest>,
|
|
340
|
+
output: __S(96, __c12, 0) as any as S.Schema<ServiceClickhouseSetting>,
|
|
341
|
+
errors: [FeatureUnavailable],
|
|
342
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
343
|
+
protocol: ClickHouseCloudProtocol,
|
|
344
|
+
retry: Retry.Retry,
|
|
345
|
+
telemetry: TELEMETRY,
|
|
346
|
+
span: "GetServiceClickHouseSetting",
|
|
347
|
+
}));
|
|
348
|
+
|
|
349
|
+
export type GetServiceClickHouseSettingsSchemaError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
350
|
+
/** Get ClickHouse settings schema **Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Returns the schema of all configurable ClickHouse settings, including types, valid values, descriptions, and warnings. */
|
|
351
|
+
export const getServiceClickHouseSettingsSchema: API.OperationMethod<
|
|
352
|
+
GetServiceClickHouseSettingsSchemaRequest,
|
|
353
|
+
ServiceClickhouseSettingsSchema,
|
|
354
|
+
GetServiceClickHouseSettingsSchemaError,
|
|
355
|
+
ClickHouseCloudOpContext
|
|
356
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
357
|
+
input: __S(112, __c14, 0) as any as S.Schema<GetServiceClickHouseSettingsSchemaRequest>,
|
|
358
|
+
output: __S(116, __c14, 4) as any as S.Schema<ServiceClickhouseSettingsSchema>,
|
|
359
|
+
errors: [FeatureUnavailable],
|
|
360
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
361
|
+
protocol: ClickHouseCloudProtocol,
|
|
362
|
+
retry: Retry.Retry,
|
|
363
|
+
telemetry: TELEMETRY,
|
|
364
|
+
span: "GetServiceClickHouseSettingsSchema",
|
|
365
|
+
}));
|
|
366
|
+
|
|
367
|
+
export type ListJwtProvidersError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
368
|
+
/** List service JWT providers **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the JWT authentication providers configured on the service. A service has at most 5 providers. Errors: - 401: missing, invalid, or disabled API key. - 403: caller lacks `control-plane:service:manage` on the service, or the organization does not have the JWT authentication providers feature (Enterprise tier). - 404: service does not exist or is not visible to the caller. */
|
|
369
|
+
export const listJwtProviders: API.OperationMethod<
|
|
370
|
+
ListJwtProvidersRequest,
|
|
371
|
+
ListJwtProvidersResponse,
|
|
372
|
+
ListJwtProvidersError,
|
|
373
|
+
ClickHouseCloudOpContext
|
|
374
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
375
|
+
input: __S(120, __c15, 0) as any as S.Schema<ListJwtProvidersRequest>,
|
|
376
|
+
output: __S(122, __c15, 2) as any as S.Schema<ListJwtProvidersResponse>,
|
|
377
|
+
errors: [FeatureUnavailable],
|
|
378
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
379
|
+
protocol: ClickHouseCloudProtocol,
|
|
380
|
+
retry: Retry.Retry,
|
|
381
|
+
telemetry: TELEMETRY,
|
|
382
|
+
span: "ListJwtProviders",
|
|
383
|
+
}));
|
|
384
|
+
|
|
385
|
+
export type ListServiceClickHouseSettingsError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
386
|
+
/** List ClickHouse settings **Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Returns the configured ClickHouse settings for the service. Only settings that have been explicitly set are included. */
|
|
387
|
+
export const listServiceClickHouseSettings: API.OperationMethod<
|
|
388
|
+
ListServiceClickHouseSettingsRequest,
|
|
389
|
+
ServiceClickhouseSettingsList,
|
|
390
|
+
ListServiceClickHouseSettingsError,
|
|
391
|
+
ClickHouseCloudOpContext
|
|
392
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
393
|
+
input: __S(128, __c16, 0) as any as S.Schema<ListServiceClickHouseSettingsRequest>,
|
|
394
|
+
output: __S(130, __c16, 2) as any as S.Schema<ServiceClickhouseSettingsList>,
|
|
395
|
+
errors: [FeatureUnavailable],
|
|
396
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
397
|
+
protocol: ClickHouseCloudProtocol,
|
|
398
|
+
retry: Retry.Retry,
|
|
399
|
+
telemetry: TELEMETRY,
|
|
400
|
+
span: "ListServiceClickHouseSettings",
|
|
401
|
+
}));
|
|
402
|
+
|
|
403
|
+
export type UpdateJwtProviderError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
404
|
+
/** Update service JWT provider **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Replaces the configuration of a JWT authentication provider. The JWKS URL is fetched and validated before the change is saved. Errors: - 400: invalid provider name or field values, or the JWKS URL is unreachable or does not return a key set with a supported signing key. - 401: missing, invalid, or disabled API key. - 403: caller lacks `control-plane:service:manage` on the service, or the organization does not have the JWT authentication providers feature (Enterprise tier). - 404: service does not exist, is not visible to the caller, or has no provider with this name. */
|
|
405
|
+
export const updateJwtProvider: API.OperationMethod<
|
|
406
|
+
UpdateJwtProviderRequest,
|
|
407
|
+
JwtProvider,
|
|
408
|
+
UpdateJwtProviderError,
|
|
409
|
+
ClickHouseCloudOpContext
|
|
410
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
411
|
+
input: __S(16, __c2, 0) as any as S.Schema<UpdateJwtProviderRequest>,
|
|
412
|
+
output: __S(8, __c1, 0) as any as S.Schema<JwtProvider>,
|
|
413
|
+
errors: [FeatureUnavailable],
|
|
414
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
415
|
+
protocol: ClickHouseCloudProtocol,
|
|
416
|
+
retry: Retry.Retry,
|
|
417
|
+
telemetry: TELEMETRY,
|
|
418
|
+
span: "UpdateJwtProvider",
|
|
419
|
+
}));
|
|
420
|
+
|
|
421
|
+
export type UpdateReplicaAwareRoutingError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
422
|
+
/** Update replica aware routing **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Updates replica aware routing (sticky routing) for the service. Requires the organization feature to be enabled. Provide at least one of httpEnabled, nativeEnabled; omit a field to leave it unchanged. */
|
|
423
|
+
export const updateReplicaAwareRouting: API.OperationMethod<
|
|
424
|
+
UpdateReplicaAwareRoutingRequest,
|
|
425
|
+
ReplicaAwareRouting,
|
|
426
|
+
UpdateReplicaAwareRoutingError,
|
|
427
|
+
ClickHouseCloudOpContext
|
|
428
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
429
|
+
input: __S(24, __c3, 0) as any as S.Schema<UpdateReplicaAwareRoutingRequest>,
|
|
430
|
+
output: __S(80, __c10, 0) as any as S.Schema<ReplicaAwareRouting>,
|
|
431
|
+
errors: [FeatureUnavailable],
|
|
432
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
433
|
+
protocol: ClickHouseCloudProtocol,
|
|
434
|
+
retry: Retry.Retry,
|
|
435
|
+
telemetry: TELEMETRY,
|
|
436
|
+
span: "UpdateReplicaAwareRouting",
|
|
437
|
+
}));
|
|
438
|
+
|
|
439
|
+
export type UpdateServiceClickHouseSettingsError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
440
|
+
/** Update ClickHouse settings **Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Updates one or more ClickHouse settings for the service. To reset a setting to its platform default, use the [DELETE single setting](#tag/Service/operation/serviceClickhouseSettingDelete) endpoint. Use the [schema endpoint](#tag/Service/operation/serviceClickhouseSettingsSchemaGet) to discover which settings are configurable. */
|
|
441
|
+
export const updateServiceClickHouseSettings: API.OperationMethod<
|
|
442
|
+
UpdateServiceClickHouseSettingsRequest,
|
|
443
|
+
ServiceClickhouseSettingsPatchResponse,
|
|
444
|
+
UpdateServiceClickHouseSettingsError,
|
|
445
|
+
ClickHouseCloudOpContext
|
|
446
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
447
|
+
input: __S(33, __c4, 1) as any as S.Schema<UpdateServiceClickHouseSettingsRequest>,
|
|
448
|
+
output: __S(34, __c4, 2) as any as S.Schema<ServiceClickhouseSettingsPatchResponse>,
|
|
449
|
+
errors: [FeatureUnavailable],
|
|
450
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
451
|
+
protocol: ClickHouseCloudProtocol,
|
|
452
|
+
retry: Retry.Retry,
|
|
453
|
+
telemetry: TELEMETRY,
|
|
454
|
+
span: "UpdateServiceClickHouseSettings",
|
|
455
|
+
}));
|
|
456
|
+
|
|
457
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
458
|
+
function __c0(j: number): any {
|
|
459
|
+
switch (j) {
|
|
460
|
+
case 0:
|
|
461
|
+
return S.suspend(() =>
|
|
462
|
+
S.Struct({
|
|
463
|
+
organizationId: S.String.pipe(T.Label()),
|
|
464
|
+
serviceId: S.String.pipe(T.Label()),
|
|
465
|
+
name: S.String,
|
|
466
|
+
issuer: S.String,
|
|
467
|
+
audience: S.String,
|
|
468
|
+
jwksUrl: S.String,
|
|
469
|
+
rolesClaim: S.optional(S.String),
|
|
470
|
+
}).pipe(
|
|
471
|
+
T.Http({
|
|
472
|
+
method: "POST",
|
|
473
|
+
uri: "/v1/organizations/{organizationId}/services/{serviceId}/jwtProviders",
|
|
474
|
+
code: 200,
|
|
475
|
+
}),
|
|
476
|
+
),
|
|
477
|
+
).annotate({ identifier: "CreateJwtProviderRequest" });
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
function __c1(j: number): any {
|
|
481
|
+
switch (j) {
|
|
482
|
+
case 0:
|
|
483
|
+
return S.suspend(() =>
|
|
484
|
+
S.Struct({
|
|
485
|
+
name: S.String,
|
|
486
|
+
issuer: S.String,
|
|
487
|
+
audience: S.String,
|
|
488
|
+
jwksUrl: S.String,
|
|
489
|
+
rolesClaim: S.optional(S.String),
|
|
490
|
+
}),
|
|
491
|
+
).annotate({ identifier: "JwtProvider" });
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
function __c2(j: number): any {
|
|
495
|
+
switch (j) {
|
|
496
|
+
case 0:
|
|
497
|
+
return S.suspend(() =>
|
|
498
|
+
S.Struct({
|
|
499
|
+
organizationId: S.String.pipe(T.Label()),
|
|
500
|
+
serviceId: S.String.pipe(T.Label()),
|
|
501
|
+
jwtProviderName: S.String.pipe(T.Label()),
|
|
502
|
+
issuer: S.String,
|
|
503
|
+
audience: S.String,
|
|
504
|
+
jwksUrl: S.String,
|
|
505
|
+
rolesClaim: S.optional(S.String),
|
|
506
|
+
}).pipe(
|
|
507
|
+
T.Http({
|
|
508
|
+
method: "PUT",
|
|
509
|
+
uri: "/v1/organizations/{organizationId}/services/{serviceId}/jwtProviders/{jwtProviderName}",
|
|
510
|
+
code: 200,
|
|
511
|
+
}),
|
|
512
|
+
),
|
|
513
|
+
).annotate({ identifier: "UpdateJwtProviderRequest" });
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
function __c3(j: number): any {
|
|
517
|
+
switch (j) {
|
|
518
|
+
case 0:
|
|
519
|
+
return S.suspend(() =>
|
|
520
|
+
S.Struct({
|
|
521
|
+
organizationId: S.String.pipe(T.Label()),
|
|
522
|
+
serviceId: S.String.pipe(T.Label()),
|
|
523
|
+
httpEnabled: S.optional(S.Boolean),
|
|
524
|
+
nativeEnabled: S.optional(S.Boolean),
|
|
525
|
+
}).pipe(
|
|
526
|
+
T.Http({
|
|
527
|
+
method: "PATCH",
|
|
528
|
+
uri: "/v1/organizations/{organizationId}/services/{serviceId}/replicaAwareRouting",
|
|
529
|
+
code: 200,
|
|
530
|
+
}),
|
|
531
|
+
),
|
|
532
|
+
).annotate({ identifier: "UpdateReplicaAwareRoutingRequest" });
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
function __c4(j: number): any {
|
|
536
|
+
switch (j) {
|
|
537
|
+
case 0:
|
|
538
|
+
return S.Record(S.String, __S(104, __c13, 0));
|
|
539
|
+
case 1:
|
|
540
|
+
return S.suspend(() =>
|
|
541
|
+
S.Struct({
|
|
542
|
+
organizationId: S.String.pipe(T.Label()),
|
|
543
|
+
serviceId: S.String.pipe(T.Label()),
|
|
544
|
+
settings: __S(32, __c4, 0),
|
|
545
|
+
}).pipe(
|
|
546
|
+
T.Http({
|
|
547
|
+
method: "PATCH",
|
|
548
|
+
uri: "/v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings",
|
|
549
|
+
code: 200,
|
|
550
|
+
}),
|
|
551
|
+
),
|
|
552
|
+
).annotate({ identifier: "UpdateServiceClickHouseSettingsRequest" });
|
|
553
|
+
case 2:
|
|
554
|
+
return S.suspend(() =>
|
|
555
|
+
S.Struct({
|
|
556
|
+
settings: S.optional(__S(32, __c4, 0)),
|
|
557
|
+
warnings: S.optional(__S(57, __c7, 1)),
|
|
558
|
+
}),
|
|
559
|
+
).annotate({ identifier: "ServiceClickhouseSettingsPatchResponse" });
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
function __c5(j: number): any {
|
|
563
|
+
switch (j) {
|
|
564
|
+
case 0:
|
|
565
|
+
return S.suspend(() =>
|
|
566
|
+
S.Struct({
|
|
567
|
+
organizationId: S.String.pipe(T.Label()),
|
|
568
|
+
serviceId: S.String.pipe(T.Label()),
|
|
569
|
+
jwtProviderName: S.String.pipe(T.Label()),
|
|
570
|
+
}).pipe(
|
|
571
|
+
T.Http({
|
|
572
|
+
method: "DELETE",
|
|
573
|
+
uri: "/v1/organizations/{organizationId}/services/{serviceId}/jwtProviders/{jwtProviderName}",
|
|
574
|
+
code: 200,
|
|
575
|
+
}),
|
|
576
|
+
),
|
|
577
|
+
).annotate({ identifier: "DeleteJwtProviderRequest" });
|
|
578
|
+
case 1:
|
|
579
|
+
return S.suspend(() =>
|
|
580
|
+
S.Struct({
|
|
581
|
+
status: S.optional(S.Number),
|
|
582
|
+
requestId: S.optional(S.String),
|
|
583
|
+
}),
|
|
584
|
+
).annotate({ identifier: "DeleteJwtProviderResponse" });
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
function __c6(j: number): any {
|
|
588
|
+
switch (j) {
|
|
589
|
+
case 0:
|
|
590
|
+
return S.suspend(() =>
|
|
591
|
+
S.Struct({
|
|
592
|
+
organizationId: S.String.pipe(T.Label()),
|
|
593
|
+
serviceId: S.String.pipe(T.Label()),
|
|
594
|
+
settingName: S.String.pipe(T.Label()),
|
|
595
|
+
}).pipe(
|
|
596
|
+
T.Http({
|
|
597
|
+
method: "DELETE",
|
|
598
|
+
uri: "/v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings/{settingName}",
|
|
599
|
+
code: 200,
|
|
600
|
+
}),
|
|
601
|
+
),
|
|
602
|
+
).annotate({ identifier: "DeleteServiceClickHouseSettingRequest" });
|
|
603
|
+
case 1:
|
|
604
|
+
return S.suspend(() =>
|
|
605
|
+
S.Struct({
|
|
606
|
+
warnings: S.optional(__S(57, __c7, 1)),
|
|
607
|
+
}),
|
|
608
|
+
).annotate({ identifier: "ServiceClickhouseSettingDeleteResponse" });
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
function __c7(j: number): any {
|
|
612
|
+
switch (j) {
|
|
613
|
+
case 0:
|
|
614
|
+
return S.suspend(() =>
|
|
615
|
+
S.Struct({
|
|
616
|
+
name: S.optional(S.String),
|
|
617
|
+
message: S.optional(S.String),
|
|
618
|
+
}),
|
|
619
|
+
).annotate({ identifier: "ServiceClickhouseSettingWarning" });
|
|
620
|
+
case 1:
|
|
621
|
+
return S.Array(__S(56, __c7, 0));
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
function __c8(j: number): any {
|
|
625
|
+
switch (j) {
|
|
626
|
+
case 0:
|
|
627
|
+
return S.suspend(() =>
|
|
628
|
+
S.Struct({
|
|
629
|
+
organizationId: S.String.pipe(T.Label()),
|
|
630
|
+
serviceId: S.String.pipe(T.Label()),
|
|
631
|
+
jwtProviderName: S.String.pipe(T.Label()),
|
|
632
|
+
}).pipe(
|
|
633
|
+
T.Http({
|
|
634
|
+
method: "GET",
|
|
635
|
+
uri: "/v1/organizations/{organizationId}/services/{serviceId}/jwtProviders/{jwtProviderName}",
|
|
636
|
+
code: 200,
|
|
637
|
+
}),
|
|
638
|
+
),
|
|
639
|
+
).annotate({ identifier: "GetJwtProviderRequest" });
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
function __c9(j: number): any {
|
|
643
|
+
switch (j) {
|
|
644
|
+
case 0:
|
|
645
|
+
return S.suspend(() =>
|
|
646
|
+
S.Struct({
|
|
647
|
+
organizationId: S.String.pipe(T.Label()),
|
|
648
|
+
serviceId: S.String.pipe(T.Label()),
|
|
649
|
+
}).pipe(
|
|
650
|
+
T.Http({
|
|
651
|
+
method: "GET",
|
|
652
|
+
uri: "/v1/organizations/{organizationId}/services/{serviceId}/replicaAwareRouting",
|
|
653
|
+
code: 200,
|
|
654
|
+
}),
|
|
655
|
+
),
|
|
656
|
+
).annotate({ identifier: "GetReplicaAwareRoutingRequest" });
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
function __c10(j: number): any {
|
|
660
|
+
switch (j) {
|
|
661
|
+
case 0:
|
|
662
|
+
return S.suspend(() =>
|
|
663
|
+
S.Struct({
|
|
664
|
+
httpEnabled: S.Boolean,
|
|
665
|
+
nativeEnabled: S.Boolean,
|
|
666
|
+
}),
|
|
667
|
+
).annotate({ identifier: "ReplicaAwareRouting" });
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
function __c11(j: number): any {
|
|
671
|
+
switch (j) {
|
|
672
|
+
case 0:
|
|
673
|
+
return S.suspend(() =>
|
|
674
|
+
S.Struct({
|
|
675
|
+
organizationId: S.String.pipe(T.Label()),
|
|
676
|
+
serviceId: S.String.pipe(T.Label()),
|
|
677
|
+
settingName: S.String.pipe(T.Label()),
|
|
678
|
+
}).pipe(
|
|
679
|
+
T.Http({
|
|
680
|
+
method: "GET",
|
|
681
|
+
uri: "/v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings/{settingName}",
|
|
682
|
+
code: 200,
|
|
683
|
+
}),
|
|
684
|
+
),
|
|
685
|
+
).annotate({ identifier: "GetServiceClickHouseSettingRequest" });
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
function __c12(j: number): any {
|
|
689
|
+
switch (j) {
|
|
690
|
+
case 0:
|
|
691
|
+
return S.suspend(() =>
|
|
692
|
+
S.Struct({
|
|
693
|
+
name: S.optional(S.String),
|
|
694
|
+
value: S.optional(__S(104, __c13, 0)),
|
|
695
|
+
}),
|
|
696
|
+
).annotate({ identifier: "ServiceClickhouseSetting" });
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
function __c13(j: number): any {
|
|
700
|
+
switch (j) {
|
|
701
|
+
case 0:
|
|
702
|
+
return S.Union([S.String, S.Number]);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
function __c14(j: number): any {
|
|
706
|
+
switch (j) {
|
|
707
|
+
case 0:
|
|
708
|
+
return S.suspend(() =>
|
|
709
|
+
S.Struct({
|
|
710
|
+
organizationId: S.String.pipe(T.Label()),
|
|
711
|
+
serviceId: S.String.pipe(T.Label()),
|
|
712
|
+
}).pipe(
|
|
713
|
+
T.Http({
|
|
714
|
+
method: "GET",
|
|
715
|
+
uri: "/v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings/schema",
|
|
716
|
+
code: 200,
|
|
717
|
+
}),
|
|
718
|
+
),
|
|
719
|
+
).annotate({ identifier: "GetServiceClickHouseSettingsSchemaRequest" });
|
|
720
|
+
case 1:
|
|
721
|
+
return S.Array(S.Number);
|
|
722
|
+
case 2:
|
|
723
|
+
return S.suspend(() =>
|
|
724
|
+
S.Struct({
|
|
725
|
+
name: S.optional(S.String),
|
|
726
|
+
type: S.optional(S.String),
|
|
727
|
+
description: S.optional(S.String),
|
|
728
|
+
enum: S.optional(__S(113, __c14, 1)),
|
|
729
|
+
warning: S.optional(S.String),
|
|
730
|
+
deprecationNotice: S.optional(S.String),
|
|
731
|
+
example: S.optional(S.String),
|
|
732
|
+
}),
|
|
733
|
+
).annotate({ identifier: "ServiceClickhouseSettingSchemaEntry" });
|
|
734
|
+
case 3:
|
|
735
|
+
return S.Array(__S(114, __c14, 2));
|
|
736
|
+
case 4:
|
|
737
|
+
return S.suspend(() =>
|
|
738
|
+
S.Struct({
|
|
739
|
+
settings: S.optional(__S(115, __c14, 3)),
|
|
740
|
+
}),
|
|
741
|
+
).annotate({ identifier: "ServiceClickhouseSettingsSchema" });
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
function __c15(j: number): any {
|
|
745
|
+
switch (j) {
|
|
746
|
+
case 0:
|
|
747
|
+
return S.suspend(() =>
|
|
748
|
+
S.Struct({
|
|
749
|
+
organizationId: S.String.pipe(T.Label()),
|
|
750
|
+
serviceId: S.String.pipe(T.Label()),
|
|
751
|
+
}).pipe(
|
|
752
|
+
T.Http({
|
|
753
|
+
method: "GET",
|
|
754
|
+
uri: "/v1/organizations/{organizationId}/services/{serviceId}/jwtProviders",
|
|
755
|
+
code: 200,
|
|
756
|
+
}),
|
|
757
|
+
),
|
|
758
|
+
).annotate({ identifier: "ListJwtProvidersRequest" });
|
|
759
|
+
case 1:
|
|
760
|
+
return S.Array(__S(8, __c1, 0));
|
|
761
|
+
case 2:
|
|
762
|
+
return S.suspend(() => __S(121, __c15, 1).pipe(T.RawResponseRoot())).annotate({
|
|
763
|
+
identifier: "ListJwtProvidersResponse",
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
function __c16(j: number): any {
|
|
768
|
+
switch (j) {
|
|
769
|
+
case 0:
|
|
770
|
+
return S.suspend(() =>
|
|
771
|
+
S.Struct({
|
|
772
|
+
organizationId: S.String.pipe(T.Label()),
|
|
773
|
+
serviceId: S.String.pipe(T.Label()),
|
|
774
|
+
}).pipe(
|
|
775
|
+
T.Http({
|
|
776
|
+
method: "GET",
|
|
777
|
+
uri: "/v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings",
|
|
778
|
+
code: 200,
|
|
779
|
+
}),
|
|
780
|
+
),
|
|
781
|
+
).annotate({ identifier: "ListServiceClickHouseSettingsRequest" });
|
|
782
|
+
case 1:
|
|
783
|
+
return S.Array(__S(96, __c12, 0));
|
|
784
|
+
case 2:
|
|
785
|
+
return S.suspend(() =>
|
|
786
|
+
S.Struct({
|
|
787
|
+
settings: S.optional(__S(129, __c16, 1)),
|
|
788
|
+
}),
|
|
789
|
+
).annotate({ identifier: "ServiceClickhouseSettingsList" });
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
793
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
794
|
+
return (__s[i] ??= __L.at(f, j));
|
|
795
|
+
}
|