@plurid/plurid-data 0.0.0-12 → 0.0.0-13

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.
@@ -1,10 +1,11 @@
1
1
  import { PluridPartialConfiguration } from "../../configuration";
2
2
  import { CompareType } from "../../compare";
3
3
  import { PluridRouteMultispace } from '../multispace';
4
+ export declare type PluridRouteResolver<C> = Omit<PluridRoute<C>, 'value' | 'resolver'>;
4
5
  /**
5
6
  * A route can be `plurid space` or `exterior`-based.
6
7
  */
7
- export interface PluridRoute<C> {
8
+ export interface PluridRoute<C, G = any> {
8
9
  /**
9
10
  * The route `value` can:
10
11
  * + be a simple string, e.g. `'/route/to/page'`;
@@ -36,6 +37,12 @@ export interface PluridRoute<C> {
36
37
  slotted?: boolean;
37
38
  multispace?: PluridRouteMultispace<C>;
38
39
  defaultConfiguration?: PluridPartialConfiguration;
40
+ /**
41
+ * Resolve the route at request time.
42
+ *
43
+ * Receives the `globals` from the preserve, if any.
44
+ */
45
+ resolver?: (globals: G | undefined) => PluridRouteResolver<C> | Promise<PluridRouteResolver<C>>;
39
46
  }
40
47
  export interface PluridRouteParameter {
41
48
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurid/plurid-data",
3
- "version": "0.0.0-12",
3
+ "version": "0.0.0-13",
4
4
  "description": "Plurid Constants, Interfaces, Enumerations",
5
5
  "keywords": [
6
6
  "plurid",