Files
worldmonitor/convex/_generated/api.d.ts
Elie Habib 3d51a2619e fix(contact): add enterprise contact form endpoint (#1365)
* fix(contact): add dedicated enterprise contact endpoint with storage and email notifications

The enterprise contact form was posting to /api/register-interest which
only stored email for the waitlist. Name, organization, and message fields
were silently dropped and no notification was sent.

- Add api/contact.js endpoint with Turnstile, rate limiting, honeypot
- Add Convex contactMessages table and submit mutation
- Send notification email to sales@worldmonitor.app via Resend
- Sanitize email subject (strip newlines, truncate length)
- Fix cf-connecting-ip priority in register-interest.js IP detection

* chore: add contact.js to legacy endpoint allowlist

* fix(contact): harden Turnstile enforcement, surface email status, add tests

- Turnstile rejects in production when TURNSTILE_SECRET_KEY is unset
  (only allows skip in development)
- sendNotificationEmail returns boolean, response includes emailSent field
- Log error (not warn) when RESEND_API_KEY is missing in production
- Add 15 endpoint tests covering validation, Turnstile, notifications, Convex
2026-03-10 08:26:05 +04:00

52 lines
1.1 KiB
TypeScript

/* eslint-disable */
/**
* Generated `api` utility.
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* To regenerate, run `npx convex dev`.
* @module
*/
import type * as contactMessages from "../contactMessages.js";
import type * as registerInterest from "../registerInterest.js";
import type {
ApiFromModules,
FilterApi,
FunctionReference,
} from "convex/server";
declare const fullApi: ApiFromModules<{
contactMessages: typeof contactMessages;
registerInterest: typeof registerInterest;
}>;
/**
* A utility for referencing Convex functions in your app's public API.
*
* Usage:
* ```js
* const myFunctionReference = api.myModule.myFunction;
* ```
*/
export declare const api: FilterApi<
typeof fullApi,
FunctionReference<any, "public">
>;
/**
* A utility for referencing Convex functions in your app's internal API.
*
* Usage:
* ```js
* const myFunctionReference = internal.myModule.myFunction;
* ```
*/
export declare const internal: FilterApi<
typeof fullApi,
FunctionReference<any, "internal">
>;
export declare const components: {};