@final-commerce/command-frame 0.11.1-online.1 → 0.12.0-staging.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/dist/CommonTypes.d.ts +1 -18
- package/dist/actions/get-outlets/action.js +2 -2
- package/dist/actions/get-outlets/mock.d.ts +0 -12
- package/dist/actions/get-outlets/mock.js +4 -28
- package/dist/actions/get-outlets/types.d.ts +1 -19
- package/dist/actions/get-product-modifier-selections/mock.js +0 -7
- package/dist/actions/get-product-modifier-selections/types.d.ts +0 -4
- package/dist/actions/get-products/types.d.ts +8 -8
- package/dist/actions/get-refund-plan/mockRows.js +1 -1
- package/dist/actions/get-refund-plan/types.d.ts +6 -9
- package/dist/actions/get-remaining-refundable-quantities/mock.js +0 -1
- package/dist/actions/get-remaining-refundable-quantities/types.d.ts +0 -5
- package/dist/actions/process-partial-refund/types.d.ts +1 -1
- package/dist/index.d.ts +1 -21
- package/dist/index.js +0 -19
- package/dist/projects/render/mocks.js +0 -20
- package/dist/projects/render/types.d.ts +1 -23
- package/dist/pubsub/topics/index.d.ts +17 -18
- package/dist/pubsub/topics/index.js +17 -18
- package/dist/pubsub/topics/types.d.ts +0 -8
- package/package.json +2 -2
- package/dist/actions/attach-checkout-contact/action.d.ts +0 -6
- package/dist/actions/attach-checkout-contact/action.js +0 -8
- package/dist/actions/attach-checkout-contact/mock.d.ts +0 -15
- package/dist/actions/attach-checkout-contact/mock.js +0 -22
- package/dist/actions/attach-checkout-contact/types.d.ts +0 -35
- package/dist/actions/attach-checkout-contact/types.js +0 -16
- package/dist/actions/get-address-options/action.d.ts +0 -6
- package/dist/actions/get-address-options/action.js +0 -8
- package/dist/actions/get-address-options/mock.d.ts +0 -3
- package/dist/actions/get-address-options/mock.js +0 -15
- package/dist/actions/get-address-options/types.d.ts +0 -25
- package/dist/actions/get-address-options/types.js +0 -8
- package/dist/actions/get-checkout-status/action.d.ts +0 -6
- package/dist/actions/get-checkout-status/action.js +0 -8
- package/dist/actions/get-checkout-status/mock.d.ts +0 -3
- package/dist/actions/get-checkout-status/mock.js +0 -11
- package/dist/actions/get-checkout-status/types.d.ts +0 -20
- package/dist/actions/get-checkout-status/types.js +0 -12
- package/dist/actions/get-shipping-options/action.d.ts +0 -6
- package/dist/actions/get-shipping-options/action.js +0 -8
- package/dist/actions/get-shipping-options/mock.d.ts +0 -3
- package/dist/actions/get-shipping-options/mock.js +0 -15
- package/dist/actions/get-shipping-options/types.d.ts +0 -43
- package/dist/actions/get-shipping-options/types.js +0 -1
- package/dist/actions/resume-checkout/action.d.ts +0 -6
- package/dist/actions/resume-checkout/action.js +0 -8
- package/dist/actions/resume-checkout/mock.d.ts +0 -16
- package/dist/actions/resume-checkout/mock.js +0 -51
- package/dist/actions/resume-checkout/types.d.ts +0 -59
- package/dist/actions/resume-checkout/types.js +0 -13
- package/dist/actions/select-shipping-option/action.d.ts +0 -6
- package/dist/actions/select-shipping-option/action.js +0 -8
- package/dist/actions/select-shipping-option/mock.d.ts +0 -3
- package/dist/actions/select-shipping-option/mock.js +0 -31
- package/dist/actions/select-shipping-option/types.d.ts +0 -15
- package/dist/actions/select-shipping-option/types.js +0 -1
- package/dist/actions/set-order-address/action.d.ts +0 -6
- package/dist/actions/set-order-address/action.js +0 -8
- package/dist/actions/set-order-address/mock.d.ts +0 -7
- package/dist/actions/set-order-address/mock.js +0 -29
- package/dist/actions/set-order-address/types.d.ts +0 -19
- package/dist/actions/set-order-address/types.js +0 -1
- package/dist/actions/set-outlet/action.d.ts +0 -6
- package/dist/actions/set-outlet/action.js +0 -8
- package/dist/actions/set-outlet/mock.d.ts +0 -13
- package/dist/actions/set-outlet/mock.js +0 -24
- package/dist/actions/set-outlet/types.d.ts +0 -31
- package/dist/actions/set-outlet/types.js +0 -21
- package/dist/actions/start-checkout/action.d.ts +0 -6
- package/dist/actions/start-checkout/action.js +0 -8
- package/dist/actions/start-checkout/mock.d.ts +0 -16
- package/dist/actions/start-checkout/mock.js +0 -80
- package/dist/actions/start-checkout/types.d.ts +0 -90
- package/dist/actions/start-checkout/types.js +0 -10
- package/dist/demo/shipping.d.ts +0 -8
- package/dist/demo/shipping.js +0 -69
- package/dist/pubsub/topics/checkout/checkout-started/types.d.ts +0 -26
- package/dist/pubsub/topics/checkout/checkout-started/types.js +0 -1
- package/dist/pubsub/topics/checkout/index.d.ts +0 -7
- package/dist/pubsub/topics/checkout/index.js +0 -28
- package/dist/pubsub/topics/checkout/payment-completed/types.d.ts +0 -31
- package/dist/pubsub/topics/checkout/payment-completed/types.js +0 -1
- package/dist/pubsub/topics/checkout/payment-failed/types.d.ts +0 -20
- package/dist/pubsub/topics/checkout/payment-failed/types.js +0 -1
- package/dist/pubsub/topics/checkout/types.d.ts +0 -12
- package/dist/pubsub/topics/checkout/types.js +0 -8
package/dist/CommonTypes.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './common-types';
|
|
2
|
-
import type { Tax, Tip, Address, MetadataItem, OrderAssignedUser, OrderInCart, OrderCustomStatus, PosDataItem, CartFeeTaxEntry, CartFeeItem, CartDiscountItem, OrderNote, NonRevenueItem, DiscountDetail, FeeDetail, DiscountLineItem, FeeLineItem, LineItem, TipPayment, RefundedTipPayment, PaymentMethod, Discount, CustomFee, Summary, CustomSale, RefundedCustomSale, RefundItem, RefundedLineItem, ActiveStation, ActiveSession, ActiveOutlet, ActiveUser, ActiveUserRole, ActiveOrder, ActiveCart, ActivePark, ActiveCompany, ActiveCustomSales, ActiveProduct, ActiveCustomer, FullProduct, ProductVariant, Inventory, ResolvedModifier, ResolvedModifierChoice, ModifierSelectionType, ModifierSelection, ModifierChoiceSelection, CartLineModifier, ProdModifierBreakdown, OrderLineItemModifier, CustomerNote, Attribute, AttributeOption, Category, Transaction, ActiveSplitPayment, BookingAvailability, BookingSlot, BookingSlotResource, BookingResource, Booking, CartReservation, OrderReservation,
|
|
2
|
+
import type { Tax, Tip, Address, MetadataItem, OrderAssignedUser, OrderInCart, OrderCustomStatus, PosDataItem, CartFeeTaxEntry, CartFeeItem, CartDiscountItem, OrderNote, NonRevenueItem, DiscountDetail, FeeDetail, DiscountLineItem, FeeLineItem, LineItem, TipPayment, RefundedTipPayment, PaymentMethod, Discount, CustomFee, Summary, CustomSale, RefundedCustomSale, RefundItem, RefundedLineItem, ActiveStation, ActiveSession, ActiveOutlet, ActiveUser, ActiveUserRole, ActiveOrder, ActiveCart, ActivePark, ActiveCompany, ActiveCustomSales, ActiveProduct, ActiveCustomer, FullProduct, ProductVariant, Inventory, ResolvedModifier, ResolvedModifierChoice, ModifierSelectionType, ModifierSelection, ModifierChoiceSelection, CartLineModifier, ProdModifierBreakdown, OrderLineItemModifier, CustomerNote, Attribute, AttributeOption, Category, Transaction, ActiveSplitPayment, BookingAvailability, BookingSlot, BookingSlotResource, BookingResource, Booking, CartReservation, OrderReservation, Composite, CompositePart, CompositeItem, CompositeChoice, CompositeItemUnavailable, CompositePick, CartLineComponent, OrderLineItemComponent } from '@final-commerce/common/pos-types';
|
|
3
3
|
export { CurrencyCode, ProductType as CFProductType, UserTypes as CFUserTypes } from '@final-commerce/common';
|
|
4
4
|
/** Open record used as a base for active entities. */
|
|
5
5
|
export type CFActiveEntity = Record<string, unknown>;
|
|
@@ -108,8 +108,6 @@ export type CFActiveOrder = ActiveOrder;
|
|
|
108
108
|
export type CFActiveCustomSales = ActiveCustomSales;
|
|
109
109
|
export type CFNonRevenueItem = NonRevenueItem;
|
|
110
110
|
export type CFActiveCart = ActiveCart;
|
|
111
|
-
export type CFCartAddress = CartAddress;
|
|
112
|
-
export type CFCartShipping = CartShipping;
|
|
113
111
|
export type CFActivePark = ActivePark;
|
|
114
112
|
export type CFActiveCompany = ActiveCompany;
|
|
115
113
|
/** Tile kinds a SmartGrid cell can represent. Mirrors common's `BaseTile['type']`. */
|
|
@@ -152,7 +150,6 @@ export interface CFActiveRefundDetails {
|
|
|
152
150
|
buttonsDisabled?: Record<string, boolean>;
|
|
153
151
|
isRefund?: boolean;
|
|
154
152
|
customSalesQuantities?: Record<string, number>;
|
|
155
|
-
/** Keyed by cart-fee id, plus the reserved key `'shipping'` for the order's shipping. 0/1 each. */
|
|
156
153
|
cartFeesRefunds?: Record<string, number>;
|
|
157
154
|
tipsRefunds?: Record<string, number>;
|
|
158
155
|
refundProcessingStatus?: CFRefundProcessingStatus | null;
|
|
@@ -220,23 +217,9 @@ export interface CFOutletInfo {
|
|
|
220
217
|
state?: string;
|
|
221
218
|
postCode?: string;
|
|
222
219
|
};
|
|
223
|
-
address2?: string;
|
|
224
220
|
city?: string;
|
|
225
221
|
state?: string;
|
|
226
222
|
country?: string;
|
|
227
|
-
postCode?: string;
|
|
228
|
-
phone?: string;
|
|
229
|
-
/** Short display alias, when the merchant set one (e.g. `DTWN`). */
|
|
230
|
-
alias?: string;
|
|
231
|
-
/**
|
|
232
|
-
* Whether this location can take an ONLINE payment. Storefront only — it is
|
|
233
|
-
* absent on a register, where it has no meaning.
|
|
234
|
-
*
|
|
235
|
-
* `false` means the outlet has no completed payment connection, so starting a
|
|
236
|
-
* checkout against it WILL fail. A pickup picker must not offer it as a
|
|
237
|
-
* selectable location, or must show it as unavailable.
|
|
238
|
-
*/
|
|
239
|
-
connected?: boolean;
|
|
240
223
|
}
|
|
241
224
|
export interface CFContextManage {
|
|
242
225
|
user: unknown;
|
|
@@ -1,14 +1,2 @@
|
|
|
1
1
|
import { GetOutlets } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* A second location that CANNOT take an online payment.
|
|
4
|
-
*
|
|
5
|
-
* The shared demo data has exactly one outlet, so without this a pickup picker
|
|
6
|
-
* built against mocks would never render the case that matters: an outlet a
|
|
7
|
-
* shopper must not be allowed to check out against. `setOutlet` refuses this id,
|
|
8
|
-
* so the two mocks tell the same story.
|
|
9
|
-
*
|
|
10
|
-
* Mock-only, and deliberately NOT added to `MOCK_OUTLETS` — that array is shared
|
|
11
|
-
* with every other outlet mock and `MOCK_OUTLET`.
|
|
12
|
-
*/
|
|
13
|
-
export declare const MOCK_UNCONNECTED_OUTLET_ID = "outlet-mock-unconnected";
|
|
14
2
|
export declare const mockGetOutlets: GetOutlets;
|
|
@@ -1,40 +1,16 @@
|
|
|
1
1
|
import { MOCK_OUTLETS, safeSerialize } from "../../demo/database";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
* The shared demo data has exactly one outlet, so without this a pickup picker
|
|
6
|
-
* built against mocks would never render the case that matters: an outlet a
|
|
7
|
-
* shopper must not be allowed to check out against. `setOutlet` refuses this id,
|
|
8
|
-
* so the two mocks tell the same story.
|
|
9
|
-
*
|
|
10
|
-
* Mock-only, and deliberately NOT added to `MOCK_OUTLETS` — that array is shared
|
|
11
|
-
* with every other outlet mock and `MOCK_OUTLET`.
|
|
12
|
-
*/
|
|
13
|
-
export const MOCK_UNCONNECTED_OUTLET_ID = "outlet-mock-unconnected";
|
|
14
|
-
const UNCONNECTED_OUTLET = {
|
|
15
|
-
_id: MOCK_UNCONNECTED_OUTLET_ID,
|
|
16
|
-
name: "Airport (not connected)",
|
|
17
|
-
address: "2 Terminal Road",
|
|
18
|
-
city: "San Francisco",
|
|
19
|
-
state: "CA",
|
|
20
|
-
country: "US",
|
|
21
|
-
postCode: "94128",
|
|
22
|
-
connected: false
|
|
23
|
-
};
|
|
24
|
-
export const mockGetOutlets = async (params) => {
|
|
25
|
-
console.log("[Mock] getOutlets called", params);
|
|
2
|
+
export const mockGetOutlets = async () => {
|
|
3
|
+
console.log("[Mock] getOutlets called");
|
|
26
4
|
const outlets = safeSerialize(MOCK_OUTLETS).map((o) => ({
|
|
27
5
|
_id: o._id || o.id,
|
|
28
6
|
name: o.name || "",
|
|
29
7
|
address: o.address,
|
|
30
8
|
city: o.city,
|
|
31
9
|
state: o.state,
|
|
32
|
-
country: o.country
|
|
33
|
-
connected: true
|
|
10
|
+
country: o.country
|
|
34
11
|
}));
|
|
35
|
-
const all = [...outlets, UNCONNECTED_OUTLET];
|
|
36
12
|
return {
|
|
37
|
-
outlets
|
|
13
|
+
outlets,
|
|
38
14
|
timestamp: new Date().toISOString()
|
|
39
15
|
};
|
|
40
16
|
};
|
|
@@ -1,24 +1,6 @@
|
|
|
1
1
|
import { CFOutletInfo } from "../../CommonTypes";
|
|
2
|
-
export interface GetOutletsParams {
|
|
3
|
-
/**
|
|
4
|
-
* Return only locations that can take an online payment. Storefront only.
|
|
5
|
-
* Default `false`, so a flow sees every outlet and decides how to present
|
|
6
|
-
* the ones it cannot sell from.
|
|
7
|
-
*/
|
|
8
|
-
connectedOnly?: boolean;
|
|
9
|
-
}
|
|
10
2
|
export interface GetOutletsResponse {
|
|
11
3
|
outlets: CFOutletInfo[];
|
|
12
4
|
timestamp: string;
|
|
13
5
|
}
|
|
14
|
-
|
|
15
|
-
* List the company's outlets.
|
|
16
|
-
*
|
|
17
|
-
* ON A STOREFRONT this is the pickup picker's source. Each outlet carries
|
|
18
|
-
* `connected`, and an outlet with `connected: false` cannot take a payment, so
|
|
19
|
-
* `setOutlet` refuses it — filter those out rather than relying on the refusal.
|
|
20
|
-
*
|
|
21
|
-
* There are no coordinates on an outlet, so "closest branch" is not something
|
|
22
|
-
* this can answer; sort on the address fields or let the shopper choose.
|
|
23
|
-
*/
|
|
24
|
-
export type GetOutlets = (params?: GetOutletsParams) => Promise<GetOutletsResponse>;
|
|
6
|
+
export type GetOutlets = () => Promise<GetOutletsResponse>;
|
|
@@ -13,8 +13,6 @@ export const mockGetProductModifierSelections = async (params) => {
|
|
|
13
13
|
selections: [],
|
|
14
14
|
rows: [],
|
|
15
15
|
modifiersTotal: 0,
|
|
16
|
-
lineTotal: 0,
|
|
17
|
-
unitTotal: 0,
|
|
18
16
|
timestamp: new Date().toISOString(),
|
|
19
17
|
};
|
|
20
18
|
}
|
|
@@ -27,23 +25,18 @@ export const mockGetProductModifierSelections = async (params) => {
|
|
|
27
25
|
selections: [],
|
|
28
26
|
rows: [],
|
|
29
27
|
modifiersTotal: 0,
|
|
30
|
-
lineTotal: 0,
|
|
31
|
-
unitTotal: 0,
|
|
32
28
|
timestamp: new Date().toISOString(),
|
|
33
29
|
};
|
|
34
30
|
}
|
|
35
31
|
// The priced rows already sit on the line; extending them by the line quantity is
|
|
36
32
|
// the host's job, not the flow's.
|
|
37
33
|
const { rows, modifiersTotal } = buildModifierRows(line.modifiers, line.quantity);
|
|
38
|
-
const { modifiersTotal: unitModifiers } = buildModifierRows(line.modifiers, 1);
|
|
39
34
|
return {
|
|
40
35
|
success: true,
|
|
41
36
|
internalId: line.internalId,
|
|
42
37
|
selections: line.modifierSelections ?? [],
|
|
43
38
|
rows,
|
|
44
39
|
modifiersTotal,
|
|
45
|
-
lineTotal: line.price * line.quantity + modifiersTotal,
|
|
46
|
-
unitTotal: line.price + unitModifiers,
|
|
47
40
|
timestamp: new Date().toISOString(),
|
|
48
41
|
};
|
|
49
42
|
};
|
|
@@ -18,10 +18,6 @@ export interface GetProductModifierSelectionsResponse {
|
|
|
18
18
|
rows: CFProdModifierBreakdown[];
|
|
19
19
|
/** Sum of `rows[].amount` for THIS line, in minor units. */
|
|
20
20
|
modifiersTotal: number;
|
|
21
|
-
/** The whole line as the cart prices it (item, its discounts, fees and modifiers), in minor units. */
|
|
22
|
-
lineTotal: number;
|
|
23
|
-
/** The same for ONE unit, for an "each" price. */
|
|
24
|
-
unitTotal: number;
|
|
25
21
|
timestamp: string;
|
|
26
22
|
}
|
|
27
23
|
export type GetProductModifierSelections = (params?: GetProductModifierSelectionsParams) => Promise<GetProductModifierSelectionsResponse>;
|
|
@@ -44,20 +44,20 @@ export interface GetProductsParams {
|
|
|
44
44
|
externalId?: string;
|
|
45
45
|
/**
|
|
46
46
|
* Product-level flag filter. `true` = only products flagged `notSoldInPos`; `false` = only
|
|
47
|
-
* products NOT flagged (a missing field counts as not flagged).
|
|
48
|
-
*
|
|
47
|
+
* products NOT flagged (a missing field counts as not flagged). Naming it switches off the
|
|
48
|
+
* default `notSoldInPos` exclusion, so `true` works without `includeUnlisted`.
|
|
49
49
|
*/
|
|
50
50
|
notSoldInPos?: boolean;
|
|
51
|
-
/** Product-level flag filter: `true` = flagged `notSoldOnline`; `false` = sold online (missing counts).
|
|
51
|
+
/** Product-level flag filter: `true` = flagged `notSoldOnline`; `false` = sold online (missing counts). */
|
|
52
52
|
notSoldOnline?: boolean;
|
|
53
53
|
[key: string]: any;
|
|
54
54
|
};
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
56
|
+
* Products flagged `notSoldInPos` are left out unless this is `true` (default `false`) or the
|
|
57
|
+
* query names `notSoldInPos`. They still cannot be sold: `addProductToCart` / `addBookingToCart`
|
|
58
|
+
* refuse a product or a variant flagged `notSoldInPos`. Without it, flagged variants are also
|
|
59
|
+
* stripped from `variants[]` and a product whose every variant is flagged is left out — whatever
|
|
60
|
+
* `query.notSoldInPos` says.
|
|
61
61
|
*/
|
|
62
62
|
includeUnlisted?: boolean;
|
|
63
63
|
/** Defaults to 0. */
|
|
@@ -96,7 +96,7 @@ export function mockRefundBreakdown(rows, items) {
|
|
|
96
96
|
return { type: row.type, itemKey: row.itemKey, quantity, amounts: scale(row.amounts, quantity / row.quantity) };
|
|
97
97
|
})
|
|
98
98
|
.filter((r) => r.quantity > 0);
|
|
99
|
-
const totals = { items: 0, discounts: 0, fees: 0,
|
|
99
|
+
const totals = { items: 0, discounts: 0, fees: 0, tax: 0, tip: 0, total: 0 };
|
|
100
100
|
for (const r of selected) {
|
|
101
101
|
const a = r.amounts;
|
|
102
102
|
if (r.type === 'fee')
|
|
@@ -20,13 +20,12 @@ export interface GetRefundPlanParams {
|
|
|
20
20
|
items?: {
|
|
21
21
|
/**
|
|
22
22
|
* `internalId` / `variantId` for a product, `customSaleId`, cart-fee id, tip
|
|
23
|
-
* `transactionId`, a booking's own `internalId` on `order.reservations[]
|
|
24
|
-
* `'shipping'` for the order's shipping (all or nothing, like a fee).
|
|
23
|
+
* `transactionId`, or a booking's own `internalId` on `order.reservations[]`.
|
|
25
24
|
*/
|
|
26
25
|
itemKey: string;
|
|
27
26
|
quantity: number;
|
|
28
27
|
/** Optional hint; inferred from the order when omitted. */
|
|
29
|
-
type?: 'product' | 'customSale' | 'fee' | 'tip' | 'reservation'
|
|
28
|
+
type?: 'product' | 'customSale' | 'fee' | 'tip' | 'reservation';
|
|
30
29
|
}[];
|
|
31
30
|
}
|
|
32
31
|
export interface RefundPlanSource {
|
|
@@ -80,7 +79,7 @@ export interface RefundPlanLeg {
|
|
|
80
79
|
rounding: number;
|
|
81
80
|
};
|
|
82
81
|
}
|
|
83
|
-
export type RefundPlanRowType = 'product' | 'customSale' | 'fee' | 'tip'
|
|
82
|
+
export type RefundPlanRowType = 'product' | 'customSale' | 'fee' | 'tip';
|
|
84
83
|
/** One tax rate's share of a row's refund (minor units). */
|
|
85
84
|
export interface RefundPlanTaxLine {
|
|
86
85
|
name: string;
|
|
@@ -108,7 +107,7 @@ export interface RefundPlanAmounts {
|
|
|
108
107
|
total: number;
|
|
109
108
|
}
|
|
110
109
|
/**
|
|
111
|
-
* One refundable row of the order — a line item, custom sale, cart fee
|
|
110
|
+
* One refundable row of the order — a line item, custom sale, cart fee or tip —
|
|
112
111
|
* served ready to render. Rows with nothing left to refund are not listed.
|
|
113
112
|
*/
|
|
114
113
|
export interface RefundPlanRow {
|
|
@@ -122,7 +121,7 @@ export interface RefundPlanRow {
|
|
|
122
121
|
attributes?: string;
|
|
123
122
|
/** Tip rows only: the tender that took the tip (`card`, `cash`, …). */
|
|
124
123
|
paymentType?: string;
|
|
125
|
-
/** Quantity originally sold. Fees
|
|
124
|
+
/** Quantity originally sold. Fees and tips are `1` — all or nothing. */
|
|
126
125
|
quantity: number;
|
|
127
126
|
/** Quantity still refundable — the stepper's max. */
|
|
128
127
|
refundableQuantity: number;
|
|
@@ -138,7 +137,7 @@ export interface RefundPlanSelectedRow {
|
|
|
138
137
|
}
|
|
139
138
|
/**
|
|
140
139
|
* The selection's goods value broken down for display. Minor units;
|
|
141
|
-
* `items − discounts + fees +
|
|
140
|
+
* `items − discounts + fees + tax + tip === total === allocation.itemTotal`.
|
|
142
141
|
*/
|
|
143
142
|
export interface RefundPlanTotals {
|
|
144
143
|
/** Σ selected line subtotals (before discounts, tax excluded). */
|
|
@@ -147,8 +146,6 @@ export interface RefundPlanTotals {
|
|
|
147
146
|
discounts: number;
|
|
148
147
|
/** Σ selected cart fees, tax excluded. */
|
|
149
148
|
fees: number;
|
|
150
|
-
/** The order's shipping when selected, tax excluded; 0 otherwise. */
|
|
151
|
-
shipping: number;
|
|
152
149
|
tax: number;
|
|
153
150
|
tip: number;
|
|
154
151
|
total: number;
|
|
@@ -11,11 +11,6 @@ export interface GetRemainingRefundableQuantitiesResponse {
|
|
|
11
11
|
* 0/1 semantics: `1` = still refundable, `0` = already refunded.
|
|
12
12
|
*/
|
|
13
13
|
cartFees: Record<string, number>;
|
|
14
|
-
/**
|
|
15
|
-
* The order's shipping: `1` = still refundable, `0` = already refunded or the order has none.
|
|
16
|
-
* Refunded with `itemKey: 'shipping'`, all or nothing.
|
|
17
|
-
*/
|
|
18
|
-
shipping: number;
|
|
19
14
|
/**
|
|
20
15
|
* Remaining refundable tips, keyed by the paying method's
|
|
21
16
|
* `transactionId` — the same key `processPartialRefund` takes for
|
|
@@ -134,7 +134,7 @@ export interface ProcessPartialRefundParams {
|
|
|
134
134
|
/** internalId or variantId, customSaleId, or a booking's own internalId. */
|
|
135
135
|
itemKey: string;
|
|
136
136
|
quantity: number;
|
|
137
|
-
type?: 'product' | 'customSale' | 'fee' | 'tip' | 'reservation'
|
|
137
|
+
type?: 'product' | 'customSale' | 'fee' | 'tip' | 'reservation';
|
|
138
138
|
/**
|
|
139
139
|
* Per-item stock disposition for a refunded **product** line — the
|
|
140
140
|
* headless equivalent of the old refund popup's per-row restock/damaged
|
package/dist/index.d.ts
CHANGED
|
@@ -65,15 +65,6 @@ export declare const command: {
|
|
|
65
65
|
readonly integrationPayment: import(".").IntegrationPayment;
|
|
66
66
|
readonly createPaymentLink: import(".").CreatePaymentLink;
|
|
67
67
|
readonly chargeMoto: import(".").ChargeMoto;
|
|
68
|
-
readonly startCheckout: import(".").StartCheckout;
|
|
69
|
-
readonly attachCheckoutContact: import(".").AttachCheckoutContact;
|
|
70
|
-
readonly getAddressOptions: import(".").GetAddressOptions;
|
|
71
|
-
readonly setOrderAddress: import(".").SetOrderAddress;
|
|
72
|
-
readonly getShippingOptions: import(".").GetShippingOptions;
|
|
73
|
-
readonly selectShippingOption: import(".").SelectShippingOption;
|
|
74
|
-
readonly setOutlet: import(".").SetOutlet;
|
|
75
|
-
readonly resumeCheckout: import(".").ResumeCheckout;
|
|
76
|
-
readonly getCheckoutStatus: import(".").GetCheckoutStatus;
|
|
77
68
|
readonly getMotoConfig: import(".").GetMotoConfig;
|
|
78
69
|
readonly addCustomerNote: import(".").AddCustomerNote;
|
|
79
70
|
readonly removeCustomerNote: import(".").RemoveCustomerNote;
|
|
@@ -170,7 +161,7 @@ export type { AddProduct, AddProductParams, AddProductResponse } from './actions
|
|
|
170
161
|
export type { EditProduct, EditProductParams, EditProductResponse } from './actions/edit-product/types';
|
|
171
162
|
export type { EditProductVariants, EditProductVariantsParams, EditProductVariantsResponse, } from './actions/edit-product-variants/types';
|
|
172
163
|
export type { DeleteProduct, DeleteProductParams, DeleteProductResponse } from './actions/delete-product/types';
|
|
173
|
-
export type { GetOutlets,
|
|
164
|
+
export type { GetOutlets, GetOutletsResponse } from './actions/get-outlets/types';
|
|
174
165
|
export type { GetStations, GetStationsParams, GetStationsResponse } from './actions/get-stations/types';
|
|
175
166
|
export type { GetSmartGridLayout, GetSmartGridLayoutParams, GetSmartGridLayoutResponse, } from './actions/get-smart-grid-layout/types';
|
|
176
167
|
export type { SaveSmartGridLayout, SaveSmartGridLayoutParams, SaveSmartGridLayoutResponse, } from './actions/save-smart-grid-layout/types';
|
|
@@ -232,15 +223,6 @@ export type { RedeemPayment, RedeemPaymentParams, RedeemPaymentResponse } from '
|
|
|
232
223
|
export type { IntegrationPayment, IntegrationPaymentParams, IntegrationPaymentResponse, IntegrationEmvData, } from './actions/integration-payment/types';
|
|
233
224
|
export type { CreatePaymentLink, CreatePaymentLinkParams, CreatePaymentLinkResponse, } from './actions/create-payment-link/types';
|
|
234
225
|
export type { ChargeMoto, ChargeMotoParams, ChargeMotoResponse, ChargeMotoCardFields, } from './actions/charge-moto/types';
|
|
235
|
-
export type { StartCheckout, StartCheckoutParams, StartCheckoutResponse, StartCheckoutContact, StartCheckoutOrder, } from './actions/start-checkout/types';
|
|
236
|
-
export type { AttachCheckoutContact, AttachCheckoutContactParams, AttachCheckoutContactResponse, } from './actions/attach-checkout-contact/types';
|
|
237
|
-
export type { GetAddressOptions, GetAddressOptionsParams, GetAddressOptionsResponse, AddressCountryOption, AddressProvinceOption, } from './actions/get-address-options/types';
|
|
238
|
-
export type { SetOrderAddress, SetOrderAddressParams, SetOrderAddressResponse, OrderAddressType, } from './actions/set-order-address/types';
|
|
239
|
-
export type { GetShippingOptions, GetShippingOptionsResponse, ShippingOptionView, ShippingPickupView, } from './actions/get-shipping-options/types';
|
|
240
|
-
export type { SelectShippingOption, SelectShippingOptionParams, SelectShippingOptionResponse, } from './actions/select-shipping-option/types';
|
|
241
|
-
export type { SetOutlet, SetOutletParams, SetOutletResponse } from './actions/set-outlet/types';
|
|
242
|
-
export type { ResumeCheckout, ResumeCheckoutParams, ResumeCheckoutResponse, ResumeCheckoutResult, } from './actions/resume-checkout/types';
|
|
243
|
-
export type { GetCheckoutStatus, GetCheckoutStatusParams, GetCheckoutStatusResponse, CheckoutOrderStatus, } from './actions/get-checkout-status/types';
|
|
244
226
|
export type { GetMotoConfig, GetMotoConfigResponse, MotoUnavailableReason } from './actions/get-moto-config/types';
|
|
245
227
|
export type { AddCustomerNote, AddCustomerNoteParams, AddCustomerNoteResponse, } from './actions/add-customer-note/types';
|
|
246
228
|
export type { RemoveCustomerNote, RemoveCustomerNoteParams, RemoveCustomerNoteResponse, } from './actions/remove-customer-note/types';
|
|
@@ -298,7 +280,6 @@ export { refundsTopic } from './pubsub/topics/refunds';
|
|
|
298
280
|
export { productsTopic } from './pubsub/topics/products';
|
|
299
281
|
export { cartTopic } from './pubsub/topics/cart';
|
|
300
282
|
export { paymentsTopic } from './pubsub/topics/payments';
|
|
301
|
-
export { checkoutTopic } from './pubsub/topics/checkout';
|
|
302
283
|
export { splitPaymentsTopic } from './pubsub/topics/split-payments';
|
|
303
284
|
export { customTablesTopic } from './pubsub/topics/custom-tables';
|
|
304
285
|
export { printTopic } from './pubsub/topics/print';
|
|
@@ -326,7 +307,6 @@ export type { CategoryCreatedPayload, CategoryCreatedEvent, CategoryUpdatedPaylo
|
|
|
326
307
|
export type { AttributeCreatedPayload, AttributeCreatedEvent, AttributeUpdatedPayload, AttributeUpdatedEvent, AttributesEventType, AttributesEventPayload, } from './pubsub/topics/attributes/types';
|
|
327
308
|
export type { CartCreatedPayload, CartCustomerAssignedPayload, ProductAddedPayload, ProductDeletedPayload, CartDiscountAddedPayload, CartDiscountRemovedPayload, CartFeeAddedPayload, CartFeeRemovedPayload, ProductDiscountAddedPayload, ProductDiscountRemovedPayload, ProductFeeAddedPayload, ProductFeeRemovedPayload, ProductNoteAddedPayload, ProductNoteRemovedPayload, CartCreatedEvent, CartCustomerAssignedEvent, ProductAddedEvent, ProductDeletedEvent, CartDiscountAddedEvent, CartDiscountRemovedEvent, CartFeeAddedEvent, CartFeeRemovedEvent, ProductDiscountAddedEvent, ProductDiscountRemovedEvent, ProductFeeAddedEvent, ProductFeeRemovedEvent, ProductNoteAddedEvent, ProductNoteRemovedEvent, CartEventType, CartEventPayload, } from './pubsub/topics/cart/types';
|
|
328
309
|
export type { PaymentDonePayload, PaymentErrPayload, PaymentDoneEvent, PaymentErrEvent, PaymentsEventType, PaymentsEventPayload, } from './pubsub/topics/payments/types';
|
|
329
|
-
export type { CheckoutStartedPayload, PaymentCompletedPayload, PaymentFailedPayload, CheckoutStartedEvent, PaymentCompletedEvent, PaymentFailedEvent, CheckoutEventType, CheckoutEventPayload, } from './pubsub/topics/checkout/types';
|
|
330
310
|
export type { SplitPaymentUpdatedPayload, SplitPaymentUpdatedEvent, SplitPaymentsEventType, SplitPaymentsEventPayload, } from './pubsub/topics/split-payments/types';
|
|
331
311
|
export type { RowCreatedPayload, RowUpdatedPayload, RowDeletedPayload, RowCreatedEvent, RowUpdatedEvent, RowDeletedEvent, CustomTablesEventType, CustomTablesEventPayload, } from './pubsub/topics/custom-tables/types';
|
|
332
312
|
export type { PrintStartedPayload, PrintCompletedPayload, PrintErrorPayload, PrintStartedEvent, PrintCompletedEvent, PrintErrorEvent, PrintEventType, PrintEventPayload, } from './pubsub/topics/print/types';
|
package/dist/index.js
CHANGED
|
@@ -65,15 +65,6 @@ import { redeemPayment } from './actions/redeem-payment/action';
|
|
|
65
65
|
import { integrationPayment } from './actions/integration-payment/action';
|
|
66
66
|
import { createPaymentLink } from './actions/create-payment-link/action';
|
|
67
67
|
import { chargeMoto } from './actions/charge-moto/action';
|
|
68
|
-
import { startCheckout } from './actions/start-checkout/action';
|
|
69
|
-
import { attachCheckoutContact } from './actions/attach-checkout-contact/action';
|
|
70
|
-
import { getAddressOptions } from './actions/get-address-options/action';
|
|
71
|
-
import { setOrderAddress } from './actions/set-order-address/action';
|
|
72
|
-
import { getShippingOptions } from './actions/get-shipping-options/action';
|
|
73
|
-
import { selectShippingOption } from './actions/select-shipping-option/action';
|
|
74
|
-
import { setOutlet } from './actions/set-outlet/action';
|
|
75
|
-
import { resumeCheckout } from './actions/resume-checkout/action';
|
|
76
|
-
import { getCheckoutStatus } from './actions/get-checkout-status/action';
|
|
77
68
|
import { getMotoConfig } from './actions/get-moto-config/action';
|
|
78
69
|
// Customer Actions
|
|
79
70
|
import { addCustomerNote } from './actions/add-customer-note/action';
|
|
@@ -234,15 +225,6 @@ export const command = {
|
|
|
234
225
|
integrationPayment,
|
|
235
226
|
createPaymentLink,
|
|
236
227
|
chargeMoto,
|
|
237
|
-
startCheckout,
|
|
238
|
-
attachCheckoutContact,
|
|
239
|
-
getAddressOptions,
|
|
240
|
-
setOrderAddress,
|
|
241
|
-
getShippingOptions,
|
|
242
|
-
selectShippingOption,
|
|
243
|
-
setOutlet,
|
|
244
|
-
resumeCheckout,
|
|
245
|
-
getCheckoutStatus,
|
|
246
228
|
getMotoConfig,
|
|
247
229
|
// Customer Actions
|
|
248
230
|
addCustomerNote,
|
|
@@ -354,7 +336,6 @@ export { refundsTopic } from './pubsub/topics/refunds';
|
|
|
354
336
|
export { productsTopic } from './pubsub/topics/products';
|
|
355
337
|
export { cartTopic } from './pubsub/topics/cart';
|
|
356
338
|
export { paymentsTopic } from './pubsub/topics/payments';
|
|
357
|
-
export { checkoutTopic } from './pubsub/topics/checkout';
|
|
358
339
|
export { splitPaymentsTopic } from './pubsub/topics/split-payments';
|
|
359
340
|
export { customTablesTopic } from './pubsub/topics/custom-tables';
|
|
360
341
|
export { printTopic } from './pubsub/topics/print';
|
|
@@ -38,16 +38,6 @@ import { mockRecordExternalPayment } from '../../actions/record-external-payment
|
|
|
38
38
|
import { mockGetCashRoundingAmount } from '../../actions/get-cash-rounding-amount/mock';
|
|
39
39
|
import { mockCreatePaymentLink } from '../../actions/create-payment-link/mock';
|
|
40
40
|
import { mockChargeMoto } from '../../actions/charge-moto/mock';
|
|
41
|
-
import { mockStartCheckout } from '../../actions/start-checkout/mock';
|
|
42
|
-
import { mockAttachCheckoutContact } from '../../actions/attach-checkout-contact/mock';
|
|
43
|
-
import { mockGetAddressOptions } from '../../actions/get-address-options/mock';
|
|
44
|
-
import { mockSetOrderAddress } from '../../actions/set-order-address/mock';
|
|
45
|
-
import { mockGetShippingOptions } from '../../actions/get-shipping-options/mock';
|
|
46
|
-
import { mockSelectShippingOption } from '../../actions/select-shipping-option/mock';
|
|
47
|
-
import { mockGetOutlets } from '../../actions/get-outlets/mock';
|
|
48
|
-
import { mockSetOutlet } from '../../actions/set-outlet/mock';
|
|
49
|
-
import { mockResumeCheckout } from '../../actions/resume-checkout/mock';
|
|
50
|
-
import { mockGetCheckoutStatus } from '../../actions/get-checkout-status/mock';
|
|
51
41
|
import { mockGetMotoConfig } from '../../actions/get-moto-config/mock';
|
|
52
42
|
import { mockGetTimeClockStatus } from '../../actions/get-time-clock-status/mock';
|
|
53
43
|
import { mockClearCart } from '../../actions/clear-cart/mock';
|
|
@@ -168,16 +158,6 @@ export const RENDER_MOCKS = {
|
|
|
168
158
|
getCashRoundingAmount: mockGetCashRoundingAmount,
|
|
169
159
|
createPaymentLink: mockCreatePaymentLink,
|
|
170
160
|
chargeMoto: mockChargeMoto,
|
|
171
|
-
startCheckout: mockStartCheckout,
|
|
172
|
-
attachCheckoutContact: mockAttachCheckoutContact,
|
|
173
|
-
getAddressOptions: mockGetAddressOptions,
|
|
174
|
-
setOrderAddress: mockSetOrderAddress,
|
|
175
|
-
getShippingOptions: mockGetShippingOptions,
|
|
176
|
-
selectShippingOption: mockSelectShippingOption,
|
|
177
|
-
getOutlets: mockGetOutlets,
|
|
178
|
-
setOutlet: mockSetOutlet,
|
|
179
|
-
resumeCheckout: mockResumeCheckout,
|
|
180
|
-
getCheckoutStatus: mockGetCheckoutStatus,
|
|
181
161
|
getMotoConfig: mockGetMotoConfig,
|
|
182
162
|
clearCart: mockClearCart,
|
|
183
163
|
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,
|
|
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, GetMotoConfig, GetTimeClockStatus } from '../../index';
|
|
2
2
|
export interface RenderProviderActions {
|
|
3
3
|
exampleFunction: ExampleFunction;
|
|
4
4
|
getProducts: GetProducts;
|
|
@@ -65,28 +65,6 @@ export interface RenderProviderActions {
|
|
|
65
65
|
integrationPayment: IntegrationPayment;
|
|
66
66
|
createPaymentLink: CreatePaymentLink;
|
|
67
67
|
chargeMoto: ChargeMoto;
|
|
68
|
-
/**
|
|
69
|
-
* ONLINE checkout — served only by the storefront runtime (a published
|
|
70
|
-
* website). The till tenders above are refused there, and this is refused on
|
|
71
|
-
* a register, because the two declare different things to the card networks.
|
|
72
|
-
*/
|
|
73
|
-
startCheckout: StartCheckout;
|
|
74
|
-
attachCheckoutContact: AttachCheckoutContact;
|
|
75
|
-
/** Shipping, on the till (ship-to) and the website alike. The runtime prices; the flow renders. */
|
|
76
|
-
getAddressOptions: GetAddressOptions;
|
|
77
|
-
setOrderAddress: SetOrderAddress;
|
|
78
|
-
getShippingOptions: GetShippingOptions;
|
|
79
|
-
selectShippingOption: SelectShippingOption;
|
|
80
|
-
getOutlets: GetOutlets;
|
|
81
|
-
setOutlet: SetOutlet;
|
|
82
|
-
/**
|
|
83
|
-
* The RETURN LEG of an online checkout, after a redirect payment method or
|
|
84
|
-
* 3-D Secure sent the shopper away and back. Storefront-only, like
|
|
85
|
-
* `startCheckout`, and safe to call on every page load.
|
|
86
|
-
*/
|
|
87
|
-
resumeCheckout: ResumeCheckout;
|
|
88
|
-
/** Where an online order stands now, by its order password. Storefront-only. */
|
|
89
|
-
getCheckoutStatus: GetCheckoutStatus;
|
|
90
68
|
getMotoConfig: GetMotoConfig;
|
|
91
69
|
addNonRevenueItem: AddNonRevenueItem;
|
|
92
70
|
addCustomerNote: AddCustomerNote;
|
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
* Pub/Sub Topics
|
|
3
3
|
* Export all available topics and their types
|
|
4
4
|
*/
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from "./attributes";
|
|
5
|
+
export * from './customers';
|
|
6
|
+
export * from './orders';
|
|
7
|
+
export * from './bookings';
|
|
8
|
+
export * from './refunds';
|
|
9
|
+
export * from './products';
|
|
10
|
+
export * from './cart';
|
|
11
|
+
export * from './payments';
|
|
12
|
+
export * from './custom-tables';
|
|
13
|
+
export * from './print';
|
|
14
|
+
export * from './outlet';
|
|
15
|
+
export * from './station';
|
|
16
|
+
export * from './session';
|
|
17
|
+
export * from './users';
|
|
18
|
+
export * from './variants';
|
|
19
|
+
export * from './transactions';
|
|
20
|
+
export * from './categories';
|
|
21
|
+
export * from './attributes';
|
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
* Pub/Sub Topics
|
|
3
3
|
* Export all available topics and their types
|
|
4
4
|
*/
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from "./attributes";
|
|
5
|
+
export * from './customers';
|
|
6
|
+
export * from './orders';
|
|
7
|
+
export * from './bookings';
|
|
8
|
+
export * from './refunds';
|
|
9
|
+
export * from './products';
|
|
10
|
+
export * from './cart';
|
|
11
|
+
export * from './payments';
|
|
12
|
+
export * from './custom-tables';
|
|
13
|
+
export * from './print';
|
|
14
|
+
export * from './outlet';
|
|
15
|
+
export * from './station';
|
|
16
|
+
export * from './session';
|
|
17
|
+
export * from './users';
|
|
18
|
+
export * from './variants';
|
|
19
|
+
export * from './transactions';
|
|
20
|
+
export * from './categories';
|
|
21
|
+
export * from './attributes';
|
|
@@ -4,7 +4,6 @@ import { RefundsEventType, RefundsEventPayload } from "./refunds/types";
|
|
|
4
4
|
import { ProductsEventType, ProductsEventPayload } from "./products/types";
|
|
5
5
|
import { CartEventType, CartEventPayload } from "./cart/types";
|
|
6
6
|
import { PaymentsEventType, PaymentsEventPayload } from "./payments/types";
|
|
7
|
-
import { CheckoutEventType, CheckoutEventPayload } from "./checkout/types";
|
|
8
7
|
import { SplitPaymentsEventType, SplitPaymentsEventPayload } from "./split-payments/types";
|
|
9
8
|
import { CustomTablesEventPayload, CustomTablesEventType } from "./custom-tables/types";
|
|
10
9
|
import { PrintEventType, PrintEventPayload } from "./print/types";
|
|
@@ -24,13 +23,6 @@ export interface TopicEventPayloadMap {
|
|
|
24
23
|
products: Record<ProductsEventType, ProductsEventPayload>;
|
|
25
24
|
cart: Record<CartEventType, CartEventPayload>;
|
|
26
25
|
payments: Record<PaymentsEventType, PaymentsEventPayload>;
|
|
27
|
-
/**
|
|
28
|
-
* ONLINE checkout only (a published website), where the POS `payments`
|
|
29
|
-
* topic never fires: `payments` reports a till tender settling in front of
|
|
30
|
-
* a cashier, while a web shopper's outcome arrives asynchronously and can
|
|
31
|
-
* only ever be an authorisation until the provider's webhook lands.
|
|
32
|
-
*/
|
|
33
|
-
checkout: Record<CheckoutEventType, CheckoutEventPayload>;
|
|
34
26
|
"split-payments": Record<SplitPaymentsEventType, SplitPaymentsEventPayload>;
|
|
35
27
|
customTables: Record<CustomTablesEventType, CustomTablesEventPayload>;
|
|
36
28
|
print: Record<PrintEventType, PrintEventPayload>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@final-commerce/command-frame",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0-staging.2",
|
|
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.
|
|
60
|
+
"@final-commerce/common": "2.9.0-staging.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@commitlint/cli": "^19.0.0",
|