@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.
Files changed (190) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +110 -4
  3. package/lib/.lazy.json +1 -0
  4. package/lib/_bundle/lazy.js +4 -0
  5. package/lib/_bundle/sdk.js +2 -0
  6. package/lib/_bundle/sdk.js.map +1 -0
  7. package/lib/credentials.d.ts +84 -0
  8. package/lib/credentials.d.ts.map +1 -0
  9. package/lib/credentials.js +1 -0
  10. package/lib/errors.d.ts +83 -0
  11. package/lib/errors.d.ts.map +1 -0
  12. package/lib/errors.js +1 -0
  13. package/lib/index.d.ts +42 -0
  14. package/lib/index.d.ts.map +1 -0
  15. package/lib/index.js +6 -0
  16. package/lib/pagination.d.ts +10 -0
  17. package/lib/pagination.d.ts.map +1 -0
  18. package/lib/pagination.js +1 -0
  19. package/lib/protocol.d.ts +29 -0
  20. package/lib/protocol.d.ts.map +1 -0
  21. package/lib/protocol.js +1 -0
  22. package/lib/retry.d.ts +32 -0
  23. package/lib/retry.d.ts.map +1 -0
  24. package/lib/retry.js +1 -0
  25. package/lib/services/catalog.d.ts +2791 -0
  26. package/lib/services/catalog.d.ts.map +1 -0
  27. package/lib/services/catalog.js +101 -0
  28. package/lib/services/catalog.js.map +1 -0
  29. package/lib/services/cluster.d.ts +248 -0
  30. package/lib/services/cluster.d.ts.map +1 -0
  31. package/lib/services/cluster.js +2 -0
  32. package/lib/services/cluster.js.map +1 -0
  33. package/lib/services/column_mask.d.ts +162 -0
  34. package/lib/services/column_mask.d.ts.map +1 -0
  35. package/lib/services/column_mask.js +2 -0
  36. package/lib/services/column_mask.js.map +1 -0
  37. package/lib/services/cross_account_iam_role.d.ts +133 -0
  38. package/lib/services/cross_account_iam_role.d.ts.map +1 -0
  39. package/lib/services/cross_account_iam_role.js +2 -0
  40. package/lib/services/cross_account_iam_role.js.map +1 -0
  41. package/lib/services/data_domain.d.ts +223 -0
  42. package/lib/services/data_domain.d.ts.map +1 -0
  43. package/lib/services/data_domain.js +2 -0
  44. package/lib/services/data_domain.js.map +1 -0
  45. package/lib/services/data_product.d.ts +290 -0
  46. package/lib/services/data_product.d.ts.map +1 -0
  47. package/lib/services/data_product.js +2 -0
  48. package/lib/services/data_product.js.map +1 -0
  49. package/lib/services/data_product_usage_example.d.ts +158 -0
  50. package/lib/services/data_product_usage_example.d.ts.map +1 -0
  51. package/lib/services/data_product_usage_example.js +2 -0
  52. package/lib/services/data_product_usage_example.js.map +1 -0
  53. package/lib/services/data_quality.d.ts +344 -0
  54. package/lib/services/data_quality.d.ts.map +1 -0
  55. package/lib/services/data_quality.js +2 -0
  56. package/lib/services/data_quality.js.map +1 -0
  57. package/lib/services/data_quality_metrics.d.ts +282 -0
  58. package/lib/services/data_quality_metrics.d.ts.map +1 -0
  59. package/lib/services/data_quality_metrics.js +2 -0
  60. package/lib/services/data_quality_metrics.js.map +1 -0
  61. package/lib/services/data_quality_schedule.d.ts +220 -0
  62. package/lib/services/data_quality_schedule.d.ts.map +1 -0
  63. package/lib/services/data_quality_schedule.js +2 -0
  64. package/lib/services/data_quality_schedule.js.map +1 -0
  65. package/lib/services/discovery.d.ts +439 -0
  66. package/lib/services/discovery.d.ts.map +1 -0
  67. package/lib/services/discovery.js +36 -0
  68. package/lib/services/discovery.js.map +1 -0
  69. package/lib/services/file_ingest_source.d.ts +205 -0
  70. package/lib/services/file_ingest_source.d.ts.map +1 -0
  71. package/lib/services/file_ingest_source.js +2 -0
  72. package/lib/services/file_ingest_source.js.map +1 -0
  73. package/lib/services/group.d.ts +140 -0
  74. package/lib/services/group.d.ts.map +1 -0
  75. package/lib/services/group.js +2 -0
  76. package/lib/services/group.js.map +1 -0
  77. package/lib/services/index.d.ts +26 -0
  78. package/lib/services/index.d.ts.map +1 -0
  79. package/lib/services/index.js +25 -0
  80. package/lib/services/kafka_ingest_source.d.ts +236 -0
  81. package/lib/services/kafka_ingest_source.d.ts.map +1 -0
  82. package/lib/services/kafka_ingest_source.js +2 -0
  83. package/lib/services/kafka_ingest_source.js.map +1 -0
  84. package/lib/services/live_table.d.ts +851 -0
  85. package/lib/services/live_table.d.ts.map +1 -0
  86. package/lib/services/live_table.js +20 -0
  87. package/lib/services/live_table.js.map +1 -0
  88. package/lib/services/policy.d.ts +213 -0
  89. package/lib/services/policy.d.ts.map +1 -0
  90. package/lib/services/policy.js +2 -0
  91. package/lib/services/policy.js.map +1 -0
  92. package/lib/services/privatelink.d.ts +95 -0
  93. package/lib/services/privatelink.d.ts.map +1 -0
  94. package/lib/services/privatelink.js +2 -0
  95. package/lib/services/privatelink.js.map +1 -0
  96. package/lib/services/privilege.d.ts +167 -0
  97. package/lib/services/privilege.d.ts.map +1 -0
  98. package/lib/services/privilege.js +2 -0
  99. package/lib/services/privilege.js.map +1 -0
  100. package/lib/services/role.d.ts +222 -0
  101. package/lib/services/role.d.ts.map +1 -0
  102. package/lib/services/role.js +2 -0
  103. package/lib/services/role.js.map +1 -0
  104. package/lib/services/row_filter.d.ts +155 -0
  105. package/lib/services/row_filter.d.ts.map +1 -0
  106. package/lib/services/row_filter.js +2 -0
  107. package/lib/services/row_filter.js.map +1 -0
  108. package/lib/services/schema_discovery.d.ts +236 -0
  109. package/lib/services/schema_discovery.d.ts.map +1 -0
  110. package/lib/services/schema_discovery.js +2 -0
  111. package/lib/services/schema_discovery.js.map +1 -0
  112. package/lib/services/service_account.d.ts +206 -0
  113. package/lib/services/service_account.d.ts.map +1 -0
  114. package/lib/services/service_account.js +2 -0
  115. package/lib/services/service_account.js.map +1 -0
  116. package/lib/services/sql_jobs.d.ts +264 -0
  117. package/lib/services/sql_jobs.d.ts.map +1 -0
  118. package/lib/services/sql_jobs.js +2 -0
  119. package/lib/services/sql_jobs.js.map +1 -0
  120. package/lib/services/tag.d.ts +287 -0
  121. package/lib/services/tag.d.ts.map +1 -0
  122. package/lib/services/tag.js +2 -0
  123. package/lib/services/tag.js.map +1 -0
  124. package/lib/services/user.d.ts +175 -0
  125. package/lib/services/user.d.ts.map +1 -0
  126. package/lib/services/user.js +2 -0
  127. package/lib/services/user.js.map +1 -0
  128. package/lib/services.lazy/catalog.js +4 -0
  129. package/lib/services.lazy/cluster.js +1 -0
  130. package/lib/services.lazy/column_mask.js +1 -0
  131. package/lib/services.lazy/cross_account_iam_role.js +1 -0
  132. package/lib/services.lazy/data_domain.js +1 -0
  133. package/lib/services.lazy/data_product.js +1 -0
  134. package/lib/services.lazy/data_product_usage_example.js +1 -0
  135. package/lib/services.lazy/data_quality.js +1 -0
  136. package/lib/services.lazy/data_quality_metrics.js +1 -0
  137. package/lib/services.lazy/data_quality_schedule.js +1 -0
  138. package/lib/services.lazy/discovery.js +4 -0
  139. package/lib/services.lazy/file_ingest_source.js +1 -0
  140. package/lib/services.lazy/group.js +1 -0
  141. package/lib/services.lazy/index.js +3 -0
  142. package/lib/services.lazy/kafka_ingest_source.js +1 -0
  143. package/lib/services.lazy/live_table.js +4 -0
  144. package/lib/services.lazy/policy.js +1 -0
  145. package/lib/services.lazy/privatelink.js +1 -0
  146. package/lib/services.lazy/privilege.js +1 -0
  147. package/lib/services.lazy/role.js +1 -0
  148. package/lib/services.lazy/row_filter.js +1 -0
  149. package/lib/services.lazy/schema_discovery.js +1 -0
  150. package/lib/services.lazy/service_account.js +1 -0
  151. package/lib/services.lazy/sql_jobs.js +1 -0
  152. package/lib/services.lazy/tag.js +1 -0
  153. package/lib/services.lazy/user.js +1 -0
  154. package/lib/traits.d.ts +11 -0
  155. package/lib/traits.d.ts.map +1 -0
  156. package/lib/traits.js +1 -0
  157. package/package.json +82 -2
  158. package/src/credentials.ts +205 -0
  159. package/src/errors.ts +102 -0
  160. package/src/index.ts +45 -0
  161. package/src/pagination.ts +9 -0
  162. package/src/protocol.ts +94 -0
  163. package/src/retry.ts +50 -0
  164. package/src/services/catalog.ts +6636 -0
  165. package/src/services/cluster.ts +492 -0
  166. package/src/services/column_mask.ts +388 -0
  167. package/src/services/cross_account_iam_role.ts +328 -0
  168. package/src/services/data_domain.ts +509 -0
  169. package/src/services/data_product.ts +641 -0
  170. package/src/services/data_product_usage_example.ts +380 -0
  171. package/src/services/data_quality.ts +771 -0
  172. package/src/services/data_quality_metrics.ts +580 -0
  173. package/src/services/data_quality_schedule.ts +454 -0
  174. package/src/services/discovery.ts +1257 -0
  175. package/src/services/file_ingest_source.ts +480 -0
  176. package/src/services/group.ts +282 -0
  177. package/src/services/index.ts +26 -0
  178. package/src/services/kafka_ingest_source.ts +545 -0
  179. package/src/services/live_table.ts +1537 -0
  180. package/src/services/policy.ts +526 -0
  181. package/src/services/privatelink.ts +209 -0
  182. package/src/services/privilege.ts +423 -0
  183. package/src/services/role.ts +501 -0
  184. package/src/services/row_filter.ts +365 -0
  185. package/src/services/schema_discovery.ts +516 -0
  186. package/src/services/service_account.ts +525 -0
  187. package/src/services/sql_jobs.ts +621 -0
  188. package/src/services/tag.ts +785 -0
  189. package/src/services/user.ts +375 -0
  190. package/src/traits.ts +44 -0
