@bzbs/react-api-client 1.4.14 → 2.0.0
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/README.md +542 -264
- package/dist/index.d.mts +35 -10
- package/dist/index.d.ts +35 -10
- package/dist/index.js +145 -297
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +145 -297
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -769,6 +769,8 @@ interface ProfileResponse {
|
|
|
769
769
|
Remark?: string;
|
|
770
770
|
TermAndCondition?: number;
|
|
771
771
|
DataPrivacy?: number;
|
|
772
|
+
MarketingOption?: number;
|
|
773
|
+
ConsentAge?: number;
|
|
772
774
|
EmailMarketing?: number;
|
|
773
775
|
SMSMarketing?: number;
|
|
774
776
|
NotificationMarketing?: number;
|
|
@@ -1581,7 +1583,7 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1581
1583
|
*/
|
|
1582
1584
|
forgetPassword(params: {
|
|
1583
1585
|
contact: string;
|
|
1584
|
-
type: 'email' | 'contact_number';
|
|
1586
|
+
type: 'email' | 'contact_number' | 'email_otp';
|
|
1585
1587
|
options?: {
|
|
1586
1588
|
[key: string]: unknown;
|
|
1587
1589
|
};
|
|
@@ -2052,12 +2054,13 @@ declare class ConsentApi extends BaseService {
|
|
|
2052
2054
|
[key: string]: unknown;
|
|
2053
2055
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<Consent>>;
|
|
2054
2056
|
/**
|
|
2055
|
-
*
|
|
2057
|
+
* Update the user's consent information.
|
|
2056
2058
|
*
|
|
2057
2059
|
* @param params - The parameters for the consent request.
|
|
2058
2060
|
* @param params.termsAndConditions - The terms and conditions consent version.
|
|
2059
2061
|
* @param params.dataPrivacy - The data privacy consent version.
|
|
2060
2062
|
* @param params.marketingOption - The marketing option consent version.
|
|
2063
|
+
* @param params.consentAge - The consent age.
|
|
2061
2064
|
* @param params.email - The email consent (0 for false, 1 for true).
|
|
2062
2065
|
* @param params.sms - The SMS consent (0 for false, 1 for true).
|
|
2063
2066
|
* @param params.notification - The notification consent (0 for false, 1 for true).
|
|
@@ -2078,6 +2081,7 @@ declare class ConsentApi extends BaseService {
|
|
|
2078
2081
|
termsAndConditions?: string;
|
|
2079
2082
|
dataPrivacy?: string;
|
|
2080
2083
|
marketingOption?: string;
|
|
2084
|
+
consentAge?: string;
|
|
2081
2085
|
email?: string;
|
|
2082
2086
|
sms?: string;
|
|
2083
2087
|
notification?: string;
|
|
@@ -2095,10 +2099,10 @@ declare class ConsentApi extends BaseService {
|
|
|
2095
2099
|
};
|
|
2096
2100
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<Consent>>;
|
|
2097
2101
|
/**
|
|
2098
|
-
*
|
|
2102
|
+
* Revoke user consent.
|
|
2099
2103
|
*
|
|
2100
2104
|
* @param requestOptions - The options for the request.
|
|
2101
|
-
* @returns A promise that resolves to a ServiceResponse containing the result of the
|
|
2105
|
+
* @returns A promise that resolves to a ServiceResponse containing the result of the revoke consent operation.
|
|
2102
2106
|
*/
|
|
2103
2107
|
unconsent(options?: {
|
|
2104
2108
|
[key: string]: unknown;
|
|
@@ -2108,7 +2112,7 @@ declare class ConsentApi extends BaseService {
|
|
|
2108
2112
|
declare class CouponApi extends BaseService {
|
|
2109
2113
|
constructor(client: AxiosInstance, baseUrl: string);
|
|
2110
2114
|
/**
|
|
2111
|
-
*
|
|
2115
|
+
* Process coupon codes to earn points.
|
|
2112
2116
|
*
|
|
2113
2117
|
* @param params - The parameters.
|
|
2114
2118
|
* @param params.codes - The coupon codes to process.
|
|
@@ -2406,11 +2410,6 @@ declare class ProfileApi extends BaseService {
|
|
|
2406
2410
|
* @returns A promise that resolves to a ServiceResponse containing the updated profile.
|
|
2407
2411
|
*/
|
|
2408
2412
|
updateProfile(params: {
|
|
2409
|
-
profileImage?: File | {
|
|
2410
|
-
uri: string;
|
|
2411
|
-
name: string;
|
|
2412
|
-
type: string;
|
|
2413
|
-
} | object;
|
|
2414
2413
|
firstName?: string;
|
|
2415
2414
|
lastName?: string;
|
|
2416
2415
|
contactNumber?: string;
|
|
@@ -2582,6 +2581,25 @@ declare class ProfileApi extends BaseService {
|
|
|
2582
2581
|
expiringPoints(options?: {
|
|
2583
2582
|
[key: string]: unknown;
|
|
2584
2583
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<ExpiringPoints>>;
|
|
2584
|
+
/**
|
|
2585
|
+
* Updates the user's profile picture.
|
|
2586
|
+
*
|
|
2587
|
+
* @param params - The parameters.
|
|
2588
|
+
* @param params.image - The image file to upload (File or cross-platform file object with uri, name, type).
|
|
2589
|
+
* @param params.options - Optional additional parameters.
|
|
2590
|
+
* @param requestOptions - Optional request options.
|
|
2591
|
+
* @returns A promise that resolves to a ServiceResponse containing the updated profile.
|
|
2592
|
+
*/
|
|
2593
|
+
updateProfileImage(params: {
|
|
2594
|
+
image: File | {
|
|
2595
|
+
uri: string;
|
|
2596
|
+
name: string;
|
|
2597
|
+
type: string;
|
|
2598
|
+
} | object;
|
|
2599
|
+
options?: {
|
|
2600
|
+
[key: string]: unknown;
|
|
2601
|
+
};
|
|
2602
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<ProfileResponse>>;
|
|
2585
2603
|
/**
|
|
2586
2604
|
* Deactivates the user's profile.
|
|
2587
2605
|
*
|
|
@@ -2647,6 +2665,7 @@ declare class RegistrationApi extends BaseService {
|
|
|
2647
2665
|
* @param params.termAndConditionVersion - The term and condition version.
|
|
2648
2666
|
* @param params.dataPrivacyVersion - The data privacy version.
|
|
2649
2667
|
* @param params.marketingOptionsVersion - The marketing options version.
|
|
2668
|
+
* @param params.consentAge - The consent age.
|
|
2650
2669
|
* @param params.emailMarketing - The email marketing.
|
|
2651
2670
|
* @param params.smsMarketing - The SMS marketing.
|
|
2652
2671
|
* @param params.notificationMarketing - The notification marketing.
|
|
@@ -2681,6 +2700,7 @@ declare class RegistrationApi extends BaseService {
|
|
|
2681
2700
|
termAndConditionVersion?: string;
|
|
2682
2701
|
dataPrivacyVersion?: string;
|
|
2683
2702
|
marketingOptionsVersion?: string;
|
|
2703
|
+
consentAge?: string;
|
|
2684
2704
|
emailMarketing?: string;
|
|
2685
2705
|
smsMarketing?: string;
|
|
2686
2706
|
notificationMarketing?: string;
|
|
@@ -2782,6 +2802,9 @@ declare class AddressApi extends BaseService {
|
|
|
2782
2802
|
contactNumber?: string;
|
|
2783
2803
|
countryCode?: string;
|
|
2784
2804
|
countryName?: string;
|
|
2805
|
+
latitude?: number;
|
|
2806
|
+
longitude?: number;
|
|
2807
|
+
landmark?: string;
|
|
2785
2808
|
isDefault?: boolean;
|
|
2786
2809
|
rowKey?: string;
|
|
2787
2810
|
options?: {
|
|
@@ -2831,6 +2854,8 @@ declare class AddressApi extends BaseService {
|
|
|
2831
2854
|
lastName?: string;
|
|
2832
2855
|
email?: string;
|
|
2833
2856
|
contactNumber?: string;
|
|
2857
|
+
brnachId?: string;
|
|
2858
|
+
branchName?: string;
|
|
2834
2859
|
companyName?: string;
|
|
2835
2860
|
address?: string;
|
|
2836
2861
|
addressName?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -769,6 +769,8 @@ interface ProfileResponse {
|
|
|
769
769
|
Remark?: string;
|
|
770
770
|
TermAndCondition?: number;
|
|
771
771
|
DataPrivacy?: number;
|
|
772
|
+
MarketingOption?: number;
|
|
773
|
+
ConsentAge?: number;
|
|
772
774
|
EmailMarketing?: number;
|
|
773
775
|
SMSMarketing?: number;
|
|
774
776
|
NotificationMarketing?: number;
|
|
@@ -1581,7 +1583,7 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1581
1583
|
*/
|
|
1582
1584
|
forgetPassword(params: {
|
|
1583
1585
|
contact: string;
|
|
1584
|
-
type: 'email' | 'contact_number';
|
|
1586
|
+
type: 'email' | 'contact_number' | 'email_otp';
|
|
1585
1587
|
options?: {
|
|
1586
1588
|
[key: string]: unknown;
|
|
1587
1589
|
};
|
|
@@ -2052,12 +2054,13 @@ declare class ConsentApi extends BaseService {
|
|
|
2052
2054
|
[key: string]: unknown;
|
|
2053
2055
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<Consent>>;
|
|
2054
2056
|
/**
|
|
2055
|
-
*
|
|
2057
|
+
* Update the user's consent information.
|
|
2056
2058
|
*
|
|
2057
2059
|
* @param params - The parameters for the consent request.
|
|
2058
2060
|
* @param params.termsAndConditions - The terms and conditions consent version.
|
|
2059
2061
|
* @param params.dataPrivacy - The data privacy consent version.
|
|
2060
2062
|
* @param params.marketingOption - The marketing option consent version.
|
|
2063
|
+
* @param params.consentAge - The consent age.
|
|
2061
2064
|
* @param params.email - The email consent (0 for false, 1 for true).
|
|
2062
2065
|
* @param params.sms - The SMS consent (0 for false, 1 for true).
|
|
2063
2066
|
* @param params.notification - The notification consent (0 for false, 1 for true).
|
|
@@ -2078,6 +2081,7 @@ declare class ConsentApi extends BaseService {
|
|
|
2078
2081
|
termsAndConditions?: string;
|
|
2079
2082
|
dataPrivacy?: string;
|
|
2080
2083
|
marketingOption?: string;
|
|
2084
|
+
consentAge?: string;
|
|
2081
2085
|
email?: string;
|
|
2082
2086
|
sms?: string;
|
|
2083
2087
|
notification?: string;
|
|
@@ -2095,10 +2099,10 @@ declare class ConsentApi extends BaseService {
|
|
|
2095
2099
|
};
|
|
2096
2100
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<Consent>>;
|
|
2097
2101
|
/**
|
|
2098
|
-
*
|
|
2102
|
+
* Revoke user consent.
|
|
2099
2103
|
*
|
|
2100
2104
|
* @param requestOptions - The options for the request.
|
|
2101
|
-
* @returns A promise that resolves to a ServiceResponse containing the result of the
|
|
2105
|
+
* @returns A promise that resolves to a ServiceResponse containing the result of the revoke consent operation.
|
|
2102
2106
|
*/
|
|
2103
2107
|
unconsent(options?: {
|
|
2104
2108
|
[key: string]: unknown;
|
|
@@ -2108,7 +2112,7 @@ declare class ConsentApi extends BaseService {
|
|
|
2108
2112
|
declare class CouponApi extends BaseService {
|
|
2109
2113
|
constructor(client: AxiosInstance, baseUrl: string);
|
|
2110
2114
|
/**
|
|
2111
|
-
*
|
|
2115
|
+
* Process coupon codes to earn points.
|
|
2112
2116
|
*
|
|
2113
2117
|
* @param params - The parameters.
|
|
2114
2118
|
* @param params.codes - The coupon codes to process.
|
|
@@ -2406,11 +2410,6 @@ declare class ProfileApi extends BaseService {
|
|
|
2406
2410
|
* @returns A promise that resolves to a ServiceResponse containing the updated profile.
|
|
2407
2411
|
*/
|
|
2408
2412
|
updateProfile(params: {
|
|
2409
|
-
profileImage?: File | {
|
|
2410
|
-
uri: string;
|
|
2411
|
-
name: string;
|
|
2412
|
-
type: string;
|
|
2413
|
-
} | object;
|
|
2414
2413
|
firstName?: string;
|
|
2415
2414
|
lastName?: string;
|
|
2416
2415
|
contactNumber?: string;
|
|
@@ -2582,6 +2581,25 @@ declare class ProfileApi extends BaseService {
|
|
|
2582
2581
|
expiringPoints(options?: {
|
|
2583
2582
|
[key: string]: unknown;
|
|
2584
2583
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<ExpiringPoints>>;
|
|
2584
|
+
/**
|
|
2585
|
+
* Updates the user's profile picture.
|
|
2586
|
+
*
|
|
2587
|
+
* @param params - The parameters.
|
|
2588
|
+
* @param params.image - The image file to upload (File or cross-platform file object with uri, name, type).
|
|
2589
|
+
* @param params.options - Optional additional parameters.
|
|
2590
|
+
* @param requestOptions - Optional request options.
|
|
2591
|
+
* @returns A promise that resolves to a ServiceResponse containing the updated profile.
|
|
2592
|
+
*/
|
|
2593
|
+
updateProfileImage(params: {
|
|
2594
|
+
image: File | {
|
|
2595
|
+
uri: string;
|
|
2596
|
+
name: string;
|
|
2597
|
+
type: string;
|
|
2598
|
+
} | object;
|
|
2599
|
+
options?: {
|
|
2600
|
+
[key: string]: unknown;
|
|
2601
|
+
};
|
|
2602
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<ProfileResponse>>;
|
|
2585
2603
|
/**
|
|
2586
2604
|
* Deactivates the user's profile.
|
|
2587
2605
|
*
|
|
@@ -2647,6 +2665,7 @@ declare class RegistrationApi extends BaseService {
|
|
|
2647
2665
|
* @param params.termAndConditionVersion - The term and condition version.
|
|
2648
2666
|
* @param params.dataPrivacyVersion - The data privacy version.
|
|
2649
2667
|
* @param params.marketingOptionsVersion - The marketing options version.
|
|
2668
|
+
* @param params.consentAge - The consent age.
|
|
2650
2669
|
* @param params.emailMarketing - The email marketing.
|
|
2651
2670
|
* @param params.smsMarketing - The SMS marketing.
|
|
2652
2671
|
* @param params.notificationMarketing - The notification marketing.
|
|
@@ -2681,6 +2700,7 @@ declare class RegistrationApi extends BaseService {
|
|
|
2681
2700
|
termAndConditionVersion?: string;
|
|
2682
2701
|
dataPrivacyVersion?: string;
|
|
2683
2702
|
marketingOptionsVersion?: string;
|
|
2703
|
+
consentAge?: string;
|
|
2684
2704
|
emailMarketing?: string;
|
|
2685
2705
|
smsMarketing?: string;
|
|
2686
2706
|
notificationMarketing?: string;
|
|
@@ -2782,6 +2802,9 @@ declare class AddressApi extends BaseService {
|
|
|
2782
2802
|
contactNumber?: string;
|
|
2783
2803
|
countryCode?: string;
|
|
2784
2804
|
countryName?: string;
|
|
2805
|
+
latitude?: number;
|
|
2806
|
+
longitude?: number;
|
|
2807
|
+
landmark?: string;
|
|
2785
2808
|
isDefault?: boolean;
|
|
2786
2809
|
rowKey?: string;
|
|
2787
2810
|
options?: {
|
|
@@ -2831,6 +2854,8 @@ declare class AddressApi extends BaseService {
|
|
|
2831
2854
|
lastName?: string;
|
|
2832
2855
|
email?: string;
|
|
2833
2856
|
contactNumber?: string;
|
|
2857
|
+
brnachId?: string;
|
|
2858
|
+
branchName?: string;
|
|
2834
2859
|
companyName?: string;
|
|
2835
2860
|
address?: string;
|
|
2836
2861
|
addressName?: string;
|