@@ -228,23 +228,28 @@ export const NeverminedProvider = ({ children, config, verbose }: NeverminedProv
228228 }
229229 } ,
230230
231- getPublishedSubscriptionsAndServices : async ( searchOptions ?: SearchOptions
231+ getPublishedSubscriptionsAndServices : async (
232+ searchOptionsSubscriptions ?: SearchOptions ,
233+ searchOptionsServices ?: SearchOptions
232234 ) : Promise < SubscriptionsAndServicesDDOs [ ] > => {
233235 try {
234236 const account = await getCurrentAccount ( sdk )
235- const query = await sdk . search . subscriptionsCreated ( account , searchOptions ?. customNestedQueries , searchOptions ?. offset , searchOptions ?. page , searchOptions ?. sort , searchOptions ?. appId )
236- return getSubscriptionsAndServices ( query . results , sdk , searchOptions )
237+ const query = await sdk . search . subscriptionsCreated ( account , searchOptionsSubscriptions ?. customNestedQueries , searchOptionsSubscriptions ?. offset , searchOptionsSubscriptions ?. page , searchOptionsSubscriptions ?. sort , searchOptionsSubscriptions ?. appId )
238+ return getSubscriptionsAndServices ( query . results , sdk , searchOptionsServices )
237239 } catch ( error ) {
238240 verbose && Logger . error ( error )
239241 return [ ]
240242 }
241243 } ,
242244
243- getPublishedSubscriptionsAndDatasets : async ( searchOptions ?: SearchOptions ) : Promise < SubscriptionsAndDatasetsDDOs [ ] > => {
245+ getPublishedSubscriptionsAndDatasets : async (
246+ searchOptionsSubscriptions ?: SearchOptions ,
247+ searchOptionsDatasets ?: SearchOptions
248+ ) : Promise < SubscriptionsAndDatasetsDDOs [ ] > => {
244249 try {
245250 const account = await getCurrentAccount ( sdk )
246- const query = await sdk . search . subscriptionsCreated ( account , searchOptions ?. customNestedQueries , searchOptions ?. offset , searchOptions ?. page , searchOptions ?. sort , searchOptions ?. appId )
247- return getSubscriptionsAndDatasets ( query . results , sdk , searchOptions )
251+ const query = await sdk . search . subscriptionsCreated ( account , searchOptionsSubscriptions ?. customNestedQueries , searchOptionsSubscriptions ?. offset , searchOptionsSubscriptions ?. page , searchOptionsSubscriptions ?. sort , searchOptionsSubscriptions ?. appId )
252+ return getSubscriptionsAndDatasets ( query . results , sdk , searchOptionsDatasets )
248253 } catch ( error ) {
249254 verbose && Logger . error ( error )
250255 return [ ]
@@ -262,23 +267,28 @@ export const NeverminedProvider = ({ children, config, verbose }: NeverminedProv
262267 }
263268 } ,
264269
265- getPurchasedSubscriptionsAndServices : async ( searchOptions ?: SearchOptions
266- ) : Promise < SubscriptionsAndServicesDDOs [ ] > => {
270+ getPurchasedSubscriptionsAndServices : async (
271+ searchOptionsSubscriptions ?: SearchOptions ,
272+ searchOptionsServices ?: SearchOptions
273+ ) : Promise < SubscriptionsAndServicesDDOs [ ] > => {
267274 try {
268275 const account = await getCurrentAccount ( sdk )
269- const query = await sdk . search . subscriptionsPurchased ( account , searchOptions ?. customNestedQueries , searchOptions ?. offset , searchOptions ?. page , searchOptions ?. sort , searchOptions ?. appId )
270- return getSubscriptionsAndServices ( query . results , sdk , searchOptions )
276+ const query = await sdk . search . subscriptionsPurchased ( account , searchOptionsSubscriptions ?. customNestedQueries , searchOptionsSubscriptions ?. offset , searchOptionsSubscriptions ?. page , searchOptionsSubscriptions ?. sort , searchOptionsSubscriptions ?. appId )
277+ return getSubscriptionsAndServices ( query . results , sdk , searchOptionsServices )
271278 } catch ( error ) {
272279 verbose && Logger . error ( error )
273280 return [ ]
274281 }
275282 } ,
276283
277- getPurchasedSubscriptionsAndDatasets : async ( searchOptions ?: SearchOptions ) : Promise < SubscriptionsAndDatasetsDDOs [ ] > => {
284+ getPurchasedSubscriptionsAndDatasets : async (
285+ searchOptionsSubscriptions ?: SearchOptions ,
286+ searchOptionsDatasets ?: SearchOptions
287+ ) : Promise < SubscriptionsAndDatasetsDDOs [ ] > => {
278288 try {
279289 const account = await getCurrentAccount ( sdk )
280- const query = await sdk . search . subscriptionsPurchased ( account , searchOptions ?. customNestedQueries , searchOptions ?. offset , searchOptions ?. page , searchOptions ?. sort , searchOptions ?. appId )
281- return getSubscriptionsAndDatasets ( query . results , sdk , searchOptions )
290+ const query = await sdk . search . subscriptionsPurchased ( account , searchOptionsSubscriptions ?. customNestedQueries , searchOptionsSubscriptions ?. offset , searchOptionsSubscriptions ?. page , searchOptionsSubscriptions ?. sort , searchOptionsSubscriptions ?. appId )
291+ return getSubscriptionsAndDatasets ( query . results , sdk , searchOptionsDatasets )
282292 } catch ( error ) {
283293 verbose && Logger . error ( error )
284294 return [ ]
0 commit comments