@final-commerce/common 2.0.2 → 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 +597 -4
- package/dist/index.d.ts +597 -4
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -16
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +300 -5
- package/dist/pos-types/index.d.ts +300 -5
- package/dist/pos-types/index.js +3 -3
- package/package.json +3 -3
- package/dist/interfaces-DIX_ROSP.d.mts +0 -589
- package/dist/interfaces-DIX_ROSP.d.ts +0 -589
package/dist/index.mjs
CHANGED
|
@@ -347,6 +347,11 @@ var ReceiptSendChannel = /* @__PURE__ */ ((ReceiptSendChannel2) => {
|
|
|
347
347
|
ReceiptSendChannel2["TEXT"] = "text";
|
|
348
348
|
return ReceiptSendChannel2;
|
|
349
349
|
})(ReceiptSendChannel || {});
|
|
350
|
+
var ReceiptType = /* @__PURE__ */ ((ReceiptType2) => {
|
|
351
|
+
ReceiptType2["ORDER"] = "order";
|
|
352
|
+
ReceiptType2["REFUND"] = "refund";
|
|
353
|
+
return ReceiptType2;
|
|
354
|
+
})(ReceiptType || {});
|
|
350
355
|
var StripeStatus = /* @__PURE__ */ ((StripeStatus2) => {
|
|
351
356
|
StripeStatus2["ACTIVE"] = "active";
|
|
352
357
|
StripeStatus2["INACTIVE"] = "inactive";
|
|
@@ -354,6 +359,12 @@ var StripeStatus = /* @__PURE__ */ ((StripeStatus2) => {
|
|
|
354
359
|
StripeStatus2["PAYMENT_METHOD_ADDED"] = "payment_method_added";
|
|
355
360
|
return StripeStatus2;
|
|
356
361
|
})(StripeStatus || {});
|
|
362
|
+
var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
|
|
363
|
+
InvoiceStatus2["PAID"] = "paid";
|
|
364
|
+
InvoiceStatus2["PENDING"] = "pending";
|
|
365
|
+
InvoiceStatus2["EXPIRED"] = "expired";
|
|
366
|
+
return InvoiceStatus2;
|
|
367
|
+
})(InvoiceStatus || {});
|
|
357
368
|
|
|
358
369
|
// enums/stripe-currencies.enum.ts
|
|
359
370
|
var StripeCurrencyCode = /* @__PURE__ */ ((StripeCurrencyCode2) => {
|
|
@@ -1255,7 +1266,7 @@ var DEFAULT_CONFIG = {
|
|
|
1255
1266
|
fulfillmentPaths: [],
|
|
1256
1267
|
paymentPathMode: "permissive",
|
|
1257
1268
|
fulfillmentPathMode: "permissive",
|
|
1258
|
-
crossAxisRules: [
|
|
1269
|
+
crossAxisRules: [],
|
|
1259
1270
|
transitionConditions: [],
|
|
1260
1271
|
validInitialStates: [{ payment: "unpaid", fulfillment: "draft" }],
|
|
1261
1272
|
displayStateMap: [...DEFAULT_DISPLAY_STATE_MAP],
|
|
@@ -1272,19 +1283,6 @@ function buildResolvedConfig(config) {
|
|
|
1272
1283
|
var DEFAULT_RESOLVED_CONFIG = buildResolvedConfig(DEFAULT_CONFIG);
|
|
1273
1284
|
|
|
1274
1285
|
// order-state-machine/pos-preset.ts
|
|
1275
|
-
var POS_CROSS_AXIS_RULES = [
|
|
1276
|
-
{
|
|
1277
|
-
id: "pos-pay-requires-open-fulfillment",
|
|
1278
|
-
label: "Payments only on open fulfillment states",
|
|
1279
|
-
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.",
|
|
1280
|
-
enabled: true,
|
|
1281
|
-
trigger: { axis: "payment", to: ["payment_pending", "paid", "partially_paid"] },
|
|
1282
|
-
requires: {
|
|
1283
|
-
axis: "fulfillment",
|
|
1284
|
-
states: ["draft", "pending", "on_hold", "fulfilled"]
|
|
1285
|
-
}
|
|
1286
|
-
}
|
|
1287
|
-
];
|
|
1288
1286
|
var POS_VALID_INITIAL_STATES = [
|
|
1289
1287
|
{ payment: "unpaid", fulfillment: "draft" },
|
|
1290
1288
|
{ payment: "unpaid", fulfillment: "on_hold" },
|
|
@@ -1299,7 +1297,7 @@ function buildPosPresetConfig(companyId) {
|
|
|
1299
1297
|
_id: "pos-preset",
|
|
1300
1298
|
companyId: companyId ?? DEFAULT_CONFIG.companyId,
|
|
1301
1299
|
name: "POS Preset",
|
|
1302
|
-
crossAxisRules: [
|
|
1300
|
+
crossAxisRules: [],
|
|
1303
1301
|
validInitialStates: [...POS_VALID_INITIAL_STATES],
|
|
1304
1302
|
displayStateMap: [...DEFAULT_DISPLAY_STATE_MAP]
|
|
1305
1303
|
};
|
|
@@ -2458,6 +2456,7 @@ export {
|
|
|
2458
2456
|
FeesCustomBillingStatus,
|
|
2459
2457
|
InventoryBaseActionEnum,
|
|
2460
2458
|
InventorySpecificActionType,
|
|
2459
|
+
InvoiceStatus,
|
|
2461
2460
|
LibraryItemType,
|
|
2462
2461
|
MenuProject,
|
|
2463
2462
|
NAFixedRates,
|
|
@@ -2471,7 +2470,6 @@ export {
|
|
|
2471
2470
|
OwnerType,
|
|
2472
2471
|
PATH_MODES,
|
|
2473
2472
|
PAYMENT_STATES,
|
|
2474
|
-
POS_CROSS_AXIS_RULES,
|
|
2475
2473
|
POS_VALID_INITIAL_STATES,
|
|
2476
2474
|
PaymentMethod,
|
|
2477
2475
|
Platform,
|
|
@@ -2486,6 +2484,7 @@ export {
|
|
|
2486
2484
|
REGION_MAPPING,
|
|
2487
2485
|
REPORT_NEGATE_PATHS,
|
|
2488
2486
|
ReceiptSendChannel,
|
|
2487
|
+
ReceiptType,
|
|
2489
2488
|
ResidualPaymentMethod,
|
|
2490
2489
|
ResidualStatus,
|
|
2491
2490
|
STATE_SCHEMA,
|