@acorex/connectivity 20.6.0-next.9 → 20.6.1

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.
Files changed (19) hide show
  1. package/api/index.d.ts +35 -59
  2. package/fesm2022/{acorex-connectivity-api-execute.command-BwXw_Kn7.mjs → acorex-connectivity-api-execute.command-CQt_HF1B.mjs} +13 -4
  3. package/fesm2022/acorex-connectivity-api-execute.command-CQt_HF1B.mjs.map +1 -0
  4. package/fesm2022/acorex-connectivity-api.mjs +172 -245
  5. package/fesm2022/acorex-connectivity-api.mjs.map +1 -1
  6. package/fesm2022/{acorex-connectivity-mock-category-with-items.query-NY9J0cQ0.mjs → acorex-connectivity-mock-category-with-items.query-Dsxj98tX.mjs} +2 -2
  7. package/fesm2022/acorex-connectivity-mock-category-with-items.query-Dsxj98tX.mjs.map +1 -0
  8. package/fesm2022/{acorex-connectivity-mock-distribution-record.command-B-Xviv6G.mjs → acorex-connectivity-mock-distribution-record.command-DRiDwlqN.mjs} +12 -3
  9. package/fesm2022/acorex-connectivity-mock-distribution-record.command-DRiDwlqN.mjs.map +1 -0
  10. package/fesm2022/{acorex-connectivity-mock-sample.command-BkxMgq1C.mjs → acorex-connectivity-mock-sample.command-CkH5bmEs.mjs} +4 -1
  11. package/fesm2022/acorex-connectivity-mock-sample.command-CkH5bmEs.mjs.map +1 -0
  12. package/fesm2022/acorex-connectivity-mock.mjs +13390 -8665
  13. package/fesm2022/acorex-connectivity-mock.mjs.map +1 -1
  14. package/mock/index.d.ts +1030 -43
  15. package/package.json +8 -8
  16. package/fesm2022/acorex-connectivity-api-execute.command-BwXw_Kn7.mjs.map +0 -1
  17. package/fesm2022/acorex-connectivity-mock-category-with-items.query-NY9J0cQ0.mjs.map +0 -1
  18. package/fesm2022/acorex-connectivity-mock-distribution-record.command-B-Xviv6G.mjs.map +0 -1
  19. package/fesm2022/acorex-connectivity-mock-sample.command-BkxMgq1C.mjs.map +0 -1
@@ -208,6 +208,9 @@ class AXCFileStorageApiService extends AXPFileStorageService {
208
208
  if (request.path !== undefined) {
209
209
  updateData.path = request.path;
210
210
  }
211
+ if (request.name !== undefined) {
212
+ updateData.name = request.name;
213
+ }
211
214
  if (request.isPrimary !== undefined) {
212
215
  updateData.isPrimary = request.isPrimary;
213
216
  }
@@ -639,13 +642,40 @@ class AXCAPIOidcStrategy extends AXPAuthStrategy {
639
642
  this.handleError(error);
640
643
  }
641
644
  }
645
+ /**
646
+ * Signs out the user according to OpenID Connect standards.
647
+ * Tries to call the standard OIDC end_session_endpoint if available, else falls back to configured logoutUrl.
648
+ * Falls back to root landing page on local logout if nothing is provided.
649
+ * This runs in the background (without redirecting user immediately to the endpoint).
650
+ */
642
651
  async signout() {
643
652
  localStorage.removeItem('pkce_code_verifier');
644
653
  localStorage.removeItem('oauth_provider');
645
- console.log(this.openidConfigurationInfo?.info?.discoveryDocument);
646
- // Use configured logoutUrl or derive from baseUrl
647
- const logoutUrl = this.aXMAuthConfigs.logoutUrl || `connect/logout`;
648
- window.location.href = logoutUrl;
654
+ // Standard OIDC logout: try to use end_session_endpoint if found in the discovery document
655
+ const discoveryDoc = this.openidConfigurationInfo?.info?.discoveryDocument;
656
+ let logoutUrl;
657
+ if (discoveryDoc?.end_session_endpoint) {
658
+ logoutUrl = discoveryDoc.end_session_endpoint;
659
+ // Optional: append id_token_hint, post_logout_redirect_uri or others as needed by your IdP
660
+ // For example: logoutUrl += `?post_logout_redirect_uri=${encodeURIComponent(window.location.origin)}`;
661
+ }
662
+ else if (this.aXMAuthConfigs.logoutUrl) {
663
+ logoutUrl = this.aXMAuthConfigs.logoutUrl;
664
+ }
665
+ // Call logout in the background (don't redirect)
666
+ if (logoutUrl) {
667
+ // Fire-and-forget: Create an invisible iframe to make the logout request in the background
668
+ const iframe = document.createElement('iframe');
669
+ iframe.style.display = 'none';
670
+ iframe.src = logoutUrl;
671
+ document.body.appendChild(iframe);
672
+ // Optionally, remove iframe after load
673
+ iframe.onload = () => {
674
+ setTimeout(() => document.body.removeChild(iframe), 1000);
675
+ };
676
+ }
677
+ // Always send user to landing page after local logout, regardless
678
+ window.location.href = '/';
649
679
  }
