@techextensor/tab-core-utility 2.2.193 → 2.2.194

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 (85) hide show
  1. package/esm2022/index.mjs +1 -6
  2. package/esm2022/lib/tab-core-utility/app/constants/api-constants.mjs +22 -38
  3. package/esm2022/lib/tab-core-utility/app/constants/common.mjs +50 -14
  4. package/esm2022/lib/tab-core-utility/app/constants/storage-constants.mjs +2 -2
  5. package/esm2022/lib/tab-core-utility/app/crud/tab-blueprint.service.mjs +14 -41
  6. package/esm2022/lib/tab-core-utility/app/crud/tab-crud.service.mjs +68 -47
  7. package/esm2022/lib/tab-core-utility/app/crud/tab-delete.service.mjs +30 -84
  8. package/esm2022/lib/tab-core-utility/app/crud/tab-formio.service.mjs +12 -141
  9. package/esm2022/lib/tab-core-utility/app/crud/tab-get.service.mjs +42 -137
  10. package/esm2022/lib/tab-core-utility/app/crud/tab-insert.service.mjs +38 -89
  11. package/esm2022/lib/tab-core-utility/app/crud/tab-update.service.mjs +128 -156
  12. package/esm2022/lib/tab-core-utility/app/enums/query.enum.mjs +7 -7
  13. package/esm2022/lib/tab-core-utility/app/helpers/common/app.helpers.mjs +23 -28
  14. package/esm2022/lib/tab-core-utility/app/helpers/common/dsq.helpers.mjs +11 -9
  15. package/esm2022/lib/tab-core-utility/app/helpers/common/meta-data.helpers.mjs +13 -13
  16. package/esm2022/lib/tab-core-utility/app/helpers/common/req-res.helpers.mjs +45 -7
  17. package/esm2022/lib/tab-core-utility/app/helpers/common/where-clause.helpers.mjs +76 -79
  18. package/esm2022/lib/tab-core-utility/app/helpers/screen/grid.helpers.mjs +4 -8
  19. package/esm2022/lib/tab-core-utility/app/helpers/screen/screen.helpers.mjs +33 -8
  20. package/esm2022/lib/tab-core-utility/app/interfaces/auth.interface.mjs +1 -1
  21. package/esm2022/lib/tab-core-utility/app/interfaces/common.interface.mjs +1 -1
  22. package/esm2022/lib/tab-core-utility/app/models/api-query.class.mjs +1 -39
  23. package/esm2022/lib/tab-core-utility/app/models/app-field.model.mjs +7 -36
  24. package/esm2022/lib/tab-core-utility/app/models/app-object.model.mjs +47 -84
  25. package/esm2022/lib/tab-core-utility/app/models/app-screen.model.mjs +13 -24
  26. package/esm2022/lib/tab-core-utility/app/models/data-source-query.model.mjs +23 -57
  27. package/esm2022/lib/tab-core-utility/app/models/filter.model.mjs +10 -21
  28. package/esm2022/lib/tab-core-utility/app/models/parameter.model.mjs +6 -12
  29. package/esm2022/lib/tab-core-utility/app/models/sort.model.mjs +4 -11
  30. package/esm2022/lib/tab-core-utility/app/utils/json.util.mjs +16 -17
  31. package/esm2022/lib/tab-core-utility/app/utils/req-res.util.mjs +55 -1
  32. package/esm2022/lib/tab-core-utility/app/utils/tab-app.util.mjs +164 -1
  33. package/esm2022/lib/tab-core-utility/auth/auth.service.mjs +11 -36
  34. package/esm2022/lib/tab-core-utility/core/http-client/api.service.mjs +1 -78
  35. package/index.d.ts +0 -5
  36. package/lib/tab-core-utility/app/constants/api-constants.d.ts +18 -25
  37. package/lib/tab-core-utility/app/constants/common.d.ts +0 -9
  38. package/lib/tab-core-utility/app/constants/storage-constants.d.ts +1 -1
  39. package/lib/tab-core-utility/app/crud/tab-blueprint.service.d.ts +8 -14
  40. package/lib/tab-core-utility/app/crud/tab-crud.service.d.ts +7 -9
  41. package/lib/tab-core-utility/app/crud/tab-delete.service.d.ts +10 -20
  42. package/lib/tab-core-utility/app/crud/tab-formio.service.d.ts +6 -33
  43. package/lib/tab-core-utility/app/crud/tab-get.service.d.ts +8 -50
  44. package/lib/tab-core-utility/app/crud/tab-insert.service.d.ts +21 -16
  45. package/lib/tab-core-utility/app/crud/tab-update.service.d.ts +19 -34
  46. package/lib/tab-core-utility/app/enums/query.enum.d.ts +6 -3
  47. package/lib/tab-core-utility/app/helpers/common/app.helpers.d.ts +8 -5
  48. package/lib/tab-core-utility/app/helpers/common/dsq.helpers.d.ts +0 -3
  49. package/lib/tab-core-utility/app/helpers/common/meta-data.helpers.d.ts +3 -3
  50. package/lib/tab-core-utility/app/helpers/common/req-res.helpers.d.ts +51 -7
  51. package/lib/tab-core-utility/app/helpers/common/where-clause.helpers.d.ts +0 -1
  52. package/lib/tab-core-utility/app/helpers/screen/grid.helpers.d.ts +1 -2
  53. package/lib/tab-core-utility/app/helpers/screen/screen.helpers.d.ts +0 -1
  54. package/lib/tab-core-utility/app/interfaces/auth.interface.d.ts +1 -1
  55. package/lib/tab-core-utility/app/interfaces/common.interface.d.ts +6 -56
  56. package/lib/tab-core-utility/app/models/api-query.class.d.ts +9 -54
  57. package/lib/tab-core-utility/app/models/app-field.model.d.ts +2 -4
  58. package/lib/tab-core-utility/app/models/app-object.model.d.ts +3 -5
  59. package/lib/tab-core-utility/app/models/app-screen.model.d.ts +2 -2
  60. package/lib/tab-core-utility/app/models/data-source-query.model.d.ts +2 -7
  61. package/lib/tab-core-utility/app/models/filter.model.d.ts +2 -2
  62. package/lib/tab-core-utility/app/models/parameter.model.d.ts +2 -2
  63. package/lib/tab-core-utility/app/models/sort.model.d.ts +1 -1
  64. package/lib/tab-core-utility/app/utils/json.util.d.ts +2 -3
  65. package/lib/tab-core-utility/app/utils/req-res.util.d.ts +9 -1
  66. package/lib/tab-core-utility/app/utils/tab-app.util.d.ts +61 -0
  67. package/lib/tab-core-utility/auth/auth.service.d.ts +0 -6
  68. package/lib/tab-core-utility/core/http-client/api.service.d.ts +0 -46
  69. package/package.json +2 -3
  70. package/esm2022/lib/tab-core-utility/app/helpers/auth-response.adapter.mjs +0 -79
  71. package/esm2022/lib/tab-core-utility/app/helpers/login-response.adapter.mjs +0 -76
  72. package/esm2022/lib/tab-core-utility/app/helpers/response.adapter.mjs +0 -38
  73. package/esm2022/lib/tab-core-utility/app/helpers/transition-response.adapter.mjs +0 -83
  74. package/esm2022/lib/tab-core-utility/app/interfaces/signalr.interface.mjs +0 -42
  75. package/esm2022/lib/tab-core-utility/core/service/signalr/operation-tracker.service.mjs +0 -90
  76. package/esm2022/lib/tab-core-utility/core/service/signalr/signalr-infrastructure.service.mjs +0 -268
  77. package/esm2022/lib/tab-core-utility/core/service/signalr/signalr.service.mjs +0 -207
  78. package/lib/tab-core-utility/app/helpers/auth-response.adapter.d.ts +0 -32
  79. package/lib/tab-core-utility/app/helpers/login-response.adapter.d.ts +0 -29
  80. package/lib/tab-core-utility/app/helpers/response.adapter.d.ts +0 -22
  81. package/lib/tab-core-utility/app/helpers/transition-response.adapter.d.ts +0 -30
  82. package/lib/tab-core-utility/app/interfaces/signalr.interface.d.ts +0 -84
  83. package/lib/tab-core-utility/core/service/signalr/operation-tracker.service.d.ts +0 -40
  84. package/lib/tab-core-utility/core/service/signalr/signalr-infrastructure.service.d.ts +0 -73
  85. package/lib/tab-core-utility/core/service/signalr/signalr.service.d.ts +0 -122
