@a-cube-io/ereceipts-js-sdk 2.2.1 → 2.2.2
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.cjs.js +15 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.esm.js +15 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.js +15 -2
- package/dist/index.native.js.map +1 -1
- package/package.json +1 -1
package/dist/index.native.js
CHANGED
|
@@ -2511,6 +2511,12 @@ class AuthStrategy {
|
|
|
2511
2511
|
return { mode: 'jwt', usePort444: false };
|
|
2512
2512
|
}
|
|
2513
2513
|
if (userRole === 'CASHIER') {
|
|
2514
|
+
if (url.includes('/inactivity-period')) {
|
|
2515
|
+
if (platform === 'mobile') {
|
|
2516
|
+
return { mode: 'mtls', usePort444: true };
|
|
2517
|
+
}
|
|
2518
|
+
return { mode: 'jwt', usePort444: true };
|
|
2519
|
+
}
|
|
2514
2520
|
if (!isReceiptEndpoint) {
|
|
2515
2521
|
return { mode: 'jwt', usePort444: false };
|
|
2516
2522
|
}
|
|
@@ -4773,6 +4779,12 @@ class PointOfSaleMapper {
|
|
|
4773
4779
|
pages: response.pages,
|
|
4774
4780
|
};
|
|
4775
4781
|
}
|
|
4782
|
+
static toInactivityApiInput(input) {
|
|
4783
|
+
return {
|
|
4784
|
+
start_at: input.startAt,
|
|
4785
|
+
end_at: input.endAt,
|
|
4786
|
+
};
|
|
4787
|
+
}
|
|
4776
4788
|
}
|
|
4777
4789
|
|
|
4778
4790
|
// this repository is used for MF1 endpoints
|
|
@@ -4801,8 +4813,9 @@ class PointOfSaleRepositoryImpl {
|
|
|
4801
4813
|
async closeJournal(serialNumber) {
|
|
4802
4814
|
await this.http.post(`/mf1/pems/${serialNumber}/close`);
|
|
4803
4815
|
}
|
|
4804
|
-
async
|
|
4805
|
-
|
|
4816
|
+
async createInactivityPeriod(serialNumber, input) {
|
|
4817
|
+
const apiInput = PointOfSaleMapper.toInactivityApiInput(input);
|
|
4818
|
+
await this.http.post(`/mf1/pems/${serialNumber}/inactivity-period`, apiInput);
|
|
4806
4819
|
}
|
|
4807
4820
|
async communicateOffline(serialNumber, input) {
|
|
4808
4821
|
const apiInput = PointOfSaleMapper.toOfflineApiInput(input);
|