@@ -2700,6 +2700,111 @@ paths:
27002700 console.log(token.id); // e.g. "waitpoint_abc123"
27012701 console.log(token.url); // HTTP callback URL to complete externally
27022702
2703+ " /api/v1/waitpoints/tokens " :
2704+ get :
2705+ operationId : list_waitpoint_tokens_v1
2706+ summary : List waitpoint tokens
2707+ description : >-
2708+ Returns a paginated list of waitpoint tokens for the current environment.
2709+ Results are ordered by creation date, newest first. Use cursor-based pagination
2710+ with `page[after]` and `page[before]` to navigate pages.
2711+ parameters :
2712+ - in : query
2713+ name : " page[size]"
2714+ schema :
2715+ type : integer
2716+ minimum : 1
2717+ maximum : 100
2718+ required : false
2719+ description : Number of tokens to return per page (1–100).
2720+ - in : query
2721+ name : " page[after]"
2722+ schema :
2723+ type : string
2724+ required : false
2725+ description : Return tokens after this cursor (from `pagination.next` in a previous response).
2726+ - in : query
2727+ name : " page[before]"
2728+ schema :
2729+ type : string
2730+ required : false
2731+ description : Return tokens before this cursor (from `pagination.previous` in a previous response).
2732+ - in : query
2733+ name : " filter[status]"
2734+ schema :
2735+ type : string
2736+ required : false
2737+ description : >-
2738+ Comma-separated list of statuses to filter by.
2739+ Allowed values: `WAITING`, `COMPLETED`, `TIMED_OUT`.
2740+ example : " WAITING,COMPLETED"
2741+ - in : query
2742+ name : " filter[idempotencyKey]"
2743+ schema :
2744+ type : string
2745+ required : false
2746+ description : Filter by idempotency key.
2747+ - in : query
2748+ name : " filter[tags]"
2749+ schema :
2750+ type : string
2751+ required : false
2752+ description : Comma-separated list of tags to filter by.
2753+ example : " user:1234567,org:9876543"
2754+ - in : query
2755+ name : " filter[createdAt][period]"
2756+ schema :
2757+ type : string
2758+ required : false
2759+ description : >-
2760+ Shorthand time period to filter by creation date (e.g. `1h`, `24h`, `7d`).
2761+ Cannot be combined with `filter[createdAt][from]` or `filter[createdAt][to]`.
2762+ example : " 24h"
2763+ - in : query
2764+ name : " filter[createdAt][from]"
2765+ schema :
2766+ type : string
2767+ format : date-time
2768+ required : false
2769+ description : Filter tokens created at or after this ISO 8601 timestamp.
2770+ - in : query
2771+ name : " filter[createdAt][to]"
2772+ schema :
2773+ type : string
2774+ format : date-time
2775+ required : false
2776+ description : Filter tokens created at or before this ISO 8601 timestamp.
2777+ responses :
2778+ " 200 " :
2779+ description : Successful request
2780+ content :
2781+ application/json :
2782+ schema :
2783+ " $ref " : " #/components/schemas/ListWaitpointTokensResult"
2784+ " 401 " :
2785+ description : Unauthorized
2786+ tags :
2787+ - waitpoints
2788+ security :
2789+ - secretKey : []
2790+ x-codeSamples :
2791+ - lang : typescript
2792+ source : |-
2793+ import { wait } from "@trigger.dev/sdk";
2794+
2795+ // Iterate over all tokens (auto-paginated)
2796+ for await (const token of wait.listTokens()) {
2797+ console.log(token.id, token.status);
2798+ }
2799+
2800+ // Filter by status and tags
2801+ for await (const token of wait.listTokens({
2802+ status: ["WAITING"],
2803+ tags: ["user:1234567"],
2804+ })) {
2805+ console.log(token.id);
2806+ }
2807+
27032808 " /api/v1/waitpoints/tokens/{waitpointId} " :
27042809 get :
27052810 operationId : retrieve_waitpoint_token_v1
@@ -4303,6 +4408,32 @@ components:
43034408 results :
43044409 type : string
43054410 description : CSV-formatted results
4411+ ListWaitpointTokensResult :
4412+ type : object
4413+ required :
4414+ - data
4415+ - pagination
4416+ properties :
4417+ data :
4418+ type : array
4419+ items :
4420+ " $ref " : " #/components/schemas/WaitpointTokenObject"
4421+ description : An array of waitpoint token objects.
4422+ pagination :
4423+ type : object
4424+ properties :
4425+ next :
4426+ type : string
4427+ nullable : true
4428+ description : >-
4429+ Cursor for the next page. Pass as `page[after]` in the next request.
4430+ example : waitpoint_abc123
4431+ previous :
4432+ type : string
4433+ nullable : true
4434+ description : >-
4435+ Cursor for the previous page. Pass as `page[before]` in the next request.
4436+ example : waitpoint_xyz789
43064437 WaitpointTokenObject :
43074438 type : object
43084439 required :
0 commit comments