|
All checks were successful
- Adiciona linhas expandiveis no historico de execucoes - Mostra detalhes completos de cada acao (destinatarios, assunto, etc.) - Salva mais informacoes no backend para acoes de e-mail - Remove log de progresso do dashboard de reports 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| _generated | ||
| alerts.ts | ||
| automations.ts | ||
| automationsEngine.ts | ||
| bootstrap.ts | ||
| categories.ts | ||
| categorySlas.ts | ||
| checklistTemplates.ts | ||
| commentTemplates.ts | ||
| companies.ts | ||
| companySlas.ts | ||
| convex.config.ts | ||
| crons.ts | ||
| dashboards.ts | ||
| deviceExportTemplates.ts | ||
| deviceFieldDefaults.ts | ||
| deviceFields.ts | ||
| devices.ts | ||
| emprestimos.ts | ||
| fields.ts | ||
| files.ts | ||
| incidents.ts | ||
| invites.ts | ||
| liveChat.ts | ||
| machines.ts | ||
| machineSoftware.ts | ||
| metrics.ts | ||
| migrations.ts | ||
| ops.ts | ||
| queues.ts | ||
| rbac.ts | ||
| reactEmail.tsx | ||
| README.md | ||
| reports.ts | ||
| revision.ts | ||
| schema.ts | ||
| seed.ts | ||
| slas.ts | ||
| teams.ts | ||
| ticketChecklist.ts | ||
| ticketForms.config.ts | ||
| ticketFormSettings.ts | ||
| ticketFormTemplates.ts | ||
| ticketNotifications.ts | ||
| tickets.ts | ||
| tsconfig.json | ||
| url.ts | ||
| usbPolicy.ts | ||
| users.ts | ||
Welcome to your Convex functions directory!
CI note: touching a file under convex/** intentionally triggers the Convex deploy job.
// minor note to bump convex deploy
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.