dataiku-sdk 0.10.1 → 0.11.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/dist/packages/types/src/index.d.ts +15 -2
  2. package/dist/packages/types/src/index.js +9 -1
  3. package/dist/src/cli/coerce.d.ts +36 -0
  4. package/dist/src/cli/coerce.js +239 -0
  5. package/dist/src/cli/commands/api-deployer.d.ts +2 -0
  6. package/dist/src/cli/commands/api-deployer.js +170 -0
  7. package/dist/src/cli/commands/api-service.d.ts +2 -0
  8. package/dist/src/cli/commands/api-service.js +102 -0
  9. package/dist/src/cli/commands/app.d.ts +2 -0
  10. package/dist/src/cli/commands/app.js +78 -0
  11. package/dist/src/cli/commands/bundle.d.ts +2 -0
  12. package/dist/src/cli/commands/bundle.js +107 -0
  13. package/dist/src/cli/commands/business-app.d.ts +2 -0
  14. package/dist/src/cli/commands/business-app.js +76 -0
  15. package/dist/src/cli/commands/code-env.d.ts +2 -0
  16. package/dist/src/cli/commands/code-env.js +255 -0
  17. package/dist/src/cli/commands/code.d.ts +2 -0
  18. package/dist/src/cli/commands/code.js +63 -0
  19. package/dist/src/cli/commands/connection.d.ts +2 -0
  20. package/dist/src/cli/commands/connection.js +54 -0
  21. package/dist/src/cli/commands/continuous-activity.d.ts +2 -0
  22. package/dist/src/cli/commands/continuous-activity.js +38 -0
  23. package/dist/src/cli/commands/dashboard.d.ts +2 -0
  24. package/dist/src/cli/commands/dashboard.js +99 -0
  25. package/dist/src/cli/commands/data-quality.d.ts +2 -0
  26. package/dist/src/cli/commands/data-quality.js +235 -0
  27. package/dist/src/cli/commands/dataset.d.ts +2 -0
  28. package/dist/src/cli/commands/dataset.js +288 -0
  29. package/dist/src/cli/commands/discussion.d.ts +2 -0
  30. package/dist/src/cli/commands/discussion.js +47 -0
  31. package/dist/src/cli/commands/doctor.d.ts +2 -0
  32. package/dist/src/cli/commands/doctor.js +9 -0
  33. package/dist/src/cli/commands/flow-zone.d.ts +2 -0
  34. package/dist/src/cli/commands/flow-zone.js +282 -0
  35. package/dist/src/cli/commands/folder.d.ts +2 -0
  36. package/dist/src/cli/commands/folder.js +202 -0
  37. package/dist/src/cli/commands/future.d.ts +2 -0
  38. package/dist/src/cli/commands/future.js +57 -0
  39. package/dist/src/cli/commands/index.d.ts +2 -0
  40. package/dist/src/cli/commands/index.js +70 -0
  41. package/dist/src/cli/commands/insight.d.ts +2 -0
  42. package/dist/src/cli/commands/insight.js +156 -0
  43. package/dist/src/cli/commands/job.d.ts +2 -0
  44. package/dist/src/cli/commands/job.js +406 -0
  45. package/dist/src/cli/commands/meaning.d.ts +2 -0
  46. package/dist/src/cli/commands/meaning.js +115 -0
  47. package/dist/src/cli/commands/metrics.d.ts +2 -0
  48. package/dist/src/cli/commands/metrics.js +39 -0
  49. package/dist/src/cli/commands/notebook.d.ts +2 -0
  50. package/dist/src/cli/commands/notebook.js +242 -0
  51. package/dist/src/cli/commands/project-deployer.d.ts +2 -0
  52. package/dist/src/cli/commands/project-deployer.js +118 -0
  53. package/dist/src/cli/commands/project-library.d.ts +2 -0
  54. package/dist/src/cli/commands/project-library.js +197 -0
  55. package/dist/src/cli/commands/project.d.ts +2 -0
  56. package/dist/src/cli/commands/project.js +132 -0
  57. package/dist/src/cli/commands/recipe.d.ts +2 -0
  58. package/dist/src/cli/commands/recipe.js +632 -0
  59. package/dist/src/cli/commands/scenario.d.ts +2 -0
  60. package/dist/src/cli/commands/scenario.js +190 -0
  61. package/dist/src/cli/commands/sql.d.ts +2 -0
  62. package/dist/src/cli/commands/sql.js +109 -0
  63. package/dist/src/cli/commands/statistics.d.ts +2 -0
  64. package/dist/src/cli/commands/statistics.js +165 -0
  65. package/dist/src/cli/commands/streaming-endpoint.d.ts +2 -0
  66. package/dist/src/cli/commands/streaming-endpoint.js +50 -0
  67. package/dist/src/cli/commands/variable.d.ts +2 -0
  68. package/dist/src/cli/commands/variable.js +49 -0
  69. package/dist/src/cli/commands/webapp.d.ts +2 -0
  70. package/dist/src/cli/commands/webapp.js +67 -0
  71. package/dist/src/cli/commands/wiki.d.ts +2 -0
  72. package/dist/src/cli/commands/wiki.js +123 -0
  73. package/dist/src/cli/commands/workspace.d.ts +2 -0
  74. package/dist/src/cli/commands/workspace.js +68 -0
  75. package/dist/src/cli/contract.d.ts +104 -0
  76. package/dist/src/cli/contract.js +2031 -0
  77. package/dist/src/cli/doctor.d.ts +104 -0
  78. package/dist/src/cli/doctor.js +356 -0
  79. package/dist/src/cli/env.d.ts +2 -0
  80. package/dist/src/cli/env.js +37 -0
  81. package/dist/src/cli/flags.d.ts +16 -0
  82. package/dist/src/cli/flags.js +255 -0
  83. package/dist/src/cli/helpers/cleanup.d.ts +3 -0
  84. package/dist/src/cli/helpers/cleanup.js +158 -0
  85. package/dist/src/cli/helpers/dataset.d.ts +2 -0
  86. package/dist/src/cli/helpers/dataset.js +17 -0
  87. package/dist/src/cli/helpers/flow-zone.d.ts +69 -0
  88. package/dist/src/cli/helpers/flow-zone.js +420 -0
  89. package/dist/src/cli/helpers/recipe.d.ts +11 -0
  90. package/dist/src/cli/helpers/recipe.js +83 -0
  91. package/dist/src/cli/output.d.ts +38 -0
  92. package/dist/src/cli/output.js +159 -0
  93. package/dist/src/cli/runtime.d.ts +15 -0
  94. package/dist/src/cli/runtime.js +59 -0
  95. package/dist/src/cli/types.d.ts +25 -0
  96. package/dist/src/cli/types.js +1 -0
  97. package/dist/src/cli/usage.d.ts +16 -0
  98. package/dist/src/cli/usage.js +80 -0
  99. package/dist/src/cli/version.d.ts +14 -0
  100. package/dist/src/cli/version.js +63 -0
  101. package/dist/src/cli.js +671 -8254
  102. package/dist/src/client.d.ts +1 -1
  103. package/dist/src/client.js +14 -13
  104. package/dist/src/errors.d.ts +6 -0
  105. package/dist/src/errors.js +102 -4
  106. package/dist/src/index.d.ts +3 -3
  107. package/dist/src/index.js +2 -2
  108. package/dist/src/resources/applications.d.ts +1 -1
  109. package/dist/src/resources/applications.js +27 -1
  110. package/dist/src/resources/continuous-activities.js +1 -0
  111. package/dist/src/resources/data-quality.js +5 -3
  112. package/dist/src/resources/datasets.d.ts +3 -0
  113. package/dist/src/resources/datasets.js +3 -0
  114. package/dist/src/resources/flow-zones.d.ts +2 -2
  115. package/dist/src/resources/flow-zones.js +4 -1
  116. package/dist/src/resources/meanings.d.ts +2 -0
  117. package/dist/src/resources/meanings.js +4 -0
  118. package/dist/src/resources/notebooks.d.ts +5 -7
  119. package/dist/src/resources/notebooks.js +10 -7
  120. package/dist/src/resources/projects.d.ts +1 -1
  121. package/dist/src/resources/projects.js +2 -2
  122. package/dist/src/resources/recipes.d.ts +3 -3
  123. package/dist/src/resources/recipes.js +50 -7
  124. package/dist/src/resources/scenarios.js +67 -26
  125. package/dist/src/resources/statistics.js +9 -0
  126. package/dist/src/schemas.d.ts +2 -2
  127. package/dist/src/schemas.js +1 -1
  128. package/dist/src/skill.js +2 -2
  129. package/dist/src/utils/sanitize.js +2 -1
  130. package/package.json +1 -1
  131. package/packages/types/dist/index.d.ts +15 -2
  132. package/packages/types/dist/index.js +9 -1
