@routier/core 0.0.1-alpha.2 → 0.0.1

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 (36) hide show
  1. package/dist/assertions/index.d.ts +1 -1
  2. package/dist/assertions/index.js +7 -1
  3. package/dist/assertions/index.js.map +1 -1
  4. package/dist/codegen/handlers/SerializeHandlerBuilder.d.ts +2 -2
  5. package/dist/codegen/handlers/clone/CloneArrayHandler.d.ts +6 -0
  6. package/dist/codegen/handlers/deserialize/DeserializeDeserializerHandler.d.ts +6 -0
  7. package/dist/codegen/handlers/serialize/SerializeSerializerHandler.d.ts +6 -0
  8. package/dist/collections/ReadonlySchemaCollection.d.ts +17 -0
  9. package/dist/collections/SchemaCollection.d.ts +5 -3
  10. package/dist/collections/index.d.ts +1 -0
  11. package/dist/collections/index.js +67 -9
  12. package/dist/collections/index.js.map +1 -1
  13. package/dist/expressions/index.js +67 -23
  14. package/dist/expressions/index.js.map +1 -1
  15. package/dist/expressions/parser.d.ts +1 -1
  16. package/dist/index.js +598 -223
  17. package/dist/index.js.map +1 -1
  18. package/dist/plugins/index.js +58 -9
  19. package/dist/plugins/index.js.map +1 -1
  20. package/dist/plugins/translators/SqlTranslator.d.ts +2 -1
  21. package/dist/plugins/types.d.ts +2 -0
  22. package/dist/schema/communication/broadcast.d.ts +11 -0
  23. package/dist/schema/index.js +420 -182
  24. package/dist/schema/index.js.map +1 -1
  25. package/dist/schema/property/modifiers/SchemaSerialize.d.ts +1 -1
  26. package/dist/schema/testSchemas.test.d.ts +269 -0
  27. package/dist/schema/types.d.ts +7 -4
  28. package/dist/utilities/dbPluginEventUtils.d.ts +1 -1
  29. package/dist/utilities/functions.d.ts +1 -0
  30. package/dist/utilities/index.d.ts +1 -0
  31. package/dist/utilities/index.js +18 -1
  32. package/dist/utilities/index.js.map +1 -1
  33. package/dist/utilities/types.d.ts +3 -0
  34. package/package.json +3 -4
  35. package/readme.md +0 -6
  36. /package/dist/{pipeline/TrampolinePipeline.test.d.ts → schema/schemaGeneration.test.d.ts} +0 -0
@@ -5,10 +5,11 @@ export declare class SqlTranslator<TRoot extends {}, TShape> extends DataTransla
5
5
  min<TResult extends string | number | Date>(data: unknown, _: QueryOption<TShape, "min">): TResult;
6
6
  max<TResult extends string | number | Date>(data: unknown, _: QueryOption<TShape, "max">): TResult;
7
7
  sum<TResult extends number>(data: unknown, _: QueryOption<TShape, "sum">): TResult;
8
+ private shapeResult;
8
9
  distinct<TResult>(data: unknown, _: QueryOption<TShape, "distinct">): TResult;
9
10
  filter<TResult>(data: unknown, _: QueryOption<TShape, "filter">): TResult;
10
11
  skip(data: unknown, _: QueryOption<TShape, "skip">): TShape;
11
12
  take(data: unknown, _: QueryOption<TShape, "take">): TShape;
12
13
  sort(data: unknown, _: QueryOption<TShape, "sort">): TShape;
13
- map(data: unknown, _: QueryOption<TShape, "map">): TShape;
14
+ map(data: unknown, option: QueryOption<TShape, "map">): TShape;
14
15
  }
@@ -40,6 +40,8 @@ export type DbPluginEvent = {
40
40
  schemas: SchemaCollection;
41
41
  /** Unique id of the event. */
42
42
  id: string;
43
+ /** Source of the request */
44
+ source: "data-store" | "collection" | "view";
43
45
  };
44
46
  /**
45
47
  * Event for a specific plugin operation, extending the base event with an operation payload.
@@ -0,0 +1,11 @@
1
+ import { ISchemaSubscription, SchemaId, SubscriptionChanges } from "../types";
2
+ export declare class SchemaSubscription<T extends {}> implements ISchemaSubscription<T> {
3
+ private readonly id;
4
+ private readonly schemaId;
5
+ private readonly createdAt;
6
+ constructor(schemaId: SchemaId, signal?: AbortSignal);
7
+ send(changes: SubscriptionChanges<T>): void;
8
+ onMessage(callback: (changes: SubscriptionChanges<T>) => void): void;
9
+ dispose(): void;
10
+ [Symbol.dispose](): void;
11
+ }