@bzbs/react-api-client 1.2.5 → 1.3.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/dist/index.d.mts +231 -22
- package/dist/index.d.ts +231 -22
- package/dist/index.js +293 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +292 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -120,6 +120,10 @@ interface ForgetPasswordResponse {
|
|
|
120
120
|
expireinseconds?: number;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
interface AccessTokenResponse {
|
|
124
|
+
key?: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
123
127
|
/**
|
|
124
128
|
* Response model for Apple token authentication
|
|
125
129
|
*/
|
|
@@ -544,6 +548,12 @@ interface Dashboard {
|
|
|
544
548
|
line2?: string;
|
|
545
549
|
line3?: string;
|
|
546
550
|
line4?: string;
|
|
551
|
+
line5?: string;
|
|
552
|
+
line6?: string;
|
|
553
|
+
line7?: string;
|
|
554
|
+
line8?: string;
|
|
555
|
+
line9?: string;
|
|
556
|
+
line10?: string;
|
|
547
557
|
ga_label?: string;
|
|
548
558
|
start_date?: number;
|
|
549
559
|
end_date?: number;
|
|
@@ -873,6 +883,7 @@ interface Version {
|
|
|
873
883
|
welcome_page_times?: number;
|
|
874
884
|
termandcondition?: number;
|
|
875
885
|
dataprivacy?: number;
|
|
886
|
+
marketingoption?: number;
|
|
876
887
|
}
|
|
877
888
|
|
|
878
889
|
interface ResumeResponse {
|
|
@@ -1400,6 +1411,120 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1400
1411
|
[key: string]: unknown;
|
|
1401
1412
|
};
|
|
1402
1413
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1414
|
+
/**
|
|
1415
|
+
* Connect with LINE. If authorization token is provided, it will connect current user with given LINE credentials.
|
|
1416
|
+
* Otherwise, it tries to login with those credentials.
|
|
1417
|
+
*
|
|
1418
|
+
* @param params - The parameters.
|
|
1419
|
+
* @param params.idToken - The LINE id token.
|
|
1420
|
+
* @param params.lineAccessToken - The LINE access token.
|
|
1421
|
+
* @param params.authorizationCode - The LINE authorization code.
|
|
1422
|
+
* @param params.appId - Your application id.
|
|
1423
|
+
* @param params.uuid - The unique device identifier.
|
|
1424
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1425
|
+
* @param requestOptions - Optional request options.
|
|
1426
|
+
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
1427
|
+
*/
|
|
1428
|
+
connectLine(params: {
|
|
1429
|
+
idToken: string;
|
|
1430
|
+
lineAccessToken: string;
|
|
1431
|
+
authorizationCode: string;
|
|
1432
|
+
appId: string;
|
|
1433
|
+
uuid: string;
|
|
1434
|
+
deviceLocale: string;
|
|
1435
|
+
os: string;
|
|
1436
|
+
platform: string;
|
|
1437
|
+
deviceNotificationEnabled: boolean;
|
|
1438
|
+
clientVersion: string;
|
|
1439
|
+
deviceToken: string;
|
|
1440
|
+
macAddress: string;
|
|
1441
|
+
options?: {
|
|
1442
|
+
[key: string]: unknown;
|
|
1443
|
+
};
|
|
1444
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1445
|
+
/**
|
|
1446
|
+
* Connect with Facebook. If authorization token is provided, it will connect current user with given Facebook access token.
|
|
1447
|
+
* Otherwise, it tries to login with that access token.
|
|
1448
|
+
*
|
|
1449
|
+
* @param params - The parameters.
|
|
1450
|
+
* @param params.accessToken - The Facebook access token.
|
|
1451
|
+
* @param params.appId - Your application id.
|
|
1452
|
+
* @param params.uuid - The unique device identifier.
|
|
1453
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1454
|
+
* @param requestOptions - Optional request options.
|
|
1455
|
+
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
1456
|
+
*/
|
|
1457
|
+
connectFacebook(params: {
|
|
1458
|
+
accessToken: string;
|
|
1459
|
+
appId: string;
|
|
1460
|
+
uuid: string;
|
|
1461
|
+
deviceLocale: string;
|
|
1462
|
+
os: string;
|
|
1463
|
+
platform: string;
|
|
1464
|
+
deviceNotificationEnabled: boolean;
|
|
1465
|
+
clientVersion: string;
|
|
1466
|
+
deviceToken: string;
|
|
1467
|
+
macAddress: string;
|
|
1468
|
+
options?: {
|
|
1469
|
+
[key: string]: unknown;
|
|
1470
|
+
};
|
|
1471
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1472
|
+
/**
|
|
1473
|
+
* Connect with Google. If authorization token is provided, it will connect current user with given Google id token.
|
|
1474
|
+
* Otherwise, it tries to login with that id token.
|
|
1475
|
+
*
|
|
1476
|
+
* @param params - The parameters.
|
|
1477
|
+
* @param params.idToken - The Google id token.
|
|
1478
|
+
* @param params.appId - Your application id.
|
|
1479
|
+
* @param params.uuid - The unique device identifier.
|
|
1480
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1481
|
+
* @param requestOptions - Optional request options.
|
|
1482
|
+
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
1483
|
+
*/
|
|
1484
|
+
connectGoogle(params: {
|
|
1485
|
+
idToken: string;
|
|
1486
|
+
appId: string;
|
|
1487
|
+
uuid: string;
|
|
1488
|
+
deviceLocale: string;
|
|
1489
|
+
os: string;
|
|
1490
|
+
platform: string;
|
|
1491
|
+
deviceNotificationEnabled: boolean;
|
|
1492
|
+
clientVersion: string;
|
|
1493
|
+
deviceToken: string;
|
|
1494
|
+
macAddress: string;
|
|
1495
|
+
options?: {
|
|
1496
|
+
[key: string]: unknown;
|
|
1497
|
+
};
|
|
1498
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1499
|
+
/**
|
|
1500
|
+
* Connect with Apple. If authorization token is provided, it will connect current user with given Apple credentials.
|
|
1501
|
+
* Otherwise, it tries to login with those credentials.
|
|
1502
|
+
*
|
|
1503
|
+
* @param params - The parameters.
|
|
1504
|
+
* @param params.idToken - The Apple id token.
|
|
1505
|
+
* @param params.refreshToken - The Apple refresh token from appleToken().
|
|
1506
|
+
* @param params.appId - Your application id.
|
|
1507
|
+
* @param params.uuid - The unique device identifier.
|
|
1508
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1509
|
+
* @param requestOptions - Optional request options.
|
|
1510
|
+
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
1511
|
+
*/
|
|
1512
|
+
connectApple(params: {
|
|
1513
|
+
idToken: string;
|
|
1514
|
+
refreshToken: string;
|
|
1515
|
+
appId: string;
|
|
1516
|
+
uuid: string;
|
|
1517
|
+
deviceLocale: string;
|
|
1518
|
+
os: string;
|
|
1519
|
+
platform: string;
|
|
1520
|
+
deviceNotificationEnabled: boolean;
|
|
1521
|
+
clientVersion: string;
|
|
1522
|
+
deviceToken: string;
|
|
1523
|
+
macAddress: string;
|
|
1524
|
+
options?: {
|
|
1525
|
+
[key: string]: unknown;
|
|
1526
|
+
};
|
|
1527
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1403
1528
|
/**
|
|
1404
1529
|
* Performs a logout for the user.
|
|
1405
1530
|
*
|
|
@@ -1454,7 +1579,7 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1454
1579
|
};
|
|
1455
1580
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<StatusResponse>>;
|
|
1456
1581
|
/**
|
|
1457
|
-
* Sends an OTP (One-Time Password) to the user for authentication.
|
|
1582
|
+
* Sends an OTP (One-Time Password) to the user for authentication (GET method).
|
|
1458
1583
|
*
|
|
1459
1584
|
* @param params - The parameters.
|
|
1460
1585
|
* @param params.uuid - The unique device identifier.
|
|
@@ -1474,6 +1599,46 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1474
1599
|
[key: string]: unknown;
|
|
1475
1600
|
};
|
|
1476
1601
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<OtpResponse>>;
|
|
1602
|
+
/**
|
|
1603
|
+
* Sends an OTP (One-Time Password) to the user for authentication (POST method, V2).
|
|
1604
|
+
*
|
|
1605
|
+
* @param params - The parameters.
|
|
1606
|
+
* @param params.appId - Your application id.
|
|
1607
|
+
* @param params.contactNumber - The contact number for the user.
|
|
1608
|
+
* @param params.channel - (Optional) The channel to use for OTP delivery.
|
|
1609
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1610
|
+
* @param requestOptions - (Optional) Additional options for the request.
|
|
1611
|
+
* @returns A promise that resolves to a ServiceResponse containing the OTP response.
|
|
1612
|
+
*/
|
|
1613
|
+
otpV2(params: {
|
|
1614
|
+
appId: string;
|
|
1615
|
+
contactNumber: string;
|
|
1616
|
+
channel?: string;
|
|
1617
|
+
options?: {
|
|
1618
|
+
[key: string]: unknown;
|
|
1619
|
+
};
|
|
1620
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<OtpResponse>>;
|
|
1621
|
+
/**
|
|
1622
|
+
* Sends an OTP (One-Time Password) via email to the user for authentication.
|
|
1623
|
+
*
|
|
1624
|
+
* @param params - The parameters.
|
|
1625
|
+
* @param params.uuid - The unique device identifier.
|
|
1626
|
+
* @param params.appId - Your application id.
|
|
1627
|
+
* @param params.email - The email address for the user.
|
|
1628
|
+
* @param params.channel - (Optional) The channel to use for OTP delivery.
|
|
1629
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1630
|
+
* @param requestOptions - (Optional) Additional options for the request.
|
|
1631
|
+
* @returns A promise that resolves to a ServiceResponse containing the OTP response.
|
|
1632
|
+
*/
|
|
1633
|
+
otpEmail(params: {
|
|
1634
|
+
uuid: string;
|
|
1635
|
+
appId: string;
|
|
1636
|
+
email: string;
|
|
1637
|
+
channel?: string;
|
|
1638
|
+
options?: {
|
|
1639
|
+
[key: string]: unknown;
|
|
1640
|
+
};
|
|
1641
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<OtpResponse>>;
|
|
1477
1642
|
/**
|
|
1478
1643
|
* Confirm the OTP (One-Time Password) for authentication.
|
|
1479
1644
|
*
|
|
@@ -1500,8 +1665,10 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1500
1665
|
* @param params.appId - Your application id.
|
|
1501
1666
|
* @param params.otp - The OTP to validate.
|
|
1502
1667
|
* @param params.refCode - The reference code for the OTP.
|
|
1503
|
-
* @param params.
|
|
1504
|
-
* @param params.
|
|
1668
|
+
* @param params.type - Type of contact (email or contact_number).
|
|
1669
|
+
* @param params.contactNumber - (Optional) The contact number for the user.
|
|
1670
|
+
* @param params.email - (Optional) The email address for the user.
|
|
1671
|
+
* @param params.use - Whether to use the OTP after validation (default: false).
|
|
1505
1672
|
* @param params.channel - (Optional) The channel to use for OTP delivery.
|
|
1506
1673
|
* @param params.options - (Optional) Additional params for the request.
|
|
1507
1674
|
* @param requestOptions - (Optional) Additional options for the request.
|
|
@@ -1511,53 +1678,69 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1511
1678
|
appId: string;
|
|
1512
1679
|
otp: string;
|
|
1513
1680
|
refCode: string;
|
|
1514
|
-
|
|
1515
|
-
|
|
1681
|
+
type: string;
|
|
1682
|
+
contactNumber?: string;
|
|
1683
|
+
email?: string;
|
|
1684
|
+
use?: boolean;
|
|
1516
1685
|
channel?: string;
|
|
1517
1686
|
options?: {
|
|
1518
1687
|
[key: string]: unknown;
|
|
1519
1688
|
};
|
|
1520
1689
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<ValidateOtpResponse>>;
|
|
1521
1690
|
/**
|
|
1522
|
-
*
|
|
1691
|
+
* Refresh buzzebees token and retrieve a new token.
|
|
1523
1692
|
*
|
|
1524
1693
|
* @param params - The parameters.
|
|
1525
1694
|
* @param params.uuid - The unique device identifier.
|
|
1526
|
-
* @param params.
|
|
1527
|
-
* @param params.
|
|
1528
|
-
* @param params.
|
|
1695
|
+
* @param params.deviceAppId - Your application id.
|
|
1696
|
+
* @param params.os - Your device operation system + version. Ex. ios 11.2.1, android 9.0
|
|
1697
|
+
* @param params.platform - Your platform. Ex. iPhone, Android
|
|
1698
|
+
* @param params.macAddress - Unique device identifier
|
|
1699
|
+
* @param params.deviceNotificationEnabled - Enable push notification
|
|
1700
|
+
* @param params.clientVersion - Number of version (App Prefix + Your application version, Ex. ios_buzzebeesdemo1.0.1)
|
|
1701
|
+
* @param params.deviceToken - Device token used for send push notification
|
|
1529
1702
|
* @param params.options - (Optional) Additional params for the request.
|
|
1530
1703
|
* @param requestOptions - (Optional) Additional options for the request.
|
|
1531
1704
|
* @returns A promise that resolves to a ServiceResponse containing the resume response.
|
|
1532
1705
|
*/
|
|
1533
1706
|
resume(params: {
|
|
1534
1707
|
uuid: string;
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
macAddress
|
|
1708
|
+
deviceAppId: string;
|
|
1709
|
+
os: string;
|
|
1710
|
+
platform: string;
|
|
1711
|
+
macAddress: string;
|
|
1712
|
+
deviceNotificationEnabled: boolean;
|
|
1713
|
+
clientVersion: string;
|
|
1714
|
+
deviceToken: string;
|
|
1539
1715
|
options?: {
|
|
1540
1716
|
[key: string]: unknown;
|
|
1541
1717
|
};
|
|
1542
1718
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<ResumeResponse>>;
|
|
1543
1719
|
/**
|
|
1544
|
-
* Update
|
|
1720
|
+
* Update device token for push notification.
|
|
1545
1721
|
*
|
|
1546
1722
|
* @param params - The parameters.
|
|
1547
1723
|
* @param params.uuid - The unique device identifier.
|
|
1548
|
-
* @param params.
|
|
1549
|
-
* @param params.
|
|
1550
|
-
* @param params.
|
|
1724
|
+
* @param params.deviceAppId - Your application id.
|
|
1725
|
+
* @param params.os - Your device operation system + version. Ex. ios 11.2.1, android 9.0
|
|
1726
|
+
* @param params.platform - Your platform. Ex. iPhone, Android
|
|
1727
|
+
* @param params.macAddress - Unique device identifier
|
|
1728
|
+
* @param params.deviceNotificationEnabled - Enable push notification
|
|
1729
|
+
* @param params.clientVersion - Number of version (App Prefix + Your application version, Ex. ios_buzzebeesdemo1.0.1)
|
|
1730
|
+
* @param params.deviceToken - Device token used for send push notification
|
|
1551
1731
|
* @param params.options - (Optional) Additional params for the request.
|
|
1552
1732
|
* @param requestOptions - (Optional) Additional options for the request.
|
|
1553
1733
|
* @returns A promise that resolves to a ServiceResponse containing the resume response.
|
|
1554
1734
|
*/
|
|
1555
1735
|
updateDevice(params: {
|
|
1556
1736
|
uuid: string;
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
macAddress
|
|
1737
|
+
deviceAppId: string;
|
|
1738
|
+
os: string;
|
|
1739
|
+
platform: string;
|
|
1740
|
+
macAddress: string;
|
|
1741
|
+
deviceNotificationEnabled: boolean;
|
|
1742
|
+
clientVersion: string;
|
|
1743
|
+
deviceToken: string;
|
|
1561
1744
|
options?: {
|
|
1562
1745
|
[key: string]: unknown;
|
|
1563
1746
|
};
|
|
@@ -2790,6 +2973,31 @@ declare class RequestHelpApi extends BaseService {
|
|
|
2790
2973
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LikeForumResponse>>;
|
|
2791
2974
|
}
|
|
2792
2975
|
|
|
2976
|
+
declare class SettingApi extends BaseService {
|
|
2977
|
+
constructor(client: AxiosInstance, baseUrl: string);
|
|
2978
|
+
/**
|
|
2979
|
+
* Get access key for web landing.
|
|
2980
|
+
*
|
|
2981
|
+
* @param params - The parameters.
|
|
2982
|
+
* @param params.data - JSON string of data. Available data:
|
|
2983
|
+
* - "app_id" (Required, string): App Id
|
|
2984
|
+
* - "campaign_id" (Required, int): Campaign ID
|
|
2985
|
+
* - "locale" (Required, int): User Locale
|
|
2986
|
+
* - "return_url" (Required, string): URL to redirect back to App
|
|
2987
|
+
* - "version" (Required, string): Version of landing interface
|
|
2988
|
+
* - "redeem_key" (Optional, string): Required for case history - Redeem Key from history API (CampaignID_ItemNumber)
|
|
2989
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
2990
|
+
* @param requestOptions - (Optional) Additional options for the request.
|
|
2991
|
+
* @returns A promise that resolves to a ServiceResponse containing the access token response.
|
|
2992
|
+
*/
|
|
2993
|
+
accessKey(params: {
|
|
2994
|
+
data: string;
|
|
2995
|
+
options?: {
|
|
2996
|
+
[key: string]: unknown;
|
|
2997
|
+
};
|
|
2998
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<AccessTokenResponse>>;
|
|
2999
|
+
}
|
|
3000
|
+
|
|
2793
3001
|
declare class Blob extends BaseService {
|
|
2794
3002
|
constructor(client: AxiosInstance, baseUrl: string);
|
|
2795
3003
|
consentVersion(appId: string): Promise<ServiceResponse<ConsentVersion>>;
|
|
@@ -2820,8 +3028,9 @@ declare class BzbsService {
|
|
|
2820
3028
|
addressApi: AddressApi;
|
|
2821
3029
|
stampApi: StampApi;
|
|
2822
3030
|
forumApi: RequestHelpApi;
|
|
3031
|
+
settingApi: SettingApi;
|
|
2823
3032
|
blob: Blob;
|
|
2824
3033
|
constructor(client: AxiosInstance, baseUrl: string, baseLineUrl: string | "", baseBlobUrl: string);
|
|
2825
3034
|
}
|
|
2826
3035
|
|
|
2827
|
-
export { type Address, AddressApi, type ApiResponse, type AppleToken, AuthenticateApi, type Badge, BadgeApi, BaseService, Blob, type Buzzebees, type BzbsErrorResponse, BzbsService, type Campaign, CampaignApi, type CampaignDetail, type CartAccessResponse, CartApi, type CartCountResponse, type Category, CategoryApi, type ChatMessage, type ClientError, type ConfirmOtpResponse, type Consent, ConsentApi, type ConsentVersion, type ConsentVersionValue, CouponApi, type CouponResponse, type CouponResponseData, type CreateStampResponse, type Dashboard, DashboardApi, type Detail, type District, type ErrorResponse, type ExpiringPoints, type FavoriteResponse, type ForgetPasswordResponse, HistoryApi, type LikeForumResponse, LineApi, type LineAuthResponse, type LoginResponse, type Maintenance, type Mission, type Notification, NotificationApi, type OtpResponse, type Picture, type Place, PlaceApi, type PlaceService, type PointLog, PointLogApi, type PointUnit, ProfileApi, type ProfileResponse, type Province, type Purchase, type RedeemResponse, RegistrationApi, type RegistrationResponse, RequestHelpApi, type RequestHelpCode, type RequestOptions, type ResumeResponse, type ServerError, type ServiceResponse, type Stamp, StampApi, type StampCampaign, type StampHistory, type StampProfileResponse, type StatusResponse, type Style, type SubCampaign, type SubCampaignStyle, type SubDistrict, type SuccessResponse, type Trace, type UpdatedPoints, type UseCampaignResponse, type ValidateOtpResponse, type Version, type ZipCode };
|
|
3036
|
+
export { type AccessTokenResponse, type Address, AddressApi, type ApiResponse, type AppleToken, AuthenticateApi, type Badge, BadgeApi, BaseService, Blob, type Buzzebees, type BzbsErrorResponse, BzbsService, type Campaign, CampaignApi, type CampaignDetail, type CartAccessResponse, CartApi, type CartCountResponse, type Category, CategoryApi, type ChatMessage, type ClientError, type ConfirmOtpResponse, type Consent, ConsentApi, type ConsentVersion, type ConsentVersionValue, CouponApi, type CouponResponse, type CouponResponseData, type CreateStampResponse, type Dashboard, DashboardApi, type Detail, type District, type ErrorResponse, type ExpiringPoints, type FavoriteResponse, type ForgetPasswordResponse, HistoryApi, type LikeForumResponse, LineApi, type LineAuthResponse, type LoginResponse, type Maintenance, type Mission, type Notification, NotificationApi, type OtpResponse, type Picture, type Place, PlaceApi, type PlaceService, type PointLog, PointLogApi, type PointUnit, ProfileApi, type ProfileResponse, type Province, type Purchase, type RedeemResponse, RegistrationApi, type RegistrationResponse, RequestHelpApi, type RequestHelpCode, type RequestOptions, type ResumeResponse, type ServerError, type ServiceResponse, SettingApi, type Stamp, StampApi, type StampCampaign, type StampHistory, type StampProfileResponse, type StatusResponse, type Style, type SubCampaign, type SubCampaignStyle, type SubDistrict, type SuccessResponse, type Trace, type UpdatedPoints, type UseCampaignResponse, type ValidateOtpResponse, type Version, type ZipCode };
|