holds
client.holds places and lifts legal holds. It belongs to the Owner role. A hold refuses any retire, restore or shred of what it covers.
list
list returns every legal hold in the tenant.
list(): Promise<Hold[]>func list() async throws -> [Hold]suspend fun list(): List<Hold>Returns: Every hold in the tenant.
Records: Nothing. Not a decision.
Who may call it: The Owner role.
Errors: locked, no-session.
place
place puts a legal hold on a dataset, a key domain or a record.
place(target: HoldTarget, reason: string, reference: string): Promise<Decided<Hold>>func place(_ target: HoldTarget, reason: String, reference: String) async throws -> Decided<Hold>suspend fun place(target: HoldTarget, reason: String, reference: String): Decided<Hold>Parameters
| Name | Type | Description |
|---|---|---|
target | HoldTarget | The dataset, key domain or record to hold. |
reason | string | Why the hold is placed. |
reference | string | The customer’s own reference, such as a ticket number. |
Returns: Decided<Hold>.
Records: One decision and one access event.
Who may call it: The Owner role.
Errors: locked, no-session.
lift
lift signs to lift a legal hold, after a fresh multi-factor sign-in. The hold lifts when the second Owner signs.
lift(holdId: string): Promise<Decided<{ lifted: boolean }>>func lift(_ holdId: String) async throws -> Decided<Bool>suspend fun lift(holdId: String): Decided<Boolean>Parameters
| Name | Type | Description |
|---|---|---|
holdId | string | The hold to lift. |
Returns: Decided, and on allow whether the hold is now fully lifted: true once the second Owner has signed, false while the first signature waits for the second.
Records: One decision and one access event.
Who may call it: The Owner role. Lifting a hold takes two Owners.
Errors: locked, no-session, canceled if the person does not complete the fresh multi-factor sign-in.
Types
HoldTarget
type HoldTarget = { dataset: string } | { domain: Locator } | { record: Locator };enum HoldTarget { case dataset(String) case domain(Locator) case record(Locator)}sealed interface HoldTarget { data class Dataset(val dataset: String) : HoldTarget data class Domain(val domain: Locator) : HoldTarget data class Record(val record: Locator) : HoldTarget}What a hold covers: an entire dataset, one key domain, or one record.
Hold
interface Hold { holdId: string; target: HoldTarget; reason: string; reference: string; placedAt: Date; placedBy: RecipientId; liftSignatures: number;}struct Hold { let holdId: String let target: HoldTarget let reason: String let reference: String let placedAt: Date let placedBy: RecipientId let liftSignatures: Int}data class Hold( val holdId: String, val target: HoldTarget, val reason: String, val reference: String, val placedAt: Instant, val placedBy: RecipientId, val liftSignatures: Int,)| Field | Type | Description |
|---|---|---|
holdId | string | The hold’s id. |
target | HoldTarget | What the hold covers. |
reason | string | Why the hold was placed. |
reference | string | The customer’s own reference. |
placedAt | Date | When the hold was placed. |
placedBy | RecipientId | The device that placed it. |
liftSignatures | number | How many Owners have signed to lift it so far. Lifting takes two. The first signature waits for the second. |
Holds
interface Holds { list(): Promise<Hold[]>; place(target: HoldTarget, reason: string, reference: string): Promise<Decided<Hold>>; lift(holdId: string): Promise<Decided<{ lifted: boolean }>>;}class Holds { func list() async throws -> [Hold] func place(_ target: HoldTarget, reason: String, reference: String) async throws -> Decided<Hold> func lift(_ holdId: String) async throws -> Decided<Bool>}class Holds { suspend fun list(): List<Hold> suspend fun place(target: HoldTarget, reason: String, reference: String): Decided<Hold> suspend fun lift(holdId: String): Decided<Boolean>}Holds groups the three methods above into the namespace client.holds.