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 {
28
28
limit : ow . optional . number ,
29
29
offset : ow . optional . number ,
30
30
desc : ow . optional . boolean ,
31
+ sortBy : ow . optional . string . oneOf ( Object . values ( ActorListSortBy ) ) ,
31
32
} ) ,
32
33
) ;
33
34
@@ -44,11 +45,17 @@ export class ActorCollectionClient extends ResourceCollectionClient {
44
45
}
45
46
}
46
47
48
+ export enum ActorListSortBy {
49
+ CREATED_AT = 'createdAt' ,
50
+ LAST_RUN_STARTED_AT = 'lastRunStartedAt' ,
51
+ }
52
+
47
53
export interface ActorCollectionListOptions {
48
54
my ?: boolean ;
49
55
limit ?: number ;
50
56
offset ?: number ;
51
57
desc ?: boolean ;
58
+ sortBy ?: ActorListSortBy ;
52
59
}
53
60
54
61
export interface ActorCollectionListItem {
Original file line number Diff line number Diff line change 1
1
const { Browser, validateRequest, DEFAULT_OPTIONS } = require ( './_helper' ) ;
2
- const { ApifyClient } = require ( 'apify-client' ) ;
2
+ const { ActorListSortBy , ApifyClient } = require ( 'apify-client' ) ;
3
3
const { stringifyWebhooksToBase64 } = require ( '../src/utils' ) ;
4
4
const mockServer = require ( './mock_server/server' ) ;
5
5
@@ -39,6 +39,7 @@ describe('Actor methods', () => {
39
39
offset : 3 ,
40
40
desc : true ,
41
41
my : true ,
42
+ sortBy : ActorListSortBy . CREATED_AT ,
42
43
} ;
43
44
44
45
const res = await client . actors ( ) . list ( opts ) ;
You can’t perform that action at this time.
0 commit comments