@xyo-network/sentinel-model 2.73.3 → 2.74.0
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/Config.d.mts +9 -0
- package/dist/Config.d.mts.map +1 -0
- package/dist/Config.d.ts +9 -0
- package/dist/Config.d.ts.map +1 -0
- package/dist/EventData.d.mts +5 -0
- package/dist/EventData.d.mts.map +1 -0
- package/dist/EventData.d.ts +5 -0
- package/dist/EventData.d.ts.map +1 -0
- package/dist/EventsModels/ReportEnd.d.mts +13 -0
- package/dist/EventsModels/ReportEnd.d.mts.map +1 -0
- package/dist/EventsModels/ReportEnd.d.ts +13 -0
- package/dist/EventsModels/ReportEnd.d.ts.map +1 -0
- package/dist/EventsModels/ReportStart.d.mts +10 -0
- package/dist/EventsModels/ReportStart.d.mts.map +1 -0
- package/dist/EventsModels/ReportStart.d.ts +10 -0
- package/dist/EventsModels/ReportStart.d.ts.map +1 -0
- package/dist/EventsModels/index.d.mts +3 -0
- package/dist/EventsModels/index.d.mts.map +1 -0
- package/dist/EventsModels/index.d.ts +3 -0
- package/dist/EventsModels/index.d.ts.map +1 -0
- package/dist/Instance.d.mts +14 -0
- package/dist/Instance.d.mts.map +1 -0
- package/dist/Instance.d.ts +14 -0
- package/dist/Instance.d.ts.map +1 -0
- package/dist/Module.d.mts +6 -0
- package/dist/Module.d.mts.map +1 -0
- package/dist/Module.d.ts +6 -0
- package/dist/Module.d.ts.map +1 -0
- package/dist/Params.d.mts +5 -0
- package/dist/Params.d.mts.map +1 -0
- package/dist/Params.d.ts +5 -0
- package/dist/Params.d.ts.map +1 -0
- package/dist/Queries/Report.d.mts +7 -0
- package/dist/Queries/Report.d.mts.map +1 -0
- package/dist/Queries/Report.d.ts +7 -0
- package/dist/Queries/Report.d.ts.map +1 -0
- package/dist/Queries/index.d.mts +8 -0
- package/dist/Queries/index.d.mts.map +1 -0
- package/dist/Queries/index.d.ts +8 -0
- package/dist/Queries/index.d.ts.map +1 -0
- package/dist/Sentinel.d.mts +6 -0
- package/dist/Sentinel.d.mts.map +1 -0
- package/dist/Sentinel.d.ts +6 -0
- package/dist/Sentinel.d.ts.map +1 -0
- package/dist/index.d.mts +10 -76
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +10 -76
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/typeChecks.d.mts +15 -0
- package/dist/typeChecks.d.mts.map +1 -0
- package/dist/typeChecks.d.ts +15 -0
- package/dist/typeChecks.d.ts.map +1 -0
- package/package.json +12 -18
- package/src/Config.ts +5 -4
- package/src/EventData.ts +1 -1
- package/src/Instance.ts +1 -1
- package/src/Params.ts +1 -1
- package/src/index.ts +1 -1
- package/src/typeChecks.ts +1 -1
- package/dist/docs.json +0 -5144
- package/tsup.config.ts +0 -16
- /package/src/{Events → EventsModels}/ReportEnd.ts +0 -0
- /package/src/{Events → EventsModels}/ReportStart.ts +0 -0
- /package/src/{Events → EventsModels}/index.ts +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ArchivingModuleConfig } from '@xyo-network/archivist';
|
|
2
|
+
import { ModuleConfig } from '@xyo-network/module-model';
|
|
3
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
4
|
+
export type SentinelConfigSchema = 'network.xyo.sentinel.config';
|
|
5
|
+
export declare const SentinelConfigSchema: SentinelConfigSchema;
|
|
6
|
+
export type SentinelConfig<TConfig extends Payload | void = void> = ModuleConfig<TConfig, ArchivingModuleConfig & {
|
|
7
|
+
witnesses?: string[];
|
|
8
|
+
}, TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema>;
|
|
9
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,MAAM,MAAM,oBAAoB,GAAG,6BAA6B,CAAA;AAChE,eAAO,MAAM,oBAAoB,EAAE,oBAAoD,CAAA;AAEvF,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,OAAO,GAAG,IAAI,GAAG,IAAI,IAAI,YAAY,CAC9E,OAAO,EACP,qBAAqB,GAAG;IACtB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB,EACD,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CACnE,CAAA"}
|
package/dist/Config.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ArchivingModuleConfig } from '@xyo-network/archivist';
|
|
2
|
+
import { ModuleConfig } from '@xyo-network/module-model';
|
|
3
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
4
|
+
export type SentinelConfigSchema = 'network.xyo.sentinel.config';
|
|
5
|
+
export declare const SentinelConfigSchema: SentinelConfigSchema;
|
|
6
|
+
export type SentinelConfig<TConfig extends Payload | void = void> = ModuleConfig<TConfig, ArchivingModuleConfig & {
|
|
7
|
+
witnesses?: string[];
|
|
8
|
+
}, TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema>;
|
|
9
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,MAAM,MAAM,oBAAoB,GAAG,6BAA6B,CAAA;AAChE,eAAO,MAAM,oBAAoB,EAAE,oBAAoD,CAAA;AAEvF,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,OAAO,GAAG,IAAI,GAAG,IAAI,IAAI,YAAY,CAC9E,OAAO,EACP,qBAAqB,GAAG;IACtB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB,EACD,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CACnE,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Module, ModuleEventData } from '@xyo-network/module-model';
|
|
2
|
+
import { ReportEndEventData, ReportStartEventData } from './EventsModels';
|
|
3
|
+
export interface SentinelModuleEventData<T extends Module = Module> extends ReportEndEventData<T>, ReportStartEventData<T>, ModuleEventData<T> {
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=EventData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventData.d.ts","sourceRoot":"","sources":["../src/EventData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEnE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAEzE,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,kBAAkB,CAAC,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;CAAG"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Module, ModuleEventData } from '@xyo-network/module-model';
|
|
2
|
+
import { ReportEndEventData, ReportStartEventData } from './EventsModels';
|
|
3
|
+
export interface SentinelModuleEventData<T extends Module = Module> extends ReportEndEventData<T>, ReportStartEventData<T>, ModuleEventData<T> {
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=EventData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventData.d.ts","sourceRoot":"","sources":["../src/EventData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEnE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAEzE,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,kBAAkB,CAAC,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;CAAG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BoundWitness } from '@xyo-network/boundwitness-model';
|
|
2
|
+
import { EventData } from '@xyo-network/module';
|
|
3
|
+
import { Module, ModuleEventArgs } from '@xyo-network/module-model';
|
|
4
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
5
|
+
export type ReportEndEventArgs<T extends Module = Module> = ModuleEventArgs<T, {
|
|
6
|
+
boundwitness?: BoundWitness;
|
|
7
|
+
inPayloads?: Payload[];
|
|
8
|
+
outPayloads?: Payload[];
|
|
9
|
+
}>;
|
|
10
|
+
export interface ReportEndEventData<T extends Module = Module> extends EventData {
|
|
11
|
+
reportEnd: ReportEndEventArgs<T>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=ReportEnd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportEnd.d.ts","sourceRoot":"","sources":["../../src/EventsModels/ReportEnd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,eAAe,CACzE,CAAC,EACD;IACE,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,EAAE,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,EAAE,CAAA;CACxB,CACF,CAAA;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,SAAS;IAC9E,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAA;CACjC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BoundWitness } from '@xyo-network/boundwitness-model';
|
|
2
|
+
import { EventData } from '@xyo-network/module';
|
|
3
|
+
import { Module, ModuleEventArgs } from '@xyo-network/module-model';
|
|
4
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
5
|
+
export type ReportEndEventArgs<T extends Module = Module> = ModuleEventArgs<T, {
|
|
6
|
+
boundwitness?: BoundWitness;
|
|
7
|
+
inPayloads?: Payload[];
|
|
8
|
+
outPayloads?: Payload[];
|
|
9
|
+
}>;
|
|
10
|
+
export interface ReportEndEventData<T extends Module = Module> extends EventData {
|
|
11
|
+
reportEnd: ReportEndEventArgs<T>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=ReportEnd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportEnd.d.ts","sourceRoot":"","sources":["../../src/EventsModels/ReportEnd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,eAAe,CACzE,CAAC,EACD;IACE,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,EAAE,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,EAAE,CAAA;CACxB,CACF,CAAA;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,SAAS;IAC9E,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAA;CACjC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EventData } from '@xyo-network/module';
|
|
2
|
+
import { Module, ModuleEventArgs } from '@xyo-network/module-model';
|
|
3
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
4
|
+
export type ReportStartEventArgs<T extends Module = Module> = ModuleEventArgs<T, {
|
|
5
|
+
inPayloads?: Payload[];
|
|
6
|
+
}>;
|
|
7
|
+
export interface ReportStartEventData<T extends Module = Module> extends EventData {
|
|
8
|
+
reportStart: ReportStartEventArgs<T>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ReportStart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportStart.d.ts","sourceRoot":"","sources":["../../src/EventsModels/ReportStart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,eAAe,CAC3E,CAAC,EACD;IACE,UAAU,CAAC,EAAE,OAAO,EAAE,CAAA;CACvB,CACF,CAAA;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,SAAS;IAChF,WAAW,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAA;CACrC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EventData } from '@xyo-network/module';
|
|
2
|
+
import { Module, ModuleEventArgs } from '@xyo-network/module-model';
|
|
3
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
4
|
+
export type ReportStartEventArgs<T extends Module = Module> = ModuleEventArgs<T, {
|
|
5
|
+
inPayloads?: Payload[];
|
|
6
|
+
}>;
|
|
7
|
+
export interface ReportStartEventData<T extends Module = Module> extends EventData {
|
|
8
|
+
reportStart: ReportStartEventArgs<T>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ReportStart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportStart.d.ts","sourceRoot":"","sources":["../../src/EventsModels/ReportStart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,eAAe,CAC3E,CAAC,EACD;IACE,UAAU,CAAC,EAAE,OAAO,EAAE,CAAA;CACvB,CACF,CAAA;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,SAAS;IAChF,WAAW,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAA;CACrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/EventsModels/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/EventsModels/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ArchivistInstance } from '@xyo-network/archivist';
|
|
2
|
+
import { ModuleInstance } from '@xyo-network/module-model';
|
|
3
|
+
import { Promisable } from '@xyo-network/promise';
|
|
4
|
+
import { WitnessInstance } from '@xyo-network/witness-model';
|
|
5
|
+
import { SentinelModuleEventData } from './EventData';
|
|
6
|
+
import { CustomSentinelModule, SentinelModule } from './Module';
|
|
7
|
+
import { SentinelParams } from './Params';
|
|
8
|
+
import { Sentinel } from './Sentinel';
|
|
9
|
+
export type SentinelInstance<TParams extends SentinelParams = SentinelParams> = SentinelModule<TParams> & Sentinel & ModuleInstance<TParams> & {
|
|
10
|
+
archivists: () => Promisable<ArchivistInstance[]>;
|
|
11
|
+
witnesses: () => Promisable<WitnessInstance[]>;
|
|
12
|
+
};
|
|
13
|
+
export type CustomSentinelInstance<TParams extends SentinelParams = SentinelParams, TEvents extends SentinelModuleEventData<SentinelInstance<TParams>> = SentinelModuleEventData<SentinelInstance<TParams>>> = CustomSentinelModule<TParams, TEvents> & Sentinel & SentinelInstance<TParams>;
|
|
14
|
+
//# sourceMappingURL=Instance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Instance.d.ts","sourceRoot":"","sources":["../src/Instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,MAAM,MAAM,gBAAgB,CAAC,OAAO,SAAS,cAAc,GAAG,cAAc,IAAI,cAAc,CAAC,OAAO,CAAC,GACrG,QAAQ,GACR,cAAc,CAAC,OAAO,CAAC,GAAG;IACxB,UAAU,EAAE,MAAM,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAA;IACjD,SAAS,EAAE,MAAM,UAAU,CAAC,eAAe,EAAE,CAAC,CAAA;CAC/C,CAAA;AAEH,MAAM,MAAM,sBAAsB,CAChC,OAAO,SAAS,cAAc,GAAG,cAAc,EAC/C,OAAO,SAAS,uBAAuB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,GAAG,uBAAuB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,IACrH,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,QAAQ,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ArchivistInstance } from '@xyo-network/archivist';
|
|
2
|
+
import { ModuleInstance } from '@xyo-network/module-model';
|
|
3
|
+
import { Promisable } from '@xyo-network/promise';
|
|
4
|
+
import { WitnessInstance } from '@xyo-network/witness-model';
|
|
5
|
+
import { SentinelModuleEventData } from './EventData';
|
|
6
|
+
import { CustomSentinelModule, SentinelModule } from './Module';
|
|
7
|
+
import { SentinelParams } from './Params';
|
|
8
|
+
import { Sentinel } from './Sentinel';
|
|
9
|
+
export type SentinelInstance<TParams extends SentinelParams = SentinelParams> = SentinelModule<TParams> & Sentinel & ModuleInstance<TParams> & {
|
|
10
|
+
archivists: () => Promisable<ArchivistInstance[]>;
|
|
11
|
+
witnesses: () => Promisable<WitnessInstance[]>;
|
|
12
|
+
};
|
|
13
|
+
export type CustomSentinelInstance<TParams extends SentinelParams = SentinelParams, TEvents extends SentinelModuleEventData<SentinelInstance<TParams>> = SentinelModuleEventData<SentinelInstance<TParams>>> = CustomSentinelModule<TParams, TEvents> & Sentinel & SentinelInstance<TParams>;
|
|
14
|
+
//# sourceMappingURL=Instance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Instance.d.ts","sourceRoot":"","sources":["../src/Instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,MAAM,MAAM,gBAAgB,CAAC,OAAO,SAAS,cAAc,GAAG,cAAc,IAAI,cAAc,CAAC,OAAO,CAAC,GACrG,QAAQ,GACR,cAAc,CAAC,OAAO,CAAC,GAAG;IACxB,UAAU,EAAE,MAAM,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAA;IACjD,SAAS,EAAE,MAAM,UAAU,CAAC,eAAe,EAAE,CAAC,CAAA;CAC/C,CAAA;AAEH,MAAM,MAAM,sBAAsB,CAChC,OAAO,SAAS,cAAc,GAAG,cAAc,EAC/C,OAAO,SAAS,uBAAuB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,GAAG,uBAAuB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,IACrH,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,QAAQ,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Module } from '@xyo-network/module-model';
|
|
2
|
+
import { SentinelModuleEventData } from './EventData';
|
|
3
|
+
import { SentinelParams } from './Params';
|
|
4
|
+
export type SentinelModule<TParams extends SentinelParams = SentinelParams> = Module<TParams, SentinelModuleEventData<SentinelModule>>;
|
|
5
|
+
export type CustomSentinelModule<TParams extends SentinelParams = SentinelParams, TEvents extends SentinelModuleEventData<SentinelModule<TParams>> = SentinelModuleEventData<SentinelModule<TParams>>> = Module<TParams, TEvents>;
|
|
6
|
+
//# sourceMappingURL=Module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Module.d.ts","sourceRoot":"","sources":["../src/Module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAElD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,cAAc,GAAG,cAAc,IAAI,MAAM,CAAC,OAAO,EAAE,uBAAuB,CAAC,cAAc,CAAC,CAAC,CAAA;AAEtI,MAAM,MAAM,oBAAoB,CAC9B,OAAO,SAAS,cAAc,GAAG,cAAc,EAC/C,OAAO,SAAS,uBAAuB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,uBAAuB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,IACjH,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA"}
|
package/dist/Module.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Module } from '@xyo-network/module-model';
|
|
2
|
+
import { SentinelModuleEventData } from './EventData';
|
|
3
|
+
import { SentinelParams } from './Params';
|
|
4
|
+
export type SentinelModule<TParams extends SentinelParams = SentinelParams> = Module<TParams, SentinelModuleEventData<SentinelModule>>;
|
|
5
|
+
export type CustomSentinelModule<TParams extends SentinelParams = SentinelParams, TEvents extends SentinelModuleEventData<SentinelModule<TParams>> = SentinelModuleEventData<SentinelModule<TParams>>> = Module<TParams, TEvents>;
|
|
6
|
+
//# sourceMappingURL=Module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Module.d.ts","sourceRoot":"","sources":["../src/Module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAElD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,cAAc,GAAG,cAAc,IAAI,MAAM,CAAC,OAAO,EAAE,uBAAuB,CAAC,cAAc,CAAC,CAAC,CAAA;AAEtI,MAAM,MAAM,oBAAoB,CAC9B,OAAO,SAAS,cAAc,GAAG,cAAc,EAC/C,OAAO,SAAS,uBAAuB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,uBAAuB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,IACjH,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AnyObject } from '@xyo-network/core';
|
|
2
|
+
import { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model';
|
|
3
|
+
import { SentinelConfig } from './Config';
|
|
4
|
+
export type SentinelParams<TConfig extends AnyConfigSchema<SentinelConfig> = AnyConfigSchema<SentinelConfig>, TAdditionalParams extends AnyObject | void = void> = ModuleParams<TConfig, TAdditionalParams>;
|
|
5
|
+
//# sourceMappingURL=Params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAEzE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,MAAM,MAAM,cAAc,CACxB,OAAO,SAAS,eAAe,CAAC,cAAc,CAAC,GAAG,eAAe,CAAC,cAAc,CAAC,EACjF,iBAAiB,SAAS,SAAS,GAAG,IAAI,GAAG,IAAI,IAC/C,YAAY,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAA"}
|
package/dist/Params.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AnyObject } from '@xyo-network/core';
|
|
2
|
+
import { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model';
|
|
3
|
+
import { SentinelConfig } from './Config';
|
|
4
|
+
export type SentinelParams<TConfig extends AnyConfigSchema<SentinelConfig> = AnyConfigSchema<SentinelConfig>, TAdditionalParams extends AnyObject | void = void> = ModuleParams<TConfig, TAdditionalParams>;
|
|
5
|
+
//# sourceMappingURL=Params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAEzE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,MAAM,MAAM,cAAc,CACxB,OAAO,SAAS,eAAe,CAAC,cAAc,CAAC,GAAG,eAAe,CAAC,cAAc,CAAC,EACjF,iBAAiB,SAAS,SAAS,GAAG,IAAI,GAAG,IAAI,IAC/C,YAAY,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Query } from '@xyo-network/payload-model';
|
|
2
|
+
export type SentinelReportQuerySchema = 'network.xyo.query.sentinel.report';
|
|
3
|
+
export declare const SentinelReportQuerySchema: SentinelReportQuerySchema;
|
|
4
|
+
export type SentinelReportQuery = Query<{
|
|
5
|
+
schema: SentinelReportQuerySchema;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=Report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Report.d.ts","sourceRoot":"","sources":["../../src/Queries/Report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,MAAM,MAAM,yBAAyB,GAAG,mCAAmC,CAAA;AAC3E,eAAO,MAAM,yBAAyB,EAAE,yBAA+D,CAAA;AAEvG,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC;IACtC,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Query } from '@xyo-network/payload-model';
|
|
2
|
+
export type SentinelReportQuerySchema = 'network.xyo.query.sentinel.report';
|
|
3
|
+
export declare const SentinelReportQuerySchema: SentinelReportQuerySchema;
|
|
4
|
+
export type SentinelReportQuery = Query<{
|
|
5
|
+
schema: SentinelReportQuerySchema;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=Report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Report.d.ts","sourceRoot":"","sources":["../../src/Queries/Report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,MAAM,MAAM,yBAAyB,GAAG,mCAAmC,CAAA;AAC3E,eAAO,MAAM,yBAAyB,EAAE,yBAA+D,CAAA;AAEvG,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC;IACtC,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './Report';
|
|
2
|
+
import { ModuleQuery, ModuleQueryBase } from '@xyo-network/module-model';
|
|
3
|
+
import { Query } from '@xyo-network/payload-model';
|
|
4
|
+
import { SentinelReportQuery } from './Report';
|
|
5
|
+
export type SentinelQueryBase = SentinelReportQuery;
|
|
6
|
+
export type SentinelModuleQueries = ModuleQueryBase | SentinelQueryBase;
|
|
7
|
+
export type SentinelQuery<TQuery extends Query | void = void> = ModuleQuery<TQuery extends Query ? SentinelQueryBase | TQuery : SentinelQueryBase>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AAExB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,CAAA;AACnD,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG,iBAAiB,CAAA;AACvE,MAAM,MAAM,aAAa,CAAC,MAAM,SAAS,KAAK,GAAG,IAAI,GAAG,IAAI,IAAI,WAAW,CAAC,MAAM,SAAS,KAAK,GAAG,iBAAiB,GAAG,MAAM,GAAG,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './Report';
|
|
2
|
+
import { ModuleQuery, ModuleQueryBase } from '@xyo-network/module-model';
|
|
3
|
+
import { Query } from '@xyo-network/payload-model';
|
|
4
|
+
import { SentinelReportQuery } from './Report';
|
|
5
|
+
export type SentinelQueryBase = SentinelReportQuery;
|
|
6
|
+
export type SentinelModuleQueries = ModuleQueryBase | SentinelQueryBase;
|
|
7
|
+
export type SentinelQuery<TQuery extends Query | void = void> = ModuleQuery<TQuery extends Query ? SentinelQueryBase | TQuery : SentinelQueryBase>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AAExB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,CAAA;AACnD,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG,iBAAiB,CAAA;AACvE,MAAM,MAAM,aAAa,CAAC,MAAM,SAAS,KAAK,GAAG,IAAI,GAAG,IAAI,IAAI,WAAW,CAAC,MAAM,SAAS,KAAK,GAAG,iBAAiB,GAAG,MAAM,GAAG,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sentinel.d.ts","sourceRoot":"","sources":["../src/Sentinel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;CACxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sentinel.d.ts","sourceRoot":"","sources":["../src/Sentinel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;CACxD"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,76 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
type SentinelConfigSchema = 'network.xyo.sentinel.config';
|
|
13
|
-
declare const SentinelConfigSchema: SentinelConfigSchema;
|
|
14
|
-
type SentinelConfig<TConfig extends Payload = Payload> = ModuleConfig<ArchivingModuleConfig & {
|
|
15
|
-
schema: SentinelConfigSchema;
|
|
16
|
-
witnesses?: string[];
|
|
17
|
-
} & TConfig>;
|
|
18
|
-
|
|
19
|
-
type ReportEndEventArgs<T extends Module = Module> = ModuleEventArgs<T, {
|
|
20
|
-
boundwitness?: BoundWitness;
|
|
21
|
-
inPayloads?: Payload[];
|
|
22
|
-
outPayloads?: Payload[];
|
|
23
|
-
}>;
|
|
24
|
-
interface ReportEndEventData<T extends Module = Module> extends EventData {
|
|
25
|
-
reportEnd: ReportEndEventArgs<T>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type ReportStartEventArgs<T extends Module = Module> = ModuleEventArgs<T, {
|
|
29
|
-
inPayloads?: Payload[];
|
|
30
|
-
}>;
|
|
31
|
-
interface ReportStartEventData<T extends Module = Module> extends EventData {
|
|
32
|
-
reportStart: ReportStartEventArgs<T>;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface SentinelModuleEventData<T extends Module = Module> extends ReportEndEventData<T>, ReportStartEventData<T>, ModuleEventData<T> {
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
type SentinelParams<TConfig extends AnyConfigSchema<SentinelConfig> = AnyConfigSchema<SentinelConfig>, TAdditionalParams extends AnyObject | undefined = undefined> = ModuleParams<TConfig, TAdditionalParams>;
|
|
39
|
-
|
|
40
|
-
type SentinelModule<TParams extends SentinelParams = SentinelParams> = Module<TParams, SentinelModuleEventData<SentinelModule>>;
|
|
41
|
-
type CustomSentinelModule<TParams extends SentinelParams = SentinelParams, TEvents extends SentinelModuleEventData<SentinelModule<TParams>> = SentinelModuleEventData<SentinelModule<TParams>>> = Module<TParams, TEvents>;
|
|
42
|
-
|
|
43
|
-
interface Sentinel {
|
|
44
|
-
report: (payloads?: Payload[]) => Promisable<Payload[]>;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
type SentinelInstance<TParams extends SentinelParams = SentinelParams> = SentinelModule<TParams> & Sentinel & ModuleInstance & {
|
|
48
|
-
archivists: () => Promisable<ArchivistInstance[]>;
|
|
49
|
-
witnesses: () => Promisable<WitnessInstance[]>;
|
|
50
|
-
};
|
|
51
|
-
type CustomSentinelInstance<TParams extends SentinelParams = SentinelParams, TEvents extends SentinelModuleEventData<SentinelInstance<TParams>> = SentinelModuleEventData<SentinelInstance<TParams>>> = CustomSentinelModule<TParams, TEvents> & Sentinel & SentinelInstance<TParams>;
|
|
52
|
-
|
|
53
|
-
type SentinelReportQuerySchema = 'network.xyo.query.sentinel.report';
|
|
54
|
-
declare const SentinelReportQuerySchema: SentinelReportQuerySchema;
|
|
55
|
-
type SentinelReportQuery = Query<{
|
|
56
|
-
schema: SentinelReportQuerySchema;
|
|
57
|
-
}>;
|
|
58
|
-
|
|
59
|
-
type SentinelQueryBase = SentinelReportQuery;
|
|
60
|
-
type SentinelModuleQueries = ModuleQueryBase | SentinelQueryBase;
|
|
61
|
-
type SentinelQuery<TQuery extends Query | void = void> = ModuleQuery<TQuery extends Query ? SentinelQueryBase | TQuery : SentinelQueryBase>;
|
|
62
|
-
|
|
63
|
-
declare const isSentinelInstance: _xyo_network_object_identity.ObjectTypeCheck<SentinelInstance>;
|
|
64
|
-
declare const isSentinelModule: _xyo_network_module_model.ModuleTypeCheck<SentinelModule>;
|
|
65
|
-
declare const asSentinelModule: {
|
|
66
|
-
(obj: any, config?: _xyo_network_object_identity.ObjectTypeConfig | undefined): SentinelModule | undefined;
|
|
67
|
-
(obj: any, assert: string | (() => string), config?: _xyo_network_object_identity.ObjectTypeConfig | undefined): SentinelModule;
|
|
68
|
-
};
|
|
69
|
-
declare const asSentinelInstance: {
|
|
70
|
-
(obj: any, config?: _xyo_network_object_identity.ObjectTypeConfig | undefined): SentinelInstance | undefined;
|
|
71
|
-
(obj: any, assert: string | (() => string), config?: _xyo_network_object_identity.ObjectTypeConfig | undefined): SentinelInstance;
|
|
72
|
-
};
|
|
73
|
-
declare const withSentinelModule: <R>(module: any, closure: (module: SentinelModule) => R) => R | undefined;
|
|
74
|
-
declare const withSentinelInstance: <R>(module: any, closure: (module: SentinelInstance) => R) => R | undefined;
|
|
75
|
-
|
|
76
|
-
export { CustomSentinelInstance, CustomSentinelModule, ReportEndEventArgs, ReportEndEventData, ReportStartEventArgs, ReportStartEventData, Sentinel, SentinelConfig, SentinelConfigSchema, SentinelInstance, SentinelModule, SentinelModuleEventData, SentinelModuleQueries, SentinelParams, SentinelQuery, SentinelQueryBase, SentinelReportQuery, SentinelReportQuerySchema, asSentinelInstance, asSentinelModule, isSentinelInstance, isSentinelModule, withSentinelInstance, withSentinelModule };
|
|
1
|
+
export * from './Config';
|
|
2
|
+
export * from './EventData';
|
|
3
|
+
export * from './EventsModels';
|
|
4
|
+
export * from './Instance';
|
|
5
|
+
export * from './Module';
|
|
6
|
+
export * from './Params';
|
|
7
|
+
export * from './Queries';
|
|
8
|
+
export * from './Sentinel';
|
|
9
|
+
export * from './typeChecks';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,76 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
type SentinelConfigSchema = 'network.xyo.sentinel.config';
|
|
13
|
-
declare const SentinelConfigSchema: SentinelConfigSchema;
|
|
14
|
-
type SentinelConfig<TConfig extends Payload = Payload> = ModuleConfig<ArchivingModuleConfig & {
|
|
15
|
-
schema: SentinelConfigSchema;
|
|
16
|
-
witnesses?: string[];
|
|
17
|
-
} & TConfig>;
|
|
18
|
-
|
|
19
|
-
type ReportEndEventArgs<T extends Module = Module> = ModuleEventArgs<T, {
|
|
20
|
-
boundwitness?: BoundWitness;
|
|
21
|
-
inPayloads?: Payload[];
|
|
22
|
-
outPayloads?: Payload[];
|
|
23
|
-
}>;
|
|
24
|
-
interface ReportEndEventData<T extends Module = Module> extends EventData {
|
|
25
|
-
reportEnd: ReportEndEventArgs<T>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type ReportStartEventArgs<T extends Module = Module> = ModuleEventArgs<T, {
|
|
29
|
-
inPayloads?: Payload[];
|
|
30
|
-
}>;
|
|
31
|
-
interface ReportStartEventData<T extends Module = Module> extends EventData {
|
|
32
|
-
reportStart: ReportStartEventArgs<T>;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface SentinelModuleEventData<T extends Module = Module> extends ReportEndEventData<T>, ReportStartEventData<T>, ModuleEventData<T> {
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
type SentinelParams<TConfig extends AnyConfigSchema<SentinelConfig> = AnyConfigSchema<SentinelConfig>, TAdditionalParams extends AnyObject | undefined = undefined> = ModuleParams<TConfig, TAdditionalParams>;
|
|
39
|
-
|
|
40
|
-
type SentinelModule<TParams extends SentinelParams = SentinelParams> = Module<TParams, SentinelModuleEventData<SentinelModule>>;
|
|
41
|
-
type CustomSentinelModule<TParams extends SentinelParams = SentinelParams, TEvents extends SentinelModuleEventData<SentinelModule<TParams>> = SentinelModuleEventData<SentinelModule<TParams>>> = Module<TParams, TEvents>;
|
|
42
|
-
|
|
43
|
-
interface Sentinel {
|
|
44
|
-
report: (payloads?: Payload[]) => Promisable<Payload[]>;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
type SentinelInstance<TParams extends SentinelParams = SentinelParams> = SentinelModule<TParams> & Sentinel & ModuleInstance & {
|
|
48
|
-
archivists: () => Promisable<ArchivistInstance[]>;
|
|
49
|
-
witnesses: () => Promisable<WitnessInstance[]>;
|
|
50
|
-
};
|
|
51
|
-
type CustomSentinelInstance<TParams extends SentinelParams = SentinelParams, TEvents extends SentinelModuleEventData<SentinelInstance<TParams>> = SentinelModuleEventData<SentinelInstance<TParams>>> = CustomSentinelModule<TParams, TEvents> & Sentinel & SentinelInstance<TParams>;
|
|
52
|
-
|
|
53
|
-
type SentinelReportQuerySchema = 'network.xyo.query.sentinel.report';
|
|
54
|
-
declare const SentinelReportQuerySchema: SentinelReportQuerySchema;
|
|
55
|
-
type SentinelReportQuery = Query<{
|
|
56
|
-
schema: SentinelReportQuerySchema;
|
|
57
|
-
}>;
|
|
58
|
-
|
|
59
|
-
type SentinelQueryBase = SentinelReportQuery;
|
|
60
|
-
type SentinelModuleQueries = ModuleQueryBase | SentinelQueryBase;
|
|
61
|
-
type SentinelQuery<TQuery extends Query | void = void> = ModuleQuery<TQuery extends Query ? SentinelQueryBase | TQuery : SentinelQueryBase>;
|
|
62
|
-
|
|
63
|
-
declare const isSentinelInstance: _xyo_network_object_identity.ObjectTypeCheck<SentinelInstance>;
|
|
64
|
-
declare const isSentinelModule: _xyo_network_module_model.ModuleTypeCheck<SentinelModule>;
|
|
65
|
-
declare const asSentinelModule: {
|
|
66
|
-
(obj: any, config?: _xyo_network_object_identity.ObjectTypeConfig | undefined): SentinelModule | undefined;
|
|
67
|
-
(obj: any, assert: string | (() => string), config?: _xyo_network_object_identity.ObjectTypeConfig | undefined): SentinelModule;
|
|
68
|
-
};
|
|
69
|
-
declare const asSentinelInstance: {
|
|
70
|
-
(obj: any, config?: _xyo_network_object_identity.ObjectTypeConfig | undefined): SentinelInstance | undefined;
|
|
71
|
-
(obj: any, assert: string | (() => string), config?: _xyo_network_object_identity.ObjectTypeConfig | undefined): SentinelInstance;
|
|
72
|
-
};
|
|
73
|
-
declare const withSentinelModule: <R>(module: any, closure: (module: SentinelModule) => R) => R | undefined;
|
|
74
|
-
declare const withSentinelInstance: <R>(module: any, closure: (module: SentinelInstance) => R) => R | undefined;
|
|
75
|
-
|
|
76
|
-
export { CustomSentinelInstance, CustomSentinelModule, ReportEndEventArgs, ReportEndEventData, ReportStartEventArgs, ReportStartEventData, Sentinel, SentinelConfig, SentinelConfigSchema, SentinelInstance, SentinelModule, SentinelModuleEventData, SentinelModuleQueries, SentinelParams, SentinelQuery, SentinelQueryBase, SentinelReportQuery, SentinelReportQuerySchema, asSentinelInstance, asSentinelModule, isSentinelInstance, isSentinelModule, withSentinelInstance, withSentinelModule };
|
|
1
|
+
export * from './Config';
|
|
2
|
+
export * from './EventData';
|
|
3
|
+
export * from './EventsModels';
|
|
4
|
+
export * from './Instance';
|
|
5
|
+
export * from './Module';
|
|
6
|
+
export * from './Params';
|
|
7
|
+
export * from './Queries';
|
|
8
|
+
export * from './Sentinel';
|
|
9
|
+
export * from './typeChecks';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -39,11 +39,11 @@ var SentinelReportQuerySchema = "network.xyo.query.sentinel.report";
|
|
|
39
39
|
|
|
40
40
|
// src/typeChecks.ts
|
|
41
41
|
var import_module_model = require("@xyo-network/module-model");
|
|
42
|
-
var
|
|
42
|
+
var import_object = require("@xyo-network/object");
|
|
43
43
|
var isSentinelInstance = new import_module_model.IsInstanceFactory().create({ report: "function" }, [import_module_model.isModuleInstance]);
|
|
44
44
|
var isSentinelModule = new import_module_model.IsModuleFactory().create([SentinelReportQuerySchema]);
|
|
45
|
-
var asSentinelModule =
|
|
46
|
-
var asSentinelInstance =
|
|
45
|
+
var asSentinelModule = import_object.AsObjectFactory.create(isSentinelModule);
|
|
46
|
+
var asSentinelInstance = import_object.AsObjectFactory.create(isSentinelInstance);
|
|
47
47
|
var withSentinelModule = import_module_model.WithFactory.create(isSentinelModule);
|
|
48
48
|
var withSentinelInstance = import_module_model.WithFactory.create(isSentinelInstance);
|
|
49
49
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/Config.ts","../src/Queries/Report.ts","../src/typeChecks.ts"],"sourcesContent":["export * from './Config'\nexport * from './EventData'\nexport * from './
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/Config.ts","../src/Queries/Report.ts","../src/typeChecks.ts"],"sourcesContent":["export * from './Config'\nexport * from './EventData'\nexport * from './EventsModels'\nexport * from './Instance'\nexport * from './Module'\nexport * from './Params'\nexport * from './Queries'\nexport * from './Sentinel'\nexport * from './typeChecks'\n","import { ArchivingModuleConfig } from '@xyo-network/archivist'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport type SentinelConfigSchema = 'network.xyo.sentinel.config'\nexport const SentinelConfigSchema: SentinelConfigSchema = 'network.xyo.sentinel.config'\n\nexport type SentinelConfig<TConfig extends Payload | void = void> = ModuleConfig<\n TConfig,\n ArchivingModuleConfig & {\n witnesses?: string[]\n },\n TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n>\n","import { Query } from '@xyo-network/payload-model'\n\nexport type SentinelReportQuerySchema = 'network.xyo.query.sentinel.report'\nexport const SentinelReportQuerySchema: SentinelReportQuerySchema = 'network.xyo.query.sentinel.report'\n\nexport type SentinelReportQuery = Query<{\n schema: SentinelReportQuerySchema\n}>\n","import { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\nimport { AsObjectFactory } from '@xyo-network/object'\n\nimport { SentinelInstance } from './Instance'\nimport { SentinelModule } from './Module'\nimport { SentinelReportQuerySchema } from './Queries'\n\nexport const isSentinelInstance = new IsInstanceFactory<SentinelInstance>().create({ report: 'function' }, [isModuleInstance])\nexport const isSentinelModule = new IsModuleFactory<SentinelModule>().create([SentinelReportQuerySchema])\n\nexport const asSentinelModule = AsObjectFactory.create(isSentinelModule)\nexport const asSentinelInstance = AsObjectFactory.create(isSentinelInstance)\nexport const withSentinelModule = WithFactory.create(isSentinelModule)\nexport const withSentinelInstance = WithFactory.create(isSentinelInstance)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,uBAA6C;;;ACFnD,IAAM,4BAAuD;;;ACHpE,0BAAkF;AAClF,oBAAgC;AAMzB,IAAM,qBAAqB,IAAI,sCAAoC,EAAE,OAAO,EAAE,QAAQ,WAAW,GAAG,CAAC,oCAAgB,CAAC;AACtH,IAAM,mBAAmB,IAAI,oCAAgC,EAAE,OAAO,CAAC,yBAAyB,CAAC;AAEjG,IAAM,mBAAmB,8BAAgB,OAAO,gBAAgB;AAChE,IAAM,qBAAqB,8BAAgB,OAAO,kBAAkB;AACpE,IAAM,qBAAqB,gCAAY,OAAO,gBAAgB;AAC9D,IAAM,uBAAuB,gCAAY,OAAO,kBAAkB;","names":[]}
|
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var SentinelReportQuerySchema = "network.xyo.query.sentinel.report";
|
|
|
6
6
|
|
|
7
7
|
// src/typeChecks.ts
|
|
8
8
|
import { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from "@xyo-network/module-model";
|
|
9
|
-
import { AsObjectFactory } from "@xyo-network/object
|
|
9
|
+
import { AsObjectFactory } from "@xyo-network/object";
|
|
10
10
|
var isSentinelInstance = new IsInstanceFactory().create({ report: "function" }, [isModuleInstance]);
|
|
11
11
|
var isSentinelModule = new IsModuleFactory().create([SentinelReportQuerySchema]);
|
|
12
12
|
var asSentinelModule = AsObjectFactory.create(isSentinelModule);
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Config.ts","../src/Queries/Report.ts","../src/typeChecks.ts"],"sourcesContent":["import { ArchivingModuleConfig } from '@xyo-network/archivist'\nimport { ModuleConfig } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport type SentinelConfigSchema = 'network.xyo.sentinel.config'\nexport const SentinelConfigSchema: SentinelConfigSchema = 'network.xyo.sentinel.config'\n\nexport type SentinelConfig<TConfig extends Payload =
|
|
1
|
+
{"version":3,"sources":["../src/Config.ts","../src/Queries/Report.ts","../src/typeChecks.ts"],"sourcesContent":["import { ArchivingModuleConfig } from '@xyo-network/archivist'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport type SentinelConfigSchema = 'network.xyo.sentinel.config'\nexport const SentinelConfigSchema: SentinelConfigSchema = 'network.xyo.sentinel.config'\n\nexport type SentinelConfig<TConfig extends Payload | void = void> = ModuleConfig<\n TConfig,\n ArchivingModuleConfig & {\n witnesses?: string[]\n },\n TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n>\n","import { Query } from '@xyo-network/payload-model'\n\nexport type SentinelReportQuerySchema = 'network.xyo.query.sentinel.report'\nexport const SentinelReportQuerySchema: SentinelReportQuerySchema = 'network.xyo.query.sentinel.report'\n\nexport type SentinelReportQuery = Query<{\n schema: SentinelReportQuerySchema\n}>\n","import { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\nimport { AsObjectFactory } from '@xyo-network/object'\n\nimport { SentinelInstance } from './Instance'\nimport { SentinelModule } from './Module'\nimport { SentinelReportQuerySchema } from './Queries'\n\nexport const isSentinelInstance = new IsInstanceFactory<SentinelInstance>().create({ report: 'function' }, [isModuleInstance])\nexport const isSentinelModule = new IsModuleFactory<SentinelModule>().create([SentinelReportQuerySchema])\n\nexport const asSentinelModule = AsObjectFactory.create(isSentinelModule)\nexport const asSentinelInstance = AsObjectFactory.create(isSentinelInstance)\nexport const withSentinelModule = WithFactory.create(isSentinelModule)\nexport const withSentinelInstance = WithFactory.create(isSentinelInstance)\n"],"mappings":";AAKO,IAAM,uBAA6C;;;ACFnD,IAAM,4BAAuD;;;ACHpE,SAAS,mBAAmB,iBAAiB,kBAAkB,mBAAmB;AAClF,SAAS,uBAAuB;AAMzB,IAAM,qBAAqB,IAAI,kBAAoC,EAAE,OAAO,EAAE,QAAQ,WAAW,GAAG,CAAC,gBAAgB,CAAC;AACtH,IAAM,mBAAmB,IAAI,gBAAgC,EAAE,OAAO,CAAC,yBAAyB,CAAC;AAEjG,IAAM,mBAAmB,gBAAgB,OAAO,gBAAgB;AAChE,IAAM,qBAAqB,gBAAgB,OAAO,kBAAkB;AACpE,IAAM,qBAAqB,YAAY,OAAO,gBAAgB;AAC9D,IAAM,uBAAuB,YAAY,OAAO,kBAAkB;","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SentinelInstance } from './Instance';
|
|
2
|
+
import { SentinelModule } from './Module';
|
|
3
|
+
export declare const isSentinelInstance: import("@xyo-network/object").ObjectTypeCheck<SentinelInstance>;
|
|
4
|
+
export declare const isSentinelModule: import("@xyo-network/module-model").ModuleTypeCheck<SentinelModule>;
|
|
5
|
+
export declare const asSentinelModule: {
|
|
6
|
+
<TObject extends SentinelModule>(obj: object | null | undefined, config?: import("@xyo-network/object").ObjectTypeConfig | undefined): TObject | undefined;
|
|
7
|
+
<TObject_1 extends SentinelModule>(obj: object | null | undefined, assert: string | (() => string), config?: import("@xyo-network/object").ObjectTypeConfig | undefined): TObject_1;
|
|
8
|
+
};
|
|
9
|
+
export declare const asSentinelInstance: {
|
|
10
|
+
<TObject extends SentinelInstance>(obj: object | null | undefined, config?: import("@xyo-network/object").ObjectTypeConfig | undefined): TObject | undefined;
|
|
11
|
+
<TObject_1 extends SentinelInstance>(obj: object | null | undefined, assert: string | (() => string), config?: import("@xyo-network/object").ObjectTypeConfig | undefined): TObject_1;
|
|
12
|
+
};
|
|
13
|
+
export declare const withSentinelModule: <R>(module: any, closure: (module: SentinelModule) => R) => R | undefined;
|
|
14
|
+
export declare const withSentinelInstance: <R>(module: any, closure: (module: SentinelInstance) => R) => R | undefined;
|
|
15
|
+
//# sourceMappingURL=typeChecks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeChecks.d.ts","sourceRoot":"","sources":["../src/typeChecks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAGzC,eAAO,MAAM,kBAAkB,iEAA+F,CAAA;AAC9H,eAAO,MAAM,gBAAgB,qEAA4E,CAAA;AAEzG,eAAO,MAAM,gBAAgB;;;CAA2C,CAAA;AACxE,eAAO,MAAM,kBAAkB;;;CAA6C,CAAA;AAC5E,eAAO,MAAM,kBAAkB,2EAAuC,CAAA;AACtE,eAAO,MAAM,oBAAoB,6EAAyC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SentinelInstance } from './Instance';
|
|
2
|
+
import { SentinelModule } from './Module';
|
|
3
|
+
export declare const isSentinelInstance: import("@xyo-network/object").ObjectTypeCheck<SentinelInstance>;
|
|
4
|
+
export declare const isSentinelModule: import("@xyo-network/module-model").ModuleTypeCheck<SentinelModule>;
|
|
5
|
+
export declare const asSentinelModule: {
|
|
6
|
+
<TObject extends SentinelModule>(obj: object | null | undefined, config?: import("@xyo-network/object").ObjectTypeConfig | undefined): TObject | undefined;
|
|
7
|
+
<TObject_1 extends SentinelModule>(obj: object | null | undefined, assert: string | (() => string), config?: import("@xyo-network/object").ObjectTypeConfig | undefined): TObject_1;
|
|
8
|
+
};
|
|
9
|
+
export declare const asSentinelInstance: {
|
|
10
|
+
<TObject extends SentinelInstance>(obj: object | null | undefined, config?: import("@xyo-network/object").ObjectTypeConfig | undefined): TObject | undefined;
|
|
11
|
+
<TObject_1 extends SentinelInstance>(obj: object | null | undefined, assert: string | (() => string), config?: import("@xyo-network/object").ObjectTypeConfig | undefined): TObject_1;
|
|
12
|
+
};
|
|
13
|
+
export declare const withSentinelModule: <R>(module: any, closure: (module: SentinelModule) => R) => R | undefined;
|
|
14
|
+
export declare const withSentinelInstance: <R>(module: any, closure: (module: SentinelInstance) => R) => R | undefined;
|
|
15
|
+
//# sourceMappingURL=typeChecks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeChecks.d.ts","sourceRoot":"","sources":["../src/typeChecks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAGzC,eAAO,MAAM,kBAAkB,iEAA+F,CAAA;AAC9H,eAAO,MAAM,gBAAgB,qEAA4E,CAAA;AAEzG,eAAO,MAAM,gBAAgB;;;CAA2C,CAAA;AACxE,eAAO,MAAM,kBAAkB;;;CAA6C,CAAA;AAC5E,eAAO,MAAM,kBAAkB,2EAAuC,CAAA;AACtE,eAAO,MAAM,oBAAoB,6EAAyC,CAAA"}
|