Skip to content

Interface: DeleteTenantResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / DeleteTenantResponse

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

Response of a tenant delete.

The wipe report — identical in shape and content to a clear, because the delete IS the clear plus the tombstone — plus the tombstone outcome, so a caller can tell “cleared, still exists” from “deleted, id retired” without re-deriving either. The tenant’s UUID is refused with 410 everywhere afterwards and cannot be recreated; there is no un-delete.

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.

ClearTenantResponse.artifactFilesDeleted


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.

ClearTenantResponse.bindingsDeleted


cacheInvalidated: boolean

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

Whether the cache was invalidated.

ClearTenantResponse.cacheInvalidated


deletedAt: string

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

When the tombstone was written. A delete is permanent; this is the record of when it happened.


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.

ClearTenantResponse.derivedFactsDeleted


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.

ClearTenantResponse.dmPairingStateDeleted


fingerprintsDeleted: number

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

Number of document fingerprints deleted.

ClearTenantResponse.fingerprintsDeleted


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.

ClearTenantResponse.inboxItemsDeleted


inferenceStateCleared: boolean

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

Whether the in-memory inference state was cleared.

ClearTenantResponse.inferenceStateCleared


message: string

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

Human-readable summary message.

ClearTenantResponse.message


metaRecordsDeleted: number

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

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

ClearTenantResponse.metaRecordsDeleted


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.

ClearTenantResponse.pluginInstallsDeleted


residuationsDeleted: number

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

Number of residuation records deleted.

ClearTenantResponse.residuationsDeleted


reviewsDeleted: number

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

Number of review-related records deleted.

ClearTenantResponse.reviewsDeleted


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.

ClearTenantResponse.rowsDeletedTotal


sessionsDeleted: number

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

Number of ingestion sessions deleted.

ClearTenantResponse.sessionsDeleted


sortsDeleted: boolean

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

Whether the sort hierarchy snapshot was deleted.

ClearTenantResponse.sortsDeleted


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.

ClearTenantResponse.sourceFilesDeleted


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.

ClearTenantResponse.tablesRetained


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.

ClearTenantResponse.tablesWiped


tenantId: string

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

The tenant whose data was cleared.

ClearTenantResponse.tenantId


termsDeleted: number

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

Number of terms deleted from persistent storage.

ClearTenantResponse.termsDeleted


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.

ClearTenantResponse.termVersionsDeleted


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.

ClearTenantResponse.vectorsDeleted