Tells the applicant's workspace, by email, as the application moves.
Optionallogger?: Pick<Console, "warn" | "error">Protected ReadonlydbProtected ReadonlyloggerStaticinstanceThe process service: the applicant's side plus AiPrise, Attio and onboarding.
Whether userId may start an application: not while one of theirs
(screened out included) is where they belong, nor once they are an ACTIVE
member of a customer. Membership of another ACTIVE customer outranks their
own application: an applicant invited into one belongs in its dashboard.
ProtectedextendExtends a stored session at AiPrise to just under its 90-day ceiling, then records the new expiry.
Provisions the customer of an application whose business profile AiPrise APPROVED, on the operator path: the applicant's workspace, the people AiPrise holds, one workflow run per application. Safe to repeat, and to run concurrently: one profile's handovers take turns.
The provisioning workflow calls this when it fails before the customer row exists:
PROVISIONING becomes FAILED. Idempotent; marked is false when nothing changed.
The provisioning workflow's last step: PROVISIONING becomes PROVISIONED.
Idempotent; marked is false when nothing changed.
The customer provisioning made from an application went ACTIVE: tell the
workspace its account is ready. Call only from the write that activated
it, so it is sent once. notified is false for an operator-path customer.
The framed form's URL for an ACTIVE member of the application's workspace. Rebuilds the stored session's URL, renewing it when under a day is left; only a DRAFT asks AiPrise for a session, getting its profile too.
ProtectedreadA refresh of the application's AiPrise profile has been written: when it
moved the application into review, an information request or a decline,
tell the workspace. previous is the shadow the refresh's own write
replaced, so a duplicate delivery, which replaces an identical row, finds
no change. notified is false when nothing was published.
Extends the AiPrise session of an applicant who still has the form to
finish to a day under AiPrise's 90: the RENEW_LINK of availableActions.
Returns only the expiries, never the session.
Hands a SUBMITTED application whose profile reads APPROVED over again by
its id: the RETRY_HANDOVER of availableActions.
Live applications with the operator's view of each; never reads out the session id, which rebuilds the applicant's URL.
Basics and screener in one submit: screened out, or a workspace the
applicant owns, an AiPrise profile and a session. An AiPrise failure
throws and leaves the row DRAFT, which openSession resumes.
ProtectedtoThe applicant's view of a readPage row; the admin adds the operator's.
ProtectedupdateThe one write to an existing application. only and unless make it a
compare-and-set: the row changes only while its status is only's, and
while that column is still null, its status is not yet the one named, or
no customer holds its workspace. True when a row changed.
CFX's side of an application: handing an APPROVED one over to provisioning.