Appearance
Documentation / @kizami/db / upsertUserNotificationSettings
Function: upsertUserNotificationSettings()
upsertUserNotificationSettings(
db,input):Promise<{approvalRequestEmail:boolean;approvalRequestWebhook:boolean;correctionAlertEmail:boolean;correctionAlertWebhook:boolean;emailAddress:string|null;leaveAlertEmail:boolean;leaveAlertWebhook:boolean;missingClockOutEmail:boolean;missingClockOutWebhook:boolean;overtimeAlertEmail:boolean;overtimeAlertWebhook:boolean;shiftVarianceEmail:boolean;shiftVarianceWebhook:boolean;tenantId:string;updatedAt:number;userId:string;webhookUrl:string|null; }>
Defined in: packages/db/src/queries/user-notification-settings.ts:51
作成、または既存行を丸ごと置き換える(PK は (tenant_id, user_id))。部分更新ではない — 呼び出し側で完全な値を渡すこと。
Parameters
db
input
UpsertUserNotificationSettingsInput
Returns
Promise<{ approvalRequestEmail: boolean; approvalRequestWebhook: boolean; correctionAlertEmail: boolean; correctionAlertWebhook: boolean; emailAddress: string | null; leaveAlertEmail: boolean; leaveAlertWebhook: boolean; missingClockOutEmail: boolean; missingClockOutWebhook: boolean; overtimeAlertEmail: boolean; overtimeAlertWebhook: boolean; shiftVarianceEmail: boolean; shiftVarianceWebhook: boolean; tenantId: string; updatedAt: number; userId: string; webhookUrl: string | null; }>