@final-commerce/command-frame 0.3.1-beta.1 → 0.3.1

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.js CHANGED
@@ -1,135 +1,137 @@
1
1
  // Import actions from new folder structure
2
- import { exampleFunction } from "./actions/example-function/action";
3
- import { getProducts } from "./actions/get-products/action";
4
- import { addCustomSale } from "./actions/add-custom-sale/action";
5
- import { addNonRevenueItem } from "./actions/add-non-revenue-item/action";
6
- import { getCustomers } from "./actions/get-customers/action";
7
- import { assignCustomer } from "./actions/assign-customer/action";
8
- import { addCustomer } from "./actions/add-customer/action";
9
- import { editCustomer } from "./actions/edit-customer/action";
10
- import { getCategories } from "./actions/get-categories/action";
11
- import { getOrders } from "./actions/get-orders/action";
12
- import { addCartDiscount } from "./actions/add-cart-discount/action";
13
- import { getContext } from "./actions/get-context/action";
14
- import { getFinalContext } from "./actions/get-final-context/action";
15
- import { addProductDiscount } from "./actions/add-product-discount/action";
16
- import { addProductToCart } from "./actions/add-product-to-cart/action";
17
- import { removeProductFromCart } from "./actions/remove-product-from-cart/action";
18
- import { updateCartItemQuantity } from "./actions/update-cart-item-quantity/action";
2
+ import { exampleFunction } from './actions/example-function/action';
3
+ import { getProducts } from './actions/get-products/action';
4
+ import { addCustomSale } from './actions/add-custom-sale/action';
5
+ import { editCustomSale } from './actions/edit-custom-sale/action';
6
+ import { addNonRevenueItem } from './actions/add-non-revenue-item/action';
7
+ import { getCustomers } from './actions/get-customers/action';
8
+ import { assignCustomer } from './actions/assign-customer/action';
9
+ import { addCustomer } from './actions/add-customer/action';
10
+ import { editCustomer } from './actions/edit-customer/action';
11
+ import { getCategories } from './actions/get-categories/action';
12
+ import { getOrders } from './actions/get-orders/action';
13
+ import { addCartDiscount } from './actions/add-cart-discount/action';
14
+ import { getContext } from './actions/get-context/action';
15
+ import { getFinalContext } from './actions/get-final-context/action';
16
+ import { addProductDiscount } from './actions/add-product-discount/action';
17
+ import { addProductToCart } from './actions/add-product-to-cart/action';
18
+ import { removeProductFromCart } from './actions/remove-product-from-cart/action';
19
+ import { updateCartItemQuantity } from './actions/update-cart-item-quantity/action';
19
20
  // Product Actions
20
- import { addProductNote } from "./actions/add-product-note/action";
21
- import { addProductFee } from "./actions/add-product-fee/action";
22
- import { setActiveProductFee } from "./actions/set-active-product-fee/action";
23
- import { setActiveProductDiscount } from "./actions/set-active-product-discount/action";
24
- import { getActiveProduct } from "./actions/get-active-product/action";
25
- import { setActiveProduct } from "./actions/set-active-product/action";
26
- import { adjustInventory } from "./actions/adjust-inventory/action";
21
+ import { addProductNote } from './actions/add-product-note/action';
22
+ import { addProductFee } from './actions/add-product-fee/action';
23
+ import { setActiveProductFee } from './actions/set-active-product-fee/action';
24
+ import { setActiveProductDiscount } from './actions/set-active-product-discount/action';
25
+ import { getActiveProduct } from './actions/get-active-product/action';
26
+ import { setActiveProduct } from './actions/set-active-product/action';
27
+ import { adjustInventory } from './actions/adjust-inventory/action';
27
28
  // Order Actions
28
- import { addOrderNote } from "./actions/add-order-note/action";
29
- import { addCartFee } from "./actions/add-cart-fee/action";
30
- import { getCurrentCart } from "./actions/get-current-cart/action";
31
- import { clearCart } from "./actions/clear-cart/action";
32
- import { parkOrder } from "./actions/park-order/action";
33
- import { resumeParkedOrder } from "./actions/resume-parked-order/action";
34
- import { deleteParkedOrder } from "./actions/delete-parked-order/action";
35
- import { cashPayment } from "./actions/cash-payment/action";
36
- import { getCashRoundingAmount } from "./actions/get-cash-rounding-amount/action";
37
- import { tapToPayPayment } from "./actions/tap-to-pay-payment/action";
38
- import { terminalPayment } from "./actions/terminal-payment/action";
39
- import { vendaraPayment } from "./actions/vendara-payment/action";
40
- import { extensionPayment } from "./actions/extension-payment/action";
41
- import { redeemPayment } from "./actions/redeem-payment/action";
42
- import { integrationPayment } from "./actions/integration-payment/action";
29
+ import { addOrderNote } from './actions/add-order-note/action';
30
+ import { addCartFee } from './actions/add-cart-fee/action';
31
+ import { getCurrentCart } from './actions/get-current-cart/action';
32
+ import { clearCart } from './actions/clear-cart/action';
33
+ import { parkOrder } from './actions/park-order/action';
34
+ import { resumeParkedOrder } from './actions/resume-parked-order/action';
35
+ import { deleteParkedOrder } from './actions/delete-parked-order/action';
36
+ import { cashPayment } from './actions/cash-payment/action';
37
+ import { getCashRoundingAmount } from './actions/get-cash-rounding-amount/action';
38
+ import { tapToPayPayment } from './actions/tap-to-pay-payment/action';
39
+ import { terminalPayment } from './actions/terminal-payment/action';
40
+ import { vendaraPayment } from './actions/vendara-payment/action';
41
+ import { extensionPayment } from './actions/extension-payment/action';
42
+ import { redeemPayment } from './actions/redeem-payment/action';
43
+ import { integrationPayment } from './actions/integration-payment/action';
43
44
  // Customer Actions