650
680
  async refreshToken(context) {
651
681
  try {
@@ -831,224 +861,32 @@ class AXCApiUserAvatarProvider {
831
861
  }
832
862
 
833
863
  //#endregion
834
- //#region ---- Helper Functions ----
835
- // /**
836
- // * Converts a widget string to AXPWidgetsList key
837
- // */
838
- // function convertWidgetStringToAXPWidgetsListKey(
839
- // widgetString: string,
840
- // )
841
- // :
842
- // | keyof typeof AXPWidgetsList.Editors
843
- // | keyof typeof AXPWidgetsList.Layouts
844
- // | keyof typeof AXPWidgetsList.Actions
845
- // | keyof typeof AXPWidgetsList.Advanced
846
- // | keyof typeof AXPWidgetsList.Templates
847
- // | keyof typeof AXPWidgetsList.Entity
848
- // | keyof typeof AXPWidgetsList.Theme
849
- // {
850
- // console.log('Converting widget string:', widgetString);
851
- // // Check if the string is in format "AXPWidgetsList.Category.Key"
852
- // if (widgetString.startsWith('AXPWidgetsList.')) {
853
- // // Extract the key from "AXPWidgetsList.Editors.DateTimeBox" -> "DateTimeBox"
854
- // const parts = widgetString.split('.');
855
- // if (parts.length >= 3) {
856
- // const key = parts[parts.length - 1]; // Get the last part (key)
857
- // console.log('Extracted key from AXPWidgetsList format:', key);
858
- // return key as any;
859
- // }
860
- // }
861
- // // Search through all AXPWidgetsList categories to find matching widget
862
- // for (const category of Object.values(AXPWidgetsList)) {
863
- // if (typeof category === 'object') {
864
- // for (const [key, value] of Object.entries(category)) {
865
- // if (value === widgetString) {
866
- // console.log('Found matching widget:', key, 'for value:', value);
867
- // return key as any; // Return the AXPWidgetsList key (e.g., "DateTimeBox")
868
- // }
869
- // }
870
- // }
871
- // }
872
- // console.log('Widget not found in AXPWidgetsList, returning original string:', widgetString);
873
- // // If not found in AXPWidgetsList, return the original string as fallback
874
- // return widgetString as any;
875
- // }
876
- //#endregion
877
- //#region ---- Shared Data Service ----
878
- class AXCReportManagementDataService {
864
+ //#region ---- API Providers ----
865
+ class AXCReportCategoryApiProvider {
879
866
  constructor() {
880
867
  this.http = inject(HttpClient);
881
868
  this.configs = inject(AXP_ROOT_CONFIG_TOKEN);
882
869
  this.baseUrl = this.configs.baseUrl;
883
- // Cache for category data to avoid duplicate API calls
884
- this.categoryDataCache = new Map();
885
- this.rootCategoriesCache = null;
886
- this.pendingRequests = new Map();
887
- this.pendingRootCategoriesRequest = null;
888
870
  }
889
- //#region ---- Lazy Category/Report Fetching ----
890
- /**
891
- * Fetch root categories (no parent). Only root categories without reports and children.
892
- * Uses cache and pending requests to avoid duplicate API calls.
893
- */
894
- async getRootCategories() {
895
- // Check if already cached
896
- if (this.rootCategoriesCache !== null) {
897
- return this.rootCategoriesCache;
898
- }
899
- // Check if there's already a pending request
900
- if (this.pendingRootCategoriesRequest !== null) {
901
- return this.pendingRootCategoriesRequest;
902
- }
903
- // Create the request and cache it
904
- const requestPromise = (async () => {
905
- try {
906
- const url = `${this.baseUrl}/v1/global/report-management/category`;
871
+ async getList(parentId) {
872
+ try {
873
+ let url;
874
+ if (parentId) {
875
+ url = `${this.baseUrl}/v1/global/report-management/category/${parentId}`;
876
+ const response = await firstValueFrom(this.http.get(url));
877
+ const categoryData = response.items?.[0];
878
+ const filteredItems = categoryData?.folderItems ?? [];
879
+ return filteredItems.map((item) => this.mapApiCategoryToReportCategory(item));
880
+ }
881
+ else {
882
+ url = `${this.baseUrl}/v1/global/report-management/category`;
907
883
  const params = { Skip: 0, Take: 1000 };
908
884
  const response = await firstValueFrom(this.http.get(url, { params }));
909
885
  const all = response.items ?? [];
910
886
  const rootCategories = all.filter((i) => !i.reportCategoryParentId);
911
- // Cache the result
912
- this.rootCategoriesCache = rootCategories;
913
- return rootCategories;
914
- }
915
- finally {
916
- // Remove from pending requests after completion
917
- this.pendingRootCategoriesRequest = null;
918
- }
919
- })();
920
- this.pendingRootCategoriesRequest = requestPromise;
921
- return requestPromise;
922
- }
923
- /**
924
- * Fetch category data for a given parentId.
925
- * Returns the parent category with its FolderItems (children) and ReportDefinitionItems (reports).
926
- * Uses cache to avoid duplicate API calls.
927
- */
928
- async getCategoryData(parentId) {
929
- // Check if already cached
930
- if (this.categoryDataCache.has(parentId)) {
931
- return this.categoryDataCache.get(parentId);
932
- }
933
- // Check if there's already a pending request for this category
934
- if (this.pendingRequests.has(parentId)) {
935
- return this.pendingRequests.get(parentId);
936
- }
937
- // Create the request and cache it
938
- const requestPromise = (async () => {
939
- try {
940
- const url = `${this.baseUrl}/v1/global/report-management/category/${parentId}`;
941
- const response = await firstValueFrom(this.http.get(url));
942
- const categoryData = response.items?.[0];
943
- // Cache the result
944
- this.categoryDataCache.set(parentId, categoryData);
945
- return categoryData;
946
- }
947
- catch {
948
- const undefinedResult = undefined;
949
- this.categoryDataCache.set(parentId, undefinedResult);
950
- return undefinedResult;
951
- }
952
- finally {
953
- // Remove from pending requests after completion
954
- this.pendingRequests.delete(parentId);
955
- }
956
- })();
957
- this.pendingRequests.set(parentId, requestPromise);
958
- return requestPromise;
959
- }
960
- /**
961
- * Fetch both child categories and reports for a given parentId.
962
- * This method ensures only one API call is made and both results are returned.
963
- */
964
- async getCategoryChildrenAndReports(parentId) {
965
- const categoryData = await this.getCategoryData(parentId);
966
- return {
967
- categories: categoryData?.folderItems ?? [],
968
- reports: categoryData?.reportDefinitionItems ?? [],
969
- };
970
- }
971
- /**
972
- * Fetch child categories of a given parent.
973
- * Uses getCategoryData to get FolderItems (children) from the parent category.
974
- */
975
- async getChildCategories(parentId) {
976
- const categoryData = await this.getCategoryData(parentId);
977
- return categoryData?.folderItems ?? [];
978
- }
979
- /**
980
- * Fetch report definitions that belong to a specific category.
981
- * Uses getCategoryData to get ReportDefinitionItems (reports) from the category.
982
- */
983
- async getCategoryReports(categoryId) {
984
- const categoryData = await this.getCategoryData(categoryId);
985
- return categoryData?.reportDefinitionItems ?? [];
986
- }
987
- /**
988
- * Fetch a single category by id.
989
- * First checks cache, then uses getCategoryData if not found in cache.
990
- */
991
- async getCategoryById(id) {
992
- // First check if it's in cache (from previous getCategoryData calls)
993
- if (this.categoryDataCache.has(id)) {
994
- return this.categoryDataCache.get(id);
995
- }
996
- // Try to get from category data endpoint (which will cache it)
997
- const categoryData = await this.getCategoryData(id);
998
- if (categoryData) {
999
- return categoryData;
1000
- }
1001
- // Fallback: search in root categories cache
1002
- if (this.rootCategoriesCache) {
1003
- const found = this.rootCategoriesCache.find((c) => c.id === id);
1004
- if (found) {
1005
- return found;
887
+ return rootCategories.map((item) => this.mapApiCategoryToReportCategory(item));
1006
888
  }
1007
889
  }
1008
- // Last resort: search in all categories (but this should rarely happen)
1009
- try {
1010
- const url = `${this.baseUrl}/v1/global/report-management/category`;
1011
- const params = { Skip: 0, Take: 1000 };
1012
- const response = await firstValueFrom(this.http.get(url, { params }));
1013
- const all = response.items ?? [];
1014
- return all.find((c) => c.id === id);
1015
- }
1016
- catch {
1017
- return undefined;
1018
- }
1019
- }
1020
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportManagementDataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1021
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportManagementDataService }); }
1022
- }
1023
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportManagementDataService, decorators: [{
1024
- type: Injectable
1025
- }] });
1026
- //#endregion
1027
- //#region ---- API Providers ----
1028
- /**
1029
- * Category provider that uses the shared data service.
1030
- * Both providers use the same dataService instance which ensures proper caching.
1031
- */
1032
- class AXCReportCategoryApiProvider {
1033
- constructor() {
1034
- this.dataService = inject(AXCReportManagementDataService);
1035
- }
1036
- async getList(parentId) {
1037
- try {
1038
- // For root level, get root categories (each category includes folderItems in API response)
1039
- if (!parentId) {
1040
- const filteredItems = await this.dataService.getRootCategories();
1041
- // Each root category has folderItems in the API response, but we only return the root categories themselves
1042
- // The folderItems are preserved in the API response structure, similar to child state
1043
- return filteredItems.map((item) => this.mapApiCategoryToReportCategory(item));
1044
- }
1045
- // For child level, get categories from category data (which includes folderItems)
1046
- // This ensures we use the same API response that getList for definitions will use
1047
- // The folderItems structure is preserved, similar to root state
1048
- const categoryData = await this.dataService.getCategoryData(parentId);
1049
- const filteredItems = categoryData?.folderItems ?? [];
1050
- return filteredItems.map((item) => this.mapApiCategoryToReportCategory(item));
1051
- }
1052
890
  catch (error) {
1053
891
  console.error('Error fetching report categories:', error);
1054
892
  return [];
@@ -1056,9 +894,17 @@ class AXCReportCategoryApiProvider {
1056
894
  }
1057
895
  async getById(id) {
1058
896
  try {
1059
- const apiItem = await this.dataService.getCategoryById(id);
897
+ const url = `${this.baseUrl}/v1/global/report-management/category/${id}`;
898
+ const response = await firstValueFrom(this.http.get(url));
899
+ const apiItem = response.items?.[0];
1060
900
  if (!apiItem) {
1061
- return undefined;
901
+ // Fallback: search in all categories
902
+ const allUrl = `${this.baseUrl}/v1/global/report-management/category`;
903
+ const params = { Skip: 0, Take: 1000 };
904
+ const allResponse = await firstValueFrom(this.http.get(allUrl, { params }));
905
+ const all = allResponse.items ?? [];
906
+ const found = all.find((c) => c.id === id);
907
+ return found ? this.mapApiCategoryToReportCategory(found) : undefined;
1062
908
  }
1063
909
  return this.mapApiCategoryToReportCategory(apiItem);
1064
910
  }
@@ -1073,8 +919,8 @@ class AXCReportCategoryApiProvider {
1073
919
  title: apiItem.title,
1074
920
  description: apiItem.description || undefined,
1075
921
  parentId: apiItem.reportCategoryParentId || undefined,
1076
- hasChild: apiItem.folderCount > 0, // folderItems = folders
1077
- hasReport: apiItem.itemCount > 0, // reportDefinitionItems = files
922
+ childrenCount: apiItem.folderCount ?? 0,
923
+ itemsCount: apiItem.itemCount ?? 0,
1078
924
  };
1079
925
  }
1080
926
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportCategoryApiProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -1083,23 +929,31 @@ class AXCReportCategoryApiProvider {
1083
929
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportCategoryApiProvider, decorators: [{
1084
930
  type: Injectable
1085
931
  }] });
1086
- /**
1087
- * Definition provider that uses the shared data service.
1088
- * Both providers use the same dataService instance which ensures proper caching.
1089
- */
1090
932
  class AXCReportDefinitionApiProvider {
1091
933
  constructor() {
1092
- this.dataService = inject(AXCReportManagementDataService);
1093
934
  this.http = inject(HttpClient);
935
+ this.configs = inject(AXP_ROOT_CONFIG_TOKEN);
936
+ this.baseUrl = this.configs.baseUrl;
1094
937
  }
1095
938
  async getList(categoryId) {
1096
939
  try {
1097
- // Use getCategoryData which is cached and shared with getCategories
1098
- // This ensures only one API call is made when both getCategories and getReportsByCategoryId are called
1099
- const categoryData = await this.dataService.getCategoryData(categoryId);
940
+ const url = `${this.baseUrl}/v1/global/report-management/category/${categoryId}`;
941
+ const response = await firstValueFrom(this.http.get(url));
942
+ const categoryData = response.items?.[0];
1100
943
  const defs = categoryData?.reportDefinitionItems ?? [];
1101
- const reportDefinitions = defs.map((item) => this.mapApiReportDefinitionItemToReportDefinition(item));
1102
- return reportDefinitions;
944
+ // Fetch full report definitions for each item to get layouts and parameterGroups
945
+ const fullDefinitions = await Promise.all(defs.map(async (item) => {
946
+ try {
947
+ const reportUrl = `${this.baseUrl}/v1/global/report-management/report/${item.id}`;
948
+ const reportResponse = await firstValueFrom(this.http.get(reportUrl));
949
+ return this.mapApiReportDefinitionToReportDefinition(reportResponse);
950
+ }
951
+ catch {
952
+ // Fallback to item mapping if full fetch fails
953
+ return this.mapApiReportDefinitionItemToReportDefinition(item);
954
+ }
955
+ }));
956
+ return fullDefinitions;
1103
957
  }
1104
958
  catch (error) {
1105
959
  console.error('Error fetching report definitions:', error);
@@ -1108,8 +962,7 @@ class AXCReportDefinitionApiProvider {
1108
962
  }
1109
963
  async getById(id) {
1110
964
  try {
1111
- // Make API call to get full report definition with layouts
1112
- const url = `${this.dataService['baseUrl']}/v1/global/report-management/report/${id}`;
965
+ const url = `${this.baseUrl}/v1/global/report-management/report/${id}`;
1113
966
  const response = await firstValueFrom(this.http.get(url));
1114
967
  return this.mapApiReportDefinitionToReportDefinition(response);
1115
968
  }
@@ -1124,13 +977,13 @@ class AXCReportDefinitionApiProvider {
1124
977
  title: apiItem.title,
1125
978
  description: apiItem.description || undefined,
1126
979
  categoryIds: apiItem.categoryIds,
1127
- parameterGroups: [], // These would need to be fetched separately if needed
1128
- layouts: [], // These would need to be fetched separately if needed
1129
- defaultLayoutId: '', // This would need to be set based on the first layout
980
+ parameterGroups: [],
981
+ layouts: [],
982
+ defaultLayoutId: '',
1130
983
  };
1131
984
  }
1132
985
  mapApiReportDefinitionToReportDefinition(apiResponse) {
1133
- let res = {
986
+ return {
1134
987
  id: apiResponse.id,
1135
988
  title: apiResponse.title,
1136
989
  description: apiResponse.description || undefined,
@@ -1159,7 +1012,6 @@ class AXCReportDefinitionApiProvider {
1159
1012
  })),
1160
1013
  defaultLayoutId: apiResponse.defaultLayoutId,
1161
1014
  };
1162
- return res;
1163
1015
  }
1164
1016
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportDefinitionApiProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1165
1017
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportDefinitionApiProvider }); }
@@ -1168,13 +1020,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1168
1020
  type: Injectable
1169
1021
  }] });
