From 74f7a69991f4639a98759590b1b075a4d52aeafe Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 23:05:03 +0000 Subject: [PATCH 1/5] Changes Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com> --- supabase/functions/configure-telegram-webhook/index.ts | 3 ++- supabase/functions/disconnect-integration/index.ts | 3 ++- supabase/functions/disconnect-telegram/index.ts | 3 ++- .../functions/parse-cronjob-natural-language/index.ts | 2 -- supabase/functions/provision-agent/index.ts | 10 ++++++---- supabase/functions/railway-webhook/index.ts | 1 + 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/supabase/functions/configure-telegram-webhook/index.ts b/supabase/functions/configure-telegram-webhook/index.ts index 66cd8e7..550807f 100644 --- a/supabase/functions/configure-telegram-webhook/index.ts +++ b/supabase/functions/configure-telegram-webhook/index.ts @@ -20,8 +20,9 @@ function randomHex(bytes: number): string { .join(""); } +// deno-lint-ignore no-explicit-any async function getDecryptedSecret( - admin: ReturnType, + admin: any, secretId: string, ): Promise { const { data, error } = await admin diff --git a/supabase/functions/disconnect-integration/index.ts b/supabase/functions/disconnect-integration/index.ts index 4760b5b..4a940c8 100644 --- a/supabase/functions/disconnect-integration/index.ts +++ b/supabase/functions/disconnect-integration/index.ts @@ -19,8 +19,9 @@ function jsonResponse(body: unknown, status = 200): Response { }); } +// deno-lint-ignore no-explicit-any async function getDecryptedSecret( - admin: ReturnType, + admin: any, secretId: string, ): Promise { const { data, error } = await admin diff --git a/supabase/functions/disconnect-telegram/index.ts b/supabase/functions/disconnect-telegram/index.ts index cac881e..55bfae8 100644 --- a/supabase/functions/disconnect-telegram/index.ts +++ b/supabase/functions/disconnect-telegram/index.ts @@ -13,8 +13,9 @@ function jsonResponse(body: unknown, status = 200): Response { }); } +// deno-lint-ignore no-explicit-any async function getDecryptedSecret( - admin: ReturnType, + admin: any, secretId: string, ): Promise { const { data, error } = await admin diff --git a/supabase/functions/parse-cronjob-natural-language/index.ts b/supabase/functions/parse-cronjob-natural-language/index.ts index c4a5dc5..d238ba7 100644 --- a/supabase/functions/parse-cronjob-natural-language/index.ts +++ b/supabase/functions/parse-cronjob-natural-language/index.ts @@ -3,9 +3,7 @@ // valida com cron-parser, gera human_readable em pt-BR via cronstrue. import { corsHeaders } from "../_shared/cors.ts"; import { createClient } from "npm:@supabase/supabase-js@2"; -// @ts-expect-error remote esm import cronParser from "https://esm.sh/cron-parser@4.9.0"; -// @ts-expect-error remote esm import cronstrue from "https://esm.sh/cronstrue@2.50.0/i18n"; const LOVABLE_API_KEY = Deno.env.get("LOVABLE_API_KEY")!; diff --git a/supabase/functions/provision-agent/index.ts b/supabase/functions/provision-agent/index.ts index beb8870..d858792 100644 --- a/supabase/functions/provision-agent/index.ts +++ b/supabase/functions/provision-agent/index.ts @@ -315,7 +315,8 @@ function jsonResponse(status: number, body: unknown) { } async function failJob( - supabase: ReturnType, + // deno-lint-ignore no-explicit-any + supabase: any, agent: { id: string }, jobId: string | null, message: string, @@ -330,7 +331,8 @@ async function failJob( } async function scheduleRetry( - supabase: ReturnType, + // deno-lint-ignore no-explicit-any + supabase: any, agent: { id: string }, jobId: string, message: string, @@ -341,8 +343,8 @@ async function scheduleRetry( .eq("id", jobId) .single(); - const attempt = job?.attempt ?? 1; - const max = job?.max_attempts ?? 5; + const attempt: number = (job?.attempt as number | undefined) ?? 1; + const max: number = (job?.max_attempts as number | undefined) ?? 5; if (attempt >= max) { await failJob(supabase, agent, jobId, `Max attempts reached. Last error: ${message}`); diff --git a/supabase/functions/railway-webhook/index.ts b/supabase/functions/railway-webhook/index.ts index 840669e..67dfc01 100644 --- a/supabase/functions/railway-webhook/index.ts +++ b/supabase/functions/railway-webhook/index.ts @@ -96,6 +96,7 @@ Deno.serve(async (req) => { // Carrega nome do cliente para a notificação (best-effort) async function loadFullName(): Promise { + if (!agent) return "—"; const { data } = await supabase .from("profiles") .select("full_name") From d8c7338c76005f9e7c83beeaccd32f1a0773da82 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 23:05:26 +0000 Subject: [PATCH 2/5] Changes Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com> --- supabase/functions/refresh-integration-token/index.ts | 3 ++- supabase/functions/telegram-webhook/index.ts | 3 ++- supabase/functions/validate-telegram-bot/index.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/supabase/functions/refresh-integration-token/index.ts b/supabase/functions/refresh-integration-token/index.ts index 5cd6a04..1de3936 100644 --- a/supabase/functions/refresh-integration-token/index.ts +++ b/supabase/functions/refresh-integration-token/index.ts @@ -16,8 +16,9 @@ function jsonResponse(body: unknown, status = 200): Response { }); } +// deno-lint-ignore no-explicit-any async function getDecryptedSecret( - admin: ReturnType, + admin: any, secretId: string, ): Promise { const { data, error } = await admin diff --git a/supabase/functions/telegram-webhook/index.ts b/supabase/functions/telegram-webhook/index.ts index 3a61b95..6f0ac89 100644 --- a/supabase/functions/telegram-webhook/index.ts +++ b/supabase/functions/telegram-webhook/index.ts @@ -16,8 +16,9 @@ function firstName(fullName: string | null | undefined): string { return parts[0] || "Mika"; } +// deno-lint-ignore no-explicit-any async function getDecryptedSecret( - admin: ReturnType, + admin: any, secretId: string, ): Promise { const { data, error } = await admin diff --git a/supabase/functions/validate-telegram-bot/index.ts b/supabase/functions/validate-telegram-bot/index.ts index 89f3446..c3051c8 100644 --- a/supabase/functions/validate-telegram-bot/index.ts +++ b/supabase/functions/validate-telegram-bot/index.ts @@ -125,7 +125,7 @@ Deno.serve(async (req) => { // 5) Se já houver um vault_id antigo, remove (reconexão) if (agent.telegram_bot_token_vault_id) { - await admin.rpc("exec_sql_void", {}).catch(() => {}); + try { await admin.rpc("exec_sql_void", {} as never); } catch { /* ignore */ } // tenta remover diretamente; ignora falha const { error: delErr } = await admin .from("vault.secrets" as unknown as never) From 8880b088fe067ac1484ce24d6550bf79db470136 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 23:05:40 +0000 Subject: [PATCH 3/5] Changes Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com> --- supabase/functions/_shared/paddle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supabase/functions/_shared/paddle.ts b/supabase/functions/_shared/paddle.ts index f2358b4..2e13269 100644 --- a/supabase/functions/_shared/paddle.ts +++ b/supabase/functions/_shared/paddle.ts @@ -1,4 +1,4 @@ -import { Environment, Paddle, EventName } from 'npm:@paddle/paddle-node-sdk'; +import { Environment, Paddle, EventName } from 'https://esm.sh/@paddle/paddle-node-sdk@2.6.1'; export { EventName }; From 7ee7aa38d6ff5d3a82a12598ba3ecd3a6772d3ea Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 23:05:52 +0000 Subject: [PATCH 4/5] Changes Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com> --- supabase/functions/_shared/paddle.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/supabase/functions/_shared/paddle.ts b/supabase/functions/_shared/paddle.ts index 2e13269..62cb0df 100644 --- a/supabase/functions/_shared/paddle.ts +++ b/supabase/functions/_shared/paddle.ts @@ -1,4 +1,5 @@ -import { Environment, Paddle, EventName } from 'https://esm.sh/@paddle/paddle-node-sdk@2.6.1'; +// @ts-ignore deno npm specifier resolved at runtime +import { Environment, Paddle, EventName } from 'npm:@paddle/paddle-node-sdk'; export { EventName }; From c047fc52711e8f4508bf31ec48a9e3ae190af3ca Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 23:06:07 +0000 Subject: [PATCH 5/5] Changes Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com> --- supabase/functions/deno.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 supabase/functions/deno.json diff --git a/supabase/functions/deno.json b/supabase/functions/deno.json new file mode 100644 index 0000000..fbd70ec --- /dev/null +++ b/supabase/functions/deno.json @@ -0,0 +1,3 @@ +{ + "nodeModulesDir": "auto" +}