dataiku-sdk 3.2.0 → 3.4.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 (132) hide show
  1. package/README.md +151 -46
  2. package/dist/build-metadata.json +1 -1
  3. package/dist/packages/types/src/index.d.ts +102 -0
  4. package/dist/packages/types/src/index.js +76 -0
  5. package/dist/src/cli/commands/app.js +57 -15
  6. package/dist/src/cli/commands/bundle.js +1 -1
  7. package/dist/src/cli/commands/code-env.js +13 -7
  8. package/dist/src/cli/commands/code.js +1 -1
  9. package/dist/src/cli/commands/connection.d.ts +9 -0
  10. package/dist/src/cli/commands/connection.js +267 -1
  11. package/dist/src/cli/commands/data-collection.d.ts +2 -0
  12. package/dist/src/cli/commands/data-collection.js +164 -0
  13. package/dist/src/cli/commands/dataset.js +162 -33
  14. package/dist/src/cli/commands/future.js +2 -2
  15. package/dist/src/cli/commands/group.d.ts +2 -0
  16. package/dist/src/cli/commands/group.js +109 -0
  17. package/dist/src/cli/commands/index.js +151 -78
  18. package/dist/src/cli/commands/job.js +4 -2
  19. package/dist/src/cli/commands/knowledge-bank.d.ts +2 -0
  20. package/dist/src/cli/commands/knowledge-bank.js +80 -0
  21. package/dist/src/cli/commands/llm.d.ts +2 -0
  22. package/dist/src/cli/commands/llm.js +93 -0
  23. package/dist/src/cli/commands/macro.d.ts +2 -0
  24. package/dist/src/cli/commands/macro.js +221 -0
  25. package/dist/src/cli/commands/ml-task.js +18 -6
  26. package/dist/src/cli/commands/notebook.js +6 -2
  27. package/dist/src/cli/commands/plugin.d.ts +2 -0
  28. package/dist/src/cli/commands/plugin.js +799 -0
  29. package/dist/src/cli/commands/project-folder.d.ts +2 -0
  30. package/dist/src/cli/commands/project-folder.js +197 -0
  31. package/dist/src/cli/commands/project-git.js +15 -55
  32. package/dist/src/cli/commands/project.js +52 -6
  33. package/dist/src/cli/commands/recipe.js +36 -1
  34. package/dist/src/cli/commands/saved-model.d.ts +5 -0
  35. package/dist/src/cli/commands/saved-model.js +388 -1
  36. package/dist/src/cli/commands/scenario.js +139 -2
  37. package/dist/src/cli/commands/user.d.ts +8 -0
  38. package/dist/src/cli/commands/user.js +296 -0
  39. package/dist/src/cli/contract.d.ts +1 -2
  40. package/dist/src/cli/contract.js +1098 -297
  41. package/dist/src/cli/flags.js +30 -1
  42. package/dist/src/cli/helpers/app-successor.d.ts +19 -4
  43. package/dist/src/cli/helpers/app-successor.js +90 -30
  44. package/dist/src/cli/helpers/cleanup.js +3 -1
  45. package/dist/src/cli/helpers/flow-zone.js +1 -2
  46. package/dist/src/cli/output-schemas.d.ts +24 -0
  47. package/dist/src/cli/output-schemas.js +233 -0
  48. package/dist/src/cli/output.d.ts +1 -1
  49. package/dist/src/cli/output.js +23 -10
  50. package/dist/src/cli/usage.d.ts +1 -0
  51. package/dist/src/cli/usage.js +47 -1
  52. package/dist/src/cli.js +147 -41
  53. package/dist/src/client.d.ts +92 -5
  54. package/dist/src/client.js +202 -31
  55. package/dist/src/errors.d.ts +3 -0
  56. package/dist/src/errors.js +8 -4
  57. package/dist/src/generated/action-output-schemas.json +1735 -0
  58. package/dist/src/index.d.ts +16 -7
  59. package/dist/src/index.js +11 -2
  60. package/dist/src/resources/analyses.js +1 -8
  61. package/dist/src/resources/applications.d.ts +8 -6
  62. package/dist/src/resources/applications.js +21 -21
  63. package/dist/src/resources/base.d.ts +4 -0
  64. package/dist/src/resources/base.js +15 -0
  65. package/dist/src/resources/bundles.d.ts +9 -4
  66. package/dist/src/resources/bundles.js +10 -5
  67. package/dist/src/resources/connections.d.ts +78 -1
  68. package/dist/src/resources/connections.js +132 -1
  69. package/dist/src/resources/data-collections.d.ts +118 -0
  70. package/dist/src/resources/data-collections.js +49 -0
  71. package/dist/src/resources/datasets.d.ts +69 -0
  72. package/dist/src/resources/datasets.js +136 -5
  73. package/dist/src/resources/flow-zones.d.ts +6 -2
  74. package/dist/src/resources/flow-zones.js +6 -3
  75. package/dist/src/resources/futures.d.ts +6 -1
  76. package/dist/src/resources/futures.js +68 -22
  77. package/dist/src/resources/groups.d.ts +47 -0
  78. package/dist/src/resources/groups.js +56 -0
  79. package/dist/src/resources/jobs.d.ts +8 -13
  80. package/dist/src/resources/jobs.js +71 -34
  81. package/dist/src/resources/knowledge-banks.d.ts +58 -0
  82. package/dist/src/resources/knowledge-banks.js +61 -0
  83. package/dist/src/resources/llms.d.ts +92 -0
  84. package/dist/src/resources/llms.js +62 -0
  85. package/dist/src/resources/macros.d.ts +121 -0
  86. package/dist/src/resources/macros.js +231 -0
  87. package/dist/src/resources/ml-tasks.d.ts +37 -2
  88. package/dist/src/resources/ml-tasks.js +109 -20
  89. package/dist/src/resources/model-evaluation-stores.js +1 -8
  90. package/dist/src/resources/notebooks.d.ts +43 -7
  91. package/dist/src/resources/notebooks.js +53 -13
  92. package/dist/src/resources/plugins.d.ts +263 -0
  93. package/dist/src/resources/plugins.js +455 -0
  94. package/dist/src/resources/project-folders.d.ts +71 -0
  95. package/dist/src/resources/project-folders.js +57 -0
  96. package/dist/src/resources/project-git.d.ts +12 -12
  97. package/dist/src/resources/project-git.js +84 -82
  98. package/dist/src/resources/project-library.d.ts +0 -1
  99. package/dist/src/resources/project-library.js +1 -17
  100. package/dist/src/resources/projects.d.ts +23 -3
  101. package/dist/src/resources/projects.js +60 -34
  102. package/dist/src/resources/recipes.d.ts +15 -1
  103. package/dist/src/resources/recipes.js +73 -6
  104. package/dist/src/resources/saved-models.d.ts +134 -1
  105. package/dist/src/resources/saved-models.js +214 -6
  106. package/dist/src/resources/scenarios.d.ts +105 -0
  107. package/dist/src/resources/scenarios.js +232 -106
  108. package/dist/src/resources/sql.js +5 -1
  109. package/dist/src/resources/users.d.ts +129 -0
  110. package/dist/src/resources/users.js +128 -0
  111. package/dist/src/resources/webapps.d.ts +15 -2
  112. package/dist/src/resources/webapps.js +18 -4
  113. package/dist/src/schemas.d.ts +2 -2
  114. package/dist/src/schemas.js +1 -1
  115. package/dist/src/utils/deep-merge.d.ts +1 -1
  116. package/dist/src/utils/git-reference.d.ts +12 -0
  117. package/dist/src/utils/git-reference.js +38 -0
  118. package/dist/src/utils/polling.d.ts +20 -0
  119. package/dist/src/utils/polling.js +27 -0
  120. package/dist/src/utils/response-file.js +1 -1
  121. package/dist/src/utils/secret-sanitize.d.ts +54 -0
  122. package/dist/src/utils/secret-sanitize.js +101 -0
  123. package/package.json +9 -8
  124. package/packages/types/dist/index.d.ts +102 -0
  125. package/packages/types/dist/index.js +76 -0
  126. package/plugin.json +1 -1
  127. package/skills/dataiku-dss/SKILL.md +11 -7
  128. package/skills/dataiku-dss/references/app-releases.md +8 -8
  129. package/skills/dataiku-dss/references/authentication.md +6 -6
  130. package/skills/dataiku-dss/references/discovery.md +4 -4
  131. package/skills/dataiku-dss/references/mutations.md +1 -1
  132. package/skills/dataiku-dss/references/troubleshooting.md +2 -2