44
- import { addCustomerNote } from "./actions/add-customer-note/action";
45
- import { removeCustomerNote } from "./actions/remove-customer-note/action";
46
- import { removeCustomerFromCart } from "./actions/remove-customer-from-cart/action";
47
- import { removeCartDiscount } from "./actions/remove-cart-discount/action";
45
+ import { addCustomerNote } from './actions/add-customer-note/action';
46
+ import { removeCustomerNote } from './actions/remove-customer-note/action';
47
+ import { removeCustomerFromCart } from './actions/remove-customer-from-cart/action';
48
+ import { removeCartDiscount } from './actions/remove-cart-discount/action';
48
49
  // System Actions
49
- import { goToStationHome } from "./actions/go-to-station-home/action";
50
- import { openCashDrawer } from "./actions/open-cash-drawer/action";
51
- import { showNotification } from "./actions/show-notification/action";
52
- import { showConfirmation } from "./actions/show-confirmation/action";
53
- import { authenticateUser } from "./actions/authenticate-user/action";
54
- import { partialPayment } from "./actions/partial-payment/action";
55
- import { switchUser } from "./actions/switch-user/action";
56
- import { print } from "./actions/print/action";
57
- import { setActiveOrder } from "./actions/set-active-order/action";
58
- import { getActiveOrder } from "./actions/get-active-order/action";
59
- import { getActiveCustomer } from "./actions/get-active-customer/action";
60
- import { setActiveCustomer } from "./actions/set-active-customer/action";
61
- import { getActiveOutlet } from "./actions/get-active-outlet/action";
62
- import { getActiveStation } from "./actions/get-active-station/action";
63
- import { getActiveSession } from "./actions/get-active-session/action";
64
- import { getActiveUser } from "./actions/get-active-user/action";
65
- import { setActiveUser } from "./actions/set-active-user/action";
66
- import { setActiveRefund } from "./actions/set-active-refund/action";
50
+ import { goToStationHome } from './actions/go-to-station-home/action';
51
+ import { openCashDrawer } from './actions/open-cash-drawer/action';
52
+ import { showNotification } from './actions/show-notification/action';
53
+ import { showConfirmation } from './actions/show-confirmation/action';
54
+ import { authenticateUser } from './actions/authenticate-user/action';
55
+ import { partialPayment } from './actions/partial-payment/action';
56
+ import { switchUser } from './actions/switch-user/action';
57
+ import { print } from './actions/print/action';
58
+ import { setActiveOrder } from './actions/set-active-order/action';
59
+ import { getActiveOrder } from './actions/get-active-order/action';
60
+ import { getActiveCustomer } from './actions/get-active-customer/action';
61
+ import { setActiveCustomer } from './actions/set-active-customer/action';
62
+ import { getActiveOutlet } from './actions/get-active-outlet/action';
63
+ import { getActiveStation } from './actions/get-active-station/action';
64
+ import { getActiveSession } from './actions/get-active-session/action';
65
+ import { getActiveUser } from './actions/get-active-user/action';
66
+ import { setActiveUser } from './actions/set-active-user/action';
67
+ import { setActiveRefund } from './actions/set-active-refund/action';
67
68
  // Remove Actions
68
- import { removeProductDiscount } from "./actions/remove-product-discount/action";
69
- import { removeProductFee } from "./actions/remove-product-fee/action";
70
- import { removeProductNote } from "./actions/remove-product-note/action";
71
- import { removeCartFee } from "./actions/remove-cart-fee/action";
72
- import { removeOrderNote } from "./actions/remove-order-note/action";
73
- import { removeCustomSale } from "./actions/remove-custom-sale/action";
74
- import { removeNonRevenueItem } from "./actions/remove-non-revenue-item/action";
69
+ import { removeProductDiscount } from './actions/remove-product-discount/action';
70
+ import { removeProductFee } from './actions/remove-product-fee/action';
71
+ import { removeProductNote } from './actions/remove-product-note/action';
72
+ import { removeCartFee } from './actions/remove-cart-fee/action';
73
+ import { removeOrderNote } from './actions/remove-order-note/action';
74
+ import { removeCustomSale } from './actions/remove-custom-sale/action';
75
+ import { removeNonRevenueItem } from './actions/remove-non-revenue-item/action';
75
76
  // Integration Actions
