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