@techextensor/tab-core-utility 2.2.193 → 2.2.194

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/esm2022/index.mjs +1 -6
  2. package/esm2022/lib/tab-core-utility/app/constants/api-constants.mjs +22 -38
  3. package/esm2022/lib/tab-core-utility/app/constants/common.mjs +50 -14
  4. package/esm2022/lib/tab-core-utility/app/constants/storage-constants.mjs +2 -2
  5. package/esm2022/lib/tab-core-utility/app/crud/tab-blueprint.service.mjs +14 -41
  6. package/esm2022/lib/tab-core-utility/app/crud/tab-crud.service.mjs +68 -47
  7. package/esm2022/lib/tab-core-utility/app/crud/tab-delete.service.mjs +30 -84
  8. package/esm2022/lib/tab-core-utility/app/crud/tab-formio.service.mjs +12 -141
  9. package/esm2022/lib/tab-core-utility/app/crud/tab-get.service.mjs +42 -137
  10. package/esm2022/lib/tab-core-utility/app/crud/tab-insert.service.mjs +38 -89
  11. package/esm2022/lib/tab-core-utility/app/crud/tab-update.service.mjs +128 -156
  12. package/esm2022/lib/tab-core-utility/app/enums/query.enum.mjs +7 -7
  13. package/esm2022/lib/tab-core-utility/app/helpers/common/app.helpers.mjs +23 -28
  14. package/esm2022/lib/tab-core-utility/app/helpers/common/dsq.helpers.mjs +11 -9
  15. package/esm2022/lib/tab-core-utility/app/helpers/common/meta-data.helpers.mjs +13 -13
  16. package/esm2022/lib/tab-core-utility/app/helpers/common/req-res.helpers.mjs +45 -7
  17. package/esm2022/lib/tab-core-utility/app/helpers/common/where-clause.helpers.mjs +76 -79
  18. package/esm2022/lib/tab-core-utility/app/helpers/screen/grid.helpers.mjs +4 -8
  19. package/esm2022/lib/tab-core-utility/app/helpers/screen/screen.helpers.mjs +33 -8
  20. package/esm2022/lib/tab-core-utility/app/interfaces/auth.interface.mjs +1 -1
  21. package/esm2022/lib/tab-core-utility/app/interfaces/common.interface.mjs +1 -1
  22. package/esm2022/lib/tab-core-utility/app/models/api-query.class.mjs +1 -39
  23. package/esm2022/lib/tab-core-utility/app/models/app-field.model.mjs +7 -36
  24. package/esm2022/lib/tab-core-utility/app/models/app-object.model.mjs +47 -84
  25. package/esm2022/lib/tab-core-utility/app/models/app-screen.model.mjs +13 -24
  26. package/esm2022/lib/tab-core-utility/app/models/data-source-query.model.mjs +23 -57
  27. package/esm2022/lib/tab-core-utility/app/models/filter.model.mjs +10 -21
  28. package/esm2022/lib/tab-core-utility/app/models/parameter.model.mjs +6 -12
  29. package/esm2022/lib/tab-core-utility/app/models/sort.model.mjs +4 -11
  30. package/esm2022/lib/tab-core-utility/app/utils/json.util.mjs +16 -17
  31. package/esm2022/lib/tab-core-utility/app/utils/req-res.util.mjs +55 -1
  32. package/esm2022/lib/tab-core-utility/app/utils/tab-app.util.mjs +164 -1
  33. package/esm2022/lib/tab-core-utility/auth/auth.service.mjs +11 -36
  34. package/esm2022/lib/tab-core-utility/core/http-client/api.service.mjs +1 -78
  35. package/index.d.ts +0 -5
  36. package/lib/tab-core-utility/app/constants/api-constants.d.ts +18 -25
  37. package/lib/tab-core-utility/app/constants/common.d.ts +0 -9
  38. package/lib/tab-core-utility/app/constants/storage-constants.d.ts +1 -1
  39. package/lib/tab-core-utility/app/crud/tab-blueprint.service.d.ts +8 -14
  40. package/lib/tab-core-utility/app/crud/tab-crud.service.d.ts +7 -9
  41. package/lib/tab-core-utility/app/crud/tab-delete.service.d.ts +10 -20
  42. package/lib/tab-core-utility/app/crud/tab-formio.service.d.ts +6 -33
  43. package/lib/tab-core-utility/app/crud/tab-get.service.d.ts +8 -50
  44. package/lib/tab-core-utility/app/crud/tab-insert.service.d.ts +21 -16
  45. package/lib/tab-core-utility/app/crud/tab-update.service.d.ts +19 -34
  46. package/lib/tab-core-utility/app/enums/query.enum.d.ts +6 -3
  47. package/lib/tab-core-utility/app/helpers/common/app.helpers.d.ts +8 -5
  48. package/lib/tab-core-utility/app/helpers/common/dsq.helpers.d.ts +0 -3
  49. package/lib/tab-core-utility/app/helpers/common/meta-data.helpers.d.ts +3 -3
  50. package/lib/tab-core-utility/app/helpers/common/req-res.helpers.d.ts +51 -7
  51. package/lib/tab-core-utility/app/helpers/common/where-clause.helpers.d.ts +0 -1
  52. package/lib/tab-core-utility/app/helpers/screen/grid.helpers.d.ts +1 -2
  53. package/lib/tab-core-utility/app/helpers/screen/screen.helpers.d.ts +0 -1
  54. package/lib/tab-core-utility/app/interfaces/auth.interface.d.ts +1 -1
  55. package/lib/tab-core-utility/app/interfaces/common.interface.d.ts +6 -56
  56. package/lib/tab-core-utility/app/models/api-query.class.d.ts +9 -54
  57. package/lib/tab-core-utility/app/models/app-field.model.d.ts +2 -4
  58. package/lib/tab-core-utility/app/models/app-object.model.d.ts +3 -5
  59. package/lib/tab-core-utility/app/models/app-screen.model.d.ts +2 -2
  60. package/lib/tab-core-utility/app/models/data-source-query.model.d.ts +2 -7
  61. package/lib/tab-core-utility/app/models/filter.model.d.ts +2 -2
  62. package/lib/tab-core-utility/app/models/parameter.model.d.ts +2 -2
  63. package/lib/tab-core-utility/app/models/sort.model.d.ts +1 -1
  64. package/lib/tab-core-utility/app/utils/json.util.d.ts +2 -3
  65. package/lib/tab-core-utility/app/utils/req-res.util.d.ts +9 -1
  66. package/lib/tab-core-utility/app/utils/tab-app.util.d.ts +61 -0
  67. package/lib/tab-core-utility/auth/auth.service.d.ts +0 -6
  68. package/lib/tab-core-utility/core/http-client/api.service.d.ts +0 -46
  69. package/package.json +2 -3
  70. package/esm2022/lib/tab-core-utility/app/helpers/auth-response.adapter.mjs +0 -79
  71. package/esm2022/lib/tab-core-utility/app/helpers/login-response.adapter.mjs +0 -76
  72. package/esm2022/lib/tab-core-utility/app/helpers/response.adapter.mjs +0 -38
  73. package/esm2022/lib/tab-core-utility/app/helpers/transition-response.adapter.mjs +0 -83
  74. package/esm2022/lib/tab-core-utility/app/interfaces/signalr.interface.mjs +0 -42
  75. package/esm2022/lib/tab-core-utility/core/service/signalr/operation-tracker.service.mjs +0 -90
  76. package/esm2022/lib/tab-core-utility/core/service/signalr/signalr-infrastructure.service.mjs +0 -268
  77. package/esm2022/lib/tab-core-utility/core/service/signalr/signalr.service.mjs +0 -207
  78. package/lib/tab-core-utility/app/helpers/auth-response.adapter.d.ts +0 -32
  79. package/lib/tab-core-utility/app/helpers/login-response.adapter.d.ts +0 -29
  80. package/lib/tab-core-utility/app/helpers/response.adapter.d.ts +0 -22
  81. package/lib/tab-core-utility/app/helpers/transition-response.adapter.d.ts +0 -30
  82. package/lib/tab-core-utility/app/interfaces/signalr.interface.d.ts +0 -84
  83. package/lib/tab-core-utility/core/service/signalr/operation-tracker.service.d.ts +0 -40
  84. package/lib/tab-core-utility/core/service/signalr/signalr-infrastructure.service.d.ts +0 -73
  85. package/lib/tab-core-utility/core/service/signalr/signalr.service.d.ts +0 -122