76
77
  // Receipt send Actions
77
- import { sendEmail } from "./actions/send-email/action";
78
- import { sendSms } from "./actions/send-sms/action";
78
+ import { sendEmail } from './actions/send-email/action';
79
+ import { sendSms } from './actions/send-sms/action';
79
80
  // Refund Actions
80
- import { getRefunds } from "./actions/get-refunds/action";
81
- import { initiateRefund } from "./actions/initiate-refund/action";
82
- import { setRefundStockAction } from "./actions/set-refund-stock-action/action";
83
- import { selectAllRefundItems } from "./actions/select-all-refund-items/action";
84
- import { resetRefundDetails } from "./actions/reset-refund-details/action";
85
- import { calculateRefundTotal } from "./actions/calculate-refund-total/action";
86
- import { getRemainingRefundableQuantities } from "./actions/get-remaining-refundable-quantities/action";
87
- import { processPartialRefund } from "./actions/process-partial-refund/action";
81
+ import { getRefunds } from './actions/get-refunds/action';
82
+ import { initiateRefund } from './actions/initiate-refund/action';
83
+ import { setRefundStockAction } from './actions/set-refund-stock-action/action';
84
+ import { selectAllRefundItems } from './actions/select-all-refund-items/action';
85
+ import { resetRefundDetails } from './actions/reset-refund-details/action';
86
+ import { calculateRefundTotal } from './actions/calculate-refund-total/action';
87
+ import { getRemainingRefundableQuantities } from './actions/get-remaining-refundable-quantities/action';
88
+ import { processPartialRefund } from './actions/process-partial-refund/action';
88
89
  // Custom Tables Actions
89
- import { getCustomTables } from "./actions/get-custom-tables/action";
90
- import { getCustomTableFields } from "./actions/get-custom-table-fields/action";
91
- import { getCustomTableData } from "./actions/get-custom-table-data/action";
92
- import { upsertCustomTableData } from "./actions/upsert-custom-table-data/action";
93
- import { deleteCustomTableData } from "./actions/delete-custom-table-data/action";
90
+ import { getCustomTables } from './actions/get-custom-tables/action';
91
+ import { getCustomTableFields } from './actions/get-custom-table-fields/action';
92
+ import { getCustomTableData } from './actions/get-custom-table-data/action';
93
+ import { upsertCustomTableData } from './actions/upsert-custom-table-data/action';
94
+ import { deleteCustomTableData } from './actions/delete-custom-table-data/action';
94
95
  // Custom Extensions Actions
95
- import { getCustomExtensions } from "./actions/get-custom-extensions/action";
96
- import { getCurrentCompanyCustomExtensions } from "./actions/get-current-company-custom-extensions/action";
97
- import { getCustomExtensionCustomTables } from "./actions/get-custom-extension-custom-tables/action";
96
+ import { getCustomExtensions } from './actions/get-custom-extensions/action';
97
+ import { getCurrentCompanyCustomExtensions } from './actions/get-current-company-custom-extensions/action';
98
+ import { getCustomExtensionCustomTables } from './actions/get-custom-extension-custom-tables/action';
98
99
  // Company Data Actions
99
- import { getUsers } from "./actions/get-users/action";
100
- import { getRoles } from "./actions/get-roles/action";
101
- import { getSecretsKeys } from "./actions/get-secrets-keys/action";
102
- import { getSecretVal } from "./actions/get-secret-val/action";
103
- import { setSecretVal } from "./actions/set-secret-val/action";
104
- import { generateAPIKey } from "./actions/generate-api-key/action";
100
+ import { getUsers } from './actions/get-users/action';
101
+ import { getRoles } from './actions/get-roles/action';
102
+ import { getSecretsKeys } from './actions/get-secrets-keys/action';
103
+ import { getSecretVal } from './actions/get-secret-val/action';
104
+ import { setSecretVal } from './actions/set-secret-val/action';
105
+ import { generateAPIKey } from './actions/generate-api-key/action';
105
106
  // State Machine Query Actions
106
- import { canTransition } from "./actions/can-transition/action";
107
- import { getAvailableTransitions } from "./actions/get-available-transitions/action";
108
- import { applyTransition } from "./actions/apply-transition/action";
107
+ import { canTransition } from './actions/can-transition/action';
108
+ import { getAvailableTransitions } from './actions/get-available-transitions/action';
109
+ import { applyTransition } from './actions/apply-transition/action';
109
110
  // Product CRUD Actions
110
- import { addProduct } from "./actions/add-product/action";
111
- import { editProduct } from "./actions/edit-product/action";
112
- import { editProductVariants } from "./actions/edit-product-variants/action";
113
- import { deleteProduct } from "./actions/delete-product/action";
111
+ import { addProduct } from './actions/add-product/action';
112
+ import { editProduct } from './actions/edit-product/action';
113
+ import { editProductVariants } from './actions/edit-product-variants/action';
114
+ import { deleteProduct } from './actions/delete-product/action';
114
115
  // Entity Actions
