@xyo-network/sentinel-model 5.2.25 → 5.3.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/neutral/Automation.d.ts +9 -3
- package/dist/neutral/Automation.d.ts.map +1 -1
- package/dist/neutral/Config.d.ts +5 -3
- package/dist/neutral/Config.d.ts.map +1 -1
- package/dist/neutral/Queries/Report.d.ts +4 -2
- package/dist/neutral/Queries/Report.d.ts.map +1 -1
- package/dist/neutral/index.mjs +10 -6
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +11 -11
- package/src/Automation.ts +4 -4
- package/src/Config.ts +5 -3
- package/src/Queries/Report.ts +2 -2
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import type { EventName } from '@xylabs/sdk-js';
|
|
2
2
|
import type { ModuleIdentifier } from '@xyo-network/module-model';
|
|
3
3
|
import type { Payload } from '@xyo-network/payload-model';
|
|
4
|
-
export declare const SentinelAutomationSchema: "network.xyo.automation"
|
|
4
|
+
export declare const SentinelAutomationSchema: "network.xyo.automation" & {
|
|
5
|
+
readonly __schema: true;
|
|
6
|
+
};
|
|
5
7
|
export type SentinelAutomationSchema = typeof SentinelAutomationSchema;
|
|
6
|
-
export declare const SentinelIntervalAutomationSchema: "network.xyo.automation.interval"
|
|
8
|
+
export declare const SentinelIntervalAutomationSchema: "network.xyo.automation.interval" & {
|
|
9
|
+
readonly __schema: true;
|
|
10
|
+
};
|
|
7
11
|
export type SentinelIntervalAutomationSchema = typeof SentinelIntervalAutomationSchema;
|
|
8
|
-
export declare const SentinelModuleEventAutomationSchema: "network.xyo.automation.event.module"
|
|
12
|
+
export declare const SentinelModuleEventAutomationSchema: "network.xyo.automation.event.module" & {
|
|
13
|
+
readonly __schema: true;
|
|
14
|
+
};
|
|
9
15
|
export type SentinelModuleEventAutomationSchema = typeof SentinelModuleEventAutomationSchema;
|
|
10
16
|
export type SentinelBaseAutomationPayload<T extends Payload> = Payload<{
|
|
11
17
|
type?: 'interval' | 'event';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Automation.d.ts","sourceRoot":"","sources":["../../src/Automation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"Automation.d.ts","sourceRoot":"","sources":["../../src/Automation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,eAAO,MAAM,wBAAwB;;CAA2C,CAAA;AAChF,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAA;AAEtE,eAAO,MAAM,gCAAgC;;CAAoD,CAAA;AACjG,MAAM,MAAM,gCAAgC,GAAG,OAAO,gCAAgC,CAAA;AAEtF,eAAO,MAAM,mCAAmC;;CAAwD,CAAA;AACxG,MAAM,MAAM,mCAAmC,GAAG,OAAO,mCAAmC,CAAA;AAE5F,MAAM,MAAM,6BAA6B,CAAC,CAAC,SAAS,OAAO,IAAI,OAAO,CACpE;IACE,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAA;CAC5B,GAAG,CAAC,CACN,CAAA;AAED,0CAA0C;AAC1C,MAAM,MAAM,iCAAiC,GAAG,6BAA6B,CAAC;IAC5E,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,oDAAoD;IACpD,cAAc,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAA;IAEhE,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,MAAM,EAAE,gCAAgC,CAAA;IAExC,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAA;IAEb,6BAA6B;IAC7B,IAAI,EAAE,UAAU,CAAA;CACjB,CAAC,CAAA;AAEF,eAAO,MAAM,4BAA4B,gEAA6F,CAAA;AAEtI,8CAA8C;AAC9C,MAAM,MAAM,oCAAoC,GAAG,6BAA6B,CAAC;IAC/E,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,mCAAmC,CAAA;IAC3C,MAAM,EAAE,gBAAgB,CAAA;IACxB,IAAI,EAAE,OAAO,CAAA;CACd,CAAC,CAAA;AAEF,iCAAiC;AACjC,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAC7C,iCAAiC,GAAG,oCAAoC,EACxE,wBAAwB,GAAG,gCAAgC,GAAG,mCAAmC,CAClG,CAAA"}
|
package/dist/neutral/Config.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { WithAdditional } from '@xylabs/sdk-js';
|
|
2
2
|
import type { ModuleConfig } from '@xyo-network/module-model';
|
|
3
|
-
import type
|
|
3
|
+
import { type Payload, type Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import type { SentinelAutomationPayload } from './Automation.ts';
|
|
5
5
|
import type { Task } from './Task.ts';
|
|
6
|
-
export declare const SentinelConfigSchema: "network.xyo.sentinel.config"
|
|
6
|
+
export declare const SentinelConfigSchema: "network.xyo.sentinel.config" & {
|
|
7
|
+
readonly __schema: true;
|
|
8
|
+
};
|
|
7
9
|
export type SentinelConfigSchema = typeof SentinelConfigSchema;
|
|
8
|
-
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends
|
|
10
|
+
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends Schema | void = void> = ModuleConfig<WithAdditional<{
|
|
9
11
|
automations?: SentinelAutomationPayload[];
|
|
10
12
|
schema: TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema;
|
|
11
13
|
synchronous?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EACK,KAAK,OAAO,EAAE,KAAK,MAAM,EACpC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAErC,eAAO,MAAM,oBAAoB;;CAAgD,CAAA;AACjF,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,5 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare const SentinelReportQuerySchema: "network.xyo.query.sentinel.report"
|
|
1
|
+
import { type Query } from '@xyo-network/payload-model';
|
|
2
|
+
export declare const SentinelReportQuerySchema: "network.xyo.query.sentinel.report" & {
|
|
3
|
+
readonly __schema: true;
|
|
4
|
+
};
|
|
3
5
|
export type SentinelReportQuerySchema = typeof SentinelReportQuerySchema;
|
|
4
6
|
export type SentinelReportQuery = Query<{
|
|
5
7
|
schema: SentinelReportQuerySchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Report.d.ts","sourceRoot":"","sources":["../../../src/Queries/Report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Report.d.ts","sourceRoot":"","sources":["../../../src/Queries/Report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEjE,eAAO,MAAM,yBAAyB;;CAAsD,CAAA;AAC5F,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC;IACtC,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -15,7 +15,8 @@ import {
|
|
|
15
15
|
} from "@xyo-network/module-model";
|
|
16
16
|
|
|
17
17
|
// src/Queries/Report.ts
|
|
18
|
-
|
|
18
|
+
import { asSchema } from "@xyo-network/payload-model";
|
|
19
|
+
var SentinelReportQuerySchema = asSchema("network.xyo.query.sentinel.report", true);
|
|
19
20
|
|
|
20
21
|
// src/typeChecks.ts
|
|
21
22
|
var isSentinelInstance = new IsInstanceFactory().create({ report: "function" }, [isModuleInstance]);
|
|
@@ -42,14 +43,17 @@ var IsAttachableSentinelInstanceFactory = class extends IsObjectFactory2 {
|
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
// src/Automation.ts
|
|
45
|
-
import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
|
|
46
|
-
var SentinelAutomationSchema = "network.xyo.automation";
|
|
47
|
-
var SentinelIntervalAutomationSchema = "network.xyo.automation.interval";
|
|
48
|
-
var SentinelModuleEventAutomationSchema = "network.xyo.automation.event.module";
|
|
46
|
+
import { asSchema as asSchema2, isPayloadOfSchemaType } from "@xyo-network/payload-model";
|
|
47
|
+
var SentinelAutomationSchema = asSchema2("network.xyo.automation", true);
|
|
48
|
+
var SentinelIntervalAutomationSchema = asSchema2("network.xyo.automation.interval", true);
|
|
49
|
+
var SentinelModuleEventAutomationSchema = asSchema2("network.xyo.automation.event.module", true);
|
|
49
50
|
var isSentinelIntervalAutomation = isPayloadOfSchemaType(SentinelIntervalAutomationSchema);
|
|
50
51
|
|
|
51
52
|
// src/Config.ts
|
|
52
|
-
|
|
53
|
+
import {
|
|
54
|
+
asSchema as asSchema3
|
|
55
|
+
} from "@xyo-network/payload-model";
|
|
56
|
+
var SentinelConfigSchema = asSchema3("network.xyo.sentinel.config", true);
|
|
53
57
|
export {
|
|
54
58
|
IsAttachableSentinelInstanceFactory,
|
|
55
59
|
SentinelAutomationSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/Report.ts","../../src/attachable/AttachableInstance.ts","../../src/Automation.ts","../../src/Config.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isAttachableSentinelInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableSentinelInstance = AsObjectFactory.create(isAttachableSentinelInstance)\n","import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport { isAttachableModuleInstance } from '@xyo-network/module-model'\n\nimport { isSentinelInstance } from '../typeChecks.ts'\nimport type { AttachableSentinelInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableSentinelInstanceFunctions: ObjectTypeShape = {}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableSentinelInstance>()\n\nexport const isAttachableSentinelInstance: TypeCheck<AttachableSentinelInstance> = factory.create(requiredAttachableSentinelInstanceFunctions, [\n isSentinelInstance,\n isAttachableModuleInstance,\n])\n","import { AsObjectFactory } from '@xylabs/sdk-js'\nimport {\n IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory,\n} from '@xyo-network/module-model'\n\nimport type { SentinelInstance } from './Instance.ts'\nimport type { SentinelModule } from './Module.ts'\nimport { SentinelReportQuerySchema } from './Queries/index.ts'\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","import type
|
|
1
|
+
{"version":3,"sources":["../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/Report.ts","../../src/attachable/AttachableInstance.ts","../../src/Automation.ts","../../src/Config.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isAttachableSentinelInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableSentinelInstance = AsObjectFactory.create(isAttachableSentinelInstance)\n","import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport { isAttachableModuleInstance } from '@xyo-network/module-model'\n\nimport { isSentinelInstance } from '../typeChecks.ts'\nimport type { AttachableSentinelInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableSentinelInstanceFunctions: ObjectTypeShape = {}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableSentinelInstance>()\n\nexport const isAttachableSentinelInstance: TypeCheck<AttachableSentinelInstance> = factory.create(requiredAttachableSentinelInstanceFunctions, [\n isSentinelInstance,\n isAttachableModuleInstance,\n])\n","import { AsObjectFactory } from '@xylabs/sdk-js'\nimport {\n IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory,\n} from '@xyo-network/module-model'\n\nimport type { SentinelInstance } from './Instance.ts'\nimport type { SentinelModule } from './Module.ts'\nimport { SentinelReportQuerySchema } from './Queries/index.ts'\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","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const SentinelReportQuerySchema = asSchema('network.xyo.query.sentinel.report', true)\nexport type SentinelReportQuerySchema = typeof SentinelReportQuerySchema\n\nexport type SentinelReportQuery = Query<{\n schema: SentinelReportQuerySchema\n}>\n","import type { TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport type { AttachableModuleInstance } from '@xyo-network/module-model'\n\nimport type { SentinelModuleEventData } from '../EventData.ts'\nimport type { SentinelInstance } from '../Instance.ts'\nimport type { SentinelModule } from '../Module.ts'\nimport type { SentinelParams } from '../Params.ts'\n\nexport interface AttachableSentinelInstance<\n TParams extends SentinelParams = SentinelParams,\n TEventData extends SentinelModuleEventData = SentinelModuleEventData,\n> extends SentinelModule<TParams, TEventData>,\n AttachableModuleInstance<TParams, TEventData>,\n SentinelInstance<TParams, TEventData> {}\n\nexport type AttachableSentinelInstanceTypeCheck<T extends AttachableSentinelInstance = AttachableSentinelInstance> = TypeCheck<T>\n\nexport class IsAttachableSentinelInstanceFactory<T extends AttachableSentinelInstance = AttachableSentinelInstance> extends IsObjectFactory<T> {}\n","import type { EventName } from '@xylabs/sdk-js'\nimport type { ModuleIdentifier } from '@xyo-network/module-model'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const SentinelAutomationSchema = asSchema('network.xyo.automation', true)\nexport type SentinelAutomationSchema = typeof SentinelAutomationSchema\n\nexport const SentinelIntervalAutomationSchema = asSchema('network.xyo.automation.interval', true)\nexport type SentinelIntervalAutomationSchema = typeof SentinelIntervalAutomationSchema\n\nexport const SentinelModuleEventAutomationSchema = asSchema('network.xyo.automation.event.module', true)\nexport type SentinelModuleEventAutomationSchema = typeof SentinelModuleEventAutomationSchema\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' | 'millis'\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 Module Event Automation */\nexport type SentinelModuleEventAutomationPayload = SentinelBaseAutomationPayload<{\n eventName: EventName\n schema: SentinelModuleEventAutomationSchema\n source: ModuleIdentifier\n type: 'event'\n}>\n\n/** Settings for an Automation */\nexport type SentinelAutomationPayload = Payload<\n SentinelIntervalAutomationPayload | SentinelModuleEventAutomationPayload,\n SentinelAutomationSchema | SentinelIntervalAutomationSchema | SentinelModuleEventAutomationSchema\n>\n","import type { WithAdditional } from '@xylabs/sdk-js'\nimport type { ModuleConfig } from '@xyo-network/module-model'\nimport {\n asSchema, type Payload, type Schema,\n} from '@xyo-network/payload-model'\n\nimport type { SentinelAutomationPayload } from './Automation.ts'\nimport type { Task } from './Task.ts'\n\nexport const SentinelConfigSchema = asSchema('network.xyo.sentinel.config', true)\nexport type SentinelConfigSchema = typeof SentinelConfigSchema\n\nexport type SentinelConfig<TConfig extends Payload | void = void, TSchema extends Schema | 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"],"mappings":";AAAA,SAAS,mBAAAA,wBAAuB;;;ACChC,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;;;ACF3C,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EAAmB;AAAA,EAAiB;AAAA,EAAkB;AAAA,OACjD;;;ACHP,SAAS,gBAA4B;AAE9B,IAAM,4BAA4B,SAAS,qCAAqC,IAAI;;;ADOpF,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;;;ADRlE,IAAM,8CAA+D,CAAC;AAG7E,IAAM,UAAU,IAAI,gBAA4C;AAEzD,IAAM,+BAAsE,QAAQ,OAAO,6CAA6C;AAAA,EAC7I;AAAA,EACA;AACF,CAAC;;;ADXM,IAAM,+BAA+BC,iBAAgB,OAAO,4BAA4B;;;AIH/F,SAAS,mBAAAC,wBAAuB;AAiBzB,IAAM,sCAAN,cAAqHA,iBAAmB;AAAC;;;ACfhJ,SAAS,YAAAC,WAAU,6BAA6B;AAEzC,IAAM,2BAA2BA,UAAS,0BAA0B,IAAI;AAGxE,IAAM,mCAAmCA,UAAS,mCAAmC,IAAI;AAGzF,IAAM,sCAAsCA,UAAS,uCAAuC,IAAI;AAgChG,IAAM,+BAA+B,sBAAyD,gCAAgC;;;ACzCrI;AAAA,EACE,YAAAC;AAAA,OACK;AAKA,IAAM,uBAAuBA,UAAS,+BAA+B,IAAI;","names":["AsObjectFactory","AsObjectFactory","IsObjectFactory","asSchema","asSchema"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/sentinel-model",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
"!**/*.test.*"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@xylabs/sdk-js": "~5.0.
|
|
40
|
-
"@xyo-network/account-model": "~5.
|
|
41
|
-
"@xyo-network/archivist-model": "~5.
|
|
42
|
-
"@xyo-network/boundwitness-model": "~5.
|
|
43
|
-
"@xyo-network/diviner-model": "~5.
|
|
44
|
-
"@xyo-network/module-model": "~5.
|
|
45
|
-
"@xyo-network/payload-model": "~5.
|
|
46
|
-
"@xyo-network/witness-model": "~5.
|
|
39
|
+
"@xylabs/sdk-js": "~5.0.64",
|
|
40
|
+
"@xyo-network/account-model": "~5.3.0",
|
|
41
|
+
"@xyo-network/archivist-model": "~5.3.0",
|
|
42
|
+
"@xyo-network/boundwitness-model": "~5.3.0",
|
|
43
|
+
"@xyo-network/diviner-model": "~5.3.0",
|
|
44
|
+
"@xyo-network/module-model": "~5.3.0",
|
|
45
|
+
"@xyo-network/payload-model": "~5.3.0",
|
|
46
|
+
"@xyo-network/witness-model": "~5.3.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@xylabs/ts-scripts-yarn3": "~7.2
|
|
50
|
-
"@xylabs/tsconfig": "~7.2
|
|
49
|
+
"@xylabs/ts-scripts-yarn3": "~7.3.2",
|
|
50
|
+
"@xylabs/tsconfig": "~7.3.2",
|
|
51
51
|
"typescript": "~5.9.3"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
package/src/Automation.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { EventName } from '@xylabs/sdk-js'
|
|
2
2
|
import type { ModuleIdentifier } from '@xyo-network/module-model'
|
|
3
3
|
import type { Payload } from '@xyo-network/payload-model'
|
|
4
|
-
import { isPayloadOfSchemaType } from '@xyo-network/payload-model'
|
|
4
|
+
import { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'
|
|
5
5
|
|
|
6
|
-
export const SentinelAutomationSchema = 'network.xyo.automation'
|
|
6
|
+
export const SentinelAutomationSchema = asSchema('network.xyo.automation', true)
|
|
7
7
|
export type SentinelAutomationSchema = typeof SentinelAutomationSchema
|
|
8
8
|
|
|
9
|
-
export const SentinelIntervalAutomationSchema = 'network.xyo.automation.interval'
|
|
9
|
+
export const SentinelIntervalAutomationSchema = asSchema('network.xyo.automation.interval', true)
|
|
10
10
|
export type SentinelIntervalAutomationSchema = typeof SentinelIntervalAutomationSchema
|
|
11
11
|
|
|
12
|
-
export const SentinelModuleEventAutomationSchema = 'network.xyo.automation.event.module'
|
|
12
|
+
export const SentinelModuleEventAutomationSchema = asSchema('network.xyo.automation.event.module', true)
|
|
13
13
|
export type SentinelModuleEventAutomationSchema = typeof SentinelModuleEventAutomationSchema
|
|
14
14
|
|
|
15
15
|
export type SentinelBaseAutomationPayload<T extends Payload> = Payload<
|
package/src/Config.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import type { WithAdditional } from '@xylabs/sdk-js'
|
|
2
2
|
import type { ModuleConfig } from '@xyo-network/module-model'
|
|
3
|
-
import
|
|
3
|
+
import {
|
|
4
|
+
asSchema, type Payload, type Schema,
|
|
5
|
+
} from '@xyo-network/payload-model'
|
|
4
6
|
|
|
5
7
|
import type { SentinelAutomationPayload } from './Automation.ts'
|
|
6
8
|
import type { Task } from './Task.ts'
|
|
7
9
|
|
|
8
|
-
export const SentinelConfigSchema = 'network.xyo.sentinel.config'
|
|
10
|
+
export const SentinelConfigSchema = asSchema('network.xyo.sentinel.config', true)
|
|
9
11
|
export type SentinelConfigSchema = typeof SentinelConfigSchema
|
|
10
12
|
|
|
11
|
-
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends
|
|
13
|
+
export type SentinelConfig<TConfig extends Payload | void = void, TSchema extends Schema | void = void> = ModuleConfig<
|
|
12
14
|
WithAdditional<
|
|
13
15
|
{
|
|
14
16
|
automations?: SentinelAutomationPayload[]
|
package/src/Queries/Report.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { asSchema, type Query } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
|
-
export const SentinelReportQuerySchema = 'network.xyo.query.sentinel.report'
|
|
3
|
+
export const SentinelReportQuerySchema = asSchema('network.xyo.query.sentinel.report', true)
|
|
4
4
|
export type SentinelReportQuerySchema = typeof SentinelReportQuerySchema
|
|
5
5
|
|
|
6
6
|
export type SentinelReportQuery = Query<{
|