Skip to content

Interface: ClearTenantResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / ClearTenantResponse

Defined in: src/types/admin.ts:121

Response for the clear-tenant-data operation.

Reports exactly what was wiped for a specific tenant across all storage backends so operators can verify the operation succeeded. Other tenants are unaffected.

optional artifactFilesDeleted?: number

Defined in: src/types/admin.ts:241

Number of retained RDF artifacts erased through the configured bucket provider. Absent when the engine did not report it.


optional bindingsDeleted?: number

Defined in: src/types/admin.ts:193

Number of SQL ontology bindings deleted for this tenant.

A binding names the source, table and columns a tenant’s data lives in, so it is tenant data in its own right and goes with the tenant.


cacheInvalidated: boolean

Defined in: src/types/admin.ts:163

Whether the cache was invalidated.


optional derivedFactsDeleted?: number

Defined in: src/types/admin.ts:201

Number of materialized derived facts deleted for this tenant.

Derived Psi-terms go with the facts they were derived from.


dmPairingStateDeleted: number

Defined in: src/types/admin.ts:259

Number of DM pairing records erased for this tenant: channel policies, allowlisted senders and pairing requests, summed.

Not included in ClearTenantResponse.rowsDeletedTotal.


fingerprintsDeleted: number

Defined in: src/types/admin.ts:144

Number of document fingerprints deleted.


inboxItemsDeleted: number

Defined in: src/types/admin.ts:250

Number of unified-inbox items erased for this tenant.

Inbox items are durable tenant data that carry channel message bodies. Not included in ClearTenantResponse.rowsDeletedTotal.


inferenceStateCleared: boolean

Defined in: src/types/admin.ts:160

Whether the in-memory inference state was cleared.


message: string

Defined in: src/types/admin.ts:123

Human-readable summary message.


metaRecordsDeleted: number

Defined in: src/types/admin.ts:135

Number of meta records deleted (rules, named queries, etc.).


optional pluginInstallsDeleted?: number

Defined in: src/types/admin.ts:184

Number of plugin-marketplace install records forgotten for this tenant.

Reported separately from the persistent table sweep’s row count: the durable rows and the in-memory registry are two stores, and this is the one the install listing reads.


residuationsDeleted: number

Defined in: src/types/admin.ts:138

Number of residuation records deleted.


reviewsDeleted: number

Defined in: src/types/admin.ts:141

Number of review-related records deleted.


optional rowsDeletedTotal?: number

Defined in: src/types/admin.ts:224

Total rows deleted across every table in ClearTenantResponse.tablesWiped.

Counts the tables that have no named counter on this response, which is most of them — the named counters were never the full set. It does NOT count the inbox items or the DM pairing records: the engine erases those through their stores before the table sweep, so inbox_items can appear in tablesWiped with none of its rows counted here. Read ClearTenantResponse.inboxItemsDeleted and ClearTenantResponse.dmPairingStateDeleted for them.


sessionsDeleted: number

Defined in: src/types/admin.ts:132

Number of ingestion sessions deleted.


sortsDeleted: boolean

Defined in: src/types/admin.ts:157

Whether the sort hierarchy snapshot was deleted.


sourceFilesDeleted: number

Defined in: src/types/admin.ts:235

Number of uploaded source files (CSV, Parquet, SQLite uploads) erased for this tenant.

The upload store holds files, not rows, so the table sweep cannot see it. A store that cannot be erased fails the wipe with 500 instead of reporting a clean one.


optional tablesRetained?: RetainedTableDto[]

Defined in: src/types/admin.ts:268

Tenant-scoped tables deliberately left intact, each with its reason.

Non-empty means this erasure was deliberately partial: a retention policy kept these tables. Check it before treating the wipe as complete erasure.


optional tablesWiped?: string[]

Defined in: src/types/admin.ts:210

Every table the wipe deleted from, children before parents.

Derived from the live schema, not from a fixed list, so a table added by a later engine migration appears here without an SDK change.


tenantId: string

Defined in: src/types/admin.ts:126

The tenant whose data was cleared.


termsDeleted: number

Defined in: src/types/admin.ts:129

Number of terms deleted from persistent storage.


optional termVersionsDeleted?: number

Defined in: src/types/admin.ts:154

Recorded term versions deleted with the terms.

A tenant’s history is part of its data: clearing the tenant clears it, and the count says how much went so a caller is not left assuming the history survived.


vectorsDeleted: number

Defined in: src/types/admin.ts:174

Number of vector-store points deleted for this tenant.

Reported separately because it is the one count an erasure request cannot verify any other way: vector payloads carry the embedded text, so a wipe that left them behind would report every table emptied while the tenant’s data stayed readable by similarity search.