dataiku-sdk 0.10.0 → 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 (133) 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 +127 -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/bundles.js +2 -2
  111. package/dist/src/resources/continuous-activities.js +1 -0
  112. package/dist/src/resources/data-quality.js +5 -3
  113. package/dist/src/resources/datasets.d.ts +3 -0
  114. package/dist/src/resources/datasets.js +3 -0
  115. package/dist/src/resources/flow-zones.d.ts +2 -2
  116. package/dist/src/resources/flow-zones.js +4 -1
  117. package/dist/src/resources/meanings.d.ts +2 -0
  118. package/dist/src/resources/meanings.js +4 -0
  119. package/dist/src/resources/notebooks.d.ts +5 -7
  120. package/dist/src/resources/notebooks.js +10 -7
  121. package/dist/src/resources/projects.d.ts +1 -1
  122. package/dist/src/resources/projects.js +2 -2
  123. package/dist/src/resources/recipes.d.ts +3 -3
  124. package/dist/src/resources/recipes.js +50 -7
  125. package/dist/src/resources/scenarios.js +67 -26
  126. package/dist/src/resources/statistics.js +9 -0
  127. package/dist/src/schemas.d.ts +2 -2
  128. package/dist/src/schemas.js +1 -1
  129. package/dist/src/skill.js +2 -2
  130. package/dist/src/utils/sanitize.js +2 -1
  131. package/package.json +1 -1
  132. package/packages/types/dist/index.d.ts +15 -2
  133. package/packages/types/dist/index.js +9 -1
