@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.d.mts CHANGED
@@ -2573,10 +2573,63 @@ declare class ProfileApi extends BaseService {
2573
2573
 
2574
2574
  declare class RegistrationApi extends BaseService {
2575
2575
  constructor(client: AxiosInstance, baseUrl: string);
2576
+ /**
2577
+ * Validates registration information before actual registration.
2578
+ * This also triggers the backend to send OTP to the contact number or email.
2579
+ * Please refrain from using this API along with request otp API.
2580
+ * Possible error codes:
2581
+ * 2078 - Duplicate contact number
2582
+ * 2089 - Duplicate email
2583
+ * 401 - Duplicate username
2584
+ *
2585
+ * @param params - The validation parameters.
2586
+ * @param params.appId - The application ID.
2587
+ * @param params.username - The username.
2588
+ * @param params.email - The email.
2589
+ * @param params.contactNumber - The contact number.
2590
+ * @param requestOptions - The optional request options.
2591
+ * @returns A promise that resolves to a service response.
2592
+ */
2593
+ validateRegister(params: {
2594
+ appId: string;
2595
+ username: string;
2596
+ email: string;
2597
+ contactNumber: string;
2598
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<OtpResponse>>;
2576
2599
  /**
2577
2600
  * Registers a user with the provided registration parameters.
2578
2601
  *
2579
2602
  * @param params - The registration parameters.
2603
+ * @param params.appId - The application ID.
2604
+ * @param params.uuid - The UUID.
2605
+ * @param params.macAddress - The MAC address.
2606
+ * @param params.os - The operating system.
2607
+ * @param params.platform - The platform.
2608
+ * @param params.clientVersion - The client version.
2609
+ * @param params.deviceNotificationEnable - The device notification enable.
2610
+ * @param params.username - The username.
2611
+ * @param params.password - The password.
2612
+ * @param params.confirmPassword - The confirm password.
2613
+ * @param params.firstName - The first name.
2614
+ * @param params.lastName - The last name.
2615
+ * @param params.contactNumber - The contact number.
2616
+ * @param params.otp - The OTP.
2617
+ * @param params.refCode - The referral code.
2618
+ * @param params.address - The address.
2619
+ * @param params.gender - The gender.
2620
+ * @param params.birthdate - The birthdate. In seconds since epoch.
2621
+ * @param params.email - The email.
2622
+ * @param params.refUserCode - The referral user code.
2623
+ * @param params.info - The info json string.
2624
+ * @param params.termAndConditionVersion - The term and condition version.
2625
+ * @param params.dataPrivacyVersion - The data privacy version.
2626
+ * @param params.marketingOptionsVersion - The marketing options version.
2627
+ * @param params.emailMarketing - The email marketing.
2628
+ * @param params.smsMarketing - The SMS marketing.
2629
+ * @param params.notificationMarketing - The notification marketing.
2630
+ * @param params.lineMarketing - The line marketing.
2631
+ * @param params.phoneMarketing - The phone marketing.
2632
+ * @param params.options - The options.
2580
2633
  * @param requestOptions - The optional request options.
2581
2634
  * @returns A promise that resolves to a service response containing the registration response.
2582
2635
  */
package/dist/index.d.ts CHANGED
@@ -2573,10 +2573,63 @@ declare class ProfileApi extends BaseService {
2573
2573
 
2574
2574
  declare class RegistrationApi extends BaseService {
2575
2575
  constructor(client: AxiosInstance, baseUrl: string);
2576
+ /**
2577
+ * Validates registration information before actual registration.
2578
+ * This also triggers the backend to send OTP to the contact number or email.
2579
+ * Please refrain from using this API along with request otp API.
2580
+ * Possible error codes:
2581
+ * 2078 - Duplicate contact number
2582
+ * 2089 - Duplicate email
2583
+ * 401 - Duplicate username
2584
+ *
2585
+ * @param params - The validation parameters.
2586
+ * @param params.appId - The application ID.
2587
+ * @param params.username - The username.
2588
+ * @param params.email - The email.
2589
+ * @param params.contactNumber - The contact number.
2590
+ * @param requestOptions - The optional request options.
2591
+ * @returns A promise that resolves to a service response.
2592
+ */
2593
+ validateRegister(params: {
2594
+ appId: string;
2595
+ username: string;
2596
+ email: string;
2597
+ contactNumber: string;
2598
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<OtpResponse>>;
2576
2599
  /**
2577
2600
  * Registers a user with the provided registration parameters.
2578
2601
  *
2579
2602
  * @param params - The registration parameters.
2603
+ * @param params.appId - The application ID.
2604
+ * @param params.uuid - The UUID.
2605
+ * @param params.macAddress - The MAC address.
2606
+ * @param params.os - The operating system.
2607
+ * @param params.platform - The platform.
2608
+ * @param params.clientVersion - The client version.
2609
+ * @param params.deviceNotificationEnable - The device notification enable.
2610
+ * @param params.username - The username.
2611
+ * @param params.password - The password.
2612
+ * @param params.confirmPassword - The confirm password.
2613
+ * @param params.firstName - The first name.
2614
+ * @param params.lastName - The last name.
2615
+ * @param params.contactNumber - The contact number.
2616
+ * @param params.otp - The OTP.
2617
+ * @param params.refCode - The referral code.
2618
+ * @param params.address - The address.
2619
+ * @param params.gender - The gender.
2620
+ * @param params.birthdate - The birthdate. In seconds since epoch.
2621
+ * @param params.email - The email.
2622
+ * @param params.refUserCode - The referral user code.
2623
+ * @param params.info - The info json string.
2624
+ * @param params.termAndConditionVersion - The term and condition version.
2625
+ * @param params.dataPrivacyVersion - The data privacy version.
2626
+ * @param params.marketingOptionsVersion - The marketing options version.
2627
+ * @param params.emailMarketing - The email marketing.
2628
+ * @param params.smsMarketing - The SMS marketing.
2629
+ * @param params.notificationMarketing - The notification marketing.
2630
+ * @param params.lineMarketing - The line marketing.
2631
+ * @param params.phoneMarketing - The phone marketing.
2632
+ * @param params.options - The options.
2580
2633
  * @param requestOptions - The optional request options.
2581
2634
  * @returns A promise that resolves to a service response containing the registration response.
2582
2635
  */
package/dist/index.js CHANGED
@@ -2073,10 +2073,77 @@ var RegistrationApi = class extends BaseService {
2073
2073
  constructor(client, baseUrl) {
2074
2074
  super(client, baseUrl);
2075
2075
  }
2076
+ /**
2077
+ * Validates registration information before actual registration.
2078
+ * This also triggers the backend to send OTP to the contact number or email.
2079
+ * Please refrain from using this API along with request otp API.
2080
+ * Possible error codes:
2081
+ * 2078 - Duplicate contact number
2082
+ * 2089 - Duplicate email
2083
+ * 401 - Duplicate username
2084
+ *
2085
+ * @param params - The validation parameters.
2086
+ * @param params.appId - The application ID.
2087
+ * @param params.username - The username.
2088
+ * @param params.email - The email.
2089
+ * @param params.contactNumber - The contact number.
2090
+ * @param requestOptions - The optional request options.
2091
+ * @returns A promise that resolves to a service response.
2092
+ */
2093
+ validateRegister(params, requestOptions) {
2094
+ return __async(this, null, function* () {
2095
+ return yield this.post(
2096
+ "auth/validate_register",
2097
+ {
2098
+ app_id: params.appId,
2099
+ username: params.username,
2100
+ email: params.email,
2101
+ contact_number: params.contactNumber
2102
+ },
2103
+ {
2104
+ headers: __spreadValues({
2105
+ "Content-Type": "application/x-www-form-urlencoded"
2106
+ }, requestOptions == null ? void 0 : requestOptions.headers),
2107
+ data: requestOptions == null ? void 0 : requestOptions.data,
2108
+ params: requestOptions == null ? void 0 : requestOptions.params
2109
+ }
2110
+ );
2111
+ });
2112
+ }
2076
2113
  /**
2077
2114
  * Registers a user with the provided registration parameters.
2078
2115
  *
2079
2116
  * @param params - The registration parameters.
2117
+ * @param params.appId - The application ID.
2118
+ * @param params.uuid - The UUID.
2119
+ * @param params.macAddress - The MAC address.
2120
+ * @param params.os - The operating system.
2121
+ * @param params.platform - The platform.
2122
+ * @param params.clientVersion - The client version.
2123
+ * @param params.deviceNotificationEnable - The device notification enable.
2124
+ * @param params.username - The username.
2125
+ * @param params.password - The password.
2126
+ * @param params.confirmPassword - The confirm password.
2127
+ * @param params.firstName - The first name.
2128
+ * @param params.lastName - The last name.
2129
+ * @param params.contactNumber - The contact number.
2130
+ * @param params.otp - The OTP.
2131
+ * @param params.refCode - The referral code.
2132
+ * @param params.address - The address.
2133
+ * @param params.gender - The gender.
2134
+ * @param params.birthdate - The birthdate. In seconds since epoch.
2135
+ * @param params.email - The email.
2136
+ * @param params.refUserCode - The referral user code.
2137
+ * @param params.info - The info json string.
2138
+ * @param params.termAndConditionVersion - The term and condition version.
2139
+ * @param params.dataPrivacyVersion - The data privacy version.
2140
+ * @param params.marketingOptionsVersion - The marketing options version.
2141
+ * @param params.emailMarketing - The email marketing.
2142
+ * @param params.smsMarketing - The SMS marketing.
2143
+ * @param params.notificationMarketing - The notification marketing.
2144
+ * @param params.lineMarketing - The line marketing.
2145
+ * @param params.phoneMarketing - The phone marketing.
2146
+ * @param params.options - The options.
2080
2147
  * @param requestOptions - The optional request options.
2081
2148
  * @returns A promise that resolves to a service response containing the registration response.
2082
2149
  */