zinkee 0.1.44 → 0.1.45

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.
Files changed (94) hide show
  1. package/README.md +4 -0
  2. package/dist/chunk-MHEVRMDX.js +1230 -0
  3. package/dist/chunk-MHEVRMDX.js.map +1 -0
  4. package/{src/utils/examples.ts → dist/examples-E6FFEVBE.js} +856 -1141
  5. package/dist/examples-E6FFEVBE.js.map +1 -0
  6. package/dist/index.js +1145 -8456
  7. package/dist/index.js.map +1 -1
  8. package/package.json +6 -3
  9. package/.github/workflows/npm-publish.yml +0 -77
  10. package/.github/workflows/pr-checks.yml +0 -36
  11. package/AGENTS.md +0 -110
  12. package/docs/cli-contract.md +0 -41
  13. package/docs/npm-release.md +0 -64
  14. package/docs/superpowers/plans/2026-03-24-zinkee-cli-implementation.md +0 -837
  15. package/docs/superpowers/plans/2026-03-25-cli-backend-error-contract.md +0 -503
  16. package/docs/superpowers/plans/2026-03-26-display-freeform-create.md +0 -389
  17. package/docs/superpowers/specs/2026-03-24-zinkee-cli-backend-blockers.md +0 -172
  18. package/docs/superpowers/specs/2026-03-24-zinkee-cli-design.md +0 -1576
  19. package/docs/superpowers/specs/2026-03-24-zinkee-cli-e2e-checklist.md +0 -215
  20. package/docs/superpowers/specs/2026-03-24-zinkee-cli-e2e-design.md +0 -492
  21. package/docs/superpowers/specs/2026-03-24-zinkee-cli-e2e-status.md +0 -307
  22. package/docs/superpowers/specs/2026-07-30-cli-pr-checks-design.md +0 -37
  23. package/src/api/automations.ts +0 -404
  24. package/src/api/comments.ts +0 -51
  25. package/src/api/displays.ts +0 -337
  26. package/src/api/document-templates.ts +0 -110
  27. package/src/api/files.ts +0 -50
  28. package/src/api/formulas.test.ts +0 -65
  29. package/src/api/formulas.ts +0 -67
  30. package/src/api/logs.ts +0 -34
  31. package/src/api/navigation.ts +0 -70
  32. package/src/api/records.ts +0 -184
  33. package/src/api/schemas.ts +0 -148
  34. package/src/api/teamspace.ts +0 -110
  35. package/src/cli-examples.ts +0 -130
  36. package/src/cli-runner.ts +0 -95
  37. package/src/client.test.ts +0 -189
  38. package/src/client.ts +0 -269
  39. package/src/command-registry.ts +0 -882
  40. package/src/commands/automations.test.ts +0 -1030
  41. package/src/commands/automations.ts +0 -2102
  42. package/src/commands/comments.test.ts +0 -214
  43. package/src/commands/comments.ts +0 -303
  44. package/src/commands/config.test.ts +0 -81
  45. package/src/commands/config.ts +0 -150
  46. package/src/commands/displays.test.ts +0 -1105
  47. package/src/commands/displays.ts +0 -1442
  48. package/src/commands/document-templates.test.ts +0 -569
  49. package/src/commands/document-templates.ts +0 -563
  50. package/src/commands/files.test.ts +0 -284
  51. package/src/commands/files.ts +0 -280
  52. package/src/commands/formulas.test.ts +0 -194
  53. package/src/commands/formulas.ts +0 -243
  54. package/src/commands/logs.test.ts +0 -123
  55. package/src/commands/logs.ts +0 -159
  56. package/src/commands/navigation.test.ts +0 -211
  57. package/src/commands/navigation.ts +0 -348
  58. package/src/commands/profiles.test.ts +0 -191
  59. package/src/commands/profiles.ts +0 -303
  60. package/src/commands/records.test.ts +0 -860
  61. package/src/commands/records.ts +0 -883
  62. package/src/commands/schemas.test.ts +0 -1252
  63. package/src/commands/schemas.ts +0 -890
  64. package/src/commands/teamspace.test.ts +0 -229
  65. package/src/commands/teamspace.ts +0 -546
  66. package/src/completion/engine.test.ts +0 -138
  67. package/src/completion/engine.ts +0 -168
  68. package/src/completion/install.test.ts +0 -179
  69. package/src/completion/install.ts +0 -260
  70. package/src/completion/runtime.ts +0 -150
  71. package/src/completion/scripts.ts +0 -91
  72. package/src/config.test.ts +0 -362
  73. package/src/config.ts +0 -294
  74. package/src/index.test.ts +0 -217
  75. package/src/index.ts +0 -8
  76. package/src/parsers/expressions.test.ts +0 -95
  77. package/src/parsers/expressions.ts +0 -128
  78. package/src/parsers/kv.test.ts +0 -35
  79. package/src/parsers/kv.ts +0 -49
  80. package/src/parsers/selectors.test.ts +0 -23
  81. package/src/parsers/selectors.ts +0 -29
  82. package/src/program.ts +0 -64
  83. package/src/runtime-context.ts +0 -103
  84. package/src/types.ts +0 -76
  85. package/src/utils/argv-rewrite.test.ts +0 -149
  86. package/src/utils/argv-rewrite.ts +0 -269
  87. package/src/utils/errors.test.ts +0 -85
  88. package/src/utils/errors.ts +0 -191
  89. package/src/utils/examples.test.ts +0 -374
  90. package/src/utils/output.test.ts +0 -65
  91. package/src/utils/output.ts +0 -154
  92. package/src/utils/schema-fields.ts +0 -1016
  93. package/tsconfig.json +0 -20
  94. package/tsup.config.ts +0 -13
@@ -1,33 +1,13 @@
1
1
  import {
2
+ buildJsonSuccess,
2
3
  getSchemaFieldTypeDefinitions,
3
- resolveSchemaFieldType,
4
- } from "./schema-fields.js";
5
- import { buildJsonSuccess } from "./output.js";
4
+ resolveSchemaFieldType
5
+ } from "./chunk-MHEVRMDX.js";
6
6
 
7
- export interface CommandExample {
8
- command: string;
9
- description: string;
10
- raw?: string;
11
- response?: string;
12
- }
13
-
14
- export function buildCommandExample(example: CommandExample): CommandExample {
15
- return {
16
- command: example.command,
17
- description: example.description,
18
- raw: example.raw,
19
- response: example.response,
20
- };
21
- }
22
-
23
- export function buildCommandExamples(examples: readonly CommandExample[]): readonly CommandExample[] {
24
- return examples.map((example) => buildCommandExample(example));
25
- }
26
-
27
- const SAMPLE_UUID = "550e8400-e29b-41d4-a716-446655440001";
28
-
29
- const specificExamples: Record<string, readonly CommandExample[]> = {
30
- "formulas recompute field": buildCommandExamples([
7
+ // src/utils/examples.ts
8
+ var SAMPLE_UUID = "550e8400-e29b-41d4-a716-446655440001";
9
+ var specificExamples = {
10
+ "formulas recompute field": [
31
11
  {
32
12
  description: "Queue a full recalculation of one formula column.",
33
13
  command: "zinkee --json formulas recompute field invoices total",
@@ -43,10 +23,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
43
23
  "skippedFormulaCount": 0,
44
24
  "eventsQueued": 1,
45
25
  "status": "QUEUED"
46
- }`,
47
- },
48
- ]),
49
- "formulas recompute schema": buildCommandExamples([
26
+ }`
27
+ }
28
+ ],
29
+ "formulas recompute schema": [
50
30
  {
51
31
  description: "Queue recalculation of every active formula in one schema.",
52
32
  command: "zinkee --json formulas recompute schema invoices --yes",
@@ -61,10 +41,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
61
41
  "skippedFormulaCount": 1,
62
42
  "eventsQueued": 8,
63
43
  "status": "QUEUED"
64
- }`,
65
- },
66
- ]),
67
- "formulas recompute workspace": buildCommandExamples([
44
+ }`
45
+ }
46
+ ],
47
+ "formulas recompute workspace": [
68
48
  {
69
49
  description: "Queue recalculation of every active formula in the workspace.",
70
50
  command: "zinkee --json formulas recompute workspace --yes",
@@ -78,13 +58,12 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
78
58
  "skippedFormulaCount": 2,
79
59
  "eventsQueued": 24,
80
60
  "status": "QUEUED"
81
- }`,
82
- },
83
- ]),
84
- "profiles list": buildCommandExamples([
61
+ }`
62
+ }
63
+ ],
64
+ "profiles list": [
85
65
  {
86
- description:
87
- "List all local profiles. The CLI always redacts the apiKey to ******** plus the last 4 chars.",
66
+ description: "List all local profiles. The CLI always redacts the apiKey to ******** plus the last 4 chars.",
88
67
  command: "zinkee --json profiles list",
89
68
  response: `[
90
69
  {
@@ -99,10 +78,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
99
78
  "apiKey": "********4321",
100
79
  "baseUrl": "http://localhost:8088"
101
80
  }
102
- ]`,
103
- },
104
- ]),
105
- "profiles get": buildCommandExamples([
81
+ ]`
82
+ }
83
+ ],
84
+ "profiles get": [
106
85
  {
107
86
  description: "Show one profile by name.",
108
87
  command: "zinkee --json profiles get prod",
@@ -111,54 +90,50 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
111
90
  "isDefault": true,
112
91
  "apiKey": "********cdef",
113
92
  "baseUrl": "https://api.zinkee.com"
114
- }`,
115
- },
116
- ]),
117
- "profiles use": buildCommandExamples([
93
+ }`
94
+ }
95
+ ],
96
+ "profiles use": [
118
97
  {
119
98
  description: "Set a profile as the default one used when --profile is not passed.",
120
99
  command: "zinkee --json profiles use local",
121
100
  response: `{
122
101
  "profile": "local",
123
102
  "defaultProfile": "local"
124
- }`,
125
- },
126
- ]),
127
- "profiles add": buildCommandExamples([
103
+ }`
104
+ }
105
+ ],
106
+ "profiles add": [
128
107
  {
129
- description:
130
- "Add a new profile with an explicit base URL. Becomes the default if no other profile existed.",
131
- command:
132
- "zinkee --json profiles add prod --api-key sk-prod-9f3a2c1b-1234567890abcdef --base-url https://api.zinkee.com",
108
+ description: "Add a new profile with an explicit base URL. Becomes the default if no other profile existed.",
109
+ command: "zinkee --json profiles add prod --api-key sk-prod-9f3a2c1b-1234567890abcdef --base-url https://api.zinkee.com",
133
110
  response: `{
134
111
  "name": "prod",
135
112
  "isDefault": true,
136
113
  "apiKey": "********cdef",
137
114
  "baseUrl": "https://api.zinkee.com"
138
- }`,
115
+ }`
139
116
  },
140
117
  {
141
- description:
142
- "Add a profile without --base-url (the runtime falls back to the production URL at call time).",
143
- command: "zinkee --json profiles add staging --api-key sk-staging-7777aaaa-bbbbccccddddeeee",
118
+ description: "Add a profile without --base-url (the runtime falls back to the production URL at call time).",
119
+ command: "zinkee --json profiles add staging --api-key sk-REPLACE_WITH_YOUR_API_KEY",
144
120
  response: `{
145
121
  "name": "staging",
146
122
  "isDefault": false,
147
123
  "apiKey": "********eeee"
148
- }`,
149
- },
150
- ]),
151
- "profiles update": buildCommandExamples([
124
+ }`
125
+ }
126
+ ],
127
+ "profiles update": [
152
128
  {
153
129
  description: "Rotate just the API key of an existing profile.",
154
- command:
155
- "zinkee --json profiles update prod --api-key sk-prod-0000new0-fedcba0987654321",
130
+ command: "zinkee --json profiles update prod --api-key sk-prod-0000new0-fedcba0987654321",
156
131
  response: `{
157
132
  "name": "prod",
158
133
  "isDefault": true,
159
134
  "apiKey": "********4321",
160
135
  "baseUrl": "https://api.zinkee.com"
161
- }`,
136
+ }`
162
137
  },
163
138
  {
164
139
  description: "Point an existing profile at a different base URL (useful when moving envs).",
@@ -168,33 +143,31 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
168
143
  "isDefault": false,
169
144
  "apiKey": "********4321",
170
145
  "baseUrl": "http://localhost:9090"
171
- }`,
172
- },
173
- ]),
174
- "profiles remove": buildCommandExamples([
146
+ }`
147
+ }
148
+ ],
149
+ "profiles remove": [
175
150
  {
176
- description:
177
- "Remove a profile. If it was the default, defaultProfile becomes null and you should set a new one with profiles use.",
151
+ description: "Remove a profile. If it was the default, defaultProfile becomes null and you should set a new one with profiles use.",
178
152
  command: "zinkee --json profiles remove staging",
179
153
  response: `{
180
154
  "profile": "staging",
181
155
  "defaultProfile": "prod"
182
- }`,
183
- },
184
- ]),
185
- "config path": buildCommandExamples([
156
+ }`
157
+ }
158
+ ],
159
+ "config path": [
186
160
  {
187
161
  description: "Print the path of the config file the CLI is reading right now.",
188
162
  command: "zinkee --json config path",
189
163
  response: `{
190
164
  "path": "/home/guillermo/.config/zinkee/config.json"
191
- }`,
192
- },
193
- ]),
194
- "config show": buildCommandExamples([
165
+ }`
166
+ }
167
+ ],
168
+ "config show": [
195
169
  {
196
- description:
197
- "Dump the whole config with secrets redacted. Same ******** + last 4 chars mask that profiles list uses.",
170
+ description: "Dump the whole config with secrets redacted. Same ******** + last 4 chars mask that profiles list uses.",
198
171
  command: "zinkee --json config show",
199
172
  response: `{
200
173
  "defaultProfile": "prod",
@@ -208,25 +181,23 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
208
181
  "baseUrl": "http://localhost:8088"
209
182
  }
210
183
  }
211
- }`,
212
- },
213
- ]),
214
- "config validate": buildCommandExamples([
184
+ }`
185
+ }
186
+ ],
187
+ "config validate": [
215
188
  {
216
- description:
217
- "Validate that the local config resolves a profile. Useful as a CI gate before running other commands.",
189
+ description: "Validate that the local config resolves a profile. Useful as a CI gate before running other commands.",
218
190
  command: "zinkee --json config validate",
219
191
  response: `{
220
192
  "valid": true,
221
193
  "profile": "prod"
222
- }`,
223
- },
224
- ]),
225
- "schemas create": buildCommandExamples([
194
+ }`
195
+ }
196
+ ],
197
+ "schemas create": [
226
198
  {
227
199
  description: "Create an auditable and commentable schema from flags.",
228
- command:
229
- 'zinkee --json schemas create --name "Codex Demo" --slug codex-demo --auditable --commentable',
200
+ command: 'zinkee --json schemas create --name "Codex Demo" --slug codex-demo --auditable --commentable',
230
201
  raw: `{
231
202
  "name": "Codex Demo",
232
203
  "slug": "codex-demo",
@@ -241,34 +212,32 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
241
212
  "name": "root",
242
213
  "isRoot": true
243
214
  }
244
- }`,
215
+ }`
245
216
  },
246
217
  {
247
218
  description: "Minimal create with just name and slug.",
248
- command: 'zinkee --json schemas create --name Leads --slug leads',
219
+ command: "zinkee --json schemas create --name Leads --slug leads",
249
220
  raw: `{
250
221
  "name": "Leads",
251
222
  "slug": "leads"
252
- }`,
223
+ }`
253
224
  },
254
225
  {
255
- description:
256
- "Create an auditable schema inside an existing navigation folder (folder id can be a UUID or the exact folder name).",
257
- command:
258
- 'zinkee --json schemas create --name Tasks --slug tasks --auditable --folder 7f4e7c25-d8b2-4c1a-9f3e-6a7b5c8d9e1f',
226
+ description: "Create an auditable schema inside an existing navigation folder (folder id can be a UUID or the exact folder name).",
227
+ command: "zinkee --json schemas create --name Tasks --slug tasks --auditable --folder 7f4e7c25-d8b2-4c1a-9f3e-6a7b5c8d9e1f",
259
228
  raw: `{
260
229
  "name": "Tasks",
261
230
  "slug": "tasks",
262
231
  "auditable": true,
263
232
  "commentable": false,
264
233
  "folderId": "7f4e7c25-d8b2-4c1a-9f3e-6a7b5c8d9e1f"
265
- }`,
266
- },
267
- ]),
268
- "schemas update": buildCommandExamples([
234
+ }`
235
+ }
236
+ ],
237
+ "schemas update": [
269
238
  {
270
239
  description: "Toggle the commentable flag on a schema.",
271
- command: 'zinkee --json schemas update contacts --commentable true',
240
+ command: "zinkee --json schemas update contacts --commentable true",
272
241
  raw: `{
273
242
  "commentable": true
274
243
  }`,
@@ -300,40 +269,35 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
300
269
  }
301
270
  ],
302
271
  "uniqueFields": []
303
- }`,
272
+ }`
304
273
  },
305
274
  {
306
275
  description: "Rename a schema and change its slug.",
307
- command:
308
- 'zinkee --json schemas update contacts --name "Customer Contacts" --slug customer-contacts',
276
+ command: 'zinkee --json schemas update contacts --name "Customer Contacts" --slug customer-contacts',
309
277
  raw: `{
310
278
  "name": "Customer Contacts",
311
279
  "slug": "customer-contacts"
312
- }`,
280
+ }`
313
281
  },
314
282
  {
315
283
  description: "Enable the audit log on a schema.",
316
- command: 'zinkee --json schemas update contacts --auditable true',
284
+ command: "zinkee --json schemas update contacts --auditable true",
317
285
  raw: `{
318
286
  "auditable": true
319
- }`,
287
+ }`
320
288
  },
321
289
  {
322
- description:
323
- "Set the schema's highlighted (main) field — the field whose value names each record in the UI (activity-panel title and detail-view record list).",
324
- command:
325
- 'zinkee --json schemas update contacts --highlighted-field contact-name',
290
+ description: "Set the schema's highlighted (main) field \u2014 the field whose value names each record in the UI (activity-panel title and detail-view record list).",
291
+ command: "zinkee --json schemas update contacts --highlighted-field contact-name",
326
292
  raw: `{
327
293
  "highlightedField": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
328
- }`,
329
- },
330
- ]),
331
- "schemas set-unique-fields": buildCommandExamples([
294
+ }`
295
+ }
296
+ ],
297
+ "schemas set-unique-fields": [
332
298
  {
333
- description:
334
- "Set a composite unique constraint: the listed fields must be unique together across records.",
335
- command:
336
- "zinkee --json schemas set-unique-fields contacts --field contact-name --field notes",
299
+ description: "Set a composite unique constraint: the listed fields must be unique together across records.",
300
+ command: "zinkee --json schemas set-unique-fields contacts --field contact-name --field notes",
337
301
  raw: `{
338
302
  "fieldIds": [
339
303
  "c60b8526-5835-4c9f-aecd-9a16c7704a34",
@@ -384,7 +348,7 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
384
348
  "c60b8526-5835-4c9f-aecd-9a16c7704a34",
385
349
  "1d2e3f4a-5b6c-7d8e-9f01-23456789abcd"
386
350
  ]
387
- }`,
351
+ }`
388
352
  },
389
353
  {
390
354
  description: "Set a single-field unique constraint.",
@@ -393,37 +357,34 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
393
357
  "fieldIds": [
394
358
  "c60b8526-5835-4c9f-aecd-9a16c7704a34"
395
359
  ]
396
- }`,
360
+ }`
397
361
  },
398
362
  {
399
363
  description: "Clear the unique constraint (no field must be unique anymore).",
400
364
  command: "zinkee --json schemas set-unique-fields contacts --clear",
401
365
  raw: `{
402
366
  "fieldIds": []
403
- }`,
404
- },
405
- ]),
406
- "schemas fields update": buildCommandExamples([
367
+ }`
368
+ }
369
+ ],
370
+ "schemas fields update": [
407
371
  {
408
372
  description: "Set the field description without changing its label or configuration.",
409
- command:
410
- 'zinkee --json schemas fields update contacts contact-name --description "Primary name shown for the customer"',
373
+ command: 'zinkee --json schemas fields update contacts contact-name --description "Primary name shown for the customer"',
411
374
  raw: `{
412
375
  "description": "Primary name shown for the customer"
413
- }`,
376
+ }`
414
377
  },
415
378
  {
416
379
  description: "Clear the field description.",
417
- command:
418
- 'zinkee --json schemas fields update contacts contact-name --description ""',
380
+ command: 'zinkee --json schemas fields update contacts contact-name --description ""',
419
381
  raw: `{
420
382
  "description": ""
421
- }`,
383
+ }`
422
384
  },
423
385
  {
424
386
  description: "Rename slug and label.",
425
- command:
426
- `zinkee --json schemas fields update contacts contact-name --label "Customer Full Name" --raw '{"slug":"customer-full-name"}'`,
387
+ command: `zinkee --json schemas fields update contacts contact-name --label "Customer Full Name" --raw '{"slug":"customer-full-name"}'`,
427
388
  raw: `{
428
389
  "slug": "customer-full-name",
429
390
  "label": "Customer Full Name"
@@ -432,19 +393,18 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
432
393
  "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
433
394
  "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
434
395
  "slug": "customer-full-name"
435
- }`,
396
+ }`
436
397
  },
437
398
  {
438
399
  description: "Toggle required.",
439
400
  command: "zinkee --json schemas fields update contacts status --required true",
440
401
  raw: `{
441
402
  "required": true
442
- }`,
403
+ }`
443
404
  },
444
405
  {
445
406
  description: "Patch text field (long with default).",
446
- command:
447
- `zinkee --json schemas fields update contacts contact-name --raw '{"type":"TextField","label":"Customer Full Name","required":false,"config":{"textType":"LONG","defaultValue":"Unknown","conditionalFormatting":[]}}'`,
407
+ command: `zinkee --json schemas fields update contacts contact-name --raw '{"type":"TextField","label":"Customer Full Name","required":false,"config":{"textType":"LONG","defaultValue":"Unknown","conditionalFormatting":[]}}'`,
448
408
  raw: `{
449
409
  "type": "TextField",
450
410
  "label": "Customer Full Name",
@@ -454,12 +414,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
454
414
  "defaultValue": "Unknown",
455
415
  "conditionalFormatting": []
456
416
  }
457
- }`,
417
+ }`
458
418
  },
