@a-cube-io/ereceipts-js-sdk 2.2.2 → 2.2.4
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 +33 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +56 -3
- package/dist/index.esm.js +33 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.js +33 -0
- package/dist/index.native.js.map +1 -1
- package/package.json +1 -1
package/dist/index.native.js
CHANGED
|
@@ -4360,6 +4360,7 @@ class ReceiptMapper {
|
|
|
4360
4360
|
isReturnable: output.is_returnable,
|
|
4361
4361
|
isVoidable: output.is_voidable,
|
|
4362
4362
|
pdfUrl: output.pdf_url,
|
|
4363
|
+
status: output.status,
|
|
4363
4364
|
parentReceiptUuid: output.parent_receipt_uuid,
|
|
4364
4365
|
};
|
|
4365
4366
|
}
|
|
@@ -4785,6 +4786,34 @@ class PointOfSaleMapper {
|
|
|
4785
4786
|
end_at: input.endAt,
|
|
4786
4787
|
};
|
|
4787
4788
|
}
|
|
4789
|
+
static toEmergencyReportApiInput(input) {
|
|
4790
|
+
return {
|
|
4791
|
+
datetime: input.datetime,
|
|
4792
|
+
documents_count: input.documentsCount,
|
|
4793
|
+
cash_payment_amount: input.cashPaymentAmount,
|
|
4794
|
+
electronic_payment_amount: input.electronicPaymentAmount,
|
|
4795
|
+
ticket_restaurant_payment_amount: input.ticketRestaurantPaymentAmount,
|
|
4796
|
+
ticket_restaurant_quantity: input.ticketRestaurantQuantity,
|
|
4797
|
+
entries: input.entries.map((entry) => this.toDailyReportEntryApiInput(entry)),
|
|
4798
|
+
discount: input.discount,
|
|
4799
|
+
};
|
|
4800
|
+
}
|
|
4801
|
+
static toDailyReportEntryApiInput(input) {
|
|
4802
|
+
return {
|
|
4803
|
+
vat_rate_code: input.vatRateCode,
|
|
4804
|
+
vat_amount: input.vatAmount,
|
|
4805
|
+
simplified_vat_allocation: input.simplifiedVatAllocation,
|
|
4806
|
+
partial_amount: input.partialAmount,
|
|
4807
|
+
total_returned_amount: input.totalReturnedAmount,
|
|
4808
|
+
total_voided_amount: input.totalVoidedAmount,
|
|
4809
|
+
total_prepaid_or_voucher_amount: input.totalPrepaidOrVoucherAmount,
|
|
4810
|
+
total_uncollected_services: input.totalUncollectedServices,
|
|
4811
|
+
total_uncollected_invoiced: input.totalUncollectedInvoiced,
|
|
4812
|
+
total_uncollected_dcr_to_ssn: input.totalUncollectedDcrToSsn,
|
|
4813
|
+
total_uncollected_complimentary: input.totalUncollectedComplimentary,
|
|
4814
|
+
ateco_code: input.atecoCode,
|
|
4815
|
+
};
|
|
4816
|
+
}
|
|
4788
4817
|
}
|
|
4789
4818
|
|
|
4790
4819
|
// this repository is used for MF1 endpoints
|
|
@@ -4817,6 +4846,10 @@ class PointOfSaleRepositoryImpl {
|
|
|
4817
4846
|
const apiInput = PointOfSaleMapper.toInactivityApiInput(input);
|
|
4818
4847
|
await this.http.post(`/mf1/pems/${serialNumber}/inactivity-period`, apiInput);
|
|
4819
4848
|
}
|
|
4849
|
+
async uploadEmergencyReport(serialNumber, input) {
|
|
4850
|
+
const apiInput = PointOfSaleMapper.toEmergencyReportApiInput(input);
|
|
4851
|
+
await this.http.post(`/mf1/pems/${serialNumber}/emergency-report`, apiInput);
|
|
4852
|
+
}
|
|
4820
4853
|
async communicateOffline(serialNumber, input) {
|
|
4821
4854
|
const apiInput = PointOfSaleMapper.toOfflineApiInput(input);
|
|
4822
4855
|
await this.http.post(`/mf1/pems/${serialNumber}/communicate-offline`, apiInput);
|