Add luma pagination (#187)

This commit is contained in:
HCode authored and GitHub committed 2025-02-22 14:47:23 +00:00
1 parent f701ae05b1
commit f837700d02
9 files changed
+105 -29

No files matched your search

+19 -1
View File
@@ -23,7 +23,15 @@ class LumaOperator {
}
async tasks(
filter: { ids?: string[]; applicationId?: string; userId?: string; limit?: number; offset?: number },
filter: {
ids?: string[];
applicationId?: string;
userId?: string;
limit?: number;
offset?: number;
createdAtMax?: number;
createdAtMin?: number;
},
options: { token: string }
): Promise<AxiosResponse<ILumaTasksResponse>> {
return await axios.post(
@@ -54,6 +62,16 @@ class LumaOperator {
? {
offset: filter.offset
}
: {}),
...(filter.createdAtMax !== undefined
? {
created_at_max: filter.createdAtMax
}
: {}),
...(filter.createdAtMin !== undefined
? {
created_at_min: filter.createdAtMin
}
: {})
},
{