@messaia/cdk 17.1.5-rc13 → 17.1.5-rc15
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/lib/common/functions/utils.mjs +47 -1
- package/esm2022/lib/http/services/generic.service.mjs +8 -7
- package/fesm2022/messaia-cdk.mjs +52 -5
- package/fesm2022/messaia-cdk.mjs.map +1 -1
- package/lib/common/functions/utils.d.ts +13 -0
- package/lib/common/pipes/order.pipe.d.ts +1 -1
- package/lib/http/services/generic.service.d.ts +7 -6
- package/package.json +1 -1
|
@@ -70,6 +70,19 @@ export declare class Utils {
|
|
|
70
70
|
* @param body
|
|
71
71
|
*/
|
|
72
72
|
static toHttpParams(body: any): HttpParams;
|
|
73
|
+
/**
|
|
74
|
+
* Converts HttpParams to a JavaScript object.
|
|
75
|
+
* @param httpParams HttpParams object to convert.
|
|
76
|
+
* @returns Converted JavaScript object.
|
|
77
|
+
*/
|
|
78
|
+
static httpParamsToObject(httpParams: HttpParams): any;
|
|
79
|
+
/**
|
|
80
|
+
* Converts an array of filter objects to an HttpParams object.
|
|
81
|
+
* @param filterArray The array of filter objects.
|
|
82
|
+
* @param paramNamePrefix The prefix for the query parameter names (default is 'Filters').
|
|
83
|
+
* @returns The HttpParams object containing the constructed query parameters.
|
|
84
|
+
*/
|
|
85
|
+
static toArrayHttpParams(filterArray: any[], paramNamePrefix?: string): HttpParams;
|
|
73
86
|
/**
|
|
74
87
|
* Cleans the objects
|
|
75
88
|
* Removes empty properties
|
|
@@ -20,7 +20,7 @@ export declare class OrderPipe implements PipeTransform {
|
|
|
20
20
|
* @param a
|
|
21
21
|
* @param b
|
|
22
22
|
*/
|
|
23
|
-
static defaultCompare(a: any, b: any):
|
|
23
|
+
static defaultCompare(a: any, b: any): 1 | 0 | -1;
|
|
24
24
|
/**
|
|
25
25
|
* Parse expression, split into items
|
|
26
26
|
* @param expression
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpClient, HttpErrorResponse, HttpEvent, HttpHeaders } from '@angular/common/http';
|
|
1
|
+
import { HttpClient, HttpErrorResponse, HttpEvent, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
2
2
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
3
|
export declare class GenericService<T extends any> {
|
|
4
4
|
endpoint?: string | undefined;
|
|
@@ -34,13 +34,14 @@ export declare class GenericService<T extends any> {
|
|
|
34
34
|
*/
|
|
35
35
|
count(params?: Object, path?: string | null, headers?: Object, handleError?: boolean): Observable<number>;
|
|
36
36
|
/**
|
|
37
|
-
* Gets a list of entities
|
|
37
|
+
* Gets a list of entities.
|
|
38
38
|
*
|
|
39
|
-
* @param params Adds query params to the request
|
|
40
|
-
* @param
|
|
41
|
-
* @param
|
|
39
|
+
* @param params Optional. Adds query params to the request.
|
|
40
|
+
* @param path Optional. A relative path to the action.
|
|
41
|
+
* @param headers Optional. Adds headers to the request.
|
|
42
|
+
* @returns An Observable with the response data.
|
|
42
43
|
*/
|
|
43
|
-
getList(params?: Object | null, path?: string | null, headers?: Object | null): Observable<any>;
|
|
44
|
+
getList(params?: HttpParams | Object | null, path?: string | null, headers?: Object | null): Observable<any>;
|
|
44
45
|
/**
|
|
45
46
|
* Loads data
|
|
46
47
|
* @param params Adds query params to the request
|