eservices-core 1.0.541 → 1.0.543
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.
|
@@ -35,7 +35,11 @@ export default class dataService {
|
|
|
35
35
|
fields?: string | string[];
|
|
36
36
|
}): Promise<T>;
|
|
37
37
|
static updateById(entity: string, id: number, values: ValuesInterface, options?: UpdateOptions): Promise<IRequestUpdateResult>;
|
|
38
|
-
|
|
38
|
+
/**
|
|
39
|
+
* @description Method for removing element by ID or array ID.
|
|
40
|
+
* */
|
|
41
|
+
static removeById(entity: string, Id: number | number[]): Promise<IRequestUpdateResult>;
|
|
42
|
+
static removeByKeys(entity: string, keys: Record<string, any>): Promise<IRequestUpdateResult>;
|
|
39
43
|
}
|
|
40
44
|
interface UpdateOptions {
|
|
41
45
|
version?: number;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* eservices-core v1.0.
|
|
2
|
+
* eservices-core v1.0.543
|
|
3
3
|
* (c) 2023 ESERVICES
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -2651,8 +2651,21 @@ class dataService {
|
|
|
2651
2651
|
})
|
|
2652
2652
|
});
|
|
2653
2653
|
}
|
|
2654
|
-
|
|
2655
|
-
|
|
2654
|
+
/**
|
|
2655
|
+
* @description Method for removing element by ID or array ID.
|
|
2656
|
+
* */
|
|
2657
|
+
static removeById(entity, Id) {
|
|
2658
|
+
const key = (typeof Id === 'number') ? { Id } : Id;
|
|
2659
|
+
return dataService.removeByKeys(entity, key);
|
|
2660
|
+
}
|
|
2661
|
+
static removeByKeys(entity, keys) {
|
|
2662
|
+
return Request(`/close-api/data/entities/${entity}`, {
|
|
2663
|
+
method: 'delete',
|
|
2664
|
+
headers: {
|
|
2665
|
+
'Content-Type': 'application/json'
|
|
2666
|
+
},
|
|
2667
|
+
body: JSON.stringify({ keys })
|
|
2668
|
+
});
|
|
2656
2669
|
}
|
|
2657
2670
|
}
|
|
2658
2671
|
|
|
@@ -3778,7 +3791,7 @@ function setupSocket(URI = window.location.origin + "/socket.io") {
|
|
|
3778
3791
|
SocketStore.manager = new socket_ioClient.Manager(URI, {
|
|
3779
3792
|
reconnectionDelayMax: 1000,
|
|
3780
3793
|
withCredentials: true,
|
|
3781
|
-
transports: ["websocket", "polling"]
|
|
3794
|
+
transports: ["websocket", "polling"],
|
|
3782
3795
|
});
|
|
3783
3796
|
}
|
|
3784
3797
|
|
|
@@ -5230,7 +5243,7 @@ function debounce(fn, delay = 1000) {
|
|
|
5230
5243
|
return (...args) => {
|
|
5231
5244
|
// @ts-ignore
|
|
5232
5245
|
clearTimeout(timeout);
|
|
5233
|
-
timeout = setTimeout(() => fn(args), delay);
|
|
5246
|
+
timeout = setTimeout(() => fn(...args), delay);
|
|
5234
5247
|
};
|
|
5235
5248
|
}
|
|
5236
5249
|
|