dataiku-sdk 0.12.7 → 1.0.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 +60 -14
- package/bin/dss.js +1 -1
- package/dist/packages/types/src/index.d.ts +128 -3
- package/dist/packages/types/src/index.js +106 -3
- package/dist/src/cli/coerce.d.ts +2 -1
- package/dist/src/cli/coerce.js +84 -26
- package/dist/src/cli/commands/app.js +6 -6
- package/dist/src/cli/commands/code.js +2 -2
- package/dist/src/cli/commands/data-quality.js +8 -8
- package/dist/src/cli/commands/dataset.js +11 -7
- package/dist/src/cli/commands/folder.js +5 -4
- package/dist/src/cli/commands/future.js +2 -2
- package/dist/src/cli/commands/index.js +2 -0
- package/dist/src/cli/commands/job.js +11 -11
- package/dist/src/cli/commands/notebook.js +1 -1
- package/dist/src/cli/commands/project-git.d.ts +2 -0
- package/dist/src/cli/commands/project-git.js +563 -0
- package/dist/src/cli/commands/project.js +2 -2
- package/dist/src/cli/commands/recipe.js +14 -17
- package/dist/src/cli/commands/scenario.js +4 -4
- package/dist/src/cli/contract.d.ts +5 -4
- package/dist/src/cli/contract.js +413 -55
- package/dist/src/cli/doctor.js +6 -6
- package/dist/src/cli/flags.js +21 -2
- package/dist/src/cli/helpers/dataset.js +1 -1
- package/dist/src/cli/output.d.ts +2 -1
- package/dist/src/cli/output.js +2 -6
- package/dist/src/cli/usage.d.ts +1 -1
- package/dist/src/cli/usage.js +2 -1
- package/dist/src/cli/version.d.ts +2 -2
- package/dist/src/cli/version.js +2 -2
- package/dist/src/cli.js +43 -26
- package/dist/src/client.d.ts +3 -0
- package/dist/src/client.js +5 -0
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.js +2 -1
- package/dist/src/resources/connections.d.ts +3 -1
- package/dist/src/resources/connections.js +82 -21
- package/dist/src/resources/datasets.js +42 -2
- package/dist/src/resources/folders.js +7 -3
- package/dist/src/resources/project-git.d.ts +154 -0
- package/dist/src/resources/project-git.js +427 -0
- package/dist/src/resources/recipes.js +4 -4
- package/dist/src/schemas.d.ts +2 -2
- package/dist/src/schemas.js +1 -1
- package/package.json +1 -1
- package/packages/types/dist/index.d.ts +128 -3
- package/packages/types/dist/index.js +106 -3
- package/plugin.json +1 -1
- package/skills/dataiku-dss/SKILL.md +26 -19
package/dist/src/cli/doctor.js
CHANGED
|
@@ -256,8 +256,8 @@ export async function runDoctor(flags) {
|
|
|
256
256
|
});
|
|
257
257
|
let accessibleProjects;
|
|
258
258
|
if (credentialsOk) {
|
|
259
|
-
const requestTimeoutMs = num(flags["request-timeout"]);
|
|
260
|
-
const retryMaxAttempts = num(flags["retries"]);
|
|
259
|
+
const requestTimeoutMs = num(flags["request-timeout"], "--request-timeout");
|
|
260
|
+
const retryMaxAttempts = num(flags["retries"], "--retries");
|
|
261
261
|
const client = new DataikuClient({
|
|
262
262
|
url,
|
|
263
263
|
apiKey,
|
|
@@ -311,8 +311,8 @@ export async function runDoctor(flags) {
|
|
|
311
311
|
}
|
|
312
312
|
const result = { ok: checks.every((check) => check.ok), checks, context, };
|
|
313
313
|
if (flags["capabilities"] === true && credentialsOk) {
|
|
314
|
-
const requestTimeoutMs = num(flags["request-timeout"]);
|
|
315
|
-
const retryMaxAttempts = num(flags["retries"]) ?? 1;
|
|
314
|
+
const requestTimeoutMs = num(flags["request-timeout"], "--request-timeout");
|
|
315
|
+
const retryMaxAttempts = num(flags["retries"], "--retries") ?? 1;
|
|
316
316
|
const client = new DataikuClient({
|
|
317
317
|
url,
|
|
318
318
|
apiKey,
|
|
@@ -340,8 +340,8 @@ export async function runFixtures(flags) {
|
|
|
340
340
|
throw new UsageError("Missing project key. Set DATAIKU_PROJECT_KEY or pass --project-key.", "missing_required_flag");
|
|
341
341
|
}
|
|
342
342
|
currentCommandContext.projectKey = projectKey;
|
|
343
|
-
const requestTimeoutMs = num(flags["request-timeout"]);
|
|
344
|
-
const retryMaxAttempts = num(flags["retries"]) ?? 1;
|
|
343
|
+
const requestTimeoutMs = num(flags["request-timeout"], "--request-timeout");
|
|
344
|
+
const retryMaxAttempts = num(flags["retries"], "--retries") ?? 1;
|
|
345
345
|
const client = new DataikuClient({
|
|
346
346
|
url,
|
|
347
347
|
apiKey,
|
package/dist/src/cli/flags.js
CHANGED
|
@@ -7,7 +7,6 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
7
7
|
"global",
|
|
8
8
|
"list-agents",
|
|
9
9
|
"include-raw",
|
|
10
|
-
"raw",
|
|
11
10
|
"include-payload",
|
|
12
11
|
"no-payload",
|
|
13
12
|
"include-logs",
|
|
@@ -22,7 +21,6 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
22
21
|
"wait",
|
|
23
22
|
"if-not-exists",
|
|
24
23
|
"if-exists",
|
|
25
|
-
"json",
|
|
26
24
|
"no-wait",
|
|
27
25
|
"force-rebuild",
|
|
28
26
|
"latest",
|
|
@@ -40,6 +38,14 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
40
38
|
"drop-data",
|
|
41
39
|
"normalize",
|
|
42
40
|
"unconfirmed-creation",
|
|
41
|
+
"remote",
|
|
42
|
+
"duplicate-project",
|
|
43
|
+
"delete-remotely",
|
|
44
|
+
"force-delete",
|
|
45
|
+
"i-know-what-i-am-doing",
|
|
46
|
+
"no-add-to-python-path",
|
|
47
|
+
"delete-directory",
|
|
48
|
+
"peek",
|
|
43
49
|
]);
|
|
44
50
|
export const SHORT_FLAGS = {
|
|
45
51
|
v: "verbose",
|
|
@@ -71,15 +77,19 @@ export const VALUE_FLAGS = new Set([
|
|
|
71
77
|
"backup-dir",
|
|
72
78
|
"backend-type",
|
|
73
79
|
"backup",
|
|
80
|
+
"branch",
|
|
74
81
|
"ca-cert",
|
|
75
82
|
"catalog",
|
|
83
|
+
"checkout",
|
|
76
84
|
"cell-id",
|
|
77
85
|
"allow-types",
|
|
78
86
|
"color",
|
|
87
|
+
"commit",
|
|
79
88
|
"connection",
|
|
80
89
|
"contains",
|
|
81
90
|
"content",
|
|
82
91
|
"content-type",
|
|
92
|
+
"count",
|
|
83
93
|
"data",
|
|
84
94
|
"active",
|
|
85
95
|
"deployment-mode",
|
|
@@ -110,6 +120,7 @@ export const VALUE_FLAGS = new Set([
|
|
|
110
120
|
"package",
|
|
111
121
|
"packages",
|
|
112
122
|
"local",
|
|
123
|
+
"login",
|
|
113
124
|
"manifest-version",
|
|
114
125
|
"max-edges",
|
|
115
126
|
"max-lines",
|
|
@@ -120,6 +131,7 @@ export const VALUE_FLAGS = new Set([
|
|
|
120
131
|
"max-rows",
|
|
121
132
|
"limit",
|
|
122
133
|
"max-timestamp",
|
|
134
|
+
"message",
|
|
123
135
|
"only-monitored",
|
|
124
136
|
"min-timestamp",
|
|
125
137
|
"mode",
|
|
@@ -140,12 +152,16 @@ export const VALUE_FLAGS = new Set([
|
|
|
140
152
|
"partition",
|
|
141
153
|
"parent",
|
|
142
154
|
"path",
|
|
155
|
+
"path-in-repository",
|
|
143
156
|
"preview",
|
|
144
157
|
"prediction-type",
|
|
145
158
|
"project-key",
|
|
146
159
|
"recipe",
|
|
160
|
+
"reference",
|
|
161
|
+
"repository",
|
|
147
162
|
"request-timeout",
|
|
148
163
|
"params",
|
|
164
|
+
"password-env",
|
|
149
165
|
"results-per-page",
|
|
150
166
|
"record-cleanup",
|
|
151
167
|
"rule-id",
|
|
@@ -164,11 +180,14 @@ export const VALUE_FLAGS = new Set([
|
|
|
164
180
|
"sql",
|
|
165
181
|
"schema",
|
|
166
182
|
"sql-file",
|
|
183
|
+
"start-commit",
|
|
167
184
|
"start-retries",
|
|
168
185
|
"standard",
|
|
169
186
|
"state",
|
|
170
187
|
"streaming-endpoint",
|
|
171
188
|
"target",
|
|
189
|
+
"target-project-folder-id",
|
|
190
|
+
"target-project-key",
|
|
172
191
|
"task-type",
|
|
173
192
|
"test-dataset",
|
|
174
193
|
"train-dataset",
|
|
@@ -6,7 +6,7 @@ export function datasetSourceSummary(details) {
|
|
|
6
6
|
projectKey: details.projectKey,
|
|
7
7
|
type: details.type,
|
|
8
8
|
managed: details.managed,
|
|
9
|
-
connection: params.connection,
|
|
9
|
+
connection: params.connection ?? params.uploadConnection,
|
|
10
10
|
catalog: params.catalog,
|
|
11
11
|
schema: params.schema,
|
|
12
12
|
table: params.table,
|
package/dist/src/cli/output.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { DataikuClient } from "../client.js";
|
|
2
2
|
import { type StableErrorCode } from "../errors.js";
|
|
3
|
-
export declare function setCompactJsonOutput(compact: boolean): void;
|
|
4
3
|
export declare function setOutputFieldProjection(fields: string[] | undefined): void;
|
|
5
4
|
export declare function enqueueCliWarning(warning: Record<string, unknown>): void;
|
|
5
|
+
/** Emit queued warnings as one JSONL warning event on stderr. Idempotent. */
|
|
6
|
+
export declare function flushCliWarnings(): void;
|
|
6
7
|
export declare function pickResultFields(item: unknown, fields: string[]): unknown;
|
|
7
8
|
/**
|
|
8
9
|
* Project the top-level fields callers asked for via --fields. Arrays are mapped
|
package/dist/src/cli/output.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { DataikuError, } from "../errors.js";
|
|
2
2
|
let outputFieldProjection;
|
|
3
|
-
let compactJsonOutput = false;
|
|
4
|
-
export function setCompactJsonOutput(compact) {
|
|
5
|
-
compactJsonOutput = compact;
|
|
6
|
-
}
|
|
7
3
|
export function setOutputFieldProjection(fields) {
|
|
8
4
|
outputFieldProjection = fields;
|
|
9
5
|
}
|
|
@@ -17,7 +13,7 @@ export function enqueueCliWarning(warning) {
|
|
|
17
13
|
pendingCliWarnings.push(warning);
|
|
18
14
|
}
|
|
19
15
|
/** Emit queued warnings as one JSONL warning event on stderr. Idempotent. */
|
|
20
|
-
function flushCliWarnings() {
|
|
16
|
+
export function flushCliWarnings() {
|
|
21
17
|
if (pendingCliWarnings.length === 0)
|
|
22
18
|
return;
|
|
23
19
|
const warnings = pendingCliWarnings;
|
|
@@ -57,7 +53,7 @@ export function writeCommandResult(result) {
|
|
|
57
53
|
const projected = outputFieldProjection
|
|
58
54
|
? projectResultFields(result, outputFieldProjection)
|
|
59
55
|
: result;
|
|
60
|
-
process.stdout.write(`${JSON.stringify(projected ?? { ok: true, }
|
|
56
|
+
process.stdout.write(`${JSON.stringify(projected ?? { ok: true, })}\n`);
|
|
61
57
|
}
|
|
62
58
|
export function transientBodyWithTargetContext(body, target, elapsedMs) {
|
|
63
59
|
try {
|
package/dist/src/cli/usage.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare class UsageError extends Error {
|
|
|
6
6
|
readonly details?: Record<string, unknown>;
|
|
7
7
|
constructor(message: string, code?: StableErrorCode, hint?: string, details?: Record<string, unknown>);
|
|
8
8
|
}
|
|
9
|
-
export declare const COMMANDS_RUN_HINT = "Use `dss commands run --fields RESOURCE.ACTION
|
|
9
|
+
export declare const COMMANDS_RUN_HINT = "Use `dss commands run --fields RESOURCE.ACTION` for scoped command discovery; use `dss commands run` for the action summary or `--output PATH` to export the full registry.";
|
|
10
10
|
export declare function unsupportedHelpFlag(): UsageError;
|
|
11
11
|
export declare function noCommandError(): UsageError;
|
|
12
12
|
export declare function missingActionError(resource: string, validActions: string[], usage?: string): UsageError;
|
package/dist/src/cli/usage.js
CHANGED
|
@@ -8,6 +8,7 @@ export const RESOURCE_NAMES = [
|
|
|
8
8
|
"api-deployer",
|
|
9
9
|
"bundle",
|
|
10
10
|
"project-deployer",
|
|
11
|
+
"project-git",
|
|
11
12
|
"project-library",
|
|
12
13
|
"streaming-endpoint",
|
|
13
14
|
"continuous-activity",
|
|
@@ -59,7 +60,7 @@ export class UsageError extends Error {
|
|
|
59
60
|
this.details = details;
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
|
-
export const COMMANDS_RUN_HINT = "Use `dss commands run --fields RESOURCE.ACTION
|
|
63
|
+
export const COMMANDS_RUN_HINT = "Use `dss commands run --fields RESOURCE.ACTION` for scoped command discovery; use `dss commands run` for the action summary or `--output PATH` to export the full registry.";
|
|
63
64
|
export function unsupportedHelpFlag() {
|
|
64
65
|
return new UsageError("Help screens are not supported.", "usage_error", COMMANDS_RUN_HINT, { command: "dss commands run", });
|
|
65
66
|
}
|
|
@@ -5,9 +5,9 @@ export declare function gitRevision(packageRoot: string | undefined): string | u
|
|
|
5
5
|
export declare const PACKAGE_ROOT: string | undefined;
|
|
6
6
|
export declare const CLI_VERSION: string;
|
|
7
7
|
export declare const CLI_GIT_REVISION: string | undefined;
|
|
8
|
-
export declare const AGENT_CONTRACT_VERSION =
|
|
8
|
+
export declare const AGENT_CONTRACT_VERSION = 2;
|
|
9
9
|
export declare const JSON_SCHEMA_DRAFT = "https://json-schema.org/draft/2020-12/schema";
|
|
10
|
-
export declare const AGENT_CONTRACT_SCHEMA_ID = "https://clssck.github.io/dataiku-sdk/schemas/agent-contract-
|
|
10
|
+
export declare const AGENT_CONTRACT_SCHEMA_ID = "https://clssck.github.io/dataiku-sdk/schemas/agent-contract-v2.json";
|
|
11
11
|
export declare function cliVersionResult(): {
|
|
12
12
|
version: string;
|
|
13
13
|
gitRevision: string | null;
|
package/dist/src/cli/version.js
CHANGED
|
@@ -55,9 +55,9 @@ export function gitRevision(packageRoot) {
|
|
|
55
55
|
export const PACKAGE_ROOT = findPackageRoot();
|
|
56
56
|
export const CLI_VERSION = packageVersion(PACKAGE_ROOT);
|
|
57
57
|
export const CLI_GIT_REVISION = gitRevision(PACKAGE_ROOT);
|
|
58
|
-
export const AGENT_CONTRACT_VERSION =
|
|
58
|
+
export const AGENT_CONTRACT_VERSION = 2;
|
|
59
59
|
export const JSON_SCHEMA_DRAFT = "https://json-schema.org/draft/2020-12/schema";
|
|
60
|
-
export const AGENT_CONTRACT_SCHEMA_ID = "https://clssck.github.io/dataiku-sdk/schemas/agent-contract-
|
|
60
|
+
export const AGENT_CONTRACT_SCHEMA_ID = "https://clssck.github.io/dataiku-sdk/schemas/agent-contract-v2.json";
|
|
61
61
|
export function cliVersionResult() {
|
|
62
62
|
return { version: CLI_VERSION, gitRevision: CLI_GIT_REVISION ?? null, };
|
|
63
63
|
}
|
package/dist/src/cli.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import * as fs from "node:fs/promises";
|
|
2
3
|
import { num, unknownJsonInput, } from "./cli/coerce.js";
|
|
3
4
|
import { commands, } from "./cli/commands/index.js";
|
|
4
|
-
import { AGENT_CONTRACT_USAGE, AUTH_ACTIONS, BATCH_EXAMPLE_PAYLOAD, BATCH_HINT, BATCH_PLAN_EXIT_CODES, BATCH_USAGE, buildAgentContract, buildCommandRegistry, buildMutationPlan, CLEANUP_USAGE, COMMANDS_USAGE, inferRequiresProject, isAllowedCleanupAction, supportsCleanupLedger, } from "./cli/contract.js";
|
|
5
|
+
import { AGENT_CONTRACT_USAGE, AUTH_ACTIONS, BATCH_EXAMPLE_PAYLOAD, BATCH_HINT, BATCH_PLAN_EXIT_CODES, BATCH_USAGE, buildAgentContract, buildCommandRegistry, buildMutationPlan, CLEANUP_USAGE, commandActionSummary, COMMANDS_USAGE, inferRequiresProject, isAllowedCleanupAction, supportsCleanupLedger, } from "./cli/contract.js";
|
|
5
6
|
import { runDoctor, runFixtures, } from "./cli/doctor.js";
|
|
6
7
|
import { dataikuEnvironmentEnabled, loadEnvFile, } from "./cli/env.js";
|
|
7
8
|
import { FLAG_ALIASES, isNegativeNumberToken, parseArgs, SHORT_FLAGS, VALUE_FLAGS, } from "./cli/flags.js";
|
|
8
9
|
import { cleanupLedgerEntry, } from "./cli/helpers/cleanup.js";
|
|
9
|
-
import { commandFailureExitCode, commandFailureMessage, CommandResultFailure, isFailedWaitResult, planResult, projectResultFields,
|
|
10
|
+
import { commandFailureExitCode, commandFailureMessage, CommandResultFailure, flushCliWarnings, isFailedWaitResult, planResult, projectResultFields, setOutputFieldProjection, writeCommandResult, } from "./cli/output.js";
|
|
10
11
|
import { currentCommandContext, resolveCredentials, resolveTlsSettings, } from "./cli/runtime.js";
|
|
11
12
|
import { COMMANDS_RUN_HINT, missingActionError, noCommandError, requireArgs, unknownActionError, unknownResourceError, UsageError, } from "./cli/usage.js";
|
|
12
13
|
import { cliVersionResult, } from "./cli/version.js";
|
|
@@ -83,8 +84,8 @@ async function runCleanup(flags) {
|
|
|
83
84
|
if (!apiKey) {
|
|
84
85
|
throw new UsageError("Missing API key. Set DATAIKU_API_KEY or pass --api-key.", "missing_required_flag");
|
|
85
86
|
}
|
|
86
|
-
const requestTimeoutMs = num(flags["request-timeout"]);
|
|
87
|
-
const retryMaxAttempts = num(flags["retries"]);
|
|
87
|
+
const requestTimeoutMs = num(flags["request-timeout"], "--request-timeout");
|
|
88
|
+
const retryMaxAttempts = num(flags["retries"], "--retries");
|
|
88
89
|
const client = new DataikuClient({
|
|
89
90
|
url,
|
|
90
91
|
apiKey,
|
|
@@ -252,11 +253,11 @@ function supportedCommandFlags(entry) {
|
|
|
252
253
|
return supported;
|
|
253
254
|
}
|
|
254
255
|
function scopedCommandDiscoveryHint(resource, action) {
|
|
255
|
-
return `Use \`dss commands run --fields ${resource}.${action}
|
|
256
|
+
return `Use \`dss commands run --fields ${resource}.${action}\` to list the flags this command supports.`;
|
|
256
257
|
}
|
|
257
258
|
/**
|
|
258
259
|
* Resolve the registry field selectors for `commands run --fields`. Omitting the flag
|
|
259
|
-
* selects the
|
|
260
|
+
* selects the action summary; `--output` exports the full registry, but an explicitly supplied value carrying no selector is a
|
|
260
261
|
* usage error: an agent that asked for a scoped subset must never be handed the full
|
|
261
262
|
* registry instead.
|
|
262
263
|
*/
|
|
@@ -419,6 +420,7 @@ function validateMetaCommandInputs(resource, action, flags) {
|
|
|
419
420
|
throw missingActionError("commands", ["run",], COMMANDS_USAGE);
|
|
420
421
|
if (action !== "run")
|
|
421
422
|
throw unknownActionError("commands", action, ["run",]);
|
|
423
|
+
validateSupportedCommandFlags("commands", "run", flags);
|
|
422
424
|
commandRegistrySelectors(flags);
|
|
423
425
|
return action;
|
|
424
426
|
}
|
|
@@ -516,9 +518,10 @@ function batchStepCommandContext(argv) {
|
|
|
516
518
|
}
|
|
517
519
|
return { resource: positionals[0], action: positionals[1], };
|
|
518
520
|
}
|
|
519
|
-
const SENSITIVE_ARGV_VALUE_FLAGS =
|
|
520
|
-
"api-key",
|
|
521
|
-
|
|
521
|
+
const SENSITIVE_ARGV_VALUE_FLAGS = {
|
|
522
|
+
"api-key": true,
|
|
523
|
+
repository: true,
|
|
524
|
+
};
|
|
522
525
|
function redactArgv(argv) {
|
|
523
526
|
const redacted = [];
|
|
524
527
|
for (let index = 0; index < argv.length; index++) {
|
|
@@ -531,7 +534,7 @@ function redactArgv(argv) {
|
|
|
531
534
|
const eqIdx = arg.indexOf("=");
|
|
532
535
|
const rawFlagName = eqIdx === -1 ? arg.slice(2) : arg.slice(2, eqIdx);
|
|
533
536
|
const flagName = FLAG_ALIASES[rawFlagName] ?? rawFlagName;
|
|
534
|
-
if (SENSITIVE_ARGV_VALUE_FLAGS
|
|
537
|
+
if (SENSITIVE_ARGV_VALUE_FLAGS[flagName] === true) {
|
|
535
538
|
if (eqIdx !== -1) {
|
|
536
539
|
redacted.push(`${arg.slice(0, eqIdx + 1)}***`);
|
|
537
540
|
}
|
|
@@ -763,6 +766,7 @@ async function runMetaCommand(resource, action, flags) {
|
|
|
763
766
|
currentCommandContext.action = action;
|
|
764
767
|
if (action !== "run")
|
|
765
768
|
throw unknownActionError("commands", action, ["run",]);
|
|
769
|
+
validateSupportedCommandFlags("commands", "run", flags);
|
|
766
770
|
const selectors = commandRegistrySelectors(flags);
|
|
767
771
|
const registry = buildCommandRegistry();
|
|
768
772
|
for (const selector of selectors) {
|
|
@@ -778,7 +782,20 @@ async function runMetaCommand(resource, action, flags) {
|
|
|
778
782
|
throw unknownActionError(selectedResource, selectedAction, Object.keys(resourceActions));
|
|
779
783
|
}
|
|
780
784
|
}
|
|
781
|
-
|
|
785
|
+
const outputPath = flags["output"];
|
|
786
|
+
const selectedRegistry = selectors.length === 0
|
|
787
|
+
? registry
|
|
788
|
+
: projectResultFields(registry, selectors);
|
|
789
|
+
if (typeof outputPath === "string") {
|
|
790
|
+
const exported = selectedRegistry;
|
|
791
|
+
await fs.writeFile(outputPath, `${JSON.stringify(exported)}\n`, "utf-8");
|
|
792
|
+
return { action, result: { path: outputPath, }, exitCode: 0, };
|
|
793
|
+
}
|
|
794
|
+
return {
|
|
795
|
+
action,
|
|
796
|
+
result: selectors.length === 0 ? commandActionSummary(registry) : selectedRegistry,
|
|
797
|
+
exitCode: 0,
|
|
798
|
+
};
|
|
782
799
|
}
|
|
783
800
|
if (resource === "version") {
|
|
784
801
|
if (action !== undefined && action !== "run") {
|
|
@@ -972,8 +989,8 @@ async function runBatch(flags) {
|
|
|
972
989
|
apiKey,
|
|
973
990
|
projectKey,
|
|
974
991
|
verbose: flags["verbose"] === true,
|
|
975
|
-
requestTimeoutMs: num(flags["request-timeout"]),
|
|
976
|
-
retryMaxAttempts: num(flags["retries"]),
|
|
992
|
+
requestTimeoutMs: num(flags["request-timeout"], "--request-timeout"),
|
|
993
|
+
retryMaxAttempts: num(flags["retries"], "--retries"),
|
|
977
994
|
tlsRejectUnauthorized,
|
|
978
995
|
caCertPath,
|
|
979
996
|
});
|
|
@@ -1050,7 +1067,9 @@ async function runBatch(flags) {
|
|
|
1050
1067
|
const stepFields = typeof stepFieldsFlag === "string"
|
|
1051
1068
|
? stepFieldsFlag.split(",").map((field) => field.trim()).filter((field) => field.length > 0)
|
|
1052
1069
|
: [];
|
|
1053
|
-
const stepResult = stepFields.length > 0
|
|
1070
|
+
const stepResult = stepFields.length > 0 && !(resource === "commands" && action === "run")
|
|
1071
|
+
? projectResultFields(result, stepFields)
|
|
1072
|
+
: result;
|
|
1054
1073
|
results.push({
|
|
1055
1074
|
index,
|
|
1056
1075
|
args: redactArgv(argv),
|
|
@@ -1268,7 +1287,8 @@ function buildErrorReport(err) {
|
|
|
1268
1287
|
};
|
|
1269
1288
|
}
|
|
1270
1289
|
function writeErrorReport(err) {
|
|
1271
|
-
|
|
1290
|
+
flushCliWarnings();
|
|
1291
|
+
process.stdout.write(`${JSON.stringify(buildErrorReport(err))}\n`);
|
|
1272
1292
|
}
|
|
1273
1293
|
// ---------------------------------------------------------------------------
|
|
1274
1294
|
// Main
|
|
@@ -1276,12 +1296,14 @@ function writeErrorReport(err) {
|
|
|
1276
1296
|
async function main() {
|
|
1277
1297
|
loadEnvFile();
|
|
1278
1298
|
const { positional, flags, } = parseArgs(process.argv.slice(2));
|
|
1279
|
-
setCompactJsonOutput(flags["json"] === true);
|
|
1280
1299
|
const fieldsFlag = flags["fields"];
|
|
1281
1300
|
if (typeof fieldsFlag === "string") {
|
|
1282
1301
|
const selected = fieldsFlag.split(",").map((field) => field.trim()).filter((field) => field.length > 0);
|
|
1283
|
-
if (selected.length > 0)
|
|
1284
|
-
|
|
1302
|
+
if (selected.length > 0) {
|
|
1303
|
+
const commandsRunProjection = positional[0] === "commands" && positional[1] === "run";
|
|
1304
|
+
if (!commandsRunProjection)
|
|
1305
|
+
setOutputFieldProjection(selected);
|
|
1306
|
+
}
|
|
1285
1307
|
}
|
|
1286
1308
|
if (flags["version"] === true) {
|
|
1287
1309
|
writeCommandResult(cliVersionResult());
|
|
@@ -1332,8 +1354,8 @@ async function main() {
|
|
|
1332
1354
|
if (!apiKey) {
|
|
1333
1355
|
throw new UsageError("Missing API key.", "missing_required_flag", "Set DATAIKU_API_KEY or pass --api-key.", { requiredFlags: ["api-key",], env: ["DATAIKU_API_KEY",], });
|
|
1334
1356
|
}
|
|
1335
|
-
const requestTimeoutMs = num(flags["request-timeout"]);
|
|
1336
|
-
const retryMaxAttempts = num(flags["retries"]);
|
|
1357
|
+
const requestTimeoutMs = num(flags["request-timeout"], "--request-timeout");
|
|
1358
|
+
const retryMaxAttempts = num(flags["retries"], "--retries");
|
|
1337
1359
|
const client = new DataikuClient({
|
|
1338
1360
|
url,
|
|
1339
1361
|
apiKey,
|
|
@@ -1351,12 +1373,7 @@ async function main() {
|
|
|
1351
1373
|
const failureExitCode = commandFailureExitCode(result);
|
|
1352
1374
|
if (failureExitCode !== undefined)
|
|
1353
1375
|
throw new CommandResultFailure(result, failureExitCode);
|
|
1354
|
-
|
|
1355
|
-
process.stdout.write(result);
|
|
1356
|
-
}
|
|
1357
|
-
else {
|
|
1358
|
-
writeCommandResult(result);
|
|
1359
|
-
}
|
|
1376
|
+
writeCommandResult(result);
|
|
1360
1377
|
}
|
|
1361
1378
|
main().catch((err) => {
|
|
1362
1379
|
writeErrorReport(err);
|
package/dist/src/client.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { MetricsResource } from "./resources/metrics.js";
|
|
|
21
21
|
import { MlTasksResource } from "./resources/ml-tasks.js";
|
|
22
22
|
import { ModelEvaluationStoresResource } from "./resources/model-evaluation-stores.js";
|
|
23
23
|
import { NotebooksResource } from "./resources/notebooks.js";
|
|
24
|
+
import { ProjectGitResource } from "./resources/project-git.js";
|
|
24
25
|
import { ProjectLibraryResource } from "./resources/project-library.js";
|
|
25
26
|
import { ProjectsResource } from "./resources/projects.js";
|
|
26
27
|
import { RecipesResource } from "./resources/recipes.js";
|
|
@@ -104,6 +105,7 @@ export declare class DataikuClient {
|
|
|
104
105
|
private bundlesResource?;
|
|
105
106
|
private projectDeployerResource?;
|
|
106
107
|
private projectLibraryResource?;
|
|
108
|
+
private projectGitResource?;
|
|
107
109
|
private streamingEndpointsResource?;
|
|
108
110
|
private continuousActivitiesResource?;
|
|
109
111
|
private statisticsResource?;
|
|
@@ -139,6 +141,7 @@ export declare class DataikuClient {
|
|
|
139
141
|
get bundles(): BundlesResource;
|
|
140
142
|
get projectDeployer(): ProjectDeployerResource;
|
|
141
143
|
get projectLibrary(): ProjectLibraryResource;
|
|
144
|
+
get projectGit(): ProjectGitResource;
|
|
142
145
|
get streamingEndpoints(): StreamingEndpointsResource;
|
|
143
146
|
get continuousActivities(): ContinuousActivitiesResource;
|
|
144
147
|
get statistics(): StatisticsResource;
|
package/dist/src/client.js
CHANGED
|
@@ -25,6 +25,7 @@ import { MetricsResource, } from "./resources/metrics.js";
|
|
|
25
25
|
import { MlTasksResource, } from "./resources/ml-tasks.js";
|
|
26
26
|
import { ModelEvaluationStoresResource, } from "./resources/model-evaluation-stores.js";
|
|
27
27
|
import { NotebooksResource, } from "./resources/notebooks.js";
|
|
28
|
+
import { ProjectGitResource, } from "./resources/project-git.js";
|
|
28
29
|
import { ProjectLibraryResource, } from "./resources/project-library.js";
|
|
29
30
|
import { ProjectsResource, } from "./resources/projects.js";
|
|
30
31
|
import { RecipesResource, } from "./resources/recipes.js";
|
|
@@ -189,6 +190,7 @@ export class DataikuClient {
|
|
|
189
190
|
bundlesResource;
|
|
190
191
|
projectDeployerResource;
|
|
191
192
|
projectLibraryResource;
|
|
193
|
+
projectGitResource;
|
|
192
194
|
streamingEndpointsResource;
|
|
193
195
|
continuousActivitiesResource;
|
|
194
196
|
statisticsResource;
|
|
@@ -272,6 +274,9 @@ export class DataikuClient {
|
|
|
272
274
|
get projectLibrary() {
|
|
273
275
|
return (this.projectLibraryResource ??= new ProjectLibraryResource(this));
|
|
274
276
|
}
|
|
277
|
+
get projectGit() {
|
|
278
|
+
return (this.projectGitResource ??= new ProjectGitResource(this));
|
|
279
|
+
}
|
|
275
280
|
get streamingEndpoints() {
|
|
276
281
|
return (this.streamingEndpointsResource ??= new StreamingEndpointsResource(this));
|
|
277
282
|
}
|
package/dist/src/errors.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type DataikuErrorCategory = "not_found" | "forbidden" | "validation" | "transient" | "unknown";
|
|
2
|
-
export type StableErrorCode = "usage_error" | "unknown_flag" | "missing_required_arg" | "missing_required_flag" | "invalid_enum" | "not_found" | "permission_denied" | "validation_failed" | "transient" | "long_running_failure" | "command_result_failure" | "assertion_failed" | "ambiguous_outcome" | "internal_error";
|
|
2
|
+
export type StableErrorCode = "usage_error" | "unknown_flag" | "missing_required_arg" | "missing_required_flag" | "invalid_flag_value" | "conflicting_input_sources" | "invalid_enum" | "not_found" | "permission_denied" | "validation_failed" | "transient" | "long_running_failure" | "command_result_failure" | "assertion_failed" | "ambiguous_outcome" | "internal_error";
|
|
3
3
|
export declare function dataikuErrorCode(category: DataikuErrorCategory): StableErrorCode;
|
|
4
4
|
export interface DataikuErrorTaxonomy {
|
|
5
5
|
category: DataikuErrorCategory;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export { MetricsResource, } from "./resources/metrics.js";
|
|
|
24
24
|
export * from "./resources/ml-tasks.js";
|
|
25
25
|
export * from "./resources/model-evaluation-stores.js";
|
|
26
26
|
export { NotebooksResource, } from "./resources/notebooks.js";
|
|
27
|
+
export * from "./resources/project-git.js";
|
|
27
28
|
export { ProjectLibraryResource, } from "./resources/project-library.js";
|
|
28
29
|
export { type FlowMapResult, ProjectsResource, } from "./resources/projects.js";
|
|
29
30
|
export { type RecipeCloneOptions, type RecipeCloneResult, type RecipeGraphReference, type RecipeGraphValidationResult, type RecipeRunOptions, type RecipeRunOutput, type RecipeRunResult, RecipesResource, } from "./resources/recipes.js";
|
|
@@ -36,9 +37,9 @@ export { VariablesResource, } from "./resources/variables.js";
|
|
|
36
37
|
export { WebappsResource, } from "./resources/webapps.js";
|
|
37
38
|
export { WikiResource, } from "./resources/wiki.js";
|
|
38
39
|
export { WorkspacesResource, } from "./resources/workspaces.js";
|
|
39
|
-
export { BuildModeSchema, CodeEnvActionResultSchema, CodeEnvCreateOptionsSchema, CodeEnvDetailsSchema, CodeEnvPackageListSchema, CodeEnvSetPackagesOptionsSchema, CodeEnvSummaryArraySchema, CodeEnvSummarySchema, CodeEnvUpdatePackagesOptionsSchema, CodeEnvUsageArraySchema, CodeEnvWaitOptionsSchema, ConnectionSummarySchema, DashboardDetailsSchema, DashboardSummaryArraySchema, DashboardSummarySchema, DataQualityComputeResultSchema, DataQualityProjectStatusSchema, DataQualityRuleArraySchema, DataQualityRuleResultArraySchema, DataQualityRuleResultSchema, DataQualityRuleSchema, DataQualityRulesSchema, DataQualityStatusByPartitionSchema, DataQualityStatusSchema, DataQualityTimelineEntrySchema, DataQualityTimelineSchema, DatasetCreateOptionsSchema, DatasetDetailsSchema, DatasetSchemaSchema, DatasetSummaryArraySchema, DatasetSummarySchema, FlowMapOptionsSchema, FlowZoneArraySchema, FlowZoneCreateOptionsSchema, FlowZoneItemSchema, FlowZoneObjectTypeSchema, FlowZonePositionSchema, FlowZoneSchema, FlowZoneUpdateOptionsSchema, FolderCreateOptionsSchema, FolderDetailsSchema, FolderItemArraySchema, FolderItemSchema, FolderSummaryArraySchema, FolderSummarySchema, FutureStateSchema, FutureWaitResultSchema, InsightDetailsSchema, InsightSummaryArraySchema, InsightSummarySchema, JobSummaryArraySchema, JobSummarySchema, JobWaitResultSchema, JupyterCellSchema, JupyterNotebookContentSchema, JupyterNotebookSummaryArraySchema, JupyterNotebookSummarySchema, NotebookSessionArraySchema, NotebookSessionSchema, parseSchema, ProjectDetailsSchema, ProjectMetadataSchema, ProjectSummaryArraySchema, ProjectSummarySchema, ProjectVariablesSchema, RecipeCreateOptionsSchema, RecipeCreateResultSchema, RecipeDetailsSchema, RecipeSummaryArraySchema, RecipeSummarySchema, safeParseSchema, ScenarioDetailsSchema, ScenarioStatusSchema, ScenarioStepRunSchema, ScenarioSummaryArraySchema, ScenarioSummarySchema, ScenarioWaitResultSchema, SqlNotebookCellSchema, SqlNotebookContentSchema, SqlNotebookSummaryArraySchema, SqlNotebookSummarySchema, SqlQueryResponseSchema, SqlQueryResultSchema, SqlQuerySchemaSchema, WikiArticleDataArraySchema, WikiArticleDataSchema, WikiArticleMetadataSchema, WikiSettingsSchema, WikiTaxonomyNodeSchema, } from "./schemas.js";
|
|
40
|
+
export { BuildModeSchema, CodeEnvActionResultSchema, CodeEnvCreateOptionsSchema, CodeEnvDetailsSchema, CodeEnvPackageListSchema, CodeEnvSetPackagesOptionsSchema, CodeEnvSummaryArraySchema, CodeEnvSummarySchema, CodeEnvUpdatePackagesOptionsSchema, CodeEnvUsageArraySchema, CodeEnvWaitOptionsSchema, ConnectionSummarySchema, DashboardDetailsSchema, DashboardSummaryArraySchema, DashboardSummarySchema, DataQualityComputeResultSchema, DataQualityProjectStatusSchema, DataQualityRuleArraySchema, DataQualityRuleResultArraySchema, DataQualityRuleResultSchema, DataQualityRuleSchema, DataQualityRulesSchema, DataQualityStatusByPartitionSchema, DataQualityStatusSchema, DataQualityTimelineEntrySchema, DataQualityTimelineSchema, DatasetCreateOptionsSchema, DatasetDetailsSchema, DatasetSchemaSchema, DatasetSummaryArraySchema, DatasetSummarySchema, FlowMapOptionsSchema, FlowZoneArraySchema, FlowZoneCreateOptionsSchema, FlowZoneItemSchema, FlowZoneObjectTypeSchema, FlowZonePositionSchema, FlowZoneSchema, FlowZoneUpdateOptionsSchema, FolderCreateOptionsSchema, FolderDetailsSchema, FolderItemArraySchema, FolderItemSchema, FolderSummaryArraySchema, FolderSummarySchema, FutureStateSchema, FutureWaitResultSchema, InsightDetailsSchema, InsightSummaryArraySchema, InsightSummarySchema, JobSummaryArraySchema, JobSummarySchema, JobWaitResultSchema, JupyterCellSchema, JupyterNotebookContentSchema, JupyterNotebookSummaryArraySchema, JupyterNotebookSummarySchema, NotebookSessionArraySchema, NotebookSessionSchema, parseSchema, ProjectDetailsSchema, ProjectGitActionResultSchema, ProjectGitDiffResultSchema, ProjectGitFutureResponseSchema, ProjectGitFutureStateSchema, ProjectGitLibrariesSchema, ProjectGitLibrarySchema, ProjectGitLogResultSchema, ProjectGitRemoteSchema, ProjectGitStatusSchema, ProjectGitTagSchema, ProjectGitTagsSchema, ProjectMetadataSchema, ProjectSummaryArraySchema, ProjectSummarySchema, ProjectVariablesSchema, RecipeCreateOptionsSchema, RecipeCreateResultSchema, RecipeDetailsSchema, RecipeSummaryArraySchema, RecipeSummarySchema, safeParseSchema, ScenarioDetailsSchema, ScenarioStatusSchema, ScenarioStepRunSchema, ScenarioSummaryArraySchema, ScenarioSummarySchema, ScenarioWaitResultSchema, SqlNotebookCellSchema, SqlNotebookContentSchema, SqlNotebookSummaryArraySchema, SqlNotebookSummarySchema, SqlQueryResponseSchema, SqlQueryResultSchema, SqlQuerySchemaSchema, WikiArticleDataArraySchema, WikiArticleDataSchema, WikiArticleMetadataSchema, WikiSettingsSchema, WikiTaxonomyNodeSchema, } from "./schemas.js";
|
|
40
41
|
export type { SafeParseResult, } from "./schemas.js";
|
|
41
|
-
export type { BuildMode, CodeEnvActionResult, CodeEnvCreateOptions, CodeEnvDetails, CodeEnvPackageList, CodeEnvSetPackagesOptions, CodeEnvSummary, CodeEnvUpdatePackagesOptions, CodeEnvUsage, CodeEnvWaitOptions, ConnectionSummary, DashboardDetails, DashboardSummary, DataQualityComputeResult, DataQualityProjectStatus, DataQualityRule, DataQualityRuleResult, DataQualityRules, DataQualityStatus, DataQualityStatusByPartition, DataQualityTimeline, DataQualityTimelineEntry, DatasetCreateOptions, DatasetDetails, DatasetSchema, DatasetSummary, FlowMapOptions, FlowZone, FlowZoneCreateOptions, FlowZoneItem, FlowZoneObjectType, FlowZonePosition, FlowZoneUpdateOptions, FolderCreateOptions, FolderDetails, FolderItem, FolderSummary, FutureState, FutureWaitResult, InsightDetails, InsightSummary, JobSummary, JobWaitResult, JupyterCell, JupyterNotebookContent, JupyterNotebookSummary, NotebookSession, ProjectDetails, ProjectMetadata, ProjectSummary, ProjectVariables, RecipeCreateOptions, RecipeCreateResult, RecipeDetails, RecipeSummary, ScenarioDetails, ScenarioStatus, ScenarioStepRun, ScenarioSummary, ScenarioWaitResult, SqlNotebookCell, SqlNotebookContent, SqlNotebookSummary, SqlQueryResponse, SqlQueryResult, SqlQuerySchema, WikiArticleData, WikiArticleMetadata, WikiSettings, WikiTaxonomyNode, } from "./schemas.js";
|
|
42
|
+
export type { BuildMode, CodeEnvActionResult, CodeEnvCreateOptions, CodeEnvDetails, CodeEnvPackageList, CodeEnvSetPackagesOptions, CodeEnvSummary, CodeEnvUpdatePackagesOptions, CodeEnvUsage, CodeEnvWaitOptions, ConnectionSummary, DashboardDetails, DashboardSummary, DataQualityComputeResult, DataQualityProjectStatus, DataQualityRule, DataQualityRuleResult, DataQualityRules, DataQualityStatus, DataQualityStatusByPartition, DataQualityTimeline, DataQualityTimelineEntry, DatasetCreateOptions, DatasetDetails, DatasetSchema, DatasetSummary, FlowMapOptions, FlowZone, FlowZoneCreateOptions, FlowZoneItem, FlowZoneObjectType, FlowZonePosition, FlowZoneUpdateOptions, FolderCreateOptions, FolderDetails, FolderItem, FolderSummary, FutureState, FutureWaitResult, InsightDetails, InsightSummary, JobSummary, JobWaitResult, JupyterCell, JupyterNotebookContent, JupyterNotebookSummary, NotebookSession, ProjectDetails, ProjectGitActionResult, ProjectGitDiffResult, ProjectGitFutureResponse, ProjectGitFutureState, ProjectGitLibraries, ProjectGitLibrary, ProjectGitLogResult, ProjectGitRemote, ProjectGitStatus, ProjectGitTag, ProjectGitTags, ProjectMetadata, ProjectSummary, ProjectVariables, RecipeCreateOptions, RecipeCreateResult, RecipeDetails, RecipeSummary, ScenarioDetails, ScenarioStatus, ScenarioStepRun, ScenarioSummary, ScenarioWaitResult, SqlNotebookCell, SqlNotebookContent, SqlNotebookSummary, SqlQueryResponse, SqlQueryResult, SqlQuerySchema, WikiArticleData, WikiArticleMetadata, WikiSettings, WikiTaxonomyNode, } from "./schemas.js";
|
|
42
43
|
export { deepMerge, } from "./utils/deep-merge.js";
|
|
43
44
|
export { type NormalizedFlowEdge, type NormalizedFlowMap, type NormalizedFlowNode, normalizeFlowGraph, } from "./utils/flow-map.js";
|
|
44
45
|
export { sanitizeFileName, } from "./utils/sanitize.js";
|
package/dist/src/index.js
CHANGED
|
@@ -28,6 +28,7 @@ export { MetricsResource, } from "./resources/metrics.js";
|
|
|
28
28
|
export * from "./resources/ml-tasks.js";
|
|
29
29
|
export * from "./resources/model-evaluation-stores.js";
|
|
30
30
|
export { NotebooksResource, } from "./resources/notebooks.js";
|
|
31
|
+
export * from "./resources/project-git.js";
|
|
31
32
|
export { ProjectLibraryResource, } from "./resources/project-library.js";
|
|
32
33
|
export { ProjectsResource, } from "./resources/projects.js";
|
|
33
34
|
export { RecipesResource, } from "./resources/recipes.js";
|
|
@@ -41,7 +42,7 @@ export { WebappsResource, } from "./resources/webapps.js";
|
|
|
41
42
|
export { WikiResource, } from "./resources/wiki.js";
|
|
42
43
|
export { WorkspacesResource, } from "./resources/workspaces.js";
|
|
43
44
|
// Schemas (TypeBox schema objects for runtime validation)
|
|
44
|
-
export { BuildModeSchema, CodeEnvActionResultSchema, CodeEnvCreateOptionsSchema, CodeEnvDetailsSchema, CodeEnvPackageListSchema, CodeEnvSetPackagesOptionsSchema, CodeEnvSummaryArraySchema, CodeEnvSummarySchema, CodeEnvUpdatePackagesOptionsSchema, CodeEnvUsageArraySchema, CodeEnvWaitOptionsSchema, ConnectionSummarySchema, DashboardDetailsSchema, DashboardSummaryArraySchema, DashboardSummarySchema, DataQualityComputeResultSchema, DataQualityProjectStatusSchema, DataQualityRuleArraySchema, DataQualityRuleResultArraySchema, DataQualityRuleResultSchema, DataQualityRuleSchema, DataQualityRulesSchema, DataQualityStatusByPartitionSchema, DataQualityStatusSchema, DataQualityTimelineEntrySchema, DataQualityTimelineSchema, DatasetCreateOptionsSchema, DatasetDetailsSchema, DatasetSchemaSchema, DatasetSummaryArraySchema, DatasetSummarySchema, FlowMapOptionsSchema, FlowZoneArraySchema, FlowZoneCreateOptionsSchema, FlowZoneItemSchema, FlowZoneObjectTypeSchema, FlowZonePositionSchema, FlowZoneSchema, FlowZoneUpdateOptionsSchema, FolderCreateOptionsSchema, FolderDetailsSchema, FolderItemArraySchema, FolderItemSchema, FolderSummaryArraySchema, FolderSummarySchema, FutureStateSchema, FutureWaitResultSchema, InsightDetailsSchema, InsightSummaryArraySchema, InsightSummarySchema, JobSummaryArraySchema, JobSummarySchema, JobWaitResultSchema, JupyterCellSchema, JupyterNotebookContentSchema, JupyterNotebookSummaryArraySchema, JupyterNotebookSummarySchema, NotebookSessionArraySchema, NotebookSessionSchema, parseSchema, ProjectDetailsSchema, ProjectMetadataSchema, ProjectSummaryArraySchema, ProjectSummarySchema, ProjectVariablesSchema, RecipeCreateOptionsSchema, RecipeCreateResultSchema, RecipeDetailsSchema, RecipeSummaryArraySchema, RecipeSummarySchema, safeParseSchema, ScenarioDetailsSchema, ScenarioStatusSchema, ScenarioStepRunSchema, ScenarioSummaryArraySchema, ScenarioSummarySchema, ScenarioWaitResultSchema, SqlNotebookCellSchema, SqlNotebookContentSchema, SqlNotebookSummaryArraySchema, SqlNotebookSummarySchema, SqlQueryResponseSchema, SqlQueryResultSchema, SqlQuerySchemaSchema, WikiArticleDataArraySchema, WikiArticleDataSchema, WikiArticleMetadataSchema, WikiSettingsSchema, WikiTaxonomyNodeSchema, } from "./schemas.js";
|
|
45
|
+
export { BuildModeSchema, CodeEnvActionResultSchema, CodeEnvCreateOptionsSchema, CodeEnvDetailsSchema, CodeEnvPackageListSchema, CodeEnvSetPackagesOptionsSchema, CodeEnvSummaryArraySchema, CodeEnvSummarySchema, CodeEnvUpdatePackagesOptionsSchema, CodeEnvUsageArraySchema, CodeEnvWaitOptionsSchema, ConnectionSummarySchema, DashboardDetailsSchema, DashboardSummaryArraySchema, DashboardSummarySchema, DataQualityComputeResultSchema, DataQualityProjectStatusSchema, DataQualityRuleArraySchema, DataQualityRuleResultArraySchema, DataQualityRuleResultSchema, DataQualityRuleSchema, DataQualityRulesSchema, DataQualityStatusByPartitionSchema, DataQualityStatusSchema, DataQualityTimelineEntrySchema, DataQualityTimelineSchema, DatasetCreateOptionsSchema, DatasetDetailsSchema, DatasetSchemaSchema, DatasetSummaryArraySchema, DatasetSummarySchema, FlowMapOptionsSchema, FlowZoneArraySchema, FlowZoneCreateOptionsSchema, FlowZoneItemSchema, FlowZoneObjectTypeSchema, FlowZonePositionSchema, FlowZoneSchema, FlowZoneUpdateOptionsSchema, FolderCreateOptionsSchema, FolderDetailsSchema, FolderItemArraySchema, FolderItemSchema, FolderSummaryArraySchema, FolderSummarySchema, FutureStateSchema, FutureWaitResultSchema, InsightDetailsSchema, InsightSummaryArraySchema, InsightSummarySchema, JobSummaryArraySchema, JobSummarySchema, JobWaitResultSchema, JupyterCellSchema, JupyterNotebookContentSchema, JupyterNotebookSummaryArraySchema, JupyterNotebookSummarySchema, NotebookSessionArraySchema, NotebookSessionSchema, parseSchema, ProjectDetailsSchema, ProjectGitActionResultSchema, ProjectGitDiffResultSchema, ProjectGitFutureResponseSchema, ProjectGitFutureStateSchema, ProjectGitLibrariesSchema, ProjectGitLibrarySchema, ProjectGitLogResultSchema, ProjectGitRemoteSchema, ProjectGitStatusSchema, ProjectGitTagSchema, ProjectGitTagsSchema, ProjectMetadataSchema, ProjectSummaryArraySchema, ProjectSummarySchema, ProjectVariablesSchema, RecipeCreateOptionsSchema, RecipeCreateResultSchema, RecipeDetailsSchema, RecipeSummaryArraySchema, RecipeSummarySchema, safeParseSchema, ScenarioDetailsSchema, ScenarioStatusSchema, ScenarioStepRunSchema, ScenarioSummaryArraySchema, ScenarioSummarySchema, ScenarioWaitResultSchema, SqlNotebookCellSchema, SqlNotebookContentSchema, SqlNotebookSummaryArraySchema, SqlNotebookSummarySchema, SqlQueryResponseSchema, SqlQueryResultSchema, SqlQuerySchemaSchema, WikiArticleDataArraySchema, WikiArticleDataSchema, WikiArticleMetadataSchema, WikiSettingsSchema, WikiTaxonomyNodeSchema, } from "./schemas.js";
|
|
45
46
|
// Utilities
|
|
46
47
|
export { deepMerge, } from "./utils/deep-merge.js";
|
|
47
48
|
export { normalizeFlowGraph, } from "./utils/flow-map.js";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { DataikuClient } from "../client.js";
|
|
1
2
|
import type { ConnectionSummary } from "../schemas.js";
|
|
2
3
|
import { BaseResource } from "./base.js";
|
|
4
|
+
export declare function resolveAdminManagedStorageConnection(client: DataikuClient, capability: "allowManagedDatasets" | "allowManagedFolders", preferredName?: string): Promise<string | undefined>;
|
|
3
5
|
export interface ConnectionSchemaListOptions {
|
|
4
6
|
connection: string;
|
|
5
7
|
projectKey?: string;
|
|
@@ -20,7 +22,7 @@ export declare class ConnectionsResource extends BaseResource {
|
|
|
20
22
|
*
|
|
21
23
|
* - fast (default): fetches the connection name list and maps to ConnectionSummary.
|
|
22
24
|
* Falls back to rich mode on any failure or empty result set.
|
|
23
|
-
* - rich: inspects project datasets to derive connection metadata
|
|
25
|
+
* - rich: inspects project datasets and managed folders to derive connection metadata
|
|
24
26
|
* (types, managed flag, db schemas).
|
|
25
27
|
*/
|
|
26
28
|
infer(opts?: {
|