@infuro/cms-core 1.0.35 → 1.0.38

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 (69) hide show
  1. package/dist/admin.cjs +1222 -1024
  2. package/dist/admin.d.cts +6 -0
  3. package/dist/admin.d.ts +6 -0
  4. package/dist/admin.js +1224 -1026
  5. package/dist/api.cjs +40 -39
  6. package/dist/api.js +8 -7
  7. package/dist/auth.cjs +51 -51
  8. package/dist/auth.d.cts +3 -3
  9. package/dist/auth.d.ts +3 -3
  10. package/dist/auth.js +3 -3
  11. package/dist/chunk-22FFHLTO.cjs +2356 -0
  12. package/dist/{chunk-CNTSLED2.cjs → chunk-E6WVP7BK.cjs} +75 -14
  13. package/dist/chunk-HCIRL37O.js +21 -0
  14. package/dist/chunk-HT5DI3XW.cjs +82 -0
  15. package/dist/{chunk-EF2JBPDM.js → chunk-KFFB6EMZ.js} +9 -0
  16. package/dist/chunk-NNQBWDCI.js +2325 -0
  17. package/dist/{chunk-TIAEXJLI.cjs → chunk-OIGCAGH7.cjs} +7 -7
  18. package/dist/{chunk-4TRPKBKO.js → chunk-P7QCLE5W.js} +52 -24
  19. package/dist/{chunk-2XE4X74C.js → chunk-PYUXVU75.js} +7801 -6871
  20. package/dist/{chunk-EQPITOP6.js → chunk-SBRBR3VO.js} +70 -9
  21. package/dist/{chunk-N44BJZ4C.cjs → chunk-SPQFNIYJ.cjs} +9 -0
  22. package/dist/chunk-UCKN4BBY.cjs +24 -0
  23. package/dist/{chunk-6KPQWRFW.js → chunk-UXMDSNIG.js} +1 -1
  24. package/dist/{chunk-BGJAV67S.cjs → chunk-VJDUKAJ3.cjs} +8207 -7261
  25. package/dist/{chunk-3KPNTQBV.cjs → chunk-WMXPKKXU.cjs} +52 -23
  26. package/dist/chunk-X47PBV4I.js +79 -0
  27. package/dist/cli.cjs +4 -2
  28. package/dist/cli.js +4 -2
  29. package/dist/emit-order-notification-trigger-D2N3KFHL.cjs +16 -0
  30. package/dist/emit-order-notification-trigger-IVLWKKJL.js +3 -0
  31. package/dist/{event-order-defaults-DUGDVGJI.cjs → event-order-defaults-EMWBIGL3.cjs} +9 -9
  32. package/dist/{event-order-defaults-6E543227.js → event-order-defaults-SDRNAZHC.js} +1 -1
  33. package/dist/index.cjs +805 -1059
  34. package/dist/index.d.cts +834 -728
  35. package/dist/index.d.ts +834 -728
  36. package/dist/index.js +385 -724
  37. package/dist/migrations/1775500000000-RssFeedsAndArticles.ts +0 -1
  38. package/dist/migrations/1775700000000-JobSchedules.ts +0 -1
  39. package/dist/migrations/1781220000000-AddWhatsappTriggerBindings.ts +23 -0
  40. package/dist/migrations/1781230000000-AddOrderNotificationTriggers.ts +46 -0
  41. package/dist/migrations/1781240000000-DropEventOrderNotificationColumns.ts +29 -0
  42. package/dist/migrations/1781250000000-RemoveOrderRefundedTrigger.ts +36 -0
  43. package/dist/migrations/1781260000000-RenameWhatsappTriggerBindingsToOrderNotificationBindings.ts +92 -0
  44. package/dist/migrations/1781270000000-ComboVendorId.ts +58 -0
  45. package/dist/order-notification-dispatcher-RU7BTGGX.cjs +18 -0
  46. package/dist/order-notification-dispatcher-XWIJYDGA.js +5 -0
  47. package/dist/{rbac-debug-db-D7ME7QUY.cjs → rbac-debug-db-KHG4FJC3.cjs} +2 -2
  48. package/dist/{rbac-debug-db-MTCTVNNM.js → rbac-debug-db-QWHOENBR.js} +1 -1
  49. package/package.json +1 -1
  50. package/dist/chunk-46GKADYE.cjs +0 -84
  51. package/dist/chunk-7YIBMQDR.cjs +0 -86
  52. package/dist/chunk-J7XHLOLO.js +0 -830
  53. package/dist/chunk-JBRR5UYL.js +0 -87
  54. package/dist/chunk-JHF4YYRC.cjs +0 -188
  55. package/dist/chunk-PAMVINEX.cjs +0 -577
  56. package/dist/chunk-QM733NUK.js +0 -186
  57. package/dist/chunk-R73BKDRO.cjs +0 -90
  58. package/dist/chunk-TFUOHI37.cjs +0 -839
  59. package/dist/chunk-XDSNZUW7.js +0 -564
  60. package/dist/chunk-ZQ4X6OAU.js +0 -82
  61. package/dist/chunk-ZSVCP6N3.js +0 -83
  62. package/dist/email-FKR4FXFI.js +0 -5
  63. package/dist/email-KVKVPNCL.cjs +0 -58
  64. package/dist/event-order-notifications-5GSAOYVS.cjs +0 -27
  65. package/dist/event-order-notifications-IIIF23D5.js +0 -10
  66. package/dist/layout-36UFTHC5.cjs +0 -11
  67. package/dist/layout-AOBN26XG.js +0 -2
  68. package/dist/whatsapp-queue-3DXA4MXU.js +0 -2
  69. package/dist/whatsapp-queue-KG65MXD5.cjs +0 -15