1170
1022
  //#endregion
1171
- //#endregion
1172
1023
  //#region ---- Provider Exports ----
1173
- /**
1174
- * Both providers use the same dataService instance (which is a singleton),
1175
- * ensuring they share the same cache and only one API call is made when both
1176
- * getCategories and getReportsByCategoryId are called for the same categoryId.
1177
- */
1178
1024
  const AXC_REPORT_CATEGORY_API_PROVIDER = {
1179
1025
  provide: AXP_REPORT_CATEGORY_PROVIDER,
1180
1026
  useClass: AXCReportCategoryApiProvider,
@@ -1190,14 +1036,13 @@ class AXCReportManagementApiModule {
1190
1036
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportManagementApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1191
1037
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXCReportManagementApiModule, imports: [AXPRuntimeModule] }); }
1192
1038
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportManagementApiModule, providers: [
1193
- AXCReportManagementDataService,
1194
1039
  AXC_REPORT_CATEGORY_API_PROVIDER,
1195
1040
  AXC_REPORT_DEFINITION_API_PROVIDER,
1196
1041
  provideCommandSetups([
1197
1042
  {
1198
1043
  key: 'ReportManagement.Report:Execute',
1199
- command: () => import('./acorex-connectivity-api-execute.command-BwXw_Kn7.mjs').then((c) => c.AXCReportExecuteCommand),
1200
- },
1044
+ command: () => import('./acorex-connectivity-api-execute.command-CQt_HF1B.mjs').then((c) => c.AXCReportExecuteCommand),
1045
+ }
1201
1046
  ]),
