Skip to content

Commit e8dec84

Browse files
committed
coderabbit fixes pt2
1 parent 00d2d28 commit e8dec84

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

docs/v3-openapi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,7 @@ paths:
810810
enum:
811811
[
812812
"PENDING",
813+
"INSTALLING",
813814
"BUILDING",
814815
"DEPLOYING",
815816
"DEPLOYED",
@@ -872,6 +873,7 @@ paths:
872873
enum:
873874
[
874875
"PENDING",
876+
"INSTALLING",
875877
"BUILDING",
876878
"DEPLOYING",
877879
"DEPLOYED",

docs/wait-for-token.mdx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,25 @@ The `publicAccessToken` returned by `wait.createToken()` is scoped to that speci
6363

6464
<Steps>
6565
<Step title="Create the token in your backend">
66-
```ts
66+
```typescript
67+
import { wait } from "@trigger.dev/sdk";
68+
6769
const token = await wait.createToken({ timeout: "10m" });
6870
// Pass token.id and token.publicAccessToken to your frontend
6971
```
7072
</Step>
7173
<Step title="Complete the token from the browser">
72-
```ts
74+
```typescript
75+
// tokenId and publicAccessToken passed from your backend
76+
const tokenId = token.id;
77+
const publicAccessToken = token.publicAccessToken;
78+
7379
const response = await fetch(
74-
`https://api.trigger.dev/api/v1/waitpoints/tokens/${token.id}/complete`,
80+
`https://api.trigger.dev/api/v1/waitpoints/tokens/${tokenId}/complete`,
7581
{
7682
method: "POST",
7783
headers: {
78-
"Authorization": `Bearer ${token.publicAccessToken}`,
84+
"Authorization": `Bearer ${publicAccessToken}`,
7985
"Content-Type": "application/json",
8086
},
8187
body: JSON.stringify({ data: { status: "approved" } }),

0 commit comments

Comments
 (0)