@datarails-ai/dr-cli 1.6.123 → 1.6.124
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.
package/dist/scopes-map.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"cliVersion": "1.6.
|
|
3
|
+
"cliVersion": "1.6.124",
|
|
4
4
|
"_contract": "Resolve a command path through `aliases` (canonical prefix + alias segment -> canonical path) before any lookup. A path listed in `pendingCommands`, or whose first segment is a key of `pending`, is UNDECIDED, not unrestricted: fail closed or skip it, and never read a path's absence from `commands` as 'no requirement'. An entry carrying `denied` is UNAVAILABLE to any AGENT-SCOPED credential — one whose `scopes` claim carries at least one `resource:action` entry; a claim that is absent, empty, capability-only or wholly unparseable is UNRESTRICTED, and this mark does not apply to it — whatever else that entry says: it is not a ceiling and it is not always-available, its `denied.reason` says why and `denied.until` names the ticket that lifts it, and the absence of `requires` on it must NEVER be read as 'no requirement'. Only an entry in `commands` with an empty `requires` means always-available.",
|
|
5
5
|
"commands": {
|
|
6
6
|
"login": {
|
|
@@ -2315,6 +2315,22 @@
|
|
|
2315
2315
|
}
|
|
2316
2316
|
]
|
|
2317
2317
|
},
|
|
2318
|
+
"filebox kind-explain": {
|
|
2319
|
+
"requires": [
|
|
2320
|
+
{
|
|
2321
|
+
"resource": "fileboxes",
|
|
2322
|
+
"action": "read"
|
|
2323
|
+
}
|
|
2324
|
+
]
|
|
2325
|
+
},
|
|
2326
|
+
"filebox kind-summary": {
|
|
2327
|
+
"requires": [
|
|
2328
|
+
{
|
|
2329
|
+
"resource": "fileboxes",
|
|
2330
|
+
"action": "read"
|
|
2331
|
+
}
|
|
2332
|
+
]
|
|
2333
|
+
},
|
|
2318
2334
|
"filebox rescan-version": {
|
|
2319
2335
|
"requires": [
|
|
2320
2336
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dr-cli
|
|
3
|
-
description: Use when customer success or engineering needs to inspect OR change a customer's Datarails setup from the command line, or create/update/delete Datarails resources (templates, dashboards, widgets, functions, calculated values, dynamic ranges, datamappers, LUTs, fileboxes, integrations, users). Triggers - "create a chart/KPI/pie/table on this dashboard", "bulk-create users", "defer the invite emails", "change a user's login email", "turn email notifications on/off for a user", "re-enable emails for everyone in this org", "create N viewers with specific data permissions", "bulk-grant table/dashboard/filebox permissions from a CSV", "create many permission groups from a CSV", "upload this file", "compare Datarails values", "
|
|
3
|
+
description: Use when customer success or engineering needs to inspect OR change a customer's Datarails setup from the command line, or create/update/delete Datarails resources (templates, dashboards, widgets, functions, calculated values, dynamic ranges, datamappers, LUTs, fileboxes, integrations, users). Triggers - "create a chart/KPI/pie/table on this dashboard", "bulk-create users", "defer the invite emails", "change a user's login email", "turn email notifications on/off for a user", "re-enable emails for everyone in this org", "create N viewers with specific data permissions", "bulk-grant table/dashboard/filebox permissions from a CSV", "create many permission groups from a CSV", "upload this file", "compare Datarails values", "why does filebox N have its type", "am I logged in", "who am I on this tenant", "is this the right customer?", "trigger a rescan", "look up a metric/KPI". Install/update/login → /dr-cli:install; a misbehaving CLI → /dr-cli:doctor; FX → /dr-cli:fx-conversion-matrix then /dr-cli:fx-onboard.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# dr-cli — Datarails CLI
|
|
@@ -296,6 +296,10 @@ area's gotchas.
|
|
|
296
296
|
Destinations must come from `organizations push-targets`.
|
|
297
297
|
- `filebox data-query get|set|set-sync-interval|clear|sync` (alias `dq`)
|
|
298
298
|
- `filebox validation-rules options|set`
|
|
299
|
+
- `filebox kind-explain <id…> [--history] [--as-of DATE] [--json]` / `filebox kind-summary [--json]` —
|
|
300
|
+
why a filebox has its type and whether it still matches its connections, and
|
|
301
|
+
how far an organization is typed. Read-only, **support seat of that
|
|
302
|
+
organization only** (`login-as` it, then `--account`).
|
|
299
303
|
- `documents support-api set`, `documents calculate|sheets|debug-zip`
|
|
300
304
|
- `documents auto-calculate|add-functions|add-extables|add-dynamic-ranges` —
|
|
301
305
|
push a raw `.xlsx` through the server with **no filebox**: `auto-calculate`
|
|
@@ -636,7 +640,11 @@ network traffic or hand-edits JSON. Full recipes in the relevant reference file.
|
|
|
636
640
|
an unvalidated escape hatch that forwards straight to the server; a
|
|
637
641
|
malformed value 500s with no error body. To know when it finished, add
|
|
638
642
|
`--wait` — never poll `status` or the version count: an unchanged result
|
|
639
|
-
writes no new version and still reads `SYNCED`.
|
|
643
|
+
writes no new version and still reads `SYNCED`. Never backfill
|
|
644
|
+
**balances** from an aggregator (Plaid, Quiltt, Salt Edge, Flinks): it
|
|
645
|
+
returns today's balance for every `--date`, so each period gets an
|
|
646
|
+
identical copy. Backfill transactions only; sync balances for the current
|
|
647
|
+
period and let the nightly schedule build the history. See
|
|
640
648
|
reference/filebox-documents.md.
|
|
641
649
|
- **"User has no table permissions" is almost always a misread.** To see which
|
|
642
650
|
tables a user can access, use `dr users permissions get <id>` — never the raw
|
|
@@ -658,7 +666,7 @@ Each also names the relevant Help Center (KB) folder for customer-facing docs.
|
|
|
658
666
|
- [reference/calc-vals.md](reference/calc-vals.md) — per-table Calculated Values (formula refs, field/format semantics)
|
|
659
667
|
- [reference/metrics.md](reference/metrics.md) — metrics, categories, dimensions, functions
|
|
660
668
|
- [reference/dashboards-widgets.md](reference/dashboards-widgets.md) — dashboards, widgets, storyboards, reports, extables
|
|
661
|
-
- [reference/filebox-documents.md](reference/filebox-documents.md) — fileboxes, documents
|
|
669
|
+
- [reference/filebox-documents.md](reference/filebox-documents.md) — fileboxes, documents, filebox type
|
|
662
670
|
- [reference/lookups.md](reference/lookups.md) — lookups (LUTs): filebox-sourced + table-sourced
|
|
663
671
|
- [reference/integrations.md](reference/integrations.md) — customer + IT-admin integrations, company data sources (entities)
|
|
664
672
|
- [reference/reconciliation-mec.md](reference/reconciliation-mec.md) — reconciliation, MEC close-dates
|
|
@@ -21,6 +21,97 @@ listed here before (or without) its rows landing in the mapped tables — track
|
|
|
21
21
|
that separately with `dr scans status <table_id>`. Change the flag with `filebox
|
|
22
22
|
set-version-include` (below).
|
|
23
23
|
|
|
24
|
+
### Why a filebox has its type (support seat only)
|
|
25
|
+
|
|
26
|
+
- `filebox kind-explain <id> [<id> …] [--history] [--as-of YYYY-MM-DD] [--json]`
|
|
27
|
+
— why each filebox has its stored type, and whether its connections still
|
|
28
|
+
say the same. Read-only; it answers before the organization's flag is on,
|
|
29
|
+
and says when the organization is outside the rollout.
|
|
30
|
+
- **Output fields.** `meaning` first, in plain words: who set the type,
|
|
31
|
+
whether its connections still say the same and, when they do not,
|
|
32
|
+
whether a hand-set type is meant to stay or who may retype it. A type is
|
|
33
|
+
hand-set when either slot was set by a user or support, and slots set by
|
|
34
|
+
different hands are named one by one. Then `stored` (each slot and who
|
|
35
|
+
set it: the migration; a flow, at creation or when a connection was
|
|
36
|
+
added later; a user; support; default; `source not recorded` when the
|
|
37
|
+
server has none), `rules` (what the migration's rules make of it today,
|
|
38
|
+
and whether the two agree), `rule`, `unsure`, `why`, `dropped`,
|
|
39
|
+
`why not`, `evidence` (mappers, tables, data source, drive, email / API
|
|
40
|
+
upload) and, with an integration connected or an upload on,
|
|
41
|
+
`integration`: whether it counts as Integration, a connected data query
|
|
42
|
+
or drive with whether it is quiet and the dates that decided, an upload
|
|
43
|
+
with no quiet rule and no dates.
|
|
44
|
+
- **Who may retype.** The support seat, for any move with Lookup or
|
|
45
|
+
Integration held before or after it (Lookup + Model → Lookup too),
|
|
46
|
+
except Report added or removed beside an Integration that stays, or a
|
|
47
|
+
new format there. The owner or the support seat, for that exception and
|
|
48
|
+
for moves among Manual input, Model and Report. The support seat may
|
|
49
|
+
make any move. The CLI has no retype command: a retype is made in the
|
|
50
|
+
filebox settings of the web app.
|
|
51
|
+
- **Upload rule.** Email or API upload on is an Integration signal, with
|
|
52
|
+
no quiet rule, whatever the content. The migration (and `rules`) puts
|
|
53
|
+
Integration in place of a Model: Model → Integration, Model + Report →
|
|
54
|
+
Integration + Report, Lookup + Model → Lookup + Integration. A Lookup
|
|
55
|
+
becomes Lookup + Integration, Report content gives Integration +
|
|
56
|
+
Report, anything else gives Integration. Turning an upload on later,
|
|
57
|
+
as the owner or the support seat, adds Integration to the stored type
|
|
58
|
+
the same way, except that it keeps a Model: Model, Model + Report and
|
|
59
|
+
Lookup + Model keep their type. So a Model whose upload was turned on
|
|
60
|
+
after it was typed stays Model while `rules` holds Integration. That
|
|
61
|
+
drift is expected, not an error, and the `meaning` says so: "Email
|
|
62
|
+
upload is on: the migration puts Integration in place of a Model, but
|
|
63
|
+
turning the upload on after it was typed keeps the Model, so the stored
|
|
64
|
+
type stays Model." A hand-set Model gets no such line: a type set by
|
|
65
|
+
hand stays anyway.
|
|
66
|
+
- **`--history`** adds the recorded type changes, newest first, each with
|
|
67
|
+
its reason in words: a retype in the filebox settings, a table attaching
|
|
68
|
+
it as a lookup, a LUT/FX label set or removed (by the old "Filebox type"
|
|
69
|
+
setting or the report builder), a data source (data query, SFTP) or
|
|
70
|
+
synced cloud-drive file connected to an empty filebox or to a Report, an
|
|
71
|
+
email / API upload turned on, or its first file setting a Report's
|
|
72
|
+
format. A reason the CLI does not know prints as sent. Empty is normal:
|
|
73
|
+
the migration and a creation record nothing, so a flow's slot with no
|
|
74
|
+
event was set at creation. It is empty too when the audit server could
|
|
75
|
+
not be read.
|
|
76
|
+
- **`--as-of`** moves only the quiet-integration answer. With a connected
|
|
77
|
+
integration a disagreement can come from time alone (quiet after 90
|
|
78
|
+
days with no file, sync attempt or schedule), so
|
|
79
|
+
`--as-of <backfill day>` judges it as the migration did. Not with an
|
|
80
|
+
upload on: an upload counts on any day, and the `meaning` then says
|
|
81
|
+
nothing about time.
|
|
82
|
+
- **Not found** lists the ids with no answer: another organization's
|
|
83
|
+
filebox, a folder, an id that does not exist. Another organization's
|
|
84
|
+
filebox needs that organization's support seat.
|
|
85
|
+
- `filebox kind-summary [--json]` — for the seat's organization: live and
|
|
86
|
+
archived fileboxes, typed and untyped, who set the types (`flow` is a flow
|
|
87
|
+
at creation or a connection added later, not only the creation;
|
|
88
|
+
`source not recorded` is the server's `(none)`), every stored combination, and
|
|
89
|
+
`uploads` (the server's `upload_channel_kinds`): the stored type of every
|
|
90
|
+
live filebox with email or API upload on. A Model there is expected, not
|
|
91
|
+
an error: its upload was turned on after it was typed (the upload rule
|
|
92
|
+
above), or it was set by hand. Its untyped ones are keyed
|
|
93
|
+
`untyped` in the readable output and `(untyped)` under `--json`.
|
|
94
|
+
- **Both answer only the support seat of the organization asked about** (405
|
|
95
|
+
otherwise, even for a support person sitting in a customer user's seat).
|
|
96
|
+
Find that seat with `dr users can-login-as --search <org> --server <S>`:
|
|
97
|
+
the row of that organization with `SUPPORT` `true` gives its email, and
|
|
98
|
+
its `ID` also works as `dr login-as <email> --user-id <ID>`. Then run
|
|
99
|
+
`dr login-as <support seat email> --server <S>`, and the command with
|
|
100
|
+
`--account <that email>`. A 403 means a blocked seat; a 404 means the
|
|
101
|
+
server does not have the endpoints yet (dr-datarails-server PR #8010).
|
|
102
|
+
- Over 200 ids (20 with `--history`) are sent as several requests; `--json`
|
|
103
|
+
then prints one merged body in the server's shape. A single request's
|
|
104
|
+
`--json` is the server's body unchanged. Either way `--json` keeps the HTML
|
|
105
|
+
entities the server sends (`P&L`): unlike `filebox list --json`, names
|
|
106
|
+
are not decoded.
|
|
107
|
+
- The answer names the organization's tables and connections, and
|
|
108
|
+
`--history` adds the email addresses of the people who changed a type,
|
|
109
|
+
login-as operators included. That is fine for the organization's own
|
|
110
|
+
support seat, the only caller allowed, but do not paste a full answer or a
|
|
111
|
+
`--json` file outside that organization's context: quote the lines you need.
|
|
112
|
+
- A request the server finds too heavy answers 503
|
|
113
|
+
`kind_explanation_too_heavy`: ask for fewer ids at a time.
|
|
114
|
+
|
|
24
115
|
## Filebox — create / upload
|
|
25
116
|
|
|
26
117
|
- `filebox create` — empty filebox + date tag. `--folder` makes a folder filebox
|
|
@@ -49,6 +140,13 @@ set-version-include` (below).
|
|
|
49
140
|
editable here** — the server returns 200 but silently drops them. Use
|
|
50
141
|
`set-tag-config` for tags; set scenario at create time via
|
|
51
142
|
`filebox create --scenario`.
|
|
143
|
+
- `use_type` can change the stored **filebox type** where the
|
|
144
|
+
organization's filebox-type flag is on (DR-53666): a LUT / FX label set by
|
|
145
|
+
the owner or the support seat adds Lookup, and moving a Lookup off its
|
|
146
|
+
LUT / FX label is a retype that can answer 405 `kind_change_support_only`
|
|
147
|
+
or 409 `kind_still_connected` (a table still reads it). Check the result
|
|
148
|
+
with `filebox kind-explain` (see "Why a filebox has its type" above). The
|
|
149
|
+
CLI has no retype command: a retype is made in the web app.
|
|
52
150
|
- `filebox set-tag-config <doc_id> --add NAME [--add …] [--remove NAME …]` —
|
|
53
151
|
merge semantics (adds/removes against the existing config, not full-replace);
|
|
54
152
|
tag names matched case-insensitively against the tenant tag pool.
|
|
@@ -289,6 +387,30 @@ set-version-include` (below).
|
|
|
289
387
|
constant — varies per tenant) and the epoch just needs to fall within the
|
|
290
388
|
target period (the server normalizes it). Prefer `--date`; reach for raw
|
|
291
389
|
`--tag` only when it doesn't cover your case.
|
|
390
|
+
- **Backfilling balances: which connections can do it.** `--date` only tags
|
|
391
|
+
the version; whether the data changes with it depends on the connection
|
|
392
|
+
(the data-query's `objectType` and the data source's type):
|
|
393
|
+
- **Aggregator balances (Plaid, Quiltt, Salt Edge, Flinks) — do not
|
|
394
|
+
backfill.** The aggregator returns **today's** balance whatever date is
|
|
395
|
+
requested, so N `--date` values write N identical versions, each tagged a
|
|
396
|
+
different period — the filebox looks populated but asserts balances that
|
|
397
|
+
were never true on those dates, and any trend over that window reads flat.
|
|
398
|
+
Sync balances for the **current period only** (one `--date` of today, or
|
|
399
|
+
no `--date`) and let the nightly schedule build the history from there.
|
|
400
|
+
When a `sync --date` on an aggregator balances query names a period other
|
|
401
|
+
than today's (today by the local or the UTC date), it prints a `warning:`
|
|
402
|
+
on stderr before syncing (and, with `--wait --json`, the same text in
|
|
403
|
+
`warnings`). It still syncs: the warning never blocks. It is best-effort —
|
|
404
|
+
it reads the data-query and its data source, so a user or scoped
|
|
405
|
+
credential that cannot read the data source (a viewer, a token without the
|
|
406
|
+
integrations scope) gets no warning; the rule still applies.
|
|
407
|
+
- **Aggregator transactions — backfill freely.** Aggregators serve real
|
|
408
|
+
transaction history, so a full-period transactions backfill is correct.
|
|
409
|
+
- **Direct bank API connections — backfill balances if needed.** These can
|
|
410
|
+
request a historical balance, so multi-period balance backfill is the one
|
|
411
|
+
case where it makes sense.
|
|
412
|
+
- **SFTP — nothing to backfill.** The bank pushes the files on its own
|
|
413
|
+
schedule and no date is requested, so `--date` has nothing to vary.
|
|
292
414
|
- **Waiting for a sync: `filebox data-query sync <fb_id> --date … --wait`.**
|
|
293
415
|
Never poll `status` or the version count yourself — both lie:
|
|
294
416
|
- With `sync_only_changes` (the default), a sync whose output is identical
|
|
@@ -310,7 +432,8 @@ set-version-include` (below).
|
|
|
310
432
|
the data-query goes to `ERROR` (with the server's `last_sync_error`) or on
|
|
311
433
|
`--timeout <seconds>` (default 1800). `--json` prints one object:
|
|
312
434
|
`{outcome, periods: [{period, result: new_version|no_change|pending,
|
|
313
|
-
version_id, version}], unmatched_new_versions, error, waited_seconds
|
|
435
|
+
version_id, version}], unmatched_new_versions, error, waited_seconds,
|
|
436
|
+
warnings}` — `warnings` repeats any pre-sync `warning:` lines (empty when none).
|
|
314
437
|
Without `--date`, it waits for the first period to finish. It cannot be
|
|
315
438
|
combined with `--tag`. One blind spot: a sync that returns **no rows**
|
|
316
439
|
writes no version and re-confirms none, so it ends in a timeout whose
|
|
@@ -395,7 +518,11 @@ with `filebox list --account <destination>`.
|
|
|
395
518
|
version, scoped to a target template's mapping context.
|
|
396
519
|
- `documents support-api set <doc_id> --on|--off` — toggle the doc's
|
|
397
520
|
`support_api` flag. The server rejects turning it **off** while a
|
|
398
|
-
Workato/WorkatoBased connection is in play.
|
|
521
|
+
Workato/WorkatoBased connection is in play. Where the organization's
|
|
522
|
+
filebox-type flag is on, turning it **on** as the owner or the support seat
|
|
523
|
+
also adds Integration to the stored filebox type (Model, Model + Report and
|
|
524
|
+
Lookup + Model keep theirs); turning it off changes no type. See "Why a
|
|
525
|
+
filebox has its type" under Fileboxes.
|
|
399
526
|
- `documents calculate <doc_id> --year|--quarter|--month|--day|--week … [--backward] [--no-roll]`
|
|
400
527
|
— human-readable target (e.g. `--month 2026-04`); the CLI resolves the matching
|
|
401
528
|
tag and posts calculate. Errors list the doc's available dimensions when the
|
|
@@ -14,6 +14,8 @@ Automates the two-step filebox setup that enables external systems (e.g. Workato
|
|
|
14
14
|
|
|
15
15
|
Both steps are run for every target filebox. Fileboxes can be specified directly by ID/name or resolved from a parent folder.
|
|
16
16
|
|
|
17
|
+
**Both steps can change a filebox's type.** Where the organization's filebox-type flag is on, `support-api set --on` adds Integration to the stored type (Model, Model + Report and Lookup + Model keep theirs), and `data-query set` adds it to an empty filebox or one typed exactly Report, when the seat is the filebox's owner or its organization's support seat. After Step 5, verify each one with `dr filebox kind-explain <id> --server <S> --account <support seat email>`, run as that organization's support seat (`dr login-as <support seat email> --server <S>` first); the `dr-cli` skill's filebox reference, "Why a filebox has its type", says how to find that seat and how to read the answer.
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
## Inputs to gather before running
|