@distilled.cloud/clickhouse-cloud 0.0.0 → 1.0.0-rc.22

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 (183) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +134 -4
  3. package/lib/.lazy.json +1 -0
  4. package/lib/_bundle/lazy.js +4 -0
  5. package/lib/_bundle/sdk.js +2 -0
  6. package/lib/_bundle/sdk.js.map +1 -0
  7. package/lib/credentials.d.ts +34 -0
  8. package/lib/credentials.d.ts.map +1 -0
  9. package/lib/credentials.js +1 -0
  10. package/lib/errors.d.ts +58 -0
  11. package/lib/errors.d.ts.map +1 -0
  12. package/lib/errors.js +1 -0
  13. package/lib/index.d.ts +49 -0
  14. package/lib/index.d.ts.map +1 -0
  15. package/lib/index.js +6 -0
  16. package/lib/pagination.d.ts +10 -0
  17. package/lib/pagination.d.ts.map +1 -0
  18. package/lib/pagination.js +1 -0
  19. package/lib/protocol.d.ts +19 -0
  20. package/lib/protocol.d.ts.map +1 -0
  21. package/lib/protocol.js +1 -0
  22. package/lib/retry.d.ts +35 -0
  23. package/lib/retry.d.ts.map +1 -0
  24. package/lib/retry.js +1 -0
  25. package/lib/services/api_keys.d.ts +175 -0
  26. package/lib/services/api_keys.d.ts.map +1 -0
  27. package/lib/services/api_keys.js +2 -0
  28. package/lib/services/api_keys.js.map +1 -0
  29. package/lib/services/backup.d.ts +117 -0
  30. package/lib/services/backup.d.ts.map +1 -0
  31. package/lib/services/backup.js +2 -0
  32. package/lib/services/backup.js.map +1 -0
  33. package/lib/services/billing.d.ts +69 -0
  34. package/lib/services/billing.d.ts.map +1 -0
  35. package/lib/services/billing.js +2 -0
  36. package/lib/services/billing.js.map +1 -0
  37. package/lib/services/click_pipes.d.ts +1637 -0
  38. package/lib/services/click_pipes.d.ts.map +1 -0
  39. package/lib/services/click_pipes.js +31 -0
  40. package/lib/services/click_pipes.js.map +1 -0
  41. package/lib/services/index.d.ts +14 -0
  42. package/lib/services/index.d.ts.map +1 -0
  43. package/lib/services/index.js +13 -0
  44. package/lib/services/organization.d.ts +336 -0
  45. package/lib/services/organization.d.ts.map +1 -0
  46. package/lib/services/organization.js +2 -0
  47. package/lib/services/organization.js.map +1 -0
  48. package/lib/services/postgres.d.ts +726 -0
  49. package/lib/services/postgres.d.ts.map +1 -0
  50. package/lib/services/postgres.js +31 -0
  51. package/lib/services/postgres.js.map +1 -0
  52. package/lib/services/prometheus.d.ts +71 -0
  53. package/lib/services/prometheus.d.ts.map +1 -0
  54. package/lib/services/prometheus.js +2 -0
  55. package/lib/services/prometheus.js.map +1 -0
  56. package/lib/services/query_api_endpoints.d.ts +189 -0
  57. package/lib/services/query_api_endpoints.d.ts.map +1 -0
  58. package/lib/services/query_api_endpoints.js +2 -0
  59. package/lib/services/query_api_endpoints.js.map +1 -0
  60. package/lib/services/role_management.d.ts +159 -0
  61. package/lib/services/role_management.d.ts.map +1 -0
  62. package/lib/services/role_management.js +2 -0
  63. package/lib/services/role_management.js.map +1 -0
  64. package/lib/services/saved_queries.d.ts +129 -0
  65. package/lib/services/saved_queries.d.ts.map +1 -0
  66. package/lib/services/saved_queries.js +2 -0
  67. package/lib/services/saved_queries.js.map +1 -0
  68. package/lib/services/service.d.ts +886 -0
  69. package/lib/services/service.d.ts.map +1 -0
  70. package/lib/services/service.js +41 -0
  71. package/lib/services/service.js.map +1 -0
  72. package/lib/services/udf.d.ts +373 -0
  73. package/lib/services/udf.d.ts.map +1 -0
  74. package/lib/services/udf.js +24 -0
  75. package/lib/services/udf.js.map +1 -0
  76. package/lib/services/user_management.d.ts +150 -0
  77. package/lib/services/user_management.d.ts.map +1 -0
  78. package/lib/services/user_management.js +2 -0
  79. package/lib/services/user_management.js.map +1 -0
  80. package/lib/services.lazy/api_keys.js +1 -0
  81. package/lib/services.lazy/backup.js +1 -0
  82. package/lib/services.lazy/billing.js +1 -0
  83. package/lib/services.lazy/click_pipes.js +3 -0
  84. package/lib/services.lazy/index.js +3 -0
  85. package/lib/services.lazy/organization.js +1 -0
  86. package/lib/services.lazy/postgres.js +4 -0
  87. package/lib/services.lazy/prometheus.js +1 -0
  88. package/lib/services.lazy/query_api_endpoints.js +1 -0
  89. package/lib/services.lazy/role_management.js +1 -0
  90. package/lib/services.lazy/saved_queries.js +1 -0
  91. package/lib/services.lazy/service.js +4 -0
  92. package/lib/services.lazy/udf.js +3 -0
  93. package/lib/services.lazy/user_management.js +1 -0
  94. package/lib/traits.d.ts +11 -0
  95. package/lib/traits.d.ts.map +1 -0
  96. package/lib/traits.js +1 -0
  97. package/lib/unstable-services/backup.d.ts +165 -0
  98. package/lib/unstable-services/backup.d.ts.map +1 -0
  99. package/lib/unstable-services/backup.js +2 -0
  100. package/lib/unstable-services/backup.js.map +1 -0
  101. package/lib/unstable-services/billing.d.ts +84 -0
  102. package/lib/unstable-services/billing.d.ts.map +1 -0
  103. package/lib/unstable-services/billing.js +2 -0
  104. package/lib/unstable-services/billing.js.map +1 -0
  105. package/lib/unstable-services/click_pipes.d.ts +324 -0
  106. package/lib/unstable-services/click_pipes.d.ts.map +1 -0
  107. package/lib/unstable-services/click_pipes.js +2 -0
  108. package/lib/unstable-services/click_pipes.js.map +1 -0
  109. package/lib/unstable-services/click_stack.d.ts +3538 -0
  110. package/lib/unstable-services/click_stack.d.ts.map +1 -0
  111. package/lib/unstable-services/click_stack.js +60 -0
  112. package/lib/unstable-services/click_stack.js.map +1 -0
  113. package/lib/unstable-services/index.d.ts +11 -0
  114. package/lib/unstable-services/index.d.ts.map +1 -0
  115. package/lib/unstable-services/index.js +10 -0
  116. package/lib/unstable-services/notifications.d.ts +166 -0
  117. package/lib/unstable-services/notifications.d.ts.map +1 -0
  118. package/lib/unstable-services/notifications.js +2 -0
  119. package/lib/unstable-services/notifications.js.map +1 -0
  120. package/lib/unstable-services/organization.d.ts +403 -0
  121. package/lib/unstable-services/organization.d.ts.map +1 -0
  122. package/lib/unstable-services/organization.js +26 -0
  123. package/lib/unstable-services/organization.js.map +1 -0
  124. package/lib/unstable-services/postgres.d.ts +415 -0
  125. package/lib/unstable-services/postgres.d.ts.map +1 -0
  126. package/lib/unstable-services/postgres.js +2 -0
  127. package/lib/unstable-services/postgres.js.map +1 -0
  128. package/lib/unstable-services/service.d.ts +244 -0
  129. package/lib/unstable-services/service.d.ts.map +1 -0
  130. package/lib/unstable-services/service.js +2 -0
  131. package/lib/unstable-services/service.js.map +1 -0
  132. package/lib/unstable-services/snapshot.d.ts +146 -0
  133. package/lib/unstable-services/snapshot.d.ts.map +1 -0
  134. package/lib/unstable-services/snapshot.js +2 -0
  135. package/lib/unstable-services/snapshot.js.map +1 -0
  136. package/lib/unstable-services/user_management.d.ts +41 -0
  137. package/lib/unstable-services/user_management.d.ts.map +1 -0
  138. package/lib/unstable-services/user_management.js +2 -0
  139. package/lib/unstable-services/user_management.js.map +1 -0
  140. package/lib/unstable-services.lazy/backup.js +1 -0
  141. package/lib/unstable-services.lazy/billing.js +1 -0
  142. package/lib/unstable-services.lazy/click_pipes.js +1 -0
  143. package/lib/unstable-services.lazy/click_stack.js +4 -0
  144. package/lib/unstable-services.lazy/index.js +3 -0
  145. package/lib/unstable-services.lazy/notifications.js +1 -0
  146. package/lib/unstable-services.lazy/organization.js +4 -0
  147. package/lib/unstable-services.lazy/postgres.js +1 -0
  148. package/lib/unstable-services.lazy/service.js +1 -0
  149. package/lib/unstable-services.lazy/snapshot.js +1 -0
  150. package/lib/unstable-services.lazy/user_management.js +1 -0
  151. package/package.json +89 -2
  152. package/src/credentials.ts +88 -0
  153. package/src/errors.ts +76 -0
  154. package/src/index.ts +53 -0
  155. package/src/pagination.ts +9 -0
  156. package/src/protocol.ts +76 -0
  157. package/src/retry.ts +53 -0
  158. package/src/services/api_keys.ts +466 -0
  159. package/src/services/backup.ts +347 -0
  160. package/src/services/billing.ts +170 -0
  161. package/src/services/click_pipes.ts +3483 -0
  162. package/src/services/index.ts +14 -0
  163. package/src/services/organization.ts +901 -0
  164. package/src/services/postgres.ts +1967 -0
  165. package/src/services/prometheus.ts +271 -0
  166. package/src/services/query_api_endpoints.ts +466 -0
  167. package/src/services/role_management.ts +436 -0
  168. package/src/services/saved_queries.ts +384 -0
  169. package/src/services/service.ts +2112 -0
  170. package/src/services/udf.ts +1019 -0
  171. package/src/services/user_management.ts +508 -0
  172. package/src/traits.ts +45 -0
  173. package/src/unstable-services/backup.ts +422 -0
  174. package/src/unstable-services/billing.ts +232 -0
  175. package/src/unstable-services/click_pipes.ts +702 -0
  176. package/src/unstable-services/click_stack.ts +7114 -0
  177. package/src/unstable-services/index.ts +11 -0
  178. package/src/unstable-services/notifications.ts +451 -0
  179. package/src/unstable-services/organization.ts +1107 -0
  180. package/src/unstable-services/postgres.ts +1061 -0
  181. package/src/unstable-services/service.ts +795 -0
  182. package/src/unstable-services/snapshot.ts +397 -0
  183. package/src/unstable-services/user_management.ts +127 -0
