@distilled.cloud/clickhouse-cloud 0.0.0-stage → 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 +138 -2
- 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 +94 -3
- 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
package/lib/retry.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { retry$Retry as Retry, retry$capped as capped, retry$jittered as jittered, retry$makeDefault as makeDefault, retry$none as none, retry$policy as policy, retry$throttling as throttling, retry$throttlingFactory as throttlingFactory, retry$throttlingOptions as throttlingOptions, retry$transient as transient, retry$transientFactory as transientFactory, retry$transientOptions as transientOptions } from "./_bundle/sdk.js";
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import type * as Redacted from "effect/Redacted";
|
|
3
|
+
import { type ClickHouseCloudOpError, type ClickHouseCloudOpContext } from "../protocol.ts";
|
|
4
|
+
export type { ClickHouseCloudOpError, ClickHouseCloudOpContext };
|
|
5
|
+
/** Initial state of the key: 'enabled', 'disabled'. If not provided the new key will be 'enabled'. */
|
|
6
|
+
export type CreateApiKeyRequestState = "enabled" | "disabled";
|
|
7
|
+
export interface ApiKeyHashData {
|
|
8
|
+
/** Hash of the key ID. */
|
|
9
|
+
keyIdHash?: string | undefined;
|
|
10
|
+
/** Last 4 digits of the key ID. Algorithm: echo -n "yourpassword" | sha256sum | tr -d '-' | xxd -r -p | base64 */
|
|
11
|
+
keyIdSuffix?: string | undefined;
|
|
12
|
+
/** Hash of the key secret. Algorithm: echo -n "yourpassword" | sha256sum | tr -d '-' | xxd -r -p | base64 */
|
|
13
|
+
keySecretHash?: string | Redacted.Redacted<string> | undefined;
|
|
14
|
+
}
|
|
15
|
+
export type CreateApiKeyRequestRolesItem = "admin" | "developer" | "query_endpoints";
|
|
16
|
+
/** DEPRECATED. Use `assignedRoleIds` instead. List of roles assigned to the key. Contains at least 1 element. */
|
|
17
|
+
export type CreateApiKeyRequestRolesList = Array<CreateApiKeyRequestRolesItem | (string & {})>;
|
|
18
|
+
/** Array of role UUIDs to assign to the API key */
|
|
19
|
+
export type CreateApiKeyRequestAssignedRoleIdsList = Array<string>;
|
|
20
|
+
export interface IpAccessListEntry {
|
|
21
|
+
/** IP or CIDR */
|
|
22
|
+
source?: string | undefined;
|
|
23
|
+
/** Optional description of IPv4 address or IPv4 CIDR to allow access from */
|
|
24
|
+
description?: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
/** List of IP addresses allowed to access the API using this key */
|
|
27
|
+
export type CreateApiKeyRequestIpAccessListList = Array<IpAccessListEntry>;
|
|
28
|
+
export interface CreateApiKeyRequest {
|
|
29
|
+
/** ID of the organization that will own the key. */
|
|
30
|
+
organizationId: string;
|
|
31
|
+
/** Name of the key. */
|
|
32
|
+
name: string;
|
|
33
|
+
/** Timestamp the key expires. If not present, `null` or is empty the key never expires. ISO-8601. */
|
|
34
|
+
expireAt?: string | null | undefined;
|
|
35
|
+
/** Initial state of the key: 'enabled', 'disabled'. If not provided the new key will be 'enabled'. */
|
|
36
|
+
state?: CreateApiKeyRequestState | (string & {}) | undefined;
|
|
37
|
+
hashData?: ApiKeyHashData | undefined;
|
|
38
|
+
/** DEPRECATED. Use `assignedRoleIds` instead. List of roles assigned to the key. Contains at least 1 element. */
|
|
39
|
+
roles?: CreateApiKeyRequestRolesList | undefined;
|
|
40
|
+
/** Array of role UUIDs to assign to the API key */
|
|
41
|
+
assignedRoleIds?: CreateApiKeyRequestAssignedRoleIdsList | undefined;
|
|
42
|
+
/** List of IP addresses allowed to access the API using this key */
|
|
43
|
+
ipAccessList?: CreateApiKeyRequestIpAccessListList | undefined;
|
|
44
|
+
}
|
|
45
|
+
/** State of the key: 'enabled', 'disabled'. */
|
|
46
|
+
export type ApiKeyState = "enabled" | "disabled";
|
|
47
|
+
export type ApiKeyRolesItem = "admin" | "developer" | "query_endpoints";
|
|
48
|
+
/** DEPRECATED. Use `assignedRoles` instead. List of roles assigned to the key. For organizations that have migrated to custom roles, this field is frozen at the pre-migration value and does not reflect current role assignments. */
|
|
49
|
+
export type ApiKeyRolesList = Array<ApiKeyRolesItem>;
|
|
50
|
+
/** Type of role: system (predefined) or custom (organization-defined) */
|
|
51
|
+
export type AssignedRoleRoleType = "system" | "custom";
|
|
52
|
+
export interface AssignedRole {
|
|
53
|
+
/** Unique identifier of the role */
|
|
54
|
+
roleId?: string | undefined;
|
|
55
|
+
/** Human-readable name of the role */
|
|
56
|
+
roleName?: string | undefined;
|
|
57
|
+
/** Type of role: system (predefined) or custom (organization-defined) */
|
|
58
|
+
roleType?: AssignedRoleRoleType | undefined;
|
|
59
|
+
}
|
|
60
|
+
/** Custom roles and System roles assigned to this API key */
|
|
61
|
+
export type ApiKeyAssignedRolesList = Array<AssignedRole>;
|
|
62
|
+
/** List of IP addresses allowed to access the API using this key */
|
|
63
|
+
export type ApiKeyIpAccessListList = Array<IpAccessListEntry>;
|
|
64
|
+
export interface ApiKey {
|
|
65
|
+
/** Unique API key ID. */
|
|
66
|
+
id: string;
|
|
67
|
+
/** Name of the key */
|
|
68
|
+
name?: string | undefined;
|
|
69
|
+
/** State of the key: 'enabled', 'disabled'. */
|
|
70
|
+
state?: ApiKeyState | undefined;
|
|
71
|
+
/** DEPRECATED. Use `assignedRoles` instead. List of roles assigned to the key. For organizations that have migrated to custom roles, this field is frozen at the pre-migration value and does not reflect current role assignments. */
|
|
72
|
+
roles?: ApiKeyRolesList | undefined;
|
|
73
|
+
/** Custom roles and System roles assigned to this API key */
|
|
74
|
+
assignedRoles?: ApiKeyAssignedRolesList | undefined;
|
|
75
|
+
/** Last 4 letters of the key. */
|
|
76
|
+
keySuffix?: string | undefined;
|
|
77
|
+
/** Timestamp the key was created. ISO-8601. */
|
|
78
|
+
createdAt?: string | undefined;
|
|
79
|
+
/** Timestamp the key expires. If not present, `null` or is empty the key never expires. ISO-8601. */
|
|
80
|
+
expireAt?: string | null | undefined;
|
|
81
|
+
/** Timestamp the key was used last time, with one-minute precision. If not present the key was never used. ISO-8601. */
|
|
82
|
+
usedAt?: string | undefined;
|
|
83
|
+
/** List of IP addresses allowed to access the API using this key */
|
|
84
|
+
ipAccessList?: ApiKeyIpAccessListList | undefined;
|
|
85
|
+
}
|
|
86
|
+
export interface ApiKeyPostResponse {
|
|
87
|
+
key: ApiKey;
|
|
88
|
+
/** Generated key ID. Provided only if there was no 'hashData' in the request. */
|
|
89
|
+
keyId?: string | undefined;
|
|
90
|
+
/** Generated key secret. Provided only if there was no 'hashData' in the request. */
|
|
91
|
+
keySecret?: string | Redacted.Redacted<string> | undefined;
|
|
92
|
+
}
|
|
93
|
+
export interface DeleteApiKeyRequest {
|
|
94
|
+
/** ID of the organization that owns the key. */
|
|
95
|
+
organizationId: string;
|
|
96
|
+
/** ID of the key to delete. */
|
|
97
|
+
keyId: string;
|
|
98
|
+
}
|
|
99
|
+
export interface DeleteApiKeyResponse {
|
|
100
|
+
/** HTTP status code. */
|
|
101
|
+
status?: number | undefined;
|
|
102
|
+
/** Unique id assigned to every request. UUIDv4 */
|
|
103
|
+
requestId?: string | undefined;
|
|
104
|
+
}
|
|
105
|
+
export interface GetApiKeyRequest {
|
|
106
|
+
/** ID of the requested organization. */
|
|
107
|
+
organizationId: string;
|
|
108
|
+
/** ID of the requested key. */
|
|
109
|
+
keyId: string;
|
|
110
|
+
}
|
|
111
|
+
export interface ListApiKeysRequest {
|
|
112
|
+
/** ID of the requested organization. */
|
|
113
|
+
organizationId: string;
|
|
114
|
+
/** Maximum number of results to return. */
|
|
115
|
+
limit?: number | undefined;
|
|
116
|
+
/** Opaque cursor from a previous response's `nextCursor`, marking where to resume the list. */
|
|
117
|
+
cursor?: string | undefined;
|
|
118
|
+
}
|
|
119
|
+
export type ListApiKeysResponseResultList = Array<ApiKey>;
|
|
120
|
+
export interface ListApiKeysResponse {
|
|
121
|
+
/** HTTP status code. */
|
|
122
|
+
status?: number | undefined;
|
|
123
|
+
/** Unique id assigned to every request. UUIDv4 */
|
|
124
|
+
requestId?: string | undefined;
|
|
125
|
+
result: ListApiKeysResponseResultList;
|
|
126
|
+
/** Maximum number of results returned in this page. */
|
|
127
|
+
limit?: number | undefined;
|
|
128
|
+
/** 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. */
|
|
129
|
+
totalCount?: number | null | undefined;
|
|
130
|
+
/** Cursor for the next page, to be sent as the `cursor` query parameter. Null on the last page. */
|
|
131
|
+
nextCursor?: string | null | undefined;
|
|
132
|
+
}
|
|
133
|
+
export type UpdateApiKeyRequestRolesItem = "admin" | "developer" | "query_endpoints";
|
|
134
|
+
/** DEPRECATED. Use `assignedRoleIds` instead. List of roles assigned to the key. */
|
|
135
|
+
export type UpdateApiKeyRequestRolesList = Array<UpdateApiKeyRequestRolesItem | (string & {})>;
|
|
136
|
+
/** Array of role UUIDs to assign to the API key */
|
|
137
|
+
export type UpdateApiKeyRequestAssignedRoleIdsList = Array<string>;
|
|
138
|
+
/** State of the key: 'enabled', 'disabled'. */
|
|
139
|
+
export type UpdateApiKeyRequestState = "enabled" | "disabled";
|
|
140
|
+
/** List of IP addresses allowed to access the API using this key */
|
|
141
|
+
export type UpdateApiKeyRequestIpAccessListList = Array<IpAccessListEntry>;
|
|
142
|
+
export interface UpdateApiKeyRequest {
|
|
143
|
+
/** ID of the organization that owns the key. */
|
|
144
|
+
organizationId: string;
|
|
145
|
+
/** ID of the key to update. */
|
|
146
|
+
keyId: string;
|
|
147
|
+
/** Name of the key */
|
|
148
|
+
name?: string | undefined;
|
|
149
|
+
/** DEPRECATED. Use `assignedRoleIds` instead. List of roles assigned to the key. */
|
|
150
|
+
roles?: UpdateApiKeyRequestRolesList | undefined;
|
|
151
|
+
/** Array of role UUIDs to assign to the API key */
|
|
152
|
+
assignedRoleIds?: UpdateApiKeyRequestAssignedRoleIdsList | undefined;
|
|
153
|
+
/** Timestamp the key expires. If `null` or is empty the key never expires. ISO-8601. */
|
|
154
|
+
expireAt?: string | null | undefined;
|
|
155
|
+
/** State of the key: 'enabled', 'disabled'. */
|
|
156
|
+
state?: UpdateApiKeyRequestState | (string & {}) | undefined;
|
|
157
|
+
/** List of IP addresses allowed to access the API using this key */
|
|
158
|
+
ipAccessList?: UpdateApiKeyRequestIpAccessListList | undefined;
|
|
159
|
+
}
|
|
160
|
+
export type CreateApiKeyError = ClickHouseCloudOpError;
|
|
161
|
+
/** Create key Creates new API key. */
|
|
162
|
+
export declare const createApiKey: API.OperationMethod<CreateApiKeyRequest, ApiKeyPostResponse, CreateApiKeyError, ClickHouseCloudOpContext>;
|
|
163
|
+
export type DeleteApiKeyError = ClickHouseCloudOpError;
|
|
164
|
+
/** Delete key Deletes API key. Only a key not used to authenticate the active request can be deleted. */
|
|
165
|
+
export declare const deleteApiKey: API.OperationMethod<DeleteApiKeyRequest, DeleteApiKeyResponse, DeleteApiKeyError, ClickHouseCloudOpContext>;
|
|
166
|
+
export type GetApiKeyError = ClickHouseCloudOpError;
|
|
167
|
+
/** Get key details Returns a single key details. */
|
|
168
|
+
export declare const getApiKey: API.OperationMethod<GetApiKeyRequest, ApiKey, GetApiKeyError, ClickHouseCloudOpContext>;
|
|
169
|
+
export type ListApiKeysError = ClickHouseCloudOpError;
|
|
170
|
+
/** Get list of keys Returns a list of keys in the organization, ordered by creation date, oldest 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. */
|
|
171
|
+
export declare const listApiKeys: API.PaginatedOperationMethod<ListApiKeysRequest, ListApiKeysResponse, ListApiKeysError, ClickHouseCloudOpContext, ApiKey>;
|
|
172
|
+
export type UpdateApiKeyError = ClickHouseCloudOpError;
|
|
173
|
+
/** Update key Updates API key properties. */
|
|
174
|
+
export declare const updateApiKey: API.OperationMethod<UpdateApiKeyRequest, ApiKey, UpdateApiKeyError, ClickHouseCloudOpContext>;
|
|
175
|
+
//# sourceMappingURL=api_keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api_keys.d.ts","sources":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AAwB,CAUvB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Fc as e,Gc as t,Jc as n,Kc as r,Rc as i,Wc as a,Xc as o,a as s,b as c,errors$ClickHouseCloudServiceErrors as l,l as u,n as d,o as f,pagination$paginateCursor as p,protocol$ClickHouseCloudPaginatedProtocol as m,protocol$ClickHouseCloudProtocol as h,retry$Retry as g,traits$Http as _,traits$Label as v,traits$Query as y,traits$SensitiveValue as b,wc as x}from"../_bundle/sdk.js";const S={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:`ApiKeys`,labels:`clickhouse_cloud`,propagate:`w3c`};const C=/*@__PURE__*/ d(t=>t===s?u(`CreateApiKey`,`{input:#2,output:#3,errors:[],serviceErrors:$11,protocol:$12,retry:$13,telemetry:$14,span:"%"};$5(>4)@"ApiKeyHashData";$5(>5)@"%Request";$5(>6)@"ApiKeyPostResponse";$4({keyIdHash:$2($1),keyIdSuffix:$2($1),keySecretHash:$2($1.pipe($3({})))});$4({organizationId:$1.pipe($7()),name:$1,expireAt:$2($8($1)),state:$2($1),hashData:$2(#1),roles:$2(#9:0),assignedRoleIds:$2(#10:0),ipAccessList:$2(#9:2)}).pipe($6({method:"POST",uri:"/v1/organizations/{organizationId}/keys",code:200}));$4({key:#9:5,keyId:$2($1),keySecret:$2($1.pipe($3({})))})`,[i,n,a,b,r,o,_,v,e,__d0,__d1,l,h,g,S]):c(C,t));const w=/*@__PURE__*/ d(e=>e===s?u(`DeleteApiKey`,`{input:#1,output:#2,errors:[],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({organizationId:$3.pipe($2()),keyId:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v1/organizations/{organizationId}/keys/{keyId}",code:200}));$4({status:$7($6),requestId:$7($3)})`,[i,_,v,n,r,o,t,a,l,h,g,S]):c(w,e));const T=/*@__PURE__*/ d(e=>e===s?u(`GetApiKey`,`{input:#1,output:#6:5,errors:[],serviceErrors:$7,protocol:$8,retry:$9,telemetry:$10,span:"%"};$5(>2)@"%Request";$4({organizationId:$3.pipe($2()),keyId:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/keys/{keyId}",code:200}))`,[i,_,v,n,r,o,__d0,l,h,g,S]):c(T,e));const E=/*@__PURE__*/ f(d=>d===s?u(`ListApiKeys`,`{input:#1,output:#3,errors:[],serviceErrors:$12,protocol:$13,retry:$14,telemetry:$15,span:"%",pagination:{mode:"cursor",inputToken:"cursor",outputToken:"nextCursor",items:"result",pageSize:"limit"},strategy:$16};$8(>4)@"%Request";$10(#9:5);$8(>5)@"%Response";$7({organizationId:$3.pipe($2()),limit:$6($5.pipe($4())),cursor:$6($3.pipe($4()))}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/keys",code:200}));$7({status:$6($5),requestId:$6($3),result:#2,limit:$6($5),totalCount:$6($11($5)),nextCursor:$6($11($3))})`,[i,_,v,n,y,t,a,r,o,__d0,x,e,l,m,g,S,p]):c(E,d));const D=/*@__PURE__*/ d(t=>t===s?u(`UpdateApiKey`,`{input:#1,output:#5:5,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$9(>2)@"%Request";$8({organizationId:$3.pipe($2()),keyId:$3.pipe($2()),name:$4($3),roles:$4(#5:0),assignedRoleIds:$4(#6:0),expireAt:$4($7($3)),state:$4($3),ipAccessList:$4(#5:2)}).pipe($1({method:"PATCH",uri:"/v1/organizations/{organizationId}/keys/{keyId}",code:200}))`,[i,_,v,n,a,__d0,__d1,e,r,o,l,h,g,S]):c(D,t));function __d0(){return[`$2($1);$5(>6)@"IpAccessListEntry";$2(#1);$5(>7)@"AssignedRole";$2(#3);$5(>8)@"ApiKey";$4({source:$3($1),description:$3($1)});$4({roleId:$3($1),roleName:$3($1),roleType:$3($1)});$4({id:$1,name:$3($1),state:$3($1),roles:$3(#0),assignedRoles:$3(#4),keySuffix:$3($1),createdAt:$3($1),expireAt:$3($6($1)),usedAt:$3($1),ipAccessList:$3(#2)})`,[i,n,x,a,r,o,e]]}function __d1(){return[`$2($1)`,[i,n,x]]}export{C as createApiKey,w as deleteApiKey,T as getApiKey,E as listApiKeys,D as updateApiKey};
|
|
2
|
+
//# sourceMappingURL=api_keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api_keys.js","names":["API.D","API.named","__L.at","S.String","S.optional","T.SensitiveValue","S.Struct","S.suspend","T.Http","T.Label","S.NullOr","Retry.Retry","API.call","S.Number","T.Query","S.Array","NullOr","Number","String","Struct","at","optional","suspend","D","call","ClickHouseCloudServiceErrors","named","op","opPaginated","paginateCursor","ClickHouseCloudPaginatedProtocol","ClickHouseCloudProtocol","Retry","Http","Label","Query","SensitiveValue","Array","TELEMETRY","createApiKey","i","deleteApiKey","getApiKey","listApiKeys","updateApiKey"],"sources":["../../src/services/api_keys.ts"],"mappings":"gYAmBA,MAAMsC,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,UACT,OAAQ,mBACR,UAAW,KACb,EA+JA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAMxC,EAAQC,EAAU,eAAgB,yhBAA0hB,CAACC,EAAQC,EAAUC,EAAYC,EAAkBC,EAAUC,EAAWC,EAAQC,EAASC,EAAU,KAAM,KAAMe,EAA8BM,EAAyBpB,EAAa2B,CAAS,CAAC,EAAI1B,EAAS2B,EAAcC,CAAC,CAAC,EAIp0B,MAAaC,EAKK,gBAAQ,GAAgBD,IAAMxC,EAAQC,EAAU,eAAgB,2TAA4T,CAACC,EAAQM,EAAQC,EAASN,EAAUG,EAAUC,EAAWM,EAAUT,EAAYqB,EAA8BM,EAAyBpB,EAAa2B,CAAS,CAAC,EAAI1B,EAAS6B,EAAcD,CAAC,CAAC,EAIxkB,MAAaE,EAKK,gBAAQ,GAAgBF,IAAMxC,EAAQC,EAAU,YAAa,iQAAkQ,CAACC,EAAQM,EAAQC,EAASN,EAAUG,EAAUC,EAAW,KAAMkB,EAA8BM,EAAyBpB,EAAa2B,CAAS,CAAC,EAAI1B,EAAS8B,EAAWF,CAAC,CAAC,EAIxf,MAAaG,EAMK,gBAAiB,GAAgBH,IAAMxC,EAAQC,EAAU,cAAe,mhBAAohB,CAACC,EAAQM,EAAQC,EAASN,EAAUW,EAASD,EAAUT,EAAYE,EAAUC,EAAW,KAAMQ,EAASL,EAAUe,EAA8BK,EAAkCnB,EAAa2B,EAAWT,CAAc,CAAC,EAAIjB,EAAS+B,EAAaH,CAAC,CAAC,EAIl2B,MAAaI,EAKK,gBAAQ,GAAgBJ,IAAMxC,EAAQC,EAAU,eAAgB,iXAAkX,CAACC,EAAQM,EAAQC,EAASN,EAAUC,EAAY,KAAM,KAAMM,EAAUJ,EAAUC,EAAWkB,EAA8BM,EAAyBpB,EAAa2B,CAAS,CAAC,EAAI1B,EAASgC,EAAcJ,CAAC,CAAC,EAM1oB,SAAS,MAAY,CACnB,MAAO,CAAC,kVAAmV,CAACtC,EAAQC,EAAUY,EAASX,EAAYE,EAAUC,EAAWG,CAAQ,CAAC,CACna,CACA,SAAS,MAAY,CACnB,MAAO,CAAC,SAAU,CAACR,EAAQC,EAAUY,CAAO,CAAC,CAC/C"}
|
|
@@ -0,0 +1,117 @@
|
|
|
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 GetBackupRequest {
|
|
5
|
+
/** ID of the organization that owns the backup. */
|
|
6
|
+
organizationId: string;
|
|
7
|
+
/** ID of the service the backup was created from. */
|
|
8
|
+
serviceId: string;
|
|
9
|
+
/** ID of the requested backup. */
|
|
10
|
+
backupId: string;
|
|
11
|
+
}
|
|
12
|
+
/** Status of the backup: 'done', 'error', 'in_progress'. */
|
|
13
|
+
export type BackupStatus = "done" | "error" | "in_progress";
|
|
14
|
+
/** Backup type ("full" or "incremental"). */
|
|
15
|
+
export type BackupType = "full" | "incremental";
|
|
16
|
+
/** Bucket provider */
|
|
17
|
+
export type AwsBackupBucketPropertiesBucketProvider = "AWS";
|
|
18
|
+
export interface AwsBackupBucketProperties {
|
|
19
|
+
/** Bucket provider */
|
|
20
|
+
bucketProvider?: AwsBackupBucketPropertiesBucketProvider | undefined;
|
|
21
|
+
/** Bucket path */
|
|
22
|
+
bucketPath?: string | undefined;
|
|
23
|
+
/** AWS IAM Role */
|
|
24
|
+
iamRoleArn?: string | undefined;
|
|
25
|
+
/** AWS IAM Role */
|
|
26
|
+
iamRoleSessionName?: string | undefined;
|
|
27
|
+
/** External ID the IAM role trust policy requires when the data plane assumes the role */
|
|
28
|
+
iamRoleExternalId?: string | undefined;
|
|
29
|
+
}
|
|
30
|
+
/** Bucket provider */
|
|
31
|
+
export type GcpBackupBucketPropertiesBucketProvider = "GCP";
|
|
32
|
+
export interface GcpBackupBucketProperties {
|
|
33
|
+
/** Bucket provider */
|
|
34
|
+
bucketProvider?: GcpBackupBucketPropertiesBucketProvider | undefined;
|
|
35
|
+
/** Bucket path */
|
|
36
|
+
bucketPath?: string | undefined;
|
|
37
|
+
/** Access Key ID (HMAC key) */
|
|
38
|
+
accessKeyId?: string | undefined;
|
|
39
|
+
}
|
|
40
|
+
/** Bucket provider */
|
|
41
|
+
export type AzureBackupBucketPropertiesBucketProvider = "AZURE";
|
|
42
|
+
export interface AzureBackupBucketProperties {
|
|
43
|
+
/** Bucket provider */
|
|
44
|
+
bucketProvider?: AzureBackupBucketPropertiesBucketProvider | undefined;
|
|
45
|
+
/** Container Name */
|
|
46
|
+
containerName?: string | undefined;
|
|
47
|
+
}
|
|
48
|
+
export type BackupBucketProperties = AwsBackupBucketProperties | GcpBackupBucketProperties | AzureBackupBucketProperties;
|
|
49
|
+
export interface Backup {
|
|
50
|
+
/** Unique backup ID. */
|
|
51
|
+
id?: string | undefined;
|
|
52
|
+
/** Status of the backup: 'done', 'error', 'in_progress'. */
|
|
53
|
+
status?: BackupStatus | undefined;
|
|
54
|
+
/** Name */
|
|
55
|
+
serviceId?: string | undefined;
|
|
56
|
+
/** Backup start timestamp. ISO-8601. */
|
|
57
|
+
startedAt?: string | undefined;
|
|
58
|
+
/** Backup finish timestamp. ISO-8601. Available only for finished backups */
|
|
59
|
+
finishedAt?: string | undefined;
|
|
60
|
+
/** Size of the backup in bytes. */
|
|
61
|
+
sizeInBytes?: number | undefined;
|
|
62
|
+
/** Time in seconds it took to perform the backup. If the status still in_progress, this is the time in seconds since the backup started until now. */
|
|
63
|
+
durationInSeconds?: number | undefined;
|
|
64
|
+
/** Backup type ("full" or "incremental"). */
|
|
65
|
+
type?: BackupType | undefined;
|
|
66
|
+
/** Backup name on the external backup bucket. */
|
|
67
|
+
backupName?: string | undefined;
|
|
68
|
+
/** Backup bucket where the backup is stored. */
|
|
69
|
+
bucket?: BackupBucketProperties | undefined;
|
|
70
|
+
}
|
|
71
|
+
export interface GetBackupConfigurationRequest {
|
|
72
|
+
/** ID of the organization that owns the service. */
|
|
73
|
+
organizationId: string;
|
|
74
|
+
/** ID of the service. */
|
|
75
|
+
serviceId: string;
|
|
76
|
+
}
|
|
77
|
+
export interface BackupConfiguration {
|
|
78
|
+
/** The interval in hours between each backup. */
|
|
79
|
+
backupPeriodInHours?: number | undefined;
|
|
80
|
+
/** The minimum duration in hours for which the backups are available. Must be a whole number of days between 24 (1 day) and 1080 (45 days) -- i.e. a multiple of 24. */
|
|
81
|
+
backupRetentionPeriodInHours?: number | undefined;
|
|
82
|
+
/** The time in HH:MM format for the backups to be performed (evaluated in UTC timezone). When defined the backup period resets to every 24 hours. */
|
|
83
|
+
backupStartTime?: string | undefined;
|
|
84
|
+
}
|
|
85
|
+
export interface ListBackupsRequest {
|
|
86
|
+
/** ID of the organization that owns the backup. */
|
|
87
|
+
organizationId: string;
|
|
88
|
+
/** ID of the service the backup was created from. */
|
|
89
|
+
serviceId: string;
|
|
90
|
+
}
|
|
91
|
+
export type ListBackupsResponseBodyList = Array<Backup>;
|
|
92
|
+
export type ListBackupsResponse = ListBackupsResponseBodyList;
|
|
93
|
+
export interface UpdateBackupConfigurationRequest {
|
|
94
|
+
/** ID of the organization that owns the service. */
|
|
95
|
+
organizationId: string;
|
|
96
|
+
/** ID of the service. */
|
|
97
|
+
serviceId: string;
|
|
98
|
+
/** The interval in hours between each backup. */
|
|
99
|
+
backupPeriodInHours?: number | null | undefined;
|
|
100
|
+
/** The minimum duration in hours for which the backups are available. Must be a whole number of days between 24 (1 day) and 1080 (45 days) -- i.e. a multiple of 24. */
|
|
101
|
+
backupRetentionPeriodInHours?: number | null | undefined;
|
|
102
|
+
/** The time in HH:MM format for the backups to be performed (evaluated in UTC timezone). When defined the backup period resets to every 24 hours. */
|
|
103
|
+
backupStartTime?: string | null | undefined;
|
|
104
|
+
}
|
|
105
|
+
export type GetBackupError = ClickHouseCloudOpError;
|
|
106
|
+
/** Get backup details Returns a single backup info. */
|
|
107
|
+
export declare const getBackup: API.OperationMethod<GetBackupRequest, Backup, GetBackupError, ClickHouseCloudOpContext>;
|
|
108
|
+
export type GetBackupConfigurationError = ClickHouseCloudOpError;
|
|
109
|
+
/** Get service backup configuration Returns the service backup configuration. */
|
|
110
|
+
export declare const getBackupConfiguration: API.OperationMethod<GetBackupConfigurationRequest, BackupConfiguration, GetBackupConfigurationError, ClickHouseCloudOpContext>;
|
|
111
|
+
export type ListBackupsError = ClickHouseCloudOpError;
|
|
112
|
+
/** List of service backups Returns a list of all backups for the service. The most recent backups comes first in the list. */
|
|
113
|
+
export declare const listBackups: API.OperationMethod<ListBackupsRequest, ListBackupsResponse, ListBackupsError, ClickHouseCloudOpContext>;
|
|
114
|
+
export type UpdateBackupConfigurationError = ClickHouseCloudOpError;
|
|
115
|
+
/** Update service backup configuration Updates service backup configuration. Requires ADMIN auth key role. Setting the properties with null value, will reset the properties to theirs default values. */
|
|
116
|
+
export declare const updateBackupConfiguration: API.OperationMethod<UpdateBackupConfigurationRequest, BackupConfiguration, UpdateBackupConfigurationError, ClickHouseCloudOpContext>;
|
|
117
|
+
//# sourceMappingURL=backup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backup.d.ts","sources":["../../src/services/backup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAKjD,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC9B,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,CAAC;AAejE,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,cAAc,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,4DAA4D;AAC5D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,CAAC;AAC5D,6CAA6C;AAC7C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,aAAa,CAAC;AAChD,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,GA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AAG,sBAAsB,CAAC;AACjE,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,EAAE,GAAG,CAAC,eAAe,CACtD,6BAA6B,EAC7B,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,CAUvB,CAAC;AAEJ,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AACtD,8HAA8H;AAC9H,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,eAAe,CAC3C,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,CAUvB,CAAC;AAEJ,MAAM,MAAM,8BAA8B,GAAG,sBAAsB,CAAC;AACpE,0MAA0M;AAC1M,eAAO,MAAM,yBAAyB,EAAE,GAAG,CAAC,eAAe,CACzD,gCAAgC,EAChC,mBAAmB,EACnB,8BAA8B,EAC9B,wBAAwB,CAUvB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Fc as e,Gc as t,Jc as n,Kc as r,Oc as i,Rc as a,Wc as o,Xc as s,a as c,b as l,errors$ClickHouseCloudServiceErrors as u,l as d,n as f,protocol$ClickHouseCloudProtocol as p,retry$Retry as m,traits$Http as h,traits$Label as g,traits$RawResponseRoot as _,wc as v}from"../_bundle/sdk.js";const y={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:`Backups`,labels:`clickhouse_cloud`,propagate:`w3c`};const b=/*@__PURE__*/ f(e=>e===c?d(`GetBackup`,`{input:#1,output:#6:4,errors:[],serviceErrors:$7,protocol:$8,retry:$9,telemetry:$10,span:"%"};$5(>2)@"%Request";$4({organizationId:$3.pipe($2()),serviceId:$3.pipe($2()),backupId:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/services/{serviceId}/backups/{backupId}",code:200}))`,[a,h,g,n,r,s,__d0,u,p,m,y]):l(b,e));const x=/*@__PURE__*/ f(e=>e===c?d(`GetBackupConfiguration`,`{input:#1,output:#6:0,errors:[],serviceErrors:$7,protocol:$8,retry:$9,telemetry:$10,span:"%"};$5(>2)@"%Request";$4({organizationId:$3.pipe($2()),serviceId:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/services/{serviceId}/backupConfiguration",code:200}))`,[a,h,g,n,r,s,__d1,u,p,m,y]):l(x,e));const S=/*@__PURE__*/ f(e=>e===c?d(`ListBackups`,`{input:#1,output:#3,errors:[],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$5(>4)@"%Request";$7(#6:4);$5(>5)@"%Response";$4({organizationId:$3.pipe($2()),serviceId:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationId}/services/{serviceId}/backups",code:200}));#2.pipe($8())`,[a,h,g,n,r,s,__d0,v,_,u,p,m,y]):l(S,e));const C=/*@__PURE__*/ f(i=>i===c?d(`UpdateBackupConfiguration`,`{input:#1,output:#9:0,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$8(>2)@"%Request";$7({organizationId:$3.pipe($2()),serviceId:$3.pipe($2()),backupPeriodInHours:$6($5($4)),backupRetentionPeriodInHours:$6($5($4)),backupStartTime:$6($5($3))}).pipe($1({method:"PATCH",uri:"/v1/organizations/{organizationId}/services/{serviceId}/backupConfiguration",code:200}))`,[a,h,g,n,t,e,o,r,s,__d1,u,p,m,y]):l(C,i));function __d0(){return[`$4(>5)@"AwsBackupBucketProperties";$4(>6)@"GcpBackupBucketProperties";$4(>7)@"AzureBackupBucketProperties";$5([#0,#1,#2]);$4(>8)@"Backup";$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)})`,[a,n,o,r,s,i,t]]}function __d1(){return[`$5(>1)@"BackupConfiguration";$4({backupPeriodInHours:$2($1),backupRetentionPeriodInHours:$2($1),backupStartTime:$2($3)})`,[a,t,o,n,r,s]]}export{b as getBackup,x as getBackupConfiguration,S as listBackups,C as updateBackupConfiguration};
|
|
2
|
+
//# sourceMappingURL=backup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backup.js","names":["API.D","API.named","__L.at","T.Http","T.Label","S.String","S.Struct","S.suspend","Retry.Retry","API.call","S.Array","T.RawResponseRoot","S.Number","S.NullOr","S.optional","S.Union","NullOr","Number","String","Struct","Union","at","optional","suspend","D","call","ClickHouseCloudServiceErrors","named","op","ClickHouseCloudProtocol","Retry","Http","Label","RawResponseRoot","Array","TELEMETRY","getBackup","i","getBackupConfiguration","listBackups","updateBackupConfiguration"],"sources":["../../src/services/backup.ts"],"mappings":"kSAgBA,MAAMmC,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,UACT,OAAQ,mBACR,UAAW,KACb,EA4GA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAMrC,EAAQC,EAAU,YAAa,uTAAwT,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAUC,EAAW,KAAMmB,EAA8BG,EAAyBrB,EAAa2B,CAAS,CAAC,EAAI1B,EAAS2B,EAAWC,CAAC,CAAC,EAI9iB,MAAaC,EAKK,gBAAQ,GAAgBD,IAAMrC,EAAQC,EAAU,yBAA0B,iSAAkS,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAUC,EAAW,KAAMmB,EAA8BG,EAAyBrB,EAAa2B,CAAS,CAAC,EAAI1B,EAAS6B,EAAwBD,CAAC,CAAC,EAIljB,MAAaE,EAKK,gBAAQ,GAAgBF,IAAMrC,EAAQC,EAAU,cAAe,+TAAgU,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAUC,EAAW,KAAMG,EAASC,EAAmBe,EAA8BG,EAAyBrB,EAAa2B,CAAS,CAAC,EAAI1B,EAAS8B,EAAaF,CAAC,CAAC,EAItlB,MAAaG,EAKK,gBAAQ,GAAgB,IAAMxC,EAAQC,EAAU,4BAA6B,wYAAyY,CAACC,EAAQC,EAAQC,EAASC,EAAUO,EAAUC,EAAUC,EAAYR,EAAUC,EAAW,KAAMmB,EAA8BG,EAAyBrB,EAAa2B,CAAS,CAAC,EAAI1B,EAAS+B,EAA2B,CAAC,CAAC,EAM/rB,SAAS,MAAY,CACnB,MAAO,CAAC,2hBAA4hB,CAACtC,EAAQG,EAAUS,EAAYR,EAAUC,EAAWQ,EAASH,CAAQ,CAAC,CAC5mB,CACA,SAAS,MAAY,CACnB,MAAO,CAAC,2HAA4H,CAACV,EAAQU,EAAUE,EAAYT,EAAUC,EAAUC,CAAS,CAAC,CACnM"}
|
|
@@ -0,0 +1,69 @@
|
|
|
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 type GetUsageCostRequestFilterList = Array<string>;
|
|
5
|
+
export interface GetUsageCostRequest {
|
|
6
|
+
/** ID of the requested organization. */
|
|
7
|
+
organizationId: string;
|
|
8
|
+
/** Start date for the report, e.g. 2024-12-19. */
|
|
9
|
+
from_date: string;
|
|
10
|
+
/** End date (inclusive) for the report, e.g. 2024-12-20. This date cannot be more than 30 days after from_date (for a maximum queried period of 31 days). */
|
|
11
|
+
to_date: string;
|
|
12
|
+
/** Filter criteria to apply when retrieving the usage cost report. Currently, only filtering by resource tags is supported. */
|
|
13
|
+
filter?: GetUsageCostRequestFilterList | undefined;
|
|
14
|
+
}
|
|
15
|
+
/** Type of the entity. */
|
|
16
|
+
export type UsageCostRecordEntityType = "datawarehouse" | "service" | "clickpipe";
|
|
17
|
+
export interface UsageCostMetrics {
|
|
18
|
+
/** Cost of storage in ClickHouse Credits (CHCs). Applies to dataWarehouse entities. */
|
|
19
|
+
storageCHC?: number | undefined;
|
|
20
|
+
/** Cost of backup in ClickHouse Credits (CHCs). Applies to dataWarehouse entities. */
|
|
21
|
+
backupCHC?: number | undefined;
|
|
22
|
+
/** Cost of compute in ClickHouse Credits (CHCs). Applies to service and clickpipe entities. */
|
|
23
|
+
computeCHC?: number | undefined;
|
|
24
|
+
/** Cost of data transfer in ClickHouse Credits (CHCs). Applies to clickpipe entities. */
|
|
25
|
+
dataTransferCHC?: number | undefined;
|
|
26
|
+
/** Cost of initial load and resyncs in ClickHouse Credits (CHCs). Applies to clickpipe entities. */
|
|
27
|
+
initialLoadCHC?: number | undefined;
|
|
28
|
+
/** Cost of data transfer in ClickHouse Credits (CHCs). Applies to service entities. */
|
|
29
|
+
publicDataTransferCHC?: number | undefined;
|
|
30
|
+
/** Cost of tier1 inter-region data transfer in ClickHouse Credits (CHCs). Applies to service entities. */
|
|
31
|
+
interRegionTier1DataTransferCHC?: number | undefined;
|
|
32
|
+
/** Cost of tier2 inter-region data transfer in ClickHouse Credits (CHCs). Applies to service entities. */
|
|
33
|
+
interRegionTier2DataTransferCHC?: number | undefined;
|
|
34
|
+
/** Cost of tier3 inter-region data transfer in ClickHouse Credits (CHCs). Applies to service entities. */
|
|
35
|
+
interRegionTier3DataTransferCHC?: number | undefined;
|
|
36
|
+
/** Cost of tier4 inter-region data transfer in ClickHouse Credits (CHCs). Applies to service entities. */
|
|
37
|
+
interRegionTier4DataTransferCHC?: number | undefined;
|
|
38
|
+
}
|
|
39
|
+
export interface UsageCostRecord {
|
|
40
|
+
/** ID of the dataWarehouse this entity belongs to (or is). */
|
|
41
|
+
dataWarehouseId?: string | undefined;
|
|
42
|
+
/** ID of the service this entity belongs to (or is). Set to null for dataWarehouse entities. */
|
|
43
|
+
serviceId?: string | null | undefined;
|
|
44
|
+
/** Date of the usage. ISO-8601 date, based on the UTC timezone. */
|
|
45
|
+
date?: string | undefined;
|
|
46
|
+
/** Type of the entity. */
|
|
47
|
+
entityType?: UsageCostRecordEntityType | undefined;
|
|
48
|
+
/** Unique ID of the entity. */
|
|
49
|
+
entityId?: string | undefined;
|
|
50
|
+
/** Name of the entity. */
|
|
51
|
+
entityName?: string | undefined;
|
|
52
|
+
metrics?: UsageCostMetrics | undefined;
|
|
53
|
+
/** Total cost of usage in ClickHouse Credits (CHCs) for this entity. */
|
|
54
|
+
totalCHC?: number | undefined;
|
|
55
|
+
/** When true, the record is immutable. Unlocked records are subject to change until locked. */
|
|
56
|
+
locked?: boolean | undefined;
|
|
57
|
+
}
|
|
58
|
+
/** List of daily, per-entity usage cost records. */
|
|
59
|
+
export type UsageCostCostsList = Array<UsageCostRecord>;
|
|
60
|
+
export interface UsageCost {
|
|
61
|
+
/** Grand total cost of usage in ClickHouse Credits (CHCs). */
|
|
62
|
+
grandTotalCHC?: number | undefined;
|
|
63
|
+
/** List of daily, per-entity usage cost records. */
|
|
64
|
+
costs?: UsageCostCostsList | undefined;
|
|
65
|
+
}
|
|
66
|
+
export type GetUsageCostError = ClickHouseCloudOpError;
|
|
67
|
+
/** Get organization usage costs Returns a grand total and a list of daily, per-entity organization usage cost records for the organization in the queried time period (maximum 31 days). All days in both the request and the response are evaluated based on the UTC timezone. */
|
|
68
|
+
export declare const getUsageCost: API.OperationMethod<GetUsageCostRequest, UsageCost, GetUsageCostError, ClickHouseCloudOpContext>;
|
|
69
|
+
//# sourceMappingURL=billing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing.d.ts","sources":["../../src/services/billing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AA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;IAC9D,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,gGAAgG;IAChG,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,0BAA0B;IAC1B,UAAU,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACnD,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,0BAA0B;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACvC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,+FAA+F;IAC/F,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B;AACD,oDAAoD;AACpD,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AACxD,MAAM,WAAW,SAAS;IACxB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,oDAAoD;IACpD,KAAK,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;CACxC;AACD,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;AACvD,mRAAmR;AACnR,eAAO,MAAM,YAAY,EAAE,GAAG,CAAC,eAAe,CAC5C,mBAAmB,EACnB,SAAS,EACT,iBAAiB,EACjB,wBAAwB,CAUvB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Fc as e,Gc as t,Jc as n,Kc as r,Rc as i,Wc as a,Xc as o,a as s,b as c,errors$ClickHouseCloudServiceErrors as l,l as u,n as d,protocol$ClickHouseCloudProtocol as f,retry$Retry as p,traits$Http as m,traits$Label as h,traits$Query as g,wc as _,xc as v}from"../_bundle/sdk.js";const y={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:`Billing`,labels:`clickhouse_cloud`,propagate:`w3c`};const b=/*@__PURE__*/ d(d=>d===s?u(`UsageCost`,`{input:#2,output:#6,errors:[],serviceErrors:$12,protocol:$13,retry:$14,telemetry:$15,span:"Get%"};$2($1);$8(>7)@"Get%Request";$8(>8)@"%Metrics";$8(>9)@"%Record";$2(#4);$8(>10)@"%";$7({organizationId:$1.pipe($4()),from_date:$1.pipe($5()),to_date:$1.pipe($5()),filter:$6(#1.pipe($5()))}).pipe($3({method:"GET",uri:"/v1/organizations/{organizationId}/usageCost",code:200}));$7({storageCHC:$6($9),backupCHC:$6($9),computeCHC:$6($9),dataTransferCHC:$6($9),initialLoadCHC:$6($9),publicDataTransferCHC:$6($9),interRegionTier1DataTransferCHC:$6($9),interRegionTier2DataTransferCHC:$6($9),interRegionTier3DataTransferCHC:$6($9),interRegionTier4DataTransferCHC:$6($9)});$7({dataWarehouseId:$6($1),serviceId:$6($10($1)),date:$6($1),entityType:$6($1),entityId:$6($1),entityName:$6($1),metrics:$6(#3),totalCHC:$6($9),locked:$6($11)});$7({grandTotalCHC:$6($9),costs:$6(#5)})`,[i,n,_,m,h,g,a,r,o,t,e,v,l,f,p,y]):c(b,d));export{b as getUsageCost};
|
|
2
|
+
//# sourceMappingURL=billing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing.js","names":["API.D","API.named","__L.at","S.String","S.Array","T.Http","T.Label","T.Query","S.optional","S.Struct","S.suspend","S.Number","S.NullOr","S.Boolean","Retry.Retry","API.call","NullOr","Number","String","Struct","at","optional","suspend","D","call","ClickHouseCloudServiceErrors","named","op","ClickHouseCloudProtocol","Retry","Http","Label","Query","Array","Boolean","TELEMETRY","getUsageCost","i"],"sources":["../../src/services/billing.ts"],"mappings":"wRAgBA,MAAMmC,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,UACT,OAAQ,mBACR,UAAW,KACb,EAkEA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAMrC,EAAQC,EAAU,YAAa,+1BAAg2B,CAACC,EAAQC,EAAUC,EAASC,EAAQC,EAASC,EAASC,EAAYC,EAAUC,EAAWC,EAAUC,EAAUC,EAAWY,EAA8BG,EAAyBd,EAAaqB,CAAS,CAAC,EAAIpB,EAASqB,EAAcC,CAAC,CAAC"}
|