zinkee 0.1.2 → 0.1.7

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.
@@ -14,6 +14,7 @@ export interface CommandExample {
14
14
  command: string;
15
15
  description: string;
16
16
  raw?: string;
17
+ response?: string;
17
18
  }
18
19
 
19
20
  export interface ExampleContextOptions {
@@ -27,6 +28,7 @@ export function buildCommandExample(example: CommandExample): CommandExample {
27
28
  command: example.command,
28
29
  description: example.description,
29
30
  raw: example.raw,
31
+ response: example.response,
30
32
  };
31
33
  }
32
34
 
@@ -37,82 +39,2781 @@ export function buildCommandExamples(examples: readonly CommandExample[]): reado
37
39
  const SAMPLE_UUID = "550e8400-e29b-41d4-a716-446655440001";
38
40
 
39
41
  const specificExamples: Record<string, readonly CommandExample[]> = {
42
+ "profiles list": buildCommandExamples([
43
+ {
44
+ description:
45
+ "List all local profiles. The CLI always redacts the apiKey to ******** plus the last 4 chars.",
46
+ command: "zinkee --json profiles list",
47
+ response: `[
48
+ {
49
+ "name": "prod",
50
+ "isDefault": true,
51
+ "apiKey": "********cdef",
52
+ "baseUrl": "https://api.zinkee.com"
53
+ },
54
+ {
55
+ "name": "local",
56
+ "isDefault": false,
57
+ "apiKey": "********4321",
58
+ "baseUrl": "http://localhost:8088"
59
+ }
60
+ ]`,
61
+ },
62
+ ]),
63
+ "profiles get": buildCommandExamples([
64
+ {
65
+ description: "Show one profile by name.",
66
+ command: "zinkee --json profiles get prod",
67
+ response: `{
68
+ "name": "prod",
69
+ "isDefault": true,
70
+ "apiKey": "********cdef",
71
+ "baseUrl": "https://api.zinkee.com"
72
+ }`,
73
+ },
74
+ ]),
75
+ "profiles use": buildCommandExamples([
76
+ {
77
+ description: "Set a profile as the default one used when --profile is not passed.",
78
+ command: "zinkee --json profiles use local",
79
+ response: `{
80
+ "profile": "local",
81
+ "defaultProfile": "local"
82
+ }`,
83
+ },
84
+ ]),
85
+ "profiles add": buildCommandExamples([
86
+ {
87
+ description:
88
+ "Add a new profile with an explicit base URL. Becomes the default if no other profile existed.",
89
+ command:
90
+ "zinkee --json profiles add prod --api-key sk-prod-9f3a2c1b-1234567890abcdef --base-url https://api.zinkee.com",
91
+ response: `{
92
+ "name": "prod",
93
+ "isDefault": true,
94
+ "apiKey": "********cdef",
95
+ "baseUrl": "https://api.zinkee.com"
96
+ }`,
97
+ },
98
+ {
99
+ description:
100
+ "Add a profile without --base-url (the runtime falls back to the production URL at call time).",
101
+ command: "zinkee --json profiles add staging --api-key sk-staging-7777aaaa-bbbbccccddddeeee",
102
+ response: `{
103
+ "name": "staging",
104
+ "isDefault": false,
105
+ "apiKey": "********eeee"
106
+ }`,
107
+ },
108
+ ]),
109
+ "profiles update": buildCommandExamples([
110
+ {
111
+ description: "Rotate just the API key of an existing profile.",
112
+ command:
113
+ "zinkee --json profiles update prod --api-key sk-prod-0000new0-fedcba0987654321",
114
+ response: `{
115
+ "name": "prod",
116
+ "isDefault": true,
117
+ "apiKey": "********4321",
118
+ "baseUrl": "https://api.zinkee.com"
119
+ }`,
120
+ },
121
+ {
122
+ description: "Point an existing profile at a different base URL (useful when moving envs).",
123
+ command: "zinkee --json profiles update local --base-url http://localhost:9090",
124
+ response: `{
125
+ "name": "local",
126
+ "isDefault": false,
127
+ "apiKey": "********4321",
128
+ "baseUrl": "http://localhost:9090"
129
+ }`,
130
+ },
131
+ ]),
132
+ "profiles remove": buildCommandExamples([
133
+ {
134
+ description:
135
+ "Remove a profile. If it was the default, defaultProfile becomes null and you should set a new one with profiles use.",
136
+ command: "zinkee --json profiles remove staging",
137
+ response: `{
138
+ "profile": "staging",
139
+ "defaultProfile": "prod"
140
+ }`,
141
+ },
142
+ ]),
143
+ "config path": buildCommandExamples([
144
+ {
145
+ description: "Print the path of the config file the CLI is reading right now.",
146
+ command: "zinkee --json config path",
147
+ response: `{
148
+ "path": "/home/guillermo/.config/zinkee/config.json"
149
+ }`,
150
+ },
151
+ ]),
152
+ "config show": buildCommandExamples([
153
+ {
154
+ description:
155
+ "Dump the whole config with secrets redacted. Same ******** + last 4 chars mask that profiles list uses.",
156
+ command: "zinkee --json config show",
157
+ response: `{
158
+ "defaultProfile": "prod",
159
+ "profiles": {
160
+ "prod": {
161
+ "apiKey": "********cdef",
162
+ "baseUrl": "https://api.zinkee.com"
163
+ },
164
+ "local": {
165
+ "apiKey": "********4321",
166
+ "baseUrl": "http://localhost:8088"
167
+ }
168
+ }
169
+ }`,
170
+ },
171
+ ]),
172
+ "config validate": buildCommandExamples([
173
+ {
174
+ description:
175
+ "Validate that the local config resolves a profile. Useful as a CI gate before running other commands.",
176
+ command: "zinkee --json config validate",
177
+ response: `{
178
+ "valid": true,
179
+ "profile": "prod"
180
+ }`,
181
+ },
182
+ ]),
183
+ "schemas create": buildCommandExamples([
184
+ {
185
+ description: "Create an auditable and commentable schema from flags.",
186
+ command:
187
+ 'zinkee --json schemas create --name "Codex Demo" --slug codex-demo --auditable --commentable',
188
+ raw: `{
189
+ "name": "Codex Demo",
190
+ "slug": "codex-demo",
191
+ "auditable": true,
192
+ "commentable": true
193
+ }`,
194
+ response: `{
195
+ "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
196
+ "slug": "codex-demo",
197
+ "folder": {
198
+ "id": "00000000-0000-0000-0000-000000000000",
199
+ "name": "root",
200
+ "isRoot": true
201
+ }
202
+ }`,
203
+ },
204
+ {
205
+ description: "Minimal create with just name and slug.",
206
+ command: 'zinkee --json schemas create --name Leads --slug leads',
207
+ raw: `{
208
+ "name": "Leads",
209
+ "slug": "leads"
210
+ }`,
211
+ },
212
+ {
213
+ description:
214
+ "Create an auditable schema inside an existing navigation folder (folder id can be a UUID or the exact folder name).",
215
+ command:
216
+ 'zinkee --json schemas create --name Tasks --slug tasks --auditable --folder 7f4e7c25-d8b2-4c1a-9f3e-6a7b5c8d9e1f',
217
+ raw: `{
218
+ "name": "Tasks",
219
+ "slug": "tasks",
220
+ "auditable": true,
221
+ "commentable": false,
222
+ "folderId": "7f4e7c25-d8b2-4c1a-9f3e-6a7b5c8d9e1f"
223
+ }`,
224
+ },
225
+ ]),
226
+ "schemas update": buildCommandExamples([
227
+ {
228
+ description: "Rename a schema and change its slug.",
229
+ command:
230
+ 'zinkee --json schemas update contacts --name "Customer Contacts" --slug customer-contacts',
231
+ raw: `{
232
+ "set": {
233
+ "name": "Customer Contacts",
234
+ "slug": "customer-contacts"
235
+ }
236
+ }`,
237
+ response: `{
238
+ "id": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
239
+ "name": "Customer Contacts",
240
+ "slug": "customer-contacts",
241
+ "folder": {
242
+ "id": "7f4e7c25-d8b2-4c1a-9f3e-6a7b5c8d9e1f",
243
+ "name": "Customers",
244
+ "isRoot": false
245
+ },
246
+ "auditable": true,
247
+ "commentable": true,
248
+ "fields": []
249
+ }`,
250
+ },
251
+ {
252
+ description: "Enable the audit log on a schema.",
253
+ command: 'zinkee --json schemas update contacts --auditable true',
254
+ raw: `{
255
+ "set": {
256
+ "auditable": true
257
+ }
258
+ }`,
259
+ },
260
+ {
261
+ description: "Toggle commentable off.",
262
+ command: 'zinkee --json schemas update contacts --commentable false',
263
+ raw: `{
264
+ "set": {
265
+ "commentable": false
266
+ }
267
+ }`,
268
+ },
269
+ ]),
270
+ "schemas fields update": buildCommandExamples([
271
+ {
272
+ description: "Rename a field label and drop the required flag.",
273
+ command:
274
+ 'zinkee --json schemas fields update contacts contact-name --label "Customer Full Name" --required false',
275
+ raw: `{
276
+ "set": {
277
+ "label": "Customer Full Name",
278
+ "required": false
279
+ }
280
+ }`,
281
+ response: `{
282
+ "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
283
+ "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
284
+ "slug": "customer-full-name"
285
+ }`,
286
+ },
287
+ {
288
+ description: "Make a field required.",
289
+ command: 'zinkee --json schemas fields update contacts status --required true',
290
+ raw: `{
291
+ "set": {
292
+ "required": true
293
+ }
294
+ }`,
295
+ },
296
+ {
297
+ description:
298
+ "Patch the format options of a number field through a raw set payload (no dedicated flag exists for nested config paths).",
299
+ command:
300
+ `zinkee --json schemas fields update contacts amount --raw '{"set":{"config":{"formatOptions":{"format":"percent","decimals":1}}}}'`,
301
+ raw: `{
302
+ "set": {
303
+ "config": {
304
+ "formatOptions": {
305
+ "format": "percent",
306
+ "decimals": 1
307
+ }
308
+ }
309
+ }
310
+ }`,
311
+ },
312
+ ]),
40
313
  "records query": buildCommandExamples([
41
314
  {
42
- description: "Query records with filters, sort and pagination",
43
- command: 'zinkee --json records query contacts --select id,name --where "status eq active" --sort createdAt:desc --limit 20 --offset 0',
315
+ description: "Lookup a single record by id.",
316
+ command:
317
+ 'zinkee --json records query contacts --select id,contact-name --where "id eq 550e8400-e29b-41d4-a716-446655440000" --sort id:desc --limit 10',
318
+ raw: `{
319
+ "select": ["id", "contact-name"],
320
+ "where": [
321
+ { "field": "id", "op": "eq", "value": "550e8400-e29b-41d4-a716-446655440000" }
322
+ ],
323
+ "sort": [
324
+ { "field": "id", "direction": "DESC" }
325
+ ],
326
+ "page": { "offset": 0, "size": 10 }
327
+ }`,
328
+ response: `{
329
+ "records": [
330
+ {
331
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
332
+ "values": {
333
+ "contact-name": "Ada Lovelace",
334
+ "status": 2,
335
+ "amount": 1250.50
336
+ }
337
+ }
338
+ ],
339
+ "page": {
340
+ "offset": 0,
341
+ "limit": 25,
342
+ "total": 1,
343
+ "count": 1,
344
+ "hasMore": false
345
+ }
346
+ }`,
347
+ },
348
+ {
349
+ description:
350
+ "Filter by multiple conditions and sort by amount then name.",
351
+ command:
352
+ `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`,
353
+ raw: `{
354
+ "select": ["id", "contact-name", "status", "amount"],
355
+ "where": [
356
+ { "field": "status", "op": "in", "value": [1, 2] },
357
+ { "field": "amount", "op": "gte", "value": 500 }
358
+ ],
359
+ "sort": [
360
+ { "field": "amount", "direction": "DESC" },
361
+ { "field": "contact-name", "direction": "ASC" }
362
+ ],
363
+ "page": { "offset": 0, "size": 25 }
364
+ }`,
365
+ },
366
+ {
367
+ description: "Text contains search.",
368
+ command:
369
+ 'zinkee --json records query contacts --select id,contact-name,contact-email --where "contact-name contains Lovelace" --limit 50',
370
+ raw: `{
371
+ "select": ["id", "contact-name", "contact-email"],
372
+ "where": [
373
+ { "field": "contact-name", "op": "contains", "value": "Lovelace" }
374
+ ],
375
+ "page": { "offset": 0, "size": 50 }
376
+ }`,
377
+ },
378
+ {
379
+ description: "Records with a non-empty due-date inside a date range.",
380
+ command:
381
+ 'zinkee --json records query contacts --where "due-date is_not_empty" --where "due-date lte 2026-12-31T23:59:59Z" --sort due-date:asc',
382
+ raw: `{
383
+ "where": [
384
+ { "field": "due-date", "op": "is_not_empty" },
385
+ { "field": "due-date", "op": "lte", "value": "2026-12-31T23:59:59Z" }
386
+ ],
387
+ "sort": [
388
+ { "field": "due-date", "direction": "ASC" }
389
+ ]
390
+ }`,
391
+ },
392
+ {
393
+ description: "Records whose status is not equal to a value.",
394
+ command:
395
+ 'zinkee --json records query contacts --where "status neq 0"',
396
+ raw: `{
397
+ "where": [
398
+ { "field": "status", "op": "neq", "value": 0 }
399
+ ]
400
+ }`,
401
+ },
402
+ {
403
+ description: "Records with an amount greater than a threshold.",
404
+ command:
405
+ 'zinkee --json records query contacts --where "amount gt 1000"',
406
+ raw: `{
407
+ "where": [
408
+ { "field": "amount", "op": "gt", "value": 1000 }
409
+ ]
410
+ }`,
411
+ },
412
+ {
413
+ description: "Records with an amount less than a threshold.",
414
+ command:
415
+ 'zinkee --json records query contacts --where "amount lt 100"',
416
+ raw: `{
417
+ "where": [
418
+ { "field": "amount", "op": "lt", "value": 100 }
419
+ ]
420
+ }`,
421
+ },
422
+ {
423
+ description: "Records whose due-date is empty.",
424
+ command:
425
+ 'zinkee --json records query contacts --where "due-date is_empty"',
426
+ raw: `{
427
+ "where": [
428
+ { "field": "due-date", "op": "is_empty" }
429
+ ]
430
+ }`,
431
+ },
432
+ {
433
+ description: "Records whose contact-email is not empty.",
434
+ command:
435
+ 'zinkee --json records query contacts --where "contact-email is_not_empty"',
436
+ raw: `{
437
+ "where": [
438
+ { "field": "contact-email", "op": "is_not_empty" }
439
+ ]
440
+ }`,
44
441
  },
45
442
  ]),
46
443
  "records create": buildCommandExamples([
47
444
  {
48
- description: "Create a record with simple and structured values",
49
- command: `zinkee --json records create contacts --set name=Ana --set-json meta='{"tier":"gold"}'`,
445
+ description: "Minimal create using just two plain string fields.",
446
+ command:
447
+ `zinkee --json records create contacts --set contact-name="Ada Lovelace" --set contact-email=ada@example.com`,
448
+ raw: `{
449
+ "values": {
450
+ "contact-name": "Ada Lovelace",
451
+ "contact-email": "ada@example.com"
452
+ }
453
+ }`,
454
+ response: `{
455
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
456
+ "values": {
457
+ "contact-name": "Ada Lovelace",
458
+ "contact-email": "ada@example.com"
459
+ }
460
+ }`,
461
+ },
462
+ {
463
+ description:
464
+ "Create a record mixing text, option, number, date and reference fields. Structured values go through --set-json.",
465
+ command:
466
+ `zinkee --json records create contacts --set contact-name="Grace Hopper" --set contact-email=grace@example.com --set-json status=2 --set-json amount=1999.99 --set due-date=2026-06-01T09:00:00Z --set customer-ref=8ad602a1-f6e3-43f6-9ab2-f1c5afc99621 --set owner=6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d`,
467
+ raw: `{
468
+ "values": {
469
+ "contact-name": "Grace Hopper",
470
+ "contact-email": "grace@example.com",
471
+ "status": 2,
472
+ "amount": 1999.99,
473
+ "due-date": "2026-06-01T09:00:00Z",
474
+ "customer-ref": "8ad602a1-f6e3-43f6-9ab2-f1c5afc99621",
475
+ "owner": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
476
+ }
477
+ }`,
478
+ },
479
+ ]),
480
+ "records update": buildCommandExamples([
481
+ {
482
+ description: "Set one field and unset another.",
483
+ command:
484
+ 'zinkee --json records update contacts 550e8400-e29b-41d4-a716-446655440000 --set contact-name="Ada Lovelace Updated" --unset contact-email',
485
+ raw: `{
486
+ "set": {
487
+ "contact-name": "Ada Lovelace Updated"
488
+ },
489
+ "unset": ["contact-email"]
490
+ }`,
491
+ response: `{
492
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
493
+ "values": {
494
+ "contact-name": "Ada Lovelace Updated",
495
+ "status": 2,
496
+ "amount": 1250.50,
497
+ "due-date": "2026-05-15T12:00:00Z",
498
+ "owner": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
499
+ }
500
+ }`,
501
+ },
502
+ {
503
+ description: "Patch multiple typed values at once.",
504
+ command:
505
+ 'zinkee --json records update contacts 550e8400-e29b-41d4-a716-446655440000 --set-json status=3 --set-json amount=2500.00 --set due-date=2026-07-01T09:00:00Z --set owner=6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d',
506
+ raw: `{
507
+ "set": {
508
+ "status": 3,
509
+ "amount": 2500.00,
510
+ "due-date": "2026-07-01T09:00:00Z",
511
+ "owner": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
512
+ }
513
+ }`,
514
+ },
515
+ {
516
+ description: "Unset only (clear fields).",
517
+ command:
518
+ 'zinkee --json records update contacts 550e8400-e29b-41d4-a716-446655440000 --unset contact-email --unset due-date',
519
+ raw: `{
520
+ "unset": ["contact-email", "due-date"]
521
+ }`,
522
+ },
523
+ ]),
524
+ "comments create": buildCommandExamples([
525
+ {
526
+ description: "Plain text comment on a record (uses --text).",
527
+ command:
528
+ `zinkee --json comments create contacts 550e8400-e29b-41d4-a716-446655440000 --text "This record needs review."`,
529
+ raw: `{
530
+ "content": [
531
+ {
532
+ "type": "TEXT",
533
+ "value": "This record needs review."
534
+ }
535
+ ]
536
+ }`,
537
+ response: `{
538
+ "id": "cd8e3b2a-1f5c-4e9a-8b7d-0a2b3c4d5e6f",
539
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
540
+ "createdAt": "2026-04-22T10:15:00Z",
541
+ "createdBy": "developer@zinkee.com",
542
+ "content": [
543
+ { "type": "TEXT", "value": "This record needs review." }
544
+ ]
545
+ }`,
546
+ },
547
+ {
548
+ description:
549
+ "Comment with an inline member mention. Mentions only go through --raw today because --text is plain text.",
550
+ command:
551
+ `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."}]}'`,
552
+ raw: `{
553
+ "content": [
554
+ { "type": "TEXT", "value": "Assigning to " },
555
+ { "type": "MENTION", "value": "9f8e7d6c-5b4a-3c2d-1e0f-a1b2c3d4e5f6" },
556
+ { "type": "TEXT", "value": " for follow up." }
557
+ ]
558
+ }`,
559
+ },
560
+ ]),
561
+ "files download": buildCommandExamples([
562
+ {
563
+ description:
564
+ "Download a file to disk (the CLI writes the raw bytes to the --output path; the JSON mode only emits a success envelope).",
565
+ command: `zinkee --json files download ${SAMPLE_UUID} --output ./download.bin`,
566
+ },
567
+ ]),
568
+ "files upload": buildCommandExamples([
569
+ {
570
+ description:
571
+ "Upload a local file. The CLI sends the multipart form and the backend returns the generated file id to reference from record FileField values.",
572
+ command: "zinkee --json files upload ./report.pdf",
573
+ response: `{
574
+ "id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
575
+ }`,
576
+ },
577
+ ]),
578
+ "files delete": buildCommandExamples([
579
+ {
580
+ description:
581
+ "Delete a file from workspace storage. Records that still reference the file id keep the stale pointer until updated separately.",
582
+ command: `zinkee --json files delete ${SAMPLE_UUID}`,
583
+ response: `{
584
+ "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
585
+ "deleted": true
586
+ }`,
587
+ },
588
+ ]),
589
+ "navigation folders create": buildCommandExamples([
590
+ {
591
+ description: "Create a folder with a display order and custom properties.",
592
+ command:
593
+ `zinkee --json navigation folders create --name Finance --order 20 --props '{"color":"green"}'`,
594
+ raw: `{
595
+ "name": "Finance",
596
+ "order": 20,
597
+ "additionalProperties": {
598
+ "color": "green"
599
+ }
600
+ }`,
601
+ response: `{
602
+ "folderId": "c5d6e7f8-9012-3456-789a-bcdef0123456",
603
+ "name": "Finance"
604
+ }`,
605
+ },
606
+ {
607
+ description: "Minimal create with just a name.",
608
+ command: 'zinkee --json navigation folders create --name Archive',
609
+ raw: `{
610
+ "name": "Archive"
611
+ }`,
612
+ },
613
+ {
614
+ description: "Create a folder with color and icon metadata.",
615
+ command:
616
+ `zinkee --json navigation folders create --name Reports --order 5 --props '{"color":"teal","icon":"chart-line"}'`,
617
+ raw: `{
618
+ "name": "Reports",
619
+ "order": 5,
620
+ "additionalProperties": {
621
+ "color": "teal",
622
+ "icon": "chart-line"
623
+ }
624
+ }`,
625
+ },
626
+ ]),
627
+ "navigation folders update": buildCommandExamples([
628
+ {
629
+ description: "Rename the folder, change its order, and rewrite its additionalProperties.",
630
+ command:
631
+ `zinkee --json navigation folders update Finance --name "Finance Ops" --order 30 --props '{"color":"teal"}'`,
632
+ raw: `{
633
+ "name": "Finance Ops",
634
+ "order": 30,
635
+ "additionalProperties": {
636
+ "color": "teal"
637
+ }
638
+ }`,
639
+ response: `{
640
+ "folderId": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a",
641
+ "name": "Finance Ops"
642
+ }`,
643
+ },
644
+ {
645
+ description: "Rename only.",
646
+ command: 'zinkee --json navigation folders update Finance --name "Finance (legacy)"',
647
+ raw: `{
648
+ "name": "Finance (legacy)"
649
+ }`,
650
+ },
651
+ {
652
+ description: "Change only the display order.",
653
+ command: 'zinkee --json navigation folders update Finance --order 1',
654
+ raw: `{
655
+ "order": 1
656
+ }`,
657
+ },
658
+ {
659
+ description: "Replace only additionalProperties.",
660
+ command:
661
+ `zinkee --json navigation folders update Finance --props '{"color":"red","icon":"archive"}'`,
662
+ raw: `{
663
+ "additionalProperties": {
664
+ "color": "red",
665
+ "icon": "archive"
666
+ }
667
+ }`,
668
+ },
669
+ ]),
670
+ "navigation resources move": buildCommandExamples([
671
+ {
672
+ description: "Move a schema into a navigation folder.",
673
+ command:
674
+ 'zinkee --json navigation resources move 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --type SCHEMA --to Sales',
675
+ raw: `{
676
+ "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
677
+ "resourceType": "SCHEMA",
678
+ "targetFolderId": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a"
679
+ }`,
680
+ response: `{
681
+ "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
682
+ "targetFolderId": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a"
683
+ }`,
684
+ },
685
+ {
686
+ description: "Move a workflow.",
687
+ command:
688
+ 'zinkee --json navigation resources move 3f8a2c1b-9d4e-4a5b-8c6d-7e8f90123456 --type WORKFLOW --to Operations',
689
+ raw: `{
690
+ "resourceId": "3f8a2c1b-9d4e-4a5b-8c6d-7e8f90123456",
691
+ "resourceType": "WORKFLOW",
692
+ "targetFolderId": "b8c9d0e1-f2a3-4b5c-6d7e-8f9012345678"
693
+ }`,
694
+ },
695
+ {
696
+ description: "Move a display.",
697
+ command:
698
+ 'zinkee --json navigation resources move 0f6f062f-1478-4df2-96a1-c495d037d260 --type DISPLAY --to Operations',
699
+ raw: `{
700
+ "resourceId": "0f6f062f-1478-4df2-96a1-c495d037d260",
701
+ "resourceType": "DISPLAY",
702
+ "targetFolderId": "b8c9d0e1-f2a3-4b5c-6d7e-8f9012345678"
703
+ }`,
704
+ },
705
+ {
706
+ description: "Move a resource back to the root folder (root is always UUID 00000000-0000-0000-0000-000000000000).",
707
+ command:
708
+ 'zinkee --json navigation resources move 5223cbc8-8c6c-4694-93bc-dd176364df9b --type SCHEMA --to 00000000-0000-0000-0000-000000000000',
709
+ raw: `{
710
+ "resourceId": "5223cbc8-8c6c-4694-93bc-dd176364df9b",
711
+ "resourceType": "SCHEMA",
712
+ "targetFolderId": "00000000-0000-0000-0000-000000000000"
713
+ }`,
714
+ },
715
+ {
716
+ description: "Move a schedule resource.",
717
+ command:
718
+ 'zinkee --json navigation resources move a1b2c3d4-e5f6-7890-1234-567890abcdef --type SCHEDULE --to Operations',
719
+ raw: `{
720
+ "resourceId": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
721
+ "resourceType": "SCHEDULE",
722
+ "targetFolderId": "b8c9d0e1-f2a3-4b5c-6d7e-8f9012345678"
723
+ }`,
724
+ },
725
+ ]),
726
+ "teamspace folders create": buildCommandExamples([
727
+ {
728
+ description: "Create a teamspace folder with order and icon metadata.",
729
+ command:
730
+ `zinkee --json teamspace folders create --name "Customer Success" --order 10 --props '{"icon":"folder-users"}'`,
731
+ raw: `{
732
+ "name": "Customer Success",
733
+ "order": 10,
734
+ "additionalProperties": {
735
+ "icon": "folder-users"
736
+ }
737
+ }`,
738
+ response: `{
739
+ "id": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
740
+ "name": "Customer Success",
741
+ "order": 10,
742
+ "isRoot": false,
743
+ "resourceCount": 0,
744
+ "resources": [],
745
+ "additionalProperties": {
746
+ "icon": "folder-users"
747
+ }
748
+ }`,
749
+ },
750
+ {
751
+ description: "Minimal create.",
752
+ command: 'zinkee --json teamspace folders create --name Shared',
753
+ raw: `{
754
+ "name": "Shared"
755
+ }`,
756
+ },
757
+ {
758
+ description: "Prominent folder with icon and color.",
759
+ command:
760
+ `zinkee --json teamspace folders create --name Executive --order 1 --props '{"icon":"crown","color":"gold"}'`,
761
+ raw: `{
762
+ "name": "Executive",
763
+ "order": 1,
764
+ "additionalProperties": {
765
+ "icon": "crown",
766
+ "color": "gold"
767
+ }
768
+ }`,
769
+ },
770
+ ]),
771
+ "teamspace folders update": buildCommandExamples([
772
+ {
773
+ description: "Rename, reorder and update properties in one call.",
774
+ command:
775
+ `zinkee --json teamspace folders update "Customer Success" --name "Shared KPIs" --order 5 --props '{"icon":"chart-bar"}'`,
776
+ raw: `{
777
+ "name": "Shared KPIs",
778
+ "order": 5,
779
+ "additionalProperties": {
780
+ "icon": "chart-bar"
781
+ }
782
+ }`,
783
+ response: `{
784
+ "id": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a",
785
+ "name": "Shared KPIs",
786
+ "order": 5,
787
+ "isRoot": false,
788
+ "resourceCount": 1,
789
+ "resources": [
790
+ {
791
+ "id": "0f6f062f-1478-4df2-96a1-c495d037d260",
792
+ "name": "Executive Revenue",
793
+ "type": "DISPLAY"
794
+ }
795
+ ],
796
+ "additionalProperties": {
797
+ "icon": "chart-bar"
798
+ }
799
+ }`,
800
+ },
801
+ {
802
+ description: "Rename only.",
803
+ command:
804
+ 'zinkee --json teamspace folders update "Customer Success" --name "Shared Analytics"',
805
+ raw: `{
806
+ "name": "Shared Analytics"
807
+ }`,
808
+ },
809
+ {
810
+ description: "Reorder only.",
811
+ command: 'zinkee --json teamspace folders update "Customer Success" --order 2',
812
+ raw: `{
813
+ "order": 2
814
+ }`,
815
+ },
816
+ {
817
+ description: "Update only the icon metadata.",
818
+ command:
819
+ `zinkee --json teamspace folders update "Customer Success" --props '{"icon":"chart-line"}'`,
820
+ raw: `{
821
+ "additionalProperties": {
822
+ "icon": "chart-line"
823
+ }
824
+ }`,
825
+ },
826
+ ]),
827
+ "teamspace resources publish": buildCommandExamples([
828
+ {
829
+ description: "Publish a schema by slug into a teamspace folder.",
830
+ command:
831
+ 'zinkee --json teamspace resources publish customer-records --to "Shared Dashboards"',
832
+ raw: `{
833
+ "resourceId": "customer-records",
834
+ "targetFolderId": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a"
835
+ }`,
836
+ response: `{
837
+ "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
838
+ "targetFolder": {
839
+ "id": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a",
840
+ "name": "Shared Dashboards",
841
+ "isRoot": false
842
+ },
843
+ "previousFolder": null
844
+ }`,
845
+ },
846
+ {
847
+ description: "Publish a schema by UUID.",
848
+ command:
849
+ 'zinkee --json teamspace resources publish 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --to "Shared Dashboards"',
850
+ raw: `{
851
+ "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
852
+ "targetFolderId": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a"
853
+ }`,
854
+ },
855
+ {
856
+ description: "Publish a display.",
857
+ command:
858
+ 'zinkee --json teamspace resources publish 0f6f062f-1478-4df2-96a1-c495d037d260 --to "Shared Dashboards"',
859
+ raw: `{
860
+ "resourceId": "0f6f062f-1478-4df2-96a1-c495d037d260",
861
+ "targetFolderId": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a"
862
+ }`,
863
+ },
864
+ {
865
+ description: "Publish directly at the teamspace root (root folder UUID is always 00000000-0000-0000-0000-000000000000).",
866
+ command:
867
+ 'zinkee --json teamspace resources publish customer-records --to 00000000-0000-0000-0000-000000000000',
868
+ raw: `{
869
+ "resourceId": "customer-records",
870
+ "targetFolderId": "00000000-0000-0000-0000-000000000000"
871
+ }`,
872
+ },
873
+ ]),
874
+ "teamspace resources unpublish": buildCommandExamples([
875
+ {
876
+ description: "Unpublish a schema by slug.",
877
+ command: 'zinkee --json teamspace resources unpublish customer-records',
878
+ raw: `{
879
+ "resourceId": "customer-records"
880
+ }`,
881
+ response: `{
882
+ "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
883
+ "removedFromFolder": {
884
+ "id": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a",
885
+ "name": "Shared Dashboards",
886
+ "isRoot": false
887
+ }
888
+ }`,
889
+ },
890
+ {
891
+ description: "Unpublish a schema by UUID.",
892
+ command:
893
+ 'zinkee --json teamspace resources unpublish 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e',
894
+ raw: `{
895
+ "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e"
896
+ }`,
897
+ },
898
+ {
899
+ description: "Unpublish a display.",
900
+ command:
901
+ 'zinkee --json teamspace resources unpublish 0f6f062f-1478-4df2-96a1-c495d037d260',
902
+ raw: `{
903
+ "resourceId": "0f6f062f-1478-4df2-96a1-c495d037d260"
904
+ }`,
905
+ },
906
+ ]),
907
+ "displays create": buildCommandExamples([
908
+ {
909
+ description:
910
+ "Create a freeform display with an initial widget layout. Freeform layouts travel through --freeform-layouts.",
911
+ command:
912
+ `zinkee --json displays create --name "Control Proyecto Freeform" --template freeform --freeform-layouts '{"lg":[{"i":"widget-1","x":0,"y":0,"w":6,"h":5}]}'`,
913
+ raw: `{
914
+ "name": "Control Proyecto Freeform",
915
+ "layout": {
916
+ "template": "freeform",
917
+ "freeformLayouts": {
918
+ "lg": [
919
+ { "i": "widget-1", "x": 0, "y": 0, "w": 6, "h": 5 }
920
+ ]
921
+ }
922
+ }
923
+ }`,
924
+ response: `{
925
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260"
926
+ }`,
927
+ },
928
+ {
929
+ description: "Create a tabbed display using the widget_row_tabs template.",
930
+ command:
931
+ 'zinkee --json displays create --name "Executive Revenue" --template widget_row_tabs',
932
+ raw: `{
933
+ "name": "Executive Revenue",
934
+ "layout": {
935
+ "template": "widget_row_tabs"
936
+ }
937
+ }`,
938
+ },
939
+ {
940
+ description: "Create a grid display.",
941
+ command:
942
+ 'zinkee --json displays create --name "Customer Detail" --template grid',
943
+ raw: `{
944
+ "name": "Customer Detail",
945
+ "layout": {
946
+ "template": "grid"
947
+ }
948
+ }`,
949
+ },
950
+ ]),
951
+ "displays tabs create": buildCommandExamples([
952
+ {
953
+ description: "Create a horizontal tab.",
954
+ command:
955
+ 'zinkee --json displays tabs create 0f6f062f-1478-4df2-96a1-c495d037d260 --name Overview --orientation horizontal',
956
+ raw: `{
957
+ "name": "Overview",
958
+ "orientation": "horizontal"
959
+ }`,
960
+ response: `{
961
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
962
+ "tabId": "tab-overview"
963
+ }`,
964
+ },
965
+ {
966
+ description: "Create a vertical tab.",
967
+ command:
968
+ 'zinkee --json displays tabs create 0f6f062f-1478-4df2-96a1-c495d037d260 --name Details --orientation vertical',
969
+ raw: `{
970
+ "name": "Details",
971
+ "orientation": "vertical"
972
+ }`,
973
+ },
974
+ ]),
975
+ "displays tabs update": buildCommandExamples([
976
+ {
977
+ description: "Rename a tab.",
978
+ command:
979
+ 'zinkee --json displays tabs update 0f6f062f-1478-4df2-96a1-c495d037d260 tab-main --name "Overview (renamed)"',
980
+ raw: `{
981
+ "name": "Overview (renamed)"
982
+ }`,
983
+ response: `{
984
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
985
+ "tabId": "tab-main"
986
+ }`,
987
+ },
988
+ {
989
+ description: "Change orientation only.",
990
+ command:
991
+ 'zinkee --json displays tabs update 0f6f062f-1478-4df2-96a1-c495d037d260 tab-main --orientation vertical',
992
+ raw: `{
993
+ "orientation": "vertical"
994
+ }`,
995
+ },
996
+ {
997
+ description: "Rename and reorient at once.",
998
+ command:
999
+ 'zinkee --json displays tabs update 0f6f062f-1478-4df2-96a1-c495d037d260 tab-main --name Details --orientation vertical',
1000
+ raw: `{
1001
+ "name": "Details",
1002
+ "orientation": "vertical"
1003
+ }`,
1004
+ },
1005
+ ]),
1006
+ "displays variables create": buildCommandExamples([
1007
+ {
1008
+ description:
1009
+ "Create a single-select REFERENCE variable bound to a (schema, field) pair. schemaId and fieldId accept slugs or UUIDs.",
1010
+ command:
1011
+ 'zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type REFERENCE --name Customer --source-schema contacts --source-field contact-name --default ""',
1012
+ raw: `{
1013
+ "type": "REFERENCE",
1014
+ "name": "Customer",
1015
+ "source": {
1016
+ "schemaId": "contacts",
1017
+ "fieldId": "contact-name"
1018
+ },
1019
+ "defaultValue": "",
1020
+ "allowMultiple": false,
1021
+ "staticVariable": false,
1022
+ "filters": []
1023
+ }`,
1024
+ response: `{
1025
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1026
+ "variableId": "aaaaaaaa-1111-4111-a111-111111111111"
1027
+ }`,
1028
+ },
1029
+ {
1030
+ description:
1031
+ "Create a multi-select REFERENCE variable with a filter. Complex filters go via --raw because --filter only accepts raw expressions.",
1032
+ command:
1033
+ `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"]}]}'`,
1034
+ raw: `{
1035
+ "type": "REFERENCE",
1036
+ "name": "Active customers",
1037
+ "source": {
1038
+ "schemaId": "contacts",
1039
+ "fieldId": "contact-name"
1040
+ },
1041
+ "defaultValues": [],
1042
+ "allowMultiple": true,
1043
+ "staticVariable": false,
1044
+ "filters": [
1045
+ {
1046
+ "origin": {
1047
+ "schemaId": "contacts",
1048
+ "fieldId": "status"
1049
+ },
1050
+ "comparisonOperator": "ANY_OF",
1051
+ "values": ["1", "2"]
1052
+ }
1053
+ ]
1054
+ }`,
1055
+ },
1056
+ {
1057
+ description: "Create a MEMBER variable with a default user id.",
1058
+ command:
1059
+ 'zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type MEMBER --name Owner --default 6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d',
1060
+ raw: `{
1061
+ "type": "MEMBER",
1062
+ "name": "Owner",
1063
+ "defaultValue": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d",
1064
+ "allowMultiple": false,
1065
+ "staticVariable": false
1066
+ }`,
1067
+ },
1068
+ {
1069
+ description: "Create a DATE variable using a dynamic period (thisMonth).",
1070
+ command:
1071
+ 'zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type DATE --name Period --date-mode dynamic --date-dynamic-option thisMonth',
1072
+ raw: `{
1073
+ "type": "DATE",
1074
+ "name": "Period",
1075
+ "date": {
1076
+ "mode": "dynamic",
1077
+ "dynamicOption": "thisMonth"
1078
+ }
1079
+ }`,
1080
+ },
1081
+ {
1082
+ description: "Create a DATE variable with a specific date.",
1083
+ command:
1084
+ 'zinkee --json displays variables create 0f6f062f-1478-4df2-96a1-c495d037d260 --type DATE --name Cutoff --date-mode specific --date-specific 2026-04-22',
1085
+ raw: `{
1086
+ "type": "DATE",
1087
+ "name": "Cutoff",
1088
+ "date": {
1089
+ "mode": "specific",
1090
+ "specificDate": "2026-04-22"
1091
+ }
1092
+ }`,
1093
+ },
1094
+ {
1095
+ description: "Create a DATE variable with a custom range.",
1096
+ command:
1097
+ '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',
1098
+ raw: `{
1099
+ "type": "DATE",
1100
+ "name": "Quarter",
1101
+ "date": {
1102
+ "mode": "range",
1103
+ "rangeStart": "2026-04-01",
1104
+ "rangeEnd": "2026-06-30"
1105
+ }
1106
+ }`,
1107
+ },
1108
+ ]),
1109
+ "displays variables update": buildCommandExamples([
1110
+ {
1111
+ description:
1112
+ "Rename the variable and make it static (defaults must be cleared with a raw patch because the CLI has no --default-values [] shortcut).",
1113
+ command:
1114
+ `zinkee --json displays variables update 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111 --raw '{"name":"Proyecto principal","staticVariable":true,"defaultValues":[]}'`,
1115
+ raw: `{
1116
+ "name": "Proyecto principal",
1117
+ "staticVariable": true,
1118
+ "defaultValues": []
1119
+ }`,
1120
+ response: `{
1121
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1122
+ "variableId": "aaaaaaaa-1111-4111-a111-111111111111"
1123
+ }`,
1124
+ },
1125
+ {
1126
+ description: "Replace the reference filters of the variable.",
1127
+ command:
1128
+ `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"]}]}'`,
1129
+ raw: `{
1130
+ "filters": [
1131
+ {
1132
+ "origin": {
1133
+ "schemaId": "contacts",
1134
+ "fieldId": "status"
1135
+ },
1136
+ "comparisonOperator": "ANY_OF",
1137
+ "values": ["2", "3"]
1138
+ }
1139
+ ]
1140
+ }`,
1141
+ },
1142
+ {
1143
+ description: "Switch a variable to multi-select.",
1144
+ command:
1145
+ `zinkee --json displays variables update 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111 --allow-multiple --raw '{"defaultValues":[]}'`,
1146
+ raw: `{
1147
+ "allowMultiple": true,
1148
+ "defaultValues": []
1149
+ }`,
1150
+ },
1151
+ {
1152
+ description: "Change a DATE variable to use lastWeek.",
1153
+ command:
1154
+ 'zinkee --json displays variables update 0f6f062f-1478-4df2-96a1-c495d037d260 bbbbbbbb-2222-4222-a222-222222222222 --date-mode dynamic --date-dynamic-option lastWeek',
1155
+ raw: `{
1156
+ "date": {
1157
+ "mode": "dynamic",
1158
+ "dynamicOption": "lastWeek"
1159
+ }
1160
+ }`,
1161
+ },
1162
+ ]),
1163
+ "displays widgets create": buildCommandExamples([
1164
+ {
1165
+ description:
1166
+ "Create a TABLE widget (CLI normalises --type table to TABLE_OR_SUBTABLE).",
1167
+ command:
1168
+ `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 id --field contact-name --field status --sort '{"fieldId":"id","direction":"DESC"}'`,
1169
+ raw: `{
1170
+ "type": "TABLE_OR_SUBTABLE",
1171
+ "source": {
1172
+ "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1173
+ "isOriginSubSchema": false
1174
+ },
1175
+ "placement": {
1176
+ "layout": { "x": 0, "y": 0, "w": 12, "h": 8 }
1177
+ },
1178
+ "presentation": {
1179
+ "name": "Customers"
1180
+ },
1181
+ "query": {
1182
+ "sorts": [
1183
+ { "fieldId": "id", "direction": "DESC" }
1184
+ ]
1185
+ },
1186
+ "view": {
1187
+ "fields": ["id", "contact-name", "status"]
1188
+ }
1189
+ }`,
1190
+ response: `{
1191
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1192
+ "widgetId": "11111111-1111-4111-a111-111111111111"
1193
+ }`,
1194
+ },
1195
+ {
1196
+ description:
1197
+ "Create a DETAIL widget on a tab. The rich placement is easier via --raw.",
1198
+ command:
1199
+ `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"]}}'`,
1200
+ raw: `{
1201
+ "type": "DETAIL",
1202
+ "source": {
1203
+ "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1204
+ "isOriginSubSchema": false
1205
+ },
1206
+ "placement": {
1207
+ "tabId": "tab-detail",
1208
+ "layout": { "x": 0, "y": 0, "w": 6, "h": 10 }
1209
+ },
1210
+ "presentation": { "name": "Customer detail" },
1211
+ "behavior": { "readOnly": true },
1212
+ "view": {
1213
+ "fields": ["contact-name", "contact-email", "status", "amount"]
1214
+ }
1215
+ }`,
1216
+ },
1217
+ {
1218
+ description: "Create a KPI widget computing SUM(amount).",
1219
+ command:
1220
+ `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}'`,
1221
+ raw: `{
1222
+ "type": "KPI",
1223
+ "source": {
1224
+ "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1225
+ "isOriginSubSchema": false
1226
+ },
1227
+ "placement": {
1228
+ "layout": { "x": 0, "y": 0, "w": 3, "h": 3 }
1229
+ },
1230
+ "presentation": { "name": "Total revenue" },
1231
+ "kpi": {
1232
+ "typeCalc": "SUM",
1233
+ "fieldCalc": "amount",
1234
+ "config": { "format": "currency", "decimals": 2 }
1235
+ }
1236
+ }`,
1237
+ },
1238
+ {
1239
+ description: "Create a bar CHART widget with a time-serie x-axis and two y-axis series.",
1240
+ command:
1241
+ `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 bar --x-axis-field due-date --x-axis-date-format MONTH --x-axis-time-series --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","color":"#4B9CD3","axisType":"BAR"}' --y-axis-serie '{"typeCalc":"COUNT","fieldCalc":"id","color":"#E57373","axisType":"LINE"}' --legend '{"position":"bottom"}'`,
1242
+ raw: `{
1243
+ "type": "CHART",
1244
+ "source": {
1245
+ "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1246
+ "isOriginSubSchema": false
1247
+ },
1248
+ "placement": {
1249
+ "layout": { "x": 0, "y": 0, "w": 8, "h": 6 }
1250
+ },
1251
+ "presentation": { "name": "Revenue by month" },
1252
+ "chart": {
1253
+ "chartType": "bar",
1254
+ "xAxisFieldId": "due-date",
1255
+ "xAxisDateFormat": "MONTH",
1256
+ "xAxisAsTimeSerie": true,
1257
+ "yAxisSeries": [
1258
+ {
1259
+ "typeCalc": "SUM",
1260
+ "fieldCalc": "amount",
1261
+ "color": "#4B9CD3",
1262
+ "axisType": "BAR"
1263
+ },
1264
+ {
1265
+ "typeCalc": "COUNT",
1266
+ "fieldCalc": "id",
1267
+ "color": "#E57373",
1268
+ "axisType": "LINE"
1269
+ }
1270
+ ],
1271
+ "legend": { "position": "bottom" }
1272
+ }
1273
+ }`,
1274
+ },
1275
+ {
1276
+ description: "Create a TIMELINE widget.",
1277
+ command:
1278
+ `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 contact-name --field due-date`,
1279
+ raw: `{
1280
+ "type": "TIMELINE",
1281
+ "source": {
1282
+ "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1283
+ "isOriginSubSchema": false
1284
+ },
1285
+ "placement": {
1286
+ "layout": { "x": 0, "y": 0, "w": 12, "h": 6 }
1287
+ },
1288
+ "presentation": { "name": "Customer schedule" },
1289
+ "view": {
1290
+ "fields": ["contact-name", "due-date"]
1291
+ }
1292
+ }`,
1293
+ },
1294
+ {
1295
+ description:
1296
+ "Create a KANBAN widget with a status filter and groupsExpanded config (rich query/view requires --raw).",
1297
+ command:
1298
+ `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --raw '{"type":"KANBAN","source":{"originResourceId":"2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e","isOriginSubSchema":false},"placement":{"layout":{"x":0,"y":0,"w":12,"h":8}},"presentation":{"name":"Status board"},"query":{"filters":[{"origin":{"schemaId":"contacts","fieldId":"status"},"comparisonOperator":"ANY_OF","values":["1","2","3"]}]},"view":{"fields":["contact-name","status","amount"],"groupsExpanded":{"1":true,"2":true,"3":false}}}'`,
1299
+ raw: `{
1300
+ "type": "KANBAN",
1301
+ "source": {
1302
+ "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1303
+ "isOriginSubSchema": false
1304
+ },
1305
+ "placement": {
1306
+ "layout": { "x": 0, "y": 0, "w": 12, "h": 8 }
1307
+ },
1308
+ "presentation": { "name": "Status board" },
1309
+ "query": {
1310
+ "filters": [
1311
+ {
1312
+ "origin": {
1313
+ "schemaId": "contacts",
1314
+ "fieldId": "status"
1315
+ },
1316
+ "comparisonOperator": "ANY_OF",
1317
+ "values": ["1", "2", "3"]
1318
+ }
1319
+ ]
1320
+ },
1321
+ "view": {
1322
+ "fields": ["contact-name", "status", "amount"],
1323
+ "groupsExpanded": { "1": true, "2": true, "3": false }
1324
+ }
1325
+ }`,
1326
+ },
1327
+ {
1328
+ description: "Create a HIERARCHY widget rooted on a parent field.",
1329
+ command:
1330
+ `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --raw '{"type":"HIERARCHY","source":{"originResourceId":"2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e","isOriginSubSchema":false},"placement":{"layout":{"x":0,"y":0,"w":12,"h":6}},"presentation":{"name":"Org tree"},"view":{"fields":["contact-name","status"],"hierarchyConfig":{"parentFieldId":"contact-name"}}}'`,
1331
+ raw: `{
1332
+ "type": "HIERARCHY",
1333
+ "source": {
1334
+ "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1335
+ "isOriginSubSchema": false
1336
+ },
1337
+ "placement": {
1338
+ "layout": { "x": 0, "y": 0, "w": 12, "h": 6 }
1339
+ },
1340
+ "presentation": { "name": "Org tree" },
1341
+ "view": {
1342
+ "fields": ["contact-name", "status"],
1343
+ "hierarchyConfig": {
1344
+ "parentFieldId": "contact-name"
1345
+ }
1346
+ }
1347
+ }`,
1348
+ },
1349
+ ]),
1350
+ "displays widgets update": buildCommandExamples([
1351
+ {
1352
+ description: "Move placement, update view columns, rename the widget and lock it.",
1353
+ command:
1354
+ `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 id --field contact-name --field status --name "Revenue Updated" --widget-read-only`,
1355
+ raw: `{
1356
+ "placement": {
1357
+ "layout": { "x": 1, "y": 2, "w": 8, "h": 4 }
1358
+ },
1359
+ "view": {
1360
+ "fields": ["id", "contact-name", "status"]
1361
+ },
1362
+ "presentation": { "name": "Revenue Updated" },
1363
+ "behavior": { "readOnly": true }
1364
+ }`,
1365
+ response: `{
1366
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1367
+ "widgetId": "11111111-1111-4111-a111-111111111111"
1368
+ }`,
1369
+ },
1370
+ {
1371
+ description:
1372
+ "Add query filters that match the full comparisonOperator contract (requires --raw because --filter only accepts free-form expressions).",
1373
+ command:
1374
+ `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --raw '{"query":{"filters":[{"origin":{"schemaId":"contacts","fieldId":"status"},"comparisonOperator":"EQUAL","values":["2"]},{"origin":{"schemaId":"contacts","fieldId":"amount"},"comparisonOperator":"GREATER_OR_EQUAL","values":["500"]}]}}'`,
1375
+ raw: `{
1376
+ "query": {
1377
+ "filters": [
1378
+ {
1379
+ "origin": {
1380
+ "schemaId": "contacts",
1381
+ "fieldId": "status"
1382
+ },
1383
+ "comparisonOperator": "EQUAL",
1384
+ "values": ["2"]
1385
+ },
1386
+ {
1387
+ "origin": {
1388
+ "schemaId": "contacts",
1389
+ "fieldId": "amount"
1390
+ },
1391
+ "comparisonOperator": "GREATER_OR_EQUAL",
1392
+ "values": ["500"]
1393
+ }
1394
+ ]
1395
+ }
1396
+ }`,
1397
+ },
1398
+ {
1399
+ description: "Hide the add, delete and filter buttons.",
1400
+ command:
1401
+ 'zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --hide-add-button --hide-delete-button --hide-filter-button',
1402
+ raw: `{
1403
+ "behavior": {
1404
+ "hideAddButton": true,
1405
+ "hideDeleteButton": true,
1406
+ "hideFilterButton": true
1407
+ }
1408
+ }`,
1409
+ },
1410
+ {
1411
+ description: "Update the KPI aggregation to AVG with one-decimal format.",
1412
+ command:
1413
+ `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}'`,
1414
+ raw: `{
1415
+ "kpi": {
1416
+ "typeCalc": "AVG",
1417
+ "fieldCalc": "amount",
1418
+ "config": { "format": "number", "decimals": 1 }
1419
+ }
1420
+ }`,
1421
+ },
1422
+ {
1423
+ description: "Replace the chart series with a weekly line.",
1424
+ command:
1425
+ `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 22222222-2222-4222-a222-222222222222 --chart-type line --x-axis-field due-date --x-axis-date-format WEEK --x-axis-time-series --y-axis-serie '{"typeCalc":"SUM","fieldCalc":"amount","color":"#2E7D32","axisType":"LINE"}'`,
1426
+ raw: `{
1427
+ "chart": {
1428
+ "chartType": "line",
1429
+ "xAxisFieldId": "due-date",
1430
+ "xAxisDateFormat": "WEEK",
1431
+ "xAxisAsTimeSerie": true,
1432
+ "yAxisSeries": [
1433
+ {
1434
+ "typeCalc": "SUM",
1435
+ "fieldCalc": "amount",
1436
+ "color": "#2E7D32",
1437
+ "axisType": "LINE"
1438
+ }
1439
+ ]
1440
+ }
1441
+ }`,
1442
+ },
1443
+ {
1444
+ description: "Rewrite the widget bindings (requires --raw because the CLI has no --binding flag).",
1445
+ command:
1446
+ `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"}}}'`,
1447
+ raw: `{
1448
+ "bindings": {
1449
+ "variableMap": {
1450
+ "aaaaaaaa-1111-4111-a111-111111111111": "contact-name",
1451
+ "cccccccc-3333-4333-a333-333333333333": "owner"
1452
+ }
1453
+ }
1454
+ }`,
1455
+ },
1456
+ ]),
1457
+ "displays navigation-targets create": buildCommandExamples([
1458
+ {
1459
+ description: "Create a navigation target with a visible label.",
1460
+ command:
1461
+ '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"',
1462
+ raw: `{
1463
+ "sourceWidgetId": "11111111-1111-4111-a111-111111111111",
1464
+ "targetDisplayId": "ef012345-6789-4abc-8def-0123456789ab",
1465
+ "targetVariableId": "aaaaaaaa-1111-4111-a111-111111111111",
1466
+ "label": "Open customer"
1467
+ }`,
1468
+ response: `{
1469
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1470
+ "navigationTargetId": "nav-target-customer"
1471
+ }`,
1472
+ },
1473
+ {
1474
+ description: "Create a navigation target without a label (uses the target display name).",
1475
+ command:
1476
+ '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',
1477
+ raw: `{
1478
+ "sourceWidgetId": "22222222-2222-4222-a222-222222222222",
1479
+ "targetDisplayId": "ef012345-6789-4abc-8def-0123456789ab",
1480
+ "targetVariableId": "aaaaaaaa-1111-4111-a111-111111111111"
1481
+ }`,
1482
+ },
1483
+ ]),
1484
+ "displays navigation-targets update": buildCommandExamples([
1485
+ {
1486
+ description: "Change just the label.",
1487
+ command:
1488
+ 'zinkee --json displays navigation-targets update 0f6f062f-1478-4df2-96a1-c495d037d260 nav-target-customer --label "Go to customer"',
1489
+ raw: `{
1490
+ "label": "Go to customer"
1491
+ }`,
1492
+ response: `{
1493
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
1494
+ "navigationTargetId": "nav-target-customer"
1495
+ }`,
1496
+ },
1497
+ {
1498
+ description: "Redirect the target to another display/variable pair.",
1499
+ command:
1500
+ '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',
1501
+ raw: `{
1502
+ "targetDisplayId": "6b7c8d9e-0f12-3456-789a-bcdef0123456",
1503
+ "targetVariableId": "bbbbbbbb-2222-4222-a222-222222222222"
1504
+ }`,
1505
+ },
1506
+ {
1507
+ description: "Change the source widget.",
1508
+ command:
1509
+ 'zinkee --json displays navigation-targets update 0f6f062f-1478-4df2-96a1-c495d037d260 nav-target-customer --source-widget 44444444-4444-4444-a444-444444444444',
1510
+ raw: `{
1511
+ "sourceWidgetId": "44444444-4444-4444-a444-444444444444"
1512
+ }`,
1513
+ },
1514
+ ]),
1515
+ "displays cross-widget-filter set": buildCommandExamples([
1516
+ {
1517
+ description: "Link one source widget/field to several target widgets through the same field.",
1518
+ command:
1519
+ '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',
1520
+ raw: `{
1521
+ "source": {
1522
+ "widgetId": "11111111-1111-4111-a111-111111111111",
1523
+ "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
1524
+ },
1525
+ "targets": [
1526
+ {
1527
+ "widgetId": "22222222-2222-4222-a222-222222222222",
1528
+ "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
1529
+ },
1530
+ {
1531
+ "widgetId": "33333333-3333-4333-a333-333333333333",
1532
+ "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
1533
+ }
1534
+ ]
1535
+ }`,
1536
+ },
1537
+ {
1538
+ description: "Filter one target widget by the status field of the source.",
1539
+ command:
1540
+ 'zinkee --json displays cross-widget-filter set 0f6f062f-1478-4df2-96a1-c495d037d260 --source-widget 11111111-1111-4111-a111-111111111111 --source-field a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890 --target 66666666-6666-4666-a666-666666666666:a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890',
1541
+ raw: `{
1542
+ "source": {
1543
+ "widgetId": "11111111-1111-4111-a111-111111111111",
1544
+ "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"
1545
+ },
1546
+ "targets": [
1547
+ {
1548
+ "widgetId": "66666666-6666-4666-a666-666666666666",
1549
+ "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"
1550
+ }
1551
+ ]
1552
+ }`,
1553
+ },
1554
+ ]),
1555
+ "schemas list": buildCommandExamples([
1556
+ {
1557
+ description: "List schemas in the workspace with folder and field counts.",
1558
+ command: "zinkee --json schemas list",
1559
+ response: `[
1560
+ {
1561
+ "id": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1562
+ "name": "Contacts",
1563
+ "slug": "contacts",
1564
+ "folder": {
1565
+ "id": "7f4e7c25-d8b2-4c1a-9f3e-6a7b5c8d9e1f",
1566
+ "name": "Customers",
1567
+ "isRoot": false
1568
+ },
1569
+ "auditable": false,
1570
+ "commentable": false,
1571
+ "fieldCount": 11
1572
+ },
1573
+ {
1574
+ "id": "5223cbc8-8c6c-4694-93bc-dd176364df9b",
1575
+ "name": "Orders",
1576
+ "slug": "orders",
1577
+ "folder": {
1578
+ "id": "00000000-0000-0000-0000-000000000000",
1579
+ "name": "root",
1580
+ "isRoot": true
1581
+ },
1582
+ "auditable": true,
1583
+ "commentable": true,
1584
+ "fieldCount": 7
1585
+ }
1586
+ ]`,
1587
+ },
1588
+ ]),
1589
+ "schemas get": buildCommandExamples([
1590
+ {
1591
+ description: "Get a schema with all its fields.",
1592
+ command: "zinkee --json schemas get contacts",
1593
+ response: `{
1594
+ "id": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1595
+ "name": "Contacts",
1596
+ "slug": "contacts",
1597
+ "folder": {
1598
+ "id": "7f4e7c25-d8b2-4c1a-9f3e-6a7b5c8d9e1f",
1599
+ "name": "Customers",
1600
+ "isRoot": false
1601
+ },
1602
+ "auditable": true,
1603
+ "commentable": true,
1604
+ "fields": [
1605
+ {
1606
+ "id": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
1607
+ "type": "TextField",
1608
+ "slug": "contact-name",
1609
+ "label": "Customer Name",
1610
+ "required": true,
1611
+ "system": false,
1612
+ "config": {
1613
+ "textType": "LONG",
1614
+ "defaultValue": "Unknown",
1615
+ "conditionalFormatting": []
1616
+ }
1617
+ },
1618
+ {
1619
+ "id": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
1620
+ "type": "OptionField",
1621
+ "slug": "status",
1622
+ "label": "Status",
1623
+ "required": false,
1624
+ "system": false,
1625
+ "config": {
1626
+ "options": [
1627
+ { "id": 1, "name": "Open", "color": "default" },
1628
+ { "id": 2, "name": "In Progress", "color": "warning" },
1629
+ { "id": 3, "name": "Done", "color": "success" }
1630
+ ],
1631
+ "defaultValue": 1,
1632
+ "conditionalFormatting": [],
1633
+ "buttonConfig": null
1634
+ }
1635
+ },
1636
+ {
1637
+ "id": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
1638
+ "type": "NumberField",
1639
+ "slug": "amount",
1640
+ "label": "Amount",
1641
+ "required": false,
1642
+ "system": false,
1643
+ "config": {
1644
+ "defaultValue": "0",
1645
+ "formatOptions": {
1646
+ "format": "currency",
1647
+ "decimals": 2,
1648
+ "negativesInRed": true,
1649
+ "thousandsSeparator": true,
1650
+ "symbolEnabled": true,
1651
+ "symbolPosition": "before",
1652
+ "symbolValue": "€"
1653
+ },
1654
+ "conditionalFormatting": []
1655
+ }
1656
+ },
1657
+ {
1658
+ "id": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
1659
+ "type": "DateField",
1660
+ "slug": "due-date",
1661
+ "label": "Due Date",
1662
+ "required": false,
1663
+ "system": false,
1664
+ "config": {
1665
+ "defaultValue": null,
1666
+ "formatOptions": {
1667
+ "format": "datetime",
1668
+ "dateFormat": "DD/MM/YYYY",
1669
+ "showTime": true
1670
+ },
1671
+ "conditionalFormatting": []
1672
+ }
1673
+ },
1674
+ {
1675
+ "id": "a7b8c9d0-e1f2-3a4b-5c6d-7e8f90123456",
1676
+ "type": "MemberField",
1677
+ "slug": "owner",
1678
+ "label": "Owner",
1679
+ "required": false,
1680
+ "system": false,
1681
+ "config": {
1682
+ "defaultValue": null,
1683
+ "conditionalFormatting": []
1684
+ }
1685
+ }
1686
+ ]
1687
+ }`,
1688
+ },
1689
+ ]),
1690
+ "schemas delete": buildCommandExamples([
1691
+ {
1692
+ description: "Delete a schema (also removes it from navigation folders).",
1693
+ command: "zinkee --json schemas delete contacts",
1694
+ response: `{
1695
+ "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1696
+ "deleted": true
1697
+ }`,
1698
+ },
1699
+ ]),
1700
+ "schemas fields list": buildCommandExamples([
1701
+ {
1702
+ description: "List the fields of a schema (fields are inlined in the schema resource).",
1703
+ command: "zinkee --json schemas fields list contacts",
1704
+ response: `[
1705
+ {
1706
+ "id": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
1707
+ "type": "TextField",
1708
+ "slug": "contact-name",
1709
+ "label": "Customer Name",
1710
+ "required": true,
1711
+ "system": false,
1712
+ "config": {
1713
+ "textType": "LONG",
1714
+ "defaultValue": "Unknown",
1715
+ "conditionalFormatting": []
1716
+ }
1717
+ },
1718
+ {
1719
+ "id": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
1720
+ "type": "OptionField",
1721
+ "slug": "status",
1722
+ "label": "Status",
1723
+ "required": false,
1724
+ "system": false,
1725
+ "config": {
1726
+ "options": [
1727
+ { "id": 1, "name": "Open", "color": "default" },
1728
+ { "id": 2, "name": "In Progress", "color": "warning" },
1729
+ { "id": 3, "name": "Done", "color": "success" }
1730
+ ],
1731
+ "defaultValue": 1,
1732
+ "conditionalFormatting": [],
1733
+ "buttonConfig": null
1734
+ }
1735
+ }
1736
+ ]`,
1737
+ },
1738
+ ]),
1739
+ "schemas fields get": buildCommandExamples([
1740
+ {
1741
+ description: "Get a schema field (returns the full typed field contract).",
1742
+ command: "zinkee --json schemas fields get contacts status",
1743
+ response: `{
1744
+ "id": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
1745
+ "type": "OptionField",
1746
+ "slug": "status",
1747
+ "label": "Status",
1748
+ "required": false,
1749
+ "system": false,
1750
+ "config": {
1751
+ "options": [
1752
+ { "id": 1, "name": "Open", "color": "default" },
1753
+ { "id": 2, "name": "In Progress", "color": "warning" },
1754
+ { "id": 3, "name": "Done", "color": "success" }
1755
+ ],
1756
+ "defaultValue": 1,
1757
+ "conditionalFormatting": [],
1758
+ "buttonConfig": {
1759
+ "displayMode": "button",
1760
+ "buttonBehavior": {
1761
+ "mode": "cycle",
1762
+ "cycleOrder": [1, 2, 3],
1763
+ "requireConfirmation": false,
1764
+ "lockAfterSelection": false,
1765
+ "useFixedLabel": false,
1766
+ "allowReselect": true
1767
+ }
1768
+ }
1769
+ }
1770
+ }`,
1771
+ },
1772
+ ]),
1773
+ "schemas fields delete": buildCommandExamples([
1774
+ {
1775
+ description: "Delete a schema field.",
1776
+ command: "zinkee --json schemas fields delete contacts status",
1777
+ response: `{
1778
+ "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1779
+ "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
1780
+ "slug": "status"
1781
+ }`,
1782
+ },
1783
+ ]),
1784
+ "records list": buildCommandExamples([
1785
+ {
1786
+ description: "List records with default pagination.",
1787
+ command: "zinkee --json records list contacts",
1788
+ response: `{
1789
+ "records": [
1790
+ {
1791
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
1792
+ "values": {
1793
+ "contact-name": "Ada Lovelace",
1794
+ "contact-email": "ada@example.com",
1795
+ "status": 2,
1796
+ "amount": 1250.50,
1797
+ "due-date": "2026-05-15T12:00:00Z",
1798
+ "owner": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
1799
+ }
1800
+ },
1801
+ {
1802
+ "recordId": "7c9a4b31-e85d-42f7-8b6a-123456789abc",
1803
+ "values": {
1804
+ "contact-name": "Alan Turing",
1805
+ "contact-email": "alan@example.com",
1806
+ "status": 1,
1807
+ "amount": 890.00
1808
+ }
1809
+ }
1810
+ ],
1811
+ "page": {
1812
+ "offset": 0,
1813
+ "limit": 50,
1814
+ "total": 2,
1815
+ "count": 2,
1816
+ "hasMore": false
1817
+ }
1818
+ }`,
1819
+ },
1820
+ {
1821
+ description: "Paginate further into the result set.",
1822
+ command: "zinkee --json records list contacts --limit 50 --offset 100",
1823
+ },
1824
+ ]),
1825
+ "records get": buildCommandExamples([
1826
+ {
1827
+ description: "Get one record by id (values are keyed by field slug).",
1828
+ command: `zinkee --json records get contacts ${SAMPLE_UUID}`,
1829
+ response: `{
1830
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
1831
+ "values": {
1832
+ "contact-name": "Ada Lovelace",
1833
+ "contact-email": "ada@example.com",
1834
+ "status": 2,
1835
+ "amount": 1250.50,
1836
+ "due-date": "2026-05-15T12:00:00Z",
1837
+ "owner": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
1838
+ }
1839
+ }`,
1840
+ },
1841
+ ]),
1842
+ "records delete": buildCommandExamples([
1843
+ {
1844
+ description: "Delete a record.",
1845
+ command: `zinkee --json records delete contacts ${SAMPLE_UUID}`,
1846
+ response: `{
1847
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
1848
+ "deleted": true
1849
+ }`,
1850
+ },
1851
+ ]),
1852
+ "comments list": buildCommandExamples([
1853
+ {
1854
+ description: "List comments on a record (content is an array of TEXT/MENTION items).",
1855
+ command: `zinkee --json comments list contacts ${SAMPLE_UUID}`,
1856
+ response: `[
1857
+ {
1858
+ "id": "cd8e3b2a-1f5c-4e9a-8b7d-0a2b3c4d5e6f",
1859
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
1860
+ "createdAt": "2026-04-22T10:15:00Z",
1861
+ "createdBy": "developer@zinkee.com",
1862
+ "content": [
1863
+ { "type": "TEXT", "value": "This record needs review." }
1864
+ ]
1865
+ },
1866
+ {
1867
+ "id": "a1b2c3d4-5e6f-7890-abcd-ef1234567890",
1868
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
1869
+ "createdAt": "2026-04-22T11:30:00Z",
1870
+ "createdBy": "developer@zinkee.com",
1871
+ "content": [
1872
+ { "type": "TEXT", "value": "Assigning to " },
1873
+ { "type": "MENTION", "value": "9f8e7d6c-5b4a-3c2d-1e0f-a1b2c3d4e5f6" },
1874
+ { "type": "TEXT", "value": " for follow up." }
1875
+ ]
1876
+ }
1877
+ ]`,
1878
+ },
1879
+ ]),
1880
+ "logs list": buildCommandExamples([
1881
+ {
1882
+ description:
1883
+ "List the change history for a record (CREATE entry plus UPDATE entries with before/after values per field).",
1884
+ command: `zinkee --json logs list contacts ${SAMPLE_UUID}`,
1885
+ response: `[
1886
+ {
1887
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
1888
+ "timestamp": "2026-04-22T10:00:00Z",
1889
+ "changeField": "",
1890
+ "change": {
1891
+ "beforeValue": null,
1892
+ "afterValue": null,
1893
+ "author": "developer@zinkee.com",
1894
+ "operation": "CREATE"
1895
+ }
1896
+ },
1897
+ {
1898
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
1899
+ "timestamp": "2026-04-22T10:15:00Z",
1900
+ "changeField": "status",
1901
+ "change": {
1902
+ "beforeValue": "1",
1903
+ "afterValue": "2",
1904
+ "author": "developer@zinkee.com",
1905
+ "operation": "UPDATE"
1906
+ }
1907
+ },
1908
+ {
1909
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
1910
+ "timestamp": "2026-04-22T10:20:00Z",
1911
+ "changeField": "amount",
1912
+ "change": {
1913
+ "beforeValue": "1000.00",
1914
+ "afterValue": "1250.50",
1915
+ "author": "developer@zinkee.com",
1916
+ "operation": "UPDATE"
1917
+ }
1918
+ }
1919
+ ]`,
1920
+ },
1921
+ ]),
1922
+ "navigation folders list": buildCommandExamples([
1923
+ {
1924
+ description: "List navigation folders with embedded resources, sorted by order.",
1925
+ command: "zinkee --json navigation folders list",
1926
+ response: `[
1927
+ {
1928
+ "id": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a",
1929
+ "order": 1,
1930
+ "name": "Sales",
1931
+ "resources": [
1932
+ {
1933
+ "id": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
1934
+ "name": "Contacts",
1935
+ "type": "SCHEMA",
1936
+ "isInSpace": false,
1937
+ "additionalProperties": {}
1938
+ },
1939
+ {
1940
+ "id": "5223cbc8-8c6c-4694-93bc-dd176364df9b",
1941
+ "name": "Orders",
1942
+ "type": "SCHEMA",
1943
+ "isInSpace": true,
1944
+ "additionalProperties": {}
1945
+ }
1946
+ ],
1947
+ "additionalProperties": {
1948
+ "color": "blue"
1949
+ }
1950
+ },
1951
+ {
1952
+ "id": "b8c9d0e1-f2a3-4b5c-6d7e-8f9012345678",
1953
+ "order": 2,
1954
+ "name": "Operations",
1955
+ "resources": [
1956
+ {
1957
+ "id": "3f8a2c1b-9d4e-4a5b-8c6d-7e8f90123456",
1958
+ "name": "Quote approval",
1959
+ "type": "WORKFLOW",
1960
+ "isInSpace": false,
1961
+ "additionalProperties": {}
1962
+ },
1963
+ {
1964
+ "id": "0f6f062f-1478-4df2-96a1-c495d037d260",
1965
+ "name": "Executive Revenue",
1966
+ "type": "DISPLAY",
1967
+ "isInSpace": true,
1968
+ "additionalProperties": {
1969
+ "pinned": true
1970
+ }
1971
+ }
1972
+ ],
1973
+ "additionalProperties": {
1974
+ "color": "purple"
1975
+ }
1976
+ },
1977
+ {
1978
+ "id": "00000000-0000-0000-0000-000000000000",
1979
+ "order": 99,
1980
+ "name": "root",
1981
+ "resources": [],
1982
+ "additionalProperties": {}
1983
+ }
1984
+ ]`,
1985
+ },
1986
+ ]),
1987
+ "navigation folders get": buildCommandExamples([
1988
+ {
1989
+ description: "Get a navigation folder by exact name or UUID.",
1990
+ command: 'zinkee --json navigation folders get Finance',
1991
+ },
1992
+ ]),
1993
+ "navigation folders delete": buildCommandExamples([
1994
+ {
1995
+ description: "Delete a navigation folder by exact name or UUID.",
1996
+ command: 'zinkee --json navigation folders delete Finance',
1997
+ response: `{
1998
+ "folderId": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a",
1999
+ "name": "Finance Ops"
2000
+ }`,
2001
+ },
2002
+ ]),
2003
+ "teamspace folders list": buildCommandExamples([
2004
+ {
2005
+ description: "List teamspace folders.",
2006
+ command: "zinkee --json teamspace folders list",
2007
+ },
2008
+ {
2009
+ description: "List teamspace folders with their published resources.",
2010
+ command: "zinkee --json teamspace folders list --include-resources",
2011
+ response: `[
2012
+ {
2013
+ "id": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a",
2014
+ "name": "Shared Dashboards",
2015
+ "order": 1,
2016
+ "isRoot": false,
2017
+ "resourceCount": 1,
2018
+ "resources": [
2019
+ {
2020
+ "id": "0f6f062f-1478-4df2-96a1-c495d037d260",
2021
+ "name": "Executive Revenue",
2022
+ "type": "DISPLAY"
2023
+ }
2024
+ ],
2025
+ "additionalProperties": {}
2026
+ }
2027
+ ]`,
2028
+ },
2029
+ ]),
2030
+ "teamspace folders get": buildCommandExamples([
2031
+ {
2032
+ description: "Get a teamspace folder by exact name or UUID.",
2033
+ command: 'zinkee --json teamspace folders get "Shared Dashboards"',
2034
+ },
2035
+ ]),
2036
+ "teamspace folders delete": buildCommandExamples([
2037
+ {
2038
+ description:
2039
+ "Delete a teamspace folder. Its resources are moved to the returned target folder (root by default).",
2040
+ command: 'zinkee --json teamspace folders delete "Customer Success"',
2041
+ response: `{
2042
+ "folderId": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a",
2043
+ "movedResourceCount": 3,
2044
+ "targetFolder": {
2045
+ "id": "00000000-0000-0000-0000-000000000000",
2046
+ "name": "root",
2047
+ "isRoot": true
2048
+ }
2049
+ }`,
2050
+ },
2051
+ ]),
2052
+ "files storage": buildCommandExamples([
2053
+ {
2054
+ description: "Get the storage quota and current usage (bytes).",
2055
+ command: "zinkee --json files storage",
2056
+ response: `{
2057
+ "maxSize": 10737418240,
2058
+ "usedSize": 2147483648
2059
+ }`,
2060
+ },
2061
+ ]),
2062
+ "displays list": buildCommandExamples([
2063
+ {
2064
+ description: "List displays in the workspace with variable and widget counts.",
2065
+ command: "zinkee --json displays list",
2066
+ response: `[
2067
+ {
2068
+ "id": "0f6f062f-1478-4df2-96a1-c495d037d260",
2069
+ "name": "Executive Revenue",
2070
+ "layoutTemplate": "widget_row_tabs",
2071
+ "variableCount": 3,
2072
+ "widgetCount": 6
2073
+ },
2074
+ {
2075
+ "id": "6b7c8d9e-0f12-3456-789a-bcdef0123456",
2076
+ "name": "Sales Pipeline",
2077
+ "layoutTemplate": "freeform",
2078
+ "variableCount": 1,
2079
+ "widgetCount": 3
2080
+ },
2081
+ {
2082
+ "id": "ef012345-6789-4abc-8def-0123456789ab",
2083
+ "name": "Customer Detail",
2084
+ "layoutTemplate": "grid",
2085
+ "variableCount": 0,
2086
+ "widgetCount": 2
2087
+ }
2088
+ ]`,
2089
+ },
2090
+ ]),
2091
+ "displays get": buildCommandExamples([
2092
+ {
2093
+ description:
2094
+ "Get a display with its layout (tabs/freeformLayouts/slots), variables, widgets, cross-widget filter and navigation targets.",
2095
+ command: "zinkee --json displays get 0f6f062f-1478-4df2-96a1-c495d037d260",
2096
+ response: `{
2097
+ "id": "0f6f062f-1478-4df2-96a1-c495d037d260",
2098
+ "name": "Executive Revenue",
2099
+ "layout": {
2100
+ "template": "widget_row_tabs",
2101
+ "freeformLayouts": null,
2102
+ "slots": null,
2103
+ "tabs": [
2104
+ {
2105
+ "id": "tab-main",
2106
+ "name": "Overview",
2107
+ "orientation": "horizontal",
2108
+ "widgetIds": [
2109
+ "11111111-1111-4111-a111-111111111111",
2110
+ "22222222-2222-4222-a222-222222222222",
2111
+ "33333333-3333-4333-a333-333333333333"
2112
+ ]
2113
+ },
2114
+ {
2115
+ "id": "tab-detail",
2116
+ "name": "Detail",
2117
+ "orientation": "horizontal",
2118
+ "widgetIds": [
2119
+ "44444444-4444-4444-a444-444444444444",
2120
+ "55555555-5555-4555-a555-555555555555",
2121
+ "66666666-6666-4666-a666-666666666666"
2122
+ ]
2123
+ }
2124
+ ]
2125
+ },
2126
+ "variables": [
2127
+ {
2128
+ "id": "aaaaaaaa-1111-4111-a111-111111111111",
2129
+ "type": "REFERENCE",
2130
+ "name": "Customer",
2131
+ "source": {
2132
+ "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
2133
+ "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
2134
+ },
2135
+ "defaultValue": "",
2136
+ "allowMultiple": false,
2137
+ "staticVariable": false,
2138
+ "filters": []
2139
+ },
2140
+ {
2141
+ "id": "bbbbbbbb-2222-4222-a222-222222222222",
2142
+ "type": "DATE",
2143
+ "name": "Period",
2144
+ "date": {
2145
+ "mode": "dynamic",
2146
+ "dynamicOption": "thisMonth"
2147
+ }
2148
+ },
2149
+ {
2150
+ "id": "cccccccc-3333-4333-a333-333333333333",
2151
+ "type": "MEMBER",
2152
+ "name": "Owner",
2153
+ "defaultValue": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d",
2154
+ "allowMultiple": false,
2155
+ "staticVariable": false
2156
+ }
2157
+ ],
2158
+ "widgets": [
2159
+ {
2160
+ "id": "11111111-1111-4111-a111-111111111111",
2161
+ "type": "TABLE_OR_SUBTABLE",
2162
+ "source": {
2163
+ "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
2164
+ "isOriginSubSchema": false
2165
+ },
2166
+ "placement": {
2167
+ "layout": { "x": 0, "y": 0, "w": 12, "h": 8 }
2168
+ },
2169
+ "presentation": {
2170
+ "name": "Customers",
2171
+ "description": "All customers",
2172
+ "icon": "users",
2173
+ "color": "blue"
2174
+ },
2175
+ "bindings": {
2176
+ "variableMap": {
2177
+ "aaaaaaaa-1111-4111-a111-111111111111": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
2178
+ }
2179
+ },
2180
+ "query": {
2181
+ "filters": [],
2182
+ "sorts": [
2183
+ { "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34", "direction": "ASC" }
2184
+ ]
2185
+ },
2186
+ "behavior": {
2187
+ "readOnly": false,
2188
+ "hideAddButton": false,
2189
+ "hideDeleteButton": false
2190
+ },
2191
+ "view": {
2192
+ "fields": ["id", "contact-name", "status", "amount"],
2193
+ "columnSize": { "contact-name": 240 }
2194
+ }
2195
+ }
2196
+ ],
2197
+ "crossWidgetFilter": {
2198
+ "source": {
2199
+ "widgetId": "11111111-1111-4111-a111-111111111111",
2200
+ "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
2201
+ },
2202
+ "targets": [
2203
+ {
2204
+ "widgetId": "22222222-2222-4222-a222-222222222222",
2205
+ "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
2206
+ }
2207
+ ]
2208
+ },
2209
+ "navigationTargets": [
2210
+ {
2211
+ "id": "nav-target-customer",
2212
+ "sourceWidgetId": "11111111-1111-4111-a111-111111111111",
2213
+ "targetDisplayId": "ef012345-6789-4abc-8def-0123456789ab",
2214
+ "targetVariableId": "aaaaaaaa-1111-4111-a111-111111111111",
2215
+ "label": "Open customer"
2216
+ }
2217
+ ]
2218
+ }`,
2219
+ },
2220
+ ]),
2221
+ "displays update": buildCommandExamples([
2222
+ {
2223
+ description: "Rename a display (patch of top-level metadata only).",
2224
+ command:
2225
+ 'zinkee --json displays update 0f6f062f-1478-4df2-96a1-c495d037d260 --name "Pipeline overview (renamed)"',
2226
+ raw: `{
2227
+ "name": "Pipeline overview (renamed)"
2228
+ }`,
2229
+ response: `{
2230
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260"
2231
+ }`,
2232
+ },
2233
+ ]),
2234
+ "displays delete": buildCommandExamples([
2235
+ {
2236
+ description: "Delete a display.",
2237
+ command: "zinkee --json displays delete 0f6f062f-1478-4df2-96a1-c495d037d260",
2238
+ },
2239
+ ]),
2240
+ "displays layout get": buildCommandExamples([
2241
+ {
2242
+ description: "Get the layout block of a display (template + tabs/freeformLayouts/slots).",
2243
+ command: "zinkee --json displays layout get 0f6f062f-1478-4df2-96a1-c495d037d260",
2244
+ },
2245
+ ]),
2246
+ "displays layout update": buildCommandExamples([
2247
+ {
2248
+ description: "Replace the freeform layout of a display.",
2249
+ command:
2250
+ `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}]}'`,
2251
+ },
2252
+ ]),
2253
+ "displays tabs list": buildCommandExamples([
2254
+ {
2255
+ description: "List the tabs of a display (only meaningful when the layout template uses tabs).",
2256
+ command: "zinkee --json displays tabs list 0f6f062f-1478-4df2-96a1-c495d037d260",
2257
+ },
2258
+ ]),
2259
+ "displays tabs delete": buildCommandExamples([
2260
+ {
2261
+ description: "Delete a tab by id.",
2262
+ command: "zinkee --json displays tabs delete 0f6f062f-1478-4df2-96a1-c495d037d260 tab-main",
2263
+ response: `{
2264
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
2265
+ "tabId": "tab-main"
2266
+ }`,
2267
+ },
2268
+ ]),
2269
+ "displays variables list": buildCommandExamples([
2270
+ {
2271
+ description: "List the variables of a display.",
2272
+ command: "zinkee --json displays variables list 0f6f062f-1478-4df2-96a1-c495d037d260",
2273
+ },
2274
+ ]),
2275
+ "displays variables get": buildCommandExamples([
2276
+ {
2277
+ description: "Get one variable by id.",
2278
+ command:
2279
+ "zinkee --json displays variables get 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111",
2280
+ },
2281
+ ]),
2282
+ "displays variables delete": buildCommandExamples([
2283
+ {
2284
+ description: "Delete a variable.",
2285
+ command:
2286
+ "zinkee --json displays variables delete 0f6f062f-1478-4df2-96a1-c495d037d260 aaaaaaaa-1111-4111-a111-111111111111",
2287
+ response: `{
2288
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
2289
+ "variableId": "aaaaaaaa-1111-4111-a111-111111111111"
2290
+ }`,
2291
+ },
2292
+ ]),
2293
+ "displays widgets list": buildCommandExamples([
2294
+ {
2295
+ description: "List the widgets of a display.",
2296
+ command: "zinkee --json displays widgets list 0f6f062f-1478-4df2-96a1-c495d037d260",
2297
+ },
2298
+ ]),
2299
+ "displays widgets get": buildCommandExamples([
2300
+ {
2301
+ description: "Get one widget (returns the canonical typed widget contract).",
2302
+ command:
2303
+ "zinkee --json displays widgets get 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111",
2304
+ response: `{
2305
+ "id": "11111111-1111-4111-a111-111111111111",
2306
+ "type": "TABLE_OR_SUBTABLE",
2307
+ "source": {
2308
+ "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
2309
+ "isOriginSubSchema": false
2310
+ },
2311
+ "placement": {
2312
+ "layout": { "x": 0, "y": 0, "w": 12, "h": 8 }
2313
+ },
2314
+ "presentation": {
2315
+ "name": "Customers",
2316
+ "description": "All customers",
2317
+ "icon": "users",
2318
+ "color": "blue"
2319
+ },
2320
+ "bindings": {
2321
+ "variableMap": {
2322
+ "aaaaaaaa-1111-4111-a111-111111111111": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
2323
+ }
2324
+ },
2325
+ "query": {
2326
+ "filters": [],
2327
+ "sorts": [
2328
+ { "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34", "direction": "ASC" }
2329
+ ]
2330
+ },
2331
+ "behavior": {
2332
+ "readOnly": false,
2333
+ "hideAddButton": false,
2334
+ "hideDeleteButton": false
2335
+ },
2336
+ "view": {
2337
+ "fields": ["id", "contact-name", "status", "amount"],
2338
+ "columnSize": { "contact-name": 240 }
2339
+ }
2340
+ }`,
2341
+ },
2342
+ ]),
2343
+ "displays widgets delete": buildCommandExamples([
2344
+ {
2345
+ description: "Delete a widget.",
2346
+ command:
2347
+ "zinkee --json displays widgets delete 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111",
2348
+ response: `{
2349
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
2350
+ "widgetId": "11111111-1111-4111-a111-111111111111"
2351
+ }`,
2352
+ },
2353
+ ]),
2354
+ "displays navigation-targets list": buildCommandExamples([
2355
+ {
2356
+ description: "List navigation targets for a display.",
2357
+ command: "zinkee --json displays navigation-targets list 0f6f062f-1478-4df2-96a1-c495d037d260",
2358
+ },
2359
+ ]),
2360
+ "displays navigation-targets delete": buildCommandExamples([
2361
+ {
2362
+ description: "Delete a navigation target.",
2363
+ command:
2364
+ "zinkee --json displays navigation-targets delete 0f6f062f-1478-4df2-96a1-c495d037d260 nav-target-customer",
2365
+ response: `{
2366
+ "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
2367
+ "navigationTargetId": "nav-target-customer"
2368
+ }`,
2369
+ },
2370
+ ]),
2371
+ "displays cross-widget-filter get": buildCommandExamples([
2372
+ {
2373
+ description: "Get the cross-widget filter of a display (can be null if none is set).",
2374
+ command: "zinkee --json displays cross-widget-filter get 0f6f062f-1478-4df2-96a1-c495d037d260",
2375
+ },
2376
+ ]),
2377
+ "displays cross-widget-filter delete": buildCommandExamples([
2378
+ {
2379
+ description: "Delete the cross-widget filter of a display.",
2380
+ command:
2381
+ "zinkee --json displays cross-widget-filter delete 0f6f062f-1478-4df2-96a1-c495d037d260",
2382
+ },
2383
+ ]),
2384
+ "automations list": buildCommandExamples([
2385
+ {
2386
+ description: "List automations with summaries.",
2387
+ command: "zinkee --json automations list",
2388
+ response: `[
2389
+ {
2390
+ "id": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
2391
+ "name": "Codex Trigger Demo 1774278580",
2392
+ "description": "Demo compleja no-webhook para revisar en frontend.",
2393
+ "status": "active",
2394
+ "folder": {
2395
+ "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
2396
+ "name": "Codex Frontend Demo",
2397
+ "isRoot": false
2398
+ },
2399
+ "triggerType": "record_changed",
2400
+ "actionTypes": ["create_record", "http_request", "execute_plugin", "send_message"]
2401
+ }
2402
+ ]`,
2403
+ },
2404
+ {
2405
+ description: "Filter automations by folder, status, and trigger type.",
2406
+ command:
2407
+ 'zinkee --json automations list --folder "Codex Frontend Demo" --status active --trigger-type record_changed',
2408
+ },
2409
+ ]),
2410
+ "automations get": buildCommandExamples([
2411
+ {
2412
+ description:
2413
+ "Get the full automation document, including trigger, actions and flow.",
2414
+ command: "zinkee --json automations get automation-1",
2415
+ response: `{
2416
+ "id": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
2417
+ "name": "Codex Trigger Demo 1774278580",
2418
+ "description": "Demo compleja no-webhook para revisar en frontend.",
2419
+ "status": "active",
2420
+ "folder": {
2421
+ "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
2422
+ "name": "Codex Frontend Demo",
2423
+ "isRoot": false
2424
+ },
2425
+ "trigger": {
2426
+ "type": "record_changed",
2427
+ "config": {
2428
+ "schemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
2429
+ "fieldIds": ["4dd04e57-2a01-4c49-8728-9cb288bffb8d"],
2430
+ "conditions": [
2431
+ {
2432
+ "field": "4dd04e57-2a01-4c49-8728-9cb288bffb8d",
2433
+ "comparator": "ine",
2434
+ "values": [{"rawValue": "", "source": null}]
2435
+ }
2436
+ ]
2437
+ }
2438
+ },
2439
+ "actions": [
2440
+ {
2441
+ "id": "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2",
2442
+ "type": "create_record",
2443
+ "name": "Create follow-up order",
2444
+ "config": {
2445
+ "targetSchemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
2446
+ "fieldMapping": {
2447
+ "34250412-f016-44c0-9f88-37dd1ddb4b13": {
2448
+ "rawValue": "Created by automation",
2449
+ "source": null
2450
+ }
2451
+ }
2452
+ }
2453
+ },
2454
+ {
2455
+ "id": "784d0971-bd8f-4b05-87eb-3392d1570273",
2456
+ "type": "http_request",
2457
+ "name": "Notify ERP",
2458
+ "config": {
2459
+ "method": "POST",
2460
+ "url": "https://example.com/integrations/order-status",
2461
+ "headers": {"X-Demo": "codex"},
2462
+ "body": "{\\"event\\":\\"order.status.changed\\"}",
2463
+ "contentType": "application/json",
2464
+ "timeoutMs": 5000,
2465
+ "variables": {},
2466
+ "authMode": "STORED",
2467
+ "connectionId": "4fc20b5c-9353-4991-b68e-1027cb674ed4"
2468
+ }
2469
+ },
2470
+ {
2471
+ "id": "dae13307-057f-4c39-817c-4d2dd5898421",
2472
+ "type": "execute_plugin",
2473
+ "name": "Run billing plugin",
2474
+ "config": {
2475
+ "pluginId": "demo-plugin",
2476
+ "pluginArgs": {
2477
+ "mode": "safe"
2478
+ }
2479
+ }
2480
+ }
2481
+ ],
2482
+ "flow": {
2483
+ "entryActionIds": ["a657c49a-8ca1-4ec1-af86-d0dac4fc49b2"],
2484
+ "transitions": [
2485
+ {
2486
+ "fromActionId": "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2",
2487
+ "toActionId": "784d0971-bd8f-4b05-87eb-3392d1570273"
2488
+ },
2489
+ {
2490
+ "fromActionId": "784d0971-bd8f-4b05-87eb-3392d1570273",
2491
+ "toActionId": "dae13307-057f-4c39-817c-4d2dd5898421"
2492
+ }
2493
+ ]
2494
+ }
2495
+ }`,
2496
+ },
2497
+ ]),
2498
+ "automations delete": buildCommandExamples([
2499
+ {
2500
+ description: "Delete an automation. The response mirrors the mutation shape.",
2501
+ command: "zinkee --json automations delete automation-1",
2502
+ response: `{
2503
+ "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
2504
+ "webhookEndpoint": null
2505
+ }`,
2506
+ },
2507
+ ]),
2508
+ "automations activate": buildCommandExamples([
2509
+ {
2510
+ description: "Activate an automation (transitions it to status=active).",
2511
+ command: "zinkee --json automations activate automation-1",
2512
+ response: `{
2513
+ "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
2514
+ "webhookEndpoint": null
2515
+ }`,
2516
+ },
2517
+ ]),
2518
+ "automations deactivate": buildCommandExamples([
2519
+ {
2520
+ description: "Deactivate an automation (transitions it to status=inactive).",
2521
+ command: "zinkee --json automations deactivate automation-1",
2522
+ response: `{
2523
+ "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
2524
+ "webhookEndpoint": null
2525
+ }`,
2526
+ },
2527
+ ]),
2528
+ "automations folders list": buildCommandExamples([
2529
+ {
2530
+ description: "List flat automation folders (non-root plus the root bucket).",
2531
+ command: "zinkee --json automations folders list",
2532
+ response: `[
2533
+ {
2534
+ "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
2535
+ "name": "Codex Frontend Demo",
2536
+ "isRoot": false,
2537
+ "automationCount": 2
2538
+ },
2539
+ {
2540
+ "id": "8b22282b-3db3-4dd7-87f7-b29365dcf3f6",
2541
+ "name": null,
2542
+ "isRoot": true,
2543
+ "automationCount": 3
2544
+ }
2545
+ ]`,
2546
+ },
2547
+ ]),
2548
+ "automations folders delete": buildCommandExamples([
2549
+ {
2550
+ description: "Delete a non-root automation folder by exact name.",
2551
+ command: 'zinkee --json automations folders delete "Codex Frontend Demo"',
2552
+ response: `{
2553
+ "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
2554
+ "name": "Codex Frontend Demo",
2555
+ "isRoot": false,
2556
+ "automationCount": 0
2557
+ }`,
2558
+ },
2559
+ ]),
2560
+ "automations trigger get": buildCommandExamples([
2561
+ {
2562
+ description:
2563
+ "Get the trigger subresource. Response shape depends on trigger type; here the scheduled variant.",
2564
+ command: "zinkee --json automations trigger get automation-1",
2565
+ response: `{
2566
+ "type": "scheduled",
2567
+ "config": {
2568
+ "cronExpression": "0 15 10 * * 1"
2569
+ }
2570
+ }`,
2571
+ },
2572
+ ]),
2573
+ "automations webhook get": buildCommandExamples([
2574
+ {
2575
+ description:
2576
+ "Get the webhook endpoint companion resource (only exists when the trigger is a webhook).",
2577
+ command: "zinkee --json automations webhook get automation-1",
2578
+ response: `{
2579
+ "endpointId": "b3cb4283-97ab-4d94-9e6f-82d0ee5cee24",
2580
+ "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
2581
+ "endpointUrl": "https://hooks.zinkee.com/webhooks/b3cb4283-97ab-4d94-9e6f-82d0ee5cee24",
2582
+ "active": true,
2583
+ "idempotencyKeyJsonPath": "$.id",
2584
+ "eventTypeJsonPath": "$.type",
2585
+ "allowedEventTypes": ["frontend.demo.created"],
2586
+ "fieldMappings": [
2587
+ {
2588
+ "variable": "external_id",
2589
+ "jsonPath": "$.data.id"
2590
+ }
2591
+ ]
2592
+ }`,
2593
+ },
2594
+ ]),
2595
+ "automations webhook delete": buildCommandExamples([
2596
+ {
2597
+ description: "Delete the webhook endpoint companion resource (returns no body).",
2598
+ command: "zinkee --json automations webhook delete automation-1",
2599
+ },
2600
+ ]),
2601
+ "automations actions list": buildCommandExamples([
2602
+ {
2603
+ description: "List the ordered actions of an automation.",
2604
+ command: "zinkee --json automations actions list automation-1",
2605
+ response: `[
2606
+ {
2607
+ "id": "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2",
2608
+ "type": "create_record",
2609
+ "name": "Create follow-up order",
2610
+ "config": {
2611
+ "targetSchemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
2612
+ "fieldMapping": {
2613
+ "34250412-f016-44c0-9f88-37dd1ddb4b13": {
2614
+ "rawValue": "Created by automation",
2615
+ "source": null
2616
+ }
2617
+ }
2618
+ }
2619
+ },
2620
+ {
2621
+ "id": "784d0971-bd8f-4b05-87eb-3392d1570273",
2622
+ "type": "http_request",
2623
+ "name": "Notify ERP",
2624
+ "config": {
2625
+ "method": "POST",
2626
+ "url": "https://example.com/integrations/order-status",
2627
+ "headers": {"X-Demo": "codex"},
2628
+ "body": "{\\"event\\":\\"order.status.changed\\"}",
2629
+ "contentType": "application/json",
2630
+ "timeoutMs": 5000,
2631
+ "variables": {},
2632
+ "authMode": "STORED",
2633
+ "connectionId": "4fc20b5c-9353-4991-b68e-1027cb674ed4"
2634
+ }
2635
+ },
2636
+ {
2637
+ "id": "dae13307-057f-4c39-817c-4d2dd5898421",
2638
+ "type": "execute_plugin",
2639
+ "name": "Run billing plugin",
2640
+ "config": {
2641
+ "pluginId": "demo-plugin",
2642
+ "pluginArgs": {"mode": "safe"}
2643
+ }
2644
+ }
2645
+ ]`,
2646
+ },
2647
+ ]),
2648
+ "automations actions delete": buildCommandExamples([
2649
+ {
2650
+ description: "Delete one action from an automation.",
2651
+ command: "zinkee --json automations actions delete automation-1 action-1",
2652
+ response: `{
2653
+ "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
2654
+ "webhookEndpoint": null
2655
+ }`,
2656
+ },
2657
+ ]),
2658
+ "automations flow get": buildCommandExamples([
2659
+ {
2660
+ description: "Get the flow subresource (entry actions and transitions).",
2661
+ command: "zinkee --json automations flow get automation-1",
2662
+ response: `{
2663
+ "entryActionIds": ["a657c49a-8ca1-4ec1-af86-d0dac4fc49b2"],
2664
+ "transitions": [
2665
+ {
2666
+ "fromActionId": "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2",
2667
+ "toActionId": "784d0971-bd8f-4b05-87eb-3392d1570273"
2668
+ },
2669
+ {
2670
+ "fromActionId": "784d0971-bd8f-4b05-87eb-3392d1570273",
2671
+ "toActionId": "dae13307-057f-4c39-817c-4d2dd5898421"
2672
+ }
2673
+ ]
2674
+ }`,
2675
+ },
2676
+ ]),
2677
+ "automations plugins list": buildCommandExamples([
2678
+ {
2679
+ description: "List active workspace plugins available for execute_plugin actions.",
2680
+ command: "zinkee --json automations plugins list",
2681
+ response: `[
2682
+ {
2683
+ "id": "demo-plugin",
2684
+ "name": "Demo Plugin",
2685
+ "active": true,
2686
+ "description": "Example plugin for automations",
2687
+ "properties": {
2688
+ "version": "1.0"
2689
+ }
2690
+ }
2691
+ ]`,
50
2692
  },
51
2693
  ]),
52
- "files download": buildCommandExamples([
2694
+ "automations plugins get": buildCommandExamples([
53
2695
  {
54
- description: "Download a file to disk in JSON mode",
55
- command: `zinkee --json files download ${SAMPLE_UUID} --output ./download.bin`,
2696
+ description: "Get one plugin by id.",
2697
+ command: "zinkee --json automations plugins get demo-plugin",
2698
+ response: `{
2699
+ "id": "demo-plugin",
2700
+ "name": "Demo Plugin",
2701
+ "active": true,
2702
+ "description": "Example plugin for automations",
2703
+ "properties": {
2704
+ "version": "1.0"
2705
+ }
2706
+ }`,
56
2707
  },
57
2708
  ]),
58
- "navigation resources move": buildCommandExamples([
2709
+ "automations connections list": buildCommandExamples([
59
2710
  {
60
- description: "Move a resource into a navigation folder by exact folder name",
61
- command: `zinkee --json navigation resources move ${SAMPLE_UUID} --type schema --to Finance`,
2711
+ description: "List stored workspace connections (secrets are never returned).",
2712
+ command: "zinkee --json automations connections list",
2713
+ response: `[
2714
+ {
2715
+ "id": "4fc20b5c-9353-4991-b68e-1027cb674ed4",
2716
+ "name": "ERP API Key",
2717
+ "type": "api_key",
2718
+ "scope": "workspace",
2719
+ "active": true,
2720
+ "config": {
2721
+ "headerName": "Authorization"
2722
+ }
2723
+ }
2724
+ ]`,
62
2725
  },
63
2726
  ]),
64
- "teamspace resources publish": buildCommandExamples([
2727
+ "automations connections get": buildCommandExamples([
65
2728
  {
66
- description: "Publish a resource into a teamspace folder",
67
- command: `zinkee --json teamspace resources publish ${SAMPLE_UUID} --to "Customer Success"`,
2729
+ description: "Get one stored connection by id.",
2730
+ command: "zinkee --json automations connections get connection-1",
2731
+ response: `{
2732
+ "id": "4fc20b5c-9353-4991-b68e-1027cb674ed4",
2733
+ "name": "ERP API Key",
2734
+ "type": "api_key",
2735
+ "scope": "workspace",
2736
+ "ownerMemberId": "6c8a3e0d-7b1f-4c98-a2e9-8b9a2e3f5b14",
2737
+ "active": true,
2738
+ "config": {
2739
+ "headerName": "Authorization"
2740
+ },
2741
+ "createdAt": "2026-04-21T09:00:00Z",
2742
+ "updatedAt": "2026-04-21T09:00:00Z",
2743
+ "createdBy": "developer@zinkee.com",
2744
+ "updatedBy": "developer@zinkee.com"
2745
+ }`,
68
2746
  },
69
2747
  ]),
70
- "displays widgets create": buildCommandExamples([
2748
+ "automations connections delete": buildCommandExamples([
71
2749
  {
72
- description: "Create a chart widget through the generic --type path",
73
- command: 'zinkee --json displays widgets create display-1 --type chart --name "Revenue" --chart-type bar',
2750
+ description: "Delete one stored connection (returns no body).",
2751
+ command: "zinkee --json automations connections delete connection-1",
74
2752
  },
75
2753
  ]),
76
2754
  "automations create": buildCommandExamples([
77
2755
  {
78
2756
  description:
79
- "Create a scheduled automation with a six-field cron expression. This is the safest first example because it does not depend on workspace schemas.",
80
- command: 'zinkee --json automations create --name "Nightly invoice sync" --trigger-type scheduled --cron "0 15 10 * * 1"',
2757
+ "Create a scheduled automation with description and target folder. Safe first example because it does not depend on workspace schemas.",
2758
+ command:
2759
+ '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"',
81
2760
  raw: `{
82
2761
  "name": "Nightly invoice sync",
2762
+ "description": "Runs every Monday morning",
2763
+ "folderId": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
83
2764
  "trigger": {
84
2765
  "type": "scheduled",
85
2766
  "config": {
86
2767
  "cronExpression": "0 15 10 * * 1"
87
2768
  }
88
2769
  }
2770
+ }`,
2771
+ response: `{
2772
+ "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
2773
+ "webhookEndpoint": null
89
2774
  }`,
90
2775
  },
91
2776
  {
92
2777
  description:
93
- "Create a record-created automation using a real schema slug or UUID. Replace 'leads' with a schema from 'zinkee --json schemas list'.",
94
- command: 'zinkee --json automations create --name "Lead welcome" --trigger-type record_created --trigger-schema leads',
2778
+ "Create a record-created automation with an 'is not empty' condition. Replace 'leads' and 'status' with real schema/field slugs or UUIDs.",
2779
+ command:
2780
+ `zinkee --json automations create --name "Lead welcome" --trigger-type record_created --trigger-schema leads --condition-json '{"field":"status","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
95
2781
  raw: `{
96
2782
  "name": "Lead welcome",
97
2783
  "trigger": {
98
2784
  "type": "record_created",
99
2785
  "config": {
100
- "schemaId": "leads"
2786
+ "schemaId": "leads",
2787
+ "conditions": [
2788
+ {
2789
+ "field": "status",
2790
+ "comparator": "ine",
2791
+ "values": [{"rawValue": "", "source": null}]
2792
+ }
2793
+ ]
101
2794
  }
102
2795
  }
103
2796
  }`,
104
2797
  },
105
2798
  {
106
2799
  description:
107
- "Create a record-changed automation using real schema and field slugs or UUIDs. Replace 'orders' and 'status' with values from your workspace.",
108
- command: 'zinkee --json automations create --name "Order status sync" --trigger-type record_changed --trigger-schema orders --trigger-field status',
2800
+ "Create a record-changed automation watching a single field, with an 'is not empty' condition. Replace 'orders' and 'status' with values from your workspace.",
2801
+ command:
2802
+ `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}]}'`,
109
2803
  raw: `{
110
2804
  "name": "Order status sync",
111
2805
  "trigger": {
112
2806
  "type": "record_changed",
113
2807
  "config": {
114
2808
  "schemaId": "orders",
115
- "fieldIds": ["status"]
2809
+ "fieldIds": ["status"],
2810
+ "conditions": [
2811
+ {
2812
+ "field": "status",
2813
+ "comparator": "ine",
2814
+ "values": [{"rawValue": "", "source": null}]
2815
+ }
2816
+ ]
116
2817
  }
117
2818
  }
118
2819
  }`,
@@ -120,32 +2821,63 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
120
2821
  ]),
121
2822
  "automations update": buildCommandExamples([
122
2823
  {
123
- description: "Patch automation metadata using the backend set/unset contract",
2824
+ description:
2825
+ "Update automation description and move it to a folder. Supported patch paths: name, description, folderId.",
124
2826
  command:
125
- 'zinkee --json automations update automation-1 --raw \'{"set":{"description":"Updated by CLI docs"},"unset":["folderId"]}\'',
2827
+ 'zinkee --json automations update automation-1 --description "Updated by an agent" --folder cdfc14e3-3169-4ffb-8d9b-b11858a9240f',
126
2828
  raw: `{
127
2829
  "set": {
128
- "description": "Updated by CLI docs"
129
- },
2830
+ "description": "Updated by an agent",
2831
+ "folderId": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f"
2832
+ }
2833
+ }`,
2834
+ },
2835
+ {
2836
+ description:
2837
+ "Clear the folder assignment by combining an explicit unset through the raw payload.",
2838
+ command:
2839
+ 'zinkee --json automations update automation-1 --raw \'{"unset":["folderId"]}\'',
2840
+ raw: `{
130
2841
  "unset": ["folderId"]
131
2842
  }`,
132
2843
  },
133
2844
  ]),
134
2845
  "automations trigger set": buildCommandExamples([
135
2846
  {
136
- description: "Replace the trigger with a scheduled trigger",
137
- command: 'zinkee --json automations trigger set automation-1 --trigger-type scheduled --cron "0 0 9 * * *"',
2847
+ description: "Replace the trigger with a scheduled (cron) trigger.",
2848
+ command:
2849
+ 'zinkee --json automations trigger set automation-1 --trigger-type scheduled --cron "0 15 10 * * 1"',
138
2850
  raw: `{
139
2851
  "type": "scheduled",
140
2852
  "config": {
141
- "cronExpression": "0 0 9 * * *"
2853
+ "cronExpression": "0 15 10 * * 1"
2854
+ }
2855
+ }`,
2856
+ },
2857
+ {
2858
+ description:
2859
+ "Replace the trigger with a record-created trigger plus an 'is not empty' condition. Agents should provide at least one meaningful condition.",
2860
+ command:
2861
+ `zinkee --json automations trigger set automation-1 --trigger-type record_created --trigger-schema orders --condition-json '{"field":"status","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
2862
+ raw: `{
2863
+ "type": "record_created",
2864
+ "config": {
2865
+ "schemaId": "orders",
2866
+ "conditions": [
2867
+ {
2868
+ "field": "status",
2869
+ "comparator": "ine",
2870
+ "values": [{"rawValue": "", "source": null}]
2871
+ }
2872
+ ]
142
2873
  }
143
2874
  }`,
144
2875
  },
145
2876
  {
146
- description: "Replace the trigger with a record-changed trigger and a literal condition",
2877
+ description:
2878
+ "Replace the trigger with a record-changed trigger watching one field, with an 'is not empty' condition on that field.",
147
2879
  command:
148
- 'zinkee --json automations trigger set automation-1 --trigger-type record_changed --trigger-schema orders --trigger-field status --condition status:eq:approved',
2880
+ `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}]}'`,
149
2881
  raw: `{
150
2882
  "type": "record_changed",
151
2883
  "config": {
@@ -154,38 +2886,34 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
154
2886
  "conditions": [
155
2887
  {
156
2888
  "field": "status",
157
- "comparator": "eq",
158
- "values": [
159
- {
160
- "rawValue": "approved",
161
- "source": null
162
- }
163
- ]
2889
+ "comparator": "ine",
2890
+ "values": [{"rawValue": "", "source": null}]
164
2891
  }
165
2892
  ]
166
2893
  }
167
2894
  }`,
168
2895
  },
169
2896
  {
170
- description: "Replace the trigger with a webhook trigger using an existing webhook endpoint id",
2897
+ description: "Replace the trigger with a webhook trigger that reuses an existing webhook endpoint id.",
171
2898
  command:
172
- 'zinkee --json automations trigger set automation-1 --trigger-type webhook --webhook-endpoint-id 550e8400-e29b-41d4-a716-446655440001',
2899
+ "zinkee --json automations trigger set automation-1 --trigger-type webhook --webhook-endpoint-id b3cb4283-97ab-4d94-9e6f-82d0ee5cee24",
173
2900
  raw: `{
174
2901
  "type": "webhook",
175
2902
  "config": {
176
- "webhookEndpointId": "550e8400-e29b-41d4-a716-446655440001"
2903
+ "webhookEndpointId": "b3cb4283-97ab-4d94-9e6f-82d0ee5cee24"
177
2904
  }
178
2905
  }`,
179
2906
  },
180
2907
  ]),
181
2908
  "automations actions add": buildCommandExamples([
182
2909
  {
183
- description: "Add a create-record action with literal and trigger-based field mappings",
2910
+ description:
2911
+ "Add a create-record action with two literal field mappings. Populate visible fieldMapping entries so the frontend form is complete.",
184
2912
  command:
185
- 'zinkee --json automations actions add automation-1 --type create_record --name "Create follow-up" --target-schema followups --map status=pending --map-json owner=\'{"rawValue":null,"source":{"type":"TRIGGER","id":"payload_value"}}\'',
2913
+ '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"',
186
2914
  raw: `{
187
2915
  "type": "create_record",
188
- "name": "Create follow-up",
2916
+ "name": "Create follow-up order",
189
2917
  "config": {
190
2918
  "targetSchemaId": "followups",
191
2919
  "fieldMapping": {
@@ -193,21 +2921,51 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
193
2921
  "rawValue": "pending",
194
2922
  "source": null
195
2923
  },
196
- "owner": {
197
- "rawValue": null,
198
- "source": {
199
- "type": "TRIGGER",
200
- "id": "payload_value"
201
- }
2924
+ "description": {
2925
+ "rawValue": "Created by automation",
2926
+ "source": null
202
2927
  }
203
2928
  }
204
2929
  }
205
2930
  }`,
206
2931
  },
207
2932
  {
208
- description: "Add a search-records action with a trigger-based condition",
2933
+ description:
2934
+ "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.",
2935
+ command:
2936
+ 'zinkee --json automations actions add automation-1 --type update_record --name "Mark order as processed" --target-schema orders --use-trigger-record --map status=processed',
2937
+ raw: `{
2938
+ "type": "update_record",
2939
+ "name": "Mark order as processed",
2940
+ "config": {
2941
+ "targetSchemaId": "orders",
2942
+ "fieldMapping": {
2943
+ "status": {
2944
+ "rawValue": "processed",
2945
+ "source": null
2946
+ }
2947
+ },
2948
+ "useTriggerRecord": true
2949
+ }
2950
+ }`,
2951
+ },
2952
+ {
2953
+ description: "Add a search-records action scoped to a target schema.",
2954
+ command:
2955
+ 'zinkee --json automations actions add automation-1 --type search_records --name "Find related invoices" --target-schema orders',
2956
+ raw: `{
2957
+ "type": "search_records",
2958
+ "name": "Find related invoices",
2959
+ "config": {
2960
+ "targetSchemaId": "orders"
2961
+ }
2962
+ }`,
2963
+ },
2964
+ {
2965
+ description:
2966
+ "Add a search-records action whose condition pulls its value from the trigger payload using --condition-json.",
209
2967
  command:
210
- '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":"payload_value"}}]}\'',
2968
+ `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":"payload_value"}}]}'`,
211
2969
  raw: `{
212
2970
  "type": "search_records",
213
2971
  "name": "Find duplicates",
@@ -232,34 +2990,39 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
232
2990
  }`,
233
2991
  },
234
2992
  {
235
- description: "Add an HTTP request action through the generic --type path",
2993
+ description:
2994
+ "Add an HTTP request action using a stored workspace connection for authentication.",
236
2995
  command:
237
- 'zinkee --json automations actions add automation-1 --type http_request --name Notify --method POST --url https://example.com/hook --content-type application/json',
2996
+ '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',
238
2997
  raw: `{
239
2998
  "type": "http_request",
240
- "name": "Notify",
2999
+ "name": "Notify external ERP",
241
3000
  "config": {
242
3001
  "method": "POST",
243
- "url": "https://example.com/hook",
244
- "contentType": "application/json"
3002
+ "url": "https://example.com/integrations/order-status",
3003
+ "headers": {
3004
+ "X-Demo": "codex"
3005
+ },
3006
+ "contentType": "application/json",
3007
+ "timeoutMs": 5000,
3008
+ "authMode": "STORED",
3009
+ "connectionId": "connection-1"
245
3010
  }
246
3011
  }`,
247
3012
  },
248
3013
  {
249
3014
  description:
250
- "Add an execute-plugin action with structured plugin arguments. Replace 'clone-budget' with an active id from 'zinkee --json automations plugins list'.",
3015
+ "Add an execute-plugin action with structured plugin arguments. Replace 'demo-plugin' with an active id from 'zinkee --json automations plugins list'.",
251
3016
  command:
252
- 'zinkee --json automations actions add automation-1 --type execute_plugin --name "Run plugin" --plugin clone-budget --arg mode=safe --arg-json payload=\'{"dryRun":true}\'',
3017
+ `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"]'`,
253
3018
  raw: `{
254
3019
  "type": "execute_plugin",
255
- "name": "Run plugin",
3020
+ "name": "Run billing plugin",
256
3021
  "config": {
257
- "pluginId": "clone-budget",
3022
+ "pluginId": "demo-plugin",
258
3023
  "pluginArgs": {
259
3024
  "mode": "safe",
260
- "payload": {
261
- "dryRun": true
262
- }
3025
+ "steps": ["one", "two"]
263
3026
  }
264
3027
  }
265
3028
  }`,
@@ -267,7 +3030,8 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
267
3030
  ]),
268
3031
  "automations actions update": buildCommandExamples([
269
3032
  {
270
- description: "Update a record action using the trigger record without sending conditions",
3033
+ description:
3034
+ "Replace an update-record action so it targets the trigger record. Conditions are stripped automatically when --use-trigger-record is provided.",
271
3035
  command:
272
3036
  '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',
273
3037
  raw: `{
@@ -283,19 +3047,57 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
283
3047
  },
284
3048
  "useTriggerRecord": true
285
3049
  }
3050
+ }`,
3051
+ response: `{
3052
+ "id": "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2",
3053
+ "type": "create_record",
3054
+ "name": "Create follow-up order",
3055
+ "config": {
3056
+ "targetSchemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
3057
+ "fieldMapping": {
3058
+ "34250412-f016-44c0-9f88-37dd1ddb4b13": {
3059
+ "rawValue": "Updated by an agent",
3060
+ "source": null
3061
+ }
3062
+ }
3063
+ }
3064
+ }`,
3065
+ },
3066
+ {
3067
+ description:
3068
+ "Replace an HTTP request action, keeping it authenticated through a stored connection.",
3069
+ command:
3070
+ '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',
3071
+ raw: `{
3072
+ "type": "http_request",
3073
+ "name": "Notify external ERP",
3074
+ "config": {
3075
+ "method": "POST",
3076
+ "url": "https://example.com/integrations/order-status",
3077
+ "contentType": "application/json",
3078
+ "timeoutMs": 5000,
3079
+ "authMode": "STORED",
3080
+ "connectionId": "connection-1"
3081
+ }
286
3082
  }`,
287
3083
  },
288
3084
  ]),
289
3085
  "automations flow set": buildCommandExamples([
290
3086
  {
291
- description: "Set flow entry actions and transitions",
292
- command: 'zinkee --json automations flow set automation-1 --entry action-1 --transition action-1:action-2',
3087
+ description:
3088
+ "Set one entry action and chain two transitions (action-1 → action-2 → action-3).",
3089
+ command:
3090
+ "zinkee --json automations flow set automation-1 --entry action-1 --transition action-1:action-2 --transition action-2:action-3",
293
3091
  raw: `{
294
3092
  "entryActionIds": ["action-1"],
295
3093
  "transitions": [
296
3094
  {
297
3095
  "fromActionId": "action-1",
298
3096
  "toActionId": "action-2"
3097
+ },
3098
+ {
3099
+ "fromActionId": "action-2",
3100
+ "toActionId": "action-3"
299
3101
  }
300
3102
  ]
301
3103
  }`,
@@ -304,9 +3106,9 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
304
3106
  "automations webhook set": buildCommandExamples([
305
3107
  {
306
3108
  description:
307
- "Configure webhook ingestion paths and field mappings for a webhook automation. This config is separate from the webhook trigger itself.",
3109
+ "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.",
308
3110
  command:
309
- 'zinkee --json automations webhook set automation-1 --active --idempotency-key-path "$.id" --event-type-path "$.type" --allowed-event-type frontend.demo.created --field-mapping \'{"variable":"external_id","jsonPath":"$.data.id"}\'',
3111
+ `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`,
310
3112
  raw: `{
311
3113
  "active": true,
312
3114
  "idempotencyKeyJsonPath": "$.id",
@@ -318,14 +3120,30 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
318
3120
  "jsonPath": "$.data.id"
319
3121
  }
320
3122
  ]
3123
+ }`,
3124
+ response: `{
3125
+ "endpointId": "b3cb4283-97ab-4d94-9e6f-82d0ee5cee24",
3126
+ "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
3127
+ "endpointUrl": "https://hooks.zinkee.com/webhooks/b3cb4283-97ab-4d94-9e6f-82d0ee5cee24",
3128
+ "active": true,
3129
+ "idempotencyKeyJsonPath": "$.id",
3130
+ "eventTypeJsonPath": "$.type",
3131
+ "allowedEventTypes": ["frontend.demo.created"],
3132
+ "fieldMappings": [
3133
+ {
3134
+ "variable": "external_id",
3135
+ "jsonPath": "$.data.id"
3136
+ }
3137
+ ]
321
3138
  }`,
322
3139
  },
323
3140
  ]),
324
3141
  "automations connections create": buildCommandExamples([
325
3142
  {
326
- description: "Create a stored workspace connection for HTTP request actions",
3143
+ description:
3144
+ "Create a stored workspace connection for http_request actions. Secret values are write-only and never returned on read.",
327
3145
  command:
328
- 'zinkee --json automations connections create --name "ERP API Key" --type api_key --scope workspace --config \'{"headerName":"Authorization"}\' --secret apiKey=super-secret --active',
3146
+ `zinkee --json automations connections create --name "ERP API Key" --type api_key --scope workspace --config '{"headerName":"Authorization"}' --secret apiKey=super-secret --active`,
329
3147
  raw: `{
330
3148
  "name": "ERP API Key",
331
3149
  "type": "api_key",
@@ -337,14 +3155,30 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
337
3155
  "apiKey": "super-secret"
338
3156
  },
339
3157
  "active": true
3158
+ }`,
3159
+ response: `{
3160
+ "id": "4fc20b5c-9353-4991-b68e-1027cb674ed4",
3161
+ "name": "ERP API Key",
3162
+ "type": "api_key",
3163
+ "scope": "workspace",
3164
+ "ownerMemberId": "6c8a3e0d-7b1f-4c98-a2e9-8b9a2e3f5b14",
3165
+ "active": true,
3166
+ "config": {
3167
+ "headerName": "Authorization"
3168
+ },
3169
+ "createdAt": "2026-04-21T09:00:00Z",
3170
+ "updatedAt": "2026-04-21T09:00:00Z",
3171
+ "createdBy": "developer@zinkee.com",
3172
+ "updatedBy": "developer@zinkee.com"
340
3173
  }`,
341
3174
  },
342
3175
  ]),
343
3176
  "automations connections update": buildCommandExamples([
344
3177
  {
345
- description: "Patch an existing stored connection",
3178
+ description:
3179
+ "Patch an existing stored connection. Use set.secret only when rotating secrets.",
346
3180
  command:
347
- 'zinkee --json automations connections update connection-1 --raw \'{"set":{"name":"ERP API Key Updated","config":{"headerName":"Authorization"}}}\'',
3181
+ `zinkee --json automations connections update connection-1 --raw '{"set":{"name":"ERP API Key Updated","config":{"headerName":"Authorization"}}}'`,
348
3182
  raw: `{
349
3183
  "set": {
350
3184
  "name": "ERP API Key Updated",
@@ -352,6 +3186,66 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
352
3186
  "headerName": "Authorization"
353
3187
  }
354
3188
  }
3189
+ }`,
3190
+ response: `{
3191
+ "id": "4fc20b5c-9353-4991-b68e-1027cb674ed4",
3192
+ "name": "ERP API Key Updated",
3193
+ "type": "api_key",
3194
+ "scope": "workspace",
3195
+ "ownerMemberId": "6c8a3e0d-7b1f-4c98-a2e9-8b9a2e3f5b14",
3196
+ "active": true,
3197
+ "config": {
3198
+ "headerName": "Authorization"
3199
+ },
3200
+ "createdAt": "2026-04-21T09:00:00Z",
3201
+ "updatedAt": "2026-04-21T10:15:00Z",
3202
+ "createdBy": "developer@zinkee.com",
3203
+ "updatedBy": "developer@zinkee.com"
3204
+ }`,
3205
+ },
3206
+ ]),
3207
+ "automations folders create": buildCommandExamples([
3208
+ {
3209
+ description: "Create one flat automation folder.",
3210
+ command: 'zinkee --json automations folders create --name "Codex Frontend Demo"',
3211
+ raw: `{
3212
+ "name": "Codex Frontend Demo"
3213
+ }`,
3214
+ response: `{
3215
+ "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
3216
+ "name": "Codex Frontend Demo",
3217
+ "isRoot": false,
3218
+ "automationCount": 0
3219
+ }`,
3220
+ },
3221
+ ]),
3222
+ "automations folders update": buildCommandExamples([
3223
+ {
3224
+ description: "Rename a non-root automation folder. The folder argument accepts a UUID or an exact name.",
3225
+ command:
3226
+ 'zinkee --json automations folders update "Codex Frontend Demo" --name "Codex Frontend Demo Updated"',
3227
+ raw: `{
3228
+ "name": "Codex Frontend Demo Updated"
3229
+ }`,
3230
+ response: `{
3231
+ "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
3232
+ "name": "Codex Frontend Demo Updated",
3233
+ "isRoot": false,
3234
+ "automationCount": 2
3235
+ }`,
3236
+ },
3237
+ ]),
3238
+ "automations folders move": buildCommandExamples([
3239
+ {
3240
+ description: "Move one automation into a target folder by exact folder name.",
3241
+ command: 'zinkee --json automations folders move automation-1 --to "Codex Frontend Demo"',
3242
+ raw: `{
3243
+ "automationId": "automation-1"
3244
+ }`,
3245
+ response: `{
3246
+ "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
3247
+ "name": "Codex Frontend Demo",
3248
+ "isRoot": false
355
3249
  }`,
356
3250
  },
357
3251
  ]),
@@ -359,34 +3253,6 @@ const specificExamples: Record<string, readonly CommandExample[]> = {
359
3253
 
360
3254
  function fallbackExamples(commandName: string): readonly CommandExample[] {
361
3255
  switch (commandName) {
362
- case "profiles list":
363
- return [{ description: "List configured profiles", command: "zinkee profiles list" }];
364
- case "profiles get":
365
- return [{ description: "Show a profile", command: "zinkee profiles get prod" }];
366
- case "profiles add":
367
- return [{ description: "Add a profile", command: 'zinkee profiles add local --api-key token --base-url http://localhost:8088' }];
368
- case "config validate":
369
- return [{ description: "Validate config", command: "zinkee --json config validate" }];
370
- case "schemas list":
371
- return [{ description: "List schemas", command: "zinkee --json schemas list" }];
372
- case "schemas create":
373
- return [{ description: "Create a schema", command: 'zinkee --json schemas create --name Contacts --slug contacts --auditable --commentable' }];
374
- case "comments create":
375
- return [{ description: "Create a text comment", command: `zinkee --json comments create contacts ${SAMPLE_UUID} --text "Hello world"` }];
376
- case "navigation folders create":
377
- return [{ description: "Create a navigation folder", command: 'zinkee --json navigation folders create --name Finance --order 10' }];
378
- case "teamspace folders list":
379
- return [{ description: "List teamspace folders with resources", command: "zinkee --json teamspace folders list --include-resources" }];
380
- case "displays create":
381
- return [
382
- { description: "Create a display", command: 'zinkee --json displays create --name Pipeline --template widget_row_tabs' },
383
- {
384
- description: "Create a freeform display with responsive layout data",
385
- command: 'zinkee --json displays create --name "Control Proyecto Freeform" --template freeform --freeform-layouts \'{"lg":[{"i":"widget-1","x":0,"y":0,"w":6,"h":5}]}\'',
386
- },
387
- ];
388
- case "automations list":
389
- return [{ description: "List automations", command: "zinkee --json automations list" }];
390
3256
  default:
391
3257
  return [];
392
3258
  }
@@ -594,33 +3460,51 @@ async function buildDynamicAutomationExamples(
594
3460
  "cronExpression": "0 15 10 * * 1"
595
3461
  }
596
3462
  }
3463
+ }`,
3464
+ response: `{
3465
+ "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
3466
+ "webhookEndpoint": null
597
3467
  }`,
598
3468
  },
599
3469
  {
600
3470
  description:
601
- `Create a record-created automation using a real schema reference from this workspace (${schemaField.schemaRef}).`,
602
- command: `zinkee --json automations create --name "Record created demo" --trigger-type record_created --trigger-schema ${schemaField.schemaRef}`,
3471
+ `Create a record-created automation using a real schema reference from this workspace (${schemaField.schemaRef}), with an 'is not empty' condition on ${schemaField.fieldRef}.`,
3472
+ command: `zinkee --json automations create --name "Record created demo" --trigger-type record_created --trigger-schema ${schemaField.schemaRef} --condition-json '{"field":"${schemaField.fieldRef}","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
603
3473
  raw: `{
604
3474
  "name": "Record created demo",
605
3475
  "trigger": {
606
3476
  "type": "record_created",
607
3477
  "config": {
608
- "schemaId": "${schemaField.schemaRef}"
3478
+ "schemaId": "${schemaField.schemaRef}",
3479
+ "conditions": [
3480
+ {
3481
+ "field": "${schemaField.fieldRef}",
3482
+ "comparator": "ine",
3483
+ "values": [{"rawValue": "", "source": null}]
3484
+ }
3485
+ ]
609
3486
  }
610
3487
  }
611
3488
  }`,
612
3489
  },
613
3490
  {
614
3491
  description:
615
- `Create a record-changed automation using a real schema and field reference from this workspace (${schemaField.schemaRef} / ${schemaField.fieldRef}).`,
616
- command: `zinkee --json automations create --name "Record changed demo" --trigger-type record_changed --trigger-schema ${schemaField.schemaRef} --trigger-field ${schemaField.fieldRef}`,
3492
+ `Create a record-changed automation watching ${schemaField.fieldRef} on ${schemaField.schemaRef}, with an 'is not empty' condition on that field.`,
3493
+ command: `zinkee --json automations create --name "Record changed demo" --trigger-type record_changed --trigger-schema ${schemaField.schemaRef} --trigger-field ${schemaField.fieldRef} --condition-json '{"field":"${schemaField.fieldRef}","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
617
3494
  raw: `{
618
3495
  "name": "Record changed demo",
619
3496
  "trigger": {
620
3497
  "type": "record_changed",
621
3498
  "config": {
622
3499
  "schemaId": "${schemaField.schemaRef}",
623
- "fieldIds": ["${schemaField.fieldRef}"]
3500
+ "fieldIds": ["${schemaField.fieldRef}"],
3501
+ "conditions": [
3502
+ {
3503
+ "field": "${schemaField.fieldRef}",
3504
+ "comparator": "ine",
3505
+ "values": [{"rawValue": "", "source": null}]
3506
+ }
3507
+ ]
624
3508
  }
625
3509
  }
626
3510
  }`,
@@ -633,18 +3517,36 @@ async function buildDynamicAutomationExamples(
633
3517
  return buildCommandExamples([
634
3518
  {
635
3519
  description: "Replace the trigger with a scheduled trigger on a real automation from this workspace.",
636
- command: `zinkee --json automations trigger set ${automationId} --trigger-type scheduled --cron "0 0 9 * * *"`,
3520
+ command: `zinkee --json automations trigger set ${automationId} --trigger-type scheduled --cron "0 15 10 * * 1"`,
637
3521
  raw: `{
638
3522
  "type": "scheduled",
639
3523
  "config": {
640
- "cronExpression": "0 0 9 * * *"
3524
+ "cronExpression": "0 15 10 * * 1"
3525
+ }
3526
+ }`,
3527
+ },
3528
+ {
3529
+ description:
3530
+ `Replace the trigger with a record-created trigger on ${schemaField.schemaRef}, with an 'is not empty' condition on ${schemaField.fieldRef}.`,
3531
+ command: `zinkee --json automations trigger set ${automationId} --trigger-type record_created --trigger-schema ${schemaField.schemaRef} --condition-json '{"field":"${schemaField.fieldRef}","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
3532
+ raw: `{
3533
+ "type": "record_created",
3534
+ "config": {
3535
+ "schemaId": "${schemaField.schemaRef}",
3536
+ "conditions": [
3537
+ {
3538
+ "field": "${schemaField.fieldRef}",
3539
+ "comparator": "ine",
3540
+ "values": [{"rawValue": "", "source": null}]
3541
+ }
3542
+ ]
641
3543
  }
642
3544
  }`,
643
3545
  },
644
3546
  {
645
3547
  description:
646
- `Replace the trigger with a record-changed trigger using a real schema and field (${schemaField.schemaRef} / ${schemaField.fieldRef}).`,
647
- command: `zinkee --json automations trigger set ${automationId} --trigger-type record_changed --trigger-schema ${schemaField.schemaRef} --trigger-field ${schemaField.fieldRef} --condition ${schemaField.fieldRef}:eq:approved`,
3548
+ `Replace the trigger with a record-changed trigger watching ${schemaField.fieldRef} on ${schemaField.schemaRef}.`,
3549
+ command: `zinkee --json automations trigger set ${automationId} --trigger-type record_changed --trigger-schema ${schemaField.schemaRef} --trigger-field ${schemaField.fieldRef} --condition-json '{"field":"${schemaField.fieldRef}","comparator":"ine","values":[{"rawValue":"","source":null}]}'`,
648
3550
  raw: `{
649
3551
  "type": "record_changed",
650
3552
  "config": {
@@ -653,13 +3555,8 @@ async function buildDynamicAutomationExamples(
653
3555
  "conditions": [
654
3556
  {
655
3557
  "field": "${schemaField.fieldRef}",
656
- "comparator": "eq",
657
- "values": [
658
- {
659
- "rawValue": "approved",
660
- "source": null
661
- }
662
- ]
3558
+ "comparator": "ine",
3559
+ "values": [{"rawValue": "", "source": null}]
663
3560
  }
664
3561
  ]
665
3562
  }
@@ -672,11 +3569,12 @@ async function buildDynamicAutomationExamples(
672
3569
  }
673
3570
  return buildCommandExamples([
674
3571
  {
675
- description: "Add a create-record action with literal and trigger-based mappings from this workspace.",
676
- command: `zinkee --json automations actions add ${automationId} --type create_record --name "Create follow-up" --target-schema ${schemaField.schemaRef} --map ${schemaField.fieldRef}=pending --map-json owner='{"rawValue":null,"source":{"type":"TRIGGER","id":"payload_value"}}'`,
3572
+ description:
3573
+ `Add a create-record action with literal and trigger-based mappings targeting ${schemaField.schemaRef}.`,
3574
+ command: `zinkee --json automations actions add ${automationId} --type create_record --name "Create follow-up order" --target-schema ${schemaField.schemaRef} --map ${schemaField.fieldRef}=pending --map-json owner='{"rawValue":null,"source":{"type":"TRIGGER","id":"payload_value"}}'`,
677
3575
  raw: `{
678
3576
  "type": "create_record",
679
- "name": "Create follow-up",
3577
+ "name": "Create follow-up order",
680
3578
  "config": {
681
3579
  "targetSchemaId": "${schemaField.schemaRef}",
682
3580
  "fieldMapping": {
@@ -696,7 +3594,26 @@ async function buildDynamicAutomationExamples(
696
3594
  }`,
697
3595
  },
698
3596
  {
699
- description: "Add a search-records action with a trigger-based condition from this workspace.",
3597
+ description:
3598
+ `Add an update-record action that targets the trigger record on ${schemaField.schemaRef}.`,
3599
+ command: `zinkee --json automations actions add ${automationId} --type update_record --name "Mark record as processed" --target-schema ${schemaField.schemaRef} --use-trigger-record --map ${schemaField.fieldRef}=processed`,
3600
+ raw: `{
3601
+ "type": "update_record",
3602
+ "name": "Mark record as processed",
3603
+ "config": {
3604
+ "targetSchemaId": "${schemaField.schemaRef}",
3605
+ "fieldMapping": {
3606
+ "${schemaField.fieldRef}": {
3607
+ "rawValue": "processed",
3608
+ "source": null
3609
+ }
3610
+ },
3611
+ "useTriggerRecord": true
3612
+ }
3613
+ }`,
3614
+ },
3615
+ {
3616
+ description: `Add a search-records action with a trigger-based condition on ${schemaField.schemaRef}.`,
700
3617
  command: `zinkee --json automations actions add ${automationId} --type search_records --name "Find duplicates" --target-schema ${schemaField.schemaRef} --condition-json '{"field":"${schemaField.fieldRef}","comparator":"eq","values":[{"rawValue":null,"source":{"type":"TRIGGER","id":"payload_value"}}]}'`,
701
3618
  raw: `{
702
3619
  "type": "search_records",
@@ -721,35 +3638,56 @@ async function buildDynamicAutomationExamples(
721
3638
  }
722
3639
  }`,
723
3640
  },
724
- {
725
- description: "Add an HTTP request action through the generic --type path.",
726
- command: `zinkee --json automations actions add ${automationId} --type http_request --name Notify --method POST --url https://example.com/hook --content-type application/json`,
727
- raw: `{
3641
+ ...(connectionId
3642
+ ? buildCommandExamples([
3643
+ {
3644
+ description: `Add an HTTP request action authenticated through a stored connection (${connectionId}).`,
3645
+ command: `zinkee --json automations actions add ${automationId} --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 ${connectionId}`,
3646
+ raw: `{
3647
+ "type": "http_request",
3648
+ "name": "Notify external ERP",
3649
+ "config": {
3650
+ "method": "POST",
3651
+ "url": "https://example.com/integrations/order-status",
3652
+ "headers": {
3653
+ "X-Demo": "codex"
3654
+ },
3655
+ "contentType": "application/json",
3656
+ "timeoutMs": 5000,
3657
+ "authMode": "STORED",
3658
+ "connectionId": "${connectionId}"
3659
+ }
3660
+ }`,
3661
+ },
3662
+ ])
3663
+ : buildCommandExamples([
3664
+ {
3665
+ description: "Add an HTTP request action through the generic --type path.",
3666
+ command: `zinkee --json automations actions add ${automationId} --type http_request --name "Notify external ERP" --method POST --url https://example.com/integrations/order-status --content-type application/json`,
3667
+ raw: `{
728
3668
  "type": "http_request",
729
- "name": "Notify",
3669
+ "name": "Notify external ERP",
730
3670
  "config": {
731
3671
  "method": "POST",
732
- "url": "https://example.com/hook",
3672
+ "url": "https://example.com/integrations/order-status",
733
3673
  "contentType": "application/json"
734
3674
  }
735
3675
  }`,
736
- },
3676
+ },
3677
+ ])),
737
3678
  ...(pluginId
738
3679
  ? buildCommandExamples([
739
3680
  {
740
- description:
741
- `Add an execute-plugin action using an active plugin from this workspace (${pluginId}).`,
742
- command: `zinkee --json automations actions add ${automationId} --type execute_plugin --name "Run plugin" --plugin ${pluginId} --arg mode=safe --arg-json payload='{"dryRun":true}'`,
3681
+ description: `Add an execute-plugin action using an active plugin from this workspace (${pluginId}).`,
3682
+ command: `zinkee --json automations actions add ${automationId} --type execute_plugin --name "Run billing plugin" --plugin ${pluginId} --arg mode=safe --arg-json steps='["one","two"]'`,
743
3683
  raw: `{
744
3684
  "type": "execute_plugin",
745
- "name": "Run plugin",
3685
+ "name": "Run billing plugin",
746
3686
  "config": {
747
3687
  "pluginId": "${pluginId}",
748
3688
  "pluginArgs": {
749
3689
  "mode": "safe",
750
- "payload": {
751
- "dryRun": true
752
- }
3690
+ "steps": ["one", "two"]
753
3691
  }
754
3692
  }
755
3693
  }`,
@@ -778,6 +3716,21 @@ async function buildDynamicAutomationExamples(
778
3716
  },
779
3717
  "useTriggerRecord": true
780
3718
  }
3719
+ }`,
3720
+ response: `{
3721
+ "id": "${automationWithAction.actionId}",
3722
+ "type": "update_record",
3723
+ "name": "Update trigger record",
3724
+ "config": {
3725
+ "targetSchemaId": "${schemaField.schemaRef}",
3726
+ "fieldMapping": {
3727
+ "${schemaField.fieldRef}": {
3728
+ "rawValue": "ready",
3729
+ "source": null
3730
+ }
3731
+ },
3732
+ "useTriggerRecord": true
3733
+ }
781
3734
  }`,
782
3735
  },
783
3736
  ]);
@@ -812,6 +3765,21 @@ async function buildDynamicAutomationExamples(
812
3765
  "apiKey": "super-secret"
813
3766
  },
814
3767
  "active": true
3768
+ }`,
3769
+ response: `{
3770
+ "id": "4fc20b5c-9353-4991-b68e-1027cb674ed4",
3771
+ "name": "ERP API Key",
3772
+ "type": "api_key",
3773
+ "scope": "workspace",
3774
+ "ownerMemberId": "6c8a3e0d-7b1f-4c98-a2e9-8b9a2e3f5b14",
3775
+ "active": true,
3776
+ "config": {
3777
+ "headerName": "Authorization"
3778
+ },
3779
+ "createdAt": "2026-04-21T09:00:00Z",
3780
+ "updatedAt": "2026-04-21T09:00:00Z",
3781
+ "createdBy": "developer@zinkee.com",
3782
+ "updatedBy": "developer@zinkee.com"
815
3783
  }`,
816
3784
  },
817
3785
  ]);
@@ -830,6 +3798,21 @@ async function buildDynamicAutomationExamples(
830
3798
  "headerName": "Authorization"
831
3799
  }
832
3800
  }
3801
+ }`,
3802
+ response: `{
3803
+ "id": "${connectionId}",
3804
+ "name": "ERP API Key Updated",
3805
+ "type": "api_key",
3806
+ "scope": "workspace",
3807
+ "ownerMemberId": "6c8a3e0d-7b1f-4c98-a2e9-8b9a2e3f5b14",
3808
+ "active": true,
3809
+ "config": {
3810
+ "headerName": "Authorization"
3811
+ },
3812
+ "createdAt": "2026-04-21T09:00:00Z",
3813
+ "updatedAt": "2026-04-21T10:15:00Z",
3814
+ "createdBy": "developer@zinkee.com",
3815
+ "updatedBy": "developer@zinkee.com"
833
3816
  }`,
834
3817
  },
835
3818
  ]);