@final-commerce/common 2.0.3 → 2.0.4
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.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +2 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -16
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +8 -3
- package/dist/pos-types/index.d.ts +8 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1266,7 +1266,7 @@ var DEFAULT_CONFIG = {
|
|
|
1266
1266
|
fulfillmentPaths: [],
|
|
1267
1267
|
paymentPathMode: "permissive",
|
|
1268
1268
|
fulfillmentPathMode: "permissive",
|
|
1269
|
-
crossAxisRules: [
|
|
1269
|
+
crossAxisRules: [],
|
|
1270
1270
|
transitionConditions: [],
|
|
1271
1271
|
validInitialStates: [{ payment: "unpaid", fulfillment: "draft" }],
|
|
1272
1272
|
displayStateMap: [...DEFAULT_DISPLAY_STATE_MAP],
|
|
@@ -1283,19 +1283,6 @@ function buildResolvedConfig(config) {
|
|
|
1283
1283
|
var DEFAULT_RESOLVED_CONFIG = buildResolvedConfig(DEFAULT_CONFIG);
|
|
1284
1284
|
|
|
1285
1285
|
// order-state-machine/pos-preset.ts
|
|
1286
|
-
var POS_CROSS_AXIS_RULES = [
|
|
1287
|
-
{
|
|
1288
|
-
id: "pos-pay-requires-open-fulfillment",
|
|
1289
|
-
label: "Payments only on open fulfillment states",
|
|
1290
|
-
description: "POS payments are only valid on orders whose fulfillment is open (draft / pending / on_hold) or auto-fulfilled in lock-step (fulfilled). Returned / cancelled / in-progress fulfillment must use refund flows instead.",
|
|
1291
|
-
enabled: true,
|
|
1292
|
-
trigger: { axis: "payment", to: ["payment_pending", "paid", "partially_paid"] },
|
|
1293
|
-
requires: {
|
|
1294
|
-
axis: "fulfillment",
|
|
1295
|
-
states: ["draft", "pending", "on_hold", "fulfilled"]
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
];
|
|
1299
1286
|
var POS_VALID_INITIAL_STATES = [
|
|
1300
1287
|
{ payment: "unpaid", fulfillment: "draft" },
|
|
1301
1288
|
{ payment: "unpaid", fulfillment: "on_hold" },
|
|
@@ -1310,7 +1297,7 @@ function buildPosPresetConfig(companyId) {
|
|
|
1310
1297
|
_id: "pos-preset",
|
|
1311
1298
|
companyId: companyId ?? DEFAULT_CONFIG.companyId,
|
|
1312
1299
|
name: "POS Preset",
|
|
1313
|
-
crossAxisRules: [
|
|
1300
|
+
crossAxisRules: [],
|
|
1314
1301
|
validInitialStates: [...POS_VALID_INITIAL_STATES],
|
|
1315
1302
|
displayStateMap: [...DEFAULT_DISPLAY_STATE_MAP]
|
|
1316
1303
|
};
|
|
@@ -2483,7 +2470,6 @@ export {
|
|
|
2483
2470
|
OwnerType,
|
|
2484
2471
|
PATH_MODES,
|
|
2485
2472
|
PAYMENT_STATES,
|
|
2486
|
-
POS_CROSS_AXIS_RULES,
|
|
2487
2473
|
POS_VALID_INITIAL_STATES,
|
|
2488
2474
|
PaymentMethod,
|
|
2489
2475
|
Platform,
|