1202
1047
  ], imports: [AXPRuntimeModule] }); }
1203
1048
  }
@@ -1208,14 +1053,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1208
1053
  exports: [],
1209
1054
  declarations: [],
1210
1055
  providers: [
1211
- AXCReportManagementDataService,
1212
1056
  AXC_REPORT_CATEGORY_API_PROVIDER,
1213
1057
  AXC_REPORT_DEFINITION_API_PROVIDER,
1214
1058
  provideCommandSetups([
1215
1059
  {
1216
1060
  key: 'ReportManagement.Report:Execute',
1217
- command: () => import('./acorex-connectivity-api-execute.command-BwXw_Kn7.mjs').then((c) => c.AXCReportExecuteCommand),
1218
- },
1061
+ command: () => import('./acorex-connectivity-api-execute.command-CQt_HF1B.mjs').then((c) => c.AXCReportExecuteCommand),
1062
+ }
1219
1063
  ]),
1220
1064
  ],
1221
1065
  }]
@@ -1590,9 +1434,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1590
1434
  type: Injectable
1591
1435
  }], ctorParameters: () => [] });
1592
1436
 
1437
+ //#region ---- Imports ----
1438
+ //#endregion
1439
+ //#region ---- API Providers ----
1440
+ class AXCSystemInsightReportCategoryApiProvider {
1441
+ constructor() {
1442
+ this.http = inject(HttpClient);
1443
+ }
1444
+ async getList(parentId) {
1445
+ try {
1446
+ // Call API to get report categories
1447
+ const params = {};
1448
+ if (parentId) {
1449
+ params.parentId = parentId;
1450
+ }
1451
+ const response = await firstValueFrom(this.http.get('/api/system-insight/report-categories', { params }));
1452
+ return response;
1453
+ }
1454
+ catch (error) {
1455
+ console.error('Failed to fetch system insight report categories from API:', error);
1456
+ return [];
1457
+ }
1458
+ }
1459
+ async getById(id) {
1460
+ try {
1461
+ const response = await firstValueFrom(this.http.get(`/api/system-insight/report-categories/${id}`));
1462
+ return response;
1463
+ }
1464
+ catch (error) {
1465
+ console.error(`Failed to fetch system insight report category ${id} from API:`, error);
1466
+ return undefined;
1467
+ }
1468
+ }
1469
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportCategoryApiProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1470
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportCategoryApiProvider }); }
1471
+ }
1472
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportCategoryApiProvider, decorators: [{
1473
+ type: Injectable
1474
+ }] });
1475
+ class AXCSystemInsightReportDefinitionApiProvider {
1476
+ constructor() {
1477
+ this.http = inject(HttpClient);
1478
+ }
1479
+ async getList(categoryId) {
1480
+ try {
1481
+ const response = await firstValueFrom(this.http.get(`/api/system-insight/report-definitions`, {
1482
+ params: { categoryId }
1483
+ }));
1484
+ return response;
1485
+ }
1486
+ catch (error) {
1487
+ console.error(`Failed to fetch system insight report definitions for category ${categoryId} from API:`, error);
1488
+ return [];
1489
+ }
1490
+ }
1491
+ async getById(id) {
1492
+ try {
1493
+ const response = await firstValueFrom(this.http.get(`/api/system-insight/report-definitions/${id}`));
1494
+ return response;
1495
+ }
1496
+ catch (error) {
1497
+ console.error(`Failed to fetch system insight report definition ${id} from API:`, error);
1498
+ return undefined;
1499
+ }
1500
+ }
1501
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportDefinitionApiProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1502
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportDefinitionApiProvider }); }
1503
+ }
1504
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportDefinitionApiProvider, decorators: [{
1505
+ type: Injectable
1506
+ }] });
1507
+ //#endregion
1508
+ //#region ---- Provider Exports ----
1509
+ const AXC_SYSTEM_INSIGHT_REPORT_CATEGORY_API_PROVIDER = {
1510
+ provide: AXP_REPORT_CATEGORY_PROVIDER,
1511
+ useClass: AXCSystemInsightReportCategoryApiProvider,
1512
+ multi: true,
1513
+ };
1514
+ const AXC_SYSTEM_INSIGHT_REPORT_DEFINITION_API_PROVIDER = {
1515
+ provide: AXP_REPORT_DEFINITION_PROVIDER,
1516
+ useClass: AXCSystemInsightReportDefinitionApiProvider,
1517
+ multi: true,
1518
+ };
1519
+
1593
1520
  /**
1594
1521
  * Generated bundle index. Do not edit.
1595
1522
  */