@@ -48,10 +48,23 @@ export declare class WebappsResource extends BaseResource {
48
48
  /**
49
49
  * Start or restart a webapp backend. The documented endpoint returns a
50
50
  * reference to a future, which is surfaced as-is; settle it with
51
- * {@link restartBackendAndWait} or `client.futures.wait`.
51
+ * {@link restartBackendAndWait} or `client.futures.wait`. DSS 15 returns
52
+ * an empty body (no future) when no async job was spawned — the official
53
+ * Python client tolerates that (`DSSFuture.from_resp` accepts a missing
54
+ * jobId), so an empty response surfaces as `{}` rather than crashing.
52
55
  */
53
56
  startOrRestartBackend(webappId: string, projectKey?: string): Promise<Record<string, unknown>>;
54
- /** Restart a webapp backend and wait for the returned future to settle. */
57
+ /**
58
+ * Restart a webapp backend and wait for the returned future to settle.
59
+ * The documented endpoint returns a reference to a future; with a real
60
+ * jobId this polls that future to completion. An empty response carries
61
+ * NO future to wait on (observed on DSS 15 for a webapp whose backend is
62
+ * not enabled — a no-op restart, not a supported wait target), so the
63
+ * wait reports the missing future explicitly instead of fabricating a
64
+ * result for it. Enable the backend (params.backendEnabled with the
65
+ * params.python code, exactly as the DSS editor does) to get a real
66
+ * restart future.
67
+ */
55
68
  restartBackendAndWait(webappId: string, projectKey?: string, options?: WebappWaitOptions): Promise<FutureWaitResult>;
56
69
  /** Get a webapp backend's state. */
57
70
  getBackendState(webappId: string, projectKey?: string): Promise<Record<string, unknown>>;
@@ -59,18 +59,32 @@ export class WebappsResource extends BaseResource {
59
59
  /**
60
60
  * Start or restart a webapp backend. The documented endpoint returns a
61
61
  * reference to a future, which is surfaced as-is; settle it with
62
- * {@link restartBackendAndWait} or `client.futures.wait`.
62
+ * {@link restartBackendAndWait} or `client.futures.wait`. DSS 15 returns
63
+ * an empty body (no future) when no async job was spawned — the official
64
+ * Python client tolerates that (`DSSFuture.from_resp` accepts a missing
65
+ * jobId), so an empty response surfaces as `{}` rather than crashing.
63
66
  */
64
67
  async startOrRestartBackend(webappId, projectKey) {
65
68
  const id = encodeURIComponent(webappId);
66
- return this.client.put(`/public/api/projects/${this.enc(projectKey)}/webapps/${id}/backend/actions/restart`, {});
69
+ const future = await this.client.put(`/public/api/projects/${this.enc(projectKey)}/webapps/${id}/backend/actions/restart`, {});
70
+ return future ?? {};
67
71
  }
68
- /** Restart a webapp backend and wait for the returned future to settle. */
72
+ /**
73
+ * Restart a webapp backend and wait for the returned future to settle.
74
+ * The documented endpoint returns a reference to a future; with a real
75
+ * jobId this polls that future to completion. An empty response carries
76
+ * NO future to wait on (observed on DSS 15 for a webapp whose backend is
77
+ * not enabled — a no-op restart, not a supported wait target), so the
78
+ * wait reports the missing future explicitly instead of fabricating a
79
+ * result for it. Enable the backend (params.backendEnabled with the
80
+ * params.python code, exactly as the DSS editor does) to get a real
81
+ * restart future.
82
+ */
69
83
  async restartBackendAndWait(webappId, projectKey, options = {}) {
70
84
  const future = await this.startOrRestartBackend(webappId, projectKey);
71
85
  const jobId = future.jobId;
72
86
  if (typeof jobId !== "string" || jobId.length === 0) {
73
- throw new Error("Webapp backend restart did not return a future jobId.");
87
+ throw new ClientValidationError("Webapp backend restart returned no future jobId, so there is nothing to wait on.", "validation_failed", "The restart endpoint returns a future reference only when it starts an async job (a webapp with an enabled Python backend). Enable the backend before restarting with --wait.", { webappId, restartResponseKeys: Object.keys(future), });
74
88
  }
75
89
  return this.client.futures.wait(jobId, {
76
90
  pollIntervalMs: options.pollIntervalMs,
@@ -3,5 +3,5 @@
3
3
  * The types package (packages/types/) owns the TypeBox schema definitions.
4
4
  * SDK consumers get everything through this re-export.
5
5
  */
6
- export { BuildModeSchema, CodeEnvActionResultSchema, CodeEnvCreateOptionsSchema, CodeEnvDetailsSchema, CodeEnvGetLogOptionsSchema, CodeEnvLogResultSchema, CodeEnvLogSummaryArraySchema, CodeEnvLogSummarySchema, CodeEnvPackageListSchema, CodeEnvSetPackagesOptionsSchema, CodeEnvSummaryArraySchema, CodeEnvSummarySchema, CodeEnvUpdateImagesOptionsSchema, CodeEnvUpdatePackagesOptionsSchema, CodeEnvUsageArraySchema, CodeEnvVersionForProjectSchema, 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, SqlNotebookHistorySchema, SqlNotebookSummaryArraySchema, SqlNotebookSummarySchema, SqlQueryResponseSchema, SqlQueryResultSchema, SqlQuerySchemaSchema, WikiArticleDataArraySchema, WikiArticleDataSchema, WikiArticleMetadataSchema, WikiSettingsSchema, WikiTaxonomyNodeSchema, } from "../packages/types/src/index.js";
7
- export type { BuildMode, CodeEnvActionResult, CodeEnvCreateOptions, CodeEnvDetails, CodeEnvGetLogOptions, CodeEnvLogResult, CodeEnvLogSummary, CodeEnvPackageList, CodeEnvSetPackagesOptions, CodeEnvSummary, CodeEnvUpdateImagesOptions, CodeEnvUpdatePackagesOptions, CodeEnvUsage, CodeEnvVersionForProject, 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, SafeParseResult, ScenarioDetails, ScenarioStatus, ScenarioStepRun, ScenarioSummary, ScenarioWaitResult, SqlNotebookCell, SqlNotebookContent, SqlNotebookHistory, SqlNotebookSummary, SqlQueryResponse, SqlQueryResult, SqlQuerySchema, WikiArticleData, WikiArticleMetadata, WikiSettings, WikiTaxonomyNode, } from "../packages/types/src/index.js";
6
+ export { BuildModeSchema, CodeEnvActionResultSchema, CodeEnvCreateOptionsSchema, CodeEnvDetailsSchema, CodeEnvGetLogOptionsSchema, CodeEnvLogResultSchema, CodeEnvLogSummaryArraySchema, CodeEnvLogSummarySchema, CodeEnvPackageListSchema, CodeEnvSetPackagesOptionsSchema, CodeEnvSummaryArraySchema, CodeEnvSummarySchema, CodeEnvUpdateImagesOptionsSchema, CodeEnvUpdatePackagesOptionsSchema, CodeEnvUsageArraySchema, CodeEnvVersionForProjectSchema, 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, MacroDefinitionSchema, MacroRunStartSchema, MacroStateSchema, MacroSummaryArraySchema, MacroSummarySchema, MacroWaitResultSchema, NotebookSessionArraySchema, NotebookSessionSchema, parseSchema, ProjectDetailsSchema, ProjectGitActionResultSchema, ProjectGitDiffResultSchema, ProjectGitFutureResponseSchema, ProjectGitFutureStateSchema, ProjectGitLibrariesSchema, ProjectGitLibrarySchema, ProjectGitLogResultSchema, ProjectGitRemoteSchema, ProjectGitStatusSchema, ProjectGitTagSchema, ProjectGitTagsSchema, ProjectMetadataSchema, ProjectSummaryArraySchema, ProjectSummarySchema, ProjectTagsSchema, ProjectVariablesSchema, RecipeCreateOptionsSchema, RecipeCreateResultSchema, RecipeDetailsSchema, RecipeSummaryArraySchema, RecipeSummarySchema, safeParseSchema, ScenarioDetailsSchema, ScenarioStatusSchema, ScenarioStepRunSchema, ScenarioSummaryArraySchema, ScenarioSummarySchema, ScenarioWaitResultSchema, SqlNotebookCellSchema, SqlNotebookContentSchema, SqlNotebookHistorySchema, SqlNotebookSummaryArraySchema, SqlNotebookSummarySchema, SqlQueryResponseSchema, SqlQueryResultSchema, SqlQuerySchemaSchema, WikiArticleDataArraySchema, WikiArticleDataSchema, WikiArticleMetadataSchema, WikiSettingsSchema, WikiTaxonomyNodeSchema, } from "../packages/types/src/index.js";
7
+ export type { BuildMode, CodeEnvActionResult, CodeEnvCreateOptions, CodeEnvDetails, CodeEnvGetLogOptions, CodeEnvLogResult, CodeEnvLogSummary, CodeEnvPackageList, CodeEnvSetPackagesOptions, CodeEnvSummary, CodeEnvUpdateImagesOptions, CodeEnvUpdatePackagesOptions, CodeEnvUsage, CodeEnvVersionForProject, 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, MacroDefinition, MacroRunStart, MacroState, MacroSummary, MacroSummaryArray, MacroWaitResult, NotebookSession, ProjectDetails, ProjectGitActionResult, ProjectGitDiffResult, ProjectGitFutureResponse, ProjectGitFutureState, ProjectGitLibraries, ProjectGitLibrary, ProjectGitLogResult, ProjectGitRemote, ProjectGitStatus, ProjectGitTag, ProjectGitTags, ProjectMetadata, ProjectSummary, ProjectTags, ProjectVariables, RecipeCreateOptions, RecipeCreateResult, RecipeDetails, RecipeSummary, SafeParseResult, ScenarioDetails, ScenarioStatus, ScenarioStepRun, ScenarioSummary, ScenarioWaitResult, SqlNotebookCell, SqlNotebookContent, SqlNotebookHistory, SqlNotebookSummary, SqlQueryResponse, SqlQueryResult, SqlQuerySchema, WikiArticleData, WikiArticleMetadata, WikiSettings, WikiTaxonomyNode, } from "../packages/types/src/index.js";
@@ -3,4 +3,4 @@
3
3
  * The types package (packages/types/) owns the TypeBox schema definitions.
4
4
  * SDK consumers get everything through this re-export.
5
5
  */
6
- export { BuildModeSchema, CodeEnvActionResultSchema, CodeEnvCreateOptionsSchema, CodeEnvDetailsSchema, CodeEnvGetLogOptionsSchema, CodeEnvLogResultSchema, CodeEnvLogSummaryArraySchema, CodeEnvLogSummarySchema, CodeEnvPackageListSchema, CodeEnvSetPackagesOptionsSchema, CodeEnvSummaryArraySchema, CodeEnvSummarySchema, CodeEnvUpdateImagesOptionsSchema, CodeEnvUpdatePackagesOptionsSchema, CodeEnvUsageArraySchema, CodeEnvVersionForProjectSchema, 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, SqlNotebookHistorySchema, SqlNotebookSummaryArraySchema, SqlNotebookSummarySchema, SqlQueryResponseSchema, SqlQueryResultSchema, SqlQuerySchemaSchema, WikiArticleDataArraySchema, WikiArticleDataSchema, WikiArticleMetadataSchema, WikiSettingsSchema, WikiTaxonomyNodeSchema, } from "../packages/types/src/index.js";
6
+ export { BuildModeSchema, CodeEnvActionResultSchema, CodeEnvCreateOptionsSchema, CodeEnvDetailsSchema, CodeEnvGetLogOptionsSchema, CodeEnvLogResultSchema, CodeEnvLogSummaryArraySchema, CodeEnvLogSummarySchema, CodeEnvPackageListSchema, CodeEnvSetPackagesOptionsSchema, CodeEnvSummaryArraySchema, CodeEnvSummarySchema, CodeEnvUpdateImagesOptionsSchema, CodeEnvUpdatePackagesOptionsSchema, CodeEnvUsageArraySchema, CodeEnvVersionForProjectSchema, 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, MacroDefinitionSchema, MacroRunStartSchema, MacroStateSchema, MacroSummaryArraySchema, MacroSummarySchema, MacroWaitResultSchema, NotebookSessionArraySchema, NotebookSessionSchema, parseSchema, ProjectDetailsSchema, ProjectGitActionResultSchema, ProjectGitDiffResultSchema, ProjectGitFutureResponseSchema, ProjectGitFutureStateSchema, ProjectGitLibrariesSchema, ProjectGitLibrarySchema, ProjectGitLogResultSchema, ProjectGitRemoteSchema, ProjectGitStatusSchema, ProjectGitTagSchema, ProjectGitTagsSchema, ProjectMetadataSchema, ProjectSummaryArraySchema, ProjectSummarySchema, ProjectTagsSchema, ProjectVariablesSchema, RecipeCreateOptionsSchema, RecipeCreateResultSchema, RecipeDetailsSchema, RecipeSummaryArraySchema, RecipeSummarySchema, safeParseSchema, ScenarioDetailsSchema, ScenarioStatusSchema, ScenarioStepRunSchema, ScenarioSummaryArraySchema, ScenarioSummarySchema, ScenarioWaitResultSchema, SqlNotebookCellSchema, SqlNotebookContentSchema, SqlNotebookHistorySchema, SqlNotebookSummaryArraySchema, SqlNotebookSummarySchema, SqlQueryResponseSchema, SqlQueryResultSchema, SqlQuerySchemaSchema, WikiArticleDataArraySchema, WikiArticleDataSchema, WikiArticleMetadataSchema, WikiSettingsSchema, WikiTaxonomyNodeSchema, } from "../packages/types/src/index.js";
@@ -1 +1 @@
1
- export declare function deepMerge<T extends Record<string, unknown>>(base: T, patch: Record<string, unknown>): T;
1
+ export declare function deepMerge<T extends object>(base: T, patch: Record<string, unknown>): T & Record<string, unknown>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Validate and canonicalize a Git library reference path. This is the single
3
+ * validator used by both SDK dispatch and CLI mutation planning.
4
+ *
5
+ * Strip only the permitted outer '/' separators, then require nonempty
6
+ * ordinary segments: no empty segments and no '.' or '..' segments. A hostile
7
+ * path therefore cannot change which API resource a dispatcher's URL
8
+ * normalization would otherwise select.
9
+ */
10
+ export declare function validateGitReferencePath(path: string): string;
11
+ /** Validate a Git library reference path and URL-encode it per segment. */
12
+ export declare function encodeGitReferencePath(path: string): string;
@@ -0,0 +1,38 @@
1
+ import { ClientValidationError, } from "../errors.js";
2
+ function gitReferencePathError(path, message) {
3
+ return new ClientValidationError(message, "validation_failed", "Use a Git library reference path relative to the project library root: '/' -separated segment names, with no '.' or '..' segments.", { path, });
4
+ }
5
+ /**
6
+ * Validate and canonicalize a Git library reference path. This is the single
7
+ * validator used by both SDK dispatch and CLI mutation planning.
8
+ *
9
+ * Strip only the permitted outer '/' separators, then require nonempty
10
+ * ordinary segments: no empty segments and no '.' or '..' segments. A hostile
11
+ * path therefore cannot change which API resource a dispatcher's URL
12
+ * normalization would otherwise select.
13
+ */
14
+ export function validateGitReferencePath(path) {
15
+ if (typeof path !== "string" || path.trim() === "") {
16
+ throw gitReferencePathError(path, "A Git library reference path is required.");
17
+ }
18
+ const normalized = path.replace(/^\/+/, "").replace(/\/+$/, "");
19
+ if (normalized === "") {
20
+ throw gitReferencePathError(path, "A Git library reference path is required.");
21
+ }
22
+ for (const segment of normalized.split("/")) {
23
+ if (segment === "") {
24
+ throw gitReferencePathError(path, "A Git library reference path must not contain empty segments (consecutive or repeated '/').");
25
+ }
26
+ if (segment === "." || segment === "..") {
27
+ throw gitReferencePathError(path, "A Git library reference path must not contain '.' or '..' segments.");
28
+ }
29
+ }
30
+ return normalized;
31
+ }
32
+ /** Validate a Git library reference path and URL-encode it per segment. */
33
+ export function encodeGitReferencePath(path) {
34
+ return validateGitReferencePath(path)
35
+ .split("/")
36
+ .map((segment) => encodeURIComponent(segment))
37
+ .join("/");
38
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Shared polling helpers used by every long-running wait loop (jobs, futures,
3
+ * scenarios, macros, Visual ML training, Project Git futures).
4
+ */
5
+ /** Hard ceiling for one adaptive backoff step (ms). */
6
+ export declare const MAX_POLL_INTERVAL_MS = 10000;
7
+ interface ComputeNextPollDelayMsOptions {
8
+ pollCount: number;
9
+ baseIntervalMs: number;
10
+ adaptiveEnabled: boolean;
11
+ }
12
+ /**
13
+ * Compute the next poll delay.
14
+ * When adaptive polling is enabled, the interval doubles every 3 polls,
15
+ * capped at MAX_POLL_INTERVAL_MS (or baseIntervalMs if it's larger).
16
+ */
17
+ export declare function computeNextPollDelayMs({ pollCount, baseIntervalMs, adaptiveEnabled, }: ComputeNextPollDelayMsOptions): number;
18
+ /** Distinguish an exhausted wait deadline from an earlier request timeout. */
19
+ export declare function isRequestDeadlineError(error: unknown, deadlineAt: number): boolean;
20
+ export {};
@@ -0,0 +1,27 @@
1
+ import { DataikuError, } from "../errors.js";
2
+ /**
3
+ * Shared polling helpers used by every long-running wait loop (jobs, futures,
4
+ * scenarios, macros, Visual ML training, Project Git futures).
5
+ */
6
+ /** Hard ceiling for one adaptive backoff step (ms). */
7
+ export const MAX_POLL_INTERVAL_MS = 10_000;
8
+ /**
9
+ * Compute the next poll delay.
10
+ * When adaptive polling is enabled, the interval doubles every 3 polls,
11
+ * capped at MAX_POLL_INTERVAL_MS (or baseIntervalMs if it's larger).
12
+ */
13
+ export function computeNextPollDelayMs({ pollCount, baseIntervalMs, adaptiveEnabled, }) {
14
+ if (!adaptiveEnabled) {
15
+ return baseIntervalMs;
16
+ }
17
+ const step = Math.max(0, Math.floor((pollCount - 1) / 3));
18
+ const interval = baseIntervalMs * 2 ** step;
19
+ return Math.min(interval, Math.max(baseIntervalMs, MAX_POLL_INTERVAL_MS));
20
+ }
21
+ /** Distinguish an exhausted wait deadline from an earlier request timeout. */
22
+ export function isRequestDeadlineError(error, deadlineAt) {
23
+ return Date.now() >= deadlineAt
24
+ && error instanceof DataikuError
25
+ && error.status === 0
26
+ && (error.retry?.timedOut === true || error.statusText === "Request Timeout");
27
+ }
@@ -17,7 +17,7 @@ export async function writeResponseToFile(path, response, permissions = "private
17
17
  mode = 0o666 & ~process.umask();
18
18
  }
19
19
  }
20
- const input = Readable.fromWeb(response.body);
20
+ const input = Readable.from(response.body, { objectMode: false, });
21
21
  const temporaryPath = join(dirname(path), `.${basename(path)}.tmp-${randomUUID()}`);
22
22
  const output = createWriteStream(temporaryPath, { flags: "wx", mode: 0o600, });
23
23
  try {
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Shared recursive secret sanitizer for CLI output and error surfaces.
3
+ *
4
+ * Walks any JSON-like value and:
5
+ * - replaces values under sensitive keys (per-domain key table) with `[redacted]`;
6
+ * - replaces exact occurrences of known secret values anywhere in strings;
7
+ * - optionally redacts userinfo embedded in HTTP(S) URL authorities
8
+ * (`https://user:pass@host/...` -> `https://[redacted]@host/...`).
9
+ *
10
+ * The SDK resource layer forwards values verbatim to DSS over TLS; sanitization
11
+ * is a CLI presentation concern and must never leak secret material instead.
12
+ */
13
+ /** Marker replacing every redacted value or secret occurrence. */
14
+ export declare const SECRET_REDACTED = "[redacted]";
15
+ /** Sensitive keys are matched after stripping `-`/`_` and lowercasing. */
16
+ export declare function normalizeSecretKey(key: string): string;
17
+ export interface SecretSanitizeOptions {
18
+ /**
19
+ * Per-domain table of sensitive keys (normalized form -> true). Policies
20
+ * deliberately differ between domains; never merge them.
21
+ */
22
+ sensitiveKeys: Record<string, true>;
23
+ /**
24
+ * Optional extra predicate over normalized keys for key families a flat
25
+ * table cannot express (e.g. the user `secrets` array).
26
+ */
27
+ isSensitiveKey?: (normalizedKey: string) => boolean;
28
+ /** Exact secret values to replace everywhere in strings. */
29
+ secrets?: string[];
30
+ /** Also redact userinfo embedded in HTTP(S) URL authorities. */
31
+ redactUrlUserinfo?: boolean;
32
+ }
33
+ /**
34
+ * Replace every exact occurrence of each secret so echoed errors cannot leak
35
+ * it. Empty secrets are skipped (an empty needle would corrupt every string).
36
+ */
37
+ export declare function replaceSecrets(text: string, secrets: readonly string[]): string;
38
+ /**
39
+ * Redact the userinfo of every HTTP(S) URL in a string. DSS may contain legacy
40
+ * remotes with credentials in the URL, and Git error text can echo them.
41
+ */
42
+ export declare function redactUrlUserinfo(text: string): string;
43
+ /**
44
+ * Recursively sanitize `value`: strings lose exact secret occurrences (and
45
+ * URL userinfo when enabled), objects redact values under sensitive keys and
46
+ * recurse, arrays recurse. Non-string scalars pass through unchanged.
47
+ */
48
+ export declare function sanitizeSecrets<T>(value: T, options: SecretSanitizeOptions): T;
49
+ /**
50
+ * Scrub secret material from an error's message, stack, and string body.
51
+ * `DataikuError.message` is built at construction, so all three carriers need
52
+ * the same string pass as output values.
53
+ */
54
+ export declare function sanitizeErrorSecrets(error: unknown, options: SecretSanitizeOptions): unknown;
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Shared recursive secret sanitizer for CLI output and error surfaces.
3
+ *
4
+ * Walks any JSON-like value and:
5
+ * - replaces values under sensitive keys (per-domain key table) with `[redacted]`;
6
+ * - replaces exact occurrences of known secret values anywhere in strings;
7
+ * - optionally redacts userinfo embedded in HTTP(S) URL authorities
8
+ * (`https://user:pass@host/...` -> `https://[redacted]@host/...`).
9
+ *
10
+ * The SDK resource layer forwards values verbatim to DSS over TLS; sanitization
11
+ * is a CLI presentation concern and must never leak secret material instead.
12
+ */
13
+ /** Marker replacing every redacted value or secret occurrence. */
14
+ export const SECRET_REDACTED = "[redacted]";
15
+ /** Sensitive keys are matched after stripping `-`/`_` and lowercasing. */
16
+ export function normalizeSecretKey(key) {
17
+ return key.replace(/[-_]/g, "").toLowerCase();
18
+ }
19
+ /**
20
+ * Replace every exact occurrence of each secret so echoed errors cannot leak
21
+ * it. Empty secrets are skipped (an empty needle would corrupt every string).
22
+ */
23
+ export function replaceSecrets(text, secrets) {
24
+ let result = text;
25
+ for (const secret of secrets) {
26
+ if (secret !== "" && secret !== undefined && secret !== null) {
27
+ result = result.split(secret).join(SECRET_REDACTED);
28
+ }
29
+ }
30
+ return result;
31
+ }
32
+ /**
33
+ * Redact the userinfo of every HTTP(S) URL in a string. DSS may contain legacy
34
+ * remotes with credentials in the URL, and Git error text can echo them.
35
+ */
36
+ export function redactUrlUserinfo(text) {
37
+ return text.replace(/https?:[\\/]{1,2}[^\s"'<>]+/giu, (url) => {
38
+ const schemeEnd = url.indexOf(":") + 1;
39
+ let authorityStart = schemeEnd;
40
+ while (url[authorityStart] === "/" || url[authorityStart] === "\\")
41
+ authorityStart++;
42
+ const slash = url.slice(authorityStart).search(/[\\/]/u);
43
+ const authorityEnd = slash === -1 ? url.length : authorityStart + slash;
44
+ const at = url.lastIndexOf("@", authorityEnd - 1);
45
+ if (at < authorityStart)
46
+ return url;
47
+ return `${url.slice(0, authorityStart)}${SECRET_REDACTED}@${url.slice(at + 1)}`;
48
+ });
49
+ }
50
+ /**
51
+ * Recursively sanitize `value`: strings lose exact secret occurrences (and
52
+ * URL userinfo when enabled), objects redact values under sensitive keys and
53
+ * recurse, arrays recurse. Non-string scalars pass through unchanged.
54
+ */
55
+ export function sanitizeSecrets(value, options) {
56
+ const { secrets = [], } = options;
57
+ const stringPass = (text) => {
58
+ const sanitized = options.redactUrlUserinfo ? redactUrlUserinfo(text) : text;
59
+ return replaceSecrets(sanitized, secrets);
60
+ };
61
+ if (typeof value === "string") {
62
+ return stringPass(value);
63
+ }
64
+ if (Array.isArray(value)) {
65
+ return value.map((item) => sanitizeSecrets(item, options));
66
+ }
67
+ if (value !== null && typeof value === "object") {
68
+ const sanitized = {};
69
+ for (const [key, item,] of Object.entries(value)) {
70
+ const normalizedKey = normalizeSecretKey(key);
71
+ sanitized[key] = options.sensitiveKeys[normalizedKey] === true
72
+ || options.isSensitiveKey?.(normalizedKey) === true
73
+ ? SECRET_REDACTED
74
+ : sanitizeSecrets(item, options);
75
+ }
76
+ return sanitized;
77
+ }
78
+ return value;
79
+ }
80
+ /**
81
+ * Scrub secret material from an error's message, stack, and string body.
82
+ * `DataikuError.message` is built at construction, so all three carriers need
83
+ * the same string pass as output values.
84
+ */
85
+ export function sanitizeErrorSecrets(error, options) {
86
+ if (!(error instanceof Error))
87
+ return error;
88
+ const stringPass = (text) => {
89
+ const sanitized = options.redactUrlUserinfo ? redactUrlUserinfo(text) : text;
90
+ return replaceSecrets(sanitized, options.secrets ?? []);
91
+ };
92
+ error.message = stringPass(error.message);
93
+ if (typeof error.stack === "string") {
94
+ error.stack = stringPass(error.stack);
95
+ }
96
+ const errorWithBody = error;
97
+ if (typeof errorWithBody.body === "string") {
98
+ errorWithBody.body = stringPass(errorWithBody.body);
99
+ }
100
+ return error;
101
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dataiku-sdk",
3
- "version": "3.2.0",
3
+ "version": "3.4.0",
4
4
  "description": "Dataiku DSS SDK and CLI for programmatic access to DSS REST APIs",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -22,13 +22,13 @@
22
22
  "bun": ">=1.4.0"
23
23
  },
24
24
  "scripts": {
25
- "build": "tsc && bun scripts/generate-build-metadata.mjs && tsc -p packages/types/tsconfig.json",
26
- "prepack": "bun scripts/sync-plugin-version.mjs --check && tsc && bun scripts/generate-build-metadata.mjs && tsc -p packages/types/tsconfig.json",
27
- "prepublishOnly": "bun scripts/sync-plugin-version.mjs --check && tsc && bun scripts/generate-build-metadata.mjs && tsc -p packages/types/tsconfig.json",
28
- "check": "tsc --noEmit && bun run check:live && bun scripts/sync-plugin-version.mjs --check",
25
+ "build": "bun scripts/generate-action-output-schemas.mjs && tsc && bun scripts/generate-build-metadata.mjs && tsc -p packages/types/tsconfig.json",
26
+ "prepack": "bun scripts/sync-plugin-version.mjs --check && bun scripts/generate-action-output-schemas.mjs --check && tsc && bun scripts/generate-build-metadata.mjs && tsc -p packages/types/tsconfig.json",
27
+ "prepublishOnly": "bun scripts/sync-plugin-version.mjs --check && bun scripts/generate-action-output-schemas.mjs --check && tsc && bun scripts/generate-build-metadata.mjs && tsc -p packages/types/tsconfig.json",
28
+ "check": "tsc --noEmit && tsc -p tools/oxlint/tsconfig.json && bun run check:live && bun scripts/generate-action-output-schemas.mjs --check && bun scripts/sync-plugin-version.mjs --check",
29
29
  "version": "bun scripts/sync-plugin-version.mjs && git add plugin.json",
30
- "lint": "oxlint src/ scripts/live-suite.ts tests/live-*.ts",
31
- "lint:fix": "oxlint --fix src/ scripts/live-suite.ts tests/live-*.ts",
30
+ "lint": "oxlint src/ tools/oxlint/ scripts/live-suite.ts tests/live-*.ts",
31
+ "lint:fix": "oxlint --fix src/ tools/oxlint/ scripts/live-suite.ts tests/live-*.ts",
32
32
  "format": "dprint fmt",
33
33
  "format:check": "dprint check",
34
34
  "test": "bun test",
@@ -42,11 +42,12 @@
42
42
  "test:integration:rigorous:mutating": "cross-env RUN_DATAIKU_INTEGRATION=1 RUN_DATAIKU_INTEGRATION_MUTATING=1 bun test tests/integration-rigorous.test.ts"
43
43
  },
44
44
  "devDependencies": {
45
+ "@oxlint/plugins": "1.81.0",
45
46
  "@types/bun": "^1.4.0",
46
47
  "cross-env": "^10.1.0",
47
48
  "dprint": "^0.57.0",
48
49
  "js-tiktoken": "1.0.21",
49
- "oxlint": "^1.81.0",
50
+ "oxlint": "1.81.0",
50
51
  "typescript": "^7.0.2",
51
52
  "typescript-language-server": "6.0.0",
52
53
  "typescript-language-service": "npm:typescript@5.9.3"
@@ -59,6 +59,12 @@ export declare const ProjectMetadataSchema: import("@sinclair/typebox").TObject<
59
59
  }>>;
60
60
  }>;
61
61
  export type ProjectMetadata = Static<typeof ProjectMetadataSchema>;
62
+ export declare const ProjectTagsSchema: import("@sinclair/typebox").TObject<{
63
+ tags: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
64
+ color: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
65
+ }>>;
66
+ }>;
67
+ export type ProjectTags = Static<typeof ProjectTagsSchema>;
62
68
  export declare const DatasetSummarySchema: import("@sinclair/typebox").TObject<{
63
69
  name: import("@sinclair/typebox").TString;
64
70
  type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -308,6 +314,85 @@ export declare const ScenarioWaitResultSchema: import("@sinclair/typebox").TObje
308
314
  }>>>;
309
315
  }>;
310
316
  export type ScenarioWaitResult = Static<typeof ScenarioWaitResultSchema>;
317
+ /** A macro definition as returned by GET /projects/{pk}/runnables/{runnableType}. */
318
+ export declare const MacroDefinitionSchema: import("@sinclair/typebox").TObject<{
319
+ runnableType: import("@sinclair/typebox").TString;
320
+ ownerPluginId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
321
+ meta: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
322
+ label: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
323
+ }>>;
324
+ longDescription: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
325
+ resultType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
326
+ extension: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
327
+ mimeType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
328
+ resultLabel: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
329
+ params: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
330
+ name: import("@sinclair/typebox").TString;
331
+ type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
332
+ }>>>;
333
+ adminParams: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>>;
334
+ }>;
335
+ export type MacroDefinition = Static<typeof MacroDefinitionSchema>;
336
+ /** One entry of GET /projects/{pk}/runnables (array[Macro]). */
337
+ export declare const MacroSummarySchema: import("@sinclair/typebox").TObject<{
338
+ runnableType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
339
+ /** Owning plugin id as the server returns it (live identifiers are server-authored). */
340
+ ownerPluginId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
341
+ meta: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
342
+ label: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
343
+ }>>;
344
+ }>;
345
+ export type MacroSummary = Static<typeof MacroSummarySchema>;
346
+ export declare const MacroSummaryArraySchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
347
+ runnableType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
348
+ /** Owning plugin id as the server returns it (live identifiers are server-authored). */
349
+ ownerPluginId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
350
+ meta: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
351
+ label: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
352
+ }>>;
353
+ }>>;
354
+ export type MacroSummaryArray = Static<typeof MacroSummaryArraySchema>;
355
+ /**
356
+ * Poll-state response of GET /projects/{pk}/runnables/{runnableType}/state/{run}.
357
+ * While running: `running: true` and optionally a stack of `progress` entries.
358
+ * When finished: `running: false`; on failure `resultError`/`storedError` carry
359
+ * details, otherwise `type` is filled.
360
+ */
361
+ export declare const MacroStateSchema: import("@sinclair/typebox").TObject<{
362
+ exists: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
363
+ running: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
364
+ empty: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
365
+ type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
366
+ progress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
367
+ resultError: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
368
+ storedError: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
369
+ }>;
370
+ export type MacroState = Static<typeof MacroStateSchema>;
371
+ /** Run trigger response of POST /projects/{pk}/runnables/{runnableType}. */
372
+ export declare const MacroRunStartSchema: import("@sinclair/typebox").TObject<{
373
+ runId: import("@sinclair/typebox").TString;
374
+ }>;
375
+ export type MacroRunStart = Static<typeof MacroRunStartSchema>;
376
+ /** Result of {@link MacrosResource.runAndWait}: bounded client-side polling. */
377
+ export declare const MacroWaitResultSchema: import("@sinclair/typebox").TObject<{
378
+ runnableType: import("@sinclair/typebox").TString;
379
+ runId: import("@sinclair/typebox").TString;
380
+ running: import("@sinclair/typebox").TBoolean;
381
+ success: import("@sinclair/typebox").TBoolean;
382
+ elapsedMs: import("@sinclair/typebox").TNumber;
383
+ pollCount: import("@sinclair/typebox").TNumber;
384
+ timedOut: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
385
+ state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
386
+ exists: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
387
+ running: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
388
+ empty: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
389
+ type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
390
+ progress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
391
+ resultError: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
392
+ storedError: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
393
+ }>>;
394
+ }>;
395
+ export type MacroWaitResult = Static<typeof MacroWaitResultSchema>;
311
396
  export declare const FlowZoneObjectTypeSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"DATASET">, import("@sinclair/typebox").TLiteral<"MANAGED_FOLDER">, import("@sinclair/typebox").TLiteral<"SAVED_MODEL">, import("@sinclair/typebox").TLiteral<"RECIPE">, import("@sinclair/typebox").TLiteral<"MODEL_EVALUATION_STORE">, import("@sinclair/typebox").TLiteral<"STREAMING_ENDPOINT">, import("@sinclair/typebox").TLiteral<"LABELING_TASK">, import("@sinclair/typebox").TLiteral<"RETRIEVABLE_KNOWLEDGE">]>;
