Skip to content

Commit 6ca6d7b

Browse files
committed
fix: update redact option name from redactFields to redact in documentation
fix #650
1 parent dd27b96 commit 6ca6d7b

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

qstash/howto/redact-fields.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ QStash messages can contain private data that you don't want visible in the Upst
77

88
QStash allows you to redact specific fields so they appear as `REDACTED:<SHA256>` in the dashboard and API. The original values are still used when delivering messages to your endpoint. The SHA256 hash lets you verify the two data without revealing the original data.
99

10-
To redact a field, pass the `redactFields` option when publishing a message.
10+
To redact a field, pass the `redact` option when publishing a message.
1111

1212
Available options:
1313
| Option | Description |
@@ -29,7 +29,7 @@ const client = new Client({ token: "<QSTASH_TOKEN>" });
2929
const res = await client.publishJSON({
3030
url: "https://my-api...",
3131
body: { hello: "world" },
32-
redactFields: {
32+
redact: {
3333
body: true,
3434
header: ["Authorization"] // or `header: true` to redact all headers
3535
},
@@ -45,7 +45,7 @@ client.message.publish_json(
4545
body={
4646
"hello": "world",
4747
},
48-
redact_fields={
48+
redact={
4949
"body": True,
5050
"header": ["Authorization"] // or `header: True` to redact all headers
5151
},
@@ -73,7 +73,7 @@ However, when you retry a DLQ message, QStash delivers the original values to yo
7373

7474
## Schedules
7575

76-
You can also redact fields in schedules. Pass the `redactFields` option when creating a schedule, and all messages produced by that schedule will have the specified fields redacted.
76+
You can also redact fields in schedules. Pass the `redact` option when creating a schedule, and all messages produced by that schedule will have the specified fields redacted.
7777
Schedule get and list endpoints also apply redaction, so private data won't appear in API responses or the dashboard.
7878

7979
<CodeGroup>
@@ -86,7 +86,7 @@ const res = await client.schedule.create({
8686
cron: "0 * * * *",
8787
url: "https://my-api...",
8888
body: { hello: "world" },
89-
redactFields: {
89+
redact: {
9090
body: true,
9191
header: ["Authorization"]
9292
},
@@ -102,7 +102,7 @@ client.schedule.create(
102102
cron="0 * * * *",
103103
url="https://my-api...",
104104
body={"hello": "world"},
105-
redact_fields={
105+
redact={
106106
"body": True,
107107
"header": ["Authorization"]
108108
},

workflow/howto/redact-fields.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Workflow runs can contain private data that you don't want visible in the Upstas
77

88
Upstash Workflow allows you to redact specific fields so they appear as `REDACTED:<SHA256>` in the dashboard and API. The original values are still used when delivering requests to your workflow endpoint. The SHA256 hash lets you verify the data without revealing the original values.
99

10-
To redact fields, pass the `redactFields` option when triggering a workflow run.
10+
To redact fields, pass the `redact` option when triggering a workflow run.
1111

1212
Available options:
1313
| Option | Description |
@@ -29,7 +29,7 @@ const client = new Client({ token: "<QSTASH_TOKEN>" });
2929
const { workflowRunId } = await client.trigger({
3030
url: "https://my-app.com/api/workflow",
3131
body: { hello: "world" },
32-
redactFields: {
32+
redact: {
3333
body: true,
3434
header: ["Authorization"] // or `header: true` to redact all headers
3535
},
@@ -45,7 +45,7 @@ client.trigger(
4545
body={
4646
"hello": "world",
4747
},
48-
redact_fields={
48+
redact={
4949
"body": True,
5050
"header": ["Authorization"] // or `header: True` to redact all headers
5151
},

0 commit comments

Comments
 (0)