@nymphjs/nymph 1.0.0-beta.5 → 1.0.0-beta.51

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 (50) hide show
  1. package/CHANGELOG.md +235 -0
  2. package/README.md +15 -15
  3. package/dist/Entity.d.ts +24 -3
  4. package/dist/Entity.js +194 -86
  5. package/dist/Entity.js.map +1 -1
  6. package/dist/Entity.test.js +34 -17
  7. package/dist/Entity.test.js.map +1 -1
  8. package/dist/Entity.types.d.ts +3 -1
  9. package/dist/Nymph.d.ts +22 -7
  10. package/dist/Nymph.js +214 -68
  11. package/dist/Nymph.js.map +1 -1
  12. package/dist/Nymph.types.d.ts +18 -5
  13. package/dist/Nymph.types.js +1 -1
  14. package/dist/Nymph.types.js.map +1 -1
  15. package/dist/driver/NymphDriver.d.ts +1 -22
  16. package/dist/driver/NymphDriver.js +85 -105
  17. package/dist/driver/NymphDriver.js.map +1 -1
  18. package/dist/driver/testArtifacts.js +208 -159
  19. package/dist/driver/testArtifacts.js.map +1 -1
  20. package/dist/errors/InvalidStateError.d.ts +3 -0
  21. package/dist/errors/InvalidStateError.js +11 -0
  22. package/dist/errors/InvalidStateError.js.map +1 -0
  23. package/dist/errors/QueryFailedError.js.map +1 -1
  24. package/dist/errors/index.d.ts +1 -0
  25. package/dist/errors/index.js +1 -0
  26. package/dist/errors/index.js.map +1 -1
  27. package/dist/testArtifacts.d.ts +10 -3
  28. package/dist/testArtifacts.js +20 -11
  29. package/dist/testArtifacts.js.map +1 -1
  30. package/dist/testMocks.d.ts +10 -7
  31. package/dist/testMocks.js +22 -10
  32. package/dist/testMocks.js.map +1 -1
  33. package/dist/utils.d.ts +1 -1
  34. package/dist/utils.js +11 -5
  35. package/dist/utils.js.map +1 -1
  36. package/package.json +15 -15
  37. package/src/Entity.test.ts +33 -11
  38. package/src/Entity.ts +303 -127
  39. package/src/Entity.types.ts +13 -1
  40. package/src/Nymph.ts +392 -88
  41. package/src/Nymph.types.ts +95 -24
  42. package/src/driver/NymphDriver.ts +203 -282
  43. package/src/driver/testArtifacts.ts +238 -157
  44. package/src/errors/InvalidStateError.ts +6 -0
  45. package/src/errors/index.ts +2 -0
  46. package/src/nymphJoiProps.ts +2 -2
  47. package/src/testArtifacts.ts +28 -10
  48. package/src/testMocks.ts +42 -25
  49. package/src/utils.ts +22 -8
  50. package/typedoc.json +4 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,241 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.0.0-beta.51](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2024-04-12)