312
397
  export type FlowZoneObjectType = Static<typeof FlowZoneObjectTypeSchema>;
313
398
  export declare const FlowZoneItemSchema: import("@sinclair/typebox").TObject<{
@@ -658,6 +743,11 @@ export declare const SqlNotebookCellSchema: import("@sinclair/typebox").TObject<
658
743
  id: import("@sinclair/typebox").TString;
659
744
  type: import("@sinclair/typebox").TString;
660
745
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
746
+ /**
747
+ * Cell source. DSS enforces a JSON string here: an array fails to parse
748
+ * server-side (`Expected a string but was BEGIN_ARRAY ... $.cells[0].code`),
749
+ * so the official-client example's line-array form does not apply to SQL.
750
+ */
661
751
  code: import("@sinclair/typebox").TString;
662
752
  }>;
663
753
  export type SqlNotebookCell = Static<typeof SqlNotebookCellSchema>;
@@ -668,12 +758,24 @@ export declare const SqlNotebookSummarySchema: import("@sinclair/typebox").TObje
668
758
  connection: import("@sinclair/typebox").TString;
669
759
  }>;
670
760
  export type SqlNotebookSummary = Static<typeof SqlNotebookSummarySchema>;
761
+ /**
762
+ * A SQL notebook's content as returned by GET. The notebook record carries
763
+ * the server-allocated `id` (a request-supplied `id` is rejected on create)
764
+ * plus `name`/`projectKey`/`isRunning` and similar receipt fields via
765
+ * `additionalProperties`; requests supply `connection` + `cells` (and
766
+ * optionally `name` as the display handle).
767
+ */
671
768
  export declare const SqlNotebookContentSchema: import("@sinclair/typebox").TObject<{
672
769
  connection: import("@sinclair/typebox").TString;
673
770
  cells: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
674
771
  id: import("@sinclair/typebox").TString;
675
772
  type: import("@sinclair/typebox").TString;
676
773
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
774
+ /**
775
+ * Cell source. DSS enforces a JSON string here: an array fails to parse
776
+ * server-side (`Expected a string but was BEGIN_ARRAY ... $.cells[0].code`),
777
+ * so the official-client example's line-array form does not apply to SQL.
778
+ */
677
779
  code: import("@sinclair/typebox").TString;
678
780
  }>>;
679
781
  }>;