Data lifecycle
Data exports for a user or an organization as NDJSON files in Storage, and organization deletion with a grace period, a cancel and a purge job.
The data-lifecycle block covers two requests every SaaS gets: "send me my
data" and "delete our account". Exports collect a user's or an
organization's rows from every installed module and your own tables into
one NDJSON file per table in a private bucket. Deleting an organization
disables the tenant right away and purges its data after a grace period,
so an owner can still cancel.
better-supabase add data-lifecycle # adds tenant and access as well| Table | Holds |
|---|---|
data_exports | subject (user, organization or record), status, the object paths in files, and expires_at |
organization_deletions | requested_by, requested_at, purge_at, cancelled_at and purged_at |
| Permission | Lets a member | Default roles |
|---|---|---|
data_lifecycle.export | export the organization's data | owner, admin |
organization.delete | request the organization's deletion | owner |
Every signed-in user can export their own data.
Tables
The module reads the tables of every other installed module from the module
registry: each module declares which of its tables hold a user's rows, which
hold a tenant's rows, and which the purge keeps. That covers memberships and
permission overrides, profiles, settings, comments and activity,
attachments, API keys, usage counters, events, quotas and history,
notifications with their deliveries, subscriptions and preferences,
onboarding progress, flag overrides, invitations, billing customers, SSO
domains, providers and SCIM users and members, support sessions, invite
codes, platform role assignments, outbox events, webhook endpoints,
deliveries and secrets, incoming webhook endpoints, inbox tables,
announcement dismissals, waitlist entries and redemptions, AI provider
keys, connectors and their grants, workflow credentials, chat installations
and the audit trail. A module added in a later release joins exports and purges
when you run upgrade, and a table you map to another name in
blocks.<name>.tables is read under that name. The module's own export
and deletion records stay out, API keys and webhook secrets are never
exported, and incoming webhook endpoints and invitations are exported without
their token hashes and secrets. Audit events are exported without the row
snapshots (old_record, new_record) and the impersonation details, which
describe other people's data and the support staff. Columns that hold a
credential_ref are never exported, and the purge revokes them first (see
Purging). An actor's outbox events are left out of user
exports, because their payloads describe other members too; the purge
deletes them with the tenant. Add your own tables with their user column (for user
exports) and tenant column (for organization exports and the purge):
export default defineConfig({
blocks: {
"data-lifecycle": {
options: {
tables: {
projects: { tenant: "organization_id", user: "owner_id" },
"billing.invoices": { tenant: "organization_id", purge: false },
},
grace: "30 days",
exportTtl: "7 days",
bucket: "data-exports",
},
},
},
});purge: false keeps a table's rows in the purge, for records you must
retain. omit: ["api_token", "password_hash"] leaves columns out of every
export file of that table, for credentials the export must not hand out;
the purge still deletes the rows. export: false keeps the whole table out
of exports, for tables that hold only credentials, while the purge still
deletes its rows. An entry for a table a module already contributes, such as
"better_supabase.invitations", replaces that module's entry, so you can
leave out more columns or keep it out of exports. The audit trail is never purged; its
retention removes old events.
A schema with many tenant tables doesn't need a list. autoTables adds every
table in its schemas that has the tenant column (and, with user, the user
column), read from the catalog when an export or a purge runs, so a new table
is covered without a config change. tables entries still win for the tables
they name, and exclude takes schema.table names or * globs:
options: {
autoTables: {
schemas: ["public"], // default
tenant: "organization_id", // default
user: "created_by",
exclude: ["public.*_archive", "public.invoices"],
purge: true,
},
tables: { "public.invoices": { tenant: "organization_id", purge: false } },
},tables: "auto" is short for autoTables: {}.
omitPattern leaves out columns by name, for tables you didn't list one by
one. true matches token, secret, _hash, password, api_key and
license_key anywhere in the name, ignoring case; a string is a Postgres
regular expression of your own. The match runs on the catalog when an
export runs, for listed and autoTables tables alike, and adds to each
table's omit. It is off by default:
options: {
autoTables: {},
omitPattern: true, // or "^(private|internal)_"
},doctor warns about each exported column that matches the built-in pattern
and that no omit or omitPattern leaves out
(BS341).
Exports
createDataExporter({ format: "csv" }) writes one CSV file per table instead
of NDJSON ({id}/{schema.table}.csv), with a header row, nested values as
JSON and text that starts like a formula prefixed with ', for customers who
open exports in a spreadsheet.
Server code calls the data-lifecycle instance on db, in the caller's organization. With gen.hooks set, better-supabase gen writes the hooks:
export const { useList: useDataLifecycle } = defineDataHooks(
"dataLifecycle",
(db: AppDb) => db.dataLifecycle,
);const rows = await db.dataLifecycle.list({ limit: 50 }).orThrow();"use client";
import { useDataLifecycle } from "@/lib/supabase/hooks";
const rows = useDataLifecycle({ limit: 50 });A request returns the open export for the same subject instead of starting
a second one, and writes data_export.requested to the
outbox. The exporter runs it with a service-role
client: it reads each table in pages, writes {id}/{schema.table}.ndjson
and marks the export ready.
import {
createDataExporter,
sqlTransport,
} from "better-supabase/blocks/data-lifecycle";
const exporter = createDataExporter({
transport: sqlTransport(postgres.admin),
storage: supabaseAdmin.storage,
});
await outbox.relay("data-exports", exporter.sink());The exporter writes concurrency tables at a time (4 by default), each in
pages of pageSize rows (1,000), and the file list keeps the table order.
A tenant with hundreds of tables then exports in a fraction of the time it
takes one table after another. With a postgres.admin pool each table
reads on its own connection, so keep concurrency below the pool size;
concurrency: 1 restores the sequential order. The first failing table
stops the others from starting, and the export is marked failed.
exporter.job is a jobs handler for an { exportId }
payload when you prefer a queue. A failure marks the export failed with
the error, and running it again starts over. An event or job for an export
that is no longer pending or failed (cancelled, deleted, already running or
ready) is done: the sink skips it and the job completes, so it never blocks
the events behind it in the relay. exporter.run() still returns not_found
with the hint DATA_EXPORT_NOT_FOUND for it.
data_export.completed carries the requester and the files, so a
notifications consumer can tell them it's
done. lifecycle.download(id) then returns a signed URL per file. The
bucket's policy serves the files only to the requester (or members with
data_lifecycle.export for an organization export) until expires_at.
Expired exports stay in Storage until something removes them. Run
purger.purgeExports() from the same cron job as the purge (a
service-role purger with storage): it removes the files of exports past
expires_at (expired_data_exports), then their rows
(forget_data_exports), and returns how many it removed.
Exporting one record
requestSubjectExport(subjectType, subjectId) exports one record, such as a
patient chart or a customer, for an access request about that one record. It
calls request_subject_export(subject_type, subject_id, format), which
collects the record itself and every row of an installed block that points at
it through subject_type and subject_id (comments, attachments, field
values, tags and the rest of the lifecycle registry), within the record's
organization.
const pending = await db.dataLifecycle
.requestSubjectExport("patient", chartId, { format: "csv" })
.orThrow();The subject type is one declared in config.recordTypes
or by an app table. The caller needs organization.export in the record's
organization, or the record's manage action when the subject declares one,
so a clinician who manages a chart can export it without exporting the whole
organization. Anyone else, an unknown record and an anonymous caller are
refused (DATA_EXPORT_FORBIDDEN); an unknown type or a format other than
ndjson and csv fails with DATA_EXPORT_SUBJECT or DATA_EXPORT_FORMAT.
Encrypted columns are decrypted through the table's <table>_reveal
function as the caller, so the reads land in the audit trail when the table
sets auditReads, and a column the caller can't reveal is left out instead
of exported as ciphertext. Encrypted custom field
values are decrypted the same way.
The request takes a snapshot of the rows into data_export_contents, then
the same exporter writes one file per table and deletes the snapshot. The
record's format wins over the exporter's format. An open request for the
same record by the same caller is returned instead of a second one.
Restoring an export
createDataImporter reads an organization export back into an organization.
It needs the imports block next to data-lifecycle,
a service-role transport and the export's files, which you read from storage
yourself.
import {
createDataImporter,
sqlTransport,
} from "better-supabase/blocks/data-lifecycle";
const importer = createDataImporter({ transport: sqlTransport(serviceSql) });
const files = names.map((name) => ({
name,
text: async () => await (await bucket.download(name)).data!.text(),
}));
const report = await importer
.restore({ organizationId, files, dryRun: true })
.orThrow();Each file is <schema.table>.ndjson, optionally under a folder such as the
export id. A table's file holds one JSON object per line, the object
to_jsonb(row) returns with the columns data_lifecycle_tables() omits left
out. The importer checks each table name and column against what an
organization export reads (data_restore_tables()), orders the tables so a
parent comes before the tables that reference it, and sends every row through
import_upsert_batch as an imports item with source = 'restore' and the
entity data_lifecycle_row. A custom importer can do the same: write the
{ table, row } item for each line, with the key the row's primary key
values, or a hash of the line for a table without one.
The restore runs in import mode, so imports.events and imports.audit
decide what the writes emit. The tenant column of every row is replaced with
organizationId. A row whose primary key already belongs to another
organization is reported as DATA_RESTORE_ROW_CONFLICT and left alone.
Restoring the same files again writes nothing: each row's content hash is in
the record map, so it counts as unchanged. A row that changed in the file
updates the row, and rows a user edited in between are overwritten, because
the restore target has no updatedAt reader.
A restore never writes the tables that decide access, billing, usage, keys or
platform state: those of the memberships, invitations, permissions,
impersonation, sessions, api-keys, service-accounts, usage, billing,
entitlements, flags, audit, outbox, sso, domains, imports, signing-keys,
security-events, rate-limit, ai-keys, credentials, teams, guests, approvals,
access-requests, agents, share-links, oauth-server, mfa, identities,
organizations, connectors and agent-checkout blocks, and the grant, member,
approval and secret tables of drive, inspections, invoices, knowledge,
messaging, deals, subjects, webhooks and workflow-editor. List tables of
your own in options.restoreExclude ("table" or "schema.table") to leave
them out too. The member who started the run needs permissions.restore
(organization.delete by default) in the organization, or every row fails
with DATA_RESTORE_FORBIDDEN; a run the service role started has no creator
and is not checked.
dryRun: true opens a run that rolls back every batch and returns a
RestoreReport: per table the file's row count, inserted, updated,
unchanged, conflicted, unknownColumns and the row errors, plus
unknownTables. Each batch is checked on its own, so a dry run reports a
foreign key error for rows that need a parent from the same file; the real
run does not. Without dryRun, an unknown table or column fails the whole
restore with a validation error (DATA_RESTORE_UNKNOWN) before anything is
written. tables limits the restore to some tables.
CSV files fail with unsupported (DATA_RESTORE_CSV). The CSV export writes
null and empty text the same way, prefixes text that looks like a formula with
', and has no type for JSON cells, so it can't give the rows back. Export as
ndjson to restore.
Deleting an organization
const deletion = await lifecycle
.requestOrganizationDeletion(organizationId, { grace: "14 days" })
.orThrow();
await lifecycle.cancelOrganizationDeletion(organizationId).orThrow();The request needs organization.delete, and disables the tenant through
the access contract: the organization's disabled_at with the managed
organizations module, or the blocks.permissions.disabled.tenant column.
Disabled tenants get no permissions and no membership claims, so members
lose access at once. grace takes an interval or a Temporal.Duration
and defaults to the grace option.
With blocks.data-lifecycle.permissions.deletePlatform set to a
platform permission (is_platform), platform staff can request and cancel a
deletion for any organization without the service role, such as from an
admin console.
The requester, or a member holding the cancelDelete permission
(organization.delete unless blocks.data-lifecycle.permissions.cancelDelete
names another key), can cancel until the purge runs. The check goes through
better_supabase.member_can_while_deleting(), which every access model
renders: it asks the same question as member_can() without the
disabled-tenant check, so an authorization provider's roles keep working
while the organization waits. With blocks.permissions.mode: "custom", where
the app writes the access functions itself, an owner can cancel instead.
Cancelling enables the tenant again, unless it was disabled before the
request.
organizationDeletion(organizationId) returns the pending deletion to the
organization's members, for a banner with the purge date.
Purging
The purger runs the deletions past their grace period with a service-role client, from a cron route or a jobs queue:
import {
createOrganizationPurger,
sqlTransport,
} from "better-supabase/blocks/data-lifecycle";
const purger = createOrganizationPurger({
transport: sqlTransport(postgres.admin),
storage: supabaseAdmin.storage,
buckets: ["attachments"],
billing,
});
await purger.purgeDue({ limit: 20 }).orThrow();For each organization it checks that the deletion is due, cancels the
Stripe subscription (billing.cancelSubscription, when you pass
billing), revokes the organization's credentials, removes every object
under the organization's prefix in buckets, then calls
purge_organization. That function runs your
public.on_organization_purge(tenant) hook when it exists, deletes the
tenant's rows from each purged table (your tables first), deletes the
tenant's own row last and writes organization.purged. It returns the
deleted row count per table. A table whose rows another table still
references through a restricting foreign key, or whose delete makes an
on delete set null break a check on another table, waits for a later pass,
so the order of the tables doesn't matter and your foreign keys can stay;
when no pass makes progress, the purge stops with ORGANIZATION_PURGE_BLOCKED
and names the tables.
The ledger's entries and transactions are append-only.
While it deletes, purge_organization sets the transaction-local
better_supabase.purge_tenant setting to the tenant's id, and the ledger's
guard lets a delete through only for the service role, only for that tenant
and only while its deletion is due. Every other update or delete on the ledger
is still refused.
The tenant row is the organizations module's (on its own table or yours), or the
row of the table blocks.permissions.disabled.tenant names, or the one in
options.tenantRow ("schema.table.column", false to keep it), so a
tenant table of your own needs no on_organization_purge hook to go.
A bucket name in buckets clears {organizationId}/. For buckets laid out
another way, pass { bucket, path } with a template, or a function that
returns the prefixes. Each prefix must contain the organization id, so a
purge never clears another tenant's objects:
buckets: [
"attachments",
{ bucket: "files", path: "orgs/{organizationId}/files" },
{ bucket: "media", path: (id) => [`public/${id}`, `private/${id}`] },
],Credentials
Pass credentials with your credential provider
and the purger revokes the credential_ref of every row the purge deletes,
such as AI provider keys, connector servers, connector grants (for the
grant's user) and workflow credentials, before it deletes the rows:
const purger = createOrganizationPurger({
transport: sqlTransport(postgres.admin),
credentials: vaultCredentials({
transport: credentialsTransport(postgres.admin),
}),
});
const [purged] = await purger.purgeDue().orThrow();
purged?.credentials.revoked; // 3
purged?.credentials.unrevoked; // [{ table, column, ref, subject, reason }]better_supabase.organization_credential_refs(tenant) lists the refs for
the purger and refuses a deletion that isn't due. The purger revokes a ref
only when it carries the organization in its tenant, the same check that
guards credential writes, so a purge never revokes another tenant's or the
app's own secret. The refs it leaves come back in credentials.unrevoked
with a reason, for you to revoke or keep:
| Reason | The ref |
|---|---|
foreign | carries no tenant or another tenant |
no_provider | is in the tenant, but the purger has no credentials provider |
not_revocable | belongs to a provider that can't revoke (env) |
A failed revoke stops the purge before it deletes anything, so running it
again retries. Chat installations keep their rows in the purge (purge: false): call uninstallTenant from the
Chat SDK channels before the purge, which revokes
their credentials.
Anonymizing
Some records must lose their personal data a while after a process ends
without being deleted, such as a candidate's details 180 days after the
application closed. options.anonymize lists those rules, one per table:
"data-lifecycle": {
options: {
anonymize: [
{
table: "public.candidates",
after: "180 days",
from: "process_ended_at",
unless: "{row}.talent_pool_consent_until > now()",
set: {
first_name: "Anonymized",
last_name: null,
email: null,
phone_hash: { sql: "md5({row}.phone)" },
},
markedBy: "anonymized_at",
},
],
},
},| Field | Meaning |
|---|---|
table | table or schema.table |
after | an interval: a row is due once from is older than this |
from | the timestamp column the interval counts from; a row with no value is never due |
unless | a condition on the row {row} that keeps a due row as it is while it holds |
set | the new value per column: a string, number, boolean, null, or { sql } with an expression on {row} |
markedBy | a nullable timestamp column the rule sets, so each row is anonymized once |
better_supabase.anonymize_due(max_rows) applies every rule to at most
max_rows (1000) due rows each and returns the rows changed per table. The
service role calls it through the purger, and createOrganizationPurger({ anonymize: true }) also runs it in job, after the due purges:
const anonymized = await purger.anonymizeDue({ limit: 500 }).orThrow();
// { "public.candidates": 12 }The rule changes columns only. Files in Storage that belong to the row,
such as a CV, stay where they are; remove them from an after update
trigger on markedBy or in your own job.
Retention policies and legal holds
Each module's purge takes an older_than default. A retention policy
overrides it per kind of record, for every tenant, a plan's tenants or one
tenant, and a legal hold stops every purge from deleting what it covers.
Both live in retention_policies and legal_holds, and the functions are
service-role only:
import {
createRetention,
sqlTransport,
} from "better-supabase/blocks/data-lifecycle";
const retention = createRetention({ transport: sqlTransport(postgres.admin) });
await retention.setPolicy("audit", "7 years").orThrow();
await retention.setPolicy("audit", "1 year", { plan: "free" }).orThrow();
await retention
.setPolicy("outbox", Temporal.Duration.from({ days: 30 }), { organizationId })
.orThrow();
const hold = await retention
.placeHold({ organizationId, reason: "Case 2026-114" })
.orThrow();
await retention.releaseHold(hold.id).orThrow();| Kind | Purged by | Policies | Holds |
|---|---|---|---|
audit | purge_audit_log | yes | yes |
outbox | purge_outbox | yes | yes |
webhook_deliveries | purge_webhook_deliveries | yes | yes |
webhooks | purge_webhooks | yes | yes |
inbound_events | purge_inbound_events | yes | yes |
job_archive | purge_job_archive | yes | yes |
usage | purge_usage_history | yes | yes |
notifications | purge_notifications | yes | yes |
workflow_runs | purge_workflow_runs | yes | yes |
ai_chats | purge_ai_chats | no | yes |
trash | purge_expired_trash | no | yes |
A purge keeps a row for the tenant's own policy, then its plan's, then the
policy for every tenant, and falls back to its older_than argument; an
audit_retention hook still comes first for the audit log. Chats and trash
expire on their own date, so only holds apply to them. An app's own purges
can use any other kind through better_supabase.retention_for(kind, tenant)
and is_held(kind, tenant).
A hold without organizationId covers every tenant, and one without kind
covers every kind. While a hold covers a tenant, purge_organization stops
with ORGANIZATION_LEGAL_HOLD, and the purger stops before it cancels
billing, revokes credentials or removes files. Placing and releasing a hold emit
legal_hold.placed and legal_hold.released. When data-lifecycle isn't
installed, each purge keeps its plain older_than and nothing is held.
Data subject requests
A request under GDPR Articles
15 to 20 gets one row in data_subject_requests, with a due date 30 days
after it was received. The kinds are access, erasure, rectification and
portability.
const request = await db.dataLifecycle
.openDataSubjectRequest({
organizationId,
kind: "access",
requester: "ada@example.com",
subject: { type: "contact", id: contactId },
})
.orThrow();
await db.dataLifecycle
.verifyDataSubjectRequest({ requestId: request.id, method: "email link" })
.orThrow();
await db.dataLifecycle
.fulfilDataSubjectRequest({
requestId: request.id,
resolution: "export sent",
})
.orThrow();Fulfilment needs a verified identity (DSAR_UNVERIFIED otherwise). For
access and portability it starts the NDJSON export of the record and keeps
its exportId. For erasure it checks the legal holds: a hold on the
organization refuses the request with DSAR_HELD, and otherwise the row
records that the app has deleted or anonymized the data with the purge and
anonymize functions above. rectification is recorded the same way.
extendDataSubjectRequest(id, reason) moves the due date to three months after
receipt, once (Article 12(3)). A second extension fails with DSAR_EXTENDED.
refuseDataSubjectRequest(id, reason) closes a request with its reason.
dataSubjectRequests({ organizationId, status, openOnly }) lists them with an
overdue flag. All of these need data-lifecycle.export. The error codes are
DSAR_FORBIDDEN, DSAR_NOT_FOUND, DSAR_INVALID, DSAR_CLOSED,
DSAR_UNVERIFIED, DSAR_EXTENDED and DSAR_HELD.
Plan subject access and erasure
Entities declare their personal data in the block manifest, so one call lists
what an access or erasure request covers across blocks. subjectAccessPlan
reads personalData, subjectColumn, erase, retention and legalHold;
subjectAccessRequest opens the data subject request and returns it with the
plan.
import { consentsBlock } from "better-supabase/blocks/consents";
import {
dataLifecycleBlock,
subjectAccessRequest,
} from "better-supabase/blocks/data-lifecycle";
import { fieldHistoryBlock } from "better-supabase/blocks/field-history";
const { data } = await subjectAccessRequest(lifecycle, {
organizationId,
kind: "erasure",
requester: "ada@example.com",
subject: { type: "contact", id: contactId },
blocks: [consentsBlock, dataLifecycleBlock, fieldHistoryBlock],
}).orThrow();
// Rows to remove, rows to blank, rows a legal duty keeps.
const { delete: remove, anonymize, keep } = data.plan.erasure;An erasure never deletes the rows of an append-only entity: field_history and
consent declare anonymize, and data_subject_request declares keep. An
entity that declares personalData without a subjectColumn, or an append-only
one that would be deleted, appears in plan.gaps.
Execute the erasure
executeErasure runs a verified, open erasure request over every installed
module table that declares an erase mode, in one transaction, and returns what it
did by schema.table.
const result = await lifecycle
.executeErasure({ requestId: data.request.id })
.orThrow();
// result.removed: rows deleted { "better_supabase.consent_signals": 2 }
// result.blanked: rows kept, columns set to null
// result.kept: rows a legal duty keeps
// result.held: rows left alone because a legal hold covers them
await lifecycle
.fulfilDataSubjectRequest({
requestId: data.request.id,
resolution: "Erased; the audit trail is kept.",
})
.orThrow();A table whose retention kind has an active legal hold
is untouched and listed under held, so you can report it to the requester
instead of failing the request. The request stays open until you fulfil it. The
call needs the data_lifecycle.export permission or the service role, and it
only reaches the request's own organization and the one person it names. It
fails with DSAR_UNVERIFIED before the identity check, DSAR_INVALID for a
request that is not an erasure and DSAR_CLOSED for a closed one.
The shipped tables that take part are consents and field_changes (personal
columns set to null), data_subject_requests (kept) and consent_signals
(deleted). Run better-supabase upgrade and apply the migration it generates to
add erase_data_subject.
Events
With the outbox installed, the module writes these events with the tenant as
the partition key, except organization.purged, which has none because the
tenant is gone by then (its id stays in organizationId):
| Event | When | Data |
|---|---|---|
data_export.requested | an export is requested | exportId, subject, organizationId, userId, requestedBy, subjectType, subjectId |
data_export.completed | its files are written | the same, with files and expiresAt |
data_export.failed | the exporter failed | the same, with error |
organization.deletion_requested | a deletion is requested | organizationId, userId, purgeAfter |
organization.deletion_cancelled | it is cancelled | the same |
organization.purged | the purge deleted the organization | organizationId |
Hooks
createDataLifecycle takes hooks, keyed by method name, that run your code
before and after a call: refuse it with a DbError, rewrite its arguments
or observe the result (see extending blocks).
Without the client
db.dataLifecycle is this client. Code that does not go through bsb.db() builds it with a transport and an organization id:
"use server";
import {
createDataLifecycle,
rpcTransport,
} from "better-supabase/blocks/data-lifecycle";
const supabase = await createServerClient();
const lifecycle = createDataLifecycle({
transport: rpcTransport(supabase),
storage: supabase.storage,
});
await lifecycle.requestExport().orThrow();
await lifecycle.requestExport({ organizationId }).orThrow();Read through a Db with the block installed through .blocks(),
db.$blocks.dataLifecycle gets the Db's Storage (db.$storage), so
download signs the export files as the same caller.
Exporting in one call
exportNow({ organizationId?, timeoutMs?, intervalMs? }) requests an export, polls exports every intervalMs (default 1000) for at most timeoutMs (default 30000), and returns the signed URLs through download. A failed export fails with invalid_request and the hint DATA_EXPORT_FAILED. An export that is not ready in time fails with DATA_EXPORT_NOT_READY and keeps running, so fetch it later with exports and download.
Reading an export as a job
startExportJob({ organizationId? }) requests an export and returns { jobId: "export:<id>" }. jobs is the export source of createJobs, so jobs.get("export:<id>") returns the common JobResult: pending, running, or completed with the export as result. Fetch the files with download. A failed export reads as failed with DATA_EXPORT_FAILED. An export the caller cannot see is not_found.
Paging data subject requests
subjectRequestPage pages by keyset (ADR 1077) and getSubjectRequest(id) returns one request, or a not_found error. dataSubjectRequests stays as a deprecated alias until 0.70. Filters are status, kind, open (["true"] leaves out the closed requests) and overdue (["true"] keeps the requests past their due date). q searches the subject and the requester.
const due = await dataLifecycle
.subjectRequestPage({ organizationId, filters: { overdue: ["true"] } })
.orThrow();A cursor belongs to the sort it came from, so start again from the first page when sort changes. A sort, filter, facet or text the entity does not declare returns an invalid_input error. Block lists describes the options every block list shares.
Last updated on
Document templates
Templates per legal entity and language for invoices, credit notes, quotes, orders, dunning letters, delivery notes and statements, reusable text blocks, a typed variable contract, a safe HTML renderer and a snapshot that keeps an issued document stable.
SSO
Verified email domains with auto-join, SAML providers per organization, SSO enforcement in the access token hook, and a SCIM 2.0 endpoint that provisions memberships.