@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.
- package/dist/generate-helpers.js +35 -13
- package/package.json +1 -1
- package/src/generate-helpers.ts +35 -13
package/dist/generate-helpers.js
CHANGED
|
@@ -513,22 +513,44 @@ export async function getHometaxSyncHistory(limit: number = 50) {
|
|
|
513
513
|
}
|
|
514
514
|
|
|
515
515
|
/**
|
|
516
|
-
*
|
|
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
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
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('
|
|
552
|
+
}) {
|
|
553
|
+
return callFinanceHubTool('financehub_query_bank_product_table', options);
|
|
532
554
|
}
|
|
533
555
|
|
|
534
556
|
// ==========================================
|
package/package.json
CHANGED
package/src/generate-helpers.ts
CHANGED
|
@@ -480,22 +480,44 @@ export async function getHometaxSyncHistory(limit: number = 50) {
|
|
|
480
480
|
}
|
|
481
481
|
|
|
482
482
|
/**
|
|
483
|
-
*
|
|
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
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
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('
|
|
519
|
+
}) {
|
|
520
|
+
return callFinanceHubTool('financehub_query_bank_product_table', options);
|
|
499
521
|
}
|
|
500
522
|
|
|
501
523
|
// ==========================================
|