File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff 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" ,
Original file line number Diff line number Diff 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" } }),
You can’t perform that action at this time.
0 commit comments