@@ -14,14 +14,15 @@ export interface RecordInfo {
14
14
  primaryKey: string;
15
15
  }
16
16
  export interface CommonApiResponse {
17
+ RequestId: string;
17
18
  IsSuccess: boolean;
18
19
  Result: any;
20
+ StatusCode: string;
19
21
  RecordAffectted: number;
20
22
  TotalRecords: number;
21
23
  TotalExecutionTime: number;
22
24
  Log: any[];
23
25
  Errors: any[];
24
- CorrelationId?: string;
25
26
  }
26
27
  export interface GetScreenConfig {
27
28
  layoutId?: string;
@@ -39,7 +40,6 @@ export interface TemplateParsePayload {
39
40
  export interface NextStatusPayload {
40
41
  recordId: string;
41
42
  appObjectId?: string;
42
- appObjectName?: string;
43
43
  }
44
44
  export interface UpdateStatusPayload extends NextStatusPayload {
45
45
  nextPossibleStatusId: string;
@@ -135,10 +135,10 @@ export interface GetPayload {
135
135
  dataSourceQueryIdOrName: string;
136
136
  criteria: any;
137
137
  }
138
- export interface ImportDataPayload {
139
- ImportMappingId: string;
140
- FileId: string;
141
- ExecutionType: number;
138
+ export interface ImprotDataPayload {
139
+ ImportObjectMappingId: string;
140
+ File: string;
141
+ ImportType: number;
142
142
  }
143
143
  export interface SearchDataPayload {
144
144
  searchQuery: string;
@@ -165,53 +165,3 @@ export interface executeTABWorkflowPayload {
165
165
  AppObjectId: string;
166
166
  Reqtokens?: any;
167
167
  }
168
- /**
169
- * Standard API response format (camelCase - NEW BACKEND)
170
- * All new APIs return this consistent structure
171
- */
172
- export interface StandardApiResponse {
173
- /** Indicates if the request was successful */
174
- isSuccess: boolean;
175
- /** Error information (null if successful) */
176
- error: ApiError | null;
177
- /** Response data (null if error) */
178
- result: any | null;
179
- /** Request execution time in milliseconds */
180
- executionTimeMs: number;
181
- /** Log entries from the request */
182
- logs: string[];
183
- /** Additional metadata about the request */
184
- metadata: Record<string, any>;
185
- /** Number of records affected (for mutations) */
186
- affectedRecords?: number;
187
- /** Total number of records (for queries) */
188
- totalRecords?: number;
189
- /** Correlation ID for async operations (null for sync operations) */
190
- correlationId?: string;
191
- }
192
- /**
193
- * Error information in new API format
194
- */
195
- export interface ApiError {
196
- /** Error code (e.g., "UNEXPECTED_ERROR", "VALIDATION_ERROR") */
197
- code: string;
198
- /** User-friendly error message */
199
- message: string;
200
- /** Technical error details for debugging */
201
- details: string;
202
- }
203
- /**
204
- * Microservice URLs configuration
205
- */
206
- export interface APIServiceUrls {
207
- crudService: string;
208
- metadataService: string;
209
- formioService: string;
210
- identityService: string;
211
- codeExecutorService: string;
212
- notificationService: string;
213
- workflowService: string;
214
- kibanaService: string;
215
- reportService: string;
216
- }
217
- export type APIServiceName = keyof APIServiceUrls;
@@ -37,19 +37,20 @@ export declare class ChildRelationShip {
37
37
  childDetails: LookUpDetails;
38
38
  }
39
39
  export declare class APIFilterCriteria {
40
- filters: APIFilter[] | any;
41
- filterLogic: string | any;
40
+ Filters: APIFilter[] | any;
41
+ FilterLogic: string | any;
42
42
  SQLQuery: string | any;
43
43
  }
44
44
  export declare class APIFilter {
45
- conjunction: ConjuctionClause | any;
46
- fieldName: string | any;
47
- operator: RelationalOperator | any;
48
- valueType: FilterValueType | any;
45
+ ConjuctionClause: ConjuctionClause | any;
46
+ FieldID: string | any;
47
+ RelationalOperator: RelationalOperator | any;
48
+ ValueType: FilterValueType | any;
49
49
  value: string | any;
50
- sequence: number | any;
51
- groupId: number | any;
50
+ Sequence: number | any;
51
+ GroupID: number | any;
52
52
  parameterName: string | any;
53
+ Value: string | any;
53
54
  }
54
55
  export declare class APIValueSets {
55
56
  AppFieldID: string | any;
@@ -71,49 +72,3 @@ export declare class APIParameters {
71
72
  DataSourceQueryID: string | any;
72
73
  MappingFieldName: string | any;
73
74
  }
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,10 +49,8 @@ export declare class AppFieldModel {
49
49
  */
50
50
  search(term: string): boolean;
51
51
  /**
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.
52
+ * Converts the AppFieldModel instance to a JSON representation.
53
+ * @returns {any} The raw data of the instance.
56
54
  */
57
55
  toJSON(): any;
58
56
  }
@@ -40,14 +40,13 @@ 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;
43
44
  readonly AppId: string | null;
44
45
  private readonly fieldMap;
45
46
  private readonly dsqMap;
46
47
  private allFields;
47
48
  private allDSQs;
48
- private parsedAppObjectJson;
49
49
  constructor(raw: any, metadataHelper: MetadataHelper);
50
- private parseAppObjectJson;
51
50
  /**
52
51
  * Returns all fields associated with this AppObject. The fields are cached so that subsequent calls
53
52
  * are faster. The cache is stored in a map by ID.
@@ -122,10 +121,9 @@ export declare class AppObjectModel {
122
121
  dsqs: DataSourceQueryModel[];
123
122
  };
124
123
  /**
125
- * Converts the current object to JSON in the old API format (PascalCase).
126
- * This ensures backward compatibility with code expecting the old format.
124
+ * Converts the current object to a JSON object.
127
125
  *
128
- * @returns {any} The data in old API format.
126
+ * @returns {any} The raw data as a JSON object.
129
127
  */
130
128
  toJSON(): any;
131
129
  }
@@ -25,9 +25,9 @@ export declare class AppScreenModel {
25
25
  */
26
26
  search(term: string): boolean;
27
27
  /**
28
- * Converts the model to JSON in the old API format (PascalCase).
28
+ * Converts the current object to a JSON object.
29
29
  *
30
- * @returns A JSON representation in old format.
30
+ * @returns A JSON representation of the current object.
31
31
  */
32
32
  toJSON(): any;
33
33
  }
@@ -18,12 +18,9 @@ export declare class DataSourceQueryModel {
18
18
  private cachedParameters;
19
19
  private cachedFilters;
20
20
  private cachedSorts;
21
- private parsedConfiguration;
22
21
  constructor(raw: any, parentAppObject: AppObjectModel, metadataHelper: MetadataHelper);
23
- private parseConfiguration;
24
22
  /**
25
23
  * 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).
27
24
  * @returns {DataSourceQueries_Fields[]} The array of enriched fields.
28
25
  */
29
26
  fields(): DataSourceQueries_Fields[];
@@ -67,10 +64,8 @@ export declare class DataSourceQueryModel {
67
64
  */
68
65
  search(term: string): boolean;
69
66
  /**
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.
67
+ * Converts the DataSourceQueryModel instance to a JSON representation.
68
+ * @returns {any} The raw data in JSON format.
74
69
  */
75
70
  toJSON(): any;
76
71
  }
@@ -13,9 +13,9 @@ export declare class FilterModel {
13
13
  readonly FieldID: string;
14
14
  constructor(raw: any);
15
15
  /**
16
- * Converts the model to JSON in the old API format (PascalCase).
16
+ * Converts the current object to a JSON object.
17
17
  *
18
- * @returns A JSON representation in old format.
18
+ * @returns A JSON representation of the current object.
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 in the old API format (PascalCase).
11
- * @returns {any} The model as a JSON object in old format.
10
+ * Converts the model to JSON.
11
+ * @returns {any} The model as a JSON object.
12
12
  */
13
13
  toJSON(): any;
14
14
  }
@@ -9,7 +9,7 @@ export declare class SortModel {
9
9
  readonly AppFieldID: string;
10
10
  constructor(raw: any);
11
11
  /**
12
- * Converts the model to JSON in the old API format (PascalCase).
12
+ * Get raw data for this app object
13
13
  */
14
14
  toJSON(): any;
15
15
  }
@@ -5,10 +5,9 @@
5
5
  */
6
6
  export declare function validateJSON(str: string): boolean;
7
7
  /**
8
- * Creates dynamic data based on the input object for new API format
9
- * Transforms object into array of {fieldName, value} pairs
8
+ * Creates dynamic data based on the input object
10
9
  * @param obj The input object to create dynamic data from
11
- * @returns The formatted array with {fieldName, value} pairs
10
+ * @returns The formatted array
12
11
  */
13
12
  export declare function createDynamicData(obj: any): any;
14
13
  /**
@@ -1,5 +1,6 @@
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';
3
4
  /**
4
5
  * Delete a key from the response object
5
6
  *
@@ -36,7 +37,7 @@ export declare function getHeaders(headers?: any): any;
36
37
  * @param appObject - The AppObject
37
38
  * @returns AppFields[] | null - The array of primary key fields or null
38
39
  */
39
- export declare function getPrimaryKeyFields(appObject: AppObject): import("@techextensor/tab-core-utility").AppFields[] | null;
40
+ export declare function getPrimaryKeyFields(appObject: AppObject): AppFields[] | null;
40
41
  /**
41
42
  * Get the edit record ID from the response object
42
43
  *
@@ -45,6 +46,13 @@ export declare function getPrimaryKeyFields(appObject: AppObject): import("@tech
45
46
  * @returns any - The edit record ID
46
47
  */
47
48
  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): {};
48
56
  /**
49
57
  * Get the HttpHeaders for form data requests
50
58
  *
@@ -1,4 +1,36 @@
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;
2
34
  /**
3
35
  * Synchronize AppObject fields with the response
4
36
  *
@@ -7,3 +39,32 @@ import { AppObject } from '../models/app-object.class';
7
39
  * @returns any - The synchronized response object
8
40
  */
9
41
  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
+ }[];
@@ -21,17 +21,11 @@ export declare class AuthService {
21
21
  registerTenant(credentials: RegisterTenant): Observable<CommonApiResponse>;
22
22
  /**
23
23
  * Register a new user
24
- * Uses new identity service endpoint: POST auth/register
25
24
  * @param credentials - The new user's credentials
26
25
  * @param headers - The headers
27
26
  * @returns Observable<CommonApiResponse> - An observable of CommonApiResponse
28
27
  */
29
28
  register(credentials: NewUserRequest, headers?: any): Observable<CommonApiResponse>;
30
- /**
31
- * Transforms register request payload from PascalCase to camelCase for new identity service.
32
- * { FirstName, LastName, Email, Password, ... } → { firstName, lastName, email, password, ... }
33
- */
34
- private transformRegisterRequest;
35
29
  /**
36
30
  * Reset Password
37
31
  * @param data - Data for resetting password
@@ -1,6 +1,5 @@
1
1
  import { HttpParams, HttpHeaders } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
- import { APIServiceName, CommonApiResponse } from '../../app/interfaces/common.interface';
4
3
  import * as i0 from "@angular/core";
5
4
  export declare class ApiService {
6
5
  private readonly http;
@@ -82,51 +81,6 @@ export declare class ApiService {
82
81
  * @returns An Observable emitting the response data of type T.
83
82
  */
84
83
  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>;
121
- /**
122
- * Makes an HTTP POST request to a specific microservice and returns a Blob response
123
- * @param serviceName - Name of the microservice (e.g., 'reportService')
124
- * @param endPointName - Endpoint path relative to the service
125
- * @param data - Data to send with the request
126
- * @param reqHeader - Custom headers for the request
127
- * @returns An Observable emitting the response as a Blob
128
- */
129
- postBlobToService<D>(serviceName: APIServiceName, endPointName: string, data?: D, reqHeader?: HttpHeaders): Observable<Blob>;
130
84
  static ɵfac: i0.ɵɵFactoryDeclaration<ApiService, never>;
131
85
  static ɵprov: i0.ɵɵInjectableDeclaration<ApiService>;
132
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techextensor/tab-core-utility",
3
- "version": "2.2.193",
3
+ "version": "2.2.194",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.15",
6
6
  "@angular/core": "^19.2.15",
@@ -11,8 +11,7 @@
11
11
  "idb": "^8.0.2",
12
12
  "liquidjs": "^10.20.3",
13
13
  "cypress": "^13.17.0",
14
- "crypto-js": "^4.2.0",
15
- "@microsoft/signalr": "^10.0.0"
14
+ "crypto-js": "^4.2.0"
16
15
  },
17
16
  "dependencies": {
18
17
  "tslib": "^2.8.1"
@@ -1,79 +0,0 @@
1
- /**
2
- * AuthResponseAdapter - Transforms new auth API response to legacy format
3
- *
4
- * The new identity service returns a flat response structure with camelCase fields.
5
- * This adapter converts it to the old nested structure expected by the application.
6
- *
7
- * New format (flat):
8
- * { userId, email, userName, accessToken, refreshToken, expiresIn, roles, ... }
9
- *
10
- * Old format (nested):
11
- * { user: { Id, UserName, Roles, PersonData, Attributes, ... }, Token, RefreshToken, RefreshTokenExpiry }
12
- *
13
- * Note: A duplicate LoginResponseAdapter exists on branch TE-42-8422/Api-Rewrite.
14
- * On merge, discard one and keep this file.
15
- */
16
- export class AuthResponseAdapter {
17
- /**
18
- * Transforms the normalized CommonApiResponse's Result from new flat format to old nested format.
19
- * If the Result is already in old format (has .user or .Token), returns as-is.
20
- *
21
- * @param response - The CommonApiResponse (already top-level normalized by ResponseAdapter)
22
- * @returns The response with Result transformed to legacy nested format
23
- */
24
- static normalize(response) {
25
- const result = response?.Result;
26
- // If null, already old format (has .user wrapper or .Token), return as-is
27
- if (!result || result.user || result.Token) {
28
- return response;
29
- }
30
- // Transform new flat format to old nested format
31
- response.Result = {
32
- user: {
33
- Id: result.userId ?? null,
34
- UserName: result.email ?? result.userName ?? null,
35
- DefaultTenantId: result.defaultTenantId ?? null,
36
- DefaultAppId: result.defaultAppId ?? null,
37
- Roles: AuthResponseAdapter.transformRoles(result.roles),
38
- Teams: null,
39
- PersonData: null,
40
- MailingAddress: null,
41
- Locale: null,
42
- Attributes: null,
43
- },
44
- Token: result.accessToken ?? null,
45
- RefreshToken: result.refreshToken ?? null,
46
- RefreshTokenExpiry: result.expiresIn
47
- ? new Date(Date.now() + result.expiresIn * 1000).toISOString()
48
- : null,
49
- Success: result.succeeded ?? false,
50
- Errors: result.error ?? null,
51
- };
52
- return response;
53
- }
54
- /**
55
- * Transforms roles from new camelCase format to old PascalCase format.
56
- * Structure: { tenantId: { appId: { envId: [{ id, roleName, description }] } } }
57
- * becomes: { tenantId: { appId: { envId: [{ ID, RoleName, Description }] } } }
58
- */
59
- static transformRoles(roles) {
60
- if (!roles)
61
- return {};
62
- const transformed = {};
63
- for (const [tenantId, tenantData] of Object.entries(roles)) {
64
- transformed[tenantId] = {};
65
- for (const [appId, appData] of Object.entries(tenantData)) {
66
- transformed[tenantId][appId] = {};
67
- for (const [envId, envRoles] of Object.entries(appData)) {
68
- transformed[tenantId][appId][envId] = envRoles.map(role => ({
69
- ID: role.id ?? role.ID,
70
- RoleName: role.roleName ?? role.RoleName,
71
- Description: role.description ?? role.Description,
72
- }));
73
- }
74
- }
75
- }
76
- return transformed;
77
- }
78
- }
79
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC1yZXNwb25zZS5hZGFwdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9kYXRhLWFjY2Vzcy9zcmMvbGliL3RhYi1jb3JlLXV0aWxpdHkvYXBwL2hlbHBlcnMvYXV0aC1yZXNwb25zZS5hZGFwdGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBOzs7Ozs7Ozs7Ozs7OztHQWNHO0FBQ0gsTUFBTSxPQUFPLG1CQUFtQjtJQUU5Qjs7Ozs7O09BTUc7SUFDSCxNQUFNLENBQUMsU0FBUyxDQUFDLFFBQTJCO1FBQzFDLE1BQU0sTUFBTSxHQUFHLFFBQVEsRUFBRSxNQUFNLENBQUM7UUFFaEMsMEVBQTBFO1FBQzFFLElBQUksQ0FBQyxNQUFNLElBQUksTUFBTSxDQUFDLElBQUksSUFBSSxNQUFNLENBQUMsS0FBSyxFQUFFLENBQUM7WUFDM0MsT0FBTyxRQUFRLENBQUM7UUFDbEIsQ0FBQztRQUVELGlEQUFpRDtRQUNqRCxRQUFRLENBQUMsTUFBTSxHQUFHO1lBQ2hCLElBQUksRUFBRTtnQkFDSixFQUFFLEVBQUUsTUFBTSxDQUFDLE1BQU0sSUFBSSxJQUFJO2dCQUN6QixRQUFRLEVBQUUsTUFBTSxDQUFDLEtBQUssSUFBSSxNQUFNLENBQUMsUUFBUSxJQUFJLElBQUk7Z0JBQ2pELGVBQWUsRUFBRSxNQUFNLENBQUMsZUFBZSxJQUFJLElBQUk7Z0JBQy9DLFlBQVks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