sistema-de-chamados/convex
2025-11-12 22:24:31 -03:00
..
_generated chore: sync staging 2025-11-10 01:57:45 -03:00
alerts.ts refactor: quality workflow, docs, tests 2025-10-16 19:14:46 -03:00
alerts_actions.ts convex: mover action de envio de alertas para arquivo Node ('alerts_actions.ts' com 'use node'); remover import de 'tls' do módulo de queries/mutations; ajustar cron para usar api.alerts_actions; remover tentativa de envio de e-mail no mutation addComment (evitar Node API em isolate). 2025-10-07 17:04:38 -03:00
bootstrap.ts feat: melhorar gerenciamento de acesso remoto de máquinas 2025-10-28 11:45:16 -03:00
categories.ts chore: sync staging 2025-11-10 01:57:45 -03:00
categorySlas.ts feat: agenda polish, SLA sync, filters 2025-11-08 02:34:43 -03:00
commentTemplates.ts feat: improve ticket export and navigation 2025-10-13 00:08:18 -03:00
companies.ts feat: expand admin companies and users modules 2025-10-22 01:27:43 -03:00
convex.config.ts chore: trigger convex rebuild 2025-10-22 02:16:32 -03:00
crons.ts Auto-pause internal work during lunch 2025-11-12 17:48:12 -03:00
dashboards.ts feat: padroniza tickets recentes nos dashboards 2025-11-07 14:22:14 -03:00
deviceExportTemplates.ts Ajusta placeholders, formulários e widgets 2025-11-06 23:13:41 -03:00
deviceFieldDefaults.ts Ajusta placeholders, formulários e widgets 2025-11-06 23:13:41 -03:00
deviceFields.ts Ajusta placeholders, formulários e widgets 2025-11-06 23:13:41 -03:00
devices.ts feat: dispositivos e ajustes de csat e relatórios 2025-11-03 19:29:50 -03:00
fields.ts chore: prep platform improvements 2025-11-09 21:09:38 -03:00
files.ts chore: reorganize project structure and ensure default queues 2025-10-06 22:59:35 -03:00
incidents.ts chore: sync staging 2025-11-10 01:57:45 -03:00
invites.ts chore: reorganize project structure and ensure default queues 2025-10-06 22:59:35 -03:00
machines.ts feat(agent): self-heal rustdesk remote access 2025-11-11 17:50:09 -03:00
metrics.ts Optimize Convex queries and stack config 2025-11-12 22:13:50 -03:00
migrations.ts chore: prep platform improvements 2025-11-09 21:09:38 -03:00
queues.ts chore: prep platform improvements 2025-11-09 21:09:38 -03:00
rbac.ts docs: registrar fluxo do updater e atualizar chaves 2025-10-12 04:06:29 -03:00
README.md ci(convex): touch convex/README to trigger Convex deploy job 2025-10-20 15:35:48 -03:00
reports.ts Fix open ticket pagination and CSAT fallback 2025-11-12 22:24:31 -03:00
revision.ts chore(convex): bump revision to force functions deploy 2025-10-21 11:34:14 -03:00
schema.ts fix(remote-access): allow short-lived revoked token grace 2025-11-11 16:46:54 -03:00
seed.ts Reorganiza gestão de usuários e remove dados mock 2025-10-18 01:15:15 -03:00
slas.ts chore: prep platform improvements 2025-11-09 21:09:38 -03:00
teams.ts chore: prep platform improvements 2025-11-09 21:09:38 -03:00
ticketForms.config.ts chore: prep platform improvements 2025-11-09 21:09:38 -03:00
ticketFormSettings.ts Ajusta placeholders, formulários e widgets 2025-11-06 23:13:41 -03:00
ticketFormTemplates.ts chore: prep platform improvements 2025-11-09 21:09:38 -03:00
ticketNotifications.ts feat(export,tickets,forms,emails):\n- Corrige scroll de Dialogs e melhora UI de seleção de colunas (ícones e separador)\n- Ajusta rota/params da exportação em massa e adiciona modal de exportação individual\n- Renomeia 'Chamado padrão' para 'Chamado' e garante visibilidade total para admin/agente\n- Adiciona toggles por empresa/usuário para habilitar Admissão/Desligamento\n- Exibe badge do tipo de solicitação na listagem e no cabeçalho do ticket\n- Prepara notificações por e-mail (comentário público e encerramento) via SMTP\n 2025-11-04 13:41:32 -03:00
tickets.ts Optimize Convex queries and stack config 2025-11-12 22:13:50 -03:00
tsconfig.json chore: reorganize project structure and ensure default queues 2025-10-06 22:59:35 -03:00
users.ts feat: export reports as xlsx and add machine inventory 2025-10-27 18:00:28 -03:00

Welcome to your Convex functions directory!

CI note: touching a file under convex/** intentionally triggers the Convex deploy job.

Write your Convex functions here. See https://docs.convex.dev/functions for more.

A query function that takes two arguments looks like:

// convex/myFunctions.ts
import { query } from "./_generated/server";
import { v } from "convex/values";

export const myQueryFunction = query({
  // Validators for arguments.
  args: {
    first: v.number(),
    second: v.string(),
  },

  // Function implementation.
  handler: async (ctx, args) => {
    // Read the database as many times as you need here.
    // See https://docs.convex.dev/database/reading-data.
    const documents = await ctx.db.query("tablename").collect();

    // Arguments passed from the client are properties of the args object.
    console.log(args.first, args.second);

    // Write arbitrary JavaScript here: filter, aggregate, build derived data,
    // remove non-public properties, or create new objects.
    return documents;
  },
});

Using this query function in a React component looks like:

const data = useQuery(api.myFunctions.myQueryFunction, {
  first: 10,
  second: "hello",
});

A mutation function looks like:

// convex/myFunctions.ts
import { mutation } from "./_generated/server";
import { v } from "convex/values";

export const myMutationFunction = mutation({
  // Validators for arguments.
  args: {
    first: v.string(),
    second: v.string(),
  },

  // Function implementation.
  handler: async (ctx, args) => {
    // Insert or modify documents in the database here.
    // Mutations can also read from the database like queries.
    // See https://docs.convex.dev/database/writing-data.
    const message = { body: args.first, author: args.second };
    const id = await ctx.db.insert("messages", message);

    // Optionally, return a value from your mutation.
    return await ctx.db.get(id);
  },
});

Using this mutation function in a React component looks like:

const mutation = useMutation(api.myFunctions.myMutationFunction);
function handleButtonPress() {
  // fire and forget, the most common way to use mutations
  mutation({ first: "Hello!", second: "me" });
  // OR
  // use the result once the mutation has completed
  mutation({ first: "Hello!", second: "me" }).then((result) =>
    console.log(result),
  );
}

Use the Convex CLI to push your functions to a deployment. See everything the Convex CLI can do by running npx convex -h in your project root directory. To learn more, launch the docs with npx convex docs.