Skip to content

Commit 950afaa

Browse files
committed
coderabbit fixes
1 parent 8ab965f commit 950afaa

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
22
title: "List deployments"
3+
description: "List all deployments for the authenticated environment, ordered by most recent first."
34
openapi: "v3-openapi GET /api/v1/deployments"
45
---

docs/v3-openapi.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff 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:

docs/wait-for-token.mdx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)