@techextensor/tab-core-utility 2.2.191 → 2.2.193

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 (87) hide show
  1. package/esm2022/index.mjs +6 -1
  2. package/esm2022/lib/tab-core-utility/app/constants/api-constants.mjs +38 -22
  3. package/esm2022/lib/tab-core-utility/app/constants/common.mjs +14 -50
  4. package/esm2022/lib/tab-core-utility/app/constants/storage-constants.mjs +3 -2
  5. package/esm2022/lib/tab-core-utility/app/crud/tab-blueprint.service.mjs +41 -14
  6. package/esm2022/lib/tab-core-utility/app/crud/tab-crud.service.mjs +38 -49
  7. package/esm2022/lib/tab-core-utility/app/crud/tab-delete.service.mjs +84 -30
  8. package/esm2022/lib/tab-core-utility/app/crud/tab-formio.service.mjs +141 -12
  9. package/esm2022/lib/tab-core-utility/app/crud/tab-get.service.mjs +141 -46
  10. package/esm2022/lib/tab-core-utility/app/crud/tab-insert.service.mjs +89 -38
  11. package/esm2022/lib/tab-core-utility/app/crud/tab-update.service.mjs +156 -128
  12. package/esm2022/lib/tab-core-utility/app/enums/query.enum.mjs +7 -7
  13. package/esm2022/lib/tab-core-utility/app/helpers/auth-response.adapter.mjs +79 -0
  14. package/esm2022/lib/tab-core-utility/app/helpers/common/app.helpers.mjs +30 -25
  15. package/esm2022/lib/tab-core-utility/app/helpers/common/dsq.helpers.mjs +9 -11
  16. package/esm2022/lib/tab-core-utility/app/helpers/common/meta-data.helpers.mjs +13 -13
  17. package/esm2022/lib/tab-core-utility/app/helpers/common/req-res.helpers.mjs +7 -45
  18. package/esm2022/lib/tab-core-utility/app/helpers/common/where-clause.helpers.mjs +79 -76
  19. package/esm2022/lib/tab-core-utility/app/helpers/login-response.adapter.mjs +76 -0
  20. package/esm2022/lib/tab-core-utility/app/helpers/response.adapter.mjs +38 -0
  21. package/esm2022/lib/tab-core-utility/app/helpers/screen/grid.helpers.mjs +8 -4
  22. package/esm2022/lib/tab-core-utility/app/helpers/screen/media-upload.helpers.mjs +4 -4
  23. package/esm2022/lib/tab-core-utility/app/helpers/screen/screen.helpers.mjs +8 -33
  24. package/esm2022/lib/tab-core-utility/app/helpers/transition-response.adapter.mjs +83 -0
  25. package/esm2022/lib/tab-core-utility/app/interfaces/auth.interface.mjs +1 -1
  26. package/esm2022/lib/tab-core-utility/app/interfaces/common.interface.mjs +1 -1
  27. package/esm2022/lib/tab-core-utility/app/interfaces/signalr.interface.mjs +42 -0
  28. package/esm2022/lib/tab-core-utility/app/models/api-query.class.mjs +39 -1
  29. package/esm2022/lib/tab-core-utility/app/models/app-field.model.mjs +36 -7
  30. package/esm2022/lib/tab-core-utility/app/models/app-object.model.mjs +84 -47
  31. package/esm2022/lib/tab-core-utility/app/models/app-screen.model.mjs +24 -13
  32. package/esm2022/lib/tab-core-utility/app/models/data-source-query.model.mjs +57 -23
  33. package/esm2022/lib/tab-core-utility/app/models/filter.model.mjs +21 -10
  34. package/esm2022/lib/tab-core-utility/app/models/parameter.model.mjs +12 -6
  35. package/esm2022/lib/tab-core-utility/app/models/sort.model.mjs +11 -4
  36. package/esm2022/lib/tab-core-utility/app/utils/json.util.mjs +17 -16
  37. package/esm2022/lib/tab-core-utility/app/utils/req-res.util.mjs +1 -55
  38. package/esm2022/lib/tab-core-utility/app/utils/tab-app.util.mjs +1 -164
  39. package/esm2022/lib/tab-core-utility/auth/auth.service.mjs +36 -11
  40. package/esm2022/lib/tab-core-utility/core/http-client/api.service.mjs +78 -1
  41. package/esm2022/lib/tab-core-utility/core/service/signalr/operation-tracker.service.mjs +90 -0
  42. package/esm2022/lib/tab-core-utility/core/service/signalr/signalr-infrastructure.service.mjs +268 -0
  43. package/esm2022/lib/tab-core-utility/core/service/signalr/signalr.service.mjs +207 -0
  44. package/index.d.ts +5 -0
  45. package/lib/tab-core-utility/app/constants/api-constants.d.ts +25 -18
  46. package/lib/tab-core-utility/app/constants/common.d.ts +9 -0
  47. package/lib/tab-core-utility/app/constants/storage-constants.d.ts +2 -1
  48. package/lib/tab-core-utility/app/crud/tab-blueprint.service.d.ts +14 -8
  49. package/lib/tab-core-utility/app/crud/tab-crud.service.d.ts +8 -1
  50. package/lib/tab-core-utility/app/crud/tab-delete.service.d.ts +20 -10
  51. package/lib/tab-core-utility/app/crud/tab-formio.service.d.ts +33 -6
  52. package/lib/tab-core-utility/app/crud/tab-get.service.d.ts +52 -10
  53. package/lib/tab-core-utility/app/crud/tab-insert.service.d.ts +16 -21
  54. package/lib/tab-core-utility/app/crud/tab-update.service.d.ts +34 -19
  55. package/lib/tab-core-utility/app/enums/query.enum.d.ts +3 -6
  56. package/lib/tab-core-utility/app/helpers/auth-response.adapter.d.ts +32 -0
  57. package/lib/tab-core-utility/app/helpers/common/app.helpers.d.ts +6 -9
  58. package/lib/tab-core-utility/app/helpers/common/dsq.helpers.d.ts +3 -0
  59. package/lib/tab-core-utility/app/helpers/common/meta-data.helpers.d.ts +3 -3
  60. package/lib/tab-core-utility/app/helpers/common/req-res.helpers.d.ts +7 -51
  61. package/lib/tab-core-utility/app/helpers/common/where-clause.helpers.d.ts +1 -0
  62. package/lib/tab-core-utility/app/helpers/login-response.adapter.d.ts +29 -0
  63. package/lib/tab-core-utility/app/helpers/response.adapter.d.ts +22 -0
  64. package/lib/tab-core-utility/app/helpers/screen/grid.helpers.d.ts +2 -1
  65. package/lib/tab-core-utility/app/helpers/screen/media-upload.helpers.d.ts +1 -1
  66. package/lib/tab-core-utility/app/helpers/screen/screen.helpers.d.ts +1 -0
  67. package/lib/tab-core-utility/app/helpers/transition-response.adapter.d.ts +30 -0
  68. package/lib/tab-core-utility/app/interfaces/auth.interface.d.ts +1 -1
  69. package/lib/tab-core-utility/app/interfaces/common.interface.d.ts +56 -6
  70. package/lib/tab-core-utility/app/interfaces/signalr.interface.d.ts +84 -0
  71. package/lib/tab-core-utility/app/models/api-query.class.d.ts +54 -9
  72. package/lib/tab-core-utility/app/models/app-field.model.d.ts +4 -2
  73. package/lib/tab-core-utility/app/models/app-object.model.d.ts +5 -3
  74. package/lib/tab-core-utility/app/models/app-screen.model.d.ts +2 -2
  75. package/lib/tab-core-utility/app/models/data-source-query.model.d.ts +7 -2
  76. package/lib/tab-core-utility/app/models/filter.model.d.ts +2 -2
  77. package/lib/tab-core-utility/app/models/parameter.model.d.ts +2 -2
  78. package/lib/tab-core-utility/app/models/sort.model.d.ts +1 -1
  79. package/lib/tab-core-utility/app/utils/json.util.d.ts +3 -2
  80. package/lib/tab-core-utility/app/utils/req-res.util.d.ts +1 -9
  81. package/lib/tab-core-utility/app/utils/tab-app.util.d.ts +0 -61
  82. package/lib/tab-core-utility/auth/auth.service.d.ts +6 -0
  83. package/lib/tab-core-utility/core/http-client/api.service.d.ts +46 -0
  84. package/lib/tab-core-utility/core/service/signalr/operation-tracker.service.d.ts +40 -0
  85. package/lib/tab-core-utility/core/service/signalr/signalr-infrastructure.service.d.ts +73 -0
  86. package/lib/tab-core-utility/core/service/signalr/signalr.service.d.ts +122 -0
  87. package/package.json +3 -2
