@shopfront/bridge 2.0.0 → 2.0.2
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/.idea/codeStyles/Project.xml +10 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/git_toolbox_blame.xml +6 -0
- package/.idea/git_toolbox_prj.xml +15 -0
- package/.idea/inspectionProfiles/Project_Default.xml +5 -0
- package/.idea/jsLinters/eslint.xml +6 -0
- package/.idea/modules.xml +1 -1
- package/.idea/php.xml +15 -0
- package/lib/APIs/Database/BaseDatabase.d.ts +28 -0
- package/lib/APIs/Database/BaseDatabase.js +5 -0
- package/lib/APIs/Database/Database.d.ts +19 -7
- package/lib/APIs/Database/Database.js +22 -12
- package/lib/APIs/Database/types/BaseBarcodeTemplateRepository.d.ts +8 -0
- package/lib/APIs/Database/types/BaseBarcodeTemplateRepository.js +1 -0
- package/lib/APIs/Database/types/BaseClassificationRepository.d.ts +11 -0
- package/lib/APIs/Database/types/BaseClassificationRepository.js +1 -0
- package/lib/APIs/Database/types/BaseCustomerDisplayRepository.d.ts +10 -0
- package/lib/APIs/Database/types/BaseCustomerDisplayRepository.js +1 -0
- package/lib/APIs/Database/types/BaseCustomerGroupRepository.d.ts +24 -0
- package/lib/APIs/Database/types/BaseCustomerGroupRepository.js +1 -0
- package/lib/APIs/Database/types/BaseCustomerRepository.d.ts +76 -0
- package/lib/APIs/Database/types/BaseCustomerRepository.js +1 -0
- package/lib/APIs/Database/types/BaseEnterpriseRepository.d.ts +8 -0
- package/lib/APIs/Database/types/BaseEnterpriseRepository.js +1 -0
- package/lib/APIs/Database/types/BaseGiftCardRepository.d.ts +18 -0
- package/lib/APIs/Database/types/BaseGiftCardRepository.js +1 -0
- package/lib/APIs/Database/types/BaseKitchenOrderRepository.d.ts +41 -0
- package/lib/APIs/Database/types/BaseKitchenOrderRepository.js +1 -0
- package/lib/APIs/Database/types/BaseKitchenScreenRepository.d.ts +16 -0
- package/lib/APIs/Database/types/BaseKitchenScreenRepository.js +1 -0
- package/lib/APIs/Database/types/BaseLockedResourceRepository.d.ts +12 -0
- package/lib/APIs/Database/types/BaseLockedResourceRepository.js +1 -0
- package/lib/APIs/Database/types/BaseLoyaltyRepository.d.ts +16 -0
- package/lib/APIs/Database/types/BaseLoyaltyRepository.js +1 -0
- package/lib/APIs/Database/types/BaseMovementRepository.d.ts +16 -0
- package/lib/APIs/Database/types/BaseMovementRepository.js +1 -0
- package/lib/APIs/Database/types/BaseOutletRepository.d.ts +19 -0
- package/lib/APIs/Database/types/BaseOutletRepository.js +1 -0
- package/lib/APIs/Database/types/BasePaymentMethodRepository.d.ts +27 -0
- package/lib/APIs/Database/types/BasePaymentMethodRepository.js +1 -0
- package/lib/APIs/Database/types/BasePriceListRepository.d.ts +40 -0
- package/lib/APIs/Database/types/BasePriceListRepository.js +1 -0
- package/lib/APIs/Database/types/BasePriceSetRepository.d.ts +6 -0
- package/lib/APIs/Database/types/BasePriceSetRepository.js +1 -0
- package/lib/APIs/Database/types/BaseProductRepository.d.ts +160 -0
- package/lib/APIs/Database/types/BaseProductRepository.js +1 -0
- package/lib/APIs/Database/types/BasePromotionCategoryRepository.d.ts +10 -0
- package/lib/APIs/Database/types/BasePromotionCategoryRepository.js +1 -0
- package/lib/APIs/Database/types/BasePromotionRepository.d.ts +72 -0
- package/lib/APIs/Database/types/BasePromotionRepository.js +1 -0
- package/lib/APIs/Database/types/BaseReceiptRepository.d.ts +31 -0
- package/lib/APIs/Database/types/BaseReceiptRepository.js +1 -0
- package/lib/APIs/Database/types/BaseRegisterRepository.d.ts +56 -0
- package/lib/APIs/Database/types/BaseRegisterRepository.js +1 -0
- package/lib/APIs/Database/types/BaseRepository.d.ts +41 -0
- package/lib/APIs/Database/types/BaseRepository.js +1 -0
- package/lib/APIs/Database/types/BaseSalesKeyRepository.d.ts +37 -0
- package/lib/APIs/Database/types/BaseSalesKeyRepository.js +1 -0
- package/lib/APIs/Database/types/BaseSalesRepository.d.ts +123 -0
- package/lib/APIs/Database/types/BaseSalesRepository.js +1 -0
- package/lib/APIs/Database/types/BaseSearchableRepository.d.ts +8 -0
- package/lib/APIs/Database/types/BaseSearchableRepository.js +1 -0
- package/lib/APIs/Database/types/BaseStocktakeAccumulatedRepository.d.ts +16 -0
- package/lib/APIs/Database/types/BaseStocktakeAccumulatedRepository.js +1 -0
- package/lib/APIs/Database/types/BaseStocktakeRepository.d.ts +8 -0
- package/lib/APIs/Database/types/BaseStocktakeRepository.js +1 -0
- package/lib/APIs/Database/types/BaseStocktakeScannedRepository.d.ts +24 -0
- package/lib/APIs/Database/types/BaseStocktakeScannedRepository.js +1 -0
- package/lib/APIs/Database/types/BaseSupplierRepository.d.ts +35 -0
- package/lib/APIs/Database/types/BaseSupplierRepository.js +1 -0
- package/lib/APIs/Database/types/BaseTakingsRepository.d.ts +13 -0
- package/lib/APIs/Database/types/BaseTakingsRepository.js +1 -0
- package/lib/APIs/Database/types/BaseTaxRateRepository.d.ts +9 -0
- package/lib/APIs/Database/types/BaseTaxRateRepository.js +1 -0
- package/lib/APIs/Database/types/BaseTransfereeRepository.d.ts +12 -0
- package/lib/APIs/Database/types/BaseTransfereeRepository.js +1 -0
- package/lib/APIs/Database/types/BaseVendorConnectionRepository.d.ts +7 -0
- package/lib/APIs/Database/types/BaseVendorConnectionRepository.js +1 -0
- package/lib/APIs/Database/types/DataSourceTables.d.ts +61 -0
- package/lib/APIs/Database/types/DataSourceTables.js +1 -0
- package/lib/APIs/Fulfilment/FulfilmentTypes.d.ts +2 -2
- package/lib/APIs/Fulfilment/FulfilmentTypes.js +1 -2
- package/lib/APIs/InternalMessages/InternalMessageSource.d.ts +6 -3
- package/lib/APIs/InternalMessages/InternalMessageSource.js +6 -7
- package/lib/APIs/Sale/BaseCurrentSale.d.ts +83 -0
- package/lib/APIs/Sale/BaseCurrentSale.js +13 -0
- package/lib/APIs/Sale/BaseSale.d.ts +3 -38
- package/lib/APIs/Sale/BaseSale.js +1 -40
- package/lib/APIs/Sale/CurrentSale.d.ts +19 -84
- package/lib/APIs/Sale/CurrentSale.js +32 -102
- package/lib/APIs/Sale/Exceptions.d.ts +3 -0
- package/lib/APIs/Sale/Exceptions.js +7 -7
- package/lib/APIs/Sale/Sale.d.ts +39 -7
- package/lib/APIs/Sale/Sale.js +41 -13
- package/lib/APIs/Sale/SaleCustomer.d.ts +0 -2
- package/lib/APIs/Sale/SaleCustomer.js +1 -7
- package/lib/APIs/Sale/SalePayment.d.ts +3 -22
- package/lib/APIs/Sale/SalePayment.js +7 -33
- package/lib/APIs/Sale/SaleProduct.d.ts +6 -46
- package/lib/APIs/Sale/SaleProduct.js +6 -53
- package/lib/APIs/Sale/ShopfrontSaleState.d.ts +7 -9
- package/lib/APIs/Sale/ShopfrontSaleState.js +1 -2
- package/lib/APIs/Sale/index.d.ts +9 -9
- package/lib/APIs/Sale/index.js +7 -39
- package/lib/Actions/BaseAction.d.ts +21 -5
- package/lib/Actions/BaseAction.js +155 -97
- package/lib/Actions/Button.d.ts +2 -2
- package/lib/Actions/Button.js +3 -7
- package/lib/Actions/CustomerListOption.d.ts +2 -2
- package/lib/Actions/CustomerListOption.js +2 -6
- package/lib/Actions/Dialog.d.ts +4 -4
- package/lib/Actions/Dialog.js +2 -6
- package/lib/Actions/Redirect.d.ts +2 -2
- package/lib/Actions/Redirect.js +7 -9
- package/lib/Actions/SaleKey.d.ts +2 -2
- package/lib/Actions/SaleKey.js +3 -7
- package/lib/Actions/SaleUpdate.d.ts +3 -3
- package/lib/Actions/SaleUpdate.js +3 -7
- package/lib/Actions/Toast.d.ts +3 -3
- package/lib/Actions/Toast.js +2 -6
- package/lib/Application.d.ts +114 -78
- package/lib/Application.js +207 -160
- package/lib/ApplicationEvents.d.ts +66 -53
- package/lib/ApplicationEvents.js +10 -6
- package/lib/BaseApplication.d.ts +169 -0
- package/lib/BaseApplication.js +40 -0
- package/lib/BaseBridge.d.ts +33 -0
- package/lib/BaseBridge.js +16 -0
- package/lib/Bridge.d.ts +46 -9
- package/lib/Bridge.js +42 -54
- package/lib/Common/EventEmitter.d.ts +10 -1
- package/lib/Common/EventEmitter.js +10 -5
- package/lib/Common/Serializable.d.ts +8 -6
- package/lib/Common/Serializable.js +1 -2
- package/lib/EmitableEvents/BaseEmitableEvent.d.ts +7 -1
- package/lib/EmitableEvents/BaseEmitableEvent.js +7 -5
- package/lib/EmitableEvents/Fulfilment/Options.d.ts +1 -1
- package/lib/EmitableEvents/Fulfilment/Options.js +4 -8
- package/lib/EmitableEvents/Fulfilment/OrderCancel.d.ts +1 -1
- package/lib/EmitableEvents/Fulfilment/OrderCancel.js +4 -8
- package/lib/EmitableEvents/Fulfilment/OrderCreate.d.ts +2 -2
- package/lib/EmitableEvents/Fulfilment/OrderCreate.js +4 -8
- package/lib/EmitableEvents/Fulfilment/OrderUpdate.d.ts +2 -2
- package/lib/EmitableEvents/Fulfilment/OrderUpdate.js +4 -8
- package/lib/EmitableEvents/Fulfilment/OrdersSync.d.ts +2 -2
- package/lib/EmitableEvents/Fulfilment/OrdersSync.js +4 -8
- package/lib/EmitableEvents/Fulfilment/RegisterIntent.d.ts +2 -2
- package/lib/EmitableEvents/Fulfilment/RegisterIntent.js +4 -8
- package/lib/EmitableEvents/Fulfilment/index.d.ts +7 -7
- package/lib/EmitableEvents/Fulfilment/index.js +6 -15
- package/lib/EmitableEvents/InternalMessage.d.ts +2 -2
- package/lib/EmitableEvents/InternalMessage.js +4 -8
- package/lib/EmitableEvents/SellScreenOption.d.ts +2 -2
- package/lib/EmitableEvents/SellScreenOption.js +7 -11
- package/lib/EmitableEvents/SellScreenPromotionApplicable.d.ts +1 -1
- package/lib/EmitableEvents/SellScreenPromotionApplicable.js +4 -8
- package/lib/EmitableEvents/TableUpdate.d.ts +2 -2
- package/lib/EmitableEvents/TableUpdate.js +4 -8
- package/lib/Events/AudioPermissionChange.d.ts +5 -2
- package/lib/Events/AudioPermissionChange.js +6 -7
- package/lib/Events/AudioReady.d.ts +5 -2
- package/lib/Events/AudioReady.js +6 -7
- package/lib/Events/BaseEvent.d.ts +8 -3
- package/lib/Events/BaseEvent.js +1 -6
- package/lib/Events/Callback.d.ts +5 -2
- package/lib/Events/Callback.js +5 -6
- package/lib/Events/FormatIntegratedProduct.d.ts +27 -32
- package/lib/Events/FormatIntegratedProduct.js +12 -9
- package/lib/Events/FulfilmentCollectOrder.d.ts +5 -2
- package/lib/Events/FulfilmentCollectOrder.js +5 -6
- package/lib/Events/FulfilmentCompleteOrder.d.ts +5 -2
- package/lib/Events/FulfilmentCompleteOrder.js +5 -6
- package/lib/Events/FulfilmentGetOrder.d.ts +12 -6
- package/lib/Events/FulfilmentGetOrder.js +10 -8
- package/lib/Events/FulfilmentOrderApproval.d.ts +5 -2
- package/lib/Events/FulfilmentOrderApproval.js +5 -6
- package/lib/Events/FulfilmentProcessOrder.d.ts +12 -10
- package/lib/Events/FulfilmentProcessOrder.js +7 -8
- package/lib/Events/FulfilmentVoidOrder.d.ts +5 -2
- package/lib/Events/FulfilmentVoidOrder.js +5 -6
- package/lib/Events/GiftCardCodeCheck.d.ts +19 -0
- package/lib/Events/GiftCardCodeCheck.js +23 -0
- package/lib/Events/InternalPageMessage.d.ts +10 -4
- package/lib/Events/InternalPageMessage.js +12 -10
- package/lib/Events/PaymentMethodsEnabled.d.ts +16 -11
- package/lib/Events/PaymentMethodsEnabled.js +10 -8
- package/lib/Events/Ready.d.ts +12 -7
- package/lib/Events/Ready.js +5 -6
- package/lib/Events/RegisterChanged.d.ts +12 -6
- package/lib/Events/RegisterChanged.js +6 -7
- package/lib/Events/RequestButtons.d.ts +17 -12
- package/lib/Events/RequestButtons.js +13 -11
- package/lib/Events/RequestCustomerListOptions.d.ts +11 -5
- package/lib/Events/RequestCustomerListOptions.js +12 -11
- package/lib/Events/RequestSaleKeys.d.ts +12 -6
- package/lib/Events/RequestSaleKeys.js +13 -11
- package/lib/Events/RequestSellScreenOptions.d.ts +18 -5
- package/lib/Events/RequestSellScreenOptions.js +17 -9
- package/lib/Events/RequestSettings.d.ts +11 -5
- package/lib/Events/RequestSettings.js +12 -10
- package/lib/Events/RequestTableColumns.d.ts +16 -11
- package/lib/Events/RequestTableColumns.js +12 -9
- package/lib/Events/SaleComplete.d.ts +15 -18
- package/lib/Events/SaleComplete.js +6 -7
- package/lib/Events/UIPipeline.d.ts +17 -5
- package/lib/Events/UIPipeline.js +17 -10
- package/lib/Mocks/APIs/Sale/MockCurrentSale.d.ts +99 -0
- package/lib/Mocks/APIs/Sale/MockCurrentSale.js +326 -0
- package/lib/Mocks/Database/MockDatabase.d.ts +96 -0
- package/lib/Mocks/Database/MockDatabase.js +89 -0
- package/lib/Mocks/MockApplication.d.ts +154 -0
- package/lib/Mocks/MockApplication.js +481 -0
- package/lib/Mocks/MockBridge.d.ts +31 -0
- package/lib/Mocks/MockBridge.js +77 -0
- package/lib/Mocks/index.d.ts +7 -0
- package/lib/Mocks/index.js +15 -0
- package/lib/Utilities/ActionEventRegistrar.d.ts +19 -4
- package/lib/Utilities/ActionEventRegistrar.js +19 -3
- package/lib/Utilities/MiscTypes.d.ts +6 -4
- package/lib/Utilities/MiscTypes.js +1 -2
- package/lib/Utilities/SaleCreate.d.ts +6 -2
- package/lib/Utilities/SaleCreate.js +10 -6
- package/lib/Utilities/Static.d.ts +3 -0
- package/lib/Utilities/Static.js +5 -7
- package/lib/Utilities/UUID.d.ts +9 -3
- package/lib/Utilities/UUID.js +10 -7
- package/lib/index.d.ts +16 -14
- package/lib/index.js +14 -49
- package/package.json +3 -2
- package/lib/APIs/CurrentSale/Exceptions.d.ts +0 -6
- package/lib/APIs/CurrentSale/Exceptions.js +0 -15
- package/lib/APIs/CurrentSale/Sale.d.ts +0 -182
- package/lib/APIs/CurrentSale/Sale.js +0 -290
- package/lib/APIs/CurrentSale/SaleCustomer.d.ts +0 -10
- package/lib/APIs/CurrentSale/SaleCustomer.js +0 -17
- package/lib/APIs/CurrentSale/SalePayment.d.ts +0 -68
- package/lib/APIs/CurrentSale/SalePayment.js +0 -99
- package/lib/APIs/CurrentSale/SaleProduct.d.ts +0 -121
- package/lib/APIs/CurrentSale/SaleProduct.js +0 -167
- package/lib/APIs/CurrentSale/ShopfrontSaleState.d.ts +0 -53
- package/lib/APIs/CurrentSale/ShopfrontSaleState.js +0 -2
- package/lib/APIs/CurrentSale/index.d.ts +0 -6
- package/lib/APIs/CurrentSale/index.js +0 -37
- /package/.idea/{embedded-bridge.iml → shopfront-embedded-bridge.iml} +0 -0
package/lib/Bridge.js
CHANGED
|
@@ -1,36 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Application } from "./Application.js";
|
|
2
|
+
import * as ApplicationEvents from "./ApplicationEvents.js";
|
|
3
|
+
import { BaseBridge } from "./BaseBridge.js";
|
|
4
|
+
export class Bridge extends BaseBridge {
|
|
5
|
+
/**
|
|
6
|
+
* A static method for instantiating an Application
|
|
7
|
+
*/
|
|
8
|
+
static createApplication(options) {
|
|
9
|
+
if (typeof options.id === "undefined") {
|
|
10
|
+
throw new TypeError("You must specify the ID for the application");
|
|
11
|
+
}
|
|
12
|
+
if (typeof options.vendor === "undefined") {
|
|
13
|
+
throw new TypeError("You must specify the Vendor for the application");
|
|
14
|
+
}
|
|
15
|
+
return new Application(new Bridge(options.id, options.vendor));
|
|
7
16
|
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Bridge = void 0;
|
|
27
|
-
const Application_1 = require("./Application");
|
|
28
|
-
const ApplicationEvents = __importStar(require("./ApplicationEvents"));
|
|
29
|
-
class Bridge {
|
|
30
17
|
constructor(key, url) {
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
if (window.parent === window) {
|
|
19
|
+
throw new Error("The bridge has not been initialised within a frame");
|
|
20
|
+
}
|
|
21
|
+
super(key, url);
|
|
33
22
|
this.target = null;
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
34
26
|
this.handleMessage = (event) => {
|
|
35
27
|
if (event.origin !== this.url.origin) {
|
|
36
28
|
return;
|
|
@@ -72,38 +64,29 @@ class Bridge {
|
|
|
72
64
|
listeners[i](event.data.type, event.data.data, event.data.id);
|
|
73
65
|
}
|
|
74
66
|
};
|
|
75
|
-
if (window.parent === window) {
|
|
76
|
-
throw new Error("The bridge has not been initialised within a frame");
|
|
77
|
-
}
|
|
78
|
-
this.key = key;
|
|
79
|
-
if (url.split('.').length === 1) {
|
|
80
|
-
this.url = new URL(`https://${url}.onshopfront.com`);
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
this.url = new URL(url);
|
|
84
|
-
}
|
|
85
|
-
this.registerListeners();
|
|
86
|
-
this.sendMessage(ApplicationEvents.ToShopfront.READY);
|
|
87
|
-
}
|
|
88
|
-
static createApplication(options) {
|
|
89
|
-
if (typeof options.id === "undefined") {
|
|
90
|
-
throw new TypeError("You must specify the ID for the application");
|
|
91
|
-
}
|
|
92
|
-
if (typeof options.vendor === "undefined") {
|
|
93
|
-
throw new TypeError("You must specify the Vendor for the application");
|
|
94
|
-
}
|
|
95
|
-
return new Application_1.Application(new Bridge(options.id, options.vendor));
|
|
96
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* @inheritDoc
|
|
70
|
+
*/
|
|
97
71
|
destroy() {
|
|
98
72
|
this.unregisterListeners();
|
|
99
73
|
this.listeners = [];
|
|
100
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* @inheritDoc
|
|
77
|
+
*/
|
|
101
78
|
registerListeners() {
|
|
102
79
|
window.addEventListener("message", this.handleMessage, false);
|
|
103
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* @inheritDoc
|
|
83
|
+
*/
|
|
104
84
|
unregisterListeners() {
|
|
105
85
|
window.removeEventListener("message", this.handleMessage);
|
|
106
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* @inheritDoc
|
|
89
|
+
*/
|
|
107
90
|
sendMessage(type, data, id) {
|
|
108
91
|
if (type === ApplicationEvents.ToShopfront.READY) {
|
|
109
92
|
if (typeof data !== "undefined") {
|
|
@@ -119,7 +102,7 @@ class Bridge {
|
|
|
119
102
|
from: window.location.origin,
|
|
120
103
|
},
|
|
121
104
|
key: this.key,
|
|
122
|
-
}, /* can't use this because of sandbox: this.url.origin */
|
|
105
|
+
}, /* can't use this because of sandbox: this.url.origin */ "*");
|
|
123
106
|
return;
|
|
124
107
|
}
|
|
125
108
|
if (this.target === null) {
|
|
@@ -134,8 +117,11 @@ class Bridge {
|
|
|
134
117
|
key: this.key,
|
|
135
118
|
id,
|
|
136
119
|
data,
|
|
137
|
-
},
|
|
120
|
+
}, "*" /* can't use this because of sandbox: this.url.origin */);
|
|
138
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* @inheritDoc
|
|
124
|
+
*/
|
|
139
125
|
addEventListener(listener) {
|
|
140
126
|
if (this.listeners.includes(listener)) {
|
|
141
127
|
throw new Error("The listener provided is already registered");
|
|
@@ -146,6 +132,9 @@ class Bridge {
|
|
|
146
132
|
this.hasListener = true;
|
|
147
133
|
}
|
|
148
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* @inheritDoc
|
|
137
|
+
*/
|
|
149
138
|
removeEventListener(listener) {
|
|
150
139
|
const index = this.listeners.indexOf(listener);
|
|
151
140
|
if (index === -1) {
|
|
@@ -157,4 +146,3 @@ class Bridge {
|
|
|
157
146
|
];
|
|
158
147
|
}
|
|
159
148
|
}
|
|
160
|
-
exports.Bridge = Bridge;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import { MaybePromise } from "../Utilities/MiscTypes";
|
|
1
|
+
import { MaybePromise } from "../Utilities/MiscTypes.js";
|
|
2
2
|
export declare class EventEmitter {
|
|
3
3
|
protected supportedEvents: Array<string>;
|
|
4
4
|
private listeners;
|
|
5
|
+
/**
|
|
6
|
+
* Registers an event listener
|
|
7
|
+
*/
|
|
5
8
|
addEventListener(event: string, callback: (...args: Array<unknown>) => MaybePromise<unknown>): void;
|
|
9
|
+
/**
|
|
10
|
+
* Removes an event listener
|
|
11
|
+
*/
|
|
6
12
|
removeEventListener(event: string, callback: (...args: Array<unknown>) => MaybePromise<unknown>): void;
|
|
13
|
+
/**
|
|
14
|
+
* Invokes all callbacks listening to the event
|
|
15
|
+
*/
|
|
7
16
|
protected emit(event: string, ...args: Array<unknown>): Promise<Array<unknown>>;
|
|
8
17
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EventEmitter = void 0;
|
|
4
|
-
class EventEmitter {
|
|
1
|
+
export class EventEmitter {
|
|
5
2
|
constructor() {
|
|
6
3
|
this.supportedEvents = [];
|
|
7
4
|
this.listeners = {};
|
|
8
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* Registers an event listener
|
|
8
|
+
*/
|
|
9
9
|
addEventListener(event, callback) {
|
|
10
10
|
if (!this.supportedEvents.includes(event)) {
|
|
11
11
|
throw new TypeError(`${event} is not a supported event`);
|
|
@@ -15,6 +15,9 @@ class EventEmitter {
|
|
|
15
15
|
}
|
|
16
16
|
this.listeners[event].push(callback);
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Removes an event listener
|
|
20
|
+
*/
|
|
18
21
|
removeEventListener(event, callback) {
|
|
19
22
|
if (!this.supportedEvents.includes(event)) {
|
|
20
23
|
throw new TypeError(`${event} is not a supported event`);
|
|
@@ -31,6 +34,9 @@ class EventEmitter {
|
|
|
31
34
|
...this.listeners[event].slice(index + 1),
|
|
32
35
|
];
|
|
33
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Invokes all callbacks listening to the event
|
|
39
|
+
*/
|
|
34
40
|
async emit(event, ...args) {
|
|
35
41
|
if (typeof this.listeners[event] === "undefined") {
|
|
36
42
|
return Promise.resolve([]);
|
|
@@ -42,4 +48,3 @@ class EventEmitter {
|
|
|
42
48
|
return Promise.all(events);
|
|
43
49
|
}
|
|
44
50
|
}
|
|
45
|
-
exports.EventEmitter = EventEmitter;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
export interface Serialized<T> {
|
|
2
2
|
properties: Array<unknown>;
|
|
3
|
-
events:
|
|
4
|
-
[event: string]: Array<string>;
|
|
5
|
-
};
|
|
3
|
+
events: Record<string, Array<string>>;
|
|
6
4
|
type: string;
|
|
7
5
|
}
|
|
8
|
-
export
|
|
9
|
-
new (serialized: Serialized<T>): T;
|
|
10
|
-
}
|
|
6
|
+
export type SerializableType<T> = new (serialized: Serialized<T>) => T;
|
|
11
7
|
export interface SerializableStatic {
|
|
8
|
+
/**
|
|
9
|
+
* Deserializes the serialized data
|
|
10
|
+
*/
|
|
12
11
|
deserialize<T extends Serializable<T>>(serialized: Serialized<T>): T;
|
|
13
12
|
}
|
|
14
13
|
export interface Serializable<T> {
|
|
14
|
+
/**
|
|
15
|
+
* Serializes the data
|
|
16
|
+
*/
|
|
15
17
|
serialize(): Serialized<T>;
|
|
16
18
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { ToShopfront } from "../ApplicationEvents";
|
|
1
|
+
import { ToShopfront } from "../ApplicationEvents.js";
|
|
2
2
|
export declare class BaseEmitableEvent<T> {
|
|
3
3
|
protected eventName: ToShopfront;
|
|
4
4
|
protected eventData: T;
|
|
5
5
|
constructor(shopfrontEventName: ToShopfront, data: T);
|
|
6
|
+
/**
|
|
7
|
+
* Returns the event name
|
|
8
|
+
*/
|
|
6
9
|
getEvent(): ToShopfront;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the event data
|
|
12
|
+
*/
|
|
7
13
|
getData(): T;
|
|
8
14
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseEmitableEvent = void 0;
|
|
4
|
-
class BaseEmitableEvent {
|
|
1
|
+
export class BaseEmitableEvent {
|
|
5
2
|
constructor(shopfrontEventName, data) {
|
|
6
3
|
if (new.target === BaseEmitableEvent) {
|
|
7
4
|
throw new TypeError("You cannot construct BaseEmitableEvent instances directly");
|
|
@@ -9,11 +6,16 @@ class BaseEmitableEvent {
|
|
|
9
6
|
this.eventName = shopfrontEventName;
|
|
10
7
|
this.eventData = data;
|
|
11
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns the event name
|
|
11
|
+
*/
|
|
12
12
|
getEvent() {
|
|
13
13
|
return this.eventName;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Returns the event data
|
|
17
|
+
*/
|
|
15
18
|
getData() {
|
|
16
19
|
return this.eventData;
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
|
-
exports.BaseEmitableEvent = BaseEmitableEvent;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const BaseEmitableEvent_1 = require("../BaseEmitableEvent");
|
|
5
|
-
const ApplicationEvents_1 = require("../../ApplicationEvents");
|
|
6
|
-
class Options extends BaseEmitableEvent_1.BaseEmitableEvent {
|
|
1
|
+
import { ToShopfront } from "../../ApplicationEvents.js";
|
|
2
|
+
import { BaseEmitableEvent } from "../BaseEmitableEvent.js";
|
|
3
|
+
export class Options extends BaseEmitableEvent {
|
|
7
4
|
constructor(options) {
|
|
8
|
-
super(
|
|
5
|
+
super(ToShopfront.FULFILMENT_OPTIONS, options);
|
|
9
6
|
}
|
|
10
7
|
}
|
|
11
|
-
exports.Options = Options;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const BaseEmitableEvent_1 = require("../BaseEmitableEvent");
|
|
5
|
-
const ApplicationEvents_1 = require("../../ApplicationEvents");
|
|
6
|
-
class OrderCancel extends BaseEmitableEvent_1.BaseEmitableEvent {
|
|
1
|
+
import { ToShopfront } from "../../ApplicationEvents.js";
|
|
2
|
+
import { BaseEmitableEvent } from "../BaseEmitableEvent.js";
|
|
3
|
+
export class OrderCancel extends BaseEmitableEvent {
|
|
7
4
|
constructor(id) {
|
|
8
|
-
super(
|
|
5
|
+
super(ToShopfront.FULFILMENT_ORDERS_CANCEL, {
|
|
9
6
|
id,
|
|
10
7
|
});
|
|
11
8
|
}
|
|
12
9
|
}
|
|
13
|
-
exports.OrderCancel = OrderCancel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OrderCreateDetails } from "../../APIs/Fulfilment/FulfilmentTypes.js";
|
|
2
|
+
import { BaseEmitableEvent } from "../BaseEmitableEvent.js";
|
|
3
3
|
export declare class OrderCreate extends BaseEmitableEvent<{
|
|
4
4
|
order: OrderCreateDetails;
|
|
5
5
|
}> {
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const BaseEmitableEvent_1 = require("../BaseEmitableEvent");
|
|
5
|
-
const ApplicationEvents_1 = require("../../ApplicationEvents");
|
|
6
|
-
class OrderCreate extends BaseEmitableEvent_1.BaseEmitableEvent {
|
|
1
|
+
import { ToShopfront } from "../../ApplicationEvents.js";
|
|
2
|
+
import { BaseEmitableEvent } from "../BaseEmitableEvent.js";
|
|
3
|
+
export class OrderCreate extends BaseEmitableEvent {
|
|
7
4
|
constructor(order) {
|
|
8
|
-
super(
|
|
5
|
+
super(ToShopfront.FULFILMENT_ORDERS_CREATE, {
|
|
9
6
|
order,
|
|
10
7
|
});
|
|
11
8
|
}
|
|
12
9
|
}
|
|
13
|
-
exports.OrderCreate = OrderCreate;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OrderSummaryDetails } from "../../APIs/Fulfilment/FulfilmentTypes.js";
|
|
2
|
+
import { BaseEmitableEvent } from "../BaseEmitableEvent.js";
|
|
3
3
|
export declare class OrderUpdate extends BaseEmitableEvent<{
|
|
4
4
|
order: OrderSummaryDetails;
|
|
5
5
|
}> {
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const BaseEmitableEvent_1 = require("../BaseEmitableEvent");
|
|
5
|
-
const ApplicationEvents_1 = require("../../ApplicationEvents");
|
|
6
|
-
class OrderUpdate extends BaseEmitableEvent_1.BaseEmitableEvent {
|
|
1
|
+
import { ToShopfront } from "../../ApplicationEvents.js";
|
|
2
|
+
import { BaseEmitableEvent } from "../BaseEmitableEvent.js";
|
|
3
|
+
export class OrderUpdate extends BaseEmitableEvent {
|
|
7
4
|
constructor(order) {
|
|
8
|
-
super(
|
|
5
|
+
super(ToShopfront.FULFILMENT_ORDERS_UPDATE, {
|
|
9
6
|
order,
|
|
10
7
|
});
|
|
11
8
|
}
|
|
12
9
|
}
|
|
13
|
-
exports.OrderUpdate = OrderUpdate;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OrderCreateDetails } from "../../APIs/Fulfilment/FulfilmentTypes.js";
|
|
2
|
+
import { BaseEmitableEvent } from "../BaseEmitableEvent.js";
|
|
3
3
|
export declare class OrdersSync extends BaseEmitableEvent<{
|
|
4
4
|
orders: Array<OrderCreateDetails>;
|
|
5
5
|
merge: boolean;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const BaseEmitableEvent_1 = require("../BaseEmitableEvent");
|
|
5
|
-
const ApplicationEvents_1 = require("../../ApplicationEvents");
|
|
6
|
-
class OrdersSync extends BaseEmitableEvent_1.BaseEmitableEvent {
|
|
1
|
+
import { ToShopfront } from "../../ApplicationEvents.js";
|
|
2
|
+
import { BaseEmitableEvent } from "../BaseEmitableEvent.js";
|
|
3
|
+
export class OrdersSync extends BaseEmitableEvent {
|
|
7
4
|
constructor(orders, merge) {
|
|
8
|
-
super(
|
|
5
|
+
super(ToShopfront.FULFILMENT_ORDERS_SYNC, {
|
|
9
6
|
orders,
|
|
10
7
|
merge,
|
|
11
8
|
});
|
|
12
9
|
}
|
|
13
10
|
}
|
|
14
|
-
exports.OrdersSync = OrdersSync;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEmitableEvent } from "../BaseEmitableEvent";
|
|
2
|
-
import { FulfilmentOptions } from "./Options";
|
|
1
|
+
import { BaseEmitableEvent } from "../BaseEmitableEvent.js";
|
|
2
|
+
import { FulfilmentOptions } from "./Options.js";
|
|
3
3
|
/**
|
|
4
4
|
* Registers intent from the application to use the Fulfilment API
|
|
5
5
|
* this event is not required but recommended to show the Fulfilment UI in shopfront sooner
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.RegisterIntent = void 0;
|
|
4
|
-
const BaseEmitableEvent_1 = require("../BaseEmitableEvent");
|
|
5
|
-
const ApplicationEvents_1 = require("../../ApplicationEvents");
|
|
1
|
+
import { ToShopfront } from "../../ApplicationEvents.js";
|
|
2
|
+
import { BaseEmitableEvent } from "../BaseEmitableEvent.js";
|
|
6
3
|
/**
|
|
7
4
|
* Registers intent from the application to use the Fulfilment API
|
|
8
5
|
* this event is not required but recommended to show the Fulfilment UI in shopfront sooner
|
|
9
6
|
*/
|
|
10
|
-
class RegisterIntent extends
|
|
7
|
+
export class RegisterIntent extends BaseEmitableEvent {
|
|
11
8
|
constructor(options) {
|
|
12
|
-
super(
|
|
9
|
+
super(ToShopfront.FULFILMENT_OPT_IN, {
|
|
13
10
|
options,
|
|
14
11
|
});
|
|
15
12
|
}
|
|
16
13
|
}
|
|
17
|
-
exports.RegisterIntent = RegisterIntent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
1
|
+
export type { OrderCreateDetails, OrderDetails, OrderItem, OrderItemMatch, OrderStatus, OrderSummaryDetails, } from "../../APIs/Fulfilment/FulfilmentTypes.js";
|
|
2
|
+
export { type FulfilmentOptions, Options } from "./Options.js";
|
|
3
|
+
export { OrderCancel } from "./OrderCancel.js";
|
|
4
|
+
export { OrderCreate } from "./OrderCreate.js";
|
|
5
|
+
export { OrdersSync } from "./OrdersSync.js";
|
|
6
|
+
export { OrderUpdate } from "./OrderUpdate.js";
|
|
7
|
+
export { RegisterIntent } from "./RegisterIntent.js";
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "OrderCreate", { enumerable: true, get: function () { return OrderCreate_1.OrderCreate; } });
|
|
8
|
-
var OrderUpdate_1 = require("./OrderUpdate");
|
|
9
|
-
Object.defineProperty(exports, "OrderUpdate", { enumerable: true, get: function () { return OrderUpdate_1.OrderUpdate; } });
|
|
10
|
-
var OrdersSync_1 = require("./OrdersSync");
|
|
11
|
-
Object.defineProperty(exports, "OrdersSync", { enumerable: true, get: function () { return OrdersSync_1.OrdersSync; } });
|
|
12
|
-
var Options_1 = require("./Options");
|
|
13
|
-
Object.defineProperty(exports, "Options", { enumerable: true, get: function () { return Options_1.Options; } });
|
|
14
|
-
var RegisterIntent_1 = require("./RegisterIntent");
|
|
15
|
-
Object.defineProperty(exports, "RegisterIntent", { enumerable: true, get: function () { return RegisterIntent_1.RegisterIntent; } });
|
|
1
|
+
export { Options } from "./Options.js";
|
|
2
|
+
export { OrderCancel } from "./OrderCancel.js";
|
|
3
|
+
export { OrderCreate } from "./OrderCreate.js";
|
|
4
|
+
export { OrdersSync } from "./OrdersSync.js";
|
|
5
|
+
export { OrderUpdate } from "./OrderUpdate.js";
|
|
6
|
+
export { RegisterIntent } from "./RegisterIntent.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { InternalPageMessageMethod } from "../APIs/InternalMessages/InternalMessageSource.js";
|
|
2
|
+
import { BaseEmitableEvent } from "./BaseEmitableEvent.js";
|
|
3
3
|
export declare class InternalMessage<T> extends BaseEmitableEvent<{
|
|
4
4
|
method: InternalPageMessageMethod;
|
|
5
5
|
url: string;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const BaseEmitableEvent_1 = require("./BaseEmitableEvent");
|
|
5
|
-
const ApplicationEvents_1 = require("../ApplicationEvents");
|
|
6
|
-
class InternalMessage extends BaseEmitableEvent_1.BaseEmitableEvent {
|
|
1
|
+
import { ToShopfront } from "../ApplicationEvents.js";
|
|
2
|
+
import { BaseEmitableEvent } from "./BaseEmitableEvent.js";
|
|
3
|
+
export class InternalMessage extends BaseEmitableEvent {
|
|
7
4
|
constructor(method, destination, message) {
|
|
8
|
-
super(
|
|
5
|
+
super(ToShopfront.INTERNAL_PAGE_MESSAGE, {
|
|
9
6
|
method,
|
|
10
7
|
url: destination,
|
|
11
8
|
message,
|
|
12
9
|
});
|
|
13
10
|
}
|
|
14
11
|
}
|
|
15
|
-
exports.InternalMessage = InternalMessage;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import type { SellScreenOption as Option } from "../Events/RequestSellScreenOptions.js";
|
|
2
|
+
import { BaseEmitableEvent } from "./BaseEmitableEvent.js";
|
|
3
3
|
export declare class SellScreenOption extends BaseEmitableEvent<Option> {
|
|
4
4
|
constructor(url: string, title: string);
|
|
5
5
|
}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const RequestSellScreenOptions_1 = require("../Events/RequestSellScreenOptions");
|
|
6
|
-
const ApplicationEvents_1 = require("../ApplicationEvents");
|
|
7
|
-
class SellScreenOption extends BaseEmitableEvent_1.BaseEmitableEvent {
|
|
1
|
+
import { ToShopfront } from "../ApplicationEvents.js";
|
|
2
|
+
import { RequestSellScreenOptions } from "../Events/RequestSellScreenOptions.js";
|
|
3
|
+
import { BaseEmitableEvent } from "./BaseEmitableEvent.js";
|
|
4
|
+
export class SellScreenOption extends BaseEmitableEvent {
|
|
8
5
|
constructor(url, title) {
|
|
9
|
-
|
|
10
|
-
super(
|
|
11
|
-
id:
|
|
6
|
+
RequestSellScreenOptions.validateURL(url);
|
|
7
|
+
super(ToShopfront.SELL_SCREEN_OPTION_CHANGE, {
|
|
8
|
+
id: RequestSellScreenOptions.getOptionId(url),
|
|
12
9
|
url,
|
|
13
10
|
title,
|
|
14
11
|
});
|
|
15
12
|
}
|
|
16
13
|
}
|
|
17
|
-
exports.SellScreenOption = SellScreenOption;
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const BaseEmitableEvent_1 = require("./BaseEmitableEvent");
|
|
5
|
-
const ApplicationEvents_1 = require("../ApplicationEvents");
|
|
6
|
-
class SellScreenPromotionApplicable extends BaseEmitableEvent_1.BaseEmitableEvent {
|
|
1
|
+
import { ToShopfront } from "../ApplicationEvents.js";
|
|
2
|
+
import { BaseEmitableEvent } from "./BaseEmitableEvent.js";
|
|
3
|
+
export class SellScreenPromotionApplicable extends BaseEmitableEvent {
|
|
7
4
|
/**
|
|
8
5
|
* Enable or disable a set of already created "applicable" promotions
|
|
9
6
|
* @param key {string} The key to enable or disable, this supports wildcards using an asterisk
|
|
10
7
|
* @param enable {boolean} Whether the key should be enabled or disabled
|
|
11
8
|
*/
|
|
12
9
|
constructor(key, enable) {
|
|
13
|
-
super(
|
|
10
|
+
super(ToShopfront.SELL_SCREEN_PROMOTION_APPLICABLE, {
|
|
14
11
|
key,
|
|
15
12
|
enable,
|
|
16
13
|
});
|
|
17
14
|
}
|
|
18
15
|
}
|
|
19
|
-
exports.SellScreenPromotionApplicable = SellScreenPromotionApplicable;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { FromShopfrontReturns } from "../ApplicationEvents.js";
|
|
2
|
+
import { BaseEmitableEvent } from "./BaseEmitableEvent.js";
|
|
3
3
|
export declare class TableUpdate extends BaseEmitableEvent<{
|
|
4
4
|
location: string;
|
|
5
5
|
data: Exclude<FromShopfrontReturns["REQUEST_TABLE_COLUMNS"], null>;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const BaseEmitableEvent_1 = require("./BaseEmitableEvent");
|
|
5
|
-
const ApplicationEvents_1 = require("../ApplicationEvents");
|
|
6
|
-
class TableUpdate extends BaseEmitableEvent_1.BaseEmitableEvent {
|
|
1
|
+
import { ToShopfront } from "../ApplicationEvents.js";
|
|
2
|
+
import { BaseEmitableEvent } from "./BaseEmitableEvent.js";
|
|
3
|
+
export class TableUpdate extends BaseEmitableEvent {
|
|
7
4
|
constructor(location, columns) {
|
|
8
|
-
super(
|
|
5
|
+
super(ToShopfront.TABLE_UPDATE, {
|
|
9
6
|
location,
|
|
10
7
|
data: columns,
|
|
11
8
|
});
|
|
12
9
|
}
|
|
13
10
|
}
|
|
14
|
-
exports.TableUpdate = TableUpdate;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AudioPermissionChangeEvent, FromShopfrontCallbacks, FromShopfrontReturns } from "../ApplicationEvents.js";
|
|
2
|
+
import { BaseEvent } from "./BaseEvent.js";
|
|
3
3
|
export declare class AudioPermissionChange extends BaseEvent<AudioPermissionChangeEvent> {
|
|
4
4
|
constructor(callback: FromShopfrontCallbacks["AUDIO_PERMISSION_CHANGE"]);
|
|
5
|
+
/**
|
|
6
|
+
* @inheritDoc
|
|
7
|
+
*/
|
|
5
8
|
emit(data: AudioPermissionChangeEvent): Promise<FromShopfrontReturns["AUDIO_PERMISSION_CHANGE"]>;
|
|
6
9
|
}
|