@techextensor/tab-core-utility 2.2.194 → 2.2.195
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/index.mjs +6 -1
- package/esm2022/lib/tab-core-utility/app/constants/api-constants.mjs +41 -23
- package/esm2022/lib/tab-core-utility/app/constants/common.mjs +14 -50
- package/esm2022/lib/tab-core-utility/app/constants/storage-constants.mjs +2 -2
- package/esm2022/lib/tab-core-utility/app/crud/tab-blueprint.service.mjs +41 -14
- package/esm2022/lib/tab-core-utility/app/crud/tab-crud.service.mjs +47 -68
- package/esm2022/lib/tab-core-utility/app/crud/tab-delete.service.mjs +84 -30
- package/esm2022/lib/tab-core-utility/app/crud/tab-formio.service.mjs +141 -12
- package/esm2022/lib/tab-core-utility/app/crud/tab-get.service.mjs +137 -42
- package/esm2022/lib/tab-core-utility/app/crud/tab-insert.service.mjs +89 -38
- package/esm2022/lib/tab-core-utility/app/crud/tab-update.service.mjs +156 -128
- package/esm2022/lib/tab-core-utility/app/enums/query.enum.mjs +7 -7
- package/esm2022/lib/tab-core-utility/app/helpers/auth-response.adapter.mjs +79 -0
- package/esm2022/lib/tab-core-utility/app/helpers/common/app.helpers.mjs +32 -23
- package/esm2022/lib/tab-core-utility/app/helpers/common/dsq.helpers.mjs +9 -11
- package/esm2022/lib/tab-core-utility/app/helpers/common/meta-data.helpers.mjs +13 -13
- package/esm2022/lib/tab-core-utility/app/helpers/common/req-res.helpers.mjs +7 -45
- package/esm2022/lib/tab-core-utility/app/helpers/common/where-clause.helpers.mjs +79 -76
- package/esm2022/lib/tab-core-utility/app/helpers/login-response.adapter.mjs +76 -0
- package/esm2022/lib/tab-core-utility/app/helpers/response.adapter.mjs +42 -0
- package/esm2022/lib/tab-core-utility/app/helpers/screen/grid.helpers.mjs +8 -4
- package/esm2022/lib/tab-core-utility/app/helpers/screen/media-upload.helpers.mjs +5 -9
- package/esm2022/lib/tab-core-utility/app/helpers/screen/screen.helpers.mjs +8 -33
- package/esm2022/lib/tab-core-utility/app/helpers/transition-response.adapter.mjs +83 -0
- package/esm2022/lib/tab-core-utility/app/interfaces/auth.interface.mjs +1 -1
- package/esm2022/lib/tab-core-utility/app/interfaces/common.interface.mjs +1 -1
- package/esm2022/lib/tab-core-utility/app/interfaces/signalr.interface.mjs +42 -0
- package/esm2022/lib/tab-core-utility/app/models/api-query.class.mjs +39 -1
- package/esm2022/lib/tab-core-utility/app/models/app-field.model.mjs +36 -7
- package/esm2022/lib/tab-core-utility/app/models/app-object.model.mjs +84 -47
- package/esm2022/lib/tab-core-utility/app/models/app-screen.model.mjs +24 -13
- package/esm2022/lib/tab-core-utility/app/models/data-source-query.model.mjs +57 -23
- package/esm2022/lib/tab-core-utility/app/models/filter.model.mjs +21 -10
- package/esm2022/lib/tab-core-utility/app/models/parameter.model.mjs +12 -6
- package/esm2022/lib/tab-core-utility/app/models/sort.model.mjs +11 -4
- package/esm2022/lib/tab-core-utility/app/utils/json.util.mjs +17 -16
- package/esm2022/lib/tab-core-utility/app/utils/req-res.util.mjs +1 -55
- package/esm2022/lib/tab-core-utility/app/utils/tab-app.util.mjs +1 -164
- package/esm2022/lib/tab-core-utility/auth/auth.service.mjs +36 -11
- package/esm2022/lib/tab-core-utility/core/http-client/api.service.mjs +78 -1
- package/esm2022/lib/tab-core-utility/core/service/signalr/operation-tracker.service.mjs +90 -0
- package/esm2022/lib/tab-core-utility/core/service/signalr/signalr-infrastructure.service.mjs +268 -0
- package/esm2022/lib/tab-core-utility/core/service/signalr/signalr.service.mjs +207 -0
- package/index.d.ts +5 -0
- package/lib/tab-core-utility/app/constants/api-constants.d.ts +27 -19
- package/lib/tab-core-utility/app/constants/common.d.ts +9 -0
- package/lib/tab-core-utility/app/constants/storage-constants.d.ts +1 -1
- package/lib/tab-core-utility/app/crud/tab-blueprint.service.d.ts +14 -8
- package/lib/tab-core-utility/app/crud/tab-crud.service.d.ts +9 -7
- package/lib/tab-core-utility/app/crud/tab-delete.service.d.ts +20 -10
- package/lib/tab-core-utility/app/crud/tab-formio.service.d.ts +33 -6
- package/lib/tab-core-utility/app/crud/tab-get.service.d.ts +50 -8
- package/lib/tab-core-utility/app/crud/tab-insert.service.d.ts +16 -21
- package/lib/tab-core-utility/app/crud/tab-update.service.d.ts +34 -19
- package/lib/tab-core-utility/app/enums/query.enum.d.ts +3 -6
- package/lib/tab-core-utility/app/helpers/auth-response.adapter.d.ts +32 -0
- package/lib/tab-core-utility/app/helpers/common/app.helpers.d.ts +6 -8
- package/lib/tab-core-utility/app/helpers/common/dsq.helpers.d.ts +3 -0
- package/lib/tab-core-utility/app/helpers/common/meta-data.helpers.d.ts +3 -3
- package/lib/tab-core-utility/app/helpers/common/req-res.helpers.d.ts +7 -51
- package/lib/tab-core-utility/app/helpers/common/where-clause.helpers.d.ts +1 -0
- package/lib/tab-core-utility/app/helpers/login-response.adapter.d.ts +29 -0
- package/lib/tab-core-utility/app/helpers/response.adapter.d.ts +22 -0
- package/lib/tab-core-utility/app/helpers/screen/grid.helpers.d.ts +2 -1
- package/lib/tab-core-utility/app/helpers/screen/media-upload.helpers.d.ts +1 -1
- package/lib/tab-core-utility/app/helpers/screen/screen.helpers.d.ts +1 -0
- package/lib/tab-core-utility/app/helpers/transition-response.adapter.d.ts +30 -0
- package/lib/tab-core-utility/app/interfaces/auth.interface.d.ts +1 -1
- package/lib/tab-core-utility/app/interfaces/common.interface.d.ts +61 -9
- package/lib/tab-core-utility/app/interfaces/signalr.interface.d.ts +84 -0
- package/lib/tab-core-utility/app/models/api-query.class.d.ts +54 -9
- package/lib/tab-core-utility/app/models/app-field.model.d.ts +4 -2
- package/lib/tab-core-utility/app/models/app-object.model.d.ts +5 -3
- package/lib/tab-core-utility/app/models/app-screen.model.d.ts +2 -2
- package/lib/tab-core-utility/app/models/data-source-query.model.d.ts +7 -2
- package/lib/tab-core-utility/app/models/filter.model.d.ts +2 -2
- package/lib/tab-core-utility/app/models/parameter.model.d.ts +2 -2
- package/lib/tab-core-utility/app/models/sort.model.d.ts +1 -1
- package/lib/tab-core-utility/app/utils/json.util.d.ts +3 -2
- package/lib/tab-core-utility/app/utils/req-res.util.d.ts +1 -9
- package/lib/tab-core-utility/app/utils/tab-app.util.d.ts +0 -61
- package/lib/tab-core-utility/auth/auth.service.d.ts +6 -0
- package/lib/tab-core-utility/core/http-client/api.service.d.ts +46 -0
- package/lib/tab-core-utility/core/service/signalr/operation-tracker.service.d.ts +40 -0
- package/lib/tab-core-utility/core/service/signalr/signalr-infrastructure.service.d.ts +73 -0
- package/lib/tab-core-utility/core/service/signalr/signalr.service.d.ts +122 -0
- package/package.json +3 -2
|
@@ -1,18 +1,15 @@
|
|
|
1
|
+
import type { APIServiceName } from '../interfaces/common.interface';
|
|
1
2
|
export declare const API: {
|
|
2
3
|
applicationIdentifier: string;
|
|
3
4
|
applicationIdentifierForPMS: string;
|
|
4
5
|
novuBackendUrl: string;
|
|
5
6
|
novuSocketUrl: string;
|
|
6
|
-
insert: string;
|
|
7
7
|
bulkInsert: string;
|
|
8
|
-
update: string;
|
|
9
|
-
delete: string;
|
|
10
8
|
select: string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
getListFromDsq: string;
|
|
9
|
+
screen: string;
|
|
10
|
+
listsGet: string;
|
|
14
11
|
buildApp: string;
|
|
15
|
-
|
|
12
|
+
metadataSchema: string;
|
|
16
13
|
login: string;
|
|
17
14
|
pluginUpload: string;
|
|
18
15
|
getFile: string;
|
|
@@ -21,40 +18,41 @@ export declare const API: {
|
|
|
21
18
|
publishApp: string;
|
|
22
19
|
getrecord: string;
|
|
23
20
|
fileUpload: string;
|
|
24
|
-
|
|
21
|
+
FileManagerUploadFile: string;
|
|
25
22
|
deleteFile: string;
|
|
26
23
|
getMediaFile: string;
|
|
27
|
-
|
|
24
|
+
auditGetHistory: string;
|
|
28
25
|
changePassword: string;
|
|
29
26
|
restpassword: string;
|
|
30
27
|
getImage: string;
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
importData: string;
|
|
29
|
+
screenData: string;
|
|
33
30
|
processRequest: string;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
statusAvailable: string;
|
|
32
|
+
statusUpdate: string;
|
|
33
|
+
authRegisterUser: string;
|
|
37
34
|
getUserDetails: string;
|
|
38
35
|
getPermission: string;
|
|
36
|
+
getUserAccess: string;
|
|
39
37
|
testConnection: string;
|
|
40
38
|
performValidation: string;
|
|
41
39
|
setTabComponents: string;
|
|
42
40
|
BuildFormIOComponents: string;
|
|
43
|
-
|
|
41
|
+
applicationRegisterAppObjects: string;
|
|
44
42
|
languageResource: string;
|
|
45
43
|
refreshToken: string;
|
|
46
|
-
|
|
44
|
+
globalSearch: string;
|
|
47
45
|
cloneDsq: string;
|
|
48
46
|
InsertScreenPerformanceAnalytics: string;
|
|
49
47
|
GenerateHttpRequest: string;
|
|
50
48
|
GetDetailOfPerformanceAnalytics: string;
|
|
51
49
|
GetSummaryOfPerformanceAnalytics: string;
|
|
52
50
|
GetDataJsonByType: string;
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
applicationSyncAppFields: string;
|
|
52
|
+
reportExport: string;
|
|
55
53
|
RefreshGlobalSearchData: string;
|
|
56
54
|
RefreshRecordInfoData: string;
|
|
57
|
-
|
|
55
|
+
reportDownload: string;
|
|
58
56
|
sendReport: string;
|
|
59
57
|
GetReleaseJSONDifference: string;
|
|
60
58
|
GetDataDifference: string;
|
|
@@ -63,4 +61,14 @@ export declare const API: {
|
|
|
63
61
|
GetAllDocumnets: string;
|
|
64
62
|
GetDocumentById: string;
|
|
65
63
|
ExecuteWorkflow: string;
|
|
64
|
+
QueriesExecute: string;
|
|
65
|
+
QueriesSelect: string;
|
|
66
|
+
recordsInsert: string;
|
|
67
|
+
recordsUpdate: string;
|
|
68
|
+
recordsDelete: string;
|
|
69
|
+
fileManagerFileOperations: string;
|
|
70
|
+
fileManagerGetImage: string;
|
|
71
|
+
fileManagerUpload: string;
|
|
72
|
+
fileManagerDownload: string;
|
|
66
73
|
};
|
|
74
|
+
export declare const APIServices: Record<APIServiceName, APIServiceName>;
|
|
@@ -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
|
}
|
|
@@ -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
|
-
*
|
|
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,
|
|
11
|
+
getNextStatus(payload: NextStatusPayload, headers?: any): Observable<CommonApiResponse>;
|
|
13
12
|
/**
|
|
14
13
|
* Updates the status of a record.
|
|
15
|
-
*
|
|
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,
|
|
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.
|
|
@@ -25,13 +29,8 @@ export declare class TabCrudService {
|
|
|
25
29
|
/**
|
|
26
30
|
* Generates a where clause based on the criteria provided.
|
|
27
31
|
*
|
|
28
|
-
*
|
|
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.
|
|
32
|
+
* @param criteria The criteria object 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.
|
|
35
34
|
* @returns A new APIFilterCriteria object with the generated where clause.
|
|
36
35
|
*/
|
|
37
36
|
private generateWhereClause;
|
|
@@ -44,14 +43,16 @@ export declare class TabCrudService {
|
|
|
44
43
|
get(payload: GetPayload, headers?: any): Observable<CommonApiResponse>;
|
|
45
44
|
/**
|
|
46
45
|
* 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.
|
|
49
|
+
* @returns An observable of the response from the API (returns insertedId only).
|
|
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
|
|
55
56
|
* @param payload The payload containing the data to update, the criteria for the update, and the AppObjectModel ID.
|
|
56
57
|
* @param headers Optional headers for the request.
|
|
57
58
|
* @returns An observable of the response from the API.
|
|
@@ -59,6 +60,7 @@ export declare class TabCrudService {
|
|
|
59
60
|
update(payload: UpdatePayload, headers?: any): Observable<CommonApiResponse>;
|
|
60
61
|
/**
|
|
61
62
|
* Deletes data from the specified table.
|
|
63
|
+
* NEW: Delegates to TabDeleteService which uses /records/delete endpoint with SYNC/ASYNC support
|
|
62
64
|
* @param payload The payload containing the criteria for the delete and the AppObjectModel ID.
|
|
63
65
|
* @param headers Optional headers for the request.
|
|
64
66
|
* @returns An observable of the response from the API.
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
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):
|
|
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):
|
|
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
|
-
* @
|
|
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
|
-
|
|
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):
|
|
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):
|
|
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
|
|
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
|
-
*
|
|
19
|
-
*
|
|
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
|
-
|
|
24
|
-
|
|
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,
|
|
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,
|
|
28
|
+
getHistory(payload: RcordHistoryPayload, headers?: any): Observable<CommonApiResponse>;
|
|
27
29
|
/**
|
|
28
|
-
*
|
|
29
|
-
* @param data -
|
|
30
|
+
* Import data via report microservice
|
|
31
|
+
* @param data - Import data payload
|
|
30
32
|
* @returns Response from the API
|
|
31
33
|
*/
|
|
32
|
-
|
|
34
|
+
importData(data: ImportDataPayload): any;
|
|
33
35
|
/**
|
|
34
36
|
* Executes a select query with optional parameters
|
|
35
|
-
*
|
|
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
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
|
*
|
|
@@ -48,7 +90,7 @@ export declare class TabGetService {
|
|
|
48
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 {
|
|
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
|
|
7
|
-
private readonly
|
|
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):
|
|
15
|
+
insertByScreenId(screenId: string, data: any): Observable<CommonApiResponse>;
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
* @param objectId The ID of the object
|
|
18
|
-
* @param data The data to insert
|
|
19
|
-
* @
|
|
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):
|
|
23
|
+
insertByObjectId(objectId: string, data: any, headers?: any): Observable<CommonApiResponse>;
|
|
22
24
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @param
|
|
25
|
-
* @
|
|
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
|
-
|
|
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 {
|
|
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
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
private readonly apiService;
|
|
8
|
+
private readonly signalRService;
|
|
9
|
+
private readonly metadataHelper;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* @param
|
|
15
|
-
* @
|
|
16
|
-
|
|
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
|
-
|
|
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
|
|
23
|
-
*
|
|
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
|
|
26
|
-
* @
|
|
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
|
-
|
|
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
|
}
|
|
@@ -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
|
|
14
|
-
*
|
|
15
|
-
* @returns
|
|
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
|
/**
|
|
@@ -25,6 +20,7 @@ export declare class AppHelper {
|
|
|
25
20
|
* @returns Subscription for getting permission data
|
|
26
21
|
*/
|
|
27
22
|
getPermission(): Observable<CommonApiResponse>;
|
|
23
|
+
getUserAccess(): Observable<CommonApiResponse>;
|
|
28
24
|
/**
|
|
29
25
|
* Registers application objects.
|
|
30
26
|
* @param payload Parameters for registering application objects
|
|
@@ -81,12 +77,14 @@ export declare class AppHelper {
|
|
|
81
77
|
refreshRecordInfoData(data: RefreshRecordInfoDataPayload): Observable<CommonApiResponse>;
|
|
82
78
|
/**
|
|
83
79
|
* Exports a report based on the given parameters.
|
|
80
|
+
* Uses Report microservice with camelCase payload
|
|
84
81
|
* @param payload Parameters for exporting the report
|
|
85
82
|
* @returns The result of the export operation
|
|
86
83
|
*/
|
|
87
84
|
exportReport(payload: ReportPayload): Observable<CommonApiResponse>;
|
|
88
85
|
/**
|
|
89
86
|
* Downloads a report file based on the given parameters.
|
|
87
|
+
* Uses Report microservice with camelCase payload
|
|
90
88
|
* @param payload Parameters for downloading the report file
|
|
91
89
|
* @returns The result of the download operation
|
|
92
90
|
*/
|