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.
@@ -0,0 +1,16 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(npm test *)",
5
+ "Bash(npm run *)",
6
+ "Bash(pnpm typecheck *)",
7
+ "Bash(pnpm test *)",
8
+ "Bash(npx tsc *)",
9
+ "Read(//home/guillermo/dev/z2-backend/api/src/main/java/com/zinkee/api/domain/model/v2/log/**)",
10
+ "Read(//home/guillermo/dev/z2-backend/**)",
11
+ "Bash(grep *)",
12
+ "Bash(npx vitest *)",
13
+ "Bash(npx tsx *)"
14
+ ]
15
+ }
16
+ }
package/AGENTS.md CHANGED
@@ -31,6 +31,7 @@ Use this order when reasoning about behavior:
31
31
  - `schemas`
32
32
  - `records`
33
33
  - `comments`
34
+ - `logs`
34
35
  - `navigation`
35
36
  - `teamspace`
36
37
  - `displays`
package/README.md CHANGED
@@ -12,6 +12,7 @@ Implemented command groups:
12
12
  - `records`
13
13
  - `files`
14
14
  - `comments`
15
+ - `logs`
15
16
  - `navigation`
16
17
  - `teamspace`
17
18
  - `displays`
@@ -35,6 +36,10 @@ npm run typecheck
35
36
  npm test
36
37
  ```
37
38
 
39
+ ## Publishing
40
+
41
+ Release steps for npm are documented in [docs/npm-release.md](docs/npm-release.md).
42
+
38
43
  ## Configuration
39
44
 
40
45
  The CLI uses a TOML config file:
@@ -133,43 +138,62 @@ zinkee schemas fields create projects --type autoincremental --slug code --label
133
138
  zinkee schemas fields create projects --type member --slug owner --label "Owner"
134
139
  ```
135
140
 
136
- Valid types: `text`, `number`, `date`, `file`, `autoincremental`, `member`, `option`, `reference`, `formula`.
141
+ Valid types: `text`, `number`, `date`, `file`, `autoincremental`, `member`, `option`, `reference`, `formula`, `schedule`.
137
142
 
138
- Complex types require `--raw`:
143
+ Complex types require `--raw`. The JSON `type` uses the backend ClassName (`TextField`, `OptionField`, …) and type-specific fields go inside `config`:
139
144
 
140
145
  ```bash
141
146
  # Option field
142
147
  zinkee schemas fields create projects --raw '{
143
- "type":"option","slug":"status","label":"Status",
144
- "options":[
145
- {"id":1,"name":"Open","color":"default"},
146
- {"id":2,"name":"In Progress","color":"primary"},
147
- {"id":3,"name":"Done","color":"success"}
148
- ]
148
+ "type":"OptionField","slug":"status","label":"Status",
149
+ "config":{
150
+ "options":[
151
+ {"id":1,"name":"Open","color":"default"},
152
+ {"id":2,"name":"In Progress","color":"primary"},
153
+ {"id":3,"name":"Done","color":"success"}
154
+ ]
155
+ }
149
156
  }'
150
157
 
151
158
  # Reference field (targetSchema and targetDisplayField must be UUIDs)
152
159
  zinkee schemas fields create tasks --raw '{
153
- "type":"reference","slug":"project","label":"Project",
154
- "targetSchema":"<schema-uuid>",
155
- "targetDisplayField":"<field-uuid>",
156
- "deleteBehavior":"SET_NULL"
160
+ "type":"ReferenceField","slug":"project","label":"Project",
161
+ "config":{
162
+ "targetSchema":"<schema-uuid>",
163
+ "targetDisplayField":"<field-uuid>",
164
+ "deleteBehavior":"SET_NULL"
165
+ }
157
166
  }'
158
167
 
159
168
  # Formula field (use formulaText, not expression)
160
169
  zinkee schemas fields create projects --raw '{
161
- "type":"formula","slug":"code","label":"Code",
162
- "formulaText":"concat(\"PRJ-\", <_id-field-uuid>)"
170
+ "type":"FormulaField","slug":"code","label":"Code",
171
+ "config":{
172
+ "formulaText":"concat(\"PRJ-\", <_id-field-uuid>)"
173
+ }
174
+ }'
175
+
176
+ # Schedule field (frequency: monthly | daily). Bound to one NumberField (referenceField)
177
+ # and two DateField UUIDs (beginning/ending). Cannot be required.
178
+ zinkee schemas fields create projects --raw '{
179
+ "type":"ScheduleField","slug":"recurrence","label":"Recurrence",
180
+ "config":{
181
+ "referenceField":"<number-field-uuid>",
182
+ "beginningPeriodField":"<date-field-uuid>",
183
+ "endingPeriodField":"<date-field-uuid>",
184
+ "frequency":"monthly"
185
+ }
163
186
  }'
164
187
  ```
165
188
 
166
189
  ### Update field config
167
190
 
168
- Config properties must be wrapped inside a `config` key:
191
+ PATCH bodies are flat (no `set` / `unset` wrapper). Config properties must be wrapped inside a `config` key:
169
192
 
170
193
  ```bash
171
194
  # Number formatting
172
195
  zinkee schemas fields update projects budget --raw '{
196
+ "type":"NumberField",
173
197
  "config":{
174
198
  "defaultValue":"0",
175
199
  "formatOptions":{
@@ -181,11 +205,12 @@ zinkee schemas fields update projects budget --raw '{
181
205
 
182
206
  # Date formatting
183
207
  zinkee schemas fields update projects start-date --raw '{
208
+ "type":"DateField",
184
209
  "config":{"formatOptions":{"format":"date","dateFormat":"L","showTime":false}}
185
210
  }'
186
211
 
187
212
  # Text type (valid values: NORMAL, LONG)
188
- zinkee schemas fields update projects description --raw '{"config":{"textType":"LONG"}}'
213
+ zinkee schemas fields update projects description --raw '{"type":"TextField","config":{"textType":"LONG"}}'
189
214
  ```
190
215
 
191
216
  ### Formula syntax
@@ -274,6 +299,17 @@ zinkee comments list <schema-slug> <record-uuid>
274
299
 
275
300
  ---
276
301
 
302
+ ## Logs
303
+
304
+ Returns the change history for a record. Only populated for schemas with `auditable: true`.
305
+
306
+ ```bash
307
+ zinkee logs list <schema-slug> <record-uuid>
308
+ zinkee --json logs list <schema-slug> <record-uuid>
309
+ ```
310
+
311
+ ---
312
+
277
313
  ## Navigation
278
314
 
279
315
  Organize schemas into database folders.