@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,516 @@
|
|
|
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: "SchemaDiscoveryService",
|
|
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 class PreconditionFailed
|
|
74
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
75
|
+
/*@__PURE__*/ S.TaggedError<PreconditionFailed>()("PreconditionFailed", {
|
|
76
|
+
message: S.String,
|
|
77
|
+
body: S.Unknown,
|
|
78
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
79
|
+
}),
|
|
80
|
+
[{ status: 412 }],
|
|
81
|
+
) {}
|
|
82
|
+
|
|
83
|
+
export interface ApplySchemaDiscoveryRequest {
|
|
84
|
+
/** A schema discovery run */
|
|
85
|
+
schemaDiscoveryId: string;
|
|
86
|
+
}
|
|
87
|
+
export type SchemaDiscoveryStatus =
|
|
88
|
+
| "Scheduled"
|
|
89
|
+
| "Running"
|
|
90
|
+
| "Errored"
|
|
91
|
+
| "Success"
|
|
92
|
+
| "RescanScheduled"
|
|
93
|
+
| "RescanRunning"
|
|
94
|
+
| "ApplyScheduled"
|
|
95
|
+
| "ApplyRunning"
|
|
96
|
+
| "ApplyErrored"
|
|
97
|
+
| "ApplySuccess"
|
|
98
|
+
| "Deprecated";
|
|
99
|
+
/** Errors that prevented schema discovery to finish (read only) */
|
|
100
|
+
export type SchemaDiscoveryErrorsList = Array<string>;
|
|
101
|
+
/** Configuration options (read only) */
|
|
102
|
+
export type SchemaDiscoveryOptionsMap = { [key: string]: string | undefined };
|
|
103
|
+
export type StatementStatus = "Waiting" | "Applying" | "Success" | "Errored" | "Canceled";
|
|
104
|
+
/** Generated SQL statements (read only) */
|
|
105
|
+
export interface DiscoveredSqlStatement {
|
|
106
|
+
/** Raw generated SQL (read only) */
|
|
107
|
+
sql: string;
|
|
108
|
+
/** Status of the statement (read only) */
|
|
109
|
+
status: StatementStatus;
|
|
110
|
+
/** Message describing statement or error message in case of execution failure (read only) */
|
|
111
|
+
message?: string | undefined;
|
|
112
|
+
}
|
|
113
|
+
/** Generated SQL statements (read only) */
|
|
114
|
+
export type SchemaDiscoverySqlStatementsList = Array<DiscoveredSqlStatement>;
|
|
115
|
+
/** A schema discovery run */
|
|
116
|
+
export interface SchemaDiscovery {
|
|
117
|
+
/** 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) */
|
|
118
|
+
syncToken: string;
|
|
119
|
+
/** Schema discovery ID (read only) */
|
|
120
|
+
schemaDiscoveryId: string;
|
|
121
|
+
/** Catalog ID (read only) */
|
|
122
|
+
catalogId: string;
|
|
123
|
+
/** Time when schema discovery was created (read only) */
|
|
124
|
+
createdAt: string;
|
|
125
|
+
/** Time when schema discovery has started (read only) */
|
|
126
|
+
startedAt?: string | undefined;
|
|
127
|
+
/** Time when schema discovery has finished (read only) */
|
|
128
|
+
finishedAt?: string | undefined;
|
|
129
|
+
/** Root location for schema discovery (read only) */
|
|
130
|
+
uri: string;
|
|
131
|
+
/** Default schema name, used when tables without schemas were discovered (read only) */
|
|
132
|
+
defaultSchemaName: string;
|
|
133
|
+
/** Status of schema discovery (read only) */
|
|
134
|
+
status: SchemaDiscoveryStatus;
|
|
135
|
+
/** ID of schema discovery which this one is based on, in case of diff runs (read only) */
|
|
136
|
+
basedOnSchemaDiscoveryId?: string | undefined;
|
|
137
|
+
/** Errors that prevented schema discovery to finish (read only) */
|
|
138
|
+
errors: SchemaDiscoveryErrorsList;
|
|
139
|
+
/** Configuration options (read only) */
|
|
140
|
+
options: SchemaDiscoveryOptionsMap;
|
|
141
|
+
/** Generated SQL statements (read only) */
|
|
142
|
+
sqlStatements: SchemaDiscoverySqlStatementsList;
|
|
143
|
+
/** Number of tables to create (read only) */
|
|
144
|
+
createdTablesCount: number;
|
|
145
|
+
/** Number of tables to update (read only) */
|
|
146
|
+
updatedTablesCount: number;
|
|
147
|
+
/** Number of tables to delete (read only) */
|
|
148
|
+
deletedTablesCount: number;
|
|
149
|
+
}
|
|
150
|
+
/** Configuration options for schema discovery (read only) */
|
|
151
|
+
export type CreateSchemaDiscoveryRequestOptionsMap = { [key: string]: string | undefined };
|
|
152
|
+
export interface CreateSchemaDiscoveryRequest {
|
|
153
|
+
/** - A catalog - 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 `=`) */
|
|
154
|
+
catalogId: string;
|
|
155
|
+
/** Root uri, that schema discovery will start from. Current role must have location security correctly set up. (read only) */
|
|
156
|
+
uri: string;
|
|
157
|
+
/** Schema name that will be used for top-level tables, which aren't under any schema (read only) */
|
|
158
|
+
defaultSchemaName?: string | undefined;
|
|
159
|
+
/** Configuration options for schema discovery (read only) */
|
|
160
|
+
options: CreateSchemaDiscoveryRequestOptionsMap;
|
|
161
|
+
/** Do not apply schema discovery results to catalog, useful if tables needs to be inspected manually before running SQLs (read only) */
|
|
162
|
+
skipApplying: boolean;
|
|
163
|
+
/** Always run full discovery, disregarding any previous discoveries under same `uri` (read only) */
|
|
164
|
+
forceFullDiscovery: boolean;
|
|
165
|
+
}
|
|
166
|
+
export interface DeleteSchemaDiscoveryRequest {
|
|
167
|
+
/** A schema discovery run */
|
|
168
|
+
schemaDiscoveryId: string;
|
|
169
|
+
}
|
|
170
|
+
export interface DeleteSchemaDiscoveryResponse {}
|
|
171
|
+
export interface GetSchemaDiscoveryRequest {
|
|
172
|
+
/** A schema discovery run */
|
|
173
|
+
schemaDiscoveryId: string;
|
|
174
|
+
}
|
|
175
|
+
export interface ListSchemaDiscoveriesRequest {
|
|
176
|
+
/** - A catalog - 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 `=`) */
|
|
177
|
+
catalogId: string;
|
|
178
|
+
latest?: boolean | undefined;
|
|
179
|
+
/** Pagination token */
|
|
180
|
+
pageToken?: string | undefined;
|
|
181
|
+
/** Page size or 0 for default (current maximum is 100) */
|
|
182
|
+
pageSize?: number | undefined;
|
|
183
|
+
}
|
|
184
|
+
/** A page of results. */
|
|
185
|
+
export type PaginatedSchemaDiscoveryResultList = Array<SchemaDiscovery>;
|
|
186
|
+
export interface PaginatedSchemaDiscovery {
|
|
187
|
+
/** The next page token to use or "" if there are no more pages. */
|
|
188
|
+
nextPageToken?: string | undefined;
|
|
189
|
+
/** A page of results. */
|
|
190
|
+
result: PaginatedSchemaDiscoveryResultList;
|
|
191
|
+
}
|
|
192
|
+
/** Any fields/values that are invalid or incorrect */
|
|
193
|
+
export type BadRequestFieldsList = Array<string>;
|
|
194
|
+
/** Invalid request */
|
|
195
|
+
export interface BadRequest2 {
|
|
196
|
+
/** Description of the error */
|
|
197
|
+
message?: string | undefined;
|
|
198
|
+
/** Any fields/values that are invalid or incorrect */
|
|
199
|
+
fields?: BadRequestFieldsList | undefined;
|
|
200
|
+
}
|
|
201
|
+
/** Already exists */
|
|
202
|
+
export interface Exists {
|
|
203
|
+
message?: string | undefined;
|
|
204
|
+
}
|
|
205
|
+
/** Authorization failed */
|
|
206
|
+
export type Forbidden2 = Exists;
|
|
207
|
+
/** Error details (read only) */
|
|
208
|
+
export interface Resourceinfo {
|
|
209
|
+
/** Name of the resource (read only) */
|
|
210
|
+
resourceName: string;
|
|
211
|
+
/** Violation description (read only) */
|
|
212
|
+
description: string;
|
|
213
|
+
}
|
|
214
|
+
/** A specified resource is not found. */
|
|
215
|
+
export interface NotFoundError {
|
|
216
|
+
/** Description of the error */
|
|
217
|
+
message: string;
|
|
218
|
+
detail: Resourceinfo;
|
|
219
|
+
}
|
|
220
|
+
/** Any fields/values that weren't found */
|
|
221
|
+
export type NotFoundFieldsList = Array<string>;
|
|
222
|
+
/** A resource or required component was not found */
|
|
223
|
+
export interface NotFound2 {
|
|
224
|
+
/** Name of the resource */
|
|
225
|
+
message: string;
|
|
226
|
+
/** Violation description */
|
|
227
|
+
description?: string | undefined;
|
|
228
|
+
/** Any fields/values that weren't found */
|
|
229
|
+
fields?: NotFoundFieldsList | undefined;
|
|
230
|
+
}
|
|
231
|
+
export type TypeEnum = "TermsOfService";
|
|
232
|
+
/** Field violations (read only) */
|
|
233
|
+
export interface Violation {
|
|
234
|
+
/** Violation type */
|
|
235
|
+
type: TypeEnum;
|
|
236
|
+
/** Violation subject */
|
|
237
|
+
subject: string;
|
|
238
|
+
/** Violation description */
|
|
239
|
+
description: string;
|
|
240
|
+
}
|
|
241
|
+
/** Field violations (read only) */
|
|
242
|
+
export type PreconditionfailureViolationsList = Array<Violation>;
|
|
243
|
+
/** Error details (read only) */
|
|
244
|
+
export interface Preconditionfailure {
|
|
245
|
+
/** Field violations (read only) */
|
|
246
|
+
violations: PreconditionfailureViolationsList;
|
|
247
|
+
}
|
|
248
|
+
/** Request can not be executed in the current system state, such as deleting a non-empty directory. */
|
|
249
|
+
export interface FailedPrecondition {
|
|
250
|
+
/** Description of the error */
|
|
251
|
+
message: string;
|
|
252
|
+
detail: Preconditionfailure;
|
|
253
|
+
}
|
|
254
|
+
export type ApplySchemaDiscoveryError =
|
|
255
|
+
| BadRequest
|
|
256
|
+
| Forbidden
|
|
257
|
+
| NotFound
|
|
258
|
+
| Conflict
|
|
259
|
+
| PreconditionFailed
|
|
260
|
+
| StarburstGalaxyOpError;
|
|
261
|
+
/** Execute SQL statements generated by schema discovery */
|
|
262
|
+
export const applySchemaDiscovery: API.OperationMethod<
|
|
263
|
+
ApplySchemaDiscoveryRequest,
|
|
264
|
+
SchemaDiscovery,
|
|
265
|
+
ApplySchemaDiscoveryError,
|
|
266
|
+
StarburstGalaxyOpContext
|
|
267
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
268
|
+
input: __S(0, __c0, 0) as any as S.Schema<ApplySchemaDiscoveryRequest>,
|
|
269
|
+
output: __S(12, __c1, 4) as any as S.Schema<SchemaDiscovery>,
|
|
270
|
+
errors: [BadRequest, Forbidden, NotFound, Conflict, PreconditionFailed],
|
|
271
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
272
|
+
protocol: StarburstGalaxyProtocol,
|
|
273
|
+
retry: Retry.Retry,
|
|
274
|
+
telemetry: TELEMETRY,
|
|
275
|
+
span: "ApplySchemaDiscovery",
|
|
276
|
+
}));
|
|
277
|
+
|
|
278
|
+
export type CreateSchemaDiscoveryError =
|
|
279
|
+
| BadRequest
|
|
280
|
+
| Forbidden
|
|
281
|
+
| NotFound
|
|
282
|
+
| Conflict
|
|
283
|
+
| PreconditionFailed
|
|
284
|
+
| StarburstGalaxyOpError;
|
|
285
|
+
/** Run schema discovery under catalog, for specified uri. This operation is async and runs in background. It is important to check `status` field to make sure it has completed and results are ready. */
|
|
286
|
+
export const createSchemaDiscovery: API.OperationMethod<
|
|
287
|
+
CreateSchemaDiscoveryRequest,
|
|
288
|
+
SchemaDiscovery,
|
|
289
|
+
CreateSchemaDiscoveryError,
|
|
290
|
+
StarburstGalaxyOpContext
|
|
291
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
292
|
+
input: __S(16, __c2, 0) as any as S.Schema<CreateSchemaDiscoveryRequest>,
|
|
293
|
+
output: __S(12, __c1, 4) as any as S.Schema<SchemaDiscovery>,
|
|
294
|
+
errors: [BadRequest, Forbidden, NotFound, Conflict, PreconditionFailed],
|
|
295
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
296
|
+
protocol: StarburstGalaxyProtocol,
|
|
297
|
+
retry: Retry.Retry,
|
|
298
|
+
telemetry: TELEMETRY,
|
|
299
|
+
span: "CreateSchemaDiscovery",
|
|
300
|
+
}));
|
|
301
|
+
|
|
302
|
+
export type DeleteSchemaDiscoveryError =
|
|
303
|
+
| BadRequest
|
|
304
|
+
| Forbidden
|
|
305
|
+
| NotFound
|
|
306
|
+
| PreconditionFailed
|
|
307
|
+
| StarburstGalaxyOpError;
|
|
308
|
+
/** Delete schema discovery by schemaDiscoveryId. Discoveries in progress or ones that are latest applied for path cannot be deleted. */
|
|
309
|
+
export const deleteSchemaDiscovery: API.OperationMethod<
|
|
310
|
+
DeleteSchemaDiscoveryRequest,
|
|
311
|
+
DeleteSchemaDiscoveryResponse,
|
|
312
|
+
DeleteSchemaDiscoveryError,
|
|
313
|
+
StarburstGalaxyOpContext
|
|
314
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
315
|
+
input: __S(24, __c3, 0) as any as S.Schema<DeleteSchemaDiscoveryRequest>,
|
|
316
|
+
output: __S(25, __c3, 1) as any as S.Schema<DeleteSchemaDiscoveryResponse>,
|
|
317
|
+
errors: [BadRequest, Forbidden, NotFound, PreconditionFailed],
|
|
318
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
319
|
+
protocol: StarburstGalaxyProtocol,
|
|
320
|
+
retry: Retry.Retry,
|
|
321
|
+
telemetry: TELEMETRY,
|
|
322
|
+
span: "DeleteSchemaDiscovery",
|
|
323
|
+
}));
|
|
324
|
+
|
|
325
|
+
export type GetSchemaDiscoveryError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
|
|
326
|
+
/** Get schema discovery by id */
|
|
327
|
+
export const getSchemaDiscovery: API.OperationMethod<
|
|
328
|
+
GetSchemaDiscoveryRequest,
|
|
329
|
+
SchemaDiscovery,
|
|
330
|
+
GetSchemaDiscoveryError,
|
|
331
|
+
StarburstGalaxyOpContext
|
|
332
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
333
|
+
input: __S(32, __c4, 0) as any as S.Schema<GetSchemaDiscoveryRequest>,
|
|
334
|
+
output: __S(12, __c1, 4) as any as S.Schema<SchemaDiscovery>,
|
|
335
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
336
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
337
|
+
protocol: StarburstGalaxyProtocol,
|
|
338
|
+
retry: Retry.Retry,
|
|
339
|
+
telemetry: TELEMETRY,
|
|
340
|
+
span: "GetSchemaDiscovery",
|
|
341
|
+
}));
|
|
342
|
+
|
|
343
|
+
export type ListSchemaDiscoveriesError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
|
|
344
|
+
/** Get schema discoveries for catalog. When getting all runs, they won't contain same level of detail as when getting run by its ID. */
|
|
345
|
+
export const listSchemaDiscoveries: API.PaginatedOperationMethod<
|
|
346
|
+
ListSchemaDiscoveriesRequest,
|
|
347
|
+
PaginatedSchemaDiscovery,
|
|
348
|
+
ListSchemaDiscoveriesError,
|
|
349
|
+
StarburstGalaxyOpContext,
|
|
350
|
+
SchemaDiscovery
|
|
351
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
352
|
+
() => ({
|
|
353
|
+
input: __S(40, __c5, 0) as any as S.Schema<ListSchemaDiscoveriesRequest>,
|
|
354
|
+
output: __S(42, __c5, 2) as any as S.Schema<PaginatedSchemaDiscovery>,
|
|
355
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
356
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
357
|
+
protocol: StarburstGalaxyProtocol,
|
|
358
|
+
retry: Retry.Retry,
|
|
359
|
+
telemetry: TELEMETRY,
|
|
360
|
+
span: "ListSchemaDiscoveries",
|
|
361
|
+
pagination: {
|
|
362
|
+
mode: "token",
|
|
363
|
+
inputToken: "pageToken",
|
|
364
|
+
outputToken: "nextPageToken",
|
|
365
|
+
items: "result",
|
|
366
|
+
pageSize: "pageSize",
|
|
367
|
+
} as const,
|
|
368
|
+
}),
|
|
369
|
+
paginateToken,
|
|
370
|
+
) as any;
|
|
371
|
+
|
|
372
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
373
|
+
function __c0(j: number): any {
|
|
374
|
+
switch (j) {
|
|
375
|
+
case 0:
|
|
376
|
+
return S.suspend(() =>
|
|
377
|
+
S.Struct({
|
|
378
|
+
schemaDiscoveryId: S.String.pipe(T.Label()),
|
|
379
|
+
}).pipe(
|
|
380
|
+
T.Http({
|
|
381
|
+
method: "POST",
|
|
382
|
+
uri: "/public/api/v1/schemaDiscovery/{schemaDiscoveryId}:apply",
|
|
383
|
+
code: 200,
|
|
384
|
+
}),
|
|
385
|
+
),
|
|
386
|
+
).annotate({ identifier: "ApplySchemaDiscoveryRequest" });
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
function __c1(j: number): any {
|
|
390
|
+
switch (j) {
|
|
391
|
+
case 0:
|
|
392
|
+
return S.Array(S.String);
|
|
393
|
+
case 1:
|
|
394
|
+
return S.Record(S.String, S.String);
|
|
395
|
+
case 2:
|
|
396
|
+
return S.suspend(() =>
|
|
397
|
+
S.Struct({
|
|
398
|
+
sql: S.String,
|
|
399
|
+
status: S.String,
|
|
400
|
+
message: S.optional(S.String),
|
|
401
|
+
}),
|
|
402
|
+
).annotate({ identifier: "DiscoveredSqlStatement" });
|
|
403
|
+
case 3:
|
|
404
|
+
return S.Array(__S(10, __c1, 2));
|
|
405
|
+
case 4:
|
|
406
|
+
return S.suspend(() =>
|
|
407
|
+
S.Struct({
|
|
408
|
+
syncToken: S.String,
|
|
409
|
+
schemaDiscoveryId: S.String,
|
|
410
|
+
catalogId: S.String,
|
|
411
|
+
createdAt: S.String,
|
|
412
|
+
startedAt: S.optional(S.String),
|
|
413
|
+
finishedAt: S.optional(S.String),
|
|
414
|
+
uri: S.String,
|
|
415
|
+
defaultSchemaName: S.String,
|
|
416
|
+
status: S.String,
|
|
417
|
+
basedOnSchemaDiscoveryId: S.optional(S.String),
|
|
418
|
+
errors: __S(8, __c1, 0),
|
|
419
|
+
options: __S(9, __c1, 1),
|
|
420
|
+
sqlStatements: __S(11, __c1, 3),
|
|
421
|
+
createdTablesCount: S.Number,
|
|
422
|
+
updatedTablesCount: S.Number,
|
|
423
|
+
deletedTablesCount: S.Number,
|
|
424
|
+
}),
|
|
425
|
+
).annotate({ identifier: "SchemaDiscovery" });
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
function __c2(j: number): any {
|
|
429
|
+
switch (j) {
|
|
430
|
+
case 0:
|
|
431
|
+
return S.suspend(() =>
|
|
432
|
+
S.Struct({
|
|
433
|
+
catalogId: S.String.pipe(T.Label()),
|
|
434
|
+
uri: S.String,
|
|
435
|
+
defaultSchemaName: S.optional(S.String),
|
|
436
|
+
options: __S(9, __c1, 1),
|
|
437
|
+
skipApplying: S.Boolean,
|
|
438
|
+
forceFullDiscovery: S.Boolean,
|
|
439
|
+
}).pipe(
|
|
440
|
+
T.Http({
|
|
441
|
+
method: "POST",
|
|
442
|
+
uri: "/public/api/v1/catalog/{catalogId}/schemaDiscovery",
|
|
443
|
+
code: 200,
|
|
444
|
+
}),
|
|
445
|
+
),
|
|
446
|
+
).annotate({ identifier: "CreateSchemaDiscoveryRequest" });
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
function __c3(j: number): any {
|
|
450
|
+
switch (j) {
|
|
451
|
+
case 0:
|
|
452
|
+
return S.suspend(() =>
|
|
453
|
+
S.Struct({
|
|
454
|
+
schemaDiscoveryId: S.String.pipe(T.Label()),
|
|
455
|
+
}).pipe(
|
|
456
|
+
T.Http({
|
|
457
|
+
method: "DELETE",
|
|
458
|
+
uri: "/public/api/v1/schemaDiscovery/{schemaDiscoveryId}",
|
|
459
|
+
code: 200,
|
|
460
|
+
}),
|
|
461
|
+
),
|
|
462
|
+
).annotate({ identifier: "DeleteSchemaDiscoveryRequest" });
|
|
463
|
+
case 1:
|
|
464
|
+
return S.suspend(() => S.Struct({})).annotate({
|
|
465
|
+
identifier: "DeleteSchemaDiscoveryResponse",
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
function __c4(j: number): any {
|
|
470
|
+
switch (j) {
|
|
471
|
+
case 0:
|
|
472
|
+
return S.suspend(() =>
|
|
473
|
+
S.Struct({
|
|
474
|
+
schemaDiscoveryId: S.String.pipe(T.Label()),
|
|
475
|
+
}).pipe(
|
|
476
|
+
T.Http({
|
|
477
|
+
method: "GET",
|
|
478
|
+
uri: "/public/api/v1/schemaDiscovery/{schemaDiscoveryId}",
|
|
479
|
+
code: 200,
|
|
480
|
+
}),
|
|
481
|
+
),
|
|
482
|
+
).annotate({ identifier: "GetSchemaDiscoveryRequest" });
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
function __c5(j: number): any {
|
|
486
|
+
switch (j) {
|
|
487
|
+
case 0:
|
|
488
|
+
return S.suspend(() =>
|
|
489
|
+
S.Struct({
|
|
490
|
+
catalogId: S.String.pipe(T.Label()),
|
|
491
|
+
latest: S.optional(S.Boolean.pipe(T.Query())),
|
|
492
|
+
pageToken: S.optional(S.String.pipe(T.Query())),
|
|
493
|
+
pageSize: S.optional(S.Number.pipe(T.Query())),
|
|
494
|
+
}).pipe(
|
|
495
|
+
T.Http({
|
|
496
|
+
method: "GET",
|
|
497
|
+
uri: "/public/api/v1/catalog/{catalogId}/schemaDiscovery",
|
|
498
|
+
code: 200,
|
|
499
|
+
}),
|
|
500
|
+
),
|
|
501
|
+
).annotate({ identifier: "ListSchemaDiscoveriesRequest" });
|
|
502
|
+
case 1:
|
|
503
|
+
return S.Array(__S(12, __c1, 4));
|
|
504
|
+
case 2:
|
|
505
|
+
return S.suspend(() =>
|
|
506
|
+
S.Struct({
|
|
507
|
+
nextPageToken: S.optional(S.String),
|
|
508
|
+
result: __S(41, __c5, 1),
|
|
509
|
+
}),
|
|
510
|
+
).annotate({ identifier: "PaginatedSchemaDiscovery" });
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
514
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
515
|
+
return (__s[i] ??= __L.at(f, j));
|
|
516
|
+
}
|