{"_id":"@bernierllc/nevar-types","_rev":"5-2a8521eefa85f6b99bee75f0907676ac","name":"@bernierllc/nevar-types","dist-tags":{"latest":"0.4.0"},"versions":{"0.0.1":{"name":"@bernierllc/nevar-types","version":"0.0.1","keywords":["oidc","trusted-publishing","setup"],"_id":"@bernierllc/nevar-types@0.0.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"25ebaf569d846e750c7c7c48900367508f5a3e71","tarball":"https://registry.npmjs.org/@bernierllc/nevar-types/-/nevar-types-0.0.1.tgz","fileCount":2,"integrity":"sha512-8jvBIf3KKAnlCRWjgRmWgYgC2uL1U2WYs6CsaApVVr02AvLwzUZGGONl6DM9fQw0chm5o2cgJfmhzTMFVc53jA==","signatures":[{"sig":"MEQCIDBib3uGI4zfn6chz74XIJ2Fn3lYd7+GCT5klAur62FBAiAMDP5kNBOnCr4ZhnMSl9/biPIEpPs5LJcxOL3PMDFRaQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2055},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"_npmVersion":"11.11.0","description":"OIDC trusted publishing setup package for @bernierllc/nevar-types","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nevar-types_0.0.1_1774655853910_0.2154013258420595","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@bernierllc/nevar-types","version":"0.1.0","keywords":["nevar","rules-engine","types","type-definitions","error-classes"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/nevar-types@0.1.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"152d769d21ab0c66b3be33a73541cccfc04f5823","tarball":"https://registry.npmjs.org/@bernierllc/nevar-types/-/nevar-types-0.1.0.tgz","fileCount":42,"integrity":"sha512-S/P0PaBH/Y0oufGbZyUkVccoMEhjtCIZEdKvsgQvlqsIvsakH6IP3+GdDp4uxYH09Zy+9fkSJrHGGrvTav5ZmQ==","signatures":[{"sig":"MEYCIQDVSIW/e6k0+Ktbmav2pfzHTx0j6rPA8+LWVTzGFxQLCgIhALv6pd3xzVZ8T5rU6/DLDtq4Nk6TNotSAZatX6CWJPNU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67273},"main":"dist/index.js","_from":"file:bernierllc-nevar-types-0.1.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src __tests__ --ext .ts","test":"jest","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:693c039c-c23b-42ee-ac04-20200238b814"}},"_resolved":"/home/runner/work/tools/tools/packages/core/nevar-types/bernierllc-nevar-types-0.1.0.tgz","_integrity":"sha512-S/P0PaBH/Y0oufGbZyUkVccoMEhjtCIZEdKvsgQvlqsIvsakH6IP3+GdDp4uxYH09Zy+9fkSJrHGGrvTav5ZmQ==","_npmVersion":"11.12.1","description":"Shared type definitions, interfaces, error classes, and type guards for the Nevar rules engine suite","directories":{},"_nodeVersion":"20.20.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nevar-types_0.1.0_1774888450311_0.4025652686415473","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bernierllc/nevar-types","version":"0.2.0","keywords":["nevar","rules-engine","types","type-definitions","error-classes"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/nevar-types@0.2.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"642c1f7c3be998457f2993ba7183210304b07f77","tarball":"https://registry.npmjs.org/@bernierllc/nevar-types/-/nevar-types-0.2.0.tgz","fileCount":43,"integrity":"sha512-oL0ko7e5wPfu2KurXWKArbCx8Zt/hxFwbh9n7z3pdAr1nOeughN0pkWV1V9OxDC2h5htV53p4CkSIzxKGdIiKQ==","signatures":[{"sig":"MEYCIQDRqChmG/v4RG2dmDw4ixKrTZBKJo+wFVPimwgBBkycigIhAOb2arGDX1c0NWgCoxmaB4AmodX8Aw+SoRelHit9nCJQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68155},"main":"dist/index.js","_from":"file:bernierllc-nevar-types-0.2.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src __tests__ --ext .ts","test":"jest","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:693c039c-c23b-42ee-ac04-20200238b814"}},"_resolved":"/home/runner/work/tools/tools/packages/core/nevar-types/bernierllc-nevar-types-0.2.0.tgz","_integrity":"sha512-oL0ko7e5wPfu2KurXWKArbCx8Zt/hxFwbh9n7z3pdAr1nOeughN0pkWV1V9OxDC2h5htV53p4CkSIzxKGdIiKQ==","_npmVersion":"11.14.1","description":"Shared type definitions, interfaces, error classes, and type guards for the Nevar rules engine suite","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nevar-types_0.2.0_1779133563826_0.8076782153635709","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@bernierllc/nevar-types","version":"0.3.0","keywords":["nevar","rules-engine","types","type-definitions","error-classes"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/nevar-types@0.3.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"486f6f7d267849fbe50c9ee2350284593e1cc717","tarball":"https://registry.npmjs.org/@bernierllc/nevar-types/-/nevar-types-0.3.0.tgz","fileCount":43,"integrity":"sha512-HjGt6/l5Dn23Yt/0Wz6So/tte3aT7LUgzUnPovSkhcZYeA0WlFElezlSSHk2bbxz9n26bBzo+nXjD7VDU0QksA==","signatures":[{"sig":"MEUCIDM/rT9IVTVMDNyGXw9Pt119DUC2S1S7b8EhEz0Wic2UAiEAjdqHwl2+M4EYPHYwH/rScoLs0/vr2QNOtXDkZxTEz8w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68353},"main":"dist/index.js","_from":"file:bernierllc-nevar-types-0.3.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src __tests__ --ext .ts","test":"jest","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:693c039c-c23b-42ee-ac04-20200238b814"}},"_resolved":"/home/runner/work/tools/tools/packages/core/nevar-types/bernierllc-nevar-types-0.3.0.tgz","_integrity":"sha512-HjGt6/l5Dn23Yt/0Wz6So/tte3aT7LUgzUnPovSkhcZYeA0WlFElezlSSHk2bbxz9n26bBzo+nXjD7VDU0QksA==","_npmVersion":"11.14.1","description":"Shared type definitions, interfaces, error classes, and type guards for the Nevar rules engine suite","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nevar-types_0.3.0_1779241290063_0.6583171012885707","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@bernierllc/nevar-types","version":"0.4.0","description":"Shared type definitions, interfaces, error classes, and type guards for the Nevar rules engine suite","main":"dist/index.js","types":"dist/index.d.ts","keywords":["nevar","rules-engine","types","type-definitions","error-classes"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","devDependencies":{"@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.0.0","jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"tsc","test":"jest","test:run":"jest","test:coverage":"jest --coverage","lint":"eslint src __tests__ --ext .ts","clean":"rm -rf dist"},"_id":"@bernierllc/nevar-types@0.4.0","_integrity":"sha512-KgiAFoSg4utU/RQqTOsx2S4G1TaWln6yVn3oPORJuWlF2/uIwwZ7oe3XlSfl6OIRITtYwo5WMCUeB+b2C+WJEw==","_resolved":"/home/runner/work/tools/tools/packages/core/nevar-types/bernierllc-nevar-types-0.4.0.tgz","_from":"file:bernierllc-nevar-types-0.4.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"11.14.1","dist":{"integrity":"sha512-KgiAFoSg4utU/RQqTOsx2S4G1TaWln6yVn3oPORJuWlF2/uIwwZ7oe3XlSfl6OIRITtYwo5WMCUeB+b2C+WJEw==","shasum":"17b7d61c3e1b39a333ac678f08e6ef5148c4bc43","tarball":"https://registry.npmjs.org/@bernierllc/nevar-types/-/nevar-types-0.4.0.tgz","fileCount":43,"unpackedSize":68552,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGTsJBqucx6x9JLR1e+6frmdxtDntbz+JjHlSDFV5OwHAiAR9bI1i+72lPlNwNrw+7uFCmJChbd6uIPjPFd8EtMrTA=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:693c039c-c23b-42ee-ac04-20200238b814"}},"directories":{},"maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nevar-types_0.4.0_1779250040107_0.4314554794109673"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-27T23:57:33.809Z","modified":"2026-05-20T04:07:20.411Z","0.0.1":"2026-03-27T23:57:34.067Z","0.1.0":"2026-03-30T16:34:10.445Z","0.2.0":"2026-05-18T19:46:03.980Z","0.3.0":"2026-05-20T01:41:30.211Z","0.4.0":"2026-05-20T04:07:20.248Z"},"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","keywords":["nevar","rules-engine","types","type-definitions","error-classes"],"description":"Shared type definitions, interfaces, error classes, and type guards for the Nevar rules engine suite","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/nevar-types\n\nShared type definitions, interfaces, error classes, and type guards for the Nevar rules engine suite.\n\n## Overview\n\nThis package provides the foundational types that all Nevar packages depend on. It has zero runtime dependencies — it exports only TypeScript types, interfaces, error classes, and type guard functions.\n\n## Installation\n\n```bash\nnpm install @bernierllc/nevar-types\n```\n\n## Usage\n\n```typescript\nimport type {\n  Rule,\n  ConditionGroup,\n  ActionDefinition,\n  NevarConfig,\n  EvaluationResult,\n  NevarStorageAdapter,\n} from '@bernierllc/nevar-types';\n\nimport {\n  isConditionGroup,\n  isCondition,\n  NevarError,\n  NevarEvaluationError,\n} from '@bernierllc/nevar-types';\n\n// Type guard usage\nconst node: ConditionGroup | Condition = getNode();\nif (isConditionGroup(node)) {\n  console.log(node.operator, node.conditions);\n} else if (isCondition(node)) {\n  console.log(node.field, node.op, node.value);\n}\n\n// Error handling with cause chain\ntry {\n  evaluateRule(rule, context);\n} catch (error) {\n  if (error instanceof NevarEvaluationError) {\n    console.log(error.code, error.context, error.cause);\n  }\n}\n```\n\n## API\n\n### Types and Interfaces\n\n- **`Rule`** - Complete rule definition with trigger type, condition tree, actions, and execution settings\n- **`RuleGroup`** - Named collection of rules\n- **`ConditionGroup`** - Tree node with `operator` (AND/OR/NOT) and nested `conditions`\n- **`Condition`** - Leaf node with `field`, `op`, and `value`\n- **`ActionDefinition`** - Action type, config, retry settings, and execution order\n- **`ActionIntent`** - Resolved action ready for execution, tied to a specific rule\n- **`ActionResult`** - Outcome of executing an action intent\n- **`TriggerDefinition`** - Trigger type definition with payload schema\n- **`OperatorDefinition`** - Operator with evaluate function, label, category, and field types\n- **`NevarStorageAdapter`** - Storage interface for rules, groups, and execution logs\n- **`NevarConfig`** - Full engine configuration including circuit breaker, loop, and audit settings\n- **`EvaluationResult`** - Match result with evaluation trace\n- **`LoopHandle`** - Runtime loop state with heartbeat tracking\n\n### Error Classes\n\nAll errors extend `NevarError` and support ES2022 `Error.cause` chaining via `NevarErrorOptions`:\n\n- **`NevarError`** - Base error with `code: string` and `context?: Record<string, unknown>`\n- **`NevarTriggerError`** - Trigger validation and dispatch failures\n- **`NevarEvaluationError`** - Condition evaluation failures (unknown operators, provider errors)\n- **`NevarActionError`** - Action execution failures\n- **`NevarCircuitBreakerError`** - Circuit breaker limit violations\n- **`NevarLoopError`** - Loop detection and control failures\n- **`NevarStorageError`** - Storage adapter failures\n- **`NevarValidationError`** - Schema and configuration validation failures\n\n### Type Guards\n\n- **`isConditionGroup(value)`** - Returns `true` if value has `operator` and `conditions` fields\n- **`isCondition(value)`** - Returns `true` if value has `field`, `op`, and `value` fields\n\n## Exports\n\n### Types & Interfaces\n\n- **Models**: `Rule`, `RuleGroup`, `LogLevel`, `EvaluationTrace`\n- **Conditions**: `ConditionGroup`, `Condition`\n- **Actions**: `ActionDefinition`, `ActionRetryConfig`, `ActionIntent`, `ActionResult`, `MatchedRule`, `DeferredTrigger`, `ActionFailureMode`\n- **Triggers**: `TriggerDefinition`\n- **Context**: `ContextProviderDefinition`\n- **Operators**: `OperatorDefinition`, `OperatorInfo`\n- **Storage**: `NevarStorageAdapter`, `GroupFilters`, `RuleFilters`, `LogFilters`, `PaginatedResult`, `ExecutionLogEntry`\n- **Config**: `NevarConfig`, `CircuitBreakerConfig`, `LoopConfig`, `AuditLoggerConfig`, `SeedStrategy`\n- **Results**: `EmitResult`, `PreviewResult`, `EvaluationResult`, `LoopHandle`, `LoopAnalysis`, `DetectedLoop`\n\n### Error Classes\n\nAll errors extend `NevarError` and follow the ES2022 `Error.cause` pattern:\n\n- `NevarError` (base)\n- `NevarTriggerError`\n- `NevarEvaluationError`\n- `NevarActionError`\n- `NevarCircuitBreakerError`\n- `NevarLoopError`\n- `NevarStorageError`\n- `NevarValidationError`\n\n### Type Guards\n\n- `isConditionGroup(value)` — checks for `operator` and `conditions` fields\n- `isCondition(value)` — checks for `field`, `op`, `value` fields\n\n## Integration Documentation\n\n### Logger Integration\nThis package does not integrate with `@bernierllc/logger`. As a core package, logger integration is optional and not included by default. Consumers should handle logging at the service layer.\n\n### NeverHub Integration\nThis package does not integrate with `@bernierllc/neverhub-adapter`. As a core package, NeverHub integration is not applicable. NeverHub registration should be handled by service-layer packages that compose this package.\n\n## License\n\nCopyright (c) 2025 Bernier LLC. All rights reserved.\n","readmeFilename":"README.md"}