@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
|
@@ -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
|
|
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
|
|
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
|
-
*
|
|
38
|
-
* @param
|
|
39
|
-
* @
|
|
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
|
-
|
|
43
|
-
|
|
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
|
|
@@ -1,6 +1,7 @@
|
|
|
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;
|
|
4
5
|
/**
|
|
5
6
|
* Binds the where clause for deleting records based on field, value, field name, and CRUD table name
|
|
6
7
|
* @param fields The fields to bind the where clause
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CommonApiResponse } from '../interfaces/common.interface';
|
|
2
|
+
/**
|
|
3
|
+
* LoginResponseAdapter - Transforms new login 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
|
+
export declare class LoginResponseAdapter {
|
|
15
|
+
/**
|
|
16
|
+
* Transforms the normalized CommonApiResponse's Result from new flat format to old nested format.
|
|
17
|
+
* If the Result is already in old format (has .user or .Token), returns as-is.
|
|
18
|
+
*
|
|
19
|
+
* @param response - The CommonApiResponse (already top-level normalized by ResponseAdapter)
|
|
20
|
+
* @returns The response with Result transformed to legacy nested format
|
|
21
|
+
*/
|
|
22
|
+
static normalize(response: CommonApiResponse): CommonApiResponse;
|
|
23
|
+
/**
|
|
24
|
+
* Transforms roles from new camelCase format to old PascalCase format.
|
|
25
|
+
* Structure: { tenantId: { appId: { envId: [{ id, roleName, description }] } } }
|
|
26
|
+
* becomes: { tenantId: { appId: { envId: [{ ID, RoleName, Description }] } } }
|
|
27
|
+
*/
|
|
28
|
+
private static transformRoles;
|
|
29
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CommonApiResponse, StandardApiResponse } from '../interfaces/common.interface';
|
|
2
|
+
/**
|
|
3
|
+
* ResponseAdapter - Transforms new API response format to legacy format
|
|
4
|
+
*
|
|
5
|
+
* This adapter maintains backward compatibility by converting the new camelCase
|
|
6
|
+
* response format from the backend to the old PascalCase format expected by
|
|
7
|
+
* existing application code.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // Auto-detect and normalize response
|
|
11
|
+
* return this.apiService.postToService(...).pipe(
|
|
12
|
+
* map(response => ResponseAdapter.normalize(response))
|
|
13
|
+
* );
|
|
14
|
+
*/
|
|
15
|
+
export declare class ResponseAdapter {
|
|
16
|
+
/**
|
|
17
|
+
* Normalizes a StandardApiResponse to CommonApiResponse format.
|
|
18
|
+
* @param newResponse The response object in the new API format.
|
|
19
|
+
* @returns The normalized response in the legacy format.
|
|
20
|
+
*/
|
|
21
|
+
static normalize(newResponse: StandardApiResponse): CommonApiResponse;
|
|
22
|
+
}
|
|
@@ -2,6 +2,7 @@ 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;
|
|
5
6
|
/**
|
|
6
7
|
* Generates a grid schema for the master app object.
|
|
7
8
|
* @param masterAppObj The master app object.
|
|
@@ -28,7 +29,7 @@ export declare class GridHelper {
|
|
|
28
29
|
key: any;
|
|
29
30
|
input: boolean;
|
|
30
31
|
redrawOn: any;
|
|
31
|
-
'customOptions.dataSourceQueryId':
|
|
32
|
+
'customOptions.dataSourceQueryId': string;
|
|
32
33
|
logic: {
|
|
33
34
|
name: string;
|
|
34
35
|
trigger: {
|
|
@@ -8,7 +8,7 @@ export declare class MediaUploadHelper {
|
|
|
8
8
|
* @param payload An array of media objects to upload.
|
|
9
9
|
* @returns An Observable that emits the response from the server.
|
|
10
10
|
*/
|
|
11
|
-
uploadMediaFiles(payload: UploadMediaFilesPayload, headers?: any): Observable<
|
|
11
|
+
uploadMediaFiles(payload: UploadMediaFilesPayload, headers?: any): Observable<any>;
|
|
12
12
|
/**
|
|
13
13
|
* Removes a file from the server by its media ID.
|
|
14
14
|
* @param mediaId The ID of the media file to remove.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CommonApiResponse } from '../interfaces/common.interface';
|
|
2
|
+
/**
|
|
3
|
+
* TransitionResponseAdapter - Transforms new transition API response (camelCase)
|
|
4
|
+
* to legacy PascalCase format expected by existing application code.
|
|
5
|
+
*
|
|
6
|
+
* Handles both GetNextStatus and UpdateStatus responses from the new
|
|
7
|
+
* crud.techextensor.com/api/v1/status/* endpoints.
|
|
8
|
+
*/
|
|
9
|
+
export declare class TransitionResponseAdapter {
|
|
10
|
+
/**
|
|
11
|
+
* Normalizes the inner Result of a GetNextStatus response from camelCase to PascalCase.
|
|
12
|
+
* @param response - The CommonApiResponse (already wrapper-normalized by ResponseAdapter)
|
|
13
|
+
* @returns The response with inner Result transformed to legacy PascalCase format
|
|
14
|
+
*/
|
|
15
|
+
static normalize(response: CommonApiResponse): CommonApiResponse;
|
|
16
|
+
/**
|
|
17
|
+
* Transforms the toStatusList array from camelCase to PascalCase.
|
|
18
|
+
*/
|
|
19
|
+
private static transformToStatusList;
|
|
20
|
+
/**
|
|
21
|
+
* Transforms a single transition hook from new format to old format.
|
|
22
|
+
* New format: { filters: null, actions: [] }
|
|
23
|
+
* Old format: null (when empty) or { Actions: [...] }
|
|
24
|
+
*/
|
|
25
|
+
private static transformHook;
|
|
26
|
+
/**
|
|
27
|
+
* Transforms actions array from camelCase to PascalCase.
|
|
28
|
+
*/
|
|
29
|
+
private static transformActions;
|
|
30
|
+
}
|
|
@@ -14,15 +14,14 @@ export interface RecordInfo {
|
|
|
14
14
|
primaryKey: string;
|
|
15
15
|
}
|
|
16
16
|
export interface CommonApiResponse {
|
|
17
|
-
RequestId: string;
|
|
18
17
|
IsSuccess: boolean;
|
|
19
18
|
Result: any;
|
|
20
|
-
StatusCode: string;
|
|
21
19
|
RecordAffectted: number;
|
|
22
20
|
TotalRecords: number;
|
|
23
21
|
TotalExecutionTime: number;
|
|
24
22
|
Log: any[];
|
|
25
23
|
Errors: any[];
|
|
24
|
+
CorrelationId?: string;
|
|
26
25
|
}
|
|
27
26
|
export interface GetScreenConfig {
|
|
28
27
|
layoutId?: string;
|
|
@@ -40,6 +39,7 @@ export interface TemplateParsePayload {
|
|
|
40
39
|
export interface NextStatusPayload {
|
|
41
40
|
recordId: string;
|
|
42
41
|
appObjectId?: string;
|
|
42
|
+
appObjectName?: string;
|
|
43
43
|
}
|
|
44
44
|
export interface UpdateStatusPayload extends NextStatusPayload {
|
|
45
45
|
nextPossibleStatusId: string;
|
|
@@ -69,11 +69,12 @@ export interface RefreshRecordInfoDataPayload {
|
|
|
69
69
|
QueryObjectID: string;
|
|
70
70
|
}
|
|
71
71
|
export interface UploadMediaFilePayload {
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
fileName: string;
|
|
73
|
+
base64Content: string;
|
|
74
74
|
}
|
|
75
75
|
export interface UploadMediaFilesPayload {
|
|
76
|
-
|
|
76
|
+
path?: string;
|
|
77
|
+
files: UploadMediaFilePayload[];
|
|
77
78
|
}
|
|
78
79
|
export interface ReportPayload {
|
|
79
80
|
DataReportId: string;
|
|
@@ -135,10 +136,10 @@ export interface GetPayload {
|
|
|
135
136
|
dataSourceQueryIdOrName: string;
|
|
136
137
|
criteria: any;
|
|
137
138
|
}
|
|
138
|
-
export interface
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
export interface ImportDataPayload {
|
|
140
|
+
ImportMappingId: string;
|
|
141
|
+
FileId: string;
|
|
142
|
+
ExecutionType: number;
|
|
142
143
|
}
|
|
143
144
|
export interface SearchDataPayload {
|
|
144
145
|
searchQuery: string;
|
|
@@ -165,3 +166,54 @@ export interface executeTABWorkflowPayload {
|
|
|
165
166
|
AppObjectId: string;
|
|
166
167
|
Reqtokens?: any;
|
|
167
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* Standard API response format (camelCase - NEW BACKEND)
|
|
171
|
+
* All new APIs return this consistent structure
|
|
172
|
+
*/
|
|
173
|
+
export interface StandardApiResponse {
|
|
174
|
+
/** Indicates if the request was successful */
|
|
175
|
+
isSuccess: boolean;
|
|
176
|
+
/** Error information (null if successful) */
|
|
177
|
+
error: ApiError | null;
|
|
178
|
+
/** Response data (null if error) */
|
|
179
|
+
result: any | null;
|
|
180
|
+
/** Request execution time in milliseconds */
|
|
181
|
+
executionTimeMs: number;
|
|
182
|
+
/** Log entries from the request */
|
|
183
|
+
logs: string[];
|
|
184
|
+
/** Additional metadata about the request */
|
|
185
|
+
metadata: Record<string, any>;
|
|
186
|
+
/** Number of records affected (for mutations) */
|
|
187
|
+
affectedRecords?: number;
|
|
188
|
+
/** Total number of records (for queries) */
|
|
189
|
+
totalRecords?: number;
|
|
190
|
+
/** Correlation ID for async operations (null for sync operations) */
|
|
191
|
+
correlationId?: string;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Error information in new API format
|
|
195
|
+
*/
|
|
196
|
+
export interface ApiError {
|
|
197
|
+
/** Error code (e.g., "UNEXPECTED_ERROR", "VALIDATION_ERROR") */
|
|
198
|
+
code: string;
|
|
199
|
+
/** User-friendly error message */
|
|
200
|
+
message: string;
|
|
201
|
+
/** Technical error details for debugging */
|
|
202
|
+
details: string;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Microservice URLs configuration
|
|
206
|
+
*/
|
|
207
|
+
export interface APIServiceUrls {
|
|
208
|
+
crudService: string;
|
|
209
|
+
metadataService: string;
|
|
210
|
+
formioService: string;
|
|
211
|
+
identityService: string;
|
|
212
|
+
codeExecutorService: string;
|
|
213
|
+
notificationService: string;
|
|
214
|
+
workflowService: string;
|
|
215
|
+
kibanaService: string;
|
|
216
|
+
reportService: string;
|
|
217
|
+
fileManagerService: string;
|
|
218
|
+
}
|
|
219
|
+
export type APIServiceName = keyof APIServiceUrls;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Raw SignalR message wrapper
|
|
3
|
+
*/
|
|
4
|
+
export interface SignalRMessage {
|
|
5
|
+
type: number;
|
|
6
|
+
target: string;
|
|
7
|
+
arguments: CrudNotification[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* CRUD notification payload received from SignalR hub
|
|
11
|
+
*/
|
|
12
|
+
export interface CrudNotification {
|
|
13
|
+
correlationId: string;
|
|
14
|
+
result: any;
|
|
15
|
+
entityName: string;
|
|
16
|
+
appObjectId: string;
|
|
17
|
+
isSuccess: boolean;
|
|
18
|
+
errorMessage: string | null;
|
|
19
|
+
errorCode: string | null;
|
|
20
|
+
executionTimeMs: number;
|
|
21
|
+
affectedRecords: number | null;
|
|
22
|
+
operation?: CrudOperation;
|
|
23
|
+
receivedAt?: Date;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Pending async operation tracked by OperationTrackerService
|
|
27
|
+
*/
|
|
28
|
+
export interface PendingOperation {
|
|
29
|
+
correlationId: string;
|
|
30
|
+
timestamp: Date;
|
|
31
|
+
timeout: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Callback function type for component notifications
|
|
35
|
+
*/
|
|
36
|
+
export type NotificationCallback = (notification: CrudNotification) => void;
|
|
37
|
+
/**
|
|
38
|
+
* CRUD operation types
|
|
39
|
+
*/
|
|
40
|
+
export type CrudOperation = typeof CRUD_OPERATION[keyof typeof CRUD_OPERATION];
|
|
41
|
+
/**
|
|
42
|
+
* SignalR connection state types
|
|
43
|
+
*/
|
|
44
|
+
export type ConnectionState = typeof CONNECTION_STATE[keyof typeof CONNECTION_STATE];
|
|
45
|
+
/**
|
|
46
|
+
* SignalR hub method names
|
|
47
|
+
*/
|
|
48
|
+
export declare const SIGNALR_HUB_METHODS: {
|
|
49
|
+
readonly JOIN_GROUP: "JoinGroupAsync";
|
|
50
|
+
readonly LEAVE_GROUP: "LeaveGroupAsync";
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* SignalR event names from backend
|
|
54
|
+
*/
|
|
55
|
+
export declare const SIGNALR_EVENTS: {
|
|
56
|
+
readonly INSERT_COMPLETED: "InsertOperationCompleted";
|
|
57
|
+
readonly UPDATE_COMPLETED: "UpdateOperationCompleted";
|
|
58
|
+
readonly DELETE_COMPLETED: "DeleteOperationCompleted";
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* CRUD operation types
|
|
62
|
+
*/
|
|
63
|
+
export declare const CRUD_OPERATION: {
|
|
64
|
+
readonly INSERT: "INSERT";
|
|
65
|
+
readonly UPDATE: "UPDATE";
|
|
66
|
+
readonly DELETE: "DELETE";
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* SignalR connection states
|
|
70
|
+
*/
|
|
71
|
+
export declare const CONNECTION_STATE: {
|
|
72
|
+
readonly DISCONNECTED: "Disconnected";
|
|
73
|
+
readonly CONNECTING: "Connecting";
|
|
74
|
+
readonly CONNECTED: "Connected";
|
|
75
|
+
readonly RECONNECTING: "Reconnecting";
|
|
76
|
+
readonly FAILED: "Failed";
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* SignalR configuration constants
|
|
80
|
+
*/
|
|
81
|
+
export declare const SIGNALR_CONFIG: {
|
|
82
|
+
readonly DEFAULT_TIMEOUT: 120000;
|
|
83
|
+
readonly RECONNECT_DELAYS: readonly [0, 2000, 10000, 30000, 60000];
|
|
84
|
+
};
|
|
@@ -37,20 +37,19 @@ export declare class ChildRelationShip {
|
|
|
37
37
|
childDetails: LookUpDetails;
|
|
38
38
|
}
|
|
39
39
|
export declare class APIFilterCriteria {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
filters: APIFilter[] | any;
|
|
41
|
+
filterLogic: string | any;
|
|
42
42
|
SQLQuery: string | any;
|
|
43
43
|
}
|
|
44
44
|
export declare class APIFilter {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
conjunction: ConjuctionClause | any;
|
|
46
|
+
fieldName: string | any;
|
|
47
|
+
operator: RelationalOperator | any;
|
|
48
|
+
valueType: FilterValueType | any;
|
|
49
49
|
value: string | any;
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
sequence: number | any;
|
|
51
|
+
groupId: number | any;
|
|
52
52
|
parameterName: string | any;
|
|
53
|
-
Value: string | any;
|
|
54
53
|
}
|
|
55
54
|
export declare class APIValueSets {
|
|
56
55
|
AppFieldID: string | any;
|
|
@@ -72,3 +71,49 @@ export declare class APIParameters {
|
|
|
72
71
|
DataSourceQueryID: string | any;
|
|
73
72
|
MappingFieldName: string | any;
|
|
74
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* New CRUD API Select Query Payload
|
|
76
|
+
* Used for the new microservice-based select query endpoint
|
|
77
|
+
*/
|
|
78
|
+
export declare class CRUDSelectPayload {
|
|
79
|
+
EntityName: string | any;
|
|
80
|
+
SelectedFields: string[];
|
|
81
|
+
includes?: any[];
|
|
82
|
+
Pager?: CRUDPager;
|
|
83
|
+
whereClause?: CRUDWhereClause;
|
|
84
|
+
Distinct?: boolean;
|
|
85
|
+
Sort?: CRUDSort[];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Pager configuration for CRUD API
|
|
89
|
+
*/
|
|
90
|
+
export declare class CRUDPager {
|
|
91
|
+
pageNumber: number;
|
|
92
|
+
pageSize: number;
|
|
93
|
+
returnTotalCount: boolean;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Where clause structure for CRUD API
|
|
97
|
+
*/
|
|
98
|
+
export declare class CRUDWhereClause {
|
|
99
|
+
filters: CRUDFilter[];
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Filter structure for CRUD API
|
|
103
|
+
*/
|
|
104
|
+
export declare class CRUDFilter {
|
|
105
|
+
fieldName: string | any;
|
|
106
|
+
operator: number | any;
|
|
107
|
+
value: any;
|
|
108
|
+
valueType: number | any;
|
|
109
|
+
conjunction: number | any;
|
|
110
|
+
groupId: number | any;
|
|
111
|
+
sequence: number | any;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Sort structure for CRUD API
|
|
115
|
+
*/
|
|
116
|
+
export declare class CRUDSort {
|
|
117
|
+
FieldName: string | any;
|
|
118
|
+
Direction: number | any;
|
|
119
|
+
}
|
|
@@ -49,8 +49,10 @@ export declare class AppFieldModel {
|
|
|
49
49
|
*/
|
|
50
50
|
search(term: string): boolean;
|
|
51
51
|
/**
|
|
52
|
-
* Converts the AppFieldModel instance to
|
|
53
|
-
*
|
|
52
|
+
* Converts the AppFieldModel instance to JSON in the old API format (PascalCase).
|
|
53
|
+
* This ensures backward compatibility with code expecting the old format.
|
|
54
|
+
*
|
|
55
|
+
* @returns {any} The data in old API format.
|
|
54
56
|
*/
|
|
55
57
|
toJSON(): any;
|
|
56
58
|
}
|
|
@@ -40,13 +40,14 @@ export declare class AppObjectModel {
|
|
|
40
40
|
readonly AccessList: Array<ObjectAccess>;
|
|
41
41
|
readonly Resources: Array<Resources>;
|
|
42
42
|
readonly ChildRelationShips: Array<ChildRelationShip>;
|
|
43
|
-
readonly parsedAppObjectConfiguration: any;
|
|
44
43
|
readonly AppId: string | null;
|
|
45
44
|
private readonly fieldMap;
|
|
46
45
|
private readonly dsqMap;
|
|
47
46
|
private allFields;
|
|
48
47
|
private allDSQs;
|
|
48
|
+
private parsedAppObjectJson;
|
|
49
49
|
constructor(raw: any, metadataHelper: MetadataHelper);
|
|
50
|
+
private parseAppObjectJson;
|
|
50
51
|
/**
|
|
51
52
|
* Returns all fields associated with this AppObject. The fields are cached so that subsequent calls
|
|
52
53
|
* are faster. The cache is stored in a map by ID.
|
|
@@ -121,9 +122,10 @@ export declare class AppObjectModel {
|
|
|
121
122
|
dsqs: DataSourceQueryModel[];
|
|
122
123
|
};
|
|
123
124
|
/**
|
|
124
|
-
* Converts the current object to
|
|
125
|
+
* Converts the current object to JSON in the old API format (PascalCase).
|
|
126
|
+
* This ensures backward compatibility with code expecting the old format.
|
|
125
127
|
*
|
|
126
|
-
* @returns {any} The
|
|
128
|
+
* @returns {any} The data in old API format.
|
|
127
129
|
*/
|
|
128
130
|
toJSON(): any;
|
|
129
131
|
}
|
|
@@ -25,9 +25,9 @@ export declare class AppScreenModel {
|
|
|
25
25
|
*/
|
|
26
26
|
search(term: string): boolean;
|
|
27
27
|
/**
|
|
28
|
-
* Converts the
|
|
28
|
+
* Converts the model to JSON in the old API format (PascalCase).
|
|
29
29
|
*
|
|
30
|
-
* @returns A JSON representation
|
|
30
|
+
* @returns A JSON representation in old format.
|
|
31
31
|
*/
|
|
32
32
|
toJSON(): any;
|
|
33
33
|
}
|
|
@@ -18,9 +18,12 @@ export declare class DataSourceQueryModel {
|
|
|
18
18
|
private cachedParameters;
|
|
19
19
|
private cachedFilters;
|
|
20
20
|
private cachedSorts;
|
|
21
|
+
private parsedConfiguration;
|
|
21
22
|
constructor(raw: any, parentAppObject: AppObjectModel, metadataHelper: MetadataHelper);
|
|
23
|
+
private parseConfiguration;
|
|
22
24
|
/**
|
|
23
25
|
* Gets the fields for the data source query. The fields are enriched with the corresponding `AppFieldModel` objects.
|
|
26
|
+
* Handles both old format (array of objects) and new format (array of field ID strings).
|
|
24
27
|
* @returns {DataSourceQueries_Fields[]} The array of enriched fields.
|
|
25
28
|
*/
|
|
26
29
|
fields(): DataSourceQueries_Fields[];
|
|
@@ -64,8 +67,10 @@ export declare class DataSourceQueryModel {
|
|
|
64
67
|
*/
|
|
65
68
|
search(term: string): boolean;
|
|
66
69
|
/**
|
|
67
|
-
* Converts the DataSourceQueryModel instance to
|
|
68
|
-
*
|
|
70
|
+
* Converts the DataSourceQueryModel instance to JSON in the old API format (PascalCase).
|
|
71
|
+
* This ensures backward compatibility with code expecting the old format.
|
|
72
|
+
*
|
|
73
|
+
* @returns {any} The data in old API format.
|
|
69
74
|
*/
|
|
70
75
|
toJSON(): any;
|
|
71
76
|
}
|
|
@@ -13,9 +13,9 @@ export declare class FilterModel {
|
|
|
13
13
|
readonly FieldID: string;
|
|
14
14
|
constructor(raw: any);
|
|
15
15
|
/**
|
|
16
|
-
* Converts the
|
|
16
|
+
* Converts the model to JSON in the old API format (PascalCase).
|
|
17
17
|
*
|
|
18
|
-
* @returns A JSON representation
|
|
18
|
+
* @returns A JSON representation in old format.
|
|
19
19
|
*/
|
|
20
20
|
toJSON(): any;
|
|
21
21
|
}
|
|
@@ -7,8 +7,8 @@ export declare class ParameterModel {
|
|
|
7
7
|
readonly IsMandatory: boolean;
|
|
8
8
|
constructor(raw: any);
|
|
9
9
|
/**
|
|
10
|
-
* Converts the model to JSON.
|
|
11
|
-
* @returns {any} The model as a JSON object.
|
|
10
|
+
* Converts the model to JSON in the old API format (PascalCase).
|
|
11
|
+
* @returns {any} The model as a JSON object in old format.
|
|
12
12
|
*/
|
|
13
13
|
toJSON(): any;
|
|
14
14
|
}
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function validateJSON(str: string): boolean;
|
|
7
7
|
/**
|
|
8
|
-
* Creates dynamic data based on the input object
|
|
8
|
+
* Creates dynamic data based on the input object for new API format
|
|
9
|
+
* Transforms object into array of {fieldName, value} pairs
|
|
9
10
|
* @param obj The input object to create dynamic data from
|
|
10
|
-
* @returns The formatted array
|
|
11
|
+
* @returns The formatted array with {fieldName, value} pairs
|
|
11
12
|
*/
|
|
12
13
|
export declare function createDynamicData(obj: any): any;
|
|
13
14
|
/**
|