@final-commerce/command-frame 0.14.1-online.3 → 0.15.0-staging.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.
Files changed (86) hide show
  1. package/README.md +10 -0
  2. package/dist/actions/add-booking-to-cart/mock.js +1 -1
  3. package/dist/actions/add-booking-to-cart/types.d.ts +33 -4
  4. package/dist/actions/attach-checkout-contact/types.d.ts +2 -14
  5. package/dist/actions/delete-custom-table-data/mock.js +2 -0
  6. package/dist/actions/get-active-user/mock.js +3 -1
  7. package/dist/actions/get-cash-change/action.d.ts +2 -0
  8. package/dist/actions/get-cash-change/action.js +8 -0
  9. package/dist/actions/get-cash-change/mock.d.ts +2 -0
  10. package/dist/actions/get-cash-change/mock.js +6 -0
  11. package/dist/actions/get-cash-change/types.d.ts +23 -0
  12. package/dist/actions/get-cash-change/types.js +1 -0
  13. package/dist/actions/get-checkout-status/types.d.ts +0 -9
  14. package/dist/actions/get-custom-table-data/mock.d.ts +5 -0
  15. package/dist/actions/get-custom-table-data/mock.js +16 -27
  16. package/dist/actions/get-orders-summary/action.d.ts +2 -0
  17. package/dist/actions/get-orders-summary/action.js +5 -0
  18. package/dist/actions/get-orders-summary/mock.d.ts +2 -0
  19. package/dist/actions/get-orders-summary/mock.js +5 -0
  20. package/dist/actions/get-orders-summary/types.d.ts +24 -0
  21. package/dist/actions/get-orders-summary/types.js +1 -0
  22. package/dist/actions/hold-booking/mock.js +27 -13
  23. package/dist/actions/hold-booking/types.d.ts +35 -6
  24. package/dist/actions/partial-payment/types.d.ts +5 -0
  25. package/dist/actions/process-partial-refund/mock.js +5 -0
  26. package/dist/actions/tap-to-pay-payment/mock.js +2 -1
  27. package/dist/actions/terminal-payment/mock.js +2 -1
  28. package/dist/actions/upsert-custom-table-data/mock.d.ts +6 -0
  29. package/dist/actions/upsert-custom-table-data/mock.js +25 -9
  30. package/dist/demo/database.d.ts +16 -0
  31. package/dist/demo/database.js +18 -2
  32. package/dist/demo/mocks/custom-tables.d.ts +4 -1
  33. package/dist/demo/mocks/custom-tables.js +1 -0
  34. package/dist/index.d.ts +4 -16
  35. package/dist/index.js +4 -17
  36. package/dist/projects/render/mocks.js +4 -16
  37. package/dist/projects/render/types.d.ts +3 -10
  38. package/package.json +2 -2
  39. package/dist/actions/get-address-details/action.d.ts +0 -6
  40. package/dist/actions/get-address-details/action.js +0 -8
  41. package/dist/actions/get-address-details/mock.d.ts +0 -2
  42. package/dist/actions/get-address-details/mock.js +0 -7
  43. package/dist/actions/get-address-details/types.d.ts +0 -22
  44. package/dist/actions/get-address-details/types.js +0 -3
  45. package/dist/actions/get-shopper-account/action.d.ts +0 -6
  46. package/dist/actions/get-shopper-account/action.js +0 -8
  47. package/dist/actions/get-shopper-account/mock.d.ts +0 -3
  48. package/dist/actions/get-shopper-account/mock.js +0 -12
  49. package/dist/actions/get-shopper-account/types.d.ts +0 -46
  50. package/dist/actions/get-shopper-account/types.js +0 -6
  51. package/dist/actions/get-shopper-order/action.d.ts +0 -6
  52. package/dist/actions/get-shopper-order/action.js +0 -8
  53. package/dist/actions/get-shopper-order/mock.d.ts +0 -2
  54. package/dist/actions/get-shopper-order/mock.js +0 -24
  55. package/dist/actions/get-shopper-order/types.d.ts +0 -32
  56. package/dist/actions/get-shopper-order/types.js +0 -6
  57. package/dist/actions/get-shopper-orders/action.d.ts +0 -6
  58. package/dist/actions/get-shopper-orders/action.js +0 -8
  59. package/dist/actions/get-shopper-orders/mock.d.ts +0 -2
  60. package/dist/actions/get-shopper-orders/mock.js +0 -18
  61. package/dist/actions/get-shopper-orders/types.d.ts +0 -29
  62. package/dist/actions/get-shopper-orders/types.js +0 -6
  63. package/dist/actions/request-shopper-code/action.d.ts +0 -6
  64. package/dist/actions/request-shopper-code/action.js +0 -8
  65. package/dist/actions/request-shopper-code/mock.d.ts +0 -2
  66. package/dist/actions/request-shopper-code/mock.js +0 -4
  67. package/dist/actions/request-shopper-code/types.d.ts +0 -17
  68. package/dist/actions/request-shopper-code/types.js +0 -6
  69. package/dist/actions/search-addresses/action.d.ts +0 -6
  70. package/dist/actions/search-addresses/action.js +0 -8
  71. package/dist/actions/search-addresses/mock.d.ts +0 -3
  72. package/dist/actions/search-addresses/mock.js +0 -24
  73. package/dist/actions/search-addresses/types.d.ts +0 -31
  74. package/dist/actions/search-addresses/types.js +0 -5
  75. package/dist/actions/sign-in-shopper/action.d.ts +0 -6
  76. package/dist/actions/sign-in-shopper/action.js +0 -8
  77. package/dist/actions/sign-in-shopper/mock.d.ts +0 -2
  78. package/dist/actions/sign-in-shopper/mock.js +0 -7
  79. package/dist/actions/sign-in-shopper/types.d.ts +0 -19
  80. package/dist/actions/sign-in-shopper/types.js +0 -6
  81. package/dist/actions/sign-out-shopper/action.d.ts +0 -6
  82. package/dist/actions/sign-out-shopper/action.js +0 -8
  83. package/dist/actions/sign-out-shopper/mock.d.ts +0 -2
  84. package/dist/actions/sign-out-shopper/mock.js +0 -4
  85. package/dist/actions/sign-out-shopper/types.d.ts +0 -7
  86. package/dist/actions/sign-out-shopper/types.js +0 -6
