@egdesk/next-api-plugin 1.5.2 → 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.
@@ -606,6 +606,50 @@ export async function upsertFinanceHubBankProductRows(options: {
606
606
  return callFinanceHubTool('financehub_upsert_bank_product_rows', options);
607
607
  }
608
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
+
609
653
  // ==========================================
610
654
  // INTERNAL KNOWLEDGE / BUSINESS IDENTITY / COMPANY RESEARCH (MCP)
611
655
  // ==========================================
@@ -824,6 +868,9 @@ export async function getBrowserRecordingReplayOptions(testFile: string) {
824
868
  }
825
869
 
826
870
  export type BrowserRecordingRunOptions = {
871
+ headless?: boolean;
872
+ /** Save headless preference for scheduled runs */
873
+ persistHeadless?: boolean;
827
874
  startDate?: string;
828
875
  endDate?: string;
829
876
  datePickersByIndex?: string[];
@@ -831,7 +878,18 @@ export type BrowserRecordingRunOptions = {
831
878
  labeledFieldFills?: (string | undefined)[][];
832
879
  };
833
880
 
834
- /** Replay a saved recording in Chrome (optional dates + labeledFieldFills) */
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) */
835
893
  export async function runBrowserRecording(
836
894
  testFile: string,
837
895
  options: BrowserRecordingRunOptions = {}
@@ -842,6 +900,83 @@ export async function runBrowserRecording(
842
900
  });
843
901
  }
844
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
+
845
980
  // ==========================================
846
981
  // AI CENTER (workflows, entities, relations, tags)
847
982
  // ==========================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egdesk/next-api-plugin",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "Next.js plugin for EGDesk database proxy integration",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -573,6 +573,50 @@ export async function upsertFinanceHubBankProductRows(options: {
573
573
  return callFinanceHubTool('financehub_upsert_bank_product_rows', options);
574
574
  }
575
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
+
576
620
  // ==========================================
577
621
  // INTERNAL KNOWLEDGE / BUSINESS IDENTITY / COMPANY RESEARCH (MCP)
578
622
  // ==========================================
@@ -791,6 +835,9 @@ export async function getBrowserRecordingReplayOptions(testFile: string) {
791
835
  }
792
836
 
793
837
  export type BrowserRecordingRunOptions = {
838
+ headless?: boolean;
839
+ /** Save headless preference for scheduled runs */
840
+ persistHeadless?: boolean;
794
841
  startDate?: string;
795
842
  endDate?: string;
796
843
  datePickersByIndex?: string[];
@@ -798,7 +845,18 @@ export type BrowserRecordingRunOptions = {
798
845
  labeledFieldFills?: (string | undefined)[][];
799
846
  };
800
847
 
801
- /** Replay a saved recording in Chrome (optional dates + labeledFieldFills) */
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) */
802
860
  export async function runBrowserRecording(
803
861
  testFile: string,
804
862
  options: BrowserRecordingRunOptions = {}
@@ -809,6 +867,83 @@ export async function runBrowserRecording(
809
867
  });
810
868
  }
811
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
+
812
947
  // ==========================================
813
948
  // AI CENTER (workflows, entities, relations, tags)
814
949
  // ==========================================