@nestarc/data-subject/lint API reference
Inspect Prisma schemas with parsePrismaSchema and lintPrismaSchema, format findings, and decide whether policy lint should fail a check. Use these helpers when validating entity-policy coverage.
Browse all @nestarc/data-subject import paths.
Interfaces
DataSubjectLintConfig
Defined in: src/lint/types.ts:42
Properties
checkRelations?
optional checkRelations?: boolean;Defined in: src/lint/types.ts:53
Validate declared relations and child-before-parent dependencies. Defaults true with definitions.
definitions?
optional definitions?: EntityDefinition[];Defined in: src/lint/types.ts:44
The same JSON-compatible definitions passed to Registry.registerDefinition.
piiFieldPatterns?
optional piiFieldPatterns?: string[];Defined in: src/lint/types.ts:47
registry?
optional registry?: DataSubjectLintRegistryEntry[];Defined in: src/lint/types.ts:46
Legacy configuration. Prefer definitions for a shared runtime/lint source.
requireTenantField?
optional requireTenantField?: boolean;Defined in: src/lint/types.ts:49
strictCoverage?
optional strictCoverage?: boolean;Defined in: src/lint/types.ts:51
Check every scalar, including newly added fields without PII-like names. Defaults true with definitions.
suppressions?
optional suppressions?: DataSubjectLintSuppression[];Defined in: src/lint/types.ts:48
DataSubjectLintFinding
Defined in: src/lint/types.ts:21
Properties
code
code: DataSubjectLintCode;Defined in: src/lint/types.ts:23
field?
optional field?: string;Defined in: src/lint/types.ts:25
message
message: string;Defined in: src/lint/types.ts:26
model
model: string;Defined in: src/lint/types.ts:24
severity
severity: DataSubjectLintSeverity;Defined in: src/lint/types.ts:22
DataSubjectLintRegistryEntry
Defined in: src/lint/types.ts:29
Extends
Properties
dependsOn?
optional dependsOn?: string[];Defined in: src/policy-compiler.ts:19
Parent entities: this entity is erased before each named parent.
Inherited from
entityName
entityName: string;Defined in: src/policy-compiler.ts:10
Inherited from
exportFields?
optional exportFields?: string[];Defined in: src/policy-compiler.ts:15
Explicit top-level export allowlist. Omit for an erase-only entity.
Inherited from
fields
fields: Record<string, PolicyEntry>;Defined in: src/policy-compiler.ts:13
Inherited from
ignoredFields?
optional ignoredFields?: Record<string, string>;Defined in: src/lint/types.ts:32
relations?
optional relations?: string[];Defined in: src/lint/types.ts:33
rowLevel?
optional rowLevel?: "delete-row" | "delete-fields";Defined in: src/policy-compiler.ts:12
Inherited from
singleTenantId?
optional singleTenantId?: string;Defined in: src/lint/types.ts:31
stableIdField?
optional stableIdField?: string;Defined in: src/policy-compiler.ts:17
Immutable row identity used for post-write verification.
Inherited from
subjectField
subjectField: string;Defined in: src/policy-compiler.ts:11
Inherited from
tenantField?
optional tenantField?: string;Defined in: src/lint/types.ts:30
DataSubjectLintReport
Defined in: src/lint/types.ts:56
Properties
findings
findings: DataSubjectLintFinding[];Defined in: src/lint/types.ts:58
ok
ok: boolean;Defined in: src/lint/types.ts:57
DataSubjectLintSuppression
Defined in: src/lint/types.ts:36
Properties
field?
optional field?: string;Defined in: src/lint/types.ts:38
model
model: string;Defined in: src/lint/types.ts:37
reason
reason: string;Defined in: src/lint/types.ts:39
Type Aliases
DataSubjectLintCode
type DataSubjectLintCode =
| "dsr_lint_unregistered_model"
| "dsr_lint_missing_policy_field"
| "dsr_lint_missing_tenant_field"
| "dsr_lint_empty_suppression_reason"
| "dsr_lint_invalid_policy"
| "dsr_lint_subject_field_missing"
| "dsr_lint_schema_unsupported"
| "dsr_lint_nonnullable_write"
| "dsr_lint_unmapped_relation"
| "dsr_lint_relation_conflict"
| "dsr_lint_retention_conflict"
| "dsr_lint_dependency_order"
| "dsr_lint_dependency_cycle";Defined in: src/lint/types.ts:6
DataSubjectLintSeverity
type DataSubjectLintSeverity = "warning" | "error";Defined in: src/lint/types.ts:4
References
formatLintReport
Re-exports formatLintReport
lintPrismaSchema
Re-exports lintPrismaSchema
parsePrismaSchema
Re-exports parsePrismaSchema
shouldFailLint
Re-exports shouldFailLint