@bzbs/react-api-client 1.2.6 → 1.3.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 +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,9 +548,16 @@ 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;
|
|
560
|
+
hashtag_list_config?: string;
|
|
550
561
|
subcampaigndetails?: Dashboard[];
|
|
551
562
|
}
|
|
552
563
|
|
|
@@ -1401,6 +1412,120 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1401
1412
|
[key: string]: unknown;
|
|
1402
1413
|
};
|
|
1403
1414
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1415
|
+
/**
|
|
1416
|
+
* Connect with LINE. If authorization token is provided, it will connect current user with given LINE credentials.
|
|
1417
|
+
* Otherwise, it tries to login with those credentials.
|
|
1418
|
+
*
|
|
1419
|
+
* @param params - The parameters.
|
|
1420
|
+
* @param params.idToken - The LINE id token.
|
|
1421
|
+
* @param params.lineAccessToken - The LINE access token.
|
|
1422
|
+
* @param params.authorizationCode - The LINE authorization code.
|
|
1423
|
+
* @param params.appId - Your application id.
|
|
1424
|
+
* @param params.uuid - The unique device identifier.
|
|
1425
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1426
|
+
* @param requestOptions - Optional request options.
|
|
1427
|
+
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
1428
|
+
*/
|
|
1429
|
+
connectLine(params: {
|
|
1430
|
+
idToken: string;
|
|
1431
|
+
lineAccessToken: string;
|
|
1432
|
+
authorizationCode: string;
|
|
1433
|
+
appId: string;
|
|
1434
|
+
uuid: string;
|
|
1435
|
+
deviceLocale: string;
|
|
1436
|
+
os: string;
|
|
1437
|
+
platform: string;
|
|
1438
|
+
deviceNotificationEnabled: boolean;
|
|
1439
|
+
clientVersion: string;
|
|
1440
|
+
deviceToken: string;
|
|
1441
|
+
macAddress: string;
|
|
1442
|
+
options?: {
|
|
1443
|
+
[key: string]: unknown;
|
|
1444
|
+
};
|
|
1445
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1446
|
+
/**
|
|
1447
|
+
* Connect with Facebook. If authorization token is provided, it will connect current user with given Facebook access token.
|
|
1448
|
+
* Otherwise, it tries to login with that access token.
|
|
1449
|
+
*
|
|
1450
|
+
* @param params - The parameters.
|
|
1451
|
+
* @param params.accessToken - The Facebook access token.
|
|
1452
|
+
* @param params.appId - Your application id.
|
|
1453
|
+
* @param params.uuid - The unique device identifier.
|
|
1454
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1455
|
+
* @param requestOptions - Optional request options.
|
|
1456
|
+
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
1457
|
+
*/
|
|
1458
|
+
connectFacebook(params: {
|
|
1459
|
+
accessToken: string;
|
|
1460
|
+
appId: string;
|
|
1461
|
+
uuid: string;
|
|
1462
|
+
deviceLocale: string;
|
|
1463
|
+
os: string;
|
|
1464
|
+
platform: string;
|
|
1465
|
+
deviceNotificationEnabled: boolean;
|
|
1466
|
+
clientVersion: string;
|
|
1467
|
+
deviceToken: string;
|
|
1468
|
+
macAddress: string;
|
|
1469
|
+
options?: {
|
|
1470
|
+
[key: string]: unknown;
|
|
1471
|
+
};
|
|
1472
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1473
|
+
/**
|
|
1474
|
+
* Connect with Google. If authorization token is provided, it will connect current user with given Google id token.
|
|
1475
|
+
* Otherwise, it tries to login with that id token.
|
|
1476
|
+
*
|
|
1477
|
+
* @param params - The parameters.
|
|
1478
|
+
* @param params.idToken - The Google id token.
|
|
1479
|
+
* @param params.appId - Your application id.
|
|
1480
|
+
* @param params.uuid - The unique device identifier.
|
|
1481
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1482
|
+
* @param requestOptions - Optional request options.
|
|
1483
|
+
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
1484
|
+
*/
|
|
1485
|
+
connectGoogle(params: {
|
|
1486
|
+
idToken: string;
|
|
1487
|
+
appId: string;
|
|
1488
|
+
uuid: string;
|
|
1489
|
+
deviceLocale: string;
|
|
1490
|
+
os: string;
|
|
1491
|
+
platform: string;
|
|
1492
|
+
deviceNotificationEnabled: boolean;
|
|
1493
|
+
clientVersion: string;
|
|
1494
|
+
deviceToken: string;
|
|
1495
|
+
macAddress: string;
|
|
1496
|
+
options?: {
|
|
1497
|
+
[key: string]: unknown;
|
|
1498
|
+
};
|
|
1499
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1500
|
+
/**
|
|
1501
|
+
* Connect with Apple. If authorization token is provided, it will connect current user with given Apple credentials.
|
|
1502
|
+
* Otherwise, it tries to login with those credentials.
|
|
1503
|
+
*
|
|
1504
|
+
* @param params - The parameters.
|
|
1505
|
+
* @param params.idToken - The Apple id token.
|
|
1506
|
+
* @param params.refreshToken - The Apple refresh token from appleToken().
|
|
1507
|
+
* @param params.appId - Your application id.
|
|
1508
|
+
* @param params.uuid - The unique device identifier.
|
|
1509
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1510
|
+
* @param requestOptions - Optional request options.
|
|
1511
|
+
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
1512
|
+
*/
|
|
1513
|
+
connectApple(params: {
|
|
1514
|
+
idToken: string;
|
|
1515
|
+
refreshToken: string;
|
|
1516
|
+
appId: string;
|
|
1517
|
+
uuid: string;
|
|
1518
|
+
deviceLocale: string;
|
|
1519
|
+
os: string;
|
|
1520
|
+
platform: string;
|
|
1521
|
+
deviceNotificationEnabled: boolean;
|
|
1522
|
+
clientVersion: string;
|
|
1523
|
+
deviceToken: string;
|
|
1524
|
+
macAddress: string;
|
|
1525
|
+
options?: {
|
|
1526
|
+
[key: string]: unknown;
|
|
1527
|
+
};
|
|
1528
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1404
1529
|
/**
|
|
1405
1530
|
* Performs a logout for the user.
|
|
1406
1531
|
*
|
|
@@ -1455,7 +1580,7 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1455
1580
|
};
|
|
1456
1581
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<StatusResponse>>;
|
|
1457
1582
|
/**
|
|
1458
|
-
* Sends an OTP (One-Time Password) to the user for authentication.
|
|
1583
|
+
* Sends an OTP (One-Time Password) to the user for authentication (GET method).
|
|
1459
1584
|
*
|
|
1460
1585
|
* @param params - The parameters.
|
|
1461
1586
|
* @param params.uuid - The unique device identifier.
|
|
@@ -1475,6 +1600,46 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1475
1600
|
[key: string]: unknown;
|
|
1476
1601
|
};
|
|
1477
1602
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<OtpResponse>>;
|
|
1603
|
+
/**
|
|
1604
|
+
* Sends an OTP (One-Time Password) to the user for authentication (POST method, V2).
|
|
1605
|
+
*
|
|
1606
|
+
* @param params - The parameters.
|
|
1607
|
+
* @param params.appId - Your application id.
|
|
1608
|
+
* @param params.contactNumber - The contact number for the user.
|
|
1609
|
+
* @param params.channel - (Optional) The channel to use for OTP delivery.
|
|
1610
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1611
|
+
* @param requestOptions - (Optional) Additional options for the request.
|
|
1612
|
+
* @returns A promise that resolves to a ServiceResponse containing the OTP response.
|
|
1613
|
+
*/
|
|
1614
|
+
otpV2(params: {
|
|
1615
|
+
appId: string;
|
|
1616
|
+
contactNumber: string;
|
|
1617
|
+
channel?: string;
|
|
1618
|
+
options?: {
|
|
1619
|
+
[key: string]: unknown;
|
|
1620
|
+
};
|
|
1621
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<OtpResponse>>;
|
|
1622
|
+
/**
|
|
1623
|
+
* Sends an OTP (One-Time Password) via email to the user for authentication.
|
|
1624
|
+
*
|
|
1625
|
+
* @param params - The parameters.
|
|
1626
|
+
* @param params.uuid - The unique device identifier.
|
|
1627
|
+
* @param params.appId - Your application id.
|
|
1628
|
+
* @param params.email - The email address for the user.
|
|
1629
|
+
* @param params.channel - (Optional) The channel to use for OTP delivery.
|
|
1630
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1631
|
+
* @param requestOptions - (Optional) Additional options for the request.
|
|
1632
|
+
* @returns A promise that resolves to a ServiceResponse containing the OTP response.
|
|
1633
|
+
*/
|
|
1634
|
+
otpEmail(params: {
|
|
1635
|
+
uuid: string;
|
|
1636
|
+
appId: string;
|
|
1637
|
+
email: string;
|
|
1638
|
+
channel?: string;
|
|
1639
|
+
options?: {
|
|
1640
|
+
[key: string]: unknown;
|
|
1641
|
+
};
|
|
1642
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<OtpResponse>>;
|
|
1478
1643
|
/**
|
|
1479
1644
|
* Confirm the OTP (One-Time Password) for authentication.
|
|
1480
1645
|
*
|
|
@@ -1501,8 +1666,10 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1501
1666
|
* @param params.appId - Your application id.
|
|
1502
1667
|
* @param params.otp - The OTP to validate.
|
|
1503
1668
|
* @param params.refCode - The reference code for the OTP.
|
|
1504
|
-
* @param params.
|
|
1505
|
-
* @param params.
|
|
1669
|
+
* @param params.type - Type of contact (email or contact_number).
|
|
1670
|
+
* @param params.contactNumber - (Optional) The contact number for the user.
|
|
1671
|
+
* @param params.email - (Optional) The email address for the user.
|
|
1672
|
+
* @param params.use - Whether to use the OTP after validation (default: false).
|
|
1506
1673
|
* @param params.channel - (Optional) The channel to use for OTP delivery.
|
|
1507
1674
|
* @param params.options - (Optional) Additional params for the request.
|
|
1508
1675
|
* @param requestOptions - (Optional) Additional options for the request.
|
|
@@ -1512,53 +1679,69 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1512
1679
|
appId: string;
|
|
1513
1680
|
otp: string;
|
|
1514
1681
|
refCode: string;
|
|
1515
|
-
|
|
1516
|
-
|
|
1682
|
+
type: string;
|
|
1683
|
+
contactNumber?: string;
|
|
1684
|
+
email?: string;
|
|
1685
|
+
use?: boolean;
|
|
1517
1686
|
channel?: string;
|
|
1518
1687
|
options?: {
|
|
1519
1688
|
[key: string]: unknown;
|
|
1520
1689
|
};
|
|
1521
1690
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<ValidateOtpResponse>>;
|
|
1522
1691
|
/**
|
|
1523
|
-
*
|
|
1692
|
+
* Refresh buzzebees token and retrieve a new token.
|
|
1524
1693
|
*
|
|
1525
1694
|
* @param params - The parameters.
|
|
1526
1695
|
* @param params.uuid - The unique device identifier.
|
|
1527
|
-
* @param params.
|
|
1528
|
-
* @param params.
|
|
1529
|
-
* @param params.
|
|
1696
|
+
* @param params.deviceAppId - Your application id.
|
|
1697
|
+
* @param params.os - Your device operation system + version. Ex. ios 11.2.1, android 9.0
|
|
1698
|
+
* @param params.platform - Your platform. Ex. iPhone, Android
|
|
1699
|
+
* @param params.macAddress - Unique device identifier
|
|
1700
|
+
* @param params.deviceNotificationEnabled - Enable push notification
|
|
1701
|
+
* @param params.clientVersion - Number of version (App Prefix + Your application version, Ex. ios_buzzebeesdemo1.0.1)
|
|
1702
|
+
* @param params.deviceToken - Device token used for send push notification
|
|
1530
1703
|
* @param params.options - (Optional) Additional params for the request.
|
|
1531
1704
|
* @param requestOptions - (Optional) Additional options for the request.
|
|
1532
1705
|
* @returns A promise that resolves to a ServiceResponse containing the resume response.
|
|
1533
1706
|
*/
|
|
1534
1707
|
resume(params: {
|
|
1535
1708
|
uuid: string;
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
macAddress
|
|
1709
|
+
deviceAppId: string;
|
|
1710
|
+
os: string;
|
|
1711
|
+
platform: string;
|
|
1712
|
+
macAddress: string;
|
|
1713
|
+
deviceNotificationEnabled: boolean;
|
|
1714
|
+
clientVersion: string;
|
|
1715
|
+
deviceToken: string;
|
|
1540
1716
|
options?: {
|
|
1541
1717
|
[key: string]: unknown;
|
|
1542
1718
|
};
|
|
1543
1719
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<ResumeResponse>>;
|
|
1544
1720
|
/**
|
|
1545
|
-
* Update
|
|
1721
|
+
* Update device token for push notification.
|
|
1546
1722
|
*
|
|
1547
1723
|
* @param params - The parameters.
|
|
1548
1724
|
* @param params.uuid - The unique device identifier.
|
|
1549
|
-
* @param params.
|
|
1550
|
-
* @param params.
|
|
1551
|
-
* @param params.
|
|
1725
|
+
* @param params.deviceAppId - Your application id.
|
|
1726
|
+
* @param params.os - Your device operation system + version. Ex. ios 11.2.1, android 9.0
|
|
1727
|
+
* @param params.platform - Your platform. Ex. iPhone, Android
|
|
1728
|
+
* @param params.macAddress - Unique device identifier
|
|
1729
|
+
* @param params.deviceNotificationEnabled - Enable push notification
|
|
1730
|
+
* @param params.clientVersion - Number of version (App Prefix + Your application version, Ex. ios_buzzebeesdemo1.0.1)
|
|
1731
|
+
* @param params.deviceToken - Device token used for send push notification
|
|
1552
1732
|
* @param params.options - (Optional) Additional params for the request.
|
|
1553
1733
|
* @param requestOptions - (Optional) Additional options for the request.
|
|
1554
1734
|
* @returns A promise that resolves to a ServiceResponse containing the resume response.
|
|
1555
1735
|
*/
|
|
1556
1736
|
updateDevice(params: {
|
|
1557
1737
|
uuid: string;
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
macAddress
|
|
1738
|
+
deviceAppId: string;
|
|
1739
|
+
os: string;
|
|
1740
|
+
platform: string;
|
|
1741
|
+
macAddress: string;
|
|
1742
|
+
deviceNotificationEnabled: boolean;
|
|
1743
|
+
clientVersion: string;
|
|
1744
|
+
deviceToken: string;
|
|
1562
1745
|
options?: {
|
|
1563
1746
|
[key: string]: unknown;
|
|
1564
1747
|
};
|
|
@@ -2791,6 +2974,31 @@ declare class RequestHelpApi extends BaseService {
|
|
|
2791
2974
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LikeForumResponse>>;
|
|
2792
2975
|
}
|
|
2793
2976
|
|
|
2977
|
+
declare class SettingApi extends BaseService {
|
|
2978
|
+
constructor(client: AxiosInstance, baseUrl: string);
|
|
2979
|
+
/**
|
|
2980
|
+
* Get access key for web landing.
|
|
2981
|
+
*
|
|
2982
|
+
* @param params - The parameters.
|
|
2983
|
+
* @param params.data - JSON string of data. Available data:
|
|
2984
|
+
* - "app_id" (Required, string): App Id
|
|
2985
|
+
* - "campaign_id" (Required, int): Campaign ID
|
|
2986
|
+
* - "locale" (Required, int): User Locale
|
|
2987
|
+
* - "return_url" (Required, string): URL to redirect back to App
|
|
2988
|
+
* - "version" (Required, string): Version of landing interface
|
|
2989
|
+
* - "redeem_key" (Optional, string): Required for case history - Redeem Key from history API (CampaignID_ItemNumber)
|
|
2990
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
2991
|
+
* @param requestOptions - (Optional) Additional options for the request.
|
|
2992
|
+
* @returns A promise that resolves to a ServiceResponse containing the access token response.
|
|
2993
|
+
*/
|
|
2994
|
+
accessKey(params: {
|
|
2995
|
+
data: string;
|
|
2996
|
+
options?: {
|
|
2997
|
+
[key: string]: unknown;
|
|
2998
|
+
};
|
|
2999
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<AccessTokenResponse>>;
|
|
3000
|
+
}
|
|
3001
|
+
|
|
2794
3002
|
declare class Blob extends BaseService {
|
|
2795
3003
|
constructor(client: AxiosInstance, baseUrl: string);
|
|
2796
3004
|
consentVersion(appId: string): Promise<ServiceResponse<ConsentVersion>>;
|
|
@@ -2821,8 +3029,9 @@ declare class BzbsService {
|
|
|
2821
3029
|
addressApi: AddressApi;
|
|
2822
3030
|
stampApi: StampApi;
|
|
2823
3031
|
forumApi: RequestHelpApi;
|
|
3032
|
+
settingApi: SettingApi;
|
|
2824
3033
|
blob: Blob;
|
|
2825
3034
|
constructor(client: AxiosInstance, baseUrl: string, baseLineUrl: string | "", baseBlobUrl: string);
|
|
2826
3035
|
}
|
|
2827
3036
|
|
|
2828
|
-
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 };
|
|
3037
|
+
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 };
|