@numericoach/gskills-admin-cli 0.1.29 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,8 +16,8 @@ bun run gskills-admin pages list
16
16
  bun run gskills-admin sync run --target <instanceId> --only pages,quizzes --yes
17
17
  ```
18
18
 
19
- Content-like resources default to `instanceId = "global"` when `--instance` is omitted.
20
- Delete commands are soft-only. They disable or deactivate rows when the resource supports it, and refuse resources that cannot be safely disabled.
19
+ Content-like resources default to `instanceId = "global"` when `--instance` is omitted. On `global`, create defaults to `disabled: true` for resources that support it unless the payload explicitly says otherwise.
20
+ Delete commands are soft-only. They archive rows when the resource supports `archived`, fall back only when that field does not exist, and refuse resources that cannot be safely hidden.
21
21
  CLI writes are logged in the GSkills admin logs with the authenticated user and CLI metadata.
22
22
 
23
23
  Sync dry-runs use the shared GSkills diff preview system:
@@ -55,7 +55,23 @@ gskills-admin pages create --data-file ./page.json --dry-run --output json
55
55
  gskills-admin pages update <pageId> --data-file ./page-fields.json --yes --output json
56
56
  ```
57
57
 
58
- Use the listed `cache.scopes` with `gskills-admin cache invalidate` after create, update, or soft-delete when the end-user view must reflect the change immediately.
58
+ Use the listed `cache.scopes` with `gskills-admin cache invalidate` after create, update, or delete when the end-user view must reflect the change immediately. Delete flows should archive content first; after a real delete, re-read the row and verify `archived: true` when the resource supports it.
59
+
60
+ Workflow authoring has a guided CLI surface. Use it before raw `workflows` and `workflow-actions` CRUD:
61
+
62
+ ```bash
63
+ gskills-admin workflows schema --output json
64
+ gskills-admin workflows schema --trigger LEARNING_PATH_NOT_STARTED --output json
65
+ gskills-admin workflows example --trigger LEARNING_PATH_NOT_STARTED --output json
66
+ gskills-admin workflows preview-email --data-file ./workflow.json --fake --language fr --output json
67
+ gskills-admin workflows preview-email --data-file ./workflow.json --user user@example.com --language fr --output json
68
+ gskills-admin workflows create-configured --instance global --data-file ./workflow.json --inactive --dry-run --output json
69
+ gskills-admin workflows create-configured --instance global --data-file ./workflow.json --active --yes --output json
70
+ ```
71
+
72
+ `workflows schema` lists every supported trigger and action, the trigger config schema, trigger payload schema, email variables, button placeholders and examples. `create-configured` creates the workflow and all actions in one operation. It requires an activation decision. Ask whether to enable the workflow now, then pass `--active` or `--inactive`. Prefer `--inactive` until the preview email, target ids, recipients and translations are approved.
73
+
74
+ Email actions use `config.templates`, a map of language code to `{ subject, body }`. Keep variables such as `{{userName}}`, `{{userEmail}}`, `{{instanceName}}` and trigger-specific variables unchanged across translations. `preview-email` renders the exact subject and body without sending anything. Use `--fake` for sample trigger data, or `--user` / `--email` to preview with a real user.
59
75
 
60
76
  For page body edits, prefer the granular block helpers when a stable block id exists. Dry-run first, then write:
61
77
 
@@ -88,6 +104,28 @@ Block helpers read the full page content, find nested blocks by id, generate gua
88
104
 
89
105
  `pages content-schema` is the machine-readable source of truth for supported EditorJS/GSkills blocks, nested child-block paths, immutable reference fields and examples. Agents should call it before generating or patching page content.
90
106
 
107
+ Content governance and page comments use the same data and write paths as the super-admin governance UI:
108
+
109
+ ```bash
110
+ gskills-admin governance list --instance global --output json
111
+ gskills-admin governance get <entryId> --instance global --output json
112
+ gskills-admin governance comments-board --instance global --mine --output json
113
+ gskills-admin governance open-comment-count --instance global --output json
114
+ gskills-admin governance search --instance global --query Gmail --output json
115
+ gskills-admin governance create-task --entity-type page --entity-id <pageId> --status CHANGES_REQUESTED --task-title "Relire la page" --dry-run --output json
116
+ gskills-admin governance upsert --entity-type page --entity-id <pageId> --status TO_REVIEW --dry-run --output json
117
+ gskills-admin governance update-task <entryId> --task-description-file ./details.md --dry-run --output json
118
+ gskills-admin governance set-assignees <entryId> --user-ids <userId,userId> --dry-run --output json
119
+ gskills-admin governance set-instance <entryId> --target-instance <instanceId> --dry-run --output json
120
+ gskills-admin governance comments add <entryId> --content-file ./comment.md --dry-run --output json
121
+ gskills-admin page-comments list <pageId> --output json
122
+ gskills-admin page-comments add <pageId> --content-file ./comment.md --block-id <blockId> --create-task --dry-run --output json
123
+ gskills-admin page-comments reply <parentCommentId> --content-file ./reply.md --dry-run --output json
124
+ gskills-admin page-comments resolve <commentId> --dry-run --output json
125
+ ```
126
+
127
+ Governance and page-comment writes require `--dry-run` or `--yes`. Task deletion also requires `--force --confirm-delete governance:<entryId>`.
128
+
91
129
  Large local videos can be uploaded directly to GSkills storage before creating or updating internal knowledge and resources. The CLI asks the app for a signed upload URL, streams the local file directly to GCS, then writes the normal row with the returned URL. Use `--instance` for client-specific content.
92
130
 
93
131
  ```bash