@a-cube-io/ereceipts-js-sdk 2.2.0 → 2.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.cjs.js +9 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +9 -15
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.js +9 -15
- package/dist/index.native.js.map +1 -1
- package/package.json +1 -1
package/dist/index.native.js
CHANGED
|
@@ -2510,14 +2510,6 @@ class AuthStrategy {
|
|
|
2510
2510
|
if (userRole === 'SUPPLIER') {
|
|
2511
2511
|
return { mode: 'jwt', usePort444: false };
|
|
2512
2512
|
}
|
|
2513
|
-
if (url.includes('/download-data')) {
|
|
2514
|
-
if (platform === 'mobile') {
|
|
2515
|
-
return { mode: 'mtls', usePort444: true };
|
|
2516
|
-
}
|
|
2517
|
-
else {
|
|
2518
|
-
return { mode: 'jwt', usePort444: true };
|
|
2519
|
-
}
|
|
2520
|
-
}
|
|
2521
2513
|
if (userRole === 'CASHIER') {
|
|
2522
2514
|
if (!isReceiptEndpoint) {
|
|
2523
2515
|
return { mode: 'jwt', usePort444: false };
|
|
@@ -4763,7 +4755,7 @@ class PointOfSaleMapper {
|
|
|
4763
4755
|
serialNumber: output.serial_number,
|
|
4764
4756
|
status: output.status,
|
|
4765
4757
|
address: AddressMapper.fromApi(output.address),
|
|
4766
|
-
|
|
4758
|
+
journalStatus: output.journal_status,
|
|
4767
4759
|
};
|
|
4768
4760
|
}
|
|
4769
4761
|
static fromDetailedApiOutput(output) {
|
|
@@ -4783,6 +4775,7 @@ class PointOfSaleMapper {
|
|
|
4783
4775
|
}
|
|
4784
4776
|
}
|
|
4785
4777
|
|
|
4778
|
+
// this repository is used for MF1 endpoints
|
|
4786
4779
|
class PointOfSaleRepositoryImpl {
|
|
4787
4780
|
constructor(http) {
|
|
4788
4781
|
this.http = http;
|
|
@@ -4815,6 +4808,12 @@ class PointOfSaleRepositoryImpl {
|
|
|
4815
4808
|
const apiInput = PointOfSaleMapper.toOfflineApiInput(input);
|
|
4816
4809
|
await this.http.post(`/mf1/pems/${serialNumber}/communicate-offline`, apiInput);
|
|
4817
4810
|
}
|
|
4811
|
+
async downloadData(serialNumber) {
|
|
4812
|
+
const response = await this.http.get(`/mf1/pems/${serialNumber}/download-data`, {
|
|
4813
|
+
responseType: 'arraybuffer',
|
|
4814
|
+
});
|
|
4815
|
+
return response.data;
|
|
4816
|
+
}
|
|
4818
4817
|
}
|
|
4819
4818
|
|
|
4820
4819
|
class SupplierMapper {
|
|
@@ -4926,6 +4925,7 @@ class PemMapper {
|
|
|
4926
4925
|
}
|
|
4927
4926
|
}
|
|
4928
4927
|
|
|
4928
|
+
// this repository is used for MF2 endpoints
|
|
4929
4929
|
class PemRepositoryImpl {
|
|
4930
4930
|
constructor(http) {
|
|
4931
4931
|
this.http = http;
|
|
@@ -4947,12 +4947,6 @@ class PemRepositoryImpl {
|
|
|
4947
4947
|
const response = await this.http.get(`/mf2/pems/${serialNumber}/certificates`);
|
|
4948
4948
|
return PemMapper.fromCertificatesApiOutput(response.data);
|
|
4949
4949
|
}
|
|
4950
|
-
async downloadData(serialNumber) {
|
|
4951
|
-
const response = await this.http.get(`/mf1/pems/${serialNumber}/download-data`, {
|
|
4952
|
-
responseType: 'arraybuffer',
|
|
4953
|
-
});
|
|
4954
|
-
return response.data;
|
|
4955
|
-
}
|
|
4956
4950
|
}
|
|
4957
4951
|
|
|
4958
4952
|
class DailyReportMapper {
|