@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,375 @@
|
|
|
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: "UserService",
|
|
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
|
+
/** Role IDs (read only) */
|
|
74
|
+
export type CreateUserRequestRoleIdsList = Array<string>;
|
|
75
|
+
export interface CreateUserRequest {
|
|
76
|
+
/** Email (read only) */
|
|
77
|
+
email: string;
|
|
78
|
+
/** Role IDs (read only) */
|
|
79
|
+
roleIds: CreateUserRequestRoleIdsList;
|
|
80
|
+
/** Default role (read only) */
|
|
81
|
+
roleId: string;
|
|
82
|
+
}
|
|
83
|
+
export type PrincipalType = "User" | "Role" | "Group";
|
|
84
|
+
/** Principal (read only) */
|
|
85
|
+
export interface Principal {
|
|
86
|
+
/** Principal ID */
|
|
87
|
+
id: string;
|
|
88
|
+
/** Principal type */
|
|
89
|
+
type: PrincipalType;
|
|
90
|
+
}
|
|
91
|
+
/** Directly granted roles (read only) */
|
|
92
|
+
export interface Rolegrant {
|
|
93
|
+
/** Role name */
|
|
94
|
+
roleName: string;
|
|
95
|
+
/** Role ID */
|
|
96
|
+
roleId: string;
|
|
97
|
+
principal: Principal;
|
|
98
|
+
/** Admin option */
|
|
99
|
+
adminOption: boolean;
|
|
100
|
+
}
|
|
101
|
+
/** Directly granted roles (read only) */
|
|
102
|
+
export type UserDirectlyGrantedRolesList = Array<Rolegrant>;
|
|
103
|
+
/** All directly granted, inherited and group roles (read only) */
|
|
104
|
+
export type UserAllRolesList = Array<Rolegrant>;
|
|
105
|
+
/** A user */
|
|
106
|
+
export interface User {
|
|
107
|
+
/** 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) */
|
|
108
|
+
syncToken: string;
|
|
109
|
+
/** User ID (read only) */
|
|
110
|
+
userId: string;
|
|
111
|
+
/** User email (read only) */
|
|
112
|
+
email: string;
|
|
113
|
+
/** Default role id (read only) */
|
|
114
|
+
defaultRoleId?: string | undefined;
|
|
115
|
+
/** Creation date (read only) */
|
|
116
|
+
createdOn: string;
|
|
117
|
+
/** SCIM managed (read only) */
|
|
118
|
+
scimManaged: boolean;
|
|
119
|
+
/** Directly granted roles (read only) */
|
|
120
|
+
directlyGrantedRoles: UserDirectlyGrantedRolesList;
|
|
121
|
+
/** All directly granted, inherited and group roles (read only) */
|
|
122
|
+
allRoles: UserAllRolesList;
|
|
123
|
+
}
|
|
124
|
+
export interface GetUserRequest {
|
|
125
|
+
/** - A user - This parameter can be looked up using `email` instead of its Id. Use `email=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 `=`) */
|
|
126
|
+
userId: string;
|
|
127
|
+
}
|
|
128
|
+
export interface ListUsersRequest {
|
|
129
|
+
/** Pagination token */
|
|
130
|
+
pageToken?: string | undefined;
|
|
131
|
+
/** Page size or 0 for default (current maximum is 100) */
|
|
132
|
+
pageSize?: number | undefined;
|
|
133
|
+
}
|
|
134
|
+
/** A page of results. */
|
|
135
|
+
export type PaginatedUserResultList = Array<User>;
|
|
136
|
+
export interface PaginatedUser {
|
|
137
|
+
/** The next page token to use or "" if there are no more pages. */
|
|
138
|
+
nextPageToken?: string | undefined;
|
|
139
|
+
/** A page of results. */
|
|
140
|
+
result: PaginatedUserResultList;
|
|
141
|
+
}
|
|
142
|
+
/** Directly granted roles */
|
|
143
|
+
export interface UpdateRoleGrantPatch {
|
|
144
|
+
/** Role name */
|
|
145
|
+
roleName?: string | undefined;
|
|
146
|
+
/** Role ID */
|
|
147
|
+
roleId?: string | undefined;
|
|
148
|
+
/** Admin option */
|
|
149
|
+
adminOption?: boolean | undefined;
|
|
150
|
+
}
|
|
151
|
+
/** Directly granted roles */
|
|
152
|
+
export type UpdateUserRequestDirectlyGrantedRolesList = Array<UpdateRoleGrantPatch>;
|
|
153
|
+
export interface UpdateUserRequest {
|
|
154
|
+
/** - A user - This parameter can be looked up using `email` instead of its Id. Use `email=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 `=`) */
|
|
155
|
+
userId: string;
|
|
156
|
+
/** Default role id */
|
|
157
|
+
roleId?: string | undefined;
|
|
158
|
+
/** Directly granted roles */
|
|
159
|
+
directlyGrantedRoles?: UpdateUserRequestDirectlyGrantedRolesList | undefined;
|
|
160
|
+
}
|
|
161
|
+
/** Any fields/values that are invalid or incorrect */
|
|
162
|
+
export type BadRequestFieldsList = Array<string>;
|
|
163
|
+
/** Invalid request */
|
|
164
|
+
export interface BadRequest2 {
|
|
165
|
+
/** Description of the error */
|
|
166
|
+
message?: string | undefined;
|
|
167
|
+
/** Any fields/values that are invalid or incorrect */
|
|
168
|
+
fields?: BadRequestFieldsList | undefined;
|
|
169
|
+
}
|
|
170
|
+
/** Already exists */
|
|
171
|
+
export interface Exists {
|
|
172
|
+
message?: string | undefined;
|
|
173
|
+
}
|
|
174
|
+
/** Authorization failed */
|
|
175
|
+
export type Forbidden2 = Exists;
|
|
176
|
+
/** Any fields/values that weren't found */
|
|
177
|
+
export type NotFoundFieldsList = Array<string>;
|
|
178
|
+
/** A resource or required component was not found */
|
|
179
|
+
export interface NotFound2 {
|
|
180
|
+
/** Name of the resource */
|
|
181
|
+
message: string;
|
|
182
|
+
/** Violation description */
|
|
183
|
+
description?: string | undefined;
|
|
184
|
+
/** Any fields/values that weren't found */
|
|
185
|
+
fields?: NotFoundFieldsList | undefined;
|
|
186
|
+
}
|
|
187
|
+
export type CreateUserError = BadRequest | Forbidden | Conflict | StarburstGalaxyOpError;
|
|
188
|
+
/** Create a user */
|
|
189
|
+
export const createUser: API.OperationMethod<
|
|
190
|
+
CreateUserRequest,
|
|
191
|
+
User,
|
|
192
|
+
CreateUserError,
|
|
193
|
+
StarburstGalaxyOpContext
|
|
194
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
195
|
+
input: __S(1, __c0, 1) as any as S.Schema<CreateUserRequest>,
|
|
196
|
+
output: __S(7, __c1, 3) as any as S.Schema<User>,
|
|
197
|
+
errors: [BadRequest, Forbidden, Conflict],
|
|
198
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
199
|
+
protocol: StarburstGalaxyProtocol,
|
|
200
|
+
retry: Retry.Retry,
|
|
201
|
+
telemetry: TELEMETRY,
|
|
202
|
+
span: "CreateUser",
|
|
203
|
+
}));
|
|
204
|
+
|
|
205
|
+
export type GetUserError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
|
|
206
|
+
/** Get a user */
|
|
207
|
+
export const getUser: API.OperationMethod<
|
|
208
|
+
GetUserRequest,
|
|
209
|
+
User,
|
|
210
|
+
GetUserError,
|
|
211
|
+
StarburstGalaxyOpContext
|
|
212
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
213
|
+
input: __S(8, __c2, 0) as any as S.Schema<GetUserRequest>,
|
|
214
|
+
output: __S(7, __c1, 3) as any as S.Schema<User>,
|
|
215
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
216
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
217
|
+
protocol: StarburstGalaxyProtocol,
|
|
218
|
+
retry: Retry.Retry,
|
|
219
|
+
telemetry: TELEMETRY,
|
|
220
|
+
span: "GetUser",
|
|
221
|
+
}));
|
|
222
|
+
|
|
223
|
+
export type ListUsersError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
|
|
224
|
+
/** Return a list of users */
|
|
225
|
+
export const listUsers: API.PaginatedOperationMethod<
|
|
226
|
+
ListUsersRequest,
|
|
227
|
+
PaginatedUser,
|
|
228
|
+
ListUsersError,
|
|
229
|
+
StarburstGalaxyOpContext,
|
|
230
|
+
User
|
|
231
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
232
|
+
() => ({
|
|
233
|
+
input: __S(12, __c3, 0) as any as S.Schema<ListUsersRequest>,
|
|
234
|
+
output: __S(14, __c3, 2) as any as S.Schema<PaginatedUser>,
|
|
235
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
236
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
237
|
+
protocol: StarburstGalaxyProtocol,
|
|
238
|
+
retry: Retry.Retry,
|
|
239
|
+
telemetry: TELEMETRY,
|
|
240
|
+
span: "ListUsers",
|
|
241
|
+
pagination: {
|
|
242
|
+
mode: "token",
|
|
243
|
+
inputToken: "pageToken",
|
|
244
|
+
outputToken: "nextPageToken",
|
|
245
|
+
items: "result",
|
|
246
|
+
pageSize: "pageSize",
|
|
247
|
+
} as const,
|
|
248
|
+
}),
|
|
249
|
+
paginateToken,
|
|
250
|
+
) as any;
|
|
251
|
+
|
|
252
|
+
export type UpdateUserError = BadRequest | Forbidden | NotFound | Conflict | StarburstGalaxyOpError;
|
|
253
|
+
/** Update user role grants and default role Only include fields you wish to update. Missing or unrecognized fields are ignored. */
|
|
254
|
+
export const updateUser: API.OperationMethod<
|
|
255
|
+
UpdateUserRequest,
|
|
256
|
+
User,
|
|
257
|
+
UpdateUserError,
|
|
258
|
+
StarburstGalaxyOpContext
|
|
259
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
260
|
+
input: __S(18, __c4, 2) as any as S.Schema<UpdateUserRequest>,
|
|
261
|
+
output: __S(7, __c1, 3) as any as S.Schema<User>,
|
|
262
|
+
errors: [BadRequest, Forbidden, NotFound, Conflict],
|
|
263
|
+
serviceErrors: StarburstGalaxyServiceErrors,
|
|
264
|
+
protocol: StarburstGalaxyProtocol,
|
|
265
|
+
retry: Retry.Retry,
|
|
266
|
+
telemetry: TELEMETRY,
|
|
267
|
+
span: "UpdateUser",
|
|
268
|
+
}));
|
|
269
|
+
|
|
270
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
271
|
+
function __c0(j: number): any {
|
|
272
|
+
switch (j) {
|
|
273
|
+
case 0:
|
|
274
|
+
return S.Array(S.String);
|
|
275
|
+
case 1:
|
|
276
|
+
return S.suspend(() =>
|
|
277
|
+
S.Struct({
|
|
278
|
+
email: S.String,
|
|
279
|
+
roleIds: __S(0, __c0, 0),
|
|
280
|
+
roleId: S.String,
|
|
281
|
+
}).pipe(T.Http({ method: "POST", uri: "/public/api/v1/user", code: 200 })),
|
|
282
|
+
).annotate({ identifier: "CreateUserRequest" });
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
function __c1(j: number): any {
|
|
286
|
+
switch (j) {
|
|
287
|
+
case 0:
|
|
288
|
+
return S.suspend(() =>
|
|
289
|
+
S.Struct({
|
|
290
|
+
id: S.String,
|
|
291
|
+
type: S.String,
|
|
292
|
+
}),
|
|
293
|
+
).annotate({ identifier: "Principal" });
|
|
294
|
+
case 1:
|
|
295
|
+
return S.suspend(() =>
|
|
296
|
+
S.Struct({
|
|
297
|
+
roleName: S.String,
|
|
298
|
+
roleId: S.String,
|
|
299
|
+
principal: __S(4, __c1, 0),
|
|
300
|
+
adminOption: S.Boolean,
|
|
301
|
+
}),
|
|
302
|
+
).annotate({ identifier: "Rolegrant" });
|
|
303
|
+
case 2:
|
|
304
|
+
return S.Array(__S(5, __c1, 1));
|
|
305
|
+
case 3:
|
|
306
|
+
return S.suspend(() =>
|
|
307
|
+
S.Struct({
|
|
308
|
+
syncToken: S.String,
|
|
309
|
+
userId: S.String,
|
|
310
|
+
email: S.String,
|
|
311
|
+
defaultRoleId: S.optional(S.String),
|
|
312
|
+
createdOn: S.String,
|
|
313
|
+
scimManaged: S.Boolean,
|
|
314
|
+
directlyGrantedRoles: __S(6, __c1, 2),
|
|
315
|
+
allRoles: __S(6, __c1, 2),
|
|
316
|
+
}),
|
|
317
|
+
).annotate({ identifier: "User" });
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
function __c2(j: number): any {
|
|
321
|
+
switch (j) {
|
|
322
|
+
case 0:
|
|
323
|
+
return S.suspend(() =>
|
|
324
|
+
S.Struct({
|
|
325
|
+
userId: S.String.pipe(T.Label()),
|
|
326
|
+
}).pipe(T.Http({ method: "GET", uri: "/public/api/v1/user/{userId}", code: 200 })),
|
|
327
|
+
).annotate({ identifier: "GetUserRequest" });
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
function __c3(j: number): any {
|
|
331
|
+
switch (j) {
|
|
332
|
+
case 0:
|
|
333
|
+
return S.suspend(() =>
|
|
334
|
+
S.Struct({
|
|
335
|
+
pageToken: S.optional(S.String.pipe(T.Query())),
|
|
336
|
+
pageSize: S.optional(S.Number.pipe(T.Query())),
|
|
337
|
+
}).pipe(T.Http({ method: "GET", uri: "/public/api/v1/user", code: 200 })),
|
|
338
|
+
).annotate({ identifier: "ListUsersRequest" });
|
|
339
|
+
case 1:
|
|
340
|
+
return S.Array(__S(7, __c1, 3));
|
|
341
|
+
case 2:
|
|
342
|
+
return S.suspend(() =>
|
|
343
|
+
S.Struct({
|
|
344
|
+
nextPageToken: S.optional(S.String),
|
|
345
|
+
result: __S(13, __c3, 1),
|
|
346
|
+
}),
|
|
347
|
+
).annotate({ identifier: "PaginatedUser" });
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function __c4(j: number): any {
|
|
351
|
+
switch (j) {
|
|
352
|
+
case 0:
|
|
353
|
+
return S.suspend(() =>
|
|
354
|
+
S.Struct({
|
|
355
|
+
roleName: S.optional(S.String),
|
|
356
|
+
roleId: S.optional(S.String),
|
|
357
|
+
adminOption: S.optional(S.Boolean),
|
|
358
|
+
}),
|
|
359
|
+
).annotate({ identifier: "UpdateRoleGrantPatch" });
|
|
360
|
+
case 1:
|
|
361
|
+
return S.Array(__S(16, __c4, 0));
|
|
362
|
+
case 2:
|
|
363
|
+
return S.suspend(() =>
|
|
364
|
+
S.Struct({
|
|
365
|
+
userId: S.String.pipe(T.Label()),
|
|
366
|
+
roleId: S.optional(S.String),
|
|
367
|
+
directlyGrantedRoles: S.optional(__S(17, __c4, 1)),
|
|
368
|
+
}).pipe(T.Http({ method: "PATCH", uri: "/public/api/v1/user/{userId}", code: 200 })),
|
|
369
|
+
).annotate({ identifier: "UpdateUserRequest" });
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
373
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
374
|
+
return (__s[i] ??= __L.at(f, j));
|
|
375
|
+
}
|
package/src/traits.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Starburst Galaxy SDK trait surface -- hand-written.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the generic protocol traits from core (so generated operations
|
|
5
|
+
* import everything from one place). Galaxy has no envelope of its own; the
|
|
6
|
+
* REST-protocol traits (SensitiveValue / RawResponse) come from
|
|
7
|
+
* `core/protocol-rest`.
|
|
8
|
+
*/
|
|
9
|
+
export {
|
|
10
|
+
Body,
|
|
11
|
+
Header,
|
|
12
|
+
Query,
|
|
13
|
+
Label,
|
|
14
|
+
Http,
|
|
15
|
+
ResponseCode,
|
|
16
|
+
HttpBody,
|
|
17
|
+
FormDataFile,
|
|
18
|
+
KeyDictionary,
|
|
19
|
+
UnionCases,
|
|
20
|
+
applyErrorMatchers,
|
|
21
|
+
getErrorMatchers,
|
|
22
|
+
type HttpTrait,
|
|
23
|
+
type ErrorMatcher,
|
|
24
|
+
bodySymbol,
|
|
25
|
+
headerSymbol,
|
|
26
|
+
querySymbol,
|
|
27
|
+
labelSymbol,
|
|
28
|
+
httpSymbol,
|
|
29
|
+
responseCodeSymbol,
|
|
30
|
+
httpBodySymbol,
|
|
31
|
+
formDataFileSymbol,
|
|
32
|
+
keyDictionarySymbol,
|
|
33
|
+
unionCasesSymbol,
|
|
34
|
+
errorMatchersSymbol,
|
|
35
|
+
} from "@distilled.cloud/core/trait";
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
SensitiveValue,
|
|
39
|
+
RawResponse,
|
|
40
|
+
RawResponseRoot,
|
|
41
|
+
sensitiveValueSymbol,
|
|
42
|
+
rawResponseSymbol,
|
|
43
|
+
rawResponseRootSymbol,
|
|
44
|
+
} from "@distilled.cloud/core/protocol-rest";
|