Google Chat webhook sender and settings API (Feature 19) (#165)
CI / ci (push) Successful in 5m47s

Co-authored-by: orchestrator-agent <20+orchestrator-agent@code.cubecraftcreations.com>
This commit was merged in pull request #165.
This commit is contained in:
2026-10-09 14:35:32 -04:00
committed by approver_agent
parent d5ab945ee7
commit fc5b926edf
29 changed files with 1965 additions and 28 deletions
+29
View File
@@ -161,6 +161,35 @@ func (q *Queries) GetRecipeSearchSettings(ctx context.Context) (RecipeSearchSett
return i, err
}
const recordChatTest = `-- name: RecordChatTest :execrows
UPDATE chat_settings
SET last_test_at = ?, last_test_status = ?, updated_at = ?
WHERE id = 1 AND webhook_url_ct = ?
`
type RecordChatTestParams struct {
LastTestAt sql.NullString
LastTestStatus sql.NullString
UpdatedAt string
WebhookUrlCt []byte
}
// Records the outcome of a test message sent to the webhook sealed in
// webhook_url_ct; affects no row when the webhook has been replaced or
// removed since the test began.
func (q *Queries) RecordChatTest(ctx context.Context, arg RecordChatTestParams) (int64, error) {
result, err := q.db.ExecContext(ctx, recordChatTest,
arg.LastTestAt,
arg.LastTestStatus,
arg.UpdatedAt,
arg.WebhookUrlCt,
)
if err != nil {
return 0, err
}
return result.RowsAffected()
}
const setIntegrationsGoogleCalendar = `-- name: SetIntegrationsGoogleCalendar :execrows
UPDATE integrations_google
SET calendar_id = ?, calendar_name = ?, updated_at = ?