File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export class ActorCollectionClient extends ResourceCollectionClient {
2828 limit : ow . optional . number ,
2929 offset : ow . optional . number ,
3030 desc : ow . optional . boolean ,
31+ sortBy : ow . optional . string . oneOf ( Object . values ( ActorListSortBy ) ) ,
3132 } ) ,
3233 ) ;
3334
@@ -44,11 +45,17 @@ export class ActorCollectionClient extends ResourceCollectionClient {
4445 }
4546}
4647
48+ export enum ActorListSortBy {
49+ CREATED_AT = 'createdAt' ,
50+ LAST_RUN_STARTED_AT = 'lastRunStartedAt' ,
51+ }
52+
4753export interface ActorCollectionListOptions {
4854 my ?: boolean ;
4955 limit ?: number ;
5056 offset ?: number ;
5157 desc ?: boolean ;
58+ sortBy ?: ActorListSortBy ;
5259}
5360
5461export interface ActorCollectionListItem {
Original file line number Diff line number Diff line change 11const { Browser, validateRequest, DEFAULT_OPTIONS } = require ( './_helper' ) ;
2- const { ApifyClient } = require ( 'apify-client' ) ;
2+ const { ActorListSortBy , ApifyClient } = require ( 'apify-client' ) ;
33const { stringifyWebhooksToBase64 } = require ( '../src/utils' ) ;
44const mockServer = require ( './mock_server/server' ) ;
55
@@ -39,6 +39,7 @@ describe('Actor methods', () => {
3939 offset : 3 ,
4040 desc : true ,
4141 my : true ,
42+ sortBy : ActorListSortBy . CREATED_AT ,
4243 } ;
4344
4445 const res = await client . actors ( ) . list ( opts ) ;
You can’t perform that action at this time.
0 commit comments