459
419
  {
460
420
  description: "Patch number field (to currency).",
461
- command:
462
- `zinkee --json schemas fields update contacts amount --raw '{"type":"NumberField","config":{"defaultValue":"0","formatOptions":{"format":"currency","decimals":2,"thousandsSeparator":true,"symbolEnabled":true,"symbolPosition":"before","symbolValue":"€"},"conditionalFormatting":[]}}'`,
421
+ command: `zinkee --json schemas fields update contacts amount --raw '{"type":"NumberField","config":{"defaultValue":"0","formatOptions":{"format":"currency","decimals":2,"thousandsSeparator":true,"symbolEnabled":true,"symbolPosition":"before","symbolValue":"\u20AC"},"conditionalFormatting":[]}}'`,
463
422
  raw: `{
464
423
  "type": "NumberField",
465
424
  "config": {
@@ -470,16 +429,15 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
470
429
  "thousandsSeparator": true,
471
430
  "symbolEnabled": true,
472
431
  "symbolPosition": "before",
473
- "symbolValue": "€"
432
+ "symbolValue": "\u20AC"
474
433
  },
475
434
  "conditionalFormatting": []
476
435
  }
477
- }`,
436
+ }`
478
437
  },
479
438
  {
480
439
  description: "Patch number field (to percentage).",
481
- command:
482
- `zinkee --json schemas fields update contacts discount-rate --raw '{"type":"NumberField","config":{"defaultValue":"0","formatOptions":{"format":"percentage","decimals":1},"conditionalFormatting":[]}}'`,
440
+ command: `zinkee --json schemas fields update contacts discount-rate --raw '{"type":"NumberField","config":{"defaultValue":"0","formatOptions":{"format":"percentage","decimals":1},"conditionalFormatting":[]}}'`,
483
441
  raw: `{
484
442
  "type": "NumberField",
485
443
  "config": {
@@ -490,12 +448,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
490
448
  },
491
449
  "conditionalFormatting": []
492
450
  }
493
- }`,
451
+ }`
494
452
  },
495
453
  {
496
454
  description: "Patch date field (to date only).",
497
- command:
498
- `zinkee --json schemas fields update contacts due-date --raw '{"type":"DateField","config":{"defaultValue":null,"formatOptions":{"format":"date","dateFormat":"YYYY-MM-DD","showTime":false},"conditionalFormatting":[]}}'`,
455
+ command: `zinkee --json schemas fields update contacts due-date --raw '{"type":"DateField","config":{"defaultValue":null,"formatOptions":{"format":"date","dateFormat":"YYYY-MM-DD","showTime":false},"conditionalFormatting":[]}}'`,
499
456
  raw: `{
500
457
  "type": "DateField",
501
458
  "config": {
@@ -507,12 +464,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
507
464
  },
508
465
  "conditionalFormatting": []
509
466
  }
510
- }`,
467
+ }`
511
468
  },
512
469
  {
513
470
  description: "Patch option field (button cycle).",
514
- command:
515
- `zinkee --json schemas fields update contacts stage --raw '{"type":"OptionField","config":{"options":[{"id":1,"name":"To Do","color":"default"},{"id":2,"name":"Doing","color":"warning"},{"id":3,"name":"Done","color":"success"}],"defaultValue":1,"conditionalFormatting":[],"buttonConfig":{"displayMode":"button","buttonBehavior":{"mode":"cycle","cycleOrder":[1,2,3],"allowReselect":true}}}}'`,
471
+ command: `zinkee --json schemas fields update contacts stage --raw '{"type":"OptionField","config":{"options":[{"id":1,"name":"To Do","color":"default"},{"id":2,"name":"Doing","color":"warning"},{"id":3,"name":"Done","color":"success"}],"defaultValue":1,"conditionalFormatting":[],"buttonConfig":{"displayMode":"button","buttonBehavior":{"mode":"cycle","cycleOrder":[1,2,3],"allowReselect":true}}}}'`,
516
472
  raw: `{
517
473
  "type": "OptionField",
518
474
  "config": {
@@ -532,12 +488,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
532
488
  }
533
489
  }
534
490
  }
535
- }`,
491
+ }`
536
492
  },
537
493
  {
538
494
  description: "Patch option field (drop button mode).",
539
- command:
540
- `zinkee --json schemas fields update contacts status --raw '{"type":"OptionField","config":{"options":[{"id":1,"name":"Open","color":"default"},{"id":2,"name":"In Progress","color":"warning"},{"id":3,"name":"Done","color":"success"}],"defaultValue":1,"conditionalFormatting":[],"buttonConfig":null}}'`,
495
+ command: `zinkee --json schemas fields update contacts status --raw '{"type":"OptionField","config":{"options":[{"id":1,"name":"Open","color":"default"},{"id":2,"name":"In Progress","color":"warning"},{"id":3,"name":"Done","color":"success"}],"defaultValue":1,"conditionalFormatting":[],"buttonConfig":null}}'`,
541
496
  raw: `{
542
497
  "type": "OptionField",
543
498
  "config": {
@@ -550,12 +505,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
550
505
  "conditionalFormatting": [],
551
506
  "buttonConfig": null
552
507
  }
553
- }`,
508
+ }`
554
509
  },
555
510
  {
556
511
  description: "Patch formula field (formula text).",
557
- command:
558
- `zinkee --json schemas fields update contacts formula-total --raw '{"type":"FormulaField","config":{"formulaText":"c52efe3f-2825-4c60-a7e3-34dd4c1ce043 * 1.10","uiFormatKind":"number","status":"ACTIVE","numberFormatOptions":{"format":"number","decimals":2,"thousandsSeparator":true},"conditionalFormatting":[]}}'`,
512
+ command: `zinkee --json schemas fields update contacts formula-total --raw '{"type":"FormulaField","config":{"formulaText":"c52efe3f-2825-4c60-a7e3-34dd4c1ce043 * 1.10","uiFormatKind":"number","status":"ACTIVE","numberFormatOptions":{"format":"number","decimals":2,"thousandsSeparator":true},"conditionalFormatting":[]}}'`,
559
513
  raw: `{
560
514
  "type": "FormulaField",
561
515
  "config": {
@@ -569,12 +523,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
569
523
  },
570
524
  "conditionalFormatting": []
571
525
  }
572
- }`,
526
+ }`
573
527
  },
574
528
  {
575
529
  description: "Patch reference field (delete behavior).",
576
- command:
577
- `zinkee --json schemas fields update contacts customer-ref --raw '{"type":"ReferenceField","config":{"targetSchema":"5223cbc8-8c6c-4694-93bc-dd176364df9b","targetDisplayField":"c60b8526-5835-4c9f-aecd-9a16c7704a34","deleteBehavior":"RESTRICT","defaultValue":null,"filterFields":[],"descriptionFields":[],"conditionalFormatting":[]}}'`,
530
+ command: `zinkee --json schemas fields update contacts customer-ref --raw '{"type":"ReferenceField","config":{"targetSchema":"5223cbc8-8c6c-4694-93bc-dd176364df9b","targetDisplayField":"c60b8526-5835-4c9f-aecd-9a16c7704a34","deleteBehavior":"RESTRICT","defaultValue":null,"filterFields":[],"descriptionFields":[],"conditionalFormatting":[]}}'`,
578
531
  raw: `{
579
532
  "type": "ReferenceField",
580
533
  "config": {
@@ -586,12 +539,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
586
539
  "descriptionFields": [],
587
540
  "conditionalFormatting": []
588
541
  }
589
- }`,
542
+ }`
590
543
  },
591
544
  {
592
545
  description: "Patch schedule field (to daily).",
593
- command:
594
- `zinkee --json schemas fields update contacts recurrence --raw '{"type":"ScheduleField","config":{"referenceField":"c52efe3f-2825-4c60-a7e3-34dd4c1ce043","beginningPeriodField":"d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90","endingPeriodField":"d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90","frequency":"daily"}}'`,
546
+ command: `zinkee --json schemas fields update contacts recurrence --raw '{"type":"ScheduleField","config":{"referenceField":"c52efe3f-2825-4c60-a7e3-34dd4c1ce043","beginningPeriodField":"d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90","endingPeriodField":"d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90","frequency":"daily"}}'`,
595
547
  raw: `{
596
548
  "type": "ScheduleField",
597
549
  "config": {
@@ -600,14 +552,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
600
552
  "endingPeriodField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
601
553
  "frequency": "daily"
602
554
  }
603
- }`,
604
- },
605
- ]),
606
- "records query": buildCommandExamples([
555
+ }`
556
+ }
557
+ ],
558
+ "records query": [
607
559
  {
608
560
  description: "Lookup a single record by id.",
609
- command:
610
- 'zinkee --json records query contacts --select id,contact-name --where "id eq 550e8400-e29b-41d4-a716-446655440000" --sort id:desc --limit 10',
561
+ command: 'zinkee --json records query contacts --select id,contact-name --where "id eq 550e8400-e29b-41d4-a716-446655440000" --sort id:desc --limit 10',
611
562
  raw: `{
612
563
  "select": ["id", "contact-name"],
613
564
  "where": [
@@ -636,13 +587,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
636
587
  "count": 1,
637
588
  "hasMore": false
638
589
  }
639
- }`,
590
+ }`
640
591
  },
641
592
  {
642
- description:
643
- "Filter by multiple conditions and sort by amount then name.",
644
- command:
645
- `zinkee --json records query contacts --select id,contact-name,status,amount --where "status in 1,2" --where "amount gte 500" --sort amount:desc --sort contact-name:asc --limit 25`,
593
+ description: "Filter by multiple conditions and sort by amount then name.",
594
+ command: `zinkee --json records query contacts --select id,contact-name,status,amount --where "status in 1,2" --where "amount gte 500" --sort amount:desc --sort contact-name:asc --limit 25`,
646
595
  raw: `{
647
596
  "select": ["id", "contact-name", "status", "amount"],
648
597
  "where": [
@@ -654,12 +603,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
654
603
  { "field": "contact-name", "direction": "ASC" }
655
604
  ],
656
605
  "page": { "offset": 0, "limit": 25 }
657
- }`,
606
+ }`
658
607
  },
659
608
  {
660
609
  description: "Filter by status with a free-text search term.",
661
- command:
662
- `zinkee --json records query contacts --select id,contact-name,status --where "status in OPEN" --search garcia --limit 25`,
610
+ command: `zinkee --json records query contacts --select id,contact-name,status --where "status in OPEN" --search garcia --limit 25`,
663
611
  raw: `{
664
612
  "select": ["id", "contact-name", "status"],
665
613
  "where": [
@@ -667,24 +615,22 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
667
615
  ],
668
616
  "search": { "term": "garcia" },
669
617
  "page": { "offset": 0, "limit": 25 }
670
- }`,
618
+ }`
671
619
  },
672
620
  {
673
621
  description: "Text contains search.",
674
- command:
675
- 'zinkee --json records query contacts --select id,contact-name,contact-email --where "contact-name contains Lovelace" --limit 50',
622
+ command: 'zinkee --json records query contacts --select id,contact-name,contact-email --where "contact-name contains Lovelace" --limit 50',
676
623
  raw: `{
677
624
  "select": ["id", "contact-name", "contact-email"],
678
625
  "where": [
679
626
  { "field": "contact-name", "op": "contains", "value": "Lovelace" }
680
627
  ],
681
628
  "page": { "offset": 0, "limit": 50 }
682
- }`,
629
+ }`
683
630
  },
684
631
  {
685
632
  description: "Records with a non-empty due-date inside a date range.",
686
- command:
687
- 'zinkee --json records query contacts --where "due-date is_not_empty" --where "due-date lte 2026-12-31T23:59:59Z" --sort due-date:asc',
633
+ command: 'zinkee --json records query contacts --where "due-date is_not_empty" --where "due-date lte 2026-12-31T23:59:59Z" --sort due-date:asc',
688
634
  raw: `{
689
635
  "where": [
690
636
  { "field": "due-date", "op": "is_not_empty" },
@@ -693,65 +639,58 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
693
639
  "sort": [
694
640
  { "field": "due-date", "direction": "ASC" }
695
641
  ]
696
- }`,
642
+ }`
697
643
  },
698
644
  {
699
645
  description: "Records whose status is not equal to a value.",
700
- command:
701
- 'zinkee --json records query contacts --where "status neq 0"',
646
+ command: 'zinkee --json records query contacts --where "status neq 0"',
702
647
  raw: `{
703
648
  "where": [
704
649
  { "field": "status", "op": "neq", "value": 0 }
705
650
  ]
706
- }`,
651
+ }`
707
652
  },
708
653
  {
709
654
  description: "Records with an amount greater than a threshold.",
710
- command:
711
- 'zinkee --json records query contacts --where "amount gt 1000"',
655
+ command: 'zinkee --json records query contacts --where "amount gt 1000"',
712
656
  raw: `{
713
657
  "where": [
714
658
  { "field": "amount", "op": "gt", "value": 1000 }
715
659
  ]
716
- }`,
660
+ }`
717
661
  },
718
662
  {
719
663
  description: "Records with an amount less than a threshold.",
720
- command:
721
- 'zinkee --json records query contacts --where "amount lt 100"',
664
+ command: 'zinkee --json records query contacts --where "amount lt 100"',
722
665
  raw: `{
723
666
  "where": [
724
667
  { "field": "amount", "op": "lt", "value": 100 }
725
668
  ]
726
- }`,
669
+ }`
727
670
  },
728
671
  {
729
672
  description: "Records whose due-date is empty.",
730
- command:
731
- 'zinkee --json records query contacts --where "due-date is_empty"',
673
+ command: 'zinkee --json records query contacts --where "due-date is_empty"',
732
674
  raw: `{
733
675
  "where": [
734
676
  { "field": "due-date", "op": "is_empty" }
735
677
  ]
736
- }`,
678
+ }`
737
679
  },
738
680
  {
739
681
  description: "Records whose contact-email is not empty.",
740
- command:
741
- 'zinkee --json records query contacts --where "contact-email is_not_empty"',
682
+ command: 'zinkee --json records query contacts --where "contact-email is_not_empty"',
742
683
  raw: `{
743
684
  "where": [
744
685
  { "field": "contact-email", "op": "is_not_empty" }
745
686
  ]
746
- }`,
747
- },
748
- ]),
749
- "records create": buildCommandExamples([
687
+ }`
688
+ }
689
+ ],
690
+ "records create": [
750
691
  {
751
- description:
752
- "Create a single record with --set/--set-json (the single-record flags build one record, sent as a one-element 'records' array).",
753
- command:
754
- `zinkee --json records create contacts --set contact-name="Ada Lovelace" --set contact-email=ada@example.com`,
692
+ description: "Create a single record with --set/--set-json (the single-record flags build one record, sent as a one-element 'records' array).",
693
+ command: `zinkee --json records create contacts --set contact-name="Ada Lovelace" --set contact-email=ada@example.com`,
755
694
  raw: `{
756
695
  "records": [
757
696
  {
@@ -765,11 +704,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
765
704
  "550e8400-e29b-41d4-a716-446655440000"
766
705
  ],
767
706
  "errors": []
768
- }`,
707
+ }`
769
708
  },
770
709
  {
771
- description:
772
- "Create many records from a JSON array file (one object per record, slug -> value). Best-effort: valid records are created and invalid ones are reported per index in 'errors'. ReferenceField values accept the target record id (a bare UUID, or the compound 'recordId::anything' whose label is ignored) or an exact display value; the server stores the canonical 'recordId::displayValue'.",
710
+ description: "Create many records from a JSON array file (one object per record, slug -> value). Best-effort: valid records are created and invalid ones are reported per index in 'errors'. ReferenceField values accept the target record id (a bare UUID, or the compound 'recordId::anything' whose label is ignored) or an exact display value; the server stores the canonical 'recordId::displayValue'.",
773
711
  command: `zinkee --json records create contacts --records-file ./records.json`,
774
712
  raw: `{
775
713
  "records": [
@@ -800,13 +738,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
800
738
  "action": "Use a valid field slug from the schema and retry."
801
739
  }
802
740
  ]
803
- }`,
741
+ }`
804
742
  },
805
743
  {
806
- description:
807
- "Set a ReferenceField by the target record id (a bare UUID, or the compound 'recordId::anything' whose label is ignored) or by an exact display value. The server resolves and stores the canonical 'recordId::displayValue'. Unknown references are rejected per index with reason 'data_field_reference_not_found'.",
808
- command:
809
- `zinkee --json records create deals --set deal-name="Acme renewal" --set customer-ref=00000000-0000-0000-0000-000000000000`,
744
+ description: "Set a ReferenceField by the target record id (a bare UUID, or the compound 'recordId::anything' whose label is ignored) or by an exact display value. The server resolves and stores the canonical 'recordId::displayValue'. Unknown references are rejected per index with reason 'data_field_reference_not_found'.",
745
+ command: `zinkee --json records create deals --set deal-name="Acme renewal" --set customer-ref=00000000-0000-0000-0000-000000000000`,
810
746
  raw: `{
811
747
  "records": [
812
748
  {
@@ -825,14 +761,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
825
761
  "action": "Use an existing record id or an existing display value for this reference field."
826
762
  }
827
763
  ]
828
- }`,
829
- },
830
- ]),
831
- "records update": buildCommandExamples([
764
+ }`
765
+ }
766
+ ],
767
+ "records update": [
832
768
  {
833
769
  description: "Set one field and unset another.",
834
- command:
835
- 'zinkee --json records update contacts 550e8400-e29b-41d4-a716-446655440000 --set contact-name="Ada Lovelace Updated" --unset contact-email',
770
+ command: 'zinkee --json records update contacts 550e8400-e29b-41d4-a716-446655440000 --set contact-name="Ada Lovelace Updated" --unset contact-email',
836
771
  raw: `{
837
772
  "set": {
838
773
  "contact-name": "Ada Lovelace Updated"
@@ -848,12 +783,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
848
783
  "due-date": "2026-05-15T12:00:00Z",
849
784
  "owner": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
850
785
  }
851
- }`,
786
+ }`
852
787
  },
853
788
  {
854
789
  description: "Patch multiple typed values at once.",
855
- command:
856
- 'zinkee --json records update contacts 550e8400-e29b-41d4-a716-446655440000 --set status=3 --set amount=2500.00 --set due-date=2026-07-01T09:00:00Z --set owner=6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d',
790
+ command: "zinkee --json records update contacts 550e8400-e29b-41d4-a716-446655440000 --set status=3 --set amount=2500.00 --set due-date=2026-07-01T09:00:00Z --set owner=6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d",
857
791
  raw: `{
858
792
  "set": {
859
793
  "status": 3,
@@ -861,21 +795,18 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
861
795
  "due-date": "2026-07-01T09:00:00Z",
862
796
  "owner": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
863
797
  }
864
- }`,
798
+ }`
865
799
  },
866
800
  {
867
801
  description: "Unset only (clear fields).",
868
- command:
869
- 'zinkee --json records update contacts 550e8400-e29b-41d4-a716-446655440000 --unset contact-email --unset due-date',
802
+ command: "zinkee --json records update contacts 550e8400-e29b-41d4-a716-446655440000 --unset contact-email --unset due-date",
870
803
  raw: `{
871
804
  "unset": ["contact-email", "due-date"]
872
- }`,
805
+ }`
873
806
  },
874
807
  {
875
- description:
876
- "Set a ReferenceField on an existing record. Pass the target record id (a bare UUID, or the compound 'recordId::anything' whose label is ignored) or an exact display value; the response shows the canonical 'recordId::displayValue' the server stored. If the reference doesn't exist the whole update is rejected with reason 'data_field_reference_not_found'.",
877
- command:
878
- 'zinkee --json records update deals 550e8400-e29b-41d4-a716-446655440000 --set customer-ref=8ad602a1-f6e3-43f6-9ab2-f1c5afc99621',
808
+ description: "Set a ReferenceField on an existing record. Pass the target record id (a bare UUID, or the compound 'recordId::anything' whose label is ignored) or an exact display value; the response shows the canonical 'recordId::displayValue' the server stored. If the reference doesn't exist the whole update is rejected with reason 'data_field_reference_not_found'.",
809
+ command: "zinkee --json records update deals 550e8400-e29b-41d4-a716-446655440000 --set customer-ref=8ad602a1-f6e3-43f6-9ab2-f1c5afc99621",
879
810
  raw: `{
880
811
  "set": {
881
812
  "customer-ref": "8ad602a1-f6e3-43f6-9ab2-f1c5afc99621"
@@ -887,14 +818,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
887
818
  "deal-name": "Acme renewal",
888
819
  "customer-ref": "8ad602a1-f6e3-43f6-9ab2-f1c5afc99621::Acme Corp"
889
820
  }
890
- }`,
891
- },
892
- ]),
893
- "comments create": buildCommandExamples([
821
+ }`
822
+ }
823
+ ],
824
+ "comments create": [
894
825
  {
895
826
  description: "Plain text comment on a record (uses --text).",
896
- command:
897
- `zinkee --json comments create contacts 550e8400-e29b-41d4-a716-446655440000 --text "This record needs review."`,
827
+ command: `zinkee --json comments create contacts 550e8400-e29b-41d4-a716-446655440000 --text "This record needs review."`,
898
828
  raw: `{
899
829
  "content": [
900
830
  {
@@ -911,55 +841,49 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
911
841
  "content": [
912
842
  { "type": "TEXT", "value": "This record needs review." }
913
843
  ]
914
- }`,
844
+ }`
915
845
  },
916
846
  {
917
- description:
918
- "Comment with an inline member mention. Mentions only go through --raw today because --text is plain text.",
919
- command:
920
- `zinkee --json comments create contacts 550e8400-e29b-41d4-a716-446655440000 --raw '{"content":[{"type":"TEXT","value":"Assigning to "},{"type":"MENTION","value":"9f8e7d6c-5b4a-3c2d-1e0f-a1b2c3d4e5f6"},{"type":"TEXT","value":" for follow up."}]}'`,
847
+ description: "Comment with an inline member mention. Mentions only go through --raw today because --text is plain text.",
848
+ command: `zinkee --json comments create contacts 550e8400-e29b-41d4-a716-446655440000 --raw '{"content":[{"type":"TEXT","value":"Assigning to "},{"type":"MENTION","value":"9f8e7d6c-5b4a-3c2d-1e0f-a1b2c3d4e5f6"},{"type":"TEXT","value":" for follow up."}]}'`,
921
849
  raw: `{
922
850
  "content": [
923
851
  { "type": "TEXT", "value": "Assigning to " },
924
852
  { "type": "MENTION", "value": "9f8e7d6c-5b4a-3c2d-1e0f-a1b2c3d4e5f6" },
925
853
  { "type": "TEXT", "value": " for follow up." }
926
854
  ]
927
- }`,
928
- },
929
- ]),
930
- "files download": buildCommandExamples([
855
+ }`
856
+ }
857
+ ],
858
+ "files download": [
931
859
  {
932
- description:
933
- "Download a file to disk (the CLI writes the raw bytes to the --output path; the JSON mode only emits a success envelope).",
934
- command: `zinkee --json files download ${SAMPLE_UUID} --output ./download.bin`,
935
- },
936
- ]),
937
- "files upload": buildCommandExamples([
860
+ description: "Download a file to disk (the CLI writes the raw bytes to the --output path; the JSON mode only emits a success envelope).",
861
+ command: `zinkee --json files download ${SAMPLE_UUID} --output ./download.bin`
862
+ }
863
+ ],
864
+ "files upload": [
938
865
  {
939
- description:
940
- "Upload a local file. The CLI sends the multipart form and the backend returns the generated file id to reference from record FileField values.",
866
+ description: "Upload a local file. The CLI sends the multipart form and the backend returns the generated file id to reference from record FileField values.",
941
867
  command: "zinkee --json files upload ./report.pdf",
942
868
  response: `{
943
869
  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
944
- }`,
945
- },
946
- ]),
947
- "files delete": buildCommandExamples([
870
+ }`
871
+ }
872
+ ],
873
+ "files delete": [
948
874
  {
949
- description:
950
- "Delete a file from workspace storage. Records that still reference the file id keep the stale pointer until updated separately.",
875
+ description: "Delete a file from workspace storage. Records that still reference the file id keep the stale pointer until updated separately.",
951
876
  command: `zinkee --json files delete ${SAMPLE_UUID}`,
952
877
  response: `{
953
878
  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
954
879
  "deleted": true
955
- }`,
956
- },
957
- ]),
958
- "navigation folders create": buildCommandExamples([
880
+ }`
881
+ }
882
+ ],
883
+ "navigation folders create": [
959
884
  {
960
885
  description: "Create a folder with a display order and custom properties.",
961
- command:
962
- `zinkee --json navigation folders create --name Finance --order 20 --props '{"color":"green"}'`,
886
+ command: `zinkee --json navigation folders create --name Finance --order 20 --props '{"color":"green"}'`,
963
887
  raw: `{
964
888
  "name": "Finance",
965
889
  "order": 20,
@@ -970,19 +894,18 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
970
894
  response: `{
971
895
  "folderId": "c5d6e7f8-9012-3456-789a-bcdef0123456",
972
896
  "name": "Finance"
973
- }`,
897
+ }`
974
898
  },
975
899
  {
976
900
  description: "Minimal create with just a name.",
977
- command: 'zinkee --json navigation folders create --name Archive',
901
+ command: "zinkee --json navigation folders create --name Archive",
978
902
  raw: `{
979
903
  "name": "Archive"
980
- }`,
904
+ }`
981
905
  },
