@aptos-scp/scp-component-store-selling-features-domain-model 1.0.9 → 1.0.11
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/lib/config/DiTypes.d.ts +0 -1
- package/lib/config/DiTypes.js +0 -1
- package/lib/config/inversify/inversify.app.config.d.ts +1 -9
- package/lib/config/inversify/inversify.app.config.js +0 -15
- package/lib/domain/model/fiscalDevice/FiscalDeviceStatusLine.js +3 -1
- package/lib/domain/model/index.d.ts +0 -1
- package/package.json +8 -8
- package/lib/domain/model/IAppLocalFeaturesStorage.d.ts +0 -78
- package/lib/domain/model/IAppLocalFeaturesStorage.js +0 -3
package/lib/config/DiTypes.d.ts
CHANGED
package/lib/config/DiTypes.js
CHANGED
|
@@ -4,7 +4,6 @@ const Symbol = require("es-symbol");
|
|
|
4
4
|
exports.DI_TYPES = {
|
|
5
5
|
ITransactionAccountingService: Symbol("ITransactionAccountingService"),
|
|
6
6
|
ITransactionReferenceFormatter: Symbol("ITransactionReferenceFormatter"),
|
|
7
|
-
IAppLocalFeaturesStorage: Symbol("IAppLocalFeaturesStorage"),
|
|
8
7
|
};
|
|
9
8
|
exports.default = exports.DI_TYPES;
|
|
10
9
|
//# sourceMappingURL=DiTypes.js.map
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import { Container, ContainerModule } from "inversify";
|
|
2
2
|
import { BindToCallback } from "./binding-helpers";
|
|
3
|
-
import {
|
|
4
|
-
/**
|
|
5
|
-
* Only call this from the composition root when the DI container bindings are being constructed
|
|
6
|
-
*/
|
|
7
|
-
export declare function loadAppDomain(container: Container, external: IAppDomainExternalBindings): Promise<void>;
|
|
3
|
+
import { ITransactionReferenceFormatter } from "../../domain";
|
|
8
4
|
/**
|
|
9
5
|
* Only call this from the composition root when the DI container bindings are being constructed
|
|
10
6
|
*/
|
|
11
7
|
export declare function loadAppDomainAfterCreateAuth(container: Container, external: IAppDomainAfterCreateAuthExternalBindings): Promise<void>;
|
|
12
|
-
export interface IAppDomainExternalBindings {
|
|
13
|
-
IAppLocalFeaturesStorage: BindToCallback<IAppLocalFeaturesStorage>;
|
|
14
|
-
}
|
|
15
8
|
export interface IAppDomainAfterCreateAuthExternalBindings {
|
|
16
9
|
ITransactionReferenceFormatter: BindToCallback<ITransactionReferenceFormatter>;
|
|
17
10
|
}
|
|
18
|
-
export declare function createAppDomainContainerModule(external: IAppDomainExternalBindings): ContainerModule;
|
|
19
11
|
export declare function createDomainAfterCreateAuthContainerModule(external: IAppDomainAfterCreateAuthExternalBindings): ContainerModule;
|
|
@@ -12,15 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
const inversify_1 = require("inversify");
|
|
13
13
|
const binding_helpers_1 = require("./binding-helpers");
|
|
14
14
|
const DiTypes_1 = require("../DiTypes");
|
|
15
|
-
/**
|
|
16
|
-
* Only call this from the composition root when the DI container bindings are being constructed
|
|
17
|
-
*/
|
|
18
|
-
function loadAppDomain(container, external) {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
container.load(createAppDomainContainerModule(external));
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
exports.loadAppDomain = loadAppDomain;
|
|
24
15
|
/**
|
|
25
16
|
* Only call this from the composition root when the DI container bindings are being constructed
|
|
26
17
|
*/
|
|
@@ -30,12 +21,6 @@ function loadAppDomainAfterCreateAuth(container, external) {
|
|
|
30
21
|
});
|
|
31
22
|
}
|
|
32
23
|
exports.loadAppDomainAfterCreateAuth = loadAppDomainAfterCreateAuth;
|
|
33
|
-
function createAppDomainContainerModule(external) {
|
|
34
|
-
return new inversify_1.ContainerModule((bind) => {
|
|
35
|
-
binding_helpers_1.bindExternal(bind, DiTypes_1.DI_TYPES.IAppLocalFeaturesStorage, external.IAppLocalFeaturesStorage);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
exports.createAppDomainContainerModule = createAppDomainContainerModule;
|
|
39
24
|
function createDomainAfterCreateAuthContainerModule(external) {
|
|
40
25
|
return new inversify_1.ContainerModule((bind) => {
|
|
41
26
|
binding_helpers_1.bindExternal(bind, DiTypes_1.DI_TYPES.ITransactionReferenceFormatter, external.ITransactionReferenceFormatter);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const scp_types_commerce_devices_1 = require("@aptos-scp/scp-types-commerce-devices");
|
|
3
4
|
const BaseTransactionLine_1 = require("../BaseTransactionLine");
|
|
4
5
|
const Constants_1 = require("../Constants");
|
|
5
6
|
exports.FISCAL_DEVICE_STATUS_LINE_TYPE = "FiscalDeviceStatus";
|
|
@@ -33,7 +34,8 @@ class FiscalDeviceStatusLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
33
34
|
errorDescription: undefined,
|
|
34
35
|
};
|
|
35
36
|
fiscalDeviceActivityResult.successful = (_a = collectedData.get(Constants_1.CollectedDataKey.FiscalDeviceActivitySuccessful), (_a !== null && _a !== void 0 ? _a : false));
|
|
36
|
-
if (!fiscalDeviceActivityResult.successful
|
|
37
|
+
if (!fiscalDeviceActivityResult.successful ||
|
|
38
|
+
collectedData.get(Constants_1.CollectedDataKey.FiscalDeviceErrorCode) === scp_types_commerce_devices_1.FiscalResponseCode.Warning) {
|
|
37
39
|
fiscalDeviceActivityResult.errorCode = collectedData.get(Constants_1.CollectedDataKey.FiscalDeviceErrorCode);
|
|
38
40
|
fiscalDeviceActivityResult.errorDescription = collectedData.get(Constants_1.CollectedDataKey.FiscalDeviceErrorDescription);
|
|
39
41
|
}
|
|
@@ -99,7 +99,6 @@ export * from "./PrepaidTender";
|
|
|
99
99
|
export * from "./ICreateEinvoiceLine";
|
|
100
100
|
export * from "./MunicipalFiscalCode";
|
|
101
101
|
export * from "./sendsale/";
|
|
102
|
-
export * from "./IAppLocalFeaturesStorage";
|
|
103
102
|
export * from "./geoLocation";
|
|
104
103
|
export * from "./CreateEinvoiceLine";
|
|
105
104
|
export * from "./taxRecord/";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptos-scp/scp-component-store-selling-features-domain-model",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "This component library provides the common components to handle the coordination of processing the business events from the UI.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@aptos-scp/scp-component-pricing": "^7.53.1",
|
|
43
43
|
"@aptos-scp/scp-component-store-items": "^1.19.0",
|
|
44
|
-
"@aptos-scp/scp-component-taxation": "^5.
|
|
44
|
+
"@aptos-scp/scp-component-taxation": "^5.25.0",
|
|
45
45
|
"@aptos-scp/scp-component-user": "^1.4.0",
|
|
46
46
|
"@aptos-scp/scp-types-client-registration": "^1.4.0",
|
|
47
47
|
"@aptos-scp/scp-types-customer": "^3.7.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@aptos-scp/scp-types-inventory": "^2.0.0",
|
|
50
50
|
"@aptos-scp/scp-types-loyalty-memberships": "^2.3.0",
|
|
51
51
|
"@aptos-scp/scp-types-orders": "^4.11.0",
|
|
52
|
-
"@aptos-scp/scp-types-ss-transaction-history": "^1.0
|
|
52
|
+
"@aptos-scp/scp-types-ss-transaction-history": "^1.6.0",
|
|
53
53
|
"big.js": "^6.1.1",
|
|
54
54
|
"crc-32": "^1.2.0",
|
|
55
55
|
"fast-json-patch": "^3.0.0-1",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"@aptos-scp/scp-component-logging": "^2.1.16",
|
|
68
68
|
"@aptos-scp/scp-component-store-selling-core": "^18.8.2",
|
|
69
69
|
"@aptos-scp/scp-types-core-config": "^2.2.1",
|
|
70
|
-
"@aptos-scp/scp-types-commerce-devices": "^3.
|
|
71
|
-
"@aptos-scp/scp-types-commerce-transaction": "^1.
|
|
70
|
+
"@aptos-scp/scp-types-commerce-devices": "^3.1.0",
|
|
71
|
+
"@aptos-scp/scp-types-commerce-transaction": "^1.59.0",
|
|
72
72
|
"inversify": "^5.0.1"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
"@aptos-scp/scp-component-logging": "^2.1.16",
|
|
79
79
|
"@aptos-scp/scp-component-rn-circuit-breaker": "^1.0.15",
|
|
80
80
|
"@aptos-scp/scp-component-store-selling-core": "^18.8.2",
|
|
81
|
-
"@aptos-scp/scp-types-commerce-devices": "^3.
|
|
82
|
-
"@aptos-scp/scp-types-commerce-transaction": "^1.
|
|
81
|
+
"@aptos-scp/scp-types-commerce-devices": "^3.1.0",
|
|
82
|
+
"@aptos-scp/scp-types-commerce-transaction": "^1.59.0",
|
|
83
83
|
"@aptos-scp/scp-types-core": "^1.0.5",
|
|
84
84
|
"@aptos-scp/scp-types-core-config": "^2.2.1",
|
|
85
85
|
"@aptos-scp/scp-types-currency-conversion": "^1.2.0",
|
|
86
|
-
"@aptos-scp/scp-types-fiscal-transaction": "^1.4.
|
|
86
|
+
"@aptos-scp/scp-types-fiscal-transaction": "^1.4.3",
|
|
87
87
|
"@aptos-scp/scp-types-pricing": "^4.23.0",
|
|
88
88
|
"@aptos-scp/scp-types-store-items": "^1.23.0",
|
|
89
89
|
"@aptos-scp/scp-types-terminal-settings": "^1.3.0",
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { UserAttribute } from "@aptos-scp/scp-component-user";
|
|
2
|
-
import { PublicPrivateKeyPair } from "@aptos-scp/scp-types-client-registration";
|
|
3
|
-
import { ReceiptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
4
|
-
import { ExchangeRate } from "@aptos-scp/scp-types-currency-conversion";
|
|
5
|
-
import { CustomerAlternateKeyType, AttributeGroupDefinitionList } from "@aptos-scp/scp-types-customer";
|
|
6
|
-
import { MembershipStatus } from "@aptos-scp/scp-types-loyalty-memberships";
|
|
7
|
-
import { LastValueDetails, LastValueType } from "@aptos-scp/scp-types-transaction";
|
|
8
|
-
import { DigitalSignatureCategory, ICustomerAttributeOptions, ILoyaltyRewardReason, ITypesAttributeOptions, ReceiptCategory, TaxCustomer } from "./";
|
|
9
|
-
import { ILastTransactionStatus } from "./ILastTransactionStatus";
|
|
10
|
-
import { ISequences } from "./ISequence";
|
|
11
|
-
import { ITransactionMetadataPersistanceObject } from "./ITransactionMetadataPersistanceObject";
|
|
12
|
-
import { IStoreLoyaltyPlans } from "./LoyaltyMembership";
|
|
13
|
-
export interface IFiscalSignatureStorageObject {
|
|
14
|
-
signature: string;
|
|
15
|
-
signatureKeyId: string;
|
|
16
|
-
signatureCategory: DigitalSignatureCategory;
|
|
17
|
-
endDateTime?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface IFiscalPrinterAppReloadData {
|
|
20
|
-
reload: boolean;
|
|
21
|
-
printerId?: string;
|
|
22
|
-
receiptCategory?: ReceiptCategory;
|
|
23
|
-
taxCastomer?: TaxCustomer;
|
|
24
|
-
receiptType?: ReceiptType;
|
|
25
|
-
storedDate?: Date;
|
|
26
|
-
printerSerialNumber?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface IAppLocalFeaturesStorage {
|
|
29
|
-
storeMetaData(metadataObject: object): Promise<void>;
|
|
30
|
-
loadMetaData(): Promise<ITransactionMetadataPersistanceObject>;
|
|
31
|
-
deleteMetaData(): Promise<void>;
|
|
32
|
-
storeCustomerGenders(customerGenderObject: ICustomerAttributeOptions[]): Promise<void>;
|
|
33
|
-
loadCustomerGenders(): Promise<ICustomerAttributeOptions[]>;
|
|
34
|
-
storeCustomerTitles(customerTitleObjects: ICustomerAttributeOptions[]): Promise<void>;
|
|
35
|
-
loadCustomerTitles(): Promise<ICustomerAttributeOptions[]>;
|
|
36
|
-
storeCustomerLanguages(customerLanguageObjects: ICustomerAttributeOptions[]): Promise<void>;
|
|
37
|
-
loadCustomerLanguages(): Promise<ICustomerAttributeOptions[]>;
|
|
38
|
-
storeCustomerCountries(customerCountryObjects: ICustomerAttributeOptions[]): Promise<void>;
|
|
39
|
-
loadCustomerCountries(): Promise<ICustomerAttributeOptions[]>;
|
|
40
|
-
storeCustomerAddressTypes(addressTypeObjects: ITypesAttributeOptions[]): Promise<void>;
|
|
41
|
-
loadCustomerAddressTypes(): Promise<ITypesAttributeOptions[]>;
|
|
42
|
-
storeCustomerEmailTypes(emailTypesObjects: ITypesAttributeOptions[]): Promise<void>;
|
|
43
|
-
loadCustomerEmailTypes(): Promise<ITypesAttributeOptions[]>;
|
|
44
|
-
storeCustomerPhoneTypes(phoneTypesObjects: ITypesAttributeOptions[]): Promise<void>;
|
|
45
|
-
loadCustomerPhoneTypes(): Promise<ITypesAttributeOptions[]>;
|
|
46
|
-
storeBusinessDayDate(businessDayDate: string): Promise<void>;
|
|
47
|
-
loadBusinessDayDate(): Promise<string>;
|
|
48
|
-
loadInvoiceSequenceNumber(): Promise<ISequences | number>;
|
|
49
|
-
storeInvoiceSequenceNumber(sequences: ISequences): Promise<void>;
|
|
50
|
-
loadLastTransactionStatus(): Promise<ILastTransactionStatus>;
|
|
51
|
-
storeLastTransactionStatus(lastTransactionStatusJson: ILastTransactionStatus): Promise<void>;
|
|
52
|
-
storeUsers(user: UserAttribute[]): Promise<void>;
|
|
53
|
-
loadUsers(): Promise<UserAttribute[]>;
|
|
54
|
-
storeLoyaltyPlans(loyaltyPlans: IStoreLoyaltyPlans): Promise<void>;
|
|
55
|
-
loadLoyaltyPlans(): Promise<IStoreLoyaltyPlans>;
|
|
56
|
-
storeMembershipStatuses(membershipStatuses: MembershipStatus[]): Promise<void>;
|
|
57
|
-
loadMembershipStatuses(): Promise<MembershipStatus[]>;
|
|
58
|
-
storeRewardReasons(rewardReasons: ILoyaltyRewardReason[]): Promise<void>;
|
|
59
|
-
loadRewardReasons(): Promise<ILoyaltyRewardReason[]>;
|
|
60
|
-
storeLastPrintableTransactionStatus(lastPrintableTransactionStatusJson: ILastTransactionStatus): Promise<void>;
|
|
61
|
-
loadLastPrintableTransactionStatus(): Promise<ILastTransactionStatus>;
|
|
62
|
-
storeAttributeGroupDefinitions(attributeGroupDefList: AttributeGroupDefinitionList): Promise<void>;
|
|
63
|
-
loadAttributeGroupDefinitions(): Promise<AttributeGroupDefinitionList>;
|
|
64
|
-
storeAlternateKeyDefinitions(alternateKeyDefList: CustomerAlternateKeyType[]): Promise<void>;
|
|
65
|
-
loadAlternateKeyDefinitions(): Promise<CustomerAlternateKeyType[]>;
|
|
66
|
-
storeFiscalSignature(signatureObject: IFiscalSignatureStorageObject): Promise<void>;
|
|
67
|
-
loadFiscalSignature(category?: DigitalSignatureCategory): Promise<IFiscalSignatureStorageObject>;
|
|
68
|
-
storeFiscalSignatureKey(fiscalSignatureKey: PublicPrivateKeyPair): Promise<void>;
|
|
69
|
-
loadFiscalSignatureKey(): Promise<PublicPrivateKeyPair>;
|
|
70
|
-
storeTransactionLastValue(lastValue: LastValueDetails): Promise<void>;
|
|
71
|
-
loadTransactionLastValue(valueType: LastValueType): Promise<LastValueDetails>;
|
|
72
|
-
storeExchangeRates(exchangeRates: ExchangeRate[]): Promise<void>;
|
|
73
|
-
loadExchangeRates(): Promise<ExchangeRate[]>;
|
|
74
|
-
storeFiscalPrinterReloadData(fiscalPrinterAppReloadData: IFiscalPrinterAppReloadData): Promise<void>;
|
|
75
|
-
loadFiscalPrinterReloadData(): Promise<IFiscalPrinterAppReloadData>;
|
|
76
|
-
storePrinterInfoForPostVoid(fiscalPrinterAppReloadData: IFiscalPrinterAppReloadData): Promise<void>;
|
|
77
|
-
loadPrinterInfoForPostVoid(): Promise<IFiscalPrinterAppReloadData>;
|
|
78
|
-
}
|