@bzbs/react-api-client 2.0.3 → 2.1.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 +111 -1
- package/dist/index.d.ts +111 -1
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +105 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1252,6 +1252,31 @@ interface ConsentVersionValue {
|
|
|
1252
1252
|
current_version: string;
|
|
1253
1253
|
}
|
|
1254
1254
|
|
|
1255
|
+
interface PointBalance {
|
|
1256
|
+
Unit: string;
|
|
1257
|
+
Balance: number;
|
|
1258
|
+
Currents?: {
|
|
1259
|
+
[date: string]: number;
|
|
1260
|
+
};
|
|
1261
|
+
Expires?: {
|
|
1262
|
+
[date: string]: number;
|
|
1263
|
+
};
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
interface PointHistory {
|
|
1267
|
+
Unit: string;
|
|
1268
|
+
TransactionId: string;
|
|
1269
|
+
Reference: string;
|
|
1270
|
+
Timestamp: number;
|
|
1271
|
+
TotalChange: number;
|
|
1272
|
+
Action: string;
|
|
1273
|
+
Type: string;
|
|
1274
|
+
Message: string | null;
|
|
1275
|
+
Data: {
|
|
1276
|
+
[key: string]: any;
|
|
1277
|
+
} | null;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1255
1280
|
declare class AuthenticateApi extends BaseService {
|
|
1256
1281
|
constructor(client: AxiosInstance, baseUrl: string);
|
|
1257
1282
|
/**
|
|
@@ -1935,6 +1960,7 @@ declare class CampaignApi extends BaseService {
|
|
|
1935
1960
|
* @param params.contactNumber - The contact number of the user.
|
|
1936
1961
|
* @param params.options - Additional options for the redemption.
|
|
1937
1962
|
* @param params.spPoints - Point Per Unit x Quantity (Donate only).
|
|
1963
|
+
* @param params.pointUnit - The point unit of the campaign (Point Service Only).
|
|
1938
1964
|
* @param requestOptions - The options for the HTTP request.
|
|
1939
1965
|
* @returns A promise that resolves to a service response containing the redeem response.
|
|
1940
1966
|
*/
|
|
@@ -2402,6 +2428,89 @@ declare class PointLogApi extends BaseService {
|
|
|
2402
2428
|
}, requestOption?: RequestOptions): Promise<ServiceResponse<PointLog[]>>;
|
|
2403
2429
|
}
|
|
2404
2430
|
|
|
2431
|
+
declare class PointApi extends BaseService {
|
|
2432
|
+
constructor(client: AxiosInstance, baseUrl: string);
|
|
2433
|
+
/**
|
|
2434
|
+
* Retrieves the current point balance for the authenticated user across the requested point units.
|
|
2435
|
+
*
|
|
2436
|
+
* @param params - The parameters for retrieving the point balance.
|
|
2437
|
+
* @param params.units - (Optional) Point unit codes (e.g. Point, Coin). Omit to use all units configured for the app.
|
|
2438
|
+
* @param params.boxIds - (Optional) Box (sub-bucket) identifiers to filter by.
|
|
2439
|
+
* @param params.onlyVisible - (Optional) When true (default), only units marked visible for the app are considered.
|
|
2440
|
+
* @param params.options - (Optional) Additional options for the request.
|
|
2441
|
+
* @param requestOptions - (Optional) The request options.
|
|
2442
|
+
* @returns A promise that resolves to a service response containing an array of point balances.
|
|
2443
|
+
*/
|
|
2444
|
+
balance(params?: {
|
|
2445
|
+
units?: string;
|
|
2446
|
+
boxIds?: string;
|
|
2447
|
+
onlyVisible?: boolean;
|
|
2448
|
+
options?: {
|
|
2449
|
+
[key: string]: unknown;
|
|
2450
|
+
};
|
|
2451
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<PointBalance[]>>;
|
|
2452
|
+
/**
|
|
2453
|
+
* Retrieves the point balance with Currents and Expires breakdowns keyed by date.
|
|
2454
|
+
*
|
|
2455
|
+
* @param params - The parameters for retrieving the point detail.
|
|
2456
|
+
* @param params.units - (Optional) Point unit codes (e.g. Point, Coin). Omit to use all units configured for the app.
|
|
2457
|
+
* @param params.boxIds - (Optional) Box (sub-bucket) identifiers to filter by.
|
|
2458
|
+
* @param params.onlyVisible - (Optional) When true (default), only units marked visible for the app are considered.
|
|
2459
|
+
* @param params.options - (Optional) Additional options for the request.
|
|
2460
|
+
* @param requestOptions - (Optional) The request options.
|
|
2461
|
+
* @returns A promise that resolves to a service response containing an array of point balances with breakdowns.
|
|
2462
|
+
*/
|
|
2463
|
+
detail(params?: {
|
|
2464
|
+
units?: string;
|
|
2465
|
+
boxIds?: string;
|
|
2466
|
+
onlyVisible?: boolean;
|
|
2467
|
+
options?: {
|
|
2468
|
+
[key: string]: unknown;
|
|
2469
|
+
};
|
|
2470
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<PointBalance[]>>;
|
|
2471
|
+
/**
|
|
2472
|
+
* Retrieves a paginated list of earn/burn/transfer transactions between start and end dates.
|
|
2473
|
+
*
|
|
2474
|
+
* @param params - The parameters for retrieving the point history.
|
|
2475
|
+
* @param params.start - Start of the range (inclusive), ISO-8601 with offset.
|
|
2476
|
+
* @param params.end - End of the range (inclusive), ISO-8601 with offset.
|
|
2477
|
+
* @param params.onlyVisible - (Optional) When true (default), only units marked visible for the app are considered.
|
|
2478
|
+
* @param params.skip - (Optional) Number of records to skip (offset pagination).
|
|
2479
|
+
* @param params.top - (Optional) Maximum number of records to return.
|
|
2480
|
+
* @param params.sortType - (Optional) Sort direction for Timestamp: Asc|Desc.
|
|
2481
|
+
* @param params.units - (Optional) Point unit codes to filter by.
|
|
2482
|
+
* @param params.boxIds - (Optional) Box (sub-bucket) identifiers to filter by.
|
|
2483
|
+
* @param params.references - (Optional) Filter by transaction reference.
|
|
2484
|
+
* @param params.transactionIds - (Optional) Filter by exact transaction IDs.
|
|
2485
|
+
* @param params.includeActions - (Optional) Only include transactions whose Action matches (e.g. Earn, Burn, Transfer).
|
|
2486
|
+
* @param params.excludeActions - (Optional) Exclude transactions whose Action matches.
|
|
2487
|
+
* @param params.includeTypes - (Optional) Only include transactions whose Type matches.
|
|
2488
|
+
* @param params.excludeTypes - (Optional) Exclude transactions whose Type matches.
|
|
2489
|
+
* @param params.options - (Optional) Additional options for the request.
|
|
2490
|
+
* @param requestOptions - (Optional) The request options.
|
|
2491
|
+
* @returns A promise that resolves to a service response containing an array of point history transactions.
|
|
2492
|
+
*/
|
|
2493
|
+
history(params: {
|
|
2494
|
+
start: string;
|
|
2495
|
+
end: string;
|
|
2496
|
+
onlyVisible?: boolean;
|
|
2497
|
+
skip?: number;
|
|
2498
|
+
top?: number;
|
|
2499
|
+
sortType?: 'Asc' | 'Desc';
|
|
2500
|
+
units?: string;
|
|
2501
|
+
boxIds?: string;
|
|
2502
|
+
references?: string;
|
|
2503
|
+
transactionIds?: string;
|
|
2504
|
+
includeActions?: string;
|
|
2505
|
+
excludeActions?: string;
|
|
2506
|
+
includeTypes?: string;
|
|
2507
|
+
excludeTypes?: string;
|
|
2508
|
+
options?: {
|
|
2509
|
+
[key: string]: unknown;
|
|
2510
|
+
};
|
|
2511
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<PointHistory[]>>;
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2405
2514
|
declare class ProfileApi extends BaseService {
|
|
2406
2515
|
constructor(client: AxiosInstance, baseUrl: string);
|
|
2407
2516
|
/**
|
|
@@ -3143,6 +3252,7 @@ declare class BzbsService {
|
|
|
3143
3252
|
notificationApi: NotificationApi;
|
|
3144
3253
|
placeApi: PlaceApi;
|
|
3145
3254
|
pointLogApi: PointLogApi;
|
|
3255
|
+
pointApi: PointApi;
|
|
3146
3256
|
profileApi: ProfileApi;
|
|
3147
3257
|
registerApi: RegistrationApi;
|
|
3148
3258
|
addressApi: AddressApi;
|
|
@@ -3156,4 +3266,4 @@ declare class BzbsService {
|
|
|
3156
3266
|
setLineUrl(lineUrl: string): this;
|
|
3157
3267
|
}
|
|
3158
3268
|
|
|
3159
|
-
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 CrossPlatformFile, 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 };
|
|
3269
|
+
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 CrossPlatformFile, 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, PointApi, type PointBalance, type PointHistory, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1252,6 +1252,31 @@ interface ConsentVersionValue {
|
|
|
1252
1252
|
current_version: string;
|
|
1253
1253
|
}
|
|
1254
1254
|
|
|
1255
|
+
interface PointBalance {
|
|
1256
|
+
Unit: string;
|
|
1257
|
+
Balance: number;
|
|
1258
|
+
Currents?: {
|
|
1259
|
+
[date: string]: number;
|
|
1260
|
+
};
|
|
1261
|
+
Expires?: {
|
|
1262
|
+
[date: string]: number;
|
|
1263
|
+
};
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
interface PointHistory {
|
|
1267
|
+
Unit: string;
|
|
1268
|
+
TransactionId: string;
|
|
1269
|
+
Reference: string;
|
|
1270
|
+
Timestamp: number;
|
|
1271
|
+
TotalChange: number;
|
|
1272
|
+
Action: string;
|
|
1273
|
+
Type: string;
|
|
1274
|
+
Message: string | null;
|
|
1275
|
+
Data: {
|
|
1276
|
+
[key: string]: any;
|
|
1277
|
+
} | null;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1255
1280
|
declare class AuthenticateApi extends BaseService {
|
|
1256
1281
|
constructor(client: AxiosInstance, baseUrl: string);
|
|
1257
1282
|
/**
|
|
@@ -1935,6 +1960,7 @@ declare class CampaignApi extends BaseService {
|
|
|
1935
1960
|
* @param params.contactNumber - The contact number of the user.
|
|
1936
1961
|
* @param params.options - Additional options for the redemption.
|
|
1937
1962
|
* @param params.spPoints - Point Per Unit x Quantity (Donate only).
|
|
1963
|
+
* @param params.pointUnit - The point unit of the campaign (Point Service Only).
|
|
1938
1964
|
* @param requestOptions - The options for the HTTP request.
|
|
1939
1965
|
* @returns A promise that resolves to a service response containing the redeem response.
|
|
1940
1966
|
*/
|
|
@@ -2402,6 +2428,89 @@ declare class PointLogApi extends BaseService {
|
|
|
2402
2428
|
}, requestOption?: RequestOptions): Promise<ServiceResponse<PointLog[]>>;
|
|
2403
2429
|
}
|
|
2404
2430
|
|
|
2431
|
+
declare class PointApi extends BaseService {
|
|
2432
|
+
constructor(client: AxiosInstance, baseUrl: string);
|
|
2433
|
+
/**
|
|
2434
|
+
* Retrieves the current point balance for the authenticated user across the requested point units.
|
|
2435
|
+
*
|
|
2436
|
+
* @param params - The parameters for retrieving the point balance.
|
|
2437
|
+
* @param params.units - (Optional) Point unit codes (e.g. Point, Coin). Omit to use all units configured for the app.
|
|
2438
|
+
* @param params.boxIds - (Optional) Box (sub-bucket) identifiers to filter by.
|
|
2439
|
+
* @param params.onlyVisible - (Optional) When true (default), only units marked visible for the app are considered.
|
|
2440
|
+
* @param params.options - (Optional) Additional options for the request.
|
|
2441
|
+
* @param requestOptions - (Optional) The request options.
|
|
2442
|
+
* @returns A promise that resolves to a service response containing an array of point balances.
|
|
2443
|
+
*/
|
|
2444
|
+
balance(params?: {
|
|
2445
|
+
units?: string;
|
|
2446
|
+
boxIds?: string;
|
|
2447
|
+
onlyVisible?: boolean;
|
|
2448
|
+
options?: {
|
|
2449
|
+
[key: string]: unknown;
|
|
2450
|
+
};
|
|
2451
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<PointBalance[]>>;
|
|
2452
|
+
/**
|
|
2453
|
+
* Retrieves the point balance with Currents and Expires breakdowns keyed by date.
|
|
2454
|
+
*
|
|
2455
|
+
* @param params - The parameters for retrieving the point detail.
|
|
2456
|
+
* @param params.units - (Optional) Point unit codes (e.g. Point, Coin). Omit to use all units configured for the app.
|
|
2457
|
+
* @param params.boxIds - (Optional) Box (sub-bucket) identifiers to filter by.
|
|
2458
|
+
* @param params.onlyVisible - (Optional) When true (default), only units marked visible for the app are considered.
|
|
2459
|
+
* @param params.options - (Optional) Additional options for the request.
|
|
2460
|
+
* @param requestOptions - (Optional) The request options.
|
|
2461
|
+
* @returns A promise that resolves to a service response containing an array of point balances with breakdowns.
|
|
2462
|
+
*/
|
|
2463
|
+
detail(params?: {
|
|
2464
|
+
units?: string;
|
|
2465
|
+
boxIds?: string;
|
|
2466
|
+
onlyVisible?: boolean;
|
|
2467
|
+
options?: {
|
|
2468
|
+
[key: string]: unknown;
|
|
2469
|
+
};
|
|
2470
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<PointBalance[]>>;
|
|
2471
|
+
/**
|
|
2472
|
+
* Retrieves a paginated list of earn/burn/transfer transactions between start and end dates.
|
|
2473
|
+
*
|
|
2474
|
+
* @param params - The parameters for retrieving the point history.
|
|
2475
|
+
* @param params.start - Start of the range (inclusive), ISO-8601 with offset.
|
|
2476
|
+
* @param params.end - End of the range (inclusive), ISO-8601 with offset.
|
|
2477
|
+
* @param params.onlyVisible - (Optional) When true (default), only units marked visible for the app are considered.
|
|
2478
|
+
* @param params.skip - (Optional) Number of records to skip (offset pagination).
|
|
2479
|
+
* @param params.top - (Optional) Maximum number of records to return.
|
|
2480
|
+
* @param params.sortType - (Optional) Sort direction for Timestamp: Asc|Desc.
|
|
2481
|
+
* @param params.units - (Optional) Point unit codes to filter by.
|
|
2482
|
+
* @param params.boxIds - (Optional) Box (sub-bucket) identifiers to filter by.
|
|
2483
|
+
* @param params.references - (Optional) Filter by transaction reference.
|
|
2484
|
+
* @param params.transactionIds - (Optional) Filter by exact transaction IDs.
|
|
2485
|
+
* @param params.includeActions - (Optional) Only include transactions whose Action matches (e.g. Earn, Burn, Transfer).
|
|
2486
|
+
* @param params.excludeActions - (Optional) Exclude transactions whose Action matches.
|
|
2487
|
+
* @param params.includeTypes - (Optional) Only include transactions whose Type matches.
|
|
2488
|
+
* @param params.excludeTypes - (Optional) Exclude transactions whose Type matches.
|
|
2489
|
+
* @param params.options - (Optional) Additional options for the request.
|
|
2490
|
+
* @param requestOptions - (Optional) The request options.
|
|
2491
|
+
* @returns A promise that resolves to a service response containing an array of point history transactions.
|
|
2492
|
+
*/
|
|
2493
|
+
history(params: {
|
|
2494
|
+
start: string;
|
|
2495
|
+
end: string;
|
|
2496
|
+
onlyVisible?: boolean;
|
|
2497
|
+
skip?: number;
|
|
2498
|
+
top?: number;
|
|
2499
|
+
sortType?: 'Asc' | 'Desc';
|
|
2500
|
+
units?: string;
|
|
2501
|
+
boxIds?: string;
|
|
2502
|
+
references?: string;
|
|
2503
|
+
transactionIds?: string;
|
|
2504
|
+
includeActions?: string;
|
|
2505
|
+
excludeActions?: string;
|
|
2506
|
+
includeTypes?: string;
|
|
2507
|
+
excludeTypes?: string;
|
|
2508
|
+
options?: {
|
|
2509
|
+
[key: string]: unknown;
|
|
2510
|
+
};
|
|
2511
|
+
}, requestOptions?: RequestOptions): Promise<ServiceResponse<PointHistory[]>>;
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2405
2514
|
declare class ProfileApi extends BaseService {
|
|
2406
2515
|
constructor(client: AxiosInstance, baseUrl: string);
|
|
2407
2516
|
/**
|
|
@@ -3143,6 +3252,7 @@ declare class BzbsService {
|
|
|
3143
3252
|
notificationApi: NotificationApi;
|
|
3144
3253
|
placeApi: PlaceApi;
|
|
3145
3254
|
pointLogApi: PointLogApi;
|
|
3255
|
+
pointApi: PointApi;
|
|
3146
3256
|
profileApi: ProfileApi;
|
|
3147
3257
|
registerApi: RegistrationApi;
|
|
3148
3258
|
addressApi: AddressApi;
|
|
@@ -3156,4 +3266,4 @@ declare class BzbsService {
|
|
|
3156
3266
|
setLineUrl(lineUrl: string): this;
|
|
3157
3267
|
}
|
|
3158
3268
|
|
|
3159
|
-
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 CrossPlatformFile, 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 };
|
|
3269
|
+
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 CrossPlatformFile, 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, PointApi, type PointBalance, type PointHistory, 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 };
|
package/dist/index.js
CHANGED
|
@@ -73,6 +73,7 @@ __export(index_exports, {
|
|
|
73
73
|
LineApi: () => LineApi,
|
|
74
74
|
NotificationApi: () => NotificationApi,
|
|
75
75
|
PlaceApi: () => PlaceApi,
|
|
76
|
+
PointApi: () => PointApi,
|
|
76
77
|
PointLogApi: () => PointLogApi,
|
|
77
78
|
ProfileApi: () => ProfileApi,
|
|
78
79
|
RegistrationApi: () => RegistrationApi,
|
|
@@ -1063,6 +1064,7 @@ var CampaignApi = class extends BaseService {
|
|
|
1063
1064
|
* @param params.contactNumber - The contact number of the user.
|
|
1064
1065
|
* @param params.options - Additional options for the redemption.
|
|
1065
1066
|
* @param params.spPoints - Point Per Unit x Quantity (Donate only).
|
|
1067
|
+
* @param params.pointUnit - The point unit of the campaign (Point Service Only).
|
|
1066
1068
|
* @param requestOptions - The options for the HTTP request.
|
|
1067
1069
|
* @returns A promise that resolves to a service response containing the redeem response.
|
|
1068
1070
|
*/
|
|
@@ -1692,6 +1694,107 @@ var PointLogApi = class extends BaseService {
|
|
|
1692
1694
|
}
|
|
1693
1695
|
};
|
|
1694
1696
|
|
|
1697
|
+
// src/api/points/point-api.ts
|
|
1698
|
+
var PointApi = class extends BaseService {
|
|
1699
|
+
constructor(client, baseUrl) {
|
|
1700
|
+
super(client, baseUrl);
|
|
1701
|
+
}
|
|
1702
|
+
/**
|
|
1703
|
+
* Retrieves the current point balance for the authenticated user across the requested point units.
|
|
1704
|
+
*
|
|
1705
|
+
* @param params - The parameters for retrieving the point balance.
|
|
1706
|
+
* @param params.units - (Optional) Point unit codes (e.g. Point, Coin). Omit to use all units configured for the app.
|
|
1707
|
+
* @param params.boxIds - (Optional) Box (sub-bucket) identifiers to filter by.
|
|
1708
|
+
* @param params.onlyVisible - (Optional) When true (default), only units marked visible for the app are considered.
|
|
1709
|
+
* @param params.options - (Optional) Additional options for the request.
|
|
1710
|
+
* @param requestOptions - (Optional) The request options.
|
|
1711
|
+
* @returns A promise that resolves to a service response containing an array of point balances.
|
|
1712
|
+
*/
|
|
1713
|
+
balance(params, requestOptions) {
|
|
1714
|
+
return __async(this, null, function* () {
|
|
1715
|
+
return yield this.get(
|
|
1716
|
+
"point/balance",
|
|
1717
|
+
__spreadValues({
|
|
1718
|
+
units: params == null ? void 0 : params.units,
|
|
1719
|
+
boxIds: params == null ? void 0 : params.boxIds,
|
|
1720
|
+
onlyVisible: params == null ? void 0 : params.onlyVisible
|
|
1721
|
+
}, params == null ? void 0 : params.options),
|
|
1722
|
+
requestOptions
|
|
1723
|
+
);
|
|
1724
|
+
});
|
|
1725
|
+
}
|
|
1726
|
+
/**
|
|
1727
|
+
* Retrieves the point balance with Currents and Expires breakdowns keyed by date.
|
|
1728
|
+
*
|
|
1729
|
+
* @param params - The parameters for retrieving the point detail.
|
|
1730
|
+
* @param params.units - (Optional) Point unit codes (e.g. Point, Coin). Omit to use all units configured for the app.
|
|
1731
|
+
* @param params.boxIds - (Optional) Box (sub-bucket) identifiers to filter by.
|
|
1732
|
+
* @param params.onlyVisible - (Optional) When true (default), only units marked visible for the app are considered.
|
|
1733
|
+
* @param params.options - (Optional) Additional options for the request.
|
|
1734
|
+
* @param requestOptions - (Optional) The request options.
|
|
1735
|
+
* @returns A promise that resolves to a service response containing an array of point balances with breakdowns.
|
|
1736
|
+
*/
|
|
1737
|
+
detail(params, requestOptions) {
|
|
1738
|
+
return __async(this, null, function* () {
|
|
1739
|
+
return yield this.get(
|
|
1740
|
+
"point/detail",
|
|
1741
|
+
__spreadValues({
|
|
1742
|
+
units: params == null ? void 0 : params.units,
|
|
1743
|
+
boxIds: params == null ? void 0 : params.boxIds,
|
|
1744
|
+
onlyVisible: params == null ? void 0 : params.onlyVisible
|
|
1745
|
+
}, params == null ? void 0 : params.options),
|
|
1746
|
+
requestOptions
|
|
1747
|
+
);
|
|
1748
|
+
});
|
|
1749
|
+
}
|
|
1750
|
+
/**
|
|
1751
|
+
* Retrieves a paginated list of earn/burn/transfer transactions between start and end dates.
|
|
1752
|
+
*
|
|
1753
|
+
* @param params - The parameters for retrieving the point history.
|
|
1754
|
+
* @param params.start - Start of the range (inclusive), ISO-8601 with offset.
|
|
1755
|
+
* @param params.end - End of the range (inclusive), ISO-8601 with offset.
|
|
1756
|
+
* @param params.onlyVisible - (Optional) When true (default), only units marked visible for the app are considered.
|
|
1757
|
+
* @param params.skip - (Optional) Number of records to skip (offset pagination).
|
|
1758
|
+
* @param params.top - (Optional) Maximum number of records to return.
|
|
1759
|
+
* @param params.sortType - (Optional) Sort direction for Timestamp: Asc|Desc.
|
|
1760
|
+
* @param params.units - (Optional) Point unit codes to filter by.
|
|
1761
|
+
* @param params.boxIds - (Optional) Box (sub-bucket) identifiers to filter by.
|
|
1762
|
+
* @param params.references - (Optional) Filter by transaction reference.
|
|
1763
|
+
* @param params.transactionIds - (Optional) Filter by exact transaction IDs.
|
|
1764
|
+
* @param params.includeActions - (Optional) Only include transactions whose Action matches (e.g. Earn, Burn, Transfer).
|
|
1765
|
+
* @param params.excludeActions - (Optional) Exclude transactions whose Action matches.
|
|
1766
|
+
* @param params.includeTypes - (Optional) Only include transactions whose Type matches.
|
|
1767
|
+
* @param params.excludeTypes - (Optional) Exclude transactions whose Type matches.
|
|
1768
|
+
* @param params.options - (Optional) Additional options for the request.
|
|
1769
|
+
* @param requestOptions - (Optional) The request options.
|
|
1770
|
+
* @returns A promise that resolves to a service response containing an array of point history transactions.
|
|
1771
|
+
*/
|
|
1772
|
+
history(params, requestOptions) {
|
|
1773
|
+
return __async(this, null, function* () {
|
|
1774
|
+
return yield this.get(
|
|
1775
|
+
"point/history",
|
|
1776
|
+
__spreadValues({
|
|
1777
|
+
start: params.start,
|
|
1778
|
+
end: params.end,
|
|
1779
|
+
onlyVisible: params.onlyVisible,
|
|
1780
|
+
skip: params.skip,
|
|
1781
|
+
top: params.top,
|
|
1782
|
+
sortType: params.sortType,
|
|
1783
|
+
units: params.units,
|
|
1784
|
+
boxIds: params.boxIds,
|
|
1785
|
+
references: params.references,
|
|
1786
|
+
transactionIds: params.transactionIds,
|
|
1787
|
+
includeActions: params.includeActions,
|
|
1788
|
+
excludeActions: params.excludeActions,
|
|
1789
|
+
includeTypes: params.includeTypes,
|
|
1790
|
+
excludeTypes: params.excludeTypes
|
|
1791
|
+
}, params.options),
|
|
1792
|
+
requestOptions
|
|
1793
|
+
);
|
|
1794
|
+
});
|
|
1795
|
+
}
|
|
1796
|
+
};
|
|
1797
|
+
|
|
1695
1798
|
// src/api/profile/profile-api.ts
|
|
1696
1799
|
var ProfileApi = class extends BaseService {
|
|
1697
1800
|
constructor(client, baseUrl) {
|
|
@@ -2651,6 +2754,7 @@ var BzbsService = class {
|
|
|
2651
2754
|
this.notificationApi = new NotificationApi(this.client, this.baseUrl);
|
|
2652
2755
|
this.placeApi = new PlaceApi(this.client, this.baseUrl);
|
|
2653
2756
|
this.pointLogApi = new PointLogApi(this.client, this.baseUrl);
|
|
2757
|
+
this.pointApi = new PointApi(this.client, this.baseUrl);
|
|
2654
2758
|
this.profileApi = new ProfileApi(this.client, this.baseUrl);
|
|
2655
2759
|
this.registerApi = new RegistrationApi(this.client, this.baseUrl);
|
|
2656
2760
|
this.addressApi = new AddressApi(this.client, this.baseUrl);
|
|
@@ -2673,6 +2777,7 @@ var BzbsService = class {
|
|
|
2673
2777
|
this.notificationApi.setBaseUrl(baseUrl);
|
|
2674
2778
|
this.placeApi.setBaseUrl(baseUrl);
|
|
2675
2779
|
this.pointLogApi.setBaseUrl(baseUrl);
|
|
2780
|
+
this.pointApi.setBaseUrl(baseUrl);
|
|
2676
2781
|
this.profileApi.setBaseUrl(baseUrl);
|
|
2677
2782
|
this.registerApi.setBaseUrl(baseUrl);
|
|
2678
2783
|
this.addressApi.setBaseUrl(baseUrl);
|
|
@@ -2709,6 +2814,7 @@ var BzbsService = class {
|
|
|
2709
2814
|
LineApi,
|
|
2710
2815
|
NotificationApi,
|
|
2711
2816
|
PlaceApi,
|
|
2817
|
+
PointApi,
|
|
2712
2818
|
PointLogApi,
|
|
2713
2819
|
ProfileApi,
|
|
2714
2820
|
RegistrationApi,
|