982
906
  {
983
907
  description: "Create a folder with color and icon metadata.",
984
- command:
985
- `zinkee --json navigation folders create --name Reports --order 5 --props '{"color":"teal","icon":"chart-line"}'`,
908
+ command: `zinkee --json navigation folders create --name Reports --order 5 --props '{"color":"teal","icon":"chart-line"}'`,
986
909
  raw: `{
987
910
  "name": "Reports",
988
911
  "order": 5,
@@ -990,14 +913,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
990
913
  "color": "teal",
991
914
  "icon": "chart-line"
992
915
  }
993
- }`,
994
- },
995
- ]),
996
- "navigation folders update": buildCommandExamples([
916
+ }`
917
+ }
918
+ ],
919
+ "navigation folders update": [
997
920
  {
998
921
  description: "Rename the folder, change its order, and rewrite its additionalProperties.",
999
- command:
1000
- `zinkee --json navigation folders update Finance --name "Finance Ops" --order 30 --props '{"color":"teal"}'`,
922
+ command: `zinkee --json navigation folders update Finance --name "Finance Ops" --order 30 --props '{"color":"teal"}'`,
1001
923
  raw: `{
1002
924
  "name": "Finance Ops",
1003
925
  "order": 30,
@@ -1008,40 +930,37 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1008
930
  response: `{
1009
931
  "folderId": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a",
1010
932
  "name": "Finance Ops"
1011
- }`,
933
+ }`
1012
934
  },
1013
935
  {
1014
936
  description: "Rename only.",
1015
937
  command: 'zinkee --json navigation folders update Finance --name "Finance (legacy)"',
1016
938
  raw: `{
1017
939
  "name": "Finance (legacy)"
1018
- }`,
940
+ }`
1019
941
  },
1020
942
  {
1021
943
  description: "Change only the display order.",
1022
- command: 'zinkee --json navigation folders update Finance --order 1',
944
+ command: "zinkee --json navigation folders update Finance --order 1",
1023
945
  raw: `{
1024
946
  "order": 1
1025
- }`,
947
+ }`
1026
948
  },
1027
949
  {
1028
950
  description: "Replace only additionalProperties.",
1029
- command:
1030
- `zinkee --json navigation folders update Finance --props '{"color":"red","icon":"archive"}'`,
951
+ command: `zinkee --json navigation folders update Finance --props '{"color":"red","icon":"archive"}'`,
1031
952
  raw: `{
1032
953
  "additionalProperties": {
1033
954
  "color": "red",
1034
955
  "icon": "archive"
1035
956
  }
1036
- }`,
1037
- },
1038
- ]),
1039
- "navigation resources move": buildCommandExamples([
957
+ }`
958
+ }
959
+ ],
960
+ "navigation resources move": [
1040
961
  {
1041
- description:
1042
- "Move a schema into a navigation folder. Only schemas can be moved; the navigation menu holds databases.",
1043
- command:
1044
- 'zinkee --json navigation resources move 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --to Sales',
962
+ description: "Move a schema into a navigation folder. Only schemas can be moved; the navigation menu holds databases.",
963
+ command: "zinkee --json navigation resources move 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --to Sales",
1045
964
  raw: `{
1046
965
  "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1047
966
  "targetFolderId": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a"
@@ -1049,23 +968,21 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1049
968
  response: `{
1050
969
  "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1051
970
  "targetFolderId": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a"
1052
- }`,
971
+ }`
1053
972
  },
1054
973
  {
1055
974
  description: "Move a schema back to the root folder (root is always UUID 00000000-0000-0000-0000-000000000000).",
1056
- command:
1057
- 'zinkee --json navigation resources move 5223cbc8-8c6c-4694-93bc-dd176364df9b --to 00000000-0000-0000-0000-000000000000',
975
+ command: "zinkee --json navigation resources move 5223cbc8-8c6c-4694-93bc-dd176364df9b --to 00000000-0000-0000-0000-000000000000",
1058
976
  raw: `{
1059
977
  "resourceId": "5223cbc8-8c6c-4694-93bc-dd176364df9b",
1060
978
  "targetFolderId": "00000000-0000-0000-0000-000000000000"
1061
- }`,
1062
- },
1063
- ]),
1064
- "teamspace folders create": buildCommandExamples([
979
+ }`
980
+ }
981
+ ],
982
+ "teamspace folders create": [
1065
983
  {
1066
984
  description: "Create a teamspace folder with order and icon metadata.",
1067
- command:
1068
- `zinkee --json teamspace folders create --name "Customer Success" --order 10 --props '{"icon":"folder-users"}'`,
985
+ command: `zinkee --json teamspace folders create --name "Customer Success" --order 10 --props '{"icon":"folder-users"}'`,
1069
986
  raw: `{
1070
987
  "name": "Customer Success",
1071
988
  "order": 10,
@@ -1083,19 +1000,18 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1083
1000
  "additionalProperties": {
1084
1001
  "icon": "folder-users"
1085
1002
  }
1086
- }`,
1003
+ }`
1087
1004
  },
1088
1005
  {
1089
1006
  description: "Minimal create.",
1090
- command: 'zinkee --json teamspace folders create --name Shared',
1007
+ command: "zinkee --json teamspace folders create --name Shared",
1091
1008
  raw: `{
1092
1009
  "name": "Shared"
1093
- }`,
1010
+ }`
1094
1011
  },
1095
1012
  {
1096
1013
  description: "Prominent folder with icon and color.",
1097
- command:
1098
- `zinkee --json teamspace folders create --name Executive --order 1 --props '{"icon":"crown","color":"gold"}'`,
1014
+ command: `zinkee --json teamspace folders create --name Executive --order 1 --props '{"icon":"crown","color":"gold"}'`,
1099
1015
  raw: `{
1100
1016
  "name": "Executive",
1101
1017
  "order": 1,
@@ -1103,14 +1019,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1103
1019
  "icon": "crown",
1104
1020
  "color": "gold"
1105
1021
  }
1106
- }`,
1107
- },
1108
- ]),
1109
- "teamspace folders update": buildCommandExamples([
1022
+ }`
1023
+ }
1024
+ ],
1025
+ "teamspace folders update": [
1110
1026
  {
1111
1027
  description: "Rename, reorder and update properties in one call.",
1112
- command:
1113
- `zinkee --json teamspace folders update "Customer Success" --name "Shared KPIs" --order 5 --props '{"icon":"chart-bar"}'`,
1028
+ command: `zinkee --json teamspace folders update "Customer Success" --name "Shared KPIs" --order 5 --props '{"icon":"chart-bar"}'`,
1114
1029
  raw: `{
1115
1030
  "name": "Shared KPIs",
1116
1031
  "order": 5,
@@ -1134,39 +1049,36 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1134
1049
  "additionalProperties": {
1135
1050
  "icon": "chart-bar"
1136
1051
  }
1137
- }`,
1052
+ }`
1138
1053
  },
1139
1054
  {
1140
1055
  description: "Rename only.",
1141
- command:
1142
- 'zinkee --json teamspace folders update "Customer Success" --name "Shared Analytics"',
1056
+ command: 'zinkee --json teamspace folders update "Customer Success" --name "Shared Analytics"',
1143
1057
  raw: `{
1144
1058
  "name": "Shared Analytics"
1145
- }`,
1059
+ }`
1146
1060
  },
1147
1061
  {
1148
1062
  description: "Reorder only.",
1149
1063
  command: 'zinkee --json teamspace folders update "Customer Success" --order 2',
1150
1064
  raw: `{
1151
1065
  "order": 2
1152
- }`,
1066
+ }`
1153
1067
  },
1154
1068
  {
1155
1069
  description: "Update only the icon metadata.",
1156
- command:
1157
- `zinkee --json teamspace folders update "Customer Success" --props '{"icon":"chart-line"}'`,
1070
+ command: `zinkee --json teamspace folders update "Customer Success" --props '{"icon":"chart-line"}'`,
1158
1071
  raw: `{
1159
1072
  "additionalProperties": {
1160
1073
  "icon": "chart-line"
1161
1074
  }
1162
- }`,
1163
- },
1164
- ]),
1165
- "teamspace resources publish": buildCommandExamples([
1075
+ }`
1076
+ }
1077
+ ],
1078
+ "teamspace resources publish": [
1166
1079
  {
1167
1080
  description: "Publish a schema by slug into a teamspace folder.",
1168
- command:
1169
- 'zinkee --json teamspace resources publish customer-records --to "Shared Dashboards"',
1081
+ command: 'zinkee --json teamspace resources publish customer-records --to "Shared Dashboards"',
1170
1082
  raw: `{
1171
1083
  "resourceId": "customer-records",
1172
1084
  "targetFolderId": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a"
@@ -1179,40 +1091,37 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1179
1091
  "isRoot": false
1180
1092
  },
1181
1093
  "previousFolder": null
1182
- }`,
1094
+ }`
1183
1095
  },
1184
1096
  {
1185
1097
  description: "Publish a schema by UUID.",
1186
- command:
1187
- 'zinkee --json teamspace resources publish 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --to "Shared Dashboards"',
1098
+ command: 'zinkee --json teamspace resources publish 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --to "Shared Dashboards"',
1188
1099
  raw: `{
1189
1100
  "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1190
1101
  "targetFolderId": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a"
1191
- }`,
1102
+ }`
1192
1103
  },
1193
1104
  {
1194
1105
  description: "Publish a display.",
1195
- command:
1196
- 'zinkee --json teamspace resources publish 0f6f062f-1478-4df2-96a1-c495d037d260 --to "Shared Dashboards"',
1106
+ command: 'zinkee --json teamspace resources publish 0f6f062f-1478-4df2-96a1-c495d037d260 --to "Shared Dashboards"',
1197
1107
  raw: `{
1198
1108
  "resourceId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1199
1109
  "targetFolderId": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a"
1200
- }`,
1110
+ }`
1201
1111
  },
1202
1112
  {
1203
1113
  description: "Publish directly at the teamspace root (root folder UUID is always 00000000-0000-0000-0000-000000000000).",
1204
- command:
1205
- 'zinkee --json teamspace resources publish customer-records --to 00000000-0000-0000-0000-000000000000',
1114
+ command: "zinkee --json teamspace resources publish customer-records --to 00000000-0000-0000-0000-000000000000",
1206
1115
  raw: `{
1207
1116
  "resourceId": "customer-records",
1208
1117
  "targetFolderId": "00000000-0000-0000-0000-000000000000"
1209
- }`,
1210
- },
1211
- ]),
1212
- "teamspace resources unpublish": buildCommandExamples([
1118
+ }`
1119
+ }
1120
+ ],
1121
+ "teamspace resources unpublish": [
1213
1122
  {
1214
1123
  description: "Unpublish a schema by slug.",
1215
- command: 'zinkee --json teamspace resources unpublish customer-records',
1124
+ command: "zinkee --json teamspace resources unpublish customer-records",
1216
1125
  raw: `{
1217
1126
  "resourceId": "customer-records"
1218
1127
  }`,
@@ -1223,31 +1132,27 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1223
1132
  "name": "Shared Dashboards",
1224
1133
  "isRoot": false
1225
1134
  }
1226
- }`,
1135
+ }`
1227
1136
  },
1228
1137
  {
1229
1138
  description: "Unpublish a schema by UUID.",
1230
- command:
1231
- 'zinkee --json teamspace resources unpublish 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e',
1139
+ command: "zinkee --json teamspace resources unpublish 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1232
1140
  raw: `{
1233
1141
  "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e"
1234
- }`,
1142
+ }`
1235
1143
  },
1236
1144
  {
1237
1145
  description: "Unpublish a display.",
1238
- command:
1239
- 'zinkee --json teamspace resources unpublish 0f6f062f-1478-4df2-96a1-c495d037d260',
1146
+ command: "zinkee --json teamspace resources unpublish 0f6f062f-1478-4df2-96a1-c495d037d260",
1240
1147
  raw: `{
1241
1148
  "resourceId": "0f6f062f-1478-4df2-96a1-c495d037d260"
1242
- }`,
1243
- },
1244
- ]),
1245
- "displays create": buildCommandExamples([
1149
+ }`
1150
+ }
1151
+ ],
1152
+ "displays create": [
1246
1153
  {
1247
- description:
1248
- "Create a described freeform display with an initial widget layout. Freeform layouts travel through --freeform-layouts.",
1249
- command:
1250
- `zinkee --json displays create --name "Control Proyecto Freeform" --description "Project delivery overview" --template freeform --freeform-layouts '{"lg":[{"i":"widget-1","x":0,"y":0,"w":6,"h":5}]}'`,
1154
+ description: "Create a described freeform display with an initial widget layout. Freeform layouts travel through --freeform-layouts.",
1155
+ command: `zinkee --json displays create --name "Control Proyecto Freeform" --description "Project delivery overview" --template freeform --freeform-layouts '{"lg":[{"i":"widget-1","x":0,"y":0,"w":6,"h":5}]}'`,
1251
1156
  raw: `{
1252
1157
  "name": "Control Proyecto Freeform",
1253
1158
  "description": "Project delivery overview",
@@ -1262,36 +1167,33 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1262
1167
  }`,
1263
1168
  response: `{
1264
1169
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260"
1265
- }`,
1170
+ }`
1266
1171
  },
1267
1172
  {
1268
1173
  description: "Create a tabbed display using the widget_row_tabs template.",
1269
- command:
1270
- 'zinkee --json displays create --name "Executive Revenue" --template widget_row_tabs',
1174
+ command: 'zinkee --json displays create --name "Executive Revenue" --template widget_row_tabs',
1271
1175
  raw: `{
1272
1176
  "name": "Executive Revenue",
1273
1177
  "layout": {
1274
1178
  "template": "widget_row_tabs"
1275
1179
  }
1276
- }`,
1180
+ }`
1277
1181
  },
1278
1182
  {
1279
1183
  description: "Create a grid display.",
1280
- command:
1281
- 'zinkee --json displays create --name "Customer Detail" --template grid',
1184
+ command: 'zinkee --json displays create --name "Customer Detail" --template grid',
1282
1185
  raw: `{
1283
1186
  "name": "Customer Detail",
1284
1187
  "layout": {
1285
1188
  "template": "grid"
1286
1189
  }
1287
- }`,
1288
- },
1289
- ]),
1290
- "displays tabs create": buildCommandExamples([
1190
+ }`
1191
+ }
1192
+ ],
1193
+ "displays tabs create": [
1291
1194
  {
1292
1195
  description: "Create a horizontal tab.",
1293
- command:
1294
- 'zinkee --json displays tabs create 0f6f062f-1478-4df2-96a1-c495d037d260 --name Overview --orientation horizontal',
1196
+ command: "zinkee --json displays tabs create 0f6f062f-1478-4df2-96a1-c495d037d260 --name Overview --orientation horizontal",
1295
1197
  raw: `{
1296
1198
  "name": "Overview",
1297
1199
  "orientation": "horizontal"
@@ -1299,55 +1201,49 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1299
1201
  response: `{
1300
1202
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1301
1203
  "tabId": "tab-overview"
1302
- }`,
1204
+ }`
1303
1205
  },
1304
1206
  {
1305
1207
  description: "Create a vertical tab.",
1306
- command:
1307
- 'zinkee --json displays tabs create 0f6f062f-1478-4df2-96a1-c495d037d260 --name Details --orientation vertical',
1208
+ command: "zinkee --json displays tabs create 0f6f062f-1478-4df2-96a1-c495d037d260 --name Details --orientation vertical",
1308
1209
  raw: `{
1309
1210
  "name": "Details",
1310
1211
  "orientation": "vertical"
1311
- }`,
1312
- },
1313
- ]),
1314
- "displays tabs update": buildCommandExamples([
1212
+ }`
1213
+ }
1214
+ ],
1215
+ "displays tabs update": [
1315
1216
  {
1316
1217
  description: "Rename a tab.",
1317
- command:
1318
- 'zinkee --json displays tabs update 0f6f062f-1478-4df2-96a1-c495d037d260 tab-main --name "Overview (renamed)"',
1218
+ command: 'zinkee --json displays tabs update 0f6f062f-1478-4df2-96a1-c495d037d260 tab-main --name "Overview (renamed)"',
1319
1219
  raw: `{
1320
1220
  "name": "Overview (renamed)"
1321
1221
  }`,
1322
1222
  response: `{
1323
1223
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1324
1224
  "tabId": "tab-main"
1325
- }`,
1225
+ }`
1326
1226
  },
1327
1227
  {
1328
1228
  description: "Change orientation only.",
1329
- command:
1330
- 'zinkee --json displays tabs update 0f6f062f-1478-4df2-96a1-c495d037d260 tab-main --orientation vertical',
1229
+ command: "zinkee --json displays tabs update 0f6f062f-1478-4df2-96a1-c495d037d260 tab-main --orientation vertical",
1331
1230
  raw: `{
1332
1231
  "orientation": "vertical"
1333
- }`,
1232
+ }`
1334
1233
  },
1335
1234
  {
1336
1235
  description: "Rename and reorient at once.",
1337
- command:
1338
- 'zinkee --json displays tabs update 0f6f062f-1478-4df2-96a1-c495d037d260 tab-main --name Details --orientation vertical',
1236
+ command: "zinkee --json displays tabs update 0f6f062f-1478-4df2-96a1-c495d037d260 tab-main --name Details --orientation vertical",
1339
1237
  raw: `{
1340
1238
  "name": "Details",
1341
1239
  "orientation": "vertical"
1342
- }`,
1343
- },
1344
- ]),
1345
- "displays variables create": buildCommandExamples([
1240
+ }`
1241
+ }
1242
+ ],
1243
+ "displays variables create": [
1346
1244
  {
1347
- description:
1348
- "Create a single-select REFERENCE variable bound to a (schema, field) pair. schemaId and fieldId accept slugs or UUIDs.",
1349
- command:
1350
- 'zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type REFERENCE --name Customer --source-schema contacts --source-field contact-name --default ""',
1245
+ description: "Create a single-select REFERENCE variable bound to a (schema, field) pair. schemaId and fieldId accept slugs or UUIDs.",
1246
+ command: 'zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type REFERENCE --name Customer --source-schema contacts --source-field contact-name --default ""',
1351
1247
  raw: `{
1352
1248
  "type": "REFERENCE",
1353
1249
  "name": "Customer",
@@ -1363,13 +1259,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1363
1259
  response: `{
1364
1260
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1365
1261
  "variableId": "aaaaaaaa-1111-4111-a111-111111111111"
1366
- }`,
1262
+ }`
1367
1263
  },
1368
1264
  {
1369
- description:
1370
- "Create a multi-select REFERENCE variable with a filter. Complex filters go via --raw because --filter only accepts raw expressions.",
1371
- command:
1372
- `zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --raw '{"type":"REFERENCE","name":"Active customers","source":{"schemaId":"contacts","fieldId":"contact-name"},"defaultValues":[],"allowMultiple":true,"staticVariable":false,"filters":[{"origin":{"schemaId":"contacts","fieldId":"status"},"comparisonOperator":"ANY_OF","values":["1","2"]}]}'`,
1265
+ description: "Create a multi-select REFERENCE variable with a filter. Complex filters go via --raw because --filter only accepts raw expressions.",
1266
+ command: `zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --raw '{"type":"REFERENCE","name":"Active customers","source":{"schemaId":"contacts","fieldId":"contact-name"},"defaultValues":[],"allowMultiple":true,"staticVariable":false,"filters":[{"origin":{"schemaId":"contacts","fieldId":"status"},"comparisonOperator":"ANY_OF","values":["1","2"]}]}'`,
1373
1267
  raw: `{
1374
1268
  "type": "REFERENCE",
1375
1269
  "name": "Active customers",
@@ -1390,24 +1284,22 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1390
1284
  "values": ["1", "2"]
1391
1285
  }
1392
1286
  ]
1393
- }`,
1287
+ }`
1394
1288
  },
