Skip to content

Commit

Permalink
Merge pull request #700 from novuhq/nv-4300-introduce-disableoutputsa…
Browse files Browse the repository at this point in the history
…nitization-step-option-for

docs(framework): Add `disableOutputSanitization` for Framework step options
  • Loading branch information
rifont authored Oct 9, 2024
2 parents b43c467 + 3fdb312 commit 0a96f13
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions sdks/framework/typescript/steps/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,31 @@ title: "Step Interface"
});
```
```typescript Skip
await step.email('stepId', resolver, {
await step.email('skipped-step', async () => ({
subject: 'Hello, world!',
body: 'My email message',
}), {
skip: async (controls) => true,
});
```
```typescript Disable Output Sanitization
await step.inApp(
'without-sanitization',
async () => ({
body: 'My in-app message',
data: {
link: '/pipeline/123?active=true&env=prod',
},
}),
{
// Prevent the `&` character in `data.link` from
// being converted to `&`
disableOutputSanitization: true,
}
);
```
```typescript Provider Overrides
await step.email('stepId', resolver, {
await step.email('provider-override', resolver, {
providers: {
slack: ({ controls, outputs }) => {
return {
Expand All @@ -38,7 +57,7 @@ title: "Step Interface"
});
```
```typescript Provider Passthrough
await step.email('stepId', resolver, {
await step.email('provider-passthrough', resolver, {
providers: {
sendgrid: ({ controls, outputs }) => {
return {
Expand Down Expand Up @@ -100,6 +119,10 @@ This is an optional configuration object that defines: [Controls Schema](/framew
This object used to access and override the underlying deliver providers SDKs. This is useful when you want to customize the content of the notification with properties that are unique to the provider.
</ResponseField>

<ResponseField name="disableOutputSanitization" type="boolean" default="false">
A flag to disable output sanitization for the step. This is useful when you want to return unescaped HTML content to the provider or the `<Inbox/>` component.
</ResponseField>

### Providers Overrides Object

This object used to access and override the underlying deliver providers SDKs. This is useful when you want to customize the content of the notification with properties that are unique to the provider.
Expand Down

0 comments on commit 0a96f13

Please sign in to comment.