- Updated WHMCS service to utilize addressSchema for client address retrieval, enhancing data validation. - Cleaned up imports in WHMCS client service for better organization. - Improved logging format in WHMCS subscription service for clearer output. - Streamlined address handling in order builder service for consistency. - Enhanced code readability by formatting JSX elements in ProfileContainer and other components. - Removed deprecated billing cycle normalization logic and centralized it in the domain helpers for better maintainability.
15 lines
393 B
TypeScript
15 lines
393 B
TypeScript
import type { z } from "zod";
|
|
|
|
import { signupRequestSchema } from "./schema";
|
|
|
|
type SignupRequestInput = z.input<typeof signupRequestSchema>;
|
|
|
|
/**
|
|
* Convert signup form input into the canonical API payload.
|
|
* Reuses domain schema transformation to avoid frontend duplication.
|
|
*/
|
|
export function buildSignupRequest(input: SignupRequestInput) {
|
|
return signupRequestSchema.parse(input);
|
|
}
|
|
|