@numericoach/gskills-admin-cli 0.1.29 → 0.1.30
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 +25 -3
- package/dist/gskills-admin.js +1257 -149
- package/package.json +1 -1
- package/skills/gskills-admin-cli/SKILL.md +29 -5
package/dist/gskills-admin.js
CHANGED
|
@@ -425,7 +425,7 @@ var resources = [
|
|
|
425
425
|
defaultFields: ["id", "title", "type", "language", "instanceId", "isActive", "disabled", "archived", "alphaProgramIds", "updatedAt"],
|
|
426
426
|
syncable: true,
|
|
427
427
|
dangerousDelete: true,
|
|
428
|
-
cacheScopes: ["
|
|
428
|
+
cacheScopes: ["resources", "learning-paths"]
|
|
429
429
|
},
|
|
430
430
|
{
|
|
431
431
|
name: "internal-knowledge",
|
|
@@ -435,7 +435,7 @@ var resources = [
|
|
|
435
435
|
defaultFields: ["id", "title", "language", "instanceId", "isActive", "isAIAllowed", "disabled", "archived", "alphaProgramIds", "updatedAt"],
|
|
436
436
|
syncable: true,
|
|
437
437
|
dangerousDelete: true,
|
|
438
|
-
cacheScopes: ["pages-knowledge"]
|
|
438
|
+
cacheScopes: ["pages-knowledge", "learning-paths"]
|
|
439
439
|
},
|
|
440
440
|
{
|
|
441
441
|
name: "learning-paths",
|
|
@@ -505,6 +505,49 @@ var resources = [
|
|
|
505
505
|
dangerousDelete: true,
|
|
506
506
|
cacheScopes: ["pages", "pages-knowledge"]
|
|
507
507
|
},
|
|
508
|
+
{
|
|
509
|
+
name: "content-governance-entries",
|
|
510
|
+
delegate: "contentGovernanceEntry",
|
|
511
|
+
label: "Content governance entries",
|
|
512
|
+
aliases: ["content-governance-entry", "governance-entries", "governance-entry"],
|
|
513
|
+
defaultFields: ["id", "entityType", "entityId", "instanceId", "status", "revisionClassification", "dueDate", "nextRevisionAt", "taskTitle", "createdById", "updatedAt"],
|
|
514
|
+
dangerousDelete: true
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
name: "content-governance-assignees",
|
|
518
|
+
delegate: "contentGovernanceAssignee",
|
|
519
|
+
label: "Content governance assignees",
|
|
520
|
+
aliases: ["content-governance-assignee", "governance-assignees", "governance-assignee"],
|
|
521
|
+
defaultFields: ["entryId", "userId", "assignedAt"],
|
|
522
|
+
instanceField: null,
|
|
523
|
+
dangerousDelete: true
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
name: "content-metrics-snapshots",
|
|
527
|
+
delegate: "contentMetricsSnapshot",
|
|
528
|
+
label: "Content metrics snapshots",
|
|
529
|
+
aliases: ["content-metrics", "governance-metrics", "metrics-snapshots"],
|
|
530
|
+
defaultFields: ["entityType", "entityId", "feedbackCount", "uniqueViews", "lastPublishedAt", "lastEditorId", "syncedAt"],
|
|
531
|
+
instanceField: null
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
name: "content-comments",
|
|
535
|
+
delegate: "contentComment",
|
|
536
|
+
label: "Content comments",
|
|
537
|
+
aliases: ["content-comment", "governance-comments", "comment-threads"],
|
|
538
|
+
defaultFields: ["id", "targetType", "targetId", "authorId", "content", "blockId", "parentId", "resolvedAt", "resolvedById", "createdAt", "updatedAt"],
|
|
539
|
+
instanceField: null,
|
|
540
|
+
dangerousDelete: true
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
name: "content-comment-mentions",
|
|
544
|
+
delegate: "contentCommentMention",
|
|
545
|
+
label: "Content comment mentions",
|
|
546
|
+
aliases: ["content-comment-mention", "comment-mentions"],
|
|
547
|
+
defaultFields: ["commentId", "userId", "createdAt"],
|
|
548
|
+
instanceField: null,
|
|
549
|
+
dangerousDelete: true
|
|
550
|
+
},
|
|
508
551
|
{
|
|
509
552
|
name: "project-data",
|
|
510
553
|
delegate: "instanceProjectData",
|
|
@@ -589,7 +632,21 @@ var resources = [
|
|
|
589
632
|
delegate: "skill",
|
|
590
633
|
label: "Skills",
|
|
591
634
|
aliases: ["skill", "gskills-skills", "catalog-skills", "skill-catalog-skills"],
|
|
592
|
-
defaultFields: [
|
|
635
|
+
defaultFields: [
|
|
636
|
+
"id",
|
|
637
|
+
"clusterId",
|
|
638
|
+
"key",
|
|
639
|
+
"name",
|
|
640
|
+
"scope",
|
|
641
|
+
"instanceId",
|
|
642
|
+
"sourceLanguage",
|
|
643
|
+
"difficulty",
|
|
644
|
+
"status",
|
|
645
|
+
"validationTypes",
|
|
646
|
+
"requiresAI",
|
|
647
|
+
"alphaProgramIds",
|
|
648
|
+
"updatedAt"
|
|
649
|
+
],
|
|
593
650
|
instanceField: "instanceId",
|
|
594
651
|
dangerousDelete: true,
|
|
595
652
|
cacheScopes: ["pages", "pages-knowledge"]
|
|
@@ -801,7 +858,20 @@ var resources = [
|
|
|
801
858
|
delegate: "importedSheet",
|
|
802
859
|
label: "Imported sheets",
|
|
803
860
|
aliases: ["imported-sheet", "sheets-imported", "google-sheets-imports"],
|
|
804
|
-
defaultFields: [
|
|
861
|
+
defaultFields: [
|
|
862
|
+
"id",
|
|
863
|
+
"displayName",
|
|
864
|
+
"spreadsheetTitle",
|
|
865
|
+
"selectedTabName",
|
|
866
|
+
"instanceId",
|
|
867
|
+
"status",
|
|
868
|
+
"multilangMode",
|
|
869
|
+
"defaultLocale",
|
|
870
|
+
"enabledLocales",
|
|
871
|
+
"enableVectorization",
|
|
872
|
+
"lastSyncedAt",
|
|
873
|
+
"updatedAt"
|
|
874
|
+
],
|
|
805
875
|
dangerousDelete: true,
|
|
806
876
|
cacheScopes: ["pages-knowledge"]
|
|
807
877
|
},
|
|
@@ -810,7 +880,20 @@ var resources = [
|
|
|
810
880
|
delegate: "importedSheetColumn",
|
|
811
881
|
label: "Imported sheet columns",
|
|
812
882
|
aliases: ["imported-sheet-column", "sheet-columns"],
|
|
813
|
-
defaultFields: [
|
|
883
|
+
defaultFields: [
|
|
884
|
+
"id",
|
|
885
|
+
"importedSheetId",
|
|
886
|
+
"position",
|
|
887
|
+
"displayOrder",
|
|
888
|
+
"headerName",
|
|
889
|
+
"inferredType",
|
|
890
|
+
"isVisible",
|
|
891
|
+
"isFilterable",
|
|
892
|
+
"includeInVectorization",
|
|
893
|
+
"displayType",
|
|
894
|
+
"showLabel",
|
|
895
|
+
"updatedAt"
|
|
896
|
+
],
|
|
814
897
|
instanceField: null,
|
|
815
898
|
cacheScopes: ["pages-knowledge"]
|
|
816
899
|
},
|
|
@@ -897,7 +980,18 @@ var resources = [
|
|
|
897
980
|
delegate: "entityRuleConfig",
|
|
898
981
|
label: "Entity restriction rules",
|
|
899
982
|
aliases: ["entity-rules", "content-restriction-rules", "restrictions"],
|
|
900
|
-
defaultFields: [
|
|
983
|
+
defaultFields: [
|
|
984
|
+
"id",
|
|
985
|
+
"instanceId",
|
|
986
|
+
"entityId",
|
|
987
|
+
"restrictionMode",
|
|
988
|
+
"categoryIds",
|
|
989
|
+
"learningPathRestrictionMode",
|
|
990
|
+
"learningPathIds",
|
|
991
|
+
"alphaAllPrograms",
|
|
992
|
+
"alphaProgramIds",
|
|
993
|
+
"updatedAt"
|
|
994
|
+
],
|
|
901
995
|
dangerousDelete: true,
|
|
902
996
|
cacheScopes: ["menu-bundle", "pages", "pages-knowledge", "applications"]
|
|
903
997
|
},
|
|
@@ -1039,14 +1133,14 @@ var pageContentSchema = {
|
|
|
1039
1133
|
note: "Each column owns its own EditorJS block array."
|
|
1040
1134
|
},
|
|
1041
1135
|
{
|
|
1042
|
-
blockTypes: ["accordion_tool", "vertical_accordion"],
|
|
1136
|
+
blockTypes: ["accordion_tool", "vertical_accordion", "vertical_accordion_tool"],
|
|
1043
1137
|
childBlocksPath: "/blocks/<i>/data/sections/<j>/content/blocks",
|
|
1044
1138
|
note: "Each section has a title and a nested EditorJS content object."
|
|
1045
1139
|
},
|
|
1046
1140
|
{
|
|
1047
1141
|
blockTypes: ["section_tool"],
|
|
1048
1142
|
childBlocksPath: "/blocks/<i>/data/content/blocks",
|
|
1049
|
-
note: "A section is a visual wrapper around nested blocks.
|
|
1143
|
+
note: "A section is a visual wrapper around nested blocks. Legacy pages may use data.blocks instead."
|
|
1050
1144
|
},
|
|
1051
1145
|
{
|
|
1052
1146
|
blockTypes: ["tabs"],
|
|
@@ -1174,6 +1268,14 @@ var pageContentSchema = {
|
|
|
1174
1268
|
data: { sections: "array of { title, content, isOpen }", color: "hex color string", orientation: "vertical" },
|
|
1175
1269
|
example: { color: "#2E5FAC", orientation: "vertical", sections: [{ title: "Etape 1", content: { blocks: [] }, isOpen: false }] }
|
|
1176
1270
|
}),
|
|
1271
|
+
block("vertical_accordion_tool", {
|
|
1272
|
+
label: "Legacy Vertical Accordion",
|
|
1273
|
+
category: "layout",
|
|
1274
|
+
purpose: "Legacy vertical accordion type still present in older pages. Preserve it when patching existing content.",
|
|
1275
|
+
data: { sections: "array of { title, content, isOpen }", color: "hex color string", orientation: "vertical" },
|
|
1276
|
+
example: { color: "#2E5FAC", orientation: "vertical", sections: [{ title: "Etape 1", content: { blocks: [] }, isOpen: false }] },
|
|
1277
|
+
notes: ["Use vertical_accordion for new content. Keep vertical_accordion_tool on existing blocks unless doing a reviewed migration."]
|
|
1278
|
+
}),
|
|
1177
1279
|
block("section_tool", {
|
|
1178
1280
|
label: "Section",
|
|
1179
1281
|
category: "layout",
|
|
@@ -1639,7 +1741,7 @@ var childBlockContainers = (block2, blockPath) => {
|
|
|
1639
1741
|
}
|
|
1640
1742
|
});
|
|
1641
1743
|
}
|
|
1642
|
-
if ((block2.type === "accordion_tool" || block2.type === "vertical_accordion") && Array.isArray(data.sections)) {
|
|
1744
|
+
if ((block2.type === "accordion_tool" || block2.type === "vertical_accordion" || block2.type === "vertical_accordion_tool") && Array.isArray(data.sections)) {
|
|
1643
1745
|
data.sections.forEach((section, sectionIndex) => {
|
|
1644
1746
|
if (isPlainRecord(section) && isPlainRecord(section.content) && Array.isArray(section.content.blocks)) {
|
|
1645
1747
|
containers.push({
|
|
@@ -1649,11 +1751,18 @@ var childBlockContainers = (block2, blockPath) => {
|
|
|
1649
1751
|
}
|
|
1650
1752
|
});
|
|
1651
1753
|
}
|
|
1652
|
-
if (block2.type === "section_tool"
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1754
|
+
if (block2.type === "section_tool") {
|
|
1755
|
+
if (isPlainRecord(data.content) && Array.isArray(data.content.blocks)) {
|
|
1756
|
+
containers.push({
|
|
1757
|
+
path: blockPath.concat(["data", "content", "blocks"]),
|
|
1758
|
+
blocks: data.content.blocks
|
|
1759
|
+
});
|
|
1760
|
+
} else if (Array.isArray(data.blocks)) {
|
|
1761
|
+
containers.push({
|
|
1762
|
+
path: blockPath.concat(["data", "blocks"]),
|
|
1763
|
+
blocks: data.blocks
|
|
1764
|
+
});
|
|
1765
|
+
}
|
|
1657
1766
|
}
|
|
1658
1767
|
if (block2.type === "tabs" && Array.isArray(data.tabs)) {
|
|
1659
1768
|
data.tabs.forEach((tab, tabIndex) => {
|
|
@@ -1692,7 +1801,7 @@ var validateContainerShape = (block2, path, errors) => {
|
|
|
1692
1801
|
}
|
|
1693
1802
|
});
|
|
1694
1803
|
}
|
|
1695
|
-
if (block2.type === "accordion_tool" || block2.type === "vertical_accordion") {
|
|
1804
|
+
if (block2.type === "accordion_tool" || block2.type === "vertical_accordion" || block2.type === "vertical_accordion_tool") {
|
|
1696
1805
|
if (!Array.isArray(data.sections)) {
|
|
1697
1806
|
errors.push(`${path}/data/sections must be an array`);
|
|
1698
1807
|
return;
|
|
@@ -1703,8 +1812,12 @@ var validateContainerShape = (block2, path, errors) => {
|
|
|
1703
1812
|
}
|
|
1704
1813
|
});
|
|
1705
1814
|
}
|
|
1706
|
-
if (block2.type === "section_tool"
|
|
1707
|
-
|
|
1815
|
+
if (block2.type === "section_tool") {
|
|
1816
|
+
const hasCanonicalBlocks = isPlainRecord(data.content) && Array.isArray(data.content.blocks);
|
|
1817
|
+
const hasLegacyBlocks = Array.isArray(data.blocks);
|
|
1818
|
+
if (!hasCanonicalBlocks && !hasLegacyBlocks) {
|
|
1819
|
+
errors.push(`${path}/data/content/blocks or ${path}/data/blocks must be an array`);
|
|
1820
|
+
}
|
|
1708
1821
|
}
|
|
1709
1822
|
if (block2.type === "tabs") {
|
|
1710
1823
|
if (!Array.isArray(data.tabs)) {
|
|
@@ -1923,6 +2036,10 @@ var runCommand = async (ctx) => {
|
|
|
1923
2036
|
return runAdminIngestCommand(actionOrResource, ctx);
|
|
1924
2037
|
if (group === "content-assistant")
|
|
1925
2038
|
return runContentAssistantCommand(actionOrResource, ctx);
|
|
2039
|
+
if (group === "governance")
|
|
2040
|
+
return runGovernanceCommand(actionOrResource, maybeAction, rest, ctx);
|
|
2041
|
+
if (group === "page-comments" || group === "page-comment")
|
|
2042
|
+
return runPageCommentsCommand(actionOrResource, maybeAction, ctx);
|
|
1926
2043
|
if (group === "entities")
|
|
1927
2044
|
return runEntitiesCommand(actionOrResource, maybeAction, ctx);
|
|
1928
2045
|
if (group === "org-units-sync")
|
|
@@ -2044,7 +2161,10 @@ var createResource = async (resource, ctx) => {
|
|
|
2044
2161
|
const instanceField = resource.instanceField === undefined ? "instanceId" : resource.instanceField;
|
|
2045
2162
|
if (instanceId && instanceField && !instanceField.includes(".") && data[instanceField] === undefined)
|
|
2046
2163
|
data[instanceField] = instanceId;
|
|
2047
|
-
await applyUploadFileData(resource, data, ctx, {
|
|
2164
|
+
await applyUploadFileData(resource, data, ctx, {
|
|
2165
|
+
id: null,
|
|
2166
|
+
instanceId: getInstanceIdFromData(data) ?? instanceId
|
|
2167
|
+
});
|
|
2048
2168
|
if (Object.keys(data).length === 0)
|
|
2049
2169
|
throw new CliError("Missing --data or --data-file JSON", 2);
|
|
2050
2170
|
if (hasFlag(ctx, "dry-run"))
|
|
@@ -2057,7 +2177,10 @@ var createResource = async (resource, ctx) => {
|
|
|
2057
2177
|
var updateResource = async (resource, id, ctx) => {
|
|
2058
2178
|
requireWriteConfirmation(`${resource.label} update writes data. Add --yes or use --dry-run.`, ctx);
|
|
2059
2179
|
const data = await parseJsonObjectFlag(ctx, "data", "data-file");
|
|
2060
|
-
await applyUploadFileData(resource, data, ctx, {
|
|
2180
|
+
await applyUploadFileData(resource, data, ctx, {
|
|
2181
|
+
id,
|
|
2182
|
+
instanceId: getStringFlag(ctx, "instance") ?? getInstanceIdFromData(data)
|
|
2183
|
+
});
|
|
2061
2184
|
if (Object.keys(data).length === 0)
|
|
2062
2185
|
throw new CliError("Missing --data or --data-file JSON", 2);
|
|
2063
2186
|
if (hasFlag(ctx, "dry-run"))
|
|
@@ -2667,14 +2790,8 @@ var runSessionsCommand = async (action, ctx) => {
|
|
|
2667
2790
|
return sessionsHelp();
|
|
2668
2791
|
if (action !== "invalidate")
|
|
2669
2792
|
throw new CliError(`Unknown sessions command "${action}"`, 2);
|
|
2670
|
-
const userIds = [
|
|
2671
|
-
|
|
2672
|
-
...splitCsv(getStringFlag(ctx, "user"))
|
|
2673
|
-
];
|
|
2674
|
-
const emails = [
|
|
2675
|
-
...splitCsv(getStringFlag(ctx, "emails")),
|
|
2676
|
-
...splitCsv(getStringFlag(ctx, "email"))
|
|
2677
|
-
];
|
|
2793
|
+
const userIds = [...splitCsv(getStringFlag(ctx, "users")), ...splitCsv(getStringFlag(ctx, "user"))];
|
|
2794
|
+
const emails = [...splitCsv(getStringFlag(ctx, "emails")), ...splitCsv(getStringFlag(ctx, "email"))];
|
|
2678
2795
|
if (userIds.length === 0 && emails.length === 0) {
|
|
2679
2796
|
throw new CliError("Missing --user, --users, --email, or --emails", 2);
|
|
2680
2797
|
}
|
|
@@ -2705,6 +2822,316 @@ var runContentAssistantCommand = async (action, ctx) => {
|
|
|
2705
2822
|
}
|
|
2706
2823
|
return requestApi(`/api/cli/content-assistant/lookup?${searchParams.toString()}`);
|
|
2707
2824
|
};
|
|
2825
|
+
var runGovernanceCommand = async (action, maybeArg, rest, ctx) => {
|
|
2826
|
+
if (!action || action === "help")
|
|
2827
|
+
return governanceHelp();
|
|
2828
|
+
if (action === "comments") {
|
|
2829
|
+
return runGovernanceTaskCommentsCommand(maybeArg, rest[0], ctx);
|
|
2830
|
+
}
|
|
2831
|
+
if (action === "list" || action === "tasks") {
|
|
2832
|
+
return requestApi(`/api/cli/governance/tasks?${await governanceBoardSearchParams(ctx, "tasks")}`);
|
|
2833
|
+
}
|
|
2834
|
+
if (action === "get" || action === "task") {
|
|
2835
|
+
const entryId = maybeArg ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id");
|
|
2836
|
+
if (!entryId)
|
|
2837
|
+
throw new CliError("Missing governance entry id", 2);
|
|
2838
|
+
const scope = governanceScope(ctx);
|
|
2839
|
+
return requestApi(`/api/cli/governance/tasks/${entryId}?${scope.toString()}`);
|
|
2840
|
+
}
|
|
2841
|
+
if (action === "comments-board" || action === "page-comments") {
|
|
2842
|
+
return requestApi(`/api/cli/governance/page-comments?${await governanceBoardSearchParams(ctx, "comments")}`);
|
|
2843
|
+
}
|
|
2844
|
+
if (action === "open-comment-count") {
|
|
2845
|
+
const scope = governanceScope(ctx);
|
|
2846
|
+
return requestApi(`/api/cli/governance/page-comments/count?${scope.toString()}`);
|
|
2847
|
+
}
|
|
2848
|
+
if (action === "search") {
|
|
2849
|
+
const scope = governanceScope(ctx);
|
|
2850
|
+
const query = getStringFlag(ctx, "query") ?? getStringFlag(ctx, "search") ?? "";
|
|
2851
|
+
scope.set("query", query);
|
|
2852
|
+
return requestApi(`/api/cli/governance/search?${scope.toString()}`);
|
|
2853
|
+
}
|
|
2854
|
+
if (action === "options") {
|
|
2855
|
+
const scope = governanceScope(ctx);
|
|
2856
|
+
return requestApi(`/api/cli/governance/options?${scope.toString()}`);
|
|
2857
|
+
}
|
|
2858
|
+
if (action === "users" || action === "assignable-users") {
|
|
2859
|
+
return requestApi("/api/cli/governance/users");
|
|
2860
|
+
}
|
|
2861
|
+
if (action === "instances") {
|
|
2862
|
+
return requestApi("/api/cli/governance/instances");
|
|
2863
|
+
}
|
|
2864
|
+
if (action === "create" || action === "create-task") {
|
|
2865
|
+
requireWriteConfirmation("Governance task creation writes data. Add --yes or use --dry-run.", ctx);
|
|
2866
|
+
return requestApi("/api/cli/governance/tasks", {
|
|
2867
|
+
method: "POST",
|
|
2868
|
+
body: JSON.stringify({
|
|
2869
|
+
...await governanceTaskInput(ctx),
|
|
2870
|
+
dryRun: hasFlag(ctx, "dry-run")
|
|
2871
|
+
})
|
|
2872
|
+
});
|
|
2873
|
+
}
|
|
2874
|
+
if (action === "update" || action === "update-task" || action === "update-details") {
|
|
2875
|
+
requireWriteConfirmation("Governance task update writes data. Add --yes or use --dry-run.", ctx);
|
|
2876
|
+
const entryId = maybeArg ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id");
|
|
2877
|
+
if (!entryId)
|
|
2878
|
+
throw new CliError("Missing governance entry id", 2);
|
|
2879
|
+
const taskTitle = await getTextFlag(ctx, "task-title", "task-title-file") ?? await getTextFlag(ctx, "title", "title-file");
|
|
2880
|
+
const taskDescription = await getTextFlag(ctx, "task-description", "task-description-file") ?? await getTextFlag(ctx, "description", "description-file");
|
|
2881
|
+
if (taskTitle === undefined && taskDescription === undefined) {
|
|
2882
|
+
throw new CliError("Missing --task-title, --title, --task-description, or --description", 2);
|
|
2883
|
+
}
|
|
2884
|
+
return requestApi(`/api/cli/governance/tasks/${entryId}/details`, {
|
|
2885
|
+
method: "PATCH",
|
|
2886
|
+
body: JSON.stringify({
|
|
2887
|
+
taskTitle,
|
|
2888
|
+
taskDescription,
|
|
2889
|
+
dryRun: hasFlag(ctx, "dry-run")
|
|
2890
|
+
})
|
|
2891
|
+
});
|
|
2892
|
+
}
|
|
2893
|
+
if (action === "upsert" || action === "set") {
|
|
2894
|
+
requireWriteConfirmation("Governance task field update writes data. Add --yes or use --dry-run.", ctx);
|
|
2895
|
+
return requestApi("/api/cli/governance/entry", {
|
|
2896
|
+
method: "POST",
|
|
2897
|
+
body: JSON.stringify({
|
|
2898
|
+
...await governanceTaskInput(ctx),
|
|
2899
|
+
dryRun: hasFlag(ctx, "dry-run")
|
|
2900
|
+
})
|
|
2901
|
+
});
|
|
2902
|
+
}
|
|
2903
|
+
if (action === "set-assignees" || action === "assign") {
|
|
2904
|
+
requireWriteConfirmation("Governance assignee update writes data. Add --yes or use --dry-run.", ctx);
|
|
2905
|
+
const userIds = splitCsv(getStringFlag(ctx, "user-ids") ?? getStringFlag(ctx, "users") ?? getStringFlag(ctx, "assignees"));
|
|
2906
|
+
return requestApi("/api/cli/governance/assignees", {
|
|
2907
|
+
method: "POST",
|
|
2908
|
+
body: JSON.stringify({
|
|
2909
|
+
entryId: maybeArg ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id"),
|
|
2910
|
+
entityType: getStringFlag(ctx, "entity-type") ?? getStringFlag(ctx, "type"),
|
|
2911
|
+
entityId: getStringFlag(ctx, "entity-id"),
|
|
2912
|
+
instanceId: getStringFlag(ctx, "instance") ?? "global",
|
|
2913
|
+
userIds,
|
|
2914
|
+
dryRun: hasFlag(ctx, "dry-run")
|
|
2915
|
+
})
|
|
2916
|
+
});
|
|
2917
|
+
}
|
|
2918
|
+
if (action === "set-instance" || action === "target-instance") {
|
|
2919
|
+
requireWriteConfirmation("Governance target instance update writes data. Add --yes or use --dry-run.", ctx);
|
|
2920
|
+
const entryId = maybeArg ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id");
|
|
2921
|
+
if (!entryId)
|
|
2922
|
+
throw new CliError("Missing governance entry id", 2);
|
|
2923
|
+
const clearTarget = hasFlag(ctx, "all-instances") || hasFlag(ctx, "clear") || hasFlag(ctx, "no-target-instance");
|
|
2924
|
+
const targetInstanceId = clearTarget ? null : getStringFlag(ctx, "target-instance") ?? getStringFlag(ctx, "target");
|
|
2925
|
+
if (!clearTarget && !targetInstanceId) {
|
|
2926
|
+
throw new CliError("Missing --target-instance, --target, --all-instances, or --clear", 2);
|
|
2927
|
+
}
|
|
2928
|
+
return requestApi(`/api/cli/governance/tasks/${entryId}/instance`, {
|
|
2929
|
+
method: "POST",
|
|
2930
|
+
body: JSON.stringify({
|
|
2931
|
+
instanceId: targetInstanceId,
|
|
2932
|
+
dryRun: hasFlag(ctx, "dry-run")
|
|
2933
|
+
})
|
|
2934
|
+
});
|
|
2935
|
+
}
|
|
2936
|
+
if (action === "delete" || action === "delete-task") {
|
|
2937
|
+
const entryId = maybeArg ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id");
|
|
2938
|
+
if (!entryId)
|
|
2939
|
+
throw new CliError("Missing governance entry id", 2);
|
|
2940
|
+
requireGovernanceTaskDeleteConfirmation(entryId, ctx);
|
|
2941
|
+
return requestApi(`/api/cli/governance/tasks/${entryId}/delete`, {
|
|
2942
|
+
method: "POST",
|
|
2943
|
+
body: JSON.stringify({ dryRun: hasFlag(ctx, "dry-run") })
|
|
2944
|
+
});
|
|
2945
|
+
}
|
|
2946
|
+
throw new CliError(`Unknown governance command "${action}"`, 2);
|
|
2947
|
+
};
|
|
2948
|
+
var runGovernanceTaskCommentsCommand = async (action, id, ctx) => {
|
|
2949
|
+
if (!action || action === "help")
|
|
2950
|
+
return governanceCommentsHelp();
|
|
2951
|
+
if (action === "list") {
|
|
2952
|
+
const entryId = id ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id");
|
|
2953
|
+
if (!entryId)
|
|
2954
|
+
throw new CliError("Missing governance entry id", 2);
|
|
2955
|
+
return requestApi(`/api/cli/governance/comments/${entryId}`);
|
|
2956
|
+
}
|
|
2957
|
+
if (action === "add") {
|
|
2958
|
+
requireWriteConfirmation("Governance comment creation writes data. Add --yes or use --dry-run.", ctx);
|
|
2959
|
+
const entryId = id ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id");
|
|
2960
|
+
if (!entryId)
|
|
2961
|
+
throw new CliError("Missing governance entry id", 2);
|
|
2962
|
+
const content = await getTextFlag(ctx, "content", "content-file");
|
|
2963
|
+
if (!content)
|
|
2964
|
+
throw new CliError("Missing --content or --content-file", 2);
|
|
2965
|
+
return requestApi(`/api/cli/governance/comments/${entryId}`, {
|
|
2966
|
+
method: "POST",
|
|
2967
|
+
body: JSON.stringify({
|
|
2968
|
+
content,
|
|
2969
|
+
dryRun: hasFlag(ctx, "dry-run")
|
|
2970
|
+
})
|
|
2971
|
+
});
|
|
2972
|
+
}
|
|
2973
|
+
if (action === "delete") {
|
|
2974
|
+
requireWriteConfirmation("Governance comment deletion writes data. Add --yes or use --dry-run.", ctx);
|
|
2975
|
+
const commentId = id ?? getStringFlag(ctx, "comment") ?? getStringFlag(ctx, "comment-id");
|
|
2976
|
+
if (!commentId)
|
|
2977
|
+
throw new CliError("Missing comment id", 2);
|
|
2978
|
+
return requestApi(`/api/cli/governance/comments/${commentId}/delete`, {
|
|
2979
|
+
method: "POST",
|
|
2980
|
+
body: JSON.stringify({ dryRun: hasFlag(ctx, "dry-run") })
|
|
2981
|
+
});
|
|
2982
|
+
}
|
|
2983
|
+
throw new CliError(`Unknown governance comments command "${action}"`, 2);
|
|
2984
|
+
};
|
|
2985
|
+
var runPageCommentsCommand = async (action, id, ctx) => {
|
|
2986
|
+
if (!action || action === "help")
|
|
2987
|
+
return pageCommentsHelp();
|
|
2988
|
+
if (action === "list") {
|
|
2989
|
+
const pageId = id ?? getStringFlag(ctx, "page") ?? getStringFlag(ctx, "page-id");
|
|
2990
|
+
if (!pageId)
|
|
2991
|
+
throw new CliError("Missing page id", 2);
|
|
2992
|
+
return requestApi(`/api/cli/page-comments/${pageId}`);
|
|
2993
|
+
}
|
|
2994
|
+
if (action === "add") {
|
|
2995
|
+
requireWriteConfirmation("Page comment creation writes data. Add --yes or use --dry-run.", ctx);
|
|
2996
|
+
const pageId = id ?? getStringFlag(ctx, "page") ?? getStringFlag(ctx, "page-id");
|
|
2997
|
+
if (!pageId)
|
|
2998
|
+
throw new CliError("Missing page id", 2);
|
|
2999
|
+
const content = await getTextFlag(ctx, "content", "content-file");
|
|
3000
|
+
if (!content)
|
|
3001
|
+
throw new CliError("Missing --content or --content-file", 2);
|
|
3002
|
+
const anchorQuote = await getTextFlag(ctx, "anchor-quote", "anchor-quote-file");
|
|
3003
|
+
return requestApi(`/api/cli/page-comments/${pageId}`, {
|
|
3004
|
+
method: "POST",
|
|
3005
|
+
body: JSON.stringify({
|
|
3006
|
+
content,
|
|
3007
|
+
blockId: getStringFlag(ctx, "block-id"),
|
|
3008
|
+
anchorQuote,
|
|
3009
|
+
createTask: hasFlag(ctx, "create-task"),
|
|
3010
|
+
dryRun: hasFlag(ctx, "dry-run")
|
|
3011
|
+
})
|
|
3012
|
+
});
|
|
3013
|
+
}
|
|
3014
|
+
if (action === "reply") {
|
|
3015
|
+
requireWriteConfirmation("Page comment reply writes data. Add --yes or use --dry-run.", ctx);
|
|
3016
|
+
const parentId = id ?? getStringFlag(ctx, "parent") ?? getStringFlag(ctx, "parent-id");
|
|
3017
|
+
if (!parentId)
|
|
3018
|
+
throw new CliError("Missing parent comment id", 2);
|
|
3019
|
+
const content = await getTextFlag(ctx, "content", "content-file");
|
|
3020
|
+
if (!content)
|
|
3021
|
+
throw new CliError("Missing --content or --content-file", 2);
|
|
3022
|
+
return requestApi(`/api/cli/page-comments/${parentId}/reply`, {
|
|
3023
|
+
method: "POST",
|
|
3024
|
+
body: JSON.stringify({
|
|
3025
|
+
content,
|
|
3026
|
+
dryRun: hasFlag(ctx, "dry-run")
|
|
3027
|
+
})
|
|
3028
|
+
});
|
|
3029
|
+
}
|
|
3030
|
+
if (action === "resolve" || action === "reopen" || action === "delete") {
|
|
3031
|
+
requireWriteConfirmation(`Page comment ${action} writes data. Add --yes or use --dry-run.`, ctx);
|
|
3032
|
+
const commentId = id ?? getStringFlag(ctx, "comment") ?? getStringFlag(ctx, "comment-id");
|
|
3033
|
+
if (!commentId)
|
|
3034
|
+
throw new CliError("Missing comment id", 2);
|
|
3035
|
+
return requestApi(`/api/cli/page-comments/${commentId}/${action}`, {
|
|
3036
|
+
method: "POST",
|
|
3037
|
+
body: JSON.stringify({ dryRun: hasFlag(ctx, "dry-run") })
|
|
3038
|
+
});
|
|
3039
|
+
}
|
|
3040
|
+
throw new CliError(`Unknown page-comments command "${action}"`, 2);
|
|
3041
|
+
};
|
|
3042
|
+
var governanceScope = (ctx) => {
|
|
3043
|
+
const instanceId = getStringFlag(ctx, "instance") ?? "global";
|
|
3044
|
+
const searchParams = new URLSearchParams;
|
|
3045
|
+
searchParams.set("instanceId", instanceId);
|
|
3046
|
+
if (hasFlag(ctx, "all-instances") || instanceId === "global" && !hasFlag(ctx, "scoped")) {
|
|
3047
|
+
searchParams.set("viewAllInstances", "true");
|
|
3048
|
+
}
|
|
3049
|
+
return searchParams;
|
|
3050
|
+
};
|
|
3051
|
+
var governanceBoardSearchParams = async (ctx, mode) => {
|
|
3052
|
+
const searchParams = governanceScope(ctx);
|
|
3053
|
+
searchParams.set("filters", JSON.stringify(await governanceFilters(ctx, mode)));
|
|
3054
|
+
searchParams.set("sort", JSON.stringify(governanceSort(ctx, mode)));
|
|
3055
|
+
searchParams.set("page", String(getNumberFlag(ctx, "page") ?? 1));
|
|
3056
|
+
searchParams.set("pageSize", String(getNumberFlag(ctx, "page-size") ?? getNumberFlag(ctx, "pageSize") ?? 25));
|
|
3057
|
+
return searchParams;
|
|
3058
|
+
};
|
|
3059
|
+
var governanceFilters = async (ctx, mode) => {
|
|
3060
|
+
const filters = await parseJsonObjectFlag(ctx, "filters", "filters-file");
|
|
3061
|
+
const search = getStringFlag(ctx, "search") ?? getStringFlag(ctx, "query");
|
|
3062
|
+
if (search)
|
|
3063
|
+
filters.search = search;
|
|
3064
|
+
const formatLevel1 = splitCsv(getStringFlag(ctx, "format") ?? getStringFlag(ctx, "format-level-1"));
|
|
3065
|
+
if (formatLevel1.length)
|
|
3066
|
+
filters.formatLevel1 = formatLevel1;
|
|
3067
|
+
const appSlugs = splitCsv(getStringFlag(ctx, "apps") ?? getStringFlag(ctx, "app-slugs"));
|
|
3068
|
+
if (appSlugs.length)
|
|
3069
|
+
filters.appSlugs = appSlugs;
|
|
3070
|
+
if (hasFlag(ctx, "mine") || hasFlag(ctx, "only-mine"))
|
|
3071
|
+
filters.onlyMine = true;
|
|
3072
|
+
if (mode === "tasks") {
|
|
3073
|
+
const entityTypes = splitCsv(getStringFlag(ctx, "entity-types") ?? getStringFlag(ctx, "types"));
|
|
3074
|
+
if (entityTypes.length)
|
|
3075
|
+
filters.entityTypes = entityTypes;
|
|
3076
|
+
const lifecycle = splitCsv(getStringFlag(ctx, "lifecycle"));
|
|
3077
|
+
if (lifecycle.length)
|
|
3078
|
+
filters.lifecycle = lifecycle;
|
|
3079
|
+
const statuses = splitCsv(getStringFlag(ctx, "statuses") ?? getStringFlag(ctx, "status"));
|
|
3080
|
+
if (statuses.length)
|
|
3081
|
+
filters.statuses = statuses;
|
|
3082
|
+
const classifications = splitCsv(getStringFlag(ctx, "classifications") ?? getStringFlag(ctx, "classification"));
|
|
3083
|
+
if (classifications.length)
|
|
3084
|
+
filters.classifications = classifications;
|
|
3085
|
+
const plans = splitCsv(getStringFlag(ctx, "plans") ?? getStringFlag(ctx, "plan"));
|
|
3086
|
+
if (plans.length)
|
|
3087
|
+
filters.plans = plans;
|
|
3088
|
+
const assigneeId = getStringFlag(ctx, "assignee") ?? getStringFlag(ctx, "assignee-id");
|
|
3089
|
+
if (assigneeId)
|
|
3090
|
+
filters.assigneeId = assigneeId;
|
|
3091
|
+
if (hasFlag(ctx, "revision-due") || hasFlag(ctx, "only-revision-due")) {
|
|
3092
|
+
filters.onlyRevisionDue = true;
|
|
3093
|
+
}
|
|
3094
|
+
}
|
|
3095
|
+
return filters;
|
|
3096
|
+
};
|
|
3097
|
+
var governanceSort = (ctx, mode) => ({
|
|
3098
|
+
key: getStringFlag(ctx, "sort-key") ?? getStringFlag(ctx, "sort") ?? (mode === "tasks" ? "lastUpdatedAt" : "lastUpdatedAt"),
|
|
3099
|
+
direction: getStringFlag(ctx, "sort-direction") ?? getStringFlag(ctx, "direction") ?? "desc"
|
|
3100
|
+
});
|
|
3101
|
+
var governanceTaskInput = async (ctx) => {
|
|
3102
|
+
const entityType = getStringFlag(ctx, "entity-type") ?? getStringFlag(ctx, "type");
|
|
3103
|
+
const entityId = getStringFlag(ctx, "entity-id");
|
|
3104
|
+
if (!entityType)
|
|
3105
|
+
throw new CliError("Missing --entity-type", 2);
|
|
3106
|
+
if (!entityId)
|
|
3107
|
+
throw new CliError("Missing --entity-id", 2);
|
|
3108
|
+
const taskTitle = await getTextFlag(ctx, "task-title", "task-title-file") ?? await getTextFlag(ctx, "title", "title-file");
|
|
3109
|
+
return {
|
|
3110
|
+
entityType,
|
|
3111
|
+
entityId,
|
|
3112
|
+
instanceId: getStringFlag(ctx, "instance") ?? null,
|
|
3113
|
+
status: getStringFlag(ctx, "status"),
|
|
3114
|
+
revisionClassification: getStringFlag(ctx, "classification") ?? getStringFlag(ctx, "revision-classification"),
|
|
3115
|
+
dueDate: getStringFlag(ctx, "due-date") ?? getStringFlag(ctx, "due"),
|
|
3116
|
+
taskTitle
|
|
3117
|
+
};
|
|
3118
|
+
};
|
|
3119
|
+
var requireGovernanceTaskDeleteConfirmation = (entryId, ctx) => {
|
|
3120
|
+
const expectedConfirmation = `governance:${entryId}`;
|
|
3121
|
+
if (!hasFlag(ctx, "force")) {
|
|
3122
|
+
throw new CliError("Governance task delete requires --force", 2, {
|
|
3123
|
+
entryId,
|
|
3124
|
+
requiredConfirmation: expectedConfirmation
|
|
3125
|
+
});
|
|
3126
|
+
}
|
|
3127
|
+
if (getStringFlag(ctx, "confirm-delete") !== expectedConfirmation) {
|
|
3128
|
+
throw new CliError(`Governance task delete requires --confirm-delete ${expectedConfirmation}`, 2, {
|
|
3129
|
+
entryId,
|
|
3130
|
+
requiredConfirmation: expectedConfirmation
|
|
3131
|
+
});
|
|
3132
|
+
}
|
|
3133
|
+
requireWriteConfirmation("Governance task delete writes data. Add --yes or use --dry-run.", ctx);
|
|
3134
|
+
};
|
|
2708
3135
|
var runKnowledgeSyncMediaCommand = async (ctx) => {
|
|
2709
3136
|
const targetInstanceIds = getTargetInstanceIds(ctx);
|
|
2710
3137
|
const allTargets = hasFlag(ctx, "all-targets");
|
|
@@ -3264,7 +3691,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
|
|
|
3264
3691
|
dryRun: hasFlag(ctx, "dry-run")
|
|
3265
3692
|
};
|
|
3266
3693
|
if (hasFlag(ctx, "dry-run"))
|
|
3267
|
-
return {
|
|
3694
|
+
return {
|
|
3695
|
+
operation: "imported-sheets.copy-to",
|
|
3696
|
+
importedSheetId,
|
|
3697
|
+
...payload
|
|
3698
|
+
};
|
|
3268
3699
|
return requestApi(`/api/cli/imported-sheets/${importedSheetId}/copy-to`, {
|
|
3269
3700
|
method: "POST",
|
|
3270
3701
|
body: JSON.stringify(payload)
|
|
@@ -3286,7 +3717,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
|
|
|
3286
3717
|
dryRun: hasFlag(ctx, "dry-run")
|
|
3287
3718
|
};
|
|
3288
3719
|
if (hasFlag(ctx, "dry-run"))
|
|
3289
|
-
return {
|
|
3720
|
+
return {
|
|
3721
|
+
operation: "imported-sheets.attach-page",
|
|
3722
|
+
importedSheetId,
|
|
3723
|
+
...payload
|
|
3724
|
+
};
|
|
3290
3725
|
return requestApi(`/api/cli/imported-sheets/${importedSheetId}/attach-page`, {
|
|
3291
3726
|
method: "POST",
|
|
3292
3727
|
body: JSON.stringify(payload)
|
|
@@ -3314,7 +3749,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
|
|
|
3314
3749
|
dryRun: hasFlag(ctx, "dry-run")
|
|
3315
3750
|
};
|
|
3316
3751
|
if (hasFlag(ctx, "dry-run"))
|
|
3317
|
-
return {
|
|
3752
|
+
return {
|
|
3753
|
+
operation: "imported-sheets.set-source",
|
|
3754
|
+
importedSheetId,
|
|
3755
|
+
...payload
|
|
3756
|
+
};
|
|
3318
3757
|
return requestImportedSheetApi(ctx, instanceId, "set-source", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/source`, {
|
|
3319
3758
|
method: "POST",
|
|
3320
3759
|
body: JSON.stringify(payload)
|
|
@@ -3343,7 +3782,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
|
|
|
3343
3782
|
if (action === "create") {
|
|
3344
3783
|
const payload = await importedSheetCreatePayload(ctx);
|
|
3345
3784
|
if (hasFlag(ctx, "dry-run"))
|
|
3346
|
-
return {
|
|
3785
|
+
return {
|
|
3786
|
+
dryRun: true,
|
|
3787
|
+
operation: "imported-sheets.create",
|
|
3788
|
+
payload
|
|
3789
|
+
};
|
|
3347
3790
|
return requestImportedSheetApi(ctx, instanceId, "create", () => requestApi("/api/cli/imported-sheets", {
|
|
3348
3791
|
method: "POST",
|
|
3349
3792
|
body: JSON.stringify(payload)
|
|
@@ -3367,7 +3810,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
|
|
|
3367
3810
|
if (Object.keys(payload.data).length === 0)
|
|
3368
3811
|
throw new CliError("Missing --data or --data-file JSON", 2);
|
|
3369
3812
|
if (hasFlag(ctx, "dry-run"))
|
|
3370
|
-
return {
|
|
3813
|
+
return {
|
|
3814
|
+
operation: "imported-sheets.update",
|
|
3815
|
+
importedSheetId,
|
|
3816
|
+
...payload
|
|
3817
|
+
};
|
|
3371
3818
|
return requestImportedSheetApi(ctx, instanceId, "update", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}`, {
|
|
3372
3819
|
method: "PATCH",
|
|
3373
3820
|
body: JSON.stringify(payload)
|
|
@@ -3380,7 +3827,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
|
|
|
3380
3827
|
dryRun: hasFlag(ctx, "dry-run")
|
|
3381
3828
|
};
|
|
3382
3829
|
if (hasFlag(ctx, "dry-run"))
|
|
3383
|
-
return {
|
|
3830
|
+
return {
|
|
3831
|
+
operation: "imported-sheets.sync",
|
|
3832
|
+
importedSheetId,
|
|
3833
|
+
...payload
|
|
3834
|
+
};
|
|
3384
3835
|
return requestImportedSheetApi(ctx, instanceId, "sync", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/sync`, {
|
|
3385
3836
|
method: "POST",
|
|
3386
3837
|
body: JSON.stringify(payload)
|
|
@@ -3399,7 +3850,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
|
|
|
3399
3850
|
dryRun: hasFlag(ctx, "dry-run")
|
|
3400
3851
|
};
|
|
3401
3852
|
if (hasFlag(ctx, "dry-run"))
|
|
3402
|
-
return {
|
|
3853
|
+
return {
|
|
3854
|
+
operation: `imported-sheets.${action}`,
|
|
3855
|
+
importedSheetId,
|
|
3856
|
+
...payload
|
|
3857
|
+
};
|
|
3403
3858
|
return requestImportedSheetApi(ctx, instanceId, action, () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/translate`, {
|
|
3404
3859
|
method: "POST",
|
|
3405
3860
|
body: JSON.stringify(payload)
|
|
@@ -3420,7 +3875,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
|
|
|
3420
3875
|
dryRun: hasFlag(ctx, "dry-run")
|
|
3421
3876
|
};
|
|
3422
3877
|
if (hasFlag(ctx, "dry-run"))
|
|
3423
|
-
return {
|
|
3878
|
+
return {
|
|
3879
|
+
operation: "imported-sheets.retranslate",
|
|
3880
|
+
importedSheetId,
|
|
3881
|
+
...payload
|
|
3882
|
+
};
|
|
3424
3883
|
return requestImportedSheetApi(ctx, instanceId, "retranslate", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/retranslate`, {
|
|
3425
3884
|
method: "POST",
|
|
3426
3885
|
body: JSON.stringify(payload)
|
|
@@ -3442,7 +3901,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
|
|
|
3442
3901
|
dryRun: hasFlag(ctx, "dry-run")
|
|
3443
3902
|
};
|
|
3444
3903
|
if (hasFlag(ctx, "dry-run"))
|
|
3445
|
-
return {
|
|
3904
|
+
return {
|
|
3905
|
+
operation: "imported-sheets.replace-grid",
|
|
3906
|
+
importedSheetId,
|
|
3907
|
+
...payload
|
|
3908
|
+
};
|
|
3446
3909
|
return requestImportedSheetApi(ctx, instanceId, "replace-grid", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/replace-grid`, {
|
|
3447
3910
|
method: "POST",
|
|
3448
3911
|
body: JSON.stringify(payload)
|
|
@@ -3473,7 +3936,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
|
|
|
3473
3936
|
dryRun: hasFlag(ctx, "dry-run")
|
|
3474
3937
|
};
|
|
3475
3938
|
if (hasFlag(ctx, "dry-run"))
|
|
3476
|
-
return {
|
|
3939
|
+
return {
|
|
3940
|
+
operation: "imported-sheets.vectorize",
|
|
3941
|
+
importedSheetId,
|
|
3942
|
+
...payload
|
|
3943
|
+
};
|
|
3477
3944
|
return requestImportedSheetApi(ctx, instanceId, "vectorize", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/vectorize`, {
|
|
3478
3945
|
method: "POST",
|
|
3479
3946
|
body: JSON.stringify(payload)
|
|
@@ -3487,7 +3954,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
|
|
|
3487
3954
|
dryRun: hasFlag(ctx, "dry-run")
|
|
3488
3955
|
};
|
|
3489
3956
|
if (hasFlag(ctx, "dry-run"))
|
|
3490
|
-
return {
|
|
3957
|
+
return {
|
|
3958
|
+
operation: "imported-sheets.repair-french",
|
|
3959
|
+
importedSheetId,
|
|
3960
|
+
...payload
|
|
3961
|
+
};
|
|
3491
3962
|
return requestImportedSheetApi(ctx, instanceId, "repair-french", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/repair-french`, {
|
|
3492
3963
|
method: "POST",
|
|
3493
3964
|
body: JSON.stringify(payload)
|
|
@@ -3509,7 +3980,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
|
|
|
3509
3980
|
dryRun: hasFlag(ctx, "dry-run")
|
|
3510
3981
|
};
|
|
3511
3982
|
if (hasFlag(ctx, "dry-run"))
|
|
3512
|
-
return {
|
|
3983
|
+
return {
|
|
3984
|
+
operation: "imported-sheets.delete",
|
|
3985
|
+
importedSheetId,
|
|
3986
|
+
...payload
|
|
3987
|
+
};
|
|
3513
3988
|
return requestApi(`/api/cli/imported-sheets/${importedSheetId}`, {
|
|
3514
3989
|
method: "DELETE",
|
|
3515
3990
|
body: JSON.stringify(payload)
|
|
@@ -3664,10 +4139,7 @@ var syncPresetItems = (preset) => {
|
|
|
3664
4139
|
var getTargetInstanceIds = (ctx) => {
|
|
3665
4140
|
const explicitTargets = splitCsv(getStringFlag(ctx, "targets"));
|
|
3666
4141
|
const target = getStringFlag(ctx, "target");
|
|
3667
|
-
return Array.from(new Set([
|
|
3668
|
-
...explicitTargets,
|
|
3669
|
-
...target ? [target] : []
|
|
3670
|
-
]));
|
|
4142
|
+
return Array.from(new Set([...explicitTargets, ...target ? [target] : []]));
|
|
3671
4143
|
};
|
|
3672
4144
|
var getFields = (resource, ctx) => splitCsv(getStringFlag(ctx, "fields")).length > 0 ? splitCsv(getStringFlag(ctx, "fields")) : resource.defaultFields;
|
|
3673
4145
|
var entitySearchParams = (ctx) => {
|
|
@@ -3866,11 +4338,7 @@ var GLOBAL_DEFAULT_RESOURCES = new Set([
|
|
|
3866
4338
|
var defaultInstanceId = (resource) => GLOBAL_DEFAULT_RESOURCES.has(resource.name) ? "global" : undefined;
|
|
3867
4339
|
var skillsSourceRootDir = async () => {
|
|
3868
4340
|
const currentDir = dirname2(fileURLToPath(import.meta.url));
|
|
3869
|
-
const candidates = [
|
|
3870
|
-
join2(currentDir, "..", "skills"),
|
|
3871
|
-
join2(process.cwd(), "packages", "gskills-admin-cli", "skills"),
|
|
3872
|
-
join2(process.cwd(), ".codex", "skills")
|
|
3873
|
-
];
|
|
4341
|
+
const candidates = [join2(currentDir, "..", "skills"), join2(process.cwd(), "packages", "gskills-admin-cli", "skills"), join2(process.cwd(), ".codex", "skills")];
|
|
3874
4342
|
for (const candidate of candidates) {
|
|
3875
4343
|
try {
|
|
3876
4344
|
if ((await stat(candidate)).isDirectory())
|
|
@@ -3972,7 +4440,10 @@ var rootHelp = () => ({
|
|
|
3972
4440
|
"gskills-admin internal-knowledge sync-media --since today --languages fr --all-targets --dry-run",
|
|
3973
4441
|
"gskills-admin progress learning-path-quiz-mismatches --instance <instanceId>",
|
|
3974
4442
|
"gskills-admin sessions invalidate --email user@example.com --dry-run",
|
|
3975
|
-
"gskills-admin content-assistant lookup --query 'draft'"
|
|
4443
|
+
"gskills-admin content-assistant lookup --query 'draft'",
|
|
4444
|
+
"gskills-admin governance list --instance global --output json",
|
|
4445
|
+
"gskills-admin governance create-task --entity-type page --entity-id <pageId> --status TODO --dry-run",
|
|
4446
|
+
"gskills-admin page-comments add <pageId> --content-file ./comment.txt --block-id <blockId> --create-task --dry-run"
|
|
3976
4447
|
],
|
|
3977
4448
|
resources: resources.map((resource) => resource.name),
|
|
3978
4449
|
output: "Use --output json, --output jsonl, --output table, or --output markdown. Piped output defaults to JSON.",
|
|
@@ -3988,7 +4459,11 @@ var schemaHelp = () => ({
|
|
|
3988
4459
|
authorization: "GSkills re-checks User.adminState = SUPER_ADMIN on every request"
|
|
3989
4460
|
},
|
|
3990
4461
|
globalFlags: [
|
|
3991
|
-
{
|
|
4462
|
+
{
|
|
4463
|
+
name: "output",
|
|
4464
|
+
values: ["json", "jsonl", "table", "markdown"],
|
|
4465
|
+
default: "auto"
|
|
4466
|
+
},
|
|
3992
4467
|
{ name: "quiet", type: "boolean" }
|
|
3993
4468
|
],
|
|
3994
4469
|
commands: [
|
|
@@ -3998,81 +4473,657 @@ var schemaHelp = () => ({
|
|
|
3998
4473
|
{ name: "resources", writes: false },
|
|
3999
4474
|
{ name: "schema", writes: false },
|
|
4000
4475
|
{ name: "skills install", flags: ["--target"], writes: true },
|
|
4001
|
-
{
|
|
4002
|
-
|
|
4003
|
-
|
|
4476
|
+
{
|
|
4477
|
+
name: "sync diff",
|
|
4478
|
+
required: ["--target or --targets"],
|
|
4479
|
+
writes: false
|
|
4480
|
+
},
|
|
4481
|
+
{
|
|
4482
|
+
name: "sync run",
|
|
4483
|
+
required: ["--target or --targets"],
|
|
4484
|
+
safety: ["--yes or --dry-run"],
|
|
4485
|
+
writes: true
|
|
4486
|
+
},
|
|
4487
|
+
{
|
|
4488
|
+
name: "sync logs",
|
|
4489
|
+
flags: ["--target", "--source", "--status", "--take"],
|
|
4490
|
+
writes: false
|
|
4491
|
+
},
|
|
4004
4492
|
{ name: "sync presets", writes: false },
|
|
4005
|
-
{
|
|
4493
|
+
{
|
|
4494
|
+
name: "sync repair-source-links",
|
|
4495
|
+
required: ["--target"],
|
|
4496
|
+
flags: ["--source", "--yes", "--dry-run"],
|
|
4497
|
+
writes: true
|
|
4498
|
+
},
|
|
4006
4499
|
{ name: "cache scopes", writes: false },
|
|
4007
|
-
{
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
{
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
{
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
{
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
{
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
{
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
{
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
{
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
{
|
|
4057
|
-
|
|
4058
|
-
|
|
4500
|
+
{
|
|
4501
|
+
name: "cache invalidate",
|
|
4502
|
+
required: ["--instance"],
|
|
4503
|
+
flags: ["--scope", "--languages", "--yes", "--dry-run"],
|
|
4504
|
+
writes: true
|
|
4505
|
+
},
|
|
4506
|
+
{
|
|
4507
|
+
name: "translate",
|
|
4508
|
+
args: ["kind", "id?"],
|
|
4509
|
+
required: ["--to"],
|
|
4510
|
+
flags: ["--ids", "--all", "--instance", "--from", "--where", "--take", "--mode", "--source-history", "--concurrency", "--yes", "--dry-run"],
|
|
4511
|
+
writes: true
|
|
4512
|
+
},
|
|
4513
|
+
{
|
|
4514
|
+
name: "imported-sheets list",
|
|
4515
|
+
required: ["--instance"],
|
|
4516
|
+
writes: false
|
|
4517
|
+
},
|
|
4518
|
+
{
|
|
4519
|
+
name: "imported-sheets get",
|
|
4520
|
+
args: ["id"],
|
|
4521
|
+
required: ["--instance"],
|
|
4522
|
+
flags: ["--locale", "--page", "--page-size"],
|
|
4523
|
+
writes: false
|
|
4524
|
+
},
|
|
4525
|
+
{
|
|
4526
|
+
name: "imported-sheets locales",
|
|
4527
|
+
args: ["id"],
|
|
4528
|
+
required: ["--instance"],
|
|
4529
|
+
writes: false
|
|
4530
|
+
},
|
|
4531
|
+
{
|
|
4532
|
+
name: "imported-sheets runs",
|
|
4533
|
+
args: ["id?"],
|
|
4534
|
+
required: ["--instance"],
|
|
4535
|
+
flags: ["--take"],
|
|
4536
|
+
writes: false
|
|
4537
|
+
},
|
|
4538
|
+
{
|
|
4539
|
+
name: "imported-sheets resolve",
|
|
4540
|
+
required: ["--instance", "--source"],
|
|
4541
|
+
writes: false
|
|
4542
|
+
},
|
|
4543
|
+
{
|
|
4544
|
+
name: "imported-sheets connect-google",
|
|
4545
|
+
required: ["--instance"],
|
|
4546
|
+
flags: ["--base-url", "--lang", "--owner-email", "--no-open", "--dry-run"],
|
|
4547
|
+
writes: false
|
|
4548
|
+
},
|
|
4549
|
+
{
|
|
4550
|
+
name: "imported-sheets create",
|
|
4551
|
+
required: ["--instance", "--source", "--tab", "--owner-email or --owner-user"],
|
|
4552
|
+
flags: [
|
|
4553
|
+
"--display-name",
|
|
4554
|
+
"--locales",
|
|
4555
|
+
"--mode",
|
|
4556
|
+
"--default-locale",
|
|
4557
|
+
"--owner-email",
|
|
4558
|
+
"--owner-user",
|
|
4559
|
+
"--enable-vectorization",
|
|
4560
|
+
"--vector-headers",
|
|
4561
|
+
"--data",
|
|
4562
|
+
"--data-file",
|
|
4563
|
+
"--oauth-timeout-ms",
|
|
4564
|
+
"--no-oauth-wait",
|
|
4565
|
+
"--yes",
|
|
4566
|
+
"--dry-run"
|
|
4567
|
+
],
|
|
4568
|
+
writes: true
|
|
4569
|
+
},
|
|
4570
|
+
{
|
|
4571
|
+
name: "imported-sheets update",
|
|
4572
|
+
args: ["id"],
|
|
4573
|
+
required: ["--instance", "--data or --data-file or --owner-email"],
|
|
4574
|
+
flags: ["--owner-email", "--owner-user", "--oauth-timeout-ms", "--no-oauth-wait", "--yes", "--dry-run"],
|
|
4575
|
+
writes: true
|
|
4576
|
+
},
|
|
4577
|
+
{
|
|
4578
|
+
name: "imported-sheets sync",
|
|
4579
|
+
args: ["id"],
|
|
4580
|
+
required: ["--instance"],
|
|
4581
|
+
flags: ["--locales", "--oauth-timeout-ms", "--no-oauth-wait", "--yes", "--dry-run"],
|
|
4582
|
+
writes: true
|
|
4583
|
+
},
|
|
4584
|
+
{
|
|
4585
|
+
name: "imported-sheets enable-locales",
|
|
4586
|
+
args: ["id"],
|
|
4587
|
+
required: ["--instance", "--locales"],
|
|
4588
|
+
flags: ["--yes", "--dry-run"],
|
|
4589
|
+
writes: true
|
|
4590
|
+
},
|
|
4591
|
+
{
|
|
4592
|
+
name: "imported-sheets translate",
|
|
4593
|
+
args: ["id"],
|
|
4594
|
+
required: ["--instance", "--to"],
|
|
4595
|
+
flags: ["--yes", "--dry-run"],
|
|
4596
|
+
writes: true
|
|
4597
|
+
},
|
|
4598
|
+
{
|
|
4599
|
+
name: "imported-sheets retranslate",
|
|
4600
|
+
args: ["id"],
|
|
4601
|
+
required: ["--instance", "--to"],
|
|
4602
|
+
flags: ["--from", "--revectorize", "--yes", "--dry-run"],
|
|
4603
|
+
writes: true
|
|
4604
|
+
},
|
|
4605
|
+
{
|
|
4606
|
+
name: "imported-sheets replace-grid",
|
|
4607
|
+
args: ["id"],
|
|
4608
|
+
required: ["--instance", "--locale", "--data or --data-file"],
|
|
4609
|
+
flags: ["--rebuild-columns", "--revectorize", "--yes", "--dry-run"],
|
|
4610
|
+
writes: true
|
|
4611
|
+
},
|
|
4612
|
+
{
|
|
4613
|
+
name: "imported-sheets patch-cells",
|
|
4614
|
+
args: ["id"],
|
|
4615
|
+
required: ["--instance", "--data or --data-file"],
|
|
4616
|
+
flags: ["--locale", "--revectorize", "--cache-scope", "--no-cache", "--yes", "--dry-run"],
|
|
4617
|
+
writes: true
|
|
4618
|
+
},
|
|
4619
|
+
{
|
|
4620
|
+
name: "imported-sheets vectorize",
|
|
4621
|
+
args: ["id"],
|
|
4622
|
+
required: ["--instance"],
|
|
4623
|
+
flags: ["--locales", "--yes", "--dry-run"],
|
|
4624
|
+
writes: true
|
|
4625
|
+
},
|
|
4626
|
+
{
|
|
4627
|
+
name: "imported-sheets repair-french",
|
|
4628
|
+
args: ["id"],
|
|
4629
|
+
required: ["--instance"],
|
|
4630
|
+
flags: ["--locales", "--revectorize", "--yes", "--dry-run"],
|
|
4631
|
+
writes: true
|
|
4632
|
+
},
|
|
4633
|
+
{
|
|
4634
|
+
name: "imported-sheets copy-to",
|
|
4635
|
+
args: ["id"],
|
|
4636
|
+
required: ["--instance", "--target or --targets"],
|
|
4637
|
+
flags: ["--display-name", "--replace", "--revectorize", "--yes", "--dry-run"],
|
|
4638
|
+
writes: true
|
|
4639
|
+
},
|
|
4640
|
+
{
|
|
4641
|
+
name: "imported-sheets attach-page",
|
|
4642
|
+
args: ["id"],
|
|
4643
|
+
required: ["--instance", "--page"],
|
|
4644
|
+
flags: ["--locale", "--position", "--replace-existing", "--yes", "--dry-run"],
|
|
4645
|
+
writes: true
|
|
4646
|
+
},
|
|
4647
|
+
{
|
|
4648
|
+
name: "imported-sheets set-source",
|
|
4649
|
+
args: ["id"],
|
|
4650
|
+
required: ["--instance", "--locale", "--source", "--tab"],
|
|
4651
|
+
flags: ["--resync", "--yes", "--dry-run"],
|
|
4652
|
+
writes: true
|
|
4653
|
+
},
|
|
4654
|
+
{
|
|
4655
|
+
name: "imported-sheets delete",
|
|
4656
|
+
args: ["id"],
|
|
4657
|
+
required: ["--instance", "--force", "--confirm-delete"],
|
|
4658
|
+
flags: ["--yes", "--dry-run"],
|
|
4659
|
+
writes: true,
|
|
4660
|
+
destructive: true
|
|
4661
|
+
},
|
|
4662
|
+
{
|
|
4663
|
+
name: "internal-knowledge sync-media",
|
|
4664
|
+
flags: [
|
|
4665
|
+
"--source",
|
|
4666
|
+
"--target",
|
|
4667
|
+
"--targets",
|
|
4668
|
+
"--all-targets",
|
|
4669
|
+
"--languages",
|
|
4670
|
+
"--since",
|
|
4671
|
+
"--updated-after",
|
|
4672
|
+
"--fields",
|
|
4673
|
+
"--mime",
|
|
4674
|
+
"--source-type",
|
|
4675
|
+
"--include-disabled",
|
|
4676
|
+
"--include-archived",
|
|
4677
|
+
"--no-cache",
|
|
4678
|
+
"--yes",
|
|
4679
|
+
"--dry-run"
|
|
4680
|
+
],
|
|
4681
|
+
writes: true
|
|
4682
|
+
},
|
|
4683
|
+
{
|
|
4684
|
+
name: "pages backfill-field",
|
|
4685
|
+
required: ["--field", "--target or --targets or --all-targets"],
|
|
4686
|
+
flags: ["--source", "--languages", "--no-cache", "--yes", "--dry-run"],
|
|
4687
|
+
writes: true
|
|
4688
|
+
},
|
|
4689
|
+
{
|
|
4690
|
+
name: "pages content-schema",
|
|
4691
|
+
aliases: ["pages blocks", "pages block-schema"],
|
|
4692
|
+
writes: false
|
|
4693
|
+
},
|
|
4694
|
+
{
|
|
4695
|
+
name: "pages patch-content",
|
|
4696
|
+
args: ["id"],
|
|
4697
|
+
required: ["--patch or --patch-file", "--yes or --dry-run"],
|
|
4698
|
+
flags: ["--reason", "--expect-updated-at", "--expect-version", "--expect-content-sha1"],
|
|
4699
|
+
writes: true
|
|
4700
|
+
},
|
|
4701
|
+
{
|
|
4702
|
+
name: "pages block list",
|
|
4703
|
+
args: ["id"],
|
|
4704
|
+
flags: ["--include-content"],
|
|
4705
|
+
writes: false
|
|
4706
|
+
},
|
|
4707
|
+
{
|
|
4708
|
+
name: "pages block get",
|
|
4709
|
+
args: ["id"],
|
|
4710
|
+
required: ["--block-id"],
|
|
4711
|
+
flags: ["--include-content"],
|
|
4712
|
+
writes: false
|
|
4713
|
+
},
|
|
4714
|
+
{
|
|
4715
|
+
name: "pages block replace-text",
|
|
4716
|
+
args: ["id"],
|
|
4717
|
+
required: ["--block-id", "--text or --text-file", "--yes or --dry-run"],
|
|
4718
|
+
flags: [
|
|
4719
|
+
"--field",
|
|
4720
|
+
"--expect-text",
|
|
4721
|
+
"--expect-text-file",
|
|
4722
|
+
"--expect-type",
|
|
4723
|
+
"--expect-updated-at",
|
|
4724
|
+
"--expect-version",
|
|
4725
|
+
"--expect-content-sha1",
|
|
4726
|
+
"--reason",
|
|
4727
|
+
"--include-content"
|
|
4728
|
+
],
|
|
4729
|
+
writes: true
|
|
4730
|
+
},
|
|
4731
|
+
{
|
|
4732
|
+
name: "pages block replace",
|
|
4733
|
+
args: ["id"],
|
|
4734
|
+
required: ["--block-id", "--block or --block-file", "--yes or --dry-run"],
|
|
4735
|
+
flags: ["--expect-type", "--allow-id-change", "--expect-updated-at", "--expect-version", "--expect-content-sha1", "--reason", "--include-content"],
|
|
4736
|
+
writes: true
|
|
4737
|
+
},
|
|
4738
|
+
{
|
|
4739
|
+
name: "pages block insert-before",
|
|
4740
|
+
args: ["id"],
|
|
4741
|
+
required: ["--block-id", "--block or --block-file", "--yes or --dry-run"],
|
|
4742
|
+
flags: ["--expect-updated-at", "--expect-version", "--expect-content-sha1", "--reason", "--include-content"],
|
|
4743
|
+
writes: true
|
|
4744
|
+
},
|
|
4745
|
+
{
|
|
4746
|
+
name: "pages block insert-after",
|
|
4747
|
+
args: ["id"],
|
|
4748
|
+
required: ["--block-id", "--block or --block-file", "--yes or --dry-run"],
|
|
4749
|
+
flags: ["--expect-updated-at", "--expect-version", "--expect-content-sha1", "--reason", "--include-content"],
|
|
4750
|
+
writes: true
|
|
4751
|
+
},
|
|
4752
|
+
{
|
|
4753
|
+
name: "pages block remove",
|
|
4754
|
+
args: ["id"],
|
|
4755
|
+
required: ["--block-id", "--yes or --dry-run"],
|
|
4756
|
+
flags: ["--expect-type", "--expect-updated-at", "--expect-version", "--expect-content-sha1", "--reason", "--include-content"],
|
|
4757
|
+
writes: true
|
|
4758
|
+
},
|
|
4759
|
+
{
|
|
4760
|
+
name: "learning-paths icons",
|
|
4761
|
+
flags: ["--query", "--take"],
|
|
4762
|
+
writes: false
|
|
4763
|
+
},
|
|
4764
|
+
{
|
|
4765
|
+
name: "learning-paths set-icon",
|
|
4766
|
+
args: ["id"],
|
|
4767
|
+
required: ["--app or --category or --upload-file", "--yes or --dry-run"],
|
|
4768
|
+
flags: ["--instance", "--app", "--category", "--upload-file", "--icon-file", "--upload-name", "--mime-type"],
|
|
4769
|
+
writes: true
|
|
4770
|
+
},
|
|
4771
|
+
{
|
|
4772
|
+
name: "learning-paths generate-icon",
|
|
4773
|
+
args: ["id"],
|
|
4774
|
+
required: ["--yes or --dry-run"],
|
|
4775
|
+
flags: ["--prompt", "--prompt-file", "--extra-prompt", "--app", "--category", "--app-name", "--use-app-icon"],
|
|
4776
|
+
writes: true
|
|
4777
|
+
},
|
|
4778
|
+
{
|
|
4779
|
+
name: "feedback inspect",
|
|
4780
|
+
args: ["feedbackId or URL"],
|
|
4781
|
+
writes: false
|
|
4782
|
+
},
|
|
4783
|
+
{
|
|
4784
|
+
name: "feedback translation-status",
|
|
4785
|
+
args: ["feedbackId or URL"],
|
|
4786
|
+
writes: false
|
|
4787
|
+
},
|
|
4788
|
+
{
|
|
4789
|
+
name: "feedback import-email",
|
|
4790
|
+
flags: ["--data", "--data-file", "--yes", "--dry-run"],
|
|
4791
|
+
writes: true
|
|
4792
|
+
},
|
|
4793
|
+
{
|
|
4794
|
+
name: "feedback claim",
|
|
4795
|
+
args: ["feedbackId"],
|
|
4796
|
+
flags: ["--dry-run"],
|
|
4797
|
+
writes: true
|
|
4798
|
+
},
|
|
4799
|
+
{
|
|
4800
|
+
name: "feedback send-claim",
|
|
4801
|
+
args: ["feedbackId"],
|
|
4802
|
+
flags: ["--recipient-email", "--recipient-name", "--cc", "--subject", "--body", "--yes", "--dry-run"],
|
|
4803
|
+
writes: true
|
|
4804
|
+
},
|
|
4805
|
+
{
|
|
4806
|
+
name: "feedback send-reply",
|
|
4807
|
+
args: ["feedbackId"],
|
|
4808
|
+
flags: [
|
|
4809
|
+
"--subject",
|
|
4810
|
+
"--subject-file",
|
|
4811
|
+
"--body-file",
|
|
4812
|
+
"--translated-subject",
|
|
4813
|
+
"--translated-subject-file",
|
|
4814
|
+
"--translated-body-file",
|
|
4815
|
+
"--user-language",
|
|
4816
|
+
"--current-language",
|
|
4817
|
+
"--yes",
|
|
4818
|
+
"--dry-run"
|
|
4819
|
+
],
|
|
4820
|
+
writes: true
|
|
4821
|
+
},
|
|
4822
|
+
{
|
|
4823
|
+
name: "progress learning-path-quiz-mismatches",
|
|
4824
|
+
flags: ["--instance", "--learning-path", "--user", "--limit"],
|
|
4825
|
+
writes: false
|
|
4826
|
+
},
|
|
4827
|
+
{
|
|
4828
|
+
name: "progress repair-learning-path-quiz-mismatches",
|
|
4829
|
+
flags: ["--instance", "--learning-path", "--user", "--limit", "--yes", "--dry-run"],
|
|
4830
|
+
writes: true
|
|
4831
|
+
},
|
|
4832
|
+
{
|
|
4833
|
+
name: "progress embedded-course",
|
|
4834
|
+
required: ["--user", "--quiz", "--page"],
|
|
4835
|
+
flags: ["--yes", "--dry-run"],
|
|
4836
|
+
writes: true
|
|
4837
|
+
},
|
|
4838
|
+
{
|
|
4839
|
+
name: "access diagnose",
|
|
4840
|
+
required: ["--user or --email"],
|
|
4841
|
+
flags: ["--instance"],
|
|
4842
|
+
writes: false
|
|
4843
|
+
},
|
|
4844
|
+
{
|
|
4845
|
+
name: "access grant",
|
|
4846
|
+
required: ["--user"],
|
|
4847
|
+
flags: ["--type", "--start-at", "--custom-duration-days", "--preferred-language", "--yes", "--dry-run"],
|
|
4848
|
+
writes: true
|
|
4849
|
+
},
|
|
4850
|
+
{
|
|
4851
|
+
name: "access revoke-active",
|
|
4852
|
+
required: ["--user"],
|
|
4853
|
+
flags: ["--yes", "--dry-run"],
|
|
4854
|
+
writes: true
|
|
4855
|
+
},
|
|
4856
|
+
{
|
|
4857
|
+
name: "sessions invalidate",
|
|
4858
|
+
required: ["--user or --users or --email or --emails"],
|
|
4859
|
+
flags: ["--instance", "--reason", "--yes", "--dry-run"],
|
|
4860
|
+
writes: true
|
|
4861
|
+
},
|
|
4862
|
+
{
|
|
4863
|
+
name: "content-assistant lookup",
|
|
4864
|
+
flags: ["--chat", "--user", "--email", "--query", "--take"],
|
|
4865
|
+
writes: false
|
|
4866
|
+
},
|
|
4867
|
+
{
|
|
4868
|
+
name: "governance list",
|
|
4869
|
+
flags: [
|
|
4870
|
+
"--instance",
|
|
4871
|
+
"--all-instances",
|
|
4872
|
+
"--filters",
|
|
4873
|
+
"--filters-file",
|
|
4874
|
+
"--search",
|
|
4875
|
+
"--entity-types",
|
|
4876
|
+
"--format",
|
|
4877
|
+
"--apps",
|
|
4878
|
+
"--status",
|
|
4879
|
+
"--classification",
|
|
4880
|
+
"--assignee",
|
|
4881
|
+
"--mine",
|
|
4882
|
+
"--revision-due",
|
|
4883
|
+
"--sort-key",
|
|
4884
|
+
"--sort-direction",
|
|
4885
|
+
"--page",
|
|
4886
|
+
"--page-size"
|
|
4887
|
+
],
|
|
4888
|
+
writes: false
|
|
4889
|
+
},
|
|
4890
|
+
{
|
|
4891
|
+
name: "governance get",
|
|
4892
|
+
args: ["entryId"],
|
|
4893
|
+
flags: ["--instance"],
|
|
4894
|
+
writes: false
|
|
4895
|
+
},
|
|
4896
|
+
{
|
|
4897
|
+
name: "governance comments-board",
|
|
4898
|
+
flags: [
|
|
4899
|
+
"--instance",
|
|
4900
|
+
"--all-instances",
|
|
4901
|
+
"--filters",
|
|
4902
|
+
"--filters-file",
|
|
4903
|
+
"--search",
|
|
4904
|
+
"--format",
|
|
4905
|
+
"--apps",
|
|
4906
|
+
"--mine",
|
|
4907
|
+
"--sort-key",
|
|
4908
|
+
"--sort-direction",
|
|
4909
|
+
"--page",
|
|
4910
|
+
"--page-size"
|
|
4911
|
+
],
|
|
4912
|
+
writes: false
|
|
4913
|
+
},
|
|
4914
|
+
{
|
|
4915
|
+
name: "governance open-comment-count",
|
|
4916
|
+
flags: ["--instance", "--all-instances"],
|
|
4917
|
+
writes: false
|
|
4918
|
+
},
|
|
4919
|
+
{
|
|
4920
|
+
name: "governance search",
|
|
4921
|
+
required: ["--instance"],
|
|
4922
|
+
flags: ["--query"],
|
|
4923
|
+
writes: false
|
|
4924
|
+
},
|
|
4925
|
+
{ name: "governance options", required: ["--instance"], writes: false },
|
|
4926
|
+
{ name: "governance users", writes: false },
|
|
4927
|
+
{ name: "governance instances", writes: false },
|
|
4928
|
+
{
|
|
4929
|
+
name: "governance create-task",
|
|
4930
|
+
required: ["--entity-type", "--entity-id", "--yes or --dry-run"],
|
|
4931
|
+
flags: ["--instance", "--status", "--classification", "--due-date", "--task-title", "--task-title-file"],
|
|
4932
|
+
writes: true
|
|
4933
|
+
},
|
|
4934
|
+
{
|
|
4935
|
+
name: "governance upsert",
|
|
4936
|
+
required: ["--entity-type", "--entity-id", "--yes or --dry-run"],
|
|
4937
|
+
flags: ["--instance", "--status", "--classification", "--due-date"],
|
|
4938
|
+
writes: true
|
|
4939
|
+
},
|
|
4940
|
+
{
|
|
4941
|
+
name: "governance update-task",
|
|
4942
|
+
args: ["entryId"],
|
|
4943
|
+
required: ["--task-title or --task-description", "--yes or --dry-run"],
|
|
4944
|
+
flags: ["--task-title", "--task-title-file", "--task-description", "--task-description-file"],
|
|
4945
|
+
writes: true
|
|
4946
|
+
},
|
|
4947
|
+
{
|
|
4948
|
+
name: "governance set-assignees",
|
|
4949
|
+
args: ["entryId?"],
|
|
4950
|
+
required: ["--user-ids or --users", "--yes or --dry-run"],
|
|
4951
|
+
flags: ["--entity-type", "--entity-id", "--instance"],
|
|
4952
|
+
writes: true
|
|
4953
|
+
},
|
|
4954
|
+
{
|
|
4955
|
+
name: "governance set-instance",
|
|
4956
|
+
args: ["entryId"],
|
|
4957
|
+
required: ["--target-instance or --clear", "--yes or --dry-run"],
|
|
4958
|
+
flags: ["--target", "--all-instances", "--clear"],
|
|
4959
|
+
writes: true
|
|
4960
|
+
},
|
|
4961
|
+
{
|
|
4962
|
+
name: "governance delete-task",
|
|
4963
|
+
args: ["entryId"],
|
|
4964
|
+
required: ["--force", "--confirm-delete", "--yes or --dry-run"],
|
|
4965
|
+
writes: true,
|
|
4966
|
+
destructive: true
|
|
4967
|
+
},
|
|
4968
|
+
{ name: "governance comments list", args: ["entryId"], writes: false },
|
|
4969
|
+
{
|
|
4970
|
+
name: "governance comments add",
|
|
4971
|
+
args: ["entryId"],
|
|
4972
|
+
required: ["--content or --content-file", "--yes or --dry-run"],
|
|
4973
|
+
writes: true
|
|
4974
|
+
},
|
|
4975
|
+
{
|
|
4976
|
+
name: "governance comments delete",
|
|
4977
|
+
args: ["commentId"],
|
|
4978
|
+
required: ["--yes or --dry-run"],
|
|
4979
|
+
writes: true,
|
|
4980
|
+
destructive: true
|
|
4981
|
+
},
|
|
4982
|
+
{ name: "page-comments list", args: ["pageId"], writes: false },
|
|
4983
|
+
{
|
|
4984
|
+
name: "page-comments add",
|
|
4985
|
+
args: ["pageId"],
|
|
4986
|
+
required: ["--content or --content-file", "--yes or --dry-run"],
|
|
4987
|
+
flags: ["--block-id", "--anchor-quote", "--anchor-quote-file", "--create-task"],
|
|
4988
|
+
writes: true
|
|
4989
|
+
},
|
|
4990
|
+
{
|
|
4991
|
+
name: "page-comments reply",
|
|
4992
|
+
args: ["parentCommentId"],
|
|
4993
|
+
required: ["--content or --content-file", "--yes or --dry-run"],
|
|
4994
|
+
writes: true
|
|
4995
|
+
},
|
|
4996
|
+
{
|
|
4997
|
+
name: "page-comments resolve",
|
|
4998
|
+
args: ["commentId"],
|
|
4999
|
+
required: ["--yes or --dry-run"],
|
|
5000
|
+
writes: true
|
|
5001
|
+
},
|
|
5002
|
+
{
|
|
5003
|
+
name: "page-comments reopen",
|
|
5004
|
+
args: ["commentId"],
|
|
5005
|
+
required: ["--yes or --dry-run"],
|
|
5006
|
+
writes: true
|
|
5007
|
+
},
|
|
5008
|
+
{
|
|
5009
|
+
name: "page-comments delete",
|
|
5010
|
+
args: ["commentId"],
|
|
5011
|
+
required: ["--yes or --dry-run"],
|
|
5012
|
+
writes: true,
|
|
5013
|
+
destructive: true
|
|
5014
|
+
},
|
|
5015
|
+
{
|
|
5016
|
+
name: "admin-ingest repair-state",
|
|
5017
|
+
required: ["--instance"],
|
|
5018
|
+
writes: false
|
|
5019
|
+
},
|
|
5020
|
+
{
|
|
5021
|
+
name: "admin-ingest repair",
|
|
5022
|
+
required: ["--instance"],
|
|
5023
|
+
flags: ["--yes", "--dry-run"],
|
|
5024
|
+
writes: true
|
|
5025
|
+
},
|
|
4059
5026
|
{ name: "instances create-plan", writes: false },
|
|
4060
|
-
{
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
{
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
5027
|
+
{
|
|
5028
|
+
name: "instances create",
|
|
5029
|
+
flags: ["--data", "--yes", "--dry-run"],
|
|
5030
|
+
writes: true
|
|
5031
|
+
},
|
|
5032
|
+
{
|
|
5033
|
+
name: "entities list",
|
|
5034
|
+
required: ["--instance"],
|
|
5035
|
+
flags: ["--language"],
|
|
5036
|
+
writes: false
|
|
5037
|
+
},
|
|
5038
|
+
{
|
|
5039
|
+
name: "entities detail",
|
|
5040
|
+
args: ["entityId"],
|
|
5041
|
+
required: ["--instance"],
|
|
5042
|
+
flags: ["--language"],
|
|
5043
|
+
writes: false
|
|
5044
|
+
},
|
|
5045
|
+
{
|
|
5046
|
+
name: "entities access-summary",
|
|
5047
|
+
required: ["--instance"],
|
|
5048
|
+
writes: false
|
|
5049
|
+
},
|
|
5050
|
+
{
|
|
5051
|
+
name: "entities sync-google-groups",
|
|
5052
|
+
required: ["--instance"],
|
|
5053
|
+
flags: ["--yes", "--dry-run"],
|
|
5054
|
+
writes: true
|
|
5055
|
+
},
|
|
5056
|
+
{
|
|
5057
|
+
name: "entities save-access-rules",
|
|
5058
|
+
required: ["--instance", "--entity-ids"],
|
|
5059
|
+
flags: ["--yes", "--dry-run"],
|
|
5060
|
+
writes: true
|
|
5061
|
+
},
|
|
5062
|
+
{
|
|
5063
|
+
name: "entities set-restrictions",
|
|
5064
|
+
args: ["entityId"],
|
|
5065
|
+
required: ["--instance"],
|
|
5066
|
+
flags: ["--category-ids", "--learning-path-ids", "--alpha-program-ids", "--alpha-all-programs", "--yes", "--dry-run"],
|
|
5067
|
+
writes: true
|
|
5068
|
+
},
|
|
5069
|
+
{
|
|
5070
|
+
name: "entities set-page-visibility",
|
|
5071
|
+
required: ["--instance", "--page"],
|
|
5072
|
+
flags: ["--entity-ids", "--yes", "--dry-run"],
|
|
5073
|
+
writes: true
|
|
5074
|
+
},
|
|
5075
|
+
{
|
|
5076
|
+
name: "org-units-sync google",
|
|
5077
|
+
required: ["--instance"],
|
|
5078
|
+
flags: ["--yes", "--dry-run"],
|
|
5079
|
+
writes: true
|
|
5080
|
+
},
|
|
5081
|
+
{
|
|
5082
|
+
name: "ambassadors label",
|
|
5083
|
+
required: ["--instance"],
|
|
5084
|
+
flags: ["--language"],
|
|
5085
|
+
writes: false
|
|
5086
|
+
},
|
|
4070
5087
|
...resources.flatMap((resource) => [
|
|
4071
|
-
{
|
|
5088
|
+
{
|
|
5089
|
+
name: `${resource.name} list`,
|
|
5090
|
+
writes: false,
|
|
5091
|
+
flags: ["--where", "--fields", "--take", "--skip", "--order-by", "--instance", "--dry-run"]
|
|
5092
|
+
},
|
|
4072
5093
|
{ name: `${resource.name} get`, args: ["id"], writes: false },
|
|
4073
|
-
{
|
|
4074
|
-
|
|
4075
|
-
|
|
5094
|
+
{
|
|
5095
|
+
name: `${resource.name} create`,
|
|
5096
|
+
flags: [
|
|
5097
|
+
"--data",
|
|
5098
|
+
"--data-file",
|
|
5099
|
+
"--instance",
|
|
5100
|
+
...UPLOADABLE_RESOURCE_NAMES.has(resource.name) ? ["--upload-file", "--upload-name", "--mime-type"] : [],
|
|
5101
|
+
"--yes",
|
|
5102
|
+
"--dry-run"
|
|
5103
|
+
],
|
|
5104
|
+
writes: true
|
|
5105
|
+
},
|
|
5106
|
+
{
|
|
5107
|
+
name: `${resource.name} update`,
|
|
5108
|
+
args: ["id"],
|
|
5109
|
+
flags: [
|
|
5110
|
+
"--data",
|
|
5111
|
+
"--data-file",
|
|
5112
|
+
"--instance",
|
|
5113
|
+
...UPLOADABLE_RESOURCE_NAMES.has(resource.name) ? ["--upload-file", "--upload-name", "--mime-type"] : [],
|
|
5114
|
+
"--yes",
|
|
5115
|
+
"--dry-run"
|
|
5116
|
+
],
|
|
5117
|
+
writes: true
|
|
5118
|
+
},
|
|
5119
|
+
{
|
|
5120
|
+
name: `${resource.name} delete`,
|
|
5121
|
+
args: ["id"],
|
|
5122
|
+
flags: ["--force", "--confirm-delete", "--yes", "--dry-run"],
|
|
5123
|
+
writes: true,
|
|
5124
|
+
destructive: false,
|
|
5125
|
+
softOnly: true
|
|
5126
|
+
}
|
|
4076
5127
|
])
|
|
4077
5128
|
],
|
|
4078
5129
|
resources: resources.map((resource) => ({
|
|
@@ -4085,11 +5136,7 @@ var schemaHelp = () => ({
|
|
|
4085
5136
|
}))
|
|
4086
5137
|
});
|
|
4087
5138
|
var authHelp = () => ({
|
|
4088
|
-
usage: [
|
|
4089
|
-
"gskills-admin auth login --base-url https://g-skills.fr",
|
|
4090
|
-
"gskills-admin auth whoami",
|
|
4091
|
-
"gskills-admin auth logout"
|
|
4092
|
-
],
|
|
5139
|
+
usage: ["gskills-admin auth login --base-url https://g-skills.fr", "gskills-admin auth whoami", "gskills-admin auth logout"],
|
|
4093
5140
|
note: "The browser logs into GSkills. Every API request re-checks SUPER_ADMIN in GSkills before touching the DB."
|
|
4094
5141
|
});
|
|
4095
5142
|
var skillsHelp = () => ({
|
|
@@ -4129,7 +5176,7 @@ var cacheHelp = () => ({
|
|
|
4129
5176
|
"gskills-admin cache invalidate --instance <instanceId> --scope menu-bundle --yes",
|
|
4130
5177
|
"gskills-admin cache invalidate --instance <instanceId> --scope all --yes"
|
|
4131
5178
|
],
|
|
4132
|
-
scopes: ["all", "pages", "pages-knowledge", "menu-bundle", "applications"],
|
|
5179
|
+
scopes: ["all", "pages", "pages-knowledge", "menu-bundle", "applications", "learning-paths", "resources"],
|
|
4133
5180
|
note: "Uses the same deploy-cache version bump system as the super-admin content settings screen."
|
|
4134
5181
|
});
|
|
4135
5182
|
var translateHelp = () => ({
|
|
@@ -4148,19 +5195,7 @@ var translateHelp = () => ({
|
|
|
4148
5195
|
"gskills-admin translate chromebook-exercises <exerciseId> --to en --yes",
|
|
4149
5196
|
"gskills-admin translate changelogs <changelogId> --to all --concurrency 8 --yes"
|
|
4150
5197
|
],
|
|
4151
|
-
contentKinds: [
|
|
4152
|
-
"pages",
|
|
4153
|
-
"quizzes",
|
|
4154
|
-
"topics",
|
|
4155
|
-
"badges",
|
|
4156
|
-
"menus",
|
|
4157
|
-
"menu-sections",
|
|
4158
|
-
"internal-knowledge",
|
|
4159
|
-
"knowledge-video",
|
|
4160
|
-
"learning-paths",
|
|
4161
|
-
"chromebook-exercises",
|
|
4162
|
-
"changelogs"
|
|
4163
|
-
],
|
|
5198
|
+
contentKinds: ["pages", "quizzes", "topics", "badges", "menus", "menu-sections", "internal-knowledge", "knowledge-video", "learning-paths", "chromebook-exercises", "changelogs"],
|
|
4164
5199
|
modes: ["upsert", "create", "update", "patch"],
|
|
4165
5200
|
selection: "Pass one id, --ids for several source rows, or --all with optional --instance, --from, --where and --take.",
|
|
4166
5201
|
warning: PAGE_TRANSLATION_REWRITE_WARNING,
|
|
@@ -4211,8 +5246,18 @@ var importedSheetsHelp = () => ({
|
|
|
4211
5246
|
displayName: "Cas d'usage Gemini",
|
|
4212
5247
|
enabledLocales: ["fr", "en", "es"],
|
|
4213
5248
|
multilangMode: "AI_TRANSLATION",
|
|
4214
|
-
defaultLocaleSource: {
|
|
4215
|
-
|
|
5249
|
+
defaultLocaleSource: {
|
|
5250
|
+
locale: "fr",
|
|
5251
|
+
sourceInput: "https://docs.google.com/spreadsheets/d/...",
|
|
5252
|
+
tabName: "FR"
|
|
5253
|
+
},
|
|
5254
|
+
localeSources: [
|
|
5255
|
+
{
|
|
5256
|
+
locale: "fr",
|
|
5257
|
+
sourceInput: "https://docs.google.com/spreadsheets/d/...",
|
|
5258
|
+
tabName: "FR"
|
|
5259
|
+
}
|
|
5260
|
+
],
|
|
4216
5261
|
ownerEmail: "admin@example.com",
|
|
4217
5262
|
enableVectorization: true,
|
|
4218
5263
|
vectorHeaders: ["Titre", "Description", "Prompt"]
|
|
@@ -4222,7 +5267,16 @@ var importedSheetsHelp = () => ({
|
|
|
4222
5267
|
ownerEmail: "admin@example.com",
|
|
4223
5268
|
viewMode: "LINE",
|
|
4224
5269
|
enableVectorization: true,
|
|
4225
|
-
columns: [
|
|
5270
|
+
columns: [
|
|
5271
|
+
{
|
|
5272
|
+
id: "column_id",
|
|
5273
|
+
isVisible: true,
|
|
5274
|
+
includeInVectorization: true,
|
|
5275
|
+
displayType: "TITLE",
|
|
5276
|
+
showLabel: false,
|
|
5277
|
+
displayOrder: 0
|
|
5278
|
+
}
|
|
5279
|
+
],
|
|
4226
5280
|
vectorHeaders: ["Titre", "Description", "Prompt"]
|
|
4227
5281
|
},
|
|
4228
5282
|
useCaseListFlow: [
|
|
@@ -4288,6 +5342,53 @@ var contentAssistantHelp = () => ({
|
|
|
4288
5342
|
],
|
|
4289
5343
|
note: "Reads recent content-assistant chats and artifact metadata so agents do not query Chat and ChatMessage directly."
|
|
4290
5344
|
});
|
|
5345
|
+
var governanceHelp = () => ({
|
|
5346
|
+
usage: [
|
|
5347
|
+
"gskills-admin governance list --instance global --output json",
|
|
5348
|
+
"gskills-admin governance list --instance <instanceId> --status TODO,IN_PROGRESS --mine --page-size 50",
|
|
5349
|
+
"gskills-admin governance get <entryId> --instance global",
|
|
5350
|
+
"gskills-admin governance comments-board --instance global --mine",
|
|
5351
|
+
"gskills-admin governance open-comment-count --instance global",
|
|
5352
|
+
"gskills-admin governance search --instance global --query Gmail",
|
|
5353
|
+
"gskills-admin governance options --instance global",
|
|
5354
|
+
"gskills-admin governance users",
|
|
5355
|
+
"gskills-admin governance instances",
|
|
5356
|
+
"gskills-admin governance create-task --entity-type page --entity-id <pageId> --status CHANGES_REQUESTED --task-title 'Relire la page' --dry-run",
|
|
5357
|
+
"gskills-admin governance upsert --entity-type page --entity-id <pageId> --status TO_REVIEW --dry-run",
|
|
5358
|
+
"gskills-admin governance update-task <entryId> --task-title 'À relire' --task-description-file ./details.md --dry-run",
|
|
5359
|
+
"gskills-admin governance set-assignees <entryId> --user-ids <userId,userId> --dry-run",
|
|
5360
|
+
"gskills-admin governance set-instance <entryId> --target-instance <instanceId> --dry-run",
|
|
5361
|
+
"gskills-admin governance set-instance <entryId> --clear --dry-run",
|
|
5362
|
+
"gskills-admin governance delete-task <entryId> --force --confirm-delete governance:<entryId> --dry-run",
|
|
5363
|
+
"gskills-admin governance comments list <entryId>",
|
|
5364
|
+
"gskills-admin governance comments add <entryId> --content-file ./comment.md --dry-run",
|
|
5365
|
+
"gskills-admin governance comments delete <commentId> --dry-run"
|
|
5366
|
+
],
|
|
5367
|
+
status: ["TODO", "IN_PROGRESS", "TO_REVIEW", "CHANGES_REQUESTED", "DONE", "CANCELLED"],
|
|
5368
|
+
classification: ["CONTENT", "PEDAGOGY", "TECHNICAL", "EDITORIAL"],
|
|
5369
|
+
note: "Uses the same content governance task board data and mutations as the super-admin UI."
|
|
5370
|
+
});
|
|
5371
|
+
var governanceCommentsHelp = () => ({
|
|
5372
|
+
usage: [
|
|
5373
|
+
"gskills-admin governance comments list <entryId>",
|
|
5374
|
+
"gskills-admin governance comments add <entryId> --content 'Vu, je relis ça.' --dry-run",
|
|
5375
|
+
"gskills-admin governance comments add <entryId> --content-file ./comment.md --yes",
|
|
5376
|
+
"gskills-admin governance comments delete <commentId> --dry-run"
|
|
5377
|
+
],
|
|
5378
|
+
note: "These are task discussion comments attached to targetType=GOVERNANCE_ENTRY."
|
|
5379
|
+
});
|
|
5380
|
+
var pageCommentsHelp = () => ({
|
|
5381
|
+
usage: [
|
|
5382
|
+
"gskills-admin page-comments list <pageId>",
|
|
5383
|
+
"gskills-admin page-comments add <pageId> --content-file ./comment.md --block-id <blockId> --anchor-quote-file ./quote.txt --dry-run",
|
|
5384
|
+
"gskills-admin page-comments add <pageId> --content '@[user_internal:<userId>] à corriger' --create-task --dry-run",
|
|
5385
|
+
"gskills-admin page-comments reply <parentCommentId> --content-file ./reply.md --dry-run",
|
|
5386
|
+
"gskills-admin page-comments resolve <commentId> --dry-run",
|
|
5387
|
+
"gskills-admin page-comments reopen <commentId> --dry-run",
|
|
5388
|
+
"gskills-admin page-comments delete <commentId> --dry-run"
|
|
5389
|
+
],
|
|
5390
|
+
note: "Page comments are stored on the canonical source page, so instance copies share the same thread set."
|
|
5391
|
+
});
|
|
4291
5392
|
var adminIngestHelp = () => ({
|
|
4292
5393
|
usage: [
|
|
4293
5394
|
"gskills-admin admin-ingest repair-state --instance <instanceId>",
|
|
@@ -4349,10 +5450,7 @@ var entitiesHelp = () => ({
|
|
|
4349
5450
|
note: "Entity ids use the shared admin entity format: manual-group:<id>, org-unit:<id>, google-group:<email>."
|
|
4350
5451
|
});
|
|
4351
5452
|
var orgUnitsSyncHelp = () => ({
|
|
4352
|
-
usage: [
|
|
4353
|
-
"gskills-admin org-units-sync google --instance <instanceId> --dry-run",
|
|
4354
|
-
"gskills-admin org-units-sync google --instance <instanceId> --yes"
|
|
4355
|
-
],
|
|
5453
|
+
usage: ["gskills-admin org-units-sync google --instance <instanceId> --dry-run", "gskills-admin org-units-sync google --instance <instanceId> --yes"],
|
|
4356
5454
|
note: "Uses the same Google Admin OU sync engine as the instance admin UI."
|
|
4357
5455
|
});
|
|
4358
5456
|
var resourceHelp = (resource) => ({
|
|
@@ -4366,7 +5464,9 @@ var resourceHelp = (resource) => ({
|
|
|
4366
5464
|
`gskills-admin ${resource.name} update <id> --data '{"disabled":true}' --yes`,
|
|
4367
5465
|
`gskills-admin ${resource.name} delete <id> --force --confirm-delete ${resource.name}:<id> --yes`,
|
|
4368
5466
|
...resource.name === "internal-knowledge" ? [`gskills-admin ${resource.name} create --instance <instanceId> --upload-file ./video.mp4 --data '{"title":"Video","language":"fr","isActive":true}' --dry-run`] : [],
|
|
4369
|
-
...resource.name === "resources" ? [
|
|
5467
|
+
...resource.name === "resources" ? [
|
|
5468
|
+
`gskills-admin ${resource.name} create --instance <instanceId> --upload-file ./webinar.mp4 --data '{"title":"Webinar","type":"WEBINAR","language":"fr","isActive":true}' --dry-run`
|
|
5469
|
+
] : [],
|
|
4370
5470
|
...resource.name === "learning-paths" ? [
|
|
4371
5471
|
`gskills-admin ${resource.name} icons --query Gmail`,
|
|
4372
5472
|
`gskills-admin ${resource.name} set-icon <id> --app Gmail --dry-run`,
|
|
@@ -4392,8 +5492,16 @@ var resourceHelp = (resource) => ({
|
|
|
4392
5492
|
guardRails: ["dry-run preview", "test operations", "optional updatedAt/version/content SHA checks", "page history snapshot"],
|
|
4393
5493
|
schema: "gskills-admin pages content-schema --output json",
|
|
4394
5494
|
examplePatch: [
|
|
4395
|
-
{
|
|
4396
|
-
|
|
5495
|
+
{
|
|
5496
|
+
op: "test",
|
|
5497
|
+
path: "/blocks/0/type",
|
|
5498
|
+
value: "paragraph"
|
|
5499
|
+
},
|
|
5500
|
+
{
|
|
5501
|
+
op: "replace",
|
|
5502
|
+
path: "/blocks/0/data/text",
|
|
5503
|
+
value: "New paragraph text"
|
|
5504
|
+
}
|
|
4397
5505
|
]
|
|
4398
5506
|
},
|
|
4399
5507
|
blockHelpers: {
|