@bzbs/react-api-client 1.1.2 → 1.2.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 +46 -1
- package/dist/index.d.ts +46 -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,11 +120,26 @@ 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;
|
|
126
140
|
FbDescription?: string;
|
|
127
141
|
Points?: number;
|
|
142
|
+
PointUnit?: string;
|
|
128
143
|
Active?: boolean;
|
|
129
144
|
MaxLevels?: number;
|
|
130
145
|
StartDate?: any;
|
|
@@ -182,6 +197,9 @@ interface Mission {
|
|
|
182
197
|
Value?: number;
|
|
183
198
|
Current?: number;
|
|
184
199
|
IsComplete?: boolean;
|
|
200
|
+
Name?: string;
|
|
201
|
+
ApplyStartDate?: number;
|
|
202
|
+
ApplyEndDate?: number;
|
|
185
203
|
}
|
|
186
204
|
|
|
187
205
|
interface PointUnit {
|
|
@@ -1327,6 +1345,33 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1327
1345
|
[key: string]: unknown;
|
|
1328
1346
|
};
|
|
1329
1347
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1348
|
+
/**
|
|
1349
|
+
* Request apple refresh token from the server
|
|
1350
|
+
*
|
|
1351
|
+
* @param params - The parameters.
|
|
1352
|
+
* @param params.authorizationCode - Apple authorization code
|
|
1353
|
+
* @param params.idToken - Apple identity token
|
|
1354
|
+
* @param params.appId - Your application id. See in Backoffice on Application
|
|
1355
|
+
* @param params.os - Your device operation system + version. Ex. ios 11.2.1 , android 9.0
|
|
1356
|
+
* @param params.platform - Your platform. Ex. iPhone , Android
|
|
1357
|
+
* @param params.macAddress - Unique device identifier
|
|
1358
|
+
* @param params.clientVersion - Number of version (App Prefix + Your application version , Ex. ios_buzzebeesdemo1.0.1)
|
|
1359
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1360
|
+
* @param requestOptions - Optional request options.
|
|
1361
|
+
* @returns A promise that resolves to a ServiceResponse containing the Apple token response.
|
|
1362
|
+
*/
|
|
1363
|
+
appleToken(params: {
|
|
1364
|
+
authorizationCode: string;
|
|
1365
|
+
idToken: string;
|
|
1366
|
+
appId: string;
|
|
1367
|
+
os: string;
|
|
1368
|
+
platform: string;
|
|
1369
|
+
macAddress: string;
|
|
1370
|
+
clientVersion: string;
|
|
1371
|
+
options?: {
|
|
1372
|
+
[key: string]: unknown;
|
|
1373
|
+
};
|
|
1374
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<AppleToken>>;
|
|
1330
1375
|
/**
|
|
1331
1376
|
* Performs a username and password login using the provided username and password.
|
|
1332
1377
|
*
|
|
@@ -2768,4 +2813,4 @@ declare class BzbsService {
|
|
|
2768
2813
|
constructor(client: AxiosInstance, baseUrl: string, baseLineUrl: string | "", baseBlobUrl: string);
|
|
2769
2814
|
}
|
|
2770
2815
|
|
|
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 };
|
|
2816
|
+
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,11 +120,26 @@ 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;
|
|
126
140
|
FbDescription?: string;
|
|
127
141
|
Points?: number;
|
|
142
|
+
PointUnit?: string;
|
|
128
143
|
Active?: boolean;
|
|
129
144
|
MaxLevels?: number;
|
|
130
145
|
StartDate?: any;
|
|
@@ -182,6 +197,9 @@ interface Mission {
|
|
|
182
197
|
Value?: number;
|
|
183
198
|
Current?: number;
|
|
184
199
|
IsComplete?: boolean;
|
|
200
|
+
Name?: string;
|
|
201
|
+
ApplyStartDate?: number;
|
|
202
|
+
ApplyEndDate?: number;
|
|
185
203
|
}
|
|
186
204
|
|
|
187
205
|
interface PointUnit {
|
|
@@ -1327,6 +1345,33 @@ declare class AuthenticateApi extends BaseService {
|
|
|
1327
1345
|
[key: string]: unknown;
|
|
1328
1346
|
};
|
|
1329
1347
|
}, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
|
|
1348
|
+
/**
|
|
1349
|
+
* Request apple refresh token from the server
|
|
1350
|
+
*
|
|
1351
|
+
* @param params - The parameters.
|
|
1352
|
+
* @param params.authorizationCode - Apple authorization code
|
|
1353
|
+
* @param params.idToken - Apple identity token
|
|
1354
|
+
* @param params.appId - Your application id. See in Backoffice on Application
|
|
1355
|
+
* @param params.os - Your device operation system + version. Ex. ios 11.2.1 , android 9.0
|
|
1356
|
+
* @param params.platform - Your platform. Ex. iPhone , Android
|
|
1357
|
+
* @param params.macAddress - Unique device identifier
|
|
1358
|
+
* @param params.clientVersion - Number of version (App Prefix + Your application version , Ex. ios_buzzebeesdemo1.0.1)
|
|
1359
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
1360
|
+
* @param requestOptions - Optional request options.
|
|
1361
|
+
* @returns A promise that resolves to a ServiceResponse containing the Apple token response.
|
|
1362
|
+
*/
|
|
1363
|
+
appleToken(params: {
|
|
1364
|
+
authorizationCode: string;
|
|
1365
|
+
idToken: string;
|
|
1366
|
+
appId: string;
|
|
1367
|
+
os: string;
|
|
1368
|
+
platform: string;
|
|
1369
|
+
macAddress: string;
|
|
1370
|
+
clientVersion: string;
|
|
1371
|
+
options?: {
|
|
1372
|
+
[key: string]: unknown;
|
|
1373
|
+
};
|
|
1374
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<AppleToken>>;
|
|
1330
1375
|
/**
|
|
1331
1376
|
* Performs a username and password login using the provided username and password.
|
|
1332
1377
|
*
|
|
@@ -2768,4 +2813,4 @@ declare class BzbsService {
|
|
|
2768
2813
|
constructor(client: AxiosInstance, baseUrl: string, baseLineUrl: string | "", baseBlobUrl: string);
|
|
2769
2814
|
}
|
|
2770
2815
|
|
|
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 };
|
|
2816
|
+
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
|
*
|