@@ -0,0 +1,132 @@
1
+ import { deepMerge, } from "../../utils/deep-merge.js";
2
+ import { jsonInput, num, requiredJsonInput, } from "../coerce.js";
3
+ import { requireArgs, UsageError, } from "../usage.js";
4
+ export const projectCommands = {
5
+ list: {
6
+ handler: (c) => c.projects.list(),
7
+ usage: "dss project list",
8
+ description: "List all accessible projects.",
9
+ examples: ["dss project list",],
10
+ },
11
+ get: {
12
+ handler: (c, _a, f) => c.projects.get(f["project-key"]),
13
+ usage: "dss project get [--project-key KEY]",
14
+ description: "Get project settings and metadata.",
15
+ examples: ["dss project get", "dss project get --project-key MYPROJ",],
16
+ },
17
+ metadata: {
18
+ handler: (c, _a, f) => c.projects.metadata(f["project-key"]),
19
+ usage: "dss project metadata [--project-key KEY]",
20
+ description: "Get project-level metadata (tags, labels, custom fields).",
21
+ examples: ["dss project metadata", "dss project metadata --project-key MYPROJ",],
22
+ },
23
+ flow: {
24
+ handler: (c, _a, f) => c.projects.flow(f["project-key"]),
25
+ usage: "dss project flow [--project-key KEY]",
26
+ description: "Get the raw flow graph (all datasets, recipes, and edges).",
27
+ examples: ["dss project flow", "dss project flow --project-key MYPROJ",],
28
+ },
29
+ map: {
30
+ handler: (c, _a, f) => c.projects.map({
31
+ maxNodes: num(f["max-nodes"]),
32
+ maxEdges: num(f["max-edges"]),
33
+ includeRaw: f["include-raw"] === true,
34
+ }),
35
+ usage: "dss project map [--max-nodes N] [--max-edges N] [--include-raw]",
36
+ description: "Get a summarized, truncated flow map.",
37
+ examples: [
38
+ "dss project map",
39
+ "dss project map --max-nodes 50 --max-edges 100",
40
+ "dss project map --include-raw",
41
+ ],
42
+ },
43
+ create: {
44
+ handler: (c, a, f) => {
45
+ const usage = "dss project create <projectKey> <name> --owner LOGIN [--data JSON|--data-file PATH|--stdin]";
46
+ requireArgs(a, 2, usage);
47
+ const owner = f["owner"];
48
+ if (!owner)
49
+ throw new UsageError(`--owner is required. Usage: ${usage}`);
50
+ return c.projects.createProject(a[0], a[1], owner, jsonInput(f));
51
+ },
52
+ usage: "dss project create <projectKey> <name> --owner LOGIN [--data JSON|--data-file PATH|--stdin]",
53
+ description: "Create a new project with owner login and optional settings.",
54
+ examples: ["dss project create MY_PROJ MyProject --owner alice",],
55
+ },
56
+ delete: {
57
+ handler: async (c, a, f) => {
58
+ requireArgs(a, 1, "dss project delete <projectKey> [--drop-data]");
59
+ await c.projects.deleteProject(a[0], f["drop-data"] === true);
60
+ return { deleted: a[0], };
61
+ },
62
+ usage: "dss project delete <projectKey> [--drop-data]",
63
+ description: "Delete a project (destructive). --drop-data also clears managed datasets.",
64
+ examples: ["dss project delete MY_PROJ",],
65
+ },
66
+ duplicate: {
67
+ handler: (c, a, f) => {
68
+ requireArgs(a, 3, "dss project duplicate <sourceKey> <targetKey> <targetName> [--data JSON|--data-file PATH|--stdin]");
69
+ return c.projects.duplicate(a[0], a[1], a[2], jsonInput(f));
70
+ },
71
+ usage: "dss project duplicate <sourceKey> <targetKey> <targetName> [--data JSON|--data-file PATH|--stdin]",
72
+ description: "Duplicate a project into a new project key.",
73
+ examples: ["dss project duplicate SRC NEW NewProject",],
74
+ },
75
+ export: {
76
+ handler: async (c, a, f) => {
77
+ requireArgs(a, 1, "dss project export <projectKey> --output PATH [--data JSON|--data-file PATH|--stdin]");
78
+ const out = f["output"];
79
+ if (!out)
80
+ throw new UsageError("--output PATH is required.", "missing_required_flag");
81
+ await c.projects.exportArchive(a[0], out, jsonInput(f));
82
+ return { path: out, };
83
+ },
84
+ usage: "dss project export <projectKey> --output PATH [--data JSON|--data-file PATH|--stdin]",
85
+ description: "Export a project to a local archive (.zip).",
86
+ examples: ["dss project export MY_PROJ --output ./my_proj.zip",],
87
+ },
88
+ import: {
89
+ handler: async (c, a) => {
90
+ requireArgs(a, 1, "dss project import <filePath>");
91
+ return c.projects.importProjectFromArchive(a[0]);
92
+ },
93
+ usage: "dss project import <filePath>",
94
+ description: "Upload a project archive to prepare an import (returns a temporary import id).",
95
+ examples: ["dss project import ./my_proj.zip",],
96
+ },
97
+ "permissions-get": {
98
+ handler: (c, _a, f) => c.projects.getPermissions(f["project-key"]),
99
+ usage: "dss project permissions-get [--project-key KEY]",
100
+ description: "Get a project's permissions.",
101
+ examples: ["dss project permissions-get --project-key MY_PROJ",],
102
+ },
103
+ "permissions-set": {
104
+ handler: async (c, _a, f) => {
105
+ const body = requiredJsonInput(f, "--data, --data-file, or --stdin is required (permissions object).");
106
+ await c.projects.setPermissions(f["project-key"], body);
107
+ return { updated: true, };
108
+ },
109
+ usage: "dss project permissions-set (--data JSON|--data-file PATH|--stdin) [--project-key KEY]",
110
+ description: "Replace a project's permissions.",
111
+ examples: ["dss project permissions-set --data-file perms.json --project-key MY_PROJ",],
112
+ },
113
+ "settings-get": {
114
+ handler: (c, _a, f) => c.projects.getSettings(f["project-key"]),
115
+ usage: "dss project settings-get [--project-key KEY]",
116
+ description: "Get a project's settings.",
117
+ examples: ["dss project settings-get --project-key MY_PROJ",],
118
+ },
119
+ "settings-set": {
120
+ handler: async (c, _a, f) => {
121
+ const body = requiredJsonInput(f, "--data, --data-file, or --stdin is required (settings object).");
122
+ const projectKey = f["project-key"];
123
+ const current = await c.projects.getSettings(projectKey);
124
+ const next = deepMerge(current, body);
125
+ await c.projects.setSettings(projectKey, next);
126
+ return { updated: true, };
127
+ },
128
+ usage: "dss project settings-set (--data JSON|--data-file PATH|--stdin) [--project-key KEY]",
129
+ description: "Update a project's settings via JSON merge.",
130
+ examples: ["dss project settings-set --data-file settings.json --project-key MY_PROJ",],
131
+ },
132
+ };
@@ -0,0 +1,2 @@
1
+ import type { CommandMeta } from "../types.js";
2
+ export declare const recipeCommands: Record<string, CommandMeta>;