Tells the applicant's workspace, by email, as the application moves.
Optionallogger?: Pick<Console, "warn" | "error">Protected ReadonlydbProtected ReadonlyloggerStaticinstanceThe process service: the shared database, AiPrise and the internal bus.
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.
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.
Live applications; userId narrows to workspaces the user is an ACTIVE member of.
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.
A self-serve application: the basics, then a pointer to the applicant's AiPrise business profile and hosted session. Session URLs are never stored.