@viu/emporix-sdk 2.12.0 → 2.13.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/CHANGELOG.md +8 -0
- package/dist/{chunk-KVBCTXVH.js → chunk-WW3H7VJ5.js} +10 -6
- package/dist/chunk-WW3H7VJ5.js.map +1 -0
- package/dist/index.cjs +31 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -13
- package/dist/index.js.map +1 -1
- package/dist/orders.cjs +8 -4
- package/dist/orders.cjs.map +1 -1
- package/dist/orders.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-KVBCTXVH.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import { LocationsService } from './chunk-LGLFJL3S.js';
|
|
|
2
2
|
export { LocationsService } from './chunk-LGLFJL3S.js';
|
|
3
3
|
import { MediaService } from './chunk-WSXRUYBE.js';
|
|
4
4
|
export { MediaService } from './chunk-WSXRUYBE.js';
|
|
5
|
-
import { OrdersService, SalesOrdersService } from './chunk-
|
|
6
|
-
export { OrdersService, SalesOrdersService } from './chunk-
|
|
5
|
+
import { OrdersService, SalesOrdersService } from './chunk-WW3H7VJ5.js';
|
|
6
|
+
export { OrdersService, SalesOrdersService } from './chunk-WW3H7VJ5.js';
|
|
7
7
|
import { PaymentGatewayService } from './chunk-HKPZI7Y5.js';
|
|
8
8
|
export { PaymentGatewayService } from './chunk-HKPZI7Y5.js';
|
|
9
9
|
import { PriceService } from './chunk-BK25FDTH.js';
|
|
@@ -2022,19 +2022,31 @@ var RewardPointsService = class {
|
|
|
2022
2022
|
// --- Storefront: the signed-in customer's own points (customer token required) ---
|
|
2023
2023
|
/** The signed-in customer's reward-points balance. Requires a customer `auth`. */
|
|
2024
2024
|
async getMyPoints(auth2) {
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2025
|
+
try {
|
|
2026
|
+
return await this.ctx.http.request({
|
|
2027
|
+
method: "GET",
|
|
2028
|
+
path: `${this.base()}/public/customer`,
|
|
2029
|
+
auth: auth2
|
|
2030
|
+
});
|
|
2031
|
+
} catch (err) {
|
|
2032
|
+
if (err instanceof EmporixNotFoundError) return 0;
|
|
2033
|
+
throw err;
|
|
2034
|
+
}
|
|
2030
2035
|
}
|
|
2031
2036
|
/** The signed-in customer's reward-points summary. Requires a customer `auth`. */
|
|
2032
2037
|
async getMySummary(auth2) {
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
+
try {
|
|
2039
|
+
return await this.ctx.http.request({
|
|
2040
|
+
method: "GET",
|
|
2041
|
+
path: `${this.base()}/public/customer/summary`,
|
|
2042
|
+
auth: auth2
|
|
2043
|
+
});
|
|
2044
|
+
} catch (err) {
|
|
2045
|
+
if (err instanceof EmporixNotFoundError) {
|
|
2046
|
+
return { activePoints: 0, summary: { addedPointsList: [] } };
|
|
2047
|
+
}
|
|
2048
|
+
throw err;
|
|
2049
|
+
}
|
|
2038
2050
|
}
|
|
2039
2051
|
/**
|
|
2040
2052
|
* Redeem the signed-in customer's points for a coupon code. Requires a
|
|
@@ -3468,7 +3480,7 @@ var ApprovalService = class {
|
|
|
3468
3480
|
};
|
|
3469
3481
|
|
|
3470
3482
|
// package.json
|
|
3471
|
-
var version = "2.
|
|
3483
|
+
var version = "2.13.1";
|
|
3472
3484
|
|
|
3473
3485
|
// src/version.ts
|
|
3474
3486
|
var SDK_VERSION = version;
|