@xyo-network/sentinel-model 2.102.6 → 2.103.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/browser/Config.d.cts +1 -1
- package/dist/browser/Config.d.cts.map +1 -1
- package/dist/browser/Config.d.mts +1 -1
- package/dist/browser/Config.d.mts.map +1 -1
- package/dist/browser/Config.d.ts +1 -1
- package/dist/browser/Config.d.ts.map +1 -1
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/neutral/Config.d.cts +1 -1
- package/dist/neutral/Config.d.cts.map +1 -1
- package/dist/neutral/Config.d.mts +1 -1
- package/dist/neutral/Config.d.mts.map +1 -1
- package/dist/neutral/Config.d.ts +1 -1
- package/dist/neutral/Config.d.ts.map +1 -1
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.js.map +1 -1
- package/dist/node/Config.d.cts +1 -1
- package/dist/node/Config.d.cts.map +1 -1
- package/dist/node/Config.d.mts +1 -1
- package/dist/node/Config.d.mts.map +1 -1
- package/dist/node/Config.d.ts +1 -1
- package/dist/node/Config.d.ts.map +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +9 -9
- package/src/Config.ts +1 -1
|
@@ -3,7 +3,7 @@ import { ModuleConfig } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload } from '@xyo-network/payload-model';
|
|
4
4
|
import { SentinelAutomationPayload } from './Automation';
|
|
5
5
|
import { Task } from './Task';
|
|
6
|
-
export declare const SentinelConfigSchema
|
|
6
|
+
export declare const SentinelConfigSchema: "network.xyo.sentinel.config";
|
|
7
7
|
export type SentinelConfigSchema = typeof SentinelConfigSchema;
|
|
8
8
|
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<WithAdditional<{
|
|
9
9
|
automations?: SentinelAutomationPayload[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,+BAAyC,CAAA;AAC1E,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAA;AAE9D,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,OAAO,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,YAAY,CACpH,cAAc,CACZ;IACE,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACzC,MAAM,EAAE,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAA;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,EACD,OAAO,CACR,EACD,OAAO,CACR,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { ModuleConfig } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload } from '@xyo-network/payload-model';
|
|
4
4
|
import { SentinelAutomationPayload } from './Automation';
|
|
5
5
|
import { Task } from './Task';
|
|
6
|
-
export declare const SentinelConfigSchema
|
|
6
|
+
export declare const SentinelConfigSchema: "network.xyo.sentinel.config";
|
|
7
7
|
export type SentinelConfigSchema = typeof SentinelConfigSchema;
|
|
8
8
|
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<WithAdditional<{
|
|
9
9
|
automations?: SentinelAutomationPayload[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,+BAAyC,CAAA;AAC1E,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAA;AAE9D,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,OAAO,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,YAAY,CACpH,cAAc,CACZ;IACE,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACzC,MAAM,EAAE,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAA;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,EACD,OAAO,CACR,EACD,OAAO,CACR,CAAA"}
|
package/dist/browser/Config.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ModuleConfig } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload } from '@xyo-network/payload-model';
|
|
4
4
|
import { SentinelAutomationPayload } from './Automation';
|
|
5
5
|
import { Task } from './Task';
|
|
6
|
-
export declare const SentinelConfigSchema
|
|
6
|
+
export declare const SentinelConfigSchema: "network.xyo.sentinel.config";
|
|
7
7
|
export type SentinelConfigSchema = typeof SentinelConfigSchema;
|
|
8
8
|
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<WithAdditional<{
|
|
9
9
|
automations?: SentinelAutomationPayload[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,+BAAyC,CAAA;AAC1E,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAA;AAE9D,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,OAAO,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,YAAY,CACpH,cAAc,CACZ;IACE,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACzC,MAAM,EAAE,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAA;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,EACD,OAAO,CACR,EACD,OAAO,CACR,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Automation.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["export * from './Automation'\nexport * from './Config'\nexport * from './EventData'\nexport * from './EventsModels'\nexport * from './Instance'\nexport * from './Job'\nexport * from './Module'\nexport * from './Params'\nexport * from './Queries'\nexport * from './ResolvedTask'\nexport * from './Sentinel'\nexport * from './Task'\nexport * from './typeChecks'\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type SentinelAutomationSchema = 'network.xyo.automation'\nexport const SentinelAutomationSchema: SentinelAutomationSchema = 'network.xyo.automation'\n\nexport type SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\nexport const SentinelIntervalAutomationSchema: SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\n\nexport type SentinelEventAutomationSchema = 'network.xyo.automation.event'\nexport const SentinelEventAutomationSchema: SentinelEventAutomationSchema = 'network.xyo.automation.event'\n\nexport type SentinelBaseAutomationPayload<T extends Payload> = Payload<\n {\n type?: 'interval' | 'event'\n } & T\n>\n\n/** Settings for an Interval Automation */\nexport type SentinelIntervalAutomationPayload = SentinelBaseAutomationPayload<{\n /** Epoch after which any reoccurrence stops */\n end?: number\n\n /** Time between triggers [non-repeating if undefined] */\n frequency?: number\n\n /** Units for frequency field [hour if undefined] */\n frequencyUnits?: 'second' | 'minute' | 'hour' | 'day'\n\n /** Remaining triggers [infinite if undefined] */\n remaining?: number\n\n schema: SentinelIntervalAutomationSchema\n\n /** Epoch of the next trigger */\n start: number\n\n /** The type of automation */\n type: 'interval'\n}>\n\nexport const isSentinelIntervalAutomation = isPayloadOfSchemaType<SentinelIntervalAutomationPayload>(SentinelIntervalAutomationSchema)\n\n/** Settings for an Event Automation */\nexport type SentinelEventAutomationPayload = SentinelBaseAutomationPayload<{\n schema: SentinelEventAutomationSchema\n type: 'event'\n}>\n\n/** Settings for an Automation */\nexport type SentinelAutomationPayload = Payload<\n SentinelIntervalAutomationPayload | SentinelEventAutomationPayload,\n SentinelAutomationSchema | SentinelIntervalAutomationSchema | SentinelEventAutomationSchema\n>\n","import { WithAdditional } from '@xylabs/object'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelAutomationPayload } from './Automation'\nimport { Task } from './Task'\n\nexport const SentinelConfigSchema = 'network.xyo.sentinel.config'\nexport type SentinelConfigSchema = typeof SentinelConfigSchema\n\nexport type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n automations?: SentinelAutomationPayload[]\n schema: TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n synchronous?: boolean\n tasks: Task[]\n throwErrors?: boolean\n },\n TConfig\n >,\n TSchema\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 { AsObjectFactory } from '@xylabs/object'\nimport { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\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;;;;;;;;;;;;;;;;;;ACAA,2BAA+C;AAGxC,IAAMA,2BAAqD;AAG3D,IAAMC,mCAAqE;AAG3E,IAAMC,gCAA+D;AA+BrE,IAAMC,mCAA+BC,4CAAyDH,gCAAAA;;;ACjC9F,IAAMI,uBAAuB;;;ACJ7B,IAAMC,4BAAuD;;;ACHpE,oBAAgC;AAChC,0BAAkF;AAM3E,IAAMC,qBAAqB,IAAIC,sCAAAA,EAAsCC,OAAO;EAAEC,QAAQ;AAAW,GAAG;EAACC;CAAiB;AACtH,IAAMC,mBAAmB,IAAIC,oCAAAA,EAAkCJ,OAAO;EAACK;CAA0B;AAEjG,IAAMC,mBAAmBC,8BAAgBP,OAAOG,gBAAAA;AAChD,IAAMK,qBAAqBD,8BAAgBP,OAAOF,kBAAAA;AAClD,IAAMW,qBAAqBC,gCAAYV,OAAOG,gBAAAA;AAC9C,IAAMQ,uBAAuBD,gCAAYV,OAAOF,kBAAAA;","names":["SentinelAutomationSchema","SentinelIntervalAutomationSchema","SentinelEventAutomationSchema","isSentinelIntervalAutomation","isPayloadOfSchemaType","SentinelConfigSchema","SentinelReportQuerySchema","isSentinelInstance","IsInstanceFactory","create","report","isModuleInstance","isSentinelModule","IsModuleFactory","SentinelReportQuerySchema","asSentinelModule","AsObjectFactory","asSentinelInstance","withSentinelModule","WithFactory","withSentinelInstance"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Automation.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["export * from './Automation'\nexport * from './Config'\nexport * from './EventData'\nexport * from './EventsModels'\nexport * from './Instance'\nexport * from './Job'\nexport * from './Module'\nexport * from './Params'\nexport * from './Queries'\nexport * from './ResolvedTask'\nexport * from './Sentinel'\nexport * from './Task'\nexport * from './typeChecks'\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type SentinelAutomationSchema = 'network.xyo.automation'\nexport const SentinelAutomationSchema: SentinelAutomationSchema = 'network.xyo.automation'\n\nexport type SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\nexport const SentinelIntervalAutomationSchema: SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\n\nexport type SentinelEventAutomationSchema = 'network.xyo.automation.event'\nexport const SentinelEventAutomationSchema: SentinelEventAutomationSchema = 'network.xyo.automation.event'\n\nexport type SentinelBaseAutomationPayload<T extends Payload> = Payload<\n {\n type?: 'interval' | 'event'\n } & T\n>\n\n/** Settings for an Interval Automation */\nexport type SentinelIntervalAutomationPayload = SentinelBaseAutomationPayload<{\n /** Epoch after which any reoccurrence stops */\n end?: number\n\n /** Time between triggers [non-repeating if undefined] */\n frequency?: number\n\n /** Units for frequency field [hour if undefined] */\n frequencyUnits?: 'second' | 'minute' | 'hour' | 'day'\n\n /** Remaining triggers [infinite if undefined] */\n remaining?: number\n\n schema: SentinelIntervalAutomationSchema\n\n /** Epoch of the next trigger */\n start: number\n\n /** The type of automation */\n type: 'interval'\n}>\n\nexport const isSentinelIntervalAutomation = isPayloadOfSchemaType<SentinelIntervalAutomationPayload>(SentinelIntervalAutomationSchema)\n\n/** Settings for an Event Automation */\nexport type SentinelEventAutomationPayload = SentinelBaseAutomationPayload<{\n schema: SentinelEventAutomationSchema\n type: 'event'\n}>\n\n/** Settings for an Automation */\nexport type SentinelAutomationPayload = Payload<\n SentinelIntervalAutomationPayload | SentinelEventAutomationPayload,\n SentinelAutomationSchema | SentinelIntervalAutomationSchema | SentinelEventAutomationSchema\n>\n","import { WithAdditional } from '@xylabs/object'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelAutomationPayload } from './Automation'\nimport { Task } from './Task'\n\nexport const SentinelConfigSchema = 'network.xyo.sentinel.config' as const\nexport type SentinelConfigSchema = typeof SentinelConfigSchema\n\nexport type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n automations?: SentinelAutomationPayload[]\n schema: TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n synchronous?: boolean\n tasks: Task[]\n throwErrors?: boolean\n },\n TConfig\n >,\n TSchema\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 { AsObjectFactory } from '@xylabs/object'\nimport { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\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;;;;;;;;;;;;;;;;;;ACAA,2BAA+C;AAGxC,IAAMA,2BAAqD;AAG3D,IAAMC,mCAAqE;AAG3E,IAAMC,gCAA+D;AA+BrE,IAAMC,mCAA+BC,4CAAyDH,gCAAAA;;;ACjC9F,IAAMI,uBAAuB;;;ACJ7B,IAAMC,4BAAuD;;;ACHpE,oBAAgC;AAChC,0BAAkF;AAM3E,IAAMC,qBAAqB,IAAIC,sCAAAA,EAAsCC,OAAO;EAAEC,QAAQ;AAAW,GAAG;EAACC;CAAiB;AACtH,IAAMC,mBAAmB,IAAIC,oCAAAA,EAAkCJ,OAAO;EAACK;CAA0B;AAEjG,IAAMC,mBAAmBC,8BAAgBP,OAAOG,gBAAAA;AAChD,IAAMK,qBAAqBD,8BAAgBP,OAAOF,kBAAAA;AAClD,IAAMW,qBAAqBC,gCAAYV,OAAOG,gBAAAA;AAC9C,IAAMQ,uBAAuBD,gCAAYV,OAAOF,kBAAAA;","names":["SentinelAutomationSchema","SentinelIntervalAutomationSchema","SentinelEventAutomationSchema","isSentinelIntervalAutomation","isPayloadOfSchemaType","SentinelConfigSchema","SentinelReportQuerySchema","isSentinelInstance","IsInstanceFactory","create","report","isModuleInstance","isSentinelModule","IsModuleFactory","SentinelReportQuerySchema","asSentinelModule","AsObjectFactory","asSentinelInstance","withSentinelModule","WithFactory","withSentinelInstance"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Automation.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type SentinelAutomationSchema = 'network.xyo.automation'\nexport const SentinelAutomationSchema: SentinelAutomationSchema = 'network.xyo.automation'\n\nexport type SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\nexport const SentinelIntervalAutomationSchema: SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\n\nexport type SentinelEventAutomationSchema = 'network.xyo.automation.event'\nexport const SentinelEventAutomationSchema: SentinelEventAutomationSchema = 'network.xyo.automation.event'\n\nexport type SentinelBaseAutomationPayload<T extends Payload> = Payload<\n {\n type?: 'interval' | 'event'\n } & T\n>\n\n/** Settings for an Interval Automation */\nexport type SentinelIntervalAutomationPayload = SentinelBaseAutomationPayload<{\n /** Epoch after which any reoccurrence stops */\n end?: number\n\n /** Time between triggers [non-repeating if undefined] */\n frequency?: number\n\n /** Units for frequency field [hour if undefined] */\n frequencyUnits?: 'second' | 'minute' | 'hour' | 'day'\n\n /** Remaining triggers [infinite if undefined] */\n remaining?: number\n\n schema: SentinelIntervalAutomationSchema\n\n /** Epoch of the next trigger */\n start: number\n\n /** The type of automation */\n type: 'interval'\n}>\n\nexport const isSentinelIntervalAutomation = isPayloadOfSchemaType<SentinelIntervalAutomationPayload>(SentinelIntervalAutomationSchema)\n\n/** Settings for an Event Automation */\nexport type SentinelEventAutomationPayload = SentinelBaseAutomationPayload<{\n schema: SentinelEventAutomationSchema\n type: 'event'\n}>\n\n/** Settings for an Automation */\nexport type SentinelAutomationPayload = Payload<\n SentinelIntervalAutomationPayload | SentinelEventAutomationPayload,\n SentinelAutomationSchema | SentinelIntervalAutomationSchema | SentinelEventAutomationSchema\n>\n","import { WithAdditional } from '@xylabs/object'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelAutomationPayload } from './Automation'\nimport { Task } from './Task'\n\nexport const SentinelConfigSchema = 'network.xyo.sentinel.config'\nexport type SentinelConfigSchema = typeof SentinelConfigSchema\n\nexport type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n automations?: SentinelAutomationPayload[]\n schema: TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n synchronous?: boolean\n tasks: Task[]\n throwErrors?: boolean\n },\n TConfig\n >,\n TSchema\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 { AsObjectFactory } from '@xylabs/object'\nimport { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\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,SAASA,6BAAsC;AAGxC,IAAMC,2BAAqD;AAG3D,IAAMC,mCAAqE;AAG3E,IAAMC,gCAA+D;AA+BrE,IAAMC,+BAA+BJ,sBAAyDE,gCAAAA;;;ACjC9F,IAAMG,uBAAuB;;;ACJ7B,IAAMC,4BAAuD;;;ACHpE,SAASC,uBAAuB;AAChC,SAASC,mBAAmBC,iBAAiBC,kBAAkBC,mBAAmB;AAM3E,IAAMC,qBAAqB,IAAIC,kBAAAA,EAAsCC,OAAO;EAAEC,QAAQ;AAAW,GAAG;EAACC;CAAiB;AACtH,IAAMC,mBAAmB,IAAIC,gBAAAA,EAAkCJ,OAAO;EAACK;CAA0B;AAEjG,IAAMC,mBAAmBC,gBAAgBP,OAAOG,gBAAAA;AAChD,IAAMK,qBAAqBD,gBAAgBP,OAAOF,kBAAAA;AAClD,IAAMW,qBAAqBC,YAAYV,OAAOG,gBAAAA;AAC9C,IAAMQ,uBAAuBD,YAAYV,OAAOF,kBAAAA;","names":["isPayloadOfSchemaType","SentinelAutomationSchema","SentinelIntervalAutomationSchema","SentinelEventAutomationSchema","isSentinelIntervalAutomation","SentinelConfigSchema","SentinelReportQuerySchema","AsObjectFactory","IsInstanceFactory","IsModuleFactory","isModuleInstance","WithFactory","isSentinelInstance","IsInstanceFactory","create","report","isModuleInstance","isSentinelModule","IsModuleFactory","SentinelReportQuerySchema","asSentinelModule","AsObjectFactory","asSentinelInstance","withSentinelModule","WithFactory","withSentinelInstance"]}
|
|
1
|
+
{"version":3,"sources":["../../src/Automation.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type SentinelAutomationSchema = 'network.xyo.automation'\nexport const SentinelAutomationSchema: SentinelAutomationSchema = 'network.xyo.automation'\n\nexport type SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\nexport const SentinelIntervalAutomationSchema: SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\n\nexport type SentinelEventAutomationSchema = 'network.xyo.automation.event'\nexport const SentinelEventAutomationSchema: SentinelEventAutomationSchema = 'network.xyo.automation.event'\n\nexport type SentinelBaseAutomationPayload<T extends Payload> = Payload<\n {\n type?: 'interval' | 'event'\n } & T\n>\n\n/** Settings for an Interval Automation */\nexport type SentinelIntervalAutomationPayload = SentinelBaseAutomationPayload<{\n /** Epoch after which any reoccurrence stops */\n end?: number\n\n /** Time between triggers [non-repeating if undefined] */\n frequency?: number\n\n /** Units for frequency field [hour if undefined] */\n frequencyUnits?: 'second' | 'minute' | 'hour' | 'day'\n\n /** Remaining triggers [infinite if undefined] */\n remaining?: number\n\n schema: SentinelIntervalAutomationSchema\n\n /** Epoch of the next trigger */\n start: number\n\n /** The type of automation */\n type: 'interval'\n}>\n\nexport const isSentinelIntervalAutomation = isPayloadOfSchemaType<SentinelIntervalAutomationPayload>(SentinelIntervalAutomationSchema)\n\n/** Settings for an Event Automation */\nexport type SentinelEventAutomationPayload = SentinelBaseAutomationPayload<{\n schema: SentinelEventAutomationSchema\n type: 'event'\n}>\n\n/** Settings for an Automation */\nexport type SentinelAutomationPayload = Payload<\n SentinelIntervalAutomationPayload | SentinelEventAutomationPayload,\n SentinelAutomationSchema | SentinelIntervalAutomationSchema | SentinelEventAutomationSchema\n>\n","import { WithAdditional } from '@xylabs/object'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelAutomationPayload } from './Automation'\nimport { Task } from './Task'\n\nexport const SentinelConfigSchema = 'network.xyo.sentinel.config' as const\nexport type SentinelConfigSchema = typeof SentinelConfigSchema\n\nexport type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n automations?: SentinelAutomationPayload[]\n schema: TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n synchronous?: boolean\n tasks: Task[]\n throwErrors?: boolean\n },\n TConfig\n >,\n TSchema\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 { AsObjectFactory } from '@xylabs/object'\nimport { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\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,SAASA,6BAAsC;AAGxC,IAAMC,2BAAqD;AAG3D,IAAMC,mCAAqE;AAG3E,IAAMC,gCAA+D;AA+BrE,IAAMC,+BAA+BJ,sBAAyDE,gCAAAA;;;ACjC9F,IAAMG,uBAAuB;;;ACJ7B,IAAMC,4BAAuD;;;ACHpE,SAASC,uBAAuB;AAChC,SAASC,mBAAmBC,iBAAiBC,kBAAkBC,mBAAmB;AAM3E,IAAMC,qBAAqB,IAAIC,kBAAAA,EAAsCC,OAAO;EAAEC,QAAQ;AAAW,GAAG;EAACC;CAAiB;AACtH,IAAMC,mBAAmB,IAAIC,gBAAAA,EAAkCJ,OAAO;EAACK;CAA0B;AAEjG,IAAMC,mBAAmBC,gBAAgBP,OAAOG,gBAAAA;AAChD,IAAMK,qBAAqBD,gBAAgBP,OAAOF,kBAAAA;AAClD,IAAMW,qBAAqBC,YAAYV,OAAOG,gBAAAA;AAC9C,IAAMQ,uBAAuBD,YAAYV,OAAOF,kBAAAA;","names":["isPayloadOfSchemaType","SentinelAutomationSchema","SentinelIntervalAutomationSchema","SentinelEventAutomationSchema","isSentinelIntervalAutomation","SentinelConfigSchema","SentinelReportQuerySchema","AsObjectFactory","IsInstanceFactory","IsModuleFactory","isModuleInstance","WithFactory","isSentinelInstance","IsInstanceFactory","create","report","isModuleInstance","isSentinelModule","IsModuleFactory","SentinelReportQuerySchema","asSentinelModule","AsObjectFactory","asSentinelInstance","withSentinelModule","WithFactory","withSentinelInstance"]}
|
|
@@ -3,7 +3,7 @@ import { ModuleConfig } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload } from '@xyo-network/payload-model';
|
|
4
4
|
import { SentinelAutomationPayload } from './Automation';
|
|
5
5
|
import { Task } from './Task';
|
|
6
|
-
export declare const SentinelConfigSchema
|
|
6
|
+
export declare const SentinelConfigSchema: "network.xyo.sentinel.config";
|
|
7
7
|
export type SentinelConfigSchema = typeof SentinelConfigSchema;
|
|
8
8
|
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<WithAdditional<{
|
|
9
9
|
automations?: SentinelAutomationPayload[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,+BAAyC,CAAA;AAC1E,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAA;AAE9D,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,OAAO,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,YAAY,CACpH,cAAc,CACZ;IACE,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACzC,MAAM,EAAE,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAA;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,EACD,OAAO,CACR,EACD,OAAO,CACR,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { ModuleConfig } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload } from '@xyo-network/payload-model';
|
|
4
4
|
import { SentinelAutomationPayload } from './Automation';
|
|
5
5
|
import { Task } from './Task';
|
|
6
|
-
export declare const SentinelConfigSchema
|
|
6
|
+
export declare const SentinelConfigSchema: "network.xyo.sentinel.config";
|
|
7
7
|
export type SentinelConfigSchema = typeof SentinelConfigSchema;
|
|
8
8
|
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<WithAdditional<{
|
|
9
9
|
automations?: SentinelAutomationPayload[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,+BAAyC,CAAA;AAC1E,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAA;AAE9D,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,OAAO,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,YAAY,CACpH,cAAc,CACZ;IACE,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACzC,MAAM,EAAE,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAA;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,EACD,OAAO,CACR,EACD,OAAO,CACR,CAAA"}
|
package/dist/neutral/Config.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ModuleConfig } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload } from '@xyo-network/payload-model';
|
|
4
4
|
import { SentinelAutomationPayload } from './Automation';
|
|
5
5
|
import { Task } from './Task';
|
|
6
|
-
export declare const SentinelConfigSchema
|
|
6
|
+
export declare const SentinelConfigSchema: "network.xyo.sentinel.config";
|
|
7
7
|
export type SentinelConfigSchema = typeof SentinelConfigSchema;
|
|
8
8
|
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<WithAdditional<{
|
|
9
9
|
automations?: SentinelAutomationPayload[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,+BAAyC,CAAA;AAC1E,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAA;AAE9D,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,OAAO,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,YAAY,CACpH,cAAc,CACZ;IACE,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACzC,MAAM,EAAE,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAA;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,EACD,OAAO,CACR,EACD,OAAO,CACR,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Automation.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["export * from './Automation'\nexport * from './Config'\nexport * from './EventData'\nexport * from './EventsModels'\nexport * from './Instance'\nexport * from './Job'\nexport * from './Module'\nexport * from './Params'\nexport * from './Queries'\nexport * from './ResolvedTask'\nexport * from './Sentinel'\nexport * from './Task'\nexport * from './typeChecks'\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type SentinelAutomationSchema = 'network.xyo.automation'\nexport const SentinelAutomationSchema: SentinelAutomationSchema = 'network.xyo.automation'\n\nexport type SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\nexport const SentinelIntervalAutomationSchema: SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\n\nexport type SentinelEventAutomationSchema = 'network.xyo.automation.event'\nexport const SentinelEventAutomationSchema: SentinelEventAutomationSchema = 'network.xyo.automation.event'\n\nexport type SentinelBaseAutomationPayload<T extends Payload> = Payload<\n {\n type?: 'interval' | 'event'\n } & T\n>\n\n/** Settings for an Interval Automation */\nexport type SentinelIntervalAutomationPayload = SentinelBaseAutomationPayload<{\n /** Epoch after which any reoccurrence stops */\n end?: number\n\n /** Time between triggers [non-repeating if undefined] */\n frequency?: number\n\n /** Units for frequency field [hour if undefined] */\n frequencyUnits?: 'second' | 'minute' | 'hour' | 'day'\n\n /** Remaining triggers [infinite if undefined] */\n remaining?: number\n\n schema: SentinelIntervalAutomationSchema\n\n /** Epoch of the next trigger */\n start: number\n\n /** The type of automation */\n type: 'interval'\n}>\n\nexport const isSentinelIntervalAutomation = isPayloadOfSchemaType<SentinelIntervalAutomationPayload>(SentinelIntervalAutomationSchema)\n\n/** Settings for an Event Automation */\nexport type SentinelEventAutomationPayload = SentinelBaseAutomationPayload<{\n schema: SentinelEventAutomationSchema\n type: 'event'\n}>\n\n/** Settings for an Automation */\nexport type SentinelAutomationPayload = Payload<\n SentinelIntervalAutomationPayload | SentinelEventAutomationPayload,\n SentinelAutomationSchema | SentinelIntervalAutomationSchema | SentinelEventAutomationSchema\n>\n","import { WithAdditional } from '@xylabs/object'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelAutomationPayload } from './Automation'\nimport { Task } from './Task'\n\nexport const SentinelConfigSchema = 'network.xyo.sentinel.config'\nexport type SentinelConfigSchema = typeof SentinelConfigSchema\n\nexport type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n automations?: SentinelAutomationPayload[]\n schema: TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n synchronous?: boolean\n tasks: Task[]\n throwErrors?: boolean\n },\n TConfig\n >,\n TSchema\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 { AsObjectFactory } from '@xylabs/object'\nimport { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\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;;;;;;;;;;;;;;;;;;ACAA,2BAA+C;AAGxC,IAAMA,2BAAqD;AAG3D,IAAMC,mCAAqE;AAG3E,IAAMC,gCAA+D;AA+BrE,IAAMC,mCAA+BC,4CAAyDH,gCAAAA;;;ACjC9F,IAAMI,uBAAuB;;;ACJ7B,IAAMC,4BAAuD;;;ACHpE,oBAAgC;AAChC,0BAAkF;AAM3E,IAAMC,qBAAqB,IAAIC,sCAAAA,EAAsCC,OAAO;EAAEC,QAAQ;AAAW,GAAG;EAACC;CAAiB;AACtH,IAAMC,mBAAmB,IAAIC,oCAAAA,EAAkCJ,OAAO;EAACK;CAA0B;AAEjG,IAAMC,mBAAmBC,8BAAgBP,OAAOG,gBAAAA;AAChD,IAAMK,qBAAqBD,8BAAgBP,OAAOF,kBAAAA;AAClD,IAAMW,qBAAqBC,gCAAYV,OAAOG,gBAAAA;AAC9C,IAAMQ,uBAAuBD,gCAAYV,OAAOF,kBAAAA;","names":["SentinelAutomationSchema","SentinelIntervalAutomationSchema","SentinelEventAutomationSchema","isSentinelIntervalAutomation","isPayloadOfSchemaType","SentinelConfigSchema","SentinelReportQuerySchema","isSentinelInstance","IsInstanceFactory","create","report","isModuleInstance","isSentinelModule","IsModuleFactory","SentinelReportQuerySchema","asSentinelModule","AsObjectFactory","asSentinelInstance","withSentinelModule","WithFactory","withSentinelInstance"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Automation.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["export * from './Automation'\nexport * from './Config'\nexport * from './EventData'\nexport * from './EventsModels'\nexport * from './Instance'\nexport * from './Job'\nexport * from './Module'\nexport * from './Params'\nexport * from './Queries'\nexport * from './ResolvedTask'\nexport * from './Sentinel'\nexport * from './Task'\nexport * from './typeChecks'\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type SentinelAutomationSchema = 'network.xyo.automation'\nexport const SentinelAutomationSchema: SentinelAutomationSchema = 'network.xyo.automation'\n\nexport type SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\nexport const SentinelIntervalAutomationSchema: SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\n\nexport type SentinelEventAutomationSchema = 'network.xyo.automation.event'\nexport const SentinelEventAutomationSchema: SentinelEventAutomationSchema = 'network.xyo.automation.event'\n\nexport type SentinelBaseAutomationPayload<T extends Payload> = Payload<\n {\n type?: 'interval' | 'event'\n } & T\n>\n\n/** Settings for an Interval Automation */\nexport type SentinelIntervalAutomationPayload = SentinelBaseAutomationPayload<{\n /** Epoch after which any reoccurrence stops */\n end?: number\n\n /** Time between triggers [non-repeating if undefined] */\n frequency?: number\n\n /** Units for frequency field [hour if undefined] */\n frequencyUnits?: 'second' | 'minute' | 'hour' | 'day'\n\n /** Remaining triggers [infinite if undefined] */\n remaining?: number\n\n schema: SentinelIntervalAutomationSchema\n\n /** Epoch of the next trigger */\n start: number\n\n /** The type of automation */\n type: 'interval'\n}>\n\nexport const isSentinelIntervalAutomation = isPayloadOfSchemaType<SentinelIntervalAutomationPayload>(SentinelIntervalAutomationSchema)\n\n/** Settings for an Event Automation */\nexport type SentinelEventAutomationPayload = SentinelBaseAutomationPayload<{\n schema: SentinelEventAutomationSchema\n type: 'event'\n}>\n\n/** Settings for an Automation */\nexport type SentinelAutomationPayload = Payload<\n SentinelIntervalAutomationPayload | SentinelEventAutomationPayload,\n SentinelAutomationSchema | SentinelIntervalAutomationSchema | SentinelEventAutomationSchema\n>\n","import { WithAdditional } from '@xylabs/object'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelAutomationPayload } from './Automation'\nimport { Task } from './Task'\n\nexport const SentinelConfigSchema = 'network.xyo.sentinel.config' as const\nexport type SentinelConfigSchema = typeof SentinelConfigSchema\n\nexport type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n automations?: SentinelAutomationPayload[]\n schema: TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n synchronous?: boolean\n tasks: Task[]\n throwErrors?: boolean\n },\n TConfig\n >,\n TSchema\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 { AsObjectFactory } from '@xylabs/object'\nimport { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\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;;;;;;;;;;;;;;;;;;ACAA,2BAA+C;AAGxC,IAAMA,2BAAqD;AAG3D,IAAMC,mCAAqE;AAG3E,IAAMC,gCAA+D;AA+BrE,IAAMC,mCAA+BC,4CAAyDH,gCAAAA;;;ACjC9F,IAAMI,uBAAuB;;;ACJ7B,IAAMC,4BAAuD;;;ACHpE,oBAAgC;AAChC,0BAAkF;AAM3E,IAAMC,qBAAqB,IAAIC,sCAAAA,EAAsCC,OAAO;EAAEC,QAAQ;AAAW,GAAG;EAACC;CAAiB;AACtH,IAAMC,mBAAmB,IAAIC,oCAAAA,EAAkCJ,OAAO;EAACK;CAA0B;AAEjG,IAAMC,mBAAmBC,8BAAgBP,OAAOG,gBAAAA;AAChD,IAAMK,qBAAqBD,8BAAgBP,OAAOF,kBAAAA;AAClD,IAAMW,qBAAqBC,gCAAYV,OAAOG,gBAAAA;AAC9C,IAAMQ,uBAAuBD,gCAAYV,OAAOF,kBAAAA;","names":["SentinelAutomationSchema","SentinelIntervalAutomationSchema","SentinelEventAutomationSchema","isSentinelIntervalAutomation","isPayloadOfSchemaType","SentinelConfigSchema","SentinelReportQuerySchema","isSentinelInstance","IsInstanceFactory","create","report","isModuleInstance","isSentinelModule","IsModuleFactory","SentinelReportQuerySchema","asSentinelModule","AsObjectFactory","asSentinelInstance","withSentinelModule","WithFactory","withSentinelInstance"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Automation.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type SentinelAutomationSchema = 'network.xyo.automation'\nexport const SentinelAutomationSchema: SentinelAutomationSchema = 'network.xyo.automation'\n\nexport type SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\nexport const SentinelIntervalAutomationSchema: SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\n\nexport type SentinelEventAutomationSchema = 'network.xyo.automation.event'\nexport const SentinelEventAutomationSchema: SentinelEventAutomationSchema = 'network.xyo.automation.event'\n\nexport type SentinelBaseAutomationPayload<T extends Payload> = Payload<\n {\n type?: 'interval' | 'event'\n } & T\n>\n\n/** Settings for an Interval Automation */\nexport type SentinelIntervalAutomationPayload = SentinelBaseAutomationPayload<{\n /** Epoch after which any reoccurrence stops */\n end?: number\n\n /** Time between triggers [non-repeating if undefined] */\n frequency?: number\n\n /** Units for frequency field [hour if undefined] */\n frequencyUnits?: 'second' | 'minute' | 'hour' | 'day'\n\n /** Remaining triggers [infinite if undefined] */\n remaining?: number\n\n schema: SentinelIntervalAutomationSchema\n\n /** Epoch of the next trigger */\n start: number\n\n /** The type of automation */\n type: 'interval'\n}>\n\nexport const isSentinelIntervalAutomation = isPayloadOfSchemaType<SentinelIntervalAutomationPayload>(SentinelIntervalAutomationSchema)\n\n/** Settings for an Event Automation */\nexport type SentinelEventAutomationPayload = SentinelBaseAutomationPayload<{\n schema: SentinelEventAutomationSchema\n type: 'event'\n}>\n\n/** Settings for an Automation */\nexport type SentinelAutomationPayload = Payload<\n SentinelIntervalAutomationPayload | SentinelEventAutomationPayload,\n SentinelAutomationSchema | SentinelIntervalAutomationSchema | SentinelEventAutomationSchema\n>\n","import { WithAdditional } from '@xylabs/object'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelAutomationPayload } from './Automation'\nimport { Task } from './Task'\n\nexport const SentinelConfigSchema = 'network.xyo.sentinel.config'\nexport type SentinelConfigSchema = typeof SentinelConfigSchema\n\nexport type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n automations?: SentinelAutomationPayload[]\n schema: TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n synchronous?: boolean\n tasks: Task[]\n throwErrors?: boolean\n },\n TConfig\n >,\n TSchema\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 { AsObjectFactory } from '@xylabs/object'\nimport { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\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,SAASA,6BAAsC;AAGxC,IAAMC,2BAAqD;AAG3D,IAAMC,mCAAqE;AAG3E,IAAMC,gCAA+D;AA+BrE,IAAMC,+BAA+BJ,sBAAyDE,gCAAAA;;;ACjC9F,IAAMG,uBAAuB;;;ACJ7B,IAAMC,4BAAuD;;;ACHpE,SAASC,uBAAuB;AAChC,SAASC,mBAAmBC,iBAAiBC,kBAAkBC,mBAAmB;AAM3E,IAAMC,qBAAqB,IAAIC,kBAAAA,EAAsCC,OAAO;EAAEC,QAAQ;AAAW,GAAG;EAACC;CAAiB;AACtH,IAAMC,mBAAmB,IAAIC,gBAAAA,EAAkCJ,OAAO;EAACK;CAA0B;AAEjG,IAAMC,mBAAmBC,gBAAgBP,OAAOG,gBAAAA;AAChD,IAAMK,qBAAqBD,gBAAgBP,OAAOF,kBAAAA;AAClD,IAAMW,qBAAqBC,YAAYV,OAAOG,gBAAAA;AAC9C,IAAMQ,uBAAuBD,YAAYV,OAAOF,kBAAAA;","names":["isPayloadOfSchemaType","SentinelAutomationSchema","SentinelIntervalAutomationSchema","SentinelEventAutomationSchema","isSentinelIntervalAutomation","SentinelConfigSchema","SentinelReportQuerySchema","AsObjectFactory","IsInstanceFactory","IsModuleFactory","isModuleInstance","WithFactory","isSentinelInstance","IsInstanceFactory","create","report","isModuleInstance","isSentinelModule","IsModuleFactory","SentinelReportQuerySchema","asSentinelModule","AsObjectFactory","asSentinelInstance","withSentinelModule","WithFactory","withSentinelInstance"]}
|
|
1
|
+
{"version":3,"sources":["../../src/Automation.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type SentinelAutomationSchema = 'network.xyo.automation'\nexport const SentinelAutomationSchema: SentinelAutomationSchema = 'network.xyo.automation'\n\nexport type SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\nexport const SentinelIntervalAutomationSchema: SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\n\nexport type SentinelEventAutomationSchema = 'network.xyo.automation.event'\nexport const SentinelEventAutomationSchema: SentinelEventAutomationSchema = 'network.xyo.automation.event'\n\nexport type SentinelBaseAutomationPayload<T extends Payload> = Payload<\n {\n type?: 'interval' | 'event'\n } & T\n>\n\n/** Settings for an Interval Automation */\nexport type SentinelIntervalAutomationPayload = SentinelBaseAutomationPayload<{\n /** Epoch after which any reoccurrence stops */\n end?: number\n\n /** Time between triggers [non-repeating if undefined] */\n frequency?: number\n\n /** Units for frequency field [hour if undefined] */\n frequencyUnits?: 'second' | 'minute' | 'hour' | 'day'\n\n /** Remaining triggers [infinite if undefined] */\n remaining?: number\n\n schema: SentinelIntervalAutomationSchema\n\n /** Epoch of the next trigger */\n start: number\n\n /** The type of automation */\n type: 'interval'\n}>\n\nexport const isSentinelIntervalAutomation = isPayloadOfSchemaType<SentinelIntervalAutomationPayload>(SentinelIntervalAutomationSchema)\n\n/** Settings for an Event Automation */\nexport type SentinelEventAutomationPayload = SentinelBaseAutomationPayload<{\n schema: SentinelEventAutomationSchema\n type: 'event'\n}>\n\n/** Settings for an Automation */\nexport type SentinelAutomationPayload = Payload<\n SentinelIntervalAutomationPayload | SentinelEventAutomationPayload,\n SentinelAutomationSchema | SentinelIntervalAutomationSchema | SentinelEventAutomationSchema\n>\n","import { WithAdditional } from '@xylabs/object'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelAutomationPayload } from './Automation'\nimport { Task } from './Task'\n\nexport const SentinelConfigSchema = 'network.xyo.sentinel.config' as const\nexport type SentinelConfigSchema = typeof SentinelConfigSchema\n\nexport type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n automations?: SentinelAutomationPayload[]\n schema: TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n synchronous?: boolean\n tasks: Task[]\n throwErrors?: boolean\n },\n TConfig\n >,\n TSchema\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 { AsObjectFactory } from '@xylabs/object'\nimport { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\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,SAASA,6BAAsC;AAGxC,IAAMC,2BAAqD;AAG3D,IAAMC,mCAAqE;AAG3E,IAAMC,gCAA+D;AA+BrE,IAAMC,+BAA+BJ,sBAAyDE,gCAAAA;;;ACjC9F,IAAMG,uBAAuB;;;ACJ7B,IAAMC,4BAAuD;;;ACHpE,SAASC,uBAAuB;AAChC,SAASC,mBAAmBC,iBAAiBC,kBAAkBC,mBAAmB;AAM3E,IAAMC,qBAAqB,IAAIC,kBAAAA,EAAsCC,OAAO;EAAEC,QAAQ;AAAW,GAAG;EAACC;CAAiB;AACtH,IAAMC,mBAAmB,IAAIC,gBAAAA,EAAkCJ,OAAO;EAACK;CAA0B;AAEjG,IAAMC,mBAAmBC,gBAAgBP,OAAOG,gBAAAA;AAChD,IAAMK,qBAAqBD,gBAAgBP,OAAOF,kBAAAA;AAClD,IAAMW,qBAAqBC,YAAYV,OAAOG,gBAAAA;AAC9C,IAAMQ,uBAAuBD,YAAYV,OAAOF,kBAAAA;","names":["isPayloadOfSchemaType","SentinelAutomationSchema","SentinelIntervalAutomationSchema","SentinelEventAutomationSchema","isSentinelIntervalAutomation","SentinelConfigSchema","SentinelReportQuerySchema","AsObjectFactory","IsInstanceFactory","IsModuleFactory","isModuleInstance","WithFactory","isSentinelInstance","IsInstanceFactory","create","report","isModuleInstance","isSentinelModule","IsModuleFactory","SentinelReportQuerySchema","asSentinelModule","AsObjectFactory","asSentinelInstance","withSentinelModule","WithFactory","withSentinelInstance"]}
|
package/dist/node/Config.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { ModuleConfig } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload } from '@xyo-network/payload-model';
|
|
4
4
|
import { SentinelAutomationPayload } from './Automation';
|
|
5
5
|
import { Task } from './Task';
|
|
6
|
-
export declare const SentinelConfigSchema
|
|
6
|
+
export declare const SentinelConfigSchema: "network.xyo.sentinel.config";
|
|
7
7
|
export type SentinelConfigSchema = typeof SentinelConfigSchema;
|
|
8
8
|
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<WithAdditional<{
|
|
9
9
|
automations?: SentinelAutomationPayload[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,+BAAyC,CAAA;AAC1E,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAA;AAE9D,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,OAAO,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,YAAY,CACpH,cAAc,CACZ;IACE,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACzC,MAAM,EAAE,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAA;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,EACD,OAAO,CACR,EACD,OAAO,CACR,CAAA"}
|
package/dist/node/Config.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { ModuleConfig } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload } from '@xyo-network/payload-model';
|
|
4
4
|
import { SentinelAutomationPayload } from './Automation';
|
|
5
5
|
import { Task } from './Task';
|
|
6
|
-
export declare const SentinelConfigSchema
|
|
6
|
+
export declare const SentinelConfigSchema: "network.xyo.sentinel.config";
|
|
7
7
|
export type SentinelConfigSchema = typeof SentinelConfigSchema;
|
|
8
8
|
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<WithAdditional<{
|
|
9
9
|
automations?: SentinelAutomationPayload[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,+BAAyC,CAAA;AAC1E,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAA;AAE9D,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,OAAO,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,YAAY,CACpH,cAAc,CACZ;IACE,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACzC,MAAM,EAAE,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAA;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,EACD,OAAO,CACR,EACD,OAAO,CACR,CAAA"}
|
package/dist/node/Config.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ModuleConfig } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload } from '@xyo-network/payload-model';
|
|
4
4
|
import { SentinelAutomationPayload } from './Automation';
|
|
5
5
|
import { Task } from './Task';
|
|
6
|
-
export declare const SentinelConfigSchema
|
|
6
|
+
export declare const SentinelConfigSchema: "network.xyo.sentinel.config";
|
|
7
7
|
export type SentinelConfigSchema = typeof SentinelConfigSchema;
|
|
8
8
|
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<WithAdditional<{
|
|
9
9
|
automations?: SentinelAutomationPayload[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,eAAO,MAAM,oBAAoB,+BAAyC,CAAA;AAC1E,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAA;AAE9D,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,OAAO,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,YAAY,CACpH,cAAc,CACZ;IACE,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACzC,MAAM,EAAE,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAA;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,EACD,OAAO,CACR,EACD,OAAO,CACR,CAAA"}
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Automation.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["export * from './Automation'\nexport * from './Config'\nexport * from './EventData'\nexport * from './EventsModels'\nexport * from './Instance'\nexport * from './Job'\nexport * from './Module'\nexport * from './Params'\nexport * from './Queries'\nexport * from './ResolvedTask'\nexport * from './Sentinel'\nexport * from './Task'\nexport * from './typeChecks'\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type SentinelAutomationSchema = 'network.xyo.automation'\nexport const SentinelAutomationSchema: SentinelAutomationSchema = 'network.xyo.automation'\n\nexport type SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\nexport const SentinelIntervalAutomationSchema: SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\n\nexport type SentinelEventAutomationSchema = 'network.xyo.automation.event'\nexport const SentinelEventAutomationSchema: SentinelEventAutomationSchema = 'network.xyo.automation.event'\n\nexport type SentinelBaseAutomationPayload<T extends Payload> = Payload<\n {\n type?: 'interval' | 'event'\n } & T\n>\n\n/** Settings for an Interval Automation */\nexport type SentinelIntervalAutomationPayload = SentinelBaseAutomationPayload<{\n /** Epoch after which any reoccurrence stops */\n end?: number\n\n /** Time between triggers [non-repeating if undefined] */\n frequency?: number\n\n /** Units for frequency field [hour if undefined] */\n frequencyUnits?: 'second' | 'minute' | 'hour' | 'day'\n\n /** Remaining triggers [infinite if undefined] */\n remaining?: number\n\n schema: SentinelIntervalAutomationSchema\n\n /** Epoch of the next trigger */\n start: number\n\n /** The type of automation */\n type: 'interval'\n}>\n\nexport const isSentinelIntervalAutomation = isPayloadOfSchemaType<SentinelIntervalAutomationPayload>(SentinelIntervalAutomationSchema)\n\n/** Settings for an Event Automation */\nexport type SentinelEventAutomationPayload = SentinelBaseAutomationPayload<{\n schema: SentinelEventAutomationSchema\n type: 'event'\n}>\n\n/** Settings for an Automation */\nexport type SentinelAutomationPayload = Payload<\n SentinelIntervalAutomationPayload | SentinelEventAutomationPayload,\n SentinelAutomationSchema | SentinelIntervalAutomationSchema | SentinelEventAutomationSchema\n>\n","import { WithAdditional } from '@xylabs/object'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelAutomationPayload } from './Automation'\nimport { Task } from './Task'\n\nexport const SentinelConfigSchema = 'network.xyo.sentinel.config'\nexport type SentinelConfigSchema = typeof SentinelConfigSchema\n\nexport type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n automations?: SentinelAutomationPayload[]\n schema: TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n synchronous?: boolean\n tasks: Task[]\n throwErrors?: boolean\n },\n TConfig\n >,\n TSchema\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 { AsObjectFactory } from '@xylabs/object'\nimport { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\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;;;;;;;;;;;;;;;;;;ACAA,2BAA+C;AAGxC,IAAMA,2BAAqD;AAG3D,IAAMC,mCAAqE;AAG3E,IAAMC,gCAA+D;AA+BrE,IAAMC,mCAA+BC,4CAAyDH,gCAAAA;;;ACjC9F,IAAMI,uBAAuB;;;ACJ7B,IAAMC,4BAAuD;;;ACHpE,oBAAgC;AAChC,0BAAkF;AAM3E,IAAMC,qBAAqB,IAAIC,sCAAAA,EAAsCC,OAAO;EAAEC,QAAQ;AAAW,GAAG;EAACC;CAAiB;AACtH,IAAMC,mBAAmB,IAAIC,oCAAAA,EAAkCJ,OAAO;EAACK;CAA0B;AAEjG,IAAMC,mBAAmBC,8BAAgBP,OAAOG,gBAAAA;AAChD,IAAMK,qBAAqBD,8BAAgBP,OAAOF,kBAAAA;AAClD,IAAMW,qBAAqBC,gCAAYV,OAAOG,gBAAAA;AAC9C,IAAMQ,uBAAuBD,gCAAYV,OAAOF,kBAAAA;","names":["SentinelAutomationSchema","SentinelIntervalAutomationSchema","SentinelEventAutomationSchema","isSentinelIntervalAutomation","isPayloadOfSchemaType","SentinelConfigSchema","SentinelReportQuerySchema","isSentinelInstance","IsInstanceFactory","create","report","isModuleInstance","isSentinelModule","IsModuleFactory","SentinelReportQuerySchema","asSentinelModule","AsObjectFactory","asSentinelInstance","withSentinelModule","WithFactory","withSentinelInstance"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Automation.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["export * from './Automation'\nexport * from './Config'\nexport * from './EventData'\nexport * from './EventsModels'\nexport * from './Instance'\nexport * from './Job'\nexport * from './Module'\nexport * from './Params'\nexport * from './Queries'\nexport * from './ResolvedTask'\nexport * from './Sentinel'\nexport * from './Task'\nexport * from './typeChecks'\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type SentinelAutomationSchema = 'network.xyo.automation'\nexport const SentinelAutomationSchema: SentinelAutomationSchema = 'network.xyo.automation'\n\nexport type SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\nexport const SentinelIntervalAutomationSchema: SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\n\nexport type SentinelEventAutomationSchema = 'network.xyo.automation.event'\nexport const SentinelEventAutomationSchema: SentinelEventAutomationSchema = 'network.xyo.automation.event'\n\nexport type SentinelBaseAutomationPayload<T extends Payload> = Payload<\n {\n type?: 'interval' | 'event'\n } & T\n>\n\n/** Settings for an Interval Automation */\nexport type SentinelIntervalAutomationPayload = SentinelBaseAutomationPayload<{\n /** Epoch after which any reoccurrence stops */\n end?: number\n\n /** Time between triggers [non-repeating if undefined] */\n frequency?: number\n\n /** Units for frequency field [hour if undefined] */\n frequencyUnits?: 'second' | 'minute' | 'hour' | 'day'\n\n /** Remaining triggers [infinite if undefined] */\n remaining?: number\n\n schema: SentinelIntervalAutomationSchema\n\n /** Epoch of the next trigger */\n start: number\n\n /** The type of automation */\n type: 'interval'\n}>\n\nexport const isSentinelIntervalAutomation = isPayloadOfSchemaType<SentinelIntervalAutomationPayload>(SentinelIntervalAutomationSchema)\n\n/** Settings for an Event Automation */\nexport type SentinelEventAutomationPayload = SentinelBaseAutomationPayload<{\n schema: SentinelEventAutomationSchema\n type: 'event'\n}>\n\n/** Settings for an Automation */\nexport type SentinelAutomationPayload = Payload<\n SentinelIntervalAutomationPayload | SentinelEventAutomationPayload,\n SentinelAutomationSchema | SentinelIntervalAutomationSchema | SentinelEventAutomationSchema\n>\n","import { WithAdditional } from '@xylabs/object'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelAutomationPayload } from './Automation'\nimport { Task } from './Task'\n\nexport const SentinelConfigSchema = 'network.xyo.sentinel.config' as const\nexport type SentinelConfigSchema = typeof SentinelConfigSchema\n\nexport type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n automations?: SentinelAutomationPayload[]\n schema: TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n synchronous?: boolean\n tasks: Task[]\n throwErrors?: boolean\n },\n TConfig\n >,\n TSchema\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 { AsObjectFactory } from '@xylabs/object'\nimport { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\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;;;;;;;;;;;;;;;;;;ACAA,2BAA+C;AAGxC,IAAMA,2BAAqD;AAG3D,IAAMC,mCAAqE;AAG3E,IAAMC,gCAA+D;AA+BrE,IAAMC,mCAA+BC,4CAAyDH,gCAAAA;;;ACjC9F,IAAMI,uBAAuB;;;ACJ7B,IAAMC,4BAAuD;;;ACHpE,oBAAgC;AAChC,0BAAkF;AAM3E,IAAMC,qBAAqB,IAAIC,sCAAAA,EAAsCC,OAAO;EAAEC,QAAQ;AAAW,GAAG;EAACC;CAAiB;AACtH,IAAMC,mBAAmB,IAAIC,oCAAAA,EAAkCJ,OAAO;EAACK;CAA0B;AAEjG,IAAMC,mBAAmBC,8BAAgBP,OAAOG,gBAAAA;AAChD,IAAMK,qBAAqBD,8BAAgBP,OAAOF,kBAAAA;AAClD,IAAMW,qBAAqBC,gCAAYV,OAAOG,gBAAAA;AAC9C,IAAMQ,uBAAuBD,gCAAYV,OAAOF,kBAAAA;","names":["SentinelAutomationSchema","SentinelIntervalAutomationSchema","SentinelEventAutomationSchema","isSentinelIntervalAutomation","isPayloadOfSchemaType","SentinelConfigSchema","SentinelReportQuerySchema","isSentinelInstance","IsInstanceFactory","create","report","isModuleInstance","isSentinelModule","IsModuleFactory","SentinelReportQuerySchema","asSentinelModule","AsObjectFactory","asSentinelInstance","withSentinelModule","WithFactory","withSentinelInstance"]}
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Automation.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type SentinelAutomationSchema = 'network.xyo.automation'\nexport const SentinelAutomationSchema: SentinelAutomationSchema = 'network.xyo.automation'\n\nexport type SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\nexport const SentinelIntervalAutomationSchema: SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\n\nexport type SentinelEventAutomationSchema = 'network.xyo.automation.event'\nexport const SentinelEventAutomationSchema: SentinelEventAutomationSchema = 'network.xyo.automation.event'\n\nexport type SentinelBaseAutomationPayload<T extends Payload> = Payload<\n {\n type?: 'interval' | 'event'\n } & T\n>\n\n/** Settings for an Interval Automation */\nexport type SentinelIntervalAutomationPayload = SentinelBaseAutomationPayload<{\n /** Epoch after which any reoccurrence stops */\n end?: number\n\n /** Time between triggers [non-repeating if undefined] */\n frequency?: number\n\n /** Units for frequency field [hour if undefined] */\n frequencyUnits?: 'second' | 'minute' | 'hour' | 'day'\n\n /** Remaining triggers [infinite if undefined] */\n remaining?: number\n\n schema: SentinelIntervalAutomationSchema\n\n /** Epoch of the next trigger */\n start: number\n\n /** The type of automation */\n type: 'interval'\n}>\n\nexport const isSentinelIntervalAutomation = isPayloadOfSchemaType<SentinelIntervalAutomationPayload>(SentinelIntervalAutomationSchema)\n\n/** Settings for an Event Automation */\nexport type SentinelEventAutomationPayload = SentinelBaseAutomationPayload<{\n schema: SentinelEventAutomationSchema\n type: 'event'\n}>\n\n/** Settings for an Automation */\nexport type SentinelAutomationPayload = Payload<\n SentinelIntervalAutomationPayload | SentinelEventAutomationPayload,\n SentinelAutomationSchema | SentinelIntervalAutomationSchema | SentinelEventAutomationSchema\n>\n","import { WithAdditional } from '@xylabs/object'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelAutomationPayload } from './Automation'\nimport { Task } from './Task'\n\nexport const SentinelConfigSchema = 'network.xyo.sentinel.config'\nexport type SentinelConfigSchema = typeof SentinelConfigSchema\n\nexport type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n automations?: SentinelAutomationPayload[]\n schema: TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n synchronous?: boolean\n tasks: Task[]\n throwErrors?: boolean\n },\n TConfig\n >,\n TSchema\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 { AsObjectFactory } from '@xylabs/object'\nimport { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\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,SAASA,6BAAsC;AAGxC,IAAMC,2BAAqD;AAG3D,IAAMC,mCAAqE;AAG3E,IAAMC,gCAA+D;AA+BrE,IAAMC,+BAA+BJ,sBAAyDE,gCAAAA;;;ACjC9F,IAAMG,uBAAuB;;;ACJ7B,IAAMC,4BAAuD;;;ACHpE,SAASC,uBAAuB;AAChC,SAASC,mBAAmBC,iBAAiBC,kBAAkBC,mBAAmB;AAM3E,IAAMC,qBAAqB,IAAIC,kBAAAA,EAAsCC,OAAO;EAAEC,QAAQ;AAAW,GAAG;EAACC;CAAiB;AACtH,IAAMC,mBAAmB,IAAIC,gBAAAA,EAAkCJ,OAAO;EAACK;CAA0B;AAEjG,IAAMC,mBAAmBC,gBAAgBP,OAAOG,gBAAAA;AAChD,IAAMK,qBAAqBD,gBAAgBP,OAAOF,kBAAAA;AAClD,IAAMW,qBAAqBC,YAAYV,OAAOG,gBAAAA;AAC9C,IAAMQ,uBAAuBD,YAAYV,OAAOF,kBAAAA;","names":["isPayloadOfSchemaType","SentinelAutomationSchema","SentinelIntervalAutomationSchema","SentinelEventAutomationSchema","isSentinelIntervalAutomation","SentinelConfigSchema","SentinelReportQuerySchema","AsObjectFactory","IsInstanceFactory","IsModuleFactory","isModuleInstance","WithFactory","isSentinelInstance","IsInstanceFactory","create","report","isModuleInstance","isSentinelModule","IsModuleFactory","SentinelReportQuerySchema","asSentinelModule","AsObjectFactory","asSentinelInstance","withSentinelModule","WithFactory","withSentinelInstance"]}
|
|
1
|
+
{"version":3,"sources":["../../src/Automation.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type SentinelAutomationSchema = 'network.xyo.automation'\nexport const SentinelAutomationSchema: SentinelAutomationSchema = 'network.xyo.automation'\n\nexport type SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\nexport const SentinelIntervalAutomationSchema: SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'\n\nexport type SentinelEventAutomationSchema = 'network.xyo.automation.event'\nexport const SentinelEventAutomationSchema: SentinelEventAutomationSchema = 'network.xyo.automation.event'\n\nexport type SentinelBaseAutomationPayload<T extends Payload> = Payload<\n {\n type?: 'interval' | 'event'\n } & T\n>\n\n/** Settings for an Interval Automation */\nexport type SentinelIntervalAutomationPayload = SentinelBaseAutomationPayload<{\n /** Epoch after which any reoccurrence stops */\n end?: number\n\n /** Time between triggers [non-repeating if undefined] */\n frequency?: number\n\n /** Units for frequency field [hour if undefined] */\n frequencyUnits?: 'second' | 'minute' | 'hour' | 'day'\n\n /** Remaining triggers [infinite if undefined] */\n remaining?: number\n\n schema: SentinelIntervalAutomationSchema\n\n /** Epoch of the next trigger */\n start: number\n\n /** The type of automation */\n type: 'interval'\n}>\n\nexport const isSentinelIntervalAutomation = isPayloadOfSchemaType<SentinelIntervalAutomationPayload>(SentinelIntervalAutomationSchema)\n\n/** Settings for an Event Automation */\nexport type SentinelEventAutomationPayload = SentinelBaseAutomationPayload<{\n schema: SentinelEventAutomationSchema\n type: 'event'\n}>\n\n/** Settings for an Automation */\nexport type SentinelAutomationPayload = Payload<\n SentinelIntervalAutomationPayload | SentinelEventAutomationPayload,\n SentinelAutomationSchema | SentinelIntervalAutomationSchema | SentinelEventAutomationSchema\n>\n","import { WithAdditional } from '@xylabs/object'\nimport { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelAutomationPayload } from './Automation'\nimport { Task } from './Task'\n\nexport const SentinelConfigSchema = 'network.xyo.sentinel.config' as const\nexport type SentinelConfigSchema = typeof SentinelConfigSchema\n\nexport type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n automations?: SentinelAutomationPayload[]\n schema: TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n synchronous?: boolean\n tasks: Task[]\n throwErrors?: boolean\n },\n TConfig\n >,\n TSchema\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 { AsObjectFactory } from '@xylabs/object'\nimport { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\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,SAASA,6BAAsC;AAGxC,IAAMC,2BAAqD;AAG3D,IAAMC,mCAAqE;AAG3E,IAAMC,gCAA+D;AA+BrE,IAAMC,+BAA+BJ,sBAAyDE,gCAAAA;;;ACjC9F,IAAMG,uBAAuB;;;ACJ7B,IAAMC,4BAAuD;;;ACHpE,SAASC,uBAAuB;AAChC,SAASC,mBAAmBC,iBAAiBC,kBAAkBC,mBAAmB;AAM3E,IAAMC,qBAAqB,IAAIC,kBAAAA,EAAsCC,OAAO;EAAEC,QAAQ;AAAW,GAAG;EAACC;CAAiB;AACtH,IAAMC,mBAAmB,IAAIC,gBAAAA,EAAkCJ,OAAO;EAACK;CAA0B;AAEjG,IAAMC,mBAAmBC,gBAAgBP,OAAOG,gBAAAA;AAChD,IAAMK,qBAAqBD,gBAAgBP,OAAOF,kBAAAA;AAClD,IAAMW,qBAAqBC,YAAYV,OAAOG,gBAAAA;AAC9C,IAAMQ,uBAAuBD,YAAYV,OAAOF,kBAAAA;","names":["isPayloadOfSchemaType","SentinelAutomationSchema","SentinelIntervalAutomationSchema","SentinelEventAutomationSchema","isSentinelIntervalAutomation","SentinelConfigSchema","SentinelReportQuerySchema","AsObjectFactory","IsInstanceFactory","IsModuleFactory","isModuleInstance","WithFactory","isSentinelInstance","IsInstanceFactory","create","report","isModuleInstance","isSentinelModule","IsModuleFactory","SentinelReportQuerySchema","asSentinelModule","AsObjectFactory","asSentinelInstance","withSentinelModule","WithFactory","withSentinelInstance"]}
|
package/package.json
CHANGED
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"@xylabs/hex": "^3.3.3",
|
|
14
14
|
"@xylabs/object": "^3.3.3",
|
|
15
15
|
"@xylabs/promise": "^3.3.3",
|
|
16
|
-
"@xyo-network/account-model": "~2.
|
|
17
|
-
"@xyo-network/archivist-model": "~2.
|
|
18
|
-
"@xyo-network/boundwitness-model": "~2.
|
|
19
|
-
"@xyo-network/diviner-model": "~2.
|
|
20
|
-
"@xyo-network/module-events": "~2.
|
|
21
|
-
"@xyo-network/module-model": "~2.
|
|
22
|
-
"@xyo-network/payload-model": "~2.
|
|
23
|
-
"@xyo-network/witness-model": "~2.
|
|
16
|
+
"@xyo-network/account-model": "~2.103.0",
|
|
17
|
+
"@xyo-network/archivist-model": "~2.103.0",
|
|
18
|
+
"@xyo-network/boundwitness-model": "~2.103.0",
|
|
19
|
+
"@xyo-network/diviner-model": "~2.103.0",
|
|
20
|
+
"@xyo-network/module-events": "~2.103.0",
|
|
21
|
+
"@xyo-network/module-model": "~2.103.0",
|
|
22
|
+
"@xyo-network/payload-model": "~2.103.0",
|
|
23
|
+
"@xyo-network/witness-model": "~2.103.0"
|
|
24
24
|
},
|
|
25
25
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
26
26
|
"devDependencies": {
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
67
67
|
},
|
|
68
68
|
"sideEffects": false,
|
|
69
|
-
"version": "2.
|
|
69
|
+
"version": "2.103.0",
|
|
70
70
|
"type": "module"
|
|
71
71
|
}
|
package/src/Config.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Payload } from '@xyo-network/payload-model'
|
|
|
5
5
|
import { SentinelAutomationPayload } from './Automation'
|
|
6
6
|
import { Task } from './Task'
|
|
7
7
|
|
|
8
|
-
export const SentinelConfigSchema = 'network.xyo.sentinel.config'
|
|
8
|
+
export const SentinelConfigSchema = 'network.xyo.sentinel.config' as const
|
|
9
9
|
export type SentinelConfigSchema = typeof SentinelConfigSchema
|
|
10
10
|
|
|
11
11
|
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends string | void = void> = ModuleConfig<
|