File tree Expand file tree Collapse file tree 3 files changed +20
-13
lines changed
Expand file tree Collapse file tree 3 files changed +20
-13
lines changed Original file line number Diff line number Diff line change 11---
22title : " List deployments"
3+ description : " List all deployments for the authenticated environment, ordered by most recent first."
34openapi : " v3-openapi GET /api/v1/deployments"
45---
Original file line number Diff line number Diff line change @@ -799,10 +799,10 @@ paths:
799799 name : " page[size]"
800800 schema :
801801 type : integer
802- minimum : 1
802+ minimum : 5
803803 maximum : 100
804804 default : 20
805- description : The number of deployments to return (default 20, max 100).
805+ description : The number of deployments to return (default 20, min 5, max 100).
806806 - in : query
807807 name : status
808808 schema :
@@ -832,7 +832,7 @@ paths:
832832 name : to
833833 schema :
834834 type : string
835- description : Filter deployments created on or before this date (ISO 8601).
835+ description : Filter deployments created on or before this date (ISO 8601). Only applied when `from` is also provided.
836836 responses :
837837 " 200 " :
838838 description : Successful request
@@ -898,8 +898,7 @@ paths:
898898 properties :
899899 next :
900900 type : string
901- nullable : true
902- description : Cursor for the next page. Pass as `page[after]` to get the next page. Null if there are no more results.
901+ description : Cursor for the next page. Pass as `page[after]` to get the next page. Omitted if there are no more results.
903902 " 401 " :
904903 description : Unauthorized - Access token is missing or invalid
905904 tags :
Original file line number Diff line number Diff line change @@ -70,14 +70,21 @@ The `publicAccessToken` returned by `wait.createToken()` is scoped to that speci
7070 </Step >
7171 <Step title = " Complete the token from the browser" >
7272 ``` ts
73- await fetch (` https://api.trigger.dev/api/v1/waitpoints/tokens/${tokenId }/complete ` , {
74- method: " POST" ,
75- headers: {
76- " Authorization" : ` Bearer ${publicAccessToken } ` ,
77- " Content-Type" : " application/json" ,
78- },
79- body: JSON .stringify ({ data: { status: " approved" } }),
80- });
73+ const response = await fetch (
74+ ` https://api.trigger.dev/api/v1/waitpoints/tokens/${token .id }/complete ` ,
75+ {
76+ method: " POST" ,
77+ headers: {
78+ " Authorization" : ` Bearer ${token .publicAccessToken } ` ,
79+ " Content-Type" : " application/json" ,
80+ },
81+ body: JSON .stringify ({ data: { status: " approved" } }),
82+ }
83+ );
84+
85+ if (! response .ok ) {
86+ throw new Error (` Failed to complete token: ${response .statusText } ` );
87+ }
8188 ```
8289 </Step >
8390</Steps >
You can’t perform that action at this time.
0 commit comments