Human methods: hold, invite, onboard, recruit
The Human Verbs hold, invite, onboard, recruit as typed SDK methods, with inputs, result, refusals and an example.
Reference for Human, one group of Human methods.
Human.hold
Hold sets aside part of a supplying Human’s earned balance against an open Dispute or an Order inside its clearance period. Verb page.
interface HumanVerbs {
hold(input: HumanHoldInput, options?: SB.CallOptions): SB.Call<Human>
}Emits Human.held.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
human | Human | required | The payee. |
amount | money | required | The amount to hold. |
cause | string | required | The Order or Dispute the hold cites. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
human | Human | required | The payee, with the held amount recorded. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
import { $ } from 'startup-builder'
const human = await $.Human.hold({ human: 'human_EeCsrv4AOW', amount: { amount: 29, currency: 'USD' }, cause: 'Example cause' })Human.invite
Invite asks a person to join a Startup in a named Role, sharing that Role’s work with its Agent. Verb page.
interface HumanVerbs {
invite(input: HumanInviteInput, options?: SB.CallOptions): SB.Call<Human>
}Emits Human.invited.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
email | email | required | Where the invitation goes. |
role | Role | required | The Role offered. |
access | string | The Access Level the person holds in the app, apart from the Role: admin, member or viewer. Owner is never invited. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
human | Human | required | The invited Human. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The input does not match the schema of the operation. | invalid-input | Read the schema of the operation, then send every required field with the right type. | None. |
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record changed since it was read, so the write would overwrite a newer version. | conflict | Read the record again, then retry the write against its current state. | None. |
Example
import { $ } from 'startup-builder'
const human = await $.Human.invite({ email: 'dana@leaseline.app', role: 'role_oloMFMUeCH' })Human.onboard
Onboard admits a recruited Human to supply work once their identity, Credentials and payout details verify. Verb page.
interface HumanVerbs {
onboard(input: HumanOnboardInput, options?: SB.CallOptions): SB.Call<Human>
}Emits Human.onboarded.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
human | Human | required | The recruited Human. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
human | Human | required | The Human, able to take Tasks. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The input does not match the schema of the operation. | invalid-input | Read the schema of the operation, then send every required field with the right type. | None. |
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Example
import { $ } from 'startup-builder'
const human = await $.Human.onboard({ human: 'human_EeCsrv4AOW' })Human.recruit
Recruit invites a person to supply credentialed work to a Startup through its supply App. Verb page.
interface HumanVerbs {
recruit(input: HumanRecruitInput, options?: SB.CallOptions): SB.Call<Human>
}Emits Human.recruited.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
email | email | required | Where the invitation goes. |
credential | string | The Credential the work requires. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
human | Human | required | The recruited Human. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The input does not match the schema of the operation. | invalid-input | Read the schema of the operation, then send every required field with the right type. | None. |
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Example
import { $ } from 'startup-builder'
const human = await $.Human.recruit({ email: 'dana@leaseline.app' })