zinkee 0.1.67 → 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.
package/README.md
CHANGED
|
@@ -806,12 +806,22 @@ zinkee --json displays widgets create <display-uuid> \
|
|
|
806
806
|
"kpi":{"typeCalc":"SUM","fieldCalc":"hours-field-slug"}
|
|
807
807
|
}'
|
|
808
808
|
|
|
809
|
-
# Chart widget
|
|
809
|
+
# Chart widget. Types: lines, bars (columns), horizontalBars (one category per
|
|
810
|
+
# row, for rankings), stackedBars, combined (PRIMARY series as columns,
|
|
811
|
+
# SECONDARY series as lines on a right-hand axis). --chart-sort-order
|
|
812
|
+
# (alphabetical, valueDesc, valueAsc) orders the categories by the first
|
|
813
|
+
# series. Only bars and horizontalBars sort by value, and a chart grouped by a
|
|
814
|
+
# date is always chronological: a value order there fails with
|
|
815
|
+
# display_widget_chart_sort_order_not_applicable. Change the order of an
|
|
816
|
+
# existing chart with `displays widgets update <display> <widget>
|
|
817
|
+
# --chart-sort-order valueAsc`. legend and series color are accepted but have
|
|
818
|
+
# no effect: the legend and the colours are automatic.
|
|
810
819
|
zinkee --json displays widgets create <display-uuid> \
|
|
811
820
|
--type CHART \
|
|
812
821
|
--name "Hours by Employee" \
|
|
813
822
|
--origin-resource <hours-schema-uuid> \
|
|
814
|
-
--chart-type
|
|
823
|
+
--chart-type horizontalBars \
|
|
824
|
+
--chart-sort-order valueDesc \
|
|
815
825
|
--x-axis-field employee-field-slug \
|
|
816
826
|
--raw '{
|
|
817
827
|
"bindings":{"variableMap":{"<variable-uuid>":"<hours-project-field-uuid>"}},
|
|
@@ -1848,7 +1848,7 @@ var specificExamples = {
|
|
|
1848
1848
|
},
|
|
1849
1849
|
{
|
|
1850
1850
|
description: "Create a CHART widget with a daily time-serie x-axis.",
|
|
1851
|
-
command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type CHART --name "Revenue by day" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":8,"h":6}' --chart-type lines --x-axis-field due-date --x-axis-date-format DATE --x-axis-time-series --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","
|
|
1851
|
+
command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type CHART --name "Revenue by day" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":8,"h":6}' --chart-type lines --x-axis-field due-date --x-axis-date-format DATE --x-axis-time-series --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","axisType":"PRIMARY"}'`,
|
|
1852
1852
|
raw: `{
|
|
1853
1853
|
"type": "CHART",
|
|
1854
1854
|
"source": {
|
|
@@ -1868,17 +1868,42 @@ var specificExamples = {
|
|
|
1868
1868
|
{
|
|
1869
1869
|
"typeCalc": "SUM",
|
|
1870
1870
|
"fieldCalc": "amount",
|
|
1871
|
-
"color": "#4B9CD3",
|
|
1872
1871
|
"axisType": "PRIMARY"
|
|
1873
1872
|
}
|
|
1874
|
-
]
|
|
1875
|
-
|
|
1873
|
+
]
|
|
1874
|
+
}
|
|
1875
|
+
}`
|
|
1876
|
+
},
|
|
1877
|
+
{
|
|
1878
|
+
description: "Create a ranking: horizontal bars (one category per row, names readable) sorted from highest to lowest value. sortOrder (alphabetical, valueDesc, valueAsc) applies to bars and horizontalBars by the first series; date axes stay chronological.",
|
|
1879
|
+
command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type CHART --name "Revenue by customer" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":6,"h":8}' --chart-type horizontalBars --chart-sort-order valueDesc --x-axis-field contact-name --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","axisType":"PRIMARY"}'`,
|
|
1880
|
+
raw: `{
|
|
1881
|
+
"type": "CHART",
|
|
1882
|
+
"source": {
|
|
1883
|
+
"originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
|
|
1884
|
+
"isOriginSubSchema": false
|
|
1885
|
+
},
|
|
1886
|
+
"placement": {
|
|
1887
|
+
"layout": { "x": 0, "y": 0, "w": 6, "h": 8 }
|
|
1888
|
+
},
|
|
1889
|
+
"presentation": { "name": "Revenue by customer" },
|
|
1890
|
+
"chart": {
|
|
1891
|
+
"chartType": "horizontalBars",
|
|
1892
|
+
"sortOrder": "valueDesc",
|
|
1893
|
+
"xAxisFieldId": "contact-name",
|
|
1894
|
+
"yAxisSeries": [
|
|
1895
|
+
{
|
|
1896
|
+
"typeCalc": "SUM",
|
|
1897
|
+
"fieldCalc": "amount",
|
|
1898
|
+
"axisType": "PRIMARY"
|
|
1899
|
+
}
|
|
1900
|
+
]
|
|
1876
1901
|
}
|
|
1877
1902
|
}`
|
|
1878
1903
|
},
|
|
1879
1904
|
{
|
|
1880
|
-
description: "Create a
|
|
1881
|
-
command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type CHART --name "Revenue by month" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":8,"h":6}' --chart-type
|
|
1905
|
+
description: "Create a combined CHART widget by month: the PRIMARY series is drawn as columns and the SECONDARY series as a line on its own right-hand axis.",
|
|
1906
|
+
command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type CHART --name "Revenue by month" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":8,"h":6}' --chart-type combined --x-axis-field due-date --x-axis-date-format MONTH_YEAR --x-axis-time-series --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","axisType":"PRIMARY"}' --y-axis-serie '{"typeCalc":"COUNT","fieldCalc":"contact-name","axisType":"SECONDARY"}'`,
|
|
1882
1907
|
raw: `{
|
|
1883
1908
|
"type": "CHART",
|
|
1884
1909
|
"source": {
|
|
@@ -1890,7 +1915,7 @@ var specificExamples = {
|
|
|
1890
1915
|
},
|
|
1891
1916
|
"presentation": { "name": "Revenue by month" },
|
|
1892
1917
|
"chart": {
|
|
1893
|
-
"chartType": "
|
|
1918
|
+
"chartType": "combined",
|
|
1894
1919
|
"xAxisFieldId": "due-date",
|
|
1895
1920
|
"xAxisDateFormat": "MONTH_YEAR",
|
|
1896
1921
|
"xAxisAsTimeSerie": true,
|
|
@@ -1898,23 +1923,20 @@ var specificExamples = {
|
|
|
1898
1923
|
{
|
|
1899
1924
|
"typeCalc": "SUM",
|
|
1900
1925
|
"fieldCalc": "amount",
|
|
1901
|
-
"color": "#4B9CD3",
|
|
1902
1926
|
"axisType": "PRIMARY"
|
|
1903
1927
|
},
|
|
1904
1928
|
{
|
|
1905
1929
|
"typeCalc": "COUNT",
|
|
1906
1930
|
"fieldCalc": "contact-name",
|
|
1907
|
-
"color": "#E57373",
|
|
1908
1931
|
"axisType": "SECONDARY"
|
|
1909
1932
|
}
|
|
1910
|
-
]
|
|
1911
|
-
"legend": { "position": "bottom" }
|
|
1933
|
+
]
|
|
1912
1934
|
}
|
|
1913
1935
|
}`
|
|
1914
1936
|
},
|
|
1915
1937
|
{
|
|
1916
1938
|
description: "Create a bars CHART widget with a quarterly time-serie x-axis.",
|
|
1917
|
-
command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type CHART --name "Revenue by quarter" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":8,"h":6}' --chart-type bars --x-axis-field due-date --x-axis-date-format QUARTER_YEAR --x-axis-time-series --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","
|
|
1939
|
+
command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type CHART --name "Revenue by quarter" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":8,"h":6}' --chart-type bars --x-axis-field due-date --x-axis-date-format QUARTER_YEAR --x-axis-time-series --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","axisType":"PRIMARY"}'`,
|
|
1918
1940
|
raw: `{
|
|
1919
1941
|
"type": "CHART",
|
|
1920
1942
|
"source": {
|
|
@@ -1934,17 +1956,15 @@ var specificExamples = {
|
|
|
1934
1956
|
{
|
|
1935
1957
|
"typeCalc": "SUM",
|
|
1936
1958
|
"fieldCalc": "amount",
|
|
1937
|
-
"color": "#4B9CD3",
|
|
1938
1959
|
"axisType": "PRIMARY"
|
|
1939
1960
|
}
|
|
1940
|
-
]
|
|
1941
|
-
"legend": { "position": "bottom" }
|
|
1961
|
+
]
|
|
1942
1962
|
}
|
|
1943
1963
|
}`
|
|
1944
1964
|
},
|
|
1945
1965
|
{
|
|
1946
1966
|
description: "Create a CHART widget with a yearly time-serie x-axis.",
|
|
1947
|
-
command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type CHART --name "Revenue by year" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":8,"h":6}' --chart-type lines --x-axis-field due-date --x-axis-date-format YEAR --x-axis-time-series --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","
|
|
1967
|
+
command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type CHART --name "Revenue by year" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":8,"h":6}' --chart-type lines --x-axis-field due-date --x-axis-date-format YEAR --x-axis-time-series --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","axisType":"PRIMARY"}'`,
|
|
1948
1968
|
raw: `{
|
|
1949
1969
|
"type": "CHART",
|
|
1950
1970
|
"source": {
|
|
@@ -1964,11 +1984,9 @@ var specificExamples = {
|
|
|
1964
1984
|
{
|
|
1965
1985
|
"typeCalc": "SUM",
|
|
1966
1986
|
"fieldCalc": "amount",
|
|
1967
|
-
"color": "#4B9CD3",
|
|
1968
1987
|
"axisType": "PRIMARY"
|
|
1969
1988
|
}
|
|
1970
|
-
]
|
|
1971
|
-
"legend": { "position": "bottom" }
|
|
1989
|
+
]
|
|
1972
1990
|
}
|
|
1973
1991
|
}`
|
|
1974
1992
|
},
|
|
@@ -2240,11 +2258,20 @@ var specificExamples = {
|
|
|
2240
2258
|
"fieldCalc": "amount",
|
|
2241
2259
|
"config": { "format": "number", "decimals": 1 }
|
|
2242
2260
|
}
|
|
2261
|
+
}`
|
|
2262
|
+
},
|
|
2263
|
+
{
|
|
2264
|
+
description: "Sort the categories of a bars or horizontalBars chart from lowest to highest value.",
|
|
2265
|
+
command: `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 22222222-2222-4222-a222-222222222222 --chart-sort-order valueAsc`,
|
|
2266
|
+
raw: `{
|
|
2267
|
+
"chart": {
|
|
2268
|
+
"sortOrder": "valueAsc"
|
|
2269
|
+
}
|
|
2243
2270
|
}`
|
|
2244
2271
|
},
|
|
2245
2272
|
{
|
|
2246
2273
|
description: "Replace the chart series with quarterly lines.",
|
|
2247
|
-
command: `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 22222222-2222-4222-a222-222222222222 --chart-type lines --x-axis-field due-date --x-axis-date-format QUARTER_YEAR --x-axis-time-series --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","
|
|
2274
|
+
command: `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 22222222-2222-4222-a222-222222222222 --chart-type lines --x-axis-field due-date --x-axis-date-format QUARTER_YEAR --x-axis-time-series --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","axisType":"PRIMARY"}'`,
|
|
2248
2275
|
raw: `{
|
|
2249
2276
|
"chart": {
|
|
2250
2277
|
"chartType": "lines",
|
|
@@ -2255,7 +2282,6 @@ var specificExamples = {
|
|
|
2255
2282
|
{
|
|
2256
2283
|
"typeCalc": "SUM",
|
|
2257
2284
|
"fieldCalc": "amount",
|
|
2258
|
-
"color": "#2E7D32",
|
|
2259
2285
|
"axisType": "PRIMARY"
|
|
2260
2286
|
}
|
|
2261
2287
|
]
|
|
@@ -4556,12 +4582,13 @@ var specificExamples = {
|
|
|
4556
4582
|
],
|
|
4557
4583
|
"document-templates list": [
|
|
4558
4584
|
{
|
|
4559
|
-
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.",
|
|
4560
4586
|
command: "zinkee --json document-templates list",
|
|
4561
4587
|
response: `[
|
|
4562
4588
|
{
|
|
4563
4589
|
"id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
|
|
4564
4590
|
"name": "Quarterly report",
|
|
4591
|
+
"fileNamePattern": "Budget {{ record.number }} - {{ record.client }}",
|
|
4565
4592
|
"assets": [
|
|
4566
4593
|
{
|
|
4567
4594
|
"id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
|
|
@@ -4584,6 +4611,7 @@ var specificExamples = {
|
|
|
4584
4611
|
response: `{
|
|
4585
4612
|
"id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
|
|
4586
4613
|
"name": "Quarterly report",
|
|
4614
|
+
"fileNamePattern": "Budget {{ record.number }} - {{ record.client }}",
|
|
4587
4615
|
"assets": [
|
|
4588
4616
|
{
|
|
4589
4617
|
"id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
|
|
@@ -4613,6 +4641,26 @@ var specificExamples = {
|
|
|
4613
4641
|
response: `{
|
|
4614
4642
|
"id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
|
|
4615
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 }}",
|
|
4616
4664
|
"assets": [],
|
|
4617
4665
|
"createdAt": "2026-01-15T10:00:00Z",
|
|
4618
4666
|
"updatedAt": "2026-01-15T10:00:00Z",
|
|
@@ -4642,7 +4690,7 @@ var specificExamples = {
|
|
|
4642
4690
|
],
|
|
4643
4691
|
"document-templates update": [
|
|
4644
4692
|
{
|
|
4645
|
-
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.",
|
|
4646
4694
|
command: 'zinkee --json document-templates update "Quarterly report" --name "Annual report"',
|
|
4647
4695
|
raw: `{
|
|
4648
4696
|
"name": "Annual report"
|
|
@@ -4650,6 +4698,7 @@ var specificExamples = {
|
|
|
4650
4698
|
response: `{
|
|
4651
4699
|
"id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
|
|
4652
4700
|
"name": "Annual report",
|
|
4701
|
+
"fileNamePattern": "Budget {{ record.number }} - {{ record.client }}",
|
|
4653
4702
|
"assets": [
|
|
4654
4703
|
{
|
|
4655
4704
|
"id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
|
|
@@ -4661,6 +4710,20 @@ var specificExamples = {
|
|
|
4661
4710
|
"updatedAt": "2026-01-22T09:15:00Z",
|
|
4662
4711
|
"createdBy": "creator@example.com",
|
|
4663
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
|
|
4664
4727
|
}`
|
|
4665
4728
|
}
|
|
4666
4729
|
],
|
|
@@ -4681,6 +4744,7 @@ var specificExamples = {
|
|
|
4681
4744
|
response: `{
|
|
4682
4745
|
"id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
|
|
4683
4746
|
"name": "Quarterly report",
|
|
4747
|
+
"fileNamePattern": "Budget {{ record.number }} - {{ record.client }}",
|
|
4684
4748
|
"assets": [
|
|
4685
4749
|
{
|
|
4686
4750
|
"id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
|
|
@@ -4786,4 +4850,4 @@ function withResponseEnvelope({ responseMeta, ...example }, commandName) {
|
|
|
4786
4850
|
export {
|
|
4787
4851
|
getCommandExamples
|
|
4788
4852
|
};
|
|
4789
|
-
//# sourceMappingURL=examples-
|
|
4853
|
+
//# sourceMappingURL=examples-AJAJZ6QM.js.map
|