@@ -0,0 +1,38 @@
1
+ import { jsonInput, } from "../coerce.js";
2
+ import { requireArgs, } from "../usage.js";
3
+ export const continuousActivityCommands = {
4
+ list: {
5
+ handler: (c, _a, f) => c.continuousActivities.list(f["project-key"]),
6
+ usage: "dss continuous-activity list [--project-key KEY]",
7
+ description: "List continuous activities in a project.",
8
+ examples: ["dss continuous-activity list",],
9
+ },
10
+ status: {
11
+ handler: (c, a, f) => {
12
+ requireArgs(a, 1, "dss continuous-activity status <recipeId> [--project-key KEY]");
13
+ return c.continuousActivities.getStatus(a[0], f["project-key"]);
14
+ },
15
+ usage: "dss continuous-activity status <recipeId> [--project-key KEY]",
16
+ description: "Get a continuous recipe's desired and effective state.",
17
+ examples: ["dss continuous-activity status compute_stream",],
18
+ },
19
+ start: {
20
+ handler: (c, a, f) => {
21
+ requireArgs(a, 1, "dss continuous-activity start <recipeId> [--data JSON|--data-file PATH|--stdin] [--project-key KEY]");
22
+ return c.continuousActivities.start(a[0], jsonInput(f), f["project-key"]);
23
+ },
24
+ usage: "dss continuous-activity start <recipeId> [--data JSON|--data-file PATH|--stdin] [--project-key KEY]",
25
+ description: "Start a continuous recipe (optional loop restart params via JSON).",
26
+ examples: ["dss continuous-activity start compute_stream",],
27
+ },
28
+ stop: {
29
+ handler: async (c, a, f) => {
30
+ requireArgs(a, 1, "dss continuous-activity stop <recipeId> [--project-key KEY]");
31
+ await c.continuousActivities.stop(a[0], f["project-key"]);
32
+ return { stopped: a[0], };
33
+ },
34
+ usage: "dss continuous-activity stop <recipeId> [--project-key KEY]",
35
+ description: "Stop a continuous recipe.",
36
+ examples: ["dss continuous-activity stop compute_stream",],
37
+ },
38
+ };
@@ -0,0 +1,2 @@
1
+ import type { CommandMeta } from "../types.js";
2
+ export declare const dashboardCommands: Record<string, CommandMeta>;
@@ -0,0 +1,99 @@
1
+ import { deepMerge, } from "../../utils/deep-merge.js";
2
+ import { jsonInput, } from "../coerce.js";
3
+ import { readIfExists, skipResult, } from "../output.js";
4
+ import { requireArgs, UsageError, } from "../usage.js";
5
+ export const dashboardCommands = {
6
+ list: {
7
+ handler: (c, _a, f) => c.dashboards.list(f["project-key"]),
8
+ usage: "dss dashboard list [--project-key KEY]",
9
+ description: "List project dashboards.",
10
+ examples: ["dss dashboard list",],
11
+ },
12
+ get: {
13
+ handler: (c, a, f) => {
14
+ requireArgs(a, 1, "dss dashboard get <id>");
15
+ return c.dashboards.get(a[0], f["project-key"]);
16
+ },
17
+ usage: "dss dashboard get <id> [--project-key KEY]",
18
+ description: "Get dashboard definition.",
19
+ examples: ["dss dashboard get DASHBOARD_ID",],
20
+ },
21
+ create: {
22
+ handler: async (c, _a, f) => {
23
+ const name = f["name"];
24
+ if (!name)
25
+ throw new UsageError("--name is required. Usage: dss dashboard create --name NAME");
26
+ const settings = jsonInput(f);
27
+ const pk = f["project-key"];
28
+ if (f["if-not-exists"] === true || f["dry-run"] === true) {
29
+ const existing = (await c.dashboards.list(pk)).find((dashboard) => dashboard.name === name);
30
+ if (existing && f["if-not-exists"] === true && f["dry-run"] !== true) {
31
+ return skipResult("dashboard", existing.id, "exists", { current: existing, });
32
+ }
33
+ if (f["dry-run"] === true) {
34
+ return {
35
+ dryRun: true,
36
+ action: "create",
37
+ resource: "dashboard",
38
+ name,
39
+ payload: settings ?? { pages: [], },
40
+ ...(existing ? { current: existing, } : {}),
41
+ };
42
+ }
43
+ }
44
+ const created = await c.dashboards.create({
45
+ name,
46
+ settings,
47
+ projectKey: pk,
48
+ });
49
+ return { created: created.id, resource: "dashboard", ...created, };
50
+ },
51
+ usage: "dss dashboard create --name NAME [--data JSON|--data-file PATH|--stdin] [--if-not-exists] [--dry-run] [--project-key KEY]",
52
+ description: "Create a dashboard. Defaults to an empty pages array.",
53
+ examples: ["dss dashboard create --name 'Agent dashboard' --dry-run",],
54
+ },
55
+ update: {
56
+ handler: async (c, a, f) => {
57
+ requireArgs(a, 1, "dss dashboard update <id> [--name NAME|--data JSON]");
58
+ const name = f["name"];
59
+ const data = jsonInput(f);
60
+ if (!name && !data) {
61
+ throw new UsageError("--name, --data, --data-file, or --stdin is required.");
62
+ }
63
+ if (f["dry-run"] === true) {
64
+ const current = await c.dashboards.get(a[0], f["project-key"]);
65
+ const next = deepMerge(current, data ?? {});
66
+ if (name !== undefined)
67
+ next.name = name;
68
+ return { dryRun: true, action: "update", resource: "dashboard", id: a[0], current, next, };
69
+ }
70
+ return c.dashboards.update(a[0], {
71
+ name,
72
+ data,
73
+ projectKey: f["project-key"],
74
+ });
75
+ },
76
+ usage: "dss dashboard update <id> [--name NAME|--data JSON|--data-file PATH|--stdin] [--dry-run] [--project-key KEY]",
77
+ description: "Update dashboard settings via merge.",
78
+ examples: ["dss dashboard update DASHBOARD_ID --name 'New name' --dry-run",],
79
+ },
80
+ delete: {
81
+ handler: async (c, a, f) => {
82
+ requireArgs(a, 1, "dss dashboard delete <id>");
83
+ const pk = f["project-key"];
84
+ if (f["dry-run"] === true || f["if-exists"] === true) {
85
+ const current = await readIfExists(() => c.dashboards.get(a[0], pk));
86
+ if (!current)
87
+ return skipResult("dashboard", a[0], "missing");
88
+ if (f["dry-run"] === true) {
89
+ return { dryRun: true, action: "delete", resource: "dashboard", id: a[0], current, };
90
+ }
91
+ }
92
+ await c.dashboards.delete(a[0], pk);
93
+ return { deleted: a[0], resource: "dashboard", };
94
+ },
95
+ usage: "dss dashboard delete <id> [--if-exists] [--dry-run] [--project-key KEY]",
96
+ description: "Delete a dashboard.",
97
+ examples: ["dss dashboard delete DASHBOARD_ID --dry-run",],
98
+ },
99
+ };
@@ -0,0 +1,2 @@
1
+ import type { CommandMeta } from "../types.js";
2
+ export declare const dataQualityCommands: Record<string, CommandMeta>;
@@ -0,0 +1,235 @@
1
+ import { deepMerge, } from "../../utils/deep-merge.js";
2
+ import { num, parseBooleanOption, requiredJsonInput, } from "../coerce.js";
3
+ import { encodedProjectEndpoint, readIfExists, skipResult, } from "../output.js";
4
+ import { requireArgs, UsageError, } from "../usage.js";
5
+ export const dataQualityCommands = {
6
+ rules: {
7
+ handler: (c, a, f) => {
8
+ requireArgs(a, 1, "dss data-quality rules <dataset>");
9
+ return c.dataQuality.listRules(a[0], f["project-key"]);
10
+ },
11
+ usage: "dss data-quality rules <dataset> [--project-key KEY]",
12
+ description: "List data quality rules for a dataset.",
13
+ examples: ["dss data-quality rules orders",],
14
+ },
15
+ "get-rule": {
16
+ handler: (c, a, f) => {
17
+ requireArgs(a, 2, "dss data-quality get-rule <dataset> <rule-id>");
18
+ return c.dataQuality.getRule(a[0], a[1], f["project-key"]);
19
+ },
20
+ usage: "dss data-quality get-rule <dataset> <rule-id> [--project-key KEY]",
21
+ description: "Get one data quality rule by id.",
22
+ examples: ["dss data-quality get-rule orders RULE_ID",],
23
+ },
24
+ status: {
25
+ handler: (c, a, f) => {
26
+ requireArgs(a, 1, "dss data-quality status <dataset>");
27
+ return c.dataQuality.status(a[0], f["project-key"]);
28
+ },
29
+ usage: "dss data-quality status <dataset> [--project-key KEY]",
30
+ description: "Get the aggregate data quality status for a dataset.",
31
+ examples: ["dss data-quality status orders",],
32
+ },
33
+ "create-rule": {
34
+ handler: async (c, a, f) => {
35
+ requireArgs(a, 1, "dss data-quality create-rule <dataset> --data JSON");
36
+ const config = requiredJsonInput(f, "--data, --data-file, or --stdin is required.");
37
+ const pk = f["project-key"];
38
+ const identity = typeof config.id === "string"
39
+ ? config.id
40
+ : typeof config.displayName === "string"
41
+ ? config.displayName
42
+ : undefined;
43
+ if (f["if-not-exists"] === true || f["dry-run"] === true) {
44
+ const existing = identity
45
+ ? (await c.dataQuality.listRules(a[0], pk)).find((rule) => rule.id === identity || rule.displayName === identity)
46
+ : undefined;
47
+ if (existing && f["if-not-exists"] === true && f["dry-run"] !== true) {
48
+ return skipResult("data-quality", identity ?? existing.id, "exists", {
49
+ dataset: a[0],
50
+ current: existing,
51
+ });
52
+ }
53
+ if (f["if-not-exists"] === true && !identity && f["dry-run"] !== true) {
54
+ throw new UsageError("--if-not-exists requires rule id or displayName in the rule JSON.");
55
+ }
56
+ if (f["dry-run"] === true) {
57
+ return {
58
+ dryRun: true,
59
+ action: "create-rule",
60
+ resource: "data-quality",
61
+ dataset: a[0],
62
+ payload: config,
63
+ ...(existing ? { current: existing, } : {}),
64
+ };
65
+ }
66
+ }
67
+ const created = await c.dataQuality.createRule(a[0], {
68
+ config,
69
+ projectKey: pk,
70
+ });
71
+ return {
72
+ created: created.id ?? identity ?? "rule",
73
+ dataset: a[0],
74
+ resource: "data-quality",
75
+ ...created,
76
+ };
77
+ },
78
+ usage: "dss data-quality create-rule <dataset> (--data JSON|--data-file PATH|--stdin) [--if-not-exists] [--dry-run] [--project-key KEY]",
79
+ description: "Create a data quality rule from raw rule config.",
80
+ examples: [
81
+ 'dss data-quality create-rule orders --data \'{"type":"RecordCountInRangeRule","softMinimum":1,"softMinimumEnabled":true,"displayName":"Has rows"}\' --dry-run',
82
+ ],
83
+ },
84
+ "update-rule": {
85
+ handler: async (c, a, f) => {
86
+ requireArgs(a, 2, "dss data-quality update-rule <dataset> <rule-id> --data JSON");
87
+ const data = requiredJsonInput(f, "--data, --data-file, or --stdin is required.");
88
+ if (f["dry-run"] === true) {
89
+ const current = await c.dataQuality.getRule(a[0], a[1], f["project-key"]);
90
+ const next = deepMerge(current, data);
91
+ return {
92
+ dryRun: true,
93
+ action: "update-rule",
94
+ resource: "data-quality",
95
+ dataset: a[0],
96
+ ruleId: a[1],
97
+ current,
98
+ next,
99
+ };
100
+ }
101
+ return c.dataQuality.updateRule(a[0], a[1], {
102
+ data,
103
+ projectKey: f["project-key"],
104
+ });
105
+ },
106
+ usage: "dss data-quality update-rule <dataset> <rule-id> (--data JSON|--data-file PATH|--stdin) [--dry-run] [--project-key KEY]",
107
+ description: "Update a data quality rule via GET-before-PUT merge.",
108
+ examples: [
109
+ "dss data-quality update-rule orders RULE_ID --data '{\"enabled\":false}' --dry-run",
110
+ ],
111
+ },
112
+ "delete-rule": {
113
+ handler: async (c, a, f) => {
114
+ requireArgs(a, 2, "dss data-quality delete-rule <dataset> <rule-id>");
115
+ const pk = f["project-key"];
116
+ if (f["dry-run"] === true || f["if-exists"] === true) {
117
+ const current = await readIfExists(() => c.dataQuality.getRule(a[0], a[1], pk));
118
+ if (!current)
119
+ return skipResult("data-quality", a[1], "missing", { dataset: a[0], });
120
+ if (f["dry-run"] === true) {
121
+ return {
122
+ dryRun: true,
123
+ action: "delete-rule",
124
+ resource: "data-quality",
125
+ dataset: a[0],
126
+ ruleId: a[1],
127
+ current,
128
+ };
129
+ }
130
+ }
131
+ await c.dataQuality.deleteRule(a[0], a[1], pk);
132
+ return { deleted: a[1], dataset: a[0], resource: "data-quality", };
133
+ },
134
+ usage: "dss data-quality delete-rule <dataset> <rule-id> [--if-exists] [--dry-run] [--project-key KEY]",
135
+ description: "Delete a data quality rule.",
136
+ examples: ["dss data-quality delete-rule orders RULE_ID --dry-run",],
137
+ },
138
+ "status-by-partition": {
139
+ handler: (c, a, f) => {
140
+ requireArgs(a, 1, "dss data-quality status-by-partition <dataset>");
141
+ return c.dataQuality.statusByPartition(a[0], {
142
+ includeAllPartitions: f["include-all-partitions"] === true,
143
+ projectKey: f["project-key"],
144
+ });
145
+ },
146
+ usage: "dss data-quality status-by-partition <dataset> [--include-all-partitions] [--project-key KEY]",
147
+ description: "Get data quality status by dataset partition.",
148
+ examples: ["dss data-quality status-by-partition orders --include-all-partitions",],
149
+ },
150
+ "last-results": {
151
+ handler: (c, a, f) => {
152
+ requireArgs(a, 1, "dss data-quality last-results <dataset>");
153
+ return c.dataQuality.lastResults(a[0], {
154
+ partition: f["partition"],
155
+ ruleId: f["rule-id"],
156
+ projectKey: f["project-key"],
157
+ });
158
+ },
159
+ usage: "dss data-quality last-results <dataset> [--partition P] [--rule-id ID] [--project-key KEY]",
160
+ description: "Get latest data quality rule results for a dataset.",
161
+ examples: ["dss data-quality last-results orders",],
162
+ },
163
+ history: {
164
+ handler: (c, a, f) => {
165
+ requireArgs(a, 1, "dss data-quality history <dataset>");
166
+ return c.dataQuality.history(a[0], {
167
+ minTimestamp: num(f["min-timestamp"]),
168
+ maxTimestamp: num(f["max-timestamp"]),
169
+ resultsPerPage: num(f["results-per-page"]),
170
+ page: num(f["page"]),
171
+ ruleId: f["rule-id"],
172
+ projectKey: f["project-key"],
173
+ });
174
+ },
175
+ usage: "dss data-quality history <dataset> [--rule-id ID] [--min-timestamp MS] [--max-timestamp MS] [--results-per-page N] [--page N] [--project-key KEY]",
176
+ description: "Get data quality rule execution history.",
177
+ examples: ["dss data-quality history orders --results-per-page 100",],
178
+ },
179
+ "project-status": {
180
+ handler: (c, _a, f) => c.dataQuality.projectStatus({
181
+ onlyMonitored: parseBooleanOption(f["only-monitored"], "--only-monitored"),
182
+ projectKey: f["project-key"],
183
+ }),
184
+ usage: "dss data-quality project-status [--only-monitored true|false] [--project-key KEY]",
185
+ description: "Get project-level data quality status by dataset.",
186
+ examples: ["dss data-quality project-status --only-monitored false",],
187
+ },
188
+ "project-timeline": {
189
+ handler: (c, _a, f) => c.dataQuality.projectTimeline({
190
+ minTimestamp: num(f["min-timestamp"]),
191
+ maxTimestamp: num(f["max-timestamp"]),
192
+ projectKey: f["project-key"],
193
+ }),
194
+ usage: "dss data-quality project-timeline [--min-timestamp MS] [--max-timestamp MS] [--project-key KEY]",
195
+ description: "Get project-level data quality timeline aggregates.",
196
+ examples: ["dss data-quality project-timeline --min-timestamp 1714521600000",],
197
+ },
198
+ compute: {
199
+ handler: async (c, a, f) => {
200
+ requireArgs(a, 1, "dss data-quality compute <dataset>");
201
+ const pk = f["project-key"];
202
+ const options = {
203
+ partition: f["partition"],
204
+ pollIntervalMs: num(f["poll-interval"]),
205
+ ruleId: f["rule-id"],
206
+ projectKey: pk,
207
+ timeoutMs: num(f["timeout"]),
208
+ };
209
+ if (f["dry-run"] === true) {
210
+ const params = new URLSearchParams();
211
+ params.set("partition", options.partition?.trim() ? options.partition : "NP");
212
+ if (options.ruleId !== undefined)
213
+ params.set("ruleId", options.ruleId);
214
+ return {
215
+ dryRun: true,
216
+ action: "compute",
217
+ resource: "data-quality",
218
+ dataset: a[0],
219
+ ...options,
220
+ endpoint: encodedProjectEndpoint(c, pk, `/datasets/${encodeURIComponent(a[0])}/data-quality/actions/compute-rules?${params.toString()}`),
221
+ method: "POST",
222
+ };
223
+ }
224
+ if (f["wait"] === true)
225
+ return c.dataQuality.computeRulesAndWait(a[0], options);
226
+ return c.dataQuality.computeRules(a[0], options);
227
+ },
228
+ usage: "dss data-quality compute <dataset> [--partition P] [--rule-id ID] [--wait] [--timeout MS] [--poll-interval MS] [--dry-run] [--project-key KEY]",
229
+ description: "Start data quality rule computation, optionally waiting on the returned DSS future.",
230
+ examples: [
231
+ "dss data-quality compute orders --dry-run",
232
+ "dss data-quality compute orders --wait",
233
+ ],
234
+ },
235
+ };
@@ -0,0 +1,2 @@
1
+ import type { CommandMeta } from "../types.js";
2
+ export declare const datasetCommands: Record<string, CommandMeta>;