Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/resource_clients/actor_collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export enum ActorListSortBy {

export interface ActorCollectionListOptions extends PaginationOptions {
my?: boolean;
desc?: boolean;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was removed by accident in my previous change.

sortBy?: ActorListSortBy;
}

Expand Down
20 changes: 8 additions & 12 deletions src/resource_clients/actor_env_var_collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,20 @@ export class ActorEnvVarCollectionClient extends ResourceCollectionClient {
* Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
* items in a single API call is limited.
* ```javascript
* const paginatedList = await client.list(options);
* const paginatedList = await client.list();
*```
*
* Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
* retrieved.
*
* ```javascript
* for await (const singleItem of client.list(options)) {...}
* for await (const singleItem of client.list()) {...}
* ```
*/
list(
options: ActorEnvVarCollectionListOptions = {},
_options: ActorEnvVarCollectionListOptions = {},
): Promise<ActorEnvVarListResult> & AsyncIterable<ActorEnvironmentVariable> {
ow(
options,
ow.object.exactShape({
limit: ow.optional.number,
offset: ow.optional.number,
desc: ow.optional.boolean,
}),
);
return this._listPaginated(options);
return this._listPaginated();
}

/**
Expand All @@ -55,6 +47,10 @@ export class ActorEnvVarCollectionClient extends ResourceCollectionClient {
}
}

/**
* @deprecated No options are used in the current API implementation.
* https://github.com/apify/apify-client-js/issues/799
*/
export interface ActorEnvVarCollectionListOptions extends PaginationOptions {
desc?: boolean;
}
Expand Down
21 changes: 8 additions & 13 deletions src/resource_clients/actor_version_collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,20 @@ export class ActorVersionCollectionClient extends ResourceCollectionClient {
* Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
* items in a single API call is limited.
* ```javascript
* const paginatedList = await client.list(options);
* const paginatedList = await client.list();
*```
*
* Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
* retrieved.
*
* ```javascript
* for await (const singleItem of client.list(options)) {...}
* for await (const singleItem of client.list()) {...}
* ```
*/
list(
options: ActorVersionCollectionListOptions = {},
_options: ActorVersionCollectionListOptions = {},
): Promise<ActorVersionListResult> & AsyncIterable<FinalActorVersion> {
ow(
options,
ow.object.exactShape({
limit: ow.optional.number,
offset: ow.optional.number,
desc: ow.optional.boolean,
}),
);

return this._listPaginated(options);
return this._listPaginated();
}

/**
Expand All @@ -57,6 +48,10 @@ export class ActorVersionCollectionClient extends ResourceCollectionClient {
}
}

/**
* @deprecated No options are used in the current API implementation.
* https://github.com/apify/apify-client-js/issues/799
*/
export interface ActorVersionCollectionListOptions extends PaginationOptions {
desc?: boolean;
}
Expand Down