@@ -1,83 +0,0 @@
1
- import { __name } from './chunk-SHUYVCID.js';
2
-
3
- // src/plugins/whatsapp/whatsapp-queue.ts
4
- var WHATSAPP_QUEUE_NAME = "whatsapp";
5
- function maskPhone(raw) {
6
- const digits = raw.replace(/\D/g, "");
7
- if (digits.length <= 4) return "****";
8
- return `${"*".repeat(Math.max(0, digits.length - 4))}${digits.slice(-4)}`;
9
- }
10
- __name(maskPhone, "maskPhone");
11
- function registerWhatsAppQueueProcessor(cms) {
12
- const queue = cms.getPlugin("queue");
13
- const whatsapp = cms.getPlugin("whatsapp");
14
- if (!queue) {
15
- console.warn("[whatsapp] queue processor not registered: queue plugin missing");
16
- return;
17
- }
18
- if (!whatsapp || typeof whatsapp.send !== "function") {
19
- console.warn("[whatsapp] queue processor not registered: whatsapp plugin missing or not configured");
20
- return;
21
- }
22
- queue.registerProcessor(WHATSAPP_QUEUE_NAME, async (data) => {
23
- const payload = data;
24
- if (!payload.to) {
25
- console.warn("[whatsapp] queue job skipped: missing recipient");
26
- return;
27
- }
28
- console.log("[whatsapp] queue job processing", {
29
- to: maskPhone(payload.to),
30
- templateKey: payload.templateKey ?? null,
31
- externalTemplateRef: payload.externalTemplateRef ?? null
32
- });
33
- try {
34
- const ok = await whatsapp.send(payload);
35
- if (ok) {
36
- console.log("[whatsapp] queue job completed", {
37
- to: maskPhone(payload.to),
38
- sent: true
39
- });
40
- } else {
41
- console.warn("[whatsapp] queue job completed without delivery", {
42
- to: maskPhone(payload.to),
43
- sent: false
44
- });
45
- }
46
- } catch (err) {
47
- console.error("[whatsapp] queue job failed", {
48
- to: maskPhone(payload.to),
49
- error: err instanceof Error ? err.message : String(err)
50
- });
51
- }
52
- });
53
- console.log("[whatsapp] queue processor registered", {
54
- queue: WHATSAPP_QUEUE_NAME
55
- });
56
- }
57
- __name(registerWhatsAppQueueProcessor, "registerWhatsAppQueueProcessor");
58
- async function queueWhatsApp(cms, payload) {
59
- const queue = cms.getPlugin("queue");
60
- if (queue) {
61
- console.log("[whatsapp] enqueue", {
62
- to: maskPhone(payload.to),
63
- templateKey: payload.templateKey ?? null,
64
- externalTemplateRef: payload.externalTemplateRef ?? null
65
- });
66
- await queue.add(WHATSAPP_QUEUE_NAME, payload);
67
- return true;
68
- }
69
- const whatsapp = cms.getPlugin("whatsapp");
70
- if (whatsapp && typeof whatsapp.send === "function") {
71
- console.log("[whatsapp] no queue plugin \u2014 sending immediately", {
72
- to: maskPhone(payload.to)
73
- });
74
- return whatsapp.send(payload);
75
- }
76
- console.warn("[whatsapp] send skipped: neither queue nor whatsapp plugin available", {
77
- to: maskPhone(payload.to)
78
- });
79
- return false;
80
- }
81
- __name(queueWhatsApp, "queueWhatsApp");
82
-
83
- export { queueWhatsApp, registerWhatsAppQueueProcessor };
@@ -1,5 +0,0 @@
1
- export { EmailService, emailPlugin, emailTemplates, renderEmail } from './chunk-J7XHLOLO.js';
2
- export { renderLayout } from './chunk-ZQ4X6OAU.js';
3
- export { getCompanyDetailsFromSettings, mergeEmailLayoutCompanyDetails, sendChatLeadEmail } from './chunk-XDSNZUW7.js';
4
- export { queueEmail, queueOrderPlacedEmails, queueVendorOnboardEmails, registerEmailQueueProcessor } from './chunk-5ELSW2UP.js';
5
- import './chunk-SHUYVCID.js';
@@ -1,58 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkTFUOHI37_cjs = require('./chunk-TFUOHI37.cjs');
4
- var chunk46GKADYE_cjs = require('./chunk-46GKADYE.cjs');
5
- var chunkPAMVINEX_cjs = require('./chunk-PAMVINEX.cjs');
6
- var chunkXW5ATPRW_cjs = require('./chunk-XW5ATPRW.cjs');
7
- require('./chunk-USNT2KNT.cjs');
8
-
9
-
10
-
11
- Object.defineProperty(exports, "EmailService", {
12
- enumerable: true,
13
- get: function () { return chunkTFUOHI37_cjs.EmailService; }
14
- });
15
- Object.defineProperty(exports, "emailPlugin", {
16
- enumerable: true,
17
- get: function () { return chunkTFUOHI37_cjs.emailPlugin; }
18
- });
19
- Object.defineProperty(exports, "emailTemplates", {
20
- enumerable: true,
21
- get: function () { return chunkTFUOHI37_cjs.emailTemplates; }
22
- });
23
- Object.defineProperty(exports, "renderEmail", {
24
- enumerable: true,
25
- get: function () { return chunkTFUOHI37_cjs.renderEmail; }
26
- });
27
- Object.defineProperty(exports, "renderLayout", {
28
- enumerable: true,
29
- get: function () { return chunk46GKADYE_cjs.renderLayout; }
30
- });
31
- Object.defineProperty(exports, "getCompanyDetailsFromSettings", {
32
- enumerable: true,
33
- get: function () { return chunkPAMVINEX_cjs.getCompanyDetailsFromSettings; }
34
- });
35
- Object.defineProperty(exports, "mergeEmailLayoutCompanyDetails", {
36
- enumerable: true,
37
- get: function () { return chunkPAMVINEX_cjs.mergeEmailLayoutCompanyDetails; }
38
- });
39
- Object.defineProperty(exports, "sendChatLeadEmail", {
40
- enumerable: true,
41
- get: function () { return chunkPAMVINEX_cjs.sendChatLeadEmail; }
42
- });
43
- Object.defineProperty(exports, "queueEmail", {
44
- enumerable: true,
45
- get: function () { return chunkXW5ATPRW_cjs.queueEmail; }
46
- });
47
- Object.defineProperty(exports, "queueOrderPlacedEmails", {
48
- enumerable: true,
49
- get: function () { return chunkXW5ATPRW_cjs.queueOrderPlacedEmails; }
50
- });
51
- Object.defineProperty(exports, "queueVendorOnboardEmails", {
52
- enumerable: true,
53
- get: function () { return chunkXW5ATPRW_cjs.queueVendorOnboardEmails; }
54
- });
55
- Object.defineProperty(exports, "registerEmailQueueProcessor", {
56
- enumerable: true,
57
- get: function () { return chunkXW5ATPRW_cjs.registerEmailQueueProcessor; }
58
- });
@@ -1,27 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkJHF4YYRC_cjs = require('./chunk-JHF4YYRC.cjs');
4
- require('./chunk-TFUOHI37.cjs');
5
- require('./chunk-46GKADYE.cjs');
6
- require('./chunk-OOTLNH63.cjs');
7
- require('./chunk-7YIBMQDR.cjs');
8
- var chunkR73BKDRO_cjs = require('./chunk-R73BKDRO.cjs');
9
- require('./chunk-PAMVINEX.cjs');
10
- require('./chunk-XW5ATPRW.cjs');
11
- var chunkN44BJZ4C_cjs = require('./chunk-N44BJZ4C.cjs');
12
- require('./chunk-USNT2KNT.cjs');
13
-
14
-
15
-
16
- Object.defineProperty(exports, "dispatchEventOrderNotifications", {
17
- enumerable: true,
18
- get: function () { return chunkJHF4YYRC_cjs.dispatchEventOrderNotifications; }
19
- });
20
- Object.defineProperty(exports, "buildEventOrderTemplateVariables", {
21
- enumerable: true,
22
- get: function () { return chunkR73BKDRO_cjs.buildEventOrderTemplateVariables; }
23
- });
24
- Object.defineProperty(exports, "EVENT_ORDER_TEMPLATE_VARIABLES", {
25
- enumerable: true,
26
- get: function () { return chunkN44BJZ4C_cjs.EVENT_ORDER_TEMPLATE_VARIABLES; }
27
- });
@@ -1,10 +0,0 @@
1
- export { dispatchEventOrderNotifications } from './chunk-QM733NUK.js';
2
- import './chunk-J7XHLOLO.js';
3
- import './chunk-ZQ4X6OAU.js';
4
- import './chunk-CRFV5WJK.js';
5
- import './chunk-ZSVCP6N3.js';
6
- export { buildEventOrderTemplateVariables } from './chunk-JBRR5UYL.js';
7
- import './chunk-XDSNZUW7.js';
8
- import './chunk-5ELSW2UP.js';
9
- export { EVENT_ORDER_TEMPLATE_VARIABLES } from './chunk-EF2JBPDM.js';
10
- import './chunk-SHUYVCID.js';
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- var chunk46GKADYE_cjs = require('./chunk-46GKADYE.cjs');
4
- require('./chunk-USNT2KNT.cjs');
5
-
6
-
7
-
8
- Object.defineProperty(exports, "renderLayout", {
9
- enumerable: true,
10
- get: function () { return chunk46GKADYE_cjs.renderLayout; }
11
- });
@@ -1,2 +0,0 @@
1
- export { renderLayout } from './chunk-ZQ4X6OAU.js';
2
- import './chunk-SHUYVCID.js';
@@ -1,2 +0,0 @@
1
- export { queueWhatsApp, registerWhatsAppQueueProcessor } from './chunk-ZSVCP6N3.js';
2
- import './chunk-SHUYVCID.js';
@@ -1,15 +0,0 @@
1
- 'use strict';
2
-
3
- var chunk7YIBMQDR_cjs = require('./chunk-7YIBMQDR.cjs');
4
- require('./chunk-USNT2KNT.cjs');
5
-
6
-
7
-
8
- Object.defineProperty(exports, "queueWhatsApp", {
9
- enumerable: true,
10
- get: function () { return chunk7YIBMQDR_cjs.queueWhatsApp; }
11
- });
12
- Object.defineProperty(exports, "registerWhatsAppQueueProcessor", {
13
- enumerable: true,
14
- get: function () { return chunk7YIBMQDR_cjs.registerWhatsAppQueueProcessor; }
15
- });