@@ -1,3 +1,4 @@
1
+ import { APIServiceUrls } from '../interfaces/common.interface';
1
2
  export declare class Common {
2
3
  static environmentName: string;
3
4
  static applicationCode: string;
@@ -7,5 +8,13 @@ export declare class Common {
7
8
  static tabAppObjectAccess: any;
8
9
  static staticToken: any;
9
10
  static i18n: any;
11
+ /** Microservice URLs configuration - NEW for microservices architecture */
12
+ static apiServiceUrls: APIServiceUrls;
13
+ /** SignalR hub URL for real-time notifications */
14
+ static signalRHubUrl: string;
15
+ /**
16
+ * Initialize the static variables
17
+ * Called once at application startup from the main app
18
+ */
10
19
  static init(environment: any): void;
11
20
  }
@@ -22,5 +22,6 @@ export declare const StorageConstants: {
22
22
  refreshTokenExpiry: string;
23
23
  appNavigationMapping: string;
24
24
  tokenInfo: string;
25
- Environment: string;
25
+ EnvironmentId: string;
26
+ Screen: string;
26
27
  };
@@ -3,20 +3,26 @@ import { Observable } from "rxjs";
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class TabBlueprintService {
5
5
  private readonly apiService;
6
+ private readonly metadataHelper;
6
7
  /**
7
8
  * Retrieves the next status of a record.
8
- * @param payload - Object containing the recordId and appObjectId.
9
- * @param params - Optional parameters for the API call.
10
- * @returns An observable of the API response.
9
+ * Uses new crudService endpoint: GET status/available?recordId=...&EntityName=...
11
10
  */
12
- getNextStatus(payload: NextStatusPayload, params?: any): Observable<CommonApiResponse>;
11
+ getNextStatus(payload: NextStatusPayload, headers?: any): Observable<CommonApiResponse>;
13
12
  /**
14
13
  * Updates the status of a record.
15
- * @param payload - Object containing the next possible status ID.
16
- * @param params - Optional parameters for the API call.
17
- * @returns An observable of the API response.
14
+ * Uses new crudService endpoint: PUT status/update?recordId=...&nextStatusId=...&EntityName=...
18
15
  */
19
- updateStatus(payload: UpdateStatusPayload, params?: any): Observable<CommonApiResponse>;
16
+ updateStatus(payload: UpdateStatusPayload, headers?: any): Observable<CommonApiResponse>;
17
+ /**
18
+ * Builds common HttpParams for status endpoints (recordId + EntityName).
19
+ */
20
+ private buildStatusParams;
21
+ /**
22
+ * Resolves appObjectId to EntityName (SystemDBTableName).
23
+ * Looks up the app object via MetadataHelper and returns SystemDBTableName or ObjectName.
24
+ */
25
+ private resolveEntityName;
20
26
  static ɵfac: i0.ɵɵFactoryDeclaration<TabBlueprintService, never>;
21
27
  static ɵprov: i0.ɵɵInjectableDeclaration<TabBlueprintService>;
22
28
  }
@@ -6,6 +6,10 @@ export declare class TabCrudService {
6
6
  private readonly _requestResponseHelper;
7
7
  private readonly _dsqHelper;
8
8
  private readonly _apiService;
9
+ private readonly _tabGetService;
10
+ private readonly _tabInsertService;
11
+ private readonly _tabUpdateService;
12
+ private readonly _tabDeleteService;
9
13
  /**
10
14
  * Returns the AppObjectModel from the given payload.
11
15
  * @param payload The payload with either dataSourceQueryIdOrName or appObjectIdOrName.
@@ -39,14 +43,16 @@ export declare class TabCrudService {
39
43
  get(payload: GetPayload, headers?: any): Observable<CommonApiResponse>;
40
44
  /**
41
45
  * Inserts data into the specified table.
46
+ * NEW: Delegates to TabInsertService which uses /records/insert endpoint with SYNC/ASYNC support
42
47
  * @param payload The payload containing the data to insert and the AppObjectModel ID.
43
48
  * @param headers Optional headers for the request.
44
- * @returns An observable of the response from the API.
49
+ * @returns An observable of the response from the API (returns insertedId only).
45
50
  */
46
51
  insert(payload: InsertPayload, headers?: any): Observable<CommonApiResponse>;
47
52
  bulkInsert(payload: InsertPayload, headers?: any): Observable<CommonApiResponse>;
48
53
  /**
49
54
  * Updates data in the specified table.
55
+ * NEW: Delegates to TabUpdateService which uses /records/update endpoint with SYNC/ASYNC support
50
56
  * @param payload The payload containing the data to update, the criteria for the update, and the AppObjectModel ID.
51
57
  * @param headers Optional headers for the request.
52
58
  * @returns An observable of the response from the API.
@@ -54,6 +60,7 @@ export declare class TabCrudService {
54
60
  update(payload: UpdatePayload, headers?: any): Observable<CommonApiResponse>;
55
61
  /**
56
62
  * Deletes data from the specified table.
63
+ * NEW: Delegates to TabDeleteService which uses /records/delete endpoint with SYNC/ASYNC support
57
64
  * @param payload The payload containing the criteria for the delete and the AppObjectModel ID.
58
65
  * @param headers Optional headers for the request.
59
66
  * @returns An observable of the response from the API.
@@ -1,10 +1,13 @@
1
- import { APIDeleteQuery } from "../models/api-query.class";
1
+ import { Observable } from 'rxjs';
2
+ import { CommonApiResponse } from '../interfaces/common.interface';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class TabDeleteService {
4
- private readonly dsqHelper;
5
5
  private readonly screenHelper;
6
6
  private readonly whereClauseHelper;
7
7
  private readonly requestResponseHelper;
8
+ private readonly apiService;
9
+ private readonly signalRService;
10
+ private readonly metadataHelper;
8
11
  /**
9
12
  * Deletes a record based on the given screen ID, data, and object ID.
10
13
  * @param screenId The ID of the screen.
@@ -12,7 +15,7 @@ export declare class TabDeleteService {
12
15
  * @param objectIDToSave The object ID of the record to save.
13
16
  * @returns An Observable emitting the response of the delete operation.
14
17
  */
15
- deleteRecord(screenId: string, data: any, objectIDToSave: any): import("rxjs").Observable<any> | null;
18
+ deleteRecord(screenId: string, data: any, objectIDToSave: any): Observable<CommonApiResponse> | null;
16
19
  /**
17
20
  * Deletes a record by the specified table name and primary key value.
18
21
  * @param tableName The name of the table.
@@ -20,13 +23,20 @@ export declare class TabDeleteService {
20
23
  * @param primaryKeyValue The value of the primary key.
21
24
  * @returns An Observable emitting the response of the delete operation.
22
25
  */
23
- deleteRecordByTable(tableName: string, primaryKey: string, primaryKeyValue: string): import("rxjs").Observable<any> | null;
26
+ deleteRecordByTable(tableName: string, primaryKey: string, primaryKeyValue: string): Observable<CommonApiResponse>;
24
27
  /**
25
- * Executes the delete operation.
26
- * @param data The delete query payload.
27
- * @returns An Observable emitting the response of the delete operation.
28
+ * Executes the delete operation using new /records/delete endpoint with SYNC/ASYNC support
29
+ * @param data The delete query payload (NEW format: { entityName, whereClause })
30
+ * @param headers Optional headers
31
+ * @returns An Observable emitting the response of the delete operation
32
+ */
33
+ delete(data: any, headers?: any): Observable<CommonApiResponse>;
34
+ /**
35
+ * Handle async delete - wait for SignalR notification
36
+ * @param response Initial response with correlationId
37
+ * @returns Observable with result from SignalR notification
28
38
  */
29
- delete(data: APIDeleteQuery, headers?: any): import("rxjs").Observable<any> | null;
39
+ private handleAsyncDelete;
30
40
  /**
31
41
  * Displays a delete confirmation popup.
32
42
  * @returns True if the user confirms the delete operation, otherwise false.
@@ -38,7 +48,7 @@ export declare class TabDeleteService {
38
48
  * @param values The values of the records to delete.
39
49
  * @returns An Observable emitting the response of the delete operation.
40
50
  */
41
- deleteMultipleRecordByTable(tableName: string, values: any): import("rxjs").Observable<any> | null;
51
+ deleteMultipleRecordByTable(tableName: string, values: any): Observable<CommonApiResponse>;
42
52
  /**
43
53
  * Deletes multiple records from the specified table based on the provided data array.
44
54
  * The data array should contain key-value pairs without primary key information.
@@ -46,7 +56,7 @@ export declare class TabDeleteService {
46
56
  * @param values The array of data objects to delete.
47
57
  * @returns An Observable emitting the response of the delete operation.
48
58
  */
49
- deleteMultipleRecordByTableWithoutPrimaryKey(tableName: string, values: any, headers?: any): import("rxjs").Observable<any> | null;
59
+ deleteMultipleRecordByTableWithoutPrimaryKey(tableName: string, values: any, headers?: any): Observable<CommonApiResponse>;
50
60
  /**
51
61
  * Generates a values array from the data.
52
62
  * @param dataArray The array of data.
@@ -4,26 +4,53 @@ import { BuildFormComponentType } from "../enums/common.enum";
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class TabFormioService {
6
6
  private readonly apiService;
7
+ private readonly signalRService;
7
8
  /**
8
9
  * Fetches screen data from the server based on the screen ID and optional configuration.
10
+ * NEW: Uses metadata service endpoint - returns new API format directly
9
11
  *
10
12
  * @param screenId - The ID of the screen to retrieve.
11
13
  * @param config - Optional configuration including layoutId and version.
12
14
  * @param params - Additional parameters for the API call.
13
- * @returns The screen data if headers are available, otherwise null.
15
+ * @returns The screen data in new API format (camelCase)
14
16
  */
15
17
  getScreen(screenId: string, config?: GetScreenConfig, params?: any): Observable<CommonApiResponse>;
16
18
  /**
17
19
  * Retrieves the submission data from the server.
18
- * @param data - Object containing screenId and reqtokens
19
- * @returns A Subject emitting the submission data or undefined.
20
+ * NEW: Uses formio service endpoint - returns new API format directly
21
+ *
22
+ * @param screenId - The ID of the screen to retrieve data for
23
+ * @param requestPayload - Request payload containing Reqtokens and other parameters
24
+ * @returns The screen data in new API format (camelCase)
20
25
  */
21
26
  getScreenData(screenId: string, requestPayload: any): Observable<CommonApiResponse>;
22
27
  /**
23
- * Called when the form is submitted.
24
- * @param data Object containing submission data.
25
- */
28
+ * Process form request - handles both SYNC and ASYNC operations transparently
29
+ *
30
+ * SYNC Operation: Backend returns insertedId immediately → Fetch full record → Return
31
+ * ASYNC Operation: Backend returns correlationId → Wait for SignalR notification → Fetch full record → Return
32
+ *
33
+ * Developer code stays the same for both cases - platform handles complexity
34
+ *
35
+ * @param data Object containing submission data (ScreenId, Data)
36
+ * @returns Observable with full record data (always returns complete record)
37
+ */
26
38
  processRequest(data: ProcessRequestPayload): Observable<CommonApiResponse>;
39
+ /**
40
+ * Handle SYNC operation - fetch full record immediately
41
+ */
42
+ private handleSyncOperation;
43
+ /**
44
+ * Handle ASYNC operation - wait for SignalR notification, then fetch full record
45
+ */
46
+ private handleAsyncOperation;
47
+ /**
48
+ * Fetch full record from CRUD service
49
+ * @param objectName - Entity/Table name
50
+ * @param recordId - Record ID to fetch
51
+ * @param primaryKeyField - Primary key field name (defaults to 'Id')
52
+ */
53
+ private fetchFullRecord;
27
54
  /**
28
55
  * Retrieves the formIO components for the given appObjectId and type.
29
56
  * @param appObjectId - The ID of the app object.
@@ -1,12 +1,14 @@
1
1
  import { APISelectQuery } from '../models/api-query.class';
2
2
  import { Observable } from 'rxjs';
3
- import { CommonApiResponse, HttpExecuteRequestPayload, ImprotDataPayload, RcordHistoryPayload, SearchDataPayload } from '../interfaces/common.interface';
3
+ import { CommonApiResponse, HttpExecuteRequestPayload, ImportDataPayload, RcordHistoryPayload, SearchDataPayload } from '../interfaces/common.interface';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class TabGetService {
6
6
  private readonly apiService;
7
7
  private readonly dsqHelper;
8
+ private readonly metadataHelper;
8
9
  /**
9
10
  * Execute RAW DSQ with Name
11
+ * NEW: Uses new backend endpoint and CRUD microservice
10
12
  * @param data - Object containing AppObjectName and DSQName
11
13
  * @returns Response from the API
12
14
  */
@@ -18,25 +20,65 @@ export declare class TabGetService {
18
20
  */
19
21
  getRecord(params: any): any;
20
22
  /**
21
- * Get History
23
+ * Get History from Kibana microservice
22
24
  * @param appObjectId - ID of the application object
23
25
  * @param recordIds - Array of record IDs
24
26
  * @returns Response from the API
25
27
  */
26
- getHistory(payload: RcordHistoryPayload): Observable<CommonApiResponse>;
28
+ getHistory(payload: RcordHistoryPayload, headers?: any): Observable<CommonApiResponse>;
27
29
  /**
28
- * PMJAY Import
29
- * @param data - Data for PMJAY import
30
+ * Import data via report microservice
31
+ * @param data - Import data payload
30
32
  * @returns Response from the API
31
33
  */
32
- pmjayImport(data: ImprotDataPayload): any;
34
+ importData(data: ImportDataPayload): any;
33
35
  /**
34
36
  * Executes a select query with optional parameters
35
- * @param data - The select query data
37
+ * NEW: Uses new CRUD microservice endpoint with transformed payload
38
+ * @param data - The select query data (old format)
36
39
  * @param parameters - Optional parameters to be applied to the query
40
+ * @param additionalConfig - Optional additional configuration
37
41
  * @returns Result of the select query execution
38
42
  */
39
- selectExecutor(data: APISelectQuery, parameters?: any, additionalConfig?: any): Observable<CommonApiResponse>;
43
+ selectExecutor(data: APISelectQuery, parameters?: any, additionalConfig?: any, headers?: any): Observable<CommonApiResponse>;
44
+ /**
45
+ * Prepares select query data by applying parameters and additional configuration
46
+ * @param data - The select query data
47
+ * @param parameters - Optional parameters to replace in filters
48
+ * @param additionalConfig - Optional additional configuration to merge
49
+ * @returns Prepared APISelectQuery with parameters applied
50
+ */
51
+ private prepareSelectQueryData;
52
+ /**
53
+ * Transforms old APISelectQuery format to new CRUD API format
54
+ * @param apiSelectQuery - The old format select query
55
+ * @returns CRUDSelectPayload - The new format payload
56
+ */
57
+ private transformToCRUDPayload;
58
+ /**
59
+ * Gets entity name from QueryObjectID
60
+ */
61
+ private getEntityName;
62
+ /**
63
+ * Transforms Joins to includes array
64
+ */
65
+ private transformJoinsToIncludes;
66
+ /**
67
+ * Transforms TopCount to Pager object
68
+ */
69
+ private transformPager;
70
+ /**
71
+ * Transforms WhereClause to new format
72
+ */
73
+ private transformWhereClause;
74
+ /**
75
+ * Transforms a single filter to new format
76
+ */
77
+ private transformFilter;
78
+ /**
79
+ * Transforms Sort array to new format
80
+ */
81
+ private transformSort;
40
82
  /**
41
83
  * Executes a select query by its ID, using the provided parameters.
42
84
  *
@@ -45,10 +87,10 @@ export declare class TabGetService {
45
87
  * @returns The result of the select query execution.
46
88
  * @throws An error if the API response status code is not '200'.
47
89
  */
48
- executeSelectQueryById(selectQueryId: string, parameters?: any, additionalConfig?: any): Observable<CommonApiResponse>;
90
+ executeSelectQueryById(selectQueryId: string, parameters?: any, additionalConfig?: any, headers?: any): Observable<CommonApiResponse>;
49
91
  removeWhereClauseForEmptyParams(filters: any[], parameters: Record<string, any>): any[];
50
92
  /**
51
- * Get Search Data
93
+ * Get Search Data from Kibana microservice
52
94
  * @param searchQuery - Search Query string
53
95
  * @param limit - Limit of search results
54
96
  * @returns Response from the API
@@ -1,37 +1,32 @@
1
- import { AppObject } from '../models/app-object.class';
1
+ import { Observable } from 'rxjs';
2
+ import { CommonApiResponse } from '../interfaces/common.interface';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class TabInsertService {
4
- private readonly dsqHelper;
5
5
  private readonly screenHelper;
6
- private readonly whereClauseHelper;
7
- private readonly requestResponseHelper;
6
+ private readonly apiService;
7
+ private readonly signalRService;
8
+ private readonly metadataHelper;
8
9
  /**
9
10
  * Inserts data by screen ID.
10
11
  * @param screenId The ID of the screen.
11
12
  * @param data The data to insert.
12
13
  * @returns An Observable with the insert result.
13
14
  */
14
- insertByScreenId(screenId: string, data: any): import("rxjs").Observable<any> | null;
15
+ insertByScreenId(screenId: string, data: any): Observable<CommonApiResponse>;
15
16
  /**
16
- * Inserts data by object ID.
17
- * @param objectId The ID of the object.
18
- * @param data The data to insert.
19
- * @returns An Observable with the insert result.
17
+ * Insert using /records/insert endpoint with SYNC/ASYNC support
18
+ * @param objectId The ID of the object
19
+ * @param data The data to insert
20
+ * @param headers Optional headers
21
+ * @returns Observable with insertedId
20
22
  */
21
- insertByObjectId(objectId: string, data: any, headers?: any): import("rxjs").Observable<any> | null;
23
+ insertByObjectId(objectId: string, data: any, headers?: any): Observable<CommonApiResponse>;
22
24
  /**
23
- * Prepares data for insertion.
24
- * @param appObject The app object.
25
- * @param data The data to insert.
26
- * @returns An Observable with the prepared data.
27
- */
28
- prepareInsert(appObject: AppObject, data: any, headers?: any): import("rxjs").Observable<any> | null;
29
- /**
30
- * Inserts data.
31
- * @param data The data to insert.
32
- * @returns An Observable with the insert result.
25
+ * Handle async insert - wait for SignalR notification
26
+ * @param response Initial response with correlationId
27
+ * @returns Observable with insertedId from SignalR notification
33
28
  */
34
- insert(data: any, headers?: any): import("rxjs").Observable<any> | null;
29
+ private handleAsyncInsert;
35
30
  static ɵfac: i0.ɵɵFactoryDeclaration<TabInsertService, never>;
36
31
  static ɵprov: i0.ɵɵInjectableDeclaration<TabInsertService>;
37
32
  }
@@ -1,31 +1,46 @@
1
- import { APIUpdateQuery } from "../models/api-query.class";
1
+ import { Observable } from 'rxjs';
2
+ import { CommonApiResponse } from '../interfaces/common.interface';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class TabUpdateService {
4
- private readonly dsqHelper;
5
5
  private readonly screenHelper;
6
6
  private readonly whereClauseHelper;
7
- private readonly requestResponseHelper;
8
- update(data: APIUpdateQuery, headers?: any): import("rxjs").Observable<any> | null;
9
- updateUsingDSQ(dsqId: string, data: any, tableName: string, queryFieldsArray?: any, headers?: any): import("rxjs").Observable<any> | null;
7
+ private readonly apiService;
8
+ private readonly signalRService;
9
+ private readonly metadataHelper;
10
10
  /**
11
- * Parth B Thakkar - 2024-11-06
12
- * Updates a record in the database based on the provided object ID.
13
- * Same code as updateUsingScreenId with minor modifications like using the object ID directly instead of the screen ID.
14
- * @param objectId The object ID of the record to update.
15
- * @param data The data to update the record with.
16
- * @returns The response from the update operation.
11
+ * Update using /records/update endpoint with SYNC/ASYNC support
12
+ * @param objectId The object ID
13
+ * @param data The data to update
14
+ * @param headers Optional headers
15
+ * @returns Observable with update result
16
+ */
17
+ updateByObjectId(objectId: string, data: any, headers?: any): Observable<CommonApiResponse> | null;
18
+ /**
19
+ * Handle async update - wait for SignalR notification
20
+ * @param response Initial response with correlationId
21
+ * @returns Observable with update result
22
+ */
23
+ private handleAsyncUpdate;
24
+ /**
25
+ * Update using screen ID
26
+ * @param screenId The screen ID
27
+ * @param data The data to update
28
+ * @param objectIdToSave Optional object ID to save
29
+ * @param headers Optional headers
30
+ * @returns Observable with update result
17
31
  */
18
- updateByObjectId(objectId: string, data: any): import("rxjs").Observable<any> | null;
19
- updateUsingScreenId(screenId: string, data: any, objectIdToSave?: string, headers?: any): import("rxjs").Observable<any> | null;
20
- updateScreen(screenId: string, screenData: any): import("rxjs").Observable<any> | null;
32
+ updateUsingScreenId(screenId: string, data: any, objectIdToSave?: string, headers?: any): Observable<CommonApiResponse> | null;
21
33
  /**
22
- * Update records using the provided DSQ ID, data, filters
23
- * @param dsqId The ID of the DataSourceQuery to use for the update
34
+ * Update using DSQ ID with custom table name and query fields
35
+ * Uses custom queryFieldsArray for where clause instead of primary key
36
+ * @param dsqId The DSQ ID
24
37
  * @param data The data to update
25
- * @param filters The filters to apply to the update
26
- * @returns The response from the update operation
38
+ * @param tableName The table name
39
+ * @param queryFieldsArray Query fields array for custom where clause
40
+ * @param headers Optional headers
41
+ * @returns Observable with update result
27
42
  */
28
- updateUsingDsqIdFiltersAndCustomViewId(dsqId: string, data: any, filters: any): import("rxjs").Observable<any> | null;
43
+ updateUsingDSQ(dsqId: string, data: any, tableName?: string, queryFieldsArray?: any, headers?: any): Observable<CommonApiResponse> | null;
29
44
  static ɵfac: i0.ɵɵFactoryDeclaration<TabUpdateService, never>;
30
45
  static ɵprov: i0.ɵɵInjectableDeclaration<TabUpdateService>;
31
46
  }
@@ -1,11 +1,8 @@
1
1
  export declare enum QueryType {
2
2
  Select = 0,
3
- Insert = 1,
4
- Update = 2,
5
- Delete = 3,
6
- Upsert = 4,
7
- BulkUpdate = 5,
8
- BulkInsert = 6
3
+ Upsert = 1,
4
+ BulkUpdate = 2,
5
+ BulkInsert = 3
9
6
  }
10
7
  export declare enum JoinType {
11
8
  LeftJoin = 1,
@@ -0,0 +1,32 @@
1
+ import { CommonApiResponse } from '../interfaces/common.interface';
2
+ /**
3
+ * AuthResponseAdapter - Transforms new auth API response to legacy format
4
+ *
5
+ * The new identity service returns a flat response structure with camelCase fields.
6
+ * This adapter converts it to the old nested structure expected by the application.
7
+ *
8
+ * New format (flat):
9
+ * { userId, email, userName, accessToken, refreshToken, expiresIn, roles, ... }
10
+ *
11
+ * Old format (nested):
12
+ * { user: { Id, UserName, Roles, PersonData, Attributes, ... }, Token, RefreshToken, RefreshTokenExpiry }
13
+ *
14
+ * Note: A duplicate LoginResponseAdapter exists on branch TE-42-8422/Api-Rewrite.
15
+ * On merge, discard one and keep this file.
16
+ */
17
+ export declare class AuthResponseAdapter {
18
+ /**
19
+ * Transforms the normalized CommonApiResponse's Result from new flat format to old nested format.
20
+ * If the Result is already in old format (has .user or .Token), returns as-is.
21
+ *
22
+ * @param response - The CommonApiResponse (already top-level normalized by ResponseAdapter)
23
+ * @returns The response with Result transformed to legacy nested format
24
+ */
25
+ static normalize(response: CommonApiResponse): CommonApiResponse;
26
+ /**
27
+ * Transforms roles from new camelCase format to old PascalCase format.
28
+ * Structure: { tenantId: { appId: { envId: [{ id, roleName, description }] } } }
29
+ * becomes: { tenantId: { appId: { envId: [{ ID, RoleName, Description }] } } }
30
+ */
31
+ private static transformRoles;
32
+ }
@@ -10,14 +10,9 @@ export declare class AppHelper {
10
10
  */
11
11
  rebuildApp(payload?: any, headers?: any): Observable<CommonApiResponse>;
12
12
  /**
13
- * Retrieves screen data.
14
- * @param params Optional parameters for retrieving screen data
15
- * @returns Screen data
16
- */
17
- getScreen(params?: any): Observable<any> | null;
18
- /**
19
- * Retrieves schema data.
20
- * @returns Subscription for getting schema data
13
+ * Retrieves schema data from the new metadata API.
14
+ * Uses metadataService microservice endpoint
15
+ * @returns Subscription for getting schema data (result is object, not stringified JSON)
21
16
  */
22
17
  getSchema(): Observable<CommonApiResponse>;
23
18
  /**
@@ -81,12 +76,14 @@ export declare class AppHelper {
81
76
  refreshRecordInfoData(data: RefreshRecordInfoDataPayload): Observable<CommonApiResponse>;
82
77
  /**
83
78
  * Exports a report based on the given parameters.
79
+ * Uses Report microservice with camelCase payload
84
80
  * @param payload Parameters for exporting the report
85
81
  * @returns The result of the export operation
86
82
  */
87
83
  exportReport(payload: ReportPayload): Observable<CommonApiResponse>;
88
84
  /**
89
85
  * Downloads a report file based on the given parameters.
86
+ * Uses Report microservice with camelCase payload
90
87
  * @param payload Parameters for downloading the report file
91
88
  * @returns The result of the download operation
92
89
  */
@@ -114,7 +111,7 @@ export declare class AppHelper {
114
111
  * @param data - Data to insert
115
112
  * @returns Response from the API
116
113
  */
117
- insertScreenPerformanceStatistics(data: ScreenPerformancePayload): Observable<CommonApiResponse>;
114
+ insertScreenPerformanceStatistics(data: ScreenPerformancePayload, customHeaders?: any): Observable<CommonApiResponse>;
118
115
  /**
119
116
  * Retrieves all documents.
120
117
  * @param headers Optional headers for the request.
@@ -3,8 +3,11 @@ import { AccessType } from '../../enums/permission.enum';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class DSQHelper {
5
5
  private readonly apiService;
6
+ private readonly metadataHelper;
6
7
  /**
7
8
  * Executes a query based on the query type
9
+ * NOTE: INSERT, UPDATE, and DELETE now use new /records/* endpoints
10
+ * This helper now only handles legacy endpoints: BulkInsert and Select
8
11
  * @param data The data to be executed
9
12
  * @param queryType The type of query to be executed
10
13
  * @returns The result of the query execution
@@ -27,9 +27,9 @@ export declare class MetadataHelper {
27
27
  * the given condition, it creates a new model using the given model factory and adds it to the map.
28
28
  * @param map The map to search in.
29
29
  * @param key The key to search for.
30
- * @param sourceList The list of items to search in.
31
- * @param matchFn The condition to match.
32
- * @param modelFactory The factory to create a new model if the key does not exist.
30
+ * @param sourceList The list of raw items to search in.
31
+ * @param matchFn The condition to match against raw items.
32
+ * @param modelFactory The factory to create a new model from raw item.
33
33
  * @returns The value associated with the given key, or null if no match is found.
34
34
  */
35
35
  private getFromMapOrCreate;
@@ -1,21 +1,7 @@
1
- import { APIBulkInsertFieldsValueSets, APIFilterCriteria, APIValueSets } from '../../models/api-query.class';
1
+ import { APIBulkInsertFieldsValueSets, APIFilterCriteria } from '../../models/api-query.class';
2
2
  import { QueryType } from '../../enums/query.enum';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class RequestResponseHelper {
5
- /**
6
- * Generates the payload for inserting data into a table
7
- * @param table The table name to insert data into
8
- * @param whereClause The filter criteria for the insert operation
9
- * @param value The value sets to be inserted
10
- * @returns The payload for the insert operation
11
- */
12
- insertPayload(table: string, whereClause: APIFilterCriteria, value: APIValueSets[]): {
13
- QueryObjectID: string;
14
- QueryType: QueryType;
15
- Joins: never[];
16
- WhereClause: APIFilterCriteria;
17
- Values: APIValueSets[];
18
- };
19
5
  /**
20
6
  * Generates the payload for inserting data into a table in bulk
21
7
  * @param table The table name to insert data into
@@ -34,44 +20,14 @@ export declare class RequestResponseHelper {
34
20
  };
35
21
  /**
36
22
  * Generates the payload for deleting data from a table
37
- * @param tableName The table name to delete data from
38
- * @param whereClause The filter criteria for the delete operation
39
- * @returns The payload for the delete operation
23
+ * NEW: Returns new format for /records/delete endpoint
24
+ * @param tableName The table name (entityName) to delete data from
25
+ * @param whereClause The filter criteria for the delete operation (NEW format with lowercase)
26
+ * @returns The payload for the delete operation in NEW format
40
27
  */
41
28
  deletePayload(tableName: string, whereClause: APIFilterCriteria): {
42
- QueryObjectID: string;
43
- QueryType: QueryType;
44
- Joins: never[];
45
- WhereClause: APIFilterCriteria;
46
- };
47
- /**
48
- * Generates the payload for updating data in a table
49
- * @param tableName The table name to update data in
50
- * @param whereClause The filter criteria for the update operation
51
- * @param value The value sets to be updated
52
- * @returns The payload for the update operation
53
- */
54
- updateRequestPayload(tableName: string, whereClause: APIFilterCriteria, value: APIValueSets[]): {
55
- QueryObjectID: string;
56
- QueryType: QueryType;
57
- Joins: never[];
58
- WhereClause: APIFilterCriteria;
59
- Values: APIValueSets[];
60
- };
61
- /**
62
- * Creates a payload object based on the input parameters
63
- * @param table The table name for the payload
64
- * @param whereClause The filter criteria for the payload
65
- * @param value The value sets for the payload
66
- * @param queryType The type of query for the payload
67
- * @returns The payload object with QueryObjectID, QueryType, Joins, WhereClause, and Values
68
- */
69
- createPayload(table: string, whereClause: APIFilterCriteria, value: APIValueSets[], queryType: QueryType): {
70
- QueryObjectID: string;
71
- QueryType: QueryType;
72
- Joins: never[];
73
- WhereClause: APIFilterCriteria;
74
- Values: APIValueSets[];
29
+ entityName: string;
30
+ whereClause: APIFilterCriteria;
75
31
  };
76
32
  /**
77
33
  * Creates a payload object for bulk insert operations