dataiku-sdk 3.4.0 → 3.6.0
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/README.md +4 -4
- package/bin/dss.js +28 -2
- package/dist/build-metadata.json +1 -1
- package/dist/src/cli/coerce.d.ts +0 -1
- package/dist/src/cli/coerce.js +0 -5
- package/dist/src/cli/command-syntax.json +14524 -0
- package/dist/src/cli/commands/analysis.js +6 -9
- package/dist/src/cli/commands/api-deployer.js +15 -33
- package/dist/src/cli/commands/api-service.js +17 -27
- package/dist/src/cli/commands/app.js +25 -41
- package/dist/src/cli/commands/bundle.js +15 -24
- package/dist/src/cli/commands/business-app.js +10 -17
- package/dist/src/cli/commands/code-env.js +23 -36
- package/dist/src/cli/commands/code.js +4 -4
- package/dist/src/cli/commands/connection.js +12 -22
- package/dist/src/cli/commands/continuous-activity.js +6 -9
- package/dist/src/cli/commands/dashboard.js +8 -13
- package/dist/src/cli/commands/data-collection.js +9 -16
- package/dist/src/cli/commands/data-quality.js +14 -26
- package/dist/src/cli/commands/dataset.js +29 -54
- package/dist/src/cli/commands/discussion.js +7 -10
- package/dist/src/cli/commands/doctor.js +3 -3
- package/dist/src/cli/commands/flow-zone.js +8 -17
- package/dist/src/cli/commands/folder.js +12 -20
- package/dist/src/cli/commands/future.js +7 -10
- package/dist/src/cli/commands/group.js +7 -11
- package/dist/src/cli/commands/insight.js +7 -11
- package/dist/src/cli/commands/job.js +17 -26
- package/dist/src/cli/commands/knowledge-bank.js +5 -6
- package/dist/src/cli/commands/llm.js +5 -8
- package/dist/src/cli/commands/macro.js +9 -16
- package/dist/src/cli/commands/meaning.js +7 -11
- package/dist/src/cli/commands/metrics.js +7 -10
- package/dist/src/cli/commands/ml-task.js +12 -20
- package/dist/src/cli/commands/model-evaluation-store.js +7 -11
- package/dist/src/cli/commands/notebook.js +15 -27
- package/dist/src/cli/commands/plugin.js +35 -68
- package/dist/src/cli/commands/project-deployer.js +10 -22
- package/dist/src/cli/commands/project-folder.js +10 -17
- package/dist/src/cli/commands/project-git.js +38 -70
- package/dist/src/cli/commands/project-library.js +15 -23
- package/dist/src/cli/commands/project.js +9 -26
- package/dist/src/cli/commands/recipe.d.ts +16 -0
- package/dist/src/cli/commands/recipe.js +83 -94
- package/dist/src/cli/commands/saved-model.js +23 -39
- package/dist/src/cli/commands/scenario.js +20 -34
- package/dist/src/cli/commands/sql.js +4 -4
- package/dist/src/cli/commands/statistics.js +11 -18
- package/dist/src/cli/commands/streaming-endpoint.js +7 -11
- package/dist/src/cli/commands/user.js +11 -22
- package/dist/src/cli/commands/variable.js +3 -4
- package/dist/src/cli/commands/webapp.js +10 -16
- package/dist/src/cli/commands/wiki.js +9 -13
- package/dist/src/cli/commands/workspace.js +8 -14
- package/dist/src/cli/contract.d.ts +5 -15
- package/dist/src/cli/contract.js +157 -254
- package/dist/src/cli/doctor.js +1 -0
- package/dist/src/cli/env.d.ts +2 -0
- package/dist/src/cli/env.js +16 -1
- package/dist/src/cli/flags.d.ts +1 -0
- package/dist/src/cli/flags.js +4 -9
- package/dist/src/cli/helpers/app-permissions.js +7 -5
- package/dist/src/cli/helpers/flow-zone.js +8 -6
- package/dist/src/cli/helpers/recipe.js +2 -1
- package/dist/src/cli/syntax.d.ts +83 -0
- package/dist/src/cli/syntax.js +217 -0
- package/dist/src/cli/types.d.ts +3 -0
- package/dist/src/cli/usage.d.ts +1 -1
- package/dist/src/cli/usage.js +4 -2
- package/dist/src/cli/version.d.ts +0 -2
- package/dist/src/cli/version.js +6 -7
- package/dist/src/cli.js +132 -274
- package/dist/src/client.d.ts +2 -1
- package/dist/src/client.js +32 -17
- package/dist/src/errors.d.ts +12 -1
- package/dist/src/errors.js +28 -3
- package/dist/src/index.d.ts +1 -3
- package/dist/src/index.js +2 -2
- package/dist/src/resources/api-services.js +2 -3
- package/dist/src/resources/applications.js +2 -4
- package/dist/src/resources/base.d.ts +2 -0
- package/dist/src/resources/base.js +14 -2
- package/dist/src/resources/code-envs.js +3 -5
- package/dist/src/resources/data-quality.js +14 -13
- package/dist/src/resources/datasets.d.ts +13 -0
- package/dist/src/resources/datasets.js +5 -4
- package/dist/src/resources/flow-zones.js +4 -2
- package/dist/src/resources/folders.js +4 -2
- package/dist/src/resources/futures.js +1 -3
- package/dist/src/resources/insights.js +3 -2
- package/dist/src/resources/jobs.js +4 -6
- package/dist/src/resources/macros.d.ts +1 -1
- package/dist/src/resources/macros.js +3 -7
- package/dist/src/resources/notebooks.js +2 -3
- package/dist/src/resources/project-git.js +9 -11
- package/dist/src/resources/project-library.d.ts +0 -2
- package/dist/src/resources/project-library.js +2 -7
- package/dist/src/resources/projects.js +4 -3
- package/dist/src/resources/recipes.d.ts +28 -0
- package/dist/src/resources/recipes.js +117 -89
- package/dist/src/resources/saved-models.js +1 -13
- package/dist/src/resources/scenarios.js +1 -3
- package/dist/src/resources/sql.js +9 -8
- package/dist/src/resources/statistics.js +3 -4
- package/dist/src/resources/variables.js +2 -1
- package/dist/src/resources/webapps.js +2 -3
- package/dist/src/schemas.d.ts +1 -2
- package/dist/src/schemas.js +1 -1
- package/dist/src/skill.js +6 -7
- package/dist/src/utils/cleanup-ledger.js +9 -8
- package/dist/src/utils/deep-merge.js +2 -4
- package/dist/src/utils/flow-map.js +1 -6
- package/dist/src/utils/polling.d.ts +3 -0
- package/dist/src/utils/polling.js +3 -0
- package/dist/src/utils/project-archive.js +10 -14
- package/dist/src/utils/project-incarnation.js +3 -7
- package/dist/src/utils/records.d.ts +4 -0
- package/dist/src/utils/records.js +8 -0
- package/dist/src/utils/stable-hash.d.ts +3 -1
- package/dist/src/utils/stable-hash.js +2 -0
- package/package.json +10 -14
- package/plugin.json +1 -1
- package/skills/dataiku-dss/SKILL.md +3 -4
- package/skills/dataiku-dss/references/authentication.md +3 -3
- package/skills/dataiku-dss/references/coding.md +1 -1
- package/skills/dataiku-dss/references/discovery.md +1 -1
- package/skills/dataiku-dss/references/mutations.md +0 -1
- package/dist/src/utils/pagination.d.ts +0 -8
- package/dist/src/utils/pagination.js +0 -23
- package/packages/types/dist/index.d.ts +0 -1062
- package/packages/types/dist/index.js +0 -871
|
@@ -1,871 +0,0 @@
|
|
|
1
|
-
import { Type, } from "@sinclair/typebox";
|
|
2
|
-
import { Value, } from "@sinclair/typebox/value";
|
|
3
|
-
// ---------------------------------------------------------------------------
|
|
4
|
-
// Runtime validation helper
|
|
5
|
-
// ---------------------------------------------------------------------------
|
|
6
|
-
/**
|
|
7
|
-
* Validate `data` against a TypeBox schema, throwing on structural mismatch.
|
|
8
|
-
* Uses Value.Assert so extra DSS fields (additionalProperties) are preserved.
|
|
9
|
-
*/
|
|
10
|
-
export function parseSchema(schema, data) {
|
|
11
|
-
Value.Assert(schema, data);
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Format invalid values for validation errors without throwing on BigInt, circular,
|
|
16
|
-
* function, symbol, or other non-JSON-serializable input.
|
|
17
|
-
*/
|
|
18
|
-
function formatInvalidValue(value) {
|
|
19
|
-
if (value === undefined)
|
|
20
|
-
return "undefined";
|
|
21
|
-
if (typeof value === "bigint")
|
|
22
|
-
return `${value.toString()}n`;
|
|
23
|
-
if (typeof value === "symbol") {
|
|
24
|
-
return value.description === undefined ? "Symbol()" : `Symbol(${value.description})`;
|
|
25
|
-
}
|
|
26
|
-
if (typeof value === "function") {
|
|
27
|
-
return value.name ? `[Function ${value.name}]` : "[Function anonymous]";
|
|
28
|
-
}
|
|
29
|
-
const seen = new WeakSet();
|
|
30
|
-
try {
|
|
31
|
-
const json = JSON.stringify(value, (_key, nestedValue) => {
|
|
32
|
-
if (typeof nestedValue === "bigint")
|
|
33
|
-
return `${nestedValue.toString()}n`;
|
|
34
|
-
if (typeof nestedValue === "symbol") {
|
|
35
|
-
return nestedValue.description === undefined
|
|
36
|
-
? "Symbol()"
|
|
37
|
-
: `Symbol(${nestedValue.description})`;
|
|
38
|
-
}
|
|
39
|
-
if (typeof nestedValue === "function") {
|
|
40
|
-
return nestedValue.name
|
|
41
|
-
? `[Function ${nestedValue.name}]`
|
|
42
|
-
: "[Function anonymous]";
|
|
43
|
-
}
|
|
44
|
-
if (nestedValue !== null && typeof nestedValue === "object") {
|
|
45
|
-
if (seen.has(nestedValue))
|
|
46
|
-
return "[Circular]";
|
|
47
|
-
seen.add(nestedValue);
|
|
48
|
-
}
|
|
49
|
-
return nestedValue;
|
|
50
|
-
});
|
|
51
|
-
if (json !== undefined)
|
|
52
|
-
return json;
|
|
53
|
-
}
|
|
54
|
-
catch {
|
|
55
|
-
// Ignore serialization failures and fall back to a safer summary below.
|
|
56
|
-
}
|
|
57
|
-
try {
|
|
58
|
-
return Object.prototype.toString.call(value);
|
|
59
|
-
}
|
|
60
|
-
catch {
|
|
61
|
-
return "[Unformattable value]";
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Validate `data` against a TypeBox schema without throwing, even when invalid
|
|
66
|
-
* values are not JSON-serializable. Always returns the original data (cast as T)
|
|
67
|
-
* and includes human-readable error strings so callers can warn instead of crash.
|
|
68
|
-
*/
|
|
69
|
-
export function safeParseSchema(schema, data) {
|
|
70
|
-
if (Value.Check(schema, data)) {
|
|
71
|
-
return { success: true, data: data, };
|
|
72
|
-
}
|
|
73
|
-
const errors = [...Value.Errors(schema, data),].map((e) => `${e.path}: ${e.message} (got ${formatInvalidValue(e.value)})`);
|
|
74
|
-
return { success: false, data: data, errors, };
|
|
75
|
-
}
|
|
76
|
-
// ---------------------------------------------------------------------------
|
|
77
|
-
// Projects
|
|
78
|
-
// ---------------------------------------------------------------------------
|
|
79
|
-
export const ProjectSummarySchema = Type.Object({
|
|
80
|
-
projectKey: Type.String(),
|
|
81
|
-
name: Type.String(),
|
|
82
|
-
shortDesc: Type.Optional(Type.String()),
|
|
83
|
-
}, { additionalProperties: true, });
|
|
84
|
-
export const ProjectDetailsSchema = Type.Object({
|
|
85
|
-
projectKey: Type.String(),
|
|
86
|
-
name: Type.String(),
|
|
87
|
-
shortDesc: Type.Optional(Type.String()),
|
|
88
|
-
projectStatus: Type.Optional(Type.String()),
|
|
89
|
-
projectAppType: Type.Optional(Type.String()),
|
|
90
|
-
creationTag: Type.Optional(Type.Object({
|
|
91
|
-
versionNumber: Type.Optional(Type.Number()),
|
|
92
|
-
lastModifiedOn: Type.Optional(Type.Union([Type.Number(), Type.String(),])),
|
|
93
|
-
}, { additionalProperties: true, })),
|
|
94
|
-
ownerLogin: Type.Optional(Type.String()),
|
|
95
|
-
tags: Type.Optional(Type.Array(Type.String())),
|
|
96
|
-
versionTag: Type.Optional(Type.Object({
|
|
97
|
-
versionNumber: Type.Number(),
|
|
98
|
-
lastModifiedOn: Type.Number(),
|
|
99
|
-
}, { additionalProperties: true, })),
|
|
100
|
-
}, { additionalProperties: true, });
|
|
101
|
-
export const ProjectMetadataSchema = Type.Object({
|
|
102
|
-
label: Type.Optional(Type.String()),
|
|
103
|
-
shortDesc: Type.Optional(Type.String()),
|
|
104
|
-
description: Type.Optional(Type.String()),
|
|
105
|
-
tags: Type.Optional(Type.Array(Type.String())),
|
|
106
|
-
customFields: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
107
|
-
checklists: Type.Optional(Type.Object({
|
|
108
|
-
checklists: Type.Optional(Type.Array(Type.Object({
|
|
109
|
-
title: Type.String(),
|
|
110
|
-
items: Type.Optional(Type.Array(Type.Object({
|
|
111
|
-
done: Type.Boolean(),
|
|
112
|
-
}, { additionalProperties: true, }))),
|
|
113
|
-
}, { additionalProperties: true, }))),
|
|
114
|
-
}, { additionalProperties: true, })),
|
|
115
|
-
}, { additionalProperties: true, });
|
|
116
|
-
export const ProjectTagsSchema = Type.Object({
|
|
117
|
-
tags: Type.Record(Type.String(), Type.Object({ color: Type.Optional(Type.String()), }, { additionalProperties: true, }), { additionalProperties: true, }),
|
|
118
|
-
}, { additionalProperties: true, });
|
|
119
|
-
// ---------------------------------------------------------------------------
|
|
120
|
-
// Datasets
|
|
121
|
-
// ---------------------------------------------------------------------------
|
|
122
|
-
export const DatasetSummarySchema = Type.Object({
|
|
123
|
-
name: Type.String(),
|
|
124
|
-
type: Type.Optional(Type.String()),
|
|
125
|
-
shortDesc: Type.Optional(Type.String()),
|
|
126
|
-
managed: Type.Optional(Type.Boolean()),
|
|
127
|
-
params: Type.Optional(Type.Object({
|
|
128
|
-
connection: Type.Optional(Type.String()),
|
|
129
|
-
uploadConnection: Type.Optional(Type.String()),
|
|
130
|
-
schema: Type.Optional(Type.String()),
|
|
131
|
-
catalog: Type.Optional(Type.String()),
|
|
132
|
-
}, { additionalProperties: true, })),
|
|
133
|
-
}, { additionalProperties: true, });
|
|
134
|
-
export const DatasetSchemaSchema = Type.Object({
|
|
135
|
-
columns: Type.Array(Type.Object({
|
|
136
|
-
name: Type.String(),
|
|
137
|
-
type: Type.String(),
|
|
138
|
-
comment: Type.Optional(Type.String()),
|
|
139
|
-
}, { additionalProperties: true, })),
|
|
140
|
-
}, { additionalProperties: true, });
|
|
141
|
-
export const DatasetDetailsSchema = Type.Object({
|
|
142
|
-
name: Type.String(),
|
|
143
|
-
type: Type.Optional(Type.String()),
|
|
144
|
-
projectKey: Type.Optional(Type.String()),
|
|
145
|
-
managed: Type.Optional(Type.Boolean()),
|
|
146
|
-
params: Type.Optional(Type.Object({
|
|
147
|
-
connection: Type.Optional(Type.String()),
|
|
148
|
-
uploadConnection: Type.Optional(Type.String()),
|
|
149
|
-
path: Type.Optional(Type.String()),
|
|
150
|
-
table: Type.Optional(Type.String()),
|
|
151
|
-
schema: Type.Optional(Type.String()),
|
|
152
|
-
catalog: Type.Optional(Type.String()),
|
|
153
|
-
folderSmartId: Type.Optional(Type.String()),
|
|
154
|
-
}, { additionalProperties: true, })),
|
|
155
|
-
formatType: Type.Optional(Type.String()),
|
|
156
|
-
formatParams: Type.Optional(Type.Object({
|
|
157
|
-
separator: Type.Optional(Type.String()),
|
|
158
|
-
charset: Type.Optional(Type.String()),
|
|
159
|
-
compress: Type.Optional(Type.String()),
|
|
160
|
-
}, { additionalProperties: true, })),
|
|
161
|
-
schema: Type.Optional(DatasetSchemaSchema),
|
|
162
|
-
tags: Type.Optional(Type.Array(Type.String())),
|
|
163
|
-
shortDesc: Type.Optional(Type.String()),
|
|
164
|
-
}, { additionalProperties: true, });
|
|
165
|
-
export const DatasetCreateOptionsSchema = Type.Object({
|
|
166
|
-
datasetName: Type.String(),
|
|
167
|
-
connection: Type.Optional(Type.String()),
|
|
168
|
-
dsType: Type.Optional(Type.String()),
|
|
169
|
-
table: Type.Optional(Type.String()),
|
|
170
|
-
dbSchema: Type.Optional(Type.String()),
|
|
171
|
-
catalog: Type.Optional(Type.String()),
|
|
172
|
-
formatType: Type.Optional(Type.String()),
|
|
173
|
-
formatParams: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
174
|
-
managed: Type.Optional(Type.Boolean()),
|
|
175
|
-
projectKey: Type.Optional(Type.String()),
|
|
176
|
-
});
|
|
177
|
-
// ---------------------------------------------------------------------------
|
|
178
|
-
// Recipes
|
|
179
|
-
// ---------------------------------------------------------------------------
|
|
180
|
-
export const RecipeSummarySchema = Type.Object({
|
|
181
|
-
name: Type.String(),
|
|
182
|
-
type: Type.Optional(Type.String()),
|
|
183
|
-
}, { additionalProperties: true, });
|
|
184
|
-
export const RecipeDetailsSchema = Type.Object({
|
|
185
|
-
name: Type.String(),
|
|
186
|
-
type: Type.Optional(Type.String()),
|
|
187
|
-
projectKey: Type.Optional(Type.String()),
|
|
188
|
-
inputs: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
189
|
-
outputs: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
190
|
-
params: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
191
|
-
payload: Type.Optional(Type.String()),
|
|
192
|
-
versionTag: Type.Optional(Type.Object({
|
|
193
|
-
versionNumber: Type.Number(),
|
|
194
|
-
}, { additionalProperties: true, })),
|
|
195
|
-
neverBuilt: Type.Optional(Type.Boolean()),
|
|
196
|
-
}, { additionalProperties: true, });
|
|
197
|
-
export const RecipeCreateOptionsSchema = Type.Object({
|
|
198
|
-
type: Type.String(),
|
|
199
|
-
name: Type.Optional(Type.String()),
|
|
200
|
-
inputDatasets: Type.Optional(Type.Array(Type.String())),
|
|
201
|
-
outputDataset: Type.Optional(Type.String()),
|
|
202
|
-
inputs: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
203
|
-
outputs: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
204
|
-
payload: Type.Optional(Type.String()),
|
|
205
|
-
outputConnection: Type.Optional(Type.String()),
|
|
206
|
-
joinOn: Type.Optional(Type.Union([Type.String(), Type.Array(Type.String()),])),
|
|
207
|
-
joinType: Type.Optional(Type.String()),
|
|
208
|
-
fuzzyOn: Type.Optional(Type.Union([Type.String(), Type.Array(Type.String()),])),
|
|
209
|
-
fuzzyDistance: Type.Optional(Type.String()),
|
|
210
|
-
fuzzyThreshold: Type.Optional(Type.Number()),
|
|
211
|
-
fuzzyNormalize: Type.Optional(Type.Boolean()),
|
|
212
|
-
projectKey: Type.Optional(Type.String()),
|
|
213
|
-
outputFolder: Type.Optional(Type.String()),
|
|
214
|
-
});
|
|
215
|
-
export const RecipeCreateResultSchema = Type.Object({
|
|
216
|
-
recipeName: Type.String(),
|
|
217
|
-
type: Type.String(),
|
|
218
|
-
createdDatasets: Type.Array(Type.String()),
|
|
219
|
-
joinConfigured: Type.Boolean(),
|
|
220
|
-
outputProvisioningFallbackUsed: Type.Boolean(),
|
|
221
|
-
outputFolder: Type.Optional(Type.String()),
|
|
222
|
-
temporaryOutputDataset: Type.Optional(Type.String()),
|
|
223
|
-
temporaryOutputDatasetDeleted: Type.Optional(Type.Boolean()),
|
|
224
|
-
syncOutputSchemaPropagated: Type.Optional(Type.Array(Type.String())),
|
|
225
|
-
});
|
|
226
|
-
// ---------------------------------------------------------------------------
|
|
227
|
-
// Jobs
|
|
228
|
-
// ---------------------------------------------------------------------------
|
|
229
|
-
export const JobSummarySchema = Type.Object({
|
|
230
|
-
def: Type.Optional(Type.Object({
|
|
231
|
-
id: Type.Optional(Type.String()),
|
|
232
|
-
type: Type.Optional(Type.String()),
|
|
233
|
-
}, { additionalProperties: true, })),
|
|
234
|
-
baseStatus: Type.Optional(Type.Object({
|
|
235
|
-
def: Type.Optional(Type.Object({
|
|
236
|
-
id: Type.Optional(Type.String()),
|
|
237
|
-
type: Type.Optional(Type.String()),
|
|
238
|
-
}, { additionalProperties: true, })),
|
|
239
|
-
state: Type.Optional(Type.String()),
|
|
240
|
-
}, { additionalProperties: true, })),
|
|
241
|
-
}, { additionalProperties: true, });
|
|
242
|
-
export const JobWaitResultSchema = Type.Object({
|
|
243
|
-
jobId: Type.String(),
|
|
244
|
-
state: Type.String(),
|
|
245
|
-
type: Type.String(),
|
|
246
|
-
elapsedMs: Type.Number(),
|
|
247
|
-
pollCount: Type.Number(),
|
|
248
|
-
success: Type.Boolean(),
|
|
249
|
-
timedOut: Type.Optional(Type.Boolean()),
|
|
250
|
-
progress: Type.Object({
|
|
251
|
-
done: Type.Number(),
|
|
252
|
-
failed: Type.Number(),
|
|
253
|
-
running: Type.Number(),
|
|
254
|
-
total: Type.Union([Type.Number(), Type.Null(),]),
|
|
255
|
-
}),
|
|
256
|
-
log: Type.Optional(Type.String()),
|
|
257
|
-
});
|
|
258
|
-
export const FutureStateSchema = Type.Object({
|
|
259
|
-
jobId: Type.Optional(Type.String()),
|
|
260
|
-
hasResult: Type.Optional(Type.Boolean()),
|
|
261
|
-
aborted: Type.Optional(Type.Boolean()),
|
|
262
|
-
abortable: Type.Optional(Type.Boolean()),
|
|
263
|
-
alive: Type.Optional(Type.Boolean()),
|
|
264
|
-
unknown: Type.Optional(Type.Boolean()),
|
|
265
|
-
startTime: Type.Optional(Type.Number()),
|
|
266
|
-
runningTime: Type.Optional(Type.Number()),
|
|
267
|
-
result: Type.Optional(Type.Unknown()),
|
|
268
|
-
}, { additionalProperties: true, });
|
|
269
|
-
export const FutureWaitResultSchema = Type.Object({
|
|
270
|
-
futureId: Type.String(),
|
|
271
|
-
jobId: Type.Optional(Type.String()),
|
|
272
|
-
state: Type.String(),
|
|
273
|
-
elapsedMs: Type.Number(),
|
|
274
|
-
pollCount: Type.Number(),
|
|
275
|
-
success: Type.Boolean(),
|
|
276
|
-
timedOut: Type.Optional(Type.Boolean()),
|
|
277
|
-
hasResult: Type.Boolean(),
|
|
278
|
-
alive: Type.Optional(Type.Boolean()),
|
|
279
|
-
aborted: Type.Optional(Type.Boolean()),
|
|
280
|
-
unknown: Type.Optional(Type.Boolean()),
|
|
281
|
-
result: Type.Optional(Type.Unknown()),
|
|
282
|
-
}, { additionalProperties: true, });
|
|
283
|
-
export const BuildModeSchema = Type.Union([
|
|
284
|
-
Type.Literal("RECURSIVE_BUILD"),
|
|
285
|
-
Type.Literal("NON_RECURSIVE_FORCED_BUILD"),
|
|
286
|
-
Type.Literal("RECURSIVE_FORCED_BUILD"),
|
|
287
|
-
Type.Literal("RECURSIVE_MISSING_ONLY_BUILD"),
|
|
288
|
-
]);
|
|
289
|
-
// ---------------------------------------------------------------------------
|
|
290
|
-
// Scenarios
|
|
291
|
-
// ---------------------------------------------------------------------------
|
|
292
|
-
export const ScenarioSummarySchema = Type.Object({
|
|
293
|
-
id: Type.String(),
|
|
294
|
-
name: Type.Optional(Type.String()),
|
|
295
|
-
active: Type.Optional(Type.Boolean()),
|
|
296
|
-
}, { additionalProperties: true, });
|
|
297
|
-
export const ScenarioDetailsSchema = Type.Object({
|
|
298
|
-
id: Type.String(),
|
|
299
|
-
name: Type.Optional(Type.String()),
|
|
300
|
-
active: Type.Optional(Type.Boolean()),
|
|
301
|
-
type: Type.Optional(Type.String()),
|
|
302
|
-
projectKey: Type.Optional(Type.String()),
|
|
303
|
-
params: Type.Optional(Type.Object({
|
|
304
|
-
steps: Type.Optional(Type.Array(Type.Unknown())),
|
|
305
|
-
triggers: Type.Optional(Type.Array(Type.Unknown())),
|
|
306
|
-
reporters: Type.Optional(Type.Array(Type.Unknown())),
|
|
307
|
-
customScript: Type.Optional(Type.Object({
|
|
308
|
-
script: Type.Optional(Type.String()),
|
|
309
|
-
}, { additionalProperties: true, })),
|
|
310
|
-
}, { additionalProperties: true, })),
|
|
311
|
-
versionTag: Type.Optional(Type.Object({
|
|
312
|
-
versionNumber: Type.Number(),
|
|
313
|
-
}, { additionalProperties: true, })),
|
|
314
|
-
}, { additionalProperties: true, });
|
|
315
|
-
export const ScenarioStatusSchema = Type.Object({
|
|
316
|
-
id: Type.Optional(Type.String()),
|
|
317
|
-
name: Type.Optional(Type.String()),
|
|
318
|
-
active: Type.Optional(Type.Boolean()),
|
|
319
|
-
running: Type.Optional(Type.Boolean()),
|
|
320
|
-
nextRun: Type.Optional(Type.Number()),
|
|
321
|
-
lastRun: Type.Optional(Type.Object({
|
|
322
|
-
runId: Type.Optional(Type.String()),
|
|
323
|
-
outcome: Type.Optional(Type.String()),
|
|
324
|
-
start: Type.Optional(Type.Number()),
|
|
325
|
-
end: Type.Optional(Type.Number()),
|
|
326
|
-
trigger: Type.Optional(Type.Object({
|
|
327
|
-
type: Type.Optional(Type.String()),
|
|
328
|
-
}, { additionalProperties: true, })),
|
|
329
|
-
}, { additionalProperties: true, })),
|
|
330
|
-
}, { additionalProperties: true, });
|
|
331
|
-
export const ScenarioStepRunSchema = Type.Object({
|
|
332
|
-
name: Type.Optional(Type.String()),
|
|
333
|
-
type: Type.Optional(Type.String()),
|
|
334
|
-
outcome: Type.String(),
|
|
335
|
-
warningCount: Type.Optional(Type.Number()),
|
|
336
|
-
warnings: Type.Optional(Type.Array(Type.Object({
|
|
337
|
-
type: Type.String(),
|
|
338
|
-
count: Type.Optional(Type.Number()),
|
|
339
|
-
}, { additionalProperties: false, }))),
|
|
340
|
-
}, { additionalProperties: false, });
|
|
341
|
-
export const ScenarioWaitResultSchema = Type.Object({
|
|
342
|
-
scenarioId: Type.String(),
|
|
343
|
-
runId: Type.String(),
|
|
344
|
-
outcome: Type.String(),
|
|
345
|
-
success: Type.Boolean(),
|
|
346
|
-
elapsedMs: Type.Number(),
|
|
347
|
-
pollCount: Type.Number(),
|
|
348
|
-
timedOut: Type.Optional(Type.Boolean()),
|
|
349
|
-
triggerRunId: Type.Optional(Type.String()),
|
|
350
|
-
steps: Type.Optional(Type.Array(ScenarioStepRunSchema)),
|
|
351
|
-
});
|
|
352
|
-
// ---------------------------------------------------------------------------
|
|
353
|
-
// Macros (runnables)
|
|
354
|
-
// ---------------------------------------------------------------------------
|
|
355
|
-
/** A macro definition as returned by GET /projects/{pk}/runnables/{runnableType}. */
|
|
356
|
-
export const MacroDefinitionSchema = Type.Object({
|
|
357
|
-
runnableType: Type.String(),
|
|
358
|
-
ownerPluginId: Type.Optional(Type.String()),
|
|
359
|
-
meta: Type.Optional(Type.Object({
|
|
360
|
-
label: Type.Optional(Type.String()),
|
|
361
|
-
}, { additionalProperties: true, })),
|
|
362
|
-
longDescription: Type.Optional(Type.String()),
|
|
363
|
-
resultType: Type.Optional(Type.String()),
|
|
364
|
-
extension: Type.Optional(Type.String()),
|
|
365
|
-
mimeType: Type.Optional(Type.String()),
|
|
366
|
-
resultLabel: Type.Optional(Type.String()),
|
|
367
|
-
params: Type.Optional(Type.Array(Type.Object({
|
|
368
|
-
name: Type.String(),
|
|
369
|
-
type: Type.Optional(Type.String()),
|
|
370
|
-
}, { additionalProperties: true, }))),
|
|
371
|
-
adminParams: Type.Optional(Type.Array(Type.Unknown())),
|
|
372
|
-
}, { additionalProperties: true, });
|
|
373
|
-
/** One entry of GET /projects/{pk}/runnables (array[Macro]). */
|
|
374
|
-
export const MacroSummarySchema = Type.Object({
|
|
375
|
-
runnableType: Type.Optional(Type.String()),
|
|
376
|
-
/** Owning plugin id as the server returns it (live identifiers are server-authored). */
|
|
377
|
-
ownerPluginId: Type.Optional(Type.String()),
|
|
378
|
-
meta: Type.Optional(Type.Object({
|
|
379
|
-
label: Type.Optional(Type.String()),
|
|
380
|
-
}, { additionalProperties: true, })),
|
|
381
|
-
}, { additionalProperties: true, });
|
|
382
|
-
export const MacroSummaryArraySchema = Type.Array(MacroSummarySchema);
|
|
383
|
-
/**
|
|
384
|
-
* Poll-state response of GET /projects/{pk}/runnables/{runnableType}/state/{run}.
|
|
385
|
-
* While running: `running: true` and optionally a stack of `progress` entries.
|
|
386
|
-
* When finished: `running: false`; on failure `resultError`/`storedError` carry
|
|
387
|
-
* details, otherwise `type` is filled.
|
|
388
|
-
*/
|
|
389
|
-
export const MacroStateSchema = Type.Object({
|
|
390
|
-
exists: Type.Optional(Type.Boolean()),
|
|
391
|
-
running: Type.Optional(Type.Boolean()),
|
|
392
|
-
empty: Type.Optional(Type.Boolean()),
|
|
393
|
-
type: Type.Optional(Type.String()),
|
|
394
|
-
progress: Type.Optional(Type.Unknown()),
|
|
395
|
-
resultError: Type.Optional(Type.Unknown()),
|
|
396
|
-
storedError: Type.Optional(Type.Unknown()),
|
|
397
|
-
}, { additionalProperties: true, });
|
|
398
|
-
/** Run trigger response of POST /projects/{pk}/runnables/{runnableType}. */
|
|
399
|
-
export const MacroRunStartSchema = Type.Object({
|
|
400
|
-
runId: Type.String(),
|
|
401
|
-
}, { additionalProperties: true, });
|
|
402
|
-
/** Result of {@link MacrosResource.runAndWait}: bounded client-side polling. */
|
|
403
|
-
export const MacroWaitResultSchema = Type.Object({
|
|
404
|
-
runnableType: Type.String(),
|
|
405
|
-
runId: Type.String(),
|
|
406
|
-
running: Type.Boolean(),
|
|
407
|
-
success: Type.Boolean(),
|
|
408
|
-
elapsedMs: Type.Number(),
|
|
409
|
-
pollCount: Type.Number(),
|
|
410
|
-
timedOut: Type.Optional(Type.Boolean()),
|
|
411
|
-
state: Type.Optional(MacroStateSchema),
|
|
412
|
-
}, { additionalProperties: true, });
|
|
413
|
-
// ---------------------------------------------------------------------------
|
|
414
|
-
// Flow zones
|
|
415
|
-
// ---------------------------------------------------------------------------
|
|
416
|
-
export const FlowZoneObjectTypeSchema = Type.Union([
|
|
417
|
-
Type.Literal("DATASET"),
|
|
418
|
-
Type.Literal("MANAGED_FOLDER"),
|
|
419
|
-
Type.Literal("SAVED_MODEL"),
|
|
420
|
-
Type.Literal("RECIPE"),
|
|
421
|
-
Type.Literal("MODEL_EVALUATION_STORE"),
|
|
422
|
-
Type.Literal("STREAMING_ENDPOINT"),
|
|
423
|
-
Type.Literal("LABELING_TASK"),
|
|
424
|
-
Type.Literal("RETRIEVABLE_KNOWLEDGE"),
|
|
425
|
-
]);
|
|
426
|
-
export const FlowZoneItemSchema = Type.Object({
|
|
427
|
-
objectId: Type.String(),
|
|
428
|
-
objectType: FlowZoneObjectTypeSchema,
|
|
429
|
-
projectKey: Type.Optional(Type.String()),
|
|
430
|
-
}, { additionalProperties: true, });
|
|
431
|
-
export const FlowZonePositionSchema = Type.Object({
|
|
432
|
-
x: Type.Number(),
|
|
433
|
-
y: Type.Number(),
|
|
434
|
-
}, { additionalProperties: false, });
|
|
435
|
-
export const FlowZoneSchema = Type.Object({
|
|
436
|
-
id: Type.String(),
|
|
437
|
-
name: Type.String(),
|
|
438
|
-
color: Type.Optional(Type.String()),
|
|
439
|
-
projectKey: Type.Optional(Type.String()),
|
|
440
|
-
items: Type.Optional(Type.Array(FlowZoneItemSchema)),
|
|
441
|
-
shared: Type.Optional(Type.Array(FlowZoneItemSchema)),
|
|
442
|
-
position: Type.Optional(FlowZonePositionSchema),
|
|
443
|
-
}, { additionalProperties: true, });
|
|
444
|
-
export const FlowZoneArraySchema = Type.Array(FlowZoneSchema);
|
|
445
|
-
export const FlowZoneCreateOptionsSchema = Type.Object({
|
|
446
|
-
name: Type.String(),
|
|
447
|
-
color: Type.Optional(Type.String()),
|
|
448
|
-
projectKey: Type.Optional(Type.String()),
|
|
449
|
-
position: Type.Optional(FlowZonePositionSchema),
|
|
450
|
-
}, { additionalProperties: false, });
|
|
451
|
-
export const FlowZoneUpdateOptionsSchema = Type.Object({
|
|
452
|
-
name: Type.Optional(Type.String()),
|
|
453
|
-
color: Type.Optional(Type.String()),
|
|
454
|
-
projectKey: Type.Optional(Type.String()),
|
|
455
|
-
position: Type.Optional(FlowZonePositionSchema),
|
|
456
|
-
}, { additionalProperties: false, });
|
|
457
|
-
// ---------------------------------------------------------------------------
|
|
458
|
-
// Folders
|
|
459
|
-
// ---------------------------------------------------------------------------
|
|
460
|
-
export const FolderCreateOptionsSchema = Type.Object({
|
|
461
|
-
name: Type.String(),
|
|
462
|
-
type: Type.Optional(Type.String()),
|
|
463
|
-
connection: Type.Optional(Type.String()),
|
|
464
|
-
path: Type.Optional(Type.String()),
|
|
465
|
-
params: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
466
|
-
projectKey: Type.Optional(Type.String()),
|
|
467
|
-
}, { additionalProperties: false, });
|
|
468
|
-
export const FolderSummarySchema = Type.Object({
|
|
469
|
-
id: Type.String(),
|
|
470
|
-
name: Type.Optional(Type.String()),
|
|
471
|
-
type: Type.Optional(Type.String()),
|
|
472
|
-
}, { additionalProperties: true, });
|
|
473
|
-
export const FolderDetailsSchema = Type.Object({
|
|
474
|
-
id: Type.String(),
|
|
475
|
-
name: Type.Optional(Type.String()),
|
|
476
|
-
type: Type.Optional(Type.String()),
|
|
477
|
-
projectKey: Type.Optional(Type.String()),
|
|
478
|
-
params: Type.Optional(Type.Object({
|
|
479
|
-
connection: Type.Optional(Type.String()),
|
|
480
|
-
path: Type.Optional(Type.String()),
|
|
481
|
-
}, { additionalProperties: true, })),
|
|
482
|
-
tags: Type.Optional(Type.Array(Type.String())),
|
|
483
|
-
}, { additionalProperties: true, });
|
|
484
|
-
export const FolderItemSchema = Type.Object({
|
|
485
|
-
path: Type.String(),
|
|
486
|
-
size: Type.Optional(Type.Number()),
|
|
487
|
-
lastModified: Type.Optional(Type.Number()),
|
|
488
|
-
}, { additionalProperties: true, });
|
|
489
|
-
// ---------------------------------------------------------------------------
|
|
490
|
-
// Variables
|
|
491
|
-
// ---------------------------------------------------------------------------
|
|
492
|
-
export const ProjectVariablesSchema = Type.Object({
|
|
493
|
-
standard: Type.Record(Type.String(), Type.Unknown()),
|
|
494
|
-
local: Type.Record(Type.String(), Type.Unknown()),
|
|
495
|
-
}, { additionalProperties: true, });
|
|
496
|
-
// ---------------------------------------------------------------------------
|
|
497
|
-
// Connections
|
|
498
|
-
// ---------------------------------------------------------------------------
|
|
499
|
-
export const ConnectionSummarySchema = Type.Object({
|
|
500
|
-
name: Type.String(),
|
|
501
|
-
types: Type.Optional(Type.Array(Type.String())),
|
|
502
|
-
managed: Type.Optional(Type.Boolean()),
|
|
503
|
-
dbSchemas: Type.Optional(Type.Array(Type.String())),
|
|
504
|
-
}, { additionalProperties: true, });
|
|
505
|
-
// ---------------------------------------------------------------------------
|
|
506
|
-
// Code Envs
|
|
507
|
-
// ---------------------------------------------------------------------------
|
|
508
|
-
export const CodeEnvSummarySchema = Type.Object({
|
|
509
|
-
envName: Type.String(),
|
|
510
|
-
envLang: Type.String(),
|
|
511
|
-
deploymentMode: Type.Optional(Type.String()),
|
|
512
|
-
}, { additionalProperties: true, });
|
|
513
|
-
export const CodeEnvDetailsSchema = Type.Object({
|
|
514
|
-
envName: Type.String(),
|
|
515
|
-
envLang: Type.String(),
|
|
516
|
-
pythonInterpreter: Type.Optional(Type.String()),
|
|
517
|
-
deploymentMode: Type.Optional(Type.String()),
|
|
518
|
-
requestedPackages: Type.Array(Type.String()),
|
|
519
|
-
installedPackages: Type.Array(Type.String()),
|
|
520
|
-
definitionHash: Type.Optional(Type.String()),
|
|
521
|
-
});
|
|
522
|
-
export const CodeEnvLogSummarySchema = Type.Object({
|
|
523
|
-
name: Type.String(),
|
|
524
|
-
}, { additionalProperties: true, });
|
|
525
|
-
export const CodeEnvLogSummaryArraySchema = Type.Array(CodeEnvLogSummarySchema);
|
|
526
|
-
export const CodeEnvLogResultSchema = Type.Object({
|
|
527
|
-
log: Type.String(),
|
|
528
|
-
bytes: Type.Number(),
|
|
529
|
-
truncated: Type.Boolean(),
|
|
530
|
-
tailed: Type.Boolean(),
|
|
531
|
-
}, { additionalProperties: false, });
|
|
532
|
-
export const CodeEnvGetLogOptionsSchema = Type.Object({
|
|
533
|
-
maxBytes: Type.Optional(Type.Number()),
|
|
534
|
-
maxLines: Type.Optional(Type.Number()),
|
|
535
|
-
}, { additionalProperties: false, });
|
|
536
|
-
export const CodeEnvUpdateImagesOptionsSchema = Type.Object({
|
|
537
|
-
envVersion: Type.Optional(Type.String()),
|
|
538
|
-
wait: Type.Optional(Type.Boolean()),
|
|
539
|
-
}, { additionalProperties: false, });
|
|
540
|
-
export const CodeEnvVersionForProjectSchema = Type.Object({
|
|
541
|
-
version: Type.Optional(Type.String()),
|
|
542
|
-
bundleId: Type.Optional(Type.String()),
|
|
543
|
-
}, { additionalProperties: true, });
|
|
544
|
-
export const CodeEnvActionResultSchema = Type.Record(Type.String(), Type.Unknown());
|
|
545
|
-
export const CodeEnvCreateOptionsSchema = Type.Object({
|
|
546
|
-
envLang: Type.String(),
|
|
547
|
-
envName: Type.String(),
|
|
548
|
-
deploymentMode: Type.String(),
|
|
549
|
-
params: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
550
|
-
wait: Type.Optional(Type.Boolean()),
|
|
551
|
-
}, { additionalProperties: false, });
|
|
552
|
-
export const CodeEnvPackageListSchema = Type.Union([
|
|
553
|
-
Type.String(),
|
|
554
|
-
Type.Array(Type.String()),
|
|
555
|
-
]);
|
|
556
|
-
export const CodeEnvSetPackagesOptionsSchema = Type.Object({
|
|
557
|
-
packages: CodeEnvPackageListSchema,
|
|
558
|
-
installCorePackages: Type.Optional(Type.Boolean()),
|
|
559
|
-
expectHash: Type.Optional(Type.String()),
|
|
560
|
-
}, { additionalProperties: false, });
|
|
561
|
-
export const CodeEnvUpdatePackagesOptionsSchema = Type.Object({
|
|
562
|
-
forceRebuildEnv: Type.Optional(Type.Boolean()),
|
|
563
|
-
versionToUpdate: Type.Optional(Type.String()),
|
|
564
|
-
wait: Type.Optional(Type.Boolean()),
|
|
565
|
-
}, { additionalProperties: false, });
|
|
566
|
-
export const CodeEnvWaitOptionsSchema = Type.Object({
|
|
567
|
-
wait: Type.Optional(Type.Boolean()),
|
|
568
|
-
}, { additionalProperties: false, });
|
|
569
|
-
export const CodeEnvUsageArraySchema = Type.Array(CodeEnvActionResultSchema);
|
|
570
|
-
// ---------------------------------------------------------------------------
|
|
571
|
-
// Wiki, Dashboards, Insights
|
|
572
|
-
// ---------------------------------------------------------------------------
|
|
573
|
-
export const WikiTaxonomyNodeSchema = Type.Object({
|
|
574
|
-
id: Type.String(),
|
|
575
|
-
children: Type.Array(Type.Unknown()),
|
|
576
|
-
}, { additionalProperties: true, });
|
|
577
|
-
export const WikiSettingsSchema = Type.Object({
|
|
578
|
-
projectKey: Type.Optional(Type.String()),
|
|
579
|
-
taxonomy: Type.Optional(Type.Array(WikiTaxonomyNodeSchema)),
|
|
580
|
-
homeArticleId: Type.Optional(Type.String()),
|
|
581
|
-
}, { additionalProperties: true, });
|
|
582
|
-
export const WikiArticleMetadataSchema = Type.Object({
|
|
583
|
-
id: Type.String(),
|
|
584
|
-
name: Type.Optional(Type.String()),
|
|
585
|
-
projectKey: Type.Optional(Type.String()),
|
|
586
|
-
}, { additionalProperties: true, });
|
|
587
|
-
export const WikiArticleDataSchema = Type.Object({
|
|
588
|
-
article: WikiArticleMetadataSchema,
|
|
589
|
-
payload: Type.Optional(Type.String()),
|
|
590
|
-
}, { additionalProperties: true, });
|
|
591
|
-
export const DashboardSummarySchema = Type.Object({
|
|
592
|
-
id: Type.String(),
|
|
593
|
-
name: Type.String(),
|
|
594
|
-
projectKey: Type.Optional(Type.String()),
|
|
595
|
-
owner: Type.Optional(Type.String()),
|
|
596
|
-
listed: Type.Optional(Type.Boolean()),
|
|
597
|
-
numPages: Type.Optional(Type.Number()),
|
|
598
|
-
numTiles: Type.Optional(Type.Number()),
|
|
599
|
-
}, { additionalProperties: true, });
|
|
600
|
-
export const DashboardDetailsSchema = Type.Object({
|
|
601
|
-
id: Type.String(),
|
|
602
|
-
name: Type.String(),
|
|
603
|
-
projectKey: Type.Optional(Type.String()),
|
|
604
|
-
owner: Type.Optional(Type.String()),
|
|
605
|
-
listed: Type.Optional(Type.Boolean()),
|
|
606
|
-
pages: Type.Optional(Type.Array(Type.Unknown())),
|
|
607
|
-
}, { additionalProperties: true, });
|
|
608
|
-
export const InsightSummarySchema = Type.Object({
|
|
609
|
-
id: Type.String(),
|
|
610
|
-
name: Type.String(),
|
|
611
|
-
type: Type.Optional(Type.String()),
|
|
612
|
-
projectKey: Type.Optional(Type.String()),
|
|
613
|
-
owner: Type.Optional(Type.String()),
|
|
614
|
-
listed: Type.Optional(Type.Boolean()),
|
|
615
|
-
}, { additionalProperties: true, });
|
|
616
|
-
export const InsightDetailsSchema = Type.Object({
|
|
617
|
-
id: Type.String(),
|
|
618
|
-
name: Type.String(),
|
|
619
|
-
type: Type.Optional(Type.String()),
|
|
620
|
-
projectKey: Type.Optional(Type.String()),
|
|
621
|
-
owner: Type.Optional(Type.String()),
|
|
622
|
-
listed: Type.Optional(Type.Boolean()),
|
|
623
|
-
}, { additionalProperties: true, });
|
|
624
|
-
export const DataQualityRuleSchema = Type.Object({
|
|
625
|
-
id: Type.String(),
|
|
626
|
-
displayName: Type.Optional(Type.String()),
|
|
627
|
-
name: Type.Optional(Type.String()),
|
|
628
|
-
type: Type.Optional(Type.String()),
|
|
629
|
-
enabled: Type.Optional(Type.Boolean()),
|
|
630
|
-
autoRun: Type.Optional(Type.Boolean()),
|
|
631
|
-
computeOnBuildMode: Type.Optional(Type.String()),
|
|
632
|
-
}, { additionalProperties: true, });
|
|
633
|
-
export const DataQualityRulesSchema = Type.Object({
|
|
634
|
-
checks: Type.Array(DataQualityRuleSchema),
|
|
635
|
-
monitor: Type.Optional(Type.Unknown()),
|
|
636
|
-
displayedState: Type.Optional(Type.Unknown()),
|
|
637
|
-
}, { additionalProperties: true, });
|
|
638
|
-
export const DataQualityRuleResultSchema = Type.Object({
|
|
639
|
-
id: Type.Optional(Type.String()),
|
|
640
|
-
name: Type.Optional(Type.String()),
|
|
641
|
-
ruleId: Type.Optional(Type.String()),
|
|
642
|
-
outcome: Type.Optional(Type.String()),
|
|
643
|
-
status: Type.Optional(Type.String()),
|
|
644
|
-
}, { additionalProperties: true, });
|
|
645
|
-
export const DataQualityStatusByPartitionSchema = Type.Record(Type.String(), Type.Unknown());
|
|
646
|
-
export const DataQualityStatusSchema = Type.Union([
|
|
647
|
-
Type.String(),
|
|
648
|
-
Type.Record(Type.String(), Type.Unknown()),
|
|
649
|
-
]);
|
|
650
|
-
export const DataQualityProjectStatusSchema = Type.Record(Type.String(), Type.Unknown());
|
|
651
|
-
export const DataQualityTimelineEntrySchema = Type.Record(Type.String(), Type.Unknown());
|
|
652
|
-
export const DataQualityComputeResultSchema = Type.Object({
|
|
653
|
-
jobId: Type.Optional(Type.String()),
|
|
654
|
-
}, { additionalProperties: true, });
|
|
655
|
-
// ---------------------------------------------------------------------------
|
|
656
|
-
// Jupyter Notebooks
|
|
657
|
-
// ---------------------------------------------------------------------------
|
|
658
|
-
export const JupyterCellSchema = Type.Object({
|
|
659
|
-
cell_type: Type.String(),
|
|
660
|
-
// nbformat permits a cell's source to be either a single string or an
|
|
661
|
-
// array of strings; DSS returns whichever form the notebook carries.
|
|
662
|
-
source: Type.Union([Type.String(), Type.Array(Type.String()),]),
|
|
663
|
-
metadata: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
664
|
-
outputs: Type.Optional(Type.Array(Type.Unknown())),
|
|
665
|
-
execution_count: Type.Optional(Type.Union([Type.Null(), Type.Number(),])),
|
|
666
|
-
}, { additionalProperties: true, });
|
|
667
|
-
export const JupyterNotebookSummarySchema = Type.Object({
|
|
668
|
-
name: Type.String(),
|
|
669
|
-
projectKey: Type.String(),
|
|
670
|
-
language: Type.String(),
|
|
671
|
-
kernelSpec: Type.Optional(Type.Object({
|
|
672
|
-
name: Type.String(),
|
|
673
|
-
display_name: Type.Optional(Type.String()),
|
|
674
|
-
language: Type.Optional(Type.String()),
|
|
675
|
-
}, { additionalProperties: true, })),
|
|
676
|
-
}, { additionalProperties: true, });
|
|
677
|
-
export const JupyterNotebookContentSchema = Type.Object({
|
|
678
|
-
metadata: Type.Record(Type.String(), Type.Unknown()),
|
|
679
|
-
nbformat: Type.Number(),
|
|
680
|
-
nbformat_minor: Type.Number(),
|
|
681
|
-
cells: Type.Array(JupyterCellSchema),
|
|
682
|
-
}, { additionalProperties: true, });
|
|
683
|
-
export const NotebookSessionSchema = Type.Object({
|
|
684
|
-
sessionId: Type.String(),
|
|
685
|
-
kernelId: Type.Optional(Type.String()),
|
|
686
|
-
projectKey: Type.Optional(Type.String()),
|
|
687
|
-
notebookName: Type.Optional(Type.String()),
|
|
688
|
-
sessionCreator: Type.Optional(Type.String()),
|
|
689
|
-
kernelExecutionState: Type.Optional(Type.String()),
|
|
690
|
-
}, { additionalProperties: true, });
|
|
691
|
-
// ---------------------------------------------------------------------------
|
|
692
|
-
// SQL Notebooks
|
|
693
|
-
// ---------------------------------------------------------------------------
|
|
694
|
-
export const SqlNotebookCellSchema = Type.Object({
|
|
695
|
-
id: Type.String(),
|
|
696
|
-
type: Type.String(),
|
|
697
|
-
name: Type.Optional(Type.String()),
|
|
698
|
-
/**
|
|
699
|
-
* Cell source. DSS enforces a JSON string here: an array fails to parse
|
|
700
|
-
* server-side (`Expected a string but was BEGIN_ARRAY ... $.cells[0].code`),
|
|
701
|
-
* so the official-client example's line-array form does not apply to SQL.
|
|
702
|
-
*/
|
|
703
|
-
code: Type.String(),
|
|
704
|
-
}, { additionalProperties: true, });
|
|
705
|
-
export const SqlNotebookSummarySchema = Type.Object({
|
|
706
|
-
id: Type.String(),
|
|
707
|
-
projectKey: Type.Optional(Type.String()),
|
|
708
|
-
language: Type.String(),
|
|
709
|
-
connection: Type.String(),
|
|
710
|
-
}, { additionalProperties: true, });
|
|
711
|
-
/**
|
|
712
|
-
* A SQL notebook's content as returned by GET. The notebook record carries
|
|
713
|
-
* the server-allocated `id` (a request-supplied `id` is rejected on create)
|
|
714
|
-
* plus `name`/`projectKey`/`isRunning` and similar receipt fields via
|
|
715
|
-
* `additionalProperties`; requests supply `connection` + `cells` (and
|
|
716
|
-
* optionally `name` as the display handle).
|
|
717
|
-
*/
|
|
718
|
-
export const SqlNotebookContentSchema = Type.Object({
|
|
719
|
-
connection: Type.String(),
|
|
720
|
-
cells: Type.Array(SqlNotebookCellSchema),
|
|
721
|
-
}, { additionalProperties: true, });
|
|
722
|
-
/** Execution history of a SQL notebook: cell ID to the runs recorded for it. */
|
|
723
|
-
export const SqlNotebookHistorySchema = Type.Record(Type.String(), Type.Array(Type.Unknown()));
|
|
724
|
-
// ---------------------------------------------------------------------------
|
|
725
|
-
// SQL Queries
|
|
726
|
-
// ---------------------------------------------------------------------------
|
|
727
|
-
export const SqlQuerySchemaSchema = Type.Object({
|
|
728
|
-
name: Type.String(),
|
|
729
|
-
type: Type.String(),
|
|
730
|
-
}, { additionalProperties: true, });
|
|
731
|
-
export const SqlQueryResultSchema = Type.Object({
|
|
732
|
-
queryId: Type.String(),
|
|
733
|
-
hasResults: Type.Boolean(),
|
|
734
|
-
schema: Type.Array(SqlQuerySchemaSchema),
|
|
735
|
-
}, { additionalProperties: true, });
|
|
736
|
-
export const SqlQueryResponseSchema = Type.Object({
|
|
737
|
-
queryId: Type.String(),
|
|
738
|
-
schema: Type.Array(SqlQuerySchemaSchema),
|
|
739
|
-
columns: Type.Optional(Type.Array(SqlQuerySchemaSchema)),
|
|
740
|
-
rows: Type.Array(Type.Array(Type.Unknown())),
|
|
741
|
-
});
|
|
742
|
-
// ---------------------------------------------------------------------------
|
|
743
|
-
// Flow Map (moved from projects.ts)
|
|
744
|
-
// ---------------------------------------------------------------------------
|
|
745
|
-
export const FlowMapOptionsSchema = Type.Object({
|
|
746
|
-
maxNodes: Type.Optional(Type.Number()),
|
|
747
|
-
maxEdges: Type.Optional(Type.Number()),
|
|
748
|
-
includeRaw: Type.Optional(Type.Boolean()),
|
|
749
|
-
render: Type.Optional(Type.Union([Type.Literal("ascii"), Type.Literal("mermaid"),])),
|
|
750
|
-
});
|
|
751
|
-
// ---------------------------------------------------------------------------
|
|
752
|
-
// Project Git
|
|
753
|
-
// ---------------------------------------------------------------------------
|
|
754
|
-
/**
|
|
755
|
-
* Git working-copy status of a project. Stable fields are documented in the
|
|
756
|
-
* DSS 14.7.3 source; DSS additionally returns extension fields, which are
|
|
757
|
-
* preserved by `additionalProperties: true`.
|
|
758
|
-
*/
|
|
759
|
-
export const ProjectGitStatusSchema = Type.Object({
|
|
760
|
-
currentBranch: Type.Optional(Type.String()),
|
|
761
|
-
remotes: Type.Optional(Type.Array(Type.Object({
|
|
762
|
-
name: Type.Optional(Type.String()),
|
|
763
|
-
url: Type.Optional(Type.String()),
|
|
764
|
-
}, { additionalProperties: true, }))),
|
|
765
|
-
trackingCount: Type.Optional(Type.Object({
|
|
766
|
-
ahead: Type.Optional(Type.Number()),
|
|
767
|
-
behind: Type.Optional(Type.Number()),
|
|
768
|
-
}, { additionalProperties: true, })),
|
|
769
|
-
clean: Type.Optional(Type.Boolean()),
|
|
770
|
-
hasUncommittedChanges: Type.Optional(Type.Boolean()),
|
|
771
|
-
added: Type.Optional(Type.Array(Type.String())),
|
|
772
|
-
changed: Type.Optional(Type.Array(Type.String())),
|
|
773
|
-
removed: Type.Optional(Type.Array(Type.String())),
|
|
774
|
-
missing: Type.Optional(Type.Array(Type.String())),
|
|
775
|
-
modified: Type.Optional(Type.Array(Type.String())),
|
|
776
|
-
conflicting: Type.Optional(Type.Array(Type.String())),
|
|
777
|
-
untracked: Type.Optional(Type.Array(Type.String())),
|
|
778
|
-
untrackedFolders: Type.Optional(Type.Array(Type.String())),
|
|
779
|
-
originProjectKey: Type.Optional(Type.String()),
|
|
780
|
-
trackingCountWithOriginProject: Type.Optional(Type.Object({
|
|
781
|
-
ahead: Type.Optional(Type.Number()),
|
|
782
|
-
behind: Type.Optional(Type.Number()),
|
|
783
|
-
}, { additionalProperties: true, })),
|
|
784
|
-
}, { additionalProperties: true, });
|
|
785
|
-
export const ProjectGitRemoteSchema = Type.Object({
|
|
786
|
-
url: Type.Optional(Type.String()),
|
|
787
|
-
}, { additionalProperties: true, });
|
|
788
|
-
/**
|
|
789
|
-
* Result of a Git mutation. DSS answers with HTTP 200 even for failures, so
|
|
790
|
-
* `success` is the field callers must inspect before trusting the operation.
|
|
791
|
-
*/
|
|
792
|
-
export const ProjectGitActionResultSchema = Type.Object({
|
|
793
|
-
success: Type.Optional(Type.Boolean()),
|
|
794
|
-
output: Type.Optional(Type.Unknown()),
|
|
795
|
-
logs: Type.Optional(Type.Unknown()),
|
|
796
|
-
messages: Type.Optional(Type.Unknown()),
|
|
797
|
-
}, { additionalProperties: true, });
|
|
798
|
-
export const ProjectGitTagSchema = Type.Object({
|
|
799
|
-
name: Type.Optional(Type.String()),
|
|
800
|
-
shortName: Type.Optional(Type.String()),
|
|
801
|
-
commit: Type.Optional(Type.Unknown()),
|
|
802
|
-
annotations: Type.Optional(Type.Unknown()),
|
|
803
|
-
readOnly: Type.Optional(Type.Boolean()),
|
|
804
|
-
}, { additionalProperties: true, });
|
|
805
|
-
export const ProjectGitTagsSchema = Type.Array(ProjectGitTagSchema);
|
|
806
|
-
/**
|
|
807
|
-
* Paginated commit log. `nextCommit` is the cursor DSS expects back to fetch
|
|
808
|
-
* the following page; entries stay unpinned because commit payloads vary.
|
|
809
|
-
*/
|
|
810
|
-
export const ProjectGitLogResultSchema = Type.Object({
|
|
811
|
-
entries: Type.Array(Type.Unknown()),
|
|
812
|
-
nextCommit: Type.Optional(Type.String()),
|
|
813
|
-
}, { additionalProperties: true, });
|
|
814
|
-
/**
|
|
815
|
-
* Diff between two revisions. Stable fields are documented in the DSS 14.7.3
|
|
816
|
-
* source; DSS additionally returns extension fields, which are preserved by
|
|
817
|
-
* `additionalProperties: true`.
|
|
818
|
-
*/
|
|
819
|
-
export const ProjectGitDiffResultSchema = Type.Object({
|
|
820
|
-
commitFrom: Type.Optional(Type.Unknown()),
|
|
821
|
-
commitTo: Type.Optional(Type.Unknown()),
|
|
822
|
-
addedLines: Type.Optional(Type.Number()),
|
|
823
|
-
removedLines: Type.Optional(Type.Number()),
|
|
824
|
-
changedFiles: Type.Optional(Type.Number()),
|
|
825
|
-
entries: Type.Optional(Type.Array(Type.Unknown())),
|
|
826
|
-
}, { additionalProperties: true, });
|
|
827
|
-
export const ProjectGitLibrarySchema = Type.Object({
|
|
828
|
-
repository: Type.Optional(Type.String()),
|
|
829
|
-
login: Type.Optional(Type.String()),
|
|
830
|
-
pathInGitRepository: Type.Optional(Type.String()),
|
|
831
|
-
localTargetPath: Type.Optional(Type.String()),
|
|
832
|
-
checkout: Type.Optional(Type.String()),
|
|
833
|
-
addToPythonPath: Type.Optional(Type.Boolean()),
|
|
834
|
-
}, { additionalProperties: true, });
|
|
835
|
-
export const ProjectGitLibrariesSchema = Type.Array(ProjectGitLibrarySchema);
|
|
836
|
-
/** Handle returned by Git operations that run asynchronously as a DSS future. */
|
|
837
|
-
export const ProjectGitFutureResponseSchema = Type.Object({
|
|
838
|
-
jobId: Type.String(),
|
|
839
|
-
}, { additionalProperties: true, });
|
|
840
|
-
export const ProjectGitFutureStateSchema = Type.Object({
|
|
841
|
-
jobId: Type.Optional(Type.String()),
|
|
842
|
-
hasResult: Type.Optional(Type.Boolean()),
|
|
843
|
-
result: Type.Optional(Type.Unknown()),
|
|
844
|
-
alive: Type.Optional(Type.Boolean()),
|
|
845
|
-
aborted: Type.Optional(Type.Boolean()),
|
|
846
|
-
abortable: Type.Optional(Type.Boolean()),
|
|
847
|
-
unknown: Type.Optional(Type.Boolean()),
|
|
848
|
-
startTime: Type.Optional(Type.Number()),
|
|
849
|
-
runningTime: Type.Optional(Type.Number()),
|
|
850
|
-
error: Type.Optional(Type.Unknown()),
|
|
851
|
-
}, { additionalProperties: true, });
|
|
852
|
-
// ---------------------------------------------------------------------------
|
|
853
|
-
// Array wrappers (for runtime validation of list() responses)
|
|
854
|
-
// ---------------------------------------------------------------------------
|
|
855
|
-
export const ProjectSummaryArraySchema = Type.Array(ProjectSummarySchema);
|
|
856
|
-
export const DatasetSummaryArraySchema = Type.Array(DatasetSummarySchema);
|
|
857
|
-
export const RecipeSummaryArraySchema = Type.Array(RecipeSummarySchema);
|
|
858
|
-
export const JobSummaryArraySchema = Type.Array(JobSummarySchema);
|
|
859
|
-
export const ScenarioSummaryArraySchema = Type.Array(ScenarioSummarySchema);
|
|
860
|
-
export const FolderSummaryArraySchema = Type.Array(FolderSummarySchema);
|
|
861
|
-
export const FolderItemArraySchema = Type.Array(FolderItemSchema);
|
|
862
|
-
export const CodeEnvSummaryArraySchema = Type.Array(CodeEnvSummarySchema);
|
|
863
|
-
export const WikiArticleDataArraySchema = Type.Array(WikiArticleDataSchema);
|
|
864
|
-
export const DashboardSummaryArraySchema = Type.Array(DashboardSummarySchema);
|
|
865
|
-
export const InsightSummaryArraySchema = Type.Array(InsightSummarySchema);
|
|
866
|
-
export const DataQualityRuleArraySchema = Type.Array(DataQualityRuleSchema);
|
|
867
|
-
export const DataQualityRuleResultArraySchema = Type.Array(DataQualityRuleResultSchema);
|
|
868
|
-
export const DataQualityTimelineSchema = Type.Array(DataQualityTimelineEntrySchema);
|
|
869
|
-
export const JupyterNotebookSummaryArraySchema = Type.Array(JupyterNotebookSummarySchema);
|
|
870
|
-
export const SqlNotebookSummaryArraySchema = Type.Array(SqlNotebookSummarySchema);
|
|
871
|
-
export const NotebookSessionArraySchema = Type.Array(NotebookSessionSchema);
|