alchemy 0.69.1 → 0.70.1

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.
Files changed (238) hide show
  1. package/bin/alchemy.js +3883 -3906
  2. package/bin/alchemy.ts +2 -0
  3. package/bin/commands/telemetry.ts +33 -0
  4. package/bin/services/execute-alchemy.ts +7 -0
  5. package/bin/trpc.ts +4 -9
  6. package/lib/alchemy.d.ts +7 -3
  7. package/lib/alchemy.d.ts.map +1 -1
  8. package/lib/alchemy.js +3 -15
  9. package/lib/alchemy.js.map +1 -1
  10. package/lib/apply.js +24 -9
  11. package/lib/apply.js.map +1 -1
  12. package/lib/aws/utils.d.ts +2 -1
  13. package/lib/aws/utils.d.ts.map +1 -1
  14. package/lib/aws/utils.js.map +1 -1
  15. package/lib/clickhouse/api/client.gen.d.ts +13 -0
  16. package/lib/clickhouse/api/client.gen.d.ts.map +1 -0
  17. package/lib/clickhouse/api/client.gen.js +7 -0
  18. package/lib/clickhouse/api/client.gen.js.map +1 -0
  19. package/lib/clickhouse/api/sdk.gen.d.ts +322 -0
  20. package/lib/clickhouse/api/sdk.gen.d.ts.map +1 -0
  21. package/lib/clickhouse/api/sdk.gen.js +683 -0
  22. package/lib/clickhouse/api/sdk.gen.js.map +1 -0
  23. package/lib/clickhouse/api/types.gen.d.ts +5030 -0
  24. package/lib/clickhouse/api/types.gen.d.ts.map +1 -0
  25. package/lib/clickhouse/api/types.gen.js +2 -0
  26. package/lib/clickhouse/api/types.gen.js.map +1 -0
  27. package/lib/clickhouse/api-key.d.ts +29 -0
  28. package/lib/clickhouse/api-key.d.ts.map +1 -0
  29. package/lib/clickhouse/api-key.js +83 -0
  30. package/lib/clickhouse/api-key.js.map +1 -0
  31. package/lib/clickhouse/api.d.ts +36 -0
  32. package/lib/clickhouse/api.d.ts.map +1 -0
  33. package/lib/clickhouse/api.js +48 -0
  34. package/lib/clickhouse/api.js.map +1 -0
  35. package/lib/clickhouse/index.d.ts +4 -0
  36. package/lib/clickhouse/index.d.ts.map +1 -0
  37. package/lib/clickhouse/index.js +4 -0
  38. package/lib/clickhouse/index.js.map +1 -0
  39. package/lib/clickhouse/organization.d.ts +16 -0
  40. package/lib/clickhouse/organization.d.ts.map +1 -0
  41. package/lib/clickhouse/organization.js +21 -0
  42. package/lib/clickhouse/organization.js.map +1 -0
  43. package/lib/clickhouse/service.d.ts +275 -0
  44. package/lib/clickhouse/service.d.ts.map +1 -0
  45. package/lib/clickhouse/service.js +274 -0
  46. package/lib/clickhouse/service.js.map +1 -0
  47. package/lib/cloudflare/account-api-token.d.ts.map +1 -1
  48. package/lib/cloudflare/account-api-token.js +1 -1
  49. package/lib/cloudflare/account-api-token.js.map +1 -1
  50. package/lib/cloudflare/api.d.ts.map +1 -1
  51. package/lib/cloudflare/api.js +2 -0
  52. package/lib/cloudflare/api.js.map +1 -1
  53. package/lib/cloudflare/bun-spa/bun-spa.d.ts +13 -0
  54. package/lib/cloudflare/bun-spa/bun-spa.d.ts.map +1 -0
  55. package/lib/cloudflare/bun-spa/bun-spa.js +95 -0
  56. package/lib/cloudflare/bun-spa/bun-spa.js.map +1 -0
  57. package/lib/cloudflare/compatibility-date.gen.d.ts +1 -1
  58. package/lib/cloudflare/compatibility-date.gen.js +1 -1
  59. package/lib/cloudflare/container.d.ts +11 -1
  60. package/lib/cloudflare/container.d.ts.map +1 -1
  61. package/lib/cloudflare/container.js.map +1 -1
  62. package/lib/cloudflare/index.d.ts +1 -0
  63. package/lib/cloudflare/index.d.ts.map +1 -1
  64. package/lib/cloudflare/index.js +1 -0
  65. package/lib/cloudflare/index.js.map +1 -1
  66. package/lib/cloudflare/miniflare/build-worker-options.d.ts.map +1 -1
  67. package/lib/cloudflare/miniflare/build-worker-options.js +33 -6
  68. package/lib/cloudflare/miniflare/build-worker-options.js.map +1 -1
  69. package/lib/cloudflare/miniflare/miniflare-controller.d.ts.map +1 -1
  70. package/lib/cloudflare/miniflare/miniflare-controller.js +2 -0
  71. package/lib/cloudflare/miniflare/miniflare-controller.js.map +1 -1
  72. package/lib/cloudflare/miniflare/miniflare-worker-proxy.d.ts +1 -1
  73. package/lib/cloudflare/miniflare/miniflare-worker-proxy.d.ts.map +1 -1
  74. package/lib/cloudflare/miniflare/miniflare-worker-proxy.js +36 -49
  75. package/lib/cloudflare/miniflare/miniflare-worker-proxy.js.map +1 -1
  76. package/lib/cloudflare/permission-groups.d.ts +2 -3
  77. package/lib/cloudflare/permission-groups.d.ts.map +1 -1
  78. package/lib/cloudflare/permission-groups.js +10 -15
  79. package/lib/cloudflare/permission-groups.js.map +1 -1
  80. package/lib/cloudflare/redwood/redwood.d.ts +1 -1
  81. package/lib/cloudflare/redwood/redwood.js +1 -1
  82. package/lib/cloudflare/util/filter-env-bindings.d.ts +62 -0
  83. package/lib/cloudflare/util/filter-env-bindings.d.ts.map +1 -0
  84. package/lib/cloudflare/util/filter-env-bindings.js +81 -0
  85. package/lib/cloudflare/util/filter-env-bindings.js.map +1 -0
  86. package/lib/cloudflare/website.d.ts +2 -2
  87. package/lib/cloudflare/website.d.ts.map +1 -1
  88. package/lib/cloudflare/website.js +6 -18
  89. package/lib/cloudflare/website.js.map +1 -1
  90. package/lib/cloudflare/worker-metadata.d.ts +1 -0
  91. package/lib/cloudflare/worker-metadata.d.ts.map +1 -1
  92. package/lib/cloudflare/worker-metadata.js +1 -0
  93. package/lib/cloudflare/worker-metadata.js.map +1 -1
  94. package/lib/cloudflare/worker.d.ts +11 -1
  95. package/lib/cloudflare/worker.d.ts.map +1 -1
  96. package/lib/cloudflare/worker.js.map +1 -1
  97. package/lib/cloudflare/wrangler.json.d.ts +8 -0
  98. package/lib/cloudflare/wrangler.json.d.ts.map +1 -1
  99. package/lib/cloudflare/wrangler.json.js +3 -4
  100. package/lib/cloudflare/wrangler.json.js.map +1 -1
  101. package/lib/coinbase/client.d.ts +54 -0
  102. package/lib/coinbase/client.d.ts.map +1 -0
  103. package/lib/coinbase/client.js +89 -0
  104. package/lib/coinbase/client.js.map +1 -0
  105. package/lib/coinbase/evm-account.d.ts +118 -0
  106. package/lib/coinbase/evm-account.d.ts.map +1 -0
  107. package/lib/coinbase/evm-account.js +198 -0
  108. package/lib/coinbase/evm-account.js.map +1 -0
  109. package/lib/coinbase/evm-smart-account.d.ts +122 -0
  110. package/lib/coinbase/evm-smart-account.d.ts.map +1 -0
  111. package/lib/coinbase/evm-smart-account.js +213 -0
  112. package/lib/coinbase/evm-smart-account.js.map +1 -0
  113. package/lib/coinbase/faucet.d.ts +11 -0
  114. package/lib/coinbase/faucet.d.ts.map +1 -0
  115. package/lib/coinbase/faucet.js +146 -0
  116. package/lib/coinbase/faucet.js.map +1 -0
  117. package/lib/coinbase/index.d.ts +4 -0
  118. package/lib/coinbase/index.d.ts.map +1 -0
  119. package/lib/coinbase/index.js +4 -0
  120. package/lib/coinbase/index.js.map +1 -0
  121. package/lib/coinbase/types.d.ts +28 -0
  122. package/lib/coinbase/types.d.ts.map +1 -0
  123. package/lib/coinbase/types.js +4 -0
  124. package/lib/{util/telemetry → coinbase}/types.js.map +1 -1
  125. package/lib/coinbase/utils.d.ts +13 -0
  126. package/lib/coinbase/utils.d.ts.map +1 -0
  127. package/lib/coinbase/utils.js +17 -0
  128. package/lib/coinbase/utils.js.map +1 -0
  129. package/lib/neon/api/types.gen.d.ts +7 -2
  130. package/lib/neon/api/types.gen.d.ts.map +1 -1
  131. package/lib/planetscale/api/types.gen.d.ts +20 -4
  132. package/lib/planetscale/api/types.gen.d.ts.map +1 -1
  133. package/lib/planetscale/api.d.ts.map +1 -1
  134. package/lib/planetscale/api.js +1 -0
  135. package/lib/planetscale/api.js.map +1 -1
  136. package/lib/planetscale/password.d.ts.map +1 -1
  137. package/lib/planetscale/password.js +1 -13
  138. package/lib/planetscale/password.js.map +1 -1
  139. package/lib/resource.d.ts.map +1 -1
  140. package/lib/resource.js +7 -3
  141. package/lib/resource.js.map +1 -1
  142. package/lib/scope.d.ts +9 -9
  143. package/lib/scope.d.ts.map +1 -1
  144. package/lib/scope.js +18 -37
  145. package/lib/scope.js.map +1 -1
  146. package/lib/state/instrumented-state-store.d.ts +1 -3
  147. package/lib/state/instrumented-state-store.d.ts.map +1 -1
  148. package/lib/state/instrumented-state-store.js +19 -21
  149. package/lib/state/instrumented-state-store.js.map +1 -1
  150. package/lib/test/bun.d.ts.map +1 -1
  151. package/lib/test/bun.js +1 -2
  152. package/lib/test/bun.js.map +1 -1
  153. package/lib/test/vitest.d.ts.map +1 -1
  154. package/lib/test/vitest.js +1 -2
  155. package/lib/test/vitest.js.map +1 -1
  156. package/lib/util/diff.d.ts +5 -0
  157. package/lib/util/diff.d.ts.map +1 -0
  158. package/lib/util/diff.js +14 -0
  159. package/lib/util/diff.js.map +1 -0
  160. package/lib/util/idempotent-spawn.js +1 -1
  161. package/lib/util/idempotent-spawn.js.map +1 -1
  162. package/lib/util/telemetry.d.ts +53 -0
  163. package/lib/util/telemetry.d.ts.map +1 -0
  164. package/lib/util/telemetry.js +215 -0
  165. package/lib/util/telemetry.js.map +1 -0
  166. package/package.json +19 -1
  167. package/src/alchemy.ts +10 -20
  168. package/src/apply.ts +29 -12
  169. package/src/aws/utils.ts +2 -1
  170. package/src/clickhouse/api/client.gen.ts +28 -0
  171. package/src/clickhouse/api/sdk.gen.ts +1286 -0
  172. package/src/clickhouse/api/types.gen.ts +5898 -0
  173. package/src/clickhouse/api-key.ts +136 -0
  174. package/src/clickhouse/api.ts +84 -0
  175. package/src/clickhouse/index.ts +3 -0
  176. package/src/clickhouse/organization.ts +31 -0
  177. package/src/clickhouse/service.ts +668 -0
  178. package/src/cloudflare/account-api-token.ts +1 -4
  179. package/src/cloudflare/api.ts +2 -0
  180. package/src/cloudflare/bun-spa/bun-spa.ts +136 -0
  181. package/src/cloudflare/compatibility-date.gen.ts +1 -1
  182. package/src/cloudflare/container.ts +20 -1
  183. package/src/cloudflare/index.ts +1 -0
  184. package/src/cloudflare/miniflare/build-worker-options.ts +38 -8
  185. package/src/cloudflare/miniflare/miniflare-controller.ts +2 -0
  186. package/src/cloudflare/miniflare/miniflare-worker-proxy.ts +41 -58
  187. package/src/cloudflare/permission-groups.ts +21 -49
  188. package/src/cloudflare/redwood/redwood.ts +1 -1
  189. package/src/cloudflare/util/filter-env-bindings.ts +96 -0
  190. package/src/cloudflare/website.ts +11 -24
  191. package/src/cloudflare/worker-metadata.ts +2 -0
  192. package/src/cloudflare/worker.ts +12 -1
  193. package/src/cloudflare/wrangler.json.ts +12 -8
  194. package/src/coinbase/client.ts +146 -0
  195. package/src/coinbase/evm-account.ts +317 -0
  196. package/src/coinbase/evm-smart-account.ts +339 -0
  197. package/src/coinbase/faucet.ts +173 -0
  198. package/src/coinbase/index.ts +3 -0
  199. package/src/coinbase/types.ts +33 -0
  200. package/src/coinbase/utils.ts +19 -0
  201. package/src/neon/api/types.gen.ts +13 -1
  202. package/src/planetscale/api/types.gen.ts +22 -2
  203. package/src/planetscale/api.ts +1 -0
  204. package/src/planetscale/password.ts +1 -14
  205. package/src/resource.ts +11 -4
  206. package/src/scope.ts +29 -45
  207. package/src/state/instrumented-state-store.ts +27 -26
  208. package/src/test/bun.ts +1 -2
  209. package/src/test/vitest.ts +1 -2
  210. package/src/util/diff.ts +14 -0
  211. package/src/util/idempotent-spawn.ts +1 -1
  212. package/src/util/telemetry.ts +328 -0
  213. package/templates/tanstack-start/package.json +2 -2
  214. package/workers/tunnel-proxy.js +1 -1
  215. package/lib/util/telemetry/client.d.ts +0 -31
  216. package/lib/util/telemetry/client.d.ts.map +0 -1
  217. package/lib/util/telemetry/client.js +0 -121
  218. package/lib/util/telemetry/client.js.map +0 -1
  219. package/lib/util/telemetry/constants.d.ts +0 -5
  220. package/lib/util/telemetry/constants.d.ts.map +0 -1
  221. package/lib/util/telemetry/constants.js +0 -8
  222. package/lib/util/telemetry/constants.js.map +0 -1
  223. package/lib/util/telemetry/context.d.ts +0 -15
  224. package/lib/util/telemetry/context.d.ts.map +0 -1
  225. package/lib/util/telemetry/context.js +0 -128
  226. package/lib/util/telemetry/context.js.map +0 -1
  227. package/lib/util/telemetry/index.d.ts +0 -3
  228. package/lib/util/telemetry/index.d.ts.map +0 -1
  229. package/lib/util/telemetry/index.js +0 -3
  230. package/lib/util/telemetry/index.js.map +0 -1
  231. package/lib/util/telemetry/types.d.ts +0 -68
  232. package/lib/util/telemetry/types.d.ts.map +0 -1
  233. package/lib/util/telemetry/types.js +0 -1
  234. package/src/util/telemetry/client.ts +0 -156
  235. package/src/util/telemetry/constants.ts +0 -13
  236. package/src/util/telemetry/context.ts +0 -154
  237. package/src/util/telemetry/index.ts +0 -2
  238. package/src/util/telemetry/types.ts +0 -105
