@egdesk/next-api-plugin 1.5.1 → 1.5.3
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 +188 -1
- package/package.json +1 -1
- package/src/generate-helpers.ts +188 -1
package/dist/generate-helpers.js
CHANGED
|
@@ -554,6 +554,102 @@ export async function queryBankProductTable(options: {
|
|
|
554
554
|
return callFinanceHubTool('financehub_query_bank_product_table', options);
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
+
/**
|
|
558
|
+
* Create or update a bank/card account (no credentials).
|
|
559
|
+
*/
|
|
560
|
+
export async function upsertFinanceHubAccount(account: {
|
|
561
|
+
bankId: string;
|
|
562
|
+
accountNumber: string;
|
|
563
|
+
accountName?: string;
|
|
564
|
+
customerName?: string;
|
|
565
|
+
balance?: number;
|
|
566
|
+
availableBalance?: number;
|
|
567
|
+
currency?: string;
|
|
568
|
+
accountType?: string;
|
|
569
|
+
openDate?: string;
|
|
570
|
+
metadata?: Record<string, unknown>;
|
|
571
|
+
}) {
|
|
572
|
+
return callFinanceHubTool('financehub_upsert_account', account);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Import bank or card transactions (deduplicated). Max 1000 per call.
|
|
577
|
+
*/
|
|
578
|
+
export async function importFinanceHubTransactions(options: {
|
|
579
|
+
bankId: string;
|
|
580
|
+
accountData: {
|
|
581
|
+
accountNumber: string;
|
|
582
|
+
accountName?: string;
|
|
583
|
+
customerName?: string;
|
|
584
|
+
balance?: number;
|
|
585
|
+
availableBalance?: number;
|
|
586
|
+
openDate?: string;
|
|
587
|
+
};
|
|
588
|
+
transactions: Array<Record<string, unknown>>;
|
|
589
|
+
syncMetadata: {
|
|
590
|
+
queryPeriodStart: string;
|
|
591
|
+
queryPeriodEnd: string;
|
|
592
|
+
filePath?: string;
|
|
593
|
+
};
|
|
594
|
+
isCard?: boolean;
|
|
595
|
+
}) {
|
|
596
|
+
return callFinanceHubTool('financehub_import_transactions', options);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Upsert rows into a bank-product table (loans, receivables, etc.). Max 500 per call.
|
|
601
|
+
*/
|
|
602
|
+
export async function upsertFinanceHubBankProductRows(options: {
|
|
603
|
+
tableSlug: string;
|
|
604
|
+
rows: Array<Record<string, unknown>>;
|
|
605
|
+
}) {
|
|
606
|
+
return callFinanceHubTool('financehub_upsert_bank_product_rows', options);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Delete an account and all its transactions/sync rows (not credentials).
|
|
611
|
+
*/
|
|
612
|
+
export async function deleteFinanceHubAccount(bankId: string, accountNumber: string) {
|
|
613
|
+
return callFinanceHubTool('financehub_delete_account', { bankId, accountNumber });
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Delete all imported data for a bankId (accounts, transactions, sync ops).
|
|
618
|
+
*/
|
|
619
|
+
export async function deleteFinanceHubImportedDataForBank(bankId: string) {
|
|
620
|
+
return callFinanceHubTool('financehub_delete_imported_data_for_bank', { bankId });
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Delete transactions by account scope, date range, and/or ids (max 500 ids).
|
|
625
|
+
*/
|
|
626
|
+
export async function deleteFinanceHubTransactions(options: {
|
|
627
|
+
accountId?: string;
|
|
628
|
+
bankId?: string;
|
|
629
|
+
accountNumber?: string;
|
|
630
|
+
startDate?: string;
|
|
631
|
+
endDate?: string;
|
|
632
|
+
transactionIds?: string[];
|
|
633
|
+
isCard?: boolean;
|
|
634
|
+
}) {
|
|
635
|
+
return callFinanceHubTool('financehub_delete_transactions', options);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Delete bank-product table rows by ids and/or filters (max 1000 rows).
|
|
640
|
+
*/
|
|
641
|
+
export async function deleteFinanceHubBankProductRows(options: {
|
|
642
|
+
tableSlug: string;
|
|
643
|
+
ids?: string[];
|
|
644
|
+
filters?: Array<{
|
|
645
|
+
column: string;
|
|
646
|
+
op: '=' | '!=' | '>' | '<' | '>=' | '<=' | 'like' | 'in';
|
|
647
|
+
value: string | number | Array<string | number>;
|
|
648
|
+
}>;
|
|
649
|
+
}) {
|
|
650
|
+
return callFinanceHubTool('financehub_delete_bank_product_rows', options);
|
|
651
|
+
}
|
|
652
|
+
|
|
557
653
|
// ==========================================
|
|
558
654
|
// INTERNAL KNOWLEDGE / BUSINESS IDENTITY / COMPANY RESEARCH (MCP)
|
|
559
655
|
// ==========================================
|
|
@@ -772,6 +868,9 @@ export async function getBrowserRecordingReplayOptions(testFile: string) {
|
|
|
772
868
|
}
|
|
773
869
|
|
|
774
870
|
export type BrowserRecordingRunOptions = {
|
|
871
|
+
headless?: boolean;
|
|
872
|
+
/** Save headless preference for scheduled runs */
|
|
873
|
+
persistHeadless?: boolean;
|
|
775
874
|
startDate?: string;
|
|
776
875
|
endDate?: string;
|
|
777
876
|
datePickersByIndex?: string[];
|
|
@@ -779,7 +878,18 @@ export type BrowserRecordingRunOptions = {
|
|
|
779
878
|
labeledFieldFills?: (string | undefined)[][];
|
|
780
879
|
};
|
|
781
880
|
|
|
782
|
-
|
|
881
|
+
export type BrowserRecordingScheduleOptions = {
|
|
882
|
+
testName?: string;
|
|
883
|
+
scheduledTime?: string;
|
|
884
|
+
frequencyType?: 'daily' | 'weekly' | 'monthly' | 'custom';
|
|
885
|
+
dayOfWeek?: number;
|
|
886
|
+
dayOfMonth?: number;
|
|
887
|
+
customIntervalDays?: number;
|
|
888
|
+
enabled?: boolean;
|
|
889
|
+
headless?: boolean;
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
/** Replay a saved recording in Chrome (optional headless, dates + labeledFieldFills) */
|
|
783
893
|
export async function runBrowserRecording(
|
|
784
894
|
testFile: string,
|
|
785
895
|
options: BrowserRecordingRunOptions = {}
|
|
@@ -790,6 +900,83 @@ export async function runBrowserRecording(
|
|
|
790
900
|
});
|
|
791
901
|
}
|
|
792
902
|
|
|
903
|
+
/** List Playwright scheduler entries for browser recorder tests */
|
|
904
|
+
export async function listBrowserRecordingSchedules() {
|
|
905
|
+
return callBrowserRecordingTool('browser_recording_list_schedules', {});
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
/** Get schedule for a test file, or null */
|
|
909
|
+
export async function getBrowserRecordingSchedule(testFile: string) {
|
|
910
|
+
return callBrowserRecordingTool('browser_recording_get_schedule', { testFile });
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
/** Create or update a recurring schedule for a saved test */
|
|
914
|
+
export async function setBrowserRecordingSchedule(
|
|
915
|
+
testFile: string,
|
|
916
|
+
options: BrowserRecordingScheduleOptions = {}
|
|
917
|
+
) {
|
|
918
|
+
return callBrowserRecordingTool('browser_recording_set_schedule', {
|
|
919
|
+
testFile,
|
|
920
|
+
...options
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/** Remove scheduler entry for a test file */
|
|
925
|
+
export async function removeBrowserRecordingSchedule(testFile: string) {
|
|
926
|
+
return callBrowserRecordingTool('browser_recording_remove_schedule', { testFile });
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
export type BrowserRecordingSyncConfigOptions = {
|
|
930
|
+
testFile?: string;
|
|
931
|
+
scriptFolderPath?: string;
|
|
932
|
+
scriptName?: string;
|
|
933
|
+
targetTableId?: string;
|
|
934
|
+
columnMappings?: Record<string, string>;
|
|
935
|
+
headerRow?: number;
|
|
936
|
+
skipBottomRows?: number;
|
|
937
|
+
sheetIndex?: number;
|
|
938
|
+
appliedSplits?: Array<{ originalColumn: string; dateColumn: string; numberColumn: string }>;
|
|
939
|
+
uniqueKeyColumns?: string[];
|
|
940
|
+
duplicateAction?: 'skip' | 'update' | 'allow' | 'replace-date-range' | 'replace-all';
|
|
941
|
+
fileAction?: 'keep' | 'archive' | 'delete';
|
|
942
|
+
enabled?: boolean;
|
|
943
|
+
autoSyncEnabled?: boolean;
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
/** List EGDesk-Browser download folders with Excel/CSV files */
|
|
947
|
+
export async function listBrowserRecordingDownloadFolders() {
|
|
948
|
+
return callBrowserRecordingTool('browser_recording_list_download_folders', {});
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
/** List sync-to-SQL configs for browser downloads */
|
|
952
|
+
export async function listBrowserRecordingSyncConfigs() {
|
|
953
|
+
return callBrowserRecordingTool('browser_recording_list_sync_configs', {});
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
/** Get sync config by testFile or scriptFolderPath */
|
|
957
|
+
export async function getBrowserRecordingSyncConfig(opts: {
|
|
958
|
+
testFile?: string;
|
|
959
|
+
scriptFolderPath?: string;
|
|
960
|
+
}) {
|
|
961
|
+
return callBrowserRecordingTool('browser_recording_get_sync_config', opts);
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
/** Create or update sync-to-DB for a browser download folder */
|
|
965
|
+
export async function setBrowserRecordingSyncConfig(
|
|
966
|
+
opts: BrowserRecordingSyncConfigOptions
|
|
967
|
+
) {
|
|
968
|
+
return callBrowserRecordingTool('browser_recording_set_sync_config', opts);
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
/** Remove sync config by configId, testFile, or scriptFolderPath */
|
|
972
|
+
export async function removeBrowserRecordingSyncConfig(opts: {
|
|
973
|
+
configId?: string;
|
|
974
|
+
testFile?: string;
|
|
975
|
+
scriptFolderPath?: string;
|
|
976
|
+
}) {
|
|
977
|
+
return callBrowserRecordingTool('browser_recording_remove_sync_config', opts);
|
|
978
|
+
}
|
|
979
|
+
|
|
793
980
|
// ==========================================
|
|
794
981
|
// AI CENTER (workflows, entities, relations, tags)
|
|
795
982
|
// ==========================================
|
package/package.json
CHANGED
package/src/generate-helpers.ts
CHANGED
|
@@ -521,6 +521,102 @@ export async function queryBankProductTable(options: {
|
|
|
521
521
|
return callFinanceHubTool('financehub_query_bank_product_table', options);
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
+
/**
|
|
525
|
+
* Create or update a bank/card account (no credentials).
|
|
526
|
+
*/
|
|
527
|
+
export async function upsertFinanceHubAccount(account: {
|
|
528
|
+
bankId: string;
|
|
529
|
+
accountNumber: string;
|
|
530
|
+
accountName?: string;
|
|
531
|
+
customerName?: string;
|
|
532
|
+
balance?: number;
|
|
533
|
+
availableBalance?: number;
|
|
534
|
+
currency?: string;
|
|
535
|
+
accountType?: string;
|
|
536
|
+
openDate?: string;
|
|
537
|
+
metadata?: Record<string, unknown>;
|
|
538
|
+
}) {
|
|
539
|
+
return callFinanceHubTool('financehub_upsert_account', account);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Import bank or card transactions (deduplicated). Max 1000 per call.
|
|
544
|
+
*/
|
|
545
|
+
export async function importFinanceHubTransactions(options: {
|
|
546
|
+
bankId: string;
|
|
547
|
+
accountData: {
|
|
548
|
+
accountNumber: string;
|
|
549
|
+
accountName?: string;
|
|
550
|
+
customerName?: string;
|
|
551
|
+
balance?: number;
|
|
552
|
+
availableBalance?: number;
|
|
553
|
+
openDate?: string;
|
|
554
|
+
};
|
|
555
|
+
transactions: Array<Record<string, unknown>>;
|
|
556
|
+
syncMetadata: {
|
|
557
|
+
queryPeriodStart: string;
|
|
558
|
+
queryPeriodEnd: string;
|
|
559
|
+
filePath?: string;
|
|
560
|
+
};
|
|
561
|
+
isCard?: boolean;
|
|
562
|
+
}) {
|
|
563
|
+
return callFinanceHubTool('financehub_import_transactions', options);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Upsert rows into a bank-product table (loans, receivables, etc.). Max 500 per call.
|
|
568
|
+
*/
|
|
569
|
+
export async function upsertFinanceHubBankProductRows(options: {
|
|
570
|
+
tableSlug: string;
|
|
571
|
+
rows: Array<Record<string, unknown>>;
|
|
572
|
+
}) {
|
|
573
|
+
return callFinanceHubTool('financehub_upsert_bank_product_rows', options);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Delete an account and all its transactions/sync rows (not credentials).
|
|
578
|
+
*/
|
|
579
|
+
export async function deleteFinanceHubAccount(bankId: string, accountNumber: string) {
|
|
580
|
+
return callFinanceHubTool('financehub_delete_account', { bankId, accountNumber });
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Delete all imported data for a bankId (accounts, transactions, sync ops).
|
|
585
|
+
*/
|
|
586
|
+
export async function deleteFinanceHubImportedDataForBank(bankId: string) {
|
|
587
|
+
return callFinanceHubTool('financehub_delete_imported_data_for_bank', { bankId });
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* Delete transactions by account scope, date range, and/or ids (max 500 ids).
|
|
592
|
+
*/
|
|
593
|
+
export async function deleteFinanceHubTransactions(options: {
|
|
594
|
+
accountId?: string;
|
|
595
|
+
bankId?: string;
|
|
596
|
+
accountNumber?: string;
|
|
597
|
+
startDate?: string;
|
|
598
|
+
endDate?: string;
|
|
599
|
+
transactionIds?: string[];
|
|
600
|
+
isCard?: boolean;
|
|
601
|
+
}) {
|
|
602
|
+
return callFinanceHubTool('financehub_delete_transactions', options);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Delete bank-product table rows by ids and/or filters (max 1000 rows).
|
|
607
|
+
*/
|
|
608
|
+
export async function deleteFinanceHubBankProductRows(options: {
|
|
609
|
+
tableSlug: string;
|
|
610
|
+
ids?: string[];
|
|
611
|
+
filters?: Array<{
|
|
612
|
+
column: string;
|
|
613
|
+
op: '=' | '!=' | '>' | '<' | '>=' | '<=' | 'like' | 'in';
|
|
614
|
+
value: string | number | Array<string | number>;
|
|
615
|
+
}>;
|
|
616
|
+
}) {
|
|
617
|
+
return callFinanceHubTool('financehub_delete_bank_product_rows', options);
|
|
618
|
+
}
|
|
619
|
+
|
|
524
620
|
// ==========================================
|
|
525
621
|
// INTERNAL KNOWLEDGE / BUSINESS IDENTITY / COMPANY RESEARCH (MCP)
|
|
526
622
|
// ==========================================
|
|
@@ -739,6 +835,9 @@ export async function getBrowserRecordingReplayOptions(testFile: string) {
|
|
|
739
835
|
}
|
|
740
836
|
|
|
741
837
|
export type BrowserRecordingRunOptions = {
|
|
838
|
+
headless?: boolean;
|
|
839
|
+
/** Save headless preference for scheduled runs */
|
|
840
|
+
persistHeadless?: boolean;
|
|
742
841
|
startDate?: string;
|
|
743
842
|
endDate?: string;
|
|
744
843
|
datePickersByIndex?: string[];
|
|
@@ -746,7 +845,18 @@ export type BrowserRecordingRunOptions = {
|
|
|
746
845
|
labeledFieldFills?: (string | undefined)[][];
|
|
747
846
|
};
|
|
748
847
|
|
|
749
|
-
|
|
848
|
+
export type BrowserRecordingScheduleOptions = {
|
|
849
|
+
testName?: string;
|
|
850
|
+
scheduledTime?: string;
|
|
851
|
+
frequencyType?: 'daily' | 'weekly' | 'monthly' | 'custom';
|
|
852
|
+
dayOfWeek?: number;
|
|
853
|
+
dayOfMonth?: number;
|
|
854
|
+
customIntervalDays?: number;
|
|
855
|
+
enabled?: boolean;
|
|
856
|
+
headless?: boolean;
|
|
857
|
+
};
|
|
858
|
+
|
|
859
|
+
/** Replay a saved recording in Chrome (optional headless, dates + labeledFieldFills) */
|
|
750
860
|
export async function runBrowserRecording(
|
|
751
861
|
testFile: string,
|
|
752
862
|
options: BrowserRecordingRunOptions = {}
|
|
@@ -757,6 +867,83 @@ export async function runBrowserRecording(
|
|
|
757
867
|
});
|
|
758
868
|
}
|
|
759
869
|
|
|
870
|
+
/** List Playwright scheduler entries for browser recorder tests */
|
|
871
|
+
export async function listBrowserRecordingSchedules() {
|
|
872
|
+
return callBrowserRecordingTool('browser_recording_list_schedules', {});
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
/** Get schedule for a test file, or null */
|
|
876
|
+
export async function getBrowserRecordingSchedule(testFile: string) {
|
|
877
|
+
return callBrowserRecordingTool('browser_recording_get_schedule', { testFile });
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/** Create or update a recurring schedule for a saved test */
|
|
881
|
+
export async function setBrowserRecordingSchedule(
|
|
882
|
+
testFile: string,
|
|
883
|
+
options: BrowserRecordingScheduleOptions = {}
|
|
884
|
+
) {
|
|
885
|
+
return callBrowserRecordingTool('browser_recording_set_schedule', {
|
|
886
|
+
testFile,
|
|
887
|
+
...options
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
/** Remove scheduler entry for a test file */
|
|
892
|
+
export async function removeBrowserRecordingSchedule(testFile: string) {
|
|
893
|
+
return callBrowserRecordingTool('browser_recording_remove_schedule', { testFile });
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
export type BrowserRecordingSyncConfigOptions = {
|
|
897
|
+
testFile?: string;
|
|
898
|
+
scriptFolderPath?: string;
|
|
899
|
+
scriptName?: string;
|
|
900
|
+
targetTableId?: string;
|
|
901
|
+
columnMappings?: Record<string, string>;
|
|
902
|
+
headerRow?: number;
|
|
903
|
+
skipBottomRows?: number;
|
|
904
|
+
sheetIndex?: number;
|
|
905
|
+
appliedSplits?: Array<{ originalColumn: string; dateColumn: string; numberColumn: string }>;
|
|
906
|
+
uniqueKeyColumns?: string[];
|
|
907
|
+
duplicateAction?: 'skip' | 'update' | 'allow' | 'replace-date-range' | 'replace-all';
|
|
908
|
+
fileAction?: 'keep' | 'archive' | 'delete';
|
|
909
|
+
enabled?: boolean;
|
|
910
|
+
autoSyncEnabled?: boolean;
|
|
911
|
+
};
|
|
912
|
+
|
|
913
|
+
/** List EGDesk-Browser download folders with Excel/CSV files */
|
|
914
|
+
export async function listBrowserRecordingDownloadFolders() {
|
|
915
|
+
return callBrowserRecordingTool('browser_recording_list_download_folders', {});
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
/** List sync-to-SQL configs for browser downloads */
|
|
919
|
+
export async function listBrowserRecordingSyncConfigs() {
|
|
920
|
+
return callBrowserRecordingTool('browser_recording_list_sync_configs', {});
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/** Get sync config by testFile or scriptFolderPath */
|
|
924
|
+
export async function getBrowserRecordingSyncConfig(opts: {
|
|
925
|
+
testFile?: string;
|
|
926
|
+
scriptFolderPath?: string;
|
|
927
|
+
}) {
|
|
928
|
+
return callBrowserRecordingTool('browser_recording_get_sync_config', opts);
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
/** Create or update sync-to-DB for a browser download folder */
|
|
932
|
+
export async function setBrowserRecordingSyncConfig(
|
|
933
|
+
opts: BrowserRecordingSyncConfigOptions
|
|
934
|
+
) {
|
|
935
|
+
return callBrowserRecordingTool('browser_recording_set_sync_config', opts);
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
/** Remove sync config by configId, testFile, or scriptFolderPath */
|
|
939
|
+
export async function removeBrowserRecordingSyncConfig(opts: {
|
|
940
|
+
configId?: string;
|
|
941
|
+
testFile?: string;
|
|
942
|
+
scriptFolderPath?: string;
|
|
943
|
+
}) {
|
|
944
|
+
return callBrowserRecordingTool('browser_recording_remove_sync_config', opts);
|
|
945
|
+
}
|
|
946
|
+
|
|
760
947
|
// ==========================================
|
|
761
948
|
// AI CENTER (workflows, entities, relations, tags)
|
|
762
949
|
// ==========================================
|