1395
1289
  {
1396
1290
  description: "Create a MEMBER variable with a default user id.",
1397
- command:
1398
- 'zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type MEMBER --name Owner --default 6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d',
1291
+ command: "zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type MEMBER --name Owner --default 6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d",
1399
1292
  raw: `{
1400
1293
  "type": "MEMBER",
1401
1294
  "name": "Owner",
1402
1295
  "defaultValue": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d",
1403
1296
  "allowMultiple": false,
1404
1297
  "staticVariable": false
1405
- }`,
1298
+ }`
1406
1299
  },
1407
1300
  {
1408
1301
  description: "Create a DATE variable using a dynamic period (thisMonth).",
1409
- command:
1410
- 'zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type DATE --name Period --date-mode dynamic --date-dynamic-option thisMonth',
1302
+ command: "zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type DATE --name Period --date-mode dynamic --date-dynamic-option thisMonth",
1411
1303
  raw: `{
1412
1304
  "type": "DATE",
1413
1305
  "name": "Period",
@@ -1415,12 +1307,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1415
1307
  "mode": "dynamic",
1416
1308
  "dynamicOption": "thisMonth"
1417
1309
  }
1418
- }`,
1310
+ }`
1419
1311
  },
1420
1312
  {
1421
1313
  description: "Create a DATE variable with a specific date.",
1422
- command:
1423
- 'zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type DATE --name Cutoff --date-mode specific --date-specific 2026-04-22',
1314
+ command: "zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type DATE --name Cutoff --date-mode specific --date-specific 2026-04-22",
1424
1315
  raw: `{
1425
1316
  "type": "DATE",
1426
1317
  "name": "Cutoff",
@@ -1428,12 +1319,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1428
1319
  "mode": "specific",
1429
1320
  "specificDate": "2026-04-22"
1430
1321
  }
1431
- }`,
1322
+ }`
1432
1323
  },
1433
1324
  {
1434
1325
  description: "Create a DATE variable with a custom range.",
1435
- command:
1436
- 'zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type DATE --name Quarter --date-mode range --date-range-start 2026-04-01 --date-range-end 2026-06-30',
1326
+ command: "zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type DATE --name Quarter --date-mode range --date-range-start 2026-04-01 --date-range-end 2026-06-30",
1437
1327
  raw: `{
1438
1328
  "type": "DATE",
1439
1329
  "name": "Quarter",
@@ -1442,15 +1332,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1442
1332
  "rangeStart": "2026-04-01",
1443
1333
  "rangeEnd": "2026-06-30"
1444
1334
  }
1445
- }`,
1446
- },
1447
- ]),
1448
- "displays variables update": buildCommandExamples([
1335
+ }`
1336
+ }
1337
+ ],
1338
+ "displays variables update": [
1449
1339
  {
1450
- description:
1451
- "Rename the variable and make it static (defaults must be cleared with a raw patch because the CLI has no --default-values [] shortcut).",
1452
- command:
1453
- `zinkee --json displays variables update 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111 --raw '{"name":"Proyecto principal","staticVariable":true,"defaultValues":[]}'`,
1340
+ description: "Rename the variable and make it static (defaults must be cleared with a raw patch because the CLI has no --default-values [] shortcut).",
1341
+ command: `zinkee --json displays variables update 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111 --raw '{"name":"Proyecto principal","staticVariable":true,"defaultValues":[]}'`,
1454
1342
  raw: `{
1455
1343
  "name": "Proyecto principal",
1456
1344
  "staticVariable": true,
@@ -1459,12 +1347,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1459
1347
  response: `{
1460
1348
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1461
1349
  "variableId": "aaaaaaaa-1111-4111-a111-111111111111"
1462
- }`,
1350
+ }`
1463
1351
  },
1464
1352
  {
1465
1353
  description: "Replace the reference filters of the variable.",
1466
- command:
1467
- `zinkee --json displays variables update 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111 --raw '{"filters":[{"origin":{"schemaId":"contacts","fieldId":"status"},"comparisonOperator":"ANY_OF","values":["2","3"]}]}'`,
1354
+ command: `zinkee --json displays variables update 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111 --raw '{"filters":[{"origin":{"schemaId":"contacts","fieldId":"status"},"comparisonOperator":"ANY_OF","values":["2","3"]}]}'`,
1468
1355
  raw: `{
1469
1356
  "filters": [
1470
1357
  {
@@ -1476,35 +1363,31 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1476
1363
  "values": ["2", "3"]
1477
1364
  }
1478
1365
  ]
1479
- }`,
1366
+ }`
1480
1367
  },
1481
1368
  {
1482
1369
  description: "Switch a variable to multi-select.",
1483
- command:
1484
- `zinkee --json displays variables update 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111 --allow-multiple --raw '{"defaultValues":[]}'`,
1370
+ command: `zinkee --json displays variables update 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111 --allow-multiple --raw '{"defaultValues":[]}'`,
1485
1371
  raw: `{
1486
1372
  "allowMultiple": true,
1487
1373
  "defaultValues": []
1488
- }`,
1374
+ }`
1489
1375
  },
1490
1376
  {
1491
1377
  description: "Change a DATE variable to use last12Months.",
1492
- command:
1493
- 'zinkee --json displays variables update 0f6f062f-1478-4df2-96a1-c495d037d260 bbbbbbbb-2222-4222-a222-222222222222 --date-mode dynamic --date-dynamic-option last12Months',
1378
+ command: "zinkee --json displays variables update 0f6f062f-1478-4df2-96a1-c495d037d260 bbbbbbbb-2222-4222-a222-222222222222 --date-mode dynamic --date-dynamic-option last12Months",
1494
1379
  raw: `{
1495
1380
  "date": {
1496
1381
  "mode": "dynamic",
1497
1382
  "dynamicOption": "last12Months"
1498
1383
  }
1499
- }`,
1500
- },
1501
- ]),
1502
- "displays widgets create": buildCommandExamples([
1384
+ }`
1385
+ }
1386
+ ],
1387
+ "displays widgets create": [
1503
1388
  {
1504
- description:
1505
- "Create a TABLE widget (CLI normalises --type table to TABLE_OR_SUBTABLE).",
1506
- command:
1507
- `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type table --name Customers --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":12,"h":8}' --field contact-name --field status --field amount --sort '{"fieldId":"contact-name","direction":"ASC"}'`,
1389
+ description: "Create a TABLE widget (CLI normalises --type table to TABLE_OR_SUBTABLE).",
1390
+ command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type table --name Customers --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":12,"h":8}' --field contact-name --field status --field amount --sort '{"fieldId":"contact-name","direction":"ASC"}'`,
1508
1391
  raw: `{
1509
1392
  "type": "TABLE_OR_SUBTABLE",
1510
1393
  "source": {
@@ -1529,13 +1412,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1529
1412
  response: `{
1530
1413
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1531
1414
  "widgetId": "11111111-1111-4111-a111-111111111111"
1532
- }`,
1415
+ }`
1533
1416
  },
1534
1417
  {
1535
- description:
1536
- "Create a TABLE widget with locked fields: contact-name locked permanently (no conditions) and status locked while invoice-number is empty, with before/after lock messages.",
1537
- command:
1538
- `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type table --name Invoices --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":12,"h":8}' --field contact-name --field invoice-number --field status --field amount --lock-field contact-name --lock-condition "status:invoice-number:is_empty" --lock-message-before "status:Status locks until the invoice number is set." --lock-message-after "status:Status is locked because the invoice number is missing."`,
1418
+ description: "Create a TABLE widget with locked fields: contact-name locked permanently (no conditions) and status locked while invoice-number is empty, with before/after lock messages.",
1419
+ command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type table --name Invoices --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":12,"h":8}' --field contact-name --field invoice-number --field status --field amount --lock-field contact-name --lock-condition "status:invoice-number:is_empty" --lock-message-before "status:Status locks until the invoice number is set." --lock-message-after "status:Status is locked because the invoice number is missing."`,
1539
1420
  raw: `{
1540
1421
  "type": "TABLE_OR_SUBTABLE",
1541
1422
  "source": {
@@ -1573,13 +1454,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1573
1454
  response: `{
1574
1455
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1575
1456
  "widgetId": "11111111-1111-4111-a111-111111111111"
1576
- }`,
1457
+ }`
1577
1458
  },
1578
1459
  {
1579
- description:
1580
- "Create a DETAIL widget on a tab. The rich placement is easier via --raw.",
1581
- command:
1582
- `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --raw '{"type":"DETAIL","source":{"originResourceId":"2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e","isOriginSubSchema":false},"placement":{"tabId":"tab-detail","layout":{"x":0,"y":0,"w":6,"h":10}},"presentation":{"name":"Customer detail"},"behavior":{"readOnly":true},"view":{"fields":["contact-name","contact-email","status","amount"]}}'`,
1460
+ description: "Create a DETAIL widget on a tab. The rich placement is easier via --raw.",
1461
+ command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --raw '{"type":"DETAIL","source":{"originResourceId":"2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e","isOriginSubSchema":false},"placement":{"tabId":"tab-detail","layout":{"x":0,"y":0,"w":6,"h":10}},"presentation":{"name":"Customer detail"},"behavior":{"readOnly":true},"view":{"fields":["contact-name","contact-email","status","amount"]}}'`,
1583
1462
  raw: `{
1584
1463
  "type": "DETAIL",
1585
1464
  "source": {
@@ -1595,12 +1474,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1595
1474
  "view": {
1596
1475
  "fields": ["contact-name", "contact-email", "status", "amount"]
1597
1476
  }
1598
- }`,
1477
+ }`
1599
1478
  },
1600
1479
  {
1601
1480
  description: "Create a KPI widget computing SUM(amount).",
1602
- command:
1603
- `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type KPI --name "Total revenue" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":3,"h":3}' --calc SUM --calc-field amount --kpi-config '{"format":"currency","decimals":2}'`,
1481
+ command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type KPI --name "Total revenue" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":3,"h":3}' --calc SUM --calc-field amount --kpi-config '{"format":"currency","decimals":2}'`,
1604
1482
  raw: `{
1605
1483
  "type": "KPI",
1606
1484
  "source": {
@@ -1616,12 +1494,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1616
1494
  "fieldCalc": "amount",
1617
1495
  "config": { "format": "currency", "decimals": 2 }
1618
1496
  }
1619
- }`,
1497
+ }`
1620
1498
  },
1621
1499
  {
1622
1500
  description: "Create a CHART widget with a daily time-serie x-axis.",
1623
- command:
1624
- `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","color":"#4B9CD3","axisType":"PRIMARY"}' --legend '{"position":"bottom"}'`,
1501
+ 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","color":"#4B9CD3","axisType":"PRIMARY"}' --legend '{"position":"bottom"}'`,
1625
1502
  raw: `{
1626
1503
  "type": "CHART",
1627
1504
  "source": {
@@ -1647,12 +1524,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1647
1524
  ],
1648
1525
  "legend": { "position": "bottom" }
1649
1526
  }
1650
- }`,
1527
+ }`
1651
1528
  },
1652
1529
  {
1653
1530
  description: "Create a bars CHART widget with a monthly time-serie x-axis and two y-axis series.",
1654
- command:
1655
- `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 bars --x-axis-field due-date --x-axis-date-format MONTH_YEAR --x-axis-time-series --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","color":"#4B9CD3","axisType":"PRIMARY"}' --y-axis-serie '{"typeCalc":"COUNT","fieldCalc":"contact-name","color":"#E57373","axisType":"SECONDARY"}' --legend '{"position":"bottom"}'`,
1531
+ 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 bars --x-axis-field due-date --x-axis-date-format MONTH_YEAR --x-axis-time-series --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","color":"#4B9CD3","axisType":"PRIMARY"}' --y-axis-serie '{"typeCalc":"COUNT","fieldCalc":"contact-name","color":"#E57373","axisType":"SECONDARY"}' --legend '{"position":"bottom"}'`,
1656
1532
  raw: `{
1657
1533
  "type": "CHART",
1658
1534
  "source": {
@@ -1684,12 +1560,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1684
1560
  ],
1685
1561
  "legend": { "position": "bottom" }
1686
1562
  }
1687
- }`,
1563
+ }`
1688
1564
  },
1689
1565
  {
1690
1566
  description: "Create a bars CHART widget with a quarterly time-serie x-axis.",
1691
- command:
1692
- `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","color":"#4B9CD3","axisType":"PRIMARY"}' --legend '{"position":"bottom"}'`,
1567
+ 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","color":"#4B9CD3","axisType":"PRIMARY"}' --legend '{"position":"bottom"}'`,
1693
1568
  raw: `{
1694
1569
  "type": "CHART",
1695
1570
  "source": {
@@ -1715,12 +1590,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1715
1590
  ],
1716
1591
  "legend": { "position": "bottom" }
1717
1592
  }
1718
- }`,
1593
+ }`
1719
1594
  },
1720
1595
  {
1721
1596
  description: "Create a CHART widget with a yearly time-serie x-axis.",
1722
- command:
1723
- `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","color":"#4B9CD3","axisType":"PRIMARY"}' --legend '{"position":"bottom"}'`,
1597
+ 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","color":"#4B9CD3","axisType":"PRIMARY"}' --legend '{"position":"bottom"}'`,
1724
1598
  raw: `{
1725
1599
  "type": "CHART",
1726
1600
  "source": {
@@ -1746,13 +1620,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1746
1620
  ],
1747
1621
  "legend": { "position": "bottom" }
1748
1622
  }
1749
- }`,
1623
+ }`
1750
1624
  },
1751
1625
  {
1752
- description:
1753
- "Create a TIMELINE widget via flags. The typed view state lives in view.viewAdditionalProperties.viewState; field references there must be UUIDs (slugs are only resolved in --field). cardConfig uses category1/category2/category4 (no category3). Use --view-state for UI scalars (granularity, sidebarWidth, show* ...).",
1754
- command:
1755
- `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type TIMELINE --name "Customer schedule" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":12,"h":6}' --field c60b8526-5835-4c9f-aecd-9a16c7704a34 --field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --field d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90 --start-date-field d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90 --end-date-field e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9012 --label-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --group-field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --subgroup-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --progress-field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --card-title-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --card-category1-field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --card-category2-field d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90 --card-category4-field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --card-description-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --view-state '{"granularity":"month","sidebarWidth":300,"showUngroupedEvents":true,"showUnsubgroupedEvents":true}'`,
1626
+ description: "Create a TIMELINE widget via flags. The typed view state lives in view.viewAdditionalProperties.viewState; field references there must be UUIDs (slugs are only resolved in --field). cardConfig uses category1/category2/category4 (no category3). Use --view-state for UI scalars (granularity, sidebarWidth, show* ...).",
1627
+ command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type TIMELINE --name "Customer schedule" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":12,"h":6}' --field c60b8526-5835-4c9f-aecd-9a16c7704a34 --field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --field d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90 --start-date-field d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90 --end-date-field e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9012 --label-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --group-field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --subgroup-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --progress-field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --card-title-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --card-category1-field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --card-category2-field d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90 --card-category4-field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --card-description-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --view-state '{"granularity":"month","sidebarWidth":300,"showUngroupedEvents":true,"showUnsubgroupedEvents":true}'`,
1756
1628
  raw: `{
1757
1629
  "type": "TIMELINE",
1758
1630
  "source": {
@@ -1794,13 +1666,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1794
1666
  }
1795
1667
  }
1796
1668
  }
1797
- }`,
1669
+ }`
1798
1670
  },
1799
1671
  {
1800
- description:
1801
- "Create a KANBAN widget via flags. The typed view state lives in view.viewAdditionalProperties.viewState; field references there must be UUIDs (slugs are only resolved in --field). cardConfig uses category1/category2/category3 (no category4). --aggregation-method/--aggregation-field set the card aggregation; use --view-state for UI scalars.",
1802
- command:
1803
- `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type KANBAN --name "Status board" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":12,"h":8}' --field c60b8526-5835-4c9f-aecd-9a16c7704a34 --field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --field d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90 --column-field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --swimlane-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --card-title-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --card-category1-field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --card-category2-field d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90 --card-category3-field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --card-description-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --aggregation-method sum --aggregation-field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --view-state '{"hideEmptyColumns":false,"showNoValueColumn":true,"showNoValueSwimlane":true}'`,
1672
+ description: "Create a KANBAN widget via flags. The typed view state lives in view.viewAdditionalProperties.viewState; field references there must be UUIDs (slugs are only resolved in --field). cardConfig uses category1/category2/category3 (no category4). --aggregation-method/--aggregation-field set the card aggregation; use --view-state for UI scalars.",
1673
+ command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type KANBAN --name "Status board" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":12,"h":8}' --field c60b8526-5835-4c9f-aecd-9a16c7704a34 --field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --field d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90 --column-field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --swimlane-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --card-title-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --card-category1-field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --card-category2-field d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90 --card-category3-field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --card-description-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --aggregation-method sum --aggregation-field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --view-state '{"hideEmptyColumns":false,"showNoValueColumn":true,"showNoValueSwimlane":true}'`,
1804
1674
  raw: `{
1805
1675
  "type": "KANBAN",
1806
1676
  "source": {
@@ -1841,13 +1711,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1841
1711
  }
1842
1712
  }
1843
1713
  }
1844
- }`,
1714
+ }`
1845
1715
  },
1846
1716
  {
1847
- description:
1848
- "Create a HIERARCHY widget via flags. Declare columns once (--hierarchy-label, repeatable --hierarchy-info <id:name>, --hierarchy-number <id:name:aggregation>), map the root level (the view's own table) with --hierarchy-root-* and add each child level as a JSON object with --hierarchy-child. label is required per level; info/number mappings are optional. Column ids (e.g. col_1779975207355_zfndknslw) are unique opaque identifiers you choose — not the column name — and are reused as columnId in every mapping. All field references must be UUIDs.",
1849
- command:
1850
- `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type HIERARCHY --name "Org tree" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":12,"h":6}' --field c60b8526-5835-4c9f-aecd-9a16c7704a34 --field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --hierarchy-label "Name" --hierarchy-info "col_1779975207355_zfndknslw:Status" --hierarchy-info "col_1779975243018_qm4t7xb2pa:Description" --hierarchy-number "col_1779975261490_h8kd3nv9ws:Total amount:SUM" --hierarchy-root-name "Customers" --hierarchy-root-label-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --hierarchy-root-info "col_1779975207355_zfndknslw:a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890" --hierarchy-root-number "col_1779975261490_h8kd3nv9ws:c52efe3f-2825-4c60-a7e3-34dd4c1ce043" --hierarchy-child '{"name":"Projects","schemaId":"3ec9cdef-7e0a-4cdd-8019-8fb9281f5d6f","childFieldId":"80deefae-af3d-4000-b322-bfe1594f8073","labelFieldId":"50dbef0b-7e0a-4fdd-8019-8fb9281f5d70","infoMappings":[{"columnId":"col_1779975243018_qm4t7xb2pa","fieldId":"60dcef0c-8f1b-4eee-9120-9fc0392f6e71"}],"numberMappings":[{"columnId":"col_1779975261490_h8kd3nv9ws","fieldId":"70ddef0d-9f2c-4fff-a221-afd0493f7f72"}]}'`,
1717
+ description: "Create a HIERARCHY widget via flags. Declare columns once (--hierarchy-label, repeatable --hierarchy-info <id:name>, --hierarchy-number <id:name:aggregation>), map the root level (the view's own table) with --hierarchy-root-* and add each child level as a JSON object with --hierarchy-child. label is required per level; info/number mappings are optional. Column ids (e.g. col_1779975207355_zfndknslw) are unique opaque identifiers you choose \u2014 not the column name \u2014 and are reused as columnId in every mapping. All field references must be UUIDs.",
1718
+ command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type HIERARCHY --name "Org tree" --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":12,"h":6}' --field c60b8526-5835-4c9f-aecd-9a16c7704a34 --field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --field c52efe3f-2825-4c60-a7e3-34dd4c1ce043 --hierarchy-label "Name" --hierarchy-info "col_1779975207355_zfndknslw:Status" --hierarchy-info "col_1779975243018_qm4t7xb2pa:Description" --hierarchy-number "col_1779975261490_h8kd3nv9ws:Total amount:SUM" --hierarchy-root-name "Customers" --hierarchy-root-label-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --hierarchy-root-info "col_1779975207355_zfndknslw:a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890" --hierarchy-root-number "col_1779975261490_h8kd3nv9ws:c52efe3f-2825-4c60-a7e3-34dd4c1ce043" --hierarchy-child '{"name":"Projects","schemaId":"3ec9cdef-7e0a-4cdd-8019-8fb9281f5d6f","childFieldId":"80deefae-af3d-4000-b322-bfe1594f8073","labelFieldId":"50dbef0b-7e0a-4fdd-8019-8fb9281f5d70","infoMappings":[{"columnId":"col_1779975243018_qm4t7xb2pa","fieldId":"60dcef0c-8f1b-4eee-9120-9fc0392f6e71"}],"numberMappings":[{"columnId":"col_1779975261490_h8kd3nv9ws","fieldId":"70ddef0d-9f2c-4fff-a221-afd0493f7f72"}]}'`,
1851
1719
  raw: `{
1852
1720
  "type": "HIERARCHY",
1853
1721
  "source": {
@@ -1901,14 +1769,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1901
1769
  ]
1902
1770
  }
1903
1771
  }
1904
- }`,
1905
- },
1906
- ]),
1907
- "displays widgets update": buildCommandExamples([
1772
+ }`
1773
+ }
1774
+ ],
1775
+ "displays widgets update": [
1908
1776
  {
1909
1777
  description: "Move placement, update view columns, rename the widget and lock it.",
1910
- command:
1911
- `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --layout '{"x":1,"y":2,"w":8,"h":4}' --field contact-name --field status --field amount --name "Revenue Updated" --widget-read-only`,
1778
+ command: `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --layout '{"x":1,"y":2,"w":8,"h":4}' --field contact-name --field status --field amount --name "Revenue Updated" --widget-read-only`,
1912
1779
  raw: `{
1913
1780
  "placement": {
1914
1781
  "layout": { "x": 1, "y": 2, "w": 8, "h": 4 }
@@ -1922,13 +1789,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1922
1789
  response: `{
1923
1790
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1924
1791
  "widgetId": "11111111-1111-4111-a111-111111111111"
1925
- }`,
1792
+ }`
1926
1793
  },
1927
1794
  {
1928
- description:
1929
- "Add query filters with --filter. The CLI parses the expression and emits the structured comparisonOperator payload the API expects.",
1930
- command:
1931
- `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --filter "status:eq:2" --filter "amount:gte:500"`,
1795
+ description: "Add query filters with --filter. The CLI parses the expression and emits the structured comparisonOperator payload the API expects.",
1796
+ command: `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --filter "status:eq:2" --filter "amount:gte:500"`,
1932
1797
  raw: `{
1933
1798
  "query": {
1934
1799
  "filters": [
@@ -1944,13 +1809,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1944
1809
  }
1945
1810
  ]
1946
1811
  }
1947
- }`,
1812
+ }`
1948
1813
  },
