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

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 +231 -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
@@ -271,7 +271,7 @@ export interface EntityInterface extends DataObjectInterface {
271
271
  $useSkipAc(useSkipAc: boolean): void;
272
272
  }
273
273
 
274
- export type EntityConstructor = (new (guid?: string) => EntityInterface) & {
274
+ export type EntityConstructor = (new (...args: any[]) => EntityInterface) & {
275
275
  /**
276
276
  * The instance of Nymph to use for queries.
277
277
  */
@@ -288,6 +288,18 @@ export type EntityConstructor = (new (guid?: string) => EntityInterface) & {
288
288
  * requests.
289
289
  */
290
290
  class: string;
291
+ /**
292
+ * Whether this entity should publish changes to PubSub servers.
293
+ */
294
+ pubSubEnabled: boolean;
295
+ /**
296
+ * Whether this entity should be accessible on the frontend through the REST
297
+ * server.
298
+ *
299
+ * If this is false, any request from the client that attempts to use this
300
+ * entity will fail.
301
+ */
302
+ restEnabled: boolean;
291
303
  /**
292
304
  * Properties that will not be searchable from the frontend. If the frontend
293
305
  * includes any of these properties in any of their clauses, they will be