@shopfront/bridge 3.0.9 → 3.0.10
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/APIs/Database/index.d.mts +32 -0
- package/lib/APIs/Database/types/BaseKitchenOrderRepository.d.ts +3 -4
- package/lib/APIs/Database/types/BasePromotionRepository.d.ts +1 -2
- package/lib/APIs/Database/types/BaseSalesRepository.d.ts +3 -4
- package/lib/APIs/InternalMessages/InternalMessageSource.d.ts +1 -1
- package/lib/ApplicationEvents/ToShopfront.d.ts +1 -1
- package/lib/Events/InternalPageMessage.d.ts +1 -1
- package/lib/database.mjs +2 -0
- package/lib/database.mjs.map +1 -0
- package/lib/index.d.mts +1 -0
- package/lib/index.mjs.map +1 -1
- package/package.json +6 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type { LocalDatabaseBarcodeTemplate } from "./types/BaseBarcodeTemplateRepository.js";
|
|
2
|
+
export type { LocalDatabaseCategory, LocalDatabaseClassification } from "./types/BaseClassificationRepository.js";
|
|
3
|
+
export type { LocalDatabaseCustomerDisplay } from "./types/BaseCustomerDisplayRepository.js";
|
|
4
|
+
export type { LocalDatabaseCustomerGroup } from "./types/BaseCustomerGroupRepository.js";
|
|
5
|
+
export type { LocalDatabaseContact, LocalDatabaseCustomer } from "./types/BaseCustomerRepository.js";
|
|
6
|
+
export type { LocalDatabaseEnterprise } from "./types/BaseEnterpriseRepository.js";
|
|
7
|
+
export type { LocalDatabaseGiftCard } from "./types/BaseGiftCardRepository.js";
|
|
8
|
+
export type { KitchenOrder, KitchenOrderItem, KitchenOrderItemComponent, LocalKitchenOrder, } from "./types/BaseKitchenOrderRepository.js";
|
|
9
|
+
export type { KitchenDisplayFilterRules, KitchenDisplayRuleReady, LocalKitchenScreen, } from "./types/BaseKitchenScreenRepository.js";
|
|
10
|
+
export type { LocalDatabaseLockedResource } from "./types/BaseLockedResourceRepository.js";
|
|
11
|
+
export type { LocalDatabaseLoyalty, LoyaltyUnion } from "./types/BaseLoyaltyRepository.js";
|
|
12
|
+
export type { LocalDatabaseMovement } from "./types/BaseMovementRepository.js";
|
|
13
|
+
export type { LocalDatabaseOutlet } from "./types/BaseOutletRepository.js";
|
|
14
|
+
export type { LocalDatabasePaymentMethod, PaymentMethodTypeUnion } from "./types/BasePaymentMethodRepository.js";
|
|
15
|
+
export type { LocalDatabasePriceList, LocalDatabasePriceListFallback, LocalDatabasePriceListRule, LocalDatabasePriceListWithPricesRule, PriceListItemTypeUnion, PriceListRuleBaseUnion, PriceListRulePrice, PriceListRuleUnion, } from "./types/BasePriceListRepository.js";
|
|
16
|
+
export type { LocalDatabasePriceSet } from "./types/BasePriceSetRepository.js";
|
|
17
|
+
export type { LocalDatabaseComponent, LocalDatabaseCost, LocalDatabaseInventory, LocalDatabasePrice, LocalDatabaseProduct, LocalDatabaseLoyalty as LocalDatabaseProductLoyalty, ProductClassificationUnion, ProductSearchResultType, ProductStatusUnion, ProductTypeUnion, } from "./types/BaseProductRepository.js";
|
|
18
|
+
export type { LocalDatabasePromotionCategory } from "./types/BasePromotionCategoryRepository.js";
|
|
19
|
+
export type { LocalDatabaseCriteriaItem, LocalDatabaseCriteriaTypeUnion, LocalDatabasePromotion, LocalDatabasePromotionCriteria, } from "./types/BasePromotionRepository.js";
|
|
20
|
+
export type { LocalDatabaseReceipt, ReceiptPaddingType, ReceiptTypeUnion } from "./types/BaseReceiptRepository.js";
|
|
21
|
+
export type { LocalDatabaseRegister, ShouldPrintOptions } from "./types/BaseRegisterRepository.js";
|
|
22
|
+
export type { LocalDatabaseSaleKeys, SaleKeyActionType, SaleKeyActionUnion, SaleKeyType, } from "./types/BaseSalesKeyRepository.js";
|
|
23
|
+
export type { LocalDatabaseSale, LocalDatabaseSaleItem, LocalDatabaseSaleItemPromotion, LocalDatabaseSaleItemType, LocalDatabaseSaleItemTypeGiftCard, LocalDatabaseSaleItemTypeProduct, LocalDatabaseSaleItemTypeSurcharge, LocalDatabaseSalePayment, LocalDatabaseSalePaymentStatus, SaleAction, SaleActionType, SaleStatus, } from "./types/BaseSalesRepository.js";
|
|
24
|
+
export type { LocalDatabaseStocktakeAccumulated } from "./types/BaseStocktakeAccumulatedRepository.js";
|
|
25
|
+
export type { LocalDatabaseStocktake } from "./types/BaseStocktakeRepository.js";
|
|
26
|
+
export type { LocalDatabaseStocktakeScanned } from "./types/BaseStocktakeScannedRepository.js";
|
|
27
|
+
export type { LocalDatabaseAdditionalContact, LocalDatabaseSupplier } from "./types/BaseSupplierRepository.js";
|
|
28
|
+
export type { LocalDatabaseTakings } from "./types/BaseTakingsRepository.js";
|
|
29
|
+
export type { LocalDatabaseTaxRate } from "./types/BaseTaxRateRepository.js";
|
|
30
|
+
export type { LocalDatabaseTransferee, LocalEmailFormatUnion } from "./types/BaseTransfereeRepository.js";
|
|
31
|
+
export type { LocalDatabaseVendorConnection } from "./types/BaseVendorConnectionRepository.js";
|
|
32
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type BaseRepository from "./BaseRepository.js";
|
|
2
|
-
interface KitchenOrderItemComponent {
|
|
2
|
+
export interface KitchenOrderItemComponent {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
quantity: number;
|
|
6
6
|
components: Array<KitchenOrderItemComponent>;
|
|
7
7
|
}
|
|
8
|
-
interface KitchenOrderItem {
|
|
8
|
+
export interface KitchenOrderItem {
|
|
9
9
|
id: string;
|
|
10
10
|
product: string;
|
|
11
11
|
ready: boolean;
|
|
@@ -16,7 +16,7 @@ interface KitchenOrderItem {
|
|
|
16
16
|
note: string;
|
|
17
17
|
components: Array<KitchenOrderItemComponent>;
|
|
18
18
|
}
|
|
19
|
-
interface KitchenOrder {
|
|
19
|
+
export interface KitchenOrder {
|
|
20
20
|
id: string;
|
|
21
21
|
register: string;
|
|
22
22
|
outlet: string;
|
|
@@ -38,5 +38,4 @@ export interface BaseKitchenOrderRepository extends BaseRepository<LocalKitchenO
|
|
|
38
38
|
*/
|
|
39
39
|
removeVersionsBefore(version: number): Promise<void>;
|
|
40
40
|
}
|
|
41
|
-
export {};
|
|
42
41
|
//# sourceMappingURL=BaseKitchenOrderRepository.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type BaseRepository from "./BaseRepository.js";
|
|
2
2
|
import { type BaseSearchableRepository } from "./BaseSearchableRepository.js";
|
|
3
3
|
export type LocalDatabaseCriteriaTypeUnion = "sell-item" | "sell-total" | "discount-item-amount" | "discount-total-amount" | "discount-percentage" | "sell-rate" | "quantity-only";
|
|
4
|
-
interface LocalDatabaseCriteriaItem {
|
|
4
|
+
export interface LocalDatabaseCriteriaItem {
|
|
5
5
|
uuid: string;
|
|
6
6
|
rebate: string | number;
|
|
7
7
|
}
|
|
@@ -69,5 +69,4 @@ export interface BasePromotionRepository extends BaseRepository<LocalDatabasePro
|
|
|
69
69
|
*/
|
|
70
70
|
getBulk(ids: Array<string>): Promise<Array<LocalDatabasePromotion>>;
|
|
71
71
|
}
|
|
72
|
-
export {};
|
|
73
72
|
//# sourceMappingURL=BasePromotionRepository.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type BaseRepository from "./BaseRepository.js";
|
|
2
|
-
type SaleActionType = "PRODUCT_SCAN" | "PRODUCT_SEARCH_ADD" | "PRODUCT_KEY_ADD" | "QUANTITY_OVERRIDE" | "INCREMENT" | "DECREMENT" | "REMOVE_PRODUCT" | "CUSTOMER_SCAN" | "CUSTOMER_SEARCH_ADD" | "CUSTOMER_KEY_ADD" | "REMOVE_CUSTOMER" | "ADD_PAYMENT" | "REMOVE_PAYMENT";
|
|
3
|
-
interface SaleAction {
|
|
2
|
+
export type SaleActionType = "PRODUCT_SCAN" | "PRODUCT_SEARCH_ADD" | "PRODUCT_KEY_ADD" | "QUANTITY_OVERRIDE" | "INCREMENT" | "DECREMENT" | "REMOVE_PRODUCT" | "CUSTOMER_SCAN" | "CUSTOMER_SEARCH_ADD" | "CUSTOMER_KEY_ADD" | "REMOVE_CUSTOMER" | "ADD_PAYMENT" | "REMOVE_PAYMENT";
|
|
3
|
+
export interface SaleAction {
|
|
4
4
|
timestamp: string;
|
|
5
5
|
action: SaleActionType;
|
|
6
6
|
value: string;
|
|
@@ -8,7 +8,7 @@ interface SaleAction {
|
|
|
8
8
|
user: string;
|
|
9
9
|
}
|
|
10
10
|
export type LocalDatabaseSalePaymentStatus = "cancelled" | "completed" | "failed";
|
|
11
|
-
type SaleStatus = "COMPLETED" | "CANCELLED" | "PARKED" | "INCOMPLETE" | "UNPARKED";
|
|
11
|
+
export type SaleStatus = "COMPLETED" | "CANCELLED" | "PARKED" | "INCOMPLETE" | "UNPARKED";
|
|
12
12
|
export interface LocalDatabaseSaleItemTypeProduct {
|
|
13
13
|
id: string;
|
|
14
14
|
type: "Product";
|
|
@@ -120,5 +120,4 @@ export interface BaseSalesRepository extends BaseRepository<LocalDatabaseSale> {
|
|
|
120
120
|
*/
|
|
121
121
|
filter(callback: (sale: LocalDatabaseSale) => boolean): Promise<Array<LocalDatabaseSale>>;
|
|
122
122
|
}
|
|
123
|
-
export {};
|
|
124
123
|
//# sourceMappingURL=BaseSalesRepository.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Application } from "../../Application.js";
|
|
2
2
|
import { type FromShopfront } from "../../ApplicationEvents/ToShopfront.js";
|
|
3
|
-
export type InternalPageMessageMethod = keyof FromShopfront | "EXTERNAL_APPLICATION";
|
|
3
|
+
export type InternalPageMessageMethod = keyof FromShopfront | "EXTERNAL_APPLICATION" | "PAYMENT_API";
|
|
4
4
|
export declare class InternalMessageSource {
|
|
5
5
|
protected application: Application;
|
|
6
6
|
protected method: InternalPageMessageMethod;
|
|
@@ -157,7 +157,7 @@ export interface FromShopfrontResponse {
|
|
|
157
157
|
GIFT_CARD_CODE_CHECK: GiftCardCodeCheckResponse;
|
|
158
158
|
}
|
|
159
159
|
export interface InternalPageMessageEvent {
|
|
160
|
-
method: "REQUEST_SETTINGS" | "REQUEST_SELL_SCREEN_OPTIONS" | "EXTERNAL_APPLICATION";
|
|
160
|
+
method: "REQUEST_SETTINGS" | "REQUEST_SELL_SCREEN_OPTIONS" | "PAYMENT_API" | "EXTERNAL_APPLICATION";
|
|
161
161
|
url: string;
|
|
162
162
|
message: unknown;
|
|
163
163
|
reference: InternalMessageSource;
|
|
@@ -8,7 +8,7 @@ export declare class InternalPageMessage extends BaseEvent<InternalPageMessageEv
|
|
|
8
8
|
/**
|
|
9
9
|
* Creates and returns a new internal message source
|
|
10
10
|
*/
|
|
11
|
-
protected createReference(method: keyof FromShopfront | "EXTERNAL_APPLICATION", url: string): InternalMessageSource;
|
|
11
|
+
protected createReference(method: keyof FromShopfront | "EXTERNAL_APPLICATION" | "PAYMENT_API", url: string): InternalMessageSource;
|
|
12
12
|
/**
|
|
13
13
|
* @inheritDoc
|
|
14
14
|
*/
|
package/lib/database.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/lib/index.d.mts
CHANGED
|
@@ -8,6 +8,7 @@ export { BaseBridge } from "./BaseBridge.js";
|
|
|
8
8
|
export { Bridge } from "./Bridge.js";
|
|
9
9
|
export * from "./EmitableEvents/index.js";
|
|
10
10
|
export type { SaleEventProduct } from "./Events/DirectEvents/types/SaleEventData.js";
|
|
11
|
+
export type { FormattedSaleProduct, FormattedSaleProductType, SaleGiftCard, } from "./Events/FormatIntegratedProduct.js";
|
|
11
12
|
export type { CompletedSale } from "./Events/SaleComplete.js";
|
|
12
13
|
export * from "./Mocks/index.js";
|
|
13
14
|
export { default as UUID } from "./Utilities/UUID.js";
|