@egdesk/next-api-plugin 1.4.0 → 1.4.1
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/dist/generate-helpers.js +28 -0
- package/package.json +1 -1
- package/src/generate-helpers.ts +28 -0
package/dist/generate-helpers.js
CHANGED
|
@@ -602,6 +602,34 @@ export async function getKnowledgeByCategory(
|
|
|
602
602
|
return callInternalKnowledgeTool('knowledge_get_by_category', { snapshotId, category });
|
|
603
603
|
}
|
|
604
604
|
|
|
605
|
+
/** Create a new knowledge document */
|
|
606
|
+
export async function createKnowledgeDocument(
|
|
607
|
+
snapshotId: string,
|
|
608
|
+
title: string,
|
|
609
|
+
category: 'hierarchy' | 'process' | 'policy' | 'note',
|
|
610
|
+
content?: string
|
|
611
|
+
) {
|
|
612
|
+
return callInternalKnowledgeTool('knowledge_create_document', {
|
|
613
|
+
snapshotId,
|
|
614
|
+
title,
|
|
615
|
+
category,
|
|
616
|
+
...(content != null ? { content } : {})
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/** Update an existing knowledge document */
|
|
621
|
+
export async function updateKnowledgeDocument(
|
|
622
|
+
documentId: string,
|
|
623
|
+
updates: { title?: string; category?: 'hierarchy' | 'process' | 'policy' | 'note'; content?: string }
|
|
624
|
+
) {
|
|
625
|
+
return callInternalKnowledgeTool('knowledge_update_document', { documentId, ...updates });
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/** Delete a knowledge document */
|
|
629
|
+
export async function deleteKnowledgeDocument(documentId: string) {
|
|
630
|
+
return callInternalKnowledgeTool('knowledge_delete_document', { documentId });
|
|
631
|
+
}
|
|
632
|
+
|
|
605
633
|
/** List business identity snapshots (optional brand filter) */
|
|
606
634
|
export async function listBusinessIdentitySnapshots(brandKey?: string) {
|
|
607
635
|
return callInternalKnowledgeTool('businessidentity_list_snapshots', {
|
package/package.json
CHANGED
package/src/generate-helpers.ts
CHANGED
|
@@ -569,6 +569,34 @@ export async function getKnowledgeByCategory(
|
|
|
569
569
|
return callInternalKnowledgeTool('knowledge_get_by_category', { snapshotId, category });
|
|
570
570
|
}
|
|
571
571
|
|
|
572
|
+
/** Create a new knowledge document */
|
|
573
|
+
export async function createKnowledgeDocument(
|
|
574
|
+
snapshotId: string,
|
|
575
|
+
title: string,
|
|
576
|
+
category: 'hierarchy' | 'process' | 'policy' | 'note',
|
|
577
|
+
content?: string
|
|
578
|
+
) {
|
|
579
|
+
return callInternalKnowledgeTool('knowledge_create_document', {
|
|
580
|
+
snapshotId,
|
|
581
|
+
title,
|
|
582
|
+
category,
|
|
583
|
+
...(content != null ? { content } : {})
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/** Update an existing knowledge document */
|
|
588
|
+
export async function updateKnowledgeDocument(
|
|
589
|
+
documentId: string,
|
|
590
|
+
updates: { title?: string; category?: 'hierarchy' | 'process' | 'policy' | 'note'; content?: string }
|
|
591
|
+
) {
|
|
592
|
+
return callInternalKnowledgeTool('knowledge_update_document', { documentId, ...updates });
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/** Delete a knowledge document */
|
|
596
|
+
export async function deleteKnowledgeDocument(documentId: string) {
|
|
597
|
+
return callInternalKnowledgeTool('knowledge_delete_document', { documentId });
|
|
598
|
+
}
|
|
599
|
+
|
|
572
600
|
/** List business identity snapshots (optional brand filter) */
|
|
573
601
|
export async function listBusinessIdentitySnapshots(brandKey?: string) {
|
|
574
602
|
return callInternalKnowledgeTool('businessidentity_list_snapshots', {
|