@bzbs/react-api-client 1.3.4 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2029,10 +2029,77 @@ var RegistrationApi = class extends BaseService {
2029
2029
  constructor(client, baseUrl) {
2030
2030
  super(client, baseUrl);
2031
2031
  }
2032
+ /**
2033
+ * Validates registration information before actual registration.
2034
+ * This also triggers the backend to send OTP to the contact number or email.
2035
+ * Please refrain from using this API along with request otp API.
2036
+ * Possible error codes:
2037
+ * 2078 - Duplicate contact number
2038
+ * 2089 - Duplicate email
2039
+ * 401 - Duplicate username
2040
+ *
2041
+ * @param params - The validation parameters.
2042
+ * @param params.appId - The application ID.
2043
+ * @param params.username - The username.
2044
+ * @param params.email - The email.
2045
+ * @param params.contactNumber - The contact number.
2046
+ * @param requestOptions - The optional request options.
2047
+ * @returns A promise that resolves to a service response.
2048
+ */
2049
+ validateRegister(params, requestOptions) {
2050
+ return __async(this, null, function* () {
2051
+ return yield this.post(
2052
+ "auth/validate_register",
2053
+ {
2054
+ app_id: params.appId,
2055
+ username: params.username,
2056
+ email: params.email,
2057
+ contact_number: params.contactNumber
2058
+ },
2059
+ {
2060
+ headers: __spreadValues({
2061
+ "Content-Type": "application/x-www-form-urlencoded"
2062
+ }, requestOptions == null ? void 0 : requestOptions.headers),
2063
+ data: requestOptions == null ? void 0 : requestOptions.data,
2064
+ params: requestOptions == null ? void 0 : requestOptions.params
2065
+ }
2066
+ );
2067
+ });
2068
+ }
2032
2069
  /**
2033
2070
  * Registers a user with the provided registration parameters.
2034
2071
  *
2035
2072
  * @param params - The registration parameters.
2073
+ * @param params.appId - The application ID.
2074
+ * @param params.uuid - The UUID.
2075
+ * @param params.macAddress - The MAC address.
2076
+ * @param params.os - The operating system.
2077
+ * @param params.platform - The platform.
2078
+ * @param params.clientVersion - The client version.
2079
+ * @param params.deviceNotificationEnable - The device notification enable.
2080
+ * @param params.username - The username.
2081
+ * @param params.password - The password.
2082
+ * @param params.confirmPassword - The confirm password.
2083
+ * @param params.firstName - The first name.
2084
+ * @param params.lastName - The last name.
2085
+ * @param params.contactNumber - The contact number.
2086
+ * @param params.otp - The OTP.
2087
+ * @param params.refCode - The referral code.
2088
+ * @param params.address - The address.
2089
+ * @param params.gender - The gender.
2090
+ * @param params.birthdate - The birthdate. In seconds since epoch.
2091
+ * @param params.email - The email.
2092
+ * @param params.refUserCode - The referral user code.
2093
+ * @param params.info - The info json string.
2094
+ * @param params.termAndConditionVersion - The term and condition version.
2095
+ * @param params.dataPrivacyVersion - The data privacy version.
2096
+ * @param params.marketingOptionsVersion - The marketing options version.
2097
+ * @param params.emailMarketing - The email marketing.
2098
+ * @param params.smsMarketing - The SMS marketing.
2099
+ * @param params.notificationMarketing - The notification marketing.
2100
+ * @param params.lineMarketing - The line marketing.
2101
+ * @param params.phoneMarketing - The phone marketing.
2102
+ * @param params.options - The options.
2036
2103
  * @param requestOptions - The optional request options.
2037
2104
  * @returns A promise that resolves to a service response containing the registration response.
2038
2105
  */