@techextensor/tab-core-utility 2.2.180 → 2.2.184
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 +5 -1
- package/esm2022/lib/tab-core-utility/app/constants/api-constants.mjs +24 -13
- 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-crud.service.mjs +38 -49
- package/esm2022/lib/tab-core-utility/app/crud/tab-delete.service.mjs +81 -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 +136 -35
- 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 +152 -131
- package/esm2022/lib/tab-core-utility/app/crud/tab-workflow.service.mjs +7 -9
- package/esm2022/lib/tab-core-utility/app/enums/query.enum.mjs +7 -7
- package/esm2022/lib/tab-core-utility/app/helpers/common/app.helpers.mjs +6 -17
- 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/response.adapter.mjs +38 -0
- package/esm2022/lib/tab-core-utility/app/helpers/screen/grid.helpers.mjs +8 -4
- package/esm2022/lib/tab-core-utility/app/helpers/screen/screen.helpers.mjs +8 -33
- 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/core/http-client/api.service.mjs +64 -15
- package/esm2022/lib/tab-core-utility/core/service/signalr/operation-tracker.service.mjs +82 -0
- package/esm2022/lib/tab-core-utility/core/service/signalr/signalr-infrastructure.service.mjs +252 -0
- package/esm2022/lib/tab-core-utility/core/service/signalr/signalr.service.mjs +207 -0
- package/index.d.ts +4 -0
- package/lib/tab-core-utility/app/constants/api-constants.d.ts +13 -10
- 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-crud.service.d.ts +8 -1
- 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 +45 -3
- 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/crud/tab-workflow.service.d.ts +3 -1
- package/lib/tab-core-utility/app/enums/query.enum.d.ts +3 -6
- package/lib/tab-core-utility/app/helpers/common/app.helpers.d.ts +3 -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/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/screen.helpers.d.ts +1 -0
- package/lib/tab-core-utility/app/interfaces/common.interface.d.ts +50 -2
- package/lib/tab-core-utility/app/interfaces/signalr.interface.d.ts +80 -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/core/http-client/api.service.d.ts +37 -9
- 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 +68 -0
- package/lib/tab-core-utility/core/service/signalr/signalr.service.d.ts +122 -0
- package/package.json +3 -2
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CRUD notification payload received from SignalR hub
|
|
3
|
+
*/
|
|
4
|
+
export interface CrudNotification {
|
|
5
|
+
isSuccess: boolean;
|
|
6
|
+
correlationId: string;
|
|
7
|
+
recordId: string;
|
|
8
|
+
entityName: string;
|
|
9
|
+
appObjectId: string;
|
|
10
|
+
executionTimeMs: number;
|
|
11
|
+
affectedRecords: number;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
errorCode?: string;
|
|
14
|
+
operation?: CrudOperation;
|
|
15
|
+
receivedAt?: Date;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Pending async operation tracked by OperationTrackerService
|
|
19
|
+
*/
|
|
20
|
+
export interface PendingOperation {
|
|
21
|
+
requestId: string;
|
|
22
|
+
correlationId: string;
|
|
23
|
+
operation: CrudOperation;
|
|
24
|
+
appObjectId?: string;
|
|
25
|
+
payload?: any;
|
|
26
|
+
timestamp: Date;
|
|
27
|
+
timeout: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Callback function type for component notifications
|
|
31
|
+
*/
|
|
32
|
+
export type NotificationCallback = (notification: CrudNotification) => void;
|
|
33
|
+
/**
|
|
34
|
+
* CRUD operation types
|
|
35
|
+
*/
|
|
36
|
+
export type CrudOperation = typeof CRUD_OPERATION[keyof typeof CRUD_OPERATION];
|
|
37
|
+
/**
|
|
38
|
+
* SignalR connection state types
|
|
39
|
+
*/
|
|
40
|
+
export type ConnectionState = typeof CONNECTION_STATE[keyof typeof CONNECTION_STATE];
|
|
41
|
+
/**
|
|
42
|
+
* SignalR hub method names
|
|
43
|
+
*/
|
|
44
|
+
export declare const SIGNALR_HUB_METHODS: {
|
|
45
|
+
readonly JOIN_GROUP: "JoinGroupAsync";
|
|
46
|
+
readonly LEAVE_GROUP: "LeaveGroupAsync";
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* SignalR event names from backend
|
|
50
|
+
*/
|
|
51
|
+
export declare const SIGNALR_EVENTS: {
|
|
52
|
+
readonly INSERT_COMPLETED: "InsertOperationCompleted";
|
|
53
|
+
readonly UPDATE_COMPLETED: "UpdateOperationCompleted";
|
|
54
|
+
readonly DELETE_COMPLETED: "DeleteOperationCompleted";
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* CRUD operation types
|
|
58
|
+
*/
|
|
59
|
+
export declare const CRUD_OPERATION: {
|
|
60
|
+
readonly INSERT: "INSERT";
|
|
61
|
+
readonly UPDATE: "UPDATE";
|
|
62
|
+
readonly DELETE: "DELETE";
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* SignalR connection states
|
|
66
|
+
*/
|
|
67
|
+
export declare const CONNECTION_STATE: {
|
|
68
|
+
readonly DISCONNECTED: "Disconnected";
|
|
69
|
+
readonly CONNECTING: "Connecting";
|
|
70
|
+
readonly CONNECTED: "Connected";
|
|
71
|
+
readonly RECONNECTING: "Reconnecting";
|
|
72
|
+
readonly FAILED: "Failed";
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* SignalR configuration constants
|
|
76
|
+
*/
|
|
77
|
+
export declare const SIGNALR_CONFIG: {
|
|
78
|
+
readonly DEFAULT_TIMEOUT: 120000;
|
|
79
|
+
readonly RECONNECT_DELAYS: readonly [0, 2000, 10000, 30000, 60000];
|
|
80
|
+
};
|
|
@@ -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
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HttpHeaders } from '@angular/common/http';
|
|
2
2
|
import { AppObject } from '../models/app-object.class';
|
|
3
|
-
import { AppFields } from '../models/data-source-queries.class';
|
|
4
3
|
/**
|
|
5
4
|
* Delete a key from the response object
|
|
6
5
|
*
|
|
@@ -37,7 +36,7 @@ export declare function getHeaders(headers?: any): any;
|
|
|
37
36
|
* @param appObject - The AppObject
|
|
38
37
|
* @returns AppFields[] | null - The array of primary key fields or null
|
|
39
38
|
*/
|
|
40
|
-
export declare function getPrimaryKeyFields(appObject: AppObject): AppFields[] | null;
|
|
39
|
+
export declare function getPrimaryKeyFields(appObject: AppObject): import("@techextensor/tab-core-utility").AppFields[] | null;
|
|
41
40
|
/**
|
|
42
41
|
* Get the edit record ID from the response object
|
|
43
42
|
*
|
|
@@ -46,13 +45,6 @@ export declare function getPrimaryKeyFields(appObject: AppObject): AppFields[] |
|
|
|
46
45
|
* @returns any - The edit record ID
|
|
47
46
|
*/
|
|
48
47
|
export declare function getEditRecordId(response: any, fieldName: any): any;
|
|
49
|
-
/**
|
|
50
|
-
* Generate the fields schema based on the AppFields
|
|
51
|
-
*
|
|
52
|
-
* @param fields - The AppFields object
|
|
53
|
-
* @returns any - The generated fields schema
|
|
54
|
-
*/
|
|
55
|
-
export declare function generateFieldsSchema(url: any, fields: AppFields): {};
|
|
56
48
|
/**
|
|
57
49
|
* Get the HttpHeaders for form data requests
|
|
58
50
|
*
|
|
@@ -1,36 +1,4 @@
|
|
|
1
1
|
import { AppObject } from '../models/app-object.class';
|
|
2
|
-
/** Get the DataSourceQuery ID from the selected AppObject's DataSourceQuery array
|
|
3
|
-
* @param dsqList - The list of DataSourceQueries
|
|
4
|
-
* @param table - The table name
|
|
5
|
-
* @param like - The like string
|
|
6
|
-
* @returns string - The ID of the DataSourceQuery
|
|
7
|
-
*/
|
|
8
|
-
export declare function getDsqIdfromSelectedAppObjectDSQArray(dsqList: any, table: string, like: string): any;
|
|
9
|
-
/** Get the AppObject based on the provided ID
|
|
10
|
-
* @param id - The ID of the AppObject
|
|
11
|
-
* @returns AppObject | null - The found AppObject or null
|
|
12
|
-
*/
|
|
13
|
-
export declare function getAppObject(id: string): any;
|
|
14
|
-
/**
|
|
15
|
-
* Get the AppObject from the DataSourceQuery ID
|
|
16
|
-
* @param dsqId - The DataSourceQuery ID
|
|
17
|
-
* @returns AppObject | null - The found AppObject or null
|
|
18
|
-
*/
|
|
19
|
-
export declare function getAppObjectFromDataSourceQueryID(dsqId: string): any;
|
|
20
|
-
/**
|
|
21
|
-
* Get the DataSourceQuery ID from the QueryName and table
|
|
22
|
-
* @param table - The table name
|
|
23
|
-
* @param dsq - The DataSourceQuery name
|
|
24
|
-
* @returns any - The found DataSourceQuery
|
|
25
|
-
*/
|
|
26
|
-
export declare function getDsqIDFromQueryName(table: string, dsq: string): any;
|
|
27
|
-
/**
|
|
28
|
-
* Get the Data from the DataSourceQuery ID
|
|
29
|
-
*
|
|
30
|
-
* @param dsqId - The DataSourceQuery ID
|
|
31
|
-
* @returns any - The found Data
|
|
32
|
-
*/
|
|
33
|
-
export declare function getDataFromDataSourceQueryID(dsqId: string): any;
|
|
34
2
|
/**
|
|
35
3
|
* Synchronize AppObject fields with the response
|
|
36
4
|
*
|
|
@@ -39,32 +7,3 @@ export declare function getDataFromDataSourceQueryID(dsqId: string): any;
|
|
|
39
7
|
* @returns any - The synchronized response object
|
|
40
8
|
*/
|
|
41
9
|
export declare function syncAppObjectFields(response: any, appObject: AppObject): any;
|
|
42
|
-
/**
|
|
43
|
-
* Get the AppObject based on the SystemDBTableName
|
|
44
|
-
*
|
|
45
|
-
* @param tableName - The SystemDBTableName
|
|
46
|
-
* @returns AppObject | null - The found AppObject or null
|
|
47
|
-
*/
|
|
48
|
-
export declare function getAppObjectFromSystemDBTableName(tableName: string): any;
|
|
49
|
-
/**
|
|
50
|
-
* Get the fields based on the appobjectid
|
|
51
|
-
*
|
|
52
|
-
* @param appObjectId - The appobjectid
|
|
53
|
-
* @returns AppObject | null - The found AppObject or null
|
|
54
|
-
*/
|
|
55
|
-
export declare function getAppfieldsFromAppObjectId(appObjectId: string): any;
|
|
56
|
-
export declare function getLookupAppfieldsFromAppObjectId(appObjectId: string): any;
|
|
57
|
-
export declare function getViewAppObjectDetailsFromDSQID(dsqID: string): any;
|
|
58
|
-
/**
|
|
59
|
-
* Retrieves all appObjects and their DSQs in a single list
|
|
60
|
-
* suitable for tree view representation.
|
|
61
|
-
* @author : Parth B Thakkar
|
|
62
|
-
* @Usage : HTTP Request
|
|
63
|
-
* @returns Array<{ id: string; name: string; hasChildren: boolean; parentID: string | null }>
|
|
64
|
-
*/
|
|
65
|
-
export declare function getAllAppObjectsForTreeViewJson(): {
|
|
66
|
-
id: string;
|
|
67
|
-
name: string;
|
|
68
|
-
hasChildren: boolean;
|
|
69
|
-
parentID: string | null;
|
|
70
|
-
}[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { HttpParams, HttpHeaders } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import { APIServiceName, CommonApiResponse } from '../../app/interfaces/common.interface';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class ApiService {
|
|
5
6
|
private readonly http;
|
|
6
7
|
private readonly api_url;
|
|
7
|
-
private readonly workflow_url;
|
|
8
8
|
/**
|
|
9
9
|
* Makes an HTTP GET request to retrieve data from the specified URL.
|
|
10
10
|
* @param endPointName The URL for the HTTP GET request.
|
|
@@ -52,14 +52,6 @@ export declare class ApiService {
|
|
|
52
52
|
* @returns An Observable emitting the response as a Blob.
|
|
53
53
|
*/
|
|
54
54
|
postBlob<T, D>(endPointName: string, data?: D, reqHeader?: HttpHeaders): Observable<any>;
|
|
55
|
-
/**
|
|
56
|
-
* Makes an HTTP POST request to the specified endpoint for Workflow.
|
|
57
|
-
* @param endPointName The endpoint for the HTTP POST request.
|
|
58
|
-
* @param data The data to send with the request (optional).
|
|
59
|
-
* @param reqHeader The custom headers for the request (optional).
|
|
60
|
-
* @returns An Observable emitting the response data of type T.
|
|
61
|
-
*/
|
|
62
|
-
postWorkflow<T, D>(endPointName: string, data?: D, reqHeader?: HttpHeaders): Observable<any>;
|
|
63
55
|
/**
|
|
64
56
|
* Makes an HTTP GET request to retrieve data from the specified URL.
|
|
65
57
|
* @param url The URL for the HTTP GET request.
|
|
@@ -90,6 +82,42 @@ export declare class ApiService {
|
|
|
90
82
|
* @returns An Observable emitting the response data of type T.
|
|
91
83
|
*/
|
|
92
84
|
deleteByUrl<T>(url: string, options?: any): Observable<any>;
|
|
85
|
+
/**
|
|
86
|
+
* Makes an HTTP GET request to a specific microservice
|
|
87
|
+
* @param serviceName - Name of the microservice (e.g., 'crudService', 'metadataService')
|
|
88
|
+
* @param endPointName - Endpoint path relative to the service
|
|
89
|
+
* @param params - Query parameters for the request
|
|
90
|
+
* @param reqHeader - Custom headers for the request
|
|
91
|
+
* @returns An Observable emitting the response data (auto-normalized to CommonApiResponse format)
|
|
92
|
+
*/
|
|
93
|
+
getFromService(serviceName: APIServiceName, endPointName: string, params?: HttpParams, reqHeader?: HttpHeaders): Observable<CommonApiResponse>;
|
|
94
|
+
/**
|
|
95
|
+
* Makes an HTTP POST request to a specific microservice
|
|
96
|
+
* @param serviceName - Name of the microservice (e.g., 'crudService', 'formioService')
|
|
97
|
+
* @param endPointName - Endpoint path relative to the service
|
|
98
|
+
* @param data - Data to send with the request
|
|
99
|
+
* @param reqHeader - Custom headers for the request
|
|
100
|
+
* @returns An Observable emitting the response data (auto-normalized to CommonApiResponse format)
|
|
101
|
+
*/
|
|
102
|
+
postToService<T, D>(serviceName: APIServiceName, endPointName: string, data?: D, reqHeader?: HttpHeaders): Observable<CommonApiResponse>;
|
|
103
|
+
/**
|
|
104
|
+
* Makes an HTTP PUT request to a specific microservice
|
|
105
|
+
* @param serviceName - Name of the microservice
|
|
106
|
+
* @param endPointName - Endpoint path relative to the service
|
|
107
|
+
* @param data - Data to send with the request
|
|
108
|
+
* @param reqHeader - Custom headers for the request
|
|
109
|
+
* @returns An Observable emitting the response data (auto-normalized to CommonApiResponse format)
|
|
110
|
+
*/
|
|
111
|
+
putToService<T, D>(serviceName: APIServiceName, endPointName: string, data: D, reqHeader?: HttpHeaders): Observable<CommonApiResponse>;
|
|
112
|
+
/**
|
|
113
|
+
* Makes an HTTP DELETE request to a specific microservice
|
|
114
|
+
* @param serviceName - Name of the microservice
|
|
115
|
+
* @param endPointName - Endpoint path relative to the service
|
|
116
|
+
* @param data - Data to send with the request (optional, for DELETE with body)
|
|
117
|
+
* @param reqHeader - Custom headers for the request
|
|
118
|
+
* @returns An Observable emitting the response data (auto-normalized to CommonApiResponse format)
|
|
119
|
+
*/
|
|
120
|
+
deleteFromService<D>(serviceName: APIServiceName, endPointName: string, data?: D, reqHeader?: HttpHeaders): Observable<CommonApiResponse>;
|
|
93
121
|
static ɵfac: i0.ɵɵFactoryDeclaration<ApiService, never>;
|
|
94
122
|
static ɵprov: i0.ɵɵInjectableDeclaration<ApiService>;
|
|
95
123
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { CrudNotification, PendingOperation } from '../../../app/interfaces/signalr.interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Operation Tracker Service
|
|
6
|
+
* Tracks async operations by correlationId and matches them with SignalR notifications
|
|
7
|
+
* Used by TabFormioService for handling async processRequest operations
|
|
8
|
+
*/
|
|
9
|
+
export declare class OperationTrackerService {
|
|
10
|
+
private pendingOperations;
|
|
11
|
+
private operationCompleted$;
|
|
12
|
+
/**
|
|
13
|
+
* Register an async operation for tracking
|
|
14
|
+
*/
|
|
15
|
+
registerOperation(operation: PendingOperation): void;
|
|
16
|
+
/**
|
|
17
|
+
* Wait for operation to complete via SignalR notification
|
|
18
|
+
* Returns Observable that emits when notification with matching correlationId is received
|
|
19
|
+
*/
|
|
20
|
+
waitForOperation(correlationId: string, timeoutMs?: number): Observable<CrudNotification>;
|
|
21
|
+
/**
|
|
22
|
+
* Handle incoming SignalR notification
|
|
23
|
+
* Called by SignalRService when notification is received
|
|
24
|
+
*/
|
|
25
|
+
handleNotification(notification: CrudNotification): void;
|
|
26
|
+
/**
|
|
27
|
+
* Check if operation is pending
|
|
28
|
+
*/
|
|
29
|
+
isPending(correlationId: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Get pending operations count (for debugging)
|
|
32
|
+
*/
|
|
33
|
+
getPendingCount(): number;
|
|
34
|
+
/**
|
|
35
|
+
* Get all pending operations (for debugging)
|
|
36
|
+
*/
|
|
37
|
+
getAllPending(): PendingOperation[];
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OperationTrackerService, never>;
|
|
39
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OperationTrackerService>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { ConnectionState, CrudNotification } from '../../../app/interfaces/signalr.interface';
|
|
3
|
+
import { SessionStorageService } from '../../../auth/session-storage.service';
|
|
4
|
+
import { LocalStorageService } from '../../../auth/local-storage.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* SignalR Infrastructure Service
|
|
8
|
+
* Handles low-level WebSocket connection, group management, and reconnection
|
|
9
|
+
* Internal use only - components should use SignalRService instead
|
|
10
|
+
*/
|
|
11
|
+
export declare class SignalRInfrastructure {
|
|
12
|
+
private hubConnection;
|
|
13
|
+
readonly sessionStorageService: SessionStorageService;
|
|
14
|
+
readonly localStorageService: LocalStorageService;
|
|
15
|
+
readonly connectionState: import("@angular/core").WritableSignal<ConnectionState>;
|
|
16
|
+
readonly notifications$: Subject<CrudNotification>;
|
|
17
|
+
private activeGroups;
|
|
18
|
+
/**
|
|
19
|
+
* Helper method to get value from storage
|
|
20
|
+
* @param type The type of storage, 'Session' or 'Local'
|
|
21
|
+
* @param key The key to retrieve the value for
|
|
22
|
+
* @returns The value from storage, or null if not available
|
|
23
|
+
*/
|
|
24
|
+
private getFromStorage;
|
|
25
|
+
get appId(): string | null;
|
|
26
|
+
get environmentId(): string | null;
|
|
27
|
+
get tenantId(): string | null;
|
|
28
|
+
get token(): string | null;
|
|
29
|
+
/**
|
|
30
|
+
* Connect to SignalR hub
|
|
31
|
+
*/
|
|
32
|
+
connect(): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Register SignalR event handlers for CRUD notifications
|
|
35
|
+
*/
|
|
36
|
+
private registerEventHandlers;
|
|
37
|
+
/**
|
|
38
|
+
* Register connection lifecycle handlers
|
|
39
|
+
*/
|
|
40
|
+
private registerConnectionLifecycle;
|
|
41
|
+
/**
|
|
42
|
+
* Join SignalR group for an AppObject
|
|
43
|
+
*/
|
|
44
|
+
joinGroup(appObjectId: string): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Leave SignalR group
|
|
47
|
+
*/
|
|
48
|
+
leaveGroup(appObjectId: string): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Rejoin all active groups after reconnection
|
|
51
|
+
* This ensures components continue receiving notifications after network interruption
|
|
52
|
+
*/
|
|
53
|
+
private rejoinGroups;
|
|
54
|
+
/**
|
|
55
|
+
* Check if connected
|
|
56
|
+
*/
|
|
57
|
+
isConnected(): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Disconnect from SignalR hub (cleanup)
|
|
60
|
+
*/
|
|
61
|
+
disconnect(): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Get active groups (for debugging)
|
|
64
|
+
*/
|
|
65
|
+
getActiveGroups(): string[];
|
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SignalRInfrastructure, never>;
|
|
67
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SignalRInfrastructure>;
|
|
68
|
+
}
|