dataiku-sdk 3.6.0 → 3.7.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.
Files changed (127) hide show
  1. package/README.md +14 -6
  2. package/bin/bun-version.js +14 -0
  3. package/bin/dss.js +23 -12
  4. package/dist/build-metadata.json +1 -1
  5. package/dist/packages/types/src/index.d.ts +74 -1
  6. package/dist/packages/types/src/index.js +53 -1
  7. package/dist/src/cli/coerce.d.ts +1 -0
  8. package/dist/src/cli/coerce.js +19 -15
  9. package/dist/src/cli/command-syntax.json +3521 -416
  10. package/dist/src/cli/commands/analysis.js +19 -1
  11. package/dist/src/cli/commands/bundle.js +22 -0
  12. package/dist/src/cli/commands/connection.js +26 -2
  13. package/dist/src/cli/commands/data-quality.js +33 -1
  14. package/dist/src/cli/commands/dataset.js +35 -4
  15. package/dist/src/cli/commands/discussion.js +15 -0
  16. package/dist/src/cli/commands/doctor.js +1 -1
  17. package/dist/src/cli/commands/flow.d.ts +5 -0
  18. package/dist/src/cli/commands/flow.js +57 -0
  19. package/dist/src/cli/commands/future.js +8 -0
  20. package/dist/src/cli/commands/index.js +6 -0
  21. package/dist/src/cli/commands/job.js +29 -6
  22. package/dist/src/cli/commands/metrics.js +21 -1
  23. package/dist/src/cli/commands/ml-task.d.ts +5 -0
  24. package/dist/src/cli/commands/ml-task.js +86 -16
  25. package/dist/src/cli/commands/mlflow.d.ts +11 -0
  26. package/dist/src/cli/commands/mlflow.js +121 -0
  27. package/dist/src/cli/commands/plugin.js +5 -11
  28. package/dist/src/cli/commands/project-deployer.js +70 -0
  29. package/dist/src/cli/commands/project-library.js +2 -5
  30. package/dist/src/cli/commands/project.js +8 -0
  31. package/dist/src/cli/commands/recipe.d.ts +9 -0
  32. package/dist/src/cli/commands/recipe.js +93 -7
  33. package/dist/src/cli/commands/saved-model.d.ts +1 -1
  34. package/dist/src/cli/commands/saved-model.js +9 -76
  35. package/dist/src/cli/commands/streaming-endpoint.js +30 -1
  36. package/dist/src/cli/commands/webapp.js +8 -0
  37. package/dist/src/cli/commands/wiki.js +22 -0
  38. package/dist/src/cli/commands/workspace.js +8 -0
  39. package/dist/src/cli/contract.d.ts +16 -15
  40. package/dist/src/cli/contract.js +139 -3404
  41. package/dist/src/cli/doctor.d.ts +13 -0
  42. package/dist/src/cli/doctor.js +41 -1
  43. package/dist/src/cli/flags.d.ts +7 -1
  44. package/dist/src/cli/flags.js +78 -6
  45. package/dist/src/cli/helpers/app-successor.js +1 -2
  46. package/dist/src/cli/helpers/documentation.d.ts +21 -0
  47. package/dist/src/cli/helpers/documentation.js +53 -0
  48. package/dist/src/cli/helpers/trained-model.d.ts +26 -0
  49. package/dist/src/cli/helpers/trained-model.js +144 -0
  50. package/dist/src/cli/list-output.d.ts +7 -0
  51. package/dist/src/cli/list-output.js +77 -0
  52. package/dist/src/cli/list-shapes.d.ts +21 -0
  53. package/dist/src/cli/list-shapes.js +111 -0
  54. package/dist/src/cli/output-schemas.d.ts +0 -14
  55. package/dist/src/cli/output-schemas.js +4 -7
  56. package/dist/src/cli/output.d.ts +0 -1
  57. package/dist/src/cli/output.js +27 -19
  58. package/dist/src/cli/plans.d.ts +14 -0
  59. package/dist/src/cli/plans.js +3684 -0
  60. package/dist/src/cli/usage.d.ts +7 -0
  61. package/dist/src/cli/usage.js +20 -1
  62. package/dist/src/cli/version.d.ts +2 -2
  63. package/dist/src/cli/version.js +2 -2
  64. package/dist/src/cli.js +127 -113
  65. package/dist/src/client.d.ts +52 -43
  66. package/dist/src/client.js +267 -96
  67. package/dist/src/errors.d.ts +11 -1
  68. package/dist/src/errors.js +31 -47
  69. package/dist/src/generated/action-output-schemas.json +345 -89
  70. package/dist/src/index.d.ts +5 -1
  71. package/dist/src/index.js +3 -0
  72. package/dist/src/resources/analyses.d.ts +8 -0
  73. package/dist/src/resources/analyses.js +13 -1
  74. package/dist/src/resources/bundles.d.ts +34 -0
  75. package/dist/src/resources/bundles.js +67 -0
  76. package/dist/src/resources/connections.d.ts +9 -0
  77. package/dist/src/resources/connections.js +15 -0
  78. package/dist/src/resources/data-quality.d.ts +20 -0
  79. package/dist/src/resources/data-quality.js +30 -0
  80. package/dist/src/resources/dataset-create.d.ts +19 -0
  81. package/dist/src/resources/dataset-create.js +66 -0
  82. package/dist/src/resources/datasets.d.ts +25 -15
  83. package/dist/src/resources/datasets.js +59 -111
  84. package/dist/src/resources/discussions.d.ts +5 -0
  85. package/dist/src/resources/discussions.js +7 -0
  86. package/dist/src/resources/documentation.d.ts +25 -0
  87. package/dist/src/resources/documentation.js +16 -0
  88. package/dist/src/resources/flow.d.ts +48 -0
  89. package/dist/src/resources/flow.js +65 -0
  90. package/dist/src/resources/futures.d.ts +23 -0
  91. package/dist/src/resources/futures.js +32 -0
  92. package/dist/src/resources/jobs.js +102 -2
  93. package/dist/src/resources/metrics.d.ts +10 -0
  94. package/dist/src/resources/metrics.js +10 -0
  95. package/dist/src/resources/ml-tasks.d.ts +65 -2
  96. package/dist/src/resources/ml-tasks.js +102 -28
  97. package/dist/src/resources/mlflow-extension.d.ts +73 -0
  98. package/dist/src/resources/mlflow-extension.js +105 -0
  99. package/dist/src/resources/projects.d.ts +6 -0
  100. package/dist/src/resources/projects.js +8 -0
  101. package/dist/src/resources/recipe-create.d.ts +65 -0
  102. package/dist/src/resources/recipe-create.js +338 -0
  103. package/dist/src/resources/recipes.d.ts +28 -29
  104. package/dist/src/resources/recipes.js +126 -245
  105. package/dist/src/resources/saved-models.d.ts +10 -6
  106. package/dist/src/resources/saved-models.js +16 -14
  107. package/dist/src/resources/scenarios.js +8 -14
  108. package/dist/src/resources/streaming-endpoints.d.ts +12 -0
  109. package/dist/src/resources/streaming-endpoints.js +15 -0
  110. package/dist/src/resources/trained-model.d.ts +60 -0
  111. package/dist/src/resources/trained-model.js +98 -0
  112. package/dist/src/resources/webapps.d.ts +8 -0
  113. package/dist/src/resources/webapps.js +10 -0
  114. package/dist/src/resources/wiki.d.ts +5 -0
  115. package/dist/src/resources/wiki.js +7 -0
  116. package/dist/src/resources/workspaces.d.ts +2 -0
  117. package/dist/src/resources/workspaces.js +4 -0
  118. package/dist/src/utils/response-file.js +20 -9
  119. package/dist/src/utils/secret-sanitize.d.ts +7 -0
  120. package/dist/src/utils/secret-sanitize.js +46 -0
  121. package/package.json +25 -26
  122. package/plugin.json +1 -1
  123. package/skills/dataiku-dss/SKILL.md +1 -1
  124. package/skills/dataiku-dss/references/authentication.md +3 -1
  125. package/skills/dataiku-dss/references/coding.md +1 -0
  126. package/skills/dataiku-dss/references/discovery.md +4 -6
  127. package/skills/dataiku-dss/references/troubleshooting.md +3 -2