@@ -0,0 +1,509 @@
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: "DataDomainService",
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 CreateDataDomainRequest {
84
+ /** Data Domain name */
85
+ name: string;
86
+ /** Long form description of the Data Domain */
87
+ description?: string | undefined;
88
+ /** Data Domain contact */
89
+ contactUserId?: string | undefined;
90
+ /** Owning role ID */
91
+ roleId?: string | undefined;
92
+ }
93
+ /** Created by user. If empty then the user is inactive/deleted. (read only) */
94
+ export interface UserAndEmail2 {
95
+ /** User ID */
96
+ userId: string;
97
+ /** User email */
98
+ email: string;
99
+ }
100
+ /** Data products assigned to this domain (read only) */
101
+ export interface DataProductIdAndName {
102
+ /** Data Product ID (read only) */
103
+ dataProductId: string;
104
+ /** Data Product name (read only) */
105
+ name: string;
106
+ }
107
+ /** Data products assigned to this domain (read only) */
108
+ export type DataDomainAssignedDataProductsList = Array<DataProductIdAndName>;
109
+ /** Roles assigned to this group (read only) */
110
+ export interface RoleWithName {
111
+ /** Role ID (read only) */
112
+ roleId: string;
113
+ /** Role name (read only) */
114
+ roleName: string;
115
+ }
116
+ /** A Galaxy Data Domain */
117
+ export interface DataDomain {
118
+ /** 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) */
119
+ syncToken: string;
120
+ /** Data Domain ID (read only) */
121
+ dataDomainId: string;
122
+ /** Data Domain name (read only) */
123
+ name: string;
124
+ /** Description of the Data Domain (read only) */
125
+ description?: string | undefined;
126
+ contact?: UserAndEmail2 | undefined;
127
+ /** True if this is the account's default domain (read only) */
128
+ isDefault: boolean;
129
+ /** Data products assigned to this domain (read only) */
130
+ assignedDataProducts: DataDomainAssignedDataProductsList;
131
+ owningRole: RoleWithName;
132
+ /** Creation date (read only) */
133
+ createdOn: string;
134
+ /** Modified date (read only) */
135
+ modifiedOn: string;
136
+ createdBy?: UserAndEmail2 | undefined;
137
+ modifiedBy?: UserAndEmail2 | undefined;
138
+ }
139
+ export interface DeleteDataDomainRequest {
140
+ /** - A Galaxy Data Domain - 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 `=`) */
141
+ dataDomainId: string;
142
+ }
143
+ export interface DeleteDataDomainResponse {}
144
+ export interface GetDataDomainRequest {
145
+ /** - A Galaxy Data Domain - 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 `=`) */
146
+ dataDomainId: string;
147
+ }
148
+ export interface ListDataDomainsRequest {
149
+ /** Pagination token */
150
+ pageToken?: string | undefined;
151
+ /** Page size or 0 for default (current maximum is 100) */
152
+ pageSize?: number | undefined;
153
+ }
154
+ /** A page of results. */
155
+ export type PaginatedDataDomainResultList = Array<DataDomain>;
156
+ export interface PaginatedDataDomain {
157
+ /** The next page token to use or "" if there are no more pages. */
158
+ nextPageToken?: string | undefined;
159
+ /** A page of results. */
160
+ result: PaginatedDataDomainResultList;
161
+ }
162
+ /** Data product IDs to reassign */
163
+ export type ReassignDataDomainDataProductsRequestDataProductIdsList = Array<string>;
164
+ export interface ReassignDataDomainDataProductsRequest {
165
+ /** - A Galaxy Data Domain - 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 `=`) */
166
+ dataDomainId: string;
167
+ /** Data product IDs to reassign */
168
+ dataProductIds?: ReassignDataDomainDataProductsRequestDataProductIdsList | undefined;
169
+ }
170
+ export interface ReassignDataDomainDataProductsResponse {}
171
+ export interface UpdateDataDomainRequest {
172
+ /** - A Galaxy Data Domain - 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
+ dataDomainId: string;
174
+ /** Long form description of the Data Domain */
175
+ description?: string | undefined;
176
+ /** Data Domain contact */
177
+ contactUserId?: string | undefined;
178
+ /** Owning role ID */
179
+ roleId?: string | undefined;
180
+ }
181
+ /** Any fields/values that are invalid or incorrect */
182
+ export type BadRequestFieldsList = Array<string>;
183
+ /** Invalid request */
184
+ export interface BadRequest2 {
185
+ /** Description of the error */
186
+ message?: string | undefined;
187
+ /** Any fields/values that are invalid or incorrect */
188
+ fields?: BadRequestFieldsList | undefined;
189
+ }
190
+ /** Already exists */
191
+ export interface Exists {
192
+ message?: string | undefined;
193
+ }
194
+ /** Authorization failed */
195
+ export type Forbidden2 = Exists;
196
+ /** Any fields/values that weren't found */
197
+ export type NotFoundFieldsList = Array<string>;
198
+ /** A resource or required component was not found */
199
+ export interface NotFound2 {
200
+ /** Name of the resource */
201
+ message: string;
202
+ /** Violation description */
203
+ description?: string | undefined;
204
+ /** Any fields/values that weren't found */
205
+ fields?: NotFoundFieldsList | undefined;
206
+ }
207
+ export type TypeEnum = "TermsOfService";
208
+ /** Field violations (read only) */
209
+ export interface Violation {
210
+ /** Violation type */
211
+ type: TypeEnum;
212
+ /** Violation subject */
213
+ subject: string;
214
+ /** Violation description */
215
+ description: string;
216
+ }
217
+ /** Field violations (read only) */
218
+ export type PreconditionfailureViolationsList = Array<Violation>;
219
+ /** Error details (read only) */
220
+ export interface Preconditionfailure {
221
+ /** Field violations (read only) */
222
+ violations: PreconditionfailureViolationsList;
223
+ }
224
+ /** Request can not be executed in the current system state, such as deleting a non-empty directory. */
225
+ export interface FailedPrecondition {
226
+ /** Description of the error */
227
+ message: string;
228
+ detail: Preconditionfailure;
229
+ }
230
+ export type CreateDataDomainError = BadRequest | Forbidden | Conflict | StarburstGalaxyOpError;
231
+ /** Create a Data Domain **BETA API:** This API is subject to incompatible changes, or even removal, in the future. */
232
+ export const createDataDomain: API.OperationMethod<
233
+ CreateDataDomainRequest,
234
+ DataDomain,
235
+ CreateDataDomainError,
236
+ StarburstGalaxyOpContext
237
+ > = /*@__PURE__*/ API.make(() => ({
238
+ input: __S(8, __c1, 0) as any as S.Schema<CreateDataDomainRequest>,
239
+ output: __S(20, __c2, 4) as any as S.Schema<DataDomain>,
240
+ errors: [BadRequest, Forbidden, Conflict],
241
+ serviceErrors: StarburstGalaxyServiceErrors,
242
+ protocol: StarburstGalaxyProtocol,
243
+ retry: Retry.Retry,
244
+ telemetry: TELEMETRY,
245
+ span: "CreateDataDomain",
246
+ }));
247
+
248
+ export type DeleteDataDomainError =
249
+ | BadRequest
250
+ | Forbidden
251
+ | NotFound
252
+ | PreconditionFailed
253
+ | StarburstGalaxyOpError;
254
+ /** Delete a Data Domain **BETA API:** This API is subject to incompatible changes, or even removal, in the future. */
255
+ export const deleteDataDomain: API.OperationMethod<
256
+ DeleteDataDomainRequest,
257
+ DeleteDataDomainResponse,
258
+ DeleteDataDomainError,
259
+ StarburstGalaxyOpContext
260
+ > = /*@__PURE__*/ API.make(() => ({
261
+ input: __S(24, __c3, 0) as any as S.Schema<DeleteDataDomainRequest>,
262
+ output: __S(32, __c4, 0) as any as S.Schema<DeleteDataDomainResponse>,
263
+ errors: [BadRequest, Forbidden, NotFound, PreconditionFailed],
264
+ serviceErrors: StarburstGalaxyServiceErrors,
265
+ protocol: StarburstGalaxyProtocol,
266
+ retry: Retry.Retry,
267
+ telemetry: TELEMETRY,
268
+ span: "DeleteDataDomain",
269
+ }));
270
+
271
+ export type GetDataDomainError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
272
+ /** Get Data Domain by id **BETA API:** This API is subject to incompatible changes, or even removal, in the future. */
273
+ export const getDataDomain: API.OperationMethod<
274
+ GetDataDomainRequest,
275
+ DataDomain,
276
+ GetDataDomainError,
277
+ StarburstGalaxyOpContext
278
+ > = /*@__PURE__*/ API.make(() => ({
279
+ input: __S(40, __c5, 0) as any as S.Schema<GetDataDomainRequest>,
280
+ output: __S(20, __c2, 4) as any as S.Schema<DataDomain>,
281
+ errors: [BadRequest, Forbidden, NotFound],
282
+ serviceErrors: StarburstGalaxyServiceErrors,
283
+ protocol: StarburstGalaxyProtocol,
284
+ retry: Retry.Retry,
285
+ telemetry: TELEMETRY,
286
+ span: "GetDataDomain",
287
+ }));
288
+
289
+ export type ListDataDomainsError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
290
+ /** Return a paginated list of Data Domains **BETA API:** This API is subject to incompatible changes, or even removal, in the future. */
291
+ export const listDataDomains: API.PaginatedOperationMethod<
292
+ ListDataDomainsRequest,
293
+ PaginatedDataDomain,
294
+ ListDataDomainsError,
295
+ StarburstGalaxyOpContext,
296
+ DataDomain
297
+ > = /*@__PURE__*/ API.makePaginated(
298
+ () => ({
299
+ input: __S(48, __c6, 0) as any as S.Schema<ListDataDomainsRequest>,
300
+ output: __S(50, __c6, 2) as any as S.Schema<PaginatedDataDomain>,
301
+ errors: [BadRequest, Forbidden, NotFound],
302
+ serviceErrors: StarburstGalaxyServiceErrors,
303
+ protocol: StarburstGalaxyProtocol,
304
+ retry: Retry.Retry,
305
+ telemetry: TELEMETRY,
306
+ span: "ListDataDomains",
307
+ pagination: {
308
+ mode: "token",
309
+ inputToken: "pageToken",
310
+ outputToken: "nextPageToken",
311
+ items: "result",
312
+ pageSize: "pageSize",
313
+ } as const,
314
+ }),
315
+ paginateToken,
316
+ ) as any;
317
+
318
+ export type ReassignDataDomainDataProductsError =
319
+ | BadRequest
320
+ | Forbidden
321
+ | NotFound
322
+ | Conflict
323
+ | StarburstGalaxyOpError;
324
+ /** Reassign a set of data products into this data domain **BETA API:** This API is subject to incompatible changes, or even removal, in the future. Only include fields you wish to update. Missing or unrecognized fields are ignored. */
325
+ export const reassignDataDomainDataProducts: API.OperationMethod<
326
+ ReassignDataDomainDataProductsRequest,
327
+ ReassignDataDomainDataProductsResponse,
328
+ ReassignDataDomainDataProductsError,
329
+ StarburstGalaxyOpContext
330
+ > = /*@__PURE__*/ API.make(() => ({
331
+ input: __S(57, __c7, 1) as any as S.Schema<ReassignDataDomainDataProductsRequest>,
332
+ output: __S(32, __c4, 0) as any as S.Schema<ReassignDataDomainDataProductsResponse>,
333
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
334
+ serviceErrors: StarburstGalaxyServiceErrors,
335
+ protocol: StarburstGalaxyProtocol,
336
+ retry: Retry.Retry,
337
+ telemetry: TELEMETRY,
338
+ span: "ReassignDataDomainDataProducts",
339
+ }));
340
+
341
+ export type UpdateDataDomainError =
342
+ | BadRequest
343
+ | Forbidden
344
+ | NotFound
345
+ | Conflict
346
+ | StarburstGalaxyOpError;
347
+ /** Update a Data Domain **BETA API:** This API is subject to incompatible changes, or even removal, in the future. Only include fields you wish to update. Missing or unrecognized fields are ignored. */
348
+ export const updateDataDomain: API.OperationMethod<
349
+ UpdateDataDomainRequest,
350
+ DataDomain,
351
+ UpdateDataDomainError,
352
+ StarburstGalaxyOpContext
353
+ > = /*@__PURE__*/ API.make(() => ({
354
+ input: __S(0, __c0, 0) as any as S.Schema<UpdateDataDomainRequest>,
355
+ output: __S(20, __c2, 4) as any as S.Schema<DataDomain>,
356
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
357
+ serviceErrors: StarburstGalaxyServiceErrors,
358
+ protocol: StarburstGalaxyProtocol,
359
+ retry: Retry.Retry,
360
+ telemetry: TELEMETRY,
361
+ span: "UpdateDataDomain",
362
+ }));
363
+
364
+ // Schema builders: each runs one schema initializer, on that schema's first use.
365
+ function __c0(j: number): any {
366
+ switch (j) {
367
+ case 0:
368
+ return S.suspend(() =>
369
+ S.Struct({
370
+ dataDomainId: S.String.pipe(T.Label()),
371
+ description: S.optional(S.String),
372
+ contactUserId: S.optional(S.String),
373
+ roleId: S.optional(S.String),
374
+ }).pipe(
375
+ T.Http({ method: "PATCH", uri: "/public/api/v1/dataDomain/{dataDomainId}", code: 200 }),
376
+ ),
377
+ ).annotate({ identifier: "UpdateDataDomainRequest" });
378
+ }
379
+ }
380
+ function __c1(j: number): any {
381
+ switch (j) {
382
+ case 0:
383
+ return S.suspend(() =>
384
+ S.Struct({
385
+ name: S.String,
386
+ description: S.optional(S.String),
387
+ contactUserId: S.optional(S.String),
388
+ roleId: S.optional(S.String),
389
+ }).pipe(T.Http({ method: "POST", uri: "/public/api/v1/dataDomain", code: 200 })),
390
+ ).annotate({ identifier: "CreateDataDomainRequest" });
391
+ }
392
+ }
393
+ function __c2(j: number): any {
394
+ switch (j) {
395
+ case 0:
396
+ return S.suspend(() =>
397
+ S.Struct({
398
+ userId: S.String,
399
+ email: S.String,
400
+ }),
401
+ ).annotate({ identifier: "UserAndEmail2" });
402
+ case 1:
403
+ return S.suspend(() =>
404
+ S.Struct({
405
+ dataProductId: S.String,
406
+ name: S.String,
407
+ }),
408
+ ).annotate({ identifier: "DataProductIdAndName" });
409
+ case 2:
410
+ return S.Array(__S(17, __c2, 1));
411
+ case 3:
412
+ return S.suspend(() =>
413
+ S.Struct({
414
+ roleId: S.String,
415
+ roleName: S.String,
416
+ }),
417
+ ).annotate({ identifier: "RoleWithName" });
418
+ case 4:
419
+ return S.suspend(() =>
420
+ S.Struct({
421
+ syncToken: S.String,
422
+ dataDomainId: S.String,
423
+ name: S.String,
424
+ description: S.optional(S.String),
425
+ contact: S.optional(__S(16, __c2, 0)),
426
+ isDefault: S.Boolean,
427
+ assignedDataProducts: __S(18, __c2, 2),
428
+ owningRole: __S(19, __c2, 3),
429
+ createdOn: S.String,
430
+ modifiedOn: S.String,
431
+ createdBy: S.optional(__S(16, __c2, 0)),
432
+ modifiedBy: S.optional(__S(16, __c2, 0)),
433
+ }),
434
+ ).annotate({ identifier: "DataDomain" });
435
+ }
436
+ }
437
+ function __c3(j: number): any {
438
+ switch (j) {
439
+ case 0:
440
+ return S.suspend(() =>
441
+ S.Struct({
442
+ dataDomainId: S.String.pipe(T.Label()),
443
+ }).pipe(
444
+ T.Http({ method: "DELETE", uri: "/public/api/v1/dataDomain/{dataDomainId}", code: 200 }),
445
+ ),
446
+ ).annotate({ identifier: "DeleteDataDomainRequest" });
447
+ }
448
+ }
449
+ function __c4(j: number): any {
450
+ switch (j) {
451
+ case 0:
452
+ return S.suspend(() => S.Struct({})).annotate({ identifier: "DeleteDataDomainResponse" });
453
+ }
454
+ }
455
+ function __c5(j: number): any {
456
+ switch (j) {
457
+ case 0:
458
+ return S.suspend(() =>
459
+ S.Struct({
460
+ dataDomainId: S.String.pipe(T.Label()),
461
+ }).pipe(
462
+ T.Http({ method: "GET", uri: "/public/api/v1/dataDomain/{dataDomainId}", code: 200 }),
463
+ ),
464
+ ).annotate({ identifier: "GetDataDomainRequest" });
465
+ }
466
+ }
467
+ function __c6(j: number): any {
468
+ switch (j) {
469
+ case 0:
470
+ return S.suspend(() =>
471
+ S.Struct({
472
+ pageToken: S.optional(S.String.pipe(T.Query())),
473
+ pageSize: S.optional(S.Number.pipe(T.Query())),
474
+ }).pipe(T.Http({ method: "GET", uri: "/public/api/v1/dataDomain", code: 200 })),
475
+ ).annotate({ identifier: "ListDataDomainsRequest" });
476
+ case 1:
477
+ return S.Array(__S(20, __c2, 4));
478
+ case 2:
479
+ return S.suspend(() =>
480
+ S.Struct({
481
+ nextPageToken: S.optional(S.String),
482
+ result: __S(49, __c6, 1),
483
+ }),
484
+ ).annotate({ identifier: "PaginatedDataDomain" });
485
+ }
486
+ }
487
+ function __c7(j: number): any {
488
+ switch (j) {
489
+ case 0:
490
+ return S.Array(S.String);
491
+ case 1:
492
+ return S.suspend(() =>
493
+ S.Struct({
494
+ dataDomainId: S.String.pipe(T.Label()),
495
+ dataProductIds: S.optional(__S(56, __c7, 0)),
496
+ }).pipe(
497
+ T.Http({
498
+ method: "PATCH",
499
+ uri: "/public/api/v1/dataDomain/{dataDomainId}/dataProductsReassignment",
500
+ code: 200,
501
+ }),
502
+ ),
503
+ ).annotate({ identifier: "ReassignDataDomainDataProductsRequest" });
504
+ }
505
+ }
506
+ // Schema table: entry i is schema j of builder f, made on first reach.
507
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
508
+ return (__s[i] ??= __L.at(f, j));
509
+ }