@@ -22,6 +22,6 @@ export declare const StorageConstants: {
22
22
  refreshTokenExpiry: string;
23
23
  appNavigationMapping: string;
24
24
  tokenInfo: string;
25
- EnvironmentId: string;
25
+ Environment: string;
26
26
  Screen: string;
27
27
  };
@@ -3,26 +3,20 @@ 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;
7
6
  /**
8
7
  * Retrieves the next status of a record.
9
- * Uses new crudService endpoint: GET status/available?recordId=...&EntityName=...
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.
10
11
  */
11
- getNextStatus(payload: NextStatusPayload, headers?: any): Observable<CommonApiResponse>;
12
+ getNextStatus(payload: NextStatusPayload, params?: any, customHeaders?: any): Observable<CommonApiResponse>;
12
13
  /**
13
14
  * Updates the status of a record.
14
- * Uses new crudService endpoint: PUT status/update?recordId=...&nextStatusId=...&EntityName=...
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.
15
18
  */
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;
19
+ updateStatus(payload: UpdateStatusPayload, params?: any, customHeaders?: any): Observable<CommonApiResponse>;
26
20
  static ɵfac: i0.ɵɵFactoryDeclaration<TabBlueprintService, never>;
27
21
  static ɵprov: i0.ɵɵInjectableDeclaration<TabBlueprintService>;
