@infuro/cms-core 1.0.68 → 1.0.69
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/{OrderTrackPage-W3J6WIG2.js → OrderTrackPage-VBZUVZOU.js} +1 -1
- package/dist/{OrderTrackPage-Z6FCJQYY.cjs → OrderTrackPage-VFIXWJOW.cjs} +4 -4
- package/dist/admin.cjs +1 -1
- package/dist/admin.js +1 -1
- package/dist/api.cjs +57 -57
- package/dist/api.js +24 -24
- package/dist/auth.cjs +62 -62
- package/dist/auth.js +6 -6
- package/dist/{chunk-XJNNOSJR.js → chunk-2BNVRFUQ.js} +1 -1
- package/dist/chunk-2JHGIWH7.cjs +2700 -0
- package/dist/{chunk-3DZRIZOD.cjs → chunk-3ASNJS2H.cjs} +3 -3
- package/dist/{chunk-7NMT3GBR.cjs → chunk-3LQS4ATQ.cjs} +4 -4
- package/dist/{chunk-GWDI752Q.js → chunk-3XCTGADT.js} +1 -1
- package/dist/{chunk-P6S4XFZO.cjs → chunk-47G65M5Q.cjs} +2 -2
- package/dist/{chunk-UMC7W5G3.cjs → chunk-4MNVIGVJ.cjs} +11 -11
- package/dist/{chunk-OY2YTBMP.cjs → chunk-4WZNRVEZ.cjs} +3 -3
- package/dist/{chunk-OVTOP42W.js → chunk-53AMBXMM.js} +1 -1
- package/dist/chunk-5BKT4CS5.js +28 -0
- package/dist/{chunk-IKTBZJHT.js → chunk-5DSY3GQI.js} +1 -1
- package/dist/{chunk-AYERBA7I.js → chunk-5NVGWJSY.js} +1 -1
- package/dist/{chunk-HF3L2GIT.cjs → chunk-5YMKJ3TH.cjs} +16 -16
- package/dist/{chunk-WFMVD567.cjs → chunk-6MM5OMRL.cjs} +11 -11
- package/dist/{chunk-SMHQV3WL.cjs → chunk-747MJJCZ.cjs} +147 -147
- package/dist/{chunk-SYBOCAWB.js → chunk-7QJI56OL.js} +1 -1
- package/dist/{chunk-DBPSJYLZ.js → chunk-BK5XW5XH.js} +1 -1
- package/dist/{chunk-SUUD7OUG.cjs → chunk-BQQMTQ4C.cjs} +27 -27
- package/dist/{chunk-6YOQ7G5O.js → chunk-CFUSYGSA.js} +1 -1
- package/dist/{chunk-OOTLNH63.cjs → chunk-CIZZX57T.cjs} +2 -2
- package/dist/{chunk-7L6KWI7S.cjs → chunk-CTTV375J.cjs} +13 -13
- package/dist/{chunk-ZY64VJMS.js → chunk-D4LR3S77.js} +2 -2
- package/dist/{chunk-MYUGQHU4.js → chunk-DBBYLSQP.js} +47 -47
- package/dist/{chunk-5NOZSG6J.js → chunk-DWNQTFJ5.js} +2 -2
- package/dist/{chunk-2IAXTKQN.cjs → chunk-DZNWS2MM.cjs} +2 -2
- package/dist/{chunk-M5GPOPGX.cjs → chunk-E62LKM6Z.cjs} +2 -2
- package/dist/{chunk-CRFV5WJK.js → chunk-ECNYZG6T.js} +1 -1
- package/dist/{chunk-TZEMLHSP.cjs → chunk-EYUBL7YH.cjs} +7 -7
- package/dist/{chunk-GN4LKG4V.cjs → chunk-HGR4IA7I.cjs} +18 -18
- package/dist/{chunk-TJ2MIQUT.cjs → chunk-JRW3GQD4.cjs} +4 -4
- package/dist/{chunk-3K5AIEIZ.js → chunk-JYRFSFXH.js} +1 -1
- package/dist/{chunk-WKDBMDUX.js → chunk-K6RXCLD5.js} +1 -1
- package/dist/{chunk-7JCCPQEF.js → chunk-LJ5C4RBF.js} +3 -3
- package/dist/{chunk-O4AFPDQ4.cjs → chunk-LXWF6T7F.cjs} +33 -33
- package/dist/{chunk-EIZKW2PF.js → chunk-LY7CDNC6.js} +1 -1
- package/dist/{chunk-PA6YDMFZ.cjs → chunk-M5QDJOUP.cjs} +12 -12
- package/dist/{chunk-MQBT33IV.js → chunk-MGT4DJ2D.js} +1 -1
- package/dist/{chunk-Z5G54EGD.js → chunk-MJDNS324.js} +5 -5
- package/dist/{chunk-H3IVLIPR.cjs → chunk-OXFC3DAM.cjs} +4 -4
- package/dist/{chunk-ZIT4IP6N.js → chunk-PQJIJ4ZX.js} +6 -6
- package/dist/{chunk-HY3AXLOI.cjs → chunk-PRXVSSIF.cjs} +13 -13
- package/dist/{chunk-TDV6EJHV.js → chunk-PRZOLCFW.js} +2 -2
- package/dist/{chunk-22XKONB5.cjs → chunk-QL44NCZC.cjs} +1089 -1089
- package/dist/{chunk-VM6OVUUM.cjs → chunk-QN6PZLAP.cjs} +40 -40
- package/dist/{chunk-OV5TRZET.cjs → chunk-QXAQ3V7R.cjs} +27 -27
- package/dist/{chunk-N4LBZXBG.js → chunk-RBKVMHBH.js} +9 -9
- package/dist/{chunk-UPLVMVRX.cjs → chunk-RQCXRCYM.cjs} +2 -2
- package/dist/{chunk-WUQAOTHA.js → chunk-SERRQ736.js} +1 -1
- package/dist/{chunk-HBUV73RB.cjs → chunk-SWSTGV4F.cjs} +81 -81
- package/dist/{chunk-SKJH7PX4.js → chunk-T47VP2ZT.js} +3 -3
- package/dist/{chunk-FLUF2GZH.js → chunk-WHMIWJL7.js} +1 -1
- package/dist/{chunk-JC6DLWTE.js → chunk-WQZ4AH2P.js} +1 -1
- package/dist/{chunk-D5FBNKQM.cjs → chunk-WXH3GMCF.cjs} +8 -8
- package/dist/chunk-XHPRD45G.cjs +32 -0
- package/dist/{chunk-THL5JDWJ.cjs → chunk-Y54WDY2O.cjs} +2 -2
- package/dist/{chunk-YRCKEGL2.js → chunk-YDMHG6BA.js} +1 -1
- package/dist/chunk-YHVA5NHI.js +2698 -0
- package/dist/{chunk-JXF23MPG.js → chunk-ZMIMKNSQ.js} +1 -1
- package/dist/cli.cjs +10 -10
- package/dist/cli.js +1 -1
- package/dist/email-queue-BJDH2ID7.cjs +29 -0
- package/dist/email-queue-MWP4R67H.js +8 -0
- package/dist/email-service-6JODEMUA.js +3 -0
- package/dist/email-service-VA4Q4ZRB.cjs +28 -0
- package/dist/emit-order-notification-trigger-X36V4DOH.cjs +16 -0
- package/dist/emit-order-notification-trigger-XKN2TWVF.js +3 -0
- package/dist/erp-config-enabled-32XTHBBT.cjs +11 -0
- package/dist/erp-config-enabled-CASE5YVI.js +2 -0
- package/dist/erp-order-invoice-5O42ZKC5.cjs +28 -0
- package/dist/erp-order-invoice-JEQKFXG4.js +7 -0
- package/dist/{event-order-defaults-DU7V3YND.cjs → event-order-defaults-TR45WAQQ.cjs} +10 -10
- package/dist/{event-order-defaults-H4RT7NMR.js → event-order-defaults-VXYO6NHT.js} +2 -2
- package/dist/generate-local-invoice-pdf-2NCA2WBL.cjs +12 -0
- package/dist/generate-local-invoice-pdf-XUH6GYEJ.js +3 -0
- package/dist/hooks.cjs +24 -24
- package/dist/hooks.js +2 -2
- package/dist/index.cjs +470 -470
- package/dist/index.js +39 -39
- package/dist/interpolate-KD37IRF2.js +2 -0
- package/dist/interpolate-WP6OSJHN.cjs +11 -0
- package/dist/{invoice-templates-RB462AQN.cjs → invoice-templates-2ESQ7K4N.cjs} +5 -5
- package/dist/invoice-templates-3AXTXERZ.js +2 -0
- package/dist/middleware.cjs +4 -4
- package/dist/middleware.js +2 -2
- package/dist/{order-assignees-handlers-L3RVKUBS.js → order-assignees-handlers-F7WOZHOG.js} +1 -1
- package/dist/{order-assignees-handlers-KF7RMTV5.cjs → order-assignees-handlers-JEJ5IDID.cjs} +3 -3
- package/dist/{order-completion-otp-handlers-NROWBGXN.js → order-completion-otp-handlers-FIW7PZ6W.js} +12 -12
- package/dist/{order-completion-otp-handlers-DDQREULW.cjs → order-completion-otp-handlers-LNAZTMTS.cjs} +25 -25
- package/dist/{order-inventory-76V4XIGW.js → order-inventory-R3AU6N4V.js} +2 -2
- package/dist/{order-inventory-2MYRKEPC.cjs → order-inventory-UUFPWLBW.cjs} +10 -10
- package/dist/order-notification-dispatcher-FS54ANAV.js +13 -0
- package/dist/order-notification-dispatcher-GG5C4LKZ.cjs +38 -0
- package/dist/paid-order-erp-GRXR2OG6.js +3 -0
- package/dist/paid-order-erp-X5QHPI23.cjs +12 -0
- package/dist/pg-boss-service-CMW3KQJM.js +2 -0
- package/dist/pg-boss-service-GA6ZVD5G.cjs +15 -0
- package/dist/{razorpay-U23LGY72.cjs → razorpay-GP2DXVP2.cjs} +2 -2
- package/dist/{razorpay-KLO2KNCB.js → razorpay-I3G5LNYH.js} +1 -1
- package/dist/{rbac-debug-db-KWV7D5PQ.cjs → rbac-debug-db-2ZI3XKA4.cjs} +4 -4
- package/dist/{rbac-debug-db-DFZWZ6GV.js → rbac-debug-db-IRKT6G62.js} +2 -2
- package/dist/resolve-invoice-asset-url-64QQUVC3.js +2 -0
- package/dist/resolve-invoice-asset-url-J7WAMD26.cjs +11 -0
- package/dist/retire-soft-deleted-unique-DZALT537.cjs +15 -0
- package/dist/{retire-soft-deleted-unique-NXQIH4BC.js → retire-soft-deleted-unique-F25KZBZK.js} +2 -2
- package/dist/sms-defaults-DSO3M26Y.js +2 -0
- package/dist/{sms-defaults-KCOPKQBA.cjs → sms-defaults-GDFILHHR.cjs} +5 -5
- package/dist/{sms-notification-templates-handlers-SJLO7JGZ.js → sms-notification-templates-handlers-ZGDCVS5Z.js} +1 -1
- package/dist/{sms-notification-templates-handlers-YSB3L2PK.cjs → sms-notification-templates-handlers-ZKLKFRFZ.cjs} +3 -3
- package/dist/{stripe-VU6OEG2D.cjs → stripe-2APRZHKU.cjs} +2 -2
- package/dist/{stripe-4FD27QVJ.js → stripe-7CO2ETTN.js} +1 -1
- package/dist/theme.cjs +10 -10
- package/dist/theme.js +3 -3
- package/dist/vendor-invite-status-45ZCWKCX.js +2 -0
- package/dist/{vendor-invite-status-77O7ZQ3U.cjs → vendor-invite-status-AT2E4FUA.cjs} +5 -5
- package/package.json +2 -1
- package/dist/chunk-SHUYVCID.js +0 -4
- package/dist/chunk-USNT2KNT.cjs +0 -6
- package/dist/chunk-Z5OB5QGN.js +0 -465
- package/dist/chunk-ZX5U3VCB.cjs +0 -471
- package/dist/email-queue-3QBQ63F7.js +0 -8
- package/dist/email-queue-K4E4OFI7.cjs +0 -29
- package/dist/email-service-5O24BSFR.cjs +0 -28
- package/dist/email-service-ADDF52PJ.js +0 -3
- package/dist/emit-order-notification-trigger-ROASTYQP.cjs +0 -16
- package/dist/emit-order-notification-trigger-YUQTPELC.js +0 -3
- package/dist/erp-config-enabled-CUMQ6N2V.cjs +0 -11
- package/dist/erp-config-enabled-T37X7T34.js +0 -2
- package/dist/erp-order-invoice-AZ5MX2JB.cjs +0 -28
- package/dist/erp-order-invoice-XSYHAMBS.js +0 -7
- package/dist/generate-local-invoice-pdf-BQTCL5MW.cjs +0 -12
- package/dist/generate-local-invoice-pdf-OCFG47SE.js +0 -3
- package/dist/interpolate-WAKPN56R.cjs +0 -11
- package/dist/interpolate-WDUWDF3I.js +0 -2
- package/dist/invoice-templates-GZ33OENC.js +0 -2
- package/dist/order-notification-dispatcher-6HCJ6Q75.cjs +0 -38
- package/dist/order-notification-dispatcher-KM2SY7TX.js +0 -13
- package/dist/paid-order-erp-3USEG6WL.js +0 -3
- package/dist/paid-order-erp-FSQ3GSXE.cjs +0 -12
- package/dist/pg-boss-service-BDGOKM2T.cjs +0 -15
- package/dist/pg-boss-service-WCBJD4JB.js +0 -2
- package/dist/resolve-invoice-asset-url-JEZRENJW.cjs +0 -11
- package/dist/resolve-invoice-asset-url-QZ2FRDHI.js +0 -2
- package/dist/retire-soft-deleted-unique-5VXBA5XX.cjs +0 -15
- package/dist/sms-defaults-2NL24H57.js +0 -2
- package/dist/vendor-invite-status-PWJ3DE76.js +0 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { isErpIntegrationEnabled } from './chunk-
|
|
2
|
-
import { generateLocalInvoicePdf } from './chunk-
|
|
3
|
-
import { normalizeInvoiceTemplateId } from './chunk-
|
|
4
|
-
import { resolveInvoiceAssetUrl } from './chunk-
|
|
5
|
-
import { mergeEmailLayoutCompanyDetails, getCompanyDetailsFromSettings } from './chunk-
|
|
6
|
-
import { __name } from './chunk-
|
|
1
|
+
import { isErpIntegrationEnabled } from './chunk-WQZ4AH2P.js';
|
|
2
|
+
import { generateLocalInvoicePdf } from './chunk-YHVA5NHI.js';
|
|
3
|
+
import { normalizeInvoiceTemplateId } from './chunk-K6RXCLD5.js';
|
|
4
|
+
import { resolveInvoiceAssetUrl } from './chunk-5DSY3GQI.js';
|
|
5
|
+
import { mergeEmailLayoutCompanyDetails, getCompanyDetailsFromSettings } from './chunk-YDMHG6BA.js';
|
|
6
|
+
import { __name } from './chunk-5BKT4CS5.js';
|
|
7
7
|
|
|
8
8
|
// src/plugins/erp/erp-response-map.ts
|
|
9
9
|
function pickString(o, keys) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXHPRD45G_cjs = require('./chunk-XHPRD45G.cjs');
|
|
4
4
|
|
|
5
5
|
// src/lib/order-inventory.ts
|
|
6
6
|
var STOCK_HELD = /* @__PURE__ */ new Set([
|
|
@@ -10,7 +10,7 @@ var STOCK_HELD = /* @__PURE__ */ new Set([
|
|
|
10
10
|
function orderStatusHoldsStock(status) {
|
|
11
11
|
return STOCK_HELD.has(String(status ?? "").trim().toLowerCase());
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
chunkXHPRD45G_cjs.__name(orderStatusHoldsStock, "orderStatusHoldsStock");
|
|
14
14
|
function orderInventorySnapshotFromRow(order) {
|
|
15
15
|
return {
|
|
16
16
|
status: order.status ?? "pending",
|
|
@@ -28,12 +28,12 @@ function orderInventorySnapshotFromRow(order) {
|
|
|
28
28
|
}).filter((l) => l.productId > 0 && l.quantity > 0)
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
chunkXHPRD45G_cjs.__name(orderInventorySnapshotFromRow, "orderInventorySnapshotFromRow");
|
|
32
32
|
function lineKey(productId, variantId) {
|
|
33
33
|
const vid = variantId != null && Number.isFinite(Number(variantId)) && Number(variantId) > 0 ? Number(variantId) : 0;
|
|
34
34
|
return `${productId}:${vid}`;
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
chunkXHPRD45G_cjs.__name(lineKey, "lineKey");
|
|
37
37
|
function mergeInventoryLines(lines) {
|
|
38
38
|
const m = /* @__PURE__ */ new Map();
|
|
39
39
|
for (const line of lines) {
|
|
@@ -55,19 +55,19 @@ function mergeInventoryLines(lines) {
|
|
|
55
55
|
}
|
|
56
56
|
return m;
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
chunkXHPRD45G_cjs.__name(mergeInventoryLines, "mergeInventoryLines");
|
|
59
59
|
function productRepo(ds, entityMap) {
|
|
60
60
|
const target = entityMap.products;
|
|
61
61
|
if (!target) throw new Error("products entity not configured");
|
|
62
62
|
return ds.getRepository(target);
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
chunkXHPRD45G_cjs.__name(productRepo, "productRepo");
|
|
65
65
|
function variantRepo(ds, entityMap) {
|
|
66
66
|
const target = entityMap.product_variants;
|
|
67
67
|
if (!target) return null;
|
|
68
68
|
return ds.getRepository(target);
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
chunkXHPRD45G_cjs.__name(variantRepo, "variantRepo");
|
|
71
71
|
async function validateInventoryForConfirmedOrderLines(ds, entityMap, lines) {
|
|
72
72
|
const merged = mergeInventoryLines(lines);
|
|
73
73
|
const byProduct = /* @__PURE__ */ new Map();
|
|
@@ -116,7 +116,7 @@ async function validateInventoryForConfirmedOrderLines(ds, entityMap, lines) {
|
|
|
116
116
|
}
|
|
117
117
|
return null;
|
|
118
118
|
}
|
|
119
|
-
|
|
119
|
+
chunkXHPRD45G_cjs.__name(validateInventoryForConfirmedOrderLines, "validateInventoryForConfirmedOrderLines");
|
|
120
120
|
async function validateInventoryForOrderBecomingConfirmed(ds, entityMap, prevSnap, nextLines) {
|
|
121
121
|
const mergedNext = mergeInventoryLines(nextLines);
|
|
122
122
|
const prevByKey = prevSnap && orderStatusHoldsStock(prevSnap.status) ? mergeInventoryLines(prevSnap.lines) : /* @__PURE__ */ new Map();
|
|
@@ -171,7 +171,7 @@ async function validateInventoryForOrderBecomingConfirmed(ds, entityMap, prevSna
|
|
|
171
171
|
}
|
|
172
172
|
return null;
|
|
173
173
|
}
|
|
174
|
-
|
|
174
|
+
chunkXHPRD45G_cjs.__name(validateInventoryForOrderBecomingConfirmed, "validateInventoryForOrderBecomingConfirmed");
|
|
175
175
|
async function applyInventoryDelta(ds, entityMap, lines, sign, validateDeduct) {
|
|
176
176
|
const merged = mergeInventoryLines(lines);
|
|
177
177
|
const pRepo = productRepo(ds, entityMap);
|
|
@@ -226,7 +226,7 @@ async function applyInventoryDelta(ds, entityMap, lines, sign, validateDeduct) {
|
|
|
226
226
|
}
|
|
227
227
|
return null;
|
|
228
228
|
}
|
|
229
|
-
|
|
229
|
+
chunkXHPRD45G_cjs.__name(applyInventoryDelta, "applyInventoryDelta");
|
|
230
230
|
async function reconcileOrderInventoryBetweenSnapshots(ds, entityMap, prev, next) {
|
|
231
231
|
const wasHeld = orderStatusHoldsStock(prev.status);
|
|
232
232
|
const isHeld = orderStatusHoldsStock(next.status);
|
|
@@ -240,7 +240,7 @@ async function reconcileOrderInventoryBetweenSnapshots(ds, entityMap, prev, next
|
|
|
240
240
|
}
|
|
241
241
|
return null;
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
chunkXHPRD45G_cjs.__name(reconcileOrderInventoryBetweenSnapshots, "reconcileOrderInventoryBetweenSnapshots");
|
|
244
244
|
async function deductInventoryForConfirmedOrder(ds, entityMap, lines, options) {
|
|
245
245
|
const validate = options?.validate !== false;
|
|
246
246
|
if (validate) {
|
|
@@ -249,11 +249,11 @@ async function deductInventoryForConfirmedOrder(ds, entityMap, lines, options) {
|
|
|
249
249
|
}
|
|
250
250
|
return applyInventoryDelta(ds, entityMap, lines, -1, validate);
|
|
251
251
|
}
|
|
252
|
-
|
|
252
|
+
chunkXHPRD45G_cjs.__name(deductInventoryForConfirmedOrder, "deductInventoryForConfirmedOrder");
|
|
253
253
|
async function restoreInventoryForCancelledOrder(ds, entityMap, lines) {
|
|
254
254
|
return applyInventoryDelta(ds, entityMap, lines, 1, false);
|
|
255
255
|
}
|
|
256
|
-
|
|
256
|
+
chunkXHPRD45G_cjs.__name(restoreInventoryForCancelledOrder, "restoreInventoryForCancelledOrder");
|
|
257
257
|
|
|
258
258
|
exports.deductInventoryForConfirmedOrder = deductInventoryForConfirmedOrder;
|
|
259
259
|
exports.mergeInventoryLines = mergeInventoryLines;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { logErp, queueErp, errorErp } from './chunk-
|
|
2
|
-
import { __name } from './chunk-
|
|
1
|
+
import { logErp, queueErp, errorErp } from './chunk-7QJI56OL.js';
|
|
2
|
+
import { __name } from './chunk-5BKT4CS5.js';
|
|
3
3
|
|
|
4
4
|
// src/plugins/erp/paid-order-erp.ts
|
|
5
5
|
function roundMoney(major) {
|