@xyo-network/bridge-model 2.91.2 → 2.92.0-rc.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/browser/Bridge.d.cts +9 -79
- package/dist/browser/Bridge.d.cts.map +1 -1
- package/dist/browser/Bridge.d.mts +9 -79
- package/dist/browser/Bridge.d.mts.map +1 -1
- package/dist/browser/Bridge.d.ts +9 -79
- package/dist/browser/Bridge.d.ts.map +1 -1
- package/dist/browser/Queries/Connect.d.cts +2 -2
- package/dist/browser/Queries/Connect.d.cts.map +1 -1
- package/dist/browser/Queries/Connect.d.mts +2 -2
- package/dist/browser/Queries/Connect.d.mts.map +1 -1
- package/dist/browser/Queries/Connect.d.ts +2 -2
- package/dist/browser/Queries/Connect.d.ts.map +1 -1
- package/dist/browser/Queries/Expose.d.cts +15 -0
- package/dist/browser/Queries/Expose.d.cts.map +1 -0
- package/dist/browser/Queries/Expose.d.mts +15 -0
- package/dist/browser/Queries/Expose.d.mts.map +1 -0
- package/dist/browser/Queries/Expose.d.ts +15 -0
- package/dist/browser/Queries/Expose.d.ts.map +1 -0
- package/dist/browser/Queries/Unexpose.d.cts +8 -0
- package/dist/browser/Queries/Unexpose.d.cts.map +1 -0
- package/dist/browser/Queries/Unexpose.d.mts +8 -0
- package/dist/browser/Queries/Unexpose.d.mts.map +1 -0
- package/dist/browser/Queries/Unexpose.d.ts +8 -0
- package/dist/browser/Queries/Unexpose.d.ts.map +1 -0
- package/dist/browser/Queries/index.d.cts +5 -1
- package/dist/browser/Queries/index.d.cts.map +1 -1
- package/dist/browser/Queries/index.d.mts +5 -1
- package/dist/browser/Queries/index.d.mts.map +1 -1
- package/dist/browser/Queries/index.d.ts +5 -1
- package/dist/browser/Queries/index.d.ts.map +1 -1
- package/dist/browser/index.cjs +11 -2
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +11 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/typeChecks.d.cts.map +1 -1
- package/dist/browser/typeChecks.d.mts.map +1 -1
- package/dist/browser/typeChecks.d.ts.map +1 -1
- package/dist/node/Bridge.d.cts +9 -79
- package/dist/node/Bridge.d.cts.map +1 -1
- package/dist/node/Bridge.d.mts +9 -79
- package/dist/node/Bridge.d.mts.map +1 -1
- package/dist/node/Bridge.d.ts +9 -79
- package/dist/node/Bridge.d.ts.map +1 -1
- package/dist/node/Queries/Connect.d.cts +2 -2
- package/dist/node/Queries/Connect.d.cts.map +1 -1
- package/dist/node/Queries/Connect.d.mts +2 -2
- package/dist/node/Queries/Connect.d.mts.map +1 -1
- package/dist/node/Queries/Connect.d.ts +2 -2
- package/dist/node/Queries/Connect.d.ts.map +1 -1
- package/dist/node/Queries/Expose.d.cts +15 -0
- package/dist/node/Queries/Expose.d.cts.map +1 -0
- package/dist/node/Queries/Expose.d.mts +15 -0
- package/dist/node/Queries/Expose.d.mts.map +1 -0
- package/dist/node/Queries/Expose.d.ts +15 -0
- package/dist/node/Queries/Expose.d.ts.map +1 -0
- package/dist/node/Queries/Unexpose.d.cts +8 -0
- package/dist/node/Queries/Unexpose.d.cts.map +1 -0
- package/dist/node/Queries/Unexpose.d.mts +8 -0
- package/dist/node/Queries/Unexpose.d.mts.map +1 -0
- package/dist/node/Queries/Unexpose.d.ts +8 -0
- package/dist/node/Queries/Unexpose.d.ts.map +1 -0
- package/dist/node/Queries/index.d.cts +5 -1
- package/dist/node/Queries/index.d.cts.map +1 -1
- package/dist/node/Queries/index.d.mts +5 -1
- package/dist/node/Queries/index.d.mts.map +1 -1
- package/dist/node/Queries/index.d.ts +5 -1
- package/dist/node/Queries/index.d.ts.map +1 -1
- package/dist/node/index.cjs +14 -2
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +11 -2
- package/dist/node/index.js.map +1 -1
- package/dist/node/typeChecks.d.cts.map +1 -1
- package/dist/node/typeChecks.d.mts.map +1 -1
- package/dist/node/typeChecks.d.ts.map +1 -1
- package/package.json +5 -6
- package/src/Bridge.ts +9 -101
- package/src/Queries/Connect.ts +2 -2
- package/src/Queries/Expose.ts +17 -0
- package/src/Queries/Unexpose.ts +10 -0
- package/src/Queries/index.ts +5 -1
- package/src/typeChecks.ts +1 -2
|
@@ -1,89 +1,19 @@
|
|
|
1
1
|
import { Address } from '@xylabs/hex';
|
|
2
2
|
import { Promisable } from '@xylabs/promise';
|
|
3
|
-
import {
|
|
4
|
-
import { ModuleManifestPayload } from '@xyo-network/manifest-model';
|
|
5
|
-
import { AnyConfigSchema, ModuleConfig, ModuleEventData, ModuleFilter, ModuleFilterOptions, ModuleInstance, ModuleParams, ModuleQueryResult, ModuleResolverInstance } from '@xyo-network/module-model';
|
|
6
|
-
import { Payload, Query } from '@xyo-network/payload-model';
|
|
3
|
+
import { AnyConfigSchema, Module, ModuleEventData, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model';
|
|
7
4
|
import { BridgeConfig } from './Config';
|
|
5
|
+
import { BridgeExposeOptions, BridgeUnexposeOptions } from './Queries';
|
|
8
6
|
export interface Bridge {
|
|
9
|
-
connect
|
|
10
|
-
connected
|
|
11
|
-
disconnect
|
|
7
|
+
connect?: () => Promisable<boolean>;
|
|
8
|
+
connected?: boolean;
|
|
9
|
+
disconnect?: () => Promisable<boolean>;
|
|
10
|
+
expose: (id: ModuleIdentifier, options?: BridgeExposeOptions) => Promisable<Address[]>;
|
|
11
|
+
unexpose?: (id: ModuleIdentifier, options?: BridgeUnexposeOptions) => Promisable<Address[]>;
|
|
12
12
|
}
|
|
13
13
|
export interface BridgeParams<TConfig extends AnyConfigSchema<BridgeConfig> = AnyConfigSchema<BridgeConfig>> extends ModuleParams<TConfig>, ModuleParams<TConfig> {
|
|
14
14
|
}
|
|
15
|
-
export interface BridgeModule<TParams extends BridgeParams = BridgeParams, TEventData extends ModuleEventData = ModuleEventData> extends
|
|
16
|
-
/**
|
|
17
|
-
* Returns the address of the base module that the bridge is connected to. Since discovery can be
|
|
18
|
-
* a recursive process, the root module is the module that the bridge is directly connected to even
|
|
19
|
-
* though its children (through potentially several generations) are also able to be communicated to
|
|
20
|
-
* across the bridge.
|
|
21
|
-
*/
|
|
22
|
-
getRootAddress(): Promisable<Address>;
|
|
23
|
-
/**
|
|
24
|
-
* Returns the config for a bridged module
|
|
25
|
-
* @param address Address of the module connected to the bridge
|
|
26
|
-
*/
|
|
27
|
-
targetConfig(address: Address): ModuleConfig;
|
|
28
|
-
/**
|
|
29
|
-
* Returns the result of a discover query for a bridged module
|
|
30
|
-
* @param address Address of the module connected to the bridge
|
|
31
|
-
* @param maxDepth
|
|
32
|
-
*/
|
|
33
|
-
targetDiscover(address?: string, maxDepth?: number): Promisable<Payload[]>;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @param address Address of the module connected to the bridge
|
|
37
|
-
*/
|
|
38
|
-
targetDownResolver(address?: string): ModuleResolverInstance | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* Returns the result of a manifest query for a bridged module
|
|
41
|
-
* @param address Address of the module connected to the bridge
|
|
42
|
-
* @param maxDepth
|
|
43
|
-
*/
|
|
44
|
-
targetManifest(address?: string, maxDepth?: number): Promisable<ModuleManifestPayload>;
|
|
45
|
-
/**
|
|
46
|
-
* Returns the supported queries for a bridged module
|
|
47
|
-
* @param address Address of the module connected to the bridge
|
|
48
|
-
*/
|
|
49
|
-
targetQueries(address: Address): string[];
|
|
50
|
-
/**
|
|
51
|
-
* Queries a module connected to the bridge using the supplied query, payloads, and query configuration
|
|
52
|
-
* @param address Address of the module connected to the bridge
|
|
53
|
-
* @param query The query to issue against the address
|
|
54
|
-
* @param payloads The payloads to use in the query
|
|
55
|
-
*/
|
|
56
|
-
targetQuery(address: Address, query: Query, payloads?: Payload[]): Promisable<ModuleQueryResult>;
|
|
57
|
-
/**
|
|
58
|
-
* Determines if a bridged module is queryable using the supplied query, payloads, and query configuration
|
|
59
|
-
* @param address Address of the module connected to the bridge
|
|
60
|
-
* @param query The query to issue against the address
|
|
61
|
-
* @param payloads The payloads to use in the query
|
|
62
|
-
* @param queryConfig The query configuration
|
|
63
|
-
*/
|
|
64
|
-
targetQueryable(address: Address, query: QueryBoundWitness, payloads?: Payload[], queryConfig?: ModuleConfig): Promisable<boolean>;
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
* @param address Address of the module potentially connected to the bridge
|
|
68
|
-
* @param filter
|
|
69
|
-
* @param options
|
|
70
|
-
*/
|
|
71
|
-
targetResolve(address: Address, filter?: ModuleFilter, options?: ModuleFilterOptions): Promisable<ModuleInstance[]>;
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
* @param address Address of the module potentially connected to the bridge
|
|
75
|
-
* @param nameOrAddress
|
|
76
|
-
* @param options
|
|
77
|
-
*/
|
|
78
|
-
targetResolve(address: Address, nameOrAddress: string, options?: ModuleFilterOptions): Promisable<ModuleInstance | undefined>;
|
|
79
|
-
/**
|
|
80
|
-
*
|
|
81
|
-
* @param address Address of the module potentially connected to the bridge
|
|
82
|
-
* @param nameOrAddressOrFilter
|
|
83
|
-
* @param options
|
|
84
|
-
*/
|
|
85
|
-
targetResolve(address: Address, nameOrAddressOrFilter?: ModuleFilter | string, options?: ModuleFilterOptions): Promisable<ModuleInstance | ModuleInstance[] | undefined>;
|
|
15
|
+
export interface BridgeModule<TParams extends BridgeParams = BridgeParams, TEventData extends ModuleEventData = ModuleEventData> extends Module<TParams, TEventData> {
|
|
86
16
|
}
|
|
87
|
-
export interface BridgeInstance<TParams extends BridgeParams = BridgeParams, TEventData extends ModuleEventData = ModuleEventData> extends BridgeModule<TParams, TEventData>, Bridge {
|
|
17
|
+
export interface BridgeInstance<TParams extends BridgeParams = BridgeParams, TEventData extends ModuleEventData = ModuleEventData> extends BridgeModule<TParams, TEventData>, ModuleInstance<TParams, TEventData>, Bridge {
|
|
88
18
|
}
|
|
89
19
|
//# sourceMappingURL=Bridge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bridge.d.ts","sourceRoot":"","sources":["../../src/Bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Bridge.d.ts","sourceRoot":"","sources":["../../src/Bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAEpI,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEtE,MAAM,WAAW,MAAM;IACrB,OAAO,CAAC,EAAE,MAAM,UAAU,CAAC,OAAO,CAAC,CAAA;IACnC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,UAAU,CAAC,OAAO,CAAC,CAAA;IACtC,MAAM,EAAE,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;IACtF,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;CAC5F;AAED,MAAM,WAAW,YAAY,CAAC,OAAO,SAAS,eAAe,CAAC,YAAY,CAAC,GAAG,eAAe,CAAC,YAAY,CAAC,CACzG,SAAQ,YAAY,CAAC,OAAO,CAAC,EAC3B,YAAY,CAAC,OAAO,CAAC;CAAG;AAE5B,MAAM,WAAW,YAAY,CAAC,OAAO,SAAS,YAAY,GAAG,YAAY,EAAE,UAAU,SAAS,eAAe,GAAG,eAAe,CAC7H,SAAQ,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC;CAAG;AAExC,MAAM,WAAW,cAAc,CAAC,OAAO,SAAS,YAAY,GAAG,YAAY,EAAE,UAAU,SAAS,eAAe,GAAG,eAAe,CAC/H,SAAQ,YAAY,CAAC,OAAO,EAAE,UAAU,CAAC,EACvC,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,EACnC,MAAM;CAAG"}
|
|
@@ -1,89 +1,19 @@
|
|
|
1
1
|
import { Address } from '@xylabs/hex';
|
|
2
2
|
import { Promisable } from '@xylabs/promise';
|
|
3
|
-
import {
|
|
4
|
-
import { ModuleManifestPayload } from '@xyo-network/manifest-model';
|
|
5
|
-
import { AnyConfigSchema, ModuleConfig, ModuleEventData, ModuleFilter, ModuleFilterOptions, ModuleInstance, ModuleParams, ModuleQueryResult, ModuleResolverInstance } from '@xyo-network/module-model';
|
|
6
|
-
import { Payload, Query } from '@xyo-network/payload-model';
|
|
3
|
+
import { AnyConfigSchema, Module, ModuleEventData, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model';
|
|
7
4
|
import { BridgeConfig } from './Config';
|
|
5
|
+
import { BridgeExposeOptions, BridgeUnexposeOptions } from './Queries';
|
|
8
6
|
export interface Bridge {
|
|
9
|
-
connect
|
|
10
|
-
connected
|
|
11
|
-
disconnect
|
|
7
|
+
connect?: () => Promisable<boolean>;
|
|
8
|
+
connected?: boolean;
|
|
9
|
+
disconnect?: () => Promisable<boolean>;
|
|
10
|
+
expose: (id: ModuleIdentifier, options?: BridgeExposeOptions) => Promisable<Address[]>;
|
|
11
|
+
unexpose?: (id: ModuleIdentifier, options?: BridgeUnexposeOptions) => Promisable<Address[]>;
|
|
12
12
|
}
|
|
13
13
|
export interface BridgeParams<TConfig extends AnyConfigSchema<BridgeConfig> = AnyConfigSchema<BridgeConfig>> extends ModuleParams<TConfig>, ModuleParams<TConfig> {
|
|
14
14
|
}
|
|
15
|
-
export interface BridgeModule<TParams extends BridgeParams = BridgeParams, TEventData extends ModuleEventData = ModuleEventData> extends
|
|
16
|
-
/**
|
|
17
|
-
* Returns the address of the base module that the bridge is connected to. Since discovery can be
|
|
18
|
-
* a recursive process, the root module is the module that the bridge is directly connected to even
|
|
19
|
-
* though its children (through potentially several generations) are also able to be communicated to
|
|
20
|
-
* across the bridge.
|
|
21
|
-
*/
|
|
22
|
-
getRootAddress(): Promisable<Address>;
|
|
23
|
-
/**
|
|
24
|
-
* Returns the config for a bridged module
|
|
25
|
-
* @param address Address of the module connected to the bridge
|
|
26
|
-
*/
|
|
27
|
-
targetConfig(address: Address): ModuleConfig;
|
|
28
|
-
/**
|
|
29
|
-
* Returns the result of a discover query for a bridged module
|
|
30
|
-
* @param address Address of the module connected to the bridge
|
|
31
|
-
* @param maxDepth
|
|
32
|
-
*/
|
|
33
|
-
targetDiscover(address?: string, maxDepth?: number): Promisable<Payload[]>;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @param address Address of the module connected to the bridge
|
|
37
|
-
*/
|
|
38
|
-
targetDownResolver(address?: string): ModuleResolverInstance | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* Returns the result of a manifest query for a bridged module
|
|
41
|
-
* @param address Address of the module connected to the bridge
|
|
42
|
-
* @param maxDepth
|
|
43
|
-
*/
|
|
44
|
-
targetManifest(address?: string, maxDepth?: number): Promisable<ModuleManifestPayload>;
|
|
45
|
-
/**
|
|
46
|
-
* Returns the supported queries for a bridged module
|
|
47
|
-
* @param address Address of the module connected to the bridge
|
|
48
|
-
*/
|
|
49
|
-
targetQueries(address: Address): string[];
|
|
50
|
-
/**
|
|
51
|
-
* Queries a module connected to the bridge using the supplied query, payloads, and query configuration
|
|
52
|
-
* @param address Address of the module connected to the bridge
|
|
53
|
-
* @param query The query to issue against the address
|
|
54
|
-
* @param payloads The payloads to use in the query
|
|
55
|
-
*/
|
|
56
|
-
targetQuery(address: Address, query: Query, payloads?: Payload[]): Promisable<ModuleQueryResult>;
|
|
57
|
-
/**
|
|
58
|
-
* Determines if a bridged module is queryable using the supplied query, payloads, and query configuration
|
|
59
|
-
* @param address Address of the module connected to the bridge
|
|
60
|
-
* @param query The query to issue against the address
|
|
61
|
-
* @param payloads The payloads to use in the query
|
|
62
|
-
* @param queryConfig The query configuration
|
|
63
|
-
*/
|
|
64
|
-
targetQueryable(address: Address, query: QueryBoundWitness, payloads?: Payload[], queryConfig?: ModuleConfig): Promisable<boolean>;
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
* @param address Address of the module potentially connected to the bridge
|
|
68
|
-
* @param filter
|
|
69
|
-
* @param options
|
|
70
|
-
*/
|
|
71
|
-
targetResolve(address: Address, filter?: ModuleFilter, options?: ModuleFilterOptions): Promisable<ModuleInstance[]>;
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
* @param address Address of the module potentially connected to the bridge
|
|
75
|
-
* @param nameOrAddress
|
|
76
|
-
* @param options
|
|
77
|
-
*/
|
|
78
|
-
targetResolve(address: Address, nameOrAddress: string, options?: ModuleFilterOptions): Promisable<ModuleInstance | undefined>;
|
|
79
|
-
/**
|
|
80
|
-
*
|
|
81
|
-
* @param address Address of the module potentially connected to the bridge
|
|
82
|
-
* @param nameOrAddressOrFilter
|
|
83
|
-
* @param options
|
|
84
|
-
*/
|
|
85
|
-
targetResolve(address: Address, nameOrAddressOrFilter?: ModuleFilter | string, options?: ModuleFilterOptions): Promisable<ModuleInstance | ModuleInstance[] | undefined>;
|
|
15
|
+
export interface BridgeModule<TParams extends BridgeParams = BridgeParams, TEventData extends ModuleEventData = ModuleEventData> extends Module<TParams, TEventData> {
|
|
86
16
|
}
|
|
87
|
-
export interface BridgeInstance<TParams extends BridgeParams = BridgeParams, TEventData extends ModuleEventData = ModuleEventData> extends BridgeModule<TParams, TEventData>, Bridge {
|
|
17
|
+
export interface BridgeInstance<TParams extends BridgeParams = BridgeParams, TEventData extends ModuleEventData = ModuleEventData> extends BridgeModule<TParams, TEventData>, ModuleInstance<TParams, TEventData>, Bridge {
|
|
88
18
|
}
|
|
89
19
|
//# sourceMappingURL=Bridge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bridge.d.ts","sourceRoot":"","sources":["../../src/Bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Bridge.d.ts","sourceRoot":"","sources":["../../src/Bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAEpI,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEtE,MAAM,WAAW,MAAM;IACrB,OAAO,CAAC,EAAE,MAAM,UAAU,CAAC,OAAO,CAAC,CAAA;IACnC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,UAAU,CAAC,OAAO,CAAC,CAAA;IACtC,MAAM,EAAE,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;IACtF,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;CAC5F;AAED,MAAM,WAAW,YAAY,CAAC,OAAO,SAAS,eAAe,CAAC,YAAY,CAAC,GAAG,eAAe,CAAC,YAAY,CAAC,CACzG,SAAQ,YAAY,CAAC,OAAO,CAAC,EAC3B,YAAY,CAAC,OAAO,CAAC;CAAG;AAE5B,MAAM,WAAW,YAAY,CAAC,OAAO,SAAS,YAAY,GAAG,YAAY,EAAE,UAAU,SAAS,eAAe,GAAG,eAAe,CAC7H,SAAQ,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC;CAAG;AAExC,MAAM,WAAW,cAAc,CAAC,OAAO,SAAS,YAAY,GAAG,YAAY,EAAE,UAAU,SAAS,eAAe,GAAG,eAAe,CAC/H,SAAQ,YAAY,CAAC,OAAO,EAAE,UAAU,CAAC,EACvC,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,EACnC,MAAM;CAAG"}
|
package/dist/browser/Bridge.d.ts
CHANGED
|
@@ -1,89 +1,19 @@
|
|
|
1
1
|
import { Address } from '@xylabs/hex';
|
|
2
2
|
import { Promisable } from '@xylabs/promise';
|
|
3
|
-
import {
|
|
4
|
-
import { ModuleManifestPayload } from '@xyo-network/manifest-model';
|
|
5
|
-
import { AnyConfigSchema, ModuleConfig, ModuleEventData, ModuleFilter, ModuleFilterOptions, ModuleInstance, ModuleParams, ModuleQueryResult, ModuleResolverInstance } from '@xyo-network/module-model';
|
|
6
|
-
import { Payload, Query } from '@xyo-network/payload-model';
|
|
3
|
+
import { AnyConfigSchema, Module, ModuleEventData, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model';
|
|
7
4
|
import { BridgeConfig } from './Config';
|
|
5
|
+
import { BridgeExposeOptions, BridgeUnexposeOptions } from './Queries';
|
|
8
6
|
export interface Bridge {
|
|
9
|
-
connect
|
|
10
|
-
connected
|
|
11
|
-
disconnect
|
|
7
|
+
connect?: () => Promisable<boolean>;
|
|
8
|
+
connected?: boolean;
|
|
9
|
+
disconnect?: () => Promisable<boolean>;
|
|
10
|
+
expose: (id: ModuleIdentifier, options?: BridgeExposeOptions) => Promisable<Address[]>;
|
|
11
|
+
unexpose?: (id: ModuleIdentifier, options?: BridgeUnexposeOptions) => Promisable<Address[]>;
|
|
12
12
|
}
|
|
13
13
|
export interface BridgeParams<TConfig extends AnyConfigSchema<BridgeConfig> = AnyConfigSchema<BridgeConfig>> extends ModuleParams<TConfig>, ModuleParams<TConfig> {
|
|
14
14
|
}
|
|
15
|
-
export interface BridgeModule<TParams extends BridgeParams = BridgeParams, TEventData extends ModuleEventData = ModuleEventData> extends
|
|
16
|
-
/**
|
|
17
|
-
* Returns the address of the base module that the bridge is connected to. Since discovery can be
|
|
18
|
-
* a recursive process, the root module is the module that the bridge is directly connected to even
|
|
19
|
-
* though its children (through potentially several generations) are also able to be communicated to
|
|
20
|
-
* across the bridge.
|
|
21
|
-
*/
|
|
22
|
-
getRootAddress(): Promisable<Address>;
|
|
23
|
-
/**
|
|
24
|
-
* Returns the config for a bridged module
|
|
25
|
-
* @param address Address of the module connected to the bridge
|
|
26
|
-
*/
|
|
27
|
-
targetConfig(address: Address): ModuleConfig;
|
|
28
|
-
/**
|
|
29
|
-
* Returns the result of a discover query for a bridged module
|
|
30
|
-
* @param address Address of the module connected to the bridge
|
|
31
|
-
* @param maxDepth
|
|
32
|
-
*/
|
|
33
|
-
targetDiscover(address?: string, maxDepth?: number): Promisable<Payload[]>;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @param address Address of the module connected to the bridge
|
|
37
|
-
*/
|
|
38
|
-
targetDownResolver(address?: string): ModuleResolverInstance | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* Returns the result of a manifest query for a bridged module
|
|
41
|
-
* @param address Address of the module connected to the bridge
|
|
42
|
-
* @param maxDepth
|
|
43
|
-
*/
|
|
44
|
-
targetManifest(address?: string, maxDepth?: number): Promisable<ModuleManifestPayload>;
|
|
45
|
-
/**
|
|
46
|
-
* Returns the supported queries for a bridged module
|
|
47
|
-
* @param address Address of the module connected to the bridge
|
|
48
|
-
*/
|
|
49
|
-
targetQueries(address: Address): string[];
|
|
50
|
-
/**
|
|
51
|
-
* Queries a module connected to the bridge using the supplied query, payloads, and query configuration
|
|
52
|
-
* @param address Address of the module connected to the bridge
|
|
53
|
-
* @param query The query to issue against the address
|
|
54
|
-
* @param payloads The payloads to use in the query
|
|
55
|
-
*/
|
|
56
|
-
targetQuery(address: Address, query: Query, payloads?: Payload[]): Promisable<ModuleQueryResult>;
|
|
57
|
-
/**
|
|
58
|
-
* Determines if a bridged module is queryable using the supplied query, payloads, and query configuration
|
|
59
|
-
* @param address Address of the module connected to the bridge
|
|
60
|
-
* @param query The query to issue against the address
|
|
61
|
-
* @param payloads The payloads to use in the query
|
|
62
|
-
* @param queryConfig The query configuration
|
|
63
|
-
*/
|
|
64
|
-
targetQueryable(address: Address, query: QueryBoundWitness, payloads?: Payload[], queryConfig?: ModuleConfig): Promisable<boolean>;
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
* @param address Address of the module potentially connected to the bridge
|
|
68
|
-
* @param filter
|
|
69
|
-
* @param options
|
|
70
|
-
*/
|
|
71
|
-
targetResolve(address: Address, filter?: ModuleFilter, options?: ModuleFilterOptions): Promisable<ModuleInstance[]>;
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
* @param address Address of the module potentially connected to the bridge
|
|
75
|
-
* @param nameOrAddress
|
|
76
|
-
* @param options
|
|
77
|
-
*/
|
|
78
|
-
targetResolve(address: Address, nameOrAddress: string, options?: ModuleFilterOptions): Promisable<ModuleInstance | undefined>;
|
|
79
|
-
/**
|
|
80
|
-
*
|
|
81
|
-
* @param address Address of the module potentially connected to the bridge
|
|
82
|
-
* @param nameOrAddressOrFilter
|
|
83
|
-
* @param options
|
|
84
|
-
*/
|
|
85
|
-
targetResolve(address: Address, nameOrAddressOrFilter?: ModuleFilter | string, options?: ModuleFilterOptions): Promisable<ModuleInstance | ModuleInstance[] | undefined>;
|
|
15
|
+
export interface BridgeModule<TParams extends BridgeParams = BridgeParams, TEventData extends ModuleEventData = ModuleEventData> extends Module<TParams, TEventData> {
|
|
86
16
|
}
|
|
87
|
-
export interface BridgeInstance<TParams extends BridgeParams = BridgeParams, TEventData extends ModuleEventData = ModuleEventData> extends BridgeModule<TParams, TEventData>, Bridge {
|
|
17
|
+
export interface BridgeInstance<TParams extends BridgeParams = BridgeParams, TEventData extends ModuleEventData = ModuleEventData> extends BridgeModule<TParams, TEventData>, ModuleInstance<TParams, TEventData>, Bridge {
|
|
88
18
|
}
|
|
89
19
|
//# sourceMappingURL=Bridge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bridge.d.ts","sourceRoot":"","sources":["../../src/Bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Bridge.d.ts","sourceRoot":"","sources":["../../src/Bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAEpI,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEtE,MAAM,WAAW,MAAM;IACrB,OAAO,CAAC,EAAE,MAAM,UAAU,CAAC,OAAO,CAAC,CAAA;IACnC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,UAAU,CAAC,OAAO,CAAC,CAAA;IACtC,MAAM,EAAE,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;IACtF,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;CAC5F;AAED,MAAM,WAAW,YAAY,CAAC,OAAO,SAAS,eAAe,CAAC,YAAY,CAAC,GAAG,eAAe,CAAC,YAAY,CAAC,CACzG,SAAQ,YAAY,CAAC,OAAO,CAAC,EAC3B,YAAY,CAAC,OAAO,CAAC;CAAG;AAE5B,MAAM,WAAW,YAAY,CAAC,OAAO,SAAS,YAAY,GAAG,YAAY,EAAE,UAAU,SAAS,eAAe,GAAG,eAAe,CAC7H,SAAQ,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC;CAAG;AAExC,MAAM,WAAW,cAAc,CAAC,OAAO,SAAS,YAAY,GAAG,YAAY,EAAE,UAAU,SAAS,eAAe,GAAG,eAAe,CAC/H,SAAQ,YAAY,CAAC,OAAO,EAAE,UAAU,CAAC,EACvC,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,EACnC,MAAM;CAAG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Query } from '@xyo-network/payload-model';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export declare const BridgeConnectQuerySchema = "network.xyo.query.bridge.connect";
|
|
3
|
+
export type BridgeConnectQuerySchema = typeof BridgeConnectQuerySchema;
|
|
4
4
|
export type BridgeConnectQuery = Query<{
|
|
5
5
|
schema: BridgeConnectQuerySchema;
|
|
6
6
|
uri?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Connect.d.ts","sourceRoot":"","sources":["../../../src/Queries/Connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,
|
|
1
|
+
{"version":3,"file":"Connect.d.ts","sourceRoot":"","sources":["../../../src/Queries/Connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,eAAO,MAAM,wBAAwB,qCAAqC,CAAA;AAC1E,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAA;AAEtE,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC;IACrC,MAAM,EAAE,wBAAwB,CAAA;IAChC,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Query } from '@xyo-network/payload-model';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export declare const BridgeConnectQuerySchema = "network.xyo.query.bridge.connect";
|
|
3
|
+
export type BridgeConnectQuerySchema = typeof BridgeConnectQuerySchema;
|
|
4
4
|
export type BridgeConnectQuery = Query<{
|
|
5
5
|
schema: BridgeConnectQuerySchema;
|
|
6
6
|
uri?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Connect.d.ts","sourceRoot":"","sources":["../../../src/Queries/Connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,
|
|
1
|
+
{"version":3,"file":"Connect.d.ts","sourceRoot":"","sources":["../../../src/Queries/Connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,eAAO,MAAM,wBAAwB,qCAAqC,CAAA;AAC1E,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAA;AAEtE,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC;IACrC,MAAM,EAAE,wBAAwB,CAAA;IAChC,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Query } from '@xyo-network/payload-model';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export declare const BridgeConnectQuerySchema = "network.xyo.query.bridge.connect";
|
|
3
|
+
export type BridgeConnectQuerySchema = typeof BridgeConnectQuerySchema;
|
|
4
4
|
export type BridgeConnectQuery = Query<{
|
|
5
5
|
schema: BridgeConnectQuerySchema;
|
|
6
6
|
uri?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Connect.d.ts","sourceRoot":"","sources":["../../../src/Queries/Connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,
|
|
1
|
+
{"version":3,"file":"Connect.d.ts","sourceRoot":"","sources":["../../../src/Queries/Connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,eAAO,MAAM,wBAAwB,qCAAqC,CAAA;AAC1E,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAA;AAEtE,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC;IACrC,MAAM,EAAE,wBAAwB,CAAA;IAChC,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Direction, ModuleIdentifier } from '@xyo-network/module-model';
|
|
2
|
+
import { Payload, Query } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const BridgeExposeQuerySchema = "network.xyo.query.bridge.expose";
|
|
4
|
+
export type BridgeExposeQuerySchema = typeof BridgeExposeQuerySchema;
|
|
5
|
+
export interface BridgeExposeOptions {
|
|
6
|
+
direction?: Direction;
|
|
7
|
+
maxDepth?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const ModuleFilterPayloadSchema = "network.xyo.module.filter";
|
|
10
|
+
export type ModuleFilterPayloadSchema = typeof ModuleFilterPayloadSchema;
|
|
11
|
+
export type ModuleFilterPayload = Payload<{
|
|
12
|
+
id: ModuleIdentifier;
|
|
13
|
+
} & BridgeExposeOptions, ModuleFilterPayloadSchema>;
|
|
14
|
+
export type BridgeExposeQuery = Query<void, BridgeExposeQuerySchema>;
|
|
15
|
+
//# sourceMappingURL=Expose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Expose.d.ts","sourceRoot":"","sources":["../../../src/Queries/Expose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAE3D,eAAO,MAAM,uBAAuB,oCAAoC,CAAA;AACxE,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAA;AAEpE,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,yBAAyB,8BAA8B,CAAA;AACpE,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,gBAAgB,CAAA;CAAE,GAAG,mBAAmB,EAAE,yBAAyB,CAAC,CAAA;AAEpH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Direction, ModuleIdentifier } from '@xyo-network/module-model';
|
|
2
|
+
import { Payload, Query } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const BridgeExposeQuerySchema = "network.xyo.query.bridge.expose";
|
|
4
|
+
export type BridgeExposeQuerySchema = typeof BridgeExposeQuerySchema;
|
|
5
|
+
export interface BridgeExposeOptions {
|
|
6
|
+
direction?: Direction;
|
|
7
|
+
maxDepth?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const ModuleFilterPayloadSchema = "network.xyo.module.filter";
|
|
10
|
+
export type ModuleFilterPayloadSchema = typeof ModuleFilterPayloadSchema;
|
|
11
|
+
export type ModuleFilterPayload = Payload<{
|
|
12
|
+
id: ModuleIdentifier;
|
|
13
|
+
} & BridgeExposeOptions, ModuleFilterPayloadSchema>;
|
|
14
|
+
export type BridgeExposeQuery = Query<void, BridgeExposeQuerySchema>;
|
|
15
|
+
//# sourceMappingURL=Expose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Expose.d.ts","sourceRoot":"","sources":["../../../src/Queries/Expose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAE3D,eAAO,MAAM,uBAAuB,oCAAoC,CAAA;AACxE,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAA;AAEpE,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,yBAAyB,8BAA8B,CAAA;AACpE,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,gBAAgB,CAAA;CAAE,GAAG,mBAAmB,EAAE,yBAAyB,CAAC,CAAA;AAEpH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Direction, ModuleIdentifier } from '@xyo-network/module-model';
|
|
2
|
+
import { Payload, Query } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const BridgeExposeQuerySchema = "network.xyo.query.bridge.expose";
|
|
4
|
+
export type BridgeExposeQuerySchema = typeof BridgeExposeQuerySchema;
|
|
5
|
+
export interface BridgeExposeOptions {
|
|
6
|
+
direction?: Direction;
|
|
7
|
+
maxDepth?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const ModuleFilterPayloadSchema = "network.xyo.module.filter";
|
|
10
|
+
export type ModuleFilterPayloadSchema = typeof ModuleFilterPayloadSchema;
|
|
11
|
+
export type ModuleFilterPayload = Payload<{
|
|
12
|
+
id: ModuleIdentifier;
|
|
13
|
+
} & BridgeExposeOptions, ModuleFilterPayloadSchema>;
|
|
14
|
+
export type BridgeExposeQuery = Query<void, BridgeExposeQuerySchema>;
|
|
15
|
+
//# sourceMappingURL=Expose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Expose.d.ts","sourceRoot":"","sources":["../../../src/Queries/Expose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAE3D,eAAO,MAAM,uBAAuB,oCAAoC,CAAA;AACxE,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAA;AAEpE,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,yBAAyB,8BAA8B,CAAA;AACpE,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,gBAAgB,CAAA;CAAE,GAAG,mBAAmB,EAAE,yBAAyB,CAAC,CAAA;AAEpH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Query } from '@xyo-network/payload-model';
|
|
2
|
+
import { BridgeExposeOptions } from './Expose';
|
|
3
|
+
export declare const BridgeUnexposeQuerySchema = "network.xyo.query.bridge.unexpose";
|
|
4
|
+
export type BridgeUnexposeQuerySchema = typeof BridgeUnexposeQuerySchema;
|
|
5
|
+
export interface BridgeUnexposeOptions extends BridgeExposeOptions {
|
|
6
|
+
}
|
|
7
|
+
export type BridgeUnexposeQuery = Query<void, BridgeUnexposeQuerySchema>;
|
|
8
|
+
//# sourceMappingURL=Unexpose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Unexpose.d.ts","sourceRoot":"","sources":["../../../src/Queries/Unexpose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C,eAAO,MAAM,yBAAyB,sCAAsC,CAAA;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;CAAG;AAErE,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Query } from '@xyo-network/payload-model';
|
|
2
|
+
import { BridgeExposeOptions } from './Expose';
|
|
3
|
+
export declare const BridgeUnexposeQuerySchema = "network.xyo.query.bridge.unexpose";
|
|
4
|
+
export type BridgeUnexposeQuerySchema = typeof BridgeUnexposeQuerySchema;
|
|
5
|
+
export interface BridgeUnexposeOptions extends BridgeExposeOptions {
|
|
6
|
+
}
|
|
7
|
+
export type BridgeUnexposeQuery = Query<void, BridgeUnexposeQuerySchema>;
|
|
8
|
+
//# sourceMappingURL=Unexpose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Unexpose.d.ts","sourceRoot":"","sources":["../../../src/Queries/Unexpose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C,eAAO,MAAM,yBAAyB,sCAAsC,CAAA;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;CAAG;AAErE,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Query } from '@xyo-network/payload-model';
|
|
2
|
+
import { BridgeExposeOptions } from './Expose';
|
|
3
|
+
export declare const BridgeUnexposeQuerySchema = "network.xyo.query.bridge.unexpose";
|
|
4
|
+
export type BridgeUnexposeQuerySchema = typeof BridgeUnexposeQuerySchema;
|
|
5
|
+
export interface BridgeUnexposeOptions extends BridgeExposeOptions {
|
|
6
|
+
}
|
|
7
|
+
export type BridgeUnexposeQuery = Query<void, BridgeUnexposeQuerySchema>;
|
|
8
|
+
//# sourceMappingURL=Unexpose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Unexpose.d.ts","sourceRoot":"","sources":["../../../src/Queries/Unexpose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C,eAAO,MAAM,yBAAyB,sCAAsC,CAAA;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;CAAG;AAErE,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAA"}
|
|
@@ -2,9 +2,13 @@ import { ModuleQueries } from '@xyo-network/module-model';
|
|
|
2
2
|
import { BridgeConnectQuery } from './Connect';
|
|
3
3
|
import { BridgeConnectedQuery } from './Connected';
|
|
4
4
|
import { BridgeDisconnectQuery } from './Disconnect';
|
|
5
|
+
import { BridgeExposeQuery } from './Expose';
|
|
6
|
+
import { BridgeUnexposeQuery } from './Unexpose';
|
|
5
7
|
export * from './Connect';
|
|
6
8
|
export * from './Connected';
|
|
7
9
|
export * from './Disconnect';
|
|
8
|
-
export
|
|
10
|
+
export * from './Expose';
|
|
11
|
+
export * from './Unexpose';
|
|
12
|
+
export type BridgeQueries = BridgeConnectQuery | BridgeDisconnectQuery | BridgeConnectedQuery | BridgeExposeQuery | BridgeUnexposeQuery;
|
|
9
13
|
export type BridgeModuleQueries = ModuleQueries | BridgeQueries;
|
|
10
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Queries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Queries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAEhD,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAE1B,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,iBAAiB,GAAG,mBAAmB,CAAA;AACvI,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,aAAa,CAAA"}
|
|
@@ -2,9 +2,13 @@ import { ModuleQueries } from '@xyo-network/module-model';
|
|
|
2
2
|
import { BridgeConnectQuery } from './Connect';
|
|
3
3
|
import { BridgeConnectedQuery } from './Connected';
|
|
4
4
|
import { BridgeDisconnectQuery } from './Disconnect';
|
|
5
|
+
import { BridgeExposeQuery } from './Expose';
|
|
6
|
+
import { BridgeUnexposeQuery } from './Unexpose';
|
|
5
7
|
export * from './Connect';
|
|
6
8
|
export * from './Connected';
|
|
7
9
|
export * from './Disconnect';
|
|
8
|
-
export
|
|
10
|
+
export * from './Expose';
|
|
11
|
+
export * from './Unexpose';
|
|
12
|
+
export type BridgeQueries = BridgeConnectQuery | BridgeDisconnectQuery | BridgeConnectedQuery | BridgeExposeQuery | BridgeUnexposeQuery;
|
|
9
13
|
export type BridgeModuleQueries = ModuleQueries | BridgeQueries;
|
|
10
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Queries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Queries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAEhD,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAE1B,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,iBAAiB,GAAG,mBAAmB,CAAA;AACvI,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,aAAa,CAAA"}
|
|
@@ -2,9 +2,13 @@ import { ModuleQueries } from '@xyo-network/module-model';
|
|
|
2
2
|
import { BridgeConnectQuery } from './Connect';
|
|
3
3
|
import { BridgeConnectedQuery } from './Connected';
|
|
4
4
|
import { BridgeDisconnectQuery } from './Disconnect';
|
|
5
|
+
import { BridgeExposeQuery } from './Expose';
|
|
6
|
+
import { BridgeUnexposeQuery } from './Unexpose';
|
|
5
7
|
export * from './Connect';
|
|
6
8
|
export * from './Connected';
|
|
7
9
|
export * from './Disconnect';
|
|
8
|
-
export
|
|
10
|
+
export * from './Expose';
|
|
11
|
+
export * from './Unexpose';
|
|
12
|
+
export type BridgeQueries = BridgeConnectQuery | BridgeDisconnectQuery | BridgeConnectedQuery | BridgeExposeQuery | BridgeUnexposeQuery;
|
|
9
13
|
export type BridgeModuleQueries = ModuleQueries | BridgeQueries;
|
|
10
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Queries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Queries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAEhD,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAE1B,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,iBAAiB,GAAG,mBAAmB,CAAA;AACvI,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,aAAa,CAAA"}
|
package/dist/browser/index.cjs
CHANGED
|
@@ -24,6 +24,9 @@ __export(src_exports, {
|
|
|
24
24
|
BridgeConnectQuerySchema: () => BridgeConnectQuerySchema,
|
|
25
25
|
BridgeConnectedQuerySchema: () => BridgeConnectedQuerySchema,
|
|
26
26
|
BridgeDisconnectQuerySchema: () => BridgeDisconnectQuerySchema,
|
|
27
|
+
BridgeExposeQuerySchema: () => BridgeExposeQuerySchema,
|
|
28
|
+
BridgeUnexposeQuerySchema: () => BridgeUnexposeQuerySchema,
|
|
29
|
+
ModuleFilterPayloadSchema: () => ModuleFilterPayloadSchema,
|
|
27
30
|
asBridgeInstance: () => asBridgeInstance,
|
|
28
31
|
asBridgeModule: () => asBridgeModule,
|
|
29
32
|
isBridgeInstance: () => isBridgeInstance,
|
|
@@ -45,12 +48,18 @@ var BridgeConnectedQuerySchema = "network.xyo.query.bridge.connected";
|
|
|
45
48
|
// src/Queries/Disconnect.ts
|
|
46
49
|
var BridgeDisconnectQuerySchema = "network.xyo.query.bridge.disconnect";
|
|
47
50
|
|
|
51
|
+
// src/Queries/Expose.ts
|
|
52
|
+
var BridgeExposeQuerySchema = "network.xyo.query.bridge.expose";
|
|
53
|
+
var ModuleFilterPayloadSchema = "network.xyo.module.filter";
|
|
54
|
+
|
|
55
|
+
// src/Queries/Unexpose.ts
|
|
56
|
+
var BridgeUnexposeQuerySchema = "network.xyo.query.bridge.unexpose";
|
|
57
|
+
|
|
48
58
|
// src/typeChecks.ts
|
|
49
59
|
var import_object = require("@xylabs/object");
|
|
50
60
|
var import_module_model = require("@xyo-network/module-model");
|
|
51
61
|
var isBridgeInstance = new import_module_model.IsInstanceFactory().create({
|
|
52
|
-
|
|
53
|
-
disconnect: "function"
|
|
62
|
+
expose: "function"
|
|
54
63
|
}, [
|
|
55
64
|
import_module_model.isModuleInstance
|
|
56
65
|
]);
|