@@ -0,0 +1,271 @@
1
+ import * as API from "@distilled.cloud/core/api";
2
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-clickhouse-cloud/specs/openapi.json). Do not edit.
3
+ import * as S from "@distilled.cloud/core/schema-lite";
4
+ import * as __L from "@distilled.cloud/core/schema-lite";
5
+ import { ClickHouseCloudServiceErrors } from "../errors.ts";
6
+ import {
7
+ ClickHouseCloudProtocol,
8
+ type ClickHouseCloudOpError,
9
+ type ClickHouseCloudOpContext,
10
+ } from "../protocol.ts";
11
+ import * as Retry from "../retry.ts";
12
+ import * as T from "../traits.ts";
13
+ // Schema table, filled on first reach (see __S at the end).
14
+ const __s: any[] = [];
15
+
16
+ export type { ClickHouseCloudOpError, ClickHouseCloudOpContext };
17
+
18
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
19
+ const TELEMETRY = {
20
+ system: "clickhouse-cloud-api",
21
+ responseHeaders: [
22
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
23
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
24
+ ],
25
+ prefix: "ClickhouseCloud",
26
+ service: "Prometheus",
27
+ labels: "clickhouse_cloud",
28
+ propagate: "w3c",
29
+ } as const;
30
+
31
+ export interface GetOrganizationPostgresPrometheusMetricsRequest {
32
+ /** ID of the requested organization. */
33
+ organizationId: string;
34
+ }
35
+ export type GetOrganizationPostgresPrometheusMetricsResponse = string;
36
+ export interface GetOrganizationPrometheusDiscoveryRequest {
37
+ /** ID of the requested organization. */
38
+ organizationId: string;
39
+ /** Whether discovered targets scrape a filtered list of metrics. Sets the filtered_metrics parameter on each discovered target. Defaults to true. */
40
+ filtered_metrics?: string | undefined;
41
+ }
42
+ /** Host (and port) of the ClickHouse Cloud API. */
43
+ export type PrometheusDiscoveryTargetGroupTargetsList = Array<string>;
44
+ export interface PrometheusDiscoveryLabels {
45
+ /** URL scheme Prometheus must scrape the target with. */
46
+ __scheme__?: string | undefined;
47
+ /** Path of the per-service Prometheus metrics endpoint. */
48
+ __metrics_path__?: string | undefined;
49
+ /** Value passed as the filtered_metrics query parameter on each scrape. */
50
+ __param_filtered_metrics?: string | undefined;
51
+ /** Organization ID the service belongs to. */
52
+ clickhouse_org_id?: string | undefined;
53
+ /** Service ID. */
54
+ clickhouse_service_id?: string | undefined;
55
+ /** Service name. */
56
+ clickhouse_discovery_service_name?: string | undefined;
57
+ /** Service region, for example `us-east-1`. */
58
+ __meta_clickhouse_region?: string | undefined;
59
+ /** Cloud provider, for example `aws`. */
60
+ __meta_clickhouse_provider?: string | undefined;
61
+ [key: string]: unknown;
62
+ }
63
+ export interface PrometheusDiscoveryTargetGroup {
64
+ /** Host (and port) of the ClickHouse Cloud API. */
65
+ targets?: PrometheusDiscoveryTargetGroupTargetsList | undefined;
66
+ labels?: PrometheusDiscoveryLabels | undefined;
67
+ }
68
+ export type GetOrganizationPrometheusDiscoveryResponseBodyList =
69
+ Array<PrometheusDiscoveryTargetGroup>;
70
+ export type GetOrganizationPrometheusDiscoveryResponse =
71
+ GetOrganizationPrometheusDiscoveryResponseBodyList;
72
+ export interface GetPostgresServicePrometheusMetricsRequest {
73
+ /** ID of the organization that owns the Postgres service. */
74
+ organizationId: string;
75
+ /** ID of the requested Postgres service. */
76
+ postgresId: string;
77
+ }
78
+ export type GetPostgresServicePrometheusMetricsResponse = string;
79
+ export interface GetServicePrometheusMetricsRequest {
80
+ /** ID of the organization that owns the service. */
81
+ organizationId: string;
82
+ /** ID of the requested service. */
83
+ serviceId: string;
84
+ /** Return a filtered list of Prometheus metrics. */
85
+ filtered_metrics?: string | undefined;
86
+ }
87
+ export type GetServicePrometheusMetricsResponse = string;
88
+ export type GetOrganizationPostgresPrometheusMetricsError = ClickHouseCloudOpError;
89
+ /** Get organization PostgreSQL metrics Returns Prometheus metrics for all PostgreSQL services in an organization. Maximum 100 services supported. */
90
+ export const getOrganizationPostgresPrometheusMetrics: API.OperationMethod<
91
+ GetOrganizationPostgresPrometheusMetricsRequest,
92
+ GetOrganizationPostgresPrometheusMetricsResponse,
93
+ GetOrganizationPostgresPrometheusMetricsError,
94
+ ClickHouseCloudOpContext
95
+ > = /*@__PURE__*/ API.make(() => ({
96
+ input: __S(0, __c0, 0) as any as S.Schema<GetOrganizationPostgresPrometheusMetricsRequest>,
97
+ output: __S(8, __c1, 0) as any as S.Schema<GetOrganizationPostgresPrometheusMetricsResponse>,
98
+ errors: [],
99
+ serviceErrors: ClickHouseCloudServiceErrors,
100
+ protocol: ClickHouseCloudProtocol,
101
+ retry: Retry.Retry,
102
+ telemetry: TELEMETRY,
103
+ span: "GetOrganizationPostgresPrometheusMetrics",
104
+ }));
105
+
106
+ export type GetOrganizationPrometheusDiscoveryError = ClickHouseCloudOpError;
107
+ /** Get Prometheus service discovery targets Returns one Prometheus scrape target per service in the organization, in the [HTTP service discovery](https://prometheus.io/docs/prometheus/latest/http_sd/) (`http_sd`) format. Only services the API key is authorized to view are included; services that are being deleted or have been deleted are omitted. Point an [`http_sd_configs`](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_sd_config) job at this endpoint to discover and scrape all services in the organization automatically. Prometheus refreshes the target list on every discovery poll, so newly created and deleted services are picked up without configuration changes. Filter targets in `relabel_configs` by `__meta_clickhouse_region`, `__meta_clickhouse_provider` or `__meta_clickhouse_tag_<key>`. Invalid label name characters in tag keys become `_`. `__meta_clickhouse_tagpresent_<key>` is `true` for every tag, including tags without a value. Discovered targets scrape with `filtered_metrics=true` by default; pass `?filtered_metrics=false` to this endpoint to discover unfiltered targets. See the [Prometheus integration guide](https://clickhouse.com/docs/integrations/prometheus) for more on the exported metrics. */
108
+ export const getOrganizationPrometheusDiscovery: API.OperationMethod<
109
+ GetOrganizationPrometheusDiscoveryRequest,
110
+ GetOrganizationPrometheusDiscoveryResponse,
111
+ GetOrganizationPrometheusDiscoveryError,
112
+ ClickHouseCloudOpContext
113
+ > = /*@__PURE__*/ API.make(() => ({
114
+ input: __S(16, __c2, 0) as any as S.Schema<GetOrganizationPrometheusDiscoveryRequest>,
115
+ output: __S(21, __c2, 5) as any as S.Schema<GetOrganizationPrometheusDiscoveryResponse>,
116
+ errors: [],
117
+ serviceErrors: ClickHouseCloudServiceErrors,
118
+ protocol: ClickHouseCloudProtocol,
119
+ retry: Retry.Retry,
120
+ telemetry: TELEMETRY,
121
+ span: "GetOrganizationPrometheusDiscovery",
122
+ }));
123
+
124
+ export type GetPostgresServicePrometheusMetricsError = ClickHouseCloudOpError;
125
+ /** Get PostgreSQL service metrics Returns Prometheus metrics for a PostgreSQL service. */
126
+ export const getPostgresServicePrometheusMetrics: API.OperationMethod<
127
+ GetPostgresServicePrometheusMetricsRequest,
128
+ GetPostgresServicePrometheusMetricsResponse,
129
+ GetPostgresServicePrometheusMetricsError,
130
+ ClickHouseCloudOpContext
131
+ > = /*@__PURE__*/ API.make(() => ({
132
+ input: __S(24, __c3, 0) as any as S.Schema<GetPostgresServicePrometheusMetricsRequest>,
133
+ output: __S(8, __c1, 0) as any as S.Schema<GetPostgresServicePrometheusMetricsResponse>,
134
+ errors: [],
135
+ serviceErrors: ClickHouseCloudServiceErrors,
136
+ protocol: ClickHouseCloudProtocol,
137
+ retry: Retry.Retry,
138
+ telemetry: TELEMETRY,
139
+ span: "GetPostgresServicePrometheusMetrics",
140
+ }));
141
+
142
+ export type GetServicePrometheusMetricsError = ClickHouseCloudOpError;
143
+ /** Get service metrics Returns prometheus metrics for a service. */
144
+ export const getServicePrometheusMetrics: API.OperationMethod<
145
+ GetServicePrometheusMetricsRequest,
146
+ GetServicePrometheusMetricsResponse,
147
+ GetServicePrometheusMetricsError,
148
+ ClickHouseCloudOpContext
149
+ > = /*@__PURE__*/ API.make(() => ({
150
+ input: __S(32, __c4, 0) as any as S.Schema<GetServicePrometheusMetricsRequest>,
151
+ output: __S(8, __c1, 0) as any as S.Schema<GetServicePrometheusMetricsResponse>,
152
+ errors: [],
153
+ serviceErrors: ClickHouseCloudServiceErrors,
154
+ protocol: ClickHouseCloudProtocol,
155
+ retry: Retry.Retry,
156
+ telemetry: TELEMETRY,
157
+ span: "GetServicePrometheusMetrics",
158
+ }));
159
+
160
+ // Schema builders: each runs one schema initializer, on that schema's first use.
161
+ function __c0(j: number): any {
162
+ switch (j) {
163
+ case 0:
164
+ return S.suspend(() =>
165
+ S.Struct({
166
+ organizationId: S.String.pipe(T.Label()),
167
+ }).pipe(
168
+ T.Http({
169
+ method: "GET",
170
+ uri: "/v1/organizations/{organizationId}/postgres/prometheus",
171
+ code: 200,
172
+ }),
173
+ ),
174
+ ).annotate({ identifier: "GetOrganizationPostgresPrometheusMetricsRequest" });
175
+ }
176
+ }
177
+ function __c1(j: number): any {
178
+ switch (j) {
179
+ case 0:
180
+ return S.suspend(() => S.String.pipe(T.RawResponseRoot())).annotate({
181
+ identifier: "GetOrganizationPostgresPrometheusMetricsResponse",
182
+ });
183
+ }
184
+ }
185
+ function __c2(j: number): any {
186
+ switch (j) {
187
+ case 0:
188
+ return S.suspend(() =>
189
+ S.Struct({
190
+ organizationId: S.String.pipe(T.Label()),
191
+ filtered_metrics: S.optional(S.String.pipe(T.Query())),
192
+ }).pipe(
193
+ T.Http({
194
+ method: "GET",
195
+ uri: "/v1/organizations/{organizationId}/prometheus/discovery",
196
+ code: 200,
197
+ }),
198
+ ),
199
+ ).annotate({ identifier: "GetOrganizationPrometheusDiscoveryRequest" });
200
+ case 1:
201
+ return S.Array(S.String);
202
+ case 2:
203
+ return S.suspend(() =>
204
+ S.StructWithRest(
205
+ S.Struct({
206
+ __scheme__: S.optional(S.String),
207
+ __metrics_path__: S.optional(S.String),
208
+ __param_filtered_metrics: S.optional(S.String),
209
+ clickhouse_org_id: S.optional(S.String),
210
+ clickhouse_service_id: S.optional(S.String),
211
+ clickhouse_discovery_service_name: S.optional(S.String),
212
+ __meta_clickhouse_region: S.optional(S.String),
213
+ __meta_clickhouse_provider: S.optional(S.String),
214
+ }),
215
+ [S.Record(S.String, S.Unknown)],
216
+ ),
217
+ ).annotate({ identifier: "PrometheusDiscoveryLabels" });
218
+ case 3:
219
+ return S.suspend(() =>
220
+ S.Struct({
221
+ targets: S.optional(__S(17, __c2, 1)),
222
+ labels: S.optional(__S(18, __c2, 2)),
223
+ }),
224
+ ).annotate({ identifier: "PrometheusDiscoveryTargetGroup" });
225
+ case 4:
226
+ return S.Array(__S(19, __c2, 3));
227
+ case 5:
228
+ return S.suspend(() => __S(20, __c2, 4).pipe(T.RawResponseRoot())).annotate({
229
+ identifier: "GetOrganizationPrometheusDiscoveryResponse",
230
+ });
231
+ }
232
+ }
233
+ function __c3(j: number): any {
234
+ switch (j) {
235
+ case 0:
236
+ return S.suspend(() =>
237
+ S.Struct({
238
+ organizationId: S.String.pipe(T.Label()),
239
+ postgresId: S.String.pipe(T.Label()),
240
+ }).pipe(
241
+ T.Http({
242
+ method: "GET",
243
+ uri: "/v1/organizations/{organizationId}/postgres/{postgresId}/prometheus",
244
+ code: 200,
245
+ }),
246
+ ),
247
+ ).annotate({ identifier: "GetPostgresServicePrometheusMetricsRequest" });
248
+ }
249
+ }
250
+ function __c4(j: number): any {
251
+ switch (j) {
252
+ case 0:
253
+ return S.suspend(() =>
254
+ S.Struct({
255
+ organizationId: S.String.pipe(T.Label()),
256
+ serviceId: S.String.pipe(T.Label()),
257
+ filtered_metrics: S.optional(S.String.pipe(T.Query())),
258
+ }).pipe(
259
+ T.Http({
260
+ method: "GET",
261
+ uri: "/v1/organizations/{organizationId}/services/{serviceId}/prometheus",
262
+ code: 200,
263
+ }),
264
+ ),
265
+ ).annotate({ identifier: "GetServicePrometheusMetricsRequest" });
266
+ }
267
+ }
268
+ // Schema table: entry i is schema j of builder f, made on first reach.
269
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
270
+ return (__s[i] ??= __L.at(f, j));
271
+ }