@egdesk/next-api-plugin 1.4.5 → 1.5.0

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.
@@ -513,22 +513,44 @@ export async function getHometaxSyncHistory(limit: number = 50) {
513
513
  }
514
514
 
515
515
  /**
516
- * Query promissory notes (promissory_notes: 어음, issued/received)
516
+ * List per-(bank, product) bank-product tables — bank-side product data
517
+ * downloaded from bank portals that isn't core deposit/card transactions
518
+ * (loans, receivables, e-bills, etc.). Returns table slugs, displayName,
519
+ * column schemas, and row counts. ALWAYS call this first to discover
520
+ * what tables exist before calling queryBankProductTable.
517
521
  */
518
- export async function queryPromissoryNotes(options: {
519
- bankId?: string;
520
- accountId?: string;
521
- status?: string;
522
- noteType?: 'issued' | 'received';
523
- maturityStart?: string;
524
- maturityEnd?: string;
525
- issueStart?: string;
526
- issueEnd?: string;
527
- searchText?: string;
522
+ export async function listBankProductTables() {
523
+ return callFinanceHubTool('financehub_list_bank_product_tables', {});
524
+ }
525
+
526
+ /**
527
+ * Generic safe query against any per-(bank, product) table from
528
+ * listBankProductTables. Filters use the table's exact column names
529
+ * (snake_case). Returns rows with totalMatching, limit, offset.
530
+ *
531
+ * @example
532
+ * queryBankProductTable({
533
+ * tableSlug: 'ibk_loan_transactions',
534
+ * filters: [
535
+ * { column: 'account_number', op: '=', value: '306-063568-04-036' },
536
+ * { column: 'transaction_amount', op: '>', value: 1000000 },
537
+ * ],
538
+ * orderBy: { column: 'transaction_date', direction: 'DESC' },
539
+ * limit: 50,
540
+ * });
541
+ */
542
+ export async function queryBankProductTable(options: {
543
+ tableSlug: string;
544
+ filters?: Array<{
545
+ column: string;
546
+ op: '=' | '!=' | '>' | '<' | '>=' | '<=' | 'like' | 'in';
547
+ value: string | number | Array<string | number>;
548
+ }>;
549
+ orderBy?: { column: string; direction?: 'ASC' | 'DESC' };
528
550
  limit?: number;
529
551
  offset?: number;
530
- } = {}) {
531
- return callFinanceHubTool('financehub_query_promissory_notes', options);
552
+ }) {
553
+ return callFinanceHubTool('financehub_query_bank_product_table', options);
532
554
  }
533
555
 
534
556
  // ==========================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egdesk/next-api-plugin",
3
- "version": "1.4.5",
3
+ "version": "1.5.0",
4
4
  "description": "Next.js plugin for EGDesk database proxy integration",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -480,22 +480,44 @@ export async function getHometaxSyncHistory(limit: number = 50) {
480
480
  }
481
481
 
482
482
  /**
483
- * Query promissory notes (promissory_notes: 어음, issued/received)
483
+ * List per-(bank, product) bank-product tables — bank-side product data
484
+ * downloaded from bank portals that isn't core deposit/card transactions
485
+ * (loans, receivables, e-bills, etc.). Returns table slugs, displayName,
486
+ * column schemas, and row counts. ALWAYS call this first to discover
487
+ * what tables exist before calling queryBankProductTable.
484
488
  */
485
- export async function queryPromissoryNotes(options: {
486
- bankId?: string;
487
- accountId?: string;
488
- status?: string;
489
- noteType?: 'issued' | 'received';
490
- maturityStart?: string;
491
- maturityEnd?: string;
492
- issueStart?: string;
493
- issueEnd?: string;
494
- searchText?: string;
489
+ export async function listBankProductTables() {
490
+ return callFinanceHubTool('financehub_list_bank_product_tables', {});
491
+ }
492
+
493
+ /**
494
+ * Generic safe query against any per-(bank, product) table from
495
+ * listBankProductTables. Filters use the table's exact column names
496
+ * (snake_case). Returns rows with totalMatching, limit, offset.
497
+ *
498
+ * @example
499
+ * queryBankProductTable({
500
+ * tableSlug: 'ibk_loan_transactions',
501
+ * filters: [
502
+ * { column: 'account_number', op: '=', value: '306-063568-04-036' },
503
+ * { column: 'transaction_amount', op: '>', value: 1000000 },
504
+ * ],
505
+ * orderBy: { column: 'transaction_date', direction: 'DESC' },
506
+ * limit: 50,
507
+ * });
508
+ */
509
+ export async function queryBankProductTable(options: {
510
+ tableSlug: string;
511
+ filters?: Array<{
512
+ column: string;
513
+ op: '=' | '!=' | '>' | '<' | '>=' | '<=' | 'like' | 'in';
514
+ value: string | number | Array<string | number>;
515
+ }>;
516
+ orderBy?: { column: string; direction?: 'ASC' | 'DESC' };
495
517
  limit?: number;
496
518
  offset?: number;
497
- } = {}) {
498
- return callFinanceHubTool('financehub_query_promissory_notes', options);
519
+ }) {
520
+ return callFinanceHubTool('financehub_query_bank_product_table', options);
499
521
  }
500
522
 
501
523
  // ==========================================