7
+
8
+ **Note:** Version bump only for package @nymphjs/nymph
9
+
10
+ # [1.0.0-beta.50](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2024-04-08)
11
+
12
+ **Note:** Version bump only for package @nymphjs/nymph
13
+
14
+ # [1.0.0-beta.49](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2024-03-04)
15
+
16
+ **Note:** Version bump only for package @nymphjs/nymph
17
+
18
+ # [1.0.0-beta.48](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2023-11-10)
19
+
20
+ **Note:** Version bump only for package @nymphjs/nymph
21
+
22
+ # [1.0.0-beta.47](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2023-11-10)
23
+
24
+ **Note:** Version bump only for package @nymphjs/nymph
25
+
26
+ # [1.0.0-beta.46](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2023-08-29)
27
+
28
+ **Note:** Version bump only for package @nymphjs/nymph
29
+
30
+ # [1.0.0-beta.45](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2023-07-17)
31
+
32
+ ### Bug Fixes
33
+
34
+ - missing pubsub updates when new top level match uses qref with multiple results ([6dc26e2](https://github.com/sciactive/nymphjs/commit/6dc26e280453794ea9ce6c2b77482f85eb62bd23))
35
+
36
+ # [1.0.0-beta.44](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2023-07-13)
37
+
38
+ **Note:** Version bump only for package @nymphjs/nymph
39
+
40
+ # [1.0.0-beta.43](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2023-07-12)
41
+
42
+ **Note:** Version bump only for package @nymphjs/nymph
43
+
44
+ # [1.0.0-beta.42](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2023-07-12)
45
+
46
+ ### Features
47
+
48
+ - make fillSession async so that gatekeeper can be sync ([fb6def4](https://github.com/sciactive/nymphjs/commit/fb6def45cd031516c9bcd3438f905e2ff881707b))
49
+
50
+ # [1.0.0-beta.41](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2023-07-12)
51
+
52
+ ### Features
53
+
54
+ - remove synchronous database queries ([b579fb2](https://github.com/sciactive/nymphjs/commit/b579fb2eacd96cdd1b386a62c5c00cdbb2438f6e))
55
+ - rewrite server side async api to match client side api ([9c537a8](https://github.com/sciactive/nymphjs/commit/9c537a8be49e9b989af0822a4c2236e8c2d20f87))
56
+
57
+ # [1.0.0-beta.40](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2023-07-10)
58
+
59
+ **Note:** Version bump only for package @nymphjs/nymph
60
+
61
+ # [1.0.0-beta.39](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2023-07-09)
62
+
63
+ **Note:** Version bump only for package @nymphjs/nymph
64
+
65
+ # [1.0.0-beta.38](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2023-07-09)
66
+
67
+ **Note:** Version bump only for package @nymphjs/nymph
68
+
69
+ # [1.0.0-beta.37](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2023-07-09)
70
+
71
+ **Note:** Version bump only for package @nymphjs/nymph
72
+
73
+ # [1.0.0-beta.36](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2023-07-09)
74
+
75
+ **Note:** Version bump only for package @nymphjs/nymph
76
+
77
+ # [1.0.0-beta.35](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2023-06-14)
78
+
79
+ ### Bug Fixes
80
+
81
+ - get class from nymph instead of using constructor ([fc8538e](https://github.com/sciactive/nymphjs/commit/fc8538ea24be79b845ab1e00f930542f34517bfb))
82
+
83
+ # [1.0.0-beta.34](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2023-05-13)
84
+
85
+ **Note:** Version bump only for package @nymphjs/nymph
86
+
87
+ # [1.0.0-beta.33](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2023-05-13)
88
+
89
+ **Note:** Version bump only for package @nymphjs/nymph
90
+
91
+ # [1.0.0-beta.32](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2023-05-13)
92
+
93
+ ### Features
94
+
95
+ - issue initial request with pubsub instead of rest on subscribe ([8a232d2](https://github.com/sciactive/nymphjs/commit/8a232d2faeb8622924f9c35a01a8f71a70659bb3))
96
+
97
+ # [1.0.0-beta.31](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2023-05-12)
98
+
99
+ **Note:** Version bump only for package @nymphjs/nymph
100
+
101
+ # [1.0.0-beta.30](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2023-05-12)
102
+
103
+ ### Features
104
+
105
+ - allow providing getEntityClass with a class instead of string ([ecd64c1](https://github.com/sciactive/nymphjs/commit/ecd64c1bf92e3657889613b76bcc46652f371ead))
106
+
107
+ # [1.0.0-beta.29](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2023-05-08)
108
+
109
+ ### Bug Fixes
110
+
111
+ - use 4 byte utf8 encoding in mysql ([c335b6e](https://github.com/sciactive/nymphjs/commit/c335b6e8416f935c9116e7f54de753d4b2255a73))
112
+
113
+ # [1.0.0-beta.28](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2023-05-05)
114
+
115
+ **Note:** Version bump only for package @nymphjs/nymph
116
+
117
+ # [1.0.0-beta.27](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2023-05-04)
118
+
119
+ ### Bug Fixes
120
+
121
+ - properly escape mysql ids with dots ([64bfaa5](https://github.com/sciactive/nymphjs/commit/64bfaa5d606f97a753ca7e6c5d2d86f7c0f7729a))
122
+
123
+ # [1.0.0-beta.26](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2023-05-04)
124
+
125
+ ### Features
126
+
127
+ - update packages and migrate to mysql2 ([72ad611](https://github.com/sciactive/nymphjs/commit/72ad611bd2bf7bf85c3ba8a3486503d9b50c49d6))
128
+
129
+ # [1.0.0-beta.25](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2023-05-04)
130
+
131
+ ### Bug Fixes
132
+
133
+ - don't create empty entities ([1d4d2e9](https://github.com/sciactive/nymphjs/commit/1d4d2e99af2e9cdc647bcf58ac34572836f41176))
134
+ - tilmeld uses wrong class when cloned with user ([059c2ce](https://github.com/sciactive/nymphjs/commit/059c2cedf1b07b9681e87c240eb36723a4581918))
135
+
136
+ ### Features
137
+
138
+ - add flags to disable rest and pubsub support on an entity class ([52106a3](https://github.com/sciactive/nymphjs/commit/52106a3d44065bcfec40d361344bf1eba59a5136)), closes [#1](https://github.com/sciactive/nymphjs/issues/1)
139
+
140
+ # [1.0.0-beta.24](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2023-05-02)
141
+
142
+ **Note:** Version bump only for package @nymphjs/nymph
143
+
144
+ # [1.0.0-beta.23](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2023-05-02)
145
+
146
+ ### Bug Fixes
147
+
148
+ - rare case where currentUser isn't corrent ([97f233a](https://github.com/sciactive/nymphjs/commit/97f233a5fcfd4b97dd282562b0c99097ac3ef41d))
149
+
150
+ # [1.0.0-beta.22](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2023-05-01)
151
+
152
+ **Note:** Version bump only for package @nymphjs/nymph
153
+
154
+ # [1.0.0-beta.21](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2023-05-01)
155
+
156
+ **Note:** Version bump only for package @nymphjs/nymph
157
+
158
+ # [1.0.0-beta.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2023-04-30)
159
+
160
+ **Note:** Version bump only for package @nymphjs/nymph
161
+
162
+ # [1.0.0-beta.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2023-04-29)
163
+
164
+ **Note:** Version bump only for package @nymphjs/nymph
165
+
166
+ # [1.0.0-beta.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2023-04-27)
167
+
168
+ ### Bug Fixes
169
+
170
+ - small type issues ([b91579c](https://github.com/sciactive/nymphjs/commit/b91579c9c1e96500d903332648f5a93c9a7e7d9b))
171
+
172
+ ### Features
173
+
174
+ - add the ability to switch to a user without their password ([ca4466a](https://github.com/sciactive/nymphjs/commit/ca4466af1704d68905ac087350a8cf151c1072d9))
175
+ - forbid modifying ac props from client ([f9e896f](https://github.com/sciactive/nymphjs/commit/f9e896f6c57b08ae100bc50d33a0234b6a431333))
176
+
177
+ # [1.0.0-beta.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2023-04-24)
178
+
179
+ **Note:** Version bump only for package @nymphjs/nymph
180
+
181
+ # [1.0.0-beta.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2023-03-31)
182
+
183
+ **Note:** Version bump only for package @nymphjs/nymph
184
+
185
+ # [1.0.0-beta.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2023-03-23)
186
+
187
+ ### Features
188
+
189
+ - add option to sort results by a property ([16384e7](https://github.com/sciactive/nymphjs/commit/16384e7bdab88abb55ccccabb06ac09f92fa8a03))
190
+
191
+ # [1.0.0-beta.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2023-03-17)
192
+
193
+ **Note:** Version bump only for package @nymphjs/nymph
194
+
195
+ # [1.0.0-beta.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2023-03-16)
196
+
197
+ ### Bug Fixes
198
+
199
+ - pubsub publishing changes before transaction is finished ([a918cc1](https://github.com/sciactive/nymphjs/commit/a918cc1451e03015ecce20f1c9bf6ceb62b7dff1))
200
+
201
+ # [1.0.0-beta.12](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2023-03-04)
202
+
203
+ **Note:** Version bump only for package @nymphjs/nymph
204
+
205
+ # [1.0.0-beta.11](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2023-02-27)
206
+
207
+ **Note:** Version bump only for package @nymphjs/nymph
208
+
209
+ # [1.0.0-beta.10](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2023-01-19)
210
+
211
+ **Note:** Version bump only for package @nymphjs/nymph
212
+
213
+ # [1.0.0-beta.9](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2023-01-09)
214
+
215
+ ### Bug Fixes
216
+
217
+ - reworked $is and $equals to better work with new instance based classes ([b1f3f0c](https://github.com/sciactive/nymphjs/commit/b1f3f0cca3e2b0dd392cd9da31167a6bd9487b40))
218
+
219
+ # [1.0.0-beta.8](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2023-01-09)
220
+
221
+ ### Features
222
+
223
+ - make entities in nymph client instance specific too ([1029f06](https://github.com/sciactive/nymphjs/commit/1029f061a1ad193e4a8a2dab0186b9a4b517f646))
224
+
225
+ # [1.0.0-beta.7](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2023-01-05)
226
+
227
+ ### Bug Fixes
228
+
229
+ - sqlite transaction returns wrong instance of nymph if it has been cloned ([b278c76](https://github.com/sciactive/nymphjs/commit/b278c7633722cb1cca7a941187ae2f1ff8ebdc7b))
230
+
231
+ # [1.0.0-beta.6](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.5...v1.0.0-beta.6) (2023-01-05)
232
+
233
+ ### Bug Fixes
234
+
235
+ - extend class with correct nymph property when added to instance ([1d63f45](https://github.com/sciactive/nymphjs/commit/1d63f457c16de852322d81fd9fdc25e3eb841c8d))
236
+
237
+ ### Features
238
+
239
+ - addEntityClass now returns the new class, which is required to use the class ([e752c3e](https://github.com/sciactive/nymphjs/commit/e752c3e50796656bdea8f8525932ede07c8a5378))
240
+
6
241
  # [1.0.0-beta.5](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2022-11-24)
7
242
 
8
243
  **Note:** Version bump only for package @nymphjs/nymph
package/README.md CHANGED
@@ -22,7 +22,7 @@ Here's an overview:
22
22
  // main.ts
23
23
  import { Nymph } from '@nymphjs/nymph';
24
24
  import MySQLDriver from '@nymphjs/driver-mysql';
25
- import Todo from './Todo';
25
+ import TodoClass from './Todo';
26
26
 
27
27
  const mysqlConfig = {
28
28
  host: 'your_db_host',
@@ -31,8 +31,10 @@ const mysqlConfig = {
31
31
  password: 'your_password',
32
32
  };
33
33
 
34
+ // Create a new instance of Nymph.
34
35
  const nymph = new Nymph({}, new MySQLDriver(mysqlConfig));
35
- nymph.addEntityClass(Todo);
36
+ // addEntityClass returns the class you should use for this instance of Nymph.
37
+ const Todo = nymph.addEntityClass(TodoClass);
36
38
 
37
39
  // You are set up. Now you can use entity classes like `Todo` to store data,
38
40
  // and Nymph's query methods like `getEntities` to retrieve them.
@@ -44,7 +46,7 @@ async function run() {
44
46
 
45
47
  const otherPendingTodos = await nymph.getEntities(
46
48
  { class: Todo },
47
- { type: '&', '!guid': myEntity.guid, equal: ['done', false] }
49
+ { type: '&', '!guid': myEntity.guid, equal: ['done', false] },
48
50
  );
49
51
 
50
52
  const total = otherPendingTodos.length;
@@ -52,7 +54,7 @@ async function run() {
52
54
  console.log(
53
55
  `Besides the one I just created, there ${
54
56
  single ? 'is' : 'are'
55
- } ${total} pending todo${single ? '' : 's'} in the database.`
57
+ } ${total} pending todo${single ? '' : 's'} in the database.`,
56
58
  );
57
59
  }
58
60
  ```
@@ -74,19 +76,17 @@ export default class Todo extends Entity<TodoData> {
74
76
  return (await super.factory(guid)) as Todo & TodoData;
75
77
  }
76
78
 
77
- static factorySync(guid?: string): Todo & TodoData {
78
- return super.factorySync(guid) as Todo & TodoData;
79
+ static factorySync(): Todo & TodoData {
80
+ return super.factorySync() as Todo & TodoData;
79
81
  }
80
82
 
81
- constructor(guid?: string) {
82
- super(guid);
83
+ constructor() {
84
+ super();
83
85
 
84
- if (this.guid == null) {
85
- // Within the methods of an entity, you will use `this.$data` to access
86
- // its data. Outside, you don't need the $data part.
87
- this.$data.text = '';
88
- this.$data.done = false;
89
- }
86
+ // Within the methods of an entity, you will use `this.$data` to access
87
+ // its data. Outside, you don't need the $data part.
88
+ this.$data.text = '';
89
+ this.$data.done = false;
90
90
  }
91
91
 
92
92
  async $getOtherTodos() {
@@ -95,7 +95,7 @@ export default class Todo extends Entity<TodoData> {
95
95
  // instance of Nymph, so it could be a transactional instance.
96
96
  const otherTodos = await this.$nymph.getEntities(
97
97
  { class: Todo },
98
- { type: '!&', guid: this.guid }
98
+ { type: '!&', guid: this.guid },
99
99
  );
100
100
  return otherTodos;
101
101
  }
package/dist/Entity.d.ts CHANGED
@@ -15,7 +15,10 @@ export default class Entity<T extends EntityData = EntityData> implements Entity
15
15
  protected $data: T;
16
16
  protected $isASleepingReference: boolean;
17
17
  protected $sleepingReference: EntityReference | null;
18
+ protected $wakePromise: Promise<Entity<T>> | null;
18
19
  protected $privateData: string[];
20
+ static pubSubEnabled: boolean;
21
+ static restEnabled: boolean;
19
22
  static searchRestrictedData: string[];
20
23
  protected $protectedData: string[];
21
24
  protected $allowlistData?: string[];
@@ -25,9 +28,9 @@ export default class Entity<T extends EntityData = EntityData> implements Entity
25
28
  static clientEnabledStaticMethods: string[];
26
29
  private $skipAc;
27
30
  private $originalAcValues;
28
- constructor(guid?: string);
31
+ constructor();
29
32
  static factory(guid?: string): Promise<EntityInterface | Entity<EntityData>>;
30
- static factorySync(guid?: string): Entity<EntityData>;
33
+ static factorySync(): Entity<EntityData>;
31
34
  static factoryReference(reference: EntityReference): Entity<EntityData>;
32
35
  toJSON(): EntityReference | EntityJson | null;
33
36
  $addTag(...tags: string[]): void;
@@ -39,6 +42,21 @@ export default class Entity<T extends EntityData = EntityData> implements Entity
39
42
  $getData(includeSData?: boolean): any;
40
43
  $getSData(): SerializedEntityData;
41
44
  $getOriginalAcValues(): ACProperties;
45
+ $getCurrentAcValues(): {
46
+ user: string | null;
47
+ group: string | null;
48
+ acUser: any;
49
+ acGroup: any;
50
+ acOther: any;
51
+ acRead: string[] | null;
52
+ acWrite: string[] | null;
53
+ acFull: string[] | null;
54
+ };
55
+ $getAcUid(): string | null;
56
+ $getAcGid(): string | null;
57
+ $getAcReadIds(): string[] | null;
58
+ $getAcWriteIds(): string[] | null;
59
+ $getAcFullIds(): string[] | null;
42
60
  $getValidatable(): any;
43
61
  $getTags(): string[];
44
62
  $hasTag(...tags: string[]): boolean;
@@ -48,7 +66,10 @@ export default class Entity<T extends EntityData = EntityData> implements Entity
48
66
  $jsonAcceptPatch(patch: EntityPatch, allowConflict?: boolean): void;
49
67
  $putData(data: EntityData, sdata?: SerializedEntityData): void;
50
68
  protected $referenceSleep(reference: EntityReference): void;
51
- protected $referenceWake(): boolean;
69
+ protected $check(): void;
70
+ $asleep(): boolean;
71
+ $wake(): Promise<Entity<T>>;
72
+ $wakeAll(level?: number): Promise<Entity<T>>;
52
73
  $refresh(): Promise<boolean | 0>;
53
74
  $removeTag(...tags: string[]): void;
54
75
  $save(): Promise<boolean>;