zinkee 0.1.68 → 0.1.69
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.
|
@@ -4582,12 +4582,13 @@ var specificExamples = {
|
|
|
4582
4582
|
],
|
|
4583
4583
|
"document-templates list": [
|
|
4584
4584
|
{
|
|
4585
|
-
description: "List every document template in the workspace. Each asset's link is a relative path to the asset download endpoint, ready to call without composition.",
|
|
4585
|
+
description: "List every document template in the workspace. Each asset's link is a relative path to the asset download endpoint, ready to call without composition. fileNamePattern is the generated file name of the template, or null when generated PDFs are named after the template. The table output shows it as a column.",
|
|
4586
4586
|
command: "zinkee --json document-templates list",
|
|
4587
4587
|
response: `[
|
|
4588
4588
|
{
|
|
4589
4589
|
"id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
|
|
4590
4590
|
"name": "Quarterly report",
|
|
4591
|
+
"fileNamePattern": "Budget {{ record.number }} - {{ record.client }}",
|
|
4591
4592
|
"assets": [
|
|
4592
4593
|
{
|
|
4593
4594
|
"id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
|
|
@@ -4610,6 +4611,7 @@ var specificExamples = {
|
|
|
4610
4611
|
response: `{
|
|
4611
4612
|
"id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
|
|
4612
4613
|
"name": "Quarterly report",
|
|
4614
|
+
"fileNamePattern": "Budget {{ record.number }} - {{ record.client }}",
|
|
4613
4615
|
"assets": [
|
|
4614
4616
|
{
|
|
4615
4617
|
"id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
|
|
@@ -4639,6 +4641,26 @@ var specificExamples = {
|
|
|
4639
4641
|
response: `{
|
|
4640
4642
|
"id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
|
|
4641
4643
|
"name": "Quarterly report",
|
|
4644
|
+
"fileNamePattern": null,
|
|
4645
|
+
"assets": [],
|
|
4646
|
+
"createdAt": "2026-01-15T10:00:00Z",
|
|
4647
|
+
"updatedAt": "2026-01-15T10:00:00Z",
|
|
4648
|
+
"createdBy": "creator@example.com",
|
|
4649
|
+
"updatedBy": "creator@example.com"
|
|
4650
|
+
}`
|
|
4651
|
+
},
|
|
4652
|
+
{
|
|
4653
|
+
description: `Create a template whose generated PDFs are named from record data. The pattern is text plus variables written like in index.html, always rooted at record ({{ record.field }}, {{ record['field-slug'] }}, {{ record.clients.name }} for a related table); loops, conditions, filters and functions are rejected. Each PDF is named <resolved name>-vN.pdf, e.g. "Budget P-2026-0143 - Smith Hardware-v1.pdf". Fields are only checked when a document is generated: if one cannot be resolved, the PDF is named after the template and the automation history shows a DOCUMENT_FILE_NAME_FALLBACK warning.`,
|
|
4654
|
+
command: 'zinkee --json document-templates create --name "Budget" --file-name-pattern "Budget {{ record.number }} - {{ record.client }}"',
|
|
4655
|
+
raw: `{
|
|
4656
|
+
"name": "Budget",
|
|
4657
|
+
"fileNamePattern": "Budget {{ record.number }} - {{ record.client }}",
|
|
4658
|
+
"assets": []
|
|
4659
|
+
}`,
|
|
4660
|
+
response: `{
|
|
4661
|
+
"id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
|
|
4662
|
+
"name": "Budget",
|
|
4663
|
+
"fileNamePattern": "Budget {{ record.number }} - {{ record.client }}",
|
|
4642
4664
|
"assets": [],
|
|
4643
4665
|
"createdAt": "2026-01-15T10:00:00Z",
|
|
4644
4666
|
"updatedAt": "2026-01-15T10:00:00Z",
|
|
@@ -4668,7 +4690,7 @@ var specificExamples = {
|
|
|
4668
4690
|
],
|
|
4669
4691
|
"document-templates update": [
|
|
4670
4692
|
{
|
|
4671
|
-
description: "Rename a template. The template argument accepts a UUID or an exact current name.
|
|
4693
|
+
description: "Rename a template. The template argument accepts a UUID or an exact current name. A field that is not sent keeps its value, so renaming keeps the generated file name. Assets are managed via the assets subcommands.",
|
|
4672
4694
|
command: 'zinkee --json document-templates update "Quarterly report" --name "Annual report"',
|
|
4673
4695
|
raw: `{
|
|
4674
4696
|
"name": "Annual report"
|
|
@@ -4676,6 +4698,7 @@ var specificExamples = {
|
|
|
4676
4698
|
response: `{
|
|
4677
4699
|
"id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
|
|
4678
4700
|
"name": "Annual report",
|
|
4701
|
+
"fileNamePattern": "Budget {{ record.number }} - {{ record.client }}",
|
|
4679
4702
|
"assets": [
|
|
4680
4703
|
{
|
|
4681
4704
|
"id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
|
|
@@ -4687,6 +4710,20 @@ var specificExamples = {
|
|
|
4687
4710
|
"updatedAt": "2026-01-22T09:15:00Z",
|
|
4688
4711
|
"createdBy": "creator@example.com",
|
|
4689
4712
|
"updatedBy": "updater@example.com"
|
|
4713
|
+
}`
|
|
4714
|
+
},
|
|
4715
|
+
{
|
|
4716
|
+
description: "Set or change only the generated file name; the template name stays. Variables are always rooted at record; use the bracket form for slugs with hyphens and keep the whole pattern in double quotes in the shell. The API returns 400 with document_template_file_name_pattern_invalid, _unsupported, _root_mismatch, _root_hyphen, _no_variables or _too_long (500 characters) and quotes the variable that fails.",
|
|
4717
|
+
command: `zinkee --json document-templates update "Budget" --file-name-pattern "Budget {{ record['budget-number'] }} - {{ record.client }}"`,
|
|
4718
|
+
raw: `{
|
|
4719
|
+
"fileNamePattern": "Budget {{ record['budget-number'] }} - {{ record.client }}"
|
|
4720
|
+
}`
|
|
4721
|
+
},
|
|
4722
|
+
{
|
|
4723
|
+
description: "Remove the generated file name: generated PDFs are named after the template again (<template name>-vN.pdf). Sends fileNamePattern: null.",
|
|
4724
|
+
command: 'zinkee --json document-templates update "Budget" --clear-file-name-pattern',
|
|
4725
|
+
raw: `{
|
|
4726
|
+
"fileNamePattern": null
|
|
4690
4727
|
}`
|
|
4691
4728
|
}
|
|
4692
4729
|
],
|
|
@@ -4707,6 +4744,7 @@ var specificExamples = {
|
|
|
4707
4744
|
response: `{
|
|
4708
4745
|
"id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
|
|
4709
4746
|
"name": "Quarterly report",
|
|
4747
|
+
"fileNamePattern": "Budget {{ record.number }} - {{ record.client }}",
|
|
4710
4748
|
"assets": [
|
|
4711
4749
|
{
|
|
4712
4750
|
"id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
|
|
@@ -4812,4 +4850,4 @@ function withResponseEnvelope({ responseMeta, ...example }, commandName) {
|
|
|
4812
4850
|
export {
|
|
4813
4851
|
getCommandExamples
|
|
4814
4852
|
};
|
|
4815
|
-
//# sourceMappingURL=examples-
|
|
4853
|
+
//# sourceMappingURL=examples-AJAJZ6QM.js.map
|