@ecodev/natural 56.0.1 → 56.0.3

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.
@@ -70,7 +70,7 @@ export declare abstract class NaturalAbstractModelService<Tone, Vone extends {
70
70
  * If available it will emit object from cache immediately, then it
71
71
  * will **always** fetch from network and then the observable will be completed
72
72
  */
73
- getOne(id: string): Observable<Tone>;
73
+ getOne(id: string, fetchPolicy?: WatchQueryFetchPolicy): Observable<Tone>;
74
74
  /**
75
75
  * Get a collection of objects
76
76
  *
@@ -121,7 +121,7 @@ export declare abstract class NaturalAbstractModelService<Tone, Vone extends {
121
121
  id: string;
122
122
  }[]): Observable<Tdelete>;
123
123
  /**
124
- * Resolve model and items related to the model, if the id is provided, in order to show a form
124
+ * Resolve model from server (never from cache) and items related to the model, if the id is provided, in order to show a form
125
125
  */
126
126
  resolve(id: string): Observable<Resolve<Tone | Vcreate['input']>>;
127
127
  /**
@@ -12,7 +12,6 @@ type Key = NaturalAbstractModelService<unknown, any, any, any, unknown, any, unk
12
12
  * `id` should be the ID of the object that will be updated.
13
13
  */
14
14
  export declare class NaturalDebounceService {
15
- private readonly flusher;
16
15
  /**
17
16
  * Stores the debounced update function
18
17
  */
@@ -25,7 +24,15 @@ export declare class NaturalDebounceService {
25
24
  * keep the same debouncing timeline.
26
25
  */
27
26
  debounce<T>(key: Key, id: string, source: Observable<T>): Observable<T>;
28
- cancel(key: Key, id: string): void;
27
+ cancelOne(key: Key, id: string): void;
28
+ /**
29
+ * Immediately execute the pending update, if any.
30
+ *
31
+ * It should typically be called before resolving the object, to mutate it before re-fetching it from server.
32
+ *
33
+ * The returned observable will complete when the update completes, even if it errors.
34
+ */
35
+ flushOne(key: Key, id: string): Observable<void>;
29
36
  /**
30
37
  * Immediately execute all pending updates.
31
38
  *
@@ -34,6 +41,7 @@ export declare class NaturalDebounceService {
34
41
  * The returned observable will complete when all updates complete, even if some of them error.
35
42
  */
36
43
  flush(): Observable<void>;
44
+ private internalFlush;
37
45
  /**
38
46
  * Count of pending updates
39
47
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecodev/natural",
3
- "version": "56.0.1",
3
+ "version": "56.0.3",
4
4
  "license": "MIT",
5
5
  "repository": "github:Ecodev/natural",
6
6
  "sideEffects": false,