@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,244 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
3
|
+
import { type ClickHouseCloudOpError, type ClickHouseCloudOpContext } from "../protocol.ts";
|
|
4
|
+
export type { ClickHouseCloudOpError, ClickHouseCloudOpContext };
|
|
5
|
+
declare const FeatureUnavailable_base: S.TaggedErrorClass<"FeatureUnavailable", {
|
|
6
|
+
readonly message: any;
|
|
7
|
+
readonly body: any;
|
|
8
|
+
readonly headers: any;
|
|
9
|
+
}> & (new (...args: any[]) => {
|
|
10
|
+
"@distilled.cloud/error/categories": {
|
|
11
|
+
AuthError: true;
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
/** 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. */
|
|
15
|
+
export declare class FeatureUnavailable extends /*@__PURE__*/ FeatureUnavailable_base {
|
|
16
|
+
}
|
|
17
|
+
export interface CreateJwtProviderRequest {
|
|
18
|
+
/** ID of the organization that owns the service. */
|
|
19
|
+
organizationId: string;
|
|
20
|
+
/** ID of the service. */
|
|
21
|
+
serviceId: string;
|
|
22
|
+
/** 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`. */
|
|
23
|
+
name: string;
|
|
24
|
+
/** Expected `iss` claim of the tokens. Printable ASCII without whitespace, at most 256 characters. */
|
|
25
|
+
issuer: string;
|
|
26
|
+
/** Expected `aud` claim of the tokens. Printable ASCII without whitespace, at most 256 characters. */
|
|
27
|
+
audience: string;
|
|
28
|
+
/** 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. */
|
|
29
|
+
jwksUrl: string;
|
|
30
|
+
/** 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. */
|
|
31
|
+
rolesClaim?: string | undefined;
|
|
32
|
+
}
|
|
33
|
+
export interface JwtProvider {
|
|
34
|
+
/** 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`. */
|
|
35
|
+
name: string;
|
|
36
|
+
/** Expected `iss` claim of the tokens. Printable ASCII without whitespace, at most 256 characters. */
|
|
37
|
+
issuer: string;
|
|
38
|
+
/** Expected `aud` claim of the tokens. Printable ASCII without whitespace, at most 256 characters. */
|
|
39
|
+
audience: string;
|
|
40
|
+
/** 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. */
|
|
41
|
+
jwksUrl: string;
|
|
42
|
+
/** 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. */
|
|
43
|
+
rolesClaim?: string | undefined;
|
|
44
|
+
}
|
|
45
|
+
export interface DeleteJwtProviderRequest {
|
|
46
|
+
/** ID of the organization that owns the service. */
|
|
47
|
+
organizationId: string;
|
|
48
|
+
/** ID of the service. */
|
|
49
|
+
serviceId: string;
|
|
50
|
+
/** Name of the JWT authentication provider. */
|
|
51
|
+
jwtProviderName: string;
|
|
52
|
+
}
|
|
53
|
+
export interface DeleteJwtProviderResponse {
|
|
54
|
+
/** HTTP status code. */
|
|
55
|
+
status?: number | undefined;
|
|
56
|
+
/** Unique id assigned to every request. UUIDv4 */
|
|
57
|
+
requestId?: string | undefined;
|
|
58
|
+
}
|
|
59
|
+
export interface DeleteServiceClickHouseSettingRequest {
|
|
60
|
+
/** ID of the organization that owns the service. */
|
|
61
|
+
organizationId: string;
|
|
62
|
+
/** ID of the service. */
|
|
63
|
+
serviceId: string;
|
|
64
|
+
/** Name of the setting to reset. */
|
|
65
|
+
settingName: string;
|
|
66
|
+
}
|
|
67
|
+
export interface ServiceClickhouseSettingWarning {
|
|
68
|
+
/** Name of the setting the warning applies to. */
|
|
69
|
+
name?: string | undefined;
|
|
70
|
+
/** Warning message. */
|
|
71
|
+
message?: string | undefined;
|
|
72
|
+
}
|
|
73
|
+
/** Warnings about how the reset takes effect, such as a ClickHouse server rollout restart. Omitted when the setting was not configured. */
|
|
74
|
+
export type ServiceClickhouseSettingDeleteResponseWarningsList = Array<ServiceClickhouseSettingWarning>;
|
|
75
|
+
export interface ServiceClickhouseSettingDeleteResponse {
|
|
76
|
+
/** Warnings about how the reset takes effect, such as a ClickHouse server rollout restart. Omitted when the setting was not configured. */
|
|
77
|
+
warnings?: ServiceClickhouseSettingDeleteResponseWarningsList | undefined;
|
|
78
|
+
}
|
|
79
|
+
export interface GetJwtProviderRequest {
|
|
80
|
+
/** ID of the organization that owns the service. */
|
|
81
|
+
organizationId: string;
|
|
82
|
+
/** ID of the service. */
|
|
83
|
+
serviceId: string;
|
|
84
|
+
/** Name of the JWT authentication provider. */
|
|
85
|
+
jwtProviderName: string;
|
|
86
|
+
}
|
|
87
|
+
export interface GetReplicaAwareRoutingRequest {
|
|
88
|
+
/** ID of the organization that owns the service. */
|
|
89
|
+
organizationId: string;
|
|
90
|
+
/** ID of the service. */
|
|
91
|
+
serviceId: string;
|
|
92
|
+
}
|
|
93
|
+
export interface ReplicaAwareRouting {
|
|
94
|
+
/** 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. */
|
|
95
|
+
httpEnabled: boolean;
|
|
96
|
+
/** Whether replica aware routing is enabled for native protocol connections. */
|
|
97
|
+
nativeEnabled: boolean;
|
|
98
|
+
}
|
|
99
|
+
export interface GetServiceClickHouseSettingRequest {
|
|
100
|
+
/** ID of the organization that owns the service. */
|
|
101
|
+
organizationId: string;
|
|
102
|
+
/** ID of the service. */
|
|
103
|
+
serviceId: string;
|
|
104
|
+
/** Name of the setting to retrieve. */
|
|
105
|
+
settingName: string;
|
|
106
|
+
}
|
|
107
|
+
/** Setting value in its native JSON type. Use the settings schema endpoint for per-setting constraints. */
|
|
108
|
+
export type ServiceClickhouseSettingValue = string | number;
|
|
109
|
+
export interface ServiceClickhouseSetting {
|
|
110
|
+
/** Name of the setting. */
|
|
111
|
+
name?: string | undefined;
|
|
112
|
+
value?: ServiceClickhouseSettingValue | undefined;
|
|
113
|
+
}
|
|
114
|
+
export interface GetServiceClickHouseSettingsSchemaRequest {
|
|
115
|
+
/** ID of the organization that owns the service. */
|
|
116
|
+
organizationId: string;
|
|
117
|
+
/** ID of the service. */
|
|
118
|
+
serviceId: string;
|
|
119
|
+
}
|
|
120
|
+
/** List of allowed values, if the setting is an enum. */
|
|
121
|
+
export type ServiceClickhouseSettingSchemaEntryEnumList = Array<number>;
|
|
122
|
+
export interface ServiceClickhouseSettingSchemaEntry {
|
|
123
|
+
/** Name of the setting. */
|
|
124
|
+
name?: string | undefined;
|
|
125
|
+
/** Data type of the setting value. */
|
|
126
|
+
type?: string | undefined;
|
|
127
|
+
/** Description of the setting. */
|
|
128
|
+
description?: string | undefined;
|
|
129
|
+
/** List of allowed values, if the setting is an enum. */
|
|
130
|
+
enum?: ServiceClickhouseSettingSchemaEntryEnumList | undefined;
|
|
131
|
+
/** Warning message about potential disruptive effects of changing or resetting this setting. */
|
|
132
|
+
warning?: string | undefined;
|
|
133
|
+
/** Deprecation notice, if applicable. */
|
|
134
|
+
deprecationNotice?: string | undefined;
|
|
135
|
+
/** Example value for the setting. */
|
|
136
|
+
example?: string | undefined;
|
|
137
|
+
}
|
|
138
|
+
/** List of all configurable ClickHouse settings with their types, descriptions, and constraints. */
|
|
139
|
+
export type ServiceClickhouseSettingsSchemaSettingsList = Array<ServiceClickhouseSettingSchemaEntry>;
|
|
140
|
+
export interface ServiceClickhouseSettingsSchema {
|
|
141
|
+
/** List of all configurable ClickHouse settings with their types, descriptions, and constraints. */
|
|
142
|
+
settings?: ServiceClickhouseSettingsSchemaSettingsList | undefined;
|
|
143
|
+
}
|
|
144
|
+
export interface ListJwtProvidersRequest {
|
|
145
|
+
/** ID of the organization that owns the service. */
|
|
146
|
+
organizationId: string;
|
|
147
|
+
/** ID of the service. */
|
|
148
|
+
serviceId: string;
|
|
149
|
+
}
|
|
150
|
+
export type ListJwtProvidersResponseBodyList = Array<JwtProvider>;
|
|
151
|
+
export type ListJwtProvidersResponse = ListJwtProvidersResponseBodyList;
|
|
152
|
+
export interface ListServiceClickHouseSettingsRequest {
|
|
153
|
+
/** ID of the organization that owns the service. */
|
|
154
|
+
organizationId: string;
|
|
155
|
+
/** ID of the service. */
|
|
156
|
+
serviceId: string;
|
|
157
|
+
}
|
|
158
|
+
/** List of ClickHouse settings with their current values. */
|
|
159
|
+
export type ServiceClickhouseSettingsListSettingsList = Array<ServiceClickhouseSetting>;
|
|
160
|
+
export interface ServiceClickhouseSettingsList {
|
|
161
|
+
/** List of ClickHouse settings with their current values. */
|
|
162
|
+
settings?: ServiceClickhouseSettingsListSettingsList | undefined;
|
|
163
|
+
}
|
|
164
|
+
export interface UpdateJwtProviderRequest {
|
|
165
|
+
/** ID of the organization that owns the service. */
|
|
166
|
+
organizationId: string;
|
|
167
|
+
/** ID of the service. */
|
|
168
|
+
serviceId: string;
|
|
169
|
+
/** Name of the JWT authentication provider. */
|
|
170
|
+
jwtProviderName: string;
|
|
171
|
+
/** Expected `iss` claim of the tokens. Printable ASCII without whitespace, at most 256 characters. */
|
|
172
|
+
issuer: string;
|
|
173
|
+
/** Expected `aud` claim of the tokens. Printable ASCII without whitespace, at most 256 characters. */
|
|
174
|
+
audience: string;
|
|
175
|
+
/** 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. */
|
|
176
|
+
jwksUrl: string;
|
|
177
|
+
/** 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. */
|
|
178
|
+
rolesClaim?: string | undefined;
|
|
179
|
+
}
|
|
180
|
+
export interface UpdateReplicaAwareRoutingRequest {
|
|
181
|
+
/** ID of the organization that owns the service. */
|
|
182
|
+
organizationId: string;
|
|
183
|
+
/** ID of the service. */
|
|
184
|
+
serviceId: string;
|
|
185
|
+
/** Whether replica aware routing is enabled for HTTP connections. Omit to leave unchanged. */
|
|
186
|
+
httpEnabled?: boolean | undefined;
|
|
187
|
+
/** Whether replica aware routing is enabled for native protocol connections. Omit to leave unchanged. */
|
|
188
|
+
nativeEnabled?: boolean | undefined;
|
|
189
|
+
}
|
|
190
|
+
/** Nonempty object mapping configurable setting names to their values. Use DELETE to reset a setting. */
|
|
191
|
+
export type ServiceClickhouseSettingsMap = {
|
|
192
|
+
[key: string]: ServiceClickhouseSettingValue | undefined;
|
|
193
|
+
};
|
|
194
|
+
export interface UpdateServiceClickHouseSettingsRequest {
|
|
195
|
+
/** ID of the organization that owns the service. */
|
|
196
|
+
organizationId: string;
|
|
197
|
+
/** ID of the service. */
|
|
198
|
+
serviceId: string;
|
|
199
|
+
settings: ServiceClickhouseSettingsMap;
|
|
200
|
+
}
|
|
201
|
+
/** Warnings for settings that may have disruptive effects. */
|
|
202
|
+
export type ServiceClickhouseSettingsPatchResponseWarningsList = Array<ServiceClickhouseSettingWarning>;
|
|
203
|
+
export interface ServiceClickhouseSettingsPatchResponse {
|
|
204
|
+
settings?: ServiceClickhouseSettingsMap | undefined;
|
|
205
|
+
/** Warnings for settings that may have disruptive effects. */
|
|
206
|
+
warnings?: ServiceClickhouseSettingsPatchResponseWarningsList | undefined;
|
|
207
|
+
}
|
|
208
|
+
export type CreateJwtProviderError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
209
|
+
/** 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. */
|
|
210
|
+
export declare const createJwtProvider: API.OperationMethod<CreateJwtProviderRequest, JwtProvider, CreateJwtProviderError, ClickHouseCloudOpContext>;
|
|
211
|
+
export type DeleteJwtProviderError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
212
|
+
/** 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. */
|
|
213
|
+
export declare const deleteJwtProvider: API.OperationMethod<DeleteJwtProviderRequest, DeleteJwtProviderResponse, DeleteJwtProviderError, ClickHouseCloudOpContext>;
|
|
214
|
+
export type DeleteServiceClickHouseSettingError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
215
|
+
/** 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. */
|
|
216
|
+
export declare const deleteServiceClickHouseSetting: API.OperationMethod<DeleteServiceClickHouseSettingRequest, ServiceClickhouseSettingDeleteResponse, DeleteServiceClickHouseSettingError, ClickHouseCloudOpContext>;
|
|
217
|
+
export type GetJwtProviderError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
218
|
+
/** 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. */
|
|
219
|
+
export declare const getJwtProvider: API.OperationMethod<GetJwtProviderRequest, JwtProvider, GetJwtProviderError, ClickHouseCloudOpContext>;
|
|
220
|
+
export type GetReplicaAwareRoutingError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
221
|
+
/** 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. */
|
|
222
|
+
export declare const getReplicaAwareRouting: API.OperationMethod<GetReplicaAwareRoutingRequest, ReplicaAwareRouting, GetReplicaAwareRoutingError, ClickHouseCloudOpContext>;
|
|
223
|
+
export type GetServiceClickHouseSettingError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
224
|
+
/** 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. */
|
|
225
|
+
export declare const getServiceClickHouseSetting: API.OperationMethod<GetServiceClickHouseSettingRequest, ServiceClickhouseSetting, GetServiceClickHouseSettingError, ClickHouseCloudOpContext>;
|
|
226
|
+
export type GetServiceClickHouseSettingsSchemaError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
227
|
+
/** 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. */
|
|
228
|
+
export declare const getServiceClickHouseSettingsSchema: API.OperationMethod<GetServiceClickHouseSettingsSchemaRequest, ServiceClickhouseSettingsSchema, GetServiceClickHouseSettingsSchemaError, ClickHouseCloudOpContext>;
|
|
229
|
+
export type ListJwtProvidersError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
230
|
+
/** 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. */
|
|
231
|
+
export declare const listJwtProviders: API.OperationMethod<ListJwtProvidersRequest, ListJwtProvidersResponse, ListJwtProvidersError, ClickHouseCloudOpContext>;
|
|
232
|
+
export type ListServiceClickHouseSettingsError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
233
|
+
/** 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. */
|
|
234
|
+
export declare const listServiceClickHouseSettings: API.OperationMethod<ListServiceClickHouseSettingsRequest, ServiceClickhouseSettingsList, ListServiceClickHouseSettingsError, ClickHouseCloudOpContext>;
|
|
235
|
+
export type UpdateJwtProviderError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
236
|
+
/** 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. */
|
|
237
|
+
export declare const updateJwtProvider: API.OperationMethod<UpdateJwtProviderRequest, JwtProvider, UpdateJwtProviderError, ClickHouseCloudOpContext>;
|
|
238
|
+
export type UpdateReplicaAwareRoutingError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
239
|
+
/** 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. */
|
|
240
|
+
export declare const updateReplicaAwareRouting: API.OperationMethod<UpdateReplicaAwareRoutingRequest, ReplicaAwareRouting, UpdateReplicaAwareRoutingError, ClickHouseCloudOpContext>;
|
|
241
|
+
export type UpdateServiceClickHouseSettingsError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
242
|
+
/** 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. */
|
|
243
|
+
export declare const updateServiceClickHouseSettings: API.OperationMethod<UpdateServiceClickHouseSettingsRequest, ServiceClickhouseSettingsPatchResponse, UpdateServiceClickHouseSettingsError, ClickHouseCloudOpContext>;
|
|
244
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sources":["../../src/unstable-services/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAGjD,OAAO,KAAK,CAAC,MAAM,mCAAmC,CAAC;AAGvD,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC9B,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,CAAC;;;;;;;;;;AAejE,uLAAuL;AACvL,qBAAa,kBACX,SAAQ,aAAa,CAAC,uBAWrB;CAAG;AAEN,MAAM,WAAW,wBAAwB;IACvC,oDAAoD;IACpD,cAAc,EAAE,MAAM,CAAC;IACvB,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,oPAAoP;IACpP,IAAI,EAAE,MAAM,CAAC;IACb,sGAAsG;IACtG,MAAM,EAAE,MAAM,CAAC;IACf,sGAAsG;IACtG,QAAQ,EAAE,MAAM,CAAC;IACjB,6TAA6T;IAC7T,OAAO,EAAE,MAAM,CAAC;IAChB,iQAAiQ;IACjQ,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AACD,MAAM,WAAW,WAAW;IAC1B,oPAAoP;IACpP,IAAI,EAAE,MAAM,CAAC;IACb,sGAAsG;IACtG,MAAM,EAAE,MAAM,CAAC;IACf,sGAAsG;IACtG,QAAQ,EAAE,MAAM,CAAC;IACjB,6TAA6T;IAC7T,OAAO,EAAE,MAAM,CAAC;IAChB,yQAAyQ;IACzQ,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AACD,MAAM,WAAW,wBAAwB;IACvC,oDAAoD;IACpD,cAAc,EAAE,MAAM,CAAC;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MAAM,yBAAyB,EAAE,GAAG,CAAC,eAAe,CACzD,gCAAgC,EAChC,mBAAmB,EACnB,8BAA8B,EAC9B,wBAAwB,CAUvB,CAAC;AAEJ,MAAM,MAAM,oCAAoC,GAAG,kBAAkB,GAAG,sBAAsB,CAAC;AAC/F,mcAAmc;AACnc,eAAO,MAAM,+BAA+B,EAAE,GAAG,CAAC,eAAe,CAC/D,sCAAsC,EACtC,sCAAsC,EACtC,oCAAoC,EACpC,wBAAwB,CAUvB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Gc as e,Hc as t,Jc as n,Kc as r,Mc as i,Oc as a,Pc as o,Rc as s,Wc as c,Xc as l,a as u,b as d,errors$ClickHouseCloudServiceErrors as f,f as p,l as m,m as h,n as g,protocol$ClickHouseCloudProtocol as _,retry$Retry as v,traits$Http as y,traits$Label as b,traits$RawResponseRoot as x,traits$applyErrorMatchers as S,wc as C,xc as w,ya as T}from"../_bundle/sdk.js";const E={system:`clickhouse-cloud-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`ClickhouseCloud`,service:`Services`,labels:`clickhouse_cloud`,propagate:`w3c`};const D=/*@__PURE__*/ p(function FeatureUnavailable(e){return h(e,new.target,[`$7($6()("FeatureUnavailable",{message:$2,body:$4($3),headers:$4($5($2,$2))}).pipe($1),[{status:403,message:{includes:"pricing package"}},{status:403,message:{includes:"is not enabled for this organization"}},{status:403,message:{includes:"early access API endpoint"}}])`,[s,T,n,o,c,t,i,S]])});const O=/*@__PURE__*/ g(e=>e===u?m(`CreateJwtProvider`,`{input:#1,output:#7:0,errors:[$8],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$6(>2)@"%Request";$5({organizationId:$3.pipe($2()),serviceId:$3.pipe($2()),name:$3,issuer:$3,audience:$3,jwksUrl:$3,rolesClaim:$4($3)}).pipe($1({method:"POST",uri:"/v1/organizations/{organizationId}/services/{serviceId}/jwtProviders",code:200}))`,[s,y,b,n,c,r,l,__d0,D,f,_,v,E]):d(O,e));const k=/*@__PURE__*/ g(t=>t===u?m(`DeleteJwtProvider`,`{input:#1,output:#2,errors:[$8],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({organizationId:$3.pipe($2()),serviceId:$3.pipe($2()),jwtProviderName:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v1/organizations/{organizationId}/services/{serviceId}/jwtProviders/{jwtProviderName}",code:200}));$4({status:$7($6),requestId:$7($3)})`,[s,y,b,n,r,l,e,c,D,f,_,v,E]):d(k,t));const A=/*@__PURE__*/ g(e=>e===u?m(`DeleteServiceClickHouseSetting`,`{input:#1,output:#2,errors:[$8],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$5(>3)@"%Request";$5(>4)@"ServiceClickhouseSettingDeleteResponse";$4({organizationId:$3.pipe($2()),serviceId:$3.pipe($2()),settingName:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings/{settingName}",code:200}));$4({warnings:$7(#6:1)})`,[s,y,b,n,r,l,__d1,c,D,f,_,v,E]):d(A,e));const j=/*@__PURE__*/ g(e=>e===u?m(`GetJwtProvider`,`{input:#1,output:#6:0,errors:[$7],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$5(>2)@"%Request";$4({organizationId:$3.pipe($2()),serviceId:$3.pipe($2()),jwtProviderName:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/services/{serviceId}/jwtProviders/{jwtProviderName}",code:200}))`,[s,y,b,n,r,l,__d0,D,f,_,v,E]):d(j,e));const M=/*@__PURE__*/ g(e=>e===u?m(`GetReplicaAwareRouting`,`{input:#1,output:#6:0,errors:[$7],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$5(>2)@"%Request";$4({organizationId:$3.pipe($2()),serviceId:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/services/{serviceId}/replicaAwareRouting",code:200}))`,[s,y,b,n,r,l,__d2,D,f,_,v,E]):d(M,e));const N=/*@__PURE__*/ g(e=>e===u?m(`GetServiceClickHouseSetting`,`{input:#1,output:#6:0,errors:[$7],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$5(>2)@"%Request";$4({organizationId:$3.pipe($2()),serviceId:$3.pipe($2()),settingName:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings/{settingName}",code:200}))`,[s,y,b,n,r,l,__d3,D,f,_,v,E]):d(N,e));const P=/*@__PURE__*/ g(t=>t===u?m(`GetServiceClickHouseSettingsSchema`,`{input:#1,output:#5,errors:[$9],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$5(>6)@"%Request";$7($6);$5(>7)@"ServiceClickhouseSettingSchemaEntry";$7(#3);$5(>8)@"ServiceClickhouseSettingsSchema";$4({organizationId:$3.pipe($2()),serviceId:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings/schema",code:200}));$4({name:$8($3),type:$8($3),description:$8($3),enum:$8(#2),warning:$8($3),deprecationNotice:$8($3),example:$8($3)});$4({settings:$8(#4)})`,[s,y,b,n,r,l,e,C,c,D,f,_,v,E]):d(P,t));const F=/*@__PURE__*/ g(e=>e===u?m(`ListJwtProviders`,`{input:#1,output:#3,errors:[$9],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$5(>4)@"%Request";$7(#6:0);$5(>5)@"%Response";$4({organizationId:$3.pipe($2()),serviceId:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/services/{serviceId}/jwtProviders",code:200}));#2.pipe($8())`,[s,y,b,n,r,l,__d0,C,x,D,f,_,v,E]):d(F,e));const I=/*@__PURE__*/ g(e=>e===u?m(`ListServiceClickHouseSettings`,`{input:#1,output:#3,errors:[$9],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$5(>4)@"%Request";$7(#6:0);$5(>5)@"ServiceClickhouseSettingsList";$4({organizationId:$3.pipe($2()),serviceId:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings",code:200}));$4({settings:$8(#2)})`,[s,y,b,n,r,l,__d3,C,c,D,f,_,v,E]):d(I,e));const L=/*@__PURE__*/ g(e=>e===u?m(`UpdateJwtProvider`,`{input:#1,output:#7:0,errors:[$8],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$6(>2)@"%Request";$5({organizationId:$3.pipe($2()),serviceId:$3.pipe($2()),jwtProviderName:$3.pipe($2()),issuer:$3,audience:$3,jwksUrl:$3,rolesClaim:$4($3)}).pipe($1({method:"PUT",uri:"/v1/organizations/{organizationId}/services/{serviceId}/jwtProviders/{jwtProviderName}",code:200}))`,[s,y,b,n,c,r,l,__d0,D,f,_,v,E]):d(L,e));const R=/*@__PURE__*/ g(e=>e===u?m(`UpdateReplicaAwareRouting`,`{input:#1,output:#8:0,errors:[$9],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$7(>2)@"%Request";$6({organizationId:$3.pipe($2()),serviceId:$3.pipe($2()),httpEnabled:$5($4),nativeEnabled:$5($4)}).pipe($1({method:"PATCH",uri:"/v1/organizations/{organizationId}/services/{serviceId}/replicaAwareRouting",code:200}))`,[s,y,b,n,w,c,r,l,__d2,D,f,_,v,E]):d(R,e));const z=/*@__PURE__*/ g(e=>e===u?m(`UpdateServiceClickHouseSettings`,`{input:#2,output:#3,errors:[$10],serviceErrors:$11,protocol:$12,retry:$13,telemetry:$14,span:"%"};$3($1,#2:0);$7(>4)@"%Request";$7(>5)@"ServiceClickhouseSettingsPatchResponse";$6({organizationId:$1.pipe($5()),serviceId:$1.pipe($5()),settings:#1}).pipe($4({method:"PATCH",uri:"/v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings",code:200}));$6({settings:$8(#1),warnings:$8(#9:1)})`,[s,n,__d4,t,y,b,r,l,c,__d1,D,f,_,v,E]):d(z,e));function __d0(){return[`$4(>1)@"JwtProvider";$3({name:$1,issuer:$1,audience:$1,jwksUrl:$1,rolesClaim:$2($1)})`,[s,n,c,r,l]]}function __d1(){return[`$4(>2)@"ServiceClickhouseSettingWarning";$5(#0);$3({name:$2($1),message:$2($1)})`,[s,n,c,r,l,C]]}function __d2(){return[`$3(>1)@"ReplicaAwareRouting";$2({httpEnabled:$1,nativeEnabled:$1})`,[s,w,r,l]]}function __d3(){return[`$5(>1)@"ServiceClickhouseSetting";$4({name:$2($1),value:$2(#3:0)})`,[s,n,c,__d4,r,l]]}function __d4(){return[`$3([$1,$2])`,[s,n,e,a]]}export{D as FeatureUnavailable,O as createJwtProvider,k as deleteJwtProvider,A as deleteServiceClickHouseSetting,j as getJwtProvider,M as getReplicaAwareRouting,N as getServiceClickHouseSetting,P as getServiceClickHouseSettingsSchema,F as listJwtProviders,I as listServiceClickHouseSettings,L as updateJwtProvider,R as updateReplicaAwareRouting,z as updateServiceClickHouseSettings};
|
|
2
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","names":["API.newError","__L.at","C.withAuthError","S.String","S.Unknown","S.optional","S.Record","S.TaggedError","T.applyErrorMatchers","API.D","API.named","T.Http","T.Label","S.Struct","S.suspend","Retry.Retry","API.call","S.Number","S.Array","T.RawResponseRoot","S.Boolean","S.Union","Number","Record","String","Struct","TaggedError","Union","Unknown","at","optional","suspend","D","call","ClickHouseCloudServiceErrors","error","named","newError","op","ClickHouseCloudProtocol","Retry","Http","Label","RawResponseRoot","applyErrorMatchers","Array","Boolean","withAuthError","TELEMETRY","FeatureUnavailable","i","createJwtProvider","deleteJwtProvider","deleteServiceClickHouseSetting","getJwtProvider","getReplicaAwareRouting","getServiceClickHouseSetting","getServiceClickHouseSettingsSchema","listJwtProviders","listServiceClickHouseSettings","updateJwtProvider","updateReplicaAwareRouting","updateServiceClickHouseSettings"],"sources":["../../src/unstable-services/service.ts"],"mappings":"+WAiBA,MAAMgD,EAAY,CAChB,OAAQ,uBACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,kBACR,QAAS,WACT,OAAQ,mBACR,UAAW,KACb,EAGA,MAAaC,EAAwC,gBAAU,SAAS,mBAAmB,EAAa,CACtG,OAAOjD,EAAakD,EAAG,WAAY,CAAC,gRAAiR,CAACjD,EAAQC,EAAiBC,EAAUC,EAAWC,EAAYC,EAAUC,EAAeC,CAAoB,CAAC,CAAC,CACja,CAAC,EAsMD,MAAa2C,EAKK,gBAAQ,GAAgBD,IAAMzC,EAAQC,EAAU,oBAAqB,0VAA2V,CAACT,EAAQU,EAAQC,EAAST,EAAUE,EAAYQ,EAAUC,EAAW,KAAMmC,EAAoBf,EAA8BK,EAAyBxB,EAAaiC,CAAS,CAAC,EAAIhC,EAASmC,EAAmBD,CAAC,CAAC,EAIjoB,MAAaE,EAKK,gBAAQ,GAAgBF,IAAMzC,EAAQC,EAAU,oBAAqB,uYAAwY,CAACT,EAAQU,EAAQC,EAAST,EAAUU,EAAUC,EAAWG,EAAUZ,EAAY4C,EAAoBf,EAA8BK,EAAyBxB,EAAaiC,CAAS,CAAC,EAAIhC,EAASoC,EAAmBF,CAAC,CAAC,EAIlrB,MAAaG,EAKK,gBAAQ,GAAgBH,IAAMzC,EAAQC,EAAU,iCAAkC,qZAAsZ,CAACT,EAAQU,EAAQC,EAAST,EAAUU,EAAUC,EAAW,KAAMT,EAAY4C,EAAoBf,EAA8BK,EAAyBxB,EAAaiC,CAAS,CAAC,EAAIhC,EAASqC,EAAgCH,CAAC,CAAC,E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MAAO,CAAC,cAAe,CAACb,EAAQE,EAAUc,EAAUI,CAAO,CAAC,CAC9D"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
3
|
+
import { type ClickHouseCloudOpError, type ClickHouseCloudOpContext } from "../protocol.ts";
|
|
4
|
+
export type { ClickHouseCloudOpError, ClickHouseCloudOpContext };
|
|
5
|
+
declare const FeatureUnavailable_base: S.TaggedErrorClass<"FeatureUnavailable", {
|
|
6
|
+
readonly message: any;
|
|
7
|
+
readonly body: any;
|
|
8
|
+
readonly headers: any;
|
|
9
|
+
}> & (new (...args: any[]) => {
|
|
10
|
+
"@distilled.cloud/error/categories": {
|
|
11
|
+
AuthError: true;
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
/** 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. */
|
|
15
|
+
export declare class FeatureUnavailable extends /*@__PURE__*/ FeatureUnavailable_base {
|
|
16
|
+
}
|
|
17
|
+
export interface GetSnapshotRequest {
|
|
18
|
+
/** ID of the organization that owns the snapshot. */
|
|
19
|
+
organizationId: string;
|
|
20
|
+
/** ID of the service the snapshot was created from. */
|
|
21
|
+
serviceId: string;
|
|
22
|
+
/** ID of the requested snapshot. */
|
|
23
|
+
snapshotId: string;
|
|
24
|
+
}
|
|
25
|
+
/** Status of the snapshot: 'done', 'error', 'in_progress', 'throttled'. 'throttled' means snapshot creation was rate-limited and will be retried. */
|
|
26
|
+
export type SnapshotStatus = "done" | "error" | "in_progress" | "throttled";
|
|
27
|
+
/** Snapshot type. Always "full" -- snapshots never chain off a parent. */
|
|
28
|
+
export type SnapshotType = "full";
|
|
29
|
+
/** Bucket provider */
|
|
30
|
+
export type AwsBackupBucketPropertiesBucketProvider = "AWS";
|
|
31
|
+
export interface AwsBackupBucketProperties {
|
|
32
|
+
/** Bucket provider */
|
|
33
|
+
bucketProvider?: AwsBackupBucketPropertiesBucketProvider | undefined;
|
|
34
|
+
/** Bucket path */
|
|
35
|
+
bucketPath?: string | undefined;
|
|
36
|
+
/** AWS IAM Role */
|
|
37
|
+
iamRoleArn?: string | undefined;
|
|
38
|
+
/** AWS IAM Role */
|
|
39
|
+
iamRoleSessionName?: string | undefined;
|
|
40
|
+
/** External ID the IAM role trust policy requires when the data plane assumes the role */
|
|
41
|
+
iamRoleExternalId?: string | undefined;
|
|
42
|
+
}
|
|
43
|
+
/** Bucket provider */
|
|
44
|
+
export type GcpBackupBucketPropertiesBucketProvider = "GCP";
|
|
45
|
+
export interface GcpBackupBucketProperties {
|
|
46
|
+
/** Bucket provider */
|
|
47
|
+
bucketProvider?: GcpBackupBucketPropertiesBucketProvider | undefined;
|
|
48
|
+
/** Bucket path */
|
|
49
|
+
bucketPath?: string | undefined;
|
|
50
|
+
/** Access Key ID (HMAC key) */
|
|
51
|
+
accessKeyId?: string | undefined;
|
|
52
|
+
}
|
|
53
|
+
/** Bucket provider */
|
|
54
|
+
export type AzureBackupBucketPropertiesBucketProvider = "AZURE";
|
|
55
|
+
export interface AzureBackupBucketProperties {
|
|
56
|
+
/** Bucket provider */
|
|
57
|
+
bucketProvider?: AzureBackupBucketPropertiesBucketProvider | undefined;
|
|
58
|
+
/** Container Name */
|
|
59
|
+
containerName?: string | undefined;
|
|
60
|
+
}
|
|
61
|
+
export type BackupBucketProperties = AwsBackupBucketProperties | GcpBackupBucketProperties | AzureBackupBucketProperties;
|
|
62
|
+
export interface Snapshot {
|
|
63
|
+
/** Unique snapshot ID. */
|
|
64
|
+
id?: string | undefined;
|
|
65
|
+
/** Status of the snapshot: 'done', 'error', 'in_progress', 'throttled'. 'throttled' means snapshot creation was rate-limited and will be retried. */
|
|
66
|
+
status?: SnapshotStatus | undefined;
|
|
67
|
+
/** ID of the service the snapshot was created from. */
|
|
68
|
+
serviceId?: string | undefined;
|
|
69
|
+
/** Snapshot start timestamp. ISO-8601. */
|
|
70
|
+
startedAt?: string | undefined;
|
|
71
|
+
/** Snapshot finish timestamp. ISO-8601. Available only for finished snapshots */
|
|
72
|
+
finishedAt?: string | undefined;
|
|
73
|
+
/** Size of the snapshot in bytes. */
|
|
74
|
+
sizeInBytes?: number | undefined;
|
|
75
|
+
/** Time in seconds it took to perform the snapshot. If the status is in_progress or throttled, this is the time in seconds since the snapshot started until now. */
|
|
76
|
+
durationInSeconds?: number | undefined;
|
|
77
|
+
/** Snapshot type. Always "full" -- snapshots never chain off a parent. */
|
|
78
|
+
type?: SnapshotType | undefined;
|
|
79
|
+
/** Snapshot name on the external backup bucket. */
|
|
80
|
+
backupName?: string | undefined;
|
|
81
|
+
/** Backup bucket where the snapshot is stored. */
|
|
82
|
+
bucket?: BackupBucketProperties | undefined;
|
|
83
|
+
}
|
|
84
|
+
export interface GetSnapshotConfigurationRequest {
|
|
85
|
+
/** ID of the organization that owns the service. */
|
|
86
|
+
organizationId: string;
|
|
87
|
+
/** ID of the service. */
|
|
88
|
+
serviceId: string;
|
|
89
|
+
}
|
|
90
|
+
export interface SnapshotConfiguration {
|
|
91
|
+
/** Whether scheduled snapshots are enabled for the service. */
|
|
92
|
+
enabled?: boolean | undefined;
|
|
93
|
+
/** Interval between snapshots, in minutes. One of 10, 20, 30, 60. Validated when an enabled configuration is saved; stored values are not re-validated on read. */
|
|
94
|
+
gap?: number | undefined;
|
|
95
|
+
/** Retention window the snapshots cover, in minutes. A whole number of days (a multiple of 1440), at least 1440; timeFrame / gap must not exceed 300 snapshots. Validated when an enabled configuration is saved; stored values are not re-validated on read. */
|
|
96
|
+
timeFrame?: number | undefined;
|
|
97
|
+
}
|
|
98
|
+
export interface ListSnapshotsRequest {
|
|
99
|
+
/** ID of the organization that owns the snapshot. */
|
|
100
|
+
organizationId: string;
|
|
101
|
+
/** ID of the service the snapshot was created from. */
|
|
102
|
+
serviceId: string;
|
|
103
|
+
/** Maximum number of results to return. */
|
|
104
|
+
limit?: number | undefined;
|
|
105
|
+
/** Opaque cursor from a previous response's `nextCursor`, marking where to resume the list. */
|
|
106
|
+
cursor?: string | undefined;
|
|
107
|
+
}
|
|
108
|
+
export type ListSnapshotsResponseResultList = Array<Snapshot>;
|
|
109
|
+
export interface ListSnapshotsResponse {
|
|
110
|
+
/** HTTP status code. */
|
|
111
|
+
status?: number | undefined;
|
|
112
|
+
/** Unique id assigned to every request. UUIDv4 */
|
|
113
|
+
requestId?: string | undefined;
|
|
114
|
+
result: ListSnapshotsResponseResultList;
|
|
115
|
+
/** Maximum number of results returned in this page. */
|
|
116
|
+
limit?: number | undefined;
|
|
117
|
+
/** Total number of results across all pages. It has only informative value, thus is not guaranteed and it is provided on a best-effort basis. Null if the total count is unknown. */
|
|
118
|
+
totalCount?: number | null | undefined;
|
|
119
|
+
/** Cursor for the next page, to be sent as the `cursor` query parameter. Null on the last page. */
|
|
120
|
+
nextCursor?: string | null | undefined;
|
|
121
|
+
}
|
|
122
|
+
export interface UpdateSnapshotConfigurationRequest {
|
|
123
|
+
/** ID of the organization that owns the service. */
|
|
124
|
+
organizationId: string;
|
|
125
|
+
/** ID of the service. */
|
|
126
|
+
serviceId: string;
|
|
127
|
+
/** Whether scheduled snapshots are enabled for the service. */
|
|
128
|
+
enabled?: boolean | undefined;
|
|
129
|
+
/** Interval between snapshots, in minutes. One of 10, 20, 30, 60. Validated when an enabled configuration is saved; stored values are not re-validated on read. */
|
|
130
|
+
gap?: number | undefined;
|
|
131
|
+
/** Retention window the snapshots cover, in minutes. A whole number of days (a multiple of 1440), at least 1440; timeFrame / gap must not exceed 300 snapshots. Validated when an enabled configuration is saved; stored values are not re-validated on read. */
|
|
132
|
+
timeFrame?: number | undefined;
|
|
133
|
+
}
|
|
134
|
+
export type GetSnapshotError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
135
|
+
/** Get snapshot details **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns a single snapshot info. */
|
|
136
|
+
export declare const getSnapshot: API.OperationMethod<GetSnapshotRequest, Snapshot, GetSnapshotError, ClickHouseCloudOpContext>;
|
|
137
|
+
export type GetSnapshotConfigurationError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
138
|
+
/** Get service snapshot configuration **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the service snapshot configuration. */
|
|
139
|
+
export declare const getSnapshotConfiguration: API.OperationMethod<GetSnapshotConfigurationRequest, SnapshotConfiguration, GetSnapshotConfigurationError, ClickHouseCloudOpContext>;
|
|
140
|
+
export type ListSnapshotsError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
141
|
+
/** List of service snapshots **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns a list of snapshots for the service, most recent first. Results are capped at `limit` (default 250) per page; the server may return fewer and caps the value at its own maximum. Every response carries `limit`, `totalCount` and `nextCursor`; pass `nextCursor` as the `cursor` query parameter to fetch the next page, repeating until it is null. */
|
|
142
|
+
export declare const listSnapshots: API.PaginatedOperationMethod<ListSnapshotsRequest, ListSnapshotsResponse, ListSnapshotsError, ClickHouseCloudOpContext, Snapshot>;
|
|
143
|
+
export type UpdateSnapshotConfigurationError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
144
|
+
/** Update service snapshot configuration **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Updates the service snapshot configuration. Requires ADMIN auth key role. Enables or disables scheduled snapshots and sets the cadence; when enabled, the resulting configuration (in minutes) must satisfy: gap must be one of 10, 20, 30, 60; timeFrame must be a whole number of days (a multiple of 1440), at least 1440; and timeFrame / gap (the number of snapshots the configuration keeps) must not exceed 300. Provide at least one of enabled, gap, timeFrame; omit a field to leave it unchanged (null is not accepted). Gap or timeFrame may be changed on its own; the rules are checked against the configuration that results from merging the request into the stored one. After a change to gap or timeFrame, snapshots taken under the previous configuration expire by the new timeFrame, and cleanup also deletes the oldest snapshots beyond the limit of 300, including ones still inside the new timeFrame. Enabling snapshots or changing the cadence requires an eligible organization (see the organization's capabilities.snapshots). */
|
|
145
|
+
export declare const updateSnapshotConfiguration: API.OperationMethod<UpdateSnapshotConfigurationRequest, SnapshotConfiguration, UpdateSnapshotConfigurationError, ClickHouseCloudOpContext>;
|
|
146
|
+
//# sourceMappingURL=snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.d.ts","sources":["../../src/unstable-services/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAGjD,OAAO,KAAK,CAAC,MAAM,mCAAmC,CAAC;AAIvD,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC9B,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,CAAC;;;;;;;;;;AAejE,uLAAuL;AACvL,qBAAa,kBACX,SAAQ,aAAa,CAAC,uBAOrB;CAAG;AAEN,MAAM,WAAW,kBAAkB;IACjC,qDAAqD;IACrD,cAAc,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,UAAU,EAAE,MAAM,CAAC;CACpB;AACD,qJAAqJ;AACrJ,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,GAAG,WAAW,CAAC;AAC5E,0EAA0E;AAC1E,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,sBAAsB;AACtB,MAAM,MAAM,uCAAuC,GAAG,KAAK,CAAC;AAC5D,MAAM,WAAW,yBAAyB;IACxC,sBAAsB;IACtB,cAAc,CAAC,EAAE,uCAAuC,GAAG,SAAS,CAAC;IACrE,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,mBAAmB;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,mBAAmB;IACnB,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC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$paginateCursor as y,protocol$ClickHouseCloudPaginatedProtocol as b,protocol$ClickHouseCloudProtocol as x,retry$Retry as S,traits$Http as C,traits$Label as w,traits$Query as T,traits$applyErrorMatchers as E,wc as D,xc as O,ya as k}from"../_bundle/sdk.js";const A={system:`clickhouse-cloud-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`ClickhouseCloud`,service:`Snapshots`,labels:`clickhouse_cloud`,propagate:`w3c`};const j=/*@__PURE__*/ m(function FeatureUnavailable(e){return g(e,new.target,[`$7($6()("FeatureUnavailable",{message:$2,body:$4($3),headers:$4($5($2,$2))}).pipe($1),[{status:403,message:{includes:"early access API endpoint"}}])`,[c,k,r,s,l,n,a,E]])});const M=/*@__PURE__*/ _(e=>e===d?h(`GetSnapshot`,`{input:#1,output:#6:4,errors:[$7],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$5(>2)@"%Request";$4({organizationId:$3.pipe($2()),serviceId:$3.pipe($2()),snapshotId:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/services/{serviceId}/snapshots/{snapshotId}",code:200}))`,[c,C,w,r,i,u,__d0,j,p,x,S,A]):f(M,e));const N=/*@__PURE__*/ _(e=>e===d?h(`GetSnapshotConfiguration`,`{input:#1,output:#6:0,errors:[$7],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$5(>2)@"%Request";$4({organizationId:$3.pipe($2()),serviceId:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/services/{serviceId}/snapshotConfiguration",code:200}))`,[c,C,w,r,i,u,__d1,j,p,x,S,A]):f(N,e));const P=/*@__PURE__*/ v(n=>n===d?h(`ListSnapshots`,`{input:#1,output:#3,errors:[$12],serviceErrors:$13,protocol:$14,retry:$15,telemetry:$16,span:"%",pagination:{mode:"cursor",inputToken:"cursor",outputToken:"nextCursor",items:"result",pageSize:"limit"},strategy:$17};$8(>4)@"%Request";$10(#9:4);$8(>5)@"%Response";$7({organizationId:$3.pipe($2()),serviceId:$3.pipe($2()),limit:$6($5.pipe($4())),cursor:$6($3.pipe($4()))}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/services/{serviceId}/snapshots",code:200}));$7({status:$6($5),requestId:$6($3),result:#2,limit:$6($5),totalCount:$6($11($5)),nextCursor:$6($11($3))})`,[c,C,w,r,T,t,l,i,u,__d0,D,e,j,p,b,S,A,y]):f(P,n));const F=/*@__PURE__*/ _(e=>e===d?h(`UpdateSnapshotConfiguration`,`{input:#1,output:#9:0,errors:[$10],serviceErrors:$11,protocol:$12,retry:$13,telemetry:$14,span:"%"};$8(>2)@"%Request";$7({organizationId:$3.pipe($2()),serviceId:$3.pipe($2()),enabled:$5($4),gap:$5($6),timeFrame:$5($6)}).pipe($1({method:"PATCH",uri:"/v1/organizations/{organizationId}/services/{serviceId}/snapshotConfiguration",code:200}))`,[c,C,w,r,O,l,t,i,u,__d1,j,p,x,S,A]):f(F,e));function __d0(){return[`$4(>5)@"AwsBackupBucketProperties";$4(>6)@"GcpBackupBucketProperties";$4(>7)@"AzureBackupBucketProperties";$5([#0,#1,#2]);$4(>8)@"Snapshot";$3({bucketProvider:$2($1),bucketPath:$2($1),iamRoleArn:$2($1),iamRoleSessionName:$2($1),iamRoleExternalId:$2($1)});$3({bucketProvider:$2($1),bucketPath:$2($1),accessKeyId:$2($1)});$3({bucketProvider:$2($1),containerName:$2($1)});$3({id:$2($1),status:$2($1),serviceId:$2($1),startedAt:$2($1),finishedAt:$2($1),sizeInBytes:$2($6),durationInSeconds:$2($6),type:$2($1),backupName:$2($1),bucket:$2(#3)})`,[c,r,l,i,u,o,t]]}function __d1(){return[`$5(>1)@"SnapshotConfiguration";$4({enabled:$2($1),gap:$2($3),timeFrame:$2($3)})`,[c,O,l,t,i,u]]}export{j as FeatureUnavailable,M as getSnapshot,N as getSnapshotConfiguration,P as listSnapshots,F as updateSnapshotConfiguration};
|
|
2
|
+
//# sourceMappingURL=snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.js","names":["API.newError","__L.at","C.withAuthError","S.String","S.Unknown","S.optional","S.Record","S.TaggedError","T.applyErrorMatchers","API.D","API.named","T.Http","T.Label","S.Struct","S.suspend","Retry.Retry","API.call","T.Query","S.Number","S.Array","S.NullOr","S.Boolean","S.Union","NullOr","Number","Record","String","Struct","TaggedError","Union","Unknown","at","optional","suspend","D","call","ClickHouseCloudServiceErrors","error","named","newError","op","opPaginated","paginateCursor","ClickHouseCloudPaginatedProtocol","ClickHouseCloudProtocol","Retry","Http","Label","Query","applyErrorMatchers","Array","Boolean","withAuthError","TELEMETRY","FeatureUnavailable","i","getSnapshot","getSnapshotConfiguration","listSnapshots","updateSnapshotConfiguration"],"sources":["../../src/unstable-services/snapshot.ts"],"mappings":"kcAmBA,MAAMqD,EAAY,CAChB,OAAQ,uBACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,kBACR,QAAS,YACT,OAAQ,mBACR,UAAW,KACb,EAGA,MAAaC,EAAwC,gBAAU,SAAS,mBAAmB,EAAa,CACtG,OAAOtD,EAAauD,EAAG,WAAY,CAAC,uJAAwJ,CAACtD,EAAQC,EAAiBC,EAAUC,EAAWC,EAAYC,EAAUC,EAAeC,CAAoB,CAAC,CAAC,CACxS,CAAC,EA4HD,MAAagD,EAKK,gBAAQ,GAAgBD,IAAM9C,EAAQC,EAAU,cAAe,gUAAiU,CAACT,EAAQU,EAAQC,EAAST,EAAUU,EAAUC,EAAW,KAAMwC,EAAoBlB,EAA8BQ,EAAyB7B,EAAasC,CAAS,CAAC,EAAIrC,EAASwC,EAAaD,CAAC,CAAC,EAI/kB,MAAaE,EAKK,gBAAQ,GAAgBF,IAAM9C,EAAQC,EAAU,2BAA4B,sSAAuS,CAACT,EAAQU,EAAQC,EAAST,EAAUU,EAAUC,EAAW,KAAMwC,EAAoBlB,EAA8BQ,EAAyB7B,EAAasC,CAAS,CAAC,EAAIrC,EAASyC,EAA0BF,CAAC,CAAC,EAI/kB,MAAaG,EAMK,gBAAiB,GAAgBH,IAAM9C,EAAQC,EAAU,gBAAiB,wkBAAykB,CAACT,EAAQU,EAAQC,EAAST,EAAUc,EAASC,EAAUb,EAAYQ,EAAUC,EAAW,KAAMK,EAASC,EAAUkC,EAAoBlB,EAA8BO,EAAkC5B,EAAasC,EAAWX,CAAc,CAAC,EAAI1B,EAAS0C,EAAeH,CAAC,CAAC,EAI/6B,MAAaI,EAKK,gBAAQ,GAAgBJ,IAAM9C,EAAQC,EAAU,8BAA+B,sVAAuV,CAACT,EAAQU,EAAQC,EAAST,EAAUkB,EAAWhB,EAAYa,EAAUL,EAAUC,EAAW,KAAMwC,EAAoBlB,EAA8BQ,EAAyB7B,EAAasC,CAAS,CAAC,EAAIrC,EAAS2C,EAA6BJ,CAAC,CAAC,EAMtqB,SAAS,MAAY,CACnB,MAAO,CAAC,6hBAA8hB,CAACtD,EAAQE,EAAUE,EAAYQ,EAAUC,EAAWQ,EAASJ,CAAQ,CAAC,CAC9mB,CACA,SAAS,MAAY,CACnB,MAAO,CAAC,kFAAmF,CAACjB,EAAQoB,EAAWhB,EAAYa,EAAUL,EAAUC,CAAS,CAAC,CAC3J"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import { type ClickHouseCloudOpError, type ClickHouseCloudOpContext } from "../protocol.ts";
|
|
3
|
+
export type { ClickHouseCloudOpError, ClickHouseCloudOpContext };
|
|
4
|
+
export interface GetWhoamiRequest {
|
|
5
|
+
}
|
|
6
|
+
export interface WhoamiOrganization {
|
|
7
|
+
/** ID of the organization the user belongs to. */
|
|
8
|
+
organizationId: string;
|
|
9
|
+
/** Name of the organization. */
|
|
10
|
+
organizationName: string;
|
|
11
|
+
}
|
|
12
|
+
/** Organizations the user belongs to. */
|
|
13
|
+
export type WhoamiUserOrganizationsList = Array<WhoamiOrganization>;
|
|
14
|
+
export interface WhoamiUser {
|
|
15
|
+
/** Discriminator identifying the caller as a user (JWT or clickhousectl token). */
|
|
16
|
+
actorType: string;
|
|
17
|
+
/** Unique ID of the user. */
|
|
18
|
+
userId: string;
|
|
19
|
+
/** Email address of the user. */
|
|
20
|
+
email: string;
|
|
21
|
+
/** Full name of the user. */
|
|
22
|
+
name: string;
|
|
23
|
+
/** Organizations the user belongs to. */
|
|
24
|
+
organizations: WhoamiUserOrganizationsList;
|
|
25
|
+
}
|
|
26
|
+
export interface WhoamiApiKey {
|
|
27
|
+
/** Discriminator identifying the caller as an organization API key. */
|
|
28
|
+
actorType: string;
|
|
29
|
+
/** Unique ID of the API key. */
|
|
30
|
+
keyId: string;
|
|
31
|
+
/** Name of the API key. */
|
|
32
|
+
name: string;
|
|
33
|
+
/** ID of the organization that owns the API key. */
|
|
34
|
+
organizationId: string;
|
|
35
|
+
}
|
|
36
|
+
export type Whoami = WhoamiUser | WhoamiApiKey;
|
|
37
|
+
export type GetWhoamiResponse = Whoami;
|
|
38
|
+
export type GetWhoamiError = ClickHouseCloudOpError;
|
|
39
|
+
/** Resolve the caller identity **Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Returns the identity of the authenticated caller. For a user (JWT or clickhousectl token) the result carries the user fields; for an organization API key it carries the key fields instead. Use `actorType` to tell the two apart. */
|
|
40
|
+
export declare const getWhoami: API.OperationMethod<GetWhoamiRequest, GetWhoamiResponse, GetWhoamiError, ClickHouseCloudOpContext>;
|
|
41
|
+
//# sourceMappingURL=user_management.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user_management.d.ts","sources":["../../src/unstable-services/user_management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAKjD,OAA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CloudProtocol as u,retry$Retry as d,traits$Http as f,traits$RawResponseRoot as p,wc as m}from"../_bundle/sdk.js";const h={system:`clickhouse-cloud-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`ClickhouseCloud`,service:`UserManagement`,propagate:`w3c`};const g=/*@__PURE__*/ l(l=>l===a?c(`GetWhoami`,`{input:#1,output:#7,errors:[],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$3(>8)@"%Request";$3(>9)@"WhoamiOrganization";$5(#2);$3(>10)@"WhoamiUser";$3(>11)@"WhoamiApiKey";$6([#4,#5]);$3(>12)@"%Response";$2({}).pipe($1({method:"GET",uri:"/v1/whoami",code:200}));$2({organizationId:$4,organizationName:$4});$2({actorType:$4,userId:$4,email:$4,name:$4,organizations:#3});$2({actorType:$4,keyId:$4,name:$4,organizationId:$4});#6.pipe($7())`,[r,f,t,i,e,m,n,p,s,u,d,h]):o(g,l));export{g as getWhoami};
|
|
2
|
+
//# sourceMappingURL=user_management.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user_management.js","names":["API.D","API.named","__L.at","T.Http","S.Struct","S.suspend","S.String","S.Array","S.Union","T.RawResponseRoot","Retry.Retry","API.call","String","Struct","Union","at","suspend","call","ClickHouseCloudServiceErrors","named","op","ClickHouseCloudProtocol","Retry","Http","RawResponseRoot","Array","TELEMETRY","getWhoami","i","D"],"sources":["../../src/unstable-services/user_management.ts"],"mappings":"mPAgBA,MAAM0B,EAAY,CAChB,OAAQ,uBACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,kBACR,QAAS,iBACT,UAAW,KACb,EAqCA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAM5B,EAAQC,EAAU,YAAa,ycAA0c,CAACC,EAAQC,EAAQC,EAAUC,EAAWC,EAAUC,EAASC,EAASC,EAAmBS,EAA8BG,EAAyBX,EAAagB,CAAS,CAAC,EAAIf,EAASgB,EAAWC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../unstable-services/backup.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../unstable-services/billing.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../unstable-services/click_pipes.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{$L}from"../_bundle/lazy.js";
|
|
2
|
+
const{o:$o,e:$e,E:$E}=/*@__PURE__*/$L("../unstable-services/click_stack.js","ooooooooooooooooooooooooooooooooo",42615,3988);
|
|
3
|
+
export const{FeatureUnavailable}=$E;
|
|
4
|
+
export const clickStackSilenceAlert=$o(),clickStackUnsilenceAlert=$o(),createClickStackAlert=$o(),createClickStackDashboard=$o(),createClickStackRole=$o(),createClickStackSavedSearch=$o(),createClickStackSource=$o(),createClickStackWebhook=$o(),deleteClickStackAlert=$o(),deleteClickStackDashboard=$o(),deleteClickStackRole=$o(),deleteClickStackSavedSearch=$o(),deleteClickStackSource=$o(),deleteClickStackWebhook=$o(),getClickStackAlert=$o(),getClickStackDashboard=$o(),getClickStackRole=$o(),getClickStackSavedSearch=$o(),getClickStackSource=$o(),listClickStackAlerts=$o(),listClickStackDashboards=$o(),listClickStackRoles=$o(),listClickStackSavedSearches=$o(),listClickStackSources=$o(),listClickStackWebhooks=$o(),updateClickStackAlert=$o(),updateClickStackDashboard=$o(),updateClickStackRole=$o(),updateClickStackSavedSearch=$o(),updateClickStackSource=$o(),updateClickStackWebhook=$o(),validateClickStackDashboard=$o(),validateClickStackWebhook=$o();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{api$lazyNamespace as $N}from"@distilled.cloud/core/_bundle/base";
|
|
2
|
+
const $u=import.meta.url,backup=$N($u,"./backup.js"),billing=$N($u,"./billing.js"),clickPipes=$N($u,"./click_pipes.js"),clickStack=$N($u,"./click_stack.js"),notifications=$N($u,"./notifications.js"),organization=$N($u,"./organization.js"),postgres=$N($u,"./postgres.js"),service=$N($u,"./service.js"),snapshot=$N($u,"./snapshot.js"),userManagement=$N($u,"./user_management.js");
|
|
3
|
+
export{backup,billing,clickPipes,clickStack,notifications,organization,postgres,service,snapshot,userManagement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../unstable-services/notifications.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{$L}from"../_bundle/lazy.js";
|
|
2
|
+
const{o:$o,e:$e,E:$E}=/*@__PURE__*/$L("../unstable-services/organization.js","oooooooooooo",8871,1615);
|
|
3
|
+
export const{FeatureUnavailable}=$E;
|
|
4
|
+
export const createOrganizationByocInfrastructureEnrollmentToken=$o(),getByocInfrastructure=$o(),getByocInfrastructureCustomerAuthorizedAccess=$o(),getByocInfrastructurePrivateEndpointConfig=$o(),getByocInfrastructureProgress=$o(),getByocInfrastructureTags=$o(),getOrganizationQuota=$o(),listOrganizationPublicPreviews=$o(),listOrganizationQuotas=$o(),updateByocInfrastructureCustomerAuthorizedAccess=$o(),updateOrganizationPublicPreview=$o(),validateByocInfrastructure=$o();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../unstable-services/postgres.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../unstable-services/service.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../unstable-services/snapshot.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../unstable-services/user_management.js";
|