Skip to content

Candidate methods: update, delete

The Candidate Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.

Reference for Candidate, one group of Candidate methods.

Candidate.update

Changes the given properties of a Candidate. Verb page.

TypeScript
interface CandidateVerbs {
  update(input: CandidateUpdateInput, options?: SB.CallOptions): SB.Call<Candidate>
}

Emits Candidate.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Candidate.
openingOpeningThe Opening the Person is considered for.
personPersonThe Person, whose record crosses Startups only with Consent.
sourcestringOne of pool, prospecting, listing, or referral.
deltajsonThe per-Verb difference between the Candidate and the incumbent Agent in the tryout.

Returns

OutputTypeRequiredDescription
candidateCandidaterequiredThe Candidate.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const candidate = await $.Candidate.update({ id: 'candidate_CR5hpwMwhW', opening: 'opening_3rD8qFSOyQ' })

Candidate.delete

Deletes a Candidate: a soft delete that keeps its history, undone by Thing.restore. Verb page.

TypeScript
interface CandidateVerbs {
  delete(input: CandidateDeleteInput, options?: SB.CallOptions): SB.Call<Candidate>
}

Emits Candidate.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Candidate.

Returns

OutputTypeRequiredDescription
candidateCandidaterequiredThe Candidate.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const candidate = await $.Candidate.delete({ id: 'candidate_CR5hpwMwhW' })