Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add paginations in actions list #819

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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 js/src/sdk/client/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2094,6 +2094,7 @@ export type ActionsControllerV2ListActionsData = {
tags?: string;
useCase?: string;
usecaseLimit?: number;
page?: number;
};
};

Expand Down
9 changes: 5 additions & 4 deletions js/src/sdk/models/actions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ActionsListResponseDTO, ExecuteActionResDTO } from "../client";
import { ActionsControllerV2ListActionsData, ActionsListResponseDTO, ExecuteActionResDTO } from "../client";
import apiClient from "../client/client";
import { BackendClient } from "./backendClient";

Expand Down Expand Up @@ -173,7 +173,7 @@ export class Actions {
* @returns {CancelablePromise<GetListActionsResponse>} A promise that resolves to the list of all actions.
* @throws {ApiError} If the request fails.
*/
list(data: GetListActionsData = {}): Promise<ActionsListResponseDTO> {
list(data: ActionsControllerV2ListActionsData["query"] = {}): Promise<ActionsListResponseDTO> {
return apiClient.actionsV2.v2ListActions({
query: {
actions: data.actions,
Expand All @@ -182,8 +182,9 @@ export class Actions {
tags: data.tags,
useCase: data.useCase as string,
filterImportantActions: data.filterImportantActions,
showEnabledOnly: data.showEnabledOnly

showEnabledOnly: data.showEnabledOnly,
limit: data.limit,
page: data.page
}
}).then(res => {
return res.data!
Expand Down
Loading