1949
1814
  {
1950
- description:
1951
- "Fall back to --raw for comparators the parser does not cover yet (e.g. NOT_CONTAINS, RANGE).",
1952
- command:
1953
- `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --raw '{"query":{"filters":[{"origin":{"fieldId":"due-date"},"comparisonOperator":"RANGE","values":["2025-01-01","2025-12-31"]}]}}'`,
1815
+ description: "Fall back to --raw for comparators the parser does not cover yet (e.g. NOT_CONTAINS, RANGE).",
1816
+ command: `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --raw '{"query":{"filters":[{"origin":{"fieldId":"due-date"},"comparisonOperator":"RANGE","values":["2025-01-01","2025-12-31"]}]}}'`,
1954
1817
  raw: `{
1955
1818
  "query": {
1956
1819
  "filters": [
@@ -1961,25 +1824,22 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
1961
1824
  }
1962
1825
  ]
1963
1826
  }
1964
- }`,
1827
+ }`
1965
1828
  },
1966
1829
  {
1967
1830
  description: "Hide the add, delete and filter buttons.",
1968
- command:
1969
- 'zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --hide-add-button --hide-delete-button --hide-filter-button',
1831
+ command: "zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --hide-add-button --hide-delete-button --hide-filter-button",
1970
1832
  raw: `{
1971
1833
  "behavior": {
1972
1834
  "hideAddButton": true,
1973
1835
  "hideDeleteButton": true,
1974
1836
  "hideFilterButton": true
1975
1837
  }
1976
- }`,
1838
+ }`
1977
1839
  },
1978
1840
  {
1979
- description:
1980
- "Configure locked fields (replaces the stored configuration): contact-name locked permanently, status locked while invoice-number is empty. Empty conditions = always locked; conditions combine with AND. Enforcement happens in display widgets only, never in the database view.",
1981
- command:
1982
- `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --lock-field contact-name --lock-condition "status:invoice-number:is_empty" --lock-message-before "status:Status locks until the invoice number is set." --lock-message-after "status:Status is locked because the invoice number is missing."`,
1841
+ description: "Configure locked fields (replaces the stored configuration): contact-name locked permanently, status locked while invoice-number is empty. Empty conditions = always locked; conditions combine with AND. Enforcement happens in display widgets only, never in the database view.",
1842
+ command: `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --lock-field contact-name --lock-condition "status:invoice-number:is_empty" --lock-message-before "status:Status locks until the invoice number is set." --lock-message-after "status:Status is locked because the invoice number is missing."`,
1983
1843
  raw: `{
1984
1844
  "behavior": {
1985
1845
  "lockedFields": [
@@ -2005,32 +1865,29 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2005
1865
  response: `{
2006
1866
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
2007
1867
  "widgetId": "11111111-1111-4111-a111-111111111111"
2008
- }`,
1868
+ }`
2009
1869
  },
2010
1870
  {
2011
1871
  description: "Clear the locked-fields configuration.",
2012
- command:
2013
- 'zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --clear-locked-fields',
1872
+ command: "zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --clear-locked-fields",
2014
1873
  raw: `{
2015
1874
  "behavior": { "lockedFields": [] }
2016
- }`,
1875
+ }`
2017
1876
  },
2018
1877
  {
2019
1878
  description: "Update the KPI aggregation to AVG with one-decimal format.",
2020
- command:
2021
- `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 33333333-3333-4333-a333-333333333333 --calc AVG --calc-field amount --kpi-config '{"format":"number","decimals":1}'`,
1879
+ command: `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 33333333-3333-4333-a333-333333333333 --calc AVG --calc-field amount --kpi-config '{"format":"number","decimals":1}'`,
2022
1880
  raw: `{
2023
1881
  "kpi": {
2024
1882
  "typeCalc": "AVG",
2025
1883
  "fieldCalc": "amount",
2026
1884
  "config": { "format": "number", "decimals": 1 }
2027
1885
  }
2028
- }`,
1886
+ }`
2029
1887
  },
2030
1888
  {
2031
1889
  description: "Replace the chart series with quarterly lines.",
2032
- command:
2033
- `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","color":"#2E7D32","axisType":"PRIMARY"}'`,
1890
+ 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","color":"#2E7D32","axisType":"PRIMARY"}'`,
2034
1891
  raw: `{
2035
1892
  "chart": {
2036
1893
  "chartType": "lines",
@@ -2046,12 +1903,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2046
1903
  }
2047
1904
  ]
2048
1905
  }
2049
- }`,
1906
+ }`
2050
1907
  },
2051
1908
  {
2052
1909
  description: "Rewrite the widget bindings (requires --raw because the CLI has no --binding flag).",
2053
- command:
2054
- `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --raw '{"bindings":{"variableMap":{"aaaaaaaa-1111-4111-a111-111111111111":"contact-name","cccccccc-3333-4333-a333-333333333333":"owner"}}}'`,
1910
+ command: `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --raw '{"bindings":{"variableMap":{"aaaaaaaa-1111-4111-a111-111111111111":"contact-name","cccccccc-3333-4333-a333-333333333333":"owner"}}}'`,
2055
1911
  raw: `{
2056
1912
  "bindings": {
2057
1913
  "variableMap": {
@@ -2059,14 +1915,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2059
1915
  "cccccccc-3333-4333-a333-333333333333": "owner"
2060
1916
  }
2061
1917
  }
2062
- }`,
2063
- },
2064
- ]),
2065
- "displays navigation-targets create": buildCommandExamples([
1918
+ }`
1919
+ }
1920
+ ],
1921
+ "displays navigation-targets create": [
2066
1922
  {
2067
1923
  description: "Create a navigation target with a visible label.",
2068
- command:
2069
- 'zinkee --json displays navigation-targets create 0f6f062f-1478-4df2-96a1-c495d037d260 --source-widget 11111111-1111-4111-a111-111111111111 --target-display ef012345-6789-4abc-8def-0123456789ab --target-variable aaaaaaaa-1111-4111-a111-111111111111 --label "Open customer"',
1924
+ command: 'zinkee --json displays navigation-targets create 0f6f062f-1478-4df2-96a1-c495d037d260 --source-widget 11111111-1111-4111-a111-111111111111 --target-display ef012345-6789-4abc-8def-0123456789ab --target-variable aaaaaaaa-1111-4111-a111-111111111111 --label "Open customer"',
2070
1925
  raw: `{
2071
1926
  "sourceWidgetId": "11111111-1111-4111-a111-111111111111",
2072
1927
  "targetDisplayId": "ef012345-6789-4abc-8def-0123456789ab",
@@ -2076,56 +1931,50 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2076
1931
  response: `{
2077
1932
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
2078
1933
  "navigationTargetId": "nav-target-customer"
2079
- }`,
1934
+ }`
2080
1935
  },
2081
1936
  {
2082
1937
  description: "Create a navigation target without a label (uses the target display name).",
2083
- command:
2084
- 'zinkee --json displays navigation-targets create 0f6f062f-1478-4df2-96a1-c495d037d260 --source-widget 22222222-2222-4222-a222-222222222222 --target-display ef012345-6789-4abc-8def-0123456789ab --target-variable aaaaaaaa-1111-4111-a111-111111111111',
1938
+ command: "zinkee --json displays navigation-targets create 0f6f062f-1478-4df2-96a1-c495d037d260 --source-widget 22222222-2222-4222-a222-222222222222 --target-display ef012345-6789-4abc-8def-0123456789ab --target-variable aaaaaaaa-1111-4111-a111-111111111111",
2085
1939
  raw: `{
2086
1940
  "sourceWidgetId": "22222222-2222-4222-a222-222222222222",
2087
1941
  "targetDisplayId": "ef012345-6789-4abc-8def-0123456789ab",
2088
1942
  "targetVariableId": "aaaaaaaa-1111-4111-a111-111111111111"
2089
- }`,
2090
- },
2091
- ]),
2092
- "displays navigation-targets update": buildCommandExamples([
1943
+ }`
1944
+ }
1945
+ ],
1946
+ "displays navigation-targets update": [
2093
1947
  {
2094
1948
  description: "Change just the label.",
2095
- command:
2096
- 'zinkee --json displays navigation-targets update 0f6f062f-1478-4df2-96a1-c495d037d260 nav-target-customer --label "Go to customer"',
1949
+ command: 'zinkee --json displays navigation-targets update 0f6f062f-1478-4df2-96a1-c495d037d260 nav-target-customer --label "Go to customer"',
2097
1950
  raw: `{
2098
1951
  "label": "Go to customer"
2099
1952
  }`,
2100
1953
  response: `{
2101
1954
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
2102
1955
  "navigationTargetId": "nav-target-customer"
2103
- }`,
1956
+ }`
2104
1957
  },
2105
1958
  {
2106
1959
  description: "Redirect the target to another display/variable pair.",
2107
- command:
2108
- 'zinkee --json displays navigation-targets update 0f6f062f-1478-4df2-96a1-c495d037d260 nav-target-customer --target-display 6b7c8d9e-0f12-3456-789a-bcdef0123456 --target-variable bbbbbbbb-2222-4222-a222-222222222222',
1960
+ command: "zinkee --json displays navigation-targets update 0f6f062f-1478-4df2-96a1-c495d037d260 nav-target-customer --target-display 6b7c8d9e-0f12-3456-789a-bcdef0123456 --target-variable bbbbbbbb-2222-4222-a222-222222222222",
2109
1961
  raw: `{
2110
1962
  "targetDisplayId": "6b7c8d9e-0f12-3456-789a-bcdef0123456",
2111
1963
  "targetVariableId": "bbbbbbbb-2222-4222-a222-222222222222"
2112
- }`,
1964
+ }`
2113
1965
  },
2114
1966
  {
2115
1967
  description: "Change the source widget.",
2116
- command:
2117
- 'zinkee --json displays navigation-targets update 0f6f062f-1478-4df2-96a1-c495d037d260 nav-target-customer --source-widget 44444444-4444-4444-a444-444444444444',
1968
+ command: "zinkee --json displays navigation-targets update 0f6f062f-1478-4df2-96a1-c495d037d260 nav-target-customer --source-widget 44444444-4444-4444-a444-444444444444",
2118
1969
  raw: `{
2119
1970
  "sourceWidgetId": "44444444-4444-4444-a444-444444444444"
2120
- }`,
2121
- },
2122
- ]),
2123
- "displays cross-widget-filter set": buildCommandExamples([
1971
+ }`
1972
+ }
1973
+ ],
1974
+ "displays cross-widget-filter set": [
2124
1975
  {
2125
- description:
2126
- "Single configuration with flags: link one source widget/field to several targets. The whole array is replaced.",
2127
- command:
2128
- 'zinkee --json displays cross-widget-filter set 0f6f062f-1478-4df2-96a1-c495d037d260 --source-widget 11111111-1111-4111-a111-111111111111 --source-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --target 22222222-2222-4222-a222-222222222222:c60b8526-5835-4c9f-aecd-9a16c7704a34 --target 33333333-3333-4333-a333-333333333333:c60b8526-5835-4c9f-aecd-9a16c7704a34',
1976
+ description: "Single configuration with flags: link one source widget/field to several targets. The whole array is replaced.",
1977
+ command: "zinkee --json displays cross-widget-filter set 0f6f062f-1478-4df2-96a1-c495d037d260 --source-widget 11111111-1111-4111-a111-111111111111 --source-field c60b8526-5835-4c9f-aecd-9a16c7704a34 --target 22222222-2222-4222-a222-222222222222:c60b8526-5835-4c9f-aecd-9a16c7704a34 --target 33333333-3333-4333-a333-333333333333:c60b8526-5835-4c9f-aecd-9a16c7704a34",
2129
1978
  raw: `[
2130
1979
  {
2131
1980
  "source": {
@@ -2143,13 +1992,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2143
1992
  }
2144
1993
  ]
2145
1994
  }
2146
- ]`,
1995
+ ]`
2147
1996
  },
2148
1997
  {
2149
- description:
2150
- "Several independent configurations with --raw (each source filters its own targets). A widget cannot be a target of two configurations.",
2151
- command:
2152
- "zinkee --json displays cross-widget-filter set 0f6f062f-1478-4df2-96a1-c495d037d260 --raw '[{\"source\":{\"widgetId\":\"11111111-1111-4111-a111-111111111111\",\"fieldId\":\"c60b8526-5835-4c9f-aecd-9a16c7704a34\"},\"targets\":[{\"widgetId\":\"22222222-2222-4222-a222-222222222222\",\"fieldId\":\"c60b8526-5835-4c9f-aecd-9a16c7704a34\"}]},{\"source\":{\"widgetId\":\"44444444-4444-4444-a444-444444444444\",\"fieldId\":\"a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890\"},\"targets\":[{\"widgetId\":\"55555555-5555-4555-a555-555555555555\",\"fieldId\":\"a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890\"}]}]'",
1998
+ description: "Several independent configurations with --raw (each source filters its own targets). A widget cannot be a target of two configurations.",
1999
+ command: `zinkee --json displays cross-widget-filter set 0f6f062f-1478-4df2-96a1-c495d037d260 --raw '[{"source":{"widgetId":"11111111-1111-4111-a111-111111111111","fieldId":"c60b8526-5835-4c9f-aecd-9a16c7704a34"},"targets":[{"widgetId":"22222222-2222-4222-a222-222222222222","fieldId":"c60b8526-5835-4c9f-aecd-9a16c7704a34"}]},{"source":{"widgetId":"44444444-4444-4444-a444-444444444444","fieldId":"a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"},"targets":[{"widgetId":"55555555-5555-4555-a555-555555555555","fieldId":"a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"}]}]'`,
2153
2000
  raw: `[
2154
2001
  {
2155
2002
  "source": {
@@ -2175,13 +2022,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2175
2022
  }
2176
2023
  ]
2177
2024
  }
2178
- ]`,
2025
+ ]`
2179
2026
  },
2180
2027
  {
2181
- description:
2182
- "Hierarchy chain with --raw-file: a target of one configuration is the source of the next (click Parent → filters Child, click Child → filters Grandchild).",
2183
- command:
2184
- "zinkee --json displays cross-widget-filter set 0f6f062f-1478-4df2-96a1-c495d037d260 --raw-file cross-widget-filter.json",
2028
+ description: "Hierarchy chain with --raw-file: a target of one configuration is the source of the next (click Parent \u2192 filters Child, click Child \u2192 filters Grandchild).",
2029
+ command: "zinkee --json displays cross-widget-filter set 0f6f062f-1478-4df2-96a1-c495d037d260 --raw-file cross-widget-filter.json",
2185
2030
  raw: `[
2186
2031
  {
2187
2032
  "source": {
@@ -2207,10 +2052,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2207
2052
  }
2208
2053
  ]
2209
2054
  }
2210
- ]`,
2211
- },
2212
- ]),
2213
- "schemas list": buildCommandExamples([
2055
+ ]`
2056
+ }
2057
+ ],
2058
+ "schemas list": [
2214
2059
  {
2215
2060
  description: "List schemas in the workspace with folder and field counts.",
2216
2061
  command: "zinkee --json schemas list",
@@ -2241,10 +2086,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2241
2086
  "commentable": true,
2242
2087
  "fieldCount": 7
2243
2088
  }
2244
- ]`,
2245
- },
2246
- ]),
2247
- "schemas get": buildCommandExamples([
2089
+ ]`
2090
+ }
2091
+ ],
2092
+ "schemas get": [
2248
2093
  {
2249
2094
  description: "Get a schema with all its fields.",
2250
2095
  command: "zinkee --json schemas get contacts",
@@ -2303,7 +2148,7 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2303
2148
  "thousandsSeparator": true,
2304
2149
  "symbolEnabled": true,
2305
2150
  "symbolPosition": "before",
2306
- "symbolValue": "€"
2151
+ "symbolValue": "\u20AC"
2307
2152
  },
2308
2153
  "conditionalFormatting": []
2309
2154
  }
@@ -2573,20 +2418,20 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2573
2418
  "c60b8526-5835-4c9f-aecd-9a16c7704a34",
2574
2419
  "1d2e3f4a-5b6c-7d8e-9f01-23456789abcd"
2575
2420
  ]
2576
- }`,
2577
- },
2578
- ]),
2579
- "schemas delete": buildCommandExamples([
2421
+ }`
2422
+ }
2423
+ ],
2424
+ "schemas delete": [
2580
2425
  {
2581
2426
  description: "Delete a schema (also removes it from navigation folders).",
2582
2427
  command: "zinkee --json schemas delete contacts",
2583
2428
  response: `{
2584
2429
  "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
2585
2430
  "deleted": true
2586
- }`,
2587
- },
2588
- ]),
2589
- "schemas fields list": buildCommandExamples([
2431
+ }`
2432
+ }
2433
+ ],
2434
+ "schemas fields list": [
2590
2435
  {
2591
2436
  description: "List the fields of a schema (fields are inlined in the schema resource).",
2592
2437
  command: "zinkee --json schemas fields list contacts",
@@ -2622,10 +2467,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2622
2467
  "buttonConfig": null
2623
2468
  }
2624
2469
  }
2625
- ]`,
2626
- },
2627
- ]),
2628
- "schemas fields get": buildCommandExamples([
2470
+ ]`
2471
+ }
2472
+ ],
2473
+ "schemas fields get": [
2629
2474
  {
2630
2475
  description: "Get a schema field (returns the full typed field contract).",
2631
2476
  command: "zinkee --json schemas fields get contacts status",
@@ -2656,10 +2501,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2656
2501
  }
2657
2502
  }
2658
2503
  }
2659
- }`,
2660
- },
2661
- ]),
2662
- "schemas fields delete": buildCommandExamples([
2504
+ }`
2505
+ }
2506
+ ],
2507
+ "schemas fields delete": [
2663
2508
  {
2664
2509
  description: "Delete a schema field.",
2665
2510
  command: "zinkee --json schemas fields delete contacts status",
@@ -2667,10 +2512,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2667
2512
  "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
2668
2513
  "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
2669
2514
  "slug": "status"
2670
- }`,
2671
- },
2672
- ]),
2673
- "records list": buildCommandExamples([
2515
+ }`
2516
+ }
2517
+ ],
2518
+ "records list": [
2674
2519
  {
2675
2520
  description: "List records with default pagination.",
2676
2521
  command: "zinkee --json records list contacts",
@@ -2704,14 +2549,14 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2704
2549
  "count": 2,
2705
2550
  "hasMore": false
2706
2551
  }
2707
- }`,
2552
+ }`
2708
2553
  },
2709
2554
  {
2710
2555
  description: "Paginate further into the result set.",
2711
- command: "zinkee --json records list contacts --limit 50 --offset 100",
2712
- },
2713
- ]),
2714
- "records get": buildCommandExamples([
2556
+ command: "zinkee --json records list contacts --limit 50 --offset 100"
2557
+ }
2558
+ ],
2559
+ "records get": [
2715
2560
  {
2716
2561
  description: "Get one record by id (values are keyed by field slug).",
2717
2562
  command: `zinkee --json records get contacts ${SAMPLE_UUID}`,
@@ -2725,10 +2570,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2725
2570
  "due-date": "2026-05-15T12:00:00Z",
2726
2571
  "owner": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
2727
2572
  }
2728
- }`,
2729
- },
2730
- ]),
2731
- "records delete": buildCommandExamples([
2573
+ }`
2574
+ }
2575
+ ],
2576
+ "records delete": [
2732
2577
  {
2733
2578
  description: "Delete one or more records by id (--record is repeatable).",
2734
2579
  command: `zinkee --json records delete contacts --record 550e8400-e29b-41d4-a716-446655440000 --record 6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d`,
@@ -2738,11 +2583,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2738
2583
  "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
2739
2584
  ],
2740
2585
  "deleted": true
2741
- }`,
2586
+ }`
2742
2587
  },
2743
2588
  {
2744
- description:
2745
- "Delete many records listing one uuid per line in a file (merged with any --record flags and de-duplicated).",
2589
+ description: "Delete many records listing one uuid per line in a file (merged with any --record flags and de-duplicated).",
2746
2590
  command: `zinkee --json records delete contacts --records-file ./record-ids.txt`,
2747
2591
  response: `{
2748
2592
  "recordIds": [
@@ -2750,21 +2594,20 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2750
2594
  "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
2751
2595
  ],
2752
2596
  "deleted": true
2753
- }`,
2754
- },
2755
- ]),
2756
- "records clear": buildCommandExamples([
2597
+ }`
2598
+ }
2599
+ ],
2600
+ "records clear": [
2757
2601
  {
2758
- description:
2759
- "Delete every record from a schema's table. Heritage rules (CASCADE / SET NULL) propagate to child schemas asynchronously via the CDC pipeline.",
2602
+ description: "Delete every record from a schema's table. Heritage rules (CASCADE / SET NULL) propagate to child schemas asynchronously via the CDC pipeline.",
2760
2603
  command: "zinkee --json records clear contacts",
2761
2604
  response: `{
2762
2605
  "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
2763
2606
  "cleared": true
2764
- }`,
2765
- },
2766
- ]),
2767
- "comments list": buildCommandExamples([
2607
+ }`
2608
+ }
2609
+ ],
2610
+ "comments list": [
2768
2611
  {
2769
2612
  description: "List comments on a record (content is an array of TEXT/MENTION items).",
2770
2613
  command: `zinkee --json comments list contacts ${SAMPLE_UUID}`,
@@ -2789,13 +2632,12 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2789
2632
  { "type": "TEXT", "value": " for follow up." }
2790
2633
  ]
2791
2634
  }
