@open-mercato/core 0.6.7-develop.6580.1.39ab1d9e62 → 0.6.7-develop.6582.1.04cac61287
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/.turbo/turbo-build.log +1 -1
- package/dist/modules/sales/commands/documents.js +8 -4
- package/dist/modules/sales/commands/documents.js.map +2 -2
- package/dist/modules/sales/workflows.js +4 -0
- package/dist/modules/sales/workflows.js.map +2 -2
- package/dist/modules/workflows/api/instances/route.js +3 -1
- package/dist/modules/workflows/api/instances/route.js.map +2 -2
- package/dist/modules/workflows/lib/activity-executor.js +30 -2
- package/dist/modules/workflows/lib/activity-executor.js.map +2 -2
- package/dist/modules/workflows/lib/code-registry.js +10 -17
- package/dist/modules/workflows/lib/code-registry.js.map +2 -2
- package/dist/modules/workflows/lib/event-trigger-service.js +14 -2
- package/dist/modules/workflows/lib/event-trigger-service.js.map +2 -2
- package/dist/modules/workflows/lib/parallel-handler.js +10 -1
- package/dist/modules/workflows/lib/parallel-handler.js.map +2 -2
- package/dist/modules/workflows/lib/workflow-executor.js +13 -3
- package/dist/modules/workflows/lib/workflow-executor.js.map +2 -2
- package/dist/modules/workflows/lib/workflow-safe-commands.js +42 -0
- package/dist/modules/workflows/lib/workflow-safe-commands.js.map +7 -0
- package/package.json +7 -7
- package/src/modules/sales/commands/documents.ts +4 -0
- package/src/modules/sales/workflows.ts +5 -0
- package/src/modules/workflows/api/instances/route.ts +4 -2
- package/src/modules/workflows/lib/activity-executor.ts +47 -3
- package/src/modules/workflows/lib/code-registry.ts +16 -39
- package/src/modules/workflows/lib/event-trigger-service.ts +15 -2
- package/src/modules/workflows/lib/parallel-handler.ts +11 -1
- package/src/modules/workflows/lib/workflow-executor.ts +22 -3
- package/src/modules/workflows/lib/workflow-safe-commands.ts +48 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -111,7 +111,8 @@ const orderCrudEvents = {
|
|
|
111
111
|
buildPayload: (ctx) => ({
|
|
112
112
|
id: ctx.identifiers.id,
|
|
113
113
|
organizationId: ctx.identifiers.organizationId,
|
|
114
|
-
tenantId: ctx.identifiers.tenantId
|
|
114
|
+
tenantId: ctx.identifiers.tenantId,
|
|
115
|
+
userId: ctx.actorUserId ?? null
|
|
115
116
|
})
|
|
116
117
|
};
|
|
117
118
|
const quoteCrudEvents = {
|
|
@@ -121,7 +122,8 @@ const quoteCrudEvents = {
|
|
|
121
122
|
buildPayload: (ctx) => ({
|
|
122
123
|
id: ctx.identifiers.id,
|
|
123
124
|
organizationId: ctx.identifiers.organizationId,
|
|
124
|
-
tenantId: ctx.identifiers.tenantId
|
|
125
|
+
tenantId: ctx.identifiers.tenantId,
|
|
126
|
+
userId: ctx.actorUserId ?? null
|
|
125
127
|
})
|
|
126
128
|
};
|
|
127
129
|
const currencyCodeSchema = z.string().trim().toUpperCase().regex(/^[A-Z]{3}$/, { message: "currency_code_invalid" });
|
|
@@ -3340,7 +3342,8 @@ const createQuoteCommand = {
|
|
|
3340
3342
|
tenantId: quote.tenantId
|
|
3341
3343
|
},
|
|
3342
3344
|
events: quoteCrudEvents,
|
|
3343
|
-
indexer: { entityType: E.sales.sales_quote }
|
|
3345
|
+
indexer: { entityType: E.sales.sales_quote },
|
|
3346
|
+
actorUserId: ctx.auth?.sub ?? null
|
|
3344
3347
|
});
|
|
3345
3348
|
const resourceKind = deriveResourceFromCommandId(createQuoteCommand.id) ?? "sales.quote";
|
|
3346
3349
|
await invalidateCrudCache(
|
|
@@ -4225,7 +4228,8 @@ const createOrderCommand = {
|
|
|
4225
4228
|
tenantId: order.tenantId
|
|
4226
4229
|
},
|
|
4227
4230
|
events: orderCrudEvents,
|
|
4228
|
-
indexer: { entityType: E.sales.sales_order }
|
|
4231
|
+
indexer: { entityType: E.sales.sales_order },
|
|
4232
|
+
actorUserId: ctx.auth?.sub ?? null
|
|
4229
4233
|
});
|
|
4230
4234
|
const resourceKind = deriveResourceFromCommandId(createOrderCommand.id) ?? "sales.order";
|
|
4231
4235
|
await invalidateCrudCache(
|