@a-cube-io/ereceipts-js-sdk 2.2.2 → 2.2.3
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 +32 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +52 -1
- package/dist/index.esm.js +32 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.js +32 -0
- package/dist/index.native.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -4808,6 +4808,34 @@ class PointOfSaleMapper {
|
|
|
4808
4808
|
end_at: input.endAt,
|
|
4809
4809
|
};
|
|
4810
4810
|
}
|
|
4811
|
+
static toEmergencyReportApiInput(input) {
|
|
4812
|
+
return {
|
|
4813
|
+
datetime: input.datetime,
|
|
4814
|
+
documents_count: input.documentsCount,
|
|
4815
|
+
cash_payment_amount: input.cashPaymentAmount,
|
|
4816
|
+
electronic_payment_amount: input.electronicPaymentAmount,
|
|
4817
|
+
ticket_restaurant_payment_amount: input.ticketRestaurantPaymentAmount,
|
|
4818
|
+
ticket_restaurant_quantity: input.ticketRestaurantQuantity,
|
|
4819
|
+
entries: input.entries.map((entry) => this.toDailyReportEntryApiInput(entry)),
|
|
4820
|
+
discount: input.discount,
|
|
4821
|
+
};
|
|
4822
|
+
}
|
|
4823
|
+
static toDailyReportEntryApiInput(input) {
|
|
4824
|
+
return {
|
|
4825
|
+
vat_rate_code: input.vatRateCode,
|
|
4826
|
+
vat_amount: input.vatAmount,
|
|
4827
|
+
simplified_vat_allocation: input.simplifiedVatAllocation,
|
|
4828
|
+
partial_amount: input.partialAmount,
|
|
4829
|
+
total_returned_amount: input.totalReturnedAmount,
|
|
4830
|
+
total_voided_amount: input.totalVoidedAmount,
|
|
4831
|
+
total_prepaid_or_voucher_amount: input.totalPrepaidOrVoucherAmount,
|
|
4832
|
+
total_uncollected_services: input.totalUncollectedServices,
|
|
4833
|
+
total_uncollected_invoiced: input.totalUncollectedInvoiced,
|
|
4834
|
+
total_uncollected_dcr_to_ssn: input.totalUncollectedDcrToSsn,
|
|
4835
|
+
total_uncollected_complimentary: input.totalUncollectedComplimentary,
|
|
4836
|
+
ateco_code: input.atecoCode,
|
|
4837
|
+
};
|
|
4838
|
+
}
|
|
4811
4839
|
}
|
|
4812
4840
|
|
|
4813
4841
|
// this repository is used for MF1 endpoints
|
|
@@ -4840,6 +4868,10 @@ class PointOfSaleRepositoryImpl {
|
|
|
4840
4868
|
const apiInput = PointOfSaleMapper.toInactivityApiInput(input);
|
|
4841
4869
|
await this.http.post(`/mf1/pems/${serialNumber}/inactivity-period`, apiInput);
|
|
4842
4870
|
}
|
|
4871
|
+
async uploadEmergencyReport(serialNumber, input) {
|
|
4872
|
+
const apiInput = PointOfSaleMapper.toEmergencyReportApiInput(input);
|
|
4873
|
+
await this.http.post(`/mf1/pems/${serialNumber}/emergency-report`, apiInput);
|
|
4874
|
+
}
|
|
4843
4875
|
async communicateOffline(serialNumber, input) {
|
|
4844
4876
|
const apiInput = PointOfSaleMapper.toOfflineApiInput(input);
|
|
4845
4877
|
await this.http.post(`/mf1/pems/${serialNumber}/communicate-offline`, apiInput);
|