@bzbs/react-api-client 1.1.2 → 1.2.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 +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -120,6 +120,20 @@ interface ForgetPasswordResponse {
|
|
|
120
120
|
expireinseconds?: number;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
/**
|
|
124
|
+
* Response model for Apple token authentication
|
|
125
|
+
*/
|
|
126
|
+
interface AppleToken {
|
|
127
|
+
/**
|
|
128
|
+
* Apple refresh token
|
|
129
|
+
*/
|
|
130
|
+
refresh_token?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Apple identity token
|
|
133
|
+
*/
|
|
134
|
+
id_token?: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
123
137
|
interface Badge {
|
|
124
138
|
Name?: string;
|
|
125
139
|
Description?: string;
|
|
@@ -1327,6 +1341,33 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1327
1341
|
[key: string]: unknown;
|
|
1328
1342
|
};
|
|
1329
1343
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1344
|
+
/**
|
|
1345
|
+
* Request apple refresh token from the server
|
|
1346
|
+
*
|
|
1347
|
+
* @param params - The parameters.
|
|
1348
|
+
* @param params.authorizationCode - Apple authorization code
|
|
1349
|
+
* @param params.idToken - Apple identity token
|
|
1350
|
+
* @param params.appId - Your application id. See in Backoffice on Application
|
|
1351
|
+
* @param params.os - Your device operation system + version. Ex. ios 11.2.1 , android 9.0
|
|
1352
|
+
* @param params.platform - Your platform. Ex. iPhone , Android
|
|
1353
|
+
* @param params.macAddress - Unique device identifier
|
|
1354
|
+
* @param params.clientVersion - Number of version (App Prefix + Your application version , Ex. ios_buzzebeesdemo1.0.1)
|
|
1355
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1356
|
+
* @param requestOptions - Optional request options.
|
|
1357
|
+
* @returns A promise that resolves to a ServiceResponse containing the Apple token response.
|
|
1358
|
+
*/
|
|
1359
|
+
appleToken(params: {
|
|
1360
|
+
authorizationCode: string;
|
|
1361
|
+
idToken: string;
|
|
1362
|
+
appId: string;
|
|
1363
|
+
os: string;
|
|
1364
|
+
platform: string;
|
|
1365
|
+
macAddress: string;
|
|
1366
|
+
clientVersion: string;
|
|
1367
|
+
options?: {
|
|
1368
|
+
[key: string]: unknown;
|
|
1369
|
+
};
|
|
1370
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<AppleToken>>;
|
|
1330
1371
|
/**
|
|
1331
1372
|
* Performs a username and password login using the provided username and password.
|
|
1332
1373
|
*
|
|
@@ -2768,4 +2809,4 @@ declare class BzbsService {
|
|
|
2768
2809
|
constructor(client: AxiosInstance, baseUrl: string, baseLineUrl: string | "", baseBlobUrl: string);
|
|
2769
2810
|
}
|
|
2770
2811
|
|
|
2771
|
-
export { type Address, AddressApi, type ApiResponse, 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 };
|
|
2812
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -120,6 +120,20 @@ interface ForgetPasswordResponse {
|
|
|
120
120
|
expireinseconds?: number;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
/**
|
|
124
|
+
* Response model for Apple token authentication
|
|
125
|
+
*/
|
|
126
|
+
interface AppleToken {
|
|
127
|
+
/**
|
|
128
|
+
* Apple refresh token
|
|
129
|
+
*/
|
|
130
|
+
refresh_token?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Apple identity token
|
|
133
|
+
*/
|
|
134
|
+
id_token?: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
123
137
|
interface Badge {
|
|
124
138
|
Name?: string;
|
|
125
139
|
Description?: string;
|
|
@@ -1327,6 +1341,33 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1327
1341
|
[key: string]: unknown;
|
|
1328
1342
|
};
|
|
1329
1343
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1344
|
+
/**
|
|
1345
|
+
* Request apple refresh token from the server
|
|
1346
|
+
*
|
|
1347
|
+
* @param params - The parameters.
|
|
1348
|
+
* @param params.authorizationCode - Apple authorization code
|
|
1349
|
+
* @param params.idToken - Apple identity token
|
|
1350
|
+
* @param params.appId - Your application id. See in Backoffice on Application
|
|
1351
|
+
* @param params.os - Your device operation system + version. Ex. ios 11.2.1 , android 9.0
|
|
1352
|
+
* @param params.platform - Your platform. Ex. iPhone , Android
|
|
1353
|
+
* @param params.macAddress - Unique device identifier
|
|
1354
|
+
* @param params.clientVersion - Number of version (App Prefix + Your application version , Ex. ios_buzzebeesdemo1.0.1)
|
|
1355
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1356
|
+
* @param requestOptions - Optional request options.
|
|
1357
|
+
* @returns A promise that resolves to a ServiceResponse containing the Apple token response.
|
|
1358
|
+
*/
|
|
1359
|
+
appleToken(params: {
|
|
1360
|
+
authorizationCode: string;
|
|
1361
|
+
idToken: string;
|
|
1362
|
+
appId: string;
|
|
1363
|
+
os: string;
|
|
1364
|
+
platform: string;
|
|
1365
|
+
macAddress: string;
|
|
1366
|
+
clientVersion: string;
|
|
1367
|
+
options?: {
|
|
1368
|
+
[key: string]: unknown;
|
|
1369
|
+
};
|
|
1370
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<AppleToken>>;
|
|
1330
1371
|
/**
|
|
1331
1372
|
* Performs a username and password login using the provided username and password.
|
|
1332
1373
|
*
|
|
@@ -2768,4 +2809,4 @@ declare class BzbsService {
|
|
|
2768
2809
|
constructor(client: AxiosInstance, baseUrl: string, baseLineUrl: string | "", baseBlobUrl: string);
|
|
2769
2810
|
}
|
|
2770
2811
|
|
|
2771
|
-
export { type Address, AddressApi, type ApiResponse, 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 };
|
|
2812
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -395,6 +395,44 @@ var AuthenticateApi = class extends BaseService {
|
|
|
395
395
|
);
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
|
+
/**
|
|
399
|
+
* Request apple refresh token from the server
|
|
400
|
+
*
|
|
401
|
+
* @param params - The parameters.
|
|
402
|
+
* @param params.authorizationCode - Apple authorization code
|
|
403
|
+
* @param params.idToken - Apple identity token
|
|
404
|
+
* @param params.appId - Your application id. See in Backoffice on Application
|
|
405
|
+
* @param params.os - Your device operation system + version. Ex. ios 11.2.1 , android 9.0
|
|
406
|
+
* @param params.platform - Your platform. Ex. iPhone , Android
|
|
407
|
+
* @param params.macAddress - Unique device identifier
|
|
408
|
+
* @param params.clientVersion - Number of version (App Prefix + Your application version , Ex. ios_buzzebeesdemo1.0.1)
|
|
409
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
410
|
+
* @param requestOptions - Optional request options.
|
|
411
|
+
* @returns A promise that resolves to a ServiceResponse containing the Apple token response.
|
|
412
|
+
*/
|
|
413
|
+
appleToken(params, requestOptions) {
|
|
414
|
+
return __async(this, null, function* () {
|
|
415
|
+
return yield this.post(
|
|
416
|
+
"auth/apple_token",
|
|
417
|
+
__spreadValues({
|
|
418
|
+
authorization_code: params.authorizationCode,
|
|
419
|
+
id_token: params.idToken,
|
|
420
|
+
app_id: params.appId,
|
|
421
|
+
os: params.os,
|
|
422
|
+
platform: params.platform,
|
|
423
|
+
mac_address: params.macAddress,
|
|
424
|
+
client_version: params.clientVersion
|
|
425
|
+
}, params.options),
|
|
426
|
+
{
|
|
427
|
+
headers: __spreadValues({
|
|
428
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
429
|
+
}, requestOptions == null ? void 0 : requestOptions.headers),
|
|
430
|
+
data: requestOptions == null ? void 0 : requestOptions.data,
|
|
431
|
+
params: requestOptions == null ? void 0 : requestOptions.params
|
|
432
|
+
}
|
|
433
|
+
);
|
|
434
|
+
});
|
|
435
|
+
}
|
|
398
436
|
/**
|
|
399
437
|
* Performs a username and password login using the provided username and password.
|
|
400
438
|
*
|