115
- import { getOutlets } from "./actions/get-outlets/action";
116
- import { getStations } from "./actions/get-stations/action";
116
+ import { getOutlets } from './actions/get-outlets/action';
117
+ import { getStations } from './actions/get-stations/action';
117
118
  // SmartGrid Actions
118
- import { getSmartGridLayout } from "./actions/get-smart-grid-layout/action";
119
- import { saveSmartGridLayout } from "./actions/save-smart-grid-layout/action";
119
+ import { getSmartGridLayout } from './actions/get-smart-grid-layout/action';
120
+ import { saveSmartGridLayout } from './actions/save-smart-grid-layout/action';
120
121
  // Manage extension actions (optional hosts: Deerlake, etc.)
121
- import { navigateTo } from "./actions/navigate-to/action";
122
- import { refreshResource } from "./actions/refresh-resource/action";
123
- import { getMedia } from "./actions/get-media/action";
124
- import { uploadMedia } from "./actions/upload-media/action";
125
- import { getTaxTables } from "./actions/get-tax-tables/action";
126
- import { getBranding } from "./actions/get-branding/action";
122
+ import { navigateTo } from './actions/navigate-to/action';
123
+ import { refreshResource } from './actions/refresh-resource/action';
124
+ import { getMedia } from './actions/get-media/action';
125
+ import { uploadMedia } from './actions/upload-media/action';
126
+ import { getTaxTables } from './actions/get-tax-tables/action';
127
+ import { getBranding } from './actions/get-branding/action';
127
128
  // Export actions as command object
