@egdesk/next-api-plugin 1.4.0 → 1.4.2

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.
@@ -478,6 +478,20 @@ export async function queryTaxInvoices(options: {
478
478
  return callFinanceHubTool('financehub_query_tax_invoices', options);
479
479
  }
480
480
 
481
+ /**
482
+ * Query tax-exempt invoices synced from Hometax (tax_exempt_invoices table)
483
+ */
484
+ export async function queryTaxExemptInvoices(options: {
485
+ businessNumber?: string;
486
+ invoiceType?: 'sales' | 'purchase';
487
+ startDate?: string;
488
+ endDate?: string;
489
+ limit?: number;
490
+ offset?: number;
491
+ } = {}) {
492
+ return callFinanceHubTool('financehub_query_tax_exempt_invoices', options);
493
+ }
494
+
481
495
  /**
482
496
  * Query cash receipts synced from Hometax (cash_receipts table)
483
497
  */
@@ -602,6 +616,34 @@ export async function getKnowledgeByCategory(
602
616
  return callInternalKnowledgeTool('knowledge_get_by_category', { snapshotId, category });
603
617
  }
604
618
 
619
+ /** Create a new knowledge document */
620
+ export async function createKnowledgeDocument(
621
+ snapshotId: string,
622
+ title: string,
623
+ category: 'hierarchy' | 'process' | 'policy' | 'note',
624
+ content?: string
625
+ ) {
626
+ return callInternalKnowledgeTool('knowledge_create_document', {
627
+ snapshotId,
628
+ title,
629
+ category,
630
+ ...(content != null ? { content } : {})
631
+ });
632
+ }
633
+
634
+ /** Update an existing knowledge document */
635
+ export async function updateKnowledgeDocument(
636
+ documentId: string,
637
+ updates: { title?: string; category?: 'hierarchy' | 'process' | 'policy' | 'note'; content?: string }
638
+ ) {
639
+ return callInternalKnowledgeTool('knowledge_update_document', { documentId, ...updates });
640
+ }
641
+
642
+ /** Delete a knowledge document */
643
+ export async function deleteKnowledgeDocument(documentId: string) {
644
+ return callInternalKnowledgeTool('knowledge_delete_document', { documentId });
645
+ }
646
+
605
647
  /** List business identity snapshots (optional brand filter) */
606
648
  export async function listBusinessIdentitySnapshots(brandKey?: string) {
607
649
  return callInternalKnowledgeTool('businessidentity_list_snapshots', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egdesk/next-api-plugin",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Next.js plugin for EGDesk database proxy integration",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -445,6 +445,20 @@ export async function queryTaxInvoices(options: {
445
445
  return callFinanceHubTool('financehub_query_tax_invoices', options);
446
446
  }
447
447
 
448
+ /**
449
+ * Query tax-exempt invoices synced from Hometax (tax_exempt_invoices table)
450
+ */
451
+ export async function queryTaxExemptInvoices(options: {
452
+ businessNumber?: string;
453
+ invoiceType?: 'sales' | 'purchase';
454
+ startDate?: string;
455
+ endDate?: string;
456
+ limit?: number;
457
+ offset?: number;
458
+ } = {}) {
459
+ return callFinanceHubTool('financehub_query_tax_exempt_invoices', options);
460
+ }
461
+
448
462
  /**
449
463
  * Query cash receipts synced from Hometax (cash_receipts table)
450
464
  */
@@ -569,6 +583,34 @@ export async function getKnowledgeByCategory(
569
583
  return callInternalKnowledgeTool('knowledge_get_by_category', { snapshotId, category });
570
584
  }
571
585
 
586
+ /** Create a new knowledge document */
587
+ export async function createKnowledgeDocument(
588
+ snapshotId: string,
589
+ title: string,
590
+ category: 'hierarchy' | 'process' | 'policy' | 'note',
591
+ content?: string
592
+ ) {
593
+ return callInternalKnowledgeTool('knowledge_create_document', {
594
+ snapshotId,
595
+ title,
596
+ category,
597
+ ...(content != null ? { content } : {})
598
+ });
599
+ }
600
+
601
+ /** Update an existing knowledge document */
602
+ export async function updateKnowledgeDocument(
603
+ documentId: string,
604
+ updates: { title?: string; category?: 'hierarchy' | 'process' | 'policy' | 'note'; content?: string }
605
+ ) {
606
+ return callInternalKnowledgeTool('knowledge_update_document', { documentId, ...updates });
607
+ }
608
+
609
+ /** Delete a knowledge document */
610
+ export async function deleteKnowledgeDocument(documentId: string) {
611
+ return callInternalKnowledgeTool('knowledge_delete_document', { documentId });
612
+ }
613
+
572
614
  /** List business identity snapshots (optional brand filter) */
573
615
  export async function listBusinessIdentitySnapshots(brandKey?: string) {
574
616
  return callInternalKnowledgeTool('businessidentity_list_snapshots', {