Files

44 lines
2.7 KiB
TypeScript

// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0
// Generated by @conusai-kit/data-convex (pnpm convex:gen). Do not edit by hand: regenerate.
// Module: proposals. One Convex function per procedure (spec §5.4): read → query, write →
// mutation, effect → action. ctx.run is the custom-function ctx of convex/lib/functions.ts: it
// resolves the tenant scope, checks the permission and runs the procedure's own handler with the
// module's repositories bound to this function's ctx.db.
import { v } from "convex/values";
import { tenantMutation, tenantQuery } from "../lib/functions";
export const proposals_proposal_approve = tenantMutation({
args: { input: v.optional(v.any()), idempotencyKey: v.optional(v.string()) },
handler: async (ctx, { input, idempotencyKey }) => ctx.run("proposals.proposal.approve", input, idempotencyKey === undefined ? undefined : { idempotencyKey }),
});
export const proposals_proposal_approveMany = tenantMutation({
args: { input: v.optional(v.any()), idempotencyKey: v.optional(v.string()) },
handler: async (ctx, { input, idempotencyKey }) => ctx.run("proposals.proposal.approveMany", input, idempotencyKey === undefined ? undefined : { idempotencyKey }),
});
export const proposals_proposal_create = tenantMutation({
args: { input: v.optional(v.any()), idempotencyKey: v.optional(v.string()) },
handler: async (ctx, { input, idempotencyKey }) => ctx.run("proposals.proposal.create", input, idempotencyKey === undefined ? undefined : { idempotencyKey }),
});
export const proposals_proposal_edit = tenantMutation({
args: { input: v.optional(v.any()), idempotencyKey: v.optional(v.string()) },
handler: async (ctx, { input, idempotencyKey }) => ctx.run("proposals.proposal.edit", input, idempotencyKey === undefined ? undefined : { idempotencyKey }),
});
export const proposals_proposal_get = tenantQuery({
args: { input: v.optional(v.any()), idempotencyKey: v.optional(v.string()) },
handler: async (ctx, { input, idempotencyKey }) => ctx.run("proposals.proposal.get", input, idempotencyKey === undefined ? undefined : { idempotencyKey }),
});
export const proposals_proposal_list = tenantQuery({
args: { input: v.optional(v.any()), idempotencyKey: v.optional(v.string()) },
handler: async (ctx, { input, idempotencyKey }) => ctx.run("proposals.proposal.list", input, idempotencyKey === undefined ? undefined : { idempotencyKey }),
});
export const proposals_proposal_reject = tenantMutation({
args: { input: v.optional(v.any()), idempotencyKey: v.optional(v.string()) },
handler: async (ctx, { input, idempotencyKey }) => ctx.run("proposals.proposal.reject", input, idempotencyKey === undefined ? undefined : { idempotencyKey }),
});