2792
- ]`,
2793
- },
2794
- ]),
2795
- "logs list": buildCommandExamples([
2635
+ ]`
2636
+ }
2637
+ ],
2638
+ "logs list": [
2796
2639
  {
2797
- description:
2798
- "List the change history for a record (CREATE entry plus UPDATE entries with before/after values per field).",
2640
+ description: "List the change history for a record (CREATE entry plus UPDATE entries with before/after values per field).",
2799
2641
  command: `zinkee --json logs list contacts ${SAMPLE_UUID}`,
2800
2642
  response: `[
2801
2643
  {
@@ -2831,10 +2673,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2831
2673
  "operation": "UPDATE"
2832
2674
  }
2833
2675
  }
2834
- ]`,
2835
- },
2836
- ]),
2837
- "navigation folders list": buildCommandExamples([
2676
+ ]`
2677
+ }
2678
+ ],
2679
+ "navigation folders list": [
2838
2680
  {
2839
2681
  description: "List navigation folders with embedded resources, sorted by order.",
2840
2682
  command: "zinkee --json navigation folders list",
@@ -2887,29 +2729,29 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2887
2729
  "resources": [],
2888
2730
  "additionalProperties": {}
2889
2731
  }
2890
- ]`,
2891
- },
2892
- ]),
2893
- "navigation folders get": buildCommandExamples([
2732
+ ]`
2733
+ }
2734
+ ],
2735
+ "navigation folders get": [
2894
2736
  {
2895
2737
  description: "Get a navigation folder by exact name or UUID.",
2896
- command: 'zinkee --json navigation folders get Finance',
2897
- },
2898
- ]),
2899
- "navigation folders delete": buildCommandExamples([
2738
+ command: "zinkee --json navigation folders get Finance"
2739
+ }
2740
+ ],
2741
+ "navigation folders delete": [
2900
2742
  {
2901
2743
  description: "Delete a navigation folder by exact name or UUID.",
2902
- command: 'zinkee --json navigation folders delete Finance',
2744
+ command: "zinkee --json navigation folders delete Finance",
2903
2745
  response: `{
2904
2746
  "folderId": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a",
2905
2747
  "name": "Finance Ops"
2906
- }`,
2907
- },
2908
- ]),
2909
- "teamspace folders list": buildCommandExamples([
2748
+ }`
2749
+ }
2750
+ ],
2751
+ "teamspace folders list": [
2910
2752
  {
2911
2753
  description: "List teamspace folders.",
2912
- command: "zinkee --json teamspace folders list",
2754
+ command: "zinkee --json teamspace folders list"
2913
2755
  },
2914
2756
  {
2915
2757
  description: "List teamspace folders with their published resources.",
@@ -2935,19 +2777,18 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2935
2777
  ],
2936
2778
  "additionalProperties": {}
2937
2779
  }
2938
- ]`,
2939
- },
2940
- ]),
2941
- "teamspace folders get": buildCommandExamples([
2780
+ ]`
2781
+ }
2782
+ ],
2783
+ "teamspace folders get": [
2942
2784
  {
2943
2785
  description: "Get a teamspace folder by exact name or UUID.",
2944
- command: 'zinkee --json teamspace folders get "Shared Dashboards"',
2945
- },
2946
- ]),
2947
- "teamspace folders delete": buildCommandExamples([
2786
+ command: 'zinkee --json teamspace folders get "Shared Dashboards"'
2787
+ }
2788
+ ],
2789
+ "teamspace folders delete": [
2948
2790
  {
2949
- description:
2950
- "Delete a teamspace folder. Its resources are moved to the returned target folder (root by default).",
2791
+ description: "Delete a teamspace folder. Its resources are moved to the returned target folder (root by default).",
2951
2792
  command: 'zinkee --json teamspace folders delete "Customer Success"',
2952
2793
  response: `{
2953
2794
  "folderId": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a",
@@ -2957,20 +2798,20 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2957
2798
  "name": "root",
2958
2799
  "isRoot": true
2959
2800
  }
2960
- }`,
2961
- },
2962
- ]),
2963
- "files storage": buildCommandExamples([
2801
+ }`
2802
+ }
2803
+ ],
2804
+ "files storage": [
2964
2805
  {
2965
2806
  description: "Get the storage quota and current usage (bytes).",
2966
2807
  command: "zinkee --json files storage",
2967
2808
  response: `{
2968
2809
  "maxSize": 10737418240,
2969
2810
  "usedSize": 2147483648
2970
- }`,
2971
- },
2972
- ]),
2973
- "displays list": buildCommandExamples([
2811
+ }`
2812
+ }
2813
+ ],
2814
+ "displays list": [
2974
2815
  {
2975
2816
  description: "List displays in the workspace with variable and widget counts.",
2976
2817
  command: "zinkee --json displays list",
@@ -2983,7 +2824,7 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
2983
2824
  "widgetCount": 6,
2984
2825
  "folder": {
2985
2826
  "id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
2986
- "name": "📊 Executive",
2827
+ "name": "\u{1F4CA} Executive",
2987
2828
  "isRoot": false
2988
2829
  }
2989
2830
  },
@@ -3007,17 +2848,16 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3007
2848
  "widgetCount": 2,
3008
2849
  "folder": {
3009
2850
  "id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
3010
- "name": "📊 Executive",
2851
+ "name": "\u{1F4CA} Executive",
3011
2852
  "isRoot": false
3012
2853
  }
3013
2854
  }
3014
- ]`,
3015
- },
3016
- ]),
3017
- "displays get": buildCommandExamples([
2855
+ ]`
2856
+ }
2857
+ ],
2858
+ "displays get": [
3018
2859
  {
3019
- description:
3020
- "Get a display with its layout (tabs/freeformLayouts/slots), variables, widgets, cross-widget filter and navigation targets.",
2860
+ description: "Get a display with its layout (tabs/freeformLayouts/slots), variables, widgets, cross-widget filter and navigation targets.",
3021
2861
  command: "zinkee --json displays get 0f6f062f-1478-4df2-96a1-c495d037d260",
3022
2862
  response: `{
3023
2863
  "id": "0f6f062f-1478-4df2-96a1-c495d037d260",
@@ -3145,48 +2985,45 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3145
2985
  ],
3146
2986
  "folder": {
3147
2987
  "id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
3148
- "name": "📊 Executive",
2988
+ "name": "\u{1F4CA} Executive",
3149
2989
  "isRoot": false
3150
2990
  }
3151
- }`,
3152
- },
3153
- ]),
3154
- "displays update": buildCommandExamples([
2991
+ }`
2992
+ }
2993
+ ],
2994
+ "displays update": [
3155
2995
  {
3156
2996
  description: "Update only the display description.",
3157
- command:
3158
- 'zinkee --json displays update 0f6f062f-1478-4df2-96a1-c495d037d260 --description "Sales pipeline overview"',
2997
+ command: 'zinkee --json displays update 0f6f062f-1478-4df2-96a1-c495d037d260 --description "Sales pipeline overview"',
3159
2998
  raw: `{
3160
2999
  "description": "Sales pipeline overview"
3161
- }`,
3000
+ }`
3162
3001
  },
3163
3002
  {
3164
3003
  description: "Clear the display description.",
3165
- command:
3166
- 'zinkee --json displays update 0f6f062f-1478-4df2-96a1-c495d037d260 --description ""',
3004
+ command: 'zinkee --json displays update 0f6f062f-1478-4df2-96a1-c495d037d260 --description ""',
3167
3005
  raw: `{
3168
3006
  "description": ""
3169
- }`,
3007
+ }`
3170
3008
  },
3171
3009
  {
3172
3010
  description: "Rename a display (patch of top-level metadata only).",
3173
- command:
3174
- 'zinkee --json displays update 0f6f062f-1478-4df2-96a1-c495d037d260 --name "Pipeline overview (renamed)"',
3011
+ command: 'zinkee --json displays update 0f6f062f-1478-4df2-96a1-c495d037d260 --name "Pipeline overview (renamed)"',
3175
3012
  raw: `{
3176
3013
  "name": "Pipeline overview (renamed)"
3177
3014
  }`,
3178
3015
  response: `{
3179
3016
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260"
3180
- }`,
3181
- },
3182
- ]),
3183
- "displays delete": buildCommandExamples([
3017
+ }`
3018
+ }
3019
+ ],
3020
+ "displays delete": [
3184
3021
  {
3185
3022
  description: "Delete a display.",
3186
- command: "zinkee --json displays delete 0f6f062f-1478-4df2-96a1-c495d037d260",
3187
- },
3188
- ]),
3189
- "displays folders list": buildCommandExamples([
3023
+ command: "zinkee --json displays delete 0f6f062f-1478-4df2-96a1-c495d037d260"
3024
+ }
3025
+ ],
3026
+ "displays folders list": [
3190
3027
  {
3191
3028
  description: "List flat display folders (non-root folders plus the root bucket).",
3192
3029
  command: "zinkee --json displays folders list",
@@ -3203,10 +3040,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3203
3040
  "isRoot": true,
3204
3041
  "displayCount": 4
3205
3042
  }
3206
- ]`,
3207
- },
3208
- ]),
3209
- "displays folders create": buildCommandExamples([
3043
+ ]`
3044
+ }
3045
+ ],
3046
+ "displays folders create": [
3210
3047
  {
3211
3048
  description: "Create one flat display folder.",
3212
3049
  command: 'zinkee --json displays folders create --name "Executive Dashboards"',
@@ -3218,14 +3055,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3218
3055
  "name": "Executive Dashboards",
3219
3056
  "isRoot": false,
3220
3057
  "displayCount": 0
3221
- }`,
3222
- },
3223
- ]),
3224
- "displays folders update": buildCommandExamples([
3058
+ }`
3059
+ }
3060
+ ],
3061
+ "displays folders update": [
3225
3062
  {
3226
3063
  description: "Rename a display folder. The folder argument accepts a UUID or an exact name.",
3227
- command:
3228
- 'zinkee --json displays folders update "Executive Dashboards" --name "Executive Dashboards (2026)"',
3064
+ command: 'zinkee --json displays folders update "Executive Dashboards" --name "Executive Dashboards (2026)"',
3229
3065
  raw: `{
3230
3066
  "name": "Executive Dashboards (2026)"
3231
3067
  }`,
@@ -3234,10 +3070,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3234
3070
  "name": "Executive Dashboards (2026)",
3235
3071
  "isRoot": false,
3236
3072
  "displayCount": 2
3237
- }`,
3238
- },
3239
- ]),
3240
- "displays folders delete": buildCommandExamples([
3073
+ }`
3074
+ }
3075
+ ],
3076
+ "displays folders delete": [
3241
3077
  {
3242
3078
  description: "Delete a non-root display folder. Its displays move back to the root folder.",
3243
3079
  command: 'zinkee --json displays folders delete "Executive Dashboards"',
@@ -3246,14 +3082,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3246
3082
  "name": "Executive Dashboards",
3247
3083
  "isRoot": false,
3248
3084
  "displayCount": 2
3249
- }`,
3250
- },
3251
- ]),
3252
- "displays folders move": buildCommandExamples([
3085
+ }`
3086
+ }
3087
+ ],
3088
+ "displays folders move": [
3253
3089
  {
3254
3090
  description: "Move one display into a target folder by exact folder name.",
3255
- command:
3256
- 'zinkee --json displays folders move 0f6f062f-1478-4df2-96a1-c495d037d260 --to "Executive Dashboards"',
3091
+ command: 'zinkee --json displays folders move 0f6f062f-1478-4df2-96a1-c495d037d260 --to "Executive Dashboards"',
3257
3092
  raw: `{
3258
3093
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
3259
3094
  "targetFolderId": "e7a1c3d2-5f4b-4a6c-9d8e-1f2a3b4c5d6e"
@@ -3262,73 +3097,69 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3262
3097
  "id": "e7a1c3d2-5f4b-4a6c-9d8e-1f2a3b4c5d6e",
3263
3098
  "name": "Executive Dashboards",
3264
3099
  "isRoot": false
3265
- }`,
3266
- },
3267
- ]),
3268
- "displays layout get": buildCommandExamples([
3100
+ }`
3101
+ }
3102
+ ],
3103
+ "displays layout get": [
3269
3104
  {
3270
3105
  description: "Get the layout block of a display (template + tabs/freeformLayouts/slots).",
3271
- command: "zinkee --json displays layout get 0f6f062f-1478-4df2-96a1-c495d037d260",
3272
- },
3273
- ]),
3274
- "displays layout update": buildCommandExamples([
3106
+ command: "zinkee --json displays layout get 0f6f062f-1478-4df2-96a1-c495d037d260"
3107
+ }
3108
+ ],
3109
+ "displays layout update": [
3275
3110
  {
3276
3111
  description: "Replace the freeform layout of a display.",
3277
- command:
3278
- `zinkee --json displays layout update 0f6f062f-1478-4df2-96a1-c495d037d260 --template freeform --freeform-layouts '{"lg":[{"i":"widget-1","x":0,"y":0,"w":6,"h":5}]}'`,
3279
- },
3280
- ]),
3281
- "displays tabs list": buildCommandExamples([
3112
+ command: `zinkee --json displays layout update 0f6f062f-1478-4df2-96a1-c495d037d260 --template freeform --freeform-layouts '{"lg":[{"i":"widget-1","x":0,"y":0,"w":6,"h":5}]}'`
3113
+ }
3114
+ ],
3115
+ "displays tabs list": [
3282
3116
  {
3283
3117
  description: "List the tabs of a display (only meaningful when the layout template uses tabs).",
3284
- command: "zinkee --json displays tabs list 0f6f062f-1478-4df2-96a1-c495d037d260",
3285
- },
3286
- ]),
3287
- "displays tabs delete": buildCommandExamples([
3118
+ command: "zinkee --json displays tabs list 0f6f062f-1478-4df2-96a1-c495d037d260"
3119
+ }
3120
+ ],
3121
+ "displays tabs delete": [
3288
3122
  {
3289
3123
  description: "Delete a tab by id.",
3290
3124
  command: "zinkee --json displays tabs delete 0f6f062f-1478-4df2-96a1-c495d037d260 tab-main",
3291
3125
  response: `{
3292
3126
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
3293
3127
  "tabId": "tab-main"
3294
- }`,
3295
- },
3296
- ]),
3297
- "displays variables list": buildCommandExamples([
3128
+ }`
3129
+ }
3130
+ ],
3131
+ "displays variables list": [
3298
3132
  {
3299
3133
  description: "List the variables of a display.",
3300
- command: "zinkee --json displays variables list 0f6f062f-1478-4df2-96a1-c495d037d260",
3301
- },
3302
- ]),
3303
- "displays variables get": buildCommandExamples([
3134
+ command: "zinkee --json displays variables list 0f6f062f-1478-4df2-96a1-c495d037d260"
3135
+ }
3136
+ ],
3137
+ "displays variables get": [
3304
3138
  {
3305
3139
  description: "Get one variable by id.",
3306
- command:
3307
- "zinkee --json displays variables get 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111",
3308
- },
3309
- ]),
3310
- "displays variables delete": buildCommandExamples([
3140
+ command: "zinkee --json displays variables get 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111"
3141
+ }
3142
+ ],
3143
+ "displays variables delete": [
3311
3144
  {
3312
3145
  description: "Delete a variable.",
3313
- command:
3314
- "zinkee --json displays variables delete 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111",
3146
+ command: "zinkee --json displays variables delete 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111",
3315
3147
  response: `{
3316
3148
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
3317
3149
  "variableId": "aaaaaaaa-1111-4111-a111-111111111111"
3318
- }`,
3319
- },
3320
- ]),
3321
- "displays widgets list": buildCommandExamples([
3150
+ }`
3151
+ }
3152
+ ],
3153
+ "displays widgets list": [
3322
3154
  {
3323
3155
  description: "List the widgets of a display.",
3324
- command: "zinkee --json displays widgets list 0f6f062f-1478-4df2-96a1-c495d037d260",
3325
- },
3326
- ]),
3327
- "displays widgets get": buildCommandExamples([
3156
+ command: "zinkee --json displays widgets list 0f6f062f-1478-4df2-96a1-c495d037d260"
3157
+ }
3158
+ ],
3159
+ "displays widgets get": [
3328
3160
  {
3329
3161
  description: "Get one widget (returns the canonical typed widget contract).",
3330
- command:
3331
- "zinkee --json displays widgets get 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111",
3162
+ command: "zinkee --json displays widgets get 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111",
3332
3163
  response: `{
3333
3164
  "id": "11111111-1111-4111-a111-111111111111",
3334
3165
  "type": "TABLE_OR_SUBTABLE",
@@ -3365,51 +3196,48 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3365
3196
  "fields": ["contact-name", "status", "amount"],
3366
3197
  "columnSize": { "contact-name": 240 }
3367
3198
  }
3368
- }`,
3369
- },
3370
- ]),
3371
- "displays widgets delete": buildCommandExamples([
3199
+ }`
3200
+ }
3201
+ ],
3202
+ "displays widgets delete": [
3372
3203
  {
3373
3204
  description: "Delete a widget.",
3374
- command:
3375
- "zinkee --json displays widgets delete 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111",
3205
+ command: "zinkee --json displays widgets delete 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111",
3376
3206
  response: `{
3377
3207
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
3378
3208
  "widgetId": "11111111-1111-4111-a111-111111111111"
3379
- }`,
3380
- },
3381
- ]),
3382
- "displays navigation-targets list": buildCommandExamples([
3209
+ }`
3210
+ }
3211
+ ],
3212
+ "displays navigation-targets list": [
3383
3213
  {
3384
3214
  description: "List navigation targets for a display.",
3385
- command: "zinkee --json displays navigation-targets list 0f6f062f-1478-4df2-96a1-c495d037d260",
3386
- },
3387
- ]),
3388
- "displays navigation-targets delete": buildCommandExamples([
3215
+ command: "zinkee --json displays navigation-targets list 0f6f062f-1478-4df2-96a1-c495d037d260"
3216
+ }
3217
+ ],
3218
+ "displays navigation-targets delete": [
3389
3219
  {
3390
3220
  description: "Delete a navigation target.",
3391
- command:
3392
- "zinkee --json displays navigation-targets delete 0f6f062f-1478-4df2-96a1-c495d037d260 nav-target-customer",
3221
+ command: "zinkee --json displays navigation-targets delete 0f6f062f-1478-4df2-96a1-c495d037d260 nav-target-customer",
3393
3222
  response: `{
3394
3223
  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
3395
3224
  "navigationTargetId": "nav-target-customer"
3396
- }`,
3397
- },
3398
- ]),
3399
- "displays cross-widget-filter get": buildCommandExamples([
3225
+ }`
3226
+ }
3227
+ ],
3228
+ "displays cross-widget-filter get": [
3400
3229
  {
3401
3230
  description: "Get the cross-widget filter of a display (can be null if none is set).",
3402
- command: "zinkee --json displays cross-widget-filter get 0f6f062f-1478-4df2-96a1-c495d037d260",
3403
- },
3404
- ]),
3405
- "displays cross-widget-filter delete": buildCommandExamples([
3231
+ command: "zinkee --json displays cross-widget-filter get 0f6f062f-1478-4df2-96a1-c495d037d260"
3232
+ }
3233
+ ],
3234
+ "displays cross-widget-filter delete": [
3406
3235
  {
3407
3236
  description: "Delete the cross-widget filter of a display.",
3408
- command:
3409
- "zinkee --json displays cross-widget-filter delete 0f6f062f-1478-4df2-96a1-c495d037d260",
3410
- },
3411
- ]),
3412
- "automations list": buildCommandExamples([
3237
+ command: "zinkee --json displays cross-widget-filter delete 0f6f062f-1478-4df2-96a1-c495d037d260"
3238
+ }
3239
+ ],
3240
+ "automations list": [
3413
3241
  {
3414
3242
  description: "List automations with summaries.",
3415
3243
  command: "zinkee --json automations list",
@@ -3427,18 +3255,16 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3427
3255
  "triggerType": "record_changed",
3428
3256
  "actionTypes": ["create_record", "http_request", "execute_plugin", "send_message"]
3429
3257
  }
3430
- ]`,
3258
+ ]`
3431
3259
  },
3432
3260
  {
3433
3261
  description: "Filter automations by folder, status, and trigger type.",
3434
- command:
3435
- 'zinkee --json automations list --folder "Codex Frontend Demo" --status active --trigger-type record_changed',
3436
- },
3437
- ]),
3438
- "automations get": buildCommandExamples([
3262
+ command: 'zinkee --json automations list --folder "Codex Frontend Demo" --status active --trigger-type record_changed'
3263
+ }
3264
+ ],
3265
+ "automations get": [
3439
3266
  {
3440
- description:
3441
- "Get the full automation document, including trigger, actions and flow.",
3267
+ description: "Get the full automation document, including trigger, actions and flow.",
3442
3268
  command: "zinkee --json automations get automation-1",
3443
3269
  response: `{
3444
3270
  "id": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
@@ -3520,40 +3346,40 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3520
3346
  }
3521
3347
  ]
3522
3348
  }
3523
- }`,
3524
- },
3525
- ]),
3526
- "automations delete": buildCommandExamples([
3349
+ }`
3350
+ }
3351
+ ],
3352
+ "automations delete": [
3527
3353
  {
3528
3354
  description: "Delete an automation. The response mirrors the mutation shape.",
3529
3355
  command: "zinkee --json automations delete automation-1",
3530
3356
  response: `{
3531
3357
  "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
3532
3358
  "webhookEndpoint": null
3533
- }`,
3534
- },
3535
- ]),
3536
- "automations activate": buildCommandExamples([
3359
+ }`
3360
+ }
3361
+ ],
3362
+ "automations activate": [
3537
3363
  {
3538
3364
  description: "Activate an automation (transitions it to status=active).",
3539
3365
  command: "zinkee --json automations activate automation-1",
3540
3366
  response: `{
3541
3367
  "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
3542
3368
  "webhookEndpoint": null
3543
- }`,
3544
- },
3545
- ]),
3546
- "automations deactivate": buildCommandExamples([
3369
+ }`
3370
+ }
3371
+ ],
3372
+ "automations deactivate": [
3547
3373
  {
3548
3374
  description: "Deactivate an automation (transitions it to status=inactive).",
3549
3375
  command: "zinkee --json automations deactivate automation-1",
3550
3376
  response: `{
3551
3377
  "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
3552
3378
  "webhookEndpoint": null
3553
- }`,
3554
- },
3555
- ]),
3556
- "automations folders list": buildCommandExamples([
3379
+ }`
3380
+ }
3381
+ ],
3382
+ "automations folders list": [
3557
3383
  {
3558
3384
  description: "List flat automation folders (non-root plus the root bucket).",
3559
3385
  command: "zinkee --json automations folders list",
@@ -3570,10 +3396,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3570
3396
  "isRoot": true,
3571
3397
  "automationCount": 3
3572
3398
  }
3573
- ]`,
3574
- },
3575
- ]),
3576
- "automations folders delete": buildCommandExamples([
3399
+ ]`
3400
+ }
3401
+ ],
3402
+ "automations folders delete": [
3577
3403
  {
3578
3404
  description: "Delete a non-root automation folder by exact name.",
3579
3405
  command: 'zinkee --json automations folders delete "Codex Frontend Demo"',
@@ -3582,26 +3408,24 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3582
3408
  "name": "Codex Frontend Demo",
3583
3409
  "isRoot": false,
3584
3410
  "automationCount": 0
3585
- }`,
3586
- },
3587
- ]),
3588
- "automations trigger get": buildCommandExamples([
3411
+ }`
3412
+ }
3413
+ ],
3414
+ "automations trigger get": [
3589
3415
  {
3590
- description:
3591
- "Get the trigger subresource. Response shape depends on trigger type; here the scheduled variant.",
3416
+ description: "Get the trigger subresource. Response shape depends on trigger type; here the scheduled variant.",
3592
3417
  command: "zinkee --json automations trigger get automation-1",
3593
3418
  response: `{
3594
3419
  "type": "scheduled",
3595
3420
  "config": {
3596
3421
  "cronExpression": "0 15 10 * * 1"
3597
3422
  }
3598
- }`,
3599
- },
3600
- ]),
3601
- "automations webhook get": buildCommandExamples([
3423
+ }`
3424
+ }
3425
+ ],
3426
+ "automations webhook get": [
3602
3427
  {
3603
- description:
3604
- "Get the webhook endpoint companion resource (only exists when the trigger is a webhook).",
3428
+ description: "Get the webhook endpoint companion resource (only exists when the trigger is a webhook).",
3605
3429
  command: "zinkee --json automations webhook get automation-1",
3606
3430
  response: `{
3607
3431
  "endpointId": "b3cb4283-97ab-4d94-9e6f-82d0ee5cee24",
@@ -3617,16 +3441,16 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3617
3441
  "jsonPath": "$.data.id"
3618
3442
  }
3619
3443
  ]