128
129
  export const command = {
129
130
  exampleFunction,
130
131
  generateAPIKey,
131
132
  getProducts,
132
133
  addCustomSale,
134
+ editCustomSale,
133
135
  addNonRevenueItem,
134
136
  getCustomers,
135
137
  assignCustomer,
@@ -251,45 +253,45 @@ export const command = {
251
253
  // State Machine Queries
252
254
  canTransition,
253
255
  getAvailableTransitions,
254
- applyTransition
256
+ applyTransition,
255
257
  };
256
258
  // Export Common Types
257
- export * from "./CommonTypes";
259
+ export * from './CommonTypes';
258
260
  // Mock database override (standalone / extension dev)
259
- export { setMockDatabase, setMockActiveProduct } from "./demo/database";
261
+ export { setMockDatabase, setMockActiveProduct } from './demo/database';
260
262
  // Export Provider
261
- export { CommandFrameProvider } from "./provider";
263
+ export { CommandFrameProvider } from './provider';
262
264
  // Export Render Project
263
- export * from "./projects/render";
265
+ export * from './projects/render';
264
266
  // Export Manage Project
265
- export * from "./projects/manage";
267
+ export * from './projects/manage';
266
268
  // Export client
267
- export { commandFrameClient, CommandFrameClient } from "./client";
269
+ export { commandFrameClient, CommandFrameClient } from './client';
268
270
  // Export Pub/Sub
269
- export { topics } from "./pubsub/topics";
271
+ export { topics } from './pubsub/topics';
270
272
  // Export Hooks (extension iframe API for session-scoped event callbacks)
271
- export { hooks } from "./hooks";
273
+ export { hooks } from './hooks';
272
274
  // Export Interceptors (extension iframe API for gating host flows)
273
- export { interceptors } from "./interceptors";
275
+ export { interceptors } from './interceptors';
274
276
  // Export Pub/Sub Topics
275
- export { customersTopic } from "./pubsub/topics/customers";
276
- export { ordersTopic } from "./pubsub/topics/orders";
277
- export { refundsTopic } from "./pubsub/topics/refunds";
278
- export { productsTopic } from "./pubsub/topics/products";
279
- export { cartTopic } from "./pubsub/topics/cart";
280
- export { paymentsTopic } from "./pubsub/topics/payments";
281
- export { splitPaymentsTopic } from "./pubsub/topics/split-payments";
282
- export { customTablesTopic } from "./pubsub/topics/custom-tables";
283
- export { printTopic } from "./pubsub/topics/print";
284
- export { outletTopic } from "./pubsub/topics/outlet";
285
- export { stationTopic } from "./pubsub/topics/station";
286
- export { sessionTopic } from "./pubsub/topics/session";
287
- export { usersTopic } from "./pubsub/topics/users";
288
- export { variantsTopic } from "./pubsub/topics/variants";
289
- export { transactionsTopic } from "./pubsub/topics/transactions";
290
- export { categoriesTopic } from "./pubsub/topics/categories";
291
- export { attributesTopic } from "./pubsub/topics/attributes";
277
+ export { customersTopic } from './pubsub/topics/customers';
278
+ export { ordersTopic } from './pubsub/topics/orders';
279
+ export { refundsTopic } from './pubsub/topics/refunds';
280
+ export { productsTopic } from './pubsub/topics/products';
281
+ export { cartTopic } from './pubsub/topics/cart';
282
+ export { paymentsTopic } from './pubsub/topics/payments';
283
+ export { splitPaymentsTopic } from './pubsub/topics/split-payments';
284
+ export { customTablesTopic } from './pubsub/topics/custom-tables';
285
+ export { printTopic } from './pubsub/topics/print';
286
+ export { outletTopic } from './pubsub/topics/outlet';
287
+ export { stationTopic } from './pubsub/topics/station';
288
+ export { sessionTopic } from './pubsub/topics/session';
289
+ export { usersTopic } from './pubsub/topics/users';
290
+ export { variantsTopic } from './pubsub/topics/variants';
291
+ export { transactionsTopic } from './pubsub/topics/transactions';
292
+ export { categoriesTopic } from './pubsub/topics/categories';
293
+ export { attributesTopic } from './pubsub/topics/attributes';
292
294
  // Export Custom Tables Types
293
- export { AttributeType } from "./common-types/attribute-type";
295
+ export { AttributeType } from './common-types/attribute-type';
294
296
  // State Machine Fragments
295
- export { preorderNoDepositFragment } from "./fragments";
297
+ export { preorderNoDepositFragment } from './fragments';
@@ -1,2 +1,2 @@
1
- import { RenderProviderActions } from "./types";
1
+ import { RenderProviderActions } from './types';
2
2
  export declare const RENDER_MOCKS: RenderProviderActions;
@@ -1,103 +1,105 @@
1
- import { mockAddCartDiscount } from "../../actions/add-cart-discount/mock";
2
- import { mockAddCartFee } from "../../actions/add-cart-fee/mock";
3
- import { mockRemoveCartFee } from "../../actions/remove-cart-fee/mock";
4
- import { mockAddCustomSale } from "../../actions/add-custom-sale/mock";
5
- import { mockRemoveCustomSale } from "../../actions/remove-custom-sale/mock";
6
- import { mockAddCustomer } from "../../actions/add-customer/mock";
7
- import { mockAddCustomerNote } from "../../actions/add-customer-note/mock";
8
- import { mockRemoveCustomerNote } from "../../actions/remove-customer-note/mock";
9
- import { mockEditCustomer } from "../../actions/edit-customer/mock";
10
- import { mockAddOrderNote } from "../../actions/add-order-note/mock";
11
- import { mockRemoveOrderNote } from "../../actions/remove-order-note/mock";
12
- import { mockAddProductDiscount } from "../../actions/add-product-discount/mock";
13
- import { mockAddProductFee } from "../../actions/add-product-fee/mock";
14
- import { mockRemoveProductDiscount } from "../../actions/remove-product-discount/mock";
15
- import { mockRemoveProductFee } from "../../actions/remove-product-fee/mock";
16
- import { mockSetActiveProductFee } from "../../actions/set-active-product-fee/mock";
17
- import { mockSetActiveProductDiscount } from "../../actions/set-active-product-discount/mock";
18
- import { mockGetActiveProduct } from "../../actions/get-active-product/mock";
19
- import { mockSetActiveProduct } from "../../actions/set-active-product/mock";
20
- import { mockAddProductNote } from "../../actions/add-product-note/mock";
21
- import { mockAddProductToCart } from "../../actions/add-product-to-cart/mock";
22
- import { mockRemoveProductFromCart } from "../../actions/remove-product-from-cart/mock";
23
- import { mockRemoveCartDiscount } from "../../actions/remove-cart-discount/mock";
24
- import { mockUpdateCartItemQuantity } from "../../actions/update-cart-item-quantity/mock";
25
- import { mockAdjustInventory } from "../../actions/adjust-inventory/mock";
26
- import { mockAssignCustomer } from "../../actions/assign-customer/mock";
27
- import { mockAuthenticateUser } from "../../actions/authenticate-user/mock";
28
- import { mockCalculateRefundTotal } from "../../actions/calculate-refund-total/mock";
29
- import { mockCashPayment } from "../../actions/cash-payment/mock";
30
- import { mockGetCashRoundingAmount } from "../../actions/get-cash-rounding-amount/mock";
31
- import { mockClearCart } from "../../actions/clear-cart/mock";
32
- import { mockDeleteParkedOrder } from "../../actions/delete-parked-order/mock";
33
- import { mockExampleFunction } from "../../actions/example-function/mock";
34
- import { mockGetCategories } from "../../actions/get-categories/mock";
35
- import { mockGetContext } from "../../actions/get-context/mock";
36
- import { mockGetCurrentCart } from "../../actions/get-current-cart/mock";
37
- import { mockGetCustomers } from "../../actions/get-customers/mock";
38
- import { mockGetOrders } from "../../actions/get-orders/mock";
39
- import { mockGetProducts } from "../../actions/get-products/mock";
40
- import { mockGetRefunds } from "../../actions/get-refunds/mock";
41
- import { mockGetTaxTables } from "../../actions/get-tax-tables/mock";
42
- import { mockGetRemainingRefundableQuantities } from "../../actions/get-remaining-refundable-quantities/mock";
43
- import { mockGoToStationHome } from "../../actions/go-to-station-home/mock";
44
- import { mockInitiateRefund } from "../../actions/initiate-refund/mock";
45
- import { mockOpenExtensionOverlay } from "../../actions/open-extension-overlay/mock";
46
- import { mockResolveExtensionOverlay } from "../../actions/resolve-extension-overlay/mock";
47
- import { mockOpenCashDrawer } from "../../actions/open-cash-drawer/mock";
48
- import { mockParkOrder } from "../../actions/park-order/mock";
49
- import { mockPartialPayment } from "../../actions/partial-payment/mock";
50
- import { mockProcessPartialRefund } from "../../actions/process-partial-refund/mock";
51
- import { mockRemoveCustomerFromCart } from "../../actions/remove-customer-from-cart/mock";
52
- import { mockResetRefundDetails } from "../../actions/reset-refund-details/mock";
53
- import { mockResumeParkedOrder } from "../../actions/resume-parked-order/mock";
54
- import { mockSelectAllRefundItems } from "../../actions/select-all-refund-items/mock";
55
- import { mockSetRefundStockAction } from "../../actions/set-refund-stock-action/mock";
56
- import { mockShowConfirmation } from "../../actions/show-confirmation/mock";
57
- import { mockShowNotification } from "../../actions/show-notification/mock";
58
- import { mockSwitchUser } from "../../actions/switch-user/mock";
59
- import { mockTapToPayPayment } from "../../actions/tap-to-pay-payment/mock";
60
- import { mockTerminalPayment } from "../../actions/terminal-payment/mock";
61
- import { mockVendaraPayment } from "../../actions/vendara-payment/mock";
62
- import { mockExtensionPayment } from "../../actions/extension-payment/mock";
63
- import { mockRedeemPayment } from "../../actions/redeem-payment/mock";
64
- import { mockIntegrationPayment } from "../../actions/integration-payment/mock";
65
- import { mockAddNonRevenueItem } from "../../actions/add-non-revenue-item/mock";
66
- import { mockGetFinalContext } from "../../actions/get-final-context/mock";
67
- import { mockPrint } from "../../actions/print/mock";
68
- import { mockSetActiveOrder } from "../../actions/set-active-order/mock";
69
- import { mockGetCustomTables } from "../../actions/get-custom-tables/mock";
70
- import { mockGetCustomTableData } from "../../actions/get-custom-table-data/mock";
71
- import { mockGetCustomTableFields } from "../../actions/get-custom-table-fields/mock";
72
- import { mockUpsertCustomTableData } from "../../actions/upsert-custom-table-data/mock";
73
- import { mockDeleteCustomTableData } from "../../actions/delete-custom-table-data/mock";
74
- import { mockGetCustomExtensions } from "../../actions/get-custom-extensions/mock";
75
- import { mockGetCurrentCompanyCustomExtensions } from "../../actions/get-current-company-custom-extensions/mock";
76
- import { mockGetCustomExtensionCustomTables } from "../../actions/get-custom-extension-custom-tables/mock";
77
- import { mockGetSecretsKeys } from "../../actions/get-secrets-keys/mock";
78
- import { mockGetSecretVal } from "../../actions/get-secret-val/mock";
79
- import { mockSetSecretVal } from "../../actions/set-secret-val/mock";
80
- import { mockGetUsers } from "../../actions/get-users/mock";
81
- import { mockGetRoles } from "../../actions/get-roles/mock";
82
- import { mockGetActiveOrder } from "../../actions/get-active-order/mock";
83
- import { mockGetActiveCustomer } from "../../actions/get-active-customer/mock";
84
- import { mockSetActiveCustomer } from "../../actions/set-active-customer/mock";
85
- import { mockGetActiveOutlet } from "../../actions/get-active-outlet/mock";
86
- import { mockGetActiveStation } from "../../actions/get-active-station/mock";
87
- import { mockGetActiveSession } from "../../actions/get-active-session/mock";
88
- import { mockGetActiveUser } from "../../actions/get-active-user/mock";
89
- import { mockSetActiveUser } from "../../actions/set-active-user/mock";
90
- import { mockSetActiveRefund } from "../../actions/set-active-refund/mock";
91
- import { canTransitionMock } from "../../actions/can-transition/mock";
92
- import { getAvailableTransitionsMock } from "../../actions/get-available-transitions/mock";
93
- import { mockGetSmartGridLayout } from "../../actions/get-smart-grid-layout/mock";
94
- import { mockSaveSmartGridLayout } from "../../actions/save-smart-grid-layout/mock";
95
- import { mockSendEmail } from "../../actions/send-email/mock";
96
- import { mockSendSms } from "../../actions/send-sms/mock";
1
+ import { mockAddCartDiscount } from '../../actions/add-cart-discount/mock';
2
+ import { mockAddCartFee } from '../../actions/add-cart-fee/mock';
3
+ import { mockRemoveCartFee } from '../../actions/remove-cart-fee/mock';
4
+ import { mockAddCustomSale } from '../../actions/add-custom-sale/mock';
5
+ import { mockEditCustomSale } from '../../actions/edit-custom-sale/mock';
6
+ import { mockRemoveCustomSale } from '../../actions/remove-custom-sale/mock';
7
+ import { mockAddCustomer } from '../../actions/add-customer/mock';
8
+ import { mockAddCustomerNote } from '../../actions/add-customer-note/mock';
9
+ import { mockRemoveCustomerNote } from '../../actions/remove-customer-note/mock';
10
+ import { mockEditCustomer } from '../../actions/edit-customer/mock';
11
+ import { mockAddOrderNote } from '../../actions/add-order-note/mock';
12
+ import { mockRemoveOrderNote } from '../../actions/remove-order-note/mock';
13
+ import { mockAddProductDiscount } from '../../actions/add-product-discount/mock';
14
+ import { mockAddProductFee } from '../../actions/add-product-fee/mock';
15
+ import { mockRemoveProductDiscount } from '../../actions/remove-product-discount/mock';
16
+ import { mockRemoveProductFee } from '../../actions/remove-product-fee/mock';
17
+ import { mockSetActiveProductFee } from '../../actions/set-active-product-fee/mock';
18
+ import { mockSetActiveProductDiscount } from '../../actions/set-active-product-discount/mock';
19
+ import { mockGetActiveProduct } from '../../actions/get-active-product/mock';
20
+ import { mockSetActiveProduct } from '../../actions/set-active-product/mock';
21
+ import { mockAddProductNote } from '../../actions/add-product-note/mock';
22
+ import { mockAddProductToCart } from '../../actions/add-product-to-cart/mock';
23
+ import { mockRemoveProductFromCart } from '../../actions/remove-product-from-cart/mock';
24
+ import { mockRemoveCartDiscount } from '../../actions/remove-cart-discount/mock';
25
+ import { mockUpdateCartItemQuantity } from '../../actions/update-cart-item-quantity/mock';
26
+ import { mockAdjustInventory } from '../../actions/adjust-inventory/mock';
27
+ import { mockAssignCustomer } from '../../actions/assign-customer/mock';
28
+ import { mockAuthenticateUser } from '../../actions/authenticate-user/mock';
29
+ import { mockCalculateRefundTotal } from '../../actions/calculate-refund-total/mock';
30
+ import { mockCashPayment } from '../../actions/cash-payment/mock';
31
+ import { mockGetCashRoundingAmount } from '../../actions/get-cash-rounding-amount/mock';
32
+ import { mockClearCart } from '../../actions/clear-cart/mock';
33
+ import { mockDeleteParkedOrder } from '../../actions/delete-parked-order/mock';
34
+ import { mockExampleFunction } from '../../actions/example-function/mock';
35
+ import { mockGetCategories } from '../../actions/get-categories/mock';
36
+ import { mockGetContext } from '../../actions/get-context/mock';
37
+ import { mockGetCurrentCart } from '../../actions/get-current-cart/mock';
38
+ import { mockGetCustomers } from '../../actions/get-customers/mock';
39
+ import { mockGetOrders } from '../../actions/get-orders/mock';
40
+ import { mockGetProducts } from '../../actions/get-products/mock';
41
+ import { mockGetRefunds } from '../../actions/get-refunds/mock';
42
+ import { mockGetTaxTables } from '../../actions/get-tax-tables/mock';
43
+ import { mockGetRemainingRefundableQuantities } from '../../actions/get-remaining-refundable-quantities/mock';
44
+ import { mockGoToStationHome } from '../../actions/go-to-station-home/mock';
45
+ import { mockInitiateRefund } from '../../actions/initiate-refund/mock';
46
+ import { mockOpenExtensionOverlay } from '../../actions/open-extension-overlay/mock';
47
+ import { mockResolveExtensionOverlay } from '../../actions/resolve-extension-overlay/mock';
48
+ import { mockOpenCashDrawer } from '../../actions/open-cash-drawer/mock';
49
+ import { mockParkOrder } from '../../actions/park-order/mock';
50
+ import { mockPartialPayment } from '../../actions/partial-payment/mock';
51
+ import { mockProcessPartialRefund } from '../../actions/process-partial-refund/mock';
52
+ import { mockRemoveCustomerFromCart } from '../../actions/remove-customer-from-cart/mock';
53
+ import { mockResetRefundDetails } from '../../actions/reset-refund-details/mock';
54
+ import { mockResumeParkedOrder } from '../../actions/resume-parked-order/mock';
55
+ import { mockSelectAllRefundItems } from '../../actions/select-all-refund-items/mock';
56
+ import { mockSetRefundStockAction } from '../../actions/set-refund-stock-action/mock';
57
+ import { mockShowConfirmation } from '../../actions/show-confirmation/mock';
58
+ import { mockShowNotification } from '../../actions/show-notification/mock';
59
+ import { mockSwitchUser } from '../../actions/switch-user/mock';
60
+ import { mockTapToPayPayment } from '../../actions/tap-to-pay-payment/mock';
61
+ import { mockTerminalPayment } from '../../actions/terminal-payment/mock';
62
+ import { mockVendaraPayment } from '../../actions/vendara-payment/mock';
63
+ import { mockExtensionPayment } from '../../actions/extension-payment/mock';
64
+ import { mockRedeemPayment } from '../../actions/redeem-payment/mock';
65
+ import { mockIntegrationPayment } from '../../actions/integration-payment/mock';
66
+ import { mockAddNonRevenueItem } from '../../actions/add-non-revenue-item/mock';
67
+ import { mockGetFinalContext } from '../../actions/get-final-context/mock';
68
+ import { mockPrint } from '../../actions/print/mock';
69
+ import { mockSetActiveOrder } from '../../actions/set-active-order/mock';
70
+ import { mockGetCustomTables } from '../../actions/get-custom-tables/mock';
71
+ import { mockGetCustomTableData } from '../../actions/get-custom-table-data/mock';
72
+ import { mockGetCustomTableFields } from '../../actions/get-custom-table-fields/mock';
73
+ import { mockUpsertCustomTableData } from '../../actions/upsert-custom-table-data/mock';
74
+ import { mockDeleteCustomTableData } from '../../actions/delete-custom-table-data/mock';
75
+ import { mockGetCustomExtensions } from '../../actions/get-custom-extensions/mock';
76
+ import { mockGetCurrentCompanyCustomExtensions } from '../../actions/get-current-company-custom-extensions/mock';
77
+ import { mockGetCustomExtensionCustomTables } from '../../actions/get-custom-extension-custom-tables/mock';
78
+ import { mockGetSecretsKeys } from '../../actions/get-secrets-keys/mock';
79
+ import { mockGetSecretVal } from '../../actions/get-secret-val/mock';
80
+ import { mockSetSecretVal } from '../../actions/set-secret-val/mock';
81
+ import { mockGetUsers } from '../../actions/get-users/mock';
82
+ import { mockGetRoles } from '../../actions/get-roles/mock';
83
+ import { mockGetActiveOrder } from '../../actions/get-active-order/mock';
84
+ import { mockGetActiveCustomer } from '../../actions/get-active-customer/mock';
85
+ import { mockSetActiveCustomer } from '../../actions/set-active-customer/mock';
86
+ import { mockGetActiveOutlet } from '../../actions/get-active-outlet/mock';
87
+ import { mockGetActiveStation } from '../../actions/get-active-station/mock';
88
+ import { mockGetActiveSession } from '../../actions/get-active-session/mock';
89
+ import { mockGetActiveUser } from '../../actions/get-active-user/mock';
90
+ import { mockSetActiveUser } from '../../actions/set-active-user/mock';
91
+ import { mockSetActiveRefund } from '../../actions/set-active-refund/mock';
92
+ import { canTransitionMock } from '../../actions/can-transition/mock';
93
+ import { getAvailableTransitionsMock } from '../../actions/get-available-transitions/mock';
94
+ import { mockGetSmartGridLayout } from '../../actions/get-smart-grid-layout/mock';
95
+ import { mockSaveSmartGridLayout } from '../../actions/save-smart-grid-layout/mock';
96
+ import { mockSendEmail } from '../../actions/send-email/mock';
97
+ import { mockSendSms } from '../../actions/send-sms/mock';
97
98
  export const RENDER_MOCKS = {
98
99
  addCartDiscount: mockAddCartDiscount,
99
100
  addCartFee: mockAddCartFee,
100
101
  addCustomSale: mockAddCustomSale,
102
+ editCustomSale: mockEditCustomSale,
101
103
  addCustomer: mockAddCustomer,
102
104
  editCustomer: mockEditCustomer,
103
105
  addCustomerNote: mockAddCustomerNote,
@@ -186,11 +188,11 @@ export const RENDER_MOCKS = {
186
188
  removeCartFee: mockRemoveCartFee,
187
189
  removeOrderNote: mockRemoveOrderNote,
188
190
  removeCustomSale: mockRemoveCustomSale,
189
- removeNonRevenueItem: params => Promise.resolve({ success: true, externalId: params.externalId, timestamp: new Date().toISOString() }),
191
+ removeNonRevenueItem: (params) => Promise.resolve({ success: true, externalId: params.externalId, timestamp: new Date().toISOString() }),
190
192
  canTransition: canTransitionMock,
191
193
  getAvailableTransitions: getAvailableTransitionsMock,
192
194
  getSmartGridLayout: mockGetSmartGridLayout,
193
195
  saveSmartGridLayout: mockSaveSmartGridLayout,
194
196
  sendEmail: mockSendEmail,
195
- sendSms: mockSendSms
197
+ sendSms: mockSendSms,
196
198
  };