@@ -133,6 +133,7 @@ export const MOCK_CUSTOM_TABLE_FIELDS = [
133
133
  updatedAt: "2024-01-03T09:00:00.000Z"
134
134
  }
135
135
  ];
136
+ /** Rows by table name — what getCustomTableData reads and upsertCustomTableData writes. */
136
137
  export const MOCK_CUSTOM_TABLE_DATA = {
137
138
  users: [
138
139
  {
package/dist/index.d.ts CHANGED
@@ -58,6 +58,8 @@ export declare const command: {
58
58
  readonly cashPayment: import(".").CashPayment;
59
59
  readonly recordExternalPayment: import(".").RecordExternalPayment;
60
60
  readonly getCashRoundingAmount: import(".").GetCashRoundingAmount;
61
+ readonly getCashChange: import(".").GetCashChange;
62
+ readonly getOrdersSummary: import(".").GetOrdersSummary;
61
63
  readonly tapToPayPayment: import(".").TapToPayPayment;
62
64
  readonly terminalPayment: import(".").TerminalPayment;
63
65
  readonly extensionPayment: import(".").ExtensionPayment;
@@ -68,20 +70,12 @@ export declare const command: {
68
70
  readonly startCheckout: import(".").StartCheckout;
69
71
  readonly attachCheckoutContact: import(".").AttachCheckoutContact;
70
72
  readonly getAddressOptions: import(".").GetAddressOptions;
71
- readonly searchAddresses: import(".").SearchAddresses;
72
- readonly getAddressDetails: import(".").GetAddressDetails;
73
73
  readonly setOrderAddress: import(".").SetOrderAddress;
74
74
  readonly getShippingOptions: import(".").GetShippingOptions;
75
75
  readonly selectShippingOption: import(".").SelectShippingOption;
76
76
  readonly setOutlet: import(".").SetOutlet;
77
77
  readonly resumeCheckout: import(".").ResumeCheckout;
78
78
  readonly getCheckoutStatus: import(".").GetCheckoutStatus;
79
- readonly getShopperAccount: import(".").GetShopperAccount;
80
- readonly requestShopperCode: import(".").RequestShopperCode;
81
- readonly signInShopper: import(".").SignInShopper;
82
- readonly signOutShopper: import(".").SignOutShopper;
83
- readonly getShopperOrders: import(".").GetShopperOrders;
84
- readonly getShopperOrder: import(".").GetShopperOrder;
85
79
  readonly getMotoConfig: import(".").GetMotoConfig;
86
80
  readonly addCustomerNote: import(".").AddCustomerNote;
87
81
  readonly removeCustomerNote: import(".").RemoveCustomerNote;
@@ -233,6 +227,8 @@ export type { VoidOrder, VoidOrderParams, VoidOrderResponse, VoidOrderOutcome }
233
227
  export type { CashPayment, CashPaymentParams, CashPaymentResponse } from './actions/cash-payment/types';
234
228
  export type { RecordExternalPayment, RecordExternalPaymentParams, RecordExternalPaymentResponse, RecordExternalPaymentTip, } from './actions/record-external-payment/types';
235
229
  export type { GetCashRoundingAmount, GetCashRoundingAmountParams, GetCashRoundingAmountResponse, } from './actions/get-cash-rounding-amount/types';
230
+ export type { GetCashChange, GetCashChangeParams, GetCashChangeResponse } from './actions/get-cash-change/types';
231
+ export type { GetOrdersSummary, GetOrdersSummaryParams, GetOrdersSummaryResponse, } from './actions/get-orders-summary/types';
236
232
  export type { TapToPayPayment, TapToPayPaymentParams, TapToPayPaymentResponse, } from './actions/tap-to-pay-payment/types';
237
233
  export type { TerminalPayment, TerminalPaymentParams, TerminalPaymentResponse } from './actions/terminal-payment/types';
238
234
  export type { ExtensionPayment, ExtensionPaymentParams, ExtensionPaymentResponse, } from './actions/extension-payment/types';
@@ -249,14 +245,6 @@ export type { SelectShippingOption, SelectShippingOptionParams, SelectShippingOp
249
245
  export type { SetOutlet, SetOutletParams, SetOutletResponse } from './actions/set-outlet/types';
250
246
  export type { ResumeCheckout, ResumeCheckoutParams, ResumeCheckoutResponse, ResumeCheckoutResult, } from './actions/resume-checkout/types';
251
247
  export type { GetCheckoutStatus, GetCheckoutStatusParams, GetCheckoutStatusResponse, CheckoutOrderStatus, CheckoutCancelReason, } from './actions/get-checkout-status/types';
252
- export type { GetShopperAccount, GetShopperAccountParams, GetShopperAccountResponse, ShopperCheckoutBox, ShopperAccountView, ShopperAddressView, } from './actions/get-shopper-account/types';
253
- export type { RequestShopperCode, RequestShopperCodeParams, RequestShopperCodeResponse, } from './actions/request-shopper-code/types';
254
- export type { SignInShopper, SignInShopperParams, SignInShopperResponse } from './actions/sign-in-shopper/types';
255
- export type { SignOutShopper, SignOutShopperParams, SignOutShopperResponse } from './actions/sign-out-shopper/types';
256
- export type { SearchAddresses, SearchAddressesParams, SearchAddressesResponse, AddressSuggestion, } from './actions/search-addresses/types';
257
- export type { GetAddressDetails, GetAddressDetailsParams, GetAddressDetailsResponse, AddressDetails, } from './actions/get-address-details/types';
258
- export type { GetShopperOrders, GetShopperOrdersParams, GetShopperOrdersResponse, ShopperOrderView, } from './actions/get-shopper-orders/types';
259
- export type { GetShopperOrder, GetShopperOrderParams, GetShopperOrderResponse, ShopperOrderDetailView, ShopperOrderItemView, } from './actions/get-shopper-order/types';
260
248
  export type { GetMotoConfig, GetMotoConfigResponse, MotoUnavailableReason } from './actions/get-moto-config/types';
261
249
  export type { AddCustomerNote, AddCustomerNoteParams, AddCustomerNoteResponse, } from './actions/add-customer-note/types';
262
250
  export type { RemoveCustomerNote, RemoveCustomerNoteParams, RemoveCustomerNoteResponse, } from './actions/remove-customer-note/types';
package/dist/index.js CHANGED
@@ -58,6 +58,8 @@ import { voidOrder } from './actions/void-order/action';
58
58
  import { cashPayment } from './actions/cash-payment/action';
59
59
  import { recordExternalPayment } from './actions/record-external-payment/action';
60
60
  import { getCashRoundingAmount } from './actions/get-cash-rounding-amount/action';
61
+ import { getCashChange } from './actions/get-cash-change/action';
62
+ import { getOrdersSummary } from './actions/get-orders-summary/action';
61
63
  import { tapToPayPayment } from './actions/tap-to-pay-payment/action';
62
64
  import { terminalPayment } from './actions/terminal-payment/action';
63
65
  import { extensionPayment } from './actions/extension-payment/action';
@@ -68,21 +70,12 @@ import { chargeMoto } from './actions/charge-moto/action';
68
70
  import { startCheckout } from './actions/start-checkout/action';
69
71
  import { attachCheckoutContact } from './actions/attach-checkout-contact/action';
70
72
  import { getAddressOptions } from './actions/get-address-options/action';
71
- import { searchAddresses } from './actions/search-addresses/action';
72
- import { getAddressDetails } from './actions/get-address-details/action';
73
73
  import { setOrderAddress } from './actions/set-order-address/action';
74
74
  import { getShippingOptions } from './actions/get-shipping-options/action';
75
75
  import { selectShippingOption } from './actions/select-shipping-option/action';
76
76
  import { setOutlet } from './actions/set-outlet/action';
77
77
  import { resumeCheckout } from './actions/resume-checkout/action';
78
78
  import { getCheckoutStatus } from './actions/get-checkout-status/action';
79
- // Shopper account (store websites)
80
- import { getShopperAccount } from './actions/get-shopper-account/action';
81
- import { requestShopperCode } from './actions/request-shopper-code/action';
82
- import { signInShopper } from './actions/sign-in-shopper/action';
83
- import { signOutShopper } from './actions/sign-out-shopper/action';
84
- import { getShopperOrders } from './actions/get-shopper-orders/action';
85
- import { getShopperOrder } from './actions/get-shopper-order/action';
86
79
  import { getMotoConfig } from './actions/get-moto-config/action';
87
80
  // Customer Actions
88
81
  import { addCustomerNote } from './actions/add-customer-note/action';
@@ -236,6 +229,8 @@ export const command = {
236
229
  cashPayment,
237
230
  recordExternalPayment,
238
231
  getCashRoundingAmount,
232
+ getCashChange,
233
+ getOrdersSummary,
239
234
  tapToPayPayment,
240
235
  terminalPayment,
241
236
  extensionPayment,
@@ -246,20 +241,12 @@ export const command = {
246
241
  startCheckout,
247
242
  attachCheckoutContact,
248
243
  getAddressOptions,
249
- searchAddresses,
250
- getAddressDetails,
251
244
  setOrderAddress,
252
245
  getShippingOptions,
253
246
  selectShippingOption,
254
247
  setOutlet,
255
248
  resumeCheckout,
256
249
  getCheckoutStatus,
257
- getShopperAccount,
258
- requestShopperCode,
259
- signInShopper,
260
- signOutShopper,
261
- getShopperOrders,
262
- getShopperOrder,
263
250
  getMotoConfig,
264
251
  // Customer Actions
265
252
  addCustomerNote,
@@ -36,6 +36,8 @@ import { mockCalculateRefundTotal } from '../../actions/calculate-refund-total/m
36
36
  import { mockCashPayment } from '../../actions/cash-payment/mock';
37
37
  import { mockRecordExternalPayment } from '../../actions/record-external-payment/mock';
38
38
  import { mockGetCashRoundingAmount } from '../../actions/get-cash-rounding-amount/mock';
39
+ import { mockGetCashChange } from '../../actions/get-cash-change/mock';
40
+ import { mockGetOrdersSummary } from '../../actions/get-orders-summary/mock';
39
41
  import { mockCreatePaymentLink } from '../../actions/create-payment-link/mock';
40
42
  import { mockChargeMoto } from '../../actions/charge-moto/mock';
41
43
  import { mockStartCheckout } from '../../actions/start-checkout/mock';
@@ -48,14 +50,6 @@ import { mockGetOutlets } from '../../actions/get-outlets/mock';
48
50
  import { mockSetOutlet } from '../../actions/set-outlet/mock';
49
51
  import { mockResumeCheckout } from '../../actions/resume-checkout/mock';
50
52
  import { mockGetCheckoutStatus } from '../../actions/get-checkout-status/mock';
51
- import { mockGetShopperAccount } from '../../actions/get-shopper-account/mock';
52
- import { mockRequestShopperCode } from '../../actions/request-shopper-code/mock';
53
- import { mockSignInShopper } from '../../actions/sign-in-shopper/mock';
54
- import { mockSignOutShopper } from '../../actions/sign-out-shopper/mock';
55
- import { mockGetShopperOrders } from '../../actions/get-shopper-orders/mock';
56
- import { mockSearchAddresses } from '../../actions/search-addresses/mock';
57
- import { mockGetAddressDetails } from '../../actions/get-address-details/mock';
58
- import { mockGetShopperOrder } from '../../actions/get-shopper-order/mock';
59
53
  import { mockGetMotoConfig } from '../../actions/get-moto-config/mock';
60
54
  import { mockGetTimeClockStatus } from '../../actions/get-time-clock-status/mock';
61
55
  import { mockClearCart } from '../../actions/clear-cart/mock';
@@ -174,13 +168,13 @@ export const RENDER_MOCKS = {
174
168
  cashPayment: mockCashPayment,
175
169
  recordExternalPayment: mockRecordExternalPayment,
176
170
  getCashRoundingAmount: mockGetCashRoundingAmount,
171
+ getCashChange: mockGetCashChange,
172
+ getOrdersSummary: mockGetOrdersSummary,
177
173
  createPaymentLink: mockCreatePaymentLink,
178
174
  chargeMoto: mockChargeMoto,
179
175
  startCheckout: mockStartCheckout,
180
176
  attachCheckoutContact: mockAttachCheckoutContact,
181
177
  getAddressOptions: mockGetAddressOptions,
182
- searchAddresses: mockSearchAddresses,
183
- getAddressDetails: mockGetAddressDetails,
184
178
  setOrderAddress: mockSetOrderAddress,
185
179
  getShippingOptions: mockGetShippingOptions,
186
180
  selectShippingOption: mockSelectShippingOption,
@@ -188,12 +182,6 @@ export const RENDER_MOCKS = {
188
182
  setOutlet: mockSetOutlet,
189
183
  resumeCheckout: mockResumeCheckout,
190
184
  getCheckoutStatus: mockGetCheckoutStatus,
191
- getShopperAccount: mockGetShopperAccount,
192
- requestShopperCode: mockRequestShopperCode,
193
- signInShopper: mockSignInShopper,
194
- signOutShopper: mockSignOutShopper,
195
- getShopperOrders: mockGetShopperOrders,
196
- getShopperOrder: mockGetShopperOrder,
197
185
  getMotoConfig: mockGetMotoConfig,
198
186
  clearCart: mockClearCart,
199
187
  deleteParkedOrder: mockDeleteParkedOrder,
@@ -1,4 +1,4 @@
1
- import type { ExampleFunction, GetProducts, AddCustomSale, EditCustomSale, GetCustomers, AssignCustomer, AddCustomer, EditCustomer, GetCategories, GetOrders, GetRefunds, GetTaxTables, GetCustomStockActions, AddProductDiscount, AddProductToCart, RemoveProductFromCart, UpdateCartItemQuantity, AddCartDiscount, GetContext, GetFinalContext, AddProductNote, AddProductFee, GetProductModifierSelections, GetCompositePrice, GetCompositeAvailability, SetProductModifierSelections, SetActiveProductFee, SetActiveProductDiscount, GetActiveProduct, SetActiveProduct, AdjustInventory, SetVariantUnavailable, AddOrderNote, AddCartFee, ClearCart, ParkOrder, ResumeParkedOrder, ResumeOrder, SetOrderMetadata, AssignOrderUser, ReleaseFromCart, SetOrderType, SetScheduledFor, SetOrderStatus, GetOrderStatuses, DeleteParkedOrder, VoidOrder, InitiateRefund, CashPayment, RecordExternalPayment, GetCashRoundingAmount, TapToPayPayment, TerminalPayment, ExtensionPayment, RedeemPayment, AddNonRevenueItem, AddCustomerNote, RemoveCustomerNote, RemoveCustomerFromCart, GoToStationHome, OpenCashDrawer, ShowNotification, ShowConfirmation, AuthenticateUser, PartialPayment, SwitchUser, SetRefundStockAction, SelectAllRefundItems, ResetRefundDetails, CalculateRefundTotal, GetRemainingRefundableQuantities, ProcessPartialRefund, RedeemRefund, GetRefundPlan, CheckPermission, GetCurrentCart, Print, SetActiveOrder, GetCustomTables, GetCustomTableData, UpsertCustomTableData, DeleteCustomTableData, GetCustomExtensions, GetCurrentCompanyCustomExtensions, GetCustomExtensionCustomTables, GetCustomTableFields, GetSecretsKeys, GetSecretVal, SetSecretVal, GetUsers, GetRoles, RemoveCartDiscount, GetActiveOrder, GetActiveCustomer, SetActiveCustomer, GetActiveOutlet, GetActiveStation, GetActiveSession, GetActiveUser, SetActiveUser, SetActiveRefund, RemoveProductDiscount, RemoveProductFee, RemoveProductNote, RemoveCartFee, RemoveOrderNote, RemoveCustomSale, RemoveNonRevenueItem, CanTransition, GetAvailableTransitions, ApplyTransition, IntegrationPayment, GetSmartGridLayout, SaveSmartGridLayout, SendEmail, SendSms, GetBookingResources, GetBookingAvailability, GetBookings, HoldBooking, AddBookingToCart, RemoveBookingFromCart, CancelBooking, CreatePaymentLink, ChargeMoto, StartCheckout, AttachCheckoutContact, GetAddressOptions, SetOrderAddress, GetShippingOptions, SelectShippingOption, GetOutlets, SetOutlet, ResumeCheckout, GetCheckoutStatus, GetShopperAccount, RequestShopperCode, SignInShopper, SignOutShopper, GetShopperOrders, GetShopperOrder, SearchAddresses, GetAddressDetails, GetMotoConfig, GetTimeClockStatus } from '../../index';
1
+ import type { ExampleFunction, GetProducts, AddCustomSale, EditCustomSale, GetCustomers, AssignCustomer, AddCustomer, EditCustomer, GetCategories, GetOrders, GetRefunds, GetTaxTables, GetCustomStockActions, AddProductDiscount, AddProductToCart, RemoveProductFromCart, UpdateCartItemQuantity, AddCartDiscount, GetContext, GetFinalContext, AddProductNote, AddProductFee, GetProductModifierSelections, GetCompositePrice, GetCompositeAvailability, SetProductModifierSelections, SetActiveProductFee, SetActiveProductDiscount, GetActiveProduct, SetActiveProduct, AdjustInventory, SetVariantUnavailable, AddOrderNote, AddCartFee, ClearCart, ParkOrder, ResumeParkedOrder, ResumeOrder, SetOrderMetadata, AssignOrderUser, ReleaseFromCart, SetOrderType, SetScheduledFor, SetOrderStatus, GetOrderStatuses, DeleteParkedOrder, VoidOrder, InitiateRefund, CashPayment, RecordExternalPayment, GetCashRoundingAmount, GetCashChange, GetOrdersSummary, TapToPayPayment, TerminalPayment, ExtensionPayment, RedeemPayment, AddNonRevenueItem, AddCustomerNote, RemoveCustomerNote, RemoveCustomerFromCart, GoToStationHome, OpenCashDrawer, ShowNotification, ShowConfirmation, AuthenticateUser, PartialPayment, SwitchUser, SetRefundStockAction, SelectAllRefundItems, ResetRefundDetails, CalculateRefundTotal, GetRemainingRefundableQuantities, ProcessPartialRefund, RedeemRefund, GetRefundPlan, CheckPermission, GetCurrentCart, Print, SetActiveOrder, GetCustomTables, GetCustomTableData, UpsertCustomTableData, DeleteCustomTableData, GetCustomExtensions, GetCurrentCompanyCustomExtensions, GetCustomExtensionCustomTables, GetCustomTableFields, GetSecretsKeys, GetSecretVal, SetSecretVal, GetUsers, GetRoles, RemoveCartDiscount, GetActiveOrder, GetActiveCustomer, SetActiveCustomer, GetActiveOutlet, GetActiveStation, GetActiveSession, GetActiveUser, SetActiveUser, SetActiveRefund, RemoveProductDiscount, RemoveProductFee, RemoveProductNote, RemoveCartFee, RemoveOrderNote, RemoveCustomSale, RemoveNonRevenueItem, CanTransition, GetAvailableTransitions, ApplyTransition, IntegrationPayment, GetSmartGridLayout, SaveSmartGridLayout, SendEmail, SendSms, GetBookingResources, GetBookingAvailability, GetBookings, HoldBooking, AddBookingToCart, RemoveBookingFromCart, CancelBooking, CreatePaymentLink, ChargeMoto, StartCheckout, AttachCheckoutContact, GetAddressOptions, SetOrderAddress, GetShippingOptions, SelectShippingOption, GetOutlets, SetOutlet, ResumeCheckout, GetCheckoutStatus, GetMotoConfig, GetTimeClockStatus } from '../../index';
2
2
  export interface RenderProviderActions {
3
3
  exampleFunction: ExampleFunction;
4
4
  getProducts: GetProducts;
@@ -58,6 +58,8 @@ export interface RenderProviderActions {
58
58
  cashPayment: CashPayment;
59
59
  recordExternalPayment: RecordExternalPayment;
60
60
  getCashRoundingAmount: GetCashRoundingAmount;
61
+ getCashChange: GetCashChange;
62
+ getOrdersSummary: GetOrdersSummary;
61
63
  tapToPayPayment: TapToPayPayment;
62
64
  terminalPayment: TerminalPayment;
63
65
  extensionPayment: ExtensionPayment;
@@ -74,8 +76,6 @@ export interface RenderProviderActions {
74
76
  attachCheckoutContact: AttachCheckoutContact;
75
77
  /** Shipping, on the till (ship-to) and the website alike. The runtime prices; the flow renders. */
76
78
  getAddressOptions: GetAddressOptions;
77
- searchAddresses: SearchAddresses;
78
- getAddressDetails: GetAddressDetails;
79
79
  setOrderAddress: SetOrderAddress;
80
80
  getShippingOptions: GetShippingOptions;
81
81
  selectShippingOption: SelectShippingOption;
@@ -89,13 +89,6 @@ export interface RenderProviderActions {
89
89
  resumeCheckout: ResumeCheckout;
90
90
  /** Where an online order stands now, by its order password. Storefront-only. */
91
91
  getCheckoutStatus: GetCheckoutStatus;
92
- /** The shopper account on a store's website (sign in, this store's orders). Storefront-only. */
93
- getShopperAccount: GetShopperAccount;
94
- requestShopperCode: RequestShopperCode;
95
- signInShopper: SignInShopper;
96
- signOutShopper: SignOutShopper;
97
- getShopperOrders: GetShopperOrders;
98
- getShopperOrder: GetShopperOrder;
99
92
  getMotoConfig: GetMotoConfig;
100
93
  addNonRevenueItem: AddNonRevenueItem;
101
94
  addCustomerNote: AddCustomerNote;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@final-commerce/command-frame",
3
- "version": "0.14.1-online.3",
3
+ "version": "0.15.0-staging.1",
4
4
  "description": "Commands Frame library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -57,7 +57,7 @@
57
57
  "ignoreBranchesMissingTickets": true
58
58
  },
59
59
  "dependencies": {
60
- "@final-commerce/common": "2.11.1-online.3"
60
+ "@final-commerce/common": "2.12.0-staging.1"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@commitlint/cli": "^19.0.0",
@@ -1,6 +0,0 @@
1
- /**
2
- * getAddressDetails action
3
- * Calls the getAddressDetails action on the parent window
4
- */
5
- import type { GetAddressDetails } from './types';
6
- export declare const getAddressDetails: GetAddressDetails;
@@ -1,8 +0,0 @@
1
- /**
2
- * getAddressDetails action
3
- * Calls the getAddressDetails action on the parent window
4
- */
5
- import { commandFrameClient } from '../../client';
6
- export const getAddressDetails = async (params) => {
7
- return await commandFrameClient.call('getAddressDetails', params);
8
- };
@@ -1,2 +0,0 @@
1
- import type { GetAddressDetails } from './types';
2
- export declare const mockGetAddressDetails: GetAddressDetails;
@@ -1,7 +0,0 @@
1
- export const mockGetAddressDetails = async (params) => {
2
- console.log('[Mock] getAddressDetails called', params);
3
- return {
4
- success: true,
5
- address: { address1: '12 Water St', city: "St. John's", state: 'NL', postCode: 'A1C 1A1', country: 'CA' },
6
- };
7
- };
@@ -1,22 +0,0 @@
1
- /** In the cart's shape: country ISO 3166-1 alpha-2, province or state as its code. */
2
- export interface AddressDetails {
3
- address1: string;
4
- address2?: string;
5
- city?: string;
6
- state?: string;
7
- postCode?: string;
8
- country: string;
9
- }
10
- export interface GetAddressDetailsParams {
11
- /** A suggestion's `id`, from searchAddresses. */
12
- id: string;
13
- language?: string;
14
- }
15
- export interface GetAddressDetailsResponse {
16
- success: boolean;
17
- /** Ready for setOrderAddress. Add the shopper's name; keep anything they edit afterwards. */
18
- address?: AddressDetails;
19
- reason?: string;
20
- }
21
- /** The picked suggestion as a full address. Ends the lookup session the searches opened. */
22
- export type GetAddressDetails = (params: GetAddressDetailsParams) => Promise<GetAddressDetailsResponse>;
@@ -1,3 +0,0 @@
1
- // The second half of address autocomplete: the suggestion the shopper picked, as a full address.
2
- // Served ONLY by the storefront runtime. Failures resolve with `success: false`; never throws.
3
- export {};
@@ -1,6 +0,0 @@
1
- /**
2
- * getShopperAccount action
3
- * Calls the getShopperAccount action on the parent window
4
- */
5
- import type { GetShopperAccount } from './types';
6
- export declare const getShopperAccount: GetShopperAccount;
@@ -1,8 +0,0 @@
1
- /**
2
- * getShopperAccount action
3
- * Calls the getShopperAccount action on the parent window
4
- */
5
- import { commandFrameClient } from '../../client';
6
- export const getShopperAccount = async (params) => {
7
- return await commandFrameClient.call('getShopperAccount', params ?? {});
8
- };
@@ -1,3 +0,0 @@
1
- import type { GetShopperAccount } from './types';
2
- /** Standalone mock: a guest, with the two checkout boxes. */
3
- export declare const mockGetShopperAccount: GetShopperAccount;
@@ -1,12 +0,0 @@
1
- /** Standalone mock: a guest, with the two checkout boxes. */
2
- export const mockGetShopperAccount = async () => {
3
- console.log('[Mock] getShopperAccount called');
4
- return {
5
- success: true,
6
- signedIn: false,
7
- boxes: [
8
- { id: 'accountOptIn', label: 'Track this order and check out faster next time', checked: false },
9
- { id: 'marketingOptIn', label: 'Email me news and offers from this store', checked: false },
10
- ],
11
- };
12
- };
@@ -1,46 +0,0 @@
1
- /** A checkbox the checkout shows, with its wording and default. */
2
- export interface ShopperCheckoutBox {
3
- /** `saveAddress` is offered to a signed-in shopper only; send it with the shipping address step's contact. */
4
- id: 'accountOptIn' | 'marketingOptIn' | 'saveAddress';
5
- label: string;
6
- checked: boolean;
7
- }
8
- export interface ShopperAccountView {
9
- name: string;
10
- /** null for an account made with a phone that has not added an email yet. */
11
- email: string | null;
12
- phone: string | null;
13
- }
14
- /** A saved address, as stored, plus one line to show it by. */
15
- export interface ShopperAddressView {
16
- id: string;
17
- label: string | null;
18
- /** "12 Water St, St. John's, NL A1C 1A1" */
19
- line: string;
20
- isDefault: boolean;
21
- firstName?: string;
22
- lastName?: string;
23
- address1?: string;
24
- address2?: string;
25
- city?: string;
26
- state?: string;
27
- postCode?: string;
28
- country?: string;
29
- }
30
- export type GetShopperAccountParams = Record<string, never>;
31
- export interface GetShopperAccountResponse {
32
- success: boolean;
33
- signedIn: boolean;
34
- /** Present when signed in. */
35
- shopper?: ShopperAccountView;
36
- /** Signed in only: the saved addresses, the default first. The checkout prefills the default itself. */
37
- addresses?: ShopperAddressView[];
38
- /**
39
- * The account boxes for the checkout's contact step. A guest gets "Track this order" and the news
40
- * box; a signed-in shopper gets the news box and "Save this address" (ticked).
41
- */
42
- boxes: ShopperCheckoutBox[];
43
- reason?: string;
44
- }
45
- /** Who is signed in at this store, their saved addresses, and the checkout boxes to show. */
46
- export type GetShopperAccount = (params?: GetShopperAccountParams) => Promise<GetShopperAccountResponse>;
@@ -1,6 +0,0 @@
1
- // The shopper account on a store's website (My Account's store-scoped twin): sign in or sign up
2
- // with a code by email or text, see this store's orders. Served ONLY by the storefront runtime; on a
3
- // register it does not exist. Every value comes back READY TO DISPLAY (the runtime formats money,
4
- // dates and labels), so a flow shows it as it is and computes nothing. Failures resolve with
5
- // `success: false` and a `reason` written for the shopper; these never throw.
6
- export {};
@@ -1,6 +0,0 @@
1
- /**
2
- * getShopperOrder action
3
- * Calls the getShopperOrder action on the parent window
4
- */
5
- import type { GetShopperOrder } from './types';
6
- export declare const getShopperOrder: GetShopperOrder;
@@ -1,8 +0,0 @@
1
- /**
2
- * getShopperOrder action
3
- * Calls the getShopperOrder action on the parent window
4
- */
5
- import { commandFrameClient } from '../../client';
6
- export const getShopperOrder = async (params) => {
7
- return await commandFrameClient.call('getShopperOrder', params ?? {});
8
- };
@@ -1,2 +0,0 @@
1
- import type { GetShopperOrder } from './types';
2
- export declare const mockGetShopperOrder: GetShopperOrder;
@@ -1,24 +0,0 @@
1
- export const mockGetShopperOrder = async (params) => {
2
- console.log('[Mock] getShopperOrder called', params);
3
- return {
4
- success: true,
5
- order: {
6
- orderId: params.orderId,
7
- receiptId: '#1042',
8
- placedAtLabel: 'Nov 1, 2026',
9
- status: 'paid',
10
- statusLabel: 'Paid',
11
- totalLabel: '$42.50',
12
- itemsLabel: '2 items',
13
- items: [{ name: 'Harbour mug', variant: 'Slate', quantity: 2, totalLabel: '$40.00' }],
14
- totals: [
15
- { label: 'Subtotal', amountLabel: '$40.00' },
16
- { label: 'Tax', amountLabel: '$2.50' },
17
- { label: 'Total', amountLabel: '$42.50' },
18
- ],
19
- paidWithLabel: 'Visa •••• 4242',
20
- deliveryLabel: 'Pickup at Water St.',
21
- returnLabel: null,
22
- },
23
- };
24
- };
@@ -1,32 +0,0 @@
1
- import type { ShopperOrderView } from '../get-shopper-orders/types';
2
- export interface ShopperOrderItemView {
3
- name: string;
4
- /** e.g. "Slate", or null */
5
- variant: string | null;
6
- quantity: number;
7
- totalLabel: string;
8
- }
9
- export interface ShopperOrderDetailView extends ShopperOrderView {
10
- items: ShopperOrderItemView[];
11
- /** Subtotal, Discount, Tax, Shipping, Refunded, Total: only the ones that apply. */
12
- totals: {
13
- label: string;
14
- amountLabel: string;
15
- }[];
16
- /** "Visa •••• 4242", or null */
17
- paidWithLabel: string | null;
18
- /** "Pickup at Water St.", "Shipping", or null */
19
- deliveryLabel: string | null;
20
- /** "Return requested Nov 3, 2026", or null */
21
- returnLabel: string | null;
22
- }
23
- export interface GetShopperOrderParams {
24
- orderId: string;
25
- }
26
- export interface GetShopperOrderResponse {
27
- success: boolean;
28
- order?: ShopperOrderDetailView;
29
- reason?: string;
30
- }
31
- /** One of the shopper's orders at this store. */
32
- export type GetShopperOrder = (params: GetShopperOrderParams) => Promise<GetShopperOrderResponse>;
@@ -1,6 +0,0 @@
1
- // The shopper account on a store's website (My Account's store-scoped twin): sign in or sign up
2
- // with a code by email or text, see this store's orders. Served ONLY by the storefront runtime; on a
3
- // register it does not exist. Every value comes back READY TO DISPLAY (the runtime formats money,
4
- // dates and labels), so a flow shows it as it is and computes nothing. Failures resolve with
5
- // `success: false` and a `reason` written for the shopper; these never throw.
6
- export {};
@@ -1,6 +0,0 @@
1
- /**
2
- * getShopperOrders action
3
- * Calls the getShopperOrders action on the parent window
4
- */
5
- import type { GetShopperOrders } from './types';
6
- export declare const getShopperOrders: GetShopperOrders;
@@ -1,8 +0,0 @@
1
- /**
2
- * getShopperOrders action
3
- * Calls the getShopperOrders action on the parent window
4
- */
5
- import { commandFrameClient } from '../../client';
6
- export const getShopperOrders = async (params) => {
7
- return await commandFrameClient.call('getShopperOrders', params ?? {});
8
- };
@@ -1,2 +0,0 @@
1
- import type { GetShopperOrders } from './types';
2
- export declare const mockGetShopperOrders: GetShopperOrders;
@@ -1,18 +0,0 @@
1
- export const mockGetShopperOrders = async () => {
2
- console.log('[Mock] getShopperOrders called');
3
- return {
4
- success: true,
5
- orders: [
6
- {
7
- orderId: '6a2f1c7b1e35f9a4c67a1010',
8
- receiptId: '#1042',
9
- placedAtLabel: 'Nov 1, 2026',
10
- status: 'paid',
11
- statusLabel: 'Paid',
12
- totalLabel: '$42.50',
13
- itemsLabel: '3 items',
14
- },
15
- ],
16
- nextCursor: null,
17
- };
18
- };
@@ -1,29 +0,0 @@
1
- import type { ShopperOrderStatus } from '@final-commerce/common';
2
- /** One order row, ready to display. */
3
- export interface ShopperOrderView {
4
- orderId: string;
5
- receiptId: string;
6
- /** e.g. "Nov 1, 2026" */
7
- placedAtLabel: string;
8
- /** For styling only: the label is what the shopper reads. */
9
- status: ShopperOrderStatus;
10
- /** "Paid", "Refunded", "Partially refunded", "Cancelled" */
11
- statusLabel: string;
12
- /** "$42.50" */
13
- totalLabel: string;
14
- /** "3 items" */
15
- itemsLabel: string;
16
- }
17
- export interface GetShopperOrdersParams {
18
- /** From the previous page's `nextCursor`. */
19
- cursor?: string;
20
- }
21
- export interface GetShopperOrdersResponse {
22
- success: boolean;
23
- /** This store's orders placed with the shopper's verified emails, newest first. */
24
- orders: ShopperOrderView[];
25
- nextCursor: string | null;
26
- reason?: string;
27
- }
28
- /** The signed-in shopper's orders at this store. */
29
- export type GetShopperOrders = (params?: GetShopperOrdersParams) => Promise<GetShopperOrdersResponse>;
@@ -1,6 +0,0 @@
1
- // The shopper account on a store's website (My Account's store-scoped twin): sign in or sign up
2
- // with a code by email or text, see this store's orders. Served ONLY by the storefront runtime; on a
3
- // register it does not exist. Every value comes back READY TO DISPLAY (the runtime formats money,
4
- // dates and labels), so a flow shows it as it is and computes nothing. Failures resolve with
5
- // `success: false` and a `reason` written for the shopper; these never throw.
6
- export {};
@@ -1,6 +0,0 @@
1
- /**
2
- * requestShopperCode action
3
- * Calls the requestShopperCode action on the parent window
4
- */
5
- import type { RequestShopperCode } from './types';
6
- export declare const requestShopperCode: RequestShopperCode;
@@ -1,8 +0,0 @@
1
- /**
2
- * requestShopperCode action
3
- * Calls the requestShopperCode action on the parent window
4
- */
5
- import { commandFrameClient } from '../../client';
6
- export const requestShopperCode = async (params) => {
7
- return await commandFrameClient.call('requestShopperCode', params ?? {});
8
- };
@@ -1,2 +0,0 @@
1
- import type { RequestShopperCode } from './types';
2
- export declare const mockRequestShopperCode: RequestShopperCode;
@@ -1,4 +0,0 @@
1
- export const mockRequestShopperCode = async (params) => {
2
- console.log('[Mock] requestShopperCode called', params);
3
- return { success: true, message: `We sent a 6-digit code to ${params.email ?? params.phone ?? 'your email'}` };
4
- };
@@ -1,17 +0,0 @@
1
- /**
2
- * Where the code goes: an `email`, or a `phone` (a text message; any common spelling, the runtime
3
- * makes it E.164 with +1 when no country is given). Give one, not both. Give neither right after a
4
- * guest checkout to send it to the email that checkout used ("Email me a code" on the confirmation).
5
- */
6
- export interface RequestShopperCodeParams {
7
- email?: string;
8
- phone?: string;
9
- }
10
- export interface RequestShopperCodeResponse {
11
- success: boolean;
12
- /** "We sent a 6-digit code to s…@example.com" (or "…by text to ••• 0101"). Never says who has an account. */
13
- message?: string;
14
- reason?: string;
15
- }
16
- /** Send a 6-digit sign-in code by email or text. It works at this store only. Signing up is the same step. */
17
- export type RequestShopperCode = (params: RequestShopperCodeParams) => Promise<RequestShopperCodeResponse>;
@@ -1,6 +0,0 @@
1
- // The shopper account on a store's website (My Account's store-scoped twin): sign in or sign up
2
- // with a code by email or text, see this store's orders. Served ONLY by the storefront runtime; on a
3
- // register it does not exist. Every value comes back READY TO DISPLAY (the runtime formats money,
4
- // dates and labels), so a flow shows it as it is and computes nothing. Failures resolve with
5
- // `success: false` and a `reason` written for the shopper; these never throw.
6
- export {};
@@ -1,6 +0,0 @@
1
- /**
2
- * searchAddresses action
3
- * Calls the searchAddresses action on the parent window
4
- */
5
- import type { SearchAddresses } from './types';
6
- export declare const searchAddresses: SearchAddresses;
@@ -1,8 +0,0 @@
1
- /**
2
- * searchAddresses action
3
- * Calls the searchAddresses action on the parent window
4
- */
5
- import { commandFrameClient } from '../../client';
6
- export const searchAddresses = async (params) => {
7
- return await commandFrameClient.call('searchAddresses', params);
8
- };