3620
- }`,
3621
- },
3622
- ]),
3623
- "automations webhook delete": buildCommandExamples([
3444
+ }`
3445
+ }
3446
+ ],
3447
+ "automations webhook delete": [
3624
3448
  {
3625
3449
  description: "Delete the webhook endpoint companion resource (returns no body).",
3626
- command: "zinkee --json automations webhook delete automation-1",
3627
- },
3628
- ]),
3629
- "automations actions list": buildCommandExamples([
3450
+ command: "zinkee --json automations webhook delete automation-1"
3451
+ }
3452
+ ],
3453
+ "automations actions list": [
3630
3454
  {
3631
3455
  description: "List the ordered actions of an automation.",
3632
3456
  command: "zinkee --json automations actions list automation-1",
@@ -3670,20 +3494,20 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3670
3494
  "pluginArgs": {"mode": "safe"}
3671
3495
  }
3672
3496
  }
3673
- ]`,
3674
- },
3675
- ]),
3676
- "automations actions delete": buildCommandExamples([
3497
+ ]`
3498
+ }
3499
+ ],
3500
+ "automations actions delete": [
3677
3501
  {
3678
3502
  description: "Delete one action from an automation.",
3679
3503
  command: "zinkee --json automations actions delete automation-1 action-1",
3680
3504
  response: `{
3681
3505
  "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
3682
3506
  "webhookEndpoint": null
3683
- }`,
3684
- },
3685
- ]),
3686
- "automations flow get": buildCommandExamples([
3507
+ }`
3508
+ }
3509
+ ],
3510
+ "automations flow get": [
3687
3511
  {
3688
3512
  description: "Get the flow subresource (entry actions and transitions).",
3689
3513
  command: "zinkee --json automations flow get automation-1",
@@ -3699,10 +3523,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3699
3523
  "toActionId": "dae13307-057f-4c39-817c-4d2dd5898421"
3700
3524
  }
3701
3525
  ]
3702
- }`,
3703
- },
3704
- ]),
3705
- "automations plugins list": buildCommandExamples([
3526
+ }`
3527
+ }
3528
+ ],
3529
+ "automations plugins list": [
3706
3530
  {
3707
3531
  description: "List active workspace plugins available for execute_plugin actions.",
3708
3532
  command: "zinkee --json automations plugins list",
@@ -3716,10 +3540,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3716
3540
  "version": "1.0"
3717
3541
  }
3718
3542
  }
3719
- ]`,
3720
- },
3721
- ]),
3722
- "automations plugins get": buildCommandExamples([
3543
+ ]`
3544
+ }
3545
+ ],
3546
+ "automations plugins get": [
3723
3547
  {
3724
3548
  description: "Get one plugin by id.",
3725
3549
  command: "zinkee --json automations plugins get demo-plugin",
@@ -3731,10 +3555,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3731
3555
  "properties": {
3732
3556
  "version": "1.0"
3733
3557
  }
3734
- }`,
3735
- },
3736
- ]),
3737
- "automations connections list": buildCommandExamples([
3558
+ }`
3559
+ }
3560
+ ],
3561
+ "automations connections list": [
3738
3562
  {
3739
3563
  description: "List stored workspace connections (secrets are never returned).",
3740
3564
  command: "zinkee --json automations connections list",
@@ -3749,10 +3573,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3749
3573
  "headerName": "Authorization"
3750
3574
  }
3751
3575
  }
3752
- ]`,
3753
- },
3754
- ]),
3755
- "automations connections get": buildCommandExamples([
3576
+ ]`
3577
+ }
3578
+ ],
3579
+ "automations connections get": [
3756
3580
  {
3757
3581
  description: "Get one stored connection by id.",
3758
3582
  command: "zinkee --json automations connections get connection-1",
@@ -3770,21 +3594,19 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3770
3594
  "updatedAt": "2026-04-21T09:00:00Z",
3771
3595
  "createdBy": "developer@zinkee.com",
3772
3596
  "updatedBy": "developer@zinkee.com"
3773
- }`,
3774
- },
3775
- ]),
3776
- "automations connections delete": buildCommandExamples([
3597
+ }`
3598
+ }
3599
+ ],
3600
+ "automations connections delete": [
3777
3601
  {
3778
3602
  description: "Delete one stored connection (returns no body).",
3779
- command: "zinkee --json automations connections delete connection-1",
3780
- },
3781
- ]),
3782
- "automations create": buildCommandExamples([
3603
+ command: "zinkee --json automations connections delete connection-1"
3604
+ }
3605
+ ],
3606
+ "automations create": [
3783
3607
  {
3784
- description:
3785
- "Create a scheduled automation with description and target folder. Safe first example because it does not depend on workspace schemas.",
3786
- command:
3787
- 'zinkee --json automations create --name "Nightly invoice sync" --description "Runs every Monday morning" --folder cdfc14e3-3169-4ffb-8d9b-b11858a9240f --trigger-type scheduled --cron "0 15 10 * * 1"',
3608
+ description: "Create a scheduled automation with description and target folder. Safe first example because it does not depend on workspace schemas.",
3609
+ command: 'zinkee --json automations create --name "Nightly invoice sync" --description "Runs every Monday morning" --folder cdfc14e3-3169-4ffb-8d9b-b11858a9240f --trigger-type scheduled --cron "0 15 10 * * 1"',
3788
3610
  raw: `{
3789
3611
  "name": "Nightly invoice sync",
3790
3612
  "description": "Runs every Monday morning",
@@ -3799,13 +3621,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3799
3621
  response: `{
3800
3622
  "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
3801
3623
  "webhookEndpoint": null
3802
- }`,
3624
+ }`
3803
3625
  },
3804
3626
  {
3805
- description:
3806
- "Create a record-created automation with an 'is not empty' condition. Replace 'leads' and 'status' with real schema/field slugs or UUIDs.",
3807
- command:
3808
- `zinkee --json automations create --name "Lead welcome" --trigger-type record_created --trigger-schema leads --condition-json '{"field":"status","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
3627
+ description: "Create a record-created automation with an 'is not empty' condition. Replace 'leads' and 'status' with real schema/field slugs or UUIDs.",
3628
+ command: `zinkee --json automations create --name "Lead welcome" --trigger-type record_created --trigger-schema leads --condition-json '{"field":"status","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
3809
3629
  raw: `{
3810
3630
  "name": "Lead welcome",
3811
3631
  "trigger": {
@@ -3821,13 +3641,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3821
3641
  ]
3822
3642
  }
3823
3643
  }
3824
- }`,
3644
+ }`
3825
3645
  },
3826
3646
  {
3827
- description:
3828
- "Create a record-changed automation watching a single field, with an 'is not empty' condition. Replace 'orders' and 'status' with values from your workspace.",
3829
- command:
3830
- `zinkee --json automations create --name "Order status sync" --trigger-type record_changed --trigger-schema orders --trigger-field status --condition-json '{"field":"status","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
3647
+ description: "Create a record-changed automation watching a single field, with an 'is not empty' condition. Replace 'orders' and 'status' with values from your workspace.",
3648
+ command: `zinkee --json automations create --name "Order status sync" --trigger-type record_changed --trigger-schema orders --trigger-field status --condition-json '{"field":"status","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
3831
3649
  raw: `{
3832
3650
  "name": "Order status sync",
3833
3651
  "trigger": {
@@ -3844,49 +3662,42 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3844
3662
  ]
3845
3663
  }
3846
3664
  }
3847
- }`,
3848
- },
3849
- ]),
3850
- "automations update": buildCommandExamples([
3665
+ }`
3666
+ }
3667
+ ],
3668
+ "automations update": [
3851
3669
  {
3852
- description:
3853
- "Update automation description and move it to a folder. Supported patch paths: name, description, folderId.",
3854
- command:
3855
- 'zinkee --json automations update automation-1 --description "Updated by an agent" --folder cdfc14e3-3169-4ffb-8d9b-b11858a9240f',
3670
+ description: "Update automation description and move it to a folder. Supported patch paths: name, description, folderId.",
3671
+ command: 'zinkee --json automations update automation-1 --description "Updated by an agent" --folder cdfc14e3-3169-4ffb-8d9b-b11858a9240f',
3856
3672
  raw: `{
3857
3673
  "set": {
3858
3674
  "description": "Updated by an agent",
3859
3675
  "folderId": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f"
3860
3676
  }
3861
- }`,
3677
+ }`
3862
3678
  },
3863
3679
  {
3864
- description:
3865
- "Clear the folder assignment by combining an explicit unset through the raw payload.",
3866
- command:
3867
- 'zinkee --json automations update automation-1 --raw \'{"unset":["folderId"]}\'',
3680
+ description: "Clear the folder assignment by combining an explicit unset through the raw payload.",
3681
+ command: `zinkee --json automations update automation-1 --raw '{"unset":["folderId"]}'`,
3868
3682
  raw: `{
3869
3683
  "unset": ["folderId"]
3870
- }`,
3871
- },
3872
- ]),
3873
- "automations trigger set": buildCommandExamples([
3684
+ }`
3685
+ }
3686
+ ],
3687
+ "automations trigger set": [
3874
3688
  {
3875
3689
  description: "Replace the trigger with a scheduled (cron) trigger.",
3876
- command:
3877
- 'zinkee --json automations trigger set automation-1 --trigger-type scheduled --cron "0 15 10 * * 1"',
3690
+ command: 'zinkee --json automations trigger set automation-1 --trigger-type scheduled --cron "0 15 10 * * 1"',
3878
3691
  raw: `{
3879
3692
  "type": "scheduled",
3880
3693
  "config": {
3881
3694
  "cronExpression": "0 15 10 * * 1"
3882
3695
  }
3883
- }`,
3696
+ }`
3884
3697
  },
3885
3698
  {
3886
- description:
3887
- "Replace the trigger with a record-created trigger plus an 'is not empty' condition. Agents should provide at least one meaningful condition.",
3888
- command:
3889
- `zinkee --json automations trigger set automation-1 --trigger-type record_created --trigger-schema orders --condition-json '{"field":"status","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
3699
+ description: "Replace the trigger with a record-created trigger plus an 'is not empty' condition. Agents should provide at least one meaningful condition.",
3700
+ command: `zinkee --json automations trigger set automation-1 --trigger-type record_created --trigger-schema orders --condition-json '{"field":"status","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
3890
3701
  raw: `{
3891
3702
  "type": "record_created",
3892
3703
  "config": {
@@ -3899,13 +3710,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3899
3710
  }
3900
3711
  ]
3901
3712
  }
3902
- }`,
3713
+ }`
3903
3714
  },
3904
3715
  {
3905
- description:
3906
- "Replace the trigger with a record-changed trigger watching one field, with an 'is not empty' condition on that field.",
3907
- command:
3908
- `zinkee --json automations trigger set automation-1 --trigger-type record_changed --trigger-schema orders --trigger-field status --condition-json '{"field":"status","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
3716
+ description: "Replace the trigger with a record-changed trigger watching one field, with an 'is not empty' condition on that field.",
3717
+ command: `zinkee --json automations trigger set automation-1 --trigger-type record_changed --trigger-schema orders --trigger-field status --condition-json '{"field":"status","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
3909
3718
  raw: `{
3910
3719
  "type": "record_changed",
3911
3720
  "config": {
@@ -3919,26 +3728,23 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3919
3728
  }
3920
3729
  ]
3921
3730
  }
3922
- }`,
3731
+ }`
3923
3732
  },
3924
3733
  {
3925
3734
  description: "Replace the trigger with a webhook trigger that reuses an existing webhook endpoint id.",
3926
- command:
3927
- "zinkee --json automations trigger set automation-1 --trigger-type webhook --webhook-endpoint-id b3cb4283-97ab-4d94-9e6f-82d0ee5cee24",
3735
+ command: "zinkee --json automations trigger set automation-1 --trigger-type webhook --webhook-endpoint-id b3cb4283-97ab-4d94-9e6f-82d0ee5cee24",
3928
3736
  raw: `{
3929
3737
  "type": "webhook",
3930
3738
  "config": {
3931
3739
  "webhookEndpointId": "b3cb4283-97ab-4d94-9e6f-82d0ee5cee24"
3932
3740
  }
3933
- }`,
3934
- },
3935
- ]),
3936
- "automations actions add": buildCommandExamples([
3741
+ }`
3742
+ }
3743
+ ],
3744
+ "automations actions add": [
3937
3745
  {
3938
- description:
3939
- "Add a create-record action with two literal field mappings. Populate visible fieldMapping entries so the frontend form is complete.",
3940
- command:
3941
- 'zinkee --json automations actions add automation-1 --type create_record --name "Create follow-up order" --target-schema followups --map status=pending --map description="Created by automation"',
3746
+ description: "Add a create-record action with two literal field mappings. Populate visible fieldMapping entries so the frontend form is complete.",
3747
+ command: 'zinkee --json automations actions add automation-1 --type create_record --name "Create follow-up order" --target-schema followups --map status=pending --map description="Created by automation"',
3942
3748
  raw: `{
3943
3749
  "type": "create_record",
3944
3750
  "name": "Create follow-up order",
@@ -3955,13 +3761,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3955
3761
  }
3956
3762
  }
3957
3763
  }
3958
- }`,
3764
+ }`
3959
3765
  },
3960
3766
  {
3961
- description:
3962
- "Add an update-record action that targets the trigger record. Pair --use-trigger-record with --map to rewrite fields on the record that fired the automation.",
3963
- command:
3964
- 'zinkee --json automations actions add automation-1 --type update_record --name "Mark order as processed" --target-schema orders --use-trigger-record --map status=processed',
3767
+ description: "Add an update-record action that targets the trigger record. Pair --use-trigger-record with --map to rewrite fields on the record that fired the automation.",
3768
+ command: 'zinkee --json automations actions add automation-1 --type update_record --name "Mark order as processed" --target-schema orders --use-trigger-record --map status=processed',
3965
3769
  raw: `{
3966
3770
  "type": "update_record",
3967
3771
  "name": "Mark order as processed",
@@ -3975,25 +3779,22 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
3975
3779
  },
3976
3780
  "useTriggerRecord": true
3977
3781
  }
3978
- }`,
3782
+ }`
3979
3783
  },
3980
3784
  {
3981
3785
  description: "Add a search-records action scoped to a target schema.",
3982
- command:
3983
- 'zinkee --json automations actions add automation-1 --type search_records --name "Find related invoices" --target-schema orders',
3786
+ command: 'zinkee --json automations actions add automation-1 --type search_records --name "Find related invoices" --target-schema orders',
3984
3787
  raw: `{
3985
3788
  "type": "search_records",
3986
3789
  "name": "Find related invoices",
3987
3790
  "config": {
3988
3791
  "targetSchemaId": "orders"
3989
3792
  }
3990
- }`,
3793
+ }`
3991
3794
  },
3992
3795
  {
3993
- description:
3994
- "Add a search-records action whose condition pulls its value from the trigger payload using --condition-json.",
3995
- command:
3996
- `zinkee --json automations actions add automation-1 --type search_records --name "Find duplicates" --target-schema followups --condition-json '{"field":"email","comparator":"eq","values":[{"rawValue":null,"source":{"type":"TRIGGER","id":"f1e1d000-0000-0000-0000-000000000005"}}]}'`,
3796
+ description: "Add a search-records action whose condition pulls its value from the trigger payload using --condition-json.",
3797
+ command: `zinkee --json automations actions add automation-1 --type search_records --name "Find duplicates" --target-schema followups --condition-json '{"field":"email","comparator":"eq","values":[{"rawValue":null,"source":{"type":"TRIGGER","id":"f1e1d000-0000-0000-0000-000000000005"}}]}'`,
3997
3798
  raw: `{
3998
3799
  "type": "search_records",
3999
3800
  "name": "Find duplicates",
@@ -4015,13 +3816,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4015
3816
  }
4016
3817
  ]
4017
3818
  }
4018
- }`,
3819
+ }`
4019
3820
  },
4020
3821
  {
4021
- description:
4022
- "Add an HTTP request action using a stored workspace connection for authentication.",
4023
- command:
4024
- 'zinkee --json automations actions add automation-1 --type http_request --name "Notify external ERP" --method POST --url https://example.com/integrations/order-status --header X-Demo=codex --content-type application/json --timeout-ms 5000 --auth-mode STORED --connection connection-1',
3822
+ description: "Add an HTTP request action using a stored workspace connection for authentication.",
3823
+ command: 'zinkee --json automations actions add automation-1 --type http_request --name "Notify external ERP" --method POST --url https://example.com/integrations/order-status --header X-Demo=codex --content-type application/json --timeout-ms 5000 --auth-mode STORED --connection connection-1',
4025
3824
  raw: `{
4026
3825
  "type": "http_request",
4027
3826
  "name": "Notify external ERP",
@@ -4036,13 +3835,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4036
3835
  "authMode": "STORED",
4037
3836
  "connectionId": "connection-1"
4038
3837
  }
4039
- }`,
3838
+ }`
4040
3839
  },
4041
3840
  {
4042
- description:
4043
- "Add an execute-plugin action with structured plugin arguments. Replace 'demo-plugin' with an active id from 'zinkee --json automations plugins list'.",
4044
- command:
4045
- `zinkee --json automations actions add automation-1 --type execute_plugin --name "Run billing plugin" --plugin demo-plugin --arg mode=safe --arg-json steps='["one","two"]'`,
3841
+ description: "Add an execute-plugin action with structured plugin arguments. Replace 'demo-plugin' with an active id from 'zinkee --json automations plugins list'.",
3842
+ command: `zinkee --json automations actions add automation-1 --type execute_plugin --name "Run billing plugin" --plugin demo-plugin --arg mode=safe --arg-json steps='["one","two"]'`,
4046
3843
  raw: `{
4047
3844
  "type": "execute_plugin",
4048
3845
  "name": "Run billing plugin",
@@ -4053,13 +3850,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4053
3850
  "steps": ["one", "two"]
4054
3851
  }
4055
3852
  }
4056
- }`,
3853
+ }`
4057
3854
  },
4058
3855
  {
4059
- description:
4060
- "Add a send-message action. --to maps to fieldMapping.recipients and --message maps to fieldMapping.body. Values are wrapped in {rawValue, source} like every other automation field mapping; use --map / --map-json for extra keys.",
4061
- command:
4062
- `zinkee --json automations actions add automation-1 --type send_message --name "Notify customer" --to customer@example.com --subject "Your order status has changed" --message "Hello, your order is now processed."`,
3856
+ description: "Add a send-message action. --to maps to fieldMapping.recipients and --message maps to fieldMapping.body. Values are wrapped in {rawValue, source} like every other automation field mapping; use --map / --map-json for extra keys.",
3857
+ command: `zinkee --json automations actions add automation-1 --type send_message --name "Notify customer" --to customer@example.com --subject "Your order status has changed" --message "Hello, your order is now processed."`,
4063
3858
  raw: `{
4064
3859
  "type": "send_message",
4065
3860
  "name": "Notify customer",
@@ -4079,13 +3874,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4079
3874
  }
4080
3875
  }
4081
3876
  }
4082
- }`,
3877
+ }`
4083
3878
  },
4084
3879
  {
4085
- description:
4086
- "Add a generate-document action. The renderer reads the template, writes the file, and stores its id in the target FileField of the target schema.",
4087
- command:
4088
- 'zinkee --json automations actions add automation-1 --type generate_document --name "Generate invoice PDF" --document-template 6c08673e-f8a6-44d2-8c91-d09eca911f8f --target-schema 68d2c7be-4392-42de-b5ae-625ad79cfc3c --target-file-field c8edbde8-a361-4e9f-a39a-2e88971f21a7',
3880
+ description: "Add a generate-document action. The renderer reads the template, writes the file, and stores its id in the target FileField of the target schema.",
3881
+ command: 'zinkee --json automations actions add automation-1 --type generate_document --name "Generate invoice PDF" --document-template 6c08673e-f8a6-44d2-8c91-d09eca911f8f --target-schema 68d2c7be-4392-42de-b5ae-625ad79cfc3c --target-file-field c8edbde8-a361-4e9f-a39a-2e88971f21a7',
4089
3882
  raw: `{
4090
3883
  "type": "generate_document",
4091
3884
  "name": "Generate invoice PDF",
@@ -4094,15 +3887,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4094
3887
  "targetSchemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
4095
3888
  "targetFileFieldId": "c8edbde8-a361-4e9f-a39a-2e88971f21a7"
4096
3889
  }
4097
- }`,
4098
- },
4099
- ]),
4100
- "automations actions update": buildCommandExamples([
3890
+ }`
3891
+ }
3892
+ ],
3893
+ "automations actions update": [
4101
3894
  {
4102
- description:
4103
- "Replace an update-record action so it targets the trigger record. Conditions are stripped automatically when --use-trigger-record is provided.",
4104
- command:
4105
- 'zinkee --json automations actions update automation-1 action-1 --type update_record --name "Update trigger record" --target-schema followups --map status=ready --use-trigger-record',
3895
+ description: "Replace an update-record action so it targets the trigger record. Conditions are stripped automatically when --use-trigger-record is provided.",
3896
+ command: 'zinkee --json automations actions update automation-1 action-1 --type update_record --name "Update trigger record" --target-schema followups --map status=ready --use-trigger-record',
4106
3897
  raw: `{
4107
3898
  "type": "update_record",
4108
3899
  "name": "Update trigger record",
@@ -4130,13 +3921,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4130
3921
  }
4131
3922
  }
4132
3923
  }
4133
- }`,
3924
+ }`
4134
3925
  },