@@ -15,9 +15,11 @@ export { type DataCollectionCreateRequest, type DataCollectionObject, type DataC
15
15
  export { DataQualityResource, } from "./resources/data-quality.js";
16
16
  export { type DatasetBuildValidationResult, type DatasetCloneOptions, type DatasetCloneResult, type DatasetManagedCreateOptions, type DatasetManagedCreateResult, type DatasetSchemaColumnInput, DatasetsResource, type UploadDatasetFileOptions, type UploadDatasetFileResult, type UploadedFileMetadata, } from "./resources/datasets.js";
17
17
  export { DiscussionsResource, } from "./resources/discussions.js";
18
+ export { type DocumentationTemplate, } from "./resources/documentation.js";
18
19
  export { type FlowZoneItemInput, FlowZonesResource, } from "./resources/flow-zones.js";
20
+ export { FlowResource, type SchemaPropagationOptions, } from "./resources/flow.js";
19
21
  export { FoldersResource, } from "./resources/folders.js";
20
- export { FuturesResource, } from "./resources/futures.js";
22
+ export { type DssTask, FuturesResource, type FutureWaitOptions, } from "./resources/futures.js";
21
23
  export { type DssGroup, type GroupCreateRequest, GroupsResource, } from "./resources/groups.js";
22
24
  export { InsightsResource, } from "./resources/insights.js";
23
25
  export { type JobBuildAndWaitOptions, type JobBuildOptions, type JobBuildTarget, type JobBuildTargetType, type JobLogFilter, type JobLogProgress, type JobLogSummary, type JobLogUnavailableReason, JobsResource, type JobWaitOutcome, parseJobLogProgress, } from "./resources/jobs.js";
@@ -27,6 +29,7 @@ export { type MacroResultOptions, type MacroRunFailure, type MacroRunHandle, typ
27
29
  export { MeaningsResource, } from "./resources/meanings.js";
28
30
  export { MetricsResource, } from "./resources/metrics.js";
29
31
  export * from "./resources/ml-tasks.js";
32
+ export { type MlflowDeployRunOptions, type MlflowExperimentsDatasetOptions, MlflowExtensionResource, type MlflowInferenceInfo, type MlflowPredictionType, } from "./resources/mlflow-extension.js";
30
33
  export * from "./resources/model-evaluation-stores.js";
31
34
  export { NotebooksResource, } from "./resources/notebooks.js";
32
35
  export { type PluginCodeEnvCreateOptions, type PluginContentItem, type PluginCreateDevOptions, type PluginFileDetails, type PluginGitInstallOptions, type PluginGitRemote, type PluginMissingType, type PluginProjectScopeOptions, type PluginSettings, PluginsResource, type PluginSummary, type PluginUsage, type PluginUsageReport, } from "./resources/plugins.js";
@@ -40,6 +43,7 @@ export { normalizeScenarioUpdateData, SCENARIO_CANONICAL_EDITABLE_FIELDS, type S
40
43
  export { SqlResource, } from "./resources/sql.js";
41
44
  export { StatisticsResource, } from "./resources/statistics.js";
42
45
  export { StreamingEndpointsResource, } from "./resources/streaming-endpoints.js";
46
+ export * from "./resources/trained-model.js";
43
47
  export { type DssUser, type ExternalUserEntry, type ProvisionRequest, type UserActivity, type UserCreateRequest, UsersResource, } from "./resources/users.js";
44
48
  export { VariablesResource, } from "./resources/variables.js";
45
49
  export { WebappsResource, } from "./resources/webapps.js";
package/dist/src/index.js CHANGED
@@ -20,6 +20,7 @@ export { DataQualityResource, } from "./resources/data-quality.js";
20
20
  export { DatasetsResource, } from "./resources/datasets.js";
21
21
  export { DiscussionsResource, } from "./resources/discussions.js";
22
22
  export { FlowZonesResource, } from "./resources/flow-zones.js";
23
+ export { FlowResource, } from "./resources/flow.js";
23
24
  export { FoldersResource, } from "./resources/folders.js";
24
25
  export { FuturesResource, } from "./resources/futures.js";
25
26
  export { GroupsResource, } from "./resources/groups.js";
@@ -31,6 +32,7 @@ export { MacrosResource, } from "./resources/macros.js";
31
32
  export { MeaningsResource, } from "./resources/meanings.js";
32
33
  export { MetricsResource, } from "./resources/metrics.js";
33
34
  export * from "./resources/ml-tasks.js";
35
+ export { MlflowExtensionResource, } from "./resources/mlflow-extension.js";
34
36
  export * from "./resources/model-evaluation-stores.js";
35
37
  export { NotebooksResource, } from "./resources/notebooks.js";
36
38
  export { PluginsResource, } from "./resources/plugins.js";
@@ -44,6 +46,7 @@ export { normalizeScenarioUpdateData, SCENARIO_CANONICAL_EDITABLE_FIELDS, Scenar
44
46
  export { SqlResource, } from "./resources/sql.js";
45
47
  export { StatisticsResource, } from "./resources/statistics.js";
46
48
  export { StreamingEndpointsResource, } from "./resources/streaming-endpoints.js";
49
+ export * from "./resources/trained-model.js";
47
50
  export { UsersResource, } from "./resources/users.js";
48
51
  export { VariablesResource, } from "./resources/variables.js";
49
52
  export { WebappsResource, } from "./resources/webapps.js";
@@ -1,4 +1,5 @@
1
1
  import { BaseResource } from "./base.js";
2
+ import type { MlTaskListItem } from "./ml-tasks.js";
2
3
  export interface AnalysisListItem extends Record<string, unknown> {
3
4
  id?: string;
4
5
  analysisId?: string;
@@ -30,5 +31,12 @@ export declare class AnalysesResource extends BaseResource {
30
31
  create(opts: AnalysisCreateOptions): Promise<AnalysisCreateResult>;
31
32
  /** Delete a visual analysis. */
32
33
  delete(analysisId: string, projectKey?: string): Promise<void>;
34
+ /**
35
+ * Replace a visual analysis definition (script, charts, name, tags): the
36
+ * object from {@link get}, edited (PUT /lab/{analysisId}/).
37
+ */
38
+ update(analysisId: string, definition: AnalysisDefinition, projectKey?: string): Promise<Record<string, unknown>>;
39
+ /** The ML tasks of one visual analysis (GET /lab/{analysisId}/models/). */
40
+ listMlTasks(analysisId: string, projectKey?: string): Promise<MlTaskListItem[]>;
33
41
  private analysisPath;
34
42
  }
@@ -1,4 +1,4 @@
1
- import { BaseResource, requireNonEmpty, } from "./base.js";
1
+ import { BaseResource, requireArrayResponse, requireNonEmpty, requireObject, } from "./base.js";
2
2
  export class AnalysesResource extends BaseResource {
3
3
  /** List visual analyses in a project. */
4
4
  async list(projectKey) {
@@ -17,6 +17,18 @@ export class AnalysesResource extends BaseResource {
17
17
  async delete(analysisId, projectKey) {
18
18
  await this.client.del(`${this.analysisPath(analysisId, projectKey)}/`);
19
19
  }
20
+ /**
21
+ * Replace a visual analysis definition (script, charts, name, tags): the
22
+ * object from {@link get}, edited (PUT /lab/{analysisId}/).
23
+ */
24
+ async update(analysisId, definition, projectKey) {
25
+ return this.client.put(`${this.analysisPath(analysisId, projectKey)}/`, requireObject(definition, "definition"));
26
+ }
27
+ /** The ML tasks of one visual analysis (GET /lab/{analysisId}/models/). */
28
+ async listMlTasks(analysisId, projectKey) {
29
+ const res = await this.client.get(`${this.analysisPath(analysisId, projectKey)}/models/`);
30
+ return requireArrayResponse(res.mlTasks, "analyses.listMlTasks");
31
+ }
20
32
  analysisPath(analysisId, projectKey) {
21
33
  const id = encodeURIComponent(requireNonEmpty(analysisId, "analysisId"));
22
34
  return `/public/api/projects/${this.enc(projectKey)}/lab/${id}`;
@@ -46,6 +46,18 @@ export declare class BundlesResource extends BaseResource {
46
46
  deleteExported(bundleId: string, projectKey?: string): Promise<void>;
47
47
  /** Download an exported Design-node bundle archive. */
48
48
  downloadExportedArchive(bundleId: string, projectKey?: string): Promise<Response>;
49
+ /** Get an exported Design-node bundle's details (content summary, export manifest, changelog). */
50
+ getExported(bundleId: string, projectKey?: string): Promise<Record<string, unknown>>;
51
+ /**
52
+ * Create a project from a bundle on an Automation node (global admin):
53
+ * upload a local bundle zip (`filePath`) or use an archive already on the
54
+ * node host (`archivePath`). `projectFolderId` places the new project.
55
+ */
56
+ createProjectFromBundle(source: {
57
+ filePath: string;
58
+ } | {
59
+ archivePath: string;
60
+ }, projectFolderId?: string): Promise<Record<string, unknown> | undefined>;
49
61
  /**
50
62
  * Publish a Design-node bundle to the Project Deployer. The documented
51
63
  * optional `publishedProjectKey` parameter selects the published project
@@ -100,4 +112,26 @@ export declare class ProjectDeployerResource extends BaseResource {
100
112
  listInfras(): Promise<Record<string, unknown>[]>;
101
113
  /** Create a Project Deployer infrastructure. */
102
114
  createInfra(body: Record<string, unknown>): Promise<Record<string, unknown>>;
115
+ /** Get a Project Deployer infrastructure (basic info, deployments). */
116
+ getInfra(infraId: string): Promise<Record<string, unknown>>;
117
+ /** Get an infrastructure's settings (permissions, automation node, remappings). */
118
+ getInfraSettings(infraId: string): Promise<Record<string, unknown>>;
119
+ /** Save infrastructure settings obtained from `getInfraSettings`, edited. */
120
+ saveInfraSettings(infraId: string, body: Record<string, unknown>): Promise<void>;
121
+ /** Delete an infrastructure no deployment uses. */
122
+ deleteInfra(infraId: string): Promise<void>;
123
+ /** List the Project Deployer stages (Development, Test, Production, ...). */
124
+ listStages(): Promise<Record<string, unknown>[]>;
125
+ /** Get a deployment's settings (infra, bundle, remappings). */
126
+ getDeploymentSettings(deploymentId: string): Promise<Record<string, unknown>>;
127
+ /** Governance status of the deployment's bundle (or `bundleId`'s): messages on whether it may deploy. */
128
+ getGovernanceStatus(deploymentId: string, bundleId?: string): Promise<Record<string, unknown>>;
129
+ /** Delete a published project no deployment uses. */
130
+ deleteProject(publishedProjectKey: string): Promise<void>;
131
+ /** Get a published project's settings (permissions, owner). */
132
+ getProjectSettings(publishedProjectKey: string): Promise<Record<string, unknown>>;
133
+ /** Save published project settings obtained from `getProjectSettings`, edited. */
134
+ saveProjectSettings(publishedProjectKey: string, body: Record<string, unknown>): Promise<void>;
135
+ /** Delete a bundle of a published project that no deployment uses. */
136
+ deleteBundle(publishedProjectKey: string, bundleId: string): Promise<void>;
103
137
  }
@@ -31,6 +31,28 @@ export class BundlesResource extends BaseResource {
31
31
  async downloadExportedArchive(bundleId, projectKey) {
32
32
  return this.client.stream(`/public/api/projects/${this.enc(projectKey)}/bundles/exported/${encodeURIComponent(bundleId)}/archive`);
33
33
  }
34
+ /** Get an exported Design-node bundle's details (content summary, export manifest, changelog). */
35
+ async getExported(bundleId, projectKey) {
36
+ return this.client.get(`/public/api/projects/${this.enc(projectKey)}/bundles/exported/${encodeURIComponent(bundleId)}`);
37
+ }
38
+ /**
39
+ * Create a project from a bundle on an Automation node (global admin):
40
+ * upload a local bundle zip (`filePath`) or use an archive already on the
41
+ * node host (`archivePath`). `projectFolderId` places the new project.
42
+ */
43
+ async createProjectFromBundle(source, projectFolderId) {
44
+ const query = new URLSearchParams();
45
+ if ("archivePath" in source)
46
+ query.set("archivePath", source.archivePath);
47
+ if (projectFolderId)
48
+ query.set("projectFolderId", projectFolderId);
49
+ const suffix = query.size > 0 ? `?${query}` : "";
50
+ if ("archivePath" in source) {
51
+ return this.client.post(`/public/api/projectsFromBundle/fromArchive${suffix}`);
52
+ }
53
+ await this.client.upload(`/public/api/projectsFromBundle/${suffix}`, source.filePath);
54
+ return undefined;
55
+ }
34
56
  /**
35
57
  * Publish a Design-node bundle to the Project Deployer. The documented
36
58
  * optional `publishedProjectKey` parameter selects the published project
@@ -135,4 +157,49 @@ export class ProjectDeployerResource extends BaseResource {
135
157
  async createInfra(body) {
136
158
  return this.client.post("/public/api/project-deployer/infras", body);
137
159
  }
160
+ /** Get a Project Deployer infrastructure (basic info, deployments). */
161
+ async getInfra(infraId) {
162
+ return this.client.get(`/public/api/project-deployer/infras/${encodeURIComponent(infraId)}`);
163
+ }
164
+ /** Get an infrastructure's settings (permissions, automation node, remappings). */
165
+ async getInfraSettings(infraId) {
166
+ return this.client.get(`/public/api/project-deployer/infras/${encodeURIComponent(infraId)}/settings`);
167
+ }
168
+ /** Save infrastructure settings obtained from `getInfraSettings`, edited. */
169
+ async saveInfraSettings(infraId, body) {
170
+ await this.client.putVoid(`/public/api/project-deployer/infras/${encodeURIComponent(infraId)}/settings`, body);
171
+ }
172
+ /** Delete an infrastructure no deployment uses. */
173
+ async deleteInfra(infraId) {
174
+ await this.client.del(`/public/api/project-deployer/infras/${encodeURIComponent(infraId)}`);
175
+ }
176
+ /** List the Project Deployer stages (Development, Test, Production, ...). */
177
+ async listStages() {
178
+ return this.client.get("/public/api/project-deployer/stages");
179
+ }
180
+ /** Get a deployment's settings (infra, bundle, remappings). */
181
+ async getDeploymentSettings(deploymentId) {
182
+ return this.client.get(`/public/api/project-deployer/deployments/${encodeURIComponent(deploymentId)}/settings`);
183
+ }
184
+ /** Governance status of the deployment's bundle (or `bundleId`'s): messages on whether it may deploy. */
185
+ async getGovernanceStatus(deploymentId, bundleId) {
186
+ const query = bundleId ? `?bundleId=${encodeURIComponent(bundleId)}` : "";
187
+ return this.client.get(`/public/api/project-deployer/deployments/${encodeURIComponent(deploymentId)}/governance-status${query}`);
188
+ }
189
+ /** Delete a published project no deployment uses. */
190
+ async deleteProject(publishedProjectKey) {
191
+ await this.client.del(`/public/api/project-deployer/projects/${encodeURIComponent(publishedProjectKey)}`);
192
+ }
193
+ /** Get a published project's settings (permissions, owner). */
194
+ async getProjectSettings(publishedProjectKey) {
195
+ return this.client.get(`/public/api/project-deployer/projects/${encodeURIComponent(publishedProjectKey)}/settings`);
196
+ }
197
+ /** Save published project settings obtained from `getProjectSettings`, edited. */
198
+ async saveProjectSettings(publishedProjectKey, body) {
199
+ await this.client.putVoid(`/public/api/project-deployer/projects/${encodeURIComponent(publishedProjectKey)}/settings`, body);
200
+ }
201
+ /** Delete a bundle of a published project that no deployment uses. */
202
+ async deleteBundle(publishedProjectKey, bundleId) {
203
+ await this.client.del(`/public/api/project-deployer/projects/${encodeURIComponent(publishedProjectKey)}/bundles/${encodeURIComponent(bundleId)}`);
204
+ }
138
205
  }
@@ -55,6 +55,15 @@ export declare class ConnectionsResource extends BaseResource {
55
55
  adminList(): Promise<Record<string, Record<string, unknown>>>;
56
56
  /** Gets one connection by name (Admin required). */
57
57
  adminGet(connectionName: string): Promise<Record<string, unknown>>;
58
+ /**
59
+ * Reads one connection's usage view (no admin privilege required): the
60
+ * non-admin Python-client route `GET /connections/{name}/info`
61
+ * (`DSSConnection.get_info()`). Works for every connection the key can
62
+ * query, where the admin definition GET answers 403 for non-admin keys.
63
+ * Returns `{type, params, credentialsMode, ...}` per the server payload;
64
+ * CLI output layers redact credential-bearing params.
65
+ */
66
+ info(connectionName: string): Promise<Record<string, unknown>>;
58
67
  /**
59
68
  * Creates a connection (Admin required). Body is the Connection definition
60
69
  * (`{name, type, params, ...}`); params are connection-type specific per
@@ -185,6 +185,21 @@ export class ConnectionsResource extends BaseResource {
185
185
  const enc = requireNonEmpty(connectionName, "connectionName").trim();
186
186
  return this.client.get(`/public/api/admin/connections/${encodeURIComponent(enc)}`);
187
187
  }
188
+ /**
189
+ * Reads one connection's usage view (no admin privilege required): the
190
+ * non-admin Python-client route `GET /connections/{name}/info`
191
+ * (`DSSConnection.get_info()`). Works for every connection the key can
192
+ * query, where the admin definition GET answers 403 for non-admin keys.
193
+ * Returns `{type, params, credentialsMode, ...}` per the server payload;
194
+ * CLI output layers redact credential-bearing params.
195
+ */
196
+ async info(connectionName) {
197
+ const enc = requireNonEmpty(connectionName, "connectionName").trim();
198
+ const raw = await this.client.get(`/public/api/connections/${encodeURIComponent(enc)}/info`);
199
+ return raw !== undefined && raw !== null && typeof raw === "object" && !Array.isArray(raw)
200
+ ? raw
201
+ : {};
202
+ }
188
203
  /**
189
204
  * Creates a connection (Admin required). Body is the Connection definition
190
205
  * (`{name, type, params, ...}`); params are connection-type specific per
@@ -51,4 +51,24 @@ export declare class DataQualityResource extends BaseResource {
51
51
  computeRulesAndWait(datasetName: string, opts?: DataQualityComputeAndWaitOptions): Promise<FutureWaitResult>;
52
52
  projectStatus(opts?: DataQualityProjectStatusOptions): Promise<DataQualityProjectStatus>;
53
53
  projectTimeline(opts?: DataQualityProjectTimelineOptions): Promise<DataQualityTimeline>;
54
+ /**
55
+ * Current Data Quality status of every monitored project the caller can
56
+ * read (GET /data-quality/status), keyed by project key.
57
+ */
58
+ instanceStatus(): Promise<Record<string, unknown>>;
59
+ /**
60
+ * Last rule outcome per partition (POST /data-quality/get-partitions-status,
61
+ * `partitions` query parameter repeated as dataikuapi sends it). Without
62
+ * partitions this asks for `NP`: DSS 15 answers a parameterless call with a
63
+ * NullPointerException although the docs make it optional.
64
+ */
65
+ partitionsStatus(datasetName: string, opts?: DataQualityProjectOptions & {
66
+ partitions?: string[];
67
+ }): Promise<Record<string, unknown>>;
68
+ /**
69
+ * Delete rule computation history for one partition (`NP` for a
70
+ * non-partitioned dataset, `ALL` for every partition): DELETE
71
+ * /data-quality/history/{partition}.
72
+ */
73
+ deleteHistory(datasetName: string, opts?: DataQualityPartitionOptions): Promise<void>;
54
74
  }
@@ -119,4 +119,34 @@ export class DataQualityResource extends BaseResource {
119
119
  const raw = await this.client.get(`${projectPath(pk)}/timeline${queryString(params)}`);
120
120
  return this.client.safeParse(DataQualityTimelineSchema, raw, "dataQuality.projectTimeline");
121
121
  }
122
+ /**
123
+ * Current Data Quality status of every monitored project the caller can
124
+ * read (GET /data-quality/status), keyed by project key.
125
+ */
126
+ async instanceStatus() {
127
+ return this.client.get("/public/api/data-quality/status");
128
+ }
129
+ /**
130
+ * Last rule outcome per partition (POST /data-quality/get-partitions-status,
131
+ * `partitions` query parameter repeated as dataikuapi sends it). Without
132
+ * partitions this asks for `NP`: DSS 15 answers a parameterless call with a
133
+ * NullPointerException although the docs make it optional.
134
+ */
135
+ async partitionsStatus(datasetName, opts = {}) {
136
+ const pk = this.resolveProjectKey(opts.projectKey);
137
+ const params = new URLSearchParams();
138
+ const partitions = opts.partitions?.length ? opts.partitions : ["NP",];
139
+ for (const partition of partitions)
140
+ params.append("partitions", partition);
141
+ return this.client.post(`${dataQualityPath(pk, datasetName)}/get-partitions-status${queryString(params)}`);
142
+ }
143
+ /**
144
+ * Delete rule computation history for one partition (`NP` for a
145
+ * non-partitioned dataset, `ALL` for every partition): DELETE
146
+ * /data-quality/history/{partition}.
147
+ */
148
+ async deleteHistory(datasetName, opts = {}) {
149
+ const pk = this.resolveProjectKey(opts.projectKey);
150
+ await this.client.del(`${dataQualityPath(pk, datasetName)}/history/${encodeURIComponent(opts.partition ?? "NP")}`);
151
+ }
122
152
  }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Reject dataset types the public API can create but never populate. An
3
+ * editable (`Inline`) dataset keeps its rows in a DSS config file that no
4
+ * public endpoint writes; without it every downstream build fails.
5
+ */
6
+ export declare function assertDatasetTypeCreatable(dsType: string): void;
7
+ /** Wire body for POST /datasets/; shared with `dataset create --plan` so the plan matches the request. */
8
+ export declare function buildDatasetCreateBody(opts: {
9
+ projectKey: string;
10
+ datasetName: string;
11
+ connection?: string;
12
+ dsType: string;
13
+ table?: string;
14
+ dbSchema?: string;
15
+ catalog?: string;
16
+ formatType?: string;
17
+ formatParams?: Record<string, unknown>;
18
+ managed?: boolean;
19
+ }): Record<string, unknown>;
@@ -0,0 +1,66 @@
1
+ import { ClientValidationError, } from "../errors.js";
2
+ /**
3
+ * Reject dataset types the public API can create but never populate. An
4
+ * editable (`Inline`) dataset keeps its rows in a DSS config file that no
5
+ * public endpoint writes; without it every downstream build fails.
6
+ */
7
+ export function assertDatasetTypeCreatable(dsType) {
8
+ if (dsType.toLowerCase() !== "inline")
9
+ return;
10
+ throw new ClientValidationError("Inline (editable) datasets cannot be created here: the DSS public API cannot write their rows, and an Inline dataset without rows fails every downstream build (SourceDatasetNotReadyException). For a small static table, create an UploadedFiles dataset and upload a CSV with dss dataset upload-file, or write the rows from a python recipe into a managed dataset.", "validation_failed");
11
+ }
12
+ /** Wire body for POST /datasets/; shared with `dataset create --plan` so the plan matches the request. */
13
+ export function buildDatasetCreateBody(opts) {
14
+ assertDatasetTypeCreatable(opts.dsType);
15
+ if (opts.dsType.toLowerCase() === "uploadedfiles") {
16
+ return {
17
+ projectKey: opts.projectKey,
18
+ name: opts.datasetName,
19
+ type: opts.dsType,
20
+ params: opts.connection ? { uploadConnection: opts.connection, } : {},
21
+ };
22
+ }
23
+ if (!opts.connection) {
24
+ throw new ClientValidationError("connection is required unless dsType is UploadedFiles.");
25
+ }
26
+ if (opts.table) {
27
+ const params = {
28
+ connection: opts.connection,
29
+ mode: "table",
30
+ table: opts.table,
31
+ };
32
+ if (opts.dbSchema)
33
+ params.schema = opts.dbSchema;
34
+ if (opts.catalog)
35
+ params.catalog = opts.catalog;
36
+ return {
37
+ projectKey: opts.projectKey,
38
+ name: opts.datasetName,
39
+ type: opts.dsType,
40
+ params,
41
+ managed: opts.managed ?? false,
42
+ };
43
+ }
44
+ return {
45
+ projectKey: opts.projectKey,
46
+ name: opts.datasetName,
47
+ type: opts.dsType,
48
+ params: {
49
+ connection: opts.connection,
50
+ path: `/dataiku/${opts.projectKey}/${opts.datasetName}`,
51
+ },
52
+ formatType: opts.formatType ?? "csv",
53
+ formatParams: opts.formatParams ?? {
54
+ style: "excel",
55
+ charset: "utf8",
56
+ separator: "\t",
57
+ quoteChar: '"',
58
+ escapeChar: "\\",
59
+ dateSerializationFormat: "ISO",
60
+ arrayMapFormat: "json",
61
+ parseHeaderRow: true,
62
+ compress: "gz",
63
+ },
64
+ managed: opts.managed ?? true,
65
+ };
66
+ }
@@ -1,5 +1,12 @@
1
1
  import { BaseResource } from "./base.js";
2
2
  import type { DatasetCreateOptions, DatasetDetails, DatasetSchema, DatasetSummary } from "../schemas.js";
3
+ /** Column and partition selection for dataset data reads (POST /data body). */
4
+ export interface DatasetDataSelection {
5
+ /** Only these columns, in this order. */
6
+ columns?: string[];
7
+ /** DSS partition spec, e.g. `2026-01` or `2026-01,2026-02`. */
8
+ partitions?: string;
9
+ }
3
10
  export interface DatasetBuildValidationResult {
4
11
  valid: boolean;
5
12
  datasetName: string;
@@ -89,19 +96,6 @@ export interface UploadDatasetFileResult {
89
96
  export declare function validateStreamColumns(headerRow: string[], expectedColumns: {
90
97
  name: string;
91
98
  }[]): string[];
92
- /** Wire body for POST /datasets/; shared with `dataset create --plan` so the plan matches the request. */
93
- export declare function buildDatasetCreateBody(opts: {
94
- projectKey: string;
95
- datasetName: string;
96
- connection?: string;
97
- dsType: string;
98
- table?: string;
99
- dbSchema?: string;
100
- catalog?: string;
101
- formatType?: string;
102
- formatParams?: Record<string, unknown>;
103
- managed?: boolean;
104
- }): Record<string, unknown>;
105
99
  export declare function buildDatasetCloneSettings(source: DatasetDetails, targetName: string, projectKey: string, opts: DatasetCloneOptions): Record<string, unknown>;
106
100
  export declare class DatasetsResource extends BaseResource {
107
101
  /** List all datasets in a project. */
@@ -117,6 +111,12 @@ export declare class DatasetsResource extends BaseResource {
117
111
  * returns it, without schema validation — used for deterministic comparison.
118
112
  */
119
113
  getSchemaObject(datasetName: string, projectKey?: string): Promise<unknown>;
114
+ /**
115
+ * TSV data stream of at most `limit` rows. A column or partition selection
116
+ * uses the documented POST variant of the data endpoint (body `columns`,
117
+ * `partitions`, `format`, `sampling`); otherwise the GET endpoint.
118
+ */
119
+ private dataStream;
120
120
  /**
121
121
  * Preview dataset rows as structured data: column names plus row arrays,
122
122
  * mirroring the sql query shape ({ columns, rows, rowCount }). Streams TSV
@@ -136,7 +136,7 @@ export declare class DatasetsResource extends BaseResource {
136
136
  name: string;
137
137
  }[];
138
138
  timeoutMs?: number;
139
- }): Promise<{
139
+ } & DatasetDataSelection): Promise<{
140
140
  columns: Array<{
141
141
  name: string;
142
142
  }>;
@@ -173,6 +173,16 @@ export declare class DatasetsResource extends BaseResource {
173
173
  * preserved verbatim.
174
174
  */
175
175
  updateMetadata(datasetName: string, metadata: Record<string, unknown>, projectKey?: string): Promise<Record<string, unknown>>;
176
+ /**
177
+ * Create or update the Hive table of an HDFS dataset so it matches the
178
+ * dataset schema (POST /actions/synchronizeHiveMetastore).
179
+ */
180
+ synchronizeHiveMetastore(datasetName: string, projectKey?: string): Promise<void>;
181
+ /**
182
+ * Update an HDFS dataset (path, schema, partitioning, format) from its
183
+ * Hive table (POST /actions/updateFromHive).
184
+ */
185
+ updateFromHive(datasetName: string, projectKey?: string): Promise<void>;
176
186
  /**
177
187
  * Create a managed dataset through the dedicated
178
188
  * `POST /projects/{projectKey}/datasets/managed` endpoint. DSS handles the
@@ -227,7 +237,7 @@ export declare class DatasetsResource extends BaseResource {
227
237
  limit?: number;
228
238
  /** Preserve exact cell bytes (no spreadsheet-safe formula neutralization), default false. */
229
239
  rawData?: boolean;
230
- }): Promise<{
240
+ } & DatasetDataSelection): Promise<{
231
241
  path: string;
232
242
  rows: number;
233
243
  truncated: boolean;