Skip to main content

Function: upsertProcessEmailDefaults()

upsertProcessEmailDefaults(svc, companyId, actorId, process, defaults): Promise<boolean>

Defined in: src/server/services/settings.ts:154

Upsert one process's reply-to + cc/bcc into the email_process map. Merges onto the RAW stored object (not a strict-parsed copy) so a malformed/legacy sibling entry is preserved untouched — only the one process being saved is rewritten. Shared by the Setup action and the invoice send dialog's "Save as default" toggle. Returns false on a write error.

Parameters

svc

SupabaseClient

companyId

string

actorId

string

process

"recruiting" | "invoice" | "welcome" | "pipeline"

defaults

infer

Returns

Promise<boolean>