@datarails-ai/dr-cli 1.6.95 → 1.6.97

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "cliVersion": "1.6.95",
3
+ "cliVersion": "1.6.97",
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": {
@@ -1795,6 +1795,26 @@
1795
1795
  }
1796
1796
  ]
1797
1797
  },
1798
+ "integrations sftp create": {
1799
+ "requires": [
1800
+ {
1801
+ "resource": "integrations",
1802
+ "action": "write"
1803
+ },
1804
+ {
1805
+ "resource": "fileboxes",
1806
+ "action": "write"
1807
+ }
1808
+ ]
1809
+ },
1810
+ "integrations sftp provision": {
1811
+ "requires": [
1812
+ {
1813
+ "resource": "integrations",
1814
+ "action": "write"
1815
+ }
1816
+ ]
1817
+ },
1798
1818
  "connectors publish": {
1799
1819
  "denied": {
1800
1820
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
@@ -299,6 +299,7 @@ area's gotchas.
299
299
  reconnect before the next sync._
300
300
  - `integrations share users|groups`
301
301
  - `integrations it list|get|add|update|delete|resync` (IT-admin file-sync; redacts secrets by default)
302
+ - `integrations sftp create|provision` — self-serve SFTP fileboxes: `create --name <n>` makes a filebox and its SFTP folder `/<name>_<id>` in one step; `provision <filebox_id>` does it for an existing filebox
302
303
  - `entities list|qbd-availability|netsuite-connections|rename|rename-group|delete|mark-completed` (alias `companies`)
303
304
  - `entities create qbo|xero|qbd|netsuite` (connected accounting systems)
304
305
  - `error-enrichments list|stats|get|create|update|delete|test-regex|export|import` — the
@@ -34,6 +34,40 @@ secrets by default.
34
34
  `--set-config KEY=VAL`), `integrations it delete` (two-step confirm),
35
35
  `integrations it resync`.
36
36
 
37
+ ## Self-serve SFTP (`integrations sftp`)
38
+
39
+ The embedded SFTP integration: each filebox gets its own folder in the org's SFTP
40
+ container, and files dropped there land in the filebox.
41
+
42
+ - `integrations sftp create --name <n> [flags]` creates an SFTP filebox in one step
43
+ (`--scenario`, `--date-sub-type`, `--parent`, `--no-date` as on `filebox create`).
44
+ `integrations sftp provision <filebox_id> [flags]` sets up SFTP on a filebox that
45
+ already exists. Both make the UI wizard's call,
46
+ `POST /api/v3/data_integrations/fileboxes/<id>/sftp/provision`, which creates the
47
+ folder `/<filebox name>_<filebox id>` (with a `.keep` file) and, for the org's
48
+ first SFTP filebox, the org's SFTP user and password.
49
+ - The org is the logged-in account's org (`--server`, `--account`; `dr login-as` to
50
+ act as a customer). There is no org flag.
51
+ - Give the client the printed **Folder** unchanged. An SFTP login opens inside the
52
+ org's container, so the container name is never part of the path. **Host** is the
53
+ bare hostname.
54
+ - `--date-method filename|upload_date`. A date-tagged filebox defaults to
55
+ `upload_date`. `filename` also needs `--date-format` (one of the 10 formats the UI
56
+ offers) and `--date-position beginning|end`. `--backfill <n>` adds subfolders
57
+ `<folder>/-1` … `<folder>/-N` (`upload_date` only). A `--no-date` filebox takes none
58
+ of these flags.
59
+ - Safe to re-run: no folder is duplicated, and flags left out keep their stored values.
60
+ - The password is redacted unless `--show-secrets`, in `--json` output too. It is the
61
+ org's password: one SFTP user serves every SFTP filebox in the org, so revealing it
62
+ gives access to all of their folders.
63
+ - Errors: 404 "not enabled" means the org's `integrations__sftp` flag is off. 403
64
+ means the account does not own the filebox, or is a viewer. 400 "already connected" means the
65
+ filebox is linked to another data source. 502 means the gateway is unavailable;
66
+ re-run. When `integrations sftp create` fails at the SFTP step, the filebox
67
+ already exists, so finish with `integrations sftp provision <id>`.
68
+ - Do not copy SFTP settings from another filebox with `filebox data-query set`. That
69
+ links the filebox but creates no folder, so the client has nowhere to drop files.
70
+
37
71
  ## Entities — company data sources (`entities`, alias `companies`)
38
72
 
39
73
  The connected accounting systems (QuickBooks Online/Desktop, Xero, NetSuite) —
@@ -45,8 +45,8 @@ Account assignment / sign-off (all take the bank-account UUID via
45
45
  resets. Every account is checked before anything is written, and the
46
46
  write goes out in PATCHes of 100 accounts. If one fails, the error says
47
47
  how many accounts landed; re-run the same file without a token and the
48
- new plan covers only the rest. Before each PATCH after the first, the
49
- accounts are re-read; if any account in the next chunk is gone (a
48
+ new plan covers only the rest. Before each PATCH, the accounts are
49
+ re-read; if any account in the next chunk is gone (a
50
50
  trial-balance rebuild re-mints account ids) or its member slots changed
51
51
  since the plan, the run halts, says how many accounts landed, and names
52
52
  the drifted accounts. Gone accounts mean the file must be rebuilt from
@@ -55,6 +55,13 @@ Account assignment / sign-off (all take the bank-account UUID via
55
55
  - `reconciliation accounts clear-assignee <account_uuid> --date <YYYY-MM-DD>
56
56
  --type Preparer|Reviewer` — unassigns (preserves due_date, resets sign-off).
57
57
  Two-step confirm.
58
+ - `reconciliation accounts clear-assignee --file <csv> --date <YYYY-MM-DD>` —
59
+ the bulk form. Header `account_id,type`, one row per (account, role); the
60
+ user columns of a set-assignee file are rejected, so a set-assignee
61
+ manifest cannot be passed here by mistake. One plan and one token cover the
62
+ whole file. Slots already Unassigned, and accounts with no member slots,
63
+ are skipped. Same 100-account PATCHes, per-chunk re-check, and resume
64
+ behaviour as `set-assignee --file`.
58
65
  - `reconciliation accounts set-due-date <account_uuid> --date <YYYY-MM-DD>
59
66
  --type Preparer|Reviewer (--due-date <YYYY-MM-DD> | --epoch <n> | --clear)`.
60
67
  Two-step confirm.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarails-ai/dr-cli",
3
- "version": "1.6.95",
3
+ "version": "1.6.97",
4
4
  "description": "Datarails CLI",
5
5
  "type": "module",
6
6
  "engines": {
@@ -17,7 +17,7 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "@datarails-ai/dr-appspace-cli": "0.10.19",
20
+ "@datarails-ai/dr-appspace-cli": "0.10.20",
21
21
  "@modelcontextprotocol/sdk": "^1.29.0",
22
22
  "@napi-rs/keyring": "^1.3.0",
23
23
  "commander": "^12.1.0",