@ankhorage/contracts 26.3.0 → 26.5.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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/appManifest/bindings.js +1 -1
- package/dist/appManifest/bindings.js.map +1 -1
- package/dist/bindings.d.ts +1 -1
- package/dist/bindings.d.ts.map +1 -1
- package/dist/bindings.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/rules.d.ts +3 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/rules.js +2 -0
- package/dist/rules.js.map +1 -0
- package/dist/structure/generated.d.ts +2 -2
- package/dist/structure/generated.js +2 -2
- package/dist/structure/generated.js.map +1 -1
- package/dist/types/rules.d.ts +151 -0
- package/dist/types/rules.d.ts.map +1 -0
- package/dist/types/rules.js +2 -0
- package/dist/types/rules.js.map +1 -0
- package/package.json +10 -6
- package/src/appManifest/bindings.ts +1 -1
- package/src/bindings.test.ts +20 -0
- package/src/bindings.ts +1 -1
- package/src/index.ts +1 -0
- package/src/rules.test.ts +94 -0
- package/src/rules.ts +2 -0
- package/src/structure/generated.ts +2 -2
- package/src/types/rules.ts +184 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/contracts
|
|
2
2
|
|
|
3
|
+
## 26.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 57a702a: Add the portable `number` binding transform for finite numeric presentation values.
|
|
8
|
+
|
|
9
|
+
## 26.4.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- d6162e6: Add versioned portable Rules fact, evidence, result, scope, and graph projection contracts.
|
|
14
|
+
|
|
3
15
|
## 26.3.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# @ankhorage/contracts
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Serializable app, capability, binding, theme, auth, and secret-store contracts for Ankhorage.
|
|
9
9
|
|
|
@@ -89,6 +89,6 @@ function isBindingInputMap(value) {
|
|
|
89
89
|
/*** Validate ordered expression transforms. */
|
|
90
90
|
function isBindingTransforms(value) {
|
|
91
91
|
return (Array.isArray(value) &&
|
|
92
|
-
value.every((transform) => ['length', 'lowercase', 'trim', 'uppercase'].includes(String(transform))));
|
|
92
|
+
value.every((transform) => ['length', 'lowercase', 'number', 'trim', 'uppercase'].includes(String(transform))));
|
|
93
93
|
}
|
|
94
94
|
//# sourceMappingURL=bindings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../../src/appManifest/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,kEAAkE;AAClE,MAAM,UAAU,8BAA8B,CAAC,KAAc;IAC3D,OAAO,CACL,QAAQ,CAAC,KAAK,CAAC;QACf,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CACzB,CAAC,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,EAAE,CACzB,sBAAsB,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,WAAW,KAAK,WAAW,CAC9F,CACF,CAAC;AACJ,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,OAAO,4BAA4B,CAAC,KAAK,CAAC,IAAI,uBAAuB,CAAC,KAAK,CAAC,CAAC;AAC/E,CAAC;AAED,uEAAuE;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ecord } from '@ankhorage/utility/object';\nimport { isOptionalString } from '@ankhorage/utility/string';\n\nimport { isManifestValue } from './isManifestValue.js';\n\n/*** Validate every component binding in the authored registry. */\nexport function isComponentDataBindingRegistry(value: unknown): boolean {\n return (\n isRecord(value) &&\n Object.entries(value).every(\n ([componentId, binding]) =>\n isComponentDataBinding(binding) && isRecord(binding) && binding.componentId === componentId,\n )\n );\n}\n\n/*** Validate a readable capability reference or a recursive binding expression. */\nexport function isBindingExpression(value: unknown): boolean {\n return isBindingCapabilityReference(value) || isBindingExpressionNode(value);\n}\n\n/*** Validate a screen loader as one portable capability invocation. */\nexport function isScreenDataLoaderDefinition(value: unknown): boolean {\n return isBindingInvocation(value);\n}\n\n/*** Validate component identity and its property and event bindings. */\nfunction isComponentDataBinding(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.componentId === 'string' &&\n isOptionalString(value.componentType) &&\n (value.props === undefined ||\n (isRecord(value.props) && Object.values(value.props).every(isPropBinding))) &&\n (value.events === undefined ||\n (isRecord(value.events) &&\n Object.values(value.events).every(\n (bindings) => Array.isArray(bindings) && bindings.every(isEventBinding),\n )))\n );\n}\n\n/*** Validate a property expression and its lifecycle-specific render behavior. */\nfunction isPropBinding(value: unknown): boolean {\n return (\n isRecord(value) &&\n isBindingExpression(value.value) &&\n (value.loading === undefined || isBindingLifecycleBehavior(value.loading)) &&\n (value.error === undefined || isBindingLifecycleBehavior(value.error)) &&\n (value.empty === undefined || isBindingLifecycleBehavior(value.empty))\n );\n}\n\n/*** Validate an event binding and its one canonical invocation target. */\nfunction isEventBinding(value: unknown): boolean {\n return (\n isRecord(value) &&\n isBindingInvocation(value.target) &&\n (value.when === undefined || isBindingCondition(value.when))\n );\n}\n\n/*** Validate a serializable capability invocation and optional result slot. */\nfunction isBindingInvocation(value: unknown): boolean {\n return (\n isBindingCapabilityReference(value) &&\n (value.input === undefined || isBindingInputMap(value.input))\n );\n}\n\n/*** Validate a capability identity with optional output path or cached-result slot. */\nfunction isBindingCapabilityReference(value: unknown): value is Record<string, unknown> {\n return (\n isRecord(value) &&\n typeof value.capability === 'string' &&\n value.capability.includes('.') &&\n isOptionalString(value.path) &&\n isOptionalString(value.result)\n );\n}\n\n/*** Validate array, fallback, literal, object and transform expression forms. */\nfunction isBindingExpressionNode(value: unknown): boolean {\n return (\n isRecord(value) &&\n ((value.kind === 'array' &&\n Array.isArray(value.items) &&\n value.items.every(isBindingExpression)) ||\n (value.kind === 'fallback' &&\n isBindingExpression(value.value) &&\n isBindingExpression(value.fallback)) ||\n (value.kind === 'literal' && isManifestValue(value.value)) ||\n (value.kind === 'object' && isBindingInputMap(value.fields)) ||\n (value.kind === 'transform' &&\n isBindingExpression(value.value) &&\n isBindingTransforms(value.transforms)))\n );\n}\n\n/*** Validate a condition expressed through the same recursive binding vocabulary. */\nfunction isBindingCondition(value: unknown): boolean {\n return (\n isRecord(value) &&\n isBindingExpression(value.source) &&\n ['eq', 'exists', 'neq', 'notExists'].includes(String(value.operator)) &&\n (value.value === undefined || isBindingExpression(value.value))\n );\n}\n\n/*** Validate a lifecycle state and its optional bound display expression. */\nfunction isBindingLifecycleBehavior(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.state === 'string' &&\n ['empty', 'error', 'loading'].includes(value.state) &&\n (value.value === undefined || isBindingExpression(value.value)) &&\n isOptionalString(value.message)\n );\n}\n\n/*** Validate every recursively authored invocation input expression. */\nfunction isBindingInputMap(value: unknown): boolean {\n return isRecord(value) && Object.values(value).every(isBindingExpression);\n}\n\n/*** Validate ordered expression transforms. */\nfunction isBindingTransforms(value: unknown): boolean {\n return (\n Array.isArray(value) &&\n value.every((transform) =>\n ['length', 'lowercase', 'number', 'trim', 'uppercase'].includes(String(transform)),\n )\n );\n}\n"]}
|
package/dist/bindings.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type ComponentInstanceId = string;
|
|
|
5
5
|
export type ComponentTypeId = string;
|
|
6
6
|
export type BindingValue = SerializableValue;
|
|
7
7
|
export type BindingDataPath = string;
|
|
8
|
-
export type BindingValueTransform = 'length' | 'lowercase' | 'trim' | 'uppercase';
|
|
8
|
+
export type BindingValueTransform = 'length' | 'lowercase' | 'number' | 'trim' | 'uppercase';
|
|
9
9
|
/** A portable reference to a readable capability value or a cached invocation result. */
|
|
10
10
|
export interface BindingCapabilityReference {
|
|
11
11
|
readonly capability: Capability['id'];
|
package/dist/bindings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAC7C,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AACrC,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAC7C,MAAM,MAAM,eAAe,GAAG,MAAM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K,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC/C,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC,CAAC;CAC7D;AAED,MAAM,MAAM,4BAA4B,GAAG,cAAc,CACvD,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,CACd,CAAC"}
|
package/dist/bindings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"","sourcesContent":["import type { Capability } from './capability.js';\nimport type { EntityRegistry, ValueMap } from './collections.js';\nimport type { SerializableValue } from './serializable.js';\n\nexport type ComponentInstanceId = string;\nexport type ComponentTypeId = string;\nexport type BindingValue = SerializableValue;\nexport type BindingDataPath = string;\nexport type BindingValueTransform = 'length' | 'lowercase' | 'trim' | 'uppercase';\n\n/** A portable reference to a readable capability value or a cached invocation result. */\nexport interface BindingCapabilityReference {\n readonly capability: Capability['id'];\n readonly path?: BindingDataPath;\n readonly result?: string;\n}\n\n/** A portable request to invoke a capability and optionally retain its result in a local slot. */\nexport interface BindingInvocation {\n readonly capability: Capability['id'];\n readonly input?: BindingInputMap;\n readonly result?: string;\n}\n\n/** A recursive, serializable value expression used by bindings and invocation inputs. */\nexport type BindingExpression =\n | BindingCapabilityReference\n | { readonly kind: 'array'; readonly items: readonly BindingExpression[] }\n | {\n readonly kind: 'fallback';\n readonly value: BindingExpression;\n readonly fallback: BindingExpression;\n }\n | { readonly kind: 'literal'; readonly value: BindingValue }\n | { readonly kind: 'object'; readonly fields: ValueMap<string, BindingExpression> }\n | {\n readonly kind: 'transform';\n readonly value: BindingExpression;\n readonly transforms: readonly BindingValueTransform[];\n };\n\nexport type BindingInputValue = BindingExpression;\nexport type BindingInputMap = ValueMap<string, BindingInputValue>;\nexport type BindingConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';\n\n/** A condition evaluated from portable binding expressions. */\nexport interface BindingCondition {\n readonly source: BindingExpression;\n readonly operator: BindingConditionOperator;\n readonly value?: BindingExpression;\n}\n\n/** A lifecycle-specific expression rendered when a bound value reaches one state. */\nexport interface BindingLifecycleBehavior {\n readonly state: BindingLifecycleState;\n readonly value?: BindingExpression;\n readonly message?: string;\n}\n\nexport type BindingLifecycleState = 'empty' | 'error' | 'loading';\n\nexport interface PropBinding {\n readonly value: BindingExpression;\n readonly loading?: BindingLifecycleBehavior;\n readonly error?: BindingLifecycleBehavior;\n readonly empty?: BindingLifecycleBehavior;\n}\n\n/** A screen loader is one capability invocation, optionally storing its result by slot name. */\nexport type ScreenDataLoaderDefinition = BindingInvocation;\n\nexport interface EventBinding {\n readonly target: BindingInvocation;\n readonly when?: BindingCondition;\n}\n\nexport interface ComponentDataBinding {\n readonly componentId: ComponentInstanceId;\n readonly componentType?: ComponentTypeId;\n readonly props?: ValueMap<string, PropBinding>;\n readonly events?: ValueMap<string, readonly EventBinding[]>;\n}\n\nexport type ComponentDataBindingRegistry = EntityRegistry<\n ComponentInstanceId,\n ComponentDataBinding,\n 'componentId'\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"","sourcesContent":["import type { Capability } from './capability.js';\nimport type { EntityRegistry, ValueMap } from './collections.js';\nimport type { SerializableValue } from './serializable.js';\n\nexport type ComponentInstanceId = string;\nexport type ComponentTypeId = string;\nexport type BindingValue = SerializableValue;\nexport type BindingDataPath = string;\nexport type BindingValueTransform = 'length' | 'lowercase' | 'number' | 'trim' | 'uppercase';\n\n/** A portable reference to a readable capability value or a cached invocation result. */\nexport interface BindingCapabilityReference {\n readonly capability: Capability['id'];\n readonly path?: BindingDataPath;\n readonly result?: string;\n}\n\n/** A portable request to invoke a capability and optionally retain its result in a local slot. */\nexport interface BindingInvocation {\n readonly capability: Capability['id'];\n readonly input?: BindingInputMap;\n readonly result?: string;\n}\n\n/** A recursive, serializable value expression used by bindings and invocation inputs. */\nexport type BindingExpression =\n | BindingCapabilityReference\n | { readonly kind: 'array'; readonly items: readonly BindingExpression[] }\n | {\n readonly kind: 'fallback';\n readonly value: BindingExpression;\n readonly fallback: BindingExpression;\n }\n | { readonly kind: 'literal'; readonly value: BindingValue }\n | { readonly kind: 'object'; readonly fields: ValueMap<string, BindingExpression> }\n | {\n readonly kind: 'transform';\n readonly value: BindingExpression;\n readonly transforms: readonly BindingValueTransform[];\n };\n\nexport type BindingInputValue = BindingExpression;\nexport type BindingInputMap = ValueMap<string, BindingInputValue>;\nexport type BindingConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';\n\n/** A condition evaluated from portable binding expressions. */\nexport interface BindingCondition {\n readonly source: BindingExpression;\n readonly operator: BindingConditionOperator;\n readonly value?: BindingExpression;\n}\n\n/** A lifecycle-specific expression rendered when a bound value reaches one state. */\nexport interface BindingLifecycleBehavior {\n readonly state: BindingLifecycleState;\n readonly value?: BindingExpression;\n readonly message?: string;\n}\n\nexport type BindingLifecycleState = 'empty' | 'error' | 'loading';\n\nexport interface PropBinding {\n readonly value: BindingExpression;\n readonly loading?: BindingLifecycleBehavior;\n readonly error?: BindingLifecycleBehavior;\n readonly empty?: BindingLifecycleBehavior;\n}\n\n/** A screen loader is one capability invocation, optionally storing its result by slot name. */\nexport type ScreenDataLoaderDefinition = BindingInvocation;\n\nexport interface EventBinding {\n readonly target: BindingInvocation;\n readonly when?: BindingCondition;\n}\n\nexport interface ComponentDataBinding {\n readonly componentId: ComponentInstanceId;\n readonly componentType?: ComponentTypeId;\n readonly props?: ValueMap<string, PropBinding>;\n readonly events?: ValueMap<string, readonly EventBinding[]>;\n}\n\nexport type ComponentDataBindingRegistry = EntityRegistry<\n ComponentInstanceId,\n ComponentDataBinding,\n 'componentId'\n>;\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './media.js';
|
|
|
14
14
|
export * from './navigator.js';
|
|
15
15
|
export * from './repository.js';
|
|
16
16
|
export * from './requirements.js';
|
|
17
|
+
export * from './rules.js';
|
|
17
18
|
export * from './runtimeCallbacks.js';
|
|
18
19
|
export * from './secrets.js';
|
|
19
20
|
export * from './serializable.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export * from './media.js';
|
|
|
14
14
|
export * from './navigator.js';
|
|
15
15
|
export * from './repository.js';
|
|
16
16
|
export * from './requirements.js';
|
|
17
|
+
export * from './rules.js';
|
|
17
18
|
export * from './runtimeCallbacks.js';
|
|
18
19
|
export * from './secrets.js';
|
|
19
20
|
export * from './serializable.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC","sourcesContent":["export * from './ads.js';\nexport * from './appManifest.js';\nexport * from './auth.js';\nexport * from './bindings.js';\nexport * from './cli/index.js';\nexport * from './collections.js';\nexport * from './data/index.js';\nexport * from './db.js';\nexport * from './deploy.js';\nexport * from './deployProvider.js';\nexport * from './environments.js';\nexport * from './infra.js';\nexport * from './media.js';\nexport * from './navigator.js';\nexport * from './repository.js';\nexport * from './requirements.js';\nexport * from './runtimeCallbacks.js';\nexport * from './secrets.js';\nexport * from './serializable.js';\nexport * from './state.js';\nexport * from './storage.js';\nexport * from './structure/index.js';\nexport * from './theme.js';\nexport * from './types.js';\nexport * from './ui.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC","sourcesContent":["export * from './ads.js';\nexport * from './appManifest.js';\nexport * from './auth.js';\nexport * from './bindings.js';\nexport * from './cli/index.js';\nexport * from './collections.js';\nexport * from './data/index.js';\nexport * from './db.js';\nexport * from './deploy.js';\nexport * from './deployProvider.js';\nexport * from './environments.js';\nexport * from './infra.js';\nexport * from './media.js';\nexport * from './navigator.js';\nexport * from './repository.js';\nexport * from './requirements.js';\nexport * from './rules.js';\nexport * from './runtimeCallbacks.js';\nexport * from './secrets.js';\nexport * from './serializable.js';\nexport * from './state.js';\nexport * from './storage.js';\nexport * from './structure/index.js';\nexport * from './theme.js';\nexport * from './types.js';\nexport * from './ui.js';\n"]}
|
package/dist/rules.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../src/rules.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,mBAAmB,kBAAkB,CAAC"}
|
package/dist/rules.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../src/rules.ts"],"names":[],"mappings":"","sourcesContent":["/** Provider-neutral, versioned contracts for facts, evidence, rule results, and rule graphs. */\nexport type * from './types/rules.js';\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = "6.0.3";
|
|
2
|
-
export declare const STRUCTURE_DESCRIPTOR_FINGERPRINT = "sha256:
|
|
2
|
+
export declare const STRUCTURE_DESCRIPTOR_FINGERPRINT = "sha256:a4faf6ff20f79ce64ec819b9cef12e92e66adffb28265deab224bc79dec7e019";
|
|
3
3
|
export declare const STRUCTURE_DESCRIPTOR: {
|
|
4
4
|
readonly protocolVersion: 1;
|
|
5
5
|
readonly packageName: "@ankhorage/contracts";
|
|
6
|
-
readonly packageVersion: "26.
|
|
6
|
+
readonly packageVersion: "26.5.0";
|
|
7
7
|
readonly roots: {
|
|
8
8
|
readonly "auth-flow": "AuthFlowConfig";
|
|
9
9
|
readonly "auth-profile": "AuthProfileSpec";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = '6.0.3';
|
|
2
|
-
export const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:
|
|
2
|
+
export const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:a4faf6ff20f79ce64ec819b9cef12e92e66adffb28265deab224bc79dec7e019';
|
|
3
3
|
export const STRUCTURE_DESCRIPTOR = {
|
|
4
4
|
"protocolVersion": 1,
|
|
5
5
|
"packageName": "@ankhorage/contracts",
|
|
6
|
-
"packageVersion": "26.
|
|
6
|
+
"packageVersion": "26.5.0",
|
|
7
7
|
"roots": {
|
|
8
8
|
"auth-flow": "AuthFlowConfig",
|
|
9
9
|
"auth-profile": "AuthProfileSpec",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated.js","sourceRoot":"","sources":["../../src/structure/generated.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,qCAAqC,GAAG,OAAO,CAAC;AAC7D,MAAM,CAAC,MAAM,gCAAgC,GAAG,yEAAyE,CAAC;AAE1H,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,iBAAiB,EAAE,CAAC;IACpB,aAAa,EAAE,sBAAsB;IACrC,gBAAgB,EAAE,QAAQ;IAC1B,OAAO,EAAE;QACP,WAAW,EAAE,gBAAgB;QAC7B,cAAc,EAAE,iBAAiB;QACjC,cAAc,EAAE,gBAAgB;QAChC,cAAc,EAAE,gBAAgB;QAChC,iBAAiB,EAAE,oBAAoB;QACvC,qBAAqB,EAAE,oBAAoB;QAC3C,cAAc,EAAE,aAAa;KAC9B;IACD,aAAa,EAAE;QACb,gBAAgB,EAAE;YAChB,IAAI,EAAE,gBAAgB;YACtB,YA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BAChB,MAAM,EAAE,QAAQ;yBACjB;wBACD,UAAU,EAAE,IAAI;qBACjB;oBACD,QAAQ,EAAE;wBACR,OAAO,EAAE;4BACP,MAAM,EAAE,QAAQ;4BAChB,MAAM,EAAE,QAAQ;yBACjB;wBACD,UAAU,EAAE,IAAI;qBACjB;iBACF;aACF;SACF;QACD,+BAA+B,EAAE;YAC/B,IAAI,EAAE,+BAA+B;YACrC,YAAY,EAAE;gBACZ,MAAM,EAAE,QAAQ;gBAChB,QAAQ,EAAE;oBACR,UAAU,EAAE;wBACV,OAAO,EAAE;4BACP,MAAM,EAAE,WAAW;4BACnB,KAAK,EAAE;gCACL,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;4BACD,OAAO,EAAE;gCACP,MAAM,EAAE,KAAK;gCACb,IAAI,EAAE,iCAAiC;6BACxC;yBACF;wBACD,UAAU,EAAE,IAAI;qBACjB;oBACD,OAAO,EAAE;wBACP,OAAO,EAAE;4BACP,MAAM,EAAE,WAAW;4BACnB,KAAK,EAAE;gCACL,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;4BACD,OAAO,EAAE;gCACP,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;yBACF;wBACD,UAAU,EAAE,IAAI;qBACjB;oBACD,SAAS,EAAE;wBACT,OAAO,EAAE;4BACP,MAAM,EAAE,WAAW;4BACnB,KAAK,EAAE;gCACL,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;4BACD,OAAO,EAAE;gCACP,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;yBACF;wBACD,UAAU,EAAE,IAAI;qBACjB;iBACF;aACF;SACF;KACF;CAC6C,CAAC","sourcesContent":["/* This file is generated by @ankhorage/devtools. Do not edit manually. */\nimport type { StructureDescriptorDocument } from '@ankhorage/contracts/structure';\n\nexport const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = '6.0.3';\nexport const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:2578c8fb72cc696035a43a19b8502123c56cd801648030ffa280f23a38029ea3';\n\nexport const STRUCTURE_DESCRIPTOR = {\n \"protocolVersion\": 1,\n \"packageName\": \"@ankhorage/contracts\",\n \"packageVersion\": \"26.3.0\",\n \"roots\": {\n \"auth-flow\": \"AuthFlowConfig\",\n \"auth-profile\": \"AuthProfileSpec\",\n \"auth-sign-in\": \"AuthSignInSpec\",\n \"auth-sign-up\": \"AuthSignUpSpec\",\n \"screen-metadata\": \"ScreenMetadataSpec\",\n \"screen-requirements\": \"ScreenRequirements\",\n \"theme-config\": \"ThemeConfig\"\n },\n \"descriptors\": {\n \"AuthFlowConfig\": {\n \"id\": \"AuthFlowConfig\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"forgotPasswordRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"otpRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"postSignInRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"signInRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"signOutRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"signUpRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"unauthorizedRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"AuthProfileField\": {\n \"id\": \"AuthProfileField\",\n \"descriptor\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"AuthProfileSpec\": {\n \"id\": \"AuthProfileSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"createStrategy\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"api\",\n \"app\",\n \"trigger\"\n ]\n },\n \"optional\": true\n },\n \"fields\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"ref\",\n \"id\": \"AuthProfileField\"\n }\n }\n },\n \"primaryKey\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"authUserId\"\n ]\n },\n \"optional\": true\n },\n \"table\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"updateStrategy\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"api\",\n \"app\"\n ]\n },\n \"optional\": true\n }\n }\n }\n },\n \"AuthSignInSpec\": {\n \"id\": \"AuthSignInSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"identifiers\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"enum\",\n \"values\": [\n \"email\",\n \"phone\",\n \"username\"\n ]\n }\n }\n }\n }\n }\n },\n \"AuthSignUpField\": {\n \"id\": \"AuthSignUpField\",\n \"descriptor\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"AuthSignUpSpec\": {\n \"id\": \"AuthSignUpSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"optionalFields\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"ref\",\n \"id\": \"AuthSignUpField\"\n }\n },\n \"optional\": true\n },\n \"requiredFields\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"ref\",\n \"id\": \"AuthSignUpField\"\n }\n }\n },\n \"signUpPolicy\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"autoSignIn\",\n \"requireVerification\"\n ]\n },\n \"optional\": true\n }\n }\n }\n },\n \"ScreenMetadataSpec\": {\n \"id\": \"ScreenMetadataSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"description\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"id\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"name\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"title\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ScreenRequirements\": {\n \"id\": \"ScreenRequirements\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"capabilities\": {\n \"value\": {\n \"kind\": \"set\",\n \"member\": {\n \"kind\": \"enum\",\n \"values\": [\n \"barcodeScanner\",\n \"cameraPreview\",\n \"clipboard\",\n \"ebookReader\",\n \"filePicker\",\n \"location\",\n \"mediaPicker\",\n \"notifications\"\n ]\n }\n },\n \"optional\": true\n },\n \"permissions\": {\n \"value\": {\n \"kind\": \"set\",\n \"member\": {\n \"kind\": \"enum\",\n \"values\": [\n \"camera\",\n \"clipboard\",\n \"locationBackground\",\n \"locationForeground\",\n \"mediaLibrary\",\n \"mediaLibraryWrite\",\n \"microphone\",\n \"notifications\"\n ]\n }\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeConfig\": {\n \"id\": \"ThemeConfig\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"dark\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeModeConfig\"\n }\n },\n \"id\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"light\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeModeConfig\"\n }\n },\n \"name\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"recipes\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeRecipeOverrides\"\n },\n \"optional\": true\n },\n \"tokens\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeGlobalTokenOverrides\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeGlobalTokenOverrides\": {\n \"id\": \"ThemeGlobalTokenOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"radii\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"shadows\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"spacing\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"typography\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeTypographyTokenOverrides\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeModeConfig\": {\n \"id\": \"ThemeModeConfig\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"harmony\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"analogous\",\n \"complementary\",\n \"monochromatic\",\n \"splitComplementary\",\n \"square\",\n \"tetradic\",\n \"triadic\"\n ]\n }\n },\n \"primaryColor\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n }\n }\n }\n },\n \"ThemeRecipeOverrides\": {\n \"id\": \"ThemeRecipeOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"components\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"ref\",\n \"packageName\": \"typescript\",\n \"id\": \"Readonly\"\n }\n },\n \"optional\": true\n },\n \"patterns\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"ref\",\n \"packageName\": \"typescript\",\n \"id\": \"Readonly\"\n }\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeTypographyHeadingOverrides\": {\n \"id\": \"ThemeTypographyHeadingOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"lineHeight\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n },\n \"optional\": true\n },\n \"size\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n },\n \"optional\": true\n },\n \"weight\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeTypographyTokenOverrides\": {\n \"id\": \"ThemeTypographyTokenOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"headings\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeTypographyHeadingOverrides\"\n }\n },\n \"optional\": true\n },\n \"sizes\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"weights\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"optional\": true\n }\n }\n }\n }\n }\n} as const satisfies StructureDescriptorDocument;\n"]}
|
|
1
|
+
{"version":3,"file":"generated.js","sourceRoot":"","sources":["../../src/structure/generated.ts"],"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4BACD,OAAO,EAAE;gCACP,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;yBACF;wBACD,UAAU,EAAE,IAAI;qBACjB;oBACD,SAAS,EAAE;wBACT,OAAO,EAAE;4BACP,MAAM,EAAE,WAAW;4BACnB,KAAK,EAAE;gCACL,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;4BACD,OAAO,EAAE;gCACP,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;yBACF;wBACD,UAAU,EAAE,IAAI;qBACjB;iBACF;aACF;SACF;KACF;CAC6C,CAAC","sourcesContent":["/* This file is generated by @ankhorage/devtools. Do not edit manually. */\nimport type { StructureDescriptorDocument } from '@ankhorage/contracts/structure';\n\nexport const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = '6.0.3';\nexport const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:a4faf6ff20f79ce64ec819b9cef12e92e66adffb28265deab224bc79dec7e019';\n\nexport const STRUCTURE_DESCRIPTOR = {\n \"protocolVersion\": 1,\n \"packageName\": \"@ankhorage/contracts\",\n \"packageVersion\": \"26.5.0\",\n \"roots\": {\n \"auth-flow\": \"AuthFlowConfig\",\n \"auth-profile\": \"AuthProfileSpec\",\n \"auth-sign-in\": \"AuthSignInSpec\",\n \"auth-sign-up\": \"AuthSignUpSpec\",\n \"screen-metadata\": \"ScreenMetadataSpec\",\n \"screen-requirements\": \"ScreenRequirements\",\n \"theme-config\": \"ThemeConfig\"\n },\n \"descriptors\": {\n \"AuthFlowConfig\": {\n \"id\": \"AuthFlowConfig\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"forgotPasswordRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"otpRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"postSignInRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"signInRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"signOutRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"signUpRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"unauthorizedRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"AuthProfileField\": {\n \"id\": \"AuthProfileField\",\n \"descriptor\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"AuthProfileSpec\": {\n \"id\": \"AuthProfileSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"createStrategy\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"api\",\n \"app\",\n \"trigger\"\n ]\n },\n \"optional\": true\n },\n \"fields\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"ref\",\n \"id\": \"AuthProfileField\"\n }\n }\n },\n \"primaryKey\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"authUserId\"\n ]\n },\n \"optional\": true\n },\n \"table\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"updateStrategy\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"api\",\n \"app\"\n ]\n },\n \"optional\": true\n }\n }\n }\n },\n \"AuthSignInSpec\": {\n \"id\": \"AuthSignInSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"identifiers\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"enum\",\n \"values\": [\n \"email\",\n \"phone\",\n \"username\"\n ]\n }\n }\n }\n }\n }\n },\n \"AuthSignUpField\": {\n \"id\": \"AuthSignUpField\",\n \"descriptor\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"AuthSignUpSpec\": {\n \"id\": \"AuthSignUpSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"optionalFields\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"ref\",\n \"id\": \"AuthSignUpField\"\n }\n },\n \"optional\": true\n },\n \"requiredFields\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"ref\",\n \"id\": \"AuthSignUpField\"\n }\n }\n },\n \"signUpPolicy\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"autoSignIn\",\n \"requireVerification\"\n ]\n },\n \"optional\": true\n }\n }\n }\n },\n \"ScreenMetadataSpec\": {\n \"id\": \"ScreenMetadataSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"description\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"id\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"name\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"title\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ScreenRequirements\": {\n \"id\": \"ScreenRequirements\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"capabilities\": {\n \"value\": {\n \"kind\": \"set\",\n \"member\": {\n \"kind\": \"enum\",\n \"values\": [\n \"barcodeScanner\",\n \"cameraPreview\",\n \"clipboard\",\n \"ebookReader\",\n \"filePicker\",\n \"location\",\n \"mediaPicker\",\n \"notifications\"\n ]\n }\n },\n \"optional\": true\n },\n \"permissions\": {\n \"value\": {\n \"kind\": \"set\",\n \"member\": {\n \"kind\": \"enum\",\n \"values\": [\n \"camera\",\n \"clipboard\",\n \"locationBackground\",\n \"locationForeground\",\n \"mediaLibrary\",\n \"mediaLibraryWrite\",\n \"microphone\",\n \"notifications\"\n ]\n }\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeConfig\": {\n \"id\": \"ThemeConfig\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"dark\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeModeConfig\"\n }\n },\n \"id\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"light\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeModeConfig\"\n }\n },\n \"name\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"recipes\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeRecipeOverrides\"\n },\n \"optional\": true\n },\n \"tokens\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeGlobalTokenOverrides\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeGlobalTokenOverrides\": {\n \"id\": \"ThemeGlobalTokenOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"radii\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"shadows\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"spacing\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"typography\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeTypographyTokenOverrides\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeModeConfig\": {\n \"id\": \"ThemeModeConfig\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"harmony\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"analogous\",\n \"complementary\",\n \"monochromatic\",\n \"splitComplementary\",\n \"square\",\n \"tetradic\",\n \"triadic\"\n ]\n }\n },\n \"primaryColor\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n }\n }\n }\n },\n \"ThemeRecipeOverrides\": {\n \"id\": \"ThemeRecipeOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"components\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"ref\",\n \"packageName\": \"typescript\",\n \"id\": \"Readonly\"\n }\n },\n \"optional\": true\n },\n \"patterns\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"ref\",\n \"packageName\": \"typescript\",\n \"id\": \"Readonly\"\n }\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeTypographyHeadingOverrides\": {\n \"id\": \"ThemeTypographyHeadingOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"lineHeight\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n },\n \"optional\": true\n },\n \"size\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n },\n \"optional\": true\n },\n \"weight\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeTypographyTokenOverrides\": {\n \"id\": \"ThemeTypographyTokenOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"headings\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeTypographyHeadingOverrides\"\n }\n },\n \"optional\": true\n },\n \"sizes\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"weights\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"optional\": true\n }\n }\n }\n }\n }\n} as const satisfies StructureDescriptorDocument;\n"]}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import type { SerializableValue } from '../serializable.js';
|
|
2
|
+
/*** A tenant, project, and semantic target partitioning one Rules evaluation. */
|
|
3
|
+
export interface TargetIdentity {
|
|
4
|
+
readonly kind: string;
|
|
5
|
+
readonly projectId: string;
|
|
6
|
+
readonly targetId: string;
|
|
7
|
+
readonly tenantId: string;
|
|
8
|
+
}
|
|
9
|
+
/*** The exact semantic scope of a fact or rule evaluation. */
|
|
10
|
+
export interface Scope {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly kind: string;
|
|
13
|
+
readonly target: TargetIdentity;
|
|
14
|
+
}
|
|
15
|
+
/*** The producer and source revision from which portable Rules data was observed. */
|
|
16
|
+
export interface RulesProvenance {
|
|
17
|
+
readonly collectedAt: string;
|
|
18
|
+
readonly producer: {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly version: string;
|
|
21
|
+
};
|
|
22
|
+
readonly source: {
|
|
23
|
+
readonly id: string;
|
|
24
|
+
readonly revision: string | null;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/*** An explicit reason that a fact or evidence value could not be supplied. */
|
|
28
|
+
export interface MissingData {
|
|
29
|
+
readonly code: string;
|
|
30
|
+
readonly message: string;
|
|
31
|
+
}
|
|
32
|
+
/*** A versioned portable fact with content integrity, provenance, and explicit availability. */
|
|
33
|
+
export type FactEnvelope = AvailableFactEnvelope | MissingFactEnvelope;
|
|
34
|
+
/*** A fact whose serializable value was available to the producing adapter. */
|
|
35
|
+
export interface AvailableFactEnvelope {
|
|
36
|
+
readonly contentHash: string;
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly kind: string;
|
|
39
|
+
readonly provenance: RulesProvenance;
|
|
40
|
+
readonly schemaVersion: 1;
|
|
41
|
+
readonly scope: Scope;
|
|
42
|
+
readonly status: 'available';
|
|
43
|
+
readonly value: SerializableValue;
|
|
44
|
+
}
|
|
45
|
+
/*** A fact whose required value was unavailable without fabricating a replacement. */
|
|
46
|
+
export interface MissingFactEnvelope {
|
|
47
|
+
readonly contentHash: string;
|
|
48
|
+
readonly id: string;
|
|
49
|
+
readonly kind: string;
|
|
50
|
+
readonly missing: MissingData;
|
|
51
|
+
readonly provenance: RulesProvenance;
|
|
52
|
+
readonly schemaVersion: 1;
|
|
53
|
+
readonly scope: Scope;
|
|
54
|
+
readonly status: 'missing';
|
|
55
|
+
}
|
|
56
|
+
/*** Evidence retained by a rule result, including explicit unavailable evidence. */
|
|
57
|
+
export type RuleEvidence = AvailableRuleEvidence | MissingRuleEvidence;
|
|
58
|
+
/*** Evidence whose serializable observations are available to consumers. */
|
|
59
|
+
export interface AvailableRuleEvidence {
|
|
60
|
+
readonly contentHash: string;
|
|
61
|
+
readonly factIds: readonly string[];
|
|
62
|
+
readonly id: string;
|
|
63
|
+
readonly kind: string;
|
|
64
|
+
readonly provenance: RulesProvenance;
|
|
65
|
+
readonly schemaVersion: 1;
|
|
66
|
+
readonly status: 'available';
|
|
67
|
+
readonly value: SerializableValue;
|
|
68
|
+
}
|
|
69
|
+
/*** Evidence that remains explicitly unavailable to prevent implicit passing. */
|
|
70
|
+
export interface MissingRuleEvidence {
|
|
71
|
+
readonly contentHash: string;
|
|
72
|
+
readonly factIds: readonly string[];
|
|
73
|
+
readonly id: string;
|
|
74
|
+
readonly kind: string;
|
|
75
|
+
readonly missing: MissingData;
|
|
76
|
+
readonly provenance: RulesProvenance;
|
|
77
|
+
readonly schemaVersion: 1;
|
|
78
|
+
readonly status: 'missing';
|
|
79
|
+
}
|
|
80
|
+
/*** The stable, versioned identity of a provider-owned rule. */
|
|
81
|
+
export interface RuleIdentity {
|
|
82
|
+
readonly id: string;
|
|
83
|
+
readonly version: string;
|
|
84
|
+
}
|
|
85
|
+
/*** One subject affected by a rule finding, preserved independently of a presentation consumer. */
|
|
86
|
+
export interface RuleFindingSubject {
|
|
87
|
+
readonly id: string;
|
|
88
|
+
readonly kind: string;
|
|
89
|
+
readonly path?: string;
|
|
90
|
+
}
|
|
91
|
+
/*** An optional source location retained with a portable rule finding. */
|
|
92
|
+
export interface RuleFindingSourceLocation {
|
|
93
|
+
readonly column?: number;
|
|
94
|
+
readonly endColumn?: number;
|
|
95
|
+
readonly endLine?: number;
|
|
96
|
+
readonly line: number;
|
|
97
|
+
readonly path: string;
|
|
98
|
+
}
|
|
99
|
+
/*** One serializable finding emitted by a published Rules evaluation. */
|
|
100
|
+
export interface RuleFinding {
|
|
101
|
+
readonly evidence: SerializableValue;
|
|
102
|
+
readonly message: string;
|
|
103
|
+
readonly ruleId: string;
|
|
104
|
+
readonly severity: RuleFindingSeverity;
|
|
105
|
+
readonly sourceLocation?: RuleFindingSourceLocation;
|
|
106
|
+
readonly subjects: readonly RuleFindingSubject[];
|
|
107
|
+
}
|
|
108
|
+
/*** The canonical impact levels emitted by the published Rules evaluator. */
|
|
109
|
+
export type RuleFindingSeverity = 'error' | 'info' | 'warning';
|
|
110
|
+
/*** A serializable evaluator diagnostic retained with a versioned wire result. */
|
|
111
|
+
export interface RuleResultDiagnostic {
|
|
112
|
+
readonly code: 'ambiguous-rule-id' | 'cycle' | 'dependency-error' | 'dependency-incomplete' | 'dependency-scope-mismatch' | 'disabled-dependency' | 'invalid-config' | 'invalid-options' | 'missing-capability' | 'missing-dependency' | 'rule-error' | 'unknown-rule' | 'unresolved-dependencies';
|
|
113
|
+
readonly message: string;
|
|
114
|
+
readonly ruleId?: string;
|
|
115
|
+
}
|
|
116
|
+
/***
|
|
117
|
+
* The versioned, serializable wire form of one `@ankhorage/rules` evaluation result.
|
|
118
|
+
*
|
|
119
|
+
* This mirrors the published engine result while adding only wire metadata. Engine-native types,
|
|
120
|
+
* evaluation, validation, and mappings belong to the consuming adapter, not Contracts.
|
|
121
|
+
*/
|
|
122
|
+
export interface RuleResultDto {
|
|
123
|
+
readonly diagnostics: readonly RuleResultDiagnostic[];
|
|
124
|
+
readonly findings: readonly RuleFinding[];
|
|
125
|
+
readonly resultHash: string;
|
|
126
|
+
readonly rule: RuleIdentity;
|
|
127
|
+
readonly schemaVersion: 1;
|
|
128
|
+
readonly scope: Scope;
|
|
129
|
+
readonly status: RuleResultStatus;
|
|
130
|
+
}
|
|
131
|
+
/*** The canonical status set for a portable rule result. */
|
|
132
|
+
export type RuleResultStatus = 'ERROR' | 'FAIL' | 'INCOMPLETE' | 'PASS' | 'SKIPPED';
|
|
133
|
+
/*** A serializable Rules DAG projection for consumers such as graph visualizations. */
|
|
134
|
+
export interface GraphProjection {
|
|
135
|
+
readonly edges: readonly GraphProjectionEdge[];
|
|
136
|
+
readonly nodes: readonly GraphProjectionNode[];
|
|
137
|
+
readonly projectionHash: string;
|
|
138
|
+
readonly schemaVersion: 1;
|
|
139
|
+
readonly scope: Scope;
|
|
140
|
+
}
|
|
141
|
+
/*** One directed dependency edge in a portable Rules graph projection. */
|
|
142
|
+
export interface GraphProjectionEdge {
|
|
143
|
+
readonly fromNodeId: string;
|
|
144
|
+
readonly toNodeId: string;
|
|
145
|
+
}
|
|
146
|
+
/*** One evaluated rule node in a portable Rules graph projection. */
|
|
147
|
+
export interface GraphProjectionNode {
|
|
148
|
+
readonly id: string;
|
|
149
|
+
readonly result: RuleResultDto;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMapp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AAE,CAAC,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;CACvB;AAED,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,qEAAqE;AACrE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/types/rules.ts"],"names":[],"mappings":"","sourcesContent":["import type { SerializableValue } from '../serializable.js';\n\n/*** A tenant, project, and semantic target partitioning one Rules evaluation. */\nexport interface TargetIdentity {\n readonly kind: string;\n readonly projectId: string;\n readonly targetId: string;\n readonly tenantId: string;\n}\n\n/*** The exact semantic scope of a fact or rule evaluation. */\nexport interface Scope {\n readonly id: string;\n readonly kind: string;\n readonly target: TargetIdentity;\n}\n\n/*** The producer and source revision from which portable Rules data was observed. */\nexport interface RulesProvenance {\n readonly collectedAt: string;\n readonly producer: {\n readonly id: string;\n readonly version: string;\n };\n readonly source: {\n readonly id: string;\n readonly revision: string | null;\n };\n}\n\n/*** An explicit reason that a fact or evidence value could not be supplied. */\nexport interface MissingData {\n readonly code: string;\n readonly message: string;\n}\n\n/*** A versioned portable fact with content integrity, provenance, and explicit availability. */\nexport type FactEnvelope = AvailableFactEnvelope | MissingFactEnvelope;\n\n/*** A fact whose serializable value was available to the producing adapter. */\nexport interface AvailableFactEnvelope {\n readonly contentHash: string;\n readonly id: string;\n readonly kind: string;\n readonly provenance: RulesProvenance;\n readonly schemaVersion: 1;\n readonly scope: Scope;\n readonly status: 'available';\n readonly value: SerializableValue;\n}\n\n/*** A fact whose required value was unavailable without fabricating a replacement. */\nexport interface MissingFactEnvelope {\n readonly contentHash: string;\n readonly id: string;\n readonly kind: string;\n readonly missing: MissingData;\n readonly provenance: RulesProvenance;\n readonly schemaVersion: 1;\n readonly scope: Scope;\n readonly status: 'missing';\n}\n\n/*** Evidence retained by a rule result, including explicit unavailable evidence. */\nexport type RuleEvidence = AvailableRuleEvidence | MissingRuleEvidence;\n\n/*** Evidence whose serializable observations are available to consumers. */\nexport interface AvailableRuleEvidence {\n readonly contentHash: string;\n readonly factIds: readonly string[];\n readonly id: string;\n readonly kind: string;\n readonly provenance: RulesProvenance;\n readonly schemaVersion: 1;\n readonly status: 'available';\n readonly value: SerializableValue;\n}\n\n/*** Evidence that remains explicitly unavailable to prevent implicit passing. */\nexport interface MissingRuleEvidence {\n readonly contentHash: string;\n readonly factIds: readonly string[];\n readonly id: string;\n readonly kind: string;\n readonly missing: MissingData;\n readonly provenance: RulesProvenance;\n readonly schemaVersion: 1;\n readonly status: 'missing';\n}\n\n/*** The stable, versioned identity of a provider-owned rule. */\nexport interface RuleIdentity {\n readonly id: string;\n readonly version: string;\n}\n\n/*** One subject affected by a rule finding, preserved independently of a presentation consumer. */\nexport interface RuleFindingSubject {\n readonly id: string;\n readonly kind: string;\n readonly path?: string;\n}\n\n/*** An optional source location retained with a portable rule finding. */\nexport interface RuleFindingSourceLocation {\n readonly column?: number;\n readonly endColumn?: number;\n readonly endLine?: number;\n readonly line: number;\n readonly path: string;\n}\n\n/*** One serializable finding emitted by a published Rules evaluation. */\nexport interface RuleFinding {\n readonly evidence: SerializableValue;\n readonly message: string;\n readonly ruleId: string;\n readonly severity: RuleFindingSeverity;\n readonly sourceLocation?: RuleFindingSourceLocation;\n readonly subjects: readonly RuleFindingSubject[];\n}\n\n/*** The canonical impact levels emitted by the published Rules evaluator. */\nexport type RuleFindingSeverity = 'error' | 'info' | 'warning';\n\n/*** A serializable evaluator diagnostic retained with a versioned wire result. */\nexport interface RuleResultDiagnostic {\n readonly code:\n | 'ambiguous-rule-id'\n | 'cycle'\n | 'dependency-error'\n | 'dependency-incomplete'\n | 'dependency-scope-mismatch'\n | 'disabled-dependency'\n | 'invalid-config'\n | 'invalid-options'\n | 'missing-capability'\n | 'missing-dependency'\n | 'rule-error'\n | 'unknown-rule'\n | 'unresolved-dependencies';\n readonly message: string;\n readonly ruleId?: string;\n}\n\n/***\n * The versioned, serializable wire form of one `@ankhorage/rules` evaluation result.\n *\n * This mirrors the published engine result while adding only wire metadata. Engine-native types,\n * evaluation, validation, and mappings belong to the consuming adapter, not Contracts.\n */\nexport interface RuleResultDto {\n readonly diagnostics: readonly RuleResultDiagnostic[];\n readonly findings: readonly RuleFinding[];\n readonly resultHash: string;\n readonly rule: RuleIdentity;\n readonly schemaVersion: 1;\n readonly scope: Scope;\n readonly status: RuleResultStatus;\n}\n\n/*** The canonical status set for a portable rule result. */\nexport type RuleResultStatus = 'ERROR' | 'FAIL' | 'INCOMPLETE' | 'PASS' | 'SKIPPED';\n\n/*** A serializable Rules DAG projection for consumers such as graph visualizations. */\nexport interface GraphProjection {\n readonly edges: readonly GraphProjectionEdge[];\n readonly nodes: readonly GraphProjectionNode[];\n readonly projectionHash: string;\n readonly schemaVersion: 1;\n readonly scope: Scope;\n}\n\n/*** One directed dependency edge in a portable Rules graph projection. */\nexport interface GraphProjectionEdge {\n readonly fromNodeId: string;\n readonly toNodeId: string;\n}\n\n/*** One evaluated rule node in a portable Rules graph projection. */\nexport interface GraphProjectionNode {\n readonly id: string;\n readonly result: RuleResultDto;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/contracts",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.5.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"ankh": {
|
|
6
6
|
"category": "contracts",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@ankhorage/utility": "^1.10.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@ankhorage/devtools": "^2.
|
|
48
|
-
"@ankhorage/paradox": "^0.3.
|
|
47
|
+
"@ankhorage/devtools": "^2.4.1",
|
|
48
|
+
"@ankhorage/paradox": "^0.3.6",
|
|
49
49
|
"@types/bun": "^1.4.2",
|
|
50
|
-
"@types/node": "^26.6.
|
|
50
|
+
"@types/node": "^26.6.6",
|
|
51
51
|
"typescript": "^6.0.3"
|
|
52
52
|
},
|
|
53
53
|
"exports": {
|
|
@@ -127,6 +127,10 @@
|
|
|
127
127
|
"types": "./dist/repository.d.ts",
|
|
128
128
|
"default": "./dist/repository.js"
|
|
129
129
|
},
|
|
130
|
+
"./rules": {
|
|
131
|
+
"types": "./dist/rules.d.ts",
|
|
132
|
+
"default": "./dist/rules.js"
|
|
133
|
+
},
|
|
130
134
|
"./structure": {
|
|
131
135
|
"types": "./dist/structure/index.d.ts",
|
|
132
136
|
"default": "./dist/structure/index.js"
|
|
@@ -179,8 +183,8 @@
|
|
|
179
183
|
"lint:fix": "ankhorage-eslint . --fix --max-warnings=0",
|
|
180
184
|
"format": "ankhorage-prettier --write .",
|
|
181
185
|
"format:check": "ankhorage-prettier --check .",
|
|
182
|
-
"test": "bun test src",
|
|
183
|
-
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.node-esm.json && tsc --noEmit -p tsconfig.infra-tests.json && bun run build && tsc --noEmit -p tsconfig.deploy-provider-consumer.json && bun run structure:check",
|
|
186
|
+
"test": "bun test src test",
|
|
187
|
+
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.node-esm.json && tsc --noEmit -p tsconfig.infra-tests.json && tsc --noEmit -p tsconfig.rules-tests.json && bun run build && tsc --noEmit -p tsconfig.deploy-provider-consumer.json && bun run structure:check",
|
|
184
188
|
"version-packages": "ankhorage-changeset version",
|
|
185
189
|
"knip:check": "ankhorage-knip",
|
|
186
190
|
"structure:check": "ankhorage-structure check ."
|
|
@@ -128,7 +128,7 @@ function isBindingTransforms(value: unknown): boolean {
|
|
|
128
128
|
return (
|
|
129
129
|
Array.isArray(value) &&
|
|
130
130
|
value.every((transform) =>
|
|
131
|
-
['length', 'lowercase', 'trim', 'uppercase'].includes(String(transform)),
|
|
131
|
+
['length', 'lowercase', 'number', 'trim', 'uppercase'].includes(String(transform)),
|
|
132
132
|
)
|
|
133
133
|
);
|
|
134
134
|
}
|
package/src/bindings.test.ts
CHANGED
|
@@ -114,6 +114,26 @@ describe('capability binding contracts', () => {
|
|
|
114
114
|
expect(isComponentDataBindingRegistry(bindings)).toBe(true);
|
|
115
115
|
});
|
|
116
116
|
|
|
117
|
+
it('accepts the portable finite-number transform', () => {
|
|
118
|
+
const bindings: ComponentDataBindingRegistry = {
|
|
119
|
+
board: {
|
|
120
|
+
componentId: 'board',
|
|
121
|
+
props: {
|
|
122
|
+
columns: {
|
|
123
|
+
value: {
|
|
124
|
+
kind: 'transform',
|
|
125
|
+
value: { capability: 'state.board', path: 'columns' },
|
|
126
|
+
transforms: ['number'],
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
assertSerializable(bindings);
|
|
134
|
+
expect(isComponentDataBindingRegistry(bindings)).toBe(true);
|
|
135
|
+
});
|
|
136
|
+
|
|
117
137
|
it('uses the same invocation shape for screen loaders', () => {
|
|
118
138
|
const loader: ScreenDataLoaderDefinition = {
|
|
119
139
|
capability: 'api.products.getById',
|
package/src/bindings.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type ComponentInstanceId = string;
|
|
|
6
6
|
export type ComponentTypeId = string;
|
|
7
7
|
export type BindingValue = SerializableValue;
|
|
8
8
|
export type BindingDataPath = string;
|
|
9
|
-
export type BindingValueTransform = 'length' | 'lowercase' | 'trim' | 'uppercase';
|
|
9
|
+
export type BindingValueTransform = 'length' | 'lowercase' | 'number' | 'trim' | 'uppercase';
|
|
10
10
|
|
|
11
11
|
/** A portable reference to a readable capability value or a cached invocation result. */
|
|
12
12
|
export interface BindingCapabilityReference {
|
package/src/index.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './media.js';
|
|
|
14
14
|
export * from './navigator.js';
|
|
15
15
|
export * from './repository.js';
|
|
16
16
|
export * from './requirements.js';
|
|
17
|
+
export * from './rules.js';
|
|
17
18
|
export * from './runtimeCallbacks.js';
|
|
18
19
|
export * from './secrets.js';
|
|
19
20
|
export * from './serializable.js';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { expect, it } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import phpRuleResult from '../test/rules/fixtures/php-rule-result.json' with { type: 'json' };
|
|
4
|
+
import typescriptRuleResult from '../test/rules/fixtures/typescript-rule-result.json' with { type: 'json' };
|
|
5
|
+
import {
|
|
6
|
+
phpRuleResultFixture,
|
|
7
|
+
typescriptRuleResultFixture,
|
|
8
|
+
} from '../test/rules/ruleResultFixtures.js';
|
|
9
|
+
import type {
|
|
10
|
+
FactEnvelope,
|
|
11
|
+
GraphProjection,
|
|
12
|
+
RuleResultDiagnostic,
|
|
13
|
+
RuleResultDto,
|
|
14
|
+
} from './rules.js';
|
|
15
|
+
|
|
16
|
+
it('keeps PHP and TypeScript complete wire result fixtures identical and serializable', () => {
|
|
17
|
+
expect(phpRuleResult).toEqual(typescriptRuleResult);
|
|
18
|
+
expect(phpRuleResult).toEqual(phpRuleResultFixture);
|
|
19
|
+
expect(typescriptRuleResult).toEqual(typescriptRuleResultFixture);
|
|
20
|
+
expect(JSON.parse(JSON.stringify(phpRuleResultFixture))).toEqual(typescriptRuleResultFixture);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('keeps missing data explicit in diagnostics, findings, and the incomplete result status', () => {
|
|
24
|
+
expect(phpRuleResultFixture.status).toBe('INCOMPLETE');
|
|
25
|
+
expect(phpRuleResultFixture.diagnostics).toEqual([
|
|
26
|
+
{
|
|
27
|
+
code: 'missing-capability',
|
|
28
|
+
message: 'Rule requires unavailable viewport capture capability.',
|
|
29
|
+
ruleId: 'design.color.usage-distribution',
|
|
30
|
+
},
|
|
31
|
+
]);
|
|
32
|
+
expect(phpRuleResultFixture.findings[0]?.evidence).toEqual({
|
|
33
|
+
missing: { code: 'missing-capability', message: 'Viewport capture is unavailable.' },
|
|
34
|
+
status: 'missing',
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('accepts published invalid configuration and unknown rule diagnostic codes', () => {
|
|
39
|
+
const diagnostics: readonly RuleResultDiagnostic[] = [
|
|
40
|
+
{ code: 'invalid-config', message: 'rules.json must contain an object.' },
|
|
41
|
+
{ code: 'unknown-rule', message: 'rules.json configures an unknown rule.' },
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
expect(diagnostics.map(({ code }) => code)).toEqual(['invalid-config', 'unknown-rule']);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('keeps available and missing facts explicit in a graph-ready rule result', () => {
|
|
48
|
+
const availableFact: FactEnvelope = {
|
|
49
|
+
contentHash: 'sha256:fact-4e01',
|
|
50
|
+
id: 'painted-area',
|
|
51
|
+
kind: 'rendered-area',
|
|
52
|
+
provenance: {
|
|
53
|
+
collectedAt: '2026-11-04T10:15:00.000Z',
|
|
54
|
+
producer: { id: 'ankhorage.studio', version: '1.0.0' },
|
|
55
|
+
source: { id: 'project-example', revision: null },
|
|
56
|
+
},
|
|
57
|
+
schemaVersion: 1,
|
|
58
|
+
scope: phpRuleResult.scope,
|
|
59
|
+
status: 'available',
|
|
60
|
+
value: { pixels: 240000 },
|
|
61
|
+
};
|
|
62
|
+
const missingFact: FactEnvelope = {
|
|
63
|
+
contentHash: 'sha256:fact-4e02',
|
|
64
|
+
id: 'viewport-sample',
|
|
65
|
+
kind: 'viewport',
|
|
66
|
+
missing: { code: 'missing-capability', message: 'Viewport capture is unavailable.' },
|
|
67
|
+
provenance: availableFact.provenance,
|
|
68
|
+
schemaVersion: 1,
|
|
69
|
+
scope: availableFact.scope,
|
|
70
|
+
status: 'missing',
|
|
71
|
+
};
|
|
72
|
+
const result: RuleResultDto = {
|
|
73
|
+
diagnostics: [],
|
|
74
|
+
findings: [],
|
|
75
|
+
resultHash: 'sha256:result-4e01',
|
|
76
|
+
rule: { id: 'design.color.usage-distribution', version: '1.0.0' },
|
|
77
|
+
schemaVersion: 1,
|
|
78
|
+
scope: availableFact.scope,
|
|
79
|
+
status: 'INCOMPLETE',
|
|
80
|
+
};
|
|
81
|
+
const projection: GraphProjection = {
|
|
82
|
+
edges: [],
|
|
83
|
+
nodes: [{ id: 'design.color.usage-distribution', result }],
|
|
84
|
+
projectionHash: 'sha256:projection-4e01',
|
|
85
|
+
schemaVersion: 1,
|
|
86
|
+
scope: availableFact.scope,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
expect(JSON.parse(JSON.stringify({ availableFact, missingFact, projection }))).toEqual({
|
|
90
|
+
availableFact,
|
|
91
|
+
missingFact,
|
|
92
|
+
projection,
|
|
93
|
+
});
|
|
94
|
+
});
|
package/src/rules.ts
ADDED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import type { StructureDescriptorDocument } from '@ankhorage/contracts/structure';
|
|
3
3
|
|
|
4
4
|
export const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = '6.0.3';
|
|
5
|
-
export const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:
|
|
5
|
+
export const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:a4faf6ff20f79ce64ec819b9cef12e92e66adffb28265deab224bc79dec7e019';
|
|
6
6
|
|
|
7
7
|
export const STRUCTURE_DESCRIPTOR = {
|
|
8
8
|
"protocolVersion": 1,
|
|
9
9
|
"packageName": "@ankhorage/contracts",
|
|
10
|
-
"packageVersion": "26.
|
|
10
|
+
"packageVersion": "26.5.0",
|
|
11
11
|
"roots": {
|
|
12
12
|
"auth-flow": "AuthFlowConfig",
|
|
13
13
|
"auth-profile": "AuthProfileSpec",
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import type { SerializableValue } from '../serializable.js';
|
|
2
|
+
|
|
3
|
+
/*** A tenant, project, and semantic target partitioning one Rules evaluation. */
|
|
4
|
+
export interface TargetIdentity {
|
|
5
|
+
readonly kind: string;
|
|
6
|
+
readonly projectId: string;
|
|
7
|
+
readonly targetId: string;
|
|
8
|
+
readonly tenantId: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/*** The exact semantic scope of a fact or rule evaluation. */
|
|
12
|
+
export interface Scope {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly kind: string;
|
|
15
|
+
readonly target: TargetIdentity;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/*** The producer and source revision from which portable Rules data was observed. */
|
|
19
|
+
export interface RulesProvenance {
|
|
20
|
+
readonly collectedAt: string;
|
|
21
|
+
readonly producer: {
|
|
22
|
+
readonly id: string;
|
|
23
|
+
readonly version: string;
|
|
24
|
+
};
|
|
25
|
+
readonly source: {
|
|
26
|
+
readonly id: string;
|
|
27
|
+
readonly revision: string | null;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/*** An explicit reason that a fact or evidence value could not be supplied. */
|
|
32
|
+
export interface MissingData {
|
|
33
|
+
readonly code: string;
|
|
34
|
+
readonly message: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/*** A versioned portable fact with content integrity, provenance, and explicit availability. */
|
|
38
|
+
export type FactEnvelope = AvailableFactEnvelope | MissingFactEnvelope;
|
|
39
|
+
|
|
40
|
+
/*** A fact whose serializable value was available to the producing adapter. */
|
|
41
|
+
export interface AvailableFactEnvelope {
|
|
42
|
+
readonly contentHash: string;
|
|
43
|
+
readonly id: string;
|
|
44
|
+
readonly kind: string;
|
|
45
|
+
readonly provenance: RulesProvenance;
|
|
46
|
+
readonly schemaVersion: 1;
|
|
47
|
+
readonly scope: Scope;
|
|
48
|
+
readonly status: 'available';
|
|
49
|
+
readonly value: SerializableValue;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/*** A fact whose required value was unavailable without fabricating a replacement. */
|
|
53
|
+
export interface MissingFactEnvelope {
|
|
54
|
+
readonly contentHash: string;
|
|
55
|
+
readonly id: string;
|
|
56
|
+
readonly kind: string;
|
|
57
|
+
readonly missing: MissingData;
|
|
58
|
+
readonly provenance: RulesProvenance;
|
|
59
|
+
readonly schemaVersion: 1;
|
|
60
|
+
readonly scope: Scope;
|
|
61
|
+
readonly status: 'missing';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/*** Evidence retained by a rule result, including explicit unavailable evidence. */
|
|
65
|
+
export type RuleEvidence = AvailableRuleEvidence | MissingRuleEvidence;
|
|
66
|
+
|
|
67
|
+
/*** Evidence whose serializable observations are available to consumers. */
|
|
68
|
+
export interface AvailableRuleEvidence {
|
|
69
|
+
readonly contentHash: string;
|
|
70
|
+
readonly factIds: readonly string[];
|
|
71
|
+
readonly id: string;
|
|
72
|
+
readonly kind: string;
|
|
73
|
+
readonly provenance: RulesProvenance;
|
|
74
|
+
readonly schemaVersion: 1;
|
|
75
|
+
readonly status: 'available';
|
|
76
|
+
readonly value: SerializableValue;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/*** Evidence that remains explicitly unavailable to prevent implicit passing. */
|
|
80
|
+
export interface MissingRuleEvidence {
|
|
81
|
+
readonly contentHash: string;
|
|
82
|
+
readonly factIds: readonly string[];
|
|
83
|
+
readonly id: string;
|
|
84
|
+
readonly kind: string;
|
|
85
|
+
readonly missing: MissingData;
|
|
86
|
+
readonly provenance: RulesProvenance;
|
|
87
|
+
readonly schemaVersion: 1;
|
|
88
|
+
readonly status: 'missing';
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/*** The stable, versioned identity of a provider-owned rule. */
|
|
92
|
+
export interface RuleIdentity {
|
|
93
|
+
readonly id: string;
|
|
94
|
+
readonly version: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/*** One subject affected by a rule finding, preserved independently of a presentation consumer. */
|
|
98
|
+
export interface RuleFindingSubject {
|
|
99
|
+
readonly id: string;
|
|
100
|
+
readonly kind: string;
|
|
101
|
+
readonly path?: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/*** An optional source location retained with a portable rule finding. */
|
|
105
|
+
export interface RuleFindingSourceLocation {
|
|
106
|
+
readonly column?: number;
|
|
107
|
+
readonly endColumn?: number;
|
|
108
|
+
readonly endLine?: number;
|
|
109
|
+
readonly line: number;
|
|
110
|
+
readonly path: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/*** One serializable finding emitted by a published Rules evaluation. */
|
|
114
|
+
export interface RuleFinding {
|
|
115
|
+
readonly evidence: SerializableValue;
|
|
116
|
+
readonly message: string;
|
|
117
|
+
readonly ruleId: string;
|
|
118
|
+
readonly severity: RuleFindingSeverity;
|
|
119
|
+
readonly sourceLocation?: RuleFindingSourceLocation;
|
|
120
|
+
readonly subjects: readonly RuleFindingSubject[];
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/*** The canonical impact levels emitted by the published Rules evaluator. */
|
|
124
|
+
export type RuleFindingSeverity = 'error' | 'info' | 'warning';
|
|
125
|
+
|
|
126
|
+
/*** A serializable evaluator diagnostic retained with a versioned wire result. */
|
|
127
|
+
export interface RuleResultDiagnostic {
|
|
128
|
+
readonly code:
|
|
129
|
+
| 'ambiguous-rule-id'
|
|
130
|
+
| 'cycle'
|
|
131
|
+
| 'dependency-error'
|
|
132
|
+
| 'dependency-incomplete'
|
|
133
|
+
| 'dependency-scope-mismatch'
|
|
134
|
+
| 'disabled-dependency'
|
|
135
|
+
| 'invalid-config'
|
|
136
|
+
| 'invalid-options'
|
|
137
|
+
| 'missing-capability'
|
|
138
|
+
| 'missing-dependency'
|
|
139
|
+
| 'rule-error'
|
|
140
|
+
| 'unknown-rule'
|
|
141
|
+
| 'unresolved-dependencies';
|
|
142
|
+
readonly message: string;
|
|
143
|
+
readonly ruleId?: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/***
|
|
147
|
+
* The versioned, serializable wire form of one `@ankhorage/rules` evaluation result.
|
|
148
|
+
*
|
|
149
|
+
* This mirrors the published engine result while adding only wire metadata. Engine-native types,
|
|
150
|
+
* evaluation, validation, and mappings belong to the consuming adapter, not Contracts.
|
|
151
|
+
*/
|
|
152
|
+
export interface RuleResultDto {
|
|
153
|
+
readonly diagnostics: readonly RuleResultDiagnostic[];
|
|
154
|
+
readonly findings: readonly RuleFinding[];
|
|
155
|
+
readonly resultHash: string;
|
|
156
|
+
readonly rule: RuleIdentity;
|
|
157
|
+
readonly schemaVersion: 1;
|
|
158
|
+
readonly scope: Scope;
|
|
159
|
+
readonly status: RuleResultStatus;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/*** The canonical status set for a portable rule result. */
|
|
163
|
+
export type RuleResultStatus = 'ERROR' | 'FAIL' | 'INCOMPLETE' | 'PASS' | 'SKIPPED';
|
|
164
|
+
|
|
165
|
+
/*** A serializable Rules DAG projection for consumers such as graph visualizations. */
|
|
166
|
+
export interface GraphProjection {
|
|
167
|
+
readonly edges: readonly GraphProjectionEdge[];
|
|
168
|
+
readonly nodes: readonly GraphProjectionNode[];
|
|
169
|
+
readonly projectionHash: string;
|
|
170
|
+
readonly schemaVersion: 1;
|
|
171
|
+
readonly scope: Scope;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/*** One directed dependency edge in a portable Rules graph projection. */
|
|
175
|
+
export interface GraphProjectionEdge {
|
|
176
|
+
readonly fromNodeId: string;
|
|
177
|
+
readonly toNodeId: string;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/*** One evaluated rule node in a portable Rules graph projection. */
|
|
181
|
+
export interface GraphProjectionNode {
|
|
182
|
+
readonly id: string;
|
|
183
|
+
readonly result: RuleResultDto;
|
|
184
|
+
}
|