@xyo-network/module-model 2.47.0 → 2.47.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.
- package/dist/docs.json +1226 -617
- package/dist/types/model/Module.d.ts +4 -1
- package/dist/types/model/Module.d.ts.map +1 -1
- package/dist/types/model/ModuleDescription.d.ts +1 -1
- package/dist/types/model/ModuleDescription.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/model/Module.ts +7 -1
- package/src/model/ModuleDescription.ts +1 -1
|
@@ -5,16 +5,19 @@ import { ModuleFilter } from '../ModuleFilter';
|
|
|
5
5
|
import { ModuleQueryResult } from '../ModuleQueryResult';
|
|
6
6
|
import { XyoQueryBoundWitness } from '../Query';
|
|
7
7
|
export interface ModuleResolver<TModule extends Module = Module> {
|
|
8
|
+
addResolver?: (resolver: ModuleResolver<TModule>) => this;
|
|
8
9
|
isModuleResolver: boolean;
|
|
10
|
+
removeResolver?: (resolver: ModuleResolver<TModule>) => this;
|
|
9
11
|
resolve(filter?: ModuleFilter): Promisable<TModule[]>;
|
|
10
12
|
}
|
|
11
13
|
export interface Module<TConfig extends ModuleConfig = ModuleConfig> {
|
|
12
14
|
address: string;
|
|
13
15
|
config: TConfig;
|
|
16
|
+
parentResolver?: ModuleResolver;
|
|
14
17
|
queries: string[];
|
|
15
18
|
query: <T extends XyoQueryBoundWitness = XyoQueryBoundWitness, TConf extends ModuleConfig = ModuleConfig>(query: T, payloads?: XyoPayload[], queryConfig?: TConf) => Promisable<ModuleQueryResult>;
|
|
16
19
|
queryable: <T extends XyoQueryBoundWitness = XyoQueryBoundWitness, TConf extends ModuleConfig = ModuleConfig>(query: T, payloads?: XyoPayload[], queryConfig?: TConf) => Promisable<boolean>;
|
|
17
20
|
resolve: (filter?: ModuleFilter) => Promisable<Module[]>;
|
|
18
|
-
resolver
|
|
21
|
+
resolver: ModuleResolver;
|
|
19
22
|
}
|
|
20
23
|
//# sourceMappingURL=Module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Module.d.ts","sourceRoot":"","sources":["../../../src/model/Module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,MAAM,WAAW,cAAc,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IAC7D,gBAAgB,EAAE,OAAO,CAAA;IACzB,OAAO,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;CACtD;AAED,MAAM,WAAW,MAAM,CAAC,OAAO,SAAS,YAAY,GAAG,YAAY;IACjE,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Module.d.ts","sourceRoot":"","sources":["../../../src/model/Module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,MAAM,WAAW,cAAc,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IAC7D,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAA;IACzD,gBAAgB,EAAE,OAAO,CAAA;IACzB,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAA;IAC5D,OAAO,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;CACtD;AAED,MAAM,WAAW,MAAM,CAAC,OAAO,SAAS,YAAY,GAAG,YAAY;IACjE,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;IAGf,cAAc,CAAC,EAAE,cAAc,CAAA;IAE/B,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,KAAK,EAAE,CAAC,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,EAAE,KAAK,SAAS,YAAY,GAAG,YAAY,EACtG,KAAK,EAAE,CAAC,EACR,QAAQ,CAAC,EAAE,UAAU,EAAE,EACvB,WAAW,CAAC,EAAE,KAAK,KAChB,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAClC,SAAS,EAAE,CAAC,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,EAAE,KAAK,SAAS,YAAY,GAAG,YAAY,EAC1G,KAAK,EAAE,CAAC,EACR,QAAQ,CAAC,EAAE,UAAU,EAAE,EACvB,WAAW,CAAC,EAAE,KAAK,KAChB,UAAU,CAAC,OAAO,CAAC,CAAA;IAGxB,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,YAAY,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC,CAAA;IAGxD,QAAQ,EAAE,cAAc,CAAA;CACzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleDescription.d.ts","sourceRoot":"","sources":["../../../src/model/ModuleDescription.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"ModuleDescription.d.ts","sourceRoot":"","sources":["../../../src/model/ModuleDescription.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB"}
|
package/package.json
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xyo-network/boundwitness-model": "^2.47.
|
|
14
|
-
"@xyo-network/core": "^2.47.
|
|
15
|
-
"@xyo-network/payload-model": "^2.47.
|
|
16
|
-
"@xyo-network/promise": "^2.47.
|
|
13
|
+
"@xyo-network/boundwitness-model": "^2.47.1",
|
|
14
|
+
"@xyo-network/core": "^2.47.1",
|
|
15
|
+
"@xyo-network/payload-model": "^2.47.1",
|
|
16
|
+
"@xyo-network/promise": "^2.47.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@xylabs/ts-scripts-yarn3": "^2.14.15",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
55
55
|
"types": "dist/types/index.d.ts",
|
|
56
|
-
"version": "2.47.
|
|
56
|
+
"version": "2.47.1"
|
|
57
57
|
}
|
package/src/model/Module.ts
CHANGED
|
@@ -7,13 +7,19 @@ import { ModuleQueryResult } from '../ModuleQueryResult'
|
|
|
7
7
|
import { XyoQueryBoundWitness } from '../Query'
|
|
8
8
|
|
|
9
9
|
export interface ModuleResolver<TModule extends Module = Module> {
|
|
10
|
+
addResolver?: (resolver: ModuleResolver<TModule>) => this
|
|
10
11
|
isModuleResolver: boolean
|
|
12
|
+
removeResolver?: (resolver: ModuleResolver<TModule>) => this
|
|
11
13
|
resolve(filter?: ModuleFilter): Promisable<TModule[]>
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
export interface Module<TConfig extends ModuleConfig = ModuleConfig> {
|
|
15
17
|
address: string
|
|
16
18
|
config: TConfig
|
|
19
|
+
|
|
20
|
+
/* The resolver is a 'up' resolver. It can resolve the module or any (public) children/peers/parents of the parent module*/
|
|
21
|
+
parentResolver?: ModuleResolver
|
|
22
|
+
|
|
17
23
|
queries: string[]
|
|
18
24
|
query: <T extends XyoQueryBoundWitness = XyoQueryBoundWitness, TConf extends ModuleConfig = ModuleConfig>(
|
|
19
25
|
query: T,
|
|
@@ -30,5 +36,5 @@ export interface Module<TConfig extends ModuleConfig = ModuleConfig> {
|
|
|
30
36
|
resolve: (filter?: ModuleFilter) => Promisable<Module[]>
|
|
31
37
|
|
|
32
38
|
/* The resolver is a 'down' resolver. It can resolve the module or any children (if it is a node for example), that are in the module*/
|
|
33
|
-
resolver
|
|
39
|
+
resolver: ModuleResolver
|
|
34
40
|
}
|