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