1596
1523
 
1597
- export { APIGoogleStrategy, AXCAPIOidcStrategy, AXCApiEntityStorageService, AXCApiModule, AXCApiUserAvatarProvider, AXCReportCategoryApiProvider, AXCReportDefinitionApiProvider, AXCReportManagementApiModule, AXCReportManagementDataService, AXC_REPORT_CATEGORY_API_PROVIDER, AXC_REPORT_DEFINITION_API_PROVIDER, AXMConfigurationService, AXMOidcApplicationLoader, AXMOidcFeatureLoader, AXMOidcPermissionLoader, AXMOidcTenantLoader };
1524
+ export { APIGoogleStrategy, AXCAPIOidcStrategy, AXCApiEntityStorageService, AXCApiModule, AXCApiUserAvatarProvider, AXCReportCategoryApiProvider, AXCReportDefinitionApiProvider, AXCReportManagementApiModule, AXCSystemInsightReportCategoryApiProvider, AXCSystemInsightReportDefinitionApiProvider, AXC_REPORT_CATEGORY_API_PROVIDER, AXC_REPORT_DEFINITION_API_PROVIDER, AXC_SYSTEM_INSIGHT_REPORT_CATEGORY_API_PROVIDER, AXC_SYSTEM_INSIGHT_REPORT_DEFINITION_API_PROVIDER, AXMConfigurationService, AXMOidcApplicationLoader, AXMOidcFeatureLoader, AXMOidcPermissionLoader, AXMOidcTenantLoader };
1598
1525
  //# sourceMappingURL=acorex-connectivity-api.mjs.map