-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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(editor): Add new /templates/search
endpoint
#8227
Changes from 8 commits
cded13e
d656a68
e3bc01a
b5ecfad
ab1f3ff
c4f052b
080212c
cd11dd8
71b9c93
77849c2
2cda63c
093cca0
f679cab
2a5df55
1d6b3d6
3a279e9
dde2a6f
33102a8
e1156f1
bc21b55
620c060
bf0010a
bc54f21
f66cc45
e25f983
4377ccd
2b90208
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ import type { | |
ITemplatesCollectionResponse, | ||
ITemplatesWorkflowResponse, | ||
IWorkflowTemplate, | ||
TemplateSearchFacet, | ||
} from '@/Interface'; | ||
import type { IDataObject } from 'n8n-workflow'; | ||
import { get } from '@/utils/apiUtils'; | ||
|
@@ -42,10 +43,15 @@ export async function getWorkflows( | |
apiEndpoint: string, | ||
query: { skip: number; limit: number; categories: number[]; search: string }, | ||
headers?: IDataObject, | ||
): Promise<{ totalWorkflows: number; workflows: ITemplatesWorkflow[] }> { | ||
): Promise<{ | ||
totalWorkflows: number; | ||
workflows: ITemplatesWorkflow[]; | ||
filters: TemplateSearchFacet[]; | ||
out_of: number; | ||
MiloradFilipovic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}> { | ||
return get( | ||
apiEndpoint, | ||
'/templates/workflows', | ||
'/templates/search', | ||
{ | ||
skip: query.skip, | ||
rows: query.limit, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how does this map to the page parameter typesense expects? https://typesense.org/docs/0.24.0/api/search.html#pagination-parameters There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is mapped on the backend: |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we drop the endpoint to retrieve the categories since we are not using it anymore? @MiloradFilipovic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need it for backward compatibility