@distilled.cloud/starburst-galaxy 0.0.0 → 1.0.0-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +110 -4
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +84 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +1 -0
- package/lib/errors.d.ts +83 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +1 -0
- package/lib/index.d.ts +42 -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 +29 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +1 -0
- package/lib/retry.d.ts +32 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +1 -0
- package/lib/services/catalog.d.ts +2791 -0
- package/lib/services/catalog.d.ts.map +1 -0
- package/lib/services/catalog.js +101 -0
- package/lib/services/catalog.js.map +1 -0
- package/lib/services/cluster.d.ts +248 -0
- package/lib/services/cluster.d.ts.map +1 -0
- package/lib/services/cluster.js +2 -0
- package/lib/services/cluster.js.map +1 -0
- package/lib/services/column_mask.d.ts +162 -0
- package/lib/services/column_mask.d.ts.map +1 -0
- package/lib/services/column_mask.js +2 -0
- package/lib/services/column_mask.js.map +1 -0
- package/lib/services/cross_account_iam_role.d.ts +133 -0
- package/lib/services/cross_account_iam_role.d.ts.map +1 -0
- package/lib/services/cross_account_iam_role.js +2 -0
- package/lib/services/cross_account_iam_role.js.map +1 -0
- package/lib/services/data_domain.d.ts +223 -0
- package/lib/services/data_domain.d.ts.map +1 -0
- package/lib/services/data_domain.js +2 -0
- package/lib/services/data_domain.js.map +1 -0
- package/lib/services/data_product.d.ts +290 -0
- package/lib/services/data_product.d.ts.map +1 -0
- package/lib/services/data_product.js +2 -0
- package/lib/services/data_product.js.map +1 -0
- package/lib/services/data_product_usage_example.d.ts +158 -0
- package/lib/services/data_product_usage_example.d.ts.map +1 -0
- package/lib/services/data_product_usage_example.js +2 -0
- package/lib/services/data_product_usage_example.js.map +1 -0
- package/lib/services/data_quality.d.ts +344 -0
- package/lib/services/data_quality.d.ts.map +1 -0
- package/lib/services/data_quality.js +2 -0
- package/lib/services/data_quality.js.map +1 -0
- package/lib/services/data_quality_metrics.d.ts +282 -0
- package/lib/services/data_quality_metrics.d.ts.map +1 -0
- package/lib/services/data_quality_metrics.js +2 -0
- package/lib/services/data_quality_metrics.js.map +1 -0
- package/lib/services/data_quality_schedule.d.ts +220 -0
- package/lib/services/data_quality_schedule.d.ts.map +1 -0
- package/lib/services/data_quality_schedule.js +2 -0
- package/lib/services/data_quality_schedule.js.map +1 -0
- package/lib/services/discovery.d.ts +439 -0
- package/lib/services/discovery.d.ts.map +1 -0
- package/lib/services/discovery.js +36 -0
- package/lib/services/discovery.js.map +1 -0
- package/lib/services/file_ingest_source.d.ts +205 -0
- package/lib/services/file_ingest_source.d.ts.map +1 -0
- package/lib/services/file_ingest_source.js +2 -0
- package/lib/services/file_ingest_source.js.map +1 -0
- package/lib/services/group.d.ts +140 -0
- package/lib/services/group.d.ts.map +1 -0
- package/lib/services/group.js +2 -0
- package/lib/services/group.js.map +1 -0
- package/lib/services/index.d.ts +26 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +25 -0
- package/lib/services/kafka_ingest_source.d.ts +236 -0
- package/lib/services/kafka_ingest_source.d.ts.map +1 -0
- package/lib/services/kafka_ingest_source.js +2 -0
- package/lib/services/kafka_ingest_source.js.map +1 -0
- package/lib/services/live_table.d.ts +851 -0
- package/lib/services/live_table.d.ts.map +1 -0
- package/lib/services/live_table.js +20 -0
- package/lib/services/live_table.js.map +1 -0
- package/lib/services/policy.d.ts +213 -0
- package/lib/services/policy.d.ts.map +1 -0
- package/lib/services/policy.js +2 -0
- package/lib/services/policy.js.map +1 -0
- package/lib/services/privatelink.d.ts +95 -0
- package/lib/services/privatelink.d.ts.map +1 -0
- package/lib/services/privatelink.js +2 -0
- package/lib/services/privatelink.js.map +1 -0
- package/lib/services/privilege.d.ts +167 -0
- package/lib/services/privilege.d.ts.map +1 -0
- package/lib/services/privilege.js +2 -0
- package/lib/services/privilege.js.map +1 -0
- package/lib/services/role.d.ts +222 -0
- package/lib/services/role.d.ts.map +1 -0
- package/lib/services/role.js +2 -0
- package/lib/services/role.js.map +1 -0
- package/lib/services/row_filter.d.ts +155 -0
- package/lib/services/row_filter.d.ts.map +1 -0
- package/lib/services/row_filter.js +2 -0
- package/lib/services/row_filter.js.map +1 -0
- package/lib/services/schema_discovery.d.ts +236 -0
- package/lib/services/schema_discovery.d.ts.map +1 -0
- package/lib/services/schema_discovery.js +2 -0
- package/lib/services/schema_discovery.js.map +1 -0
- package/lib/services/service_account.d.ts +206 -0
- package/lib/services/service_account.d.ts.map +1 -0
- package/lib/services/service_account.js +2 -0
- package/lib/services/service_account.js.map +1 -0
- package/lib/services/sql_jobs.d.ts +264 -0
- package/lib/services/sql_jobs.d.ts.map +1 -0
- package/lib/services/sql_jobs.js +2 -0
- package/lib/services/sql_jobs.js.map +1 -0
- package/lib/services/tag.d.ts +287 -0
- package/lib/services/tag.d.ts.map +1 -0
- package/lib/services/tag.js +2 -0
- package/lib/services/tag.js.map +1 -0
- package/lib/services/user.d.ts +175 -0
- package/lib/services/user.d.ts.map +1 -0
- package/lib/services/user.js +2 -0
- package/lib/services/user.js.map +1 -0
- package/lib/services.lazy/catalog.js +4 -0
- package/lib/services.lazy/cluster.js +1 -0
- package/lib/services.lazy/column_mask.js +1 -0
- package/lib/services.lazy/cross_account_iam_role.js +1 -0
- package/lib/services.lazy/data_domain.js +1 -0
- package/lib/services.lazy/data_product.js +1 -0
- package/lib/services.lazy/data_product_usage_example.js +1 -0
- package/lib/services.lazy/data_quality.js +1 -0
- package/lib/services.lazy/data_quality_metrics.js +1 -0
- package/lib/services.lazy/data_quality_schedule.js +1 -0
- package/lib/services.lazy/discovery.js +4 -0
- package/lib/services.lazy/file_ingest_source.js +1 -0
- package/lib/services.lazy/group.js +1 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/kafka_ingest_source.js +1 -0
- package/lib/services.lazy/live_table.js +4 -0
- package/lib/services.lazy/policy.js +1 -0
- package/lib/services.lazy/privatelink.js +1 -0
- package/lib/services.lazy/privilege.js +1 -0
- package/lib/services.lazy/role.js +1 -0
- package/lib/services.lazy/row_filter.js +1 -0
- package/lib/services.lazy/schema_discovery.js +1 -0
- package/lib/services.lazy/service_account.js +1 -0
- package/lib/services.lazy/sql_jobs.js +1 -0
- package/lib/services.lazy/tag.js +1 -0
- package/lib/services.lazy/user.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/package.json +82 -2
- package/src/credentials.ts +205 -0
- package/src/errors.ts +102 -0
- package/src/index.ts +45 -0
- package/src/pagination.ts +9 -0
- package/src/protocol.ts +94 -0
- package/src/retry.ts +50 -0
- package/src/services/catalog.ts +6636 -0
- package/src/services/cluster.ts +492 -0
- package/src/services/column_mask.ts +388 -0
- package/src/services/cross_account_iam_role.ts +328 -0
- package/src/services/data_domain.ts +509 -0
- package/src/services/data_product.ts +641 -0
- package/src/services/data_product_usage_example.ts +380 -0
- package/src/services/data_quality.ts +771 -0
- package/src/services/data_quality_metrics.ts +580 -0
- package/src/services/data_quality_schedule.ts +454 -0
- package/src/services/discovery.ts +1257 -0
- package/src/services/file_ingest_source.ts +480 -0
- package/src/services/group.ts +282 -0
- package/src/services/index.ts +26 -0
- package/src/services/kafka_ingest_source.ts +545 -0
- package/src/services/live_table.ts +1537 -0
- package/src/services/policy.ts +526 -0
- package/src/services/privatelink.ts +209 -0
- package/src/services/privilege.ts +423 -0
- package/src/services/role.ts +501 -0
- package/src/services/row_filter.ts +365 -0
- package/src/services/schema_discovery.ts +516 -0
- package/src/services/service_account.ts +525 -0
- package/src/services/sql_jobs.ts +621 -0
- package/src/services/tag.ts +785 -0
- package/src/services/user.ts +375 -0
- package/src/traits.ts +44 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as C from "@distilled.cloud/core/category";
|
|
3
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-starburst-galaxy/specs/{v1,v2}.json). Do not edit.
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import { StarburstGalaxyServiceErrors } from "../errors.ts";
|
|
7
|
+
import { paginateToken } from "../pagination.ts";
|
|
8
|
+
import {
|
|
9
|
+
StarburstGalaxyProtocol,
|
|
10
|
+
type StarburstGalaxyOpError,
|
|
11
|
+
type StarburstGalaxyOpContext,
|
|
12
|
+
} from "../protocol.ts";
|
|
13
|
+
import * as Retry from "../retry.ts";
|
|
14
|
+
import * as T from "../traits.ts";
|
|
15
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
16
|
+
const __s: any[] = [];
|
|
17
|
+
|
|
18
|
+
export type { StarburstGalaxyOpError, StarburstGalaxyOpContext };
|
|
19
|
+
|
|
20
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
21
|
+
const TELEMETRY = {
|
|
22
|
+
system: "starburst-galaxy-api",
|
|
23
|
+
responseHeaders: [
|
|
24
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
25
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
26
|
+
],
|
|
27
|
+
prefix: "StarburstGalaxy",
|
|
28
|
+
service: "PrivatelinkService",
|
|
29
|
+
labels: "starburst_galaxy",
|
|
30
|
+
propagate: "w3c",
|
|
31
|
+
} as const;
|
|
32
|
+
|
|
33
|
+
export class BadRequest
|
|
34
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
35
|
+
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
36
|
+
message: S.String,
|
|
37
|
+
body: S.Unknown,
|
|
38
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
39
|
+
}).pipe(C.withBadRequestError),
|
|
40
|
+
[{ status: 400 }],
|
|
41
|
+
) {}
|
|
42
|
+
|
|
43
|
+
export class Forbidden
|
|
44
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
45
|
+
/*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
|
|
46
|
+
message: S.String,
|
|
47
|
+
body: S.Unknown,
|
|
48
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
49
|
+
}).pipe(C.withAuthError),
|
|
50
|
+
[{ status: 403 }],
|
|
51
|
+
) {}
|
|
52
|
+
|
|
53
|
+
export class NotFound
|
|
54
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
55
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
56
|
+
message: S.String,
|
|
57
|
+
body: S.Unknown,
|
|
58
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
59
|
+
}).pipe(C.withBadRequestError),
|
|
60
|
+
[{ status: 404 }],
|
|
61
|
+
) {}
|
|
62
|
+
|
|
63
|
+
export interface GetPrivateLinkRequest {
|
|
64
|
+
/** - A private link - This parameter can be looked up using `name` instead of its Id. Use `name=value` instead of an Id to lookup/search using the `value`. `value` must be encoded ([see RFC](https://www.rfc-editor.org/rfc/rfc3986#section-2.2) including `=`) */
|
|
65
|
+
privatelinkId: string;
|
|
66
|
+
}
|
|
67
|
+
/** A private link (read only) */
|
|
68
|
+
export interface Privatelink {
|
|
69
|
+
/** Private link ID (read only) */
|
|
70
|
+
privatelinkId: string;
|
|
71
|
+
/** Name (read only) */
|
|
72
|
+
name: string;
|
|
73
|
+
/** Cloud region ID (read only) */
|
|
74
|
+
cloudRegionId: string;
|
|
75
|
+
}
|
|
76
|
+
export interface ListPrivateLinksRequest {
|
|
77
|
+
/** Pagination token */
|
|
78
|
+
pageToken?: string | undefined;
|
|
79
|
+
/** Page size or 0 for default (current maximum is 100) */
|
|
80
|
+
pageSize?: number | undefined;
|
|
81
|
+
}
|
|
82
|
+
/** A page of results. */
|
|
83
|
+
export type PaginatedPrivatelinkResultList = Array<Privatelink>;
|
|
84
|
+
export interface PaginatedPrivatelink {
|
|
85
|
+
/** The next page token to use or "" if there are no more pages. */
|
|
86
|
+
nextPageToken?: string | undefined;
|
|
87
|
+
/** A page of results. */
|
|
88
|
+
result: PaginatedPrivatelinkResultList;
|
|
89
|
+
}
|
|
90
|
+
/** Any fields/values that are invalid or incorrect */
|
|
91
|
+
export type BadRequestFieldsList = Array<string>;
|
|
92
|
+
/** Invalid request */
|
|
93
|
+
export interface BadRequest2 {
|
|
94
|
+
/** Description of the error */
|
|
95
|
+
message?: string | undefined;
|
|
96
|
+
/** Any fields/values that are invalid or incorrect */
|
|
97
|
+
fields?: BadRequestFieldsList | undefined;
|
|
98
|
+
}
|
|
99
|
+
/** Authorization failed */
|
|
100
|
+
export interface Forbidden2 {
|
|
101
|
+
message?: string | undefined;
|
|
102
|
+
}
|
|
103
|
+
/** Any fields/values that weren't found */
|
|
104
|
+
export type NotFoundFieldsList = Array<string>;
|
|
105
|
+
/** A resource or required component was not found */
|
|
106
|
+
export interface NotFound2 {
|
|
107
|
+
/** Name of the resource */
|
|
108
|
+
message: string;
|
|
109
|
+
/** Violation description */
|
|
110
|
+
description?: string | undefined;
|
|
111
|
+
/** Any fields/values that weren't found */
|
|
112
|
+
fields?: NotFoundFieldsList | undefined;
|
|
113
|
+
}
|
|
114
|
+
export type GetPrivateLinkError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
|
|
115
|
+
/** Get a private link by ID */
|
|
116
|
+
export const getPrivateLink: API.OperationMethod<
|
|
117
|
+
GetPrivateLinkRequest,
|
|
118
|
+
Privatelink,
|
|
119
|
+
GetPrivateLinkError,
|
|
120
|
+
StarburstGalaxyOpContext
|
|
121
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
122
|
+
input: __S(0, __c0, 0) as any as S.Schema<GetPrivateLinkRequest>,
|
|
123
|
+
output: __S(4, __c1, 0) as any as S.Schema<Privatelink>,
|
|
124
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
125
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
126
|
+
protocol: StarburstGalaxyProtocol,
|
|
127
|
+
retry: Retry.Retry,
|
|
128
|
+
telemetry: TELEMETRY,
|
|
129
|
+
span: "GetPrivateLink",
|
|
130
|
+
}));
|
|
131
|
+
|
|
132
|
+
export type ListPrivateLinksError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
|
|
133
|
+
/** Get all private links for your account */
|
|
134
|
+
export const listPrivateLinks: API.PaginatedOperationMethod<
|
|
135
|
+
ListPrivateLinksRequest,
|
|
136
|
+
PaginatedPrivatelink,
|
|
137
|
+
ListPrivateLinksError,
|
|
138
|
+
StarburstGalaxyOpContext,
|
|
139
|
+
Privatelink
|
|
140
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
141
|
+
() => ({
|
|
142
|
+
input: __S(8, __c2, 0) as any as S.Schema<ListPrivateLinksRequest>,
|
|
143
|
+
output: __S(10, __c2, 2) as any as S.Schema<PaginatedPrivatelink>,
|
|
144
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
145
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
146
|
+
protocol: StarburstGalaxyProtocol,
|
|
147
|
+
retry: Retry.Retry,
|
|
148
|
+
telemetry: TELEMETRY,
|
|
149
|
+
span: "ListPrivateLinks",
|
|
150
|
+
pagination: {
|
|
151
|
+
mode: "token",
|
|
152
|
+
inputToken: "pageToken",
|
|
153
|
+
outputToken: "nextPageToken",
|
|
154
|
+
items: "result",
|
|
155
|
+
pageSize: "pageSize",
|
|
156
|
+
} as const,
|
|
157
|
+
}),
|
|
158
|
+
paginateToken,
|
|
159
|
+
) as any;
|
|
160
|
+
|
|
161
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
162
|
+
function __c0(j: number): any {
|
|
163
|
+
switch (j) {
|
|
164
|
+
case 0:
|
|
165
|
+
return S.suspend(() =>
|
|
166
|
+
S.Struct({
|
|
167
|
+
privatelinkId: S.String.pipe(T.Label()),
|
|
168
|
+
}).pipe(
|
|
169
|
+
T.Http({ method: "GET", uri: "/public/api/v1/privatelink/{privatelinkId}", code: 200 }),
|
|
170
|
+
),
|
|
171
|
+
).annotate({ identifier: "GetPrivateLinkRequest" });
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function __c1(j: number): any {
|
|
175
|
+
switch (j) {
|
|
176
|
+
case 0:
|
|
177
|
+
return S.suspend(() =>
|
|
178
|
+
S.Struct({
|
|
179
|
+
privatelinkId: S.String,
|
|
180
|
+
name: S.String,
|
|
181
|
+
cloudRegionId: S.String,
|
|
182
|
+
}),
|
|
183
|
+
).annotate({ identifier: "Privatelink" });
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
function __c2(j: number): any {
|
|
187
|
+
switch (j) {
|
|
188
|
+
case 0:
|
|
189
|
+
return S.suspend(() =>
|
|
190
|
+
S.Struct({
|
|
191
|
+
pageToken: S.optional(S.String.pipe(T.Query())),
|
|
192
|
+
pageSize: S.optional(S.Number.pipe(T.Query())),
|
|
193
|
+
}).pipe(T.Http({ method: "GET", uri: "/public/api/v1/privatelink", code: 200 })),
|
|
194
|
+
).annotate({ identifier: "ListPrivateLinksRequest" });
|
|
195
|
+
case 1:
|
|
196
|
+
return S.Array(__S(4, __c1, 0));
|
|
197
|
+
case 2:
|
|
198
|
+
return S.suspend(() =>
|
|
199
|
+
S.Struct({
|
|
200
|
+
nextPageToken: S.optional(S.String),
|
|
201
|
+
result: __S(9, __c2, 1),
|
|
202
|
+
}),
|
|
203
|
+
).annotate({ identifier: "PaginatedPrivatelink" });
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
207
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
208
|
+
return (__s[i] ??= __L.at(f, j));
|
|
209
|
+
}
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as C from "@distilled.cloud/core/category";
|
|
3
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-starburst-galaxy/specs/{v1,v2}.json). Do not edit.
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import { StarburstGalaxyServiceErrors } from "../errors.ts";
|
|
7
|
+
import { paginateToken } from "../pagination.ts";
|
|
8
|
+
import {
|
|
9
|
+
StarburstGalaxyProtocol,
|
|
10
|
+
type StarburstGalaxyOpError,
|
|
11
|
+
type StarburstGalaxyOpContext,
|
|
12
|
+
} from "../protocol.ts";
|
|
13
|
+
import * as Retry from "../retry.ts";
|
|
14
|
+
import * as T from "../traits.ts";
|
|
15
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
16
|
+
const __s: any[] = [];
|
|
17
|
+
|
|
18
|
+
export type { StarburstGalaxyOpError, StarburstGalaxyOpContext };
|
|
19
|
+
|
|
20
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
21
|
+
const TELEMETRY = {
|
|
22
|
+
system: "starburst-galaxy-api",
|
|
23
|
+
responseHeaders: [
|
|
24
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
25
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
26
|
+
],
|
|
27
|
+
prefix: "StarburstGalaxy",
|
|
28
|
+
service: "PrivilegeService",
|
|
29
|
+
labels: "starburst_galaxy",
|
|
30
|
+
propagate: "w3c",
|
|
31
|
+
} as const;
|
|
32
|
+
|
|
33
|
+
export class BadRequest
|
|
34
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
35
|
+
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
36
|
+
message: S.String,
|
|
37
|
+
body: S.Unknown,
|
|
38
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
39
|
+
}).pipe(C.withBadRequestError),
|
|
40
|
+
[{ status: 400 }],
|
|
41
|
+
) {}
|
|
42
|
+
|
|
43
|
+
export class Conflict
|
|
44
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
45
|
+
/*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
|
|
46
|
+
message: S.String,
|
|
47
|
+
body: S.Unknown,
|
|
48
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
49
|
+
}).pipe(C.withConflictError),
|
|
50
|
+
[{ status: 409 }],
|
|
51
|
+
) {}
|
|
52
|
+
|
|
53
|
+
export class Forbidden
|
|
54
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
55
|
+
/*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
|
|
56
|
+
message: S.String,
|
|
57
|
+
body: S.Unknown,
|
|
58
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
59
|
+
}).pipe(C.withAuthError),
|
|
60
|
+
[{ status: 403 }],
|
|
61
|
+
) {}
|
|
62
|
+
|
|
63
|
+
export class NotFound
|
|
64
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
65
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
66
|
+
message: S.String,
|
|
67
|
+
body: S.Unknown,
|
|
68
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
69
|
+
}).pipe(C.withBadRequestError),
|
|
70
|
+
[{ status: 404 }],
|
|
71
|
+
) {}
|
|
72
|
+
|
|
73
|
+
export type GrantKind = "Allow" | "Deny";
|
|
74
|
+
export type EntityKind =
|
|
75
|
+
| "Account"
|
|
76
|
+
| "AiModel"
|
|
77
|
+
| "AgentSkill"
|
|
78
|
+
| "ExternalMcpServer"
|
|
79
|
+
| "AgentPersona"
|
|
80
|
+
| "Cluster"
|
|
81
|
+
| "Catalog"
|
|
82
|
+
| "Schema"
|
|
83
|
+
| "Table"
|
|
84
|
+
| "Column"
|
|
85
|
+
| "Location"
|
|
86
|
+
| "Function"
|
|
87
|
+
| "Tag"
|
|
88
|
+
| "TableBranch"
|
|
89
|
+
| "Policy"
|
|
90
|
+
| "RowFilter"
|
|
91
|
+
| "DataProduct"
|
|
92
|
+
| "DataDomain";
|
|
93
|
+
export type PrivilegeEnum =
|
|
94
|
+
| "ManageSecurity"
|
|
95
|
+
| "CreateRole"
|
|
96
|
+
| "CreateUser"
|
|
97
|
+
| "CreateCluster"
|
|
98
|
+
| "CreateCatalog"
|
|
99
|
+
| "CreateAiModel"
|
|
100
|
+
| "UseAiModel"
|
|
101
|
+
| "ViewAuditLog"
|
|
102
|
+
| "ManageBilling"
|
|
103
|
+
| "ManageNotifications"
|
|
104
|
+
| "ViewAllQueryHistory"
|
|
105
|
+
| "ManageSso"
|
|
106
|
+
| "SsoUserPasswordLogin"
|
|
107
|
+
| "ViewAllDataLineage"
|
|
108
|
+
| "UseCluster"
|
|
109
|
+
| "EnableDisableCluster"
|
|
110
|
+
| "MonitorCluster"
|
|
111
|
+
| "TroubleshootQuery"
|
|
112
|
+
| "CreateSchema"
|
|
113
|
+
| "CreateTable"
|
|
114
|
+
| "CreateBranch"
|
|
115
|
+
| "Insert"
|
|
116
|
+
| "Delete"
|
|
117
|
+
| "Select"
|
|
118
|
+
| "Update"
|
|
119
|
+
| "ManageDataObservability"
|
|
120
|
+
| "CreateSql"
|
|
121
|
+
| "Execute"
|
|
122
|
+
| "ManageServiceAccount"
|
|
123
|
+
| "ManageServiceAccountToken"
|
|
124
|
+
| "ManageOauthClient"
|
|
125
|
+
| "ViewPublicOauthClient"
|
|
126
|
+
| "ManageAccountWork"
|
|
127
|
+
| "CreateTag"
|
|
128
|
+
| "ApplyTag"
|
|
129
|
+
| "GenerativeAiFeatures"
|
|
130
|
+
| "ManageIngestStreams"
|
|
131
|
+
| "CreateFunction"
|
|
132
|
+
| "CancelQuery"
|
|
133
|
+
| "ViewDataProduct"
|
|
134
|
+
| "ManageCertification"
|
|
135
|
+
| "DownloadQueryResults"
|
|
136
|
+
| "ManageQueryRoutingRules"
|
|
137
|
+
| "ManageIcehouseOps"
|
|
138
|
+
| "CreateDataDomain"
|
|
139
|
+
| "ViewAllQueryProfilerResults"
|
|
140
|
+
| "CreateAgentSkill"
|
|
141
|
+
| "UseAgentSkill"
|
|
142
|
+
| "PublishDataProduct"
|
|
143
|
+
| "CreateDataProduct"
|
|
144
|
+
| "Alter"
|
|
145
|
+
| "View"
|
|
146
|
+
| "CreateExternalMcpServer"
|
|
147
|
+
| "UseExternalMcpServer"
|
|
148
|
+
| "CreateAgentPersona"
|
|
149
|
+
| "UseAgentPersona";
|
|
150
|
+
export interface GrantRolePrivilegeRequest {
|
|
151
|
+
/** - A role - This parameter can be looked up using `name` instead of its Id. Use `name=value` instead of an Id to lookup/search using the `value`. `value` must be encoded ([see RFC](https://www.rfc-editor.org/rfc/rfc3986#section-2.2) including `=`) */
|
|
152
|
+
roleId: string;
|
|
153
|
+
/** Grant kind */
|
|
154
|
+
grantKind: GrantKind | (string & {});
|
|
155
|
+
/** Entity ID */
|
|
156
|
+
entityId: string;
|
|
157
|
+
/** Entity kind */
|
|
158
|
+
entityKind: EntityKind | (string & {});
|
|
159
|
+
/** Grant option */
|
|
160
|
+
grantOption: boolean;
|
|
161
|
+
/** Privilege */
|
|
162
|
+
privilege: PrivilegeEnum | (string & {});
|
|
163
|
+
/** Schema name */
|
|
164
|
+
schemaName?: string | undefined;
|
|
165
|
+
/** Table name */
|
|
166
|
+
tableName?: string | undefined;
|
|
167
|
+
/** Column name */
|
|
168
|
+
columnName?: string | undefined;
|
|
169
|
+
}
|
|
170
|
+
export interface GrantRolePrivilegeResponse {}
|
|
171
|
+
export interface ListRolePrivilegesRequest {
|
|
172
|
+
/** - A role - This parameter can be looked up using `name` instead of its Id. Use `name=value` instead of an Id to lookup/search using the `value`. `value` must be encoded ([see RFC](https://www.rfc-editor.org/rfc/rfc3986#section-2.2) including `=`) */
|
|
173
|
+
roleId: string;
|
|
174
|
+
/** Pagination token */
|
|
175
|
+
pageToken?: string | undefined;
|
|
176
|
+
/** Page size or 0 for default (current maximum is 100) */
|
|
177
|
+
pageSize?: number | undefined;
|
|
178
|
+
/** Lists all inherited and directly granted privileges if true, or only directly granted privileges if false. */
|
|
179
|
+
listAllPrivileges?: boolean | undefined;
|
|
180
|
+
}
|
|
181
|
+
/** A role privilege (read only) */
|
|
182
|
+
export interface GrantedPrivilege {
|
|
183
|
+
/** Grant kind */
|
|
184
|
+
grantKind: GrantKind;
|
|
185
|
+
/** Entity ID */
|
|
186
|
+
entityId: string;
|
|
187
|
+
/** Entity kind */
|
|
188
|
+
entityKind: EntityKind;
|
|
189
|
+
/** Grant option */
|
|
190
|
+
grantOption: boolean;
|
|
191
|
+
/** Privilege */
|
|
192
|
+
privilege: PrivilegeEnum;
|
|
193
|
+
/** Schema name */
|
|
194
|
+
schemaName?: string | undefined;
|
|
195
|
+
/** Table name */
|
|
196
|
+
tableName?: string | undefined;
|
|
197
|
+
/** Column name */
|
|
198
|
+
columnName?: string | undefined;
|
|
199
|
+
}
|
|
200
|
+
/** A page of results. */
|
|
201
|
+
export type PaginatedGrantedPrivilegeResultList = Array<GrantedPrivilege>;
|
|
202
|
+
export interface PaginatedGrantedPrivilege {
|
|
203
|
+
/** The next page token to use or "" if there are no more pages. */
|
|
204
|
+
nextPageToken?: string | undefined;
|
|
205
|
+
/** A page of results. */
|
|
206
|
+
result: PaginatedGrantedPrivilegeResultList;
|
|
207
|
+
}
|
|
208
|
+
export type RevokeAction = "RevokeGrantOption" | "RemoveRoleGrant";
|
|
209
|
+
export interface RevokeRolePrivilegeRequest {
|
|
210
|
+
/** - A role - This parameter can be looked up using `name` instead of its Id. Use `name=value` instead of an Id to lookup/search using the `value`. `value` must be encoded ([see RFC](https://www.rfc-editor.org/rfc/rfc3986#section-2.2) including `=`) */
|
|
211
|
+
roleId: string;
|
|
212
|
+
/** Entity ID */
|
|
213
|
+
entityId: string;
|
|
214
|
+
/** Entity kind */
|
|
215
|
+
entityKind: EntityKind | (string & {});
|
|
216
|
+
/** Privilege */
|
|
217
|
+
privilege: PrivilegeEnum | (string & {});
|
|
218
|
+
/** Schema name */
|
|
219
|
+
schemaName?: string | undefined;
|
|
220
|
+
/** Table name */
|
|
221
|
+
tableName?: string | undefined;
|
|
222
|
+
/** Column name */
|
|
223
|
+
columnName?: string | undefined;
|
|
224
|
+
/** Revoke grant option or remove role privilege */
|
|
225
|
+
revokeAction: RevokeAction | (string & {});
|
|
226
|
+
}
|
|
227
|
+
export interface RevokeRolePrivilegeResponse {}
|
|
228
|
+
/** Any fields/values that are invalid or incorrect */
|
|
229
|
+
export type BadRequestFieldsList = Array<string>;
|
|
230
|
+
/** Invalid request */
|
|
231
|
+
export interface BadRequest2 {
|
|
232
|
+
/** Description of the error */
|
|
233
|
+
message?: string | undefined;
|
|
234
|
+
/** Any fields/values that are invalid or incorrect */
|
|
235
|
+
fields?: BadRequestFieldsList | undefined;
|
|
236
|
+
}
|
|
237
|
+
/** Already exists */
|
|
238
|
+
export interface Exists {
|
|
239
|
+
message?: string | undefined;
|
|
240
|
+
}
|
|
241
|
+
/** Authorization failed */
|
|
242
|
+
export type Forbidden2 = Exists;
|
|
243
|
+
/** Any fields/values that weren't found */
|
|
244
|
+
export type NotFoundFieldsList = Array<string>;
|
|
245
|
+
/** A resource or required component was not found */
|
|
246
|
+
export interface NotFound2 {
|
|
247
|
+
/** Name of the resource */
|
|
248
|
+
message: string;
|
|
249
|
+
/** Violation description */
|
|
250
|
+
description?: string | undefined;
|
|
251
|
+
/** Any fields/values that weren't found */
|
|
252
|
+
fields?: NotFoundFieldsList | undefined;
|
|
253
|
+
}
|
|
254
|
+
export type GrantRolePrivilegeError =
|
|
255
|
+
| BadRequest
|
|
256
|
+
| Forbidden
|
|
257
|
+
| NotFound
|
|
258
|
+
| Conflict
|
|
259
|
+
| StarburstGalaxyOpError;
|
|
260
|
+
/** Grant a privilege to a role */
|
|
261
|
+
export const grantRolePrivilege: API.OperationMethod<
|
|
262
|
+
GrantRolePrivilegeRequest,
|
|
263
|
+
GrantRolePrivilegeResponse,
|
|
264
|
+
GrantRolePrivilegeError,
|
|
265
|
+
StarburstGalaxyOpContext
|
|
266
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
267
|
+
input: __S(0, __c0, 0) as any as S.Schema<GrantRolePrivilegeRequest>,
|
|
268
|
+
output: __S(4, __c1, 0) as any as S.Schema<GrantRolePrivilegeResponse>,
|
|
269
|
+
errors: [BadRequest, Forbidden, NotFound, Conflict],
|
|
270
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
271
|
+
protocol: StarburstGalaxyProtocol,
|
|
272
|
+
retry: Retry.Retry,
|
|
273
|
+
telemetry: TELEMETRY,
|
|
274
|
+
span: "GrantRolePrivilege",
|
|
275
|
+
}));
|
|
276
|
+
|
|
277
|
+
export type ListRolePrivilegesError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
|
|
278
|
+
/** List all privileges granted to a role, or to all roles in that role's active role set if the listAllPrivileges parameter is set. This endpoint may return stale data (from approximately five seconds before the time of the request) to ensure maximum performance. */
|
|
279
|
+
export const listRolePrivileges: API.PaginatedOperationMethod<
|
|
280
|
+
ListRolePrivilegesRequest,
|
|
281
|
+
PaginatedGrantedPrivilege,
|
|
282
|
+
ListRolePrivilegesError,
|
|
283
|
+
StarburstGalaxyOpContext,
|
|
284
|
+
GrantedPrivilege
|
|
285
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
286
|
+
() => ({
|
|
287
|
+
input: __S(8, __c2, 0) as any as S.Schema<ListRolePrivilegesRequest>,
|
|
288
|
+
output: __S(11, __c2, 3) as any as S.Schema<PaginatedGrantedPrivilege>,
|
|
289
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
290
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
291
|
+
protocol: StarburstGalaxyProtocol,
|
|
292
|
+
retry: Retry.Retry,
|
|
293
|
+
telemetry: TELEMETRY,
|
|
294
|
+
span: "ListRolePrivileges",
|
|
295
|
+
pagination: {
|
|
296
|
+
mode: "token",
|
|
297
|
+
inputToken: "pageToken",
|
|
298
|
+
outputToken: "nextPageToken",
|
|
299
|
+
items: "result",
|
|
300
|
+
pageSize: "pageSize",
|
|
301
|
+
} as const,
|
|
302
|
+
}),
|
|
303
|
+
paginateToken,
|
|
304
|
+
) as any;
|
|
305
|
+
|
|
306
|
+
export type RevokeRolePrivilegeError =
|
|
307
|
+
| BadRequest
|
|
308
|
+
| Forbidden
|
|
309
|
+
| NotFound
|
|
310
|
+
| Conflict
|
|
311
|
+
| StarburstGalaxyOpError;
|
|
312
|
+
/** Revoke a privilege from a role */
|
|
313
|
+
export const revokeRolePrivilege: API.OperationMethod<
|
|
314
|
+
RevokeRolePrivilegeRequest,
|
|
315
|
+
RevokeRolePrivilegeResponse,
|
|
316
|
+
RevokeRolePrivilegeError,
|
|
317
|
+
StarburstGalaxyOpContext
|
|
318
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
319
|
+
input: __S(12, __c3, 0) as any as S.Schema<RevokeRolePrivilegeRequest>,
|
|
320
|
+
output: __S(4, __c1, 0) as any as S.Schema<RevokeRolePrivilegeResponse>,
|
|
321
|
+
errors: [BadRequest, Forbidden, NotFound, Conflict],
|
|
322
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
323
|
+
protocol: StarburstGalaxyProtocol,
|
|
324
|
+
retry: Retry.Retry,
|
|
325
|
+
telemetry: TELEMETRY,
|
|
326
|
+
span: "RevokeRolePrivilege",
|
|
327
|
+
}));
|
|
328
|
+
|
|
329
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
330
|
+
function __c0(j: number): any {
|
|
331
|
+
switch (j) {
|
|
332
|
+
case 0:
|
|
333
|
+
return S.suspend(() =>
|
|
334
|
+
S.Struct({
|
|
335
|
+
roleId: S.String.pipe(T.Label()),
|
|
336
|
+
grantKind: S.String,
|
|
337
|
+
entityId: S.String,
|
|
338
|
+
entityKind: S.String,
|
|
339
|
+
grantOption: S.Boolean,
|
|
340
|
+
privilege: S.String,
|
|
341
|
+
schemaName: S.optional(S.String),
|
|
342
|
+
tableName: S.optional(S.String),
|
|
343
|
+
columnName: S.optional(S.String),
|
|
344
|
+
}).pipe(
|
|
345
|
+
T.Http({
|
|
346
|
+
method: "POST",
|
|
347
|
+
uri: "/public/api/v1/role/{roleId}/privilege:grant",
|
|
348
|
+
code: 200,
|
|
349
|
+
}),
|
|
350
|
+
),
|
|
351
|
+
).annotate({ identifier: "GrantRolePrivilegeRequest" });
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
function __c1(j: number): any {
|
|
355
|
+
switch (j) {
|
|
356
|
+
case 0:
|
|
357
|
+
return S.suspend(() => S.Struct({})).annotate({ identifier: "GrantRolePrivilegeResponse" });
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
function __c2(j: number): any {
|
|
361
|
+
switch (j) {
|
|
362
|
+
case 0:
|
|
363
|
+
return S.suspend(() =>
|
|
364
|
+
S.Struct({
|
|
365
|
+
roleId: S.String.pipe(T.Label()),
|
|
366
|
+
pageToken: S.optional(S.String.pipe(T.Query())),
|
|
367
|
+
pageSize: S.optional(S.Number.pipe(T.Query())),
|
|
368
|
+
listAllPrivileges: S.optional(S.Boolean.pipe(T.Query())),
|
|
369
|
+
}).pipe(
|
|
370
|
+
T.Http({ method: "GET", uri: "/public/api/v1/role/{roleId}/privilege", code: 200 }),
|
|
371
|
+
),
|
|
372
|
+
).annotate({ identifier: "ListRolePrivilegesRequest" });
|
|
373
|
+
case 1:
|
|
374
|
+
return S.suspend(() =>
|
|
375
|
+
S.Struct({
|
|
376
|
+
grantKind: S.String,
|
|
377
|
+
entityId: S.String,
|
|
378
|
+
entityKind: S.String,
|
|
379
|
+
grantOption: S.Boolean,
|
|
380
|
+
privilege: S.String,
|
|
381
|
+
schemaName: S.optional(S.String),
|
|
382
|
+
tableName: S.optional(S.String),
|
|
383
|
+
columnName: S.optional(S.String),
|
|
384
|
+
}),
|
|
385
|
+
).annotate({ identifier: "GrantedPrivilege" });
|
|
386
|
+
case 2:
|
|
387
|
+
return S.Array(__S(9, __c2, 1));
|
|
388
|
+
case 3:
|
|
389
|
+
return S.suspend(() =>
|
|
390
|
+
S.Struct({
|
|
391
|
+
nextPageToken: S.optional(S.String),
|
|
392
|
+
result: __S(10, __c2, 2),
|
|
393
|
+
}),
|
|
394
|
+
).annotate({ identifier: "PaginatedGrantedPrivilege" });
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
function __c3(j: number): any {
|
|
398
|
+
switch (j) {
|
|
399
|
+
case 0:
|
|
400
|
+
return S.suspend(() =>
|
|
401
|
+
S.Struct({
|
|
402
|
+
roleId: S.String.pipe(T.Label()),
|
|
403
|
+
entityId: S.String,
|
|
404
|
+
entityKind: S.String,
|
|
405
|
+
privilege: S.String,
|
|
406
|
+
schemaName: S.optional(S.String),
|
|
407
|
+
tableName: S.optional(S.String),
|
|
408
|
+
columnName: S.optional(S.String),
|
|
409
|
+
revokeAction: S.String,
|
|
410
|
+
}).pipe(
|
|
411
|
+
T.Http({
|
|
412
|
+
method: "POST",
|
|
413
|
+
uri: "/public/api/v1/role/{roleId}/privilege:revoke",
|
|
414
|
+
code: 200,
|
|
415
|
+
}),
|
|
416
|
+
),
|
|
417
|
+
).annotate({ identifier: "RevokeRolePrivilegeRequest" });
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
421
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
422
|
+
return (__s[i] ??= __L.at(f, j));
|
|
423
|
+
}
|