File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
src/Shared/Components/Plugin Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -70,14 +70,13 @@ export const getPluginStoreData = async ({
7070 appId,
7171 offset = 0 ,
7272 signal,
73- size = 20 ,
7473} : GetPluginStoreDataServiceParamsType ) : Promise < GetPluginStoreDataReturnType > => {
7574 try {
7675 const payload : GetPluginListPayloadType = {
7776 searchKey,
7877 offset,
7978 appId,
80- size,
79+ size : 20 ,
8180 tag : selectedTags ,
8281 }
8382 const { result } = await get < PluginDetailDTO > ( getUrlWithSearchParams ( ROUTES . PLUGIN_GLOBAL_LIST_V2 , payload ) , {
@@ -118,7 +117,7 @@ export const getAvailablePluginTags = async (appId: number): Promise<string[]> =
118117 }
119118}
120119
121- export const getParentPluginList = async ( appId ?: number ) : Promise < ResponseType < MinParentPluginDTO [ ] > > => {
122- const queryParams : GetParentPluginListPayloadType = { appId }
123- return get < MinParentPluginDTO [ ] > ( getUrlWithSearchParams ( ROUTES . PLUGIN_LIST_MIN , queryParams ) )
124- }
120+ export const getParentPluginList = async (
121+ params : Partial < GetParentPluginListPayloadType > ,
122+ ) : Promise < ResponseType < MinParentPluginDTO [ ] > > =>
123+ get < MinParentPluginDTO [ ] > ( getUrlWithSearchParams ( ROUTES . PLUGIN_LIST_MIN , params ) )
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ export interface PluginAPIBaseQueryParamsType {
3030}
3131
3232export interface GetPluginTagsPayloadType extends PluginAPIBaseQueryParamsType { }
33- export interface GetParentPluginListPayloadType extends PluginAPIBaseQueryParamsType { }
33+ export interface GetParentPluginListPayloadType extends PluginAPIBaseQueryParamsType {
34+ type ?: 'ALL'
35+ }
3436
3537export interface PluginTagNamesDTO {
3638 tagNames : string [ ]
@@ -73,7 +75,7 @@ export interface ParentPluginDTO {
7375 pluginIdentifier : string
7476}
7577
76- export interface MinParentPluginDTO extends Pick < ParentPluginDTO , 'id' | 'name' | 'icon' > { }
78+ export interface MinParentPluginDTO extends Pick < ParentPluginDTO , 'id' | 'name' | 'icon' | 'pluginIdentifier' > { }
7779
7880export interface PluginDetailDTO {
7981 parentPlugins : ParentPluginDTO [ ]
@@ -180,7 +182,6 @@ export interface GetPluginStoreDataServiceParamsType extends Pick<PluginListFilt
180182 signal : AbortSignal
181183 appId : number
182184 offset ?: number
183- size ?: number
184185}
185186
186187export interface GetPluginListPayloadType
You can’t perform that action at this time.
0 commit comments