@@ -17,6 +17,7 @@ import {
1717 SqlStepErrorView ,
1818 SqlStepResultView ,
1919} from './sql' ;
20+ import { AxonsCursorIDPage , type AxonsCursorIDPageParams } from '../../pagination' ;
2021import { Stream } from '../../streaming' ;
2122
2223export class Axons extends APIResource {
@@ -47,16 +48,19 @@ export class Axons extends APIResource {
4748 /**
4849 * [Beta] List all active axons.
4950 */
50- list ( query ?: AxonListParams , options ?: Core . RequestOptions ) : Core . APIPromise < AxonListView > ;
51- list ( options ?: Core . RequestOptions ) : Core . APIPromise < AxonListView > ;
51+ list (
52+ query ?: AxonListParams ,
53+ options ?: Core . RequestOptions ,
54+ ) : Core . PagePromise < AxonViewsAxonsCursorIDPage , AxonView > ;
55+ list ( options ?: Core . RequestOptions ) : Core . PagePromise < AxonViewsAxonsCursorIDPage , AxonView > ;
5256 list (
5357 query : AxonListParams | Core . RequestOptions = { } ,
5458 options ?: Core . RequestOptions ,
55- ) : Core . APIPromise < AxonListView > {
59+ ) : Core . PagePromise < AxonViewsAxonsCursorIDPage , AxonView > {
5660 if ( isRequestOptions ( query ) ) {
5761 return this . list ( { } , query ) ;
5862 }
59- return this . _client . get ( '/v1/axons' , { query, ...options } ) ;
63+ return this . _client . getAPIList ( '/v1/axons' , AxonViewsAxonsCursorIDPage , { query, ...options } ) ;
6064 }
6165
6266 /**
@@ -88,6 +92,8 @@ export class Axons extends APIResource {
8892 }
8993}
9094
95+ export class AxonViewsAxonsCursorIDPage extends AxonsCursorIDPage < AxonView > { }
96+
9197export interface AxonCreateParams {
9298 /**
9399 * (Optional) Name for the axon.
@@ -201,7 +207,7 @@ export interface AxonCreateParams {
201207 name ?: string | null ;
202208}
203209
204- export interface AxonListParams {
210+ export interface AxonListParams extends AxonsCursorIDPageParams {
205211 /**
206212 * Filter by axon ID.
207213 */
@@ -213,20 +219,10 @@ export interface AxonListParams {
213219 */
214220 include_total_count ?: boolean ;
215221
216- /**
217- * The limit of items to return. Default is 20. Max is 5000.
218- */
219- limit ?: number ;
220-
221222 /**
222223 * Filter by axon name (prefix match supported).
223224 */
224225 name ?: string ;
225-
226- /**
227- * Load the next page of data starting after the item with the given ID.
228- */
229- starting_after ?: string ;
230226}
231227
232228export interface AxonPublishParams {
@@ -251,6 +247,7 @@ export interface AxonPublishParams {
251247 source : string ;
252248}
253249
250+ Axons . AxonViewsAxonsCursorIDPage = AxonViewsAxonsCursorIDPage ;
254251Axons . Sql = Sql ;
255252
256253export declare namespace Axons {
@@ -261,6 +258,7 @@ export declare namespace Axons {
261258 type AxonView as AxonView ,
262259 type PublishParams as PublishParams ,
263260 type PublishResultView as PublishResultView ,
261+ AxonViewsAxonsCursorIDPage as AxonViewsAxonsCursorIDPage ,
264262 type AxonListParams as AxonListParams ,
265263 type AxonPublishParams as AxonPublishParams ,
266264 } ;
0 commit comments