zinkee 0.1.24 → 0.1.26
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/.claude/settings.local.json +8 -1
- package/README.md +73 -5
- package/dist/index.js +551 -99
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/automations.ts +1 -1
- package/src/api/displays.ts +48 -0
- package/src/api/navigation.ts +0 -1
- package/src/command-registry.ts +35 -0
- package/src/commands/automations.test.ts +32 -0
- package/src/commands/automations.ts +9 -3
- package/src/commands/displays.test.ts +311 -0
- package/src/commands/displays.ts +431 -7
- package/src/commands/navigation.test.ts +2 -5
- package/src/commands/navigation.ts +11 -11
- package/src/commands/teamspace.ts +19 -13
- package/src/utils/examples.test.ts +32 -4
- package/src/utils/examples.ts +208 -82
|
@@ -43,7 +43,14 @@
|
|
|
43
43
|
"Bash(git -C /home/guillermo/dev/cli branch --show-current)",
|
|
44
44
|
"Bash(git -C /home/guillermo/dev/cli diff --stat)",
|
|
45
45
|
"Bash(git fetch *)",
|
|
46
|
-
"Bash(pnpm exec *)"
|
|
46
|
+
"Bash(pnpm exec *)",
|
|
47
|
+
"Bash(echo \"=== exit $? \\(grep\\) ===\")",
|
|
48
|
+
"Bash(grep -rn \"resourceType\" src/)",
|
|
49
|
+
"Bash(grep -rn \"automation-folders/\\\\${\\\\|/automations:move\\\\|{folderId}/automations\" src/)",
|
|
50
|
+
"Bash(grep -rn \"navigation resources move.*--type\\\\|resourceType\" docs/ README.md)",
|
|
51
|
+
"Bash(zinkee --version)",
|
|
52
|
+
"Bash(zinkee --json profiles list)",
|
|
53
|
+
"Bash(zinkee displays *)"
|
|
47
54
|
]
|
|
48
55
|
}
|
|
49
56
|
}
|
package/README.md
CHANGED
|
@@ -338,7 +338,7 @@ zinkee --json logs list <schema-slug> <record-uuid>
|
|
|
338
338
|
|
|
339
339
|
## Navigation
|
|
340
340
|
|
|
341
|
-
Organize schemas into database folders.
|
|
341
|
+
Organize schemas into database folders. The navigation menu holds databases, so only schemas can be moved here.
|
|
342
342
|
|
|
343
343
|
```bash
|
|
344
344
|
# List folders with contents
|
|
@@ -348,13 +348,16 @@ zinkee --json navigation folders list
|
|
|
348
348
|
zinkee navigation folders create --name "CRM" --order 1
|
|
349
349
|
|
|
350
350
|
# Move a schema into a folder
|
|
351
|
-
zinkee navigation resources move <schema-uuid> --
|
|
351
|
+
zinkee navigation resources move <schema-uuid> --to "CRM"
|
|
352
352
|
|
|
353
|
-
#
|
|
353
|
+
# Move a schema back to the workspace root
|
|
354
|
+
zinkee navigation resources move <schema-uuid> --to 00000000-0000-0000-0000-000000000000
|
|
355
|
+
|
|
356
|
+
# Delete folder (schemas move back to root silently)
|
|
354
357
|
zinkee navigation folders delete "CRM"
|
|
355
358
|
```
|
|
356
359
|
|
|
357
|
-
Root folder cannot be deleted
|
|
360
|
+
Only schemas can be moved (schedules and sub-schemas follow their parent schema). Root folder cannot be deleted; its UUID is always `00000000-0000-0000-0000-000000000000`.
|
|
358
361
|
|
|
359
362
|
---
|
|
360
363
|
|
|
@@ -388,6 +391,27 @@ zinkee teamspace resources publish projects --to "Other Folder"
|
|
|
388
391
|
|
|
389
392
|
Displays are dashboards composed of widgets that visualize data from schemas.
|
|
390
393
|
|
|
394
|
+
### Display folders
|
|
395
|
+
|
|
396
|
+
Organize displays into folders in the displays menu. Folders are flat (name only) and only displays can be moved into them.
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
# List display folders (non-root folders plus the root bucket)
|
|
400
|
+
zinkee --json displays folders list
|
|
401
|
+
|
|
402
|
+
# Create a folder
|
|
403
|
+
zinkee displays folders create --name "Executive Dashboards"
|
|
404
|
+
|
|
405
|
+
# Rename a folder
|
|
406
|
+
zinkee displays folders update "Executive Dashboards" --name "Executive Dashboards (2026)"
|
|
407
|
+
|
|
408
|
+
# Move a display into a folder
|
|
409
|
+
zinkee displays folders move <display-uuid> --to "Executive Dashboards"
|
|
410
|
+
|
|
411
|
+
# Delete a folder (its displays move back to the root folder)
|
|
412
|
+
zinkee displays folders delete "Executive Dashboards"
|
|
413
|
+
```
|
|
414
|
+
|
|
391
415
|
### Creation flow
|
|
392
416
|
|
|
393
417
|
1. Create the display
|
|
@@ -462,9 +486,51 @@ zinkee --json displays widgets create <display-uuid> \
|
|
|
462
486
|
"chart":{"yAxisSeries":[{"typeCalc":"SUM","fieldCalc":"hours-field-slug","axisType":"PRIMARY"}]}
|
|
463
487
|
}'
|
|
464
488
|
|
|
465
|
-
# KANBAN
|
|
489
|
+
# KANBAN widget (field mapping lives in view.viewAdditionalProperties.viewState)
|
|
490
|
+
zinkee --json displays widgets create <display-uuid> \
|
|
491
|
+
--type KANBAN \
|
|
492
|
+
--name "Status board" \
|
|
493
|
+
--origin-resource <schema-uuid> \
|
|
494
|
+
--field <name-field-uuid> --field <status-field-uuid> --field <amount-field-uuid> \
|
|
495
|
+
--column-field <status-field-uuid> \
|
|
496
|
+
--swimlane-field <owner-field-uuid> \
|
|
497
|
+
--card-title-field <name-field-uuid> \
|
|
498
|
+
--card-category1-field <status-field-uuid> \
|
|
499
|
+
--aggregation-method sum --aggregation-field <amount-field-uuid> \
|
|
500
|
+
--view-state '{"showNoValueColumn":true,"showNoValueSwimlane":true}'
|
|
501
|
+
|
|
502
|
+
# TIMELINE widget (cardConfig uses category1/category2/category4, no category3)
|
|
503
|
+
zinkee --json displays widgets create <display-uuid> \
|
|
504
|
+
--type TIMELINE \
|
|
505
|
+
--name "Customer schedule" \
|
|
506
|
+
--origin-resource <schema-uuid> \
|
|
507
|
+
--field <name-field-uuid> --field <start-field-uuid> --field <end-field-uuid> \
|
|
508
|
+
--start-date-field <start-field-uuid> \
|
|
509
|
+
--end-date-field <end-field-uuid> \
|
|
510
|
+
--label-field <name-field-uuid> \
|
|
511
|
+
--card-title-field <name-field-uuid> \
|
|
512
|
+
--view-state '{"granularity":"month","sidebarWidth":300}'
|
|
513
|
+
|
|
514
|
+
# HIERARCHY widget (columns + root level + repeatable child levels)
|
|
515
|
+
zinkee --json displays widgets create <display-uuid> \
|
|
516
|
+
--type HIERARCHY \
|
|
517
|
+
--name "Org tree" \
|
|
518
|
+
--origin-resource <schema-uuid> \
|
|
519
|
+
--field <name-field-uuid> --field <status-field-uuid> --field <amount-field-uuid> \
|
|
520
|
+
--hierarchy-label "Name" \
|
|
521
|
+
--hierarchy-info "col_1779975207355_zfndknslw:Status" \
|
|
522
|
+
--hierarchy-number "col_1779975261490_h8kd3nv9ws:Total amount:SUM" \
|
|
523
|
+
--hierarchy-root-name "Customers" \
|
|
524
|
+
--hierarchy-root-label-field <name-field-uuid> \
|
|
525
|
+
--hierarchy-root-info "col_1779975207355_zfndknslw:<status-field-uuid>" \
|
|
526
|
+
--hierarchy-root-number "col_1779975261490_h8kd3nv9ws:<amount-field-uuid>" \
|
|
527
|
+
--hierarchy-child '{"name":"Projects","schemaId":"<projects-schema-uuid>","childFieldId":"<project-customer-field-uuid>","labelFieldId":"<project-name-field-uuid>","infoMappings":[],"numberMappings":[{"columnId":"col_1779975261490_h8kd3nv9ws","fieldId":"<project-amount-field-uuid>"}]}'
|
|
466
528
|
```
|
|
467
529
|
|
|
530
|
+
For KANBAN/TIMELINE, `cardConfig` differs by type: KANBAN exposes `category1Field`/`category2Field`/`category3Field` (`--card-category1-field`…`--card-category3-field`), TIMELINE exposes `category1Field`/`category2Field`/`category4Field` (`--card-category4-field`). UI-state scalars (`columnOrder`, `hiddenColumns`, `collapsedColumns`, `hideEmptyColumns`, `showNoValueColumn`, `showNoValueSwimlane`, `granularity`, `sidebarWidth`, `visibleFields`, `collapsedGroups`, `collapsedSubgroups`, `showUngroupedEvents`, `showUnsubgroupedEvents`) go through `--view-state '<json>'` / `--view-state-file <path>`.
|
|
531
|
+
|
|
532
|
+
For HIERARCHY, `label` is required at every level but info/number mappings are optional; each child level relates to its parent through `childFieldId` (level 2 → root, level 3 → level 2, …). Numeric columns aggregate upward: a parent shows the aggregation of its children's values, falling back to the level's own mapped value when children have none. Column ids (the `id` in `--hierarchy-info`/`--hierarchy-number`, reused as `columnId` in every mapping) must be unique opaque identifiers you choose — not the column name; the frontend generates them as `col_<timestamp>_<random>` (e.g. `col_1779975207355_zfndknslw`). Pass the whole `hierarchyConfig` at once with `--hierarchy-config '<json>'` / `--hierarchy-config-file <path>` if you prefer.
|
|
533
|
+
|
|
468
534
|
Widget types: `TABLE_OR_SUBTABLE`, `DETAIL`, `KPI`, `CHART`, `TIMELINE`, `KANBAN`, `HIERARCHY`.
|
|
469
535
|
|
|
470
536
|
### Set freeform layout
|
|
@@ -501,6 +567,8 @@ For comparators the parser does not cover yet (e.g. `NOT_CONTAINS`, `RANGE`) kee
|
|
|
501
567
|
|
|
502
568
|
Slugs are resolved to UUIDs in: `--field`, `--source-schema`, `--source-field`, `--x-axis-field`, `--filter` field reference, `kpi.fieldCalc`, `chart.xAxisFieldId`, `chart.yAxisSeries[].fieldCalc`, `bindings.variableMap` values.
|
|
503
569
|
|
|
570
|
+
**Exception:** field references inside the KANBAN/TIMELINE `viewState` (`--column-field`, `--start-date-field`, `--card-*-field`, `--aggregation-field`, …) and inside the HIERARCHY `hierarchyConfig` (`--hierarchy-root-label-field`, `--hierarchy-root-info`/`--hierarchy-root-number` field ids, child level `*FieldId`/`schemaId`) are **not** slug-resolved — the backend only resolves slugs in `view.fields`, so these must be canonical UUIDs.
|
|
571
|
+
|
|
504
572
|
Display UUIDs are required for `displays widgets create/update` and `displays variables create`.
|
|
505
573
|
|
|
506
574
|
---
|