@a-cube-io/ereceipts-js-sdk 2.1.1 → 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 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.esm.js +9 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.js +9 -1
- package/dist/index.native.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -430,7 +430,7 @@ interface PointOfSale {
|
|
|
430
430
|
serialNumber: string;
|
|
431
431
|
status: PEMStatus;
|
|
432
432
|
address: Address;
|
|
433
|
-
|
|
433
|
+
journalStatus: string;
|
|
434
434
|
}
|
|
435
435
|
interface PointOfSaleDetailed extends PointOfSale {
|
|
436
436
|
registrationKey?: string;
|
|
@@ -485,6 +485,7 @@ interface IPointOfSaleRepository {
|
|
|
485
485
|
closeJournal(serialNumber: string): Promise<void>;
|
|
486
486
|
createInactivity(serialNumber: string): Promise<void>;
|
|
487
487
|
communicateOffline(serialNumber: string, input: PEMStatusOfflineRequest): Promise<void>;
|
|
488
|
+
downloadData(serialNumber: string): Promise<ArrayBuffer>;
|
|
488
489
|
}
|
|
489
490
|
|
|
490
491
|
type GoodOrService = 'goods' | 'service';
|
|
@@ -1478,7 +1479,7 @@ interface PointOfSaleApiOutput {
|
|
|
1478
1479
|
serial_number: string;
|
|
1479
1480
|
status: PEMStatus;
|
|
1480
1481
|
address: AddressApiOutput;
|
|
1481
|
-
|
|
1482
|
+
journal_status: string;
|
|
1482
1483
|
}
|
|
1483
1484
|
interface PointOfSaleDetailedApiOutput extends PointOfSaleApiOutput {
|
|
1484
1485
|
registration_key?: string;
|
package/dist/index.esm.js
CHANGED
|
@@ -4755,7 +4755,7 @@ class PointOfSaleMapper {
|
|
|
4755
4755
|
serialNumber: output.serial_number,
|
|
4756
4756
|
status: output.status,
|
|
4757
4757
|
address: AddressMapper.fromApi(output.address),
|
|
4758
|
-
|
|
4758
|
+
journalStatus: output.journal_status,
|
|
4759
4759
|
};
|
|
4760
4760
|
}
|
|
4761
4761
|
static fromDetailedApiOutput(output) {
|
|
@@ -4775,6 +4775,7 @@ class PointOfSaleMapper {
|
|
|
4775
4775
|
}
|
|
4776
4776
|
}
|
|
4777
4777
|
|
|
4778
|
+
// this repository is used for MF1 endpoints
|
|
4778
4779
|
class PointOfSaleRepositoryImpl {
|
|
4779
4780
|
constructor(http) {
|
|
4780
4781
|
this.http = http;
|
|
@@ -4807,6 +4808,12 @@ class PointOfSaleRepositoryImpl {
|
|
|
4807
4808
|
const apiInput = PointOfSaleMapper.toOfflineApiInput(input);
|
|
4808
4809
|
await this.http.post(`/mf1/pems/${serialNumber}/communicate-offline`, apiInput);
|
|
4809
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
|
+
}
|
|
4810
4817
|
}
|
|
4811
4818
|
|
|
4812
4819
|
class SupplierMapper {
|
|
@@ -4918,6 +4925,7 @@ class PemMapper {
|
|
|
4918
4925
|
}
|
|
4919
4926
|
}
|
|
4920
4927
|
|
|
4928
|
+
// this repository is used for MF2 endpoints
|
|
4921
4929
|
class PemRepositoryImpl {
|
|
4922
4930
|
constructor(http) {
|
|
4923
4931
|
this.http = http;
|