28
22
  }
@@ -6,10 +6,6 @@ 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;
13
9
  /**
14
10
  * Returns the AppObjectModel from the given payload.
15
11
  * @param payload The payload with either dataSourceQueryIdOrName or appObjectIdOrName.
@@ -29,8 +25,13 @@ export declare class TabCrudService {
29
25
  /**
30
26
  * Generates a where clause based on the criteria provided.
31
27
  *
32
- * @param criteria The criteria object to generate the where clause from.
28
+ * Supports two formats for criteria:
29
+ * - **Object** `{ Id: 'xxx' }` — auto-builds EqualTo filters for each key-value pair.
30
+ * - **Array** `[{ ConjuctionClause, FieldID, RelationalOperator, ValueType, Value, ... }]` — uses filters directly as provided.
31
+ *
32
+ * @param criteria The criteria object or filter array to generate the where clause from.
33
33
  * @param crudTableName The CRUD table name to use in the where clause.
34
+ * @param provideEmptyWhereClause If true, allows empty criteria.
34
35
  * @returns A new APIFilterCriteria object with the generated where clause.
35
36
  */
36
37
  private generateWhereClause;
@@ -43,16 +44,14 @@ export declare class TabCrudService {
43
44
  get(payload: GetPayload, headers?: any): Observable<CommonApiResponse>;
44
45
  /**
45
46
  * Inserts data into the specified table.
46
- * NEW: Delegates to TabInsertService which uses /records/insert endpoint with SYNC/ASYNC support
47
47
  * @param payload The payload containing the data to insert and the AppObjectModel ID.
48
48
  * @param headers Optional headers for the request.
49
- * @returns An observable of the response from the API (returns insertedId only).
49
+ * @returns An observable of the response from the API.
50
50
  */
51
51
  insert(payload: InsertPayload, headers?: any): Observable<CommonApiResponse>;
52
52
  bulkInsert(payload: InsertPayload, headers?: any): Observable<CommonApiResponse>;
53
53
  /**
54
54
  * Updates data in the specified table.
55
- * NEW: Delegates to TabUpdateService which uses /records/update endpoint with SYNC/ASYNC support
56
55
  * @param payload The payload containing the data to update, the criteria for the update, and the AppObjectModel ID.
57
56
  * @param headers Optional headers for the request.
58
57
  * @returns An observable of the response from the API.
@@ -60,7 +59,6 @@ export declare class TabCrudService {
60
59
  update(payload: UpdatePayload, headers?: any): Observable<CommonApiResponse>;
61
60
  /**
62
61
  * Deletes data from the specified table.
63
- * NEW: Delegates to TabDeleteService which uses /records/delete endpoint with SYNC/ASYNC support
64
62
  * @param payload The payload containing the criteria for the delete and the AppObjectModel ID.
65
63
  * @param headers Optional headers for the request.
66
64
  * @returns An observable of the response from the API.
@@ -1,13 +1,10 @@
1
- import { Observable } from 'rxjs';
2
- import { CommonApiResponse } from '../interfaces/common.interface';
1
+ import { APIDeleteQuery } from "../models/api-query.class";
3
2
  import * as i0 from "@angular/core";
4
3
  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;
11
8
  /**
12
9
  * Deletes a record based on the given screen ID, data, and object ID.
13
10
  * @param screenId The ID of the screen.
@@ -15,7 +12,7 @@ export declare class TabDeleteService {
15
12
  * @param objectIDToSave The object ID of the record to save.
16
13
  * @returns An Observable emitting the response of the delete operation.
17
14
  */
18
- deleteRecord(screenId: string, data: any, objectIDToSave: any): Observable<CommonApiResponse> | null;
15
+ deleteRecord(screenId: string, data: any, objectIDToSave: any): import("rxjs").Observable<any> | null;
19
16
  /**
20
17
  * Deletes a record by the specified table name and primary key value.
21
18
  * @param tableName The name of the table.
@@ -23,20 +20,13 @@ export declare class TabDeleteService {
23
20
  * @param primaryKeyValue The value of the primary key.
24
21
  * @returns An Observable emitting the response of the delete operation.
25
22
  */
26
- deleteRecordByTable(tableName: string, primaryKey: string, primaryKeyValue: string): Observable<CommonApiResponse>;
23
+ deleteRecordByTable(tableName: string, primaryKey: string, primaryKeyValue: string): import("rxjs").Observable<any> | null;
27
24
  /**
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
25
+ * Executes the delete operation.
26
+ * @param data The delete query payload.
27
+ * @returns An Observable emitting the response of the delete operation.
38
28
  */
39
- private handleAsyncDelete;
29
+ delete(data: APIDeleteQuery, headers?: any): import("rxjs").Observable<any> | null;
40
30
  /**
41
31
  * Displays a delete confirmation popup.
42
32
  * @returns True if the user confirms the delete operation, otherwise false.
@@ -48,7 +38,7 @@ export declare class TabDeleteService {
48
38
  * @param values The values of the records to delete.
49
39
  * @returns An Observable emitting the response of the delete operation.
50
40
  */
51
- deleteMultipleRecordByTable(tableName: string, values: any): Observable<CommonApiResponse>;
41
+ deleteMultipleRecordByTable(tableName: string, values: any): import("rxjs").Observable<any> | null;
52
42
  /**
53
43
  * Deletes multiple records from the specified table based on the provided data array.
54
44
  * The data array should contain key-value pairs without primary key information.
@@ -56,7 +46,7 @@ export declare class TabDeleteService {
56
46
  * @param values The array of data objects to delete.
57
47
  * @returns An Observable emitting the response of the delete operation.
58
48
  */
59
- deleteMultipleRecordByTableWithoutPrimaryKey(tableName: string, values: any, headers?: any): Observable<CommonApiResponse>;
49
+ deleteMultipleRecordByTableWithoutPrimaryKey(tableName: string, values: any, headers?: any): import("rxjs").Observable<any> | null;
60
50
  /**
61
51
  * Generates a values array from the data.
62
52
  * @param dataArray The array of data.
@@ -4,53 +4,26 @@ 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;
8
7
  /**
9
8
  * 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
11
9
  *
12
10
  * @param screenId - The ID of the screen to retrieve.
13
11
  * @param config - Optional configuration including layoutId and version.
14
12
  * @param params - Additional parameters for the API call.
15
- * @returns The screen data in new API format (camelCase)
13
+ * @returns The screen data if headers are available, otherwise null.
16
14
  */
17
15
  getScreen(screenId: string, config?: GetScreenConfig, params?: any): Observable<CommonApiResponse>;
18
16
  /**
19
17
  * Retrieves the submission data from the server.
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)
18
+ * @param data - Object containing screenId and reqtokens
19
+ * @returns A Subject emitting the submission data or undefined.
25
20
  */
26
21
  getScreenData(screenId: string, requestPayload: any): Observable<CommonApiResponse>;
27
22
  /**
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
- */
23
+ * Called when the form is submitted.
24
+ * @param data Object containing submission data.
25
+ */
38
26
  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;
54
27
  /**
55
28
  * Retrieves the formIO components for the given appObjectId and type.
56
29
  * @param appObjectId - The ID of the app object.
@@ -1,14 +1,12 @@
1
1
  import { APISelectQuery } from '../models/api-query.class';
2
2
  import { Observable } from 'rxjs';
3
- import { CommonApiResponse, HttpExecuteRequestPayload, ImportDataPayload, RcordHistoryPayload, SearchDataPayload } from '../interfaces/common.interface';
3
+ import { CommonApiResponse, HttpExecuteRequestPayload, ImprotDataPayload, 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;
9
8
  /**
10
9
  * Execute RAW DSQ with Name
11
- * NEW: Uses new backend endpoint and CRUD microservice
12
10
  * @param data - Object containing AppObjectName and DSQName
13
11
  * @returns Response from the API
14
12
  */
@@ -20,65 +18,25 @@ export declare class TabGetService {
20
18
  */
21
19
  getRecord(params: any): any;
22
20
  /**
23
- * Get History from Kibana microservice
21
+ * Get History
24
22
  * @param appObjectId - ID of the application object
25
23
  * @param recordIds - Array of record IDs
26
24
  * @returns Response from the API
27
25
  */
28
- getHistory(payload: RcordHistoryPayload, headers?: any): Observable<CommonApiResponse>;
26
+ getHistory(payload: RcordHistoryPayload, customHeaders?: any): Observable<CommonApiResponse>;
29
27
  /**
30
- * Import data via report microservice
31
- * @param data - Import data payload
28
+ * PMJAY Import
29
+ * @param data - Data for PMJAY import
32
30
  * @returns Response from the API
33
31
  */
34
- importData(data: ImportDataPayload): any;
32
+ pmjayImport(data: ImprotDataPayload): any;
35
33
  /**
36
34
  * Executes a select query with optional parameters
37
- * NEW: Uses new CRUD microservice endpoint with transformed payload
38
- * @param data - The select query data (old format)
35
+ * @param data - The select query data
39
36
  * @param parameters - Optional parameters to be applied to the query
40
- * @param additionalConfig - Optional additional configuration
41
37
  * @returns Result of the select query execution
42
38
  */
43
39
  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;
82
40
  /**
83
41
  * Executes a select query by its ID, using the provided parameters.
84
42
  *
@@ -90,7 +48,7 @@ export declare class TabGetService {
90
48
  executeSelectQueryById(selectQueryId: string, parameters?: any, additionalConfig?: any, headers?: any): Observable<CommonApiResponse>;
91
49
  removeWhereClauseForEmptyParams(filters: any[], parameters: Record<string, any>): any[];
92
50
  /**
93
- * Get Search Data from Kibana microservice
51
+ * Get Search Data
94
52
  * @param searchQuery - Search Query string
95
53
  * @param limit - Limit of search results
96
54
  * @returns Response from the API
@@ -1,32 +1,37 @@
1
- import { Observable } from 'rxjs';
2
- import { CommonApiResponse } from '../interfaces/common.interface';
1
+ import { AppObject } from '../models/app-object.class';
3
2
  import * as i0 from "@angular/core";
4
3
  export declare class TabInsertService {
4
+ private readonly dsqHelper;
5
5
  private readonly screenHelper;
6
- private readonly apiService;
7
- private readonly signalRService;
8
- private readonly metadataHelper;
6
+ private readonly whereClauseHelper;
7
+ private readonly requestResponseHelper;
9
8
  /**
10
9
  * Inserts data by screen ID.
11
10
  * @param screenId The ID of the screen.
12
11
  * @param data The data to insert.
13
12
  * @returns An Observable with the insert result.
14
13
  */
15
- insertByScreenId(screenId: string, data: any): Observable<CommonApiResponse>;
14
+ insertByScreenId(screenId: string, data: any): import("rxjs").Observable<any> | null;
16
15
  /**
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
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.
22
20
  */
23
- insertByObjectId(objectId: string, data: any, headers?: any): Observable<CommonApiResponse>;
21
+ insertByObjectId(objectId: string, data: any, headers?: any): import("rxjs").Observable<any> | null;
24
22
  /**
25
- * Handle async insert - wait for SignalR notification
26
- * @param response Initial response with correlationId
27
- * @returns Observable with insertedId from SignalR notification
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.
28
33
  */
29
- private handleAsyncInsert;
34
+ insert(data: any, headers?: any): import("rxjs").Observable<any> | null;
30
35
  static ɵfac: i0.ɵɵFactoryDeclaration<TabInsertService, never>;
31
36
  static ɵprov: i0.ɵɵInjectableDeclaration<TabInsertService>;
32
37
  }
@@ -1,46 +1,31 @@
1
- import { Observable } from 'rxjs';
2
- import { CommonApiResponse } from '../interfaces/common.interface';
1
+ import { APIUpdateQuery } from "../models/api-query.class";
3
2
  import * as i0 from "@angular/core";
4
3
  export declare class TabUpdateService {
4
+ private readonly dsqHelper;
5
5
  private readonly screenHelper;
6
6
  private readonly whereClauseHelper;
7
- private readonly apiService;
8
- private readonly signalRService;
9
- private readonly metadataHelper;
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;
10
10
  /**
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
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.
31
17
  */
32
- updateUsingScreenId(screenId: string, data: any, objectIdToSave?: string, headers?: any): Observable<CommonApiResponse> | null;
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;
33
21
  /**
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
22
+ * Update records using the provided DSQ ID, data, filters
23
+ * @param dsqId The ID of the DataSourceQuery to use for the update
37
24
  * @param data The data to update
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
25
+ * @param filters The filters to apply to the update
26
+ * @returns The response from the update operation
42
27
  */
43
- updateUsingDSQ(dsqId: string, data: any, tableName?: string, queryFieldsArray?: any, headers?: any): Observable<CommonApiResponse> | null;
28
+ updateUsingDsqIdFiltersAndCustomViewId(dsqId: string, data: any, filters: any): import("rxjs").Observable<any> | null;
44
29
  static ɵfac: i0.ɵɵFactoryDeclaration<TabUpdateService, never>;
45
30
  static ɵprov: i0.ɵɵInjectableDeclaration<TabUpdateService>;
46
31
  }
@@ -1,8 +1,11 @@
1
1
  export declare enum QueryType {
2
2
  Select = 0,
3
- Upsert = 1,
4
- BulkUpdate = 2,
5
- BulkInsert = 3
3
+ Insert = 1,
4
+ Update = 2,
5
+ Delete = 3,
6
+ Upsert = 4,
7
+ BulkUpdate = 5,
8
+ BulkInsert = 6
6
9
  }
7
10
  export declare enum JoinType {
8
11
  LeftJoin = 1,
@@ -10,9 +10,14 @@ export declare class AppHelper {
10
10
  */
11
11
  rebuildApp(payload?: any, headers?: any): Observable<CommonApiResponse>;
12
12
  /**
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)
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
16
21
  */
17
22
  getSchema(): Observable<CommonApiResponse>;
18
23
  /**
@@ -76,14 +81,12 @@ export declare class AppHelper {
76
81
  refreshRecordInfoData(data: RefreshRecordInfoDataPayload): Observable<CommonApiResponse>;
77
82
  /**
78
83
  * Exports a report based on the given parameters.
79
- * Uses Report microservice with camelCase payload
80
84
  * @param payload Parameters for exporting the report
81
85
  * @returns The result of the export operation
82
86
  */
83
87
  exportReport(payload: ReportPayload): Observable<CommonApiResponse>;
84
88
  /**
85
89
  * Downloads a report file based on the given parameters.
86
- * Uses Report microservice with camelCase payload
87
90
  * @param payload Parameters for downloading the report file
88
91
  * @returns The result of the download operation
89
92
  */
@@ -3,11 +3,8 @@ 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;
7
6
  /**
8
7
  * 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
11
8
  * @param data The data to be executed
12
9
  * @param queryType The type of query to be executed
13
10
  * @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 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.
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.
33
33
  * @returns The value associated with the given key, or null if no match is found.
34
34
  */
35
35
  private getFromMapOrCreate;
@@ -1,7 +1,21 @@
1
- import { APIBulkInsertFieldsValueSets, APIFilterCriteria } from '../../models/api-query.class';
1
+ import { APIBulkInsertFieldsValueSets, APIFilterCriteria, APIValueSets } 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
+ };
5
19
  /**
6
20
  * Generates the payload for inserting data into a table in bulk
7
21
  * @param table The table name to insert data into
@@ -20,14 +34,44 @@ export declare class RequestResponseHelper {
20
34
  };
21
35
  /**
22
36
  * Generates the payload for deleting data from a table
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
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
27
40
  */
28
41
  deletePayload(tableName: string, whereClause: APIFilterCriteria): {
29
- entityName: string;
30
- 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[];
31
75
  };
32
76
  /**
33
77
  * Creates a payload object for bulk insert operations
@@ -1,7 +1,6 @@
1
1
  import { APIFilterCriteria } from '../../models/api-query.class';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class WhereClauseHelper {
4
- private readonly metadataHelper;
5
4
  /**
6
5
  * Binds the where clause for deleting records based on field, value, field name, and CRUD table name
7
6
  * @param fields The fields to bind the where clause
@@ -2,7 +2,6 @@ import { AppObject } from '../../models/app-object.class';
2
2
  import { JqWidghtModel } from '../../interfaces/grid.interface';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class GridHelper {
5
- private readonly metadataHelper;
6
5
  /**
7
6
  * Generates a grid schema for the master app object.
8
7
  * @param masterAppObj The master app object.
@@ -29,7 +28,7 @@ export declare class GridHelper {
29
28
  key: any;
30
29
  input: boolean;
31
30
  redrawOn: any;
32
- 'customOptions.dataSourceQueryId': string;
31
+ 'customOptions.dataSourceQueryId': any;
33
32
  logic: {
34
33
  name: string;
35
34
  trigger: {
@@ -1,6 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class ScreenHelper {
3
- private readonly metadataHelper;
4
3
  /**
5
4
  * Retrieves screen data based on the provided screen ID.
6
5
  * @param screenId The ID of the screen to retrieve.
@@ -4,7 +4,7 @@ export interface NewUserRequest {
4
4
  password: string;
5
5
  }
6
6
  export interface LoginUserRequest {
7
- username: string;
7
+ email: string;
8
8
  password: string;
9
9
  }
10
10
  export interface ResetPasswordUserRequest {