@novu/framework 2.0.0-canary.4 → 2.0.0-canary.5

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/README.md CHANGED
@@ -48,10 +48,10 @@ const weeklyComments = workflow(
48
48
  body: `Weekly digest: ${weeklyDigest.events.map(({ payload }) => payload.comment).join(', ')}`,
49
49
  }),
50
50
  {
51
- // Skip the notification if the user has already seen it
52
- skip: () => inAppResponse.seen,
51
+ // Skip the notification if the weekly digest is empty
52
+ skip: () => weeklyDigest.events.length === 0,
53
53
  // Non-technical stakeholders can modify strongly-validated copy in Novu Cloud
54
- inputSchema: z.object({ prefix: z.string().describe('The prefix of the subject.').default('Hi!') }),
54
+ controlSchema: z.object({ prefix: z.string().describe('The prefix of the subject.').default('Hi!') }),
55
55
  }
56
56
  );
57
57
  },
@@ -62,5 +62,5 @@ const weeklyComments = workflow(
62
62
  const { GET, POST, OPTIONS } = serve({ workflows: [weeklyComments] });
63
63
 
64
64
  // Trigger your notification workflow
65
- weeklyComments.trigger({ postId: '123', to: 'user:123' });
65
+ weeklyComments.trigger({ to: 'user:123', comment: 'This is a comment on a post' });
66
66
  ```