@@ -0,0 +1,1286 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type {
4
+ Client,
5
+ Options as Options2,
6
+ TDataShape,
7
+ } from "../../util/api/client/index.ts";
8
+ import { client } from "./client.gen.ts";
9
+ import type {
10
+ CreateByocInfrastructureData,
11
+ CreateByocInfrastructureErrors,
12
+ CreateByocInfrastructureResponses,
13
+ CreateClickPipeData,
14
+ CreateClickPipeErrors,
15
+ CreateClickPipeResponses,
16
+ CreateInvitationData,
17
+ CreateInvitationErrors,
18
+ CreateInvitationResponses,
19
+ CreateKeyData,
20
+ CreateKeyErrors,
21
+ CreateKeyResponses,
22
+ CreateNewServiceData,
23
+ CreateNewServiceErrors,
24
+ CreateNewServiceResponses,
25
+ CreatePrivateEndpointData,
26
+ CreatePrivateEndpointErrors,
27
+ CreatePrivateEndpointResponses,
28
+ CreateReversePrivateEndpointData,
29
+ CreateReversePrivateEndpointErrors,
30
+ CreateReversePrivateEndpointResponses,
31
+ DeleteClickPipeData,
32
+ DeleteClickPipeErrors,
33
+ DeleteClickPipeResponses,
34
+ DeleteKeyData,
35
+ DeleteKeyErrors,
36
+ DeleteKeyResponses,
37
+ DeleteOrganizationInvitationData,
38
+ DeleteOrganizationInvitationErrors,
39
+ DeleteOrganizationInvitationResponses,
40
+ DeleteReversePrivateEndpointData,
41
+ DeleteReversePrivateEndpointErrors,
42
+ DeleteReversePrivateEndpointResponses,
43
+ DeleteServiceData,
44
+ DeleteServiceErrors,
45
+ DeleteServiceQueryEndpointForInstanceData,
46
+ DeleteServiceQueryEndpointForInstanceErrors,
47
+ DeleteServiceQueryEndpointForInstanceResponses,
48
+ DeleteServiceResponses,
49
+ GetBackupDetailsData,
50
+ GetBackupDetailsErrors,
51
+ GetBackupDetailsResponses,
52
+ GetCdcClickPipesScalingData,
53
+ GetCdcClickPipesScalingErrors,
54
+ GetCdcClickPipesScalingResponses,
55
+ GetClickPipeData,
56
+ GetClickPipeErrors,
57
+ GetClickPipeResponses,
58
+ GetClickPipeSettingsData,
59
+ GetClickPipeSettingsErrors,
60
+ GetClickPipeSettingsResponses,
61
+ GetInvitationDetailsData,
62
+ GetInvitationDetailsErrors,
63
+ GetInvitationDetailsResponses,
64
+ GetKeyDetailsData,
65
+ GetKeyDetailsErrors,
66
+ GetKeyDetailsResponses,
67
+ GetMemberDetailsData,
68
+ GetMemberDetailsErrors,
69
+ GetMemberDetailsResponses,
70
+ GetOrganizationDetailsData,
71
+ GetOrganizationDetailsErrors,
72
+ GetOrganizationDetailsResponses,
73
+ GetOrganizationMetricsData,
74
+ GetOrganizationMetricsErrors,
75
+ GetOrganizationMetricsResponses,
76
+ GetOrganizationUsageCostsData,
77
+ GetOrganizationUsageCostsErrors,
78
+ GetOrganizationUsageCostsResponses,
79
+ GetPrivateEndpointConfigurationData,
80
+ GetPrivateEndpointConfigurationErrors,
81
+ GetPrivateEndpointConfigurationForRegionWithinCloudProviderForOrganizationData,
82
+ GetPrivateEndpointConfigurationForRegionWithinCloudProviderForOrganizationErrors,
83
+ GetPrivateEndpointConfigurationForRegionWithinCloudProviderForOrganizationResponses,
84
+ GetPrivateEndpointConfigurationResponses,
85
+ GetReversePrivateEndpointData,
86
+ GetReversePrivateEndpointErrors,
87
+ GetReversePrivateEndpointResponses,
88
+ GetServiceBackupConfigurationData,
89
+ GetServiceBackupConfigurationErrors,
90
+ GetServiceBackupConfigurationResponses,
91
+ GetServiceDetailsData,
92
+ GetServiceDetailsErrors,
93
+ GetServiceDetailsResponses,
94
+ GetServiceMetricsData,
95
+ GetServiceMetricsErrors,
96
+ GetServiceMetricsResponses,
97
+ GetServiceQueryEndpointForInstanceData,
98
+ GetServiceQueryEndpointForInstanceErrors,
99
+ GetServiceQueryEndpointForInstanceResponses,
100
+ ListAllInvitationsData,
101
+ ListAllInvitationsErrors,
102
+ ListAllInvitationsResponses,
103
+ ListAllKeysData,
104
+ ListAllKeysErrors,
105
+ ListAllKeysResponses,
106
+ ListAvailableOrganizationsData,
107
+ ListAvailableOrganizationsErrors,
108
+ ListAvailableOrganizationsResponses,
109
+ ListClickPipesData,
110
+ ListClickPipesErrors,
111
+ ListClickPipesResponses,
112
+ ListOrganizationActivitiesData,
113
+ ListOrganizationActivitiesErrors,
114
+ ListOrganizationActivitiesResponses,
115
+ ListOrganizationMembersData,
116
+ ListOrganizationMembersErrors,
117
+ ListOrganizationMembersResponses,
118
+ ListOrganizationServicesData,
119
+ ListOrganizationServicesErrors,
120
+ ListOrganizationServicesResponses,
121
+ ListReversePrivateEndpointsData,
122
+ ListReversePrivateEndpointsErrors,
123
+ ListReversePrivateEndpointsResponses,
124
+ ListServiceBackupsData,
125
+ ListServiceBackupsErrors,
126
+ ListServiceBackupsResponses,
127
+ OrganizationActivityData,
128
+ OrganizationActivityErrors,
129
+ OrganizationActivityResponses,
130
+ RemoveByocInfrastructureData,
131
+ RemoveByocInfrastructureErrors,
132
+ RemoveByocInfrastructureResponses,
133
+ RemoveOrganizationMemberData,
134
+ RemoveOrganizationMemberErrors,
135
+ RemoveOrganizationMemberResponses,
136
+ ScalingClickPipeData,
137
+ ScalingClickPipeErrors,
138
+ ScalingClickPipeResponses,
139
+ UpdateCdcClickPipesScalingData,
140
+ UpdateCdcClickPipesScalingErrors,
141
+ UpdateCdcClickPipesScalingResponses,
142
+ UpdateClickPipeData,
143
+ UpdateClickPipeErrors,
144
+ UpdateClickPipeResponses,
145
+ UpdateClickPipeSettingsData,
146
+ UpdateClickPipeSettingsErrors,
147
+ UpdateClickPipeSettingsResponses,
148
+ UpdateClickPipeStateData,
149
+ UpdateClickPipeStateErrors,
150
+ UpdateClickPipeStateResponses,
151
+ UpdateKeyData,
152
+ UpdateKeyErrors,
153
+ UpdateKeyResponses,
154
+ UpdateOrganizationDetailsData,
155
+ UpdateOrganizationDetailsErrors,
156
+ UpdateOrganizationDetailsResponses,
157
+ UpdateOrganizationMemberData,
158
+ UpdateOrganizationMemberErrors,
159
+ UpdateOrganizationMemberResponses,
160
+ UpdateServiceAutoScalingSettings2Data,
161
+ UpdateServiceAutoScalingSettings2Errors,
162
+ UpdateServiceAutoScalingSettings2Responses,
163
+ UpdateServiceAutoScalingSettingsData,
164
+ UpdateServiceAutoScalingSettingsErrors,
165
+ UpdateServiceAutoScalingSettingsResponses,
166
+ UpdateServiceBackupConfigurationData,
167
+ UpdateServiceBackupConfigurationErrors,
168
+ UpdateServiceBackupConfigurationResponses,
169
+ UpdateServiceBasicDetailsData,
170
+ UpdateServiceBasicDetailsErrors,
171
+ UpdateServiceBasicDetailsResponses,
172
+ UpdateServicePasswordData,
173
+ UpdateServicePasswordErrors,
174
+ UpdateServicePasswordResponses,
175
+ UpdateServiceStateData,
176
+ UpdateServiceStateErrors,
177
+ UpdateServiceStateResponses,
178
+ UpsertServiceQueryEndpointForInstanceData,
179
+ UpsertServiceQueryEndpointForInstanceErrors,
180
+ UpsertServiceQueryEndpointForInstanceResponses,
181
+ } from "./types.gen.ts";
182
+
183
+ export type Options<
184
+ TData extends TDataShape = TDataShape,
185
+ ThrowOnError extends boolean = boolean,
186
+ > = Options2<TData, ThrowOnError> & {
187
+ /**
188
+ * You can provide a client instance returned by `createClient()` instead of
189
+ * individual options. This might be also useful if you want to implement a
190
+ * custom client.
191
+ */
192
+ client?: Client;
193
+ /**
194
+ * You can pass arbitrary values through the `meta` object. This can be
195
+ * used to access values that aren't defined as part of the SDK function.
196
+ */
197
+ meta?: Record<string, unknown>;
198
+ };
199
+
200
+ class _HeyApiClient {
201
+ protected _client: Client = client;
202
+
203
+ constructor(args?: {
204
+ client?: Client;
205
+ }) {
206
+ if (args?.client) {
207
+ this._client = args.client;
208
+ }
209
+ }
210
+ }
211
+
212
+ export class ClickhouseClient extends _HeyApiClient {
213
+ /**
214
+ * Get list of available organizations
215
+ * Returns a list with a single organization associated with the API key in the request.
216
+ */
217
+ public listAvailableOrganizations<ThrowOnError extends boolean = true>(
218
+ options?: Options<ListAvailableOrganizationsData, ThrowOnError>,
219
+ ) {
220
+ return (options?.client ?? this._client).get<
221
+ ListAvailableOrganizationsResponses,
222
+ ListAvailableOrganizationsErrors,
223
+ ThrowOnError
224
+ >({
225
+ url: "/v1/organizations",
226
+ ...options,
227
+ });
228
+ }
229
+
230
+ /**
231
+ * Get organization details
232
+ * Returns details of a single organization. In order to get the details, the auth key must belong to the organization.
233
+ */
234
+ public getOrganizationDetails<ThrowOnError extends boolean = true>(
235
+ options: Options<GetOrganizationDetailsData, ThrowOnError>,
236
+ ) {
237
+ return (options.client ?? this._client).get<
238
+ GetOrganizationDetailsResponses,
239
+ GetOrganizationDetailsErrors,
240
+ ThrowOnError
241
+ >({
242
+ url: "/v1/organizations/{organizationId}",
243
+ ...options,
244
+ });
245
+ }
246
+
247
+ /**
248
+ * Update organization details
249
+ * Updates organization fields. Requires ADMIN auth key role.
250
+ */
251
+ public updateOrganizationDetails<ThrowOnError extends boolean = true>(
252
+ options: Options<UpdateOrganizationDetailsData, ThrowOnError>,
253
+ ) {
254
+ return (options.client ?? this._client).patch<
255
+ UpdateOrganizationDetailsResponses,
256
+ UpdateOrganizationDetailsErrors,
257
+ ThrowOnError
258
+ >({
259
+ url: "/v1/organizations/{organizationId}",
260
+ ...options,
261
+ headers: {
262
+ "Content-Type": "application/json",
263
+ ...options.headers,
264
+ },
265
+ });
266
+ }
267
+
268
+ /**
269
+ * Get organization metrics
270
+ * Returns prometheus metrics for all services in an organization.
271
+ */
272
+ public getOrganizationMetrics<ThrowOnError extends boolean = true>(
273
+ options: Options<GetOrganizationMetricsData, ThrowOnError>,
274
+ ) {
275
+ return (options.client ?? this._client).get<
276
+ GetOrganizationMetricsResponses,
277
+ GetOrganizationMetricsErrors,
278
+ ThrowOnError
279
+ >({
280
+ url: "/v1/organizations/{organizationId}/prometheus",
281
+ ...options,
282
+ });
283
+ }
284
+
285
+ /**
286
+ * List of organization services
287
+ * Returns a list of all services in the organization.
288
+ */
289
+ public listOrganizationServices<ThrowOnError extends boolean = true>(
290
+ options: Options<ListOrganizationServicesData, ThrowOnError>,
291
+ ) {
292
+ return (options.client ?? this._client).get<
293
+ ListOrganizationServicesResponses,
294
+ ListOrganizationServicesErrors,
295
+ ThrowOnError
296
+ >({
297
+ url: "/v1/organizations/{organizationId}/services",
298
+ ...options,
299
+ });
300
+ }
301
+
302
+ /**
303
+ * Create new service
304
+ * Creates a new service in the organization, and returns the current service state and a password to access the service. The service is started asynchronously.
305
+ */
306
+ public createNewService<ThrowOnError extends boolean = true>(
307
+ options: Options<CreateNewServiceData, ThrowOnError>,
308
+ ) {
309
+ return (options.client ?? this._client).post<
310
+ CreateNewServiceResponses,
311
+ CreateNewServiceErrors,
312
+ ThrowOnError
313
+ >({
314
+ url: "/v1/organizations/{organizationId}/services",
315
+ ...options,
316
+ headers: {
317
+ "Content-Type": "application/json",
318
+ ...options.headers,
319
+ },
320
+ });
321
+ }
322
+
323
+ /**
324
+ * Delete service
325
+ * Deletes the service. The service must be in stopped state and is deleted asynchronously after this method call.
326
+ */
327
+ public deleteService<ThrowOnError extends boolean = true>(
328
+ options: Options<DeleteServiceData, ThrowOnError>,
329
+ ) {
330
+ return (options.client ?? this._client).delete<
331
+ DeleteServiceResponses,
332
+ DeleteServiceErrors,
333
+ ThrowOnError
334
+ >({
335
+ url: "/v1/organizations/{organizationId}/services/{serviceId}",
336
+ ...options,
337
+ });
338
+ }
339
+
340
+ /**
341
+ * Get service details
342
+ * Returns a service that belongs to the organization
343
+ */
344
+ public getServiceDetails<ThrowOnError extends boolean = true>(
345
+ options: Options<GetServiceDetailsData, ThrowOnError>,
346
+ ) {
347
+ return (options.client ?? this._client).get<
348
+ GetServiceDetailsResponses,
349
+ GetServiceDetailsErrors,
350
+ ThrowOnError
351
+ >({
352
+ url: "/v1/organizations/{organizationId}/services/{serviceId}",
353
+ ...options,
354
+ });
355
+ }
356
+
357
+ /**
358
+ * Update service basic details
359
+ * Updates basic service details like service name or IP access list.
360
+ */
361
+ public updateServiceBasicDetails<ThrowOnError extends boolean = true>(
362
+ options: Options<UpdateServiceBasicDetailsData, ThrowOnError>,
363
+ ) {
364
+ return (options.client ?? this._client).patch<
365
+ UpdateServiceBasicDetailsResponses,
366
+ UpdateServiceBasicDetailsErrors,
367
+ ThrowOnError
368
+ >({
369
+ url: "/v1/organizations/{organizationId}/services/{serviceId}",
370
+ ...options,
371
+ headers: {
372
+ "Content-Type": "application/json",
373
+ ...options.headers,
374
+ },
375
+ });
376
+ }
377
+
378
+ /**
379
+ * Get private endpoint configuration
380
+ * Information required to set up a private endpoint
381
+ */
382
+ public getPrivateEndpointConfiguration<ThrowOnError extends boolean = true>(
383
+ options: Options<GetPrivateEndpointConfigurationData, ThrowOnError>,
384
+ ) {
385
+ return (options.client ?? this._client).get<
386
+ GetPrivateEndpointConfigurationResponses,
387
+ GetPrivateEndpointConfigurationErrors,
388
+ ThrowOnError
389
+ >({
390
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/privateEndpointConfig",
391
+ ...options,
392
+ });
393
+ }
394
+
395
+ /**
396
+ * Delete the service query endpoint for a given instance
397
+ * This is an experimental feature. Please contact support to enable it.
398
+ */
399
+ public deleteServiceQueryEndpointForInstance<
400
+ ThrowOnError extends boolean = true,
401
+ >(options: Options<DeleteServiceQueryEndpointForInstanceData, ThrowOnError>) {
402
+ return (options.client ?? this._client).delete<
403
+ DeleteServiceQueryEndpointForInstanceResponses,
404
+ DeleteServiceQueryEndpointForInstanceErrors,
405
+ ThrowOnError
406
+ >({
407
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint",
408
+ ...options,
409
+ });
410
+ }
411
+
412
+ /**
413
+ * Get the service query endpoint for a given instance
414
+ * This is an experimental feature. Please contact support to enable it.
415
+ */
416
+ public getServiceQueryEndpointForInstance<
417
+ ThrowOnError extends boolean = true,
418
+ >(options: Options<GetServiceQueryEndpointForInstanceData, ThrowOnError>) {
419
+ return (options.client ?? this._client).get<
420
+ GetServiceQueryEndpointForInstanceResponses,
421
+ GetServiceQueryEndpointForInstanceErrors,
422
+ ThrowOnError
423
+ >({
424
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint",
425
+ ...options,
426
+ });
427
+ }
428
+
429
+ /**
430
+ * Upsert the service query endpoint for a given instance
431
+ * This is an experimental feature. Please contact support to enable it.
432
+ */
433
+ public upsertServiceQueryEndpointForInstance<
434
+ ThrowOnError extends boolean = true,
435
+ >(options: Options<UpsertServiceQueryEndpointForInstanceData, ThrowOnError>) {
436
+ return (options.client ?? this._client).post<
437
+ UpsertServiceQueryEndpointForInstanceResponses,
438
+ UpsertServiceQueryEndpointForInstanceErrors,
439
+ ThrowOnError
440
+ >({
441
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint",
442
+ ...options,
443
+ headers: {
444
+ "Content-Type": "application/json",
445
+ ...options.headers,
446
+ },
447
+ });
448
+ }
449
+
450
+ /**
451
+ * Update service state
452
+ * Starts or stop service
453
+ */
454
+ public updateServiceState<ThrowOnError extends boolean = true>(
455
+ options: Options<UpdateServiceStateData, ThrowOnError>,
456
+ ) {
457
+ return (options.client ?? this._client).patch<
458
+ UpdateServiceStateResponses,
459
+ UpdateServiceStateErrors,
460
+ ThrowOnError
461
+ >({
462
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/state",
463
+ ...options,
464
+ headers: {
465
+ "Content-Type": "application/json",
466
+ ...options.headers,
467
+ },
468
+ });
469
+ }
470
+
471
+ /**
472
+ * Update service auto scaling settings
473
+ * Updates minimum and maximum total memory limits and idle mode scaling behavior for the service. The memory settings are available only for "production" services and must be a multiple of 12 starting from 24GB. Please contact support to enable adjustment of numReplicas.
474
+ * @deprecated
475
+ */
476
+ public updateServiceAutoScalingSettings<ThrowOnError extends boolean = true>(
477
+ options: Options<UpdateServiceAutoScalingSettingsData, ThrowOnError>,
478
+ ) {
479
+ return (options.client ?? this._client).patch<
480
+ UpdateServiceAutoScalingSettingsResponses,
481
+ UpdateServiceAutoScalingSettingsErrors,
482
+ ThrowOnError
483
+ >({
484
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/scaling",
485
+ ...options,
486
+ headers: {
487
+ "Content-Type": "application/json",
488
+ ...options.headers,
489
+ },
490
+ });
491
+ }
492
+
493
+ /**
494
+ * Update service auto scaling settings
495
+ * Updates minimum and maximum memory limits per replica and idle mode scaling behavior for the service. The memory settings are available only for "production" services and must be a multiple of 4 starting from 8GB. Please contact support to enable adjustment of numReplicas.
496
+ */
497
+ public updateServiceAutoScalingSettings2<ThrowOnError extends boolean = true>(
498
+ options: Options<UpdateServiceAutoScalingSettings2Data, ThrowOnError>,
499
+ ) {
500
+ return (options.client ?? this._client).patch<
501
+ UpdateServiceAutoScalingSettings2Responses,
502
+ UpdateServiceAutoScalingSettings2Errors,
503
+ ThrowOnError
504
+ >({
505
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/replicaScaling",
506
+ ...options,
507
+ headers: {
508
+ "Content-Type": "application/json",
509
+ ...options.headers,
510
+ },
511
+ });
512
+ }
513
+
514
+ /**
515
+ * Update service password
516
+ * Sets a new password for the service
517
+ */
518
+ public updateServicePassword<ThrowOnError extends boolean = true>(
519
+ options: Options<UpdateServicePasswordData, ThrowOnError>,
520
+ ) {
521
+ return (options.client ?? this._client).patch<
522
+ UpdateServicePasswordResponses,
523
+ UpdateServicePasswordErrors,
524
+ ThrowOnError
525
+ >({
526
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/password",
527
+ ...options,
528
+ headers: {
529
+ "Content-Type": "application/json",
530
+ ...options.headers,
531
+ },
532
+ });
533
+ }
534
+
535
+ /**
536
+ * Create a private endpoint
537
+ * Create a new private endpoint. The private endpoint will be associated with this service and organization
538
+ */
539
+ public createPrivateEndpoint<ThrowOnError extends boolean = true>(
540
+ options: Options<CreatePrivateEndpointData, ThrowOnError>,
541
+ ) {
542
+ return (options.client ?? this._client).post<
543
+ CreatePrivateEndpointResponses,
544
+ CreatePrivateEndpointErrors,
545
+ ThrowOnError
546
+ >({
547
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/privateEndpoint",
548
+ ...options,
549
+ headers: {
550
+ "Content-Type": "application/json",
551
+ ...options.headers,
552
+ },
553
+ });
554
+ }
555
+
556
+ /**
557
+ * Get service metrics
558
+ * Returns prometheus metrics for a service.
559
+ */
560
+ public getServiceMetrics<ThrowOnError extends boolean = true>(
561
+ options: Options<GetServiceMetricsData, ThrowOnError>,
562
+ ) {
563
+ return (options.client ?? this._client).get<
564
+ GetServiceMetricsResponses,
565
+ GetServiceMetricsErrors,
566
+ ThrowOnError
567
+ >({
568
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/prometheus",
569
+ ...options,
570
+ });
571
+ }
572
+
573
+ /**
574
+ * List of service backups
575
+ * Returns a list of all backups for the service. The most recent backups comes first in the list.
576
+ */
577
+ public listServiceBackups<ThrowOnError extends boolean = true>(
578
+ options: Options<ListServiceBackupsData, ThrowOnError>,
579
+ ) {
580
+ return (options.client ?? this._client).get<
581
+ ListServiceBackupsResponses,
582
+ ListServiceBackupsErrors,
583
+ ThrowOnError
584
+ >({
585
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/backups",
586
+ ...options,
587
+ });
588
+ }
589
+
590
+ /**
591
+ * Get backup details
592
+ * Returns a single backup info.
593
+ */
594
+ public getBackupDetails<ThrowOnError extends boolean = true>(
595
+ options: Options<GetBackupDetailsData, ThrowOnError>,
596
+ ) {
597
+ return (options.client ?? this._client).get<
598
+ GetBackupDetailsResponses,
599
+ GetBackupDetailsErrors,
600
+ ThrowOnError
601
+ >({
602
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/backups/{backupId}",
603
+ ...options,
604
+ });
605
+ }
606
+
607
+ /**
608
+ * Get service backup configuration
609
+ * Returns the service backup configuration.
610
+ */
611
+ public getServiceBackupConfiguration<ThrowOnError extends boolean = true>(
612
+ options: Options<GetServiceBackupConfigurationData, ThrowOnError>,
613
+ ) {
614
+ return (options.client ?? this._client).get<
615
+ GetServiceBackupConfigurationResponses,
616
+ GetServiceBackupConfigurationErrors,
617
+ ThrowOnError
618
+ >({
619
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/backupConfiguration",
620
+ ...options,
621
+ });
622
+ }
623
+
624
+ /**
625
+ * Update service backup configuration
626
+ * Updates service backup configuration. Requires ADMIN auth key role. Setting the properties with null value, will reset the properties to theirs default values.
627
+ */
628
+ public updateServiceBackupConfiguration<ThrowOnError extends boolean = true>(
629
+ options: Options<UpdateServiceBackupConfigurationData, ThrowOnError>,
630
+ ) {
631
+ return (options.client ?? this._client).patch<
632
+ UpdateServiceBackupConfigurationResponses,
633
+ UpdateServiceBackupConfigurationErrors,
634
+ ThrowOnError
635
+ >({
636
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/backupConfiguration",
637
+ ...options,
638
+ headers: {
639
+ "Content-Type": "application/json",
640
+ ...options.headers,
641
+ },
642
+ });
643
+ }
644
+
645
+ /**
646
+ * Get list of all keys
647
+ * Returns a list of all keys in the organization.
648
+ */
649
+ public listAllKeys<ThrowOnError extends boolean = true>(
650
+ options: Options<ListAllKeysData, ThrowOnError>,
651
+ ) {
652
+ return (options.client ?? this._client).get<
653
+ ListAllKeysResponses,
654
+ ListAllKeysErrors,
655
+ ThrowOnError
656
+ >({
657
+ url: "/v1/organizations/{organizationId}/keys",
658
+ ...options,
659
+ });
660
+ }
661
+
662
+ /**
663
+ * Create key
664
+ * Creates new API key.
665
+ */
666
+ public createKey<ThrowOnError extends boolean = true>(
667
+ options: Options<CreateKeyData, ThrowOnError>,
668
+ ) {
669
+ return (options.client ?? this._client).post<
670
+ CreateKeyResponses,
671
+ CreateKeyErrors,
672
+ ThrowOnError
673
+ >({
674
+ url: "/v1/organizations/{organizationId}/keys",
675
+ ...options,
676
+ headers: {
677
+ "Content-Type": "application/json",
678
+ ...options.headers,
679
+ },
680
+ });
681
+ }
682
+
683
+ /**
684
+ * Delete key
685
+ * Deletes API key. Only a key not used to authenticate the active request can be deleted.
686
+ */
687
+ public deleteKey<ThrowOnError extends boolean = true>(
688
+ options: Options<DeleteKeyData, ThrowOnError>,
689
+ ) {
690
+ return (options.client ?? this._client).delete<
691
+ DeleteKeyResponses,
692
+ DeleteKeyErrors,
693
+ ThrowOnError
694
+ >({
695
+ url: "/v1/organizations/{organizationId}/keys/{keyId}",
696
+ ...options,
697
+ });
698
+ }
699
+
700
+ /**
701
+ * Get key details
702
+ * Returns a single key details.
703
+ */
704
+ public getKeyDetails<ThrowOnError extends boolean = true>(
705
+ options: Options<GetKeyDetailsData, ThrowOnError>,
706
+ ) {
707
+ return (options.client ?? this._client).get<
708
+ GetKeyDetailsResponses,
709
+ GetKeyDetailsErrors,
710
+ ThrowOnError
711
+ >({
712
+ url: "/v1/organizations/{organizationId}/keys/{keyId}",
713
+ ...options,
714
+ });
715
+ }
716
+
717
+ /**
718
+ * Update key
719
+ * Updates API key properties.
720
+ */
721
+ public updateKey<ThrowOnError extends boolean = true>(
722
+ options: Options<UpdateKeyData, ThrowOnError>,
723
+ ) {
724
+ return (options.client ?? this._client).patch<
725
+ UpdateKeyResponses,
726
+ UpdateKeyErrors,
727
+ ThrowOnError
728
+ >({
729
+ url: "/v1/organizations/{organizationId}/keys/{keyId}",
730
+ ...options,
731
+ headers: {
732
+ "Content-Type": "application/json",
733
+ ...options.headers,
734
+ },
735
+ });
736
+ }
737
+
738
+ /**
739
+ * List organization members
740
+ * Returns a list of all members in the organization.
741
+ */
742
+ public listOrganizationMembers<ThrowOnError extends boolean = true>(
743
+ options: Options<ListOrganizationMembersData, ThrowOnError>,
744
+ ) {
745
+ return (options.client ?? this._client).get<
746
+ ListOrganizationMembersResponses,
747
+ ListOrganizationMembersErrors,
748
+ ThrowOnError
749
+ >({
750
+ url: "/v1/organizations/{organizationId}/members",
751
+ ...options,
752
+ });
753
+ }
754
+
755
+ /**
756
+ * Remove an organization member
757
+ * Removes a user from the organization
758
+ */
759
+ public removeOrganizationMember<ThrowOnError extends boolean = true>(
760
+ options: Options<RemoveOrganizationMemberData, ThrowOnError>,
761
+ ) {
762
+ return (options.client ?? this._client).delete<
763
+ RemoveOrganizationMemberResponses,
764
+ RemoveOrganizationMemberErrors,
765
+ ThrowOnError
766
+ >({
767
+ url: "/v1/organizations/{organizationId}/members/{userId}",
768
+ ...options,
769
+ });
770
+ }
771
+
772
+ /**
773
+ * Get member details
774
+ * Returns a single organization member details.
775
+ */
776
+ public getMemberDetails<ThrowOnError extends boolean = true>(
777
+ options: Options<GetMemberDetailsData, ThrowOnError>,
778
+ ) {
779
+ return (options.client ?? this._client).get<
780
+ GetMemberDetailsResponses,
781
+ GetMemberDetailsErrors,
782
+ ThrowOnError
783
+ >({
784
+ url: "/v1/organizations/{organizationId}/members/{userId}",
785
+ ...options,
786
+ });
787
+ }
788
+
789
+ /**
790
+ * Update organization member
791
+ * Updates organization member role.
792
+ */
793
+ public updateOrganizationMember<ThrowOnError extends boolean = true>(
794
+ options: Options<UpdateOrganizationMemberData, ThrowOnError>,
795
+ ) {
796
+ return (options.client ?? this._client).patch<
797
+ UpdateOrganizationMemberResponses,
798
+ UpdateOrganizationMemberErrors,
799
+ ThrowOnError
800
+ >({
801
+ url: "/v1/organizations/{organizationId}/members/{userId}",
802
+ ...options,
803
+ headers: {
804
+ "Content-Type": "application/json",
805
+ ...options.headers,
806
+ },
807
+ });
808
+ }
809
+
810
+ /**
811
+ * List all invitations
812
+ * Returns list of all organization invitations.
813
+ */
814
+ public listAllInvitations<ThrowOnError extends boolean = true>(
815
+ options: Options<ListAllInvitationsData, ThrowOnError>,
816
+ ) {
817
+ return (options.client ?? this._client).get<
818
+ ListAllInvitationsResponses,
819
+ ListAllInvitationsErrors,
820
+ ThrowOnError
821
+ >({
822
+ url: "/v1/organizations/{organizationId}/invitations",
823
+ ...options,
824
+ });
825
+ }
826
+
827
+ /**
828
+ * Create an invitation
829
+ * Creates organization invitation.
830
+ */
831
+ public createInvitation<ThrowOnError extends boolean = true>(
832
+ options: Options<CreateInvitationData, ThrowOnError>,
833
+ ) {
834
+ return (options.client ?? this._client).post<
835
+ CreateInvitationResponses,
836
+ CreateInvitationErrors,
837
+ ThrowOnError
838
+ >({
839
+ url: "/v1/organizations/{organizationId}/invitations",
840
+ ...options,
841
+ headers: {
842
+ "Content-Type": "application/json",
843
+ ...options.headers,
844
+ },
845
+ });
846
+ }
847
+
848
+ /**
849
+ * Delete organization invitation
850
+ * Deletes a single organization invitation.
851
+ */
852
+ public deleteOrganizationInvitation<ThrowOnError extends boolean = true>(
853
+ options: Options<DeleteOrganizationInvitationData, ThrowOnError>,
854
+ ) {
855
+ return (options.client ?? this._client).delete<
856
+ DeleteOrganizationInvitationResponses,
857
+ DeleteOrganizationInvitationErrors,
858
+ ThrowOnError
859
+ >({
860
+ url: "/v1/organizations/{organizationId}/invitations/{invitationId}",
861
+ ...options,
862
+ });
863
+ }
864
+
865
+ /**
866
+ * Get invitation details
867
+ * Returns details for a single organization invitation.
868
+ */
869
+ public getInvitationDetails<ThrowOnError extends boolean = true>(
870
+ options: Options<GetInvitationDetailsData, ThrowOnError>,
871
+ ) {
872
+ return (options.client ?? this._client).get<
873
+ GetInvitationDetailsResponses,
874
+ GetInvitationDetailsErrors,
875
+ ThrowOnError
876
+ >({
877
+ url: "/v1/organizations/{organizationId}/invitations/{invitationId}",
878
+ ...options,
879
+ });
880
+ }
881
+
882
+ /**
883
+ * List of organization activities
884
+ * Returns a list of all organization activities.
885
+ */
886
+ public listOrganizationActivities<ThrowOnError extends boolean = true>(
887
+ options: Options<ListOrganizationActivitiesData, ThrowOnError>,
888
+ ) {
889
+ return (options.client ?? this._client).get<
890
+ ListOrganizationActivitiesResponses,
891
+ ListOrganizationActivitiesErrors,
892
+ ThrowOnError
893
+ >({
894
+ url: "/v1/organizations/{organizationId}/activities",
895
+ ...options,
896
+ });
897
+ }
898
+
899
+ /**
900
+ * Organization activity
901
+ * Returns a single organization activity by ID.
902
+ */
903
+ public organizationActivity<ThrowOnError extends boolean = true>(
904
+ options: Options<OrganizationActivityData, ThrowOnError>,
905
+ ) {
906
+ return (options.client ?? this._client).get<
907
+ OrganizationActivityResponses,
908
+ OrganizationActivityErrors,
909
+ ThrowOnError
910
+ >({
911
+ url: "/v1/organizations/{organizationId}/activities/{activityId}",
912
+ ...options,
913
+ });
914
+ }
915
+
916
+ /**
917
+ * Get organization usage costs
918
+ * 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.
919
+ */
920
+ public getOrganizationUsageCosts<ThrowOnError extends boolean = true>(
921
+ options: Options<GetOrganizationUsageCostsData, ThrowOnError>,
922
+ ) {
923
+ return (options.client ?? this._client).get<
924
+ GetOrganizationUsageCostsResponses,
925
+ GetOrganizationUsageCostsErrors,
926
+ ThrowOnError
927
+ >({
928
+ url: "/v1/organizations/{organizationId}/usageCost",
929
+ ...options,
930
+ });
931
+ }
932
+
933
+ /**
934
+ * List ClickPipes
935
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns a list of ClickPipes.
936
+ */
937
+ public listClickPipes<ThrowOnError extends boolean = true>(
938
+ options: Options<ListClickPipesData, ThrowOnError>,
939
+ ) {
940
+ return (options.client ?? this._client).get<
941
+ ListClickPipesResponses,
942
+ ListClickPipesErrors,
943
+ ThrowOnError
944
+ >({
945
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes",
946
+ ...options,
947
+ });
948
+ }
949
+
950
+ /**
951
+ * Create ClickPipe
952
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Create a new ClickPipe.
953
+ */
954
+ public createClickPipe<ThrowOnError extends boolean = true>(
955
+ options: Options<CreateClickPipeData, ThrowOnError>,
956
+ ) {
957
+ return (options.client ?? this._client).post<
958
+ CreateClickPipeResponses,
959
+ CreateClickPipeErrors,
960
+ ThrowOnError
961
+ >({
962
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes",
963
+ ...options,
964
+ headers: {
965
+ "Content-Type": "application/json",
966
+ ...options.headers,
967
+ },
968
+ });
969
+ }
970
+
971
+ /**
972
+ * Delete ClickPipe
973
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Delete the specified ClickPipe.
974
+ */
975
+ public deleteClickPipe<ThrowOnError extends boolean = true>(
976
+ options: Options<DeleteClickPipeData, ThrowOnError>,
977
+ ) {
978
+ return (options.client ?? this._client).delete<
979
+ DeleteClickPipeResponses,
980
+ DeleteClickPipeErrors,
981
+ ThrowOnError
982
+ >({
983
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}",
984
+ ...options,
985
+ });
986
+ }
987
+
988
+ /**
989
+ * Get ClickPipe
990
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the specified ClickPipe.
991
+ */
992
+ public getClickPipe<ThrowOnError extends boolean = true>(
993
+ options: Options<GetClickPipeData, ThrowOnError>,
994
+ ) {
995
+ return (options.client ?? this._client).get<
996
+ GetClickPipeResponses,
997
+ GetClickPipeErrors,
998
+ ThrowOnError
999
+ >({
1000
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}",
1001
+ ...options,
1002
+ });
1003
+ }
1004
+
1005
+ /**
1006
+ * Update ClickPipe
1007
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Update the specified ClickPipe.
1008
+ */
1009
+ public updateClickPipe<ThrowOnError extends boolean = true>(
1010
+ options: Options<UpdateClickPipeData, ThrowOnError>,
1011
+ ) {
1012
+ return (options.client ?? this._client).patch<
1013
+ UpdateClickPipeResponses,
1014
+ UpdateClickPipeErrors,
1015
+ ThrowOnError
1016
+ >({
1017
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}",
1018
+ ...options,
1019
+ headers: {
1020
+ "Content-Type": "application/json",
1021
+ ...options.headers,
1022
+ },
1023
+ });
1024
+ }
1025
+
1026
+ /**
1027
+ * Get ClickPipe settings
1028
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the advanced settings for the specified ClickPipe.
1029
+ */
1030
+ public getClickPipeSettings<ThrowOnError extends boolean = true>(
1031
+ options: Options<GetClickPipeSettingsData, ThrowOnError>,
1032
+ ) {
1033
+ return (options.client ?? this._client).get<
1034
+ GetClickPipeSettingsResponses,
1035
+ GetClickPipeSettingsErrors,
1036
+ ThrowOnError
1037
+ >({
1038
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings",
1039
+ ...options,
1040
+ });
1041
+ }
1042
+
1043
+ /**
1044
+ * Update ClickPipe settings
1045
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Update the advanced settings for the specified ClickPipe. Send key-value pairs where values can be strings, numbers, or booleans.
1046
+ */
1047
+ public updateClickPipeSettings<ThrowOnError extends boolean = true>(
1048
+ options: Options<UpdateClickPipeSettingsData, ThrowOnError>,
1049
+ ) {
1050
+ return (options.client ?? this._client).put<
1051
+ UpdateClickPipeSettingsResponses,
1052
+ UpdateClickPipeSettingsErrors,
1053
+ ThrowOnError
1054
+ >({
1055
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings",
1056
+ ...options,
1057
+ headers: {
1058
+ "Content-Type": "application/json",
1059
+ ...options.headers,
1060
+ },
1061
+ });
1062
+ }
1063
+
1064
+ /**
1065
+ * Scaling ClickPipe
1066
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Change scaling settings for the specified ClickPipe.
1067
+ */
1068
+ public scalingClickPipe<ThrowOnError extends boolean = true>(
1069
+ options: Options<ScalingClickPipeData, ThrowOnError>,
1070
+ ) {
1071
+ return (options.client ?? this._client).patch<
1072
+ ScalingClickPipeResponses,
1073
+ ScalingClickPipeErrors,
1074
+ ThrowOnError
1075
+ >({
1076
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/scaling",
1077
+ ...options,
1078
+ headers: {
1079
+ "Content-Type": "application/json",
1080
+ ...options.headers,
1081
+ },
1082
+ });
1083
+ }
1084
+
1085
+ /**
1086
+ * Update ClickPipe state
1087
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Start, stop or resync ClickPipe. Stopping a ClickPipe will stop the ingestion process from any state. Starting is allowed for ClickPipes in the "Stopped" state or with a "Failed" state. Resyncing is only for Postgres pipes and can be done from any state.
1088
+ */
1089
+ public updateClickPipeState<ThrowOnError extends boolean = true>(
1090
+ options: Options<UpdateClickPipeStateData, ThrowOnError>,
1091
+ ) {
1092
+ return (options.client ?? this._client).patch<
1093
+ UpdateClickPipeStateResponses,
1094
+ UpdateClickPipeStateErrors,
1095
+ ThrowOnError
1096
+ >({
1097
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/state",
1098
+ ...options,
1099
+ headers: {
1100
+ "Content-Type": "application/json",
1101
+ ...options.headers,
1102
+ },
1103
+ });
1104
+ }
1105
+
1106
+ /**
1107
+ * Get CDC ClickPipes scaling
1108
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Get scaling settings for DB ClickPipes.
1109
+ *
1110
+ * The infrastructure is shared between all DB ClickPipes in the service, both for initial load and CDC. For billing purposes, 2 CPU cores and 8 GB of RAM [correspond](https://clickhouse.com/docs/cloud/manage/billing/overview#clickpipes-for-postgres-cdc) to one compute unit.
1111
+ *
1112
+ * **This endpoint becomes available once at least one DB ClickPipe was provisioned.**
1113
+ */
1114
+ public getCdcClickPipesScaling<ThrowOnError extends boolean = true>(
1115
+ options: Options<GetCdcClickPipesScalingData, ThrowOnError>,
1116
+ ) {
1117
+ return (options.client ?? this._client).get<
1118
+ GetCdcClickPipesScalingResponses,
1119
+ GetCdcClickPipesScalingErrors,
1120
+ ThrowOnError
1121
+ >({
1122
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipesCdcScaling",
1123
+ ...options,
1124
+ });
1125
+ }
1126
+
1127
+ /**
1128
+ * Update CDC ClickPipes scaling
1129
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Update scaling settings for DB ClickPipes.
1130
+ *
1131
+ * The infrastructure is shared between all DB ClickPipes in the service, both for initial load and CDC. Scaling settings may take a few minutes to fully propagate.
1132
+ *
1133
+ * For billing purposes, 2 CPU cores and 8 GB of RAM [correspond](https://clickhouse.com/docs/cloud/manage/billing/overview#clickpipes-for-postgres-cdc) to one compute unit. If your organization tier changes, DB ClickPipes will be [rescaled](https://clickhouse.com/docs/cloud/manage/billing/overview#compute) appropriately.
1134
+ *
1135
+ * **This endpoint becomes available once at least one DB ClickPipe was provisioned.**
1136
+ */
1137
+ public updateCdcClickPipesScaling<ThrowOnError extends boolean = true>(
1138
+ options: Options<UpdateCdcClickPipesScalingData, ThrowOnError>,
1139
+ ) {
1140
+ return (options.client ?? this._client).patch<
1141
+ UpdateCdcClickPipesScalingResponses,
1142
+ UpdateCdcClickPipesScalingErrors,
1143
+ ThrowOnError
1144
+ >({
1145
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipesCdcScaling",
1146
+ ...options,
1147
+ headers: {
1148
+ "Content-Type": "application/json",
1149
+ ...options.headers,
1150
+ },
1151
+ });
1152
+ }
1153
+
1154
+ /**
1155
+ * Get private endpoint configuration for region within cloud provider for an organization
1156
+ * Deprecated. Please follow [documentation](https://clickhouse.com/docs/manage/security/aws-privatelink#add-endpoint-id-to-services-allow-list) for the updated process.
1157
+ * @deprecated
1158
+ */
1159
+ public getPrivateEndpointConfigurationForRegionWithinCloudProviderForOrganization<
1160
+ ThrowOnError extends boolean = true,
1161
+ >(
1162
+ options: Options<
1163
+ GetPrivateEndpointConfigurationForRegionWithinCloudProviderForOrganizationData,
1164
+ ThrowOnError
1165
+ >,
1166
+ ) {
1167
+ return (options.client ?? this._client).get<
1168
+ GetPrivateEndpointConfigurationForRegionWithinCloudProviderForOrganizationResponses,
1169
+ GetPrivateEndpointConfigurationForRegionWithinCloudProviderForOrganizationErrors,
1170
+ ThrowOnError
1171
+ >({
1172
+ url: "/v1/organizations/{organizationId}/privateEndpointConfig",
1173
+ ...options,
1174
+ });
1175
+ }
1176
+
1177
+ /**
1178
+ * Create BYOC Infrastructure
1179
+ * Create a new BYOC Infrastructure in the organization. Returns the configuration of the newly created infrastructure
1180
+ */
1181
+ public createByocInfrastructure<ThrowOnError extends boolean = true>(
1182
+ options: Options<CreateByocInfrastructureData, ThrowOnError>,
1183
+ ) {
1184
+ return (options.client ?? this._client).post<
1185
+ CreateByocInfrastructureResponses,
1186
+ CreateByocInfrastructureErrors,
1187
+ ThrowOnError
1188
+ >({
1189
+ url: "/v1/organizations/{organizationId}/byocInfrastructure",
1190
+ ...options,
1191
+ headers: {
1192
+ "Content-Type": "application/json",
1193
+ ...options.headers,
1194
+ },
1195
+ });
1196
+ }
1197
+
1198
+ /**
1199
+ * Remove a BYOC infrastructure
1200
+ * Removes a BYOC Infrastructure from the organization
1201
+ */
1202
+ public removeByocInfrastructure<ThrowOnError extends boolean = true>(
1203
+ options: Options<RemoveByocInfrastructureData, ThrowOnError>,
1204
+ ) {
1205
+ return (options.client ?? this._client).delete<
1206
+ RemoveByocInfrastructureResponses,
1207
+ RemoveByocInfrastructureErrors,
1208
+ ThrowOnError
1209
+ >({
1210
+ url: "/v1/organizations/{organizationId}/byocInfrastructure/{byocInfrastructureId}",
1211
+ ...options,
1212
+ });
1213
+ }
1214
+
1215
+ /**
1216
+ * List reverse private endpoints
1217
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns a list of reverse private endpoints for the specified service.
1218
+ */
1219
+ public listReversePrivateEndpoints<ThrowOnError extends boolean = true>(
1220
+ options: Options<ListReversePrivateEndpointsData, ThrowOnError>,
1221
+ ) {
1222
+ return (options.client ?? this._client).get<
1223
+ ListReversePrivateEndpointsResponses,
1224
+ ListReversePrivateEndpointsErrors,
1225
+ ThrowOnError
1226
+ >({
1227
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints",
1228
+ ...options,
1229
+ });
1230
+ }
1231
+
1232
+ /**
1233
+ * Create reverse private endpoint
1234
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Create a new reverse private endpoint.
1235
+ */
1236
+ public createReversePrivateEndpoint<ThrowOnError extends boolean = true>(
1237
+ options: Options<CreateReversePrivateEndpointData, ThrowOnError>,
1238
+ ) {
1239
+ return (options.client ?? this._client).post<
1240
+ CreateReversePrivateEndpointResponses,
1241
+ CreateReversePrivateEndpointErrors,
1242
+ ThrowOnError
1243
+ >({
1244
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints",
1245
+ ...options,
1246
+ headers: {
1247
+ "Content-Type": "application/json",
1248
+ ...options.headers,
1249
+ },
1250
+ });
1251
+ }
1252
+
1253
+ /**
1254
+ * Delete reverse private endpoint
1255
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Delete the reverse private endpoint with the specified ID.
1256
+ */
1257
+ public deleteReversePrivateEndpoint<ThrowOnError extends boolean = true>(
1258
+ options: Options<DeleteReversePrivateEndpointData, ThrowOnError>,
1259
+ ) {
1260
+ return (options.client ?? this._client).delete<
1261
+ DeleteReversePrivateEndpointResponses,
1262
+ DeleteReversePrivateEndpointErrors,
1263
+ ThrowOnError
1264
+ >({
1265
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints/{reversePrivateEndpointId}",
1266
+ ...options,
1267
+ });
1268
+ }
1269
+
1270
+ /**
1271
+ * Get reverse private endpoint
1272
+ * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the reverse private endpoint with the specified ID.
1273
+ */
1274
+ public getReversePrivateEndpoint<ThrowOnError extends boolean = true>(
1275
+ options: Options<GetReversePrivateEndpointData, ThrowOnError>,
1276
+ ) {
1277
+ return (options.client ?? this._client).get<
1278
+ GetReversePrivateEndpointResponses,
1279
+ GetReversePrivateEndpointErrors,
1280
+ ThrowOnError
1281
+ >({
1282
+ url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints/{reversePrivateEndpointId}",
1283
+ ...options,
1284
+ });
1285
+ }
1286
+ }