@primocaredentgroup/convex-campaigns-component 0.3.12 → 0.3.14

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.
@@ -3,17 +3,6 @@ import { action } from "../../../_generated/server";
3
3
  import { internal } from "../../../_generated/api";
4
4
  import { assertAuthorized } from "../permissions";
5
5
 
6
- /**
7
- * Riferimento alla mutation che esegue il tick. L'API generata dall'host espone
8
- * la mutation sotto functions.internal, non campaignsInternal.
9
- */
10
- function getRunTickMutationRef(): any {
11
- const i = internal as any;
12
- return (
13
- i?.components?.campaigns?.functions?.internal?.runTickMutation ??
14
- i?.functions?.internal?.runTickMutation
15
- );
16
- }
17
6
 
18
7
  async function isDuplicateByIdempotencyKey(ctx: any, idempotencyKey?: string) {
19
8
  if (!idempotencyKey) return false;
@@ -99,8 +88,8 @@ export const runTick: any = action({
99
88
  args: {},
100
89
  handler: async (ctx) => {
101
90
  await assertAuthorized(ctx, ["System", "Admin", "Marketing"]);
102
- const ref = getRunTickMutationRef();
103
- if (!ref) throw new Error("runTick: riferimento a runTickMutation/_runTickInternal non trovato");
104
- return ctx.runMutation(ref, {});
91
+ // Path dalla struttura: internal → functions → tickProcessor → runTickMutation
92
+ // Rinominato da internal.ts a tickProcessor.ts per evitare conflitto con namespace "internal"
93
+ return ctx.runMutation(internal.functions.tickProcessor.runTickMutation, {});
105
94
  },
106
95
  });
@@ -557,8 +557,8 @@ export const _runTickInternal = internalMutation({
557
557
  });
558
558
 
559
559
  /**
560
- * Mutation pubblica per eseguire il tick. Usata dall'action runTick perché le internal
561
- * non si risolvono correttamente quando il componente è montato in un host.
560
+ * Mutation pubblica per eseguire il tick. Rinominato da internal.ts a tickProcessor.ts
561
+ * per evitare conflitto con il namespace "internal" riservato di Convex.
562
562
  */
563
563
  export const runTickMutation = mutation({
564
564
  args: {},
@@ -1,7 +1,7 @@
1
1
  export * as campaignsQueries from "./functions/queries";
2
2
  export * as campaignsMutations from "./functions/mutations";
3
3
  export * as campaignsActions from "./functions/actions";
4
- export * as campaignsInternal from "./functions/internal";
4
+ export * as campaignsInternal from "./functions/tickProcessor";
5
5
  export * as campaignsPublic from "./functions/public";
6
6
  export * as campaignsPlayground from "./functions/playground";
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primocaredentgroup/convex-campaigns-component",
3
- "version": "0.3.12",
3
+ "version": "0.3.14",
4
4
  "description": "Convex Campaigns backend component for PrimoCore",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",