4135
3926
  {
4136
- description:
4137
- "Replace an HTTP request action, keeping it authenticated through a stored connection.",
4138
- command:
4139
- 'zinkee --json automations actions update automation-1 action-1 --type http_request --name "Notify external ERP" --method POST --url https://example.com/integrations/order-status --content-type application/json --timeout-ms 5000 --auth-mode STORED --connection connection-1',
3927
+ description: "Replace an HTTP request action, keeping it authenticated through a stored connection.",
3928
+ command: 'zinkee --json automations actions update automation-1 action-1 --type http_request --name "Notify external ERP" --method POST --url https://example.com/integrations/order-status --content-type application/json --timeout-ms 5000 --auth-mode STORED --connection connection-1',
4140
3929
  raw: `{
4141
3930
  "type": "http_request",
4142
3931
  "name": "Notify external ERP",
@@ -4148,13 +3937,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4148
3937
  "authMode": "STORED",
4149
3938
  "connectionId": "connection-1"
4150
3939
  }
4151
- }`,
3940
+ }`
4152
3941
  },
4153
3942
  {
4154
- description:
4155
- "Replace a send-message action. --to maps to fieldMapping.recipients and --message maps to fieldMapping.body; values are wrapped in {rawValue, source}.",
4156
- command:
4157
- `zinkee --json automations actions update automation-1 action-1 --type send_message --name "Notify customer" --to customer@example.com --subject "Your order status has changed" --message "Hello, your order is now processed."`,
3943
+ description: "Replace a send-message action. --to maps to fieldMapping.recipients and --message maps to fieldMapping.body; values are wrapped in {rawValue, source}.",
3944
+ command: `zinkee --json automations actions update automation-1 action-1 --type send_message --name "Notify customer" --to customer@example.com --subject "Your order status has changed" --message "Hello, your order is now processed."`,
4158
3945
  raw: `{
4159
3946
  "type": "send_message",
4160
3947
  "name": "Notify customer",
@@ -4174,15 +3961,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4174
3961
  }
4175
3962
  }
4176
3963
  }
4177
- }`,
4178
- },
4179
- ]),
4180
- "automations flow set": buildCommandExamples([
3964
+ }`
3965
+ }
3966
+ ],
3967
+ "automations flow set": [
4181
3968
  {
4182
- description:
4183
- "Set one entry action and chain two transitions (action-1 → action-2 → action-3).",
4184
- command:
4185
- "zinkee --json automations flow set automation-1 --entry action-1 --transition action-1:action-2 --transition action-2:action-3",
3969
+ description: "Set one entry action and chain two transitions (action-1 \u2192 action-2 \u2192 action-3).",
3970
+ command: "zinkee --json automations flow set automation-1 --entry action-1 --transition action-1:action-2 --transition action-2:action-3",
4186
3971
  raw: `{
4187
3972
  "entryActionIds": ["action-1"],
4188
3973
  "transitions": [
@@ -4195,15 +3980,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4195
3980
  "toActionId": "action-3"
4196
3981
  }
4197
3982
  ]
4198
- }`,
4199
- },
4200
- ]),
4201
- "automations webhook set": buildCommandExamples([
3983
+ }`
3984
+ }
3985
+ ],
3986
+ "automations webhook set": [
4202
3987
  {
4203
- description:
4204
- "Create or update the webhook endpoint companion resource with idempotency key, event type filter, and a field mapping. This config is separate from the webhook trigger itself.",
4205
- command:
4206
- `zinkee --json automations webhook set automation-1 --idempotency-key-path "$.id" --event-type-path "$.type" --allowed-event-type frontend.demo.created --field-mapping '{"variable":"external_id","jsonPath":"$.data.id"}' --active`,
3988
+ description: "Create or update the webhook endpoint companion resource with idempotency key, event type filter, and a field mapping. This config is separate from the webhook trigger itself.",
3989
+ command: `zinkee --json automations webhook set automation-1 --idempotency-key-path "$.id" --event-type-path "$.type" --allowed-event-type frontend.demo.created --field-mapping '{"variable":"external_id","jsonPath":"$.data.id"}' --active`,
4207
3990
  raw: `{
4208
3991
  "active": true,
4209
3992
  "idempotencyKeyJsonPath": "$.id",
@@ -4230,15 +4013,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4230
4013
  "jsonPath": "$.data.id"
4231
4014
  }
4232
4015
  ]
4233
- }`,
4234
- },
4235
- ]),
4236
- "automations connections create": buildCommandExamples([
4016
+ }`
4017
+ }
4018
+ ],
4019
+ "automations connections create": [
4237
4020
  {
4238
- description:
4239
- "Create a stored workspace connection for http_request actions. Secret values are write-only and never returned on read.",
4240
- command:
4241
- `zinkee --json automations connections create --name "ERP API Key" --type api_key --scope workspace --config '{"headerName":"Authorization"}' --secret apiKey=super-secret --active`,
4021
+ description: "Create a stored workspace connection for http_request actions. Secret values are write-only and never returned on read.",
4022
+ command: `zinkee --json automations connections create --name "ERP API Key" --type api_key --scope workspace --config '{"headerName":"Authorization"}' --secret apiKey=super-secret --active`,
4242
4023
  raw: `{
4243
4024
  "name": "ERP API Key",
4244
4025
  "type": "api_key",
@@ -4265,15 +4046,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4265
4046
  "updatedAt": "2026-04-21T09:00:00Z",
4266
4047
  "createdBy": "developer@zinkee.com",
4267
4048
  "updatedBy": "developer@zinkee.com"
4268
- }`,
4269
- },
4270
- ]),
4271
- "automations connections update": buildCommandExamples([
4049
+ }`
4050
+ }
4051
+ ],
4052
+ "automations connections update": [
4272
4053
  {
4273
- description:
4274
- "Patch an existing stored connection. Use set.secret only when rotating secrets.",
4275
- command:
4276
- `zinkee --json automations connections update connection-1 --raw '{"set":{"name":"ERP API Key Updated","config":{"headerName":"Authorization"}}}'`,
4054
+ description: "Patch an existing stored connection. Use set.secret only when rotating secrets.",
4055
+ command: `zinkee --json automations connections update connection-1 --raw '{"set":{"name":"ERP API Key Updated","config":{"headerName":"Authorization"}}}'`,
4277
4056
  raw: `{
4278
4057
  "set": {
4279
4058
  "name": "ERP API Key Updated",
@@ -4296,10 +4075,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4296
4075
  "updatedAt": "2026-04-21T10:15:00Z",
4297
4076
  "createdBy": "developer@zinkee.com",
4298
4077
  "updatedBy": "developer@zinkee.com"
4299
- }`,
4300
- },
4301
- ]),
4302
- "automations folders create": buildCommandExamples([
4078
+ }`
4079
+ }
4080
+ ],
4081
+ "automations folders create": [
4303
4082
  {
4304
4083
  description: "Create one flat automation folder.",
4305
4084
  command: 'zinkee --json automations folders create --name "Codex Frontend Demo"',
@@ -4311,14 +4090,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4311
4090
  "name": "Codex Frontend Demo",
4312
4091
  "isRoot": false,
4313
4092
  "automationCount": 0
4314
- }`,
4315
- },
4316
- ]),
4317
- "automations folders update": buildCommandExamples([
4093
+ }`
4094
+ }
4095
+ ],
4096
+ "automations folders update": [
4318
4097
  {
4319
4098
  description: "Rename a non-root automation folder. The folder argument accepts a UUID or an exact name.",
4320
- command:
4321
- 'zinkee --json automations folders update "Codex Frontend Demo" --name "Codex Frontend Demo Updated"',
4099
+ command: 'zinkee --json automations folders update "Codex Frontend Demo" --name "Codex Frontend Demo Updated"',
4322
4100
  raw: `{
4323
4101
  "name": "Codex Frontend Demo Updated"
4324
4102
  }`,
@@ -4327,10 +4105,10 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4327
4105
  "name": "Codex Frontend Demo Updated",
4328
4106
  "isRoot": false,
4329
4107
  "automationCount": 2
4330
- }`,
4331
- },
4332
- ]),
4333
- "automations folders move": buildCommandExamples([
4108
+ }`
4109
+ }
4110
+ ],
4111
+ "automations folders move": [
4334
4112
  {
4335
4113
  description: "Move one automation into a target folder by exact folder name.",
4336
4114
  command: 'zinkee --json automations folders move automation-1 --to "Codex Frontend Demo"',
@@ -4342,13 +4120,12 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4342
4120
  "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
4343
4121
  "name": "Codex Frontend Demo",
4344
4122
  "isRoot": false
4345
- }`,
4346
- },
4347
- ]),
4348
- "document-templates list": buildCommandExamples([
4123
+ }`
4124
+ }
4125
+ ],
4126
+ "document-templates list": [
4349
4127
  {
4350
- description:
4351
- "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.",
4128
+ 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.",
4352
4129
  command: "zinkee --json document-templates list",
4353
4130
  response: `[
4354
4131
  {
@@ -4366,15 +4143,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4366
4143
  "createdBy": "creator@example.com",
4367
4144
  "updatedBy": "updater@example.com"
4368
4145
  }
4369
- ]`,
4370
- },
4371
- ]),
4372
- "document-templates get": buildCommandExamples([
4146
+ ]`
4147
+ }
4148
+ ],
4149
+ "document-templates get": [
4373
4150
  {
4374
- description:
4375
- "Look up one template by UUID. The CLI filters the list endpoint locally (the backend does not expose a get-one route).",
4376
- command:
4377
- "zinkee --json document-templates get 7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
4151
+ description: "Look up one template by UUID. The CLI filters the list endpoint locally (the backend does not expose a get-one route).",
4152
+ command: "zinkee --json document-templates get 7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
4378
4153
  response: `{
4379
4154
  "id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
4380
4155
  "name": "Quarterly report",
@@ -4389,18 +4164,16 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4389
4164
  "updatedAt": "2026-01-20T14:30:00Z",
4390
4165
  "createdBy": "creator@example.com",
4391
4166
  "updatedBy": "creator@example.com"
4392
- }`,
4167
+ }`
4393
4168
  },
4394
4169
  {
4395
- description:
4396
- "Look up by exact template name. Names are unique within the workspace; ambiguity is reported as an error.",
4397
- command: 'zinkee --json document-templates get "Quarterly report"',
4398
- },
4399
- ]),
4400
- "document-templates create": buildCommandExamples([
4170
+ description: "Look up by exact template name. Names are unique within the workspace; ambiguity is reported as an error.",
4171
+ command: 'zinkee --json document-templates get "Quarterly report"'
4172
+ }
4173
+ ],
4174
+ "document-templates create": [
4401
4175
  {
4402
- description:
4403
- "Typical create: empty template by name. Assets are uploaded afterwards via document-templates assets add.",
4176
+ description: "Typical create: empty template by name. Assets are uploaded afterwards via document-templates assets add.",
4404
4177
  command: 'zinkee --json document-templates create --name "Quarterly report"',
4405
4178
  raw: `{
4406
4179
  "name": "Quarterly report",
@@ -4414,13 +4187,11 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4414
4187
  "updatedAt": "2026-01-15T10:00:00Z",
4415
4188
  "createdBy": "creator@example.com",
4416
4189
  "updatedBy": "creator@example.com"
4417
- }`,
4190
+ }`
4418
4191
  },
4419
4192
  {
4420
- description:
4421
- "Create with pre-existing asset records via --raw. Used for import/migration flows where the assets already exist elsewhere; the typical UX is to create empty and upload via assets add.",
4422
- command:
4423
- `zinkee --json document-templates create --raw '{"name":"Annual report","assets":[{"id":"9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f","name":"Cover.docx","link":"/existing/cover.docx"},{"id":"3f2e1d0c-9b8a-7654-3210-fedcba987654","name":"Appendix.docx","link":"/existing/appendix.docx"}]}'`,
4193
+ description: "Create with pre-existing asset records via --raw. Used for import/migration flows where the assets already exist elsewhere; the typical UX is to create empty and upload via assets add.",
4194
+ command: `zinkee --json document-templates create --raw '{"name":"Annual report","assets":[{"id":"9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f","name":"Cover.docx","link":"/existing/cover.docx"},{"id":"3f2e1d0c-9b8a-7654-3210-fedcba987654","name":"Appendix.docx","link":"/existing/appendix.docx"}]}'`,
4424
4195
  raw: `{
4425
4196
  "name": "Annual report",
4426
4197
  "assets": [
@@ -4435,15 +4206,13 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4435
4206
  "link": "/existing/appendix.docx"
4436
4207
  }
4437
4208
  ]
4438
- }`,
4439
- },
4440
- ]),
4441
- "document-templates update": buildCommandExamples([
4209
+ }`
4210
+ }
4211
+ ],
4212
+ "document-templates update": [
4442
4213
  {
4443
- description:
4444
- "Rename a template. The template argument accepts a UUID or an exact current name. Only the name is updatable through this endpoint; assets are managed via the assets subcommands.",
4445
- command:
4446
- 'zinkee --json document-templates update "Quarterly report" --name "Annual report"',
4214
+ description: "Rename a template. The template argument accepts a UUID or an exact current name. Only the name is updatable through this endpoint; assets are managed via the assets subcommands.",
4215
+ command: 'zinkee --json document-templates update "Quarterly report" --name "Annual report"',
4447
4216
  raw: `{
4448
4217
  "name": "Annual report"
4449
4218
  }`,
@@ -4461,27 +4230,23 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4461
4230
  "updatedAt": "2026-01-22T09:15:00Z",
4462
4231
  "createdBy": "creator@example.com",
4463
4232
  "updatedBy": "updater@example.com"
4464
- }`,
4465
- },
4466
- ]),
4467
- "document-templates delete": buildCommandExamples([
4233
+ }`
4234
+ }
4235
+ ],
4236
+ "document-templates delete": [
4468
4237
  {
4469
- description:
4470
- "Delete a template and remove its asset files from storage. Record fields that reference previously generated documents are not modified.",
4471
- command:
4472
- "zinkee --json document-templates delete 7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
4238
+ description: "Delete a template and remove its asset files from storage. Record fields that reference previously generated documents are not modified.",
4239
+ command: "zinkee --json document-templates delete 7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
4473
4240
  response: `{
4474
4241
  "id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
4475
4242
  "deleted": true
4476
- }`,
4477
- },
4478
- ]),
4479
- "document-templates assets add": buildCommandExamples([
4243
+ }`
4244
+ }
4245
+ ],
4246
+ "document-templates assets add": [
4480
4247
  {
4481
- description:
4482
- "Upload a local file as an asset of a template. The CLI sends a multipart form with a part named \"file\"; the asset display name defaults to the uploaded filename.",
4483
- command:
4484
- 'zinkee --json document-templates assets add "Quarterly report" ./contract.docx',
4248
+ description: 'Upload a local file as an asset of a template. The CLI sends a multipart form with a part named "file"; the asset display name defaults to the uploaded filename.',
4249
+ command: 'zinkee --json document-templates assets add "Quarterly report" ./contract.docx',
4485
4250
  response: `{
4486
4251
  "id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
4487
4252
  "name": "Quarterly report",
@@ -4496,84 +4261,56 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
4496
4261
  "updatedAt": "2026-01-22T09:15:00Z",
4497
4262
  "createdBy": "creator@example.com",
4498
4263
  "updatedBy": "updater@example.com"
4499
- }`,
4264
+ }`
4500
4265
  },
4501
4266
  {
4502
- description:
4503
- "Override the asset display name with --name (otherwise the uploaded filename is used).",
4504
- command:
4505
- 'zinkee --json document-templates assets add "Quarterly report" ./contract.docx --name "Customer Contract"',
4506
- },
4507
- ]),
4508
- "document-templates assets delete": buildCommandExamples([
4267
+ description: "Override the asset display name with --name (otherwise the uploaded filename is used).",
4268
+ command: 'zinkee --json document-templates assets add "Quarterly report" ./contract.docx --name "Customer Contract"'
4269
+ }
4270
+ ],
4271
+ "document-templates assets delete": [
4509
4272
  {
4510
4273
  description: "Delete one asset from a template and remove its file from storage.",
4511
- command:
4512
- "zinkee --json document-templates assets delete 7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e 9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
4274
+ command: "zinkee --json document-templates assets delete 7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e 9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
4513
4275
  response: `{
4514
4276
  "id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
4515
4277
  "deleted": true
4516
- }`,
4517
- },
4518
- ]),
4519
- "document-templates assets download": buildCommandExamples([
4278
+ }`
4279
+ }
4280
+ ],
4281
+ "document-templates assets download": [
4520
4282
  {
4521
- description:
4522
- "Download asset bytes to disk. The CLI streams the raw bytes to --output; in --json mode --output is required and the JSON envelope only carries metadata.",
4523
- command:
4524
- "zinkee --json document-templates assets download 7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e 9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f --output ./contract.docx",
4283
+ description: "Download asset bytes to disk. The CLI streams the raw bytes to --output; in --json mode --output is required and the JSON envelope only carries metadata.",
4284
+ command: "zinkee --json document-templates assets download 7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e 9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f --output ./contract.docx"
4525
4285
  },
4526
4286
  {
4527
- description:
4528
- "Stream asset bytes to stdout (omit --json and --output). Useful for piping into other tools.",
4529
- command:
4530
- "zinkee document-templates assets download 7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e 9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f > contract.docx",
4531
- },
4532
- ]),
4287
+ description: "Stream asset bytes to stdout (omit --json and --output). Useful for piping into other tools.",
4288
+ command: "zinkee document-templates assets download 7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e 9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f > contract.docx"
4289
+ }
4290
+ ]
4533
4291
  };
4534
-
4535
- function fallbackExamples(commandName: string): readonly CommandExample[] {
4536
- switch (commandName) {
4537
- default:
4538
- return [];
4539
- }
4540
- }
4541
-
4542
- function buildSchemaFieldCreateExamples(type?: string): readonly CommandExample[] {
4292
+ function buildSchemaFieldCreateExamples(type) {
4543
4293
  const definitions = getSchemaFieldTypeDefinitions();
4544
4294
  const selectedDefinition = resolveSchemaFieldType(type);
4545
- const filteredDefinitions = selectedDefinition
4546
- ? definitions.filter((definition) => definition.key === selectedDefinition.key)
4547
- : definitions;
4548
-
4549
- const flat = filteredDefinitions.flatMap((definition) =>
4550
- definition.examplePayloads.map((example) => ({ definition, example })),
4551
- );
4552
-
4553
- const flagExamples: CommandExample[] =
4554
- selectedDefinition === undefined || selectedDefinition.key === "text"
4555
- ? [
4556
- {
4557
- description: "Text field with a description.",
4558
- command:
4559
- 'zinkee --json schemas fields create contacts --type text --slug customer-name --label "Customer Name" --description "Primary name shown for the customer"',
4560
- raw: `{
4295
+ const filteredDefinitions = selectedDefinition ? definitions.filter((definition) => definition.key === selectedDefinition.key) : definitions;
4296
+ const payloads = filteredDefinitions.flatMap((definition) => definition.examplePayloads);
4297
+ const flagExamples = selectedDefinition === void 0 || selectedDefinition.key === "text" ? [
4298
+ {
4299
+ description: "Text field with a description.",
4300
+ command: 'zinkee --json schemas fields create contacts --type text --slug customer-name --label "Customer Name" --description "Primary name shown for the customer"',
4301
+ raw: `{
4561
4302
  "type": "TextField",
4562
4303
  "slug": "customer-name",
4563
4304
  "label": "Customer Name",
4564
4305
  "description": "Primary name shown for the customer"
4565
- }`,
4566
- },
4567
- ]
4568
- : [];
4569
-
4570
- return buildCommandExamples([
4306
+ }`
4307
+ }
4308
+ ] : [];
4309
+ return [
4571
4310
  ...flagExamples,
4572
- ...flat.map(({ example }, index) => {
4573
- const slug =
4574
- typeof example.payload.slug === "string" ? example.payload.slug : "field";
4311
+ ...payloads.map((example, index) => {
4312
+ const slug = typeof example.payload.slug === "string" ? example.payload.slug : "field";
4575
4313
  const command = `zinkee --json schemas fields create contacts --raw '${JSON.stringify(example.payload)}'`;
4576
-
4577
4314
  if (index === 0) {
4578
4315
  return {
4579
4316
  description: example.name,
@@ -4582,58 +4319,36 @@ function buildSchemaFieldCreateExamples(type?: string): readonly CommandExample[
4582
4319
  "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
4583
4320
  "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
4584
4321
  "slug": "${slug}"
4585
- }`,
4322
+ }`
4586
4323
  };
4587
4324
  }
4588
-
4589
4325
  return {
4590
4326
  description: example.name,
4591
- command,
4327
+ command
4592
4328
  };
4593
- }),
4594
- ]);
4329
+ })
4330
+ ];
4595
4331
  }
4596
-
4597
- export function getCommandExamples(
4598
- commandName: string,
4599
- filters: { type?: string } = {},
4600
- ): readonly CommandExample[] {
4601
- const examples =
4602
- commandName === "schemas fields create"
4603
- ? buildSchemaFieldCreateExamples(filters.type)
4604
- : (specificExamples[commandName] ?? fallbackExamples(commandName));
4605
-
4332
+ function getCommandExamples(commandName, filters = {}) {
4333
+ const examples = commandName === "schemas fields create" ? buildSchemaFieldCreateExamples(filters.type) : specificExamples[commandName] ?? [];
4606
4334
  return examples.map((example) => withResponseEnvelope(example, commandName));
4607
4335
  }
4608
-
4609
- // The CLI's --json output wraps every payload in a { data, meta } envelope (see
4610
- // buildJsonSuccess in ./output). Example "response" bodies are authored as the
4611
- // bare data payload for readability, so we wrap them here to match what the
4612
- // command actually prints. Non-JSON responses (if any) are left untouched.
4613
- function withResponseEnvelope(
4614
- example: CommandExample,
4615
- commandName: string,
4616
- ): CommandExample {
4617
- if (example.response === undefined) {
4336
+ function withResponseEnvelope(example, commandName) {
4337
+ if (example.response === void 0) {
4618
4338
  return example;
4619
4339
  }
4620
-
4621
- let payload: unknown;
4340
+ let payload;
4622
4341
  try {
4623
4342
  payload = JSON.parse(example.response);
4624
4343
  } catch {
4625
4344
  return example;
4626
4345
  }
4627
-
4628
4346
  return {
4629
4347
  ...example,
4630
- response: JSON.stringify(buildJsonSuccess(payload, { command: commandName }), null, 2),
4348
+ response: JSON.stringify(buildJsonSuccess(payload, { command: commandName }), null, 2)
4631
4349
  };
4632
4350
  }
4633
-
4634
- export function getResolvedCommandExamples(
4635
- commandName: string,
4636
- filters: { type?: string } = {},
4637
- ): readonly CommandExample[] {
4638
- return getCommandExamples(commandName, filters);
4639
- }
4351
+ export {
4352
+ getCommandExamples
4353
+ };
4354
+ //# sourceMappingURL=examples-E6FFEVBE.js.map