@infuro/cms-core 1.0.64 → 1.0.65
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/admin.cjs +1 -1
- package/dist/admin.js +1 -1
- package/dist/api.cjs +36 -36
- package/dist/api.js +4 -4
- package/dist/{chunk-OJAYCNE5.js → chunk-ACBN6UWZ.js} +218 -39
- package/dist/chunk-BXAKL2TF.cjs +84 -0
- package/dist/{chunk-M25DGZ5J.cjs → chunk-NIRYYJIJ.cjs} +220 -41
- package/dist/{chunk-DXERXWBR.js → chunk-RDEVZMO5.js} +36 -20
- package/dist/{chunk-K6C3ZSBZ.js → chunk-SANKKGB3.js} +28 -18
- package/dist/chunk-THL5JDWJ.cjs +101 -0
- package/dist/{chunk-PX3BSCIG.cjs → chunk-V6EYAC7X.cjs} +38 -22
- package/dist/chunk-XJNNOSJR.js +98 -0
- package/dist/chunk-YEAXE4U2.js +77 -0
- package/dist/{chunk-FF45VZMM.cjs → chunk-YHEITFHR.cjs} +56 -46
- package/dist/{emit-order-notification-trigger-ZRRGCQGB.cjs → emit-order-notification-trigger-DR74TQXN.cjs} +4 -4
- package/dist/{emit-order-notification-trigger-MFCBAE7L.js → emit-order-notification-trigger-UCKJHDQK.js} +2 -2
- package/dist/index.cjs +224 -224
- package/dist/index.d.cts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +8 -8
- package/dist/{order-completion-otp-handlers-3W5I3LON.js → order-completion-otp-handlers-CH22ZRAI.js} +2 -2
- package/dist/{order-completion-otp-handlers-RF3DLNV7.cjs → order-completion-otp-handlers-RW5RSXH3.cjs} +3 -3
- package/dist/{order-notification-dispatcher-ID2PDEXD.js → order-notification-dispatcher-3TXUAJ7L.js} +2 -2
- package/dist/{order-notification-dispatcher-RNEQB3V7.cjs → order-notification-dispatcher-Y7NZAALH.cjs} +7 -7
- package/dist/{pg-boss-service-L6MTF4EQ.cjs → pg-boss-service-BDGOKM2T.cjs} +3 -3
- package/dist/pg-boss-service-WCBJD4JB.js +2 -0
- package/package.json +1 -1
- package/dist/chunk-AYWDQFJZ.js +0 -27
- package/dist/chunk-GO7PPYNU.js +0 -76
- package/dist/chunk-UEE4PTTB.cjs +0 -30
- package/dist/chunk-XQ3QUHWR.cjs +0 -83
- package/dist/pg-boss-service-4XF2TQ2E.js +0 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkWFMVD567_cjs = require('./chunk-WFMVD567.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkTHL5JDWJ_cjs = require('./chunk-THL5JDWJ.cjs');
|
|
5
5
|
var chunkHY3AXLOI_cjs = require('./chunk-HY3AXLOI.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkNIRYYJIJ_cjs = require('./chunk-NIRYYJIJ.cjs');
|
|
7
7
|
var chunkH3IVLIPR_cjs = require('./chunk-H3IVLIPR.cjs');
|
|
8
8
|
var chunk7NMT3GBR_cjs = require('./chunk-7NMT3GBR.cjs');
|
|
9
9
|
var chunkXFDIIVZB_cjs = require('./chunk-XFDIIVZB.cjs');
|
|
@@ -5239,7 +5239,7 @@ function createCrudHandler(dataSource, entityMap, options) {
|
|
|
5239
5239
|
const orderIdForNotify = created.id;
|
|
5240
5240
|
const finalCreatedStatus = String(created.status ?? createdStatus ?? "pending").toLowerCase();
|
|
5241
5241
|
const initialPayStatus = String(persistBody.paymentStatus ?? body.paymentStatus ?? "unpaid").toLowerCase();
|
|
5242
|
-
void import('./emit-order-notification-trigger-
|
|
5242
|
+
void import('./emit-order-notification-trigger-DR74TQXN.cjs').then(({ fireOrderNotificationTrigger }) => {
|
|
5243
5243
|
if (finalCreatedStatus === "pending") {
|
|
5244
5244
|
if (initialPayStatus === "failed") {
|
|
5245
5245
|
fireOrderNotificationTrigger("payment_failed", orderIdForNotify, {
|
|
@@ -6319,7 +6319,7 @@ function createCrudByIdHandler(dataSource, entityMap, options) {
|
|
|
6319
6319
|
const paymentUpdated = Boolean(rawBody && typeof rawBody === "object" && rawBody.paymentStatus != null);
|
|
6320
6320
|
const assigneeUpdated = Boolean(rawBody && typeof rawBody === "object" && "assignedUserId" in rawBody && rawBody.assignedUserId !== void 0 && Number(rawBody.assignedUserId) > 0 && Number(rawBody.assignedUserId) !== Number(existingOrderRow?.assignedUserId));
|
|
6321
6321
|
if (assigneeUpdated) {
|
|
6322
|
-
void import('./emit-order-notification-trigger-
|
|
6322
|
+
void import('./emit-order-notification-trigger-DR74TQXN.cjs').then(({ fireOrderNotificationTrigger }) => {
|
|
6323
6323
|
fireOrderNotificationTrigger("order_assigned", updatedOrder.id, {
|
|
6324
6324
|
dataSource,
|
|
6325
6325
|
entityMap
|
|
@@ -6336,7 +6336,7 @@ function createCrudByIdHandler(dataSource, entityMap, options) {
|
|
|
6336
6336
|
const payments = Array.isArray(updatedOrder.payments) ? updatedOrder.payments : [];
|
|
6337
6337
|
const bodyPayStatus = rawBody && typeof rawBody === "object" && rawBody.paymentStatus != null ? String(rawBody.paymentStatus).toLowerCase() : null;
|
|
6338
6338
|
const curPayStatus = bodyPayStatus || String(payments[0]?.status || "unpaid").toLowerCase();
|
|
6339
|
-
void import('./emit-order-notification-trigger-
|
|
6339
|
+
void import('./emit-order-notification-trigger-DR74TQXN.cjs').then(({ fireOrderNotificationTrigger }) => {
|
|
6340
6340
|
if (newStatus === "pending") {
|
|
6341
6341
|
if (curPayStatus === "failed") {
|
|
6342
6342
|
fireOrderNotificationTrigger("payment_failed", updatedOrder.id, {
|
|
@@ -6990,7 +6990,7 @@ function createCrudByIdHandler(dataSource, entityMap, options) {
|
|
|
6990
6990
|
});
|
|
6991
6991
|
}
|
|
6992
6992
|
if (ordStatus === "pending" || ordStatus === "confirmed") {
|
|
6993
|
-
void import('./emit-order-notification-trigger-
|
|
6993
|
+
void import('./emit-order-notification-trigger-DR74TQXN.cjs').then(({ fireOrderNotificationTrigger }) => {
|
|
6994
6994
|
fireOrderNotificationTrigger("order_placed", pOrder, {
|
|
6995
6995
|
dataSource,
|
|
6996
6996
|
entityMap
|
|
@@ -7004,7 +7004,7 @@ function createCrudByIdHandler(dataSource, entityMap, options) {
|
|
|
7004
7004
|
}
|
|
7005
7005
|
}
|
|
7006
7006
|
} else if (newPayStatus === "failed") {
|
|
7007
|
-
void import('./emit-order-notification-trigger-
|
|
7007
|
+
void import('./emit-order-notification-trigger-DR74TQXN.cjs').then(({ fireOrderNotificationTrigger }) => {
|
|
7008
7008
|
fireOrderNotificationTrigger("payment_failed", pOrder, {
|
|
7009
7009
|
dataSource,
|
|
7010
7010
|
entityMap
|
|
@@ -7012,7 +7012,7 @@ function createCrudByIdHandler(dataSource, entityMap, options) {
|
|
|
7012
7012
|
}).catch(() => {
|
|
7013
7013
|
});
|
|
7014
7014
|
} else if (newPayStatus === "refunded") {
|
|
7015
|
-
void import('./emit-order-notification-trigger-
|
|
7015
|
+
void import('./emit-order-notification-trigger-DR74TQXN.cjs').then(({ fireOrderNotificationTrigger }) => {
|
|
7016
7016
|
fireOrderNotificationTrigger("payment_refund_initiated", pOrder, {
|
|
7017
7017
|
dataSource,
|
|
7018
7018
|
entityMap
|
|
@@ -7139,7 +7139,7 @@ function createCrudByIdHandler(dataSource, entityMap, options) {
|
|
|
7139
7139
|
const paymentUpdated = Boolean(rawBody && typeof rawBody === "object" && rawBody.paymentStatus != null);
|
|
7140
7140
|
const assigneeUpdated = Boolean(rawBody && typeof rawBody === "object" && "assignedUserId" in rawBody && rawBody.assignedUserId !== void 0 && Number(rawBody.assignedUserId) > 0 && Number(rawBody.assignedUserId) !== Number(existingOrderRow?.assignedUserId));
|
|
7141
7141
|
if (assigneeUpdated) {
|
|
7142
|
-
void import('./emit-order-notification-trigger-
|
|
7142
|
+
void import('./emit-order-notification-trigger-DR74TQXN.cjs').then(({ fireOrderNotificationTrigger }) => {
|
|
7143
7143
|
fireOrderNotificationTrigger("order_assigned", ord.id, {
|
|
7144
7144
|
dataSource,
|
|
7145
7145
|
entityMap
|
|
@@ -7156,7 +7156,7 @@ function createCrudByIdHandler(dataSource, entityMap, options) {
|
|
|
7156
7156
|
const payments = Array.isArray(ord.payments) ? ord.payments : [];
|
|
7157
7157
|
const bodyPayStatus = rawBody && typeof rawBody === "object" && rawBody.paymentStatus != null ? String(rawBody.paymentStatus).toLowerCase() : null;
|
|
7158
7158
|
const curPayStatus = bodyPayStatus || String(payments[0]?.status || "unpaid").toLowerCase();
|
|
7159
|
-
void import('./emit-order-notification-trigger-
|
|
7159
|
+
void import('./emit-order-notification-trigger-DR74TQXN.cjs').then(({ fireOrderNotificationTrigger }) => {
|
|
7160
7160
|
if (newStatus === "pending") {
|
|
7161
7161
|
if (curPayStatus === "failed") {
|
|
7162
7162
|
fireOrderNotificationTrigger("payment_failed", ord.id, {
|
|
@@ -11602,7 +11602,7 @@ function createChatHandlers(config) {
|
|
|
11602
11602
|
const notifyEmailAgent = await findLlmAgentByScope(dataSource, entityMap, LLM_AGENT_SCOPE_EMAIL_INTENT_CHATBOT, {
|
|
11603
11603
|
enabledOnly: false
|
|
11604
11604
|
});
|
|
11605
|
-
const emailTool =
|
|
11605
|
+
const emailTool = chunkNIRYYJIJ_cjs.resolveChatEmailToolSettings(llmSettings, {
|
|
11606
11606
|
chatbotValidationRules: agentRow?.validationRules ?? null,
|
|
11607
11607
|
notifyAgent: notifyEmailAgent ? {
|
|
11608
11608
|
systemInstruction: notifyEmailAgent.systemInstruction,
|
|
@@ -11612,7 +11612,7 @@ function createChatHandlers(config) {
|
|
|
11612
11612
|
const emailPlugin2 = cms.getPlugin("email");
|
|
11613
11613
|
const convLeadSent = conv.leadEmailSentAt;
|
|
11614
11614
|
const chatAgentFn = llm.chatAgent?.bind(llm);
|
|
11615
|
-
console.info(
|
|
11615
|
+
console.info(chunkNIRYYJIJ_cjs.CHAT_EMAIL_LOG, "pipeline check", {
|
|
11616
11616
|
conversationId,
|
|
11617
11617
|
enabled: emailTool.enabled,
|
|
11618
11618
|
intentCount: emailTool.intents.length,
|
|
@@ -11626,27 +11626,27 @@ function createChatHandlers(config) {
|
|
|
11626
11626
|
mergedPromptIncludesNotify: Boolean(notifyEmailAgent?.systemInstruction?.trim())
|
|
11627
11627
|
});
|
|
11628
11628
|
if (!emailTool.enabled) {
|
|
11629
|
-
console.info(
|
|
11629
|
+
console.info(chunkNIRYYJIJ_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
|
|
11630
11630
|
conversationId,
|
|
11631
11631
|
reason: "email_tool_disabled"
|
|
11632
11632
|
});
|
|
11633
11633
|
} else if (emailTool.intents.length === 0) {
|
|
11634
|
-
console.info(
|
|
11634
|
+
console.info(chunkNIRYYJIJ_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
|
|
11635
11635
|
conversationId,
|
|
11636
11636
|
reason: "no_intents_configured"
|
|
11637
11637
|
});
|
|
11638
11638
|
} else if (!emailPlugin2) {
|
|
11639
|
-
console.info(
|
|
11639
|
+
console.info(chunkNIRYYJIJ_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
|
|
11640
11640
|
conversationId,
|
|
11641
11641
|
reason: "email_plugin_missing"
|
|
11642
11642
|
});
|
|
11643
11643
|
} else if (!chatAgentFn) {
|
|
11644
|
-
console.info(
|
|
11644
|
+
console.info(chunkNIRYYJIJ_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
|
|
11645
11645
|
conversationId,
|
|
11646
11646
|
reason: "llm_chat_agent_unavailable"
|
|
11647
11647
|
});
|
|
11648
11648
|
} else if (convLeadSent) {
|
|
11649
|
-
console.info(
|
|
11649
|
+
console.info(chunkNIRYYJIJ_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
|
|
11650
11650
|
conversationId,
|
|
11651
11651
|
reason: "lead_email_already_sent",
|
|
11652
11652
|
leadEmailSentAt: convLeadSent
|
|
@@ -11659,7 +11659,7 @@ function createChatHandlers(config) {
|
|
|
11659
11659
|
}
|
|
11660
11660
|
});
|
|
11661
11661
|
if (!contactRow) {
|
|
11662
|
-
console.warn(
|
|
11662
|
+
console.warn(chunkNIRYYJIJ_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
|
|
11663
11663
|
conversationId,
|
|
11664
11664
|
reason: "contact_not_found",
|
|
11665
11665
|
contactId
|
|
@@ -11667,7 +11667,7 @@ function createChatHandlers(config) {
|
|
|
11667
11667
|
} else {
|
|
11668
11668
|
const c = contactRow;
|
|
11669
11669
|
try {
|
|
11670
|
-
const intent = await
|
|
11670
|
+
const intent = await chunkNIRYYJIJ_cjs.detectChatLeadIntent({
|
|
11671
11671
|
chatAgent: chatAgentFn
|
|
11672
11672
|
}, {
|
|
11673
11673
|
settings: emailTool,
|
|
@@ -11681,15 +11681,15 @@ function createChatHandlers(config) {
|
|
|
11681
11681
|
model: agentRow?.model?.trim() || notifyEmailAgent?.model?.trim() || void 0
|
|
11682
11682
|
});
|
|
11683
11683
|
if (!intent.intent || !intent.emailTo) {
|
|
11684
|
-
console.info(
|
|
11684
|
+
console.info(chunkNIRYYJIJ_cjs.CHAT_EMAIL_LOG, "no email sent", {
|
|
11685
11685
|
conversationId,
|
|
11686
11686
|
reason: intent.intent ? "missing_email_to" : "no_intent_match",
|
|
11687
11687
|
intentLabel: intent.intentLabel,
|
|
11688
11688
|
classifierReason: intent.reason
|
|
11689
11689
|
});
|
|
11690
11690
|
} else {
|
|
11691
|
-
const intentRecipients =
|
|
11692
|
-
console.info(
|
|
11691
|
+
const intentRecipients = chunkNIRYYJIJ_cjs.parseIntentRecipientEmails(intent.emailTo);
|
|
11692
|
+
console.info(chunkNIRYYJIJ_cjs.CHAT_EMAIL_LOG, "intent matched \u2014 sending", {
|
|
11693
11693
|
conversationId,
|
|
11694
11694
|
intent: intent.intent,
|
|
11695
11695
|
emailTo: intent.emailTo,
|
|
@@ -11700,7 +11700,7 @@ function createChatHandlers(config) {
|
|
|
11700
11700
|
const brandingSettings = await loadSettingsGroupMap(dataSource, entityMap, "branding");
|
|
11701
11701
|
const storeSettings = await loadSettingsGroupMap(dataSource, entityMap, "store");
|
|
11702
11702
|
const companyDetails = chunkTZEMLHSP_cjs.mergeEmailLayoutCompanyDetails(brandingSettings, emailSettings, storeSettings);
|
|
11703
|
-
const leadResult = await
|
|
11703
|
+
const leadResult = await chunkNIRYYJIJ_cjs.sendChatLeadEmail(cms, emailSettings, brandingSettings, {
|
|
11704
11704
|
contactName: String(c.name ?? "").trim() || "Visitor",
|
|
11705
11705
|
contactEmail: String(c.email ?? "").trim(),
|
|
11706
11706
|
contactPhone: c.phone ?? null,
|
|
@@ -11708,7 +11708,7 @@ function createChatHandlers(config) {
|
|
|
11708
11708
|
latestMessage: message,
|
|
11709
11709
|
intentCode: intent.intent,
|
|
11710
11710
|
intentReason: intent.intentLabel || intent.reason,
|
|
11711
|
-
transcript:
|
|
11711
|
+
transcript: chunkNIRYYJIJ_cjs.buildTranscriptForLeadEmail(history, message),
|
|
11712
11712
|
companyDetails,
|
|
11713
11713
|
recipients: intentRecipients.length > 0 ? intentRecipients : void 0
|
|
11714
11714
|
});
|
|
@@ -11716,13 +11716,13 @@ function createChatHandlers(config) {
|
|
|
11716
11716
|
await convRepo().update(conversationId, {
|
|
11717
11717
|
leadEmailSentAt: /* @__PURE__ */ new Date()
|
|
11718
11718
|
});
|
|
11719
|
-
console.info(
|
|
11719
|
+
console.info(chunkNIRYYJIJ_cjs.CHAT_EMAIL_LOG, "lead email recorded", {
|
|
11720
11720
|
conversationId,
|
|
11721
11721
|
sent: true,
|
|
11722
11722
|
recipients: leadResult.recipients
|
|
11723
11723
|
});
|
|
11724
11724
|
} else {
|
|
11725
|
-
console.warn(
|
|
11725
|
+
console.warn(chunkNIRYYJIJ_cjs.CHAT_EMAIL_LOG, "lead email not sent", {
|
|
11726
11726
|
conversationId,
|
|
11727
11727
|
sent: false,
|
|
11728
11728
|
error: leadResult.error ?? "unknown",
|
|
@@ -11731,7 +11731,7 @@ function createChatHandlers(config) {
|
|
|
11731
11731
|
}
|
|
11732
11732
|
}
|
|
11733
11733
|
} catch (intentErr) {
|
|
11734
|
-
console.warn(
|
|
11734
|
+
console.warn(chunkNIRYYJIJ_cjs.CHAT_EMAIL_LOG, "pipeline error", {
|
|
11735
11735
|
conversationId,
|
|
11736
11736
|
error: intentErr instanceof Error ? intentErr.message : String(intentErr)
|
|
11737
11737
|
});
|
|
@@ -11748,7 +11748,7 @@ function createChatHandlers(config) {
|
|
|
11748
11748
|
});
|
|
11749
11749
|
if (agentRow && llm.chatAgent) {
|
|
11750
11750
|
const fromAgent = llmAgentToChatAgentOptions(agentRow);
|
|
11751
|
-
const systemPrompt =
|
|
11751
|
+
const systemPrompt = chunkNIRYYJIJ_cjs.buildChatbotSystemPromptWithEmailTool(fromAgent.systemPrompt, parsedValidation.guardrailsForPrompt, emailTool);
|
|
11752
11752
|
const res = await llm.chatAgent({
|
|
11753
11753
|
...fromAgent,
|
|
11754
11754
|
systemPrompt: systemPrompt || void 0,
|
|
@@ -11769,7 +11769,7 @@ ${contextParts.join("\n\n")}` : "";
|
|
|
11769
11769
|
agentRow.systemInstruction?.trim(),
|
|
11770
11770
|
ragSystem
|
|
11771
11771
|
].filter(Boolean).join("\n\n");
|
|
11772
|
-
systemContent =
|
|
11772
|
+
systemContent = chunkNIRYYJIJ_cjs.buildChatbotSystemPromptWithEmailTool(mergedBase || defaultSystem, parsedValidation.guardrailsForPrompt, emailTool) || defaultSystem;
|
|
11773
11773
|
} else {
|
|
11774
11774
|
systemContent = ragSystem || defaultSystem;
|
|
11775
11775
|
}
|
|
@@ -13024,7 +13024,7 @@ function createDeviceTokensHandlers(config) {
|
|
|
13024
13024
|
const title = body.title?.trim() || "Test Push Notification";
|
|
13025
13025
|
const msgBody = body.body?.trim() || "Firebase Push Notification setup is working!";
|
|
13026
13026
|
if (!token || token === "validate" || token === "validate_only") {
|
|
13027
|
-
const valRes = await
|
|
13027
|
+
const valRes = await chunkNIRYYJIJ_cjs.validateFcmCredentials(dataSource, entityMap);
|
|
13028
13028
|
if (!valRes.success) {
|
|
13029
13029
|
return json({
|
|
13030
13030
|
success: false,
|
|
@@ -13041,7 +13041,7 @@ function createDeviceTokensHandlers(config) {
|
|
|
13041
13041
|
clientEmail: valRes.clientEmail
|
|
13042
13042
|
});
|
|
13043
13043
|
}
|
|
13044
|
-
const res = await
|
|
13044
|
+
const res = await chunkNIRYYJIJ_cjs.sendFcmPushNotification(dataSource, entityMap, {
|
|
13045
13045
|
token,
|
|
13046
13046
|
title,
|
|
13047
13047
|
body: msgBody,
|
|
@@ -14037,7 +14037,7 @@ async function sendVendorOnboardEmails(input, deps) {
|
|
|
14037
14037
|
getVendorEmails(deps)
|
|
14038
14038
|
]);
|
|
14039
14039
|
const companyDetails = chunkTZEMLHSP_cjs.mergeEmailLayoutCompanyDetails(branding, emailSettings, storeSettings);
|
|
14040
|
-
const configuredNotify =
|
|
14040
|
+
const configuredNotify = chunkNIRYYJIJ_cjs.parseEmailRecipientsFromConfig(emailSettings.salesTeamEmails ?? emailSettings.salesTeamEmail);
|
|
14041
14041
|
const ownerEmail = input.ownerEmail?.trim() || "";
|
|
14042
14042
|
const ownerEmailLower = ownerEmail.toLowerCase();
|
|
14043
14043
|
const sendToOwner = input.sendToOwner !== false;
|
|
@@ -27495,7 +27495,7 @@ async function queueJobScheduleNow(cms, scheduleId) {
|
|
|
27495
27495
|
if (!boss) {
|
|
27496
27496
|
throw new Error("pg-boss is not configured (DATABASE_URL required)");
|
|
27497
27497
|
}
|
|
27498
|
-
const { JOB_RUNNER_QUEUE: JOB_RUNNER_QUEUE2 } = await import('./pg-boss-service-
|
|
27498
|
+
const { JOB_RUNNER_QUEUE: JOB_RUNNER_QUEUE2 } = await import('./pg-boss-service-BDGOKM2T.cjs');
|
|
27499
27499
|
await boss.send(JOB_RUNNER_QUEUE2, {
|
|
27500
27500
|
scheduleId,
|
|
27501
27501
|
triggeredBy: "manual"
|
|
@@ -27749,7 +27749,7 @@ function registerJobRunnerWorker(cms, deps) {
|
|
|
27749
27749
|
const registerQueue = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name(async (queueName) => {
|
|
27750
27750
|
await boss.registerWork(queueName, execute);
|
|
27751
27751
|
}, "registerQueue");
|
|
27752
|
-
void boss.registerWork(
|
|
27752
|
+
void boss.registerWork(chunkTHL5JDWJ_cjs.JOB_RUNNER_QUEUE, execute);
|
|
27753
27753
|
void (async () => {
|
|
27754
27754
|
try {
|
|
27755
27755
|
const repo = deps.dataSource.getRepository(exports.JobSchedule);
|
|
@@ -28663,11 +28663,11 @@ function whatsappPlugin(config = {}) {
|
|
|
28663
28663
|
db = await settingsLoader?.() ?? {};
|
|
28664
28664
|
} catch {
|
|
28665
28665
|
}
|
|
28666
|
-
if (!
|
|
28666
|
+
if (!chunkNIRYYJIJ_cjs.isWhatsAppPluginEnabled(db)) {
|
|
28667
28667
|
context.logger.warn("WhatsApp plugin skipped: disabled in Plugins \u2192 WhatsApp");
|
|
28668
28668
|
return null;
|
|
28669
28669
|
}
|
|
28670
|
-
const svc = new
|
|
28670
|
+
const svc = new chunkNIRYYJIJ_cjs.WhatsAppService(env, staticRest, settingsLoader, getMessageTemplateRow);
|
|
28671
28671
|
return {
|
|
28672
28672
|
send: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((opts) => svc.send(opts), "send")
|
|
28673
28673
|
};
|
|
@@ -28773,7 +28773,7 @@ async function ensureMessagingPluginsOnCms(base, options) {
|
|
|
28773
28773
|
}
|
|
28774
28774
|
if (!cms.getPlugin("email")) {
|
|
28775
28775
|
try {
|
|
28776
|
-
const instance = await
|
|
28776
|
+
const instance = await chunkNIRYYJIJ_cjs.emailPlugin({
|
|
28777
28777
|
type: "SMTP",
|
|
28778
28778
|
from: config.SMTP_FROM ?? "no-reply@localhost",
|
|
28779
28779
|
to: config.SMTP_TO ?? ""
|
|
@@ -28814,7 +28814,7 @@ function messagingPlugins(options) {
|
|
|
28814
28814
|
const config = options.config ?? (typeof process !== "undefined" ? process.env : {});
|
|
28815
28815
|
return [
|
|
28816
28816
|
queuePlugin(),
|
|
28817
|
-
|
|
28817
|
+
chunkNIRYYJIJ_cjs.emailPlugin({
|
|
28818
28818
|
type: "SMTP",
|
|
28819
28819
|
from: config.SMTP_FROM ?? "no-reply@localhost",
|
|
28820
28820
|
to: config.SMTP_TO ?? ""
|
|
@@ -28948,7 +28948,7 @@ function createCmsApiHandler(config) {
|
|
|
28948
28948
|
} : void 0;
|
|
28949
28949
|
const entityMap = withLlmKnowledgeEntityFallbacks(rawEntityMap);
|
|
28950
28950
|
if (getCms) {
|
|
28951
|
-
|
|
28951
|
+
chunkNIRYYJIJ_cjs.initWhatsappTriggerDispatcher({
|
|
28952
28952
|
dataSource,
|
|
28953
28953
|
entityMap,
|
|
28954
28954
|
getCms
|
|
@@ -30723,7 +30723,7 @@ function createCmsApiHandler(config) {
|
|
|
30723
30723
|
status: 400
|
|
30724
30724
|
});
|
|
30725
30725
|
}
|
|
30726
|
-
const { resendOrderNotification } = await import('./order-notification-dispatcher-
|
|
30726
|
+
const { resendOrderNotification } = await import('./order-notification-dispatcher-Y7NZAALH.cjs');
|
|
30727
30727
|
const result = await resendOrderNotification(triggerKey, orderId, {
|
|
30728
30728
|
dataSource,
|
|
30729
30729
|
entityMap,
|
|
@@ -30822,7 +30822,7 @@ function createCmsApiHandler(config) {
|
|
|
30822
30822
|
status: "cancelled"
|
|
30823
30823
|
});
|
|
30824
30824
|
const fireOrderCancelledNotification = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((refundAmount) => {
|
|
30825
|
-
void import('./emit-order-notification-trigger-
|
|
30825
|
+
void import('./emit-order-notification-trigger-DR74TQXN.cjs').then(({ fireOrderNotificationTrigger }) => {
|
|
30826
30826
|
fireOrderNotificationTrigger("order_cancelled", orderId, {
|
|
30827
30827
|
dataSource,
|
|
30828
30828
|
entityMap
|
|
@@ -31067,7 +31067,7 @@ function createCmsApiHandler(config) {
|
|
|
31067
31067
|
}, {
|
|
31068
31068
|
status: 400
|
|
31069
31069
|
});
|
|
31070
|
-
const { createOrderCompletionOtpHandlers } = await import('./order-completion-otp-handlers-
|
|
31070
|
+
const { createOrderCompletionOtpHandlers } = await import('./order-completion-otp-handlers-RW5RSXH3.cjs');
|
|
31071
31071
|
const handlers = createOrderCompletionOtpHandlers(dataSource, entityMap, getCms);
|
|
31072
31072
|
return handlers.getChannels(req, orderId);
|
|
31073
31073
|
}
|
|
@@ -31082,7 +31082,7 @@ function createCmsApiHandler(config) {
|
|
|
31082
31082
|
}, {
|
|
31083
31083
|
status: 400
|
|
31084
31084
|
});
|
|
31085
|
-
const { createOrderCompletionOtpHandlers } = await import('./order-completion-otp-handlers-
|
|
31085
|
+
const { createOrderCompletionOtpHandlers } = await import('./order-completion-otp-handlers-RW5RSXH3.cjs');
|
|
31086
31086
|
const handlers = createOrderCompletionOtpHandlers(dataSource, entityMap, getCms);
|
|
31087
31087
|
return handlers.sendOtp(req, orderId);
|
|
31088
31088
|
}
|
|
@@ -31097,7 +31097,7 @@ function createCmsApiHandler(config) {
|
|
|
31097
31097
|
}, {
|
|
31098
31098
|
status: 400
|
|
31099
31099
|
});
|
|
31100
|
-
const { createOrderCompletionOtpHandlers } = await import('./order-completion-otp-handlers-
|
|
31100
|
+
const { createOrderCompletionOtpHandlers } = await import('./order-completion-otp-handlers-RW5RSXH3.cjs');
|
|
31101
31101
|
const handlers = createOrderCompletionOtpHandlers(dataSource, entityMap, getCms);
|
|
31102
31102
|
return handlers.verifyOtp(req, orderId);
|
|
31103
31103
|
}
|
|
@@ -31729,20 +31729,26 @@ function createStorefrontApiHandler(config) {
|
|
|
31729
31729
|
const otpPepper = config.otpPepper;
|
|
31730
31730
|
const defaultPhoneCc = config.defaultPhoneCountryCode;
|
|
31731
31731
|
function fireOrderPlacedNotification(orderId, isPaid) {
|
|
31732
|
-
void import('./emit-order-notification-trigger-
|
|
31732
|
+
void import('./emit-order-notification-trigger-DR74TQXN.cjs').then(({ fireOrderNotificationTrigger }) => {
|
|
31733
31733
|
fireOrderNotificationTrigger("order_placed", orderId, {
|
|
31734
31734
|
dataSource,
|
|
31735
31735
|
entityMap
|
|
31736
|
+
}, {
|
|
31737
|
+
source: "storefront"
|
|
31736
31738
|
});
|
|
31737
31739
|
if (isPaid) {
|
|
31738
31740
|
fireOrderNotificationTrigger("payment_success", orderId, {
|
|
31739
31741
|
dataSource,
|
|
31740
31742
|
entityMap
|
|
31743
|
+
}, {
|
|
31744
|
+
source: "storefront"
|
|
31741
31745
|
});
|
|
31742
31746
|
} else {
|
|
31743
31747
|
fireOrderNotificationTrigger("payment_failed", orderId, {
|
|
31744
31748
|
dataSource,
|
|
31745
31749
|
entityMap
|
|
31750
|
+
}, {
|
|
31751
|
+
source: "storefront"
|
|
31746
31752
|
});
|
|
31747
31753
|
}
|
|
31748
31754
|
}).catch((err) => console.error("[notification-triggers] import failed", err));
|
|
@@ -34666,14 +34672,18 @@ function createStorefrontApiHandler(config) {
|
|
|
34666
34672
|
} catch {
|
|
34667
34673
|
}
|
|
34668
34674
|
try {
|
|
34669
|
-
void import('./emit-order-notification-trigger-
|
|
34675
|
+
void import('./emit-order-notification-trigger-DR74TQXN.cjs').then(({ fireOrderNotificationTrigger }) => {
|
|
34670
34676
|
fireOrderNotificationTrigger("order_cancelled", orderId, {
|
|
34671
34677
|
dataSource,
|
|
34672
34678
|
entityMap
|
|
34679
|
+
}, {
|
|
34680
|
+
source: "storefront"
|
|
34673
34681
|
});
|
|
34674
34682
|
fireOrderNotificationTrigger("payment_failed", orderId, {
|
|
34675
34683
|
dataSource,
|
|
34676
34684
|
entityMap
|
|
34685
|
+
}, {
|
|
34686
|
+
source: "storefront"
|
|
34677
34687
|
});
|
|
34678
34688
|
}).catch(() => {
|
|
34679
34689
|
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkV6EYAC7X_cjs = require('./chunk-V6EYAC7X.cjs');
|
|
4
|
+
require('./chunk-BXAKL2TF.cjs');
|
|
5
5
|
require('./chunk-USNT2KNT.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "emitOrderNotificationTrigger", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkV6EYAC7X_cjs.emitOrderNotificationTrigger; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "fireOrderNotificationTrigger", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkV6EYAC7X_cjs.fireOrderNotificationTrigger; }
|
|
16
16
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { emitOrderNotificationTrigger, fireOrderNotificationTrigger } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { emitOrderNotificationTrigger, fireOrderNotificationTrigger } from './chunk-RDEVZMO5.js';
|
|
2
|
+
import './chunk-YEAXE4U2.js';
|
|
3
3
|
import './chunk-SHUYVCID.js';
|