Repository navigation
feat: 1.1.0 — metric data, dashboards, metric descriptions and merged datasets - #10
Merged
Merged
Conversation
… datasets Follows the Databox API 2.1: - metric data: read a metric's values over a date range, with dimensions and filters; syncInfo reports status, lastSyncedAt and message. - dashboard list / metrics / rename on /v2/dashboards. databoard list and databoard metrics use the new routes and are deprecated. - metric update --description sets a description; an empty value clears it. metric get shows it. - dataset list --type dataset|mergedDataset, with a Type column. - A 409 while a dataset modification is applied says when to retry. - Types follow the API contracts: dataset type, metric description, logicalOperators; hourly granularity is gone. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…itespace, and auth login checks a stored URL Follow-up to the --api-url validation: - Error messages describe what is wrong (no scheme, a scheme other than http/https, a username or password, a query string or fragment) and never repeat the value, so a key pasted as the URL stays out of logs. - Surrounding whitespace is ignored: every request is built from one normalised base URL, and auth login saves that normalised URL. - auth login without --api-url fails on an invalid stored URL before reading the key, with the same message as other commands. - A stored null apiUrl falls back to the default URL; a non-string exits 1. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLI 1.1.0 follows the Databox API 2.1. Every type and request body was checked field by field against the API's contracts.
metric data(new): reads a metric's values over a date range, with--granularity(nohourly), dimensions and filters.--jsonreturns the API's response unchanged.syncInfois{status, lastSyncedAt, message}with the API's statuses:synced,skipped,inProgress,neverSynced,failed. The timeout is 170 s, longer than the API's 150 s sync wait.dashboardtopic (new):dashboard list(refuses a blank--search),dashboard metrics <id>anddashboard rename <id> --name.renamesends exactly{name}; name rules are left to the API.databoard list/databoard metricsstay, on the new routes, and are deprecated: oclif prints a warning on stderr that points todashboard …, and--jsonstdout stays clean.metric update --descriptionsets a metric's description, and--description ""clears it.metric getshows a Description line.metric creategets no flag, because the API's create doesn't accept a description.dataset list --type dataset|mergedDataset, plus a Type column. CombiningmergedDatasetwith--data-source-idis left to the API to refuse.Retry-After. There is no automatic retry.DatasetListItem.type;MetricListItem.description;MetricDetail.logicalOperators(no longer optional);DataboardListItem.skills/databox-metricsandskills/databox-datasets.The CLI makes no v1 calls, so the API's v1 admin-only change doesn't affect it. Its new error shapes and permission 403s are shown the way they come.
Also in 1.1.0:
--api-urlvalidation (#9 plus the follow-up fixes)main, brought in here):--api-url,DATABOX_API_URLand a storedapiUrlmust be an http(s) URL. A bad flag or env value exits 2 before any prompt or request, a bad stored value exits 1, andauth loginrefuses a bad--api-urlbefore reading the key.auth loginsaves that.auth loginwithout--api-urlrefuses a bad stored URL before reading the key.nullfalls back to the default.Verified
npm test: 672 passing.lastBodyfordashboard rename,metric update --description(including"") andmetric data;--type,--granularity,--searchand the IDs.withRestore(), and the name is restored.""on a metric the suite created.--type mergedDataset: the API refuses it when combined with--data-source-id.id.npm pack --dry-run: 1.1.0, with thedashboardcommands included.Noticed, not changed
.claude/rules/commands.mdande2e-testing.md, claim@oclif/test'srunCommandrefuses an empty flag value. It doesn't;update.test.tsnow passes"".--searchsilently; onlydashboard listrefuses it, ascommands.mdrequires.🤖 Generated with Claude Code