Initial commit

This commit is contained in:
root
2025-12-21 09:57:43 -05:00
committed by Sebastian Krupinski
commit db42b6699c
35 changed files with 6458 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
/**
* Provider management service
*/
import { fileManagerApi } from './api';
import type { SourceSelector } from '@/types/common';
import type { ProviderRecord } from '@/types/provider';
export const providerService = {
/**
* List all available providers
*
* @param sources - Optional source selector to filter providers
* @returns Promise with provider list keyed by provider ID
*/
async list(sources?: SourceSelector): Promise<ProviderRecord> {
return await fileManagerApi.execute<ProviderRecord>('provider.list', {
sources: sources || null
});
},
/**
* Check which providers exist/are available
*
* @param sources - Source selector with provider IDs to check
* @returns Promise with provider availability status
*/
async extant(sources: SourceSelector): Promise<Record<string, boolean>> {
return await fileManagerApi.execute<Record<string, boolean>>('provider.extant', { sources });
},
};
export default providerService;