zinkee 0.1.23 → 0.1.24
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/AGENTS.md +1 -0
- package/README.md +54 -0
- package/dist/index.js +943 -318
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/document-templates.ts +110 -0
- package/src/command-registry.ts +56 -0
- package/src/commands/document-templates.test.ts +569 -0
- package/src/commands/document-templates.ts +563 -0
- package/src/program.ts +2 -0
- package/src/utils/examples.ts +185 -0
package/AGENTS.md
CHANGED
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ Implemented command groups:
|
|
|
17
17
|
- `teamspace`
|
|
18
18
|
- `displays`
|
|
19
19
|
- `automations`
|
|
20
|
+
- `document-templates`
|
|
20
21
|
|
|
21
22
|
## Requirements
|
|
22
23
|
|
|
@@ -656,6 +657,58 @@ zinkee --json automations connections list
|
|
|
656
657
|
|
|
657
658
|
---
|
|
658
659
|
|
|
660
|
+
## Document templates
|
|
661
|
+
|
|
662
|
+
Document templates group reusable files (e.g. Word/Excel masters) that automations can render against a record via the `generate_document` action. Names must be unique within the workspace; the `<template>` argument accepts a UUID or an exact name. The `<asset>` argument requires a UUID.
|
|
663
|
+
|
|
664
|
+
### Typical lifecycle
|
|
665
|
+
|
|
666
|
+
1. Create an empty template
|
|
667
|
+
|
|
668
|
+
```bash
|
|
669
|
+
zinkee --json document-templates create --name "Quarterly report"
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
2. Upload one or more asset files
|
|
673
|
+
|
|
674
|
+
```bash
|
|
675
|
+
zinkee --json document-templates assets add "Quarterly report" ./requirements.docx
|
|
676
|
+
zinkee --json document-templates assets add "Quarterly report" ./contract.docx --name "Customer Contract"
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
3. List and inspect
|
|
680
|
+
|
|
681
|
+
```bash
|
|
682
|
+
zinkee --json document-templates list
|
|
683
|
+
zinkee --json document-templates get "Quarterly report"
|
|
684
|
+
```
|
|
685
|
+
|
|
686
|
+
4. Rename / replace assets / remove
|
|
687
|
+
|
|
688
|
+
```bash
|
|
689
|
+
zinkee --json document-templates update "Quarterly report" --name "Annual report"
|
|
690
|
+
zinkee --json document-templates assets delete <template-uuid> <asset-uuid>
|
|
691
|
+
zinkee --json document-templates delete <template-uuid>
|
|
692
|
+
```
|
|
693
|
+
|
|
694
|
+
### Download asset bytes
|
|
695
|
+
|
|
696
|
+
`download` streams raw bytes — use `--output` to write to disk (required when combined with `--json`):
|
|
697
|
+
|
|
698
|
+
```bash
|
|
699
|
+
zinkee --json document-templates assets download <template-uuid> <asset-uuid> --output ./contract.docx
|
|
700
|
+
zinkee document-templates assets download <template-uuid> <asset-uuid> > contract.docx
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
### Notes
|
|
704
|
+
|
|
705
|
+
- `get` is a client-side helper: the backend has no get-one endpoint, so the CLI filters the list response. Use `list` if you want everything in one call.
|
|
706
|
+
- The `assets` returned by list/get include a relative `link` ready to call directly (it already includes both the templateId and assetId path segments).
|
|
707
|
+
- Deleting a template removes its asset files from storage; record fields that referenced previously generated documents are not modified.
|
|
708
|
+
- Use `--json --example document-templates <subcommand>` for canonical examples.
|
|
709
|
+
|
|
710
|
+
---
|
|
711
|
+
|
|
659
712
|
## Discovery
|
|
660
713
|
|
|
661
714
|
```bash
|
|
@@ -665,5 +718,6 @@ zinkee --json displays list
|
|
|
665
718
|
zinkee --json automations list
|
|
666
719
|
zinkee --json automations plugins list
|
|
667
720
|
zinkee --json automations connections list
|
|
721
|
+
zinkee --json document-templates list
|
|
668
722
|
zinkee --example <command path>
|
|
669
723
|
```
|