Skip to content

datasets

client.datasets lists the tenant’s registered datasets and registers new ones. Registering a dataset creates its root key domain.

list

list returns every registered dataset.

list(): Promise<Dataset[]>;

Returns: Every Dataset registered in the tenant.

Records: Nothing. Not a decision.

Errors: no-session, unreachable.

register

register registers a dataset and creates its root key domain. When this device’s person is the first domain owner, the SDK creates the domain key and saves a recovery copy of it. It needs a complete backup key registration.

register(dataset: Omit<Dataset, 'root'> & { storageBinding: unknown; firstOwner: Person }): Promise<Decided<Dataset>>;

In Swift and Kotlin the argument is a DatasetRegistration, declared under Types. Its fields are the same.

ParameterTypeDescription
namestringThe dataset’s name.
classificationClassification"phi", "pii", "public" or "de-identified".
storage{ kind: "object-storage" | "file-share" | "database" }The storage kind.
indexFieldsstring[]Fields the saving Client writes into the folder index. They are searchable.
subjectFieldstring, optionalThe field the SDK tokenizes into the subject ref at save.
segmentFieldsstring[]Fields with a segment of their own, the HIPAA identifiers by default and what the customer adds.
retentionFloorsecondsThe dataset’s retention floor.
storageBindingStorageBindingWhere and under what credentials the objects live, such as a bucket, a prefix, a region and a role for a dataset on S3.
firstOwnerPersonThe dataset’s first domain owner.

Returns: A Decided<Dataset>: on allow, the registered Dataset with its root.

Records: One decision and one access event.

Who may call it: The Owner or Admin role.

Errors: no-session, unreachable, storage-unreachable.

Types

Dataset

interface Dataset {
name: string;
classification: Classification;
storage: { kind: 'object-storage' | 'file-share' | 'database' };
root: Locator;
indexFields: string[];
subjectField?: string;
segmentFields: string[];
retentionFloor: Seconds;
}
FieldTypeDescription
namestringThe dataset’s name.
classificationClassificationIts classification.
storage{ kind }Object storage, a file share or a database.
rootLocatorThe dataset’s root key domain.
indexFieldsstring[]Fields written into the folder index. They are searchable on the device.
subjectFieldstring, optionalThe field the SDK tokenizes into the subject ref at save.
segmentFieldsstring[]Fields with a segment of their own.
retentionFloorsecondsThe dataset’s retention floor.

DatasetRegistration

What register takes: every field of Dataset except root, which the Seald Healthcare Cloud assigns, plus storageBinding and firstOwner.

// written inline in the register signature:
type DatasetRegistration = Omit<Dataset, 'root'> & { storageBinding: StorageBinding; firstOwner: Person };
FieldTypeDescription
name, classification, storage, indexFields, subjectField, segmentFields, retentionFlooras on DatasetThe dataset’s own fields.
storageBindingStorageBindingWhere and under what credentials the objects live. Only the Seald Healthcare Cloud holds the binding and its credentials. A device never does.
firstOwnerPersonThe dataset’s first domain owner.

StorageBinding

Where a dataset’s objects live: a bucket on S3, or a table in a database.

type StorageBinding = { s3: S3Binding } | { database: DatabaseBinding };
CaseHolds
s3An S3Binding, for a dataset on object storage.
databaseA DatabaseBinding, for a dataset in a database.

S3Binding

interface S3Binding {
bucket: string;
prefix: string;
region: string;
role: string;
}
FieldTypeDescription
bucketstringThe bucket the objects live in.
prefixstringThe key prefix under which the Seald Healthcare Cloud grants access.
regionstringThe bucket’s region.
rolestringThe role the Seald Healthcare Cloud assumes for the bucket and prefix.

DatabaseBinding

interface DatabaseBinding {
schema: string;
table: string;
}
FieldTypeDescription
schemastringThe database schema that holds the table.
tablestringThe table the records live in.