Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(framework): Add disableOutputSanitization for Framework step options #700

Merged
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