From 877e8253f03041f810adfc52acde5313be2392fd Mon Sep 17 00:00:00 2001 From: "penify-dev[bot]" <146478655+penify-dev[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 15:39:09 +0000 Subject: [PATCH] Generated Documentation --- scripts/config/symbol.c | 96 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/scripts/config/symbol.c b/scripts/config/symbol.c index d97b56ab0ece7a..27db08afbefebb 100644 --- a/scripts/config/symbol.c +++ b/scripts/config/symbol.c @@ -39,6 +39,102 @@ struct symbol *modules_sym; static tristate modules_val; int recursive_is_error; +/** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` + * - All other properties remain unchanged. + * + * @example + * const originalData = { + * firstName: 'John', + /** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` + * - All other properties remain unchanged. + * + * @example + * const originalData = { + * firstName: 'John', + * lastName: 'Doe', + * email: 'john.doe@example.com', + * password: 'securePassword123' + * }; + * + * const transformedData = transformSignUpRequestForBackend(originalData); + /** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` + * - All other properties remain unchanged. + * + * @example + * const originalData = { + * firstName: 'John', + * lastName: 'Doe', + * email: 'john.doe@example.com', + * password: 'securePassword123' + * }; + * + * const transformedData = transformSignUpRequestForBackend(originalData); + * console.log(transformedData); + * // Outputs: + * // { + * // firstName: 'John', + * // lastName: 'Doe', + * // email: 'john.doe@example.com', + * // password: 'securePassword123', + * // first_name: 'John', + * // last_name: 'Doe', + * // username: 'john.doe@example.com' + * // } + */ + * console.log(transformedData); + * // Outputs: + * // { + * // firstName: 'John', + * // lastName: 'Doe', + * // email: 'john.doe@example.com', + * // password: 'securePassword123', + * // first_name: 'John', + * // last_name: 'Doe', + * // username: 'john.doe@example.com' + * // } + */ + * lastName: 'Doe', + * email: 'john.doe@example.com', + * password: 'securePassword123' + * }; + * + * const transformedData = transformSignUpRequestForBackend(originalData); + * console.log(transformedData); + * // Outputs: + * // { + * // firstName: 'John', + * // lastName: 'Doe', + * // email: 'john.doe@example.com', + * // password: 'securePassword123', + * // first_name: 'John', + * // last_name: 'Doe', + * // username: 'john.doe@example.com' + * // } + */ enum symbol_type sym_get_type(struct symbol *sym) { enum symbol_type type = sym->type;