From 411d903e7cd6770663959b76ae870c48ac7056ba Mon Sep 17 00:00:00 2001
From: Richard Fontein <32132657+rifont@users.noreply.github.com>
Date: Wed, 18 Sep 2024 11:18:55 +0100
Subject: [PATCH 1/6] docs: Add disableOutputSanitization example
---
sdks/framework/typescript/steps/introduction.mdx | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sdks/framework/typescript/steps/introduction.mdx b/sdks/framework/typescript/steps/introduction.mdx
index 4d64521a..3684f299 100644
--- a/sdks/framework/typescript/steps/introduction.mdx
+++ b/sdks/framework/typescript/steps/introduction.mdx
@@ -19,6 +19,11 @@ title: "Step Interface"
skip: async (controls) => true,
});
```
+ ```typescript Disable Output Sanitization
+ await step.email('stepId', resolver, {
+ disableOutputSanitization: true,
+ });
+ ```
```typescript Provider Overrides
await step.email('stepId', resolver, {
providers: {
@@ -100,6 +105,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.
+
+ A flag to disable output sanitization for the step. This is useful when you want to return unsescaped content to the provider, or frequently, the `` component.
+
+
### 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.
From b182f297abfe35b6dadb54057d838e8e6368e4e2 Mon Sep 17 00:00:00 2001
From: Richard Fontein <32132657+rifont@users.noreply.github.com>
Date: Wed, 18 Sep 2024 11:21:25 +0100
Subject: [PATCH 2/6] docs: Fix typo in introduction.mdx
---
sdks/framework/typescript/steps/introduction.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdks/framework/typescript/steps/introduction.mdx b/sdks/framework/typescript/steps/introduction.mdx
index 3684f299..3125816c 100644
--- a/sdks/framework/typescript/steps/introduction.mdx
+++ b/sdks/framework/typescript/steps/introduction.mdx
@@ -106,7 +106,7 @@ This is an optional configuration object that defines: [Controls Schema](/framew
- A flag to disable output sanitization for the step. This is useful when you want to return unsescaped content to the provider, or frequently, the `` component.
+ A flag to disable output sanitization for the step. This is useful when you want to return unsescaped content to the provider or the `` component.
### Providers Overrides Object
From 98c8ee69a253570fb5e5409b21bc2801301353aa Mon Sep 17 00:00:00 2001
From: Richard Fontein <32132657+rifont@users.noreply.github.com>
Date: Wed, 18 Sep 2024 12:31:01 +0100
Subject: [PATCH 3/6] Update sdks/framework/typescript/steps/introduction.mdx
Co-authored-by: Sokratis Vidros
---
sdks/framework/typescript/steps/introduction.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdks/framework/typescript/steps/introduction.mdx b/sdks/framework/typescript/steps/introduction.mdx
index 3125816c..7fa70d4d 100644
--- a/sdks/framework/typescript/steps/introduction.mdx
+++ b/sdks/framework/typescript/steps/introduction.mdx
@@ -106,7 +106,7 @@ This is an optional configuration object that defines: [Controls Schema](/framew
- A flag to disable output sanitization for the step. This is useful when you want to return unsescaped content to the provider or the `` component.
+ 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 `` component.
### Providers Overrides Object
From 9d75069ae73b737951cce616dbd96f0ce8a2358d Mon Sep 17 00:00:00 2001
From: Richard Fontein <32132657+rifont@users.noreply.github.com>
Date: Wed, 18 Sep 2024 12:39:48 +0100
Subject: [PATCH 4/6] docs: update example for disableOutputSanitization
---
sdks/framework/typescript/steps/introduction.mdx | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/sdks/framework/typescript/steps/introduction.mdx b/sdks/framework/typescript/steps/introduction.mdx
index 3125816c..70f93ebc 100644
--- a/sdks/framework/typescript/steps/introduction.mdx
+++ b/sdks/framework/typescript/steps/introduction.mdx
@@ -20,9 +20,20 @@ title: "Step Interface"
});
```
```typescript Disable Output Sanitization
- await step.email('stepId', resolver, {
+ 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, {
From afc2e36cd0ae25b4c9974c4cead8583c051ea437 Mon Sep 17 00:00:00 2001
From: Richard Fontein <32132657+rifont@users.noreply.github.com>
Date: Wed, 18 Sep 2024 12:43:40 +0100
Subject: [PATCH 5/6] docs: Update example code in introduction.mdx
---
sdks/framework/typescript/steps/introduction.mdx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/sdks/framework/typescript/steps/introduction.mdx b/sdks/framework/typescript/steps/introduction.mdx
index bfbc938e..404dce2e 100644
--- a/sdks/framework/typescript/steps/introduction.mdx
+++ b/sdks/framework/typescript/steps/introduction.mdx
@@ -15,7 +15,10 @@ 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,
});
```
@@ -36,7 +39,7 @@ title: "Step Interface"
);
```
```typescript Provider Overrides
- await step.email('stepId', resolver, {
+ await step.email('provider-override', resolver, {
providers: {
slack: ({ controls, outputs }) => {
return {
@@ -54,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 {
From 3fdb3123f8dbdb52b8b48e607bb58d8c69cc45b8 Mon Sep 17 00:00:00 2001
From: Richard Fontein <32132657+rifont@users.noreply.github.com>
Date: Wed, 18 Sep 2024 12:43:54 +0100
Subject: [PATCH 6/6] style: Fix spacing issue in introduction.mdx
---
sdks/framework/typescript/steps/introduction.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdks/framework/typescript/steps/introduction.mdx b/sdks/framework/typescript/steps/introduction.mdx
index 404dce2e..a3e8d02a 100644
--- a/sdks/framework/typescript/steps/introduction.mdx
+++ b/sdks/framework/typescript/steps/introduction.mdx
@@ -15,7 +15,7 @@ title: "Step Interface"
});
```
```typescript Skip
- await step.email('skipped-step',async () => ({
+ await step.email('skipped-step', async () => ({
subject: 'Hello, world!',
body: 'My email message',
}), {