@@ -1066,55 +1066,6 @@ export async function getSpaceContentData(
1066
1066
} ;
1067
1067
}
1068
1068
1069
- /**
1070
- * Search content in a space.
1071
- */
1072
- export const searchSpaceContent = cache ( {
1073
- name : 'api.searchSpaceContent' ,
1074
- tag : ( spaceId ) => getAPICacheTag ( { tag : 'space' , space : spaceId } ) ,
1075
- getKeySuffix : getAPIContextId ,
1076
- get : async (
1077
- spaceId : string ,
1078
- /** The revision ID is used as a cache bust key, to avoid revalidating lot of cache entries by tags */
1079
- revisionId : string ,
1080
- query : string ,
1081
- options : CacheFunctionOptions ,
1082
- ) => {
1083
- const apiCtx = await api ( ) ;
1084
- const response = await apiCtx . client . spaces . searchSpaceContent (
1085
- spaceId ,
1086
- { query } ,
1087
- {
1088
- ...noCacheFetchOptions ,
1089
- signal : options . signal ,
1090
- } ,
1091
- ) ;
1092
- return cacheResponse ( response ) ;
1093
- } ,
1094
- } ) ;
1095
-
1096
- /**
1097
- * Search content accross all spaces in a parent (site or collection).
1098
- */
1099
- export const searchParentContent = cache ( {
1100
- name : 'api.searchParentContent' ,
1101
- tag : ( spaceId ) => getAPICacheTag ( { tag : 'space' , space : spaceId } ) ,
1102
- getKeySuffix : getAPIContextId ,
1103
- get : async ( parentId : string , query : string , options : CacheFunctionOptions ) => {
1104
- const apiCtx = await api ( ) ;
1105
- const response = await apiCtx . client . search . searchContent (
1106
- { query } ,
1107
- {
1108
- ...noCacheFetchOptions ,
1109
- signal : options . signal ,
1110
- } ,
1111
- ) ;
1112
- return cacheResponse ( response , {
1113
- ttl : 60 * 60 ,
1114
- } ) ;
1115
- } ,
1116
- } ) ;
1117
-
1118
1069
/**
1119
1070
* Search content in a Site or specific SiteSpaces.
1120
1071
*/
0 commit comments