@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,526 @@
|
|
|
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: "PolicyService",
|
|
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 EntityKind =
|
|
74
|
+
| "Account"
|
|
75
|
+
| "AiModel"
|
|
76
|
+
| "AgentSkill"
|
|
77
|
+
| "ExternalMcpServer"
|
|
78
|
+
| "AgentPersona"
|
|
79
|
+
| "Cluster"
|
|
80
|
+
| "Catalog"
|
|
81
|
+
| "Schema"
|
|
82
|
+
| "Table"
|
|
83
|
+
| "Column"
|
|
84
|
+
| "Location"
|
|
85
|
+
| "Function"
|
|
86
|
+
| "Tag"
|
|
87
|
+
| "TableBranch"
|
|
88
|
+
| "Policy"
|
|
89
|
+
| "RowFilter"
|
|
90
|
+
| "DataProduct"
|
|
91
|
+
| "DataDomain";
|
|
92
|
+
export type GrantKind = "Allow" | "Deny";
|
|
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
|
+
/** Privileges (read only) */
|
|
151
|
+
export type GrantKindAndPrivilegesPrivilegeList = Array<PrivilegeEnum | (string & {})>;
|
|
152
|
+
/** Privileges (read only) */
|
|
153
|
+
export interface GrantKindAndPrivileges {
|
|
154
|
+
/** Grant kind (read only) */
|
|
155
|
+
grantKind: GrantKind | (string & {});
|
|
156
|
+
/** Privileges (read only) */
|
|
157
|
+
privilege: GrantKindAndPrivilegesPrivilegeList;
|
|
158
|
+
}
|
|
159
|
+
/** Row filters */
|
|
160
|
+
export type PolicyScopeRowFilterIdsList = Array<string>;
|
|
161
|
+
/** The column masks which apply to this policy scope. */
|
|
162
|
+
export type PolicyScopeColumnMaskIdsList = Array<string>;
|
|
163
|
+
/** Policy scopes (read only) */
|
|
164
|
+
export interface PolicyScope {
|
|
165
|
+
/** Entity ID */
|
|
166
|
+
entityId: string;
|
|
167
|
+
/** Entity kind */
|
|
168
|
+
entityKind: EntityKind | (string & {});
|
|
169
|
+
/** Schema name */
|
|
170
|
+
schemaName?: string | undefined;
|
|
171
|
+
/** Table name */
|
|
172
|
+
tableName?: string | undefined;
|
|
173
|
+
/** Column name */
|
|
174
|
+
columnName?: string | undefined;
|
|
175
|
+
privileges?: GrantKindAndPrivileges | undefined;
|
|
176
|
+
/** Row filters */
|
|
177
|
+
rowFilterIds: PolicyScopeRowFilterIdsList;
|
|
178
|
+
/** The column masks which apply to this policy scope. */
|
|
179
|
+
columnMaskIds: PolicyScopeColumnMaskIdsList;
|
|
180
|
+
}
|
|
181
|
+
/** Policy scopes (read only) */
|
|
182
|
+
export type CreatePolicyRequestScopesList = Array<PolicyScope>;
|
|
183
|
+
export interface CreatePolicyRequest {
|
|
184
|
+
/** If true validate only without taking any action */
|
|
185
|
+
validateOnly?: boolean | undefined;
|
|
186
|
+
/** Enabling role id (read only) */
|
|
187
|
+
roleId: string;
|
|
188
|
+
/** Policy name (read only) */
|
|
189
|
+
name: string;
|
|
190
|
+
/** Policy predicate (read only) */
|
|
191
|
+
predicate: string;
|
|
192
|
+
/** Policy description (read only) */
|
|
193
|
+
description: string;
|
|
194
|
+
/** Policy expiration (read only) */
|
|
195
|
+
expiration?: string | undefined;
|
|
196
|
+
/** Policy scopes (read only) */
|
|
197
|
+
scopes: CreatePolicyRequestScopesList;
|
|
198
|
+
}
|
|
199
|
+
/** Policy scopes (read only) */
|
|
200
|
+
export type PolicyScopesList = Array<PolicyScope>;
|
|
201
|
+
/** A policy */
|
|
202
|
+
export interface Policy {
|
|
203
|
+
/** Used to ensure consistency for resource updates. A syncToken that is returned from the server is valid until the resource is updated when a new syncToken will be generated. Only the latest version of the object is maintained. (read only) */
|
|
204
|
+
syncToken: string;
|
|
205
|
+
/** Policy ID (read only) */
|
|
206
|
+
policyId: string;
|
|
207
|
+
/** Enabling role ID */
|
|
208
|
+
roleId: string;
|
|
209
|
+
/** Policy name */
|
|
210
|
+
name: string;
|
|
211
|
+
/** Policy predicate */
|
|
212
|
+
predicate: string;
|
|
213
|
+
/** Policy description */
|
|
214
|
+
description: string;
|
|
215
|
+
/** Policy expiration */
|
|
216
|
+
expiration?: string | undefined;
|
|
217
|
+
/** Policy scopes (read only) */
|
|
218
|
+
scopes: PolicyScopesList;
|
|
219
|
+
/** Created on (read only) */
|
|
220
|
+
created: string;
|
|
221
|
+
/** Modified on (read only) */
|
|
222
|
+
modified: string;
|
|
223
|
+
}
|
|
224
|
+
export interface DeletePolicyRequest {
|
|
225
|
+
/** - A policy - 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 `=`) */
|
|
226
|
+
policyId: string;
|
|
227
|
+
/** If true validate only without taking any action */
|
|
228
|
+
validateOnly?: boolean | undefined;
|
|
229
|
+
}
|
|
230
|
+
export interface DeletePolicyResponse {}
|
|
231
|
+
export interface GetPolicyRequest {
|
|
232
|
+
/** - A policy - 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 `=`) */
|
|
233
|
+
policyId: string;
|
|
234
|
+
}
|
|
235
|
+
export interface ListPoliciesRequest {
|
|
236
|
+
/** Pagination token */
|
|
237
|
+
pageToken?: string | undefined;
|
|
238
|
+
/** Page size or 0 for default (current maximum is 100) */
|
|
239
|
+
pageSize?: number | undefined;
|
|
240
|
+
/** Query filter */
|
|
241
|
+
enablingRoleId?: string | undefined;
|
|
242
|
+
}
|
|
243
|
+
/** A page of results. */
|
|
244
|
+
export type PaginatedPolicyResultList = Array<Policy>;
|
|
245
|
+
export interface PaginatedPolicy {
|
|
246
|
+
/** The next page token to use or "" if there are no more pages. */
|
|
247
|
+
nextPageToken?: string | undefined;
|
|
248
|
+
/** A page of results. */
|
|
249
|
+
result: PaginatedPolicyResultList;
|
|
250
|
+
}
|
|
251
|
+
/** Policy scopes */
|
|
252
|
+
export type UpdatePolicyRequestScopesList = Array<PolicyScope>;
|
|
253
|
+
export interface UpdatePolicyRequest {
|
|
254
|
+
/** - A policy - 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 `=`) */
|
|
255
|
+
policyId: string;
|
|
256
|
+
/** If true validate only without taking any action */
|
|
257
|
+
validateOnly?: boolean | undefined;
|
|
258
|
+
/** Policy name */
|
|
259
|
+
name?: string | undefined;
|
|
260
|
+
/** Policy predicate */
|
|
261
|
+
predicate?: string | undefined;
|
|
262
|
+
/** Policy description */
|
|
263
|
+
description?: string | undefined;
|
|
264
|
+
/** Policy expiration */
|
|
265
|
+
expiration?: string | undefined;
|
|
266
|
+
/** Policy scopes */
|
|
267
|
+
scopes?: UpdatePolicyRequestScopesList | undefined;
|
|
268
|
+
}
|
|
269
|
+
/** Any fields/values that are invalid or incorrect */
|
|
270
|
+
export type BadRequestFieldsList = Array<string>;
|
|
271
|
+
/** Invalid request */
|
|
272
|
+
export interface BadRequest2 {
|
|
273
|
+
/** Description of the error */
|
|
274
|
+
message?: string | undefined;
|
|
275
|
+
/** Any fields/values that are invalid or incorrect */
|
|
276
|
+
fields?: BadRequestFieldsList | undefined;
|
|
277
|
+
}
|
|
278
|
+
/** Already exists */
|
|
279
|
+
export interface Exists {
|
|
280
|
+
message?: string | undefined;
|
|
281
|
+
}
|
|
282
|
+
/** Authorization failed */
|
|
283
|
+
export type Forbidden2 = Exists;
|
|
284
|
+
/** Any fields/values that weren't found */
|
|
285
|
+
export type NotFoundFieldsList = Array<string>;
|
|
286
|
+
/** A resource or required component was not found */
|
|
287
|
+
export interface NotFound2 {
|
|
288
|
+
/** Name of the resource */
|
|
289
|
+
message: string;
|
|
290
|
+
/** Violation description */
|
|
291
|
+
description?: string | undefined;
|
|
292
|
+
/** Any fields/values that weren't found */
|
|
293
|
+
fields?: NotFoundFieldsList | undefined;
|
|
294
|
+
}
|
|
295
|
+
export type CreatePolicyError = BadRequest | Forbidden | Conflict | StarburstGalaxyOpError;
|
|
296
|
+
/** Create a policy */
|
|
297
|
+
export const createPolicy: API.OperationMethod<
|
|
298
|
+
CreatePolicyRequest,
|
|
299
|
+
Policy,
|
|
300
|
+
CreatePolicyError,
|
|
301
|
+
StarburstGalaxyOpContext
|
|
302
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
303
|
+
input: __S(0, __c0, 0) as any as S.Schema<CreatePolicyRequest>,
|
|
304
|
+
output: __S(13, __c1, 5) as any as S.Schema<Policy>,
|
|
305
|
+
errors: [BadRequest, Forbidden, Conflict],
|
|
306
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
307
|
+
protocol: StarburstGalaxyProtocol,
|
|
308
|
+
retry: Retry.Retry,
|
|
309
|
+
telemetry: TELEMETRY,
|
|
310
|
+
span: "CreatePolicy",
|
|
311
|
+
}));
|
|
312
|
+
|
|
313
|
+
export type DeletePolicyError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
|
|
314
|
+
/** Delete a policy */
|
|
315
|
+
export const deletePolicy: API.OperationMethod<
|
|
316
|
+
DeletePolicyRequest,
|
|
317
|
+
DeletePolicyResponse,
|
|
318
|
+
DeletePolicyError,
|
|
319
|
+
StarburstGalaxyOpContext
|
|
320
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
321
|
+
input: __S(16, __c2, 0) as any as S.Schema<DeletePolicyRequest>,
|
|
322
|
+
output: __S(17, __c2, 1) as any as S.Schema<DeletePolicyResponse>,
|
|
323
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
324
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
325
|
+
protocol: StarburstGalaxyProtocol,
|
|
326
|
+
retry: Retry.Retry,
|
|
327
|
+
telemetry: TELEMETRY,
|
|
328
|
+
span: "DeletePolicy",
|
|
329
|
+
}));
|
|
330
|
+
|
|
331
|
+
export type GetPolicyError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
|
|
332
|
+
/** Get a policy by id */
|
|
333
|
+
export const getPolicy: API.OperationMethod<
|
|
334
|
+
GetPolicyRequest,
|
|
335
|
+
Policy,
|
|
336
|
+
GetPolicyError,
|
|
337
|
+
StarburstGalaxyOpContext
|
|
338
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
339
|
+
input: __S(24, __c3, 0) as any as S.Schema<GetPolicyRequest>,
|
|
340
|
+
output: __S(13, __c1, 5) as any as S.Schema<Policy>,
|
|
341
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
342
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
343
|
+
protocol: StarburstGalaxyProtocol,
|
|
344
|
+
retry: Retry.Retry,
|
|
345
|
+
telemetry: TELEMETRY,
|
|
346
|
+
span: "GetPolicy",
|
|
347
|
+
}));
|
|
348
|
+
|
|
349
|
+
export type ListPoliciesError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
|
|
350
|
+
/** Return all policies defined for your account */
|
|
351
|
+
export const listPolicies: API.PaginatedOperationMethod<
|
|
352
|
+
ListPoliciesRequest,
|
|
353
|
+
PaginatedPolicy,
|
|
354
|
+
ListPoliciesError,
|
|
355
|
+
StarburstGalaxyOpContext,
|
|
356
|
+
Policy
|
|
357
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
358
|
+
() => ({
|
|
359
|
+
input: __S(32, __c4, 0) as any as S.Schema<ListPoliciesRequest>,
|
|
360
|
+
output: __S(34, __c4, 2) as any as S.Schema<PaginatedPolicy>,
|
|
361
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
362
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
363
|
+
protocol: StarburstGalaxyProtocol,
|
|
364
|
+
retry: Retry.Retry,
|
|
365
|
+
telemetry: TELEMETRY,
|
|
366
|
+
span: "ListPolicies",
|
|
367
|
+
pagination: {
|
|
368
|
+
mode: "token",
|
|
369
|
+
inputToken: "pageToken",
|
|
370
|
+
outputToken: "nextPageToken",
|
|
371
|
+
items: "result",
|
|
372
|
+
pageSize: "pageSize",
|
|
373
|
+
} as const,
|
|
374
|
+
}),
|
|
375
|
+
paginateToken,
|
|
376
|
+
) as any;
|
|
377
|
+
|
|
378
|
+
export type UpdatePolicyError =
|
|
379
|
+
| BadRequest
|
|
380
|
+
| Forbidden
|
|
381
|
+
| NotFound
|
|
382
|
+
| Conflict
|
|
383
|
+
| StarburstGalaxyOpError;
|
|
384
|
+
/** Update a policy Only include fields you wish to update. Missing or unrecognized fields are ignored. */
|
|
385
|
+
export const updatePolicy: API.OperationMethod<
|
|
386
|
+
UpdatePolicyRequest,
|
|
387
|
+
Policy,
|
|
388
|
+
UpdatePolicyError,
|
|
389
|
+
StarburstGalaxyOpContext
|
|
390
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
391
|
+
input: __S(40, __c5, 0) as any as S.Schema<UpdatePolicyRequest>,
|
|
392
|
+
output: __S(13, __c1, 5) as any as S.Schema<Policy>,
|
|
393
|
+
errors: [BadRequest, Forbidden, NotFound, Conflict],
|
|
394
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
395
|
+
protocol: StarburstGalaxyProtocol,
|
|
396
|
+
retry: Retry.Retry,
|
|
397
|
+
telemetry: TELEMETRY,
|
|
398
|
+
span: "UpdatePolicy",
|
|
399
|
+
}));
|
|
400
|
+
|
|
401
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
402
|
+
function __c0(j: number): any {
|
|
403
|
+
switch (j) {
|
|
404
|
+
case 0:
|
|
405
|
+
return S.suspend(() =>
|
|
406
|
+
S.Struct({
|
|
407
|
+
validateOnly: S.optional(S.Boolean.pipe(T.Query())),
|
|
408
|
+
roleId: S.String,
|
|
409
|
+
name: S.String,
|
|
410
|
+
predicate: S.String,
|
|
411
|
+
description: S.String,
|
|
412
|
+
expiration: S.optional(S.String),
|
|
413
|
+
scopes: __S(12, __c1, 4),
|
|
414
|
+
}).pipe(T.Http({ method: "POST", uri: "/public/api/v1/policy", code: 200 })),
|
|
415
|
+
).annotate({ identifier: "CreatePolicyRequest" });
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
function __c1(j: number): any {
|
|
419
|
+
switch (j) {
|
|
420
|
+
case 0:
|
|
421
|
+
return S.Array(S.String);
|
|
422
|
+
case 1:
|
|
423
|
+
return S.suspend(() =>
|
|
424
|
+
S.Struct({
|
|
425
|
+
grantKind: S.String,
|
|
426
|
+
privilege: __S(8, __c1, 0),
|
|
427
|
+
}),
|
|
428
|
+
).annotate({ identifier: "GrantKindAndPrivileges" });
|
|
429
|
+
case 2:
|
|
430
|
+
return S.Array(S.String);
|
|
431
|
+
case 3:
|
|
432
|
+
return S.suspend(() =>
|
|
433
|
+
S.Struct({
|
|
434
|
+
entityId: S.String,
|
|
435
|
+
entityKind: S.String,
|
|
436
|
+
schemaName: S.optional(S.String),
|
|
437
|
+
tableName: S.optional(S.String),
|
|
438
|
+
columnName: S.optional(S.String),
|
|
439
|
+
privileges: S.optional(__S(9, __c1, 1)),
|
|
440
|
+
rowFilterIds: __S(10, __c1, 2),
|
|
441
|
+
columnMaskIds: __S(10, __c1, 2),
|
|
442
|
+
}),
|
|
443
|
+
).annotate({ identifier: "PolicyScope" });
|
|
444
|
+
case 4:
|
|
445
|
+
return S.Array(__S(11, __c1, 3));
|
|
446
|
+
case 5:
|
|
447
|
+
return S.suspend(() =>
|
|
448
|
+
S.Struct({
|
|
449
|
+
syncToken: S.String,
|
|
450
|
+
policyId: S.String,
|
|
451
|
+
roleId: S.String,
|
|
452
|
+
name: S.String,
|
|
453
|
+
predicate: S.String,
|
|
454
|
+
description: S.String,
|
|
455
|
+
expiration: S.optional(S.String),
|
|
456
|
+
scopes: __S(12, __c1, 4),
|
|
457
|
+
created: S.String,
|
|
458
|
+
modified: S.String,
|
|
459
|
+
}),
|
|
460
|
+
).annotate({ identifier: "Policy" });
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
function __c2(j: number): any {
|
|
464
|
+
switch (j) {
|
|
465
|
+
case 0:
|
|
466
|
+
return S.suspend(() =>
|
|
467
|
+
S.Struct({
|
|
468
|
+
policyId: S.String.pipe(T.Label()),
|
|
469
|
+
validateOnly: S.optional(S.Boolean.pipe(T.Query())),
|
|
470
|
+
}).pipe(T.Http({ method: "DELETE", uri: "/public/api/v1/policy/{policyId}", code: 200 })),
|
|
471
|
+
).annotate({ identifier: "DeletePolicyRequest" });
|
|
472
|
+
case 1:
|
|
473
|
+
return S.suspend(() => S.Struct({})).annotate({ identifier: "DeletePolicyResponse" });
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
function __c3(j: number): any {
|
|
477
|
+
switch (j) {
|
|
478
|
+
case 0:
|
|
479
|
+
return S.suspend(() =>
|
|
480
|
+
S.Struct({
|
|
481
|
+
policyId: S.String.pipe(T.Label()),
|
|
482
|
+
}).pipe(T.Http({ method: "GET", uri: "/public/api/v1/policy/{policyId}", code: 200 })),
|
|
483
|
+
).annotate({ identifier: "GetPolicyRequest" });
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
function __c4(j: number): any {
|
|
487
|
+
switch (j) {
|
|
488
|
+
case 0:
|
|
489
|
+
return S.suspend(() =>
|
|
490
|
+
S.Struct({
|
|
491
|
+
pageToken: S.optional(S.String.pipe(T.Query())),
|
|
492
|
+
pageSize: S.optional(S.Number.pipe(T.Query())),
|
|
493
|
+
enablingRoleId: S.optional(S.String.pipe(T.Query())),
|
|
494
|
+
}).pipe(T.Http({ method: "GET", uri: "/public/api/v1/policy", code: 200 })),
|
|
495
|
+
).annotate({ identifier: "ListPoliciesRequest" });
|
|
496
|
+
case 1:
|
|
497
|
+
return S.Array(__S(13, __c1, 5));
|
|
498
|
+
case 2:
|
|
499
|
+
return S.suspend(() =>
|
|
500
|
+
S.Struct({
|
|
501
|
+
nextPageToken: S.optional(S.String),
|
|
502
|
+
result: __S(33, __c4, 1),
|
|
503
|
+
}),
|
|
504
|
+
).annotate({ identifier: "PaginatedPolicy" });
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
function __c5(j: number): any {
|
|
508
|
+
switch (j) {
|
|
509
|
+
case 0:
|
|
510
|
+
return S.suspend(() =>
|
|
511
|
+
S.Struct({
|
|
512
|
+
policyId: S.String.pipe(T.Label()),
|
|
513
|
+
validateOnly: S.optional(S.Boolean.pipe(T.Query())),
|
|
514
|
+
name: S.optional(S.String),
|
|
515
|
+
predicate: S.optional(S.String),
|
|
516
|
+
description: S.optional(S.String),
|
|
517
|
+
expiration: S.optional(S.String),
|
|
518
|
+
scopes: S.optional(__S(12, __c1, 4)),
|
|
519
|
+
}).pipe(T.Http({ method: "PATCH", uri: "/public/api/v1/policy/{policyId}", code: 200 })),
|
|
520
|
+
).annotate({ identifier: "UpdatePolicyRequest" });
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
524
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
525
|
+
return (__s[i] ??= __L